07-04-2009 05:26 PM - edited 07-04-2009 05:27 PM
Hello, I have a waveform signal with noise, I want to get a clean and stable signal, so are there any way to do the real-time averaging of this signal? for example, average this signal for 10 times. attached is a sample VI, this VI contain a sine waveform with added noise, how to get the average of this waveform and make it a clean sine wave?
Thanks.
Mike
07-05-2009 02:27 AM
Something like in the attached screen shot maybe.
But I don't see the point in first adding noise and then try to remove it 😞
If with "... example, average this signal for 10 times" you mean apply a moving average on your data, then you could use the "TSA Moving Average.vi"
Regards
07-05-2009 01:52 PM - edited 07-05-2009 01:53 PM
Thank you, but my labview did not have the advanced signal processing toolkit installed and it seems not to be the "average" function. How can i make labview program to realize the "average" function? for example, for a single while loop, i will get a data array to store the amplitude of the waveform, then for several while loop, I will get a matrix to store all the data, then I can do a average of the data and update it in a time-amplitude graph. But I am not sure how to do the program yet.
Mike
07-05-2009 02:27 PM
I'm sorry but I'm a little confused
There is a vi called “Mean” that calculates the average/mean of an array, so you can use this one.
But correct me if I’m wrong, the average of a sine wave is 0.
First you talk average then amplitude, so what will it be?
Unless you mean, maximum amplitude from every individual loop then average all those maximum to one value. Is that it? Then the next vi will do.
Inner loop is you acquired data, here 50 random numbers.
Outer loop Takes the maximum of each inner loop, when acquisition is done, average the 25 maximum.
Is that it?07-05-2009 03:20 PM
What I mean “ average” is to get the average of signal from several loop, for example, in the first While loop, I got a array of waveform magnitude with 10 element y1(1, 2, 3, 4 ,5, 3, 23, 10, 12 22), then in the second while loop, I got a another array with 10 element y2( 2, 3, 23, 45, 23, 54, 23, 34, 2, 11) , I would like to get the average of y1 and y2, that is y=(y1+y2)/2. so in the real case, I would like to obtain the real-time update of the “average” plot of my waveform signal, for example, I got a real-time average plot for 10 acquirization period (10 while loop).
Thanks.
Mike
07-06-2009 02:35 PM - edited 07-06-2009 02:35 PM
07-07-2009 12:13 AM
Replace the "Array Min Max" in the inner loop by a "Mean" vi.
It's all you have to do.
That way you will build up an array of avarages Y1, Y2, ... ... and so on.
Finally calculate the average of that array with the existing "Mean" vi