Filtering white noise signal from acceleration data

조회 수: 34 (최근 30일)
Otto Randolph
Otto Randolph 2024년 9월 6일
댓글: Star Strider 2024년 9월 7일
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
dpb
dpb 2024년 9월 6일
You forgot to attach the input data trace...a .mat file would be good way.
dpb
dpb 2024년 9월 6일
편집: dpb 2024년 9월 6일
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...

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2024년 9월 6일
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
Otto Randolph
Otto Randolph 2024년 9월 7일
Okay, thanks! I'm playing around with those but I ran into another question. What I'd like to do is make a unique filter for each data set based on the 1-2 seconds of white noise present in each sample. I'd then apply this custom filter to the full data set to remove the background noise. For the filters you mentioned, do they adapt themselves to the input data or are they fixed based on the input arguments you use? If its the former, how do I extract the newly made filter to use for the full data set?
Star Strider
Star Strider 2024년 9월 7일
@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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by