Control of a Dual Inverted ... System Using Linear-Quadratic

advertisement
Control of a Dual Inverted Pendulum
System Using Linear-Quadratic
and H-Infinity Methods
by
Lara C. Phillips
B.S., University of Missouri - Rolla
(1991)
Submitted to the Department of
Electrical Engineering and Computer Science
in Partial Fulfillment of the Requirements
for the Degree of
Master
in
of
Electrical
Science
Engineering
at the
of
Institute
Massachusetts
September
Technology
1994
© Massachusetts Institute of Technology, 1994.
All Rights Reserved
Signature of Author
IV
I
~
__
.
*---
Department of Electrical Engineering
and Computer Science
June 10, 1994
Certified by
,-\
)
,
Michael Athans
Thesis Supervisor
by
s
'-!
!'.V 1
1994
Control of a Dual Inverted Pendulum
System Using Linear-Quadratic
and H-Infinity
Methods
by
Lara C. Phillips
Submitted to the Department of Electrical Engineering and
Computer Science on June 10, 1994, in partial fulfillment of the
requirements for the Degree of Master of Science.
Linear-Quadratic Regulator (LQR) and H-Infinity (H) with full state
feedback design methods are applied to a cart with two inverted
pendulums attached, named a dual inverted pendulum system.
A
linearized model of the system is obtained, and its open-loop
properties are examined. The LQR and H design methods are
applied to the system with the objective of stabilizing it and
approximately maintaining the open-loop bandwidth.
The methods
are applied to the dual inverted pendulum system for two different
ratios of rod lengths to see the differences in the closed-loop
responses.
With the H design method, frequency weighting the
control is needed to shape the frequency response to meet the
bandwidth constraint. The LQR and frequency weighted H. designs
are compared in both the time and frequency domains.
These
comparisons indicate that the closed-loop systems have satisfactory
transient responses (not always the case for the H_ designs), stability
robustness, and bandwidth, but amplify the disturbances in some
frequency ranges.
Thesis Supervisor:
Dr. Michael Athans
Title: Professor of Electrical Engineering
2
Acknowledgments
I would first like to thank my family for their encouragement
and support during my three years at M.I.T.
I would especially like
to thank my dad, for instilling in me the confidence and courage to
attend graduate school, and for his "gentle prodding" to attend M.I.T.
I would also like to thank Professor Michael Athans, first, for
suggesting the topic of this thesis, and second, for his guidance,
support, and patience as my thesis advisor.
In addition, I would like
to express my appreciation to some of the members of the LIDS
group, namely Stephen Patek, Leonard Lublin, and Alan Chao, for
taking the time to answer questions pertaining to my thesis.
Thanks must also go to my friends, both old and new, who have
provided much support throughout my stay at M.I.T.
go to the following three people:
Special thanks
Jennifer (Reed) Barney, my best
friend since the second grade, for always listening and cheering me
up during our (ahem) hour-long phone conversations; Birgit
(Kuschnerus) Sorgenfrei, my first and closest friend at M.I.T., for
sharing in the teaching and M.I.T. experiences;
and John Shirlaw, my
English friend, for offering new and interesting views on life, once I
was able to translate them from "English" to "American".
Thanks also
go to S.S., L.A., F.F., L.H., N.P. (Ashdowners), K.C., J.B., D.L., M.S. (TAs),
and B.R., D.J. (MCS survivors).
Finally, I would like to express my thanks to Steve Patterson,
for his love, understanding, patience, and support during the months
of work on this thesis.
3
Table of Contents
Page
Chapter
1
Introduction
8
1.1
Background
.....................
8
1.2
Thesis Overview.................
9
Chapter 2
The Dual Inverted Pendulum System
12
2.1
State Space Representation ......................
12
2.2
Open-Loop Analysis ............................
15
2.2.1 Open-Loop Poles and Zeros .................
15
2.2.2 Controllability and Observability ............
19
2.2.3 Open-Loop Frequency Responses............
21
24
3.1
Linear-Quadratic Regulator Design
LQR Methodology.... ...........................
3.2
LQR Design ....................................
3.3
LQR Closed-Loop Simulation Results ..............
Chapter 3
Chapter 4
24
26
3.3.1 LQR Time Response........................
28
28
3.3.2 LQR Frequency Response ...................
30
H-Infinity with Full State Feedback Design
33
4.1
H with Full State Feedback Methodology .........
33
4.2
H_ with Full State Feedback Design ...............
35
4.3
H. Closed-Loop Simulation Results ...............
36
4.3.1 H, with Full State Feedback Time Response ..
36
4.3.2 H. with Full State Feedback Frequency
Response
...
.. *. . . . . . . . .
4
. . . . . . . . . . . . . . . .
38
Table of Contents (cont.)
Page
Methodology
...............
4.4
Frequency Weighting
4.5
Frequency Weighted H, Design ..................
4.6
Frequency Weighted H. Closed-Loop Simulation
Chapter
Results.................
39
42
4.6.1 Frequency Weighted H. Time Response......
44
44
4.6.2 Frequency Weighted H.. Frequency
46
49
Design Comparisons
5
Response .
49
5.1
Time Response .........
5.2
Frequency
Response.....
52
5.3
Parameter Variation .....
54
Chapter 6 Conclusions and Suggestions
Future Work
for
58
6.1
Conclusions ....................................
58
6.2
Suggestions for Future Work .....................
60
Appendix A
State Space Representation
61
Open-Loop Poles and Zeros
66
Appendix C
Controllability and Observability
71
Appendix D
Additional Time Responses
78
Appendix
B
References
89
5
List of Figures
Page
2.1
The Dual Inverted Pendulum
2.2
Open-Loop Pole and Zero Locations, T(s)
2.3
Open-Loop Pole and Zero Locations, T,(s)
..............
2.4
Open-Loop Pole and Zero Locations, Ty(s)
..........
2.5
Open-Loop Pole and Zero Locations as the Length of the
Longer Rod is Decreased ..............................
20
2.6
Open-Loop Frequency Response, Control to Rod Angles ...
22
2.7
Open-Loop Frequency Response, Disturbances to Cart
System ...................
13
...............
18
18
....
19
Position ............................................
23
3.1
LQR Implementation .................................
26
3.2
LQR Time Response, x(0)=[1
29
3.3
LQR Complementary Sensitivity .......................
30
3.4
LQR Disturbance Rejection, Tf,y(s) ......................
31
3.5
LQR Disturbance Rejection, Tfy(s) ......................
31
4.1
H. Time Response, x(0)=[1
37
4.2
H_ Complementary Sensitivity ........................
4.3
Frequency Weighting Function and Frequency Domain
4.4
Frequency Weighted H
4.5
Preliminary
4.6
Final H. Control Weighting, System 1 ..................
43
4.7
Final H_ Control Weighting, System 2 ..................
43
4.8
Frequency
Result...............
x(0)=[1
4.9
0 0 0 0 0] ..............
0 0 0 0 0] ...............
..........
....................
Implementation ...............
H Control Weighting .....................
Weighted
0 0
38
39
41
42
H Time Response,
0 0 0] ................................
Frequency Weighted H
45
Complementary Sensitivity .....
46
4.10 Frequency Weighted H Disturbance Rejection, Tf,l(s) ....
47
6
List of Figures (cont.)
Page
4.11 Frequency Weighted H Disturbance Rejection, T,(s)
5.1
48
Time Domain Comparison, System 1,
x(O)=[1
5.2
....
o0 0
0
50
0] ..................
Time Domain Comparison, System 2,
x(0)=[1
51
0 0 0 0 0] ..................
52
5.3
Complementary Sensitivity Comparison ..
5.4
Disturbance Rejection Comparison, System
1 ....
· ·......
5.5
Disturbance Rejection Comparison, System
2............
5.6
Parameter Variation Comparison, System
5.7
Parameter Variation Comparison, System 2··....·.........
57
A.1
The Dual Inverted Pendulum System .....
61
A.2
Diagram for Force Equation ......
62
A.3
Diagram for Moment Equations...
62
C.1
Open-Loop Pole and Zero Locations as the Length of the
Longer Rod is Decreased .........
..
..
53
I .............
..
.
.
.
.
.
.
.
.
.
.
54
56
74
79
80
D.I
Time Response, System 1, x(0)
D.2
Time Response, System 2, x(0) = [0 0
D.3
Time Response, System
0 0
O] ........
81
D.4
Time Response, System 2, x(0) = [0 0 0 0
O] ........
82
D.5
Time Response, System
D.6
Time Response, System 2, x(0) = [1 0 -1'
D.7
Time Response, System
D.8
D.9
[O
1, x(O) = [0
0
0
0 0] ........
0
00
........
0] ......
83
O] ......
84
01
] .......
85
Time Response, System 2, x(0) = [1 0 1' 0 -1
01] .......
86
Time Response, System 1, x(0) = [1 0 -1
0] .......
87
0] .......
88
1, x(0) = [1
0
1, x(0) = [1 0 1'
D.10 Time Response, System 2, x(0)=[1
7
0 -1
1' 0 -1'
0 -1
0 -
0
0
1
Chapter
1
Introduction
In this chapter, the background and outline of this thesis are
presented.
1.1
Background
The single inverted pendulum system is often used in classical
controls classes to demonstrate the stabilization of an open-loop
unstable system, and has also been used in demonstrating
the design
of intelligent integral control [1], the dynamic principle of parametric
excitation, and the considerations and problems involved in actually
constructing such a system [2], [3].
A more interesting and
complicated problem in terms of controller design is the dual
inverted pendulum system, in which there are two inverted
pendulums on one cart.
This system has an additional
unstable pole
and nonminimum phase zero in the open-loop plant than the single
inverted pendulum system and is therefore more difficult to
stabilize.
Systems with open-loop plants containing unstable poles and
nonminimum phase zeros can be stabilized using constant gain
feedback controllers, such as those that result from the LinearQuadratic Regulator (LQR) design method, or using unstable
8
compensators that might result from Linear-Quadratic Gaussian
(LQG) or H.-Optimization
design methodologies.
However, even
though the unstable, nonminimum phase systems are stabilized using
the above design methodologies, the closed-loop systems generally
exhibit poor performance characteristics such as sensitivity to
parameter value variations and disturbance amplification in some
frequency ranges [4].
Stabilization of the dual inverted pendulum system is
demonstrated using the LQR and H
methodologies.
lengths.
with full state feedback design
Each design is realized for two different ratios of rod
System 1 represents the system with a ratio of 16:1 for the
rod lengths, and System 2 represents the system with a ratio of 2:1.
The controllers
are designed such that the bandwidths
of the open-
and closed-loop systems are comparable.' The closed-loop systems
for each design methodology are compared in both the time domain
and frequency domain, comparing such design characteristics as
transient response, stability robustness, and disturbance rejection
properties, and in the sensitivity of the closed-loop
system to
parameter variations.
1.2
Thesis
Overview
Chapter 2 introduces
the state space representation
the dual inverted pendulum
of its dynamics.
system and
Details of the
development of the state space equations are included in Appendix
A.
The open-loop characteristics of the system, such as pole and zero
9
locations, controllability and observability, and frequency responses,
are also investigated.
The open-loop pole and zero locations for
specific transfer functions are given, and the derivations
locations are presented in Appendix B.
observability
properties
of the
The controllability
and
of the system are discussed, and the
equations providing the results are included in Appendix C.
Finally,
specific transfer functions are examined in the frequency domain.
Chapter 3 presents the design methodology for the linearquadratic regulator (LQR).
The effect of the control weighting
coefficient on the closed-loop poles is discussed, and a value is
determined to satisfy the bandwidth constraint.
responses of the closed-loop
system are shown.
Chapter 4 presents the H
methodology.
Time and frequency
with full state feedback design
It is found that the H
with full state feedback
controller does not meet the bandwidth constraint.
bandwidth, the control is frequency weighted.
To reduce the
The method of
frequency weighting is presented, and a frequency weighting is
determined for which the bandwidth constraint is better satisfied.
Time and frequency responses of this closed-loop system are also
shown.
In Chapter 5, the two design methodologies are compared for
both System 1 and System 2.
The designs are compared in the time
domain in terms of the amount of the perturbations from
equilibrium, the magnitude of the necessary control, and the
transient times.
Time responses for several initial conditions are
shown in Appendix D.
In the frequency domain, the stability
robustness and disturbance rejection properties are compared.
10
The
final design comparison involves a parameter variation, in which the
length of the longer rod is varied until the closed-loop systems again
become unstable.
Chapter 6 briefly summarizes the conclusions, and
recommendations for future research are given.
Complete
appendices and selected references are included at the end of the
thesis.
11
Chapter
2
The Dual Inverted
Pendulum System
In this chapter, the state space representation
of the dual
inverted pendulum system is presented, and properties of the openloop system are examined.
2.1
State
Space
Representation
The first step in analyzing any system is to obtain a
representation of its dynamics.
For many design purposes, a linear
representation about an equilibrium point is sufficient to obtain a
good controller.
A linear model of the system can be obtained from
the nonlinear dynamic equations which describe the system by
establishing the steady-state equilibrium conditions, defining the
perturbations about this equilibrium point, introducing the
perturbations into the nonlinear equations, and then retaining only
the linear terms.
The state and output perturbation dynamics can
then be expressed in the standard state space representation form
&(t) =A&(t) +B6u(t) + Ld(t), By(t) =CMx(t)+D6u(t) [5].
The derivation of the state space representation for the dual
inverted pendulum system of Figure 2.1 is included in Appendix A.
The assumptions for finding the nonlinear equations describing the
system are:
the cart is mounted on frictionless wheels; the rods are
12
attached to the cart with frictionless pivots; the gravitational field is
uniform; the disturbances can be modeled as forces acting on the tips
of the rods; and the control for the system is a translational force
acting on the cart.
We also assume that all of the states can be
measured without sensor noise (i.e., we have full-state feedback),
and that the position of the cart from some reference point is the
state variable we want to control.
f,(t)
Figure 2.1
m2 2t2
The Dual Inverted Pendulum
System
In Figure 2.1, M is the mass of the cart, 21, and 212 are the
lengths of the shorter and longer rods, respectively, and m, and mn
2
are the masses per unit length of each rod.
13
In Appendix A, the state, control, and disturbance
vectors are
defined to be:
perturbed cart position (m)
perturbed cart velocity(m / s)
perturbed angularpositionof the shorter rod (rad)
perturbed angularvelocityof the shorter rod (rad / s)
perturbed angularpositionof the longer rod (rad)
perturbed angularvelocityof the longer rod (rad / s)
8z(t)
8&(t)
8x(t) =
80,(t)
8o1 (t)
8, 2 (t)
462 (t)-
perturbedcontrol force (N)
8u(t)=[f(t)]
d(t) = [
perturbed disturbanceforce on the shorter rod (N)
perturbed disturbanceforce on the longer rod (N)
(t)]
(f
and the state space representation for the dual inverted pendulum
system is shown to be
01
o O
i() =
00
0
0
0
-3M,g
o
-3M~g
z
z
0
1
o 0 3g(Z+3M)
4Zh
00
o o
y(t)=[1
9M 2 g
4Z1,
O
0
0
0 3g(Z + 3M)
9Mg
4ZI2
0 0 0
0
0
4Z4
0
0
0
0
0
4
-2
-2
Z
0
0
0
0
Z
0
6x(t) + -3 8u(t) +
3(M, +Z)
1
0
z
3
ZI,
2M,I,Z
2Z11
O
0
0
-3
3
3(M2 + Z)
2M 2 2Z
.zA
2Z12
6d(t)
O]6x(t)
where M = 2rnl1 , M2 = 2 212, and Z =4M +Ml + M2.
14
(2.1)
In subsequent chapters, the 6's are omitted from the equations
and the state space representation
is written as
i(t) = Ax(t)+ Bu(t)+ Ld(t)
(2.2)
y(t) = Cx(t)
2.2
Open-Loop
Analysis
The open-loop analysis of the dual inverted pendulum system
involves finding open-loop pole and zero locations in terms of the
system parameters, investigating the controllability and
observability of the system, and examining such transfer functions as
the control to the angles of the rods, and the disturbances to the cart
position.
2.2.1
Open-Loop Poles and Zeros
The open-loop pole and zero locations of the dual inverted
pendulum system from the control to the cart position (from u to y)
can be found from the open-loop transfer function T(s)=C(s
-
A)-'B.
Because the system is SISO (single input, single output), the poles are
the roots of the denominator of the transfer function and the zeros
are the roots of the numerator.
From the transfer function,
presented in Appendix B, the open-loop pole locations are found to
be
0,
, ±+
,
+VY, where
15
8
+3
+
(z)[+3M[
2 ]]
Z 3M2
(g,
and the open-loop zero locations are:
(
2 )(2.3)
(2.4)
3{g
There are two open-loop poles at the origin and the other four
poles are symmetric about the ji-axis.
Because of the poles in the
right-half plane, the system is unstable.
The four open-loop zeros
are also symmetric about the jw-axis.
The zeros in the right-half
The magnitudes of
plane cause the system to be nonminimum phase.
the zeros are the natural frequencies
of the individual rods.
Note that the poles are dependent on the masses of the cart
and the rods.
Increasing the mass of the cart or the masses of the
rods pushes the non-zero poles farther away from the j-axis,
causing the system to become harder to control.
Physically, the
heavier a cart is, the harder it is to move back and forth, and the
heavier an inverted rod is, the more difficult it is to keep vertical.
The open-loop pole and zero locations from the disturbances
to
the cart position (f, and f 2 to y) can be found from the transfer
functions T,(s)=C(sl-A)-'L,
and T,,(s)=C(sI- A)-1L,
matrix L rewritten as L=[L,
with the disturbance
respectively,
L].
Since the
poles depend only on the A matrix, these transfer functions
same pole locations as given in (2.3).
have the
The transfer functions are
included in Appendix B, and the zeros are found to be:
zeros of Tf,(s): ±+
4 4
(2.5)
, ±jg
2 4JY21,
16
zeros of T(s):
+±4(
ij
2(2
(2.6)
Note that these transfer functions have real and complex zeros.
If a disturbance force is of a frequency equal in magnitude to its
respective complex zero, the rod oscillates at the same frequency in
such a way that the cart does not "see" the disturbance, and
therefore does not move [5], [6].
The open-loop pole and zero locations for the three transfer
functions mentioned above are given below for System I and System
2, and are also shown in Figures 2.2, 2.3, and 2.4.
SYSTEM
1: l, =lm,1
2
open-loop poles:
=16m:
0,0, + 2.7485,± 0.8022
zeros of T(s):
2.7130,±0.6783
zeros of Tfy(s):
0.6783,±j3.8368
zeros of Tf2(s): ±2.7130, jO.9592
SYSTEM 2:
=lm, l2 = 2m:
open-loop poles:
0,0, + 2.7545, ±1.9703
zeros of T,y(s): ±2.7130,1.9184
zeros of Tf,(s): +1.9184,+j3.8368
zeros of Tf2y(s): +_2.7130,±j2.7130
17
System
1
I
I
I
0
C
.0 0 - .0........
. .: . . . . . . . . . . . . .
1
· · ·
X·O··
I
....... x.....
...
ox
.................
I
..:...........
·
(X. I -
E
_'1
-I
- .)
0·
I
I
-
-3
-2
-1
0
2
1
3
Real
System 2
1
C:
0
E
I
-3I
_1
-I
.)0........
....
. . . . . . . . . . . .
I
-2
-1
.............. k ......
x
0
I
i
I
0
1
2
3
Real
Figure 2.2
Open-Loop Pole and Zero Locations, T(s)
System
1
.'
0co
C
0
co
E
-3
-2
-1
0
1
2
3
Real
System 2
5
a%
0
to
0
E
_
I
-3
-2
I
-1
0I
0
I
_
1
2
Real
Figure 2.3
Open-Loop Pole and Zero Locations, Tf,,(S)
18
3
I_1
System
0
1
i
,
2
3
2
3
cao
C
E _0
'3
I
I
i
-2
-1
0
Real
System 2
1
,
.
.
i
0
co
'co0 -.. >
..........
o
.........
E
.....
.
_AI
I
·3
-2
Figure 2.4
2.2.2
....
X-xo--
0
II
-1
0
Real
1
Open-Loop Pole and Zero Locations, T,y(s)
Controllability and Observability
The controllability and observability of the dual inverted
pendulum system are also considered because if a system is not
controllable and observable, it is meaningless to search for an
optimal controller.
Because the system contains unstable modes, we
are actually looking at the stabilizability and detectability properties
of the system.
For a system to be controllable, for any initial state
final state
at t= T, one can find a control u(t) such that x(T) = 0. For
a system to be observable, the unique initial state
calculated
and any
from the measurements
of u(t) and y(t).
19
can be
A system with
unstable modes is said to be stabilizable and detectable if the
unstable modes are controllable and observable, respectively [5].
The controllability and observability properties of the dual inverted
pendulum system are examined in Appendix C in terms of the
system parameters in the controllability and observability matrices.
The loss of controllability and/or observability can also be
caused by a pole/zero cancellation.
In Figure 2.5, the open-loop pole
and zero locations are shown as the length of the longer rod, l2, is
decreased to equal the length of the shorter rod, 1l. The plot
indicates that when the rods are of equal length there are pole/zero
cancellations
at
2.7130 (two zeros and one pole at each).
A pole/zero
cancellation implies a loss of controllability and/or observability.
To
determine which loss the system experiences, the mode and the pole
and zero "directions" must be examined.
The loss of controllability
and observability for this pole/zero cancellation is also discussed in
Appendix C, along with an examination of other possible cases which
Length of Shorter Rod, 11, Equals 1
m15P ) ......
-
x......................
.x.......... X.......... o x .: .o° .
xo
X
ox
:X)
)o
:
X)
)O
510
-) X:)
......................
X
xo
x
NOXO
)O
-O
-3
-2
D
X
Ox
-1
0
CO(
O(
......................OC
c
OX
X
-
(X
0
1
2
Real Axis
Figure 2.5
Open-Loop Pole and Zero Locations as the Length
of the Longer Rod, 12, is Decreased
20
oC
C
OX:
OX
X
OX:
..............
..............
.. .
XO
)O
X)
)G
:XO
.--.
(X
0Cc
3
It is found, however, that the system loses
give a cancellation.
and observability
controllability
only when the lengths of the rods
are equal, and that the system cannot lose only one or the other.
The fact that the dual inverted pendulum system is both
and unobservable
uncontrollable
makes sense physically.
thought of in this way:
frequency,
condition
when the rods are equal in length
The uncontrollability
of the system can be
rods of equal length oscillate at the same
3ig , so that if they are started with the initial
08(0)= -02(0), the final condition of 0,(T)= 02(T) can not be
reached for any control u(t), and thus the system is uncontrollable.
The unobservability
of the system can be reasoned as follows:
with
the same initial conditions as above, the rods exert equal and
opposite forces on the cart when they fall, and therefore the cart
does not move.
However, since a net force of zero results on the cart
for several initial conditions ((0)=10'=-02(0)
or 90(0)=-5 =-02(0), for
example), the system is unobservable.
2.2.3
Open-Loop
Responses
Frequency
Finally, we examine some open-loop transfer functions of the
dual inverted pendulum
system.
The transfer functions shown in
Figure 2.6, the control to the angles of the rods for System 1 and
System 2, indicate that we can control the angle of the shorter rod,
08, better at the higher frequencies, and that the control affects
02
more for System 2, where the ratio of the rod lengths is smaller, than
for System 1.
Both of these statements make sense physically since a
21
System
1
I'
-control to theta 1
control to:theta2....
102
. ...
10'100
Frequency (rad/sec)
System 2
A
CU
_I.. .
.
. . . ii.................
._n
10
10
102
10'
'
10'
Figure 2.6
.
. . .ii
.
.
100
Frequency (rad/sec)
.
. . .il
.
iiii
101
102
Open-Loop Frequency Response, Control to Rod Angles
horizontal movement at the base of a shorter rod causes a larger
angular deflection of the tip than if the same horizontal movement is
applied to a longer rod.
The transfer functions in Figure 2.7, the disturbances
to the
cart position, show that disturbances greatly affect the position of the
cart at the lower frequencies.
The plots also reveal the fact that
there are complex zeros for these transfer functions (refer to (2.5)
and (2.6)).
It appears from Figure 2.7 that if the disturbance is of a
frequency equal in magnitude to that of a complex zero, the
disturbance has less effect on the position of the cart than at many of
the other frequencies.
These slight dips in the responses should
extend much farther down because as explained in Section 2.2.1, if
22
System 1
m
20(
....
......
. ......
....:: :. .........
.... ...
......
.....
.~~~~K
. ...
........................
c-
0
-20C
10 '1
1 0'-2
0
m
.1
1:
101
100
.
ii . .i
Frequency (rad/sec)
System 2
.V
0
...........
. .iiiiii
loC11
co
la
.. .........
C
.8
.1 AC
10O
)2
- isturbae
..
10 ' 1
100
............
1(
101
Frequency (rad/sec)
Figure 2.7
Open-Loop Frequency Response, Disturbances
to Cart Position
the disturbance is of a frequency equal in magnitude to that of a
complex zero, the cart does not move.
Now that the open-loop properties of the dual inverted
pendulum system have been examined, the LQR and H.
compensators can be designed.
23
.
.
Chapter
3
Linear-Quadratic
Regulator
Design
The linear-quadratic regulator design methodology is
presented in this chapter, and a controller is designed for the dual
inverted pendulum system.
The closed-loop time and frequency
responses are also examined.
3.1
LQR Methodology
The linear-quadratic
regulator (LQR) method is used to design a
linear controller for a system with full state feedback.
design method develops controllers
The LQR
for systems of the form
x(t) = Ax(t) + Bu(t), x(O)= x,
x(t)E 1, u(t) e 9
[A,B]stabilizable
(3.1)
which minimize the cost performance
J = i[x'(t)Qx(t)+ u'(t)Ru(t)]dt
(3.2)
0
24
where Q is the symmetric, positive semidefinite state weighting
matrix, and R is the symmetric, positive definite control weighting
matrix. It is also necessary that [A,Q1 2] is detectable.
The solution of the regulator problem is a time varying control
law which in steady-state becomes the linear time-invariant, state
feedback law [6], [7]:
u(t) =-Gx(t)
where
(3.3)
G is the (mxn) control gain matrix given by
G =R-'B'K
(3.4)
and K is the unique symmetric, positive semidefinite
(n x n) solution
of the algebraic Riccati equation
KA + A'K +Q - KBR-B'K =0
(3.5)
The control law defined by (3.3) is unique and minimizes the
cost functional, provided that the stabilizability and detectability
conditions are met.
If there are input disturbances
to the plant, the
optimal controller is determined as above, ignoring the fact that
there are disturbances,
and it is implemented as shown in Figure 3.1
[7].
25
d(t)
y(t)
Q
Figure 3.1
3.2
LQR Implementation
LQR Design
As mentioned in Chapter 2, the state variable we want to
control is the position of the cart from a reference point.
Therefore,
in the LQR cost performance of (3.2), the state weighting matrix Q
equals C'C.
The controllers are to be designed such that the open- and
closed-loop bandwidths are comparable.
R=pl,p>O
With LQR control, if we let
in the cost functional, then as p-0,
some of the closed-
loop poles go to cancel any minimum phase zeros, or go to the mirror
image, about the jw-axis, of any nonminimum phase zeros of the
open-loop system, and the rest go off toward infinity along stable
Butterworth patterns [7]. Thus, we can vary the value of p to obtain
closed-loop poles within the same distance from the origin of the splane as the open-loop poles.
From the locations of the open-loop
poles for System 1 (0,0,+2.7485,+ 0.8022) and System 2
26
(0,0,±2.7545,+1.9703),
it is decided to have the closed-loop poles inside
a semicircle of radius three from the origin.
The value of p is varied until the closed-loop poles that are
heading off toward infinity from the origin along stable Butterworth
patterns are just inside the radius of three semicircle.
The other
closed-loop poles head toward minimum phase and "mirror-image"
nonminimum phase zeros, which are inside the pole locations (Figure
2.2).
The value of p and the closed-loop pole locations for System 1
and System 2 are as follows:
System
1:
p = 0.000353
closed-loop
poles: -2.1564 ± j2.0852,- 2.7268+ jO.0175,
-0.6785 + jO.0070,
System 2:
p = 0.000448
closed-loop poles: -2.1574+ j2.0831,- 2.7285+ jO.0204,
-1.9264 + jO.0193
Recall that the open-loop zero locations for System 1 and
System 2 are ±2.7130,±0.6783 and ±2.7130,±1.9184, respectively.
Thus
we can see that four of the closed-loop poles are almost canceling the
minimum phase and "mirror-image" nonminimum phase zeros of the
open-loop system.
27
3.3
LQR Closed-Loop Simulation Results
The LQR closed-loop system has the form
.(t) = (A - BG)x(t) +L(t),
y(t) = Cx(t)
x(O)= xo
(3.6)
From these equations we can examine the time and frequency
responses.
3.3.1
LQR Time Response
From the locations of the closed-loop poles, we would expect
System 2 to have a faster transient response than System 1.
Time
responses for System 1 and System 2 are shown in Figure 3.2.
For
this simulation it is assumed that only the cart has an initial
perturbation, equal to one meter, and that there are no disturbance
forces acting on the rods.
First notice from Figure 3.2 that System 2 does in fact have a
faster transient response.
The figure also indicates that System 1
experiences the largest perturbation of the cart from equilibrium,
and that the angle of the longer rod for System 2 deviates farther
from equilibrium
than for System 1.
The perturbation
of the angle
makes sense physically because, as mentioned previously, a
horizontal movement at the base of a shorter rod causes a larger
angular deflection of the tip than if the same horizontal movement is
applied to a longer rod.
More time responses are discussed in
28
E
.o
CL
0
0
CL
Time (sec)
10
I
Ic
g
-10
0
1
2
3
4
5
6
7
EI
5
6
7
83
Time (sec)
5
O
-5'il _0
i 1i
2
3
4
Time (sec)
z
'9
9
-50
Ann~~~~~~~~~~~~~~~~~
.50
'--0
....... .........
0.1
5c D
C
9
I
C
-5C )
!
!
0!
n50!
0.2
!
0.3
!
0.4
0.5
0.6
Time (sec)
!
!
!
................................
..........
.....
0.7
0.8
'"
'!
.......
.......
0.9
1
·
...........i............i........................ .......
......
0
I
-10c
..
'O
- 1
i
2
4
3
I:::
5
I
7
6
Time (sec)
Figure 3.2
LQR Time Response, x(0) = [1 0 0
29
0
0
O]
8
Chapter 5 when the LQR design is compared to the frequency
weighted H design.
3.3.2
LQR Frequency
Response
The frequency responses examined relate to stability
robustness and disturbance
and 3.4.
rejection.
The complementary
These are shown in Figures 3.3
sensitivity plot, Figure 3.3, is the
frequency response of the closed-loop transfer function matrix,
1
C,(s)=[I+G,(s)] -G,(s),
where G(s)=G(sI-A)-'B
is the loop transfer
function matrix and G is the control gain matrix of (3.4).
With the
modeling errors reflected to the plant input, Figure 3.3 indicates that
the system can tolerate multiplicative errors with a[E(jo)]<2,
for all
w (peaks are less than 6dB=201og(2)) [7].
m
'5
g
0
h..
10
10"
'
Figure 3.3
10 °
-Frequency
(rad/sec)
101
102
LQR Complementary Sensitivity
The disturbance rejection plots of Figures 3.4 and 3.5 show the
frequency responses of the open-loop and closed-loop transfer
functions
T,y(s) and T 2 ,(s) for System 1 and System 2.
30
The plots
System
1
200
- i_iii--i
i~~~~~~~~~~~~~~~~~~·~~~
. : :..
1;~;::::::,
i1i i~;
~ i~ii
System 2
=i.200.
i : i;;~;;; i
'2
10
.1
-2
° 0102
1 0 " Frequency10
1(rad/sec)
103
104
104
103
102
00101
Frequency (rad/sec)
System 2
==
F~/:::: ::::::::
-''"-~';-~-ii!~i
°l"'"i'i'i0iiifi
0
i
n~
t~l
~E,
i'~'Ti~i'~i":.!"
.....
.
..
....
..
.
f .
i'"i"!'i'i'i'!~
7
i
ii;
ii
10'-1
-d..vo10-2
i ~ ;
i
iii
ii
1
10
i
:
ii;:
i
102
fii
10 4
103
Frequency (rad/sec)
Figure 3.4
LQR Disturbance Rejection, Tf,y(s)
System
1
200.
0
L~~.....
t
~
0200
10 '2
.
:'::::: i!!i:i
; ;;~;~;;i
::i:
:,~: ~
10 0
10"
10'
Frequency (rad/sec)
102
.
..
103
k...
fl.;-.·····
104
System 2
.....
0)
·
1
~~ ~ ~
0
-"j0 '2
.·
··
:................::
~~~~~~~~~~~~~~~~~~~~~~~~~
·
:
...
. ....... ........
/e :·....-,.........
~~~~
~ ~ ~....
lo-
Figure 3.5
:::··
.........
..
10"
.~.~
···
.........
::
...
........
,,,·...
III!.···-L······
10
1 01
LQR Disturbance Rejection, T,(s)
31
:
·····
........
':'::""
· · ·....
~·······
10I
Frequency (rad/sec)
.:.
lo'
104
indicate that disturbance rejection performance has been improved
only for frequencies less than approximately 0.1 radians/sec.
Figures 3.4 and 3.5 also indicate that disturbances of frequency less
than approximately
system.
8 radians/sec
are amplified
in the closed-loop
As mentioned in Chapter 2, the disturbance amplification
in
some frequency ranges is a characteristic of closed-loop systems for
which the open-loop system has nonminimum phase zeros [4].
In the next design methodology, H with full state feedback,
the disturbance is included in the cost function.
By including the
disturbance in the cost function, we would expect to obtain better
disturbance
rejection.
32
Chapter
4
H-Infinity with Full State Feedback Design
In this chapter, both the H. with full state feedback design
method and the frequency weighted H. design method are
Design parameters and time and frequency responses are
presented.
given for both designs.
4.1
with Full State Feedback Methodology
H
The H-Infinity
(H.) with full state feedback method can also be
used to design a linear controller for a system with full state
feedback.
Unlike the LQR method however, the H. with full state
feedback method accounts for how the disturbances affect the plant
dynamics.
The design method develops controllers for systems of
the form
x(t) = Ax(t) + Bu(t) + Ld(t), x(O) = Xo
y(t) = Cx(t)
x(t)e 9, u(t)e 9t, d(t)E LI
[A,B], [A,L] stabilizable, [A,C] detectable
which minimize the cost performance
33
(4.1)
J(u,d) = I [y'(t)y(t)+pu'(t)u(t)- y 2d'(t)d(t)]dt
(4.2)
0
where p is the control weighting parameter, as in the LQR design,
and y is the trade-off parameter.
The solution of the H with full state feedback problem in
steady-state is the linear time-invariant, state feedback control law:
u(t) = -- B'Xx(t) = -Gx(t)
P
(4.3)
where X is the symmetric, positive definite (nxn) solution of the
modified algebraic Riccati equation
=O
XA+A'X +C'C-X(IBB'--LL'
(4.4)
For the pure H with full state feedback solution, the value of
y is decreased to the minimum value, y,
three conditions are satisfied:
for which the following
(i) the eigenvalues of the Hamiltonian
matrix
H=[A
-C'C
4LJJ 1BB]
[H
-A'
are just off of the j-axis,
=
Y2
P(4.5)
(ii) X is symmetric, positive definite, and
(iii) the real parts of the eigenvalues of A- -BB'X
P
34
are less than zero
[7]. Note that if y -+
, the design method above is the same as the
LQR design method.
4.2
Hoo with Full State Feedback Design
As with the LQR method, the design goal is to have the open-
and closed-loop bandwidths be comparable.
For the H with full
state feedback method, the design parameter is p.
As a baseline
design, the values of p from the LQR design for System
2 are used.
and System
The value of p from the LQR design, the value of y,
and the closed-loop pole locations for System 1 and System 2 are:
System
1:
p = 0.000353
ym = 7.48
closed-loop poles:
j2.0895, - 2.7267, - 0.8354,- 0.6791
-7670,- 2.1601±+
System 2
p = 0.000448
Ymi= 30.43
closed-loop poles:
-8146,- 2.1586± j2.0828, - 2.7274, - 2.1905,- 1.9288
The open-loop zero locations for System I and System 2 are
±2.7130,±0.6783 and
2.7130,±1.9184, respectively.
We can then see
that four of the closed-loop poles are again almost canceling the
minimum phase and "mirror-image" nonminimum phase zeros of the
35
open-loop system.
pole.
4.3
Each system also has a large negative closed-loop
This corresponds to a high bandwidth in the frequency domain.
Hoo Closed-Loop
Simulation
Results
The H. with full state feedback closed-loop
system has the
form
x(t) = (A - BB'X(t)
(4.6)
+Ld(t), x(O)=
y(t) = Cx(t)
Again, we examine time and frequency responses of the closed-loop
system.
4.3.1
H
with Full State Feedback Time Response
As predicted from the closed-loop pole locations, and as shall
be seen in the following section, the H
with full state feedback
method does not give a closed-loop system whose bandwidth is
approximately that of the open-loop system.
However, it is
interesting to see the effects of the minimization properties of this
method on the time response.
Figure 4.1 indicates that the dual
inverted pendulum system is brought back to equilibrium from the
same initial conditions as for the LQR design, and again, System 2 has
a faster transient response than System 1.
Note however that the
necessary control to achieve this equilibrium condition is very large
36
'
I
I
1
I
1
1
.1
1
Sytem
.
I
§
.
.
.
1
.......... -............ --Syste m2...
.
i
I
0
1
Al
-
0
0
IE
. . .
_
.Of Ii
1..
:
4
Time (sec)
·
·
.. . .
.
1
2
6
·
·
I
.
- !
_.
.
.
7
8I
8
,
3
4
Time (sec)
5
6
7
I
I
I
I
I
·
·
r
0
:-:
5
. . .
I
!
r
:
3
,
i
9
\:
2
r-M
cam
c'I
0
-5
.......... :.....
\ /
I
.1¶ln
I
"0
1
'2
I
I
3
4
.
. .
. .
.. .
. . :
I
5
7
6
8
Time (sec)
l
x 10s
I
-------
I
I
£ 0
I
.
I
·
m
I........
0-1
-'5
c-
......... ...........
IlI
)II
0.005
0.01
...............
. .
I
I
0.015
0.02
. .
.
.
...
..................
...
. . .
..
I
0.025
..
.
.
..
..
..
..
II
.
.
..
.
..
.
.
.
.
.
.
.
. .
.
..
..
.
..
.
.
.
. .
II
0.03
0.035
0.04
0.045
0.05
Time (sec)
20U
us
z
100
.................
..... ........... ............ ... ........ ........... ........ .... ...........
0
0-
0
.i·
· · ··
I
-10 n
u
.0
1
2
3
I
I
4
5
_
I~~~~~~~~~~~~~~~~~~~~~~~~
7
6
Time (sec)
Figure 4.1
H. Time Response, x(O) = [1 0 0
37
0
0
0]
8
Compared to the LQR responses of Figure 3.2, the
in magnitude.
necessary control for the H design is much larger in magnitude
(over three thousand times larger initially), but the transients are
only slightly faster.
4.3.2
Response
Frequency
with Full State Feedback
H
Figure 4.2 shows the frequency response of the closed-loop
transfer function matrix, C(s)=[I+T(s)]-'T(s), where T(s)= G..(sI-A)-'B
is the loop transfer function matrix and G_..is the control gain matrix
As seen in Figure 4.2, the bandwidth of both System 1 and
of (4.3).
System 2 is approximately 2000 radians/sec, which is about 200
times higher than for the LQR design (Figure 3.3).
m_0
n
........
: ........ !.....
........
. I.....
-o~~~
..... .........
:. ........ !.....
:
au::,
=
.
.
.........
........
.
.
_
w
C
e
::
:
:
l:::,:
o . ·...
. . ·
o......
:
:*:::
~" i.i.
Systern
:........
-i
i,
^.
....
.........
.
.o
:_
: : : ...::::::...
.....
i i.......
ii.
...
....
.........
...
.........
.
.
...........
:
-::·
:
.....
-u
io
.
.......
.....
y
.......
:..
:
:
...........
.
........
:
:
.
:::
:..:..::::::..
.:...........
..
................
:
m:
:
::........
:
.........
..........
101
.
109
102
-Frequency
10 4
105
(rad/sec)
Figure 4.2 H. Complementary
Sensitivity
Varying the value of p in the H. with full state feedback
design method and finding the corresponding values of y,, does not
give closed-loop systems with significantly lower bandwidths.
next step is to add frequency weighting to the control.
38
The
4.4
Frequency
Weighting
Methodology
A simplified description of frequency weighting is that in the
frequency domain, the inverse of the weighting function acts as a
boundary.
This is indicated in Figure 4.3, where both the weighting
function and the resulting effect in the frequency domain are shown
[5].
II Wp II
j
co
, ..s~~~~~~~~~~~~i
Figure 4.3
Frequency Weighting
Function and Frequency Domain Result
For the frequency weighting method, when only the control is
weighted, the cost performance becomes
J = 2r
where
j[y'(-j)y(ji) +pu'(-jo)R(o)u(jw) -y 2d'(-jw)d(jco)]dow
R(w)=HH(-jo)H,(jw),
control, u(s)=H.(s)(.-pu(s)).
(4.7)
and H,(s) is the weighting function on the
The control weighting function is
expressed in state space form as H(s)=C,(sI-A)-'B,+D,
39
[7]
where
i(t) = Az(t)+ B.(4u(t))
where
(4.8)
u(t)= Cz(t)+D(Ju(t))
An augmented state space description
is formed which includes
the dynamics of the plant and the dynamics of the control weighting.
A.(t,
Ld(t)
4
ut)+ []
Ai~(t)(t) [vB
[ o
(4.9)
(4.[X(t)]
y(t)= [C
Let the subscript "a" represent the augmented state variables
and state space matrices.
The cost performance (4.7) then becomes,
in the time domain,
J = [x (t)Qx.(t) + 2x (t)Su(t)+u'(t)Ru(t)- y2d'(t)d(t)]dt
0
with QC
c
]?jS=[p
l
and R=[pDD.
(4.10)
Because of the cross-coupled term in the cost performance, the
control law, the modified algebraic Riccati equation, and the
Hamiltonian matrix change in form from Section 4.1.
The
appropriate equations for the frequency weighted H with full state
feedback method are:
control law: u(t) =-R-'[S'+BXj
]x .(t)
=-Gx o(t) =-G, z , (t ) - Gx(t)
40
(4.11)
modified algebraic Riccati equation:
XaAo+ AX + - a[
Hamiltonian matrix:
=0
(4.12)
BR'B
(4.13)
+S]R-[B
+
X S]R[B
X' + S] + )(2~~~~~j
XLLX
H=
Aa
11
-BR'S'
2LL:L-
-Q +SR-'S'
-A +SR-'B'
For the frequency weighted H design, the values of p from the
LQR designs are used, and the value of y is the minimum value for
which the following three conditions are satisfied:
(i) the eigenvalues
of the Hamiltonian matrix are just off the jw-axis, (ii) the matrix X0
is symmetric, positive definite, and (iii) the real parts of the
eigenvalues of Aa-BaR-'[B'Xa +S'] are less than zero.
weighted
H
The frequency
with full state feedback controller is implemented
shown in Figure 4.4.
d(t)
y(t)
i(t)
Figure 4.4
Frequency Weighted H. Implementation
41
as
4.5
Frequency Weighted Hoo Design
As mentioned in the previous section, in the frequency domain,
the inverse of the weighting function acts as a sort of boundary.
For
the first attempt to shape the frequency response of the H design to
decrease its bandwidth to that of the LQR design, the weighting
function of Figure 4.5 is added to the control of both System I and
System 2.
80 dB
0 dB
10
Figure 4.5
1
10 3
D
co
Preliminary H, Control Weighting
This weighting function gives a closed-loop bandwidth of
approximately 200 radians/sec.
The breakpoint frequencies and the
initial magnitude of the control weighting function are varied until a
weighting function is found that gives a lower bandwidth.
For the
final weighting functions for System 1 and System 2, shown in
Figures 4.6 and 4.7, the closed-loop bandwidth is approximately 20
radians/sec, closer to that of the LQR design than without the
weighting.
42
dB
11 dB
*
10
-69 dB
C)
. _
,.
_
10
-6.
Figure 4.7 Final H Control
Weighting, System 2
Figure 4.6 Final H Control
Weighting, System 1
Note that the initial magnitude of the weighting functions
above are approximately
equal to 20log(p). The values of p and y,
and the locations of the closed-loop poles for System 1 and System 2
are:
System
1
p = 0.000353
y7m= 4.38
closed-loop poles:
-294.5, - 4.9058+ jl 1.7000,- 11.7104+ j4.7911,
-2.7130, - 1.0337,- 0.6783
System 2
p = 0.000448
y,,,, = 18.51
closed-loop poles:
-214.2,- 4.3700 + jlO.4259,- 10.4565+ j4.2791,
-2.7130,- 2.2157, - 1.9184
Once again, there are closed-loop poles at locations of open-loop
zeros (-2.7130,-0.6783,-1.9184).
With the unweighted H_ design, there
43
were large negative closed-loop poles at -7670 and -8146 for System
1 and System 2, respectively,
and the bandwidth of the closed-loop
2000 radians/sec.
system was high, approximately
The addition of
frequency weighting has brought the poles in to -295 and -214, and
thus the bandwidth is smaller.
4.6
Frequency Weighted Hoo Closed-Loop
Simulation Results
The frequency
weighted closed-loop
I(t)= [A4 -BG. ]x.(t) +Ld(t)
y(t) = [C
=-jfB,
system has the form
G A_-.BG
(t) [0 d(t)
(4.14)
]x(t)
The time and frequency responses are shown in the next sections.
4.6.1
Frequency Weighted Hoo Time Response
Time responses for the frequency weighted
H. with full state
feedback design for System 1 and System 2 are shown in Figure 4.8.
The figure indicates that System 1 has a slightly faster transient
response than System 2, as is expected from the location of the
closed-loop poles, and System 2 experiences the largest perturbation
of the cart from equilibrium.
These time response characteristics are
opposite from what the system experienced for the LQR design
(Figure 3.2).
However, the responses of the rod angles are similar,
44
E
.o
o
0
4
Time (sec)
zu/
a
o .\
°
V0
IE
.
10
0
0.5
1
1.5
10
0
2
Time (sec)
2.5
!
o -
. . .. . . ..
3
3.5
44
!
...
. . .. .
. . . . . . .r
_e~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.5
2
4
2.5
3
3.5
0.5
1
Time (sec)
.20C I
s
|
w
s
*
r
w
I
I
s
i
A
Z
-
v
0
c.
C
00O
7
_
r
0
0.1
I
I
i
i
0.2
0.3
-
1!
-
0.4
.
-
...
-
-
-
..
i
i
0.5
0.6
Time (sec)
I
0.7
I
I
I
2
Time (sec)
2.5
3
_
i
Ii
0.8
0.9
_
_
1
I ..
z
C
. -
.-
I
-20(
1.
-
0
I
0
0
-20(I'0
!
I
0.5
Figure 4.8
I
I
1
1.5
Frequency Weighted H. Time Response,
x(O)=[1 0 0 0
0O
45
3.5
4
with the angle of the longer rod deviating more for System 2 than for
System 1.
Comparing the time responses of Figure 4.8 to those for
the unweighted design (Figure 4.1), we see that the frequency
weighted H design has faster transients, smaller perturbations, and
requires much less control.
Again, more time responses comparing
the LQR and frequency weighted H_ designs are discussed in Chapter
5.
4.6.2
Frequency
Weighted
H.
Frequency
Response
The frequency responses related to stability robustness and
disturbance rejection for the frequency weighted H. design are
shown in Figures 4.9, 4.10, and 4.11.
The complementary
sensitivity
plot, Figure 4.9, is the frequency response of the closed-loop transfer
where T(s)= G.(sI-A ,) -
function matrix, C(s) =[I+T(s)]-'T(s),
B. .
Notice
that the LQR complementary sensitivity plot of Figure 3.3 has a
similar shape near 10 radians/sec.
Figure 4.9 shows that the
bandwidth has been brought down to approximately 20 radians/sec
for both System 1 and System 2, and that the system can tolerate
.
. ..
.....
..
.
........
-50,
10°
101
102
10 3
lo'
Frequency (rad/sec)
Figure 4.9
Frequency Weighted H
46
Complementary
Sensitivity
multiplicative errors (modeling errors reflected to the plant input)
with
[E(jwt)]<
4
, for all
(peaks are less than 12dB_201og(4)).
The disturbance rejection plots of Figures 4.10 and 4.11 show
the frequency responses of the open-loop and closed-loop transfer
functions T,(s) and T(s) for System 1 and System 2. As with the
LQR designs (Figures 3.4 and 3.5), disturbance rejection performance
has been improved only for frequencies less than approximately 0.1
radians/sec.
Figures 4.10 and 4.11 also indicate that disturbances of
frequency less than approximately 20 radians/sec are amplified in
the closed-loop system.
II
I: I
20C I
!U
n
V
.(
to!
v_
.
I
:
.
-..
..
.
.
-.
I I 8
;...II.
7......... -.----.
_._
.-
-
...
...
_.
_
.
. . . . ..
.
.
~~~~~~~~~~~~~~~~~~~~~~
'
^....
...
.
.
'.
..
.
~~7:7:"
~
~
.
-
.....
.
03M
X
*
*
rr
.
101
lO
101
loO
lo'
3
Frequency (rad/sec)
System 2
AAI"~
ZWU
-· .....
-----
r
· ··
i
fi
0
0
-
-
lco
Se
:1"
: -
..- R
.
:
LI
I
Jli·
Iwy
l0e
Figure 4.10
E
.
.
.
-
-
.
; ::::
.
.. ..
:
:
.
.
.
:::
.i i
.... X..i.i..
:.. i..i.
. · · .i.i.!
.
:
' . . . ..........
~;~.
. 22::..............
-. .....................
~.~,."...
.
:~~
~ ...... ._2
.... ..':'"
...............
·.........
.
·
. _
' _
..
q_
..
..
·. -.....:..:. ........
.
.
-
;.
...........
"";,,.!.Y.!!.
. '. ..........
_.
. .
-2C
1
w
102
ala
System
. : :: :.
l
.
0
10
I
....
.
.
,
. ·
::... .
._
.
''.
.::::...............
.
.
........
,.,
.....
: ,....
.
.
.....
.1d
104
10
10'
Frequency (radsec)
102
3
10o
Frequency Weighted H Disturbance Rejection, Tr,,(s)
47
104
System
200
_
_
_______
:: :
_
:
_ _______
: : : : : ::I
_
:
.
_
:
.
1
· _·_·__
: : ' : : :I
. I : . . .:
wihtriH-ifiniityr
m
. .
*0
0
|
>
>
_
- .
.
.
.
"'
I...'
ii.....
;
·
,p ,o
: :::::~
y
-
::·
:w-g . eq,p
. . . .;
nrinr
:._ : : ..
C
CD
:e
.
cn
_-
7e
.
. '-L.:
(
10
10
10°
10 1
Frequency (rad/sec)
System 2
lo3
102
1 )4
m
0
0
CD
la
:11
M
cn
"-
;. .
: ;;:........
:::::
;;;;; ; ;
Z
:;: ::::;
.C
g
10
10 ' 1
101
100
10 3
102
10 4
Frequency (rad/sec)
Figure 4.11
Frequency Weighted
H_ Disturbance
Rejection,
Tf2 (s)
In the next chapter, the LQR and frequency weighted H_
designs are compared directly in the time and frequency
48
domains.
Chapter
Design
5
Comparisons
In this chapter, the LQR and frequency weighted H with full
state feedback designs for the dual inverted pendulum system are
compared.
The comparisons are done in both the time domain and
frequency domain, and a parameter
variation on the length of the
longer rod is also investigated.
5.1
Time Response
Figures 5.1 and 5.2 show the time responses for the two
designs for System 1 and System 2, respectively.
The figures show
that for the LQR designs, the states are perturbed from equilibrium
less than for the frequency weighted H designs, and the LQR designs
require a control that is smaller in magnitude. However, the
transients of the frequency weighted H design are faster. Time
responses for the controller designs for other initial conditions are
shown in Appendix D.
These plots exhibit the same perturbation and
transient response characteristics as mentioned above.
For some of
the responses of the frequency weighted H. closed-loop system, the
angle of the shorter rod may violate the approximation for small
angles used to determine the state space equations.
In fact, for some
initial conditions, the approximation is violated (note 0, in Figures
49
£
0
Time (sec)
is
Time (sec)
Co
s
0
1
2
3
Time (sec)
IM
luu
!
_.- ' _
!
!
4
!
6
5
!
!
!
_.......,
A
ILK)
-10
........ .......... .......... .....
,.~
-20Cg''''l
'0
..
:
0.1
1Uv
0.2
I
"
n
.
.
0.3
_
.
.
:
.
0.5
0.6
Time (sec)
I
I
:
0.7
0.8
I
0.9
1
I
::
.........................................................
...............................
.
I
-20C I
'0
.
0.4
I
10CI
........................................... ................
1
2
..
I
I
I
3
4
5
6
Time (sec)
Figure 5.1
Time Domain Comparison, System 1, x(O) =[1
50
0
0
0
0
0]
o
2
1
-'"0
3
Time (sec)
4
5
--.
·
I
I
0.
D
·
2C!
I
II
10
i
0
I
f I _-In
-
I
II
I
I
'C )I
1
2
3
Time (sec)
4
r
I
4
II
,
·
IVU
·
" "
"
"
5 _ ............................
'
0
-,
..
6
5
-·
!
I""
'
c'
6
............... ..................-
/
Or~..
0
I
I
1
2
-r
_
,.
_
._
.
!
!
3
4
. _
I
5
6
Time (sec)
20C1r
-
I
z
I
.
If
!
.
0
-5
00
------.--------.
...
/
AM
[
II
. . . . ...
. . . . . . . . ...
i
I
I
I
0.2
0.3
0.4
-
-
I
I
.
~~~~~~~~~~~~~~.
_
. . .......
_-
I
I
I
I
0.7
0.8
0.9
I
0
0.1
-
I
z
0
0.5
0.6
Time (sec)
1
\
I
.
-20C
I
.
- -- ·
.
fI
i.. ,
0
e·
1
2
3
4
5
6
Time (sec)
Figure 5.2
Time Domain Comparison, System 2, x(O)=[1
51
0
0
0
0
0]
D.3, D.9, and D.10).
Frequency Response
5.2
The first frequency response comparison is the complementary
The plot
sensitivity of the closed-loop systems, shown in Figure 5.3.
10
indicates that the bandwidth for the LQR design is approximately
radians/sec, and for the frequency weighted H. design, 20
"~
';'';';':~
'' "
System
50
u......
M
'
.·":............
...':'.'...
.··' :.·''.' ;......
:' ;;' ;':'.......
. ...............
" -,;;~~~~~~~~
. .....
:. .....
;;; '. ........
. ......
,. ,.;'.-... ~~~~~~~~~~
.
.....
........
·
C
.·
.
;.
...
..........
.
.~~~~
:::::'
..:::
.
-50
0
...... .
........
. .......
; ......... ........ ...... ......
~~~~~~~~~~~~~~~~~~~'
.,.....
.......... ................. ......
.
~
. ...
;....._...
. . .................
.
; :-
ra
'O
0
1
:;. ;;;
.
.....
..
. .......
.............................. .............. ...............
. ........
; ;' ;
· . . . .;_.::I
.
\
~~~..
~~~.
:: ::::· ·. .
.
.........
........
.::
; ;...;.........
; ; ; . ....;..........
.
::::
· · _< . : .::
t· ~i;:
~.. l : ._::A.....· :::::
--
. ........ ..
~
......
..
.
.
::::
. .
__
.......
CO)
.i~gs
.^
nii~
,
,
.
,
.
;
;
;
. ..
;;
.
,
;
:::
·
1
:
:
:
:::::~~~~~~~''
-r-1¥
,.0'
10''
o
10
102
101
lo
103
105
Frequency (rad/sec)
I
Arn
Y I
-
r· · · ··
...- r.
System 2
' .-.' """I......---.... ' ' ' ""'I
' ' """I
....--...
'.
.
' "'"I
.--...-.
.
...---.
m
r
i t·
·
.s
cn
i ·:·
· · · :··
· :·· :··
i :·:·:r
·
· · · · i · · i · i :·· i i i :· · · · :··
· :··
:·· r :····
·
,···
i· Y·i-: ,
-5 0
''':'':':':':::::''
''':''':'':':
':':':::
'''':''::''
Q'
4.
''''''''
. ···
)·u
uv
.-IA'
I
10'
100
101
102
10 3
10 4
Frequency (rad/sec)
Figure 5.3
Complementary Sensitivity Comparison
52
10l
radians/sec.
Both designs have roll-offs of 20dB/decade, although the
roll-off does not begin for the H
design until about 200 radians/sec.
The plot also indicates that the LQR designs can tolerate larger
multiplicative errors at the plant input.
Figures 5.4 and 5.5 show the disturbance rejection properties
for the closed-loop systems for both design methods.
The plots
indicate that the frequency weighted H designs amplify the
disturbances
less than the LQR designs for frequencies
approximately
3 radians/sec,
less than
but the LQR designs have better
disturbance rejection properties at frequencies higher than this.
For
both design methods, the disturbances are better rejected when they
appear on the longer rod.
Disturbance
fl
"J'
. : '.::: ....... ..........
..................
c
--
...
.........
weighliteH-Infinity
20
100
10
^00
_ ZVV
-
--
101
10
3
Frequency (rad/sec)
Disturbance f2
::1
::T""r
·
-·'·········r····i
co
lo2
·
-r"l
''-L'''5''"''·''·'
-·
·-·
'
'''''··r···r-·
·
i
"'T
-.
L
2
vv
nn
: :
101'
101
102
Frequency (rad/sec)
Figure 5.4
Disturbance
Rejection
53
Comparison,
System I
I
10
Disturbancefl
..
200"' : : :
.
:
:.. ::... ·:.....
:,
s ed
ij Infinity
: ..... .. ...
-weigM!
.........
2 0 0
*0
-200
10 '
100
10
....
102
103
Frequency (rad/sec)
Disturbance f2
.
o0
.......
.
: . ....... :.
.
o
.
.
.
_
..........
.__...............
..............,......................
; : : ;::!
on
.
......
.
.
............
.
.
t
;_ _.; :
;
..
........
:::1
.
o
,..o.·.o.o.o.o
...
o...
.
10 °
10'
o,
.......
.........
........
.
...............
:
. . . .
-
..
................
"
,.
.......
o
....
...
.....
...
,.....................;...;
,
..........
o.......
............
;:!....;...:...;..:...:...::;.
...
10 2
101
10 3
Frequency (rad/sec)
Figure 5.5
5.3
Disturbance
Rejection
Comparison,
System 2
Parameter Variation
For this comparison, the LQR and frequency weighted H,
controllers for System 1 and System 2 are kept the same, and the
length of the longer rod is varied.
It is then determined by how
much the length of the longer rod can vary from the value for which
the controllers were designed before the system again becomes
unstable.
The length of the longer rod is increased from half to twice the
length for which the controllers were designed, and the closed-loop
poles are recalculated for each length.
Figures 5.6 and 5.7 show the
locations of the closed-loop poles for the different lengths for System
54
1 and System 2, respectively.
The closed-loop poles marked with an
'x' are the closed-loop pole locations given for the two designs in
sections 3.2 and 4.5.
Noting the step size in the length for each plot
and the closed-loop pole locations, it can be seen that the LQR designs
allow for more variation in the length of the longer rod before the
system again becomes unstable.
The approximate percentages that
the length of longer rod can vary are:
System
1:
LQR Design: - 10%, + 12%
FrequencyWeightedH. Design: - 0.4%, + 2.4%
System 2
LQR Design: - 6%, + 10%
FrequencyWeightedH, Design: - 0.6%, + 2.7%
Note that while the LQR design allows for more variation in the
length of the longer rod for System 1, the frequency weighted H_
design allows for more variation for System 2.
The properties
of the two design methods shown in these
comparisons are discussed again in the next chapter as part of the
conclusions.
55
Cloed-Loop Poles, LQR Design
it.^
lII
. . . . . .. . . .
I
................
.
.
I
.
.. .....
I·
............
..........
.....
ll · -
...........
............
..
........
. ...
Ii
...
..
......
xi
.
....
.
.
.
.....
.............
.......
$ystemi
...
. ...........
.......... ...
1
. . . . . . . ·3:..:_:,.
. "'.
...........
............
... .
F
. .....
.
........I
_
... ....
...
.................
.
.
. .
...
.......
...........
. . .
.
.
.. . . . . . . . . . . . . . . . . . . . . . .
.
.................
...
mn
-Nu
-2
-;4
0
.
on15
10
2
Closedop
·..........................
.
4
Real Axis
6
8
10
Pois, FrequencyWeighted H-nfinity Design
.
.
...............
..
....
....
.. .....
.
11...................:
..........
..................................................................................... .............
:.
5
.
I
.~~~
.'_
.........
.
I\
I
x
.......
I
.........
. ...........
...
. . ..... . . . ......
. .. .
......
. . ... ....
.~~~~~~~x
.y tvl ~~~~~~~i"=~..........
i
12
a .....
-6
·.
·.
.......
.
...
·...........
...
.
.....
,.....····
·
......
..................
.............:.............
.............
.~~~~~~~~~~~~·
· · · · · · · x;·
. . -
..
.
. · ·.....
. e.dz@oo
·· · ·
-10
.......
.... ...........
-15
1
.
m
.
-Is
~..........
I
-10
...
.........
.
.
-5
0
I
. .. .........
........................
.*
I
I
5
I
10
I
15
20
Real Axis
Figure 5.6
Parameter Variation Comparison, System 1
56
Closed-Loop Poles, LQR Design
l..
1X1
.:. .
..
. . . . .. . . .
.
.
.
.
.
X
.
.:.. . . . :
......
I
I
el
*ll
-,
-.
~~~~.
~~
0 ~~~~
-2
0
·
_·
.
....step size
System 2
2
4.
2
-0.01
6I
8
1
6
8
10
.
4
Real Axis
.
1:2
Closed-Loop Poles, FrequencyWeighted H-Infinity Design
*
..
.
.
...........
.
.
.
-.
0n,
15
x
...........................................
.......
...
10
5
jI
. . . .
. . .
.
.... .. .. .. .. . .. .. .. . . . . ... . . . .
0
.
. . . . . .
..
.
..
. . . .. . . . . . . . :. . . . . . .
'"Ix
-5
-15
MI
. . . . . . . ..
. . ..
XSystem2.
............
-10
. . . .
......... :'X....
. .
.
. - . ..
.
.
.
..
....................
..........
'
..
.
.
.
..
.
.
.
-.
.
..
.
.
.
.
.
.
.
...............
...
=
run
-10
-5
0
5
i
10
i
15
20
Real Axis
Figure 5.7
Parameter
Variation Comparison,
57
System 2
Chapter
6
Conclusions
for
and Suggestions
Future
Work
This chapter briefly summarizes the conclusions based on the
comparisons of Chapter 5, and gives recommendations for future
work.
6.1
Conclusions
The design of controllers for a system that was unstable with
nonminimum phase zeros was considered in this thesis.
design methods used to design the controllers
The two
for the dual inverted
pendulum system were the linear-quadratic regulator (LQR) method
and the H-Infinity (H_) with full state feedback method.
goal was to approximately
The design
maintain the open-loop bandwidth.
The
goal was met for both design methods, with the addition of
frequency weighting to the H_ method.
The LQR and frequency weighted H
closed-loop
systems were
compared in both the time and frequency domains, and in the
allowable variation of the length of the longer rod.
In the time
domain comparison, it was seen that for the LQR design, the state
variables experienced smaller perturbations from equilibrium, and
the required control was smaller in magnitude.
58
The frequency
weighted H design has faster transients, but for several initial
conditions of the system, may have or did violate the assumption for
small angles used to determine the state space representation.
For the frequency domain comparisons, both stability
robustness and disturbance rejection properties were considered.
From the stability robustness comparison, it was determined that the
LQR design could tolerate larger multiplicative errors at the plant
input.
The disturbance rejection comparisons showed that the
frequency weighted H design amplified the disturbances less than
the LQR design for frequencies less than approximately
3
radians/sec, but had poorer disturbance rejection properties at
frequencies higher than this.
The plots also indicated that the
closed-loop system better rejected disturbances which occurred on
the longer rod.
The final comparison involved using the controllers designed
by the two methods and varying the length of the longer rod until
the dual inverted pendulum system again became unstable.
The
greater possible variation in the length occurred for the controllers
designed by the LQR method.
Both the LQR design method and the frequency weighted H.
with full state feedback design methods were able to stabilize the
system.
The main tradeoffs of the two design methods are the
allowed sizes of the perturbations,
the speed at which equilibrium
is
achieved, the characteristics of the multiplicative error, the
frequency of the disturbance, and the error in measuring the length
of the longer rod.
59
6.2
Suggestions
for Future Work
In this thesis, it was assumed that the state variable of interest
was the position of the cart.
Because the perturbations of the angles
of the rods were sometimes quite large, it might prove beneficial to
include these state variables (or possibly all of the state variables) in
the cost performance equations, or investigate different methods of
selecting the weighting matrices, such as the Bryson method [7] or
high state weighting [6].
introduced to the system.
Control torques on the rods might also be
In this thesis, it was also assumed that all
of the states could be measured accurately.
Thus, another suggestion
for future work is to design controllers for the dual inverted
pendulum system using methods which do not assume full state
feedback, such as the Linear-Quadratic
H,-Optimization
method.
Gaussian (LQG) method or the
A final suggestion is to actually build and
control a dual inverted pendulum system.
60
Appendix
State
A
Space Representation
This appendix shows the development of the state space
equations,
(t) = Aix(t)+Bdu(t)+ Ld(t), 8y(t)=C6x(t), in continuous time,
for the dual inverted pendulum system of Figure 2.1, shown again in
Figure A.1.
The state space equations are derived from the nonlinear
dynamic equations which describe the system by establishing the
steady-state equilibrium conditions, defining the perturbations about
this equilibrium point, introducing the perturbations into the
nonlinear equations, and then retaining only the linear terms 15].
fo,(t)
Figure A.1
m 2 '2e 2
The Dual Inverted Pendulum System
61
First, define the following vectors:
&z(t)
8 (t)
861 (t)
x(t) =
6@(t)
602 (t)
86 2 (t),
perturbedcart position(m)
perturbed cart velocity(m / s)
perturbedangular positionof the shorterrod (rad)
perturbed angularvelocityof the shorter rod (rad / s)
perturbed angularpositionof the longerrod (rad)
perturbed angularvelocityof the longerrod (rad / s)
6u(t) =[Sf(t)]
perturbedcontrol force (N)
Sd(t)=[6Sf(t)
perturbeddisturbanceforce on the shorter rod (N)
perturbeddisturbanceforce on the longer rod (N)
Dynamic principles are then applied to Figures A.2 and A.3 to
obtain the nonlinear equations, with M = 2nl,, M2 = 2rm
2 2, a = , w = 6,
and a= .
The pendulums are modeled as thin rods with moments of
inertia about their center of mass equal to
18].
(mass)(length)2
3
f 2 (t) m2
Figure A.2 Diagram for Force
Figure A.3 Diagram
Equation
for Moment
Equations
62
2
The nonlinear equations which describe the behavior of the
system are:
- F=ma;
f(t)+ fi(t)+ f2(t)=
(M + M + M 2 )Z + (Mll cos6l )
l
+ (M212 cos 02)62- (Mll sin 01)02 - (M2 2 sin 02)22
(A.1)
+,CwMo=Ia;
4
+wXMo:
Mlgll sin 01- (Mll cosO,)i + 21,cos Of)(t ) = 3 MIl
+clwMo:
M2g 2 sin
-(M21os 02)
+ 212cos 2f 2(t) =
M2
In Figure A.2 and in (A.1), a,l,- 6j,l and a 2 12
- 6212
normal accelerations,
and wI
tangential accelerations.
M2i = M2a represent
-,2l,
and w212-l
(A.2)
2
represent
212 represent
the
the
In Figure A.3 and in (A.2), M=M~a
and
the inertial forces.
i(t) = + &(t),
1(t) = 01o + S01(t),02()=
020 + 602(t),
+
3(t),(t), 82()=
1,(t) = 06o+
2(t) = 82
2 +
Define the perturbations to be:
(t) =
2(),
+ 02(),
+ 3661t),
t) 62(1
2(= =, 62. +
f(t) = f + f (t),
fi(t)= fio + f(t), f 2(t) =f 2o +3f 2(t)
zo =0 =
and let the equilibrium conditions
be:
0
620 = 0
fo=fo =
63
810
= 0,
20 =,20 =0
f 2o
0=
Insert the perturbations into the dynamic equations,
assuming
6 is small, substitute sine-
and cos-
and
1. Keep only the
linear terms of the equations:
f (t) = (M + M, + M2 )'8(t) + M,111 l (t) + M212862 () - ff, (t) - Sf 2 (t)
Mjgl461 (t) - Ml4&(t) + 248f, (t) =
Ml26,
1
3
(t)
(A.3)
M2g12882(t)- M2 25z(t) + 212,f2 (t) = 3M 2 8260
2(t)
Solve for 8&(t), 86,(t), and 682(t), letting Z = 4M M+ + M 2:
A
4 f(t=
3M g 6(t
3M2g
(_2(t)
2
4Zl
802(t
=
-3(t)
+M
8f (t) 4Z12602 +
Z1 2
+ Z)
2M,11Z
3
82( +3(M
29Mg
4Z1, 1
3g(Z + 3M 2)
3g(Z + 3M)
(t) 6S-3f
-38f(t)+
3(Z+3M)(t)
ZI
2
4Z1 2
+
2 (0+-8 1 ()+
4Z1 2
2Z1 2
3
(t+-f
2(t)
2Z1,
3(M2 + Z)
2M 21 2 Z
8f2
(A.4)
From (A.4) and the definitions of
x(t),
u(t), and
d(t), the state
space representation becomes:
0
1
0 0
00
0
0
-3M g
z
0
1
0 0 3g(Z+3M)
0
o
0
-3M
0
4
-2
-2
z
z
z
0
0
0
0
0
0
0
0
4Z1 1
0 0
0
z
(1) =
00
0
x(t) + -3 '6u( + 3(M, + Z)
4ZAL
0
0
1
zi"
2M,I,Z
2Z,
o
0
0
9M,g
3g(Z + 3M2)
-3
3
4
47I2
_
3(M 2 + Z)
A]
2Z12
2M2 2
2
-32
64
d(tl)
3
-
(A.5)
Because the concern is in controlling the position of the cart, the
output vector is:
y(t) = [1 0
0 0 0 O]6x(t)
(A.6)
Numerical values for the state equation matrices for the two
configurations
considered in this thesis, System 1 and System 2, are
included in Appendix B.
65
Appendix
B
Open-Loop Poles and Zeros
In this appendix, the open-loop poles and zeros are found in
terms of the system parameters for the following transfer functions:
the control, u, to the cart position, y, T,(s); the disturbance
shorter rod, f , to the cart position, T,(s);
longer rod f 2 to the cart position, T,y(s).
on the
and the disturbance
on the
Their locations for both
System 1 and System 2 are given, as well as the numerical values for
the state space matrices of Chapter 2 and Appendix A.
Because the locations of the open-loop poles are dependent
only on the A matrix, all three transfer functions have the same
The open-loop zeros from u to y are found from the transfer
poles.
function
C(sI-A) 1-B, and the open-loop zeros from f, and f2 to y are
found from C(sI-A)-L
and C(sI-A)'L
2,
disturbance matrix L rewritten as L=[4
respectively, with the
L4]. Each of these transfer
functions is SISO, therefore, the poles are the roots of the
denominator
and the zeros are the roots of the numerator.
To simplify the transfer function equations, the state space
matrices are rewritten with variables representing some of the
entries.
The matrices and their representations are as follows:
66
0
0
o
0
0
-3M,g
0
-3M 2 g
z
0
1
0
0
9M 2g
4ZA
0
1
0
0
0 0 3g(Z+ 3M,) 0
4ZA
00
0
0
0
1
0 0
9Mg
0
3g(Z+3M 2 )
0
4Z1 2
0O
4
Z
O
-O
I'
0O
4ZI2
O
10
0
O
O A
O BO
0 0O
00 X
0 0O
O
0
0
-2
-2
Z
z
0
0
3
2ZI,
0
A
O0D
E
O
0
O
'0
O
00
00
A
ZA
O
3(M, + Z)
2MIIZ
H-
0
0
-3
3
3(M2 + Z)
-
2 l2
212
0-
100
010
O
-3
2M
O
O
Z
(B.1)
_
The transfer functions can be expressed as:
-BX)
+n(AA
- A9)
+A(BE
+ r(x -+ EA)
- rx)
+Bn- rS2(S4
s4r
s + 2(AA
(X4 - EA))
_ s2 (X + 4)
T,( _s)=
Trfi}Y
Tf1,
(s) =
s48 + s2(A + B - Od>-OX)+ 8(X s2(s 4 _ S2(X +)+
) + (BE- Ad) + E(A - BX)
(XO- _ EA))
s4T+ s(An+B - O+- X)+ (X~-EA)+ (BE- A¢)+
S2(S4_ s2(X + .)+
(X.-
EA))
-BX)
)(AA
(B.2)
67
which can be rewritten in terms of the system parameters as:
S4 4)+
T,(s)
1
38)+9(
2
z
2 2-X)(s
2-Y)
s (s
S4 - 2+S2 -3g
Z
1Z
Tf, (s)
2
s (S
-
4-2
Tf, (s)
-3
2
2
Z
2
2
_y)
3g'
9
g2
24( 4 l2Z)
-2Z
w
4 1l 2 Z)
212 Z
_X)(S
3
+9i g
3
s2(s2_ X)(s 2 -Y)
where
3( g
M = 24~,
Z
+3M,
Z3M 2
M2 = 2n 212, and
3
g
Z = 4M + M, + M 2.
3M+, Z +
2
+3 6
M
(B.3)
From the equations of (B.3), the open-loop poles and zeros are
found to be:
open-loop poles:
zeros of T,(s):
zeros of T,(s):
0,0, ± XI,± 'Y
g
±_3g±j
3g
4
21
68
(
zeros of T,(s):
'± 1
2)
Notice that the transfer functions share some of the same zero
locations, and that two of the zeros of the transfer functions from the
disturbances to the cart position are complex.
The state space matrices and the open-loop pole and zero
locations of the dual inverted pendulum system are given for the
following constants and parameter values:
g = 9.81 m I s2, the acceleration of gravity
M =5 kg, the massof the cart
m, = m = 0.1 kg / m, the mass per unit length of each rod
Ml = 2mrl, the mass of the shorter rod
M2 = 2nml2, the mass of the longer rod
Z=4 M
+
SYSTEM1:
'01
&(t)=
+M2
=lm,2 =16m:
0
0
0
0'
0
0.1709
0 0 -0.2516
0 -4.0263
0
00
0
1
0
0
7.5492
0
3.0197
0
0
0
0
1
0.0118
0
0.6488
0
O 0
00
0 0
open-loop poles:
6x(t) +
0
zeros of Tf,(s):
0.6783,±j3.8368
zeros of Tf2 ,(s):
2.7130, jO.9592
69
0
-0.0855 -0.0855
0
0
7.5641
0.0641
0
0
0
-0.0080
0.0040
0.0333
-0.1282
0, 0, ± 2.7485,+ 0.8022
zeros of T,y(s): 2.7130,±0.6783
0
8u(t)+
ad(t)
SYSTEM2: I, =lm,1 2 =2m:
-
0
0 0 -0.2858
00
0
0 0
00
7.5749
0
0
0
0 -0.5717
1
0
0 0.4288
0
0
0 0
0.1072
0
1
55:(t) =
open-loop poles:
zeros of T(s):
zeros of T,y(s):
3.8946
O
0
0.1942
I
0
0
-0.0971 -0.0971
0
0
0
x(t)+
Su(t) +
0
-0.1456
7.5728
1
0
0
0
-0.0728
0.0364
0,0, ± 2.7545,+ 1.9703
±2.7130, + 1.9184
1.9184,±j3.8368
zeros of Tfy (s): +2.7130,± j2.7130
70
0
0
Sd(t)
0.0728
0
1.9114
Appendix
C
Controllability
and
Observability
In this appendix, the controllability and observability
properties of the dual inverted pendulum system are examined using
the controllability and observability matrices, written in terms of the
system parameters.
The loss of controllability or observability
because of a pole/zero cancellation is also discussed.
Finally, the
system parameter relationships which cause a pole/zero cancellation
are determined.
A constant coefficient linear system is completely controllable
if and only if the matrix
(C. 1)
Mc,=[B AB A2B . A-'B]
has rank n, where x(t) e ".
A constant coefficient linear system is
completely observable if and only if the matrix
Mo=[C' A'C' (A 2)'C' ... (A"-')'C']
(C.2)
has rank n [9].
For the dual inverted pendulum system, the Mc and Mo
matrices are:
71
4
I0
z
4
OaOd
a=Z(l +4
OdO
ObO e
44Z 2 =
a
Z
-3
0
-3
bOeO
0
-3
0
-3
c
0
-4z
f
O c
4z
f
0
-9
44Z2-(
'
1)2
M2 + 3M,
1
(Z
d 27 2 (M(Z + 3M) + M2(Z + 3M2 ) +6MM
4Z'
l
11
)
11'
e -27g2 ((Z + 3M(Z+ 3M( + 6M) + 3M(Z +3M))
-27g2 ((z+3M, )2 '
f= 164Z 3
3M,(Z+6M 2) 3M,(Z+.3M,))
14
+
+
(C.3)
'1
0
0
0
0
1
0
0
0
0
MO =
0
0
+3
-9M(Z
0 -3Mg
0
0
+3M2
MM,
0
z
O
0
-3 0Mg
4Z
-9M2g 2
4Z 2
Z
0
-9Mig2
z
o 0 -3M 2 g
0
0
Z+3M2
l
12
3M
-9Mg2 (Z +M3M2 3M,
0
Z
Z + 3MI i 3M21
)
1,
3M 2 g
2
4Z2
,)
12
(C.4)
For l, *24, rank(Mc)=6 and rank(MO)=6, and thus the dual
inverted pendulum system is both controllable and observable (by
definition,
as mentioned in Chapter 2, we should actually state that
the system is stabilizable and detectable).
When the rods of the system are equal in length, that is, for
l=
I = 1, rank(Mc) = rank(M) = 4.
The system is then both
uncontrollable and unobservable.
Upon careful examination of the
matrix of (C.3), it is found that the
5
72
column of Mc is
3g (Z+3M + 3M2 ) times greater than the 3' column of M c. This
41Z
also holds between the 6"' and 4 columns of M,, and the
relationship
5"
and 6" and 4", columns of Mo. This explains the loss in
and 3,
rank by two for the Mc and Mo matrices.
Note that the multiplying
factor is expressed in terms of M1, M2, and Z. The loss of
controllability
and observability
is found to be dependent only upon
the lengths of the rods, not their masses.
A system can also lose controllability or observability because
of a pole/zero cancellation.
For such a loss, not only do the pole and
zero have to have the same numerical value, but their "directions"
The pole and zero locations and their "directions"
have to be related.
are defined as follows:
definition of a pole,
,: w(,I
- A) = O' or (,l-
A)v, =O
with w or vk representing the "direction" of the pole
definition of a zero, z:
(z
-
A)¢,k-Buk
representing
=0,Ck
l7(zI
,l- A) - yC = O', irB = O' or
=O,
with ri/ and y or ¢, and u,
A loss in controllability
due to a pole/zero cancellation
A, = zk and rl = wk. Then yC=O' and wB=O'.
and
(C.6)
the "direction" of the zero
k"' mode is uncontrollable.
(C.5)
occurs if
The latter implies the
A loss in observability occurs if A, = z,
, =Pvk. Then Bu, =Q and Cv, =Q, the latter implying that the k'
mode is unobservable
[5].
73
As shown in Figure 2.5, and again in Figure C.1, when the
lengths of the rods are equal, l = = lm,
cancellations
there are pole/zero
at +2.7130.
Length of Shorter Rod, II1,Equals 1
_Q 1!
5..xo.
xe .........
m x ..........o
ox
:
x ...........................
..............................
XO
X
OX
)O0
X)o
XO
X)
xo
' c
-
X
ox:
:XO
X
OX:
o(
xo
X
ox
0(
:
0
:
o(
o
:
xo
X
Ox
oc
xo
:
~0)~0
xo
X
X
oxCO
OC
oc
Xo.
)a
;3
s)o
:x
o
x
-2
-1
0
1
oC
0C
2
3
Real Axis
Figure C.1
Open-Loop Pole and Zero Locations as the Length
of the Longer Rod, 12, is Decreased
Even though it was shown that the system is uncontrollable
and unobservable for rods of equal length from determining the
ranks of the Mc and M matrices, we examine these properties from
the viewpoint of the pole/zero cancellations.
For
, = z = +2.7130,
0
w= [O 0 -0.6635 -0.2446 0.6635 0.2446]=-ir/
0
0.2446
and v, =
0.6635
-0.2446
-0.6635
74
=¢,
and for Ak = zk = -2 . 7 1 3 0 ,
0
0
w =[O 0 0.6635 -0.2446
-0.6635 0.2446]=
and v,=
0.2446
-0.6635 =¢,
-0.2446
0.6635
also imply that the system is both
Thus, these pole/zero cancellations
uncontrollable
and unobservable.
It has been shown that when the lengths of the rods are equal,
the system loses both controllability
We now
and observability.
determine if there are any other system parameter relationships that
cause a pole/zero cancellation.
found to be 0,0, +X +, ±
Recall that the pole locations were
where
, Y=1 g Z+3M, Z + 3M
()[
Z +3M-
Z+ 3M2
+3 6 (MM2j
(C.7)
and the zero locations were ±
,
Rewrite (C.7) as X, Y = 3
a
g± .
3
We then want to find the relationships
such that
75
(C.8)
and (C.8) as
fi, + -
of the system parameters
(1) X3=3(g8
3
=y
(2) X= (ga+g3(K/i=(
8 Z
8(Z
(C.9)
(3) Y 3(9)
3 ga_3
(4) Y=j()a-43
g
There are four possible combinations of these equations:
2Z
(i) Adding equations (1) and (3) gives a= 21 , and adding equations
2Z
(2) and (4) gives a=
.
This implies that
, =12 gives a pole and
zero at the same location.
(ii) Adding equations
Substituting
zz
II
(1) and (4), or (2) and (3), gives a= -+ -.
for a gives the equation 3M + 3M2 = 0.
Recalling
that M = 2nml and M2 = 2m12, the solution is m =-m 2.
(iii) Equation (2) minus equation (3) gives 3=
minus (4) gives 3
y-8.
to each other gives
-,
Setting these equations equal
which implies 1,= 12.
1
4
(iv) Equation
- y, and (1)
12
(1) minus equation (3), and (2) minus (4), both give
3(z@ =0.
This indicates that if the system parameters are
chosen such that
[Z + 3M
Z+
12
76
there is a
1112
pole/zero cancellation.
The only relationship
pole/zero cancellation
is
of the system parameters that gives a
=12. The solutions to both (ii) and (iv)
imply that some of the system parameters would have to be negative
or imaginary.
controllability
Thus, the dual inverted pendulum system loses
and observability
only when the lengths of the rods
are equal, and it can not lose just controllability or just observability.
77
Appendix
Additional
D
Time
Responses
This appendix shows the closed-loop time responses for various
initial conditions of System 1 and System 2 (again, no disturbances
Each plot shows the cart position,
are assumed to act on the system).
rod angles, and required controls of both the LQR design and the
frequency weighted H with full state feedback design.
For most of the initial conditions, the cart position and rod
angles behave similarly for both the LQR and frequency weighted
H.
designs, with the H design having faster transients and larger
perturbations.
In Figures D.5, D.7, and D.8 however, the time
responses do not behave in this manner.
For these initial conditions,
the H design still has the larger perturbations, but the transient
times are almost equal.
Also, the initial control is positive for the
LQR design (initially pushing the cart), while for the H. design, the
initial control is negative (initially pulling the cart), thus causing the
opposite behavior in the state variable responses.
For some of the initial conditions, the assumption for small
angles used in Appendix A to find the state space representation is
violated for the H_ design (note the angle of the shorter rod, 0,, in
Figures D.3, D.9, and D.10).
78
0. I
y.,
E
!I
!
I
I
\
~~~~~~~~"I
,a ,'
0
0
§I
0
I
2
1
I
3
Time (sec)
I
I
4
5
6
%1
0
6
Time (sec)
0.5
0
-1r
0
/
cu
_n
~I _ II-
fl
L·l
-Vo
0
200
2
1
3
Time (sec)
4
C
I
I
100
I
I
'
''
'' I
'''''
·I''
. .....).'
a
=
:
-
~
Po'
'
-
-i
_ -
_
...........I........ -
. ...
... ... . . . . . . .. . . .. . . . .. .
O
6
5
----
_1
-'"0
0.1
200.
Z
2
z
m
00
O
,1
."o
-In
0.2
0.3
0.4
..
,
1
0.5
0.6
Time (sec)
0.7
I
I
I
2
3
4
0.8
0.9
5
6
Time (sec)
Figure D.1
Time Response, System 1, x(O) = [0
79
0
1
0
11
0
0]
A
E
go
0.
9
8
Time (sec)
I
LJ
-
I
I
0
M
I
I
I
I
3
Time (sec)
4
5
I
I
I
I
I
4
5
I
v
-10
. ...
. . . ....
..
I
.......
......
I
1
-2(
..
. o ..
.......:............
.....
I~~~~~~~~~~
'o
2
1
-·9.
· ·rr ·-r rr rr·- ----·--·-
I
O
..
/·
-5
/
I - I ' ' ' ':. . . . .. .·
..... ......... :....
. . . . . . . .
-1n
vCI
2
1
in%
u]f1rn
_
-
'eu
I
I
-.-
1%
1%
m~
6
3
Time (sec)
I
I
-
l
"
-
-
~ ~
-
-
l
6
I
I
.
.1
.
-
-
-
-
.-
.-
.-
..-
- .
.
.
-.
.
.-..
.
.
.
.
.
.
.
.
.
.
.
.
-
-
-
A
lb~n
. /
N
- ,
I
I
I
I
0.1
D
0.2
I
I
I
0.3
0.4
m
I
1
II
0.5
I
mI
i
0.6
0.7
0.8
0.9
1
Time (sec)
;J^
'uU
I
I
I
!
·
-.·I
I
2
3
4
5
I
C5
_9
0
9
0
I
___
,
!
_rAnI.I·
··
-""0
1
·
6
Time (sec)
Figure D.2
Time Response, System 2, x(0)= [0
80
0
1'
0
0
0]
E
.[0
2
' -'
............
3
20
0
2
3 e
;5
4
6
Time (sec)
1
I
0
-1
Time (sec)
10
. ~~~~ ................................
i
0
.
.......................................................
.
.........
~Z.L~,.I
!...\
1O
· · · · ·.
-0o
2
1
I
I
!
3
4
5
6
Time (sec)
2000
A
I
I.
'Z
c
8 -200C
I
I
!!
c
!
-
-
-~~~
I
I
D
...
I
i
...
....
'
'
"
.
·
·
·
0.2
0.3
0.4
.........
. ....
:........
. . . . . . . . . . . . . . . . . .
:
~~~~~~:
.. . . .
.. .. . . .. .. . .:.:
a
.I
'
'
'
'
'·
I
*
0.6
.0.5
Time (sec)
I
I
_·
a.
·
.....
I._
0.7
0.8
0.9
I
1
I
r\
0
I
a-
...
a
''
C)1
2000
... ....
a
i ..............
0.1
AvMn
z
I
!
r ._!
9 -2000
c.
\
.:..............
:.............
.. .
.
.
.
.
.
.
.
I~~~~~~~~~~~~~~
-Annn
CII
Figure D.3
1
·
·
·
2
3
Time (sec)
4
Time response, System 1, x(O) = [0
81
6
5
O
O
1
o]
E
c
.2
0
o0.
,
2u
....
I
r
I
i
I
I
:.
. .. .. .. . . . . .. . . . .
I
I
I
1
2
3
Time (sec)
4
5
I
I
I
I
I
I
I
a
a
aa
1
2
4
5
- 20 1'- . .. . . . :
',
-3n
-%C
:)
Time (sec)
-
20
6
0
cq
as
a'
.
fuJil
--
3
6
Time (sec)
~ J"U
A I I
'VV
-
0
/:,I
I
I
I
I
I
..
I
I
A
:!
.
,:'
-..
o
~~~-
--
-
:a:
a
'
_ ,
o)
-5C
0
·-
0.2
0.3
…
-
...
I
0.1
-
-
w
d~.i.
l
)
·
-
0.4
0.5
0.6
Time (sec)
,
_
!
0.7
0.8
0.9
1
50C1
I
Z
..l
I
\
0
II
I
-nn
C)
Figure D.4
1
,
2
a
,
3
Time (sec)
4
Time Response, System 2, x(O)=[0
82
5
O
O
O
6
1
0]
E
§
0
0
0
a.
II
Time (sec)
1
1C!Iu
-
1
......
0
'
·
·
I
I
_.__
/I
-10 F .... %../ ....... :................
·- ·.........
I
-Or
-'o
I
I
.: . . . . . . . . . . . . .
I
I
I
1
2
I
3
Time (sec)
.:................ :...............I
II
4
5
--
-
6
6
Time (sec)
I
zw
00
-
.!
I
I
I
....
I
.
I
I!
..................
-200 ................... .......... ....... .......... ........... .......... E...................
£Z
0
m
0.1
0.2
0.3
0.4
0.5
0.6
Time (sec)
0.7
........
0.9
0.8
1I
E.
200
,
'E
o-
200
Ann
.0
1
2
3
4
6
5
Time (sec)
Figure D.5
Time Response,
System
83
1, x(O) = [I
-
0
-1
0]
6
Time (sec)
..
=0 i,......
-500
1
2
1
2
3
Time (sec)
4
5
E6
3
4
5
C6
/'20
I
0
Time (sec)
_
.
U
1000
'' .w !!
:_
:
!
Time !(see)
0.4
0.5
! ' '~~~~~~~~~~~~~~~~~~~~~~~~~~
d row~~~~~~~~~~~~~~~~~~
0
0
z
0.2
0.1
0.3
0.6
0.7
0.8
0.9
_9
I
fWN
I
I
I
I
I
I
, -1-
'In
I
'I
-l'00C I 0
0
Figure D.6
1
I,
!
i
!
2
3
Time (sec)
4
5
Time Response, System 2, x(0)=[1
84
o -
--1
6
o]
E
C
0
Time (sec)
rA
1U
!
3
-
~ ~r.......................
/,.
O
-10
. . A
./
. I ..
..
..
..
.. .
. ..
..
..
.
.
.;
.
. ..
.
.
. ..
.
a
..
. ;.
e-
I
-
.. . . .. . . . . .. . : . . .. . . . . .. .''. ''. .. .:...............
-
I
f-I
0
-.
2
1
I
1
IN
.
. ._ . . . . . . .
~~~~~~~~~~~~~.
:
,
CY
,
-1
-'o
-q fl
3
Time (sec)
. . . . . . . . ._. . -. . . . :. . .
; _. ..
. . .
4
5
·
·
I
.,
:
L::.
. .
i
i
1
2
6
. . . . . .
.
. . . .:. . . .
i
i
Ii
3
Time (sec)
4
5
.
. . . . . .
.
6
Time (sec)
10C II.vi
t
0-
v
I
I\
I
I!
I
I
I
I
;
;
;
2
3
Time (sec)
4
f
z
0
o
I'
%
II
\/ ;
-1rC I11
'0
0
Figure D.7
1
Time Response, System 1, x(0) =[1
85
I
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6
5
0
1
0
-1
0]
2
!
E
................
:
'.................... .. .. ..........R....... ...............
a.
0
1
ted
_-nfin
.-
O ............... .............
2
3
4
5
I
I
6
Time (sec)
%on
I
I
I
·r
Yi
.
\
'5-20
.....
.......................
...
_nf
I
)
1
. . . . . . ..
l
'~~~~~~
!
!
2
1
-:.
.: . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . .
.
.
.
II~~~~~~~~~~~~~~~~~~~~~
I
I
!
3
4
5
I
I
6
Time (sec)
II
I
I
I
./.~
- 0
cY
Is-10 -... .... /..
' ''. . . . . . .. . . '. .
-.
4
5
. .
. . .
. . .
-d
-Of
I
-&%O
I
I
I
1
2
3
6
Time (sec)
50 I
-
I
,f
I
A
':
--
I
_
_
..
I
I
/
-50cI
....
. .,
:
o
:
:
:
0.1
0.2
I
I
..
i.
.
'~,,'/'("-'
I
.
.:
C
I
·
.-...
_
...
_
....
.
·-_
-_
-
.
:
-
-_
:
u
0
0.4
0.3
.
0.5
0.6
0.7
0.9
0.8
Time (sec)
I~~
50O$
Z
z
II
C i
F
-
o
I
t_!
--IYiYlY
--- 0
I
I
I
I
I
1
2
3
4
5
-
6
I
Time (sec)
Figure D.8
Time Response, System 2, x(0)=[
86
O 1' 0
-
O]
10
E
!
5
I
,.
!
................
_
_:
0
...
/....
l
..
'
. ......
.-. ......-...
-.
-.-....
_.
!
.
.......
. . . .... ........
..-._
CI··-i·-
.
-·-·-
0a
I
I
I
I
I
1
2
3
4
5
!
I
m~
o0
6
Time (sec)
lroFII
I
I
I
'
:
I
-
'Id
0
-
__
-
LQR
...
- weighted H-Infinity
-
1a
'U
.Onn
--v0
--
:
I
;
1
2
.
;
I
4
3
6
5
Time (sec)
'
CJ
U
..
--
.
'_
Ill
-'o
2
1
i
4
3
6
5
Time (sec)
500
us
,_
_
I
*
C
c
0
-1
.
_
I
I
-!
_
_
_
_
_
%
_
.
,
/
_
...
:,e
ii
V
0
U
I
/I
.
.
_
r
r
_
_
-
---
.
I
-rv,0
I
I
I
I
0.1
0.2
0.3
0.4
_2
I
I
0.5
0.6
Time (sec)
I
I
I
0.7
0.8
0.9
5
0
5000
I
i
I.
---- 0
Figure D.9
1
2
3
Time (sec)
Time Response, System 1, x(O)= [I
87
4
5
0
-1
0
6
1
0]
C
c
0
a.
Time (sec)
IrNF
BIAM
--
-
b
I-
*--
0
/
I\
....
· ~,.~
~_........
I
.tITIN
i
I
v *
*
I
z
I
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s
1
2
3
Time (sec)
4
5
I
I
I
!
I
6
,,
ou
-
I
N
0
I v
\
IE
/
k /
· in
I
.
I
--
..
I
*.
5u
-- 0
2
1
4
3
Time (sec)
5
6
0%0%.%^
wIL'
I
I
-
I
In L
.I
·*
.
..
I
I
I
.
-
.
'
-..
.
-
-
..
m
/
W
:
j~~~~~~~:
0.1
__
:
0.2
I
:
:
0.3
0.4
:
:
:
0.8
0.9
I
I
Ia
I
I
I
lU
-"0LV
:
:
0-J----
I
..
.
0.5
0.6
Time (sec)
0.7
1
I&A
20C IF1
N
A
Z
-
-
,
5
0
i"
0
-200
81
.0
.
'
I
I
I
1
2
3
Time (sec)
-I
I
4
Figure D.10 Time Response, System 2, x(0) =[1 0 -1
88
6
5
0
0]
References
[1]
Neil T. Dionesotes, "Design Guidelines for Intelligent Integral
Control," Bachelor's Thesis, Massachusetts Institute of
Technology, June 1982.
[2]
Karen Marie Samuelsen, "Demonstration of Parametric
Excitation Using an Inverted Pendulum," Bachelor's Thesis,
Massachusetts Institute of Technology, June 1981.
[3]
Mark Lucius Walker, "On the Design and Construction of an
Inverted Stability Pendulum Demonstration," Bachelor's Thesis,
Massachusetts Institute of Technology, June 1982.
[4]
Jan Marian Maciejowski, Multivariable Feedback Design.
Addison-Wesley,
[5]
Reading, MA, 1989.
Michael Athans, "Multivariable Control Systems I," Lecture
Notes, M.I.T. Subject 6.233, Fall 1992.
[6]
Brian D.O. Anderson and John B. Moore, Optimal Control.
Prentice Hall, Englewood Cliffs, NJ, 1990.
[7]
Michael Athans, "Multivariable Control Systems II," Lecture
Notes, M.I.T. Subject 6.234, Spring 1993.
[8]
Ferdinand P. Beer and E. Russell Johnston, Jr., Vector
Mechanics for Engineers. Fourth Edition, McGraw-Hill Book
Company, New York, 1984.
[9]
William L. Brogan, Modern Control Theory, Third Edition,
Prentice Hall, Englewood Cliffs, New Jersey, 1991.
89
Download