LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to normalize the cross correlation.vi ?

Hello Labview Experts

I would like to know how to normalize the Cross Correlation vi from Labview.
I have two input signals (2000 samples) however the output of the cross correlation.vi is not normalized.

Thanks for any help

Tony
0 Kudos
Message 1 of 9
(4,250 Views)
There are several methods for computing the normalized correlation coefficient. It is common and easy to take a first order approximation by dividing the cross-correlation values with the standard deviations of the original signals.
0 Kudos
Message 2 of 9
(4,250 Views)
I tried as you described above but failed. I still can not make my cross-correlation results between 0-1. But I made it by using the extracted the max Auto-correlation. Thanks.
0 Kudos
Message 3 of 9
(4,250 Views)

HI am also having same problem even using biased normalisation cross correlation its not possible to make values within 1 .please if anybody has any idea help me friends

0 Kudos
Message 4 of 9
(3,362 Views)

Hi there, it may be late but I still hope it helps! So divide the cross correlation by the square root of the product of the peaks of auto-correlation of the two sets. You will achieve the same normalized value as you would using the MATLAB's 'coeff' function.

Best. 

0 Kudos
Message 5 of 9
(3,061 Views)

Hi Rish,

 

- what's the point of the sequence frame? (THINK DATAFLOW!)

- Why do you need a FOR loop? (Polymorphism!)

- Why do you need a local variable of "x*y"? (Use wire!)

- Why don't you attach a VI or atleast a snippet?

 

I appreciate your try to provide help for even this old problem, but when providing help you should do it correctly…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,054 Views)

Hi GerdW,

 

I completely understand your concern, this is one of the first solutions that I posted, though a bit unclear. Let me try and answer the queries. I had a tough time trying to find a normalized value, so I am acquiring acceleration and pressure values over the serial port and tried to find a correlation for the same. 

- Sequencing to manage the data flow, IMU acquisition -->  some math --> finally normaization.

- Dividing every value of my Xcorrelated array with the formula that I mentioned previously.

- no need of a local variable can directly wire, but be careful with the data flow.

- My VI is quite mismanaged as of now, so just attached a snippet of the logic.

My pleasure, hope I was able to help, even if a bit!

Best,

Rish. 

0 Kudos
Message 7 of 9
(3,051 Views)

Hi Rish,

 

just attached a snippet of the logic.

You attached an image, but NOT a snippet!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(3,045 Views)

Yes an image, wrong choice of words on my end.

Thanks,

Rish.

0 Kudos
Message 9 of 9
(3,043 Views)