Integrating experimental acceleration data to get velocity and position
Show older comments
I have a 801x1 double of acceleration values of a dampened spring mass system. I need to integrate the data twice so I can plot a velocity and position graph as well as do some computations on the velocity and position matrices. The acceleration is in terms of sample number, which was measured at 50Hz. Thank you.
1 Comment
Nathan Algarra
on 13 Nov 2015
Answers (2)
James Tursa
on 12 Nov 2015
Edited: James Tursa
on 12 Nov 2015
Can't you just do an accumulated sum on the acceleration (with appropriate scaling) to get velocity, and then an accumulated sum on the velocity to get position? E.g.,
a = your 801x1 acceleration vector
v = v0 + cumsum(a) * some_scaling_factor; % Scaling factor depends on units of "a" vector
p = p0 + cumsum(v);
Do you need to account for gravity?
1 Comment
Nathan Algarra
on 13 Nov 2015
Edited: Nathan Algarra
on 13 Nov 2015
Star Strider
on 13 Nov 2015
0 votes
I would use cumtrapz for the integrations. You may not need to filter out (Signal Processing Toolbox) the noise (if the noise is significant) unless it adversely affects the integrations.
2 Comments
Nathan Algarra
on 13 Nov 2015
Star Strider
on 13 Nov 2015
You have data and time vectors, each with a defined beginning and end. I do not understand your wanting an indefinite integral.
You can easily construct a mathematical model of the acceleration in your spring-mass-damper system using the Symbolic Math Toolbox, fit it to your data using any of several parameter estimation routines in MATLAB (and at least three Toolboxes), and then using the estimated parameters in the function, integrate it analytically to get velocity and position if you want to.
If you already have the spring, mass, and damper parameters, you don’t even need to do the parameter estimation. Just derive the mathematics of your system, plug in the parameters, and you’re set.
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!