velocity from accelerometer using numerical intergration

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

 採用された回答

Youssef  Khmou
Youssef Khmou 2014 年 1 月 3 日

0 投票

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 件のコメント

Bran
Bran 2014 年 1 月 6 日
Thank you so much for this reply I have been encouraged to use cumtrapz(acc)*dT + v0 however, I am confused on how v) can be found. Here is an example of the readout from my accelerometer which is a ADXL 345
Youssef  Khmou
Youssef Khmou 2014 年 1 月 7 日
is there a file of data for the acceleration?
Bran
Bran 2014 年 1 月 7 日
Hi there,
So sorry I thought I had attached the file but for some reason I am having problems attaching it
basically my acceleration values are much like
-0.8 0.97 0.3 -0.8 0.97 0.3
etc., I could try and send the file via email?
Youssef  Khmou
Youssef Khmou 2014 年 1 月 7 日
you can send the data, but cumtrapz is cumulative integral, not the integral,
Bran
Bran 2014 年 1 月 7 日
Ah ok so what would you suggest. If I want to determine the velocity from my data, I have a huge data set which is why I may be having trouble attaching. Also don't I need to know the initial velocity?
Bran
Bran 2014 年 1 月 7 日
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 2015 年 11 月 28 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

質問済み:

2014 年 1 月 3 日

コメント済み:

2015 年 11 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by