필터 지우기
필터 지우기

Smoothing noisy increasing measurement/calculation

조회 수: 1 (최근 30일)
Mark
Mark 2014년 2월 18일
댓글: Image Analyst 2014년 2월 18일
I have a set of calculated values based on measured data (erosion through a pipe) where decreasing values are physically impossible. I want to smooth out the data and account for the fact that it is impossible to decrease, but don't want my new data to take giant jumps when the noise is significant. Any suggestions would me much appreciated.

채택된 답변

Chad Greene
Chad Greene 2014년 2월 18일
A moving average should do it. You'll lose some temporal resolution, but if the noise is gaussian then a moving average will force the noise to asymptote to zero with increasing time window size. There are several moving average functions on the file exchange; I'm not sure which is best.
Alternatively, you could apply a low-pass frequency filter if the lowest frequency of the noise is not below the highest frequency of your erosion signal. If you have the signal processing toolbox, I made this to make frequency filtering a little more intuitive: http://www.mathworks.com/matlabcentral/fileexchange/38584-butterworth-filters
  댓글 수: 1
Mark
Mark 2014년 2월 18일
Thanks Chad. For now the moving average looks like it's giving something acceptable (smooth() with a large enough span). I'll do some diving into your frequency filtering. Thanks again.

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

추가 답변 (2개)

John D'Errico
John D'Errico 2014년 2월 18일
So use a tool like SLM (download from the file exchange) to fit a monotone increasing spline to the data, smoothing through the noise.

Image Analyst
Image Analyst 2014년 2월 18일
How about just scan the array and compare to the prior value?
for k = 2 : length(erosion)
if erosion(k) < erosion(k-1)
erosion(k) = erosion(k-1);
end
end
Simple, fast, intuitive.
  댓글 수: 2
Mark
Mark 2014년 2월 18일
편집: Mark 2014년 2월 18일
Right right, the only problem is I have giant jumps in noise, so if it reads the apex of the noise, it will not go back down to the realistic values, and I will be getting a flat line for a good amount of time until my calculated values reach a point greater than what the noise said it was.
Image Analyst
Image Analyst 2014년 2월 18일
Even if you do a sliding mean like Chad suggested, you'll still have to do my method (or equivalent) because you said that decreasing values are physically impossible. A sliding mean filter can have values that decrease so you'll have to scan for that and fix it when it occurs.

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

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by