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
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
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개)
카테고리
도움말 센터 및 File Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!