11-11-2011 07:49 AM
Hello all,
I really hope someone can help, just a really quick question about the NI lock-in amplifier VIs.
Basically, am I missing something really obvious but how exactly do I recover / generate a signal hidden in the noise? I've had a play with the VI demo and it mostly works but I can't actually recreate the sine wave.. what am I missing?
Please find attached a VI which simulates an acquisition, the PPL does work (finds correct inputted simulated freq etc) but the output of the 3rd LIA vi doesnt look like a sine wave.
Can anyone suggest where I'm going wrong?
All the best, ttfn.
11-15-2011 06:19 AM
Hi SDmanc,
Since you're deriving the frequency content of the waveform correctly, the Sinusoid should match too.
To view the data in your VI, I've modified a couple of graph settings in order to display more of the waveforms being generated by your application; this allowed me to verify what looks to me like a sinusoidal response.
Steps to view more data:
- Right click on the Sine (3) Chart and select Visible Items » X Scrollbar. This will allow us to view the appended graph data over time.
- By implementing some timing in your loop, this will allow us to see the charts being updated too. From this we can quantify the successful operation of your VI.
The waveforms that are being generated may not look smooth enough because we might not be generating enough datapoints to accurately model it; therefore I'd suggest creating more datapoints from the derived Lock-In Demodulator data. At the moment each waveform is only comprised of four datapoints, which is why we only receive this rough approximation.
Best regards,
11-17-2011 03:49 AM
Hi Alex,
Thanks for taking the time to reply. However, Im still none the wiser..
Im not sure what you mean by implementing some timing within your loop - you simply mean adding a 'wait' command? And Im afraid I cant get much to change by adding the scroll bar, I cant see any appended data, only the same 4 data points.
I understand what you mean by not having enough data points to accurately represent the waveform but have you any thoughts as to how to increase the number of data points from the lock-in demodulator?
Any thoughts would be much welcomed.
All the best,
D.
11-17-2011 04:34 AM - edited 11-17-2011 04:41 AM
Hi D.; it's what I'm here for!
I was initially drawn to this because the time values of your chart weren't updating, so it appeared that we were only viewing the first section of the waveform. What I'd recommend you do is delete the current Chart indicators you have and replace them with the default Waveform Charts; these should update normally.
So, when I say timing in a loop I mean ensuring that we do make the loop perform a small wait. We can do this by dropping the Wait Until Next ms Multiple VI, and specifying a time delay (ms) at its input. The reason for this is that by slowing down the operation of the loop, we allow more time for the chart indicators to update their data; this allows us to see it a lot easier. Also, some nasty problems can occur when not providing timing for a loop because they will essentially try to run as fast as they can, which will hog a lot of CPU.
I'd recommend that to more accurately display the Sinusoidal Wave being produced, we could build some processing based on the wave data to fill in the gaps that currently exist between the data points. The reason we're receiving few data points is because the Demodulator of the system only allows us to access the Frequency Component of the Waveform, and as we know from Nyquist's Theorem this doesn't require many samples!
11-17-2011 05:59 AM
HI,
Again many thanks for trying to help.
Perhaps maybe if I expand on what I'm trying to do. Currently I have a real life lock in attached to a transducer, it outputs a signal (much like the signal data file attached and see plot), the lock in does its voodoo and i get a signal much like the one also plotted.
I started to experiment with the labview lock in using sine waves and artificially added noise.
basically, what i want to do is, totally in software, take in a signal and generate the plot as shown..
does that make sense...??
11-17-2011 06:56 AM
Lock-in amplification is a technique used to separate a small, narrow-band signal from interfering noise. The lock-in amplifier acts as a detector and narrow-band filter combined. Very small signals can be detected in the presence of large amounts of uncorrelated noise when the frequency and phase of the desired signal are known. The lock-in amplifier is basically a synchronous demodulator followed by a low-pass filter. If I am correct you want to simulate the synchronous demodulator in your project. Not the "lock-in" part of the "lock-in" amplifier.
Since this is schoolwork. I will not just solve the problem for you. But as a start this may be worth reading. http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutLIAs.pdf
11-17-2011 09:38 AM
Hi all, many thanks if you spent any time pondering on this - but Ive come to a satisfactory solution.
Cheers.