The Curious Case of the Inverted Pendulum

Everyone who has studied basic physics, mechanics, dynamics or control system have encountered the inverted pendulum.

The Curious Case of the Inverted Pendulum

Everyone who has studied basic physics, mechanics, dynamics or control system have encountered the inverted pendulum. However common, students often struggle to see how understanding such an abstract device may help them in their future careers. Not many job positions call for pendulum balancing experts. You don’t see inverted pendulums in real-world devices (or do you?). So why are they used in so many textbooks and found in physics and engineering labs around the world?

Pendulums are Everywhere

Pendulums, as we see in the textbooks (a weight hanging from a rope/rod), are not used in many places except for the Grandfather clocks. But many real-life devices and apparatus have drawn their inspiration from the pendulum. Inverted pendulum represents many systems like Segway, launching of rockets, retro booster rocket landing, buildings and human posture. Anything that requires vertical stabilization has dynamics similar to the inverted pendulum. Hence, modelling and controlling inverted pendulum is carried out in many engineering domains.

Real life examples of inverted pendulums

An Activity

Everybody has tried to balance tall objects on their hands. You know how difficult and exciting it is. Let us try to look into it again. From the first two figures below, try to guess which stick is easier to balance.

  1. The ball on the top or at the bottom; or
  2. The taller or the shorter stick

You can use things at your disposal to try it out yourself. 
Common sense tells us that small objects, lightweight and bottom-heavy will be easier to balance. For example, a pen would be easier to balance than a baseball bat. Right?

If you had tried it, you must be surprised to see that:

  1. Smaller objects and bottom-heavy objects are difficult to balance. A pen is difficult to balance than a baseball bat. Here, the stick with the ball on the top will be easier to balance
  2. The taller the stick, easier it is to balance
  3. If the tip tilts forwards, as shown in the third image, you need to move your finger forwards with a jerk to bring the tip back. That is, you move in the direction of the tilt

So, What’s Going On?

The question is, why does it behave in a counter-intuitive manner? To answer this, we need to know something about rotational inertia. Inertia is the inherent property of any object to resist any change in the motion. For example, it is harder to push a big rock than a pebble. Rock has higher inertia. In similar lines, rotational inertia means resisting any change in the rotation. To rotate something, we apply some force at a certain distance from the axis of rotation. Force, when applied at a distance, is called torque. So, an object having higher rotational inertia will need higher torque to rotate. Just like inertia is measured with the mass of an object rotational inertia is measured with the Moment of Inertia (I). Moment of inertia depends upon the mass and its distribution. The farther the mass is distributed from the axis of rotation higher the Moment of inertia. Hence, a rod with a ball at the end will have a higher moment of inertia than a rod with no ball when rotated from the other end.

The tendency to stay in motion or at rest is defined by its inertia. The girl balancing on the rope uses the rod to help her. It pushes the center of mass upwards thereby increasing its rotational inertia. Similarly the set of vessels on her head helps her too.

To summarize, longer stick = farther away is the center of mass = Larger rotational inertia. Think of yourself walking on a balancing beam. You stick your arms out. It gives you larger rotational inertia, which means it’s harder for you to rotate or “fall” to either side.

The third point was, why do we have to move the stick in the direction of the tilt? Well, for balancing a pole on our palm, what we try to do is to keep its center of mass (COM) right above the base. As long as the COM remains straight above the base, the stick remains balanced. But due to disturbances, it tends to fall and the COM moves away from the vertical. If the stick tilts forward, the COM also shifts forward. To undo this, we shift the base forward to align the base with the new COM. Hence, we move the stick in the direction so the tilt. This type of system is called non-minimum phase system in control sciences. Apart from inverted pendulum, an aircraft altitude maneuver, parallel parking are also non-minimum phase system.

To gain altitude, the tail ailerons bend downwards to increases the angle of attack and hence, the lift. But that downwards force on the ailerons forces the airplane to dip down initially. On right is the altitude graph depicting the initial dip.

With a long pole, we get sufficient time to move our hand to bring its base directly below its center of mass thus restoring balance. But with a short stick, we hardly get any time to move our palm to restore the balance and the stick falls.

You can also think about this in an upside-down manner. A heavy object hanging on a long piece of rope is a lot harder to get in motion than a light object hanging from a small piece of rope.

Simulations

I have written code for simulations in Matlab. To view all the MATLAB codes related to this series, go to this link of GitHub.

The video above shows how an inverted pendulum behaves without any force to control it. Pay heed to the motion of cart with respect to the pendulum, how it moves in the opposite direction. 
The video below shows how an inverted pendulum is balanced by applying the control force (blue line).

The next two videos will show you how increasing the rotational inertia helps control the pendulum easier. Rotation inertial (M*L*L) can be increased by increasing either mass or length of the pendulum or both.

Increase in mass of pendulum

Increase in pendulum length

Observations

We can see that by increasing the rotational inertia there is a slowness in the pendulum i.e. it does not rotate that easily. Although it does requires more torque, but it also increases the reaction time. As a result, your visual/muscle response time becomes relatively faster, and your relatively quicker response helps you in maintaining the balance.