From: Kristian on
Hi Eveybody....

I'm working on a program, that can determine the speed of a windsurfer under given wind conditions etc..
Anyway, My program determines the resulting force acting on the surfer (from wind, drag, lift etc) in time steps of 0.1 seconds. Dividing by the total mass I've stored the acceleration in a vector.

acc(i)=F(i)/m

My question is, how do I determine the speed of the windsurfer when the acceleration is stored as a vector? time between each element is .1 seconds

I've previously just multiplied the acceleration by the time step(0.1), and then adding to the previous speed. Unfortunately this brings divergence problems. So I would like to numerically integrate the acceleration vector instead.

Is this possible?

Thank you
Kristian
From: Luca Zanotti Fragonara on
"Kristian " <k.kahle(a)gmail.com> wrote in message <hv29m7$5ka$1(a)fred.mathworks.com>...
> Hi Eveybody....
>
> I'm working on a program, that can determine the speed of a windsurfer under given wind conditions etc..
> Anyway, My program determines the resulting force acting on the surfer (from wind, drag, lift etc) in time steps of 0.1 seconds. Dividing by the total mass I've stored the acceleration in a vector.
>
> acc(i)=F(i)/m
>
> My question is, how do I determine the speed of the windsurfer when the acceleration is stored as a vector? time between each element is .1 seconds
>
> I've previously just multiplied the acceleration by the time step(0.1), and then adding to the previous speed. Unfortunately this brings divergence problems. So I would like to numerically integrate the acceleration vector instead.
>
> Is this possible?
>
> Thank you
> Kristian


Yes, of course. You can use simple commands like cumtrapz, in order to integrate your signal. cumtrapz define the cumulative integral of your signal using the trapezoidal rule.
From: us on
"Kristian " <k.kahle(a)gmail.com> wrote in message <hv29m7$5ka$1(a)fred.mathworks.com>...
> Hi Eveybody....
>
> I'm working on a program, that can determine the speed of a windsurfer under given wind conditions etc..
> Anyway, My program determines the resulting force acting on the surfer (from wind, drag, lift etc) in time steps of 0.1 seconds. Dividing by the total mass I've stored the acceleration in a vector.
>
> acc(i)=F(i)/m
>
> My question is, how do I determine the speed of the windsurfer when the acceleration is stored as a vector? time between each element is .1 seconds
>
> I've previously just multiplied the acceleration by the time step(0.1), and then adding to the previous speed. Unfortunately this brings divergence problems. So I would like to numerically integrate the acceleration vector instead.
>
> Is this possible?
>
> Thank you
> Kristian

a hint:

help trapz; % <- and siblings...

us
From: Torsten Hennig on
> Hi Eveybody....
>
> I'm working on a program, that can determine the
> speed of a windsurfer under given wind conditions
> etc..
> Anyway, My program determines the resulting force
> acting on the surfer (from wind, drag, lift etc) in
> time steps of 0.1 seconds. Dividing by the total mass
> I've stored the acceleration in a vector.
>
> acc(i)=F(i)/m
>
> My question is, how do I determine the speed of the
> windsurfer when the acceleration is stored as a
> vector? time between each element is .1 seconds
>
> I've previously just multiplied the acceleration by
> the time step(0.1), and then adding to the previous
> speed. Unfortunately this brings divergence problems.

If this method leads to divergence problems, any
other method also will do so.

> So I would like to numerically integrate the
> acceleration vector instead.
>
> Is this possible?
>
> Thank you
> Kristian

If in your program in which you determine the force
acting on the surfer also solves differential equations,
you can add the following one for the velocity:

du/dt = F/m
u(0) = u0

Best wishes
Torsten.