Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
Mitchell Tillman
Mitchell Tillman le 14 Déc 2023
Commenté : Paul le 15 Déc 2023
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 commentaire
Paul
Paul le 15 Déc 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.

Connectez-vous pour commenter.

Réponses (1)

Star Strider
Star Strider le 14 Déc 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.

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by