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

13 visualizaciones (últimos 30 días)
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 comentario
Paul
Paul el 15 de Dic. de 2023
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.

Iniciar sesión para comentar.

Respuestas (1)

Star Strider
Star Strider el 14 de Dic. de 2023
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.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by