3

I am trying to convert an array of velocity values to acceleration values. I understand that acceleration is the integral of velocity, but don't know how to acheive this. I am using MATLAB, so if anyone can offer a solution in this language, I would be very grateful! See the graph below:

enter image description here

The yellow line plots the velocity and the vertical dotted lines show the peaks and troughs of that waveform (peaks and troughs found using peakdet). The green horizontal stuff in the middle is unrelated to this question.

What I am trying to isolate is the steepest part of the large downward slopes on the curve above. Can anyone offer any advice on how to calculate this?

P.S. I am aware that quad() is the function used to integrate in MATLAB but don't know how to implement it in this situation.

CaptainProg
  • 5,610
  • 23
  • 71
  • 116
  • 3
    I think you mean that acceleration is the derivative of velocity, not integral. Also, is this a one-dimensional problem, or is this just recording the speed of a higher-dimensional motion? If it's the latter, then things can be slightly more complicated. ... I think you can just use a difference stencil and compute the numerical derivative of your velocity curve to get acceleration. Check Matlab's `diff()` and `gradient()` function (but you might want to use a better stencil and just code it yourself). – ely Mar 19 '12 at 19:14
  • Thanks very much. It IS one-dimensional. Your 'gradient' suggestion looks like it might be what I'm looking for. – CaptainProg Mar 19 '12 at 19:16

1 Answers1

1

Acceleration is a derivative of velocity.

If your velocity values are stored in v, you can get a quick numerical derivative of v with

a = diff(v)

Be aware that if v is a real rather than synthetic signal, a is likely to be pretty noisy, so some smoothing may be in order, depending on how you're going to use it.

George Skoptsov
  • 3,831
  • 1
  • 26
  • 44