
An inverted pendulum is a
pendulum
A pendulum is a device made of a weight suspended from a pivot so that it can swing freely. When a pendulum is displaced sideways from its resting, equilibrium position, it is subject to a restoring force due to gravity that will accelerate i ...
that has its
center of mass
In physics, the center of mass of a distribution of mass in space (sometimes referred to as the barycenter or balance point) is the unique point at any given time where the weight function, weighted relative position (vector), position of the d ...
above its
pivot point. It is
unstable
In dynamical systems instability means that some of the outputs or internal state (controls), states increase with time, without bounds. Not all systems that are not Stability theory, stable are unstable; systems can also be marginal stability ...
and falls over without additional help. It can be suspended stably in this inverted position by using a
control system
A control system manages, commands, directs, or regulates the behavior of other devices or systems using control loops. It can range from a single home heating controller using a thermostat controlling a domestic boiler to large industrial ...
to monitor the angle of the pole and move the pivot point horizontally back under the center of mass when it starts to fall over, keeping it balanced. The inverted pendulum is a classic problem in
dynamics and
control theory
Control theory is a field of control engineering and applied mathematics that deals with the control system, control of dynamical systems in engineered processes and machines. The objective is to develop a model or algorithm governing the applic ...
and is used as a benchmark for testing control strategies. It is often implemented with the pivot point mounted on a cart that can move horizontally under control of an electronic servo system as shown in the photo; this is called a cart and pole apparatus. Most applications limit the pendulum to 1
degree of freedom by affixing the pole to an
axis of rotation
Rotation or rotational/rotary motion is the circular movement of an object around a central line, known as an ''axis of rotation''. A plane figure can rotate in either a clockwise or counterclockwise sense around a perpendicular axis intersect ...
. Whereas a normal pendulum is stable when hanging downward, an inverted pendulum is inherently unstable, and must be actively balanced in order to remain upright; this can be done either by applying a
torque
In physics and mechanics, torque is the rotational analogue of linear force. It is also referred to as the moment of force (also abbreviated to moment). The symbol for torque is typically \boldsymbol\tau, the lowercase Greek letter ''tau''. Wh ...
at the pivot point, by moving the pivot point horizontally as part of a
feedback
Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause and effect that forms a circuit or loop. The system can then be said to ''feed back'' into itself. The notion of cause-and-effect has to be handle ...
system, changing the rate of rotation of a mass mounted on the pendulum on an axis parallel to the pivot axis and thereby generating a net torque on the pendulum, or by oscillating the pivot point vertically. A simple demonstration of moving the pivot point in a feedback system is achieved by balancing an upturned broomstick on the end of one's finger.
A second type of inverted pendulum is a
tiltmeter
A tiltmeter is a sensitive inclinometer designed to measure very small changes from the vertical level, either on the ground or in structures. Tiltmeters are used extensively for monitoring volcanoes, the response of dams to filling, the small ...
for tall structures, which consists of a wire anchored to the bottom of the foundation and attached to a float in a pool of oil at the top of the structure that has devices for measuring movement of the neutral position of the float away from its original position.
Overview
A pendulum with its bob hanging directly below the support
pivot is at a
stable equilibrium point, where it remains motionless because there is no torque on the pendulum. If displaced from this position, it experiences a restoring torque that returns it toward the equilibrium position. A pendulum with its bob in an inverted position, supported on a rigid rod directly above the pivot, 180° from its stable equilibrium position, is at an
unstable equilibrium point. At this point again there is no torque on the pendulum, but the slightest displacement away from this position causes a gravitation torque on the pendulum that accelerates it away from equilibrium, causing it to fall over.
In order to stabilize a pendulum in this inverted position, a
feedback control system can be used, which monitors the pendulum's angle and moves the position of the pivot point sideways when the pendulum starts to fall over, to keep it balanced. The inverted pendulum is a classic problem in
dynamics and
control theory
Control theory is a field of control engineering and applied mathematics that deals with the control system, control of dynamical systems in engineered processes and machines. The objective is to develop a model or algorithm governing the applic ...
and is widely used as a benchmark for testing control algorithms (
PID controller
PID or Pid may refer to:
Medicine
* Pelvic inflammatory disease or pelvic inflammatory disorder, an infection of the upper part of the female reproductive system
* Primary immune deficiency, disorders in which part of the body's immune system is ...
s,
state-space representation
In control engineering and system identification, a state-space representation is a mathematical model of a physical system that uses state variables to track how inputs shape system behavior over time through first-order differential equations o ...
,
neural networks
A neural network is a group of interconnected units called neurons that send signals to one another. Neurons can be either Cell (biology), biological cells or signal pathways. While individual neurons are simple, many of them together in a netwo ...
,
fuzzy control
A fuzzy control system is a control system based on fuzzy logic – a mathematical system that analyzes analog input values in terms of logical variables that take on continuous values between 0 and 1, in contrast to classical or digital logi ...
,
genetic algorithm
In computer science and operations research, a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). Genetic algorithms are commonly used to g ...
s, 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 the center of gravity is located behind the center of drag causing aerodynamic instability. The understanding of a similar problem can be shown by simple robotics in the form of a balancing cart. Balancing an upturned broomstick on the end of one's finger is a simple demonstration, and the problem is solved by self-balancing
personal transporters such as the
Segway PT, the
self-balancing hoverboard and the
self-balancing unicycle
An electric unicycle (often initialized as EUC or acronymized yuke or Uni) is a self-balancing personal transporter with a unicycle, single wheel. The rider controls speed by leaning forwards or backwards, and steers by twisting or tilting the uni ...
.
Another way that an inverted pendulum may be stabilized, without any feedback or control mechanism, is by oscillating the pivot rapidly up and down. This is called
Kapitza's pendulum. If the
oscillation
Oscillation is the repetitive or periodic variation, typically in time, of some measure about a central value (often a point of equilibrium) or between two or more different states. Familiar examples of oscillation include a swinging pendulum ...
is sufficiently strong (in terms of its acceleration and amplitude) then the inverted pendulum can recover from perturbations in a strikingly counterintuitive manner. If the driving point moves in
simple harmonic motion, the pendulum's motion is described by the
Mathieu equation.
Equations of motion
The
equations of motion
In physics, equations of motion are equations that describe the behavior of a physical system in terms of its motion as a function of time. More specifically, the equations of motion describe the behavior of a physical system as a set of mathem ...
of inverted pendulums are dependent on what constraints are placed on the motion of the pendulum. Inverted pendulums can be created in various configurations resulting in a number of Equations of Motion describing the behavior of the pendulum.
Stationary pivot point
In a configuration where the pivot point of the pendulum is fixed in space, the equation of motion is similar to that for an
uninverted pendulum. The equation of motion below assumes no friction or any other resistance to movement, a rigid massless rod, and the restriction to
2-dimensional
A two-dimensional space is a mathematical space with two dimensions, meaning points have two degrees of freedom: their locations can be locally described with two coordinates or they can move in two independent directions. Common two-dimensional s ...
movement.
:
Where
is the
angular acceleration
In physics, angular acceleration (symbol α, alpha) is the time rate of change of angular velocity. Following the two types of angular velocity, ''spin angular velocity'' and ''orbital angular velocity'', the respective types of angular accele ...
of the pendulum,
is the
standard gravity
The standard acceleration of gravity or standard acceleration of free fall, often called simply standard gravity and denoted by or , is the nominal gravitational acceleration of an object in a vacuum near the surface of the Earth. It is a constant ...
on the surface of the Earth,
is the length of the pendulum, and
is the angular displacement measured from the equilibrium position.
When
added to both sides, it has the same sign as the angular acceleration term:
:
Thus, the inverted pendulum accelerates away from the vertical unstable equilibrium in the direction initially displaced, and the acceleration is inversely proportional to the length. Tall pendulums fall more slowly than short ones.
Derivation using torque and moment of inertia:
The pendulum is assumed to consist of a point mass, of mass
, affixed to the end of a massless rigid rod, of length
, attached to a pivot point at the end opposite the point mass.
The net
torque
In physics and mechanics, torque is the rotational analogue of linear force. It is also referred to as the moment of force (also abbreviated to moment). The symbol for torque is typically \boldsymbol\tau, the lowercase Greek letter ''tau''. Wh ...
of the system must equal the
moment of inertia
The moment of inertia, otherwise known as the mass moment of inertia, angular/rotational mass, second moment of mass, or most accurately, rotational inertia, of a rigid body is defined relatively to a rotational axis. It is the ratio between ...
times the angular acceleration:
:
The torque due to gravity providing the net torque:
:
Where
is the angle measured from the inverted equilibrium position.
The resulting equation:
:
The moment of inertia for a point mass:
:
In the case of the inverted pendulum the radius is the length of the rod,
.
Substituting in
:
Mass and
is divided from each side resulting in:
:
Inverted pendulum on a cart
An inverted pendulum on a cart consists of a mass
at the top of a pole of length
pivoted on a horizontally moving base as shown in the adjacent image. The cart is restricted to
linear motion
Linear motion, also called rectilinear motion, is one-dimensional motion along a straight line, and can therefore be described mathematically using only one spatial dimension. The linear motion can be of two types: uniform linear motion, with ...
and is subject to forces resulting in or hindering motion.
Essentials of stabilization
The essentials of stabilizing the inverted pendulum can be summarized qualitatively in three steps.
1. If the tilt angle
is to the right, the cart must accelerate to the right and vice versa.
2. The position of the cart
relative to track center is stabilized by slightly modulating the null angle (the angle error that the control system tries to null) by the position of the cart, that is, null angle
where
is small. This makes the pole want to lean slightly toward track center and stabilize at track center where the tilt angle is exactly vertical. Any offset in the tilt sensor or track slope that would otherwise cause instability translates into a stable position offset. A further added offset gives position control.
3. A normal pendulum subject to a moving pivot point such as a load lifted by a crane, has a peaked response at the pendulum radian frequency of
. To prevent uncontrolled swinging, the frequency spectrum of the pivot motion should be suppressed near
. The inverted pendulum requires the same suppression filter to achieve stability.
As a consequence of the null angle modulation strategy, the position feedback is positive, that is, a sudden command to move right produces an initial cart motion to the left followed by a move right to rebalance the pendulum. The interaction of the pendulum instability and the positive position feedback instability to produce a stable system is a feature that makes the mathematical analysis an interesting and challenging problem.
From Lagrange's equations
The equations of motion can be derived using
Lagrange's equations. We refer to the drawing to the right where
is the angle of the pendulum of length
with respect to the vertical direction and the acting forces are gravity and an external force ''F'' in the x-direction. Define
to be the position of the cart.
The kinetic energy
of the system is:
:
where
is the velocity of the cart and
is the velocity of the point mass
.
and
can be expressed in terms of x and
by writing the velocity as the first derivative of the position;
:
:
Simplifying the expression for
leads to:
:
The kinetic energy is now given by:
:
The generalized coordinates of the system are
and
, each has a generalized force.
On the
axis, the generalized force
can be calculated through its virtual work
:
on the
axis, the generalized force
can be also calculated through its virtual work
:
According to the
Lagrange's equations, the equations of motion are:
:
:
substituting
in these equations and simplifying leads to the equations that describe the motion of the inverted pendulum:
:
:
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
.
From Euler-Lagrange equations
The generalized forces can be both written as potential energy
and
,
According to the
D'Alembert's principle
D'Alembert's principle, also known as the Lagrange–d'Alembert principle, is a statement of the fundamental classical physics, classical laws of motion. It is named after its discoverer, the French physicist and mathematician Jean le Rond d' ...
, generalized forces and potential energy are connected:
:
However, under certain circumstances, the potential energy is not accessible, only generalized forces are available.
After getting the
Lagrangian , we can also use
Euler–Lagrange equation to solve for equations of motion:
:
,
:
.
The only difference is whether to incorporate the generalized forces into the potential energy
or write them explicitly as
on the right side, they all lead to the same equations in the final.
From Newton's second law
Oftentimes it is beneficial to use
Newton's second law
Newton's laws of motion are three physical laws that describe the relationship between the motion of an object and the forces acting on it. These laws, which provide the basis for Newtonian mechanics, can be paraphrased as follows:
# A body re ...
instead of
Lagrange's equations because Newton's equations give the reaction forces at the joint between the pendulum and the cart. These equations give rise to two equations for each body; one in the x-direction and the other in the y-direction. The equations of motion of the cart are shown below where the LHS is the sum of the forces on the body and the RHS is the acceleration.
:
:
In the equations above
and
are reaction forces at the joint.
is the normal force applied to the cart. This second equation depends only on the vertical reaction force, thus the equation can be used to solve for the normal force. The first equation can be used to solve for the horizontal reaction force. In order to complete the equations of motion, the acceleration of the point mass attached to the pendulum must be computed. The position of the point mass can be given in inertial coordinates as
:
Taking two derivatives yields the acceleration vector in the inertial reference frame.
:
Then, using Newton's second law, two equations can be written in the x-direction and the y-direction. Note that the reaction forces are positive as applied to the pendulum and negative when applied to the cart. This is due to Newton's third law.
:
:
The first equation allows yet another way to compute the horizontal reaction force in the event the applied force
is not known. The second equation can be used to solve for the vertical reaction force. The first equation of motion is derived by substituting
into
, which yields
:
By inspection this equation is identical to the result from Lagrange's Method. In order to obtain the second equation, the pendulum equation of motion must be dotted with a unit vector that runs perpendicular to the pendulum at all times and is typically noted as the x-coordinate of the body frame. In inertial coordinates this vector can be written using a simple 2-D coordinate transformation
:
The pendulum equation of motion written in vector form is
. Dotting
with both sides yields the following on the LHS (note that a transpose is the same as a
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
)
:
In the above equation the relationship between body frame components of the reaction forces and inertial frame components of reaction forces is used. The assumption that the bar connecting the point mass to the cart is massless implies that this bar cannot transfer any load perpendicular to the bar. Thus, the inertial frame components of the reaction forces can be written simply as
, which signifies that the bar can transfer loads only along the axis of the bar itself. This gives rise to another equation that can be used to solve for the tension in the rod itself:
:
The RHS of the equation is computed similarly by dotting
with the acceleration of the pendulum. The result (after some simplification) is shown below.
:
Combining the LHS with the RHS and dividing through by m yields
:
which again is identical to the result of Lagrange's method. The benefit of using Newton's method is that all reaction forces are revealed to ensure that nothing is damaged.
For a derivation of the equations of motions from Newton's second law, as above, using the Symbolic Math Toolbox and references therein.
Variants
Achieving stability of an inverted pendulum has become a common engineering challenge for researchers. There are different variations of the inverted pendulum on a cart ranging from a rod on a cart to a multiple segmented inverted pendulum on a cart. Another variation places the inverted pendulum's rod or segmented rod on the end of a rotating assembly. In both, (the cart and rotating system) the inverted pendulum can fall only in a plane. The inverted pendulums in these projects can either be required to maintain balance only after an equilibrium position is achieved, or can achieve equilibrium by itself. Another platform is a two-wheeled balancing inverted pendulum. The two wheeled platform has the ability to spin on the spot offering a great deal of maneuverability. Yet another variation balances on a single point. A
spinning top
A spinning top, or simply a top, is a toy with a squat body and a sharp point at the bottom, designed to be rotation, spun on its vertical Axis of rotation, axis, balancing on the tip due to the gyroscopic effect.
Once set in motion, a top will ...
, a
unicycle
A unicycle is a vehicle that touches the ground with only one wheel. The most common variation has a frame with a saddle, and has a pedal-driven direct-drive. A two speed hub is commercially available for faster unicycling. Unicycling is prac ...
, or an inverted pendulum atop a spherical ball all balance on a single point.
Kapitza's pendulum
An inverted pendulum in which the pivot is oscillated rapidly up and down can be stable in the inverted position. This is called
Kapitza's pendulum, after Russian physicist
Pyotr Kapitza who first analysed it. The equation of motion for a pendulum connected to a massless, oscillating base is derived the same way as with the pendulum on the cart. The position of the point mass is now given by:
:
and the velocity is found by taking the first derivative of the position:
:
The
Lagrangian for this system can be written as:
:
and the equation of motion follows from:
:
resulting in:
:
If ''y'' represents a
simple harmonic motion,
, the following
differential equation is:
:
This equation does not have elementary closed-form solutions, but can be explored in a variety of ways. It is closely approximated by the
Mathieu equation, for instance, when the amplitude of oscillations are small. Analyses show that the pendulum stays upright for fast oscillations. The first plot shows that when
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
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 (
). The deviation from the vertical position stays small, and the pendulum doesn't fall over.
Examples
Arguably the most prevalent example of a stabilized inverted pendulum is a
human being
Humans (''Homo sapiens'') or modern humans are the most common and widespread species of primate, and the last surviving species of the genus ''Homo''. They are Hominidae, great apes characterized by their Prehistory of nakedness and clothing ...
. A person standing upright acts as an inverted pendulum with their feet as the pivot, and without constant small muscular adjustments would fall over. The human nervous system contains an unconscious
feedback
Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause and effect that forms a circuit or loop. The system can then be said to ''feed back'' into itself. The notion of cause-and-effect has to be handle ...
control system
A control system manages, commands, directs, or regulates the behavior of other devices or systems using control loops. It can range from a single home heating controller using a thermostat controlling a domestic boiler to large industrial ...
, the
sense of balance
The sense of balance or equilibrioception is the perception of balance (ability), balance and Orientation (geometry), spatial orientation. It helps prevent humans and nonhuman animals from falling over when standing or moving. Equilibrioception ...
or
righting reflex
The righting reflex, also known as the labyrinthine righting reflex, or the Cervico-collic reflex; is a reflex that corrects the orientation of the body when it is taken out of its normal upright position. It is initiated by the vestibular system, ...
, that uses
proprioceptive
Proprioception ( ) is the sense of self-movement, force, and body position.
Proprioception is mediated by proprioceptors, a type of sensory receptor, located within muscles, tendons, and joints. Most animals possess multiple subtypes of propri ...
input from the eyes, muscles and joints, and orientation input from the
vestibular system
The vestibular system, in vertebrates, is a sensory system that creates the sense of balance and spatial orientation for the purpose of coordinating motor coordination, movement with balance. Together with the cochlea, a part of the auditory sys ...
consisting of the three
semicircular canals in the
inner ear
The inner ear (internal ear, auris interna) is the innermost part of the vertebrate ear. In vertebrates, the inner ear is mainly responsible for sound detection and balance. In mammals, it consists of the bony labyrinth, a hollow cavity in the ...
, and two
otolith
An otolith (, ' ear + , ', a stone), also called otoconium, statolith, or statoconium, is a calcium carbonate structure in the saccule or utricle (ear), utricle of the inner ear, specifically in the vestibular system of vertebrates. The saccule ...
organs, to make continual small adjustments to the skeletal muscles to keep us standing upright. Walking, running, or balancing on one leg puts additional demands on this system. Certain diseases and alcohol or drug intoxication can interfere with this reflex, causing
dizziness
Dizziness is an imprecise term that can refer to a sense of disorientation in space, vertigo, or lightheadedness. It can also refer to Balance disorder, disequilibrium or a non-specific feeling, such as giddiness or foolishness.
Dizziness is a ...
and
disequilibration, an inability to stand upright. A
field sobriety test used by police to test drivers for the influence of alcohol or drugs, tests this reflex for impairment.
Some simple examples include balancing brooms or meter sticks by hand.
The inverted pendulum has been employed in various devices and trying to balance an inverted pendulum presents a unique engineering problem for researchers. The inverted pendulum was a central component in the design of several early
seismometer
A seismometer is an instrument that responds to ground displacement and shaking such as caused by quakes, volcanic eruptions, and explosions. They are usually combined with a timing device and a recording device to form a seismograph. The out ...
s due to its inherent instability resulting in a measurable response to any disturbance.
The inverted pendulum model has been used in some recent
personal transporters, such as the two-wheeled
self-balancing scooter
A self-balancing scooter (also hoverboard, self-balancing board, electric scooter board, or swegway) is a self-balancing personal transporter consisting of two motorized wheels connected to a pair of articulated pads on which the rider places the ...
s and single-wheeled
electric unicycles. These devices are kinematically unstable and use an electronic feedback
servo system to keep them upright.
Swinging a pendulum on a cart into its inverted pendulum state is considered a traditional
optimal control
Optimal control theory is a branch of control theory that deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. It has numerous applications in science, engineering and operations ...
toy problem/benchmark.
See also
*
Double inverted pendulum
*
Inertia wheel pendulum
*
Furuta pendulum
*
iBOT
The iBOT is a powered wheelchair that uses gyroscopic technology to provide multiple operating modes for varied indoor and outdoor terrain.
The current version, the iBOT® PMD, has been manufactured by Mobius Mobility since 2019. The device wa ...
*
Humanoid robot
A humanoid robot is a robot resembling the human body in shape. The design may be for functional purposes, such as interacting with human tools and environments and working alongside humans, for experimental purposes, such as the study of bipeda ...
*
Ballbot
References
*D. Liberzon ''Switching in Systems and Control'' (2003 Springer) pp. 89ff
Further reading
* Franklin; et al. (2005).
Feedback control of dynamic systems, 5, Prentice Hall.
External links
YouTube - Inverted Pendulum - Demo #3 YouTube - inverted pendulumYouTube - Double Pendulum on a CartYouTube - Triple Pendulum on a Cart
*
ttps://web.archive.org/web/20180619041024/http://www.engr.usask.ca/classes/EE/480/Inverted%20Pendulum.pdf Inverted Pendulum: Analysis, Design, and Implementationbr>
Non-Linear Swing-Up and Stabilizing Control of an Inverted Pendulum SystemStabilization fuzzy control of inverted pendulum systems
{{DEFAULTSORT:Inverted Pendulum
Pendulums
Control engineering
Machine learning task