problem geting velocity and acceleration

Hi
I have have a vector expressing position at 1 kHz and want to extract velocity and acceleration.
This is how I am doing it:
vel = diff(data)
acc = diff(data,2)
and this is what I am getting
How can I get a more useful estimation of velocity and ACC ? I have tried downplaying the data,but it doesn't help much.
Attached is the vector
Thanks

2 件のコメント

Bob Thompson
Bob Thompson 2018 年 10 月 15 日
What defines a 'useful estimation'? Your plots are very cluttered, but not incorrect, as you have effectively taken the first and second derivatives of position, which are velocity and acceleration respectively.
dpb
dpb 2018 年 10 月 15 日
Look at
doc gradient
to be able to account for the timestep between samples.
The plots show (as does the recorded position plot) that you've got a pretty-near constant triangle-wave position vector; hence the velocity is going to be approximately a constant +/- for each side of the ramp. There's some minor fluctuations observable that aren't visible in the full-band plots, but if you zoom in on the first section alone, then the changes will be more obvious.
What, specifically, is the end result you're looking for?

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

回答 (0 件)

質問済み:

2018 年 10 月 15 日

コメント済み:

dpb
2018 年 10 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by