| Topic: |
Science > Physics |
| User: |
"" |
| Date: |
02 Mar 2006 03:08:47 AM |
| Object: |
Integration Question -- Acceleration to Velocity |
I am using MATLAB to calculate velocity from acceleration data. I know
that velocity is the integral of acceleration, but I don't know how to
perform this.
I tried using the polyfit and polyint functions, but am coming up with
some off values.
That is, I have acceleration and time data, but I do not know how to
calculate velocity. Is there an equation that I can use to calculate
this? Can anyone help? Thank you!
.
|
|
| User: "Sam Wormley" |
|
| Title: Re: Integration Question -- Acceleration to Velocity |
02 Mar 2006 07:36:05 AM |
|
|
wrote:
I am using MATLAB to calculate velocity from acceleration data. I know
that velocity is the integral of acceleration, but I don't know how to
perform this.
Try doing it by hand first... If you dont know calculus, using
MATLAB to do calculus seems folly to me.
F = ma is a differential equation
Assuming that the mass remains constant, we have constant
acceleration: F/m = dv/dt = a = constant
direct integration (with respect to t) gives formulas such as:
v - v_o = at
v = at + v_o
.
|
|
|
|
| User: "Mike" |
|
| Title: Re: Integration Question -- Acceleration to Velocity |
02 Mar 2006 12:55:02 PM |
|
|
wrote:
I am using MATLAB to calculate velocity from acceleration data. I know
that velocity is the integral of acceleration, but I don't know how to
perform this.
I tried using the polyfit and polyint functions, but am coming up with
some off values.
That is, I have acceleration and time data, but I do not know how to
calculate velocity. Is there an equation that I can use to calculate
this? Can anyone help? Thank you!
If you have a plot of acceleration a(t) as a function of time then
velocity v(t) as a function of time is the area under the curve given
that:
v(t) = int{o to t]a(t)dt
Thus, divide your time interval into N sufficiently small intervals
delta(t)=T. Then the integral, v(t), at time T can be approximated to a
good degree by the summation:
v(k) - v(0) = Sum[i = 1,...k)a(k)xT, a(0) = 0
and
t = kT
See that for constant a(t) your get v(k) - v(0) = Sum[a(k)xT] = axkT or
v(t) - v(0) = at
You may have to extrapollate to get the value of a(k) between two data
points.
This is a crude way but it works for most practical cases. For high
precision you need to use advanced integration routines with error
correction.
Mike
.
|
|
|
|
| User: "Puppet_Sock" |
|
| Title: Re: Integration Question -- Acceleration to Velocity |
02 Mar 2006 12:19:42 PM |
|
|
wrote:
I am using MATLAB to calculate velocity from acceleration data. I know
that velocity is the integral of acceleration, but I don't know how to
perform this.
I tried using the polyfit and polyint functions, but am coming up with
some off values.
That is, I have acceleration and time data, but I do not know how to
calculate velocity. Is there an equation that I can use to calculate
this? Can anyone help? Thank you!
Um. Sure.
As has been said by others, a(t) = dv(t)/dt. So, you've got the a(t)
and want the v(t).
But you need a v(0) or some other boundary condition equivalent
to that. Until you have that, the very best you can do is the change
in velocity from some time to some later time.
Then there are several ways to proceed. For example: If your a(t)
values were constant, it would be party time. With constant a,
you have this.
x = a t^2/2 + v(0) t + x(0)
v = a t + v(0)
You can see here why you need a boundary condition on the velocity.
Without it, all you get is the change in v over time, not the actual
value.
If your a(t) values are not all the same, then you have to accept an
approximate result. You don't have the acceleration at all times,
so you don't know what it is between your data values. So you have
to do something about guessing what to do in those times.
If you had some way to know the value between your data points,
it would again be miller time. For example: Suppose you had some
reason to know that a(t) was proportional to cos(w t) where w is
some constant. Then all you'd have to do would be to fit that constant,
get the proportioanality constant, then put it in the equation. With
this toy, you'd get this:
a(t) = A cos(w t) = dv/dt
And there are lots of ways to solve that, as long as you have a
boundary
condition on v.
If you do not have any information about the shape of a(t), but *only*
the
raw data points, then you have to accept some kind of numerical
solution. There are several ways to do that. For example, you could
assume that the acceleration varies linearly between data points.
Say you have data like so, with the t's sorted into ascending values.
A T
a1 t1
a2 t2
a3 t3
And so on. Then, between t1 and t2 you do this. (Recall t2 > t1)
a(t) = a1 (t-t2)/(t1-t2) + a2 (t1-t)/(t1-t2)
= m t + b
Note that at t1 this is a1, at t2 this is a2, and between it
varies linearly.
Now you have to solve, for each T interval, the equation
m t + b = dv/dt
given the v at t1. Easily enough you get this.
v = m t^2/2 + b t + v(t1)
Then you stitch the intervals together. How you make a vary between
the data points depends on what hints you may have about the way
acceleration varies between data points. If it's not changing much at
all, then linearly is probably quite good. If it's changing a lot, you
may
need to think about fitting it with some polynomial or other function.
Socks
.
|
|
|
|
| User: "Helmut Wabnig" |
|
| Title: Re: Integration Question -- Acceleration to Velocity |
02 Mar 2006 09:17:06 AM |
|
|
On 2 Mar 2006 01:08:47 -0800, "jpopovich@gmail.com"
<jpopovich@gmail.com> wrote:
I am using MATLAB to calculate velocity from acceleration data. I know
that velocity is the integral of acceleration, but I don't know how to
perform this.
I tried using the polyfit and polyint functions, but am coming up with
some off values.
That is, I have acceleration and time data, but I do not know how to
calculate velocity. Is there an equation that I can use to calculate
this? Can anyone help? Thank you!
Integration is divide each data point by 2Pi*F
I put an Excel on my "homepage" for you:
http://members.aon.at/hwabnig/Conversions.xls
w.
.
|
|
|
|

|
Related Articles |
|
|