Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do time averaging to smooth signal?

Im looking for a procedure that involves smoothing the raw data to eliminate noise.
0 Kudos
Message 1 of 5
(3,459 Views)
Gaudier,

there is no easy solution as one needs some knowledge about the properties of the signal in order to eliminate just noise and not important signal properties.
Reviewing your chart there are two gaps or valleys in the signal. Do you count 'em as noise or as relevant? If they are relevant, what is the relevant property? Width, peak value, slope ...
You can always start with a moving average over 3, 5, 7 or so points. Or use the median out of 3, 5, 7 or so points. But both these methods harm the peak (local extreme value) of that gaps. If you are interested in these try to smooth your data with a spline function. And finally, if you are 'just' interested in the peak value, perform a square fit over a symmetric number of points around the actual local maximum.  A local max is reached where the slope of the sgnal is zero. So differentiate the formual and set it to zero. Just some math...

Greetings from Germany!<br>-- <br>Uwe
Message 2 of 5
(3,454 Views)
I want it to look like this.
0 Kudos
Message 3 of 5
(3,446 Views)
As those gaps seem to be of no interest, I'd gi´ve the median filter over -say- 7 points a chance. Find it  in /Analyze/SignalProcessing/Filters.  For an exampler refer to the Median Filtering VI in the labview\examples\analysis\fltrxmpl.llb directory.

If you have just the base package, here's an replacement.
Greetings from Germany!<br>-- <br>Uwe
Message 4 of 5
(3,433 Views)
Exactly what I need, Thanks!
0 Kudos
Message 5 of 5
(3,421 Views)