Guy on Simulink

Simulink & Model-Based Design

Challenge: Metronome and Cart Equations of Motion 6

Posted by Seth Popinchalk,

I haven’t
seen much activity on the
Metronome Synchronization Challenge, so I want to provide a peak at the basis
for my solution.  I took the approach of modeling a pendulum, and then linking
its dynamics to the dynamics of a cart.  The challenge is choosing the right
coordinate systems to assign to each of these bodies, even though they move

The Pendulum

If the
pendulum was all by itself, we could describe its motion by modeling the angle,
, as it deflects from vertical.  The
only force on the pendulum bob is gravity.  Because the pendulum is constrained
to rotation about the pivot point, we only need the component of gravity in pendulum
frame of reference.

Pendulum forces due to gravity 

If we
incorporate the motion of the cart, we find the linking of the acceleration of
the cart to the acceleration of the pendulum bob.  If the cart is accelerating,
the reference frame of the pendulum accelerates, and this means that the
pendulum will experience an opposite force/acceleration.

Accelerations of a cart on the pendulum

these two ideas in the
 frame centered on the pendulum pivot,
we can write the pendulum equation of motion.

in the system

understand the acceleration of the cart, I want to look at the change in the
 component of the momentum.  Here are
some definitions:

Length of
the pendulum:        

Mass of the pendulum bob: 

Mass of the cart:                      

The momentum
of the pendulum bob in the

The momentum
of the cart is

The friction
of the cart on the surface is the only resistance I want to model in the system,
and we can describe this force as proportional to the velocity,
. This represents of the change of

these terms to describe the momentum in the

Up to this
point, I have looked at the problem of a single pendulum on a cart.  Adding
another pendulum is just another momentum term, and to keep track of the
pendulums we will introduce
 and  .

Taking the
derivative of this equation gives us the acceleration of the cart:


equation for the cart, along with the dynamics of the pendulum provides the
equations of motion for the system.  Rewriting these as the highest order
derivatives gives us something we can create in Simulink.

Are you
up to the challenge?

Can you
modify the model I provided in my
last post to implement these equations?  Post your solution by October 15th to the File Exchange with the keyword metronome.

6 CommentsOldest to Newest

ABindemann replied on : 1 of 6

Hmmm, is a simple pendulum an appropriate mechanical model for a metronome? What you’ve modeled is a vertically hanging, gravity stabilized pendulum rather than a spring stabilized inverted pendulum. Based on your approach you should “flipud” your metronome scope ;-)

Seth replied on : 2 of 6

@ABindermann – you are right… I should flip the metronome scope. Is this an appropriate mechanical model for a metronome? I have played around with a version using an inverted representation and a spring to stabilize it, and I didn’t see much difference in the behavior. The other experiment I tried was adding friction to the metronome and an energy reserve to kick the pendulum back. I found all of this made things more complicated without much benefit.

This is the metronome I was thinking about as I approached the problem:

Thomas Steffen replied on : 3 of 6

I have uploaded a file, but it will take a while to appear. I think the synchronisation will not work with a purely linear model, because that will produce several resonance frequencies. I modelled the driving force of the metronome, and that did the trick.

Sebastian Schweyer replied on : 4 of 6

The System equation for x” isn’t 100% correct. You forgot to multiply it with “-“. However, if I use the correct equation I can’t achieve phase coupling anymore…

Vincent replied on : 6 of 6

I would like to ask you, what is the name of the system (the pendulum with the car )? If there is friction between the car and the substrate, and there is a horizontal sinusoidal acceleration field, then what is the movement of the ball?

Add A Comment

Your email address will not be published. Required fields are marked *


Preview: hide