필터 지우기
필터 지우기

Discret low-pass-filter for velocity data

조회 수: 5 (최근 30일)
Dom
Dom 2022년 4월 13일
답변: Star Strider 2022년 4월 13일
I got a data set of velocity over time. I am trying to calculate the first and second derivative, but the data set is really noisy. How can I filter the data, so that the derivative yields realistic results.

채택된 답변

Star Strider
Star Strider 2022년 4월 13일
That the data are ‘really noisy’ unfortunately says nothing about the nature of the noise. If the noise is band-limited (determine this by doing a Fourier transform on it), the noise can likely be eliminated with a frequency-selective filter. For broadband noise (and your signal since the nature of the noise is not described), I would use the sgolayfilt (Savitzky-Golay filter) function. I usually use an order 3 polynomial, and then experiment with the window length until I get the result that I want.
Take the derivatives of the filtered signal.
Use the gradient function to calculate the derivatives:
dydx = gradient(y) ./ gradient(x);
d2ydx2 = gradient(dydx) ./ gradient(x);
This does not require that the signals be sampled consistently, however for all other signal processing (including the fft function), they must be. Use the resample function to resample them to consistent sampling intervals if they are not. To determine sampling frequency consistency, calculate:
tsstd = std(diff(x))
where ‘x’ is the independnet variable. For a consistently-sampled signal, this should be near zero (on the order of 1E-15 or so).
.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by