Inverted pendulum
This article includes a list of general references, but it lacks sufficient corresponding inline citations. (January 2010) |
An inverted pendulum is a
A second type of inverted pendulum is a tiltmeter 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
In order to stabilize a pendulum in this inverted position, a
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
Equations of motion
The equations of motion 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
Where is the angular acceleration of the pendulum, is the standard gravity 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 will have the same sign as the angular acceleration term:
Thus, the inverted pendulum will accelerate 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 of the system must equal the moment of inertia 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 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.
Note that, as a consequence of the null angle modulation strategy, the position feedback is positive, that is, a sudden command to move right will produce 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 ,
Generalized Forces | Potential Energy |
---|---|
According to the D'Alembert's principle, 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 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 only depends 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 which 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 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 only transfer loads along the axis of the bar itself. This gives rise to another equation which 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 will be damaged.
Variants
Achieving stability of an inverted pendulum has become a common engineering challenge for researchers. 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
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
Examples
Arguably the most prevalent example of a stabilized inverted pendulum is a
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.[6] The inverted pendulum was a central component in the design of several early seismometers due to its inherent instability resulting in a measurable response to any disturbance.[7]
The inverted pendulum model has been used in some recent
Swinging a pendulum on a cart into its inverted pendulum state is considered a traditional optimal control toy problem/benchmark.[8][9]
See also
References
- ^ C.A. Hamilton Union College Senior Project 1966
- ^ "Model Rocket Stability".
- ^ Mitchell, Joe. "Techniques for the Oscillated Pendulum and the Mathieu Equation" (PDF). math.ou.edu. Retrieved 2023-11-06.
- ^ Ooi, Rich Chi. "Balancing a Two-Wheeled Autonomous Robot" (PDF). robotics.ee.uwa.edu.au. Retrieved 2023-11-06.
- ^ "Archived copy" (PDF). Archived from the original (PDF) on 2016-03-04. Retrieved 2012-05-01.
{{cite web}}
: CS1 maint: archived copy as title (link) - ^ "Archived copy" (PDF). Archived from the original (PDF) on 2016-03-04. Retrieved 2012-05-01.
{{cite web}}
: CS1 maint: archived copy as title (link) - ^ "The Early History of Seismometry (to 1900)". Archived from the original on 2009-11-28.
- ^ "The Acrobot and Cart-Pole" (PDF).
- ^ "Cart-Pole Swing-Up". www.cs.huji.ac.il. Retrieved 2019-08-19.
- D. Liberzon Switching in Systems and Control (2003 Springer) pp. 89ff
Further reading
- Franklin; et al. (2005). ISBN 0-13-149930-0
External links
- YouTube - Inverted Pendulum - Demo #3
- YouTube - inverted pendulum
- YouTube - Double Pendulum on a Cart
- YouTube - Triple Pendulum on a Cart
- A dynamical simulation of an inverse pendulum on an oscillatory base
- Inverted Pendulum: Analysis, Design, and Implementation
- Non-Linear Swing-Up and Stabilizing Control of an Inverted Pendulum System
- Stabilization fuzzy control of inverted pendulum systems[permanent dead link]
- Blog post on inverted pendulum, with Python code
- Equations of Motion for the Cart and Pole Control Task