Clear Filters
Clear Filters

velocity from accelerometer using numerical intergration

3 views (last 30 days)
I have a problem I have a trace from an accelerometer and I want to convert this into velocity I do not major in physics and I was wondering if there is a function on the mathworks forum to help me do this. I am a little confused on how to go about this. I know that my trace is from a tri-axial accelerometer and The participants put the sensors on after some minutes they then twisted 3 times to mark the start of their protocol. I would like to use the trap method if possible. Any help would be greatly appreciated

Accepted Answer

Youssef  Khmou
Youssef Khmou on 3 Jan 2014
Bran, To make the question clear, you have to describe the nature( dimensions) of the acquired signal, and the sampling frequency. However let us make this simple simulation : dropping a simple object and storing the signal for 2 seconds, with sampling frequency Fs=1000Hz :
t=0:1e-3:2-1e-3;
a=0.5*9.81*t.^2; % the stored signal which is naturally the acceleration due to gravity .
You integrate this quantity :
v=integral(a,1e-2); % with 1e-2 as step .
figure, plot(t,a,t,v,'r'), legend(' Acceleration','Velocity');
  7 Comments
Bran
Bran on 7 Jan 2014
Just saw now that trapz() would be better however my main problem is finding the initial vel as surely the formula v(T) = v(0) + aT applies
Ella
Ella on 28 Nov 2015
Bran please share the solution if you have found it I cant find any way to convert my acceleration data to velocity in real time.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB 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!