System Dynamics (24.509) : VII. Introduction To The Design and Simulation of Controlled Systems
System Dynamics (24.509) : VII. Introduction To The Design and Simulation of Controlled Systems
System Dynamics (24.509) : VII. Introduction To The Design and Simulation of Controlled Systems
509)
VII. Introduction to the Design and Simulation of Controlled Systems
A Detailed Example - The Inverted Pendulum
As a more realistic example of the design and simulation of controlled systems
we now focus on the development and analysis of an inverted pendulum mounted
on a motor driven cart. A sketch of this system is shown in Fig. 7.16 (from your
text by Ogata). Realistically, this simple mechanical system is representative of a
class of attitude control problems whose goal is to maintain the desired vertically
oriented position at all times.
Fig. 7.16 Inverted pendulum on cart (Modern Control Engineering by Ogata).
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 carts position.
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 Fig.
7.16, the defining nonlinear equations can be derived as follows. 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 in Fig. 7.16, where
x(t) represents the cart position and 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
where the time-dependent center of gravity of the point mass is given by the
coordinates, (x
G
, y
G
). For the point mass assumed here, the location of the center
of gravity of the pendulum mass is simply
where is the pendulum rod length. Substitution of eqn. (7.52) into (7.51) gives
Noting the following definitions,
we have
Fig. 7.17 Vector diagram for force components in torque balance.
In a similar manner, we perform a torque balance on the system, 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.
The force components are identified in Fig. 7.17 and the resultant balance can be
written as
where the force components, F
x
and F
y
, are determined from eqns. (7.52) - (7.54)
and written as
Substituting these expressions into eqn. (7.56) and noting that cancels, gives
or
Therefore the defining equations for this system are given by eqns. (7.55) and
(7.57). 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 ,
one might consider linearization about the upright equilibrium point. We will do
this later and actually compare the linear and nonlinear dynamics of the system,
but first, we need to put the nonlinear equations into standard state space form.