フィルターのクリア

How to integrate an acceleration/time curve?

3 ビュー (過去 30 日間)
Adriano Morais
Adriano Morais 2017 年 6 月 26 日
コメント済み: Jan 2017 年 10 月 17 日
Hello, I have the following, x=time, y=acceleration.
I want to integrate it twice so I can get x=time, y=position. I've tried to use ccumtrapz and the trapezoidal method but It doens't seem to apply to my curve. Any help?
The curve was obtained with the data given by two rows from excell.

回答 (2 件)

Jan
Jan 2017 年 6 月 26 日
cumtrapz is the solution and it applies to all inputs. The problem is, that your data look noisy. It looks like 3 sine waves recorded with a low frequency. Intergrating amplifies the noise.
The value of the acceleration is changing rapidly compared to the sampling frequency. You can epect that the velocity and position look very rapid also. Please explain what "it doens't seem to apply to my curve" mean, because perhaps just a yout expectations are the problem.
  2 件のコメント
Adriano Morais
Adriano Morais 2017 年 6 月 26 日
編集済み: Jan 2017 年 6 月 26 日
As you can see the first image is the acc/time, 2nd is velocity/time. I still need a 3rd one which will be position/time.
Well when I use cumtrapz I get a nonsense curve.
[x,tempo]=xlsread('Matlab.xlsx');
tempo1=x(:,2);
acc1=x(:,1);
subplot(221)
plot(tempo1,acc1);
Z = cumtrapz(tempo1,acc1);
subplot(222);
plot(tempo1,Z);
Jan
Jan 2017 年 6 月 26 日
編集済み: Jan 2017 年 6 月 26 日
The ploted diagram is exactly what is defined by the code. So please explain, why you consider it as "nonsense". What do you expect? The high fluctuation in the acceleration creates some stair effects. The average acceleration is below zero and the velocity is decreasing. The onlöy confusing detail is that the X axes have different lengths although both are "tempo1".
PS. Start code with two spaces or use the "{} Code" button.

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


Wembley
Wembley 2017 年 10 月 16 日
Did this question get resolved? Surely the velocity graph should be "moving" up & down with the Acc graph.
  1 件のコメント
Jan
Jan 2017 年 10 月 17 日
@Paul: No, it doesn't. Most of the acceleration is negative and you observe the expected reduction of the speed. The short positive parts can be identified as small stair in the output, but they are too short to increase the velocity.
cumtrapz is in fact the correct method and only the expectation of the user was incorrect.

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

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by