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.
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