Filtering white noise signal from acceleration data
33 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Otto Randolph
el 6 de Sept. de 2024
Comentada: Star Strider
el 7 de Sept. de 2024
I have white noise that I'd like to filter out of a signal. The data is from an accelerometer that is recording milling data. At the start of the data collection I have 1-2 seconds of just the white noise and I'd like to use a filter that removes it but keeps the rest of the signal when the milling is occuring. The noise and the good data both occupy the same frequency range so I don't want to use a bandpass filter. Here is the white noise of the data.
Here is the noisy data that I want to filter.
I don't know if there is a feasible filtering method I could use but I thought I'd ask here first.
2 comentarios
dpb
el 6 de Sept. de 2024
You forgot to attach the input data trace...a .mat file would be good way.
dpb
el 6 de Sept. de 2024
Editada: dpb
el 6 de Sept. de 2024
If it is truly noise, then the most effective solution is to average; the noise will average out leaving the deterministic signal. This requires a stationary signal which at least this trace appears to be pretty good...
Alternatively, what's the source of the noise and can the signal quality be improved to reduce it? The scale on the acceleration plot is so large, can't really judge what the relative magnitudes are.
It the process is stationary, another thing that sometimes works is to just subtract the reference psd from the measured...
Respuesta aceptada
Star Strider
el 6 de Sept. de 2024
The best way to deal with broadband noise is either to use wavelet denoiising or the Savitzky-Golay filter (the sgolayfilt function). I usually use a third-order polynomial, and experiment with the frame length (‘framelen’ argument) until I get the result I want. (It implements a sort of FIR comb filter, as can be seen in the Fourier transform of the result.)
As you mentioned, frequency-selective fiilters won’t work. Unfortunately, median filters or moviing-average approaches are both in a sense lowpass filters.
There is no ‘best’ way to deal with broadband noise, however some are a bit better than others.
3 comentarios
Star Strider
el 7 de Sept. de 2024
@Otto Randolph — You could certainly do that wiith sgolayfilt. If all the noise in the signals has about the same characeristic, choose a polynomial order and ‘framelen’ value that work best, and use those for all the signals. All filters work best of the signals have constant sampling intervals, so use the resample function for that.
I generally use this syntax with it:
Fs = 1/mean(diff(t));
[sr,tr] = resample(s, t, Fs);
where ‘s’ is the original signal,‘t’ the corresponding time vector, and ‘sr’ and ‘tr’ their resampled versions. There is nothing specific about whatever ‘Fs’ is. You can use whatever value for it that makes sense in the context of your signals. Ideally, it should be close to the value I calculated in this example, in order that the resampled signal closely resemble the original.
If your data are in a table, another option is to use table2timetable and then retime. It should produce the same result, although the syntax is slightly different.
Más respuestas (0)
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!