LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autocorrelation with labview

Hello

Im using labview with Lecroy oscilloscope. I need to use autocorrelation function in order to correlate the scattering from the sample. I have put the autocorrelarion fucntion right after the output from the oscilloscope. The autocorrelation function is supposed to give a curve which decays exponentially but in my case I can never get it to show exponential decay..Im adding the .vi program if anybody can look at it and tell me what is wrong I will appreciate. Thank you
Download All
0 Kudos
Message 1 of 25
(10,445 Views)

Hi esra,

Your attached VI misses several subVIs. Could you please attach the input data for autocorrelation function?

Michael

0 Kudos
Message 2 of 25
(10,427 Views)
Hello

I have attached all the vis for the oscilloscope in a zip file. All the necessaty vis  should be there. Thank you very much
Download All
0 Kudos
Message 3 of 25
(10,420 Views)

Hi esra,

Thanks for the VIs. I realize I can not reproduce your problem because I don't have the hardware.

So you might run your VIs and save the data of "Wave Graph" in LC 930x_931x Application Example.vi. Then I can look at the autocorrelation problem with your data.

Thanks,

Michael

0 Kudos
Message 4 of 25
(10,405 Views)
Hello

I have run the VI and attaching the autocorrelation function. I do not really understand what autocorrelation is doing. because It is supposed to have an exponential decay which I can fit to exponential function. Im doing Dynamic light scattering so autocorrelation function should reach zero as time passes. but the autocorrelation in Labview increases reaches maximum and then decreases. Am I doing something wrong? Thank you very much

Download All
0 Kudos
Message 5 of 25
(10,370 Views)
Hello Esra,

Is there a reason why your graphs are using a log scale?  This may be why you are not seeing the exponential decay that you expect.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 25
(10,348 Views)
Hello autocorrelation function automatically produces the log scale. but in fact there is an option to change it to a linear scale but when I change it to linear scale it produces a triangle (the base of the triangle on the x axes) i do not understand what autocorrelation is doing??

Thanx
0 Kudos
Message 7 of 25
(10,342 Views)
Hello Esra,

Auto-correlation
is cross-correlation of a signal with itself.  Cross-correlation is a mathematical way to find differences and similarities between two different signals. 

Autocorrelation is useful for finding repeating patterns in a signal, such as determining the presence of a periodic signal which has been buried under noise, or identifying the missing fundamental frequency in a signal implied by its harmonic frequencies.

In your application, you are measuring the intensity of light at periodic times.  If you compare the first time you measure to the first time you meaure, the correlation is huge (since this is the same value).  If you compare the first time you measure to the second time, the values will differ slightly, because the light diffuses.  If you compare the 3rd measurement to the 1st measurement, the difference will be even larger.  This is what the triangle represents, the further you get to the initial measurement, the less "correlation" you have between measurements.

According to this article, you should be able to match an exponential function to your graph, as you mentioned previously.  However, the article also mentions that you should be using the light Intensity, and not the wavelength.  Your graph is named "wave graph" so I'm not sure which one you are actually measuring?
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 8 of 25
(10,317 Views)
Thank you for the reply

my graph says wave graph but it actuallt measures Voltage vs time. so it does not measure wavelength. I understand that the correlation should be high and then it should decrease as time passes. but in my graph it increases and reaches the max and then decreases. autocorrelation should be an exponential decay ! am I misunderstandin? Thank you very much
0 Kudos
Message 9 of 25
(10,313 Views)
Hellp Esra,

According to what I have read on your application, you are right.  The maximum should be at time t(0).  However, the way autocorrelation works and the way it is displayed on the graph, t(0) is actually in the center.  The number that appears on the x axis is half of the maximum data points you have taken.  This is why you probably should not look at your graph in log scale.

Did you try matching the curve to the exponential equation even though it does not look like an exponential?
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 10 of 25
(10,305 Views)