LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

averaging SVFA Cross Spectrum

Hi all,

 

I have a problem with the averaging of my signals. I'm trying to correlate two signals (excitation & response) and to do it I cut the length of the signal to perform an average. The point is that I don't really know how to do it to have just one plot. If I enable the indexing of the loop I get the same number of plots as averages and if I disable the indexing I just get the last average. I would like  a real average of all the segments. I don't know if I explained it carefully.

0 Kudos
Message 1 of 7
(3,235 Views)

Hi!

 

Could you explain a little bit better what you would like to get?

 

I mean, a short numerical example. It looks as it should be easy to perform, but I don't know what you want to get exactly.

 

Regards!

Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 2 of 7
(3,197 Views)

Hi Jorge,

 

I'll try...My excitation signal is a sinusoidal of fixed frequency, therefore if I correlate excitation&response I have a peak at that frequency. If I extract portions of signals what I get is different value peaks at this frequency. What I want my VI to do is to average this peaks and plot me this average.

It's like if I get 3 different peak signals with values of 2V, 2V and 5V for let's say 100Hz, I want my VI to plot me the peak at 100Hz of 3V.

Hope it helps...:)

 

Thanks!

0 Kudos
Message 3 of 7
(3,194 Views)

Hi!

 

So, as I understand, you want to average the magnitude parameter in the array of clusters you get at the output of the for loop (with indexing enabled). If that is what you need, you could do it with another for loop at the end of it (there are several ways to do so, you could even do it on the same for loop), unbundle the value to average, and do it manually. I attach a picture.

 

If this solves your problem or you need more help, let me know!

Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 4 of 7
(3,191 Views)

Hi Jorge!

 

Thanks! Just one question -I haven't tested your solution yet, I don't have it here- is this giving me the numerical peak average? Because what I need is to average the whole portion of signal, not just the peak. Does it make sense for you?

 

Thanks again!

0 Kudos
Message 5 of 7
(3,187 Views)

Hi!

 

If at the output of the for loop you have an array with the magnitudes of the peaks, this will give you the average of all of them.

 

For example, at the output you get an array of clusters, and the magnitude value of each cluster is: 2, 3, 4, 5, 6. In the for loop I gave you, the resulting value at the output will be 4.

 

I don't know if that's what you want... try it, and tell me if that works for you. Regards!

Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 6 of 7
(3,185 Views)

Hi Jorge,

 

Thank you very much for your help, your sketch works just great.

Thanks indeed,

 

Oscar

0 Kudos
Message 7 of 7
(3,176 Views)