From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA (PXI-7852R) Complex Waveform Lock-in Amp.

Solved!
Go to solution

My main goal is to create a lock-in which compares complex waveforms (not just sine, square, etc) point by point. 

 

I have demonstrated that I can use DDS to create complex reference waveforms. 

 

Now I want to read an analog input and compare (i.e. multiply and integrate) the signal aquired with the reference signal. 

 

Attached below is my attempt. I have changed the DDS to produce a sine wave for tests purposes. I have proved to myself that the reference sine wave is correct (I wired it to an AO and checked it) and that the sine wave being sampled is correct (I also wired it to an AO and checked it).

 

Sadly, the output of the mean does not seem to reflect the phase of the two signals. If I change the freq or phase of either the ref waveform or the aquired signal, the output of the mean remains the same...random osccilations from +2 to -2 V. The mean does average for the appropriate amount of points, as long as the number of points is less than 70 ks (I convert to "wave form cycles" in the host vi).

 

I suspect that there is an error in my "mean.vi". I created it by modifying the mean vi found on the FPGA pallet. I replaced the "high through put" multiply with the numeric multiply (since the high through put does not work on RT targets). Everything else is the same.

 

Any suggestions?

 

Thanks in advance

 

proj1.png                        a screen shot of my FPGA, Host, and mean.vi code

0 Kudos
Message 1 of 2
(2,231 Views)
Solution
Accepted by topic author dthrash

Found the problem!

 

The product of the two signals was nonsense. Reducing the amplitude of the two signals cleaned everything right up. Apparently something was saturating... 

0 Kudos
Message 2 of 2
(2,209 Views)