How to differentiate a time series while minimizing noise in the signal?

조회 수: 13 (최근 30일)
Mitchell Tillman
Mitchell Tillman 2023년 12월 14일
댓글: Paul 2023년 12월 15일
I have a timeseries that represents the X coordinate of the 3D position of a point (see top plot in image, please ignore vertical lines as they're not relevant). I want to compute its velocity, acceleration, and jerk. I am currently just using diff() but as you can see in the 3rd & 4th plots, the noise increases so much that it's not very useful.
I know that differentiating will always introduce some noise. But how can I filter and/or differentiate this signal with minimal noise added?
I tried looking into FFT and Mathworks' page on derivatives using digital signal processing techniques but am at a loss currently.
Another idea I had is to fit an exponential function to the data, then differentiate that and interpolate it, but I'm not sure if that's the right approach.
Also, the sampling rate of my data is 250 Hz, X axis tick labels are indices.
  댓글 수: 1
Paul
Paul 2023년 12월 15일
Hi Mitchell
Hard to say w/o seeing the data, but why do you think that the acceleration and jerk plots aren't useful? Does the position data actually have some noise in it? it looks pretty smooth to the eye. You will likely get more traction here if you upload your time and posiition data using the paper clip icon in the Insert menu.

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

답변 (1개)

Star Strider
Star Strider 2023년 12월 14일
The way I prefer to minimise the noise (especially broadband noise) in a signal is to use the sgolayfilt function first (specifying a 3rd-order polynomial with a ‘framelen’ value that works best, so an empirical choice), then gradient to calculate the numerical derivative.
Use whatever approach works best in your application.

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by