LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie Question on Autocorrelation/Case Structure

Hello All,

I've looked at the help file for the AutoCorrelation VI and replicated the block diagram shown in the example. I've also replicated the results by using a Simulate Signal Express VI instead of the Uniform White Noise VI (both within while loops). What I cannot seem to do is autocorrelate a real signal (frequency of TTL pulses from a PMT- which ought to be periodic white noise) via a PCI 6602 and BNC 2121. I've essentially wired a DAQ Assistant Express VI to the AutoCorrelation VI inside a while loop (file attached to next post). From the results I'm getting it looks like the program is just treating each new data point as a new autocorrelation instead of doing the sum over all points. I'm convinced its probably a case of me misusing the while loop.

Any advice or observations would be most appreciated.

Cheers,

CJKS
0 Kudos
Message 1 of 3
(2,334 Views)
From the VI you attached, I guess what you want to do is online autocorrelation.  The right VI for this is AutoCorrelation PtByPt.vi.  Try to Substitute AutoCorrelation PtByPt.vi for AutoCorrelation.vi.
0 Kudos
Message 2 of 3
(2,325 Views)
Dear AOH,

Thanks very much for the advice. At first I thought it was doing the same thing as before (autocorrelating each new data point by itself) but after closer examination its doing it correctly.

Example:

I run the loop once. The DAQ acquires 1 data point. The Pt. by Pt. Autocorrelation VI performs the autocorrelation of that 1 data point over a "sample length" of 100 points. The 200 points of autocorrelated data is all zeroes except for the 100th point.

I run the loop twice the DAQ acquires 2 data points but the Pt. by Pt. Autocorrelation VI performs the autocorrelation of the 1st data point just like before. Then where I would expect a non-zero number at the 300th point (if it were still only autocorrelating a single data point with itself) I find one but also one at the 299th and the 301st point (the value at point 299 and point 300 are equal). I know the symmetry is due to how the VI  is indexing. After checking those numbers manually I find that it is indeed autocorrelating properly (i.e. using both data points).

I think I was distracted by the fact that it kept replotting and scrolling every 100 points.

I'm certain that I'll have more problems/questions as I try to complicate my program! Thanks very much for pointing me in the right direction!

Cheers,

CJKS
0 Kudos
Message 3 of 3
(2,313 Views)