Comments on: Modeling Mechanical Systems: The Double Pendulum https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/?s_tid=feedtopost Guy Rouleau is an Application Engineer for MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design. Mon, 02 Jan 2017 20:57:51 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Seth https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-63423 Mon, 14 Apr 2014 13:23:16 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-63423 @Charinda – Simulink models usually include PreLoadFcn or OpenFcn or StartFcn which execute MATLAB Code in the base workspace. Take a look at those functions in your model, and you will probably find:
theta_1=pi/4;
or something similar. Good luck!

]]>
By: Charinda https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-63112 Sat, 12 Apr 2014 17:40:23 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-63112 Hi Mr Popinchalk,

I’m quite new to simulink. I followed the steps on this page and I got the model. In your model, the initial condition blocks have theta_1 and so on in the matrix without them having any specified value that I can see. I was wondering what is happening there. Are they variables defined in MATLAB script that you have imported here and if so how? Or what is happening there? Please any help on this would be very much appreciated.

]]>
By: sina https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-39283 Tue, 30 Jul 2013 07:03:53 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-39283 HELLO
I need simulink for Sub-synchronous Resonance in HVDC LINK

]]>
By: Andres https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-2307 Thu, 15 Nov 2012 01:21:11 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-2307 I’ve connected the single joint pendulum on Simulink and ran the simulation with the default values from simulink. The angle is a sine function when I use only close to 0 initial angles, above 3 the amplitude doesnt change, the function just moves umpward the y-axis, not only that but with small angles the period is not the same using the same length and gravity values defying every mathematical analysis given for the pendulum so if u could give me some feedback about this i’d appreciate it, the simmechanics model runs smoothly though.

]]>
By: Seth https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1918 Sun, 26 Aug 2012 15:05:12 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1918 @Ayan – The only way to get the same answer with numerically different approaches is to increase the precision with which you apply those techniques. This means minimizing the error, which requires minimizing tolerances. I think this is the approach you are looking for.

@Nasim – your question is off topic, and very general. Please have a look at the documentation, review some demos, or contact technical support. Good luck!

]]>
By: nasim https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1916 Sat, 25 Aug 2012 18:52:23 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1916 Hi
Do you connect simmechanic to 3Danimation toolbax?
Do you have a special connection to the body and revolute do ?
Please reply to me?
Tanks

]]>
By: Ayan https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1904 Thu, 09 Aug 2012 21:04:35 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1904 Mr. Seth Popinchalk,
Thank you sir for your reply.As you’ve mentioned, its long term prediction is not possible due to presence of error. Is there any way to produce almost accurate model of such kind of dynamical system to predict its state atleast for 200sec , other than minimizing the tolerances?

]]>
By: Seth https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1903 Tue, 07 Aug 2012 14:53:49 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1903 @Ayan – As you noted, both simulations agree initially, and after a period of time the results diverge. Which one is correct? Which implementation is giving the right answer? The model built with base blocks that implements the constraint with algebraic loops, or the model built using SimMechanics bodies and joints?

The Answer:

If you are using a variable step solver, both are correct to the tolerance settings you have run them with. The Double Pendulum is a chaotic system. One of the properties of chaotic systems is that they are very sensitive to initial conditions; meaning: small differences can become magnified into big differences. For any two implementations of the same system, there are likely to be very small numerical differences within the tolerance of the calculation (for example +/- eps for a floating point calculation). These small differences can be like perturbations to the solution and over time magnify the difference between the solutions from the different implementations.
Great question!

]]>
By: Ayan https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1900 Mon, 06 Aug 2012 12:31:40 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1900 Mr. Seth Popinchalk,
Sir, you said that the result from two simulation are similar. I ran your simulation with theta1=pi/2; and theta2=pi/(2)^0.5, with unit masses . Initially both models showed same result, but after 28 sec, their results became completely different.Which result is reliable here????

]]>
By: moazzam https://blogs.mathworks.com/simulink/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1858 Sat, 16 Jun 2012 09:11:24 +0000 https://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1858 Hi… Well, I’m working with 3-link pendulum. For my system, th1 changes from -30 t0 +60, th2 varies from -112 to -4 and th3 changes from -162 to -13 (all angle measurements are in degrees) in just 0.2 second. I’ve generated ref. trajectories using cubic polynomials. I want my simmechanics/maplesim model to follow those trajectories. The problem is I don’t know what excitation/torques must be given to joints in order to get the desired response. I seek immediate help on it.

]]>