Inverted Pendulum
Inverted Pendulum
Inverted pendulum
• Our goal is to illustrate some of the techniques
introduced earlier in this section, with specific focus on
the state feedback methodology. Since the inverted
pendulum is a nonlinear system, we first develop the
basic balance equations for the system, put these
nonlinear equations into standard state form, and then
generate a linearized model of the nonlinear "plant". The
open loop plant is shown to be highly unstable. A
simplistic approach to classical control of this system is
attempted with the end result showing rather ineffective
performance. To achieve better control and a more
desirable closed loop response, state feedback control
is implemented, with considerable improvement in the
response of the system due to a setpoint change
associated with the cart’s position.
Inverted pendulum
• Several variants of this state controlled system are
illustrated in a series of Matlab simulations. The system
with and without a state observer is compared and the
use of a linear versus nonlinear plant model is
highlighted. Finally, a wind disturbance input is added to
the mathematical model, and the effect of this additional
random force on system performance is addressed. This
series of applications implements and illustrates many of
the topics discussed in the early part of this section. The
Matlab examples should give the reader a better
understanding of the design and simulation methods
discussed earlier, and they also provide the student with
a set of functional tools that can easily be modified to fit
other situations of interest.
Basic Equations (Inverted Pendulum))
• Given an inverted pendulum mounted
on a motor driven cart as shown in the
figure.
• First we assume that the rod is
massless and that the cart mass and
the point mass at the upper end of the
inverted pendulum are denoted as M
and m, respectively.
• There is an externally x-directed force
on the cart, u(t), and a gravity force acts
on the point mass at all times. The
coordinate system chosen is defined,
where x(t) represents the cart position
and theta is the tilt angle referenced to
the vertically upward direction.
• A force balance in the x-direction gives
that the mass times acceleration of the
cart plus the mass times the x-directed
acceleration of the point mass must
equal the external force on the system.
• This can be written as
• We have
• Torque balance
• where torque is the product of the perpendicular
component of the force and the distance to the pivot
point (lever arm length ).
• In this case, the torque on the mass due to the
acceleration force is balanced by the torque on the
mass due to the gravity force.
• Where
or
• These equations definitely represent a
nonlinear system which is relatively
complicated from a mathematical
viewpoint.
• However, since the goal of this
particular system is to keep the
inverted pendulum upright around
th=0, one might consider linearization
about the upright equilibrium point.