Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.num-analysis

Topic: 3D Double Pendulum Simulation
Replies: 13   Last Post: Aug 4, 2006 7:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Peter Spellucci

Posts: 2,760
Registered: 12/7/04
Re: 3D Double Pendulum Simulation
Posted: Jul 25, 2006 8:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


In article <1153816127.205050.82320@b28g2000cwb.googlegroups.com>,
sumitra.eecs@gmail.com writes:
>Hi
>
>I am trying to numerically integrate the equations of motion
>of a double pendulum in 3 dimensions driven by external torques. They
>are a set of 4 second-order
>differential equations which can be written in vector form as
>
>M(q) q'' + C(q,q') q' + N(q) = F
>
>where M(q) is the mass matrix and F is the vector of (known) input
>torques. I
>am integrating to obtain q(t)
>
>I tried using different Matlab ode solvers for this problem - ode45,
>ode113, ode15s and ode23tb. They all give different results. I am
>trying to integrate over 60 secs, sampled at 0.2 sec. The solutions
>given by different solvers begin to diverge after 5-10 sec. They are
>all set at the same relative tolerance levels.
>
>All solvers give the same solution if there are no external forces
>present or if the external forces are very small - of the order of
>0.0005 Nm for pendulum masses of 1kg each .
>
>I do not have an analytical form for the solution. So I don't know
>which solver to trust - and I am not sure why this is happening. Is
>there any particular solver of choice for nonlinear systems of
>equations or for the equations of motion of rigid body systems.
>
> I would really appreciate any suggestions/clarifications on this
>problem.
>
>Thanks
>


the double pendulum can show up chaotic behaviour, that means minimal changes
in the external forces can generate quite different solutions. now the
different codes you tried all introduce such perturbations via the
discretization error hence only short time integration with quite tight
tolerances will give near identical results, as you observed.
the one which you did not try, ode23t (the trapezoidal rule) should be best
suited here since it is stable but does not produce strong dissipation
(damping) like ode15s and ode23tb, whereas ode45 and ode113 as explicit
integrators anyway get considerable trouble with ode's which can show up
highly oscillatory solutions.
you should be aware that using a userdefined sample grid forces matlab to store
the solution only there ,whereas the internally generated grid might be much
finer. i would prefer to call it with a time span as [t0 tend] since then
you get the full solution (otherwise a plot might be totally misleading)
hth
peter



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2010. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.