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!