problem geting velocity and acceleration
Afficher commentaires plus anciens
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 commentaires
Bob Thompson
le 15 Oct 2018
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
le 15 Oct 2018
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?
Réponses (0)
Catégories
En savoir plus sur Frequency-Domain Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!