Inverted pendulum

From Wikipedia, the free encyclopedia

 A schematic drawing of the inverted pendulum on a cart. The rod is considered massless. The mass of the cart and the pointmass at the end of the rod are denoted by M and m. The rod has a lenght l.
A schematic drawing of the inverted pendulum on a cart. The rod is considered massless. The mass of the cart and the pointmass at the end of the rod are denoted by M and m. The rod has a lenght l.

An inverted pendulum (also called a cart and pole) consists of a thin rod attached at its bottom to a moving cart. Whereas a normal pendulum is stable when hanging downwards, a vertical inverted pendulum is inherently unstable, and must be actively balanced in order to remain upright, typically by moving the cart horizontally as part of a feedback system.

The inverted pendulum is a classic problem in dynamics and control theory and widely used as benchmark for testing control algorithms (PID controllers, neural networks, Genetic algorithms, etc). Variations on this problem include multiple links, allowing the motion of the cart to be commanded while maintaining the pendulum, and balancing the cart-pendulum system on a see-saw. The inverted pendulum is related to rocket or missile guidance, where thrust is actuated at the bottom of a tall vehicle.

Another way that an inverted pendulum may be stabilized, without any feedback or control mechanism, is by oscillating the support rapidly up and down. If the oscillation is sufficiently strong (in terms of its acceleration and amplitude) then the inverted pendulum can recover from perturbations in a strikingly counterintuitive manner.

In practice, the inverted pendulum is frequently made of an aluminium strip, mounted on a ball-bearing pivot; the oscillatory force is conveniently applied with a jigsaw.

If the driving point moves in simple harmonic motion, the pendulum's motion is described by the Mathieu equation.

Contents

[edit] Equations of motion

[edit] Pendulum on a cart

The equations of motion can be derived easily using Lagrange's equations. Referring to the drawing where x(t) is the position of the cart,θ(t) is the angle of the pendulum with respect to the vertical direction and the acting forces are gravity and an external force in the x-direction, the Lagrangian is:

L = TV

where T is the kinetic energy in the system and V the potential energy, so the Lagrangian for this system is given by:

L = \frac{1}{2} M v_1^2  + \frac{1}{2} m v_2^2 - m g \ell\cos\theta

where v1 is the velocity of the cart and v2 is the velocity of the point mass m. v1 and v2 can be expressed in terms of x and θ by writing the velocity as the first derivative of the position;

v_1^2=\dot x^2
v_2^2=\dot{\left( x+\ell\sin\theta \right)}^2 + \dot{\left( \ell\cos\theta\right)}^2

Simplifying the expression for v2 leads to:

v_2^2= \dot x^2 +2 \dot x \ell \dot \theta\cos \theta + \ell^2\dot \theta^2

The Lagrangian is now given by:

L = \frac{1}{2} \left(M+m \right ) \dot x^2 +m l \dot x \dot\theta\cos\theta + \frac{1}{2} m l^2 \dot \theta^2-m g l\cos \theta

and the equations of motion are:

{\mathrm{d} \over \mathrm{d}t}{\partial{L}\over \partial{\dot x}} - {\partial{L}\over \partial x} = F
{\mathrm{d} \over \mathrm{d}t}{\partial{L}\over \partial{\dot \theta}} - {\partial{L}\over \partial \theta} = 0

substituting L in these equations and symplifying leads to the equations that describe the motion of the inverted pendulum:

\left ( M + m \right ) \ddot x + m l \ddot \theta\cos \theta - m l \dot \theta^2 \sin \theta = F
m l \ddot \theta + m \ddot x \cos \theta = m g \sin \theta

These equations are nonlinear, but since the goal of a control system would be to keep the pendulum upright the equations can be linearized around \theta \approx 0.

[edit] Pendulum with oscillatory base

 A schematic drawing of the inverted pendulum on an oscillatory base. The rod is considered massless. The pointmass at the end of the rod is denoted by m. The rod has a lenght l.
A schematic drawing of the inverted pendulum on an oscillatory base. The rod is considered massless. The pointmass at the end of the rod is denoted by m. The rod has a lenght l.

The equation of motion for a pendulum with an oscillatory base is derived the same way as with the pendulum on the cart, using the Lagrangian.
The position of the point mass is now given by:

\left( \ell sin \theta , y + \ell cos \theta    \right)

and the velocity is found by taking the first derivative of the position:

v^2=\dot y^2-2 l \dot \theta  \dot ysin \theta  + l^2\dot \theta ^2

The Lagrangian for this system can be written as:

L = \frac{1 }{2} m \left ( \dot y^2-2 l \dot \theta  \dot ysin \theta  + l^2\dot \theta ^2   \right) - m g \left( y + \ell cos \theta  \right )

and the equation of motion follows from:

{\mathrm{d} \over \mathrm{d}t}{\partial{L}\over \partial{\dot \theta}} - {\partial{L}\over \partial \theta} = 0

resulting in:

l \ddot \theta - \ddot y sin \theta = g sin \theta
Plots for the inverted pendulum on an oscillatory base. The first plot shows the response of the pendulum on a slow oscillation, the second the response on a fast oscillation
Plots for the inverted pendulum on an oscillatory base. The first plot shows the response of the pendulum on a slow oscillation, the second the response on a fast oscillation


A solution for this differential equation where y represents a simple harmonic motion will show that the pendulum stays upright for strong oscillations. The first plot shows that when y is a slow oscillation, the pendulum quickly falls over when disturbed from the upright position. The angle θ exceeds 90° after a short time, which means the pendulum has fallen on the ground.
If y is a fast oscillation the pendulum can be kept stable around the vertical position. The second plot shows that when disturbed from the vertical position, the pendulum now starts an oscillation around the vertical position (θ = 0). The deviation from the vertical position stays small, and the pendulum doesn't fall over.

[edit] See also

[edit] References

Franklin; et al. (2005). Feedback Control of Dynamic Systems, 5, Prentice Hall. ISBN 0-13-149930-0