Numerical Integration of accelerometer signal

11 vues (au cours des 30 derniers jours)
Itai Gutman
Itai Gutman le 1 Juin 2023
Modifié(e) : Mathieu NOE le 1 Juin 2023
Hellow,
I did sit to stand test with single IMU on the pelvis.
I have a acceleration data from IMU, and the units are m/s^2. The sample rate was 100Hz.
I did filter (butterwarth 4th order)
fc=3; % cutoff frequency
[b,a] = butter(4,fc/(100));
filtAcc = filter(b,a,y_acceleration);
and than numerical integration by cumtrapz function and remove the drift by detrend function twice: first time to get the velocity (units are [m/s] ?) and second time to get the displacement (units are [m] ?).
vertical_velocity=cumtrapz(filtAcc);
vertical_velocity_detrend=detrend(vertical_velocity);
vertical_displacement=cumtrapz(vertical_velocity_detrend);
vertical_displacement_detrend=detrend(vertical_displacement);
In the reality the displacement of the pelvis is 0.5 [m] or 50 [cm] why I got the displacement are in range -2000 to 2000 [m]?
Thank,
  1 commentaire
Mathieu NOE
Mathieu NOE le 1 Juin 2023
Modifié(e) : Mathieu NOE le 1 Juin 2023
double integration of accel signals are always sensitive to offset, drift and other issues
the one major issue I see in your code is that your are doing the cumtrapz integration without taking care of the sampling rate Fs
use dt = 1/Fs to correct it this way
vertical_velocity=dt*cumtrapz(filtAcc);

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by