FMCG/Data Acquisition with LabVIEW Software

From zhivun
Revision as of 18:24, 25 August 2016 by Zdeland (talk | contribs)
Jump to navigation Jump to search

This part of the guide will cover the actual data acquisition with the LabVIEW software. It will assume the user has N operational magnetometers which have been field-nulled and optimized. The first part will explain how to use the program to acquire data in DC-SERF mode, the second part in Z-mode.

DC-SERF mode

In DC-SERF mode, the magnetometers are sensitive to magnetic fields in the Y direction. The program is set up to calibrate the magnetometers' response using the shell-mounted Y coils, and then collect data.

Data Acquisition

  1. From the FPGA Magnetometer.lvproj project, under Main Programs, open the Magnetometer_16.1_chirp-calibration.vi program.
  2. The front panel can be somewhat intimidating, but a lot of it is not used. We'll hit on the parts that are necessary to take a measurement.
  3. In the top left, under Y Channel Settings are controls for the calibration. Depress the yellow Select? button under the channels that you wish to measure. The other three inputs will tell the program how large of a chirp signal should be sent to the magnetic field coils, as well as calculate the size of the field in magnetic field units for calibration purposes.
    1. The Amp. (V) determines the amplitude of the chirp. This voltage will be output from the FPGA to the current supplies. This voltage must be at least .02 V for noise reasons. To keep electronic noise down, large SR570 I-V gain is generally used so using too large of a calibration signal will cause the magnetometer to rail during calibration. Generally I keep this at .02 V.
    2. The R(out) value should match the chosen output resistor on the Y shell coils, most likely 5000 Ω.
    3. The Field Coils input simply points the LabVIEW program to a particular coil calibration number which calculates how large of a calibration field (in T) is being applied. This should almost always be left on Printed Y - Coil, which tells the program that a coil calibration of 4.3 x 10-5 T/A should be used.
  4. The only other settings that may need to be adjusted (though the default values are normally fine) are those under Run/Calib Settings.
    1. Regardless of the number of channels you are using, always leave Max Chans at 4.
    2. Sample Rate (Hz) will set the FPGA acquisition rate. Sampling faster and then later downsampling (see below) can give better averaging and lower noise, but generally this type of noise is not what limits a measurement. 100000 Hz is usually sufficient.
    3. Downsample (Hz) sets the downsampling rate. To save space and take advantage of signal averaging, the signals collected by the FPGA are downsampled by an averaging procedure which takes blocks of N points (where N = fsample/fdownsample) and averages them to a single value. The Nyquist frequency of the downsample rate must still be larger than our bandwidth of interest (DC-100 Hz), thus we've generally set this to 1000 Hz.
    4. The Run Time (s) will determine how long of a post-calibration time series is made. For noise-measurement purposes, usually a short scan (6-10 s) is used. For a patient measurement, a much longer sample (60-180 s) is more common.
    5. Chirp Iterations sets the number of calibration chirps sent to each magnetometer during the calibration. The responses to these chirps are averaged when calculating the response. Historically we have used 5 chirps for this purpose.
    6. I'm not 100% sure what Calib Freq Max does, but I think it should be set equal to the Downsample frquency, or 1000 Hz.
  5. That's all the setup for now! Click the Run arrow to start the program.
  6. The first prompt you'll see is one asking whether the heater PID circuit has been disabled. This is a relic of a previous-generation heater circuit, so you can always click Yes here.
  7. The next couple of prompts will ask the user to calibrate the device. If a calibration run has been completed already that day, the sequence will first ask the user if they'd like to re-calibrate the sensors. However, if it's the first time the program has been run that day, the calibration must be done before proceeding.
    1. The first prompt will tell you to calibrate the OPAMP_Y. During this stage of the calibration, the calibration chirp will be applied to the coil current supply circuit, and the monitor voltage from that circuit will be read. First, ensure on the main box that the Z-Mode switch is set to OFF and the Chirp switch is set to Y. Now, on the the FPGA breakout box, flip the switches under the green FPGA monitor BNC ports UP. This will connect the FPGA input to the monitor output on the Y current supply. Once this is done, click OK on the LabVIEW prompt and the sequence of 5 (or whatever you selected) chirp signals will be applied sequentially to the current supplies and the circuits' responses will be recorded.
    2. The next prompt will tell you to calibrate the MAGNETOMETER_Y. The chirp will be applied to the same current supply, except now the FPGA input should be connected to the magnetometer signals from the photodiodes (via the I-V converters). Flip the switches below the green ports DOWN to make that happen. Then click OK on the prompt. You should see the chirp signals appear on the scope. If the chirp signals are too large or a DC field has caused the magnetometer signal to swing such that the output rails during the calibration, it will have to be redone later. For now, just assume that it went fine.
    3. Lastly, a Noise/Heartbeat Measurement prompt will show up. No further switching is necessary (besides maybe adjusting the room or coil fields) before hitting OK. A time series of length Run Time will be collected.
  8. When the time series has been collected, the progress bar will be completely lit up and the message DONE will flash above it. Collection complete! Don't hit the STOP button yet, though!

Data analysis

Now is the time to look at the data that was collected. The program does a really nice job of analyzing all of it as well.

  1. First, click on the Calibration tab. This tab will have information about the OPAMP (or circuit) calibration data. The upper-right window shows a fourier spectrum of the circuit's response to the calibration chrip. Because the circuit doesn't filter the signal at all, this should be pretty flat, outside of peaks near 60 Hz and higher harmonics caused by noise during the acquisition. It's also likely that the voltage recorded is close to 80-85% or the applied voltage (ie, applying a .02 V chirp will generally give you a ~.172 monitor voltage output. Never quite figured out why. The upper-right window is the phase response, which should also be pretty flat. The red Y Applied Field sub-tab basically takes the voltage spectrum recorded and converts it to an applied field spectrum using the output resistor and coil calibration values specified in the setup. Clicking the tall blue NEXT button at the far right will allow you to scroll through the various channels of data. The current channel is displayed at the top next to the large red STOP button. Note: this NEXT button becomes disabled if you click the STOP button. So don't hit that until you're done looking at the analyzed data.
  2. The Response Waveforms tab plots the magnetometer responses to the calibration chirps in the top window, and individually the applied (white) and response (color) in the windows below. This is a good way to ensure the calibrations have sufficient signal to noise and that the I-V outputs did not rail during calibration. Again, use the NEXT button to scroll between channels.
  3. The Response Fits tab plots the amplitude and phase response of the magnetometer by Fourier-transforming the data from the previous tab. Note that the data in the Y Resp Fit sub-tab is in units of V/fT, as it has taken into account the size of the applied field from the Calibration tab. The raw transformed voltage data can be found in the Y raw resp sub-tab.
  4. Under the Results tab you'll find the data taken during the Noise/Heartbeat Measurement part of the procedure. The top window is the calibrated noise data (in units of fT/rHz), and the bottom window is the raw data collected (in units of V). The cursors in the top window are helpful for determining baseline noise levels.
  5. The Processing tab takes the time series from the Results tab and calibrates it using the response.
  6. The misc. and changelog tabs are not used on a day-to-day basis.

Taking more data

To acquire more data simply click STOP, and decide what you'd like to do.

  1. If there was an error during any of the calibration steps, simply click the Run arrow again. You'll start over from the beginning, except you'll be given prompts asking if you'd like to recalibrate either the circuit or magnetometer. The circuit only needs to be recalibrated if the chirp amplitude or output resistor is changed. The magnetometer should be recalibrated after any changes to the temperature, bias fields, or laser intensities/detunings. On the next run, the Run value at the top left will increment by 1, and the Noise value will reset to 00.
  2. If you're happy with your calibrations and would just like to acquire more data using those calibrations, click the button next to another noise run? at the top. You'll notice that the next time you click the RUN arrow, the Run number will not change, and the Noise number will increment by 1. When the RUN arrow is clicked, all of the calibration steps are skipped and the program jumps right to the Noise/Heartbeat Measurement prompt. Beyond simply taking more "Magnetic Noise" data, there are a couple of things you can do.
    1. Turning off the pump beam (almost completely) disables the device's sensitivity to magnetic fields. The noise collected during a measurement with the pump beam off is indicative of the technical noise (or probe noise, since much of thise noise is due to polarization or intensity fluctuations in the probe beam) in the system.
    2. Turning off the probe beam leaves only noise produced in the electronics of the system. Generally a battery of 3 runs Magnetic Noise, Probe Noise, and Electronic Noise is taken to compare the levels of each.