LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain the average signal of a waveform with noise?

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

Message Edited by zebro on 07-04-2009 05:27 PM
0 Kudos
Message 1 of 7
(16,281 Views)

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

0 Kudos
Message 2 of 7
(16,262 Views)

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

 

Message Edited by zebro on 07-05-2009 01:53 PM
0 Kudos
Message 3 of 7
(16,241 Views)

I'm sorry but I'm a little confused Smiley Sad

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?
0 Kudos
Message 4 of 7
(16,237 Views)

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

0 Kudos
Message 5 of 7
(16,226 Views)
Simply use a for loop with an input from each array of measurements.  Make sure indexing is enabled.  Add the elements, divide by number of arrays input.  Feed the output to the loop right edge.  It will become an arry of average values.  This will produce an averaged sine wave.
Message Edited by tbob on 07-06-2009 12:35 PM
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 7
(16,192 Views)

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

0 Kudos
Message 7 of 7
(16,177 Views)