LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Lock in amplifier

Hi,

I cannot understand the operation of the NI Lock in Amplifer, specifically how it comes up with values for X and Y for a non-constant signal in time.  I am measuring gas density using a wavelength modulation and 2nd harmonic detection technique.  It involves modulating the laser at a kHz frequency and scanning it over the absorption line using a slow ramp (100Hz or so).  The path integral of the gas density can be obtained by looking at the 2nd harmonic of the modulation frequency, which is usually buried in noise.  The absorption occurs over a fraction of the ramp signal, so I am looking for time-dependent values of X and Y (or R) that I can then plot against the optical wavelength. 

I am using the MultiChannel Lock In kit which I have been able to set up and measure time-independent signals. 

Thanks for any help,
Aleksandr
0 Kudos
Message 1 of 13
(7,336 Views)
In general a lock-in multiplies the input with a reference signal and low-pass filters the result.

It sounds like your modulation frequency is pretty close to the frequency of the sweep. If that is the case you need to set the low-pass filter to a high frequency (short time constant). When that is the case you will get little integration and not much noise rejection.
0 Kudos
Message 2 of 13
(7,324 Views)
Hi Aleksandr,
 
Welcome to the NI Discussion Forums!

Could you let me know what hardware you are using?  I am assuming that you're using the DAQmx drivers and are using the code from Multi Channel Count Lock-In Amplifier with NI-4472 and DAQmx -- let me know if this is incorrect.

From the way you have described your application, I don't think the Lock In Amplifier VIs will work the way you are expecting.  You cannot detect a signal that is a harmonic of the modulation frequency using the NI Lock In Amplifier; you can only detect a signal that is at the modulation frequency.  However, if you have an extra analog output channel available on your device, you should be able to generate a signal that is twice the modulation frequency and use this as the reference signal.

I'm not sure if you've seen this yet, but if not, it's a useful resource on the Lock In Amplifier and how it works: NI Developer Zone Tutorial: How to Measure Small Signals Buried in Noise Using LabVIEW and Lock-In A....

0 Kudos
Message 3 of 13
(7,288 Views)
Hi Elizabeth,

I am using the DAQmx drivers with an M Series multifunction DAQ NI PCI 6281.  I am able to detect a cw signal at 20kHz with a reference at 10kHz by increasing the order to 2nd in the Lock in Amplifier.  The problem is that my signal is not cw, but repeats at a frequency of 100Hz and only lasts for around 1/10 of the period.  Furthermore I need to detect at least 5 to 10 discrete points in that range.  That means my integration time has to be on the order of 200-400 micro seconds, which translates to around 4-8 periods of the 20kHz signal.  I have tried playing with the integration time as was suggested by gwd, but without much success yet.

The second problem is that I am looking for output array from the lock in amplifier that I can plot on the same axis as the input array to find the amplitude of the 20kHz signal at a particular coordinate in the input array.  The Lock in demodulator has two main outputs, signal out and data out.  The best case is that I plot the amplitude of 20kHz signal on the same plot as the input signal and trigger the signal somehow. 

Is what I am trying to do possible with the NI Lock in?  I have implemented a simple phase insensitive FM demodulator for my signal and am able to see real time analysis of data.  The problem with that approach is that it has a large bandwidth.

Regards,
Aleksandr
0 Kudos
Message 4 of 13
(7,274 Views)

Hi Aleksandr,

I would start out by saying that you do not have the right hardware for this job.  Please read KnowledgeBase 2S4FERBH: Lock-In Amplifier Startup Toolkit Compatibility with Non-DSA Hardware.  Your device cannot simultaneously sample both the signal and the reference (so there is a phase difference between these signals.  Also, the DAQ device you have doesn't have very good dynamic range (depending on the actual magnitude of your signals, this may or may not be a problem).  Were you aware of these limitations when you selected this device for your application?

Putting the hardware limitations aside, I'm not sure that the Lock-In Amplifier Startup Kit can do what you want it to do.  I can look into this a little more if you'd like, but first I would need a bit of clarification, because as of now I'm not too clear on your application.  The part I'm not clear on is what your signals look like - if you have an image of some sort that you could post, that would be extremely helpful.

Do you have a copy of the NI Lock-In Amplifier Start-Up Kit User Manual?  If not, then I have attached a copy - maybe this will help you.

0 Kudos
Message 5 of 13
(7,233 Views)
Sorry, just noticed that the manual didn't post there for some reason.  Here it is...
0 Kudos
Message 6 of 13
(7,223 Views)
Hi Elizabeth,

I am aware of the hardware constraints, but that DAQ is the only one available at the moment.  The dynamic range is not a problem at the moment because my signal is several millivolt in amplitude.  It is clearest to look at the signal as on amplitude modulation.  The carrier is the modulation frequency, ramp is easily filtered out using a bandpass filter, and absorption creates the envelope.  The information of use is the amplitude of the 2nd harmonic of the modulation on the same time scale as the ramp frequency. 

I am attaching 3 pictures, the first is a picture of the whole signal (ramp + 20k modulation + absorption) at a high absorption.  The second is the first image with the ramp filtered out (using a 2kHz bandwidth band pass filter) and looking only at the absorption (time scale of 0.002 to 0.004s or so).  The third is the absolute value of the demodulated signal that is phase shifted slightly.  If you have time, I would gladly appreciate a suggestion with regards to the Lock in Amplifier.

Regards,
Aleksandr




0 Kudos
Message 7 of 13
(7,217 Views)
Hi Aleksandr,
 
I am still having trouble understanding your application, although your latest post with images did help clarify some of it to me.  I have a few questions about the information you posted:
  • The time scales on the images are confusing to me.  I assume that the top image has a horizontal axis that is scaled in seconds.  This would correspond with your statement that the ramp signal has a frequency of ~100 Hz.  What is the time scale on the bottom two images?  I would have expected those scales to span from about 0 to 0.0006 based on your statement that your signal only lasts for about 1/10th of the period of the ramp signal.  The time scale of 0-3500 doesn't make sense to me.
  • You mention in your latest post that you filter out the ramp using a 2 kHz bandpass filter.  I do not see where the 2 kHz came from.  Am I missing something?  One thought I had was that perhaps that is a typo, and you meant to say that you used a 20 kHz bandpass filter - this makes much more sense to me since you mentioned that your modulation signal is 20 kHz.
  • You said that the top image shows the entire signal, which you define as ramp + 20 k modulation + absorption.  Wouldn't this signal be ramp + 20 k modulation * absorption?

Perhaps I am still misunderstanding your application, but one other thing I am still unclear on is exactly what your need is for a lock in amplifier.  Since you know the exact frequency you want to lock in on, it seems as though you ought to be able to filter out the information you need at a known frequency.  What is the piece I am missing here?  Sorry to ask so many questions, but hopefully once I have a better grasp of your application I should be able to give you some more advice.

0 Kudos
Message 8 of 13
(7,182 Views)

Aleksandr -

 

I have recently begun working with wavelength modulation and second harmonic detection. I have gotten 2f signals using a very rudimentary code where I use highpass filter to remove the ramp, multiply by a reference signal, and lowpass filter the end signal. However, my signals are very noisy and my signal to noise ratio has barely improved over direct absorption methods.  I was hoping to use the lock-in amplifier that has been developed by NI in hopes that my signal quality would be improved. I was wondering if you ever got the NI lock-in to work with your system and if so how? Any help you could offer on the topic would be very useful.

 

Thank you for your time,

Jeremy Vanderover

(If you would prefer to communicate by email, my email address is vandej@rpi.edu)

0 Kudos
Message 9 of 13
(6,289 Views)
is it possible to do lock in amplifier in labview with the help of DAQcard6014 and data aquisition software? plese reply?
0 Kudos
Message 10 of 13
(6,182 Views)