You are on page 1of 609

MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,...

Page 1 of 3

Syllabus

The 'Information' section of the course syllabus contains a list of questions each student was asked to answer about
their background. The information provided would have been used to create a class e-mail list and to adjust the pace
of the course.

Instructor

z Professor Jonathan P. How

Feedback Control

z Introduction to the state-space approach of analysis and control synthesis.


z State-space representation of dynamic systems; controllability and observability.
z State-space realizations of transfer functions and canonical forms.
z Design of state-space controllers, including pole-placement and optimal control.
z Introduction to the Kalman filter.
z Limitations on performance of control systems.
z Introduction to the robustness of multivariable systems.

NUMBER OF
TOPICS
LECTURES

Review of Classical Synthesis


5
Techniques

8 State Space - Linear Systems

7 Full State Feedback

3 State Estimation

4 Output Feedback

7 Robustness

Homework

z Weekly problem sets will be handed out on Fridays (due the following week).
There will be approximately two labs that will be graded as part of the homework.
z Midterm: Between Lecture 27 and 28, in class.
z Final Exam: After Lecture 37.
z Course Grades: Homework 30%, Midterm 20%, Final 50%.

Textbooks

Required:

z Pierre Belanger. Control Engineering: A Modern Approach. Oxford University, 1995.

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,... Page 2 of 3

Goal

To teach the fundamentals of control design and analysis using state-space methods. This includes both the
practical and theoretical aspects of the topic. By the end of the course, you should be able to design
controllers using state-space methods and evaluate whether these controllers are robust.

z Review classical control design techniques.


z Explore new control design techniques using state-space tools.
z Investigate analysis of robustness.

Prerequisites

z Basic understanding of how to develop system equations of motion.


z Classical analysis and synthesis techniques (root locus, Bode). There will be a brief review during the
first 2 weeks.
z Course assumes a working knowledge of MATLAB®.

Policies

z You are encouraged to discuss the homework and problem sets. However, your submitted work
must be your own.
z Homework will be handed out Fridays, due back the following Friday at 5PM. Late homework will not
be accepted unless prior approval is obtained from Professor How. The grade on all late homework will
be reduced 25% per day. No homework will be accepted for credit after the solutions have been
handed out.
z There will hopefully be 2 Labs later in the semester that will be blended in with the homework. This
will be group work, depending on the class size.
z For feedback and/or questions, contact me through email for the best results.

Supplemental Textbooks

There are many others, but these are the ones on my shelf. All pretty much have the same content, but each
author focuses on different aspects.

Modeling and Control

z Palm. Modeling, Analysis, and Control of Dynamic Systems. Wiley.

Basic Control

z Franklin and Powell. Feedback Control of Dynamics Systems. Addison-Wesley.


z Van de Vegte. Feedback Control Systems. Prentice Hall.
z Di Stefano. Feedback Control Systems. Schaum’s outline.
z Luenberger. Introduction to Dynamic Systems. Wiley.

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,... Page 3 of 3

z Ogata. Modern Control Engineering. Prentice Hall.

Linear Systems

z Chen. Linear Systems Theory and Design. Prentice Hall.


z Aplevich. The Essentials of Linear State-Space Systems. Wiley.

State Space Control

z Brogan. Modern Control Theory. Quantum Books.


z Burl. Linear Optimal Control. Prentice Hall.
z Kwakernaak and Sivan. Linear Optimal Control Systems. Wiley Interscience.

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,... Page 1 of 2

This course calendar incorporates the lecture schedule and assignment schedule for the semester. Some lecture topics
were taught over several class sessions.

LEC # TOPICS HOMEWORK OUT HOMEWORK IN

1 Introduction HW1

2 Introduction

3 Root Locus Analysis

4 Root Locus Synthesis

5 Bode-Very Brief Discussion HW2 HW1

6 State Space (SS) Introduction

7 Stace Space (SS) to Transfer Function (TF) HW3 HW2

8 Transfer Function (TF) to State Space (SS)

9 Time Domain

10 Observability HW4 HW3

11 Controllability

12 Pole/Zero (P/Z) Cancellation

13 Observability, Residues HW5 HW4

14 Pole Placement

15 Pole Placement HW6 HW5

16 Performance

17 Performance

18 Pole Locations HW7 HW6

19 Pole Locations

20 Pole Locations

21 State Estimators HW8 HW7

22 State Estimators

23 State Estimators

24 Dynamic Output Feedback HW8

25 Dynamic Output Feedback

26 Dynamic Output Feedback

27 Sensitivity of LQG HW9

Quiz

28 Sensitivity of LQG HW9

29 Bounded Gain Theorem HW10

30 Error Models

31 MIMO Systems

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,... Page 2 of 2

32 MIMO Systems HW10

33 MIMO Systems

34 LQR Optimal

35 LQR Optimal

36 Reference Cmds II

37 LDOC-Review

Final Exam

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
Lecture #1

16.31 Feedback Control

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 1—1

Introduction
d(t)

r(t) e(t) y(t)


K(s) ? G(s) -
6
— u(t)

• Goal: Design a controller K(s) so that the system has some desired
characteristics. Typical objectives:
— Stabilize the system (Stabilization)
— Regulate the system about some design point (Regulation)
— Follow a given class of command signals (Tracking)
— Reduce the response to disturbances. (Disturbance Rejection)
• Typically think of closed-loop control → so we would analyze the
closed-loop dynamics.
— Open-loop control also possible (called “feedforward”) — more
prone to modeling errors since inputs not changed as a result of
measured error.
• Note that a typical control system includes the sensors, actuators,
and the control law.
— The sensors and actuators need not always be physical devices
(e.g., economic systems).
— A good selection of the sensor and actuator can greatly simplify
the control design process.
— Course concentrates on the design of the control law given the
rest of the system (although we will need to model the system).
Fall 2001 16.31 1—2

Why Control?

OPERATION IRAQI FREEDOM -- An F-117 from the 8th Expeditionary Fighter Squadron out of Holloman Air Force
Base, N.M., flies over the Persian Gulf on April 14, 2003. The 8th EFS has begun returning to Hollomann A.F.B. after
having been deployed to the Middle East in support of Operation Iraqi Freedom. (U.S. Air Force photo by Staff Sgt.
Derrick C. Goode). http://www.af.mil/photos.html.

• Easy question to answer for aerospace because many vehicles (space-


craft, aircraft, rockets) and aerospace processes (propulsion) need to
be controlled just to function
— Example: the F-117 does not even fly without computer control,
and the X-29 is unstable
Fall 2001 16.31 1—3

Feedback Control Approach


• Establish control objectives
— Qualitative — don’t use too much fuel
— Quantitative — settling time of step response <3 sec
— Typically requires that you understand the process (expected
commands and disturbances) and the overall goals (bandwidths).
— Often requires that you have a strong understanding of the phys-
ical dynamics of the system so that you do not “fight” them in
appropriate (i.e., inefficient) ways.
• Select sensors & actuators
— What aspects of the system are to be sensed and controlled?
— Consider sensor noise and linearity as key discriminators.
— Cost, reliability, size, . . .
• Obtain model
— Analytic (FEM) or from measured data (system ID)
— Evaluation model → reduce size/complexity → Design model
— Accuracy? Error model?
• Design controller
— Select technique (SISO, MIMO), (classical, state-space)
— Choose parameters (ROT, optimization)
• Analyze closed-loop performance. Meet objectives?
— Analysis, simulation, experimentation, . . .
— Yes ⇒ done, No ⇒ iterate . . .
Fall 2001 16.31 1—4

Example: Blimp Control

• Control objective
— Stabilization
— Red blimp tracks the motion of the green blimp
• Sensors
— GPS for positioning
— Compass for heading
— Gyros/GPS for roll attitude
• Actuators — electric motors (propellers) are very nonlinear.
• Dynamics
— “rigid body” with strong apparent mass effect.
— Roll modes.
• Modeling
— Analytic models with parameter identification to determine “mass”.
• Disturbances — wind
Fall 2001 16.31 1—5

State-Space Approach
• Basic questions that we will address about the state-space approach:
— What are state-space models?
— Why should we use them?
— How are they related to the transfer functions used in classical
control design?
— How do we develop a state-space model?
— How do we design a controller using a state-space model?

• Bottom line:

1. What: representation of the dynamics of an nth -order system


using n first-order differential equations:
mq̈ + cq̇ + kq = u ⇒
      
 q̇   0 1  q   0 
  =   + u
q̈ −k/m −c/m q̇ 1/m
⇒ ẋ = Ax + Bu

2. Why:
— State variable form convenient way to work with complex dy-
namics. Matrix format easy to use on computers.
— Transfer functions only deal with input/output behavior, but
state-space form provides easy access to the “internal” fea-
tures/response of the system.
— Allows us to explore new analysis and synthesis tools.
— Great for multiple-input multiple-output systems (MIMO),
which are very hard to work with using transfer functions.
Fall 2001 16.31 1—6

3. How: There are a variety of ways to develop these state-space


models. We will explore this process in detail.
— “Linear systems theory”

4. Control design: Split into 3 main parts


— Full-state feedback —ficticious since requires more information
than typically (ever?) available
— Observer/estimator design —process of “estimating” the sys-
tem state from the measurements that are available.
— Dynamic output feedback —combines these two parts with
provable guarantees on stability (and performance).
— Fortunately there are very simple numerical tools available
to perform each of these steps

— Removes much of the “art” and/or “magic” required in classi-


cal control design → design process more systematic.

• Word of caution: — Linear systems theory involves extensive use


of linear algebra.
— Will not focus on the theorems/proofs in class — details will be
handed out as necessary, but these are in the textbooks.
— Will focus on using the linear algebra to understand the behav-
ior of the system dynamics so that we can modify them using
control. “Linear algebra in action”
— Even so, this will require more algebra that most math courses
that you have taken . . . .
Fall 2001 16.31 1—7

• My reasons for the review of classical design:


— State-space techniques are just another to design a controller
— But it is essential that you understand the basics of the control
design process
— Otherwise these are just a “bunch of numerical tools”
— To truly understand the output of the state-space control design
process, I think it is important that you be able to analyze it
from a classical perspective.
∗ Try to answer “why did it do that”?
∗ Not always possible, but always a good goal.

• Feedback: muddy cards and office hours.


— Help me to know whether my assumptions about your back-
grounds is correct and whether there are any questions about
the material.

• Matlab will be required extensively. If you have not used it before,


then start practicing.
Fall 2001 16.31 1—8

System Modeling
• Investigate the model of a simple system to explore the basics of
system dynamics.
— Provide insight on the connection between the system response
and the pole locations.

• Consider the simple mechanical system (2MSS) — derive the system


model
1. Start with a free body diagram
2. Develop the 2 equations of motion
m1ẍ1 = k(x2 − x1)
m2ẍ2 = k(x1 − x2) + F
3. How determine the relationships between x1, x2 and F ?
— Numerical integration - good for simulation, but not analysis
— Use Laplace transform to get transfer functions
∗ Fast/easy/lots of tables
∗ Provides lots of information (poles and zeros)
Fall 2001 16.31 1—9

• Laplace transform

L{f (t)} ≡ 0−
f (t)e−stdt
— Key point: If L{x(t)} = X(s), then L{ẋ(t)} = sX(s) assuming
that the initial conditions are zero.

• Apply to the model


L{m1ẍ1 − k(x2 − x1)} = (m1s2 + k)X1(s) − kX2(s) = 0

L{m2ẍ2 − k(x1 − x2) − F } = (m2s2 + k)X2(s) − kX1(s) − F (s) = 0

    
2
 m1 s + k −k   X1 (s)   0 
   =  
−k m2s2 + k X2(s) F (s)

• Perform some algebra to get


X2(s) m1s2 + k
= ≡ G2(s)
F (s) m1m2s2(s2 + k(1/m1 + 1/m2))

• G2(s) is the transfer function between the input F and the


system response x2
Fall 2001 16.31 1—10

• Given that F → G2(s) → x2. If F (t) known, how find x2(t)?


1. Find G2(s)
2. Let F (s) = L{F (t)}
3. Set Xs (s) = G2(s) · F (s)
4. Compute x2(t) = L−1{X2(s)}

• Step 4 involves an inverse Laplace transform, which requires an ugly


contour integral that is hardly ever used.
σc +i∞
1
x2(t) = X2(s)estds
2πi σc −i∞

where σc is a value selected to be to the right of all singularities of


F (s) in the s-plane.
— Partial fraction expansion and inversion using tables is much
easier for problems that we will be dealing with.

• Example with F (t) = 1(t) ⇒ F (s) = 1/s


m1s2 + k
X2(s) =
m1m2s3(s2 + k(1/m1 + 1/m2))
c1 c2 c3 c4s + c5
= + 2+ 3+ 2
s s s s + k(1/m1 + 1/m2)
— Solve for the coefficients ci
— Then inverse transform each term to get x2(t).
Fall 2001 16.31 1—11

• Note that there are 2 special entries in the tables


1
1. (s+a) ⇔ e−at which corresponds to a pole at s+a = 0, or s = −a

ωn2 √
2. (s2 +2ζωn s+ωn2 )
⇔ e−ζωnt sin(ωn 1 − ζ 2 t)

— Corresponds to a damped sinusoidal response


— ζ is the damping ratio
— ωn is the natural frequency

— ωd = ωn 1 − ζ 2 is the damped frequency.

• These results point out that there is a very strong connection be-
tween the pole locations and the time response of the system
— But there are other factors that come into play, as we shall see.
Fall 2001 16.31 1—12

• For a second order system, we can be more explicit and relate the
main features of the step response (time) and the pole locations
(frequency domain).
ωn2
G(s) = 2
(s + 2ζωns + ωn2 )
with u(t) a step, so that u(s) = 1/s
ωn2
• Then y(s) = G(s)u(s) = s(s2 +2ζωn s+ωn2 )
which gives (σ = ζωn)
 
σ
y(t) = 1 − e−σt cos(ωdt) + sin(ωdt)
ωd
• Several key time domain features:
— Rise time tr (how long to get close to the final value?)
— Settling time ts (how long for the transients to decay?)
— Peak overhsoot Mp , tp (how far beyond the final value does the
system respond, and when?)
• Can analyze the system response to determine that:
1. tr ≈ 2.2/wh
1/2
2
wh = wn 1 − 2ζ + 2 − 4ζ 2 + 4ζ 4
or can use tr ≈ 1.8/wn
2. ts(1%) = 4.6/(ζωn )
√−πζ
2
3. Mp = e 1−ζ and tp = π/ωd
• Formulas relate time response to pole locations. Can easily evalute
if the closed-loop system will respond as desired.
— Use to determine acceptable locations for closed-loop poles.
Fall 2001 16.31 1—13

• Examples:
— Max rise time - min ωn

— Max settling time — min σ = ζωn

— Max overshoot — min ζ

• Usually assume that the response of more complex systems (i.e.


ones that have more than 2 poles) is dominated by the lowest
frequency pole pair.
— Then the response is approximately second order, but we
must check this

• These give us a good idea of where we would like the closed-loop


poles to be so that we can meet the design goals.
— Feedback control is all about changing the location of the system
poles from the open-loop locations to the closed-loop ones.
— This course is about a new way to do these control designs
Please refer to the “Design Aids” section of:

Franklin, Gene F., Powell, J. David and Abbas Emami-Naeini. 1994. Feedback Control
of Dynamic Systems – 3rd Ed. Addison-Wesley
Slow dominant pole
num=5;den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)

Fast dominant pole


num=5.5*[1 0.91];den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)
Similar example, but with second order dynamics combined with a simple real pole.
z=.15;wn=1;plist=[wn/2:1:10*wn];

nd=wn^2;dd=[1 2*z*wn wn^2];t=[0:.25:20]';

sys=tf(nd,dd);[y]=step(sys,t);

for p=plist;

num=nd;den=conv([1/p 1],dd);

sys=tf(num,den);[ytemp]=step(sys,t);

y=[y ytemp];

end

plot(t,y(:,1),'d',t,y(:,2),'+',t,y(:,4),'+',t,y(:,8),'v');

ylabel('step response');xlabel('time (sec)')

legend('2nd',num2str(plist(1)),num2str(plist(3)),num2str(plist(7)))

1.8
2nd
1.6 0.5
2.5
6.5
1.4

1.2
step response

0.8

0.6

0.4

0.2

0
0 5 10 15 20
time (sec)

For values of p=2.5 and 6.5, the response is very similar to the second order system. The
response with p=0.5 is clearly no longer dominated by the second-order dynamics
2 - 5
2 - 6
2 - 7
2 - 8

®
2 - 10
2 - 11
2 - 12
2 - 13
2 - 14
2 - 15
2 - 16
2 - 17
EX1 - 1
EX1 - 2
2 - 18
2 - 19
2 - 20
2 - 21
2 - 22
2 - 23
2 - 24
2 - 25
2 - 26
2 - 27
2 - 28
2 - 29
2 - 30

Example: G(s)=1/2^2

Design Gc(s) to put the clp poles at –1 + 2j

z=roots([-20 49 -10]);z=max(z),k=25/(5-2*z),alpha=5*z/(5-2*z),

num=1;den=[1 0 0];

knum=k*[1 z];kden=[1 10*z];

rlocus(conv(num,knum),conv(den,kden));

hold;plot(-alpha+eps*j,'d');plot([-1+2*j,-1-2*j],'d');hold off

r=rlocus(conv(num,knum),conv(den,kden),1)'

z = 2.2253

k = 45.5062

alpha = 20.2531

These are the actual roots that I found from the locus using a gain of

1 (recall that the K gain is already in the compensator)

r =

-20.2531

-1.0000 - 2.0000i

-1.0000 + 2.0000i

20

15

10

5
Imag Axis

-5

-10

-15

-20
-20 -15 -10 -5 0 5
Real Axis

®
MATLAB is a trademark of The MathWorks, Inc.
Slow dominant pole
num=5;den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)

Fast dominant pole


num=5.5*[1 0.91];den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)
Similar example, but with second order dynamics combined with a simple real pole.
z=.15;wn=1;plist=[wn/2:1:10*wn];

nd=wn^2;dd=[1 2*z*wn wn^2];t=[0:.25:20]';

sys=tf(nd,dd);[y]=step(sys,t);

for p=plist;

num=nd;den=conv([1/p 1],dd);

sys=tf(num,den);[ytemp]=step(sys,t);

y=[y ytemp];

end

plot(t,y(:,1),'d',t,y(:,2),'+',t,y(:,4),'+',t,y(:,8),'v');

ylabel('step response');xlabel('time (sec)')

legend('2nd',num2str(plist(1)),num2str(plist(3)),num2str(plist(7)))

1.8
2nd
1.6 0.5
2.5
6.5
1.4

1.2
step response

0.8

0.6

0.4

0.2

0
0 5 10 15 20
time (sec)

For values of p=2.5 and 6.5, the response is very similar to the second order system. The
response with p=0.5 is clearly no longer dominated by the second-order dynamics
2 - 5
2 - 6
2 - 7
2 - 8

®
2 - 10
2 - 11
2 - 12
2 - 13
2 - 14
2 - 15
2 - 16
2 - 17
EX1 - 1
EX1 - 2
2 - 18
2 - 19
2 - 20
2 - 21
2 - 22
2 - 23
2 - 24
2 - 25
2 - 26
2 - 27
2 - 28
2 - 29
2 - 30

Example: G(s)=1/2^2

Design Gc(s) to put the clp poles at –1 + 2j

z=roots([-20 49 -10]);z=max(z),k=25/(5-2*z),alpha=5*z/(5-2*z),

num=1;den=[1 0 0];

knum=k*[1 z];kden=[1 10*z];

rlocus(conv(num,knum),conv(den,kden));

hold;plot(-alpha+eps*j,'d');plot([-1+2*j,-1-2*j],'d');hold off

r=rlocus(conv(num,knum),conv(den,kden),1)'

z = 2.2253

k = 45.5062

alpha = 20.2531

These are the actual roots that I found from the locus using a gain of

1 (recall that the K gain is already in the compensator)

r =

-20.2531

-1.0000 - 2.0000i

-1.0000 + 2.0000i

20

15

10

5
Imag Axis

-5

-10

-15

-20
-20 -15 -10 -5 0 5
Real Axis

®
MATLAB is a trademark of The MathWorks, Inc.
Slow dominant pole
num=5;den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)

Fast dominant pole


num=5.5*[1 0.91];den=conv([1 1],[1 5]);step(num,den,6)

Step Response

0.9

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Time (sec.)
Similar example, but with second order dynamics combined with a simple real pole.
z=.15;wn=1;plist=[wn/2:1:10*wn];

nd=wn^2;dd=[1 2*z*wn wn^2];t=[0:.25:20]';

sys=tf(nd,dd);[y]=step(sys,t);

for p=plist;

num=nd;den=conv([1/p 1],dd);

sys=tf(num,den);[ytemp]=step(sys,t);

y=[y ytemp];

end

plot(t,y(:,1),'d',t,y(:,2),'+',t,y(:,4),'+',t,y(:,8),'v');

ylabel('step response');xlabel('time (sec)')

legend('2nd',num2str(plist(1)),num2str(plist(3)),num2str(plist(7)))

1.8
2nd
1.6 0.5
2.5
6.5
1.4

1.2
step response

0.8

0.6

0.4

0.2

0
0 5 10 15 20
time (sec)

For values of p=2.5 and 6.5, the response is very similar to the second order system. The
response with p=0.5 is clearly no longer dominated by the second-order dynamics
2 - 5
2 - 6
2 - 7
2 - 8

®
2 - 10
2 - 11
2 - 12
2 - 13
2 - 14
2 - 15
2 - 16
2 - 17
EX1 - 1
EX1 - 2
2 - 18
2 - 19
2 - 20
2 - 21
2 - 22
2 - 23
2 - 24
2 - 25
2 - 26
2 - 27
2 - 28
2 - 29
2 - 30

Example: G(s)=1/2^2

Design Gc(s) to put the clp poles at –1 + 2j

z=roots([-20 49 -10]);z=max(z),k=25/(5-2*z),alpha=5*z/(5-2*z),

num=1;den=[1 0 0];

knum=k*[1 z];kden=[1 10*z];

rlocus(conv(num,knum),conv(den,kden));

hold;plot(-alpha+eps*j,'d');plot([-1+2*j,-1-2*j],'d');hold off

r=rlocus(conv(num,knum),conv(den,kden),1)'

z = 2.2253

k = 45.5062

alpha = 20.2531

These are the actual roots that I found from the locus using a gain of

1 (recall that the K gain is already in the compensator)

r =

-20.2531

-1.0000 - 2.0000i

-1.0000 + 2.0000i

20

15

10

5
Imag Axis

-5

-10

-15

-20
-20 -15 -10 -5 0 5
Real Axis

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #3

16.31 Feedback Control

Frequency response methods


• Analysis
• Synthesis
• Performance
• Stability

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 3–1

Introduction
• Root locus methods have:
– Advantages:
∗ Good indicator if transient response;
∗ Explicity shows location of all closed-loop poles;
∗ Trade-offs in the design are fairly clear.
– Disadvantages:
∗ Requires a transfer function model (poles and zeros);
∗ Difficult to infer all performance metrics;
∗ Hard to determine response to steady-state (sinusoids)

• Frequency response methods are a good complement to the root


locus techniques:
– Can infer performance and stability from the same plot
– Can use measured data rather than a transfer function model
– The design process can be independent of the system order
– Time delays are handled correctly
– Graphical techniques (analysis and synthesis) are quite simple.
Fall 2001 16.31 3–2

Frequency response Function


• Given a system with a transfer function G(s), we call the G(jω),
ω ∈ [0, ∞) the frequency response function (FRF)
G(jω) = |G(jω)| arg G(jω)
– The FRF can be used to find the steady-state response of a
system to a sinusoidal input. If
e(t) → G(s) → y(t)
and e(t) = sin 2t, |G(2j)| = 0.3, arg G(2j) = 80◦ , then the
steady-state output is
y(t) = 0.3 sin(2t − 80◦)
⇒ The FRF clearly shows the magnitude (and phase) of the
response of a system to sinusoidal input

• A variety of ways to display this:


1. Polar (Nyquist) plot – Re vs. Im of G(jω) in complex plane.
– Hard to visualize, not useful for synthesis, but gives definitive
tests for stability and is the basis of the robustness analysis.

2. Nichols Plot – |G(jω)| vs. arg G(jω), which is very handy for
systems with lightly damped poles.

3. Bode Plot – Log |G(jω)| and arg G(jω) vs. Log frequency.
– Simplest tool for visualization and synthesis
– Typically plot 20log |G| which is given the symbol dB
Fall 2001 16.31 3–3

• Use logarithmic since if


 

(s + 1)(s + 2) 


log |G(s)| = 


(s + 3)(s + 4) 


= log |s + 1| + log |s + 2| − log |s + 3| − log |s + 4|


and each of these factors can be calculated separately and then
added to get the total FRF.

• Can also split the phase plot since


(s + 1)(s + 2)
arg = arg(s + 1) + arg(s + 2)
(s + 3)(s + 4)
− arg(s + 3) − arg(s + 4)

• The keypoint in the sketching of the plots is that good straightline


approximations exist and can be used to obtain a good prediction
of the system response.
Fall 2001 16.31 3–4

Example
• Draw Bode for
s+1
G(s) =
s/10 + 1
|jω + 1|
|G(jω)| =
|jω/10 + 1|
log |G(jω)| = log[1 + (ω/1)2]1/2 − log[1 + (ω/10)2]1/2
• Approximation


 0 ω ωi
log[1 + (ω/ωi )2]1/2 ≈ 
 log[ω/ωi ] ω ωi
Two straightline approximations that intersect at ω ≡ ωi
• Error at ωi obvious, but not huge and the straightline approxima-
tions are very easy to work with.
2
10

1
10
|G|

0
10

−2 −1 0 1 2
10 10 10 10 10
Freq
Fall 2001 16.31 3–5

To form the composite sketch,


– Arrange representation of transfer function so that DC gain of
each element is unity (except for parts that have poles or zeros
at the origin) – absorb the gain into the overall plant gain.
– Draw all component sketches
– Start at low frequency (DC) with the component that has the
lowest frequency pole or zero (i.e. s=0)
– Use this component to draw the sketch up to the frequency of
the next pole/zero.
– Change the slope of the sketch at this point to account for the
new dynamics: -1 for pole, +1 for zero, -2 for double poles, . . .
– Scale by overall DC gain

2
10

1
10
|G|

0
10

−1
10
−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 1: G(s) = 10(s + 1)/(s + 10) which is a “lead”.


Fall 2001 16.31 3–6

• Since arg G(jω) = arg(1 + jω) − arg(1 + jω/10), we can construct


phase plot for complete system in a similar fashion
– Know that arg(1 + jω/ωi ) = tan−1(ω/ωi )
• Can use straightline approximations

0 ω/ωi ≤ 0.1







arg(1 + jω/ωi ) ≈ 

90 ω/ωi ≥ 10


 45◦

ω/ωi = 1

• Draw the components using breakpoints that are at ωi /10 and 10ωi

100

90

80

70

60
Arg G

50

40

30

20

10

−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 2: Phase plot for (s + 1)


Fall 2001 16.31 3–7

• Then add them up starting from zero frequency and changing the
slope as ω → ∞

80

60

40

20
Arg G

−20

−40

−60

−80

−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 3: Phase plot G(s) = 10(s + 1)/(s + 10) which is a “lead”.


Fall 2001 16.31 3–8

Actual
0 LF
10 MF
HF

−1
+1

−1 −2
10 0
Magnitude

−2
10
+1

−2

−3
10
−4 −3 −2 −1 0 1
10 10 10 10 10 10
Freq (Hz)
20
Actual
LF
0 MF
HF

−20

−40

−60
Phase (deg)

−80

−100

−120

−140

−160

−180
−4 −3 −2 −1 0 1 2
10 10 10 10 10 10 10
Freq (Hz)
4.54s
Bode for G(s) = .
s3 + 0.1818s2 − 31.1818s − 4.4545
The poles are at (-0.892, 0.886, -0.0227)
Fall 2001

Non-minimum Phase Systems


• Bode plots are particularly complicated when we have non-minimum
phase systems
– A system that has a pole/zero in the RHP is called non-minimum
phase.
– The reason is clearer once you have studied the Bode Gain-
Phase relationship
– Key point: We can construct two (and many more) systems
that have identical magnitude plots, but very different phase
diagrams.
• Consider G1(s) = s+1
s+2
and G2(s) = s−1
s+2

0
10

MP
|G|

NMP

−1
10
−1 0 1 2
10 10 10 10
Freq

200
MP
NMP
150
Arg G

100

50

0
−1 0 1 2
10 10 10 10
Freq

Figure 4: Magnitude plots are identical, but the phase plots are dramatically different. NMP has a 180 deg
phase loss over this frequency range.
Topic #7

16.31 Feedback Control

State-Space Systems
• What are state-space models?
• Why should we use them?
• How are they related to the transfer functions used in classical control design
and how do we develop a state-space model?
• What are the basic properties of a state-space model, and how do we analyze
these?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 7—1

Introduction
• State space model: a representation of the dynamics of an N th order
system as a first order differential equation in an N-vector, which
is called the state.
— Convert the N th order differential equation that governs the dy-
namics into N first-order differential equations

• Classic example: second order mass-spring system


mp̈ + cṗ + kp = F
— Let x1 = p, then x2 = ṗ = ẋ1, and
ẍ2 = p̈ = (F − cṗ − kp)/m
= (F − cx2 − kx1)/m
      
ṗ   0 1  p   0 
⇒   =   + u
p̈ −k/m −c/m ṗ 1/m
— Let u = F and introduce the state
   
x p
x =  1  =   ⇒ ẋ = Ax + Bu
x2 ṗ
— If the measured output of the system is the position, then we
have that
   
∙ ¸ p ∙ ¸ x1 
 
y=p= 1 0   = 1 0   = cx
ṗ x2
Fall 2001 16.31 7—2

• The most general continuous-time linear dynamical system has form


ẋ(t) = A(t)x(t) + B(t)u(t)
y(t) = C(t)x(t) + D(t)u(t)
where:
— t ∈ R denotes time
— x(t) ∈ Rn is the state (vector)
— u(t) ∈ Rm is the input or control
— y(t) ∈ Rp is the output

— A(t) ∈ Rn×n is the dynamics matrix


— B(t) ∈ Rn×m is the input matrix
— C(t) ∈ Rp×n is the output or sensor matrix
— D(t) ∈ Rp×m is the feedthrough matrix

• Note that the plant dynamics can be time-varying.


• Also note that this is a MIMO system.

• We will typically deal with the time-invariant case


⇒ Linear Time-Invariant (LTI) state dynamics
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
so that now A, B, C, D are constant and do not depend on t.
Fall 2001 16.31 7—3

Basic Definitions
• Linearity — What is a linear dynamical system? A system G is
linear with respect to its inputs and output
u(t) → G(s) → y(t)
if superposition holds:
G(α1u1 + α2u2) = α1Gu1 + α2Gu2
So if y1 is the response of G to u1 (y1 = Gu1), and y2 is the
response of G to u2 (y2 = Gu2), then the response to α1u1 + α2u2
is α1y1 + α2y2

• A system is said to be time-invariant if the relationship between


the input and output is independent of time. So if the response to
u(t) is y(t), then the response to u(t − t0) is y(t − t0)

• x(t) is called the state of the system at t because:


— Future output depends only on current state and future input
— Future output depends on past input only through current state
— State summarizes effect of past inputs on future output — like
the memory of the system

• Example: Rechargeable flashlight — the state is the current state of


charge of the battery. If you know that state, then you do not need
to know how that level of charge was achieved (assuming a perfect
battery) to predict the future performance of the flashlight.
Fall 2001 16.31 7—4

Creating Linear State-Space Models


• Most easily created from N th order differential equations that de-
scribe the dynamics
— This was the case done before.
— Only issue is which set of states to use — there are many choices.

• Can be developed from transfer function model as well.


— Much more on this later

• Problem is that we have restricted ourselves here to linear state


space models, and almost all systems are nonlinear in real-life.
— Can develop linear models from nonlinear system dynamics
Fall 2001 16.31 7—5

Linearization
• Often have a nonlinear set of dynamics given by
ẋ = f (x, u)
where x is once gain the state vector, u is the vector of inputs, and
f (·, ·) is a nonlinear vector function that describes the dynamics
• Example: simple spring. With a mass at the end of a linear spring
(rate k) we have the dynamics
mẍ = kx
but with a “leaf spring” as is used on car suspensions, we have a
nonlinear spring — the more it deflects, the stiffer it gets. Good
model now is
mẍ = (k1x + k2x3)
which is a “cubic spring”.
— Restoring force depends on the deflection x in a nonlinear way.
2
Nonlinear
Linear
1

0
X

−1

−2
0 2 4 6 8 10 12
Time

3
Nonlinear
2 Linear

0
V

−1

−2

−3
0 2 4 6 8 10 12
Time

Figure 1: Response to linear k and nonlinear (k1 = 0, k2 = k) springs (code at the end)
Fall 2001 16.31 7—6

• Typically assume that the system is operating about some nominal


state solution x0(t) (possibly requires a nominal input u0(t))
— Then write the actual state as x(t) = x0(t) + δx(t)
and the actual inputs as u(t) = u0(t) + δu(t)
— The “δ” is included to denote the fact that we expect the varia-
tions about the nominal to be “small”

• Can then develop the linearized equations by using the Taylor


series expansion of f (·, ·) about x0(t) and u0(t).

• Recall the vector equation ẋ = f (x, u), each equation of which


ẋi = fi(x, u)
can be expanded as
d 0
(xi + δxi) = fi(x0 + δx, u0 + δu)
dt ¯ ¯
∂f ¯ ∂f ¯
0 0 i ¯ i ¯
≈ fi(x , u ) + ¯ δx +
¯ ¯ δu
¯
∂x 0 ¯ ∂u ¯0
where  
∂fi  ∂fi ∂fi 
= ···
∂x ∂x1 ∂xn
and ·|0 means that we should evaluate the function at the nominal
values of x0 and u0.

• The meaning of “small” deviations now clear — the variations in δx


and δu must be small enough that we can ignore the higher order
terms in the Taylor expansion of f (x, u).
Fall 2001 16.31 7—7

d 0
• Since dt xi = fi(x0, u0), we thus have that
¯ ¯
d ∂fi ¯¯¯ ∂fi ¯¯¯
(δxi) ≈ ¯ δx + ¯ δu
dt ∂x ¯0 ∂u ¯0
• Combining for all n state equations, gives (note that we also set
“≈” → “=”) that
 ¯   ¯ 
∂f ¯ ∂f ¯
 ¯
1¯   1 ¯¯ 
 ¯   ¯ 
   
 ∂x ¯0   ∂u ¯0 
   
 ¯   ¯ 
 ∂f ¯   ∂f ¯ 


2 ¯¯  


2 ¯¯  
 ¯   ¯ 
d  ∂x ¯ 
0 
 ∂u ¯ 
0 
δx =   δx + 

 δu
dt 

.
..  




.
.. 
   
   
   
 ¯   ¯ 



∂fn ¯¯¯ 





∂fn ¯¯¯ 


¯ ¯
∂x ¯0 ∂u ¯0

= A(t)δx + B(t)δu
where  
∂f1 ∂f1 ∂f1
 ∂x1 ∂x2 ··· ∂xn 
 
 
 
 ∂f2 ∂f2 ∂f2 
 ··· 
 ∂x1 ∂x2 ∂xn 
A(t) ≡ 








... 


 
 ∂fn ∂fn ∂fn 
∂x1 ∂x2 ··· ∂xn 0
and  
∂f1 ∂f1 ∂f1
 ∂u1 ∂u2 ··· ∂um 
 
 
 
 ∂f2 ∂f2 ∂f2 
 ··· 
 ∂u1 ∂u2 ∂um 
B(t) ≡ 








... 


 
 ∂fn ∂fn ∂fn 
∂u1 ∂u2 ··· ∂um 0
Fall 2001 16.31 7—8

• Similarly, if the nonlinear measurement equation is y = g(x, u), can


show that, if y(t) = y 0 + δy, then
 ¯   ¯ 

∂g1 ¯¯¯  
∂g1 ¯¯¯ 
 ¯   ¯ 
  


∂x ¯0  

∂u ¯0 
 ¯   ¯ 
 ¯
∂g2 ¯¯ 
  ∂g2 ¯¯¯ 
 
 
 ¯   ¯ 
δy =



∂x 0  δx + 
¯  ∂u ¯0  δu



...  


... 
   
   
   
 ¯   ¯ 



∂gp ¯¯¯ 





∂gp ¯¯¯ 


¯ ¯
∂x ¯0 ∂u ¯0

= C(t)δx + D(t)δu

• Typically think of these nominal conditions x0, u0 as “set points”


or “operating points” for the nonlinear system. The equations
d
δx = A(t)δx + B(t)δu
dt
δy = C(t)δx + D(t)δu
then give us a linearized model of the system dynamic behavior
about these operating/set points.
• Note that if x0, u0 are constants, then the partial fractions in the
expressions for A—D are all constant → LTI linearized model.
• One particularly important set of operating points are the equilib-
rium points of the system. Defined as the states & control input
combinations for which
ẋ = f (x0, u0) ≡ 0
provides n algebraic equations to find the equilibrium points.
Fall 2001 16.31 7—9

Example
• Consider the nonlinear spring with (set m = 1)
ÿ = k1y + k2y 3
gives us the nonlinear model (x1 = y and x2 = ẏ)
   
d y  ẏ 
 = 

3  ⇒ ẋ = f (x)
dt ẏ k1y + k2y

• Find the equilibrium points and then make a state space model

• For the equilibrium points, we must solve


 

f (x) =  
3 =0
k1y + k2y
which gives
ẏ 0 = 0 and k1y0 + k2(y 0)3 = 0
r
0 0
— Second condition corresponds to y = 0 or y = ± −k1/k2,
which is only real if k1 and k2 are opposite signs.

• For the state space model,


 

∂f1 ∂f1 
   


 ∂x1 ∂x2





0 1  

0 1 
A= 


 = 


 = 






∂f2 ∂f2 



k1 + 3k2(y)2 0
 
k1 + 3k2(y0)2 0

0
∂x1 ∂x2 0
˙ = Aδx
and the linearized model is δx
Fall 2001 16.31 7—10

• For the equilibrium point y = 0, ẏ = 0


 


0 1 
A0 = 





k1 0
which are the standard dynamics of a system with just a linear
spring of stiffness k1
— Stable motion about y = 0 if k1 < 0
• Assume that k1 = 1, k√2 = −1/2, then we should get an equilibrium
point at ẏ = 0, y = ± 2, and since k1 + k2(y 0)2 = 0
   


0 1  

0 1 
A1 = 





= 





−2k1 0 −2 0
are the dynamics of a stable oscillator about the equilibrium point
— Will explore this in detail later
1.5 0.1

1.45 0.08

1.4 0.06
y

0.04
1.35

0.02
1.3
0 5 10 15 20 25 30 35
dy/dt

Time
0

0.1
−0.02

0.05
−0.04
dy/dt

0 −0.06

−0.05 −0.08

−0.1 −0.1
0 5 10 15 20 25 30 35 1.34 1.36 1.38 1.4 1.42 1.44 1.46 1.48 1.5
Time y

Figure 2: Nonlinear response (k1 = 1, k2 = −.5). The figure on the right shows the oscillation about the
equilibrium point.
Fall 2001 16.31 7—11

Linearized Nonlinear Dynamics


• Usually in practice we drop the “δ” as they are rather cumbersome,
and (abusing notation) we write the state equations as:

ẋ(t) = A(t)x(t) + B(t)u(t)


y(t) = C(t)x(t) + D(t)u(t)

which is of the same form as the previous linear models


Fall 2001 16.31 7—12

Example: Aircraft Dynamics

• Assumptions:
1. Earth is an inertial reference frame
2. A/C is a rigid body
3. Body frame B fixed to the aircraft (~i, ~j, ~k)

• The basic dynamics are:


~ ˙ I
~ ˙I
~
F = m~vc and T = H

1 ~ B
⇒ F = ~v˙c + BI ω
~ × ~vc Transport Thm.
m
~ ˙B
~ ~
⇒ T = H + BI ω ~ ×H

BI
• Instantaneous mapping of ~vc and ~ω into the body frame is given
by
BI
~ = P~i + Q~j + R~k
ω ~vc = U~i + V ~j + W ~k

   
P 


U 



⇒ BI
ωB = Q 


 ⇒ (vc)B = V 





   
R W
Fall 2001 16.31 7—13

• The overall equations of motion are then:


1 ~ B
F = ~v˙c + BI ~ω × ~vc
m

      
F  U̇ 0 −R Q   U
1  x 









⇒  Fy 
 =  V̇ 

 +

 R 0 −P   V 


m      
Fz Ẇ −Q P 0 W

 
 U̇ + QW − RV 
 
 
= 
 V̇ + RU − P W 

 
Ẇ + P V − QU

• These are clearly nonlinear — need to linearize about the equilibrium


states.

• To find suitable equilibrium conditions, must solve


   
F +QW − RV
1  x   


 Fy  −  +RU − P W  =0
m  





Fz +P V − QU

• Assume steady state flight conditions with Ṗ = Q̇ = Ṙ = 0


Fall 2001 16.31 7—14

• Define the trim angular rates, velocities, and Forces


     
P  



Uo 



Fxo 

BI o
ωB = Q 

 (vc)oB = 0





 FBo = 

 Fyo 


    
R 0 Fzo
that are associated with the flight condition (they define the type
of equilibrium motion that we analyze about).
Note:
— W0 = 0 since we are using the stability axes, and

— V0 = 0 because we are assuming symmetric flight

• Can now linearize the equations about this flight mode. To proceed,
define
Velocities U0, U = U0 + u ⇒ U̇ = u̇
W0 = 0, W = w ⇒ Ẇ = ẇ
V0 = 0, V =v ⇒ V̇ = v̇

Angular Rates P0 = 0, P =p ⇒ Ṗ = ṗ
Q0 = 0, Q=q ⇒ Q̇ = q̇
R0 = 0, R=r ⇒ Ṙ = ṙ

Angles Θ0, Θ = Θ0 + θ ⇒ Θ̇ = θ̇
Φ0 = 0, Φ=φ ⇒ Φ̇ = φ̇
Ψ0 = 0, Ψ=ψ ⇒ Ψ̇ = ψ̇
Fall 2001 16.31 7—15

• Linearization for symmetric flight


U = U0 + u, V0 = W0 = 0, P0 = Q0 = R0 = 0.
Note that the forces and moments are also perturbed.

1 ∙ 0 ¸
F + ∆Fx = U̇ + QW − RV ≈ u̇ + qw − rv
m x
≈ u̇

1 ∙ 0 ¸
F + ∆Fy = V̇ + RU − P W ≈ v̇ + r(U0 + u) − pw
m y
≈ v̇ + rU0

1 ∙ 0 ¸
F + ∆Fz = Ẇ + P V − QU ≈ ẇ + pv − q(U0 + u)
m z
≈ ẇ − qU0

   
∆Fx u̇
1  








⇒  ∆Fy 
 = 
 v̇ + rU0 

m   
∆Fz ẇ − qU0
• Which gives the linearized dynamics for the aircraft motion about
the steady-state flight condition.
— Need to analyze the perturbations to the forces and moments to
fully understand the linearized dynamics — take 16.61
— Can do same thing for the rotational dynamics.
Fall 2001 16.31 7—16

% save this entire code as plant.m


%
function [xdot] = plant(t,x)
global n
xdot(1) = x(2);
xdot(2) = -3*(x(1))^n;
xdot = xdot’;
return

% the use this part of the code in Matlab®


% to call_plant.m
global n
n=3; %nonlinear
x0 = [-1 2]; % initial condition
[T,x]=ode23(’plant’, [0 12], x0); %simulate NL equations for 12 sec
n=1; % linear
[T1,x1]=ode23(’plant’, [0 12], x0);

subplot(211)
plot(T,x(:,1),T1,x1(:,1),’--’);
legend(’Nonlinear’,’Linear’)
ylabel(’X’)
xlabel(’Time’)
subplot(212)
plot(T,x(:,2),T1,x1(:,2),’--’);
legend(’Nonlinear’,’Linear’)
ylabel(’V’)
xlabel(’Time’)

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #8

16.31 Feedback Control

State-Space Systems
• What are state-space models?
• Why should we use them?
• How are they related to the transfer functions used in
classical control design and how do we develop a state-
space model?
• What are the basic properties of a state-space model, and how do
we analyze these?

Copyright 2001 by Jonathan How.


Fall 2001 16.31 8–1

TF’s to State-Space Models


• The goal is to develop a state-space model given a transfer function
for a system G(s).
– There are many, many ways to do this.

• But there are three primary cases to consider:


1. Simple numerator
y 1
= G(s) = 3
u s + a1s2 + a2s + a3

2. Numerator order less than denominator order


y b1s2 + b2s + b3 N (s)
= G(s) = 3 =
u s + a1s2 + a2s + a3 D(s)

3. Numerator equal to denominator order


y b0s3 + b1s2 + b2s + b3
= G(s) = 3
u s + a1s2 + a2s + a3

• These 3 cover all cases of interest


Fall 2001 16.31 8–2

• Consider case 1 (specific example of third order, but the extension


to nth follows easily)
y 1
= G(s) = 3
u s + a1s2 + a2s + a3
can be rewritten as the differential equation
y (3) + a1ÿ + a2ẏ + a3y = u
choose the output y and its derivatives as the state vector
 

x =  ẏ 
y
then the state equations are

      
y (3) −a1 −a2 −a3 ÿ 1
ẋ =  ÿ  =  1 0 0   ẏ  +  0  u
ẏ 0 1 0 y 0

  ÿ
y = 0 0 1  ẏ  + [0]u
y

• This is typically called the controller form for reasons that will
become obvious later on.
– There are four classic (called canonical) forms – oberver, con-
troller, controllability, and observability. They are all useful in
their own way.
Fall 2001 16.31 8–3

• Consider case 2
y b1s2 + b2s + b3 N (s)
= G(s) = 3 =
u s + a1s2 + a2s + a3 D(s)
• Let
y y v
= ·
u v u
where y/v = N (s) and v/u = 1/D(s)
• Then the representation of v/u = 1/D(s) is the same as case 1
v (3) + a1v̈ + a2v̇ + a3v = u
use the state vector  

x =  v̇ 
v
to get
ẋ = A2x + B2u
where    
−a1 −a2 −a3 1
A2 =  1 0 0  and B2 =  0 
0 1 0 0
• Then consider y/v = N (s), which implies that
y = b1v̈ + b2v̇ + b3v
 
  v̈
= b1 b2 b3  v̇ 
v
= C2x + [0]u
Fall 2001 16.31 8–4

• Consider case 3 with


y b0s3 + b1s2 + b2s + b3
= G(s) = 3
u s + a1s2 + a2s + a3

β1 s2 + β2s + β3
= 3 +D
s + a1s2 + a2s + a3

= G1(s) + D
where
D( s3 +a1s2 +a2s +a3 )

+( +β1s2 +β2s +β3 )

= b0s3 +b1s2 +b2s +b3


so that, given the bi, we can easily find the βi
D = b0
β1 = b1 − Da1
...

• Given the βi , can find G1(s)


– Can make a state-space model for G1(s) as described in case 2
• Then we just add the “feed-through” term Du to the output equa-
tion from the model for G1(s)
• Will see that there is a lot of freedom in making a state-space model
because we are free to pick the x as we want
Fall 2001 16.31 8–5

Modal Form
• One particular useful canonical form is called the Modal Form
– It is a diagonal representation of the state-space model.
• Assume for now that the transfer function has distinct real poles pi
(but this easily extends to the case with complex poles)
N (s) N (s)
G(s) = =
D(s) (s − p1)(s − p2) · · · (s − pn)
r1 r2 rn
= + + ··· +
s − p1 s − p2 s − pn
• Now define a collection of first order systems, each with state xi
X1 r1
= ⇒ ẋ1 = p1x1 + r1u
U (s) s − p1
X2 r2
= ⇒ ẋ2 = p2x2 + r2u
U (s) s − p2
...
Xn rn
= ⇒ ẋn = pnxn + rn u
U (s) s − pn
• Which can be written as
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
with
     T
p1 r1 1
A= ...  B =  ...  C =  ... 
pn rn 1
• Good representation to use for numerical robustness reasons.
Fall 2001 16.31 8–6

State-Space Models to TF’s


• Given the Linear Time-Invariant (LTI) state dynamics
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
what is the corresponding transfer function?
• Start by taking the Laplace Transform of these equations
L{ẋ(t) = Ax(t) + Bu(t)}
sX(s) − x(0−) = AX(s) + BU (s)

L{y(t) = Cx(t) + Du(t)}


Y (s) = CX(s) + DU (s)
which gives
(sI − A)X(s) = BU (s) + x(0−)
⇒ X(s) = (sI − A)−1BU (s) + (sI − A)−1x(0−)
and
 
Y (s) = C(sI − A) B + D U (s) + C(sI − A)−1x(0−)
−1

• By definition G(s) = C(sI − A)−1B + D is called the


Transfer Function of the system.
• And C(sI − A)−1 x(0−) is the initial condition response. It is part
of the response, but not part of the transfer function.
Fall 2001 16.31 8–7

State-Space Transformations
• State space representations are not unique because we have a lot of
freedom in choosing the state vector.
– Selection of the state is quite arbitrary, and not that important.
• In fact, given one model, we can transform it to another model that
is equivalent in terms of its input-output properties.
• To see this, define Model 1 of G(s) as
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)

• Now introduce the new state vector z related to the first state x
through the transformation x = T z
– T is an invertible (similarity) transform matrix

ż = T −1ẋ = T −1 (Ax + Bu)


= T −1 (AT z + Bu)
= (T −1AT )z + T −1Bu = Āz + B̄u
and
y = Cx + Du = CT z + Du = C̄z + D̄u
• So the new model is
ż = Āz + B̄u
y = C̄z + D̄u

• Are these going to give the same transfer function? They must if
these really are equivalent models.
Fall 2001 16.31 8–8

• Consider the two transfer functions:


G1(s) = C(sI − A)−1 B + D
G2(s) = C̄(sI − Ā)−1B̄ + D̄
Does G1(s) ≡ G2(s) ?
G1(s) = C(sI − A)−1B + D
= C(T T −1)(sI − A)−1(T T −1)B + D
 
= (CT ) T −1(sI − A)−1 T (T −1B) + D̄
 −1
= (C̄) T −1(sI − A)T (B̄) + D̄
= C̄(sI − Ā)−1B̄ + D̄ = G2(s)

• So the transfer function is not changed by putting the state-space


model through a similarity transformation.
• Note that in the transfer function
b1s2 + b2s + b3
G(s) = 3
s + a1s2 + a2s + a3
we have 6 parameters to choose
• But in the related state-space model, we have A − 3 × 3, B − 3 × 1,
C − 1 × 3 for a total of 15 parameters.
• Is there a contradiction here because we have more degrees of free-
dom in the state-space model?
– No. In choosing a representation of the model, we are effectively
choosing a T , which is also 3 × 3, and thus has the remaining 9
degrees of freedom in the state-space model.
Fall 2001 16.31 9–1

Topic #9

16.31 Feedback Control

State-Space Systems
• What are the basic properties of a state-space model,
and how do we analyze these?
• SS to TF

Copyright 2001 by Jonathan How.


Fall 2001 16.31 9–1

SS ⇒ TF
• In going from the state space model
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
to the transfer function G(s) = C(sI − A)−1B + D need to form the inverse
of the matrix (sI − A) – a symbolic inverse – not easy at all.
• For simple cases, we can use the following:
 −1  
a1 a2 1 a4 −a2
=
a3 a4 a1 a4 − a2 a3 −a3 a1
For larger problems, we can also use Cramer’s Rule
• Turns out that an equivalent method is to form:
 
sI − A −B
det
C D
G(s) = C(sI − A)−1B + D =
det(sI − A)
– Reason for this will become more apparent later when we talk about
how to compute the “zeros” of a state-space model (which are the roots
of the numerator)
• Example from before:
   
−a1 −a2 −a3 1  T
A=  1 0 0  , B = 0  , C = b1 b2 b3

0 1 0 0
then
 
s + a1 a2 a3 −1
1  −1 0 0  2
G(s) =  s  = b3 + b2 s + b1 s
det(sI − A)  0 −1 s 0  det(sI − A)
b1 b2 b3 0
and det(sI − A) = s3 + a1 s2 + a2 s + s3
• Key point: Characteristic equation of this system given by det(sI − A)
Fall 2001 16.31 9–2

Time Response
• Can develop a lot of insight into the system response and how it is modeled
by computing the time response x(t)
– Homogeneous part
– Forced solution
• Homogeneous Part
ẋ = Ax, x(0) known
– Take Laplace transform
X(s) = (sI − A)−1x(0)
so that  
x(t) = L−1 (sI − A)−1 x(0)
– But can show
−1 I A A2
(sI − A) = + + 3 + ...
s s2 s
  1
so L−1 (sI − A)−1 = I + At + (At)2 + . . .
2!

= eAt
– So
x(t) = eAt x(0)
• eAt is a special matrix that we will use many times in this course
– Transition matrix
– Matrix Exponential
– Calculate in MATLAB r using expm.m and not exp.m 1

– Note that e(A+B)t = eAt eBt iff AB = BA


• We will say more about eAt when we have said more about A (eigenvalues
and eigenvectors)
• Computation of eAt = L−1 {(sI − A)−1} straightforward for a 2-state system

r
1 MATLAB is a trademark of the Mathworks Inc.
Fall 2001 16.31 9–3

• Example: ẋ = Ax, with  


0 1
A= 
−2 −3
 −1
s −1
(sI − A)−1 =  
2 s+3
 
s+3 1 1
=  
−2 s (s + 2)(s + 1)

 
2 1 1 1
 s+1 − s+2 s+1 − s+2 
= 
 −2

2 −1 2 
+ +
s+1 s+2 s+1 s+2

 
2e−t − e−2t e−t − e−2t
eAt =  
−2e−t + 2e−2t −e−t + 2e−2t
Fall 2001 16.31 10–1

Topic #10

16.31 Feedback Control

State-Space Systems
• What are the basic properties of a state-space model, and how do
we analyze these?
• Time Domain Interpretations
• System Modes

Copyright 2001 by Jonathan How.


Fall 2001 16.31 10–1

• Forced Solution
– Consider a scalar case:
ẋ = ax + bu, x(0) given
 t
at
⇒ x(t) = e x(0) + ea(t−τ ) bu(τ )dτ
0

where did this come from?


1. ẋ − ax = bu
d
2. e−at [ẋ − ax] = dt (e
−at
x(t)) = e−atbu(t)
t d −aτ −at
t
3. 0 dτ
e x(τ )dτ =e x(t) − x(0) = 0
e−aτ bu(τ )dτ

• Forced Solution – Matrix case:


ẋ = Ax + Bu
where x is an n-vector and u is a m-vector

• Just follow the same steps as above to get


 t
x(t) = eAt x(0) + eA(t−τ ) Bu(τ )dτ
0

and if y = Cx + Du, then


 t
y(t) = CeAt x(0) + CeA(t−τ ) Bu(τ )dτ + Du(t)
0

– CeAt x(0) is the initial response


– CeA(t) B is the impulse response of the system.
Fall 2001 16.31 10–2

• Have seen the key role of eAt in the solution for x(t)
– Determines the system time response
– But would like to get more insight!
• Consider what happens if the matrix A is diagonalizable, i.e. there exists a
T such that
 
λ1
T −1AT = Λ which is diagonal Λ =  ... 
λn
Then
eAt = T eΛt T −1
where  
eλ1 t
eΛt =  ... 
eλn t

• Follows since eAt = I + At + 2!1 (At)2 + . . . and that A = T ΛT −1 , so we can


show that
1
eAt = I + At + (At)2 + . . .
2!
1
= I + T ΛT −1t + (T ΛT −1t)2 + . . .
2!
Λt −1
= Te T

• This is a simpler way to get the matrix exponential, but how find T and λ?
– Eigenvalues and Eigenvectors
Fall 2001 16.31 10–3

Eigenvalues and Eigenvectors


• Recall that the eigenvalues of A are the same as the roots of the characteristic
equation (page 9–1)
• λ is an eigenvalue of A if
det(λI − A) = 0
which is true iff there exists a nonzero v (eigenvector) for which
(λI − A)v = 0 ⇒ Av = λv

• Repeat the process to find all of the eigenvectors. Assuming that the n
eigenvectors are linearly independent
Avi = λi vi i = 1, . . . , n
 
λ1
   
A v1 · · · vn = v1 · · · vn  ... 
λn
AT = T Λ ⇒ T −1AT = Λ

• One word of caution: Not all matrices are diagonalizable


0 1
A= det(sI − A) = s2
0 0
only one eigenvalue s = 0 (repeated twice). The eigenvectors solve

0 1 r1
=0
0 0 r2

r1
eigenvectors are of the form , r1 = 0 → would only be one.
0
• Need the Jordan Normal Form to handle this case (section 3.7.3)
Fall 2001 16.31 10–4
Mechanics
 
−1 1
• Consider A =  
−8 5
 
s+1 −1
(sI − A) =  
8 s−5

det(sI − A) = (s + 1)(s − 5) + 8 = s2 − 4s + 3 = 0
so the eigenvalues are s1 = 1 and s2 = 3
• Eigenvectors (sI − A)v = 0
 
s+1 −1

v11
(s1I − A)v1 =   =0
8 s−5 v21
s=1
 
2 −1

  v11
=0 2v11 − v21 = 0, ⇒ v21 = 2v11
8 −4 v21

v11 is then arbitrary (= 0), so set v11 = 1


1
v1 =
2

 
4 −1

v12
(s2I − A)v2 =   =0 4v12 − v22 = 0, ⇒ v22 = 4v12
8 −2 v22

1
v2 =
4
• Confirm that Avi = λi vi
Fall 2001 16.31 10–5

Dynamic Interpretation
• Since A = T ΛT −1 , then
   λ1 t  
| | e − w1T −
eAt = T eΛt T −1 =  v1 · · · vn   ...  ..
. 
| | eλn t − wnT −
where we have written
 
− w1T −
T −1 = ..
. 
− wnT −
which is a column of rows.
• Multiply this expression out and we get that

n

eAt = eλi t vi wiT


i=1

• Assume A diagonalizable, then ẋ = Ax, x(0) given, has solution


x(t) = eAt x(0) = T eΛt T −1x(0)
n
= eλi t vi{wiT x(0)}
i=1
n
= eλi t viβi
i=1

• State solution is a linear combination of the system modes vi eλi

eλi t – Determines the nature of the time response


vi – Determines extent to which each state contributes to that mode
βi – Determines extent to which the initial condition excites the mode
Fall 2001 16.31 10–6

• Note that the vi give the relative sizing of the response of each part of the
state vector to the response.

1 −t
v1 (t) = e mode 1
0

0.5
v2(t) = e−3t mode 2
0.5
• Clearly eλi t gives the time modulation
– λi real – growing/decaying exponential response
– λi complex – growing/decaying exponential damped sinusoidal

• Bottom line: The locations of the eigenvalues determine the pole locations
for the system, thus:
– They determine the stability and/or performance & transient behavior
of the system.

– It is their locations that we will want to modify when we start


the control work
Fall 2001 16.31 10–7
Zeros in State Space Models
• Roots of the transfer function numerator are called the system zeros.
– Need to develop a similar way of defining/computing them using a state
space model.

• Zero: is a generalized frequency s0 for which the system can have a non-zero
input u(t) = u0es0 t , but exactly zero output y(t) ≡ 0 ∀t
– Note that there is a specific initial condition associated with this response
x0, so the state response is of the form x(t) = x0es0 t
u(t) = u0es0 t ⇒ x(t) = x0es0 t ⇒ y(t) ≡ 0

• Given ẋ = Ax + Bu, substitute the above to get:


  x0
x0s0 es0 t = Ax0es0 t + Bu0 es0 t ⇒ s0 I − A −B =0
u0

• Also have that y = Cx + Du = 0 which gives:


  x0
Cx0es0 t + Du0 es0 t = 0 → C D =0
u0

• So we must solve for the s0 that solves: or



s0 I − A −B x0
=0
C D u0
– This is a generalized eigenvalue problem that can be solved in
MATLAB r using eig.m or tzero.m 2

r
2 MATLAB is a trademark of the Mathworks Inc.
Fall 2001 16.31 10–8

• Is a zero at the frequency s0 if there exists a non-trivial solution of


s0 I − A −B
det =0
C D
– Compare with equation on page 9–1

x0
• Key Point: Zeros have both a direction and a frequency s0
u0
– Just as we would associate a direction (eigenvector) with each pole (fre-
quency λi )

s+2
• Example: G(s) = s2 +7s+12
 
−7 −12

1  
A=  B= C= 1 2 D=0
1 0 0
 

s0 + 7 12 −1
s0 I − A −B
det = det  −1 s0 0 
C D
1 2 0
= (s0 + 7)(0) + 1(2) + 1(s0) = s0 + 2 = 0
so there is clearly a zero at s0 = −2, as we expected. For the directions,
solve:
      
s0 + 7 12 −1 x01 5 12 −1 x01
 −1 s0 0   x02  =  −1 −2 0   x02  = 0?
1 2 0 s =−2 u0 1 2 0 u0
0

gives x01 = −2x02 and u0 = 2x02 so that with x02 = 1


−2
x0 = and u = 2e−2t
1
Fall 2001 16.31 10–9

• Further observations: apply the specified control input in the frequency


domain, so that
Y1(s) = G(s)U (s)
where u = 2e−2t, so that U (s) = 2
s+2

s+2 2 2
Y1(s) = · =
s2 + 7s + 12 s + 2 s2 + 7s + 12
Say that s = −2 is a blocking zero or a transmission zero.

• The response Y (s) is clearly non-zero, but it does not contain a component
at the input frequency s = −2. That input has been “blocked”.

• Note that the output response left in Y1 (s) is of a very special form – it
corresponds to the (negative of the) response you would see from the system
 T
with u(t) = 0 and x0 = −2 1
Y2 (s) = C(sI − A)−1x0

  s + 7 12 −1 −2
= 1 −2
−1 s 1

  s −12 −2 1
= 1 −2 2
1 s+7 1 s + 7s + 12
−2
= 2
s + 7s + 12

• So then the total output is Y (s) = Y1 (s) + Y2 (s) showing that Y (s) = 0 →
y(t) = 0, as expected.
Fall 2001 16.31 10–10

• Summary of Zeros: Great feature of solving for zeros using the generalized
eigenvalue matrix condition is that it can be used to find MIMO zeros of
a system with multiple inputs/outputs.

s0 I − A −B
det =0
C D

• Need to be very careful when we find MIMO zeros that have the same fre-
quency as the poles of the system, because it is not obvious that a pole/zero
cancellation will occur (for MIMO systems).
– The zeros have a directionality associated with them, and that must
“agree” as well, or else you do not get cancellation
– More on this topic later.

• Relationship to transfer function matrix:

– If z is a zero with (right) direction [ζ T , ũT ]T , then



zI − A −B ζ
=0
C D ũ

– If z not an eigenvalue of A, then ζ = (zI − A)−1B ũ, which gives


 
C(zI − A)−1B + D ũ = G(z)ũ = 0

– Which implies that G(s) loses rank at s = z


– If G(s) is square, can test: det G(s) = 0

– If any of the resulting roots are also eigenvalues of A, need to re-check


the generalized eigenvalue matrix condition.
Fall 2001 16.31 10–11

• Note that the transfer function matrix (TFM) notion is a MIMO general-
ization of the SISO transfer function
– It is a matrix of transfer functions
 
g11(s) · · · g1m (s)
G(s) =  ... 
gp1(s) · · · gpm (s)
– where gij (s) relates the input of actuator j to the output of sensor i.

• Example:  
1
0
 s+1 
 
G(s) =  
 1 s−2 
s−2 s+2

• It is relatively easy to go from a state-space model to a TFM, but not


obvious how to go back the other way.

• Note: we have to be careful how to analyze these TFM’s.


– Just looking at the individual transfer functions is not useful.
– Need to look at the system as a whole – will develop a new tool based
on the singular values of G(s)
Topic #11

16.31 Feedback Control

State-Space Systems
• State-space model features
• Observability
• Controllability
• Minimal Realizations

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 11—1

State-Space Model Features


• There are some key characteristics of a state-space model that we
need to identify.
— Will see that these are very closely associated with the concepts
of pole/zero cancellation in transfer functions.
• Example: Consider a simple system
6
G(s) =
s+2
for which we develop the state-space model
Model # 1 ẋ = −2x + 2u
y = 3x

• But now consider the new state space model x̄ = [x x2]T


 
−2 0 ∙ ¸
Model # 2 x̄˙ =   x̄ + 2 u
0 −1 1
£ ¤
y = 3 0 x̄
which is clearly different than the first model.
• But let’s looks at the transfer function of the new model:
Ḡ(s) = C(sI − A)−1B + D
Fall 2001 16.31 11—2

• This is a bit strange, because previously our figure of merit when


comparing one state-space model to another (page 8-8) was whether
they reproduced the same same transfer function
— Now we have two very different models that result in the same
transfer function
— Note that I showed the second model as having 1 extra state,
but I could easily have done it with 99 extra states!!

• So what is going on?


— The clue is that the dynamics associated with the second state
of the model x2 were eliminated when we formed the product
" 2 #
£ ¤ s+2
Ḡ(s) = 3 0 1
s+1
because the A is decoupled and there is a zero in the C matrix
— Which is exactly the same as saying that there is a pole-zero
cancellation in the transfer function G̃(s)
6 6(s + 1)
= , G̃(s)
s + 2 (s + 2)(s + 1)
— Note that model #2 is one possible state-space model of G̃(s)
(has 2 poles)

• For this system we say that the dynamics associated with the second
state are unobservable using this sensor (defines the C matrix).
— There could be a lot “motion” associated with x2, but we would
be unware of it using this sensor.
Fall 2001 16.31 11—3

• There is an analogous problem on the input side as well. Consider:


Model # 1 ẋ = −2x + 2u
y = 3x
with x̄ = [ x x2]T
 
−2 0 ∙ ¸
2
Model # 3 x̄˙ =   x̄ + u
0 −1 0
£ ¤
y = 3 2 x̄
which is also clearly different than model #1, and has a different
form from the second model.
  −1
−2 0 ∙ ¸
£ ¤ 2
Ĝ(s) = 3 2 sI −  
0 −1 0
∙ ¸
£ 3 2
¤ 2 6
= s+2 s+1 = !!
0 s+2
• Once again the dynamics associated with the pole at s = −1 are
cancelled out of the transfer function.
— But in this case it occurred because there is a 0 in the B matrix
£ ¤
• So in this case we can “see” the state x2 in the output C = 3 2 ,
∙ ¸
2
but we cannot “influence” that state with the input since B =
0
• So we say that the dynamics associated with the second state are
uncontrollable using this actuator (defines the B matrix).
Fall 2001 16.31 11—4

• Of course it can get even worse because we could have


 
−2 0 ∙ ¸
x̄˙ =   x̄ + 2 u
0 −1 0
£ ¤
y = 3 0 x̄

• So now we have
  −1
−2 0 ∙ ¸
£ ¤ 2
]
G(s) = 3 0 sI −  
0 −1 0
∙ ¸
£ 3 0
¤ 2 6
= s+2 s+1 = !!
0 s+2
• Get same result for the transfer function, but now the dynamics
associated with x2 are both unobservable and uncontrollable.

• Summary:
Dynamics in the state-space model that are uncontrollable, un-
observable, or both do not show up in the transfer function.

• Would like to develop models that only have dynamics that are
both controllable and observable
V called a minimal realization
— It is has the lowest possible order for the given transfer function.

• But first need to develop tests to determine if the models are ob-
servable and/or controllable
Fall 2001 16.31 11—5

Observability
• Definition: An LTI system is observable if the initial state
x(0) can be uniquely deduced from the knowledge of the input u(t)
and output y(t) for all t between 0 and any T > 0.
— If x(0) can be deduced, then we can reconstruct x(t) exactly
because we know u(t) V we can find x(t) ∀ t.
— Thus we need only consider the zero-input (homogeneous) solu-
tion to study observability.

y(t) = CeAt x(0)

• This definition of observability is consistent with the notion we used


before of being able to “see” all the states in the output of the
decoupled examples
— ROT: For those decoupled examples, if part of the state cannot
be “seen” in y(t), then it would be impossible to deduce that
part of x(0) from the outputs y(t).
Fall 2001 16.31 11—6

• Definition: A state x? 6= 0 is said to be unobservable if the


zero-input solution y(t), with x(0) = x?, is zero for all t ≥ 0
— Equivalent to saying that x? is an unobservable state if
CeAt x? = 0 ∀ t ≥ 0

• For the problem we were just looking at, consider Model #2 with
x? = [ 0 1 ]T 6= 0, then
 
−2 0 ∙ ¸
x̄˙ =   x̄ + 2 u
0 −1 1
£ ¤
y = 3 0 x̄
so
∙ −2t ¸∙ ¸
£¤ e 0 0
CeAtx? = 3 0
0 e−t 1
∙ ¸
£ ¤ 0
= 3e−2t 0 =0∀t
1

So, x? = [ 0 1 ]T is an unobservable state for this system.

• But that is as expected, because we knew there was a problem with


the state x2 from the previous analysis
Fall 2001 16.31 11—7

• Theorem: An LTI system is observable iff it has no


unobservable states.
— We normally just say that the pair (A,C) is observable.

• Pseudo-Proof: Let x? 6= 0 be an unobservable state and compute


the outputs from the initial conditions x1(0) and x2(0) = x1(0) + x?
— Then

y1(t) = CeAtx1(0) and y2(t) = CeAtx2(0)


but

— Thus 2 different initial conditions give the same output y(t), so it


would be impossible for us to deduce the actual initial condition
of the system x1(t) or x2(t) given y1(t)

• Testing system observability by searching for a vector x(0) such that


CeAtx(0) = 0 ∀ t is feasible, but very hard in general.
— Better tests are available.
Fall 2001 16.31 11—8

• Theorem: The vector x? is an unobservable state if


 
C
 CA 
 
 2  ?
 CA  x = 0
 ... 
 
CAn−1

• Pseudo-Proof: If x? is an unobservable state, then by definition,


CeAtx? = 0 ∀t≥0
But all the derivatives of CeAt exist and for this condition to hold,
all derivatives must be zero at t = 0. Then
¯
At ? ¯
Ce x t=0 = 0 ⇒ Cx? = 0
¯
d At ?¯¯
Ce x ¯ =0 ⇒
dt t=0
¯
d2 At ?¯¯
Ce x ¯ = 0 ⇒
dt2 t=0

...
¯
d k ¯
At ? ¯
Ce x ¯ =0 ⇒
dtk t=0

• We only need retain up to the n − 1th derivative because of the


Cayley-Hamilton theorem.
Fall 2001 16.31 11—9

• Simple test: Necessary and sufficient condition for observability


is that  
C
 CA 
 
 2 
rank Mo , rank  CA  = n
 ... 
 
CAn−1

• Why does this make sense?


— The requirement for an unobservable state is that for x? 6= 0
Mox? = 0
— Which is equivalent to saying that x? is orthogonal to each row
of Mo.
— But if the rows of Mo are considered to be vectors and these
span the full n-dimensional space, then it is not possible
to find an n-vector x? that is orthogonal to each of these.
— To determine if the n rows of Mo span the full n-dimensional
space, we need to test their linear independence, which is
equivalent to the rank test1.

1Let M be a m × p matrix, then the rank of M satisfies:


1. rank M ≡ number of linearly independent columns of M
2. rank M ≡ number of linearly independent rows of M
3. rank M ≤ min{m, p}
Topic #12

16.31 Feedback Control

State-Space Systems
• State-space model features
• Controllability

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 12—1

Controllability

• Definition: An LTI system is controllable if, for every x?(t)


and every T > 0, there exists an input function u(t), 0 < t ≤ T ,
such that the system state goes from x(0) = 0 to x(T ) = x?.

— Starting at 0 is not a special case — if we can get to any state


in finite time from the origin, then we can get from any initial
condition to that state in finite time as well.

— Need only consider the forced solution to study controllability.


Z t
x(t) =
eA(t−τ )Bu(τ )dτ
0

— Change of variables τ2 = t − τ , dτ = −dτ2 gives


Z t
x(t) =
eAτ2 Bu(t − τ2)dτ2
0

• This definition of observability is consistent with the notion we used


before of being able to “influence” all the states in the system in the
decoupled examples we looked at before.

— ROT: For those decoupled examples, if part of the state cannot


be “influenced” by u(t), then it would be impossible to move
that part of the state from 0 to x?
Fall 2001 16.31 12—2

• Definition: A state x? 6= 0 is said to be uncontrollable if the


forced state response x(t) is orthogonal to x? ∀ t > 0 and all input
functions.
— “You cannot get there from here”

• This is equivalent to saying that x? is an uncontrollable state if


Z t
(x?)T
eAτ2 Bu(t − τ2)dτ2
0
Z t
=
(x?)T eAτ2 Bu(t − τ2)dτ2 = 0
0

• Since this identity must hold for all input functions u(t − τ2), this
can only be true if
(x?)T eAtB ≡ 0 ∀ t ≥ 0
Fall 2001 16.31 12—3

• For the problem we were just looking at, consider Model #3 with
x? = [ 0 1 ]T 6= 0, then
 
−2 0 ∙ ¸
Model # 3 x̄˙ =   x̄ + 2 u
0 −1 0
£ ¤
y =
3 2 x̄
so

∙ −2t ¸∙ ¸
£ ¤ e 0 2
(x?)T eAtB = 0 1
0 e−t 0
∙ ¸
£
¤ 2
=
0
e−t =0 ∀t
0

So x? = [ 0 1 ]T is an uncontrollable state for this system.

• But that is as expected, because we knew there was a problem with


the state x2 from the previous analysis
Fall 2001 16.31 12—4

• Theorem: An LTI system is controllable iff it has no


uncontrollable states.
— We normally just say that the pair (A,B) is controllable.
Pseudo-Proof: The theorem essentially follows by the definition
of an uncontrollable state.
— If you had an uncontrollable state x?, then it is orthogonal to the
forced response state x(t), which means that the system cannot
reach it in finite time ; the system would be uncontrollable.

• Theorem: The vector x? is an uncontrollable state iff


£ ¤
(x?)T B AB A2B · · · An−1B = 0
— See page 81.

• Simple test: Necessary and sufficient condition for controllability


is that
£ ¤
rank Mc , rank B AB A2B · · · An−1B = n
Fall 2001 Examples 16.31 12—5
 
−2 0 ∙ ¸
2
With Model # 2: x̄˙ =   x̄ + u
0 −1 1
¤
£
y = 3 0 x̄
∙ ¸ ∙ ¸
C 3 0
M0 = =
CA −6 0
∙ ¸
£ ¤ 2 −4
Mc = B AB =
1 −1
— rank M0 = 1 and rank Mc = 2
— So this model of the system is controllable, but not observable.

 
−2 0 ∙ ¸
2
With Model # 3: x̄˙ =   x̄ + u
0 −1 0
£¤
y = 3 2 x̄
∙ ¸ ∙ ¸
C 3 2
M0 = =
CA −6 −2
∙ ¸
£ ¤ 2 −4
Mc = B AB =
0 0
— rank M0 = 2 and rank Mc = 1
— So this model of the system is observable, but not controllable.

• Note that controllability/observability are not intrinsic properties


of a system. Whether the model has them or not depends on the
representation that you choose.
— But they indicate that something else more fundamental is wrong...
Fall 2001 16.31 12—6

Example: Loss of Observability


• Typical scenario: consider system G(s) of the form
1 s+a
u →

→y
s + a x1 s + 1 x2
so that

s + a
1

G(s) =
·

s + 1
s + a

• Clearly a pole-zero cancelation in this system (pole s = −a)

• The state space model for the system is:


ẋ1 = −ax1 + u
ẋ2 = −x2 + (a − 1)x2
y = x1 + x2


−a 0
∙ ¸
1 £ ¤
⇒ A= 
 , B =
, C= 1 1 , D=0
a − 1 −1
0

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C 1 1
rank
= rank =1<n=2
CA −1 −1
∙ ¸
£ ¤ 1 −2
rank
B AB = rank =2
0 1

• System controllable, but unobservable. Consistent with the picture:


— Both states can be influenced by u
— But e−at mode dynamics canceled out of the output by the zero.
Fall 2001 16.31 12—7

Example: Loss of Controllability


• Repeat the process, but now use the system G(s) of the form
s+a 1
u →

→y
s + 1 x2 s + a x1
so that

1
s + a

G(s) =
·

s + a
s + 1

• Still a pole-zero cancelation in this system (pole s = −a)


• The state space model for the system is:
ẋ1 = −ax1 + x2 + u
ẋ2 = −x2 + (a − 1)u
y = x1


−a 1 ∙
¸
1 £ ¤
⇒ A2 = 
 , B2 =
, C2 = 1 0 , D2 = 0
0 −1 a−1

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C2 1 0
rank
= rank =2
C2A2 −2 1
∙ ¸
£ ¤ 1 −1
rank
B2 A2B2 = rank =1<n=2
1 −1

• System observable, but uncontrollable. Consistent with the picture:


— u can influence state x2, but effect on x1 canceled by zero
— Both states can be seen in the output (x1 directly, and x2 because
it drives the dynamics associated with x1)
Fall 2001 16.31 12—8

Modal Tests
• Earlier examples showed the relative simplicity of testing observ­
ability/controllability for system with a decoupled A matrix.

• There is, of course, a very special decoupled form for the state-space
model: the Modal Form (8—5)

• Assuming that we are given the model


ẋ = Ax + Bu
y = Cx + Du
and the A is diagonalizable (A = T ΛT −1) using the transformation
 

| |
T =
 v1 · · · vn 

| |
based on the eigenvalues of A. Note that we wrote:


− w1T −
T −1 =

... 

− wnT −
which is a column of rows.

• Then define a new state so that x = T z, then


z˙ = T −1ẋ = T −1(Ax + Bu) = (T −1AT )z + T −1Bu
= Λz + T −1Bu
y = Cx + Du = CT z + Du
Fall 2001 16.31 12—9

• The new model in the state z is diagonal. There is no coupling in


the dynamics matrix Λ.

• But by definition, 

w1T
T −1B =  ...  B
wnT
and £ ¤
CT = C v1 · · · vn

• Thus if it turned out that


wiT B ≡ 0
then that element of the state vector zi would be uncontrollable
by the input u.

• Also, if
Cvj ≡ 0
then that element of the state vector zj would be unobservable
with this sensor.

• Thus, all modes of the system are controllable and ob-


servable if it can be shown that
wiT B 6= 0 ∀ i
and
Cvj 6= 0 ∀ j
Fall 2001 16.31 12—10

Cancelation
• Examples show the close connection between pole-zero cancelation
and loss of observability and controllability. Can be strengthened.

• Theorem: The mode (λi, vi ) of a system (A, B, C,∙D) ¸is unob­


vi
servable iff the system has a zero at λi with direction .
0

• Proof: If the system is unobservable at λi, then we know


(λiI − A)vi = 0 It is a mode
Cvi = 0 That mode is unobservable
Combine to get: ∙ ¸
(λi I − A)
vi = 0
C
Or ∙ ¸
∙ ¸
(λiI − A) −B vi
=0
C D 0
which implies that
∙ the
¸ system has a zero at that frequency as well,
v
with direction
i .
0

• Can repeat the process looking£


for los¤s of controllability, but now
using zeros with left direction
wiT 0 .

Fall 2001 16.31 12—11

• Combined Definition: when a MIMO zero causes loss of ei­


ther observability or controllability we say that there is a pole/zero
cancelation.

— MIMO pole-zero (right direction generalized eigenvector) cance­


lation ⇔ mode is unobservable

— MIMO pole-zero (left direction generalized eigenvector) cancela­


tion ⇔ mode is uncontrollable

• Note: This cancelation requires an agreement of both the fre­


quency
∙ and
¸ the directionality of the system mode (eigenvector) and
v £ ¤
zero
i or wiT 0 .
0
Fall 2001 16.31 12—12

Weaker Conditions
• Often it is too much to assume that we will have full observability
and controllability. Often have to make do with the following:

• A system is called detectable if all unstable modes


are observable

• A system is called stabilizable if all unstable modes


are controllable

• So if you had a stabilizable and detectable system, there could be


dynamics that you are not aware of and cannot influence, but you
know that they are at least stable.
Topic #12

16.31 Feedback Control

State-Space Systems
• State-space model features
• Controllability

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 12—1

Controllability

• Definition: An LTI system is controllable if, for every x?(t)


and every T > 0, there exists an input function u(t), 0 < t ≤ T ,
such that the system state goes from x(0) = 0 to x(T ) = x?.

— Starting at 0 is not a special case — if we can get to any state


in finite time from the origin, then we can get from any initial
condition to that state in finite time as well.

— Need only consider the forced solution to study controllability.


Z t
x(t) =
eA(t−τ )Bu(τ )dτ
0

— Change of variables τ2 = t − τ , dτ = −dτ2 gives


Z t
x(t) =
eAτ2 Bu(t − τ2)dτ2
0

• This definition of observability is consistent with the notion we used


before of being able to “influence” all the states in the system in the
decoupled examples we looked at before.

— ROT: For those decoupled examples, if part of the state cannot


be “influenced” by u(t), then it would be impossible to move
that part of the state from 0 to x?
Fall 2001 16.31 12—2

• Definition: A state x? 6= 0 is said to be uncontrollable if the


forced state response x(t) is orthogonal to x? ∀ t > 0 and all input
functions.
— “You cannot get there from here”

• This is equivalent to saying that x? is an uncontrollable state if


Z t
(x?)T
eAτ2 Bu(t − τ2)dτ2
0
Z t
=
(x?)T eAτ2 Bu(t − τ2)dτ2 = 0
0

• Since this identity must hold for all input functions u(t − τ2), this
can only be true if
(x?)T eAtB ≡ 0 ∀ t ≥ 0
Fall 2001 16.31 12—3

• For the problem we were just looking at, consider Model #3 with
x? = [ 0 1 ]T 6= 0, then
 
−2 0 ∙ ¸
Model # 3 x̄˙ =   x̄ + 2 u
0 −1 0
£ ¤
y =
3 2 x̄
so

∙ −2t ¸∙ ¸
£ ¤ e 0 2
(x?)T eAtB = 0 1
0 e−t 0
∙ ¸
£
¤ 2
=
0
e−t =0 ∀t
0

So x? = [ 0 1 ]T is an uncontrollable state for this system.

• But that is as expected, because we knew there was a problem with


the state x2 from the previous analysis
Fall 2001 16.31 12—4

• Theorem: An LTI system is controllable iff it has no


uncontrollable states.
— We normally just say that the pair (A,B) is controllable.
Pseudo-Proof: The theorem essentially follows by the definition
of an uncontrollable state.
— If you had an uncontrollable state x?, then it is orthogonal to the
forced response state x(t), which means that the system cannot
reach it in finite time ; the system would be uncontrollable.

• Theorem: The vector x? is an uncontrollable state iff


£ ¤
(x?)T B AB A2B · · · An−1B = 0
— See page 81.

• Simple test: Necessary and sufficient condition for controllability


is that
£ ¤
rank Mc , rank B AB A2B · · · An−1B = n
Fall 2001 Examples 16.31 12—5
 
−2 0 ∙ ¸
2
With Model # 2: x̄˙ =   x̄ + u
0 −1 1
¤
£
y = 3 0 x̄
∙ ¸ ∙ ¸
C 3 0
M0 = =
CA −6 0
∙ ¸
£ ¤ 2 −4
Mc = B AB =
1 −1
— rank M0 = 1 and rank Mc = 2
— So this model of the system is controllable, but not observable.

 
−2 0 ∙ ¸
2
With Model # 3: x̄˙ =   x̄ + u
0 −1 0
£¤
y = 3 2 x̄
∙ ¸ ∙ ¸
C 3 2
M0 = =
CA −6 −2
∙ ¸
£ ¤ 2 −4
Mc = B AB =
0 0
— rank M0 = 2 and rank Mc = 1
— So this model of the system is observable, but not controllable.

• Note that controllability/observability are not intrinsic properties


of a system. Whether the model has them or not depends on the
representation that you choose.
— But they indicate that something else more fundamental is wrong...
Fall 2001 16.31 12—6

Example: Loss of Observability


• Typical scenario: consider system G(s) of the form
1 s+a
u →

→y
s + a x1 s + 1 x2
so that

s + a
1

G(s) =
·

s + 1
s + a

• Clearly a pole-zero cancelation in this system (pole s = −a)

• The state space model for the system is:


ẋ1 = −ax1 + u
ẋ2 = −x2 + (a − 1)x2
y = x1 + x2


−a 0
∙ ¸
1 £ ¤
⇒ A= 
 , B =
, C= 1 1 , D=0
a − 1 −1
0

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C 1 1
rank
= rank =1<n=2
CA −1 −1
∙ ¸
£ ¤ 1 −2
rank
B AB = rank =2
0 1

• System controllable, but unobservable. Consistent with the picture:


— Both states can be influenced by u
— But e−at mode dynamics canceled out of the output by the zero.
Fall 2001 16.31 12—7

Example: Loss of Controllability


• Repeat the process, but now use the system G(s) of the form
s+a 1
u →

→y
s + 1 x2 s + a x1
so that

1
s + a

G(s) =
·

s + a
s + 1

• Still a pole-zero cancelation in this system (pole s = −a)


• The state space model for the system is:
ẋ1 = −ax1 + x2 + u
ẋ2 = −x2 + (a − 1)u
y = x1


−a 1 ∙
¸
1 £ ¤
⇒ A2 = 
 , B2 =
, C2 = 1 0 , D2 = 0
0 −1 a−1

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C2 1 0
rank
= rank =2
C2A2 −2 1
∙ ¸
£ ¤ 1 −1
rank
B2 A2B2 = rank =1<n=2
1 −1

• System observable, but uncontrollable. Consistent with the picture:


— u can influence state x2, but effect on x1 canceled by zero
— Both states can be seen in the output (x1 directly, and x2 because
it drives the dynamics associated with x1)
Fall 2001 16.31 12—8

Modal Tests
• Earlier examples showed the relative simplicity of testing observ­
ability/controllability for system with a decoupled A matrix.

• There is, of course, a very special decoupled form for the state-space
model: the Modal Form (8—5)

• Assuming that we are given the model


ẋ = Ax + Bu
y = Cx + Du
and the A is diagonalizable (A = T ΛT −1) using the transformation
 

| |
T =
 v1 · · · vn 

| |
based on the eigenvalues of A. Note that we wrote:


− w1T −
T −1 =

... 

− wnT −
which is a column of rows.

• Then define a new state so that x = T z, then


z˙ = T −1ẋ = T −1(Ax + Bu) = (T −1AT )z + T −1Bu
= Λz + T −1Bu
y = Cx + Du = CT z + Du
Fall 2001 16.31 12—9

• The new model in the state z is diagonal. There is no coupling in


the dynamics matrix Λ.

• But by definition, 

w1T
T −1B =  ...  B
wnT
and £ ¤
CT = C v1 · · · vn

• Thus if it turned out that


wiT B ≡ 0
then that element of the state vector zi would be uncontrollable
by the input u.

• Also, if
Cvj ≡ 0
then that element of the state vector zj would be unobservable
with this sensor.

• Thus, all modes of the system are controllable and ob-


servable if it can be shown that
wiT B 6= 0 ∀ i
and
Cvj 6= 0 ∀ j
Fall 2001 16.31 12—10

Cancelation
• Examples show the close connection between pole-zero cancelation
and loss of observability and controllability. Can be strengthened.

• Theorem: The mode (λi, vi ) of a system (A, B, C,∙D) ¸is unob­


vi
servable iff the system has a zero at λi with direction .
0

• Proof: If the system is unobservable at λi, then we know


(λiI − A)vi = 0 It is a mode
Cvi = 0 That mode is unobservable
Combine to get: ∙ ¸
(λi I − A)
vi = 0
C
Or ∙ ¸
∙ ¸
(λiI − A) −B vi
=0
C D 0
which implies that
∙ the
¸ system has a zero at that frequency as well,
v
with direction
i .
0

• Can repeat the process looking£


for los¤s of controllability, but now
using zeros with left direction
wiT 0 .

Fall 2001 16.31 12—11

• Combined Definition: when a MIMO zero causes loss of ei­


ther observability or controllability we say that there is a pole/zero
cancelation.

— MIMO pole-zero (right direction generalized eigenvector) cance­


lation ⇔ mode is unobservable

— MIMO pole-zero (left direction generalized eigenvector) cancela­


tion ⇔ mode is uncontrollable

• Note: This cancelation requires an agreement of both the fre­


quency
∙ and
¸ the directionality of the system mode (eigenvector) and
v £ ¤
zero
i or wiT 0 .
0
Fall 2001 16.31 12—12

Weaker Conditions
• Often it is too much to assume that we will have full observability
and controllability. Often have to make do with the following:

• A system is called detectable if all unstable modes


are observable

• A system is called stabilizable if all unstable modes


are controllable

• So if you had a stabilizable and detectable system, there could be


dynamics that you are not aware of and cannot influence, but you
know that they are at least stable.
Topic #12

16.31 Feedback Control

State-Space Systems
• State-space model features
• Controllability

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 12—1

Controllability

• Definition: An LTI system is controllable if, for every x?(t)


and every T > 0, there exists an input function u(t), 0 < t ≤ T ,
such that the system state goes from x(0) = 0 to x(T ) = x?.

— Starting at 0 is not a special case — if we can get to any state


in finite time from the origin, then we can get from any initial
condition to that state in finite time as well.

— Need only consider the forced solution to study controllability.


Z t
x(t) =
eA(t−τ )Bu(τ )dτ
0

— Change of variables τ2 = t − τ , dτ = −dτ2 gives


Z t
x(t) =
eAτ2 Bu(t − τ2)dτ2
0

• This definition of observability is consistent with the notion we used


before of being able to “influence” all the states in the system in the
decoupled examples we looked at before.

— ROT: For those decoupled examples, if part of the state cannot


be “influenced” by u(t), then it would be impossible to move
that part of the state from 0 to x?
Fall 2001 16.31 12—2

• Definition: A state x? 6= 0 is said to be uncontrollable if the


forced state response x(t) is orthogonal to x? ∀ t > 0 and all input
functions.
— “You cannot get there from here”

• This is equivalent to saying that x? is an uncontrollable state if


Z t
(x?)T
eAτ2 Bu(t − τ2)dτ2
0
Z t
=
(x?)T eAτ2 Bu(t − τ2)dτ2 = 0
0

• Since this identity must hold for all input functions u(t − τ2), this
can only be true if
(x?)T eAtB ≡ 0 ∀ t ≥ 0
Fall 2001 16.31 12—3

• For the problem we were just looking at, consider Model #3 with
x? = [ 0 1 ]T 6= 0, then
 
−2 0 ∙ ¸
Model # 3 x̄˙ =   x̄ + 2 u
0 −1 0
£ ¤
y =
3 2 x̄
so

∙ −2t ¸∙ ¸
£ ¤ e 0 2
(x?)T eAtB = 0 1
0 e−t 0
∙ ¸
£
¤ 2
=
0
e−t =0 ∀t
0

So x? = [ 0 1 ]T is an uncontrollable state for this system.

• But that is as expected, because we knew there was a problem with


the state x2 from the previous analysis
Fall 2001 16.31 12—4

• Theorem: An LTI system is controllable iff it has no


uncontrollable states.
— We normally just say that the pair (A,B) is controllable.
Pseudo-Proof: The theorem essentially follows by the definition
of an uncontrollable state.
— If you had an uncontrollable state x?, then it is orthogonal to the
forced response state x(t), which means that the system cannot
reach it in finite time ; the system would be uncontrollable.

• Theorem: The vector x? is an uncontrollable state iff


£ ¤
(x?)T B AB A2B · · · An−1B = 0
— See page 81.

• Simple test: Necessary and sufficient condition for controllability


is that
£ ¤
rank Mc , rank B AB A2B · · · An−1B = n
Fall 2001 Examples 16.31 12—5
 
−2 0 ∙ ¸
2
With Model # 2: x̄˙ =   x̄ + u
0 −1 1
¤
£
y = 3 0 x̄
∙ ¸ ∙ ¸
C 3 0
M0 = =
CA −6 0
∙ ¸
£ ¤ 2 −4
Mc = B AB =
1 −1
— rank M0 = 1 and rank Mc = 2
— So this model of the system is controllable, but not observable.

 
−2 0 ∙ ¸
2
With Model # 3: x̄˙ =   x̄ + u
0 −1 0
£¤
y = 3 2 x̄
∙ ¸ ∙ ¸
C 3 2
M0 = =
CA −6 −2
∙ ¸
£ ¤ 2 −4
Mc = B AB =
0 0
— rank M0 = 2 and rank Mc = 1
— So this model of the system is observable, but not controllable.

• Note that controllability/observability are not intrinsic properties


of a system. Whether the model has them or not depends on the
representation that you choose.
— But they indicate that something else more fundamental is wrong...
Fall 2001 16.31 12—6

Example: Loss of Observability


• Typical scenario: consider system G(s) of the form
1 s+a
u →

→y
s + a x1 s + 1 x2
so that

s + a
1

G(s) =
·

s + 1
s + a

• Clearly a pole-zero cancelation in this system (pole s = −a)

• The state space model for the system is:


ẋ1 = −ax1 + u
ẋ2 = −x2 + (a − 1)x2
y = x1 + x2


−a 0
∙ ¸
1 £ ¤
⇒ A= 
 , B =
, C= 1 1 , D=0
a − 1 −1
0

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C 1 1
rank
= rank =1<n=2
CA −1 −1
∙ ¸
£ ¤ 1 −2
rank
B AB = rank =2
0 1

• System controllable, but unobservable. Consistent with the picture:


— Both states can be influenced by u
— But e−at mode dynamics canceled out of the output by the zero.
Fall 2001 16.31 12—7

Example: Loss of Controllability


• Repeat the process, but now use the system G(s) of the form
s+a 1
u →

→y
s + 1 x2 s + a x1
so that

1
s + a

G(s) =
·

s + a
s + 1

• Still a pole-zero cancelation in this system (pole s = −a)


• The state space model for the system is:
ẋ1 = −ax1 + x2 + u
ẋ2 = −x2 + (a − 1)u
y = x1


−a 1 ∙
¸
1 £ ¤
⇒ A2 = 
 , B2 =
, C2 = 1 0 , D2 = 0
0 −1 a−1

• The Observability/Controllability tests are (a = 2):



¸ ∙
¸
C2 1 0
rank
= rank =2
C2A2 −2 1
∙ ¸
£ ¤ 1 −1
rank
B2 A2B2 = rank =1<n=2
1 −1

• System observable, but uncontrollable. Consistent with the picture:


— u can influence state x2, but effect on x1 canceled by zero
— Both states can be seen in the output (x1 directly, and x2 because
it drives the dynamics associated with x1)
Fall 2001 16.31 12—8

Modal Tests
• Earlier examples showed the relative simplicity of testing observ­
ability/controllability for system with a decoupled A matrix.

• There is, of course, a very special decoupled form for the state-space
model: the Modal Form (8—5)

• Assuming that we are given the model


ẋ = Ax + Bu
y = Cx + Du
and the A is diagonalizable (A = T ΛT −1) using the transformation
 

| |
T =
 v1 · · · vn 

| |
based on the eigenvalues of A. Note that we wrote:


− w1T −
T −1 =

... 

− wnT −
which is a column of rows.

• Then define a new state so that x = T z, then


z˙ = T −1ẋ = T −1(Ax + Bu) = (T −1AT )z + T −1Bu
= Λz + T −1Bu
y = Cx + Du = CT z + Du
Fall 2001 16.31 12—9

• The new model in the state z is diagonal. There is no coupling in


the dynamics matrix Λ.

• But by definition, 

w1T
T −1B =  ...  B
wnT
and £ ¤
CT = C v1 · · · vn

• Thus if it turned out that


wiT B ≡ 0
then that element of the state vector zi would be uncontrollable
by the input u.

• Also, if
Cvj ≡ 0
then that element of the state vector zj would be unobservable
with this sensor.

• Thus, all modes of the system are controllable and ob-


servable if it can be shown that
wiT B 6= 0 ∀ i
and
Cvj 6= 0 ∀ j
Fall 2001 16.31 12—10

Cancelation
• Examples show the close connection between pole-zero cancelation
and loss of observability and controllability. Can be strengthened.

• Theorem: The mode (λi, vi ) of a system (A, B, C,∙D) ¸is unob­


vi
servable iff the system has a zero at λi with direction .
0

• Proof: If the system is unobservable at λi, then we know


(λiI − A)vi = 0 It is a mode
Cvi = 0 That mode is unobservable
Combine to get: ∙ ¸
(λi I − A)
vi = 0
C
Or ∙ ¸
∙ ¸
(λiI − A) −B vi
=0
C D 0
which implies that
∙ the
¸ system has a zero at that frequency as well,
v
with direction
i .
0

• Can repeat the process looking£


for los¤s of controllability, but now
using zeros with left direction
wiT 0 .

Fall 2001 16.31 12—11

• Combined Definition: when a MIMO zero causes loss of ei­


ther observability or controllability we say that there is a pole/zero
cancelation.

— MIMO pole-zero (right direction generalized eigenvector) cance­


lation ⇔ mode is unobservable

— MIMO pole-zero (left direction generalized eigenvector) cancela­


tion ⇔ mode is uncontrollable

• Note: This cancelation requires an agreement of both the fre­


quency
∙ and
¸ the directionality of the system mode (eigenvector) and
v £ ¤
zero
i or wiT 0 .
0
Fall 2001 16.31 12—12

Weaker Conditions
• Often it is too much to assume that we will have full observability
and controllability. Often have to make do with the following:

• A system is called detectable if all unstable modes


are observable

• A system is called stabilizable if all unstable modes


are controllable

• So if you had a stabilizable and detectable system, there could be


dynamics that you are not aware of and cannot influence, but you
know that they are at least stable.
Topic #13

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we change the pole locations to?
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 13–1

Full-state Feedback Controller


• Assume that the single-input system dynamics are given by
ẋ = Ax + Bu
y = Cx
so that D = 0.
– The multi-actuator case is quite a bit more complicated as we
would have many extra degrees of freedom.

• Recall that the system poles are given by the eigenvalues of A.


– Want to use the input u(t) to modify the eigenvalues of A to
change the system dynamics.

• Assume a full-state feedback of the form:


u = r − Kx
where r is some reference input and the gain K is R1×n
– If r = 0, we call this controller a regulator

• Find the closed-loop dynamics:


ẋ = Ax + B(r − Kx)
= (A − BK)x + Br
= Acl x + Br
y = Cx
Fall 2001 16.31 13–2

• Objective: Pick K so that Acl has the desired properties, e.g.,


– A unstable, want Acl stable
– Put 2 poles at −2 ± 2j

• Note that there are n parameters in K and n eigenvalues in A, so


it looks promising, but what can we achieve?

• Example #1: Consider:


   
1 1 1
ẋ = x+ u
1 2 0

– Then
det(sI − A) = (s − 1)(s − 2) − 1 = s2 − 3s + 1 = 0
so the system is unstable.
 
– Define u = − k1 k2 x = −Kx, then
     
1 1 1   1 − k1 1 − k2
Acl = A−BK = − k1 k2 =
1 2 0 1 2

– So then we have that


det(sI − Acl ) = s2 + (k1 − 3)s + (1 − 2k1 + k2) = 0

– Thus, by choosing k1 and k2, we can put λi(Acl ) anywhere in


the complex plane (assuming complex conjugate pairs of poles).
Fall 2001 16.31 13–3

• To put the poles at s = −5, −6, compare the desired characteristic


equation
(s + 5)(s + 6) = s2 + 11s + 30 = 0
with the closed-loop one
s2 + (k1 − 3)x + (1 − 2k1 + k2) = 0
to conclude that

k1 − 3 = 11 k1 = 14
1 − 2k1 + k2 = 30 k2 = 57
 
so that K = 14 57 , which is called Pole Placement.

• Of course, it is not always this easy, as the issue of controllability


must be addressed.

• Example #2: Consider this system:


   
1 1 1
ẋ = x+ u
0 2 0
with the same control approach
     
1 1 1   1 − k1 1 − k2
Acl = A − BK = − k1 k2 =
0 2 0 0 2
so that
det(sI − Acl ) = (s − 1 + k1)(s − 2) = 0
So the feedback control can modify the pole at s = 1, but it cannot
move the pole at s = 2.

• The system cannot be stabilized with full-state feed-


back control.
Fall 2001 16.31 13–4

• What is the reason for this problem?


– It is associated with loss of controllability of the e2t mode.

• Consider the basic controllability test:


     
  1 1 1 1
Mc = B AB =
0 0 2 0
So that rank Mc = 1 < 2.

• Consider the modal test to develop a little more insight:


 
1 1
A= , decompose as AV = V Λ ⇒ Λ = V −1AV
0 2
where
     
1 0 1 1 1 −1
Λ= V = V −1 =
0 2 0 1 0 1
Convert
z=V −1 x
ẋ = Ax + Bu −→ ż = Λz + V −1Bu
 T
where z = z1 z2 . But:
    
1 −1 1 1
V −1 B = =
0 1 0 0
so that the dynamics in modal form are:
   
1 0 1
ż = z+ u
0 2 0

• With this zero in the modal B-matrix, can easily see that the mode
associated with the z2 state is uncontrollable.
– Must assume that the pair (A, B) are controllable.
Fall 2001 16.31 13–5

Ackermann’s Formula

• The previous outlined a design procedure and showed how to do it


by hand for second-order systems.
– Extends to higher order (controllable) systems, but tedious.

• Ackermann’s Formula gives us a method of doing this entire


design process is one easy step.
 
K = 0 . . . 0 1 M−1
c Φd (A)

where
 
– Mc = B AB . . . A B n−1

– Φd(s) is the characteristic equation for the closed-loop poles,


which we then evaluate for s = A.
– It is explicit that the system must be controllable because
we are inverting the controllability matrix.

• Revisit example # 1: Φd(s) = s2 + 11s + 30


       
  1 1 1 1 1 1
Mc = B AB = =
0 1 2 0 0 1
So
 −1  2   

 1 1 1 1 1 1
K = 0 1 + 11 + 30I
0 1 1 2 1 2
 
  43 14  
= 0 1 = 14 57
14 57

®
• Automated in Matlab: place.m & acker.m (see polyvalm.m too)
Fall 2001 16.31 13–6

• Where did this formula come from?

• For simplicity, consider a third-order system (case #2), but this


extends to any order.
   
−a1 −a2 −a3 1  
A=  1 0 0  B= 0   C = b1 b2 b3
0 1 0 0
– See key benefit of using control canonical state-space model
– This form is useful because the characteristic equation for the
system is obvious ⇒ det(sI − A) = s3 + a1s2 + a2s + a3 = 0

• Can show that


   
−a1 −a2 −a3 1  
Acl = A − BK =  1 0 0  −  0  k1 k2 k3
0 1 0 0
 
−a1 − k1 −a2 − k2 −a3 − k3
=  1 0 0 
0 1 0
so that the characteristic equation for the system is still obvious:
Φcl (s) = det(sI − Acl )
= s3 + (a1 + k1)s2 + (a2 + k2)s + (a3 + k3) = 0
Fall 2001 16.31 13–7

• We then compare this with the desired characteristic equation de-


veloped from the desired closed-loop pole locations:
Φd(s) = s3 + (α1)s2 + (α2)s + (α3) = 0
to get that 
a1 + k1 = α1  k1 = α1 − a1
... ...

an + kn = αn kn = αn − an

• To get the specifics of the Ackermann formula, we then:


– Take an arbitrary A, B and transform it to the control canonical
form (x ❀ z = T −1x)
– Solve for the gains K̂ using the formulas above for the state z
(u = K̂z)
– Then switch back to gains needed for the state x, so that
K = K̂T −1
(u = K̂z = Kx)

• Pole placement is a very powerful tool and we will be using it for


most of this course.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #13

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we change the pole locations to?
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 13–1

Full-state Feedback Controller


• Assume that the single-input system dynamics are given by
ẋ = Ax + Bu
y = Cx
so that D = 0.
– The multi-actuator case is quite a bit more complicated as we
would have many extra degrees of freedom.

• Recall that the system poles are given by the eigenvalues of A.


– Want to use the input u(t) to modify the eigenvalues of A to
change the system dynamics.

• Assume a full-state feedback of the form:


u = r − Kx
where r is some reference input and the gain K is R1×n
– If r = 0, we call this controller a regulator

• Find the closed-loop dynamics:


ẋ = Ax + B(r − Kx)
= (A − BK)x + Br
= Acl x + Br
y = Cx
Fall 2001 16.31 13–2

• Objective: Pick K so that Acl has the desired properties, e.g.,


– A unstable, want Acl stable
– Put 2 poles at −2 ± 2j

• Note that there are n parameters in K and n eigenvalues in A, so


it looks promising, but what can we achieve?

• Example #1: Consider:


   
1 1 1
ẋ = x+ u
1 2 0

– Then
det(sI − A) = (s − 1)(s − 2) − 1 = s2 − 3s + 1 = 0
so the system is unstable.
 
– Define u = − k1 k2 x = −Kx, then
     
1 1 1   1 − k1 1 − k2
Acl = A−BK = − k1 k2 =
1 2 0 1 2

– So then we have that


det(sI − Acl ) = s2 + (k1 − 3)s + (1 − 2k1 + k2) = 0

– Thus, by choosing k1 and k2, we can put λi(Acl ) anywhere in


the complex plane (assuming complex conjugate pairs of poles).
Fall 2001 16.31 13–3

• To put the poles at s = −5, −6, compare the desired characteristic


equation
(s + 5)(s + 6) = s2 + 11s + 30 = 0
with the closed-loop one
s2 + (k1 − 3)x + (1 − 2k1 + k2) = 0
to conclude that

k1 − 3 = 11 k1 = 14
1 − 2k1 + k2 = 30 k2 = 57
 
so that K = 14 57 , which is called Pole Placement.

• Of course, it is not always this easy, as the issue of controllability


must be addressed.

• Example #2: Consider this system:


   
1 1 1
ẋ = x+ u
0 2 0
with the same control approach
     
1 1 1   1 − k1 1 − k2
Acl = A − BK = − k1 k2 =
0 2 0 0 2
so that
det(sI − Acl ) = (s − 1 + k1)(s − 2) = 0
So the feedback control can modify the pole at s = 1, but it cannot
move the pole at s = 2.

• The system cannot be stabilized with full-state feed-


back control.
Fall 2001 16.31 13–4

• What is the reason for this problem?


– It is associated with loss of controllability of the e2t mode.

• Consider the basic controllability test:


     
  1 1 1 1
Mc = B AB =
0 0 2 0
So that rank Mc = 1 < 2.

• Consider the modal test to develop a little more insight:


 
1 1
A= , decompose as AV = V Λ ⇒ Λ = V −1AV
0 2
where
     
1 0 1 1 1 −1
Λ= V = V −1 =
0 2 0 1 0 1
Convert
z=V −1 x
ẋ = Ax + Bu −→ ż = Λz + V −1Bu
 T
where z = z1 z2 . But:
    
1 −1 1 1
V −1 B = =
0 1 0 0
so that the dynamics in modal form are:
   
1 0 1
ż = z+ u
0 2 0

• With this zero in the modal B-matrix, can easily see that the mode
associated with the z2 state is uncontrollable.
– Must assume that the pair (A, B) are controllable.
Fall 2001 16.31 13–5

Ackermann’s Formula

• The previous outlined a design procedure and showed how to do it


by hand for second-order systems.
– Extends to higher order (controllable) systems, but tedious.

• Ackermann’s Formula gives us a method of doing this entire


design process is one easy step.
 
K = 0 . . . 0 1 M−1
c Φd (A)

where
 
– Mc = B AB . . . A B n−1

– Φd(s) is the characteristic equation for the closed-loop poles,


which we then evaluate for s = A.
– It is explicit that the system must be controllable because
we are inverting the controllability matrix.

• Revisit example # 1: Φd(s) = s2 + 11s + 30


       
  1 1 1 1 1 1
Mc = B AB = =
0 1 2 0 0 1
So
 −1  2   

 1 1 1 1 1 1
K = 0 1 + 11 + 30I
0 1 1 2 1 2
 
  43 14  
= 0 1 = 14 57
14 57

®
• Automated in Matlab: place.m & acker.m (see polyvalm.m too)
Fall 2001 16.31 13–6

• Where did this formula come from?

• For simplicity, consider a third-order system (case #2), but this


extends to any order.
   
−a1 −a2 −a3 1  
A=  1 0 0  B= 0   C = b1 b2 b3
0 1 0 0
– See key benefit of using control canonical state-space model
– This form is useful because the characteristic equation for the
system is obvious ⇒ det(sI − A) = s3 + a1s2 + a2s + a3 = 0

• Can show that


   
−a1 −a2 −a3 1  
Acl = A − BK =  1 0 0  −  0  k1 k2 k3
0 1 0 0
 
−a1 − k1 −a2 − k2 −a3 − k3
=  1 0 0 
0 1 0
so that the characteristic equation for the system is still obvious:
Φcl (s) = det(sI − Acl )
= s3 + (a1 + k1)s2 + (a2 + k2)s + (a3 + k3) = 0
Fall 2001 16.31 13–7

• We then compare this with the desired characteristic equation de-


veloped from the desired closed-loop pole locations:
Φd(s) = s3 + (α1)s2 + (α2)s + (α3) = 0
to get that 
a1 + k1 = α1  k1 = α1 − a1
... ...

an + kn = αn kn = αn − an

• To get the specifics of the Ackermann formula, we then:


– Take an arbitrary A, B and transform it to the control canonical
form (x ❀ z = T −1x)
– Solve for the gains K̂ using the formulas above for the state z
(u = K̂z)
– Then switch back to gains needed for the state x, so that
K = K̂T −1
(u = K̂z = Kx)

• Pole placement is a very powerful tool and we will be using it for


most of this course.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #14

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we change the pole locations to?
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 14–1

Reference Inputs
• So far we have looked at how to pick K to get the dynamics to have
some nice properties (i.e. stabilize A)

• The question remains as to how well this controller allows us to


track a reference command?
– Performance issue rather than just stability.

• Started with
ẋ = Ax + Bu y = Cx
u = r − Kx

• For good tracking performance we want


y(t) ≈ r(t) as t → ∞

• Consider this performance issue in the frequency domain. Use the


final value theorem:
lim y(t) = lim sY (s)
t→∞ s→0

Thus, for good performance, we want



Y (s) 
sY (s) ≈ sR(s) as s → 0 ⇒ =1
R(s) s=0

• So, for good performance, the transfer function from R(s) to Y (s)
should be approximately 1 at DC.
Fall 2001 16.31 14–2

• Example #1: Consider:


   
1 1 1
ẋ = x+ u
1 2 0
 
y = 1 0 x

 
– Already designed K = 14 57

– Then the closed-loop system is


ẋ = (A − BK)x + Br y = Cx

– Which gives the transfer function


Y (s)
= C (sI − (A − BK))−1 B
R(s)
   
  s + 13 56 −1 1 s−2
= 1 0 = 2
−1 s − 2 0 s + 11s + 30

• Assume that r(t) is a step, then by the FVT



Y (s)  −2
= = 1 !!
R(s)  s=0 30
– So our step response is quite poor.
Fall 2001 16.31 14–3

• One obvious solution is to scale the reference input r(t) so that


u = N̄ r − Kx
– N̄ is an extra gain used to scale the closed-loop transfer function

• Now we have
ẋ = (A − BK)x + B N̄ r , y = Cx
so that
Y (s)
= C (sI − (A − BK))−1 B N̄
R(s)

If we had made N̄ = −15, then


Y (s) −15(s − 2)
= 2
R(s) s + 11s + 30
so with a step input, y(t) → 1 as t → ∞.

• So the steady state step error is now zero, but is this OK?
– See plots – big improvement in the response, but the transient
is a bit weird.
Fall 2001 16.31 14–4

Step Response

0.8 u=r−Kx
u=Nbar r−Kx
0.6

0.4

0.2
Y output

−0.2

−0.4

−0.6

−0.8

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 1: Response to step input with and without the N̄ correction.

• Formal way to compute N̄ is to change the form of the control input.


– Consider the analysis for the response to a step input r = rss1(t)

• At steady state ẋ = 0, so we have



ẋ = Ax + Bu 0 = Axss + Buss
y = Cx yss = Cxss
and if things are going well, then yss = rss .
    
A B xss 0
=
C 0 uss rss
which can be easily solved for xss and uss.
Fall 2001 16.31 14–5

• For purposes of scaling, define:


xss ≡ Nx rss uss ≡ Nu rss

• We would then implement the control in the new form


u = N̄ r − Kx = (Nu + KNx )r − Kx
= Nu r + K(Nx r − x)
= uss + K(xss − x)
which can be visualized as:

– Use Nx to modify the reference command r to generate a feed-


forward state command to the system xss.
– Use Nu to modify the reference command r to generate a feed-
forward control input uss

• Note that this development assumed that r was constant, but it


could also be used if r is a slowly time-varying command.
– But as we have seen, the architecture is designed to give good
steady-state behavior, and it might give weird transient responses.
Fall 2001 16.31 14–6

• For our example,


 
   −1   1
xss A B 0
= =  −0.5 
uss C 0 1
−0.5
so  
1  
xss = , uss = −0.5
−0.5
and
 
  1
N̄ = Nu + KNx = −0.5 + 14 57 = −15
−0.5
as we had before.
Fall 2001 16.31 14–7
Step Response
0.06
x
1
0.04 x
2
0.02
X state

−0.02

−0.04

−0.06

−0.08
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Step Response: u=r−Kx


1
u=r−Kx
0.8

0.6
U control

0.4

0.2

−0.2

−0.4
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 2: Response to step input without the N̄ correction. The steady state x and u values are non-zero but
they are not the values that give the desired yss .
Step Response

1 x
1
x
2

0.5
X state

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Step Response: u=Nbar r−Kx


5
u=Nbar r−Kx

0
U control

−5

−10

−15
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 3: Response to step input with the N̄ correction. Gives the desired steady-state behavior, but note the
higher u(0).
Fall 2001 Examples 16.31 14–8

• Example from Problem set


8 · 14 · 20
G(s) =
(s + 8)(s + 14)(s + 20)
– Target pole locations −12 ± 12j, −20
% system
[a,b,c,d]=tf2ss(8*14*20,conv([1 8],conv([1 14],[1 20])))
% controller gains to place poles at specified locations
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
% find the feedforward gains
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 2.5714
Y output

0.6 2 216 3520

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
time (sec)

Figure 4: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–9

Closed−loop Freq Response


0
10
u=r−Kx
u=Nbar r−Kx

−1
10
cl
G

−2
10

−3
10
−1 0 1 2
10 10 10 10
Freq (rad/sec)

Figure 5: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–10

• Example from second problem set


0.94
G(s) =
s2 − 0.0297
– Target pole locations −0.25 ± 0.25j
[a,b,c,d]=tf2ss(.94,[1 0 -0.0297])
k=place(a,b,[-1+j;-1-j]/4)
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.1:30];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 0.13298
Y output

0.6 0.5 0.1547

0.4

0.2

0
0 5 10 15 20 25 30
time (sec)

Figure 6: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–11

Closed−loop Freq Response


0
10
u=r−Kx
u=Nbar r−Kx

−1
10
cl
G

−2
10

−3
10
−1 0 1 2
10 10 10 10
Freq (rad/sec)

Figure 7: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–12

• Ok, so let’s try something very challenging...


8 · 14 · 20
G(s) =
(s − 8)(s − 14)(s − 20)
– Target pole locations −12 ± 12j, −20
[a,b,c,d]=tf2ss(8*14*20,conv([1 -8],conv([1 -14],[1 -20])))
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 2.5714
Y output

0.6 86 216 8000

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
time (sec)

Figure 8: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–13

Closed−loop Freq Response


1
10
u=r−Kx
u=Nbar r−Kx

0
10

−1
cl

10
G

−2
10

−3
10
−3 −2 −1 0 1
10 10 10 10 10
Freq (rad/sec)

Figure 9: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–14

• The worst possible...


(s − 1)
G(s) =
(s + 1)(s − 3)
– Unstable, NMP!!
– Target pole locations −1 ± j
[a,b,c,d]=tf2ss([1 -1],conv([1 1],[1 -3]))
k=place(a,b,[[-1+j;-1-j]])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:10];[y,t,x]=step(sys1,t);[y2,t2,x2]=step(sys2,t);

Unstable, NMP system Step Response

u=r−Kx
u=Nbar r−Kx
1

0.8 −2
0.6 4 5
0.4

0.2
Y output

−0.2

−0.4

−0.6

−0.8

−1
0 1 2 3 4 5 6 7 8 9 10
time (sec)

Figure 10: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–15

Closed−loop Freq Response


1
10
u=r−Kx
u=Nbar r−Kx

0
10
Gcl

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 11: Closed-loop frequency response. Clearly shows that the DC gain is unity

• Full state feedback process is quite simple as it can be automated


in Matlab® using acker and/or place

• With more than 1 actuator, we have more than n degrees of freedom


in the control → we can change the eigenvectors as desired, as well
as the poles.

• The real issue now is where to put the poles...

• And to correct the fact that we cannot usually measure the state
→ develop an estimator.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #14

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we change the pole locations to?
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 14–1

Reference Inputs
• So far we have looked at how to pick K to get the dynamics to have
some nice properties (i.e. stabilize A)

• The question remains as to how well this controller allows us to


track a reference command?
– Performance issue rather than just stability.

• Started with
ẋ = Ax + Bu y = Cx
u = r − Kx

• For good tracking performance we want


y(t) ≈ r(t) as t → ∞

• Consider this performance issue in the frequency domain. Use the


final value theorem:
lim y(t) = lim sY (s)
t→∞ s→0

Thus, for good performance, we want



Y (s) 
sY (s) ≈ sR(s) as s → 0 ⇒ =1
R(s) s=0

• So, for good performance, the transfer function from R(s) to Y (s)
should be approximately 1 at DC.
Fall 2001 16.31 14–2

• Example #1: Consider:


   
1 1 1
ẋ = x+ u
1 2 0
 
y = 1 0 x

 
– Already designed K = 14 57

– Then the closed-loop system is


ẋ = (A − BK)x + Br y = Cx

– Which gives the transfer function


Y (s)
= C (sI − (A − BK))−1 B
R(s)
   
  s + 13 56 −1 1 s−2
= 1 0 = 2
−1 s − 2 0 s + 11s + 30

• Assume that r(t) is a step, then by the FVT



Y (s)  −2
= = 1 !!
R(s)  s=0 30
– So our step response is quite poor.
Fall 2001 16.31 14–3

• One obvious solution is to scale the reference input r(t) so that


u = N̄ r − Kx
– N̄ is an extra gain used to scale the closed-loop transfer function

• Now we have
ẋ = (A − BK)x + B N̄ r , y = Cx
so that
Y (s)
= C (sI − (A − BK))−1 B N̄
R(s)

If we had made N̄ = −15, then


Y (s) −15(s − 2)
= 2
R(s) s + 11s + 30
so with a step input, y(t) → 1 as t → ∞.

• So the steady state step error is now zero, but is this OK?
– See plots – big improvement in the response, but the transient
is a bit weird.
Fall 2001 16.31 14–4

Step Response

0.8 u=r−Kx
u=Nbar r−Kx
0.6

0.4

0.2
Y output

−0.2

−0.4

−0.6

−0.8

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 1: Response to step input with and without the N̄ correction.

• Formal way to compute N̄ is to change the form of the control input.


– Consider the analysis for the response to a step input r = rss1(t)

• At steady state ẋ = 0, so we have



ẋ = Ax + Bu 0 = Axss + Buss
y = Cx yss = Cxss
and if things are going well, then yss = rss .
    
A B xss 0
=
C 0 uss rss
which can be easily solved for xss and uss.
Fall 2001 16.31 14–5

• For purposes of scaling, define:


xss ≡ Nx rss uss ≡ Nu rss

• We would then implement the control in the new form


u = N̄ r − Kx = (Nu + KNx )r − Kx
= Nu r + K(Nx r − x)
= uss + K(xss − x)
which can be visualized as:

– Use Nx to modify the reference command r to generate a feed-


forward state command to the system xss.
– Use Nu to modify the reference command r to generate a feed-
forward control input uss

• Note that this development assumed that r was constant, but it


could also be used if r is a slowly time-varying command.
– But as we have seen, the architecture is designed to give good
steady-state behavior, and it might give weird transient responses.
Fall 2001 16.31 14–6

• For our example,


 
   −1   1
xss A B 0
= =  −0.5 
uss C 0 1
−0.5
so  
1  
xss = , uss = −0.5
−0.5
and
 
  1
N̄ = Nu + KNx = −0.5 + 14 57 = −15
−0.5
as we had before.
Fall 2001 16.31 14–7
Step Response
0.06
x
1
0.04 x
2
0.02
X state

−0.02

−0.04

−0.06

−0.08
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Step Response: u=r−Kx


1
u=r−Kx
0.8

0.6
U control

0.4

0.2

−0.2

−0.4
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 2: Response to step input without the N̄ correction. The steady state x and u values are non-zero but
they are not the values that give the desired yss .
Step Response

1 x
1
x
2

0.5
X state

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Step Response: u=Nbar r−Kx


5
u=Nbar r−Kx

0
U control

−5

−10

−15
0 0.5 1 1.5 2 2.5 3 3.5 4
time (sec)

Figure 3: Response to step input with the N̄ correction. Gives the desired steady-state behavior, but note the
higher u(0).
Fall 2001 Examples 16.31 14–8

• Example from Problem set


8 · 14 · 20
G(s) =
(s + 8)(s + 14)(s + 20)
– Target pole locations −12 ± 12j, −20
% system
[a,b,c,d]=tf2ss(8*14*20,conv([1 8],conv([1 14],[1 20])))
% controller gains to place poles at specified locations
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
% find the feedforward gains
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 2.5714
Y output

0.6 2 216 3520

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
time (sec)

Figure 4: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–9

Closed−loop Freq Response


0
10
u=r−Kx
u=Nbar r−Kx

−1
10
cl
G

−2
10

−3
10
−1 0 1 2
10 10 10 10
Freq (rad/sec)

Figure 5: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–10

• Example from second problem set


0.94
G(s) =
s2 − 0.0297
– Target pole locations −0.25 ± 0.25j
[a,b,c,d]=tf2ss(.94,[1 0 -0.0297])
k=place(a,b,[-1+j;-1-j]/4)
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.1:30];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 0.13298
Y output

0.6 0.5 0.1547

0.4

0.2

0
0 5 10 15 20 25 30
time (sec)

Figure 6: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–11

Closed−loop Freq Response


0
10
u=r−Kx
u=Nbar r−Kx

−1
10
cl
G

−2
10

−3
10
−1 0 1 2
10 10 10 10
Freq (rad/sec)

Figure 7: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–12

• Ok, so let’s try something very challenging...


8 · 14 · 20
G(s) =
(s − 8)(s − 14)(s − 20)
– Target pole locations −12 ± 12j, −20
[a,b,c,d]=tf2ss(8*14*20,conv([1 -8],conv([1 -14],[1 -20])))
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);

Step Response
1.2
u=r−Kx
u=Nbar r−Kx

0.8 2.5714
Y output

0.6 86 216 8000

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
time (sec)

Figure 8: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–13

Closed−loop Freq Response


1
10
u=r−Kx
u=Nbar r−Kx

0
10

−1
cl

10
G

−2
10

−3
10
−3 −2 −1 0 1
10 10 10 10 10
Freq (rad/sec)

Figure 9: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–14

• The worst possible...


(s − 1)
G(s) =
(s + 1)(s − 3)
– Unstable, NMP!!
– Target pole locations −1 ± j
[a,b,c,d]=tf2ss([1 -1],conv([1 1],[1 -3]))
k=place(a,b,[[-1+j;-1-j]])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:10];[y,t,x]=step(sys1,t);[y2,t2,x2]=step(sys2,t);

Unstable, NMP system Step Response

u=r−Kx
u=Nbar r−Kx
1

0.8 −2
0.6 4 5
0.4

0.2
Y output

−0.2

−0.4

−0.6

−0.8

−1
0 1 2 3 4 5 6 7 8 9 10
time (sec)

Figure 10: Response to step input with and without the N̄ correction. Gives the desired steady-state behavior,
with little difficulty!
Fall 2001 16.31 14–15

Closed−loop Freq Response


1
10
u=r−Kx
u=Nbar r−Kx

0
10
Gcl

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 11: Closed-loop frequency response. Clearly shows that the DC gain is unity

• Full state feedback process is quite simple as it can be automated


in Matlab® using acker and/or place

• With more than 1 actuator, we have more than n degrees of freedom


in the control → we can change the eigenvectors as desired, as well
as the poles.

• The real issue now is where to put the poles...

• And to correct the fact that we cannot usually measure the state
→ develop an estimator.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #15

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we put the poles?
— Linear Quadratic Regulator
— Symmetric Root Locus
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 15—1

Pole Placement

• So far we have looked at how to pick K to get the dynamics to have


some nice properties (i.e. stabilize A)
λi (A) ; λi(A − BK)

• Classic Question: where should we put these closed-loop poles?

• Of course we can use the time-domain specifications to locate the


dominant poles — roots of:
s2 + 2ζωn s + ωn2 = 0

• Then place rest of the poles so they are “much faster” than the
dominant behavior. For example:
— Could keep the same damped frequency wd and then move the
real part to be 2—3 times faster than real part of dominant poles
ζωn

• Just be careful moving the poles too far to the left because it takes
a lot of control effort
Fall 2001 16.31 15—2

• Could also choose the closed-loop poles to mimic a system that has
similar performance to what you would like to achieve:
— Just set pole locations equal to those of the prototype system.
— Various options exist

1
• Bessel Polynomial Systems of order k → Gp (s) = Bk (s)

• All scaled to give settling times of 1 second, which you can change
to ts by dividing the poles by ts.
Fall 2001 16.31 15—3

• Procedure for an nth order system:


— Determine the desired settling time ts
— Find the k = n polynomial from the table.
— Divide pole locations by ts
— Form desired characteristic polynomial Φd(s) and use acker/place
to determine the feedback gains.
— Simulate to check performance and control effort.

• Example:
1
G(s) =
s(s + 4)(s + 1)
with    
−5 −4 0 1
A= 1 0 0 B=0
0 1 0 0
so that n = k = 3.
— Want ts = 2 sec. So there are 3 poles at:
−5.0093/2 = −2.5047 and
(−3.9668 ± 3.7845i)/2 = −1.9834 ± 1.8922i
— Use these to form Φd(s) and find the gains using acker

• The Bessel approach is fine, but the step response is a bit slow.
Fall 2001 16.31 15—4

• Another approach is to select the poles to match the nth polyno-


mial that was designed to minimize the ITAE “integral of the time
multiplied by the absolute value of the error”
Z ∞
JIT AE = t |e(t)| dt
0
in response to a step function.

• Both Bessel and ITAE are tabulated in FPE-508.


— Comparison for k = 3 (Given for ω0 = 1 rad/sec, so slightly
different than numbers given on previous page)
φB
d = (s + 0.9420)(s + 0.7465 ± 0.7112i)

φIT
d
AE
= (s + 0.7081)(s + 0.5210 ± 1.068i)

• So the ITAE poles are not as heavily damped.


— Some overshoot
— Faster rise-times.

• Problem with both of these approaches is that they completely ig-


nore the control effort required — the designer must iterate.
Fall 2001 16.31 15—5

Linear Quadratic Regulator


• An alternative approach is to place the pole locations so that the
closed-loop (SISO) system optimizes the cost function:
Z ∞
£ T ¤
JLQR = x (t)(C T C)x(t) + r u(t)2 dt
0
Where:

— y T y = xT (C T C)x {assuming D = 0} is called the State Cost


— u2 is called the Control Cost, and
— r is the Control Penalty

— Simple form of the Linear Quadratic Regulator Problem.

• Can show that the optimal control is a linear state feedback:


u(t) = −Klqr x(t)

— Klqr found by solving an Algebraic Riccati Equation (ARE).

• We will look at the details of this solution procedure later. For now,
let’s just look at the optimal closed-loop pole locations.
Fall 2001 16.31 15—6

• Consider a SISO system with a minimal model


ẋ = Ax + Bu , y = Cx
where
b(s)
a(s) = det(sI − A) and C(sI − A)−1B ≡
a(s)

• Then1 with u(t) = −Klqr x(t), closed-loop dynamics are:


n
Y
det(sI − A + BKlqr ) = (s − pi)
i=1

where the pi ={ the left-hand-plane roots of ∆(s)}, with


∆(s) = a(s)a(−s) + r−1b(s)b(−s)

• Use this to find the optimal pole locations, and then use
those to find the feedback gains required using acker.

• The pole locations can be found using standard root-locus tools.


∆(s) = a(s)a(−s) + r−1b(s)b(−s) = 0
⇒ 1 + r−1G(s)G(−s) = 0
— The plot is symmetric about the real and imaginary axes.

⇒ Symmetric Root Locus


— 2n poles are plotted as a function of r
— The poles we pick are always the n in the LHP.
1 Several leaps made here for now. We will come back to this LQR problem later.
Fall 2001 16.31 15—7

LQR Notes

1. The state cost was written using the output y T y, but that does not
need to be the case.
• We are free to define a new system output z = Cz x that is not
based on a physical sensor measurement.
Z ∞
£ T T 2
¤
⇒ JLQR = x (t)(Cz Cz )x(t) + r u(t) dt
0
• Selection of z used to isolate the system states you are most
concerned about, and thus would like to be regulated to “zero”.

2. Note what happens as r ; ∞ — high control cost case


a(s)a(−s) + r−1b(s)b(−s) = 0 ⇒ a(s)a(−s) = 0
• So the n closed-loop poles are:
— Stable roots of the open-loop system (already in the LHP.)
— Reflection about the jω-axis of the unstable open-loop poles.

3. Note what happens as r ; 0 — low control cost case


a(s)a(−s) + r −1b(s)b(−s) = 0 ⇒ b(s)b(−s) = 0
• Assume order of b(s)b(−s) is 2m < 2n
• So the n closed-loop poles go to:
— The m finite zeros of the system that are in the LHP (or the
reflections of the systems zeros in the RHP).
— The system zeros at infinity (there are n − m of these).
Fall 2001 16.31 15—8

• Note that the poles tending to infinity do so along very specific paths
so that they form a Butterworth Pattern:
— At high frequency we can ignore all but the highest powers of s
in the expression for ∆(s) = 0

∆(s) = 0 ; (−1)n s2n + r−1(−1)m(bosm)2 = 0


2
2(n−m) n−m+1 bo
⇒s = (−1)
r
• The 2(n − m) solutions of this expression lie on a circle of radius
(b20/r)1/2(n−m)
at the intersection of the radial lines with phase from the neg-
ative real axis:

lπ n−m−1
± , l = 0, 1, . . . , , (n − m) odd
n−m 2
(l + 1/2)π n−m
± , l = 0, 1, . . . , −1 , (n − m) even
n−m 2
• Examples:
n−m Phase
1 0
2 ±π/4
3 0, ±π/3
4 ±π/8, ±3π/8
• Note: Plot the SRL using the 180o rules (normal) if n − m is even
and the 0o rules if n − m is odd.
Fall 2001 16.31 15—9

8·14·20
Figure 1: Example #1: G(s) = (s+8)(s+14)(s+20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

2.042 2.9408 5.0676


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—10

0.94
Figure 2: Example #2: G(s) = s2 −0.0297
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
Step Response Closed−loop Freq Response
0
1.2 10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx

−1
0.8 1.4146 10
Y output

Gcl

0.6 1.6489 1.3594

−2
0.4 10

0.2

−3
0 10
−3 −2 −1 0 1
0 5 10 15 20 25 30 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—11

8·14·20
Figure 3: Example #3: G(s) = (s−8)(s−14)(s−20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

23.042 2.94079 9.44262


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—12

(s−1)
Figure 4: Example #4: G(s) = (s+1)(s−3)
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−5 −4 −3 −2 −1 0 1 2 3 4 5
Real Axis
Unstable, NMP system Step Response Closed−loop Freq Response
0
10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx
1

0.8 −4.3589
0.6 7.3589 3.6794
0.4

0.2
Y output

−1
Gcl

10
0

−0.2

−0.4

−0.6

−0.8

−2
−1 10
−2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—13

(s−2)(s−4)
Figure 5: Example #5: G(s) = (s−1)(s−3)(s2 +0.8s+4)s2
Symmetric root locus
8

2
Imag Axis

−2

−4

−6

−8
−6 −4 −2 0 2 4 6
Real Axis
Closed−loop Freq Response
0
10
u=r−Kx
u=Nbar r−Kx
Unstable, NMP system Step Response
−1
10
u=r−Kx
u=Nbar r−Kx
1
−2
10
0.8 3.1623
0.6 10.0869 4.64874 8.01734 3.81 10
−3

0.4
−4
Gcl

10
0.2
Y output

0 −5
10

−0.2
−6
10
−0.4

−0.6 −7
10

−0.8
−8
10
−1 −2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—14

• As noted previously, we are free to pick the state weighting matrices


Cz to penalize the parts of the motion we are most concerned with.

• Simple example — oscillator with x = [ p , v ]T


∙ ¸ ∙ ¸
0 1 0
A= , B=
−2 −0.5 1
but we choose two cases for z
£ ¤ £ ¤
z = p = 1 0 x and z=v= 0 1 x

SRL with Position Penalty SRL with Velocity Penalty


2 1.5

1.5
1

0.5
0.5
Imag Axis

Imag Axis

0 0

−0.5
−0.5

−1

−1
−1.5

−2 −1.5
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis Real Axis

Figure 6: SRL with position (left) and velocity penalties (right)

• Clearly, choosing a different Cz impacts the SRL because it com-


pletely changes the zero-structure for the system.
Fall 2001 16.31 15—15

Summary
• Dominant second and prototype design approaches (Bessel and ITAE)
place the closed-loop pole locations with no regard to the
amount of control effort required.
— Designer must iterate on the selected bandwidth (ωn ) to ensure
that the control effort is reasonable.

• LQR/SRL approach selects closed-loop poles that balance between


system errors and the control effort.
— Easy design iteration using r — poles move along the SRL.
— Sometimes difficult to relate the desired transient response to the
LQR cost function.

• Nice thing about the LQR approach is that the designer is focused
on system performance issues
— The pole locations are then supplied using the SRL.
Topic #15

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we put the poles?
— Linear Quadratic Regulator
— Symmetric Root Locus
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 15—1

Pole Placement

• So far we have looked at how to pick K to get the dynamics to have


some nice properties (i.e. stabilize A)
λi (A) ; λi(A − BK)

• Classic Question: where should we put these closed-loop poles?

• Of course we can use the time-domain specifications to locate the


dominant poles — roots of:
s2 + 2ζωn s + ωn2 = 0

• Then place rest of the poles so they are “much faster” than the
dominant behavior. For example:
— Could keep the same damped frequency wd and then move the
real part to be 2—3 times faster than real part of dominant poles
ζωn

• Just be careful moving the poles too far to the left because it takes
a lot of control effort
Fall 2001 16.31 15—2

• Could also choose the closed-loop poles to mimic a system that has
similar performance to what you would like to achieve:
— Just set pole locations equal to those of the prototype system.
— Various options exist

1
• Bessel Polynomial Systems of order k → Gp (s) = Bk (s)

• All scaled to give settling times of 1 second, which you can change
to ts by dividing the poles by ts.
Fall 2001 16.31 15—3

• Procedure for an nth order system:


— Determine the desired settling time ts
— Find the k = n polynomial from the table.
— Divide pole locations by ts
— Form desired characteristic polynomial Φd(s) and use acker/place
to determine the feedback gains.
— Simulate to check performance and control effort.

• Example:
1
G(s) =
s(s + 4)(s + 1)
with    
−5 −4 0 1
A= 1 0 0 B=0
0 1 0 0
so that n = k = 3.
— Want ts = 2 sec. So there are 3 poles at:
−5.0093/2 = −2.5047 and
(−3.9668 ± 3.7845i)/2 = −1.9834 ± 1.8922i
— Use these to form Φd(s) and find the gains using acker

• The Bessel approach is fine, but the step response is a bit slow.
Fall 2001 16.31 15—4

• Another approach is to select the poles to match the nth polyno-


mial that was designed to minimize the ITAE “integral of the time
multiplied by the absolute value of the error”
Z ∞
JIT AE = t |e(t)| dt
0
in response to a step function.

• Both Bessel and ITAE are tabulated in FPE-508.


— Comparison for k = 3 (Given for ω0 = 1 rad/sec, so slightly
different than numbers given on previous page)
φB
d = (s + 0.9420)(s + 0.7465 ± 0.7112i)

φIT
d
AE
= (s + 0.7081)(s + 0.5210 ± 1.068i)

• So the ITAE poles are not as heavily damped.


— Some overshoot
— Faster rise-times.

• Problem with both of these approaches is that they completely ig-


nore the control effort required — the designer must iterate.
Fall 2001 16.31 15—5

Linear Quadratic Regulator


• An alternative approach is to place the pole locations so that the
closed-loop (SISO) system optimizes the cost function:
Z ∞
£ T ¤
JLQR = x (t)(C T C)x(t) + r u(t)2 dt
0
Where:

— y T y = xT (C T C)x {assuming D = 0} is called the State Cost


— u2 is called the Control Cost, and
— r is the Control Penalty

— Simple form of the Linear Quadratic Regulator Problem.

• Can show that the optimal control is a linear state feedback:


u(t) = −Klqr x(t)

— Klqr found by solving an Algebraic Riccati Equation (ARE).

• We will look at the details of this solution procedure later. For now,
let’s just look at the optimal closed-loop pole locations.
Fall 2001 16.31 15—6

• Consider a SISO system with a minimal model


ẋ = Ax + Bu , y = Cx
where
b(s)
a(s) = det(sI − A) and C(sI − A)−1B ≡
a(s)

• Then1 with u(t) = −Klqr x(t), closed-loop dynamics are:


n
Y
det(sI − A + BKlqr ) = (s − pi)
i=1

where the pi ={ the left-hand-plane roots of ∆(s)}, with


∆(s) = a(s)a(−s) + r−1b(s)b(−s)

• Use this to find the optimal pole locations, and then use
those to find the feedback gains required using acker.

• The pole locations can be found using standard root-locus tools.


∆(s) = a(s)a(−s) + r−1b(s)b(−s) = 0
⇒ 1 + r−1G(s)G(−s) = 0
— The plot is symmetric about the real and imaginary axes.

⇒ Symmetric Root Locus


— 2n poles are plotted as a function of r
— The poles we pick are always the n in the LHP.
1 Several leaps made here for now. We will come back to this LQR problem later.
Fall 2001 16.31 15—7

LQR Notes

1. The state cost was written using the output y T y, but that does not
need to be the case.
• We are free to define a new system output z = Cz x that is not
based on a physical sensor measurement.
Z ∞
£ T T 2
¤
⇒ JLQR = x (t)(Cz Cz )x(t) + r u(t) dt
0
• Selection of z used to isolate the system states you are most
concerned about, and thus would like to be regulated to “zero”.

2. Note what happens as r ; ∞ — high control cost case


a(s)a(−s) + r−1b(s)b(−s) = 0 ⇒ a(s)a(−s) = 0
• So the n closed-loop poles are:
— Stable roots of the open-loop system (already in the LHP.)
— Reflection about the jω-axis of the unstable open-loop poles.

3. Note what happens as r ; 0 — low control cost case


a(s)a(−s) + r −1b(s)b(−s) = 0 ⇒ b(s)b(−s) = 0
• Assume order of b(s)b(−s) is 2m < 2n
• So the n closed-loop poles go to:
— The m finite zeros of the system that are in the LHP (or the
reflections of the systems zeros in the RHP).
— The system zeros at infinity (there are n − m of these).
Fall 2001 16.31 15—8

• Note that the poles tending to infinity do so along very specific paths
so that they form a Butterworth Pattern:
— At high frequency we can ignore all but the highest powers of s
in the expression for ∆(s) = 0

∆(s) = 0 ; (−1)n s2n + r−1(−1)m(bosm)2 = 0


2
2(n−m) n−m+1 bo
⇒s = (−1)
r
• The 2(n − m) solutions of this expression lie on a circle of radius
(b20/r)1/2(n−m)
at the intersection of the radial lines with phase from the neg-
ative real axis:

lπ n−m−1
± , l = 0, 1, . . . , , (n − m) odd
n−m 2
(l + 1/2)π n−m
± , l = 0, 1, . . . , −1 , (n − m) even
n−m 2
• Examples:
n−m Phase
1 0
2 ±π/4
3 0, ±π/3
4 ±π/8, ±3π/8
• Note: Plot the SRL using the 180o rules (normal) if n − m is even
and the 0o rules if n − m is odd.
Fall 2001 16.31 15—9

8·14·20
Figure 1: Example #1: G(s) = (s+8)(s+14)(s+20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

2.042 2.9408 5.0676


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—10

0.94
Figure 2: Example #2: G(s) = s2 −0.0297
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
Step Response Closed−loop Freq Response
0
1.2 10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx

−1
0.8 1.4146 10
Y output

Gcl

0.6 1.6489 1.3594

−2
0.4 10

0.2

−3
0 10
−3 −2 −1 0 1
0 5 10 15 20 25 30 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—11

8·14·20
Figure 3: Example #3: G(s) = (s−8)(s−14)(s−20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

23.042 2.94079 9.44262


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—12

(s−1)
Figure 4: Example #4: G(s) = (s+1)(s−3)
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−5 −4 −3 −2 −1 0 1 2 3 4 5
Real Axis
Unstable, NMP system Step Response Closed−loop Freq Response
0
10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx
1

0.8 −4.3589
0.6 7.3589 3.6794
0.4

0.2
Y output

−1
Gcl

10
0

−0.2

−0.4

−0.6

−0.8

−2
−1 10
−2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—13

(s−2)(s−4)
Figure 5: Example #5: G(s) = (s−1)(s−3)(s2 +0.8s+4)s2
Symmetric root locus
8

2
Imag Axis

−2

−4

−6

−8
−6 −4 −2 0 2 4 6
Real Axis
Closed−loop Freq Response
0
10
u=r−Kx
u=Nbar r−Kx
Unstable, NMP system Step Response
−1
10
u=r−Kx
u=Nbar r−Kx
1
−2
10
0.8 3.1623
0.6 10.0869 4.64874 8.01734 3.81 10
−3

0.4
−4
Gcl

10
0.2
Y output

0 −5
10

−0.2
−6
10
−0.4

−0.6 −7
10

−0.8
−8
10
−1 −2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—14

• As noted previously, we are free to pick the state weighting matrices


Cz to penalize the parts of the motion we are most concerned with.

• Simple example — oscillator with x = [ p , v ]T


∙ ¸ ∙ ¸
0 1 0
A= , B=
−2 −0.5 1
but we choose two cases for z
£ ¤ £ ¤
z = p = 1 0 x and z=v= 0 1 x

SRL with Position Penalty SRL with Velocity Penalty


2 1.5

1.5
1

0.5
0.5
Imag Axis

Imag Axis

0 0

−0.5
−0.5

−1

−1
−1.5

−2 −1.5
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis Real Axis

Figure 6: SRL with position (left) and velocity penalties (right)

• Clearly, choosing a different Cz impacts the SRL because it com-


pletely changes the zero-structure for the system.
Fall 2001 16.31 15—15

Summary
• Dominant second and prototype design approaches (Bessel and ITAE)
place the closed-loop pole locations with no regard to the
amount of control effort required.
— Designer must iterate on the selected bandwidth (ωn ) to ensure
that the control effort is reasonable.

• LQR/SRL approach selects closed-loop poles that balance between


system errors and the control effort.
— Easy design iteration using r — poles move along the SRL.
— Sometimes difficult to relate the desired transient response to the
LQR cost function.

• Nice thing about the LQR approach is that the designer is focused
on system performance issues
— The pole locations are then supplied using the SRL.
Topic #15

16.31 Feedback Control

State-Space Systems
• Full-state Feedback Control
• How do we change the poles of the state-space system?
• Or, even if we can change the pole locations.
• Where do we put the poles?
— Linear Quadratic Regulator
— Symmetric Root Locus
• How well does this approach work?

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 15—1

Pole Placement

• So far we have looked at how to pick K to get the dynamics to have


some nice properties (i.e. stabilize A)
λi (A) ; λi(A − BK)

• Classic Question: where should we put these closed-loop poles?

• Of course we can use the time-domain specifications to locate the


dominant poles — roots of:
s2 + 2ζωn s + ωn2 = 0

• Then place rest of the poles so they are “much faster” than the
dominant behavior. For example:
— Could keep the same damped frequency wd and then move the
real part to be 2—3 times faster than real part of dominant poles
ζωn

• Just be careful moving the poles too far to the left because it takes
a lot of control effort
Fall 2001 16.31 15—2

• Could also choose the closed-loop poles to mimic a system that has
similar performance to what you would like to achieve:
— Just set pole locations equal to those of the prototype system.
— Various options exist

1
• Bessel Polynomial Systems of order k → Gp (s) = Bk (s)

• All scaled to give settling times of 1 second, which you can change
to ts by dividing the poles by ts.
Fall 2001 16.31 15—3

• Procedure for an nth order system:


— Determine the desired settling time ts
— Find the k = n polynomial from the table.
— Divide pole locations by ts
— Form desired characteristic polynomial Φd(s) and use acker/place
to determine the feedback gains.
— Simulate to check performance and control effort.

• Example:
1
G(s) =
s(s + 4)(s + 1)
with    
−5 −4 0 1
A= 1 0 0 B=0
0 1 0 0
so that n = k = 3.
— Want ts = 2 sec. So there are 3 poles at:
−5.0093/2 = −2.5047 and
(−3.9668 ± 3.7845i)/2 = −1.9834 ± 1.8922i
— Use these to form Φd(s) and find the gains using acker

• The Bessel approach is fine, but the step response is a bit slow.
Fall 2001 16.31 15—4

• Another approach is to select the poles to match the nth polyno-


mial that was designed to minimize the ITAE “integral of the time
multiplied by the absolute value of the error”
Z ∞
JIT AE = t |e(t)| dt
0
in response to a step function.

• Both Bessel and ITAE are tabulated in FPE-508.


— Comparison for k = 3 (Given for ω0 = 1 rad/sec, so slightly
different than numbers given on previous page)
φB
d = (s + 0.9420)(s + 0.7465 ± 0.7112i)

φIT
d
AE
= (s + 0.7081)(s + 0.5210 ± 1.068i)

• So the ITAE poles are not as heavily damped.


— Some overshoot
— Faster rise-times.

• Problem with both of these approaches is that they completely ig-


nore the control effort required — the designer must iterate.
Fall 2001 16.31 15—5

Linear Quadratic Regulator


• An alternative approach is to place the pole locations so that the
closed-loop (SISO) system optimizes the cost function:
Z ∞
£ T ¤
JLQR = x (t)(C T C)x(t) + r u(t)2 dt
0
Where:

— y T y = xT (C T C)x {assuming D = 0} is called the State Cost


— u2 is called the Control Cost, and
— r is the Control Penalty

— Simple form of the Linear Quadratic Regulator Problem.

• Can show that the optimal control is a linear state feedback:


u(t) = −Klqr x(t)

— Klqr found by solving an Algebraic Riccati Equation (ARE).

• We will look at the details of this solution procedure later. For now,
let’s just look at the optimal closed-loop pole locations.
Fall 2001 16.31 15—6

• Consider a SISO system with a minimal model


ẋ = Ax + Bu , y = Cx
where
b(s)
a(s) = det(sI − A) and C(sI − A)−1B ≡
a(s)

• Then1 with u(t) = −Klqr x(t), closed-loop dynamics are:


n
Y
det(sI − A + BKlqr ) = (s − pi)
i=1

where the pi ={ the left-hand-plane roots of ∆(s)}, with


∆(s) = a(s)a(−s) + r−1b(s)b(−s)

• Use this to find the optimal pole locations, and then use
those to find the feedback gains required using acker.

• The pole locations can be found using standard root-locus tools.


∆(s) = a(s)a(−s) + r−1b(s)b(−s) = 0
⇒ 1 + r−1G(s)G(−s) = 0
— The plot is symmetric about the real and imaginary axes.

⇒ Symmetric Root Locus


— 2n poles are plotted as a function of r
— The poles we pick are always the n in the LHP.
1 Several leaps made here for now. We will come back to this LQR problem later.
Fall 2001 16.31 15—7

LQR Notes

1. The state cost was written using the output y T y, but that does not
need to be the case.
• We are free to define a new system output z = Cz x that is not
based on a physical sensor measurement.
Z ∞
£ T T 2
¤
⇒ JLQR = x (t)(Cz Cz )x(t) + r u(t) dt
0
• Selection of z used to isolate the system states you are most
concerned about, and thus would like to be regulated to “zero”.

2. Note what happens as r ; ∞ — high control cost case


a(s)a(−s) + r−1b(s)b(−s) = 0 ⇒ a(s)a(−s) = 0
• So the n closed-loop poles are:
— Stable roots of the open-loop system (already in the LHP.)
— Reflection about the jω-axis of the unstable open-loop poles.

3. Note what happens as r ; 0 — low control cost case


a(s)a(−s) + r −1b(s)b(−s) = 0 ⇒ b(s)b(−s) = 0
• Assume order of b(s)b(−s) is 2m < 2n
• So the n closed-loop poles go to:
— The m finite zeros of the system that are in the LHP (or the
reflections of the systems zeros in the RHP).
— The system zeros at infinity (there are n − m of these).
Fall 2001 16.31 15—8

• Note that the poles tending to infinity do so along very specific paths
so that they form a Butterworth Pattern:
— At high frequency we can ignore all but the highest powers of s
in the expression for ∆(s) = 0

∆(s) = 0 ; (−1)n s2n + r−1(−1)m(bosm)2 = 0


2
2(n−m) n−m+1 bo
⇒s = (−1)
r
• The 2(n − m) solutions of this expression lie on a circle of radius
(b20/r)1/2(n−m)
at the intersection of the radial lines with phase from the neg-
ative real axis:

lπ n−m−1
± , l = 0, 1, . . . , , (n − m) odd
n−m 2
(l + 1/2)π n−m
± , l = 0, 1, . . . , −1 , (n − m) even
n−m 2
• Examples:
n−m Phase
1 0
2 ±π/4
3 0, ±π/3
4 ±π/8, ±3π/8
• Note: Plot the SRL using the 180o rules (normal) if n − m is even
and the 0o rules if n − m is odd.
Fall 2001 16.31 15—9

8·14·20
Figure 1: Example #1: G(s) = (s+8)(s+14)(s+20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

2.042 2.9408 5.0676


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—10

0.94
Figure 2: Example #2: G(s) = s2 −0.0297
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
Step Response Closed−loop Freq Response
0
1.2 10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx

−1
0.8 1.4146 10
Y output

Gcl

0.6 1.6489 1.3594

−2
0.4 10

0.2

−3
0 10
−3 −2 −1 0 1
0 5 10 15 20 25 30 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—11

8·14·20
Figure 3: Example #3: G(s) = (s−8)(s−14)(s−20)
Symmetric root locus
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−30 −20 −10 0 10 20 30
Real Axis
Step Response
Closed−loop Freq Response
1.2 0
10
u=r−Kx
u=r−Kx
u=Nbar r−Kx
u=Nbar r−Kx

0.8 3.3166 10
−1
Y output

23.042 2.94079 9.44262


Gcl

0.6

−2
0.4 10

0.2

−3
0 10
−1 0 1 2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—12

(s−1)
Figure 4: Example #4: G(s) = (s+1)(s−3)
Symmetric root locus
1

0.8

0.6

0.4

0.2
Imag Axis

−0.2

−0.4

−0.6

−0.8

−1
−5 −4 −3 −2 −1 0 1 2 3 4 5
Real Axis
Unstable, NMP system Step Response Closed−loop Freq Response
0
10
u=r−Kx u=r−Kx
u=Nbar r−Kx u=Nbar r−Kx
1

0.8 −4.3589
0.6 7.3589 3.6794
0.4

0.2
Y output

−1
Gcl

10
0

−0.2

−0.4

−0.6

−0.8

−2
−1 10
−2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—13

(s−2)(s−4)
Figure 5: Example #5: G(s) = (s−1)(s−3)(s2 +0.8s+4)s2
Symmetric root locus
8

2
Imag Axis

−2

−4

−6

−8
−6 −4 −2 0 2 4 6
Real Axis
Closed−loop Freq Response
0
10
u=r−Kx
u=Nbar r−Kx
Unstable, NMP system Step Response
−1
10
u=r−Kx
u=Nbar r−Kx
1
−2
10
0.8 3.1623
0.6 10.0869 4.64874 8.01734 3.81 10
−3

0.4
−4
Gcl

10
0.2
Y output

0 −5
10

−0.2
−6
10
−0.4

−0.6 −7
10

−0.8
−8
10
−1 −2 −1 0 1 2
0 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10
time (sec) Freq (rad/sec)
Fall 2001 16.31 15—14

• As noted previously, we are free to pick the state weighting matrices


Cz to penalize the parts of the motion we are most concerned with.

• Simple example — oscillator with x = [ p , v ]T


∙ ¸ ∙ ¸
0 1 0
A= , B=
−2 −0.5 1
but we choose two cases for z
£ ¤ £ ¤
z = p = 1 0 x and z=v= 0 1 x

SRL with Position Penalty SRL with Velocity Penalty


2 1.5

1.5
1

0.5
0.5
Imag Axis

Imag Axis

0 0

−0.5
−0.5

−1

−1
−1.5

−2 −1.5
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis Real Axis

Figure 6: SRL with position (left) and velocity penalties (right)

• Clearly, choosing a different Cz impacts the SRL because it com-


pletely changes the zero-structure for the system.
Fall 2001 16.31 15—15

Summary
• Dominant second and prototype design approaches (Bessel and ITAE)
place the closed-loop pole locations with no regard to the
amount of control effort required.
— Designer must iterate on the selected bandwidth (ωn ) to ensure
that the control effort is reasonable.

• LQR/SRL approach selects closed-loop poles that balance between


system errors and the control effort.
— Easy design iteration using r — poles move along the SRL.
— Sometimes difficult to relate the desired transient response to the
LQR cost function.

• Nice thing about the LQR approach is that the designer is focused
on system performance issues
— The pole locations are then supplied using the SRL.
Topic #16

16.31 Feedback Control

State-Space Systems
• Open-loop Estimators
• Closed-loop Estimators

• Observer Theory (no noise) — Luenberger


IEEE TAC Vol 16, No. 6, pp. 596—602, December 1971.
• Estimation Theory (with noise) — Kalman

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 16—1

Estimators/Observers
• Problem: So far we have assumed that we have full access to the
state x(t) when we designed our controllers.
— Most often all of this information is not available.

• Usually can only feedback information that is developed from the


sensors measurements.
— Could try “output feedback”
u = Kx ⇒ u = K̂y
— Same as the proportional feedback we looked at at the beginning
of the root locus work.
— This type of control is very difficult to design in general.

• Alternative approach: Develop a replica of the dynamic sys-


tem that provides an “estimate” of the system states based on the
measured output of the system.

• New plan:
1. Develop estimate of x(t) that will be called x̂(t).
2. Then switch from u = −Kx(t) to u = −K x̂(t).

• Two key questions:


— How do we find x̂(t)?
— Will this new plan work?
Fall 2001 16.31 16—2

Estimation Schemes
• Assume that the system model is of the form:
ẋ = Ax + Bu , x(0) unknown
y = Cx
where
1. A, B, and C are known.
2. u(t) is known
3. Measurable outputs are y(t) from C 6= I

• Goal: Develop a dynamic system whose state


x̂(t) = x(t)
for all time t ≥ 0. Two primary approaches:
— Open-loop.
— Closed-loop.

Open-loop Estimator

• Given that we know the plant matrices and the inputs, we can just
perform a simulation that runs in parallel with the system
˙ = Ax̂ + Bu(t)
x̂(t)

• Then x̂(t) ≡ x(t) ∀ t provided that x̂(0) = x(0)

• Major Problem: We do not know x(0)


Fall 2001 16.31 16—3

• Analysis of this case:


ẋ(t) = Ax + Bu(t)
˙
x̂(t) = Ax̂ + Bu(t)

• Define the estimation error x̃(t) = x(t) − x̂(t).


Now want x̃(t) = 0 ∀ t. (But is this realistic?)

• Subtract to get:
d ˙ = Ax̃
(x − x̂) = A(x − x̂) ⇒ x̃(t)
dt
which has the solution
x̃(t) = eAt x̃(0)
— Gives the estimation error in terms of the initial error.
Fall 2001 16.31 16—4

• Does this guarantee that x̃ = 0 ∀ t?


Or even that x̃ → 0 as t → ∞? (which is a more realistic goal).

— Response is fine if x̃(0) = 0. But what if x̃(0) 6= 0?

• If A stable, then x̃ → 0 as t → ∞, but the dynamics of the estima-


tion error are completely determined by the open-loop dynamics of
the system (eigenvalues of A).
— Could be very slow.
— No obvious way to modify the estimation error dynamics.

• Open-loop estimation does not seem to be a very good idea.

Closed-loop Estimator

• An obvious way to fix this problem is to use the additional informa-


tion available:
— How well does the estimated output match the measured output?
Compare: y = Cx with ŷ = C x̂
— Then form ỹ = y − ŷ ≡ C x̃
Fall 2001 16.31 16—5

• Approach: Feedback ỹ to improve our estimate of the state. Basic


form of the estimator is:
˙
x̂(t) = Ax̂(t) + Bu(t) + Lỹ(t)
ŷ(t) = C x̂(t)
where L is the user selectable gain matrix.

• Analysis:
x̃˙ = ẋ − x̂˙ = [Ax + Bu] − [Ax̂ + Bu + L(y − ŷ)]
= A(x − x̂) − L(Cx − C x̂) = Ax̃ − LC x̃ = (A − LC)x̃

• So the closed-loop estimation error dynamics are now


x̃˙ = (A − LC)x̃ with solution x̃(t) = e(A−LC)t x̃(0)

• Bottom line: Can select the gain L to attempt to improve the


convergence of the estimation error (and/or speed it up).
— But now must worry about observability of the system model.
Fall 2001 16.31 16—6

• Note the similarity:

— Regulator Problem: pick K for A − BK

3 Choose K ∈ R1×n (SISO) such that the closed-loop poles


det(sI − A + BK) = Φc(s)
are in the desired locations.

— Estimator Problem: pick L for A − LC

3 Choose L ∈ Rn×1 (SISO) such that the closed-loop poles


det(sI − A + LC) = Φo(s)
are in the desired locations.

• These problems are obviously very similar — in fact they are called
dual problems.
Fall 2001 16.31 16—7

Estimation Gain Selection


• For regulation, were concerned with controllability of (A, B)

For a controllable system we can place the eigenvalues


of A − BK arbitrarily.

• For estimation, were concerned with observability of pair (A, C).

For a observable system we can place the eigenvalues


of A − LC arbitrarily.

• Test using the observability matrix:


 
C
 CA 
 
 2 
rank Mo , rank  CA  = n
 ... 
 
CAn−1

• The procedure for selecting L is very similar to that used for the
regulator design process.

• Write the system model in observer canonical form


      
ẋ1 −a1 1 0 x1 b1
 ẋ2  =  −a2 0 1   x2  +  b2  u
ẋ3 −a3 0 0 x3 b3
 
£ ¤ x1
y = 1 0 0  x2 
x3
Fall 2001 16.31 16—8

• Now very simple to form


   
−a1 1 0 l1 £ ¤
A − LC =  −a2 0 1  −  l2  1 0 0
−a3 0 0 l3
 
−a1 − l1 1 0
=  −a2 − l2 0 1 
−a3 − l3 0 0
— The closed-loop poles of the estimator are at the roots of

det(sI − A + LC) = s3 + (a1 + l1)s2 + (a2 + l2)s + (a3 + l3) = 0

• So we have the freedom to place the closed-loop poles as desired.


— Task greatly simplified by the selection of the state-space model
used for the design/analysis.
Fall 2001 16.31 16—9

• Another approach:
— Note that the poles of (A − LC) and (A − LC)T are identical.
— Also we have that (A − LC)T = AT − C T LT
— So designing LT for this transposed system looks like a standard
regulator problem (A − BK) where
A ⇒ AT
B ⇒ CT
K ⇒ LT
So we can use
Ke = acker(AT , C T , P ) , L ≡ KeT

• Note that the estimator equivalent of Ackermann’s formula is that


 
0
 .. 
.
L = Φe(s)M−1 o  
0
1
Fall 2001 16.31 16—10

Estimators Example
• Simple system
∙ ¸ ∙ ¸ ∙ ¸
−1 1.5 1 −0.5
A = , B= , x(0) =
1 −2 0 −1
£ ¤
C = 1 0 , D=0
— Assume that the initial conditions are not well known.
— System stable, but λmax (A) = −0.18
— Test observability:
∙ ¸ ∙ ¸
C 1 0
rank = rank
CA −1 1.5
• Use open and closed-loop estimators
— Since the initial conditions are not well known, use
∙ ¸
0
x̂(0) =
0
• Open-loop estimator:
x̂˙ = Ax̂ + Bu
ŷ = C x̂

• Closed-loop estimator:
x̂˙ = Ax̂ + Bu + Lỹ = Ax̂ + Bu + L(y − ŷ)
= (A − LC)x̂ + Bu + Ly
ŷ = C x̂
— Which is a dynamic system with poles given by λi (A − LC)
and which takes the measured plant outputs as an input and
generates an estimate of x.
Fall 2001 16.31 16—11

• Typically simulate both systems together for simplicity

• Open-loop case:
ẋ = Ax + Bu
y = Cx
x̂˙ = Ax̂ + Bu
ŷ = C x̂
 
∙ ¸ ∙ ¸∙ ¸ ∙ ¸ ∙ ¸ −0.5
 
ẋ A 0 x B x(0)  −1 
⇒ = + u , = 
x̂˙ 0 A x̂ B x̂(0)  0
0
∙ ¸ ∙ ¸∙ ¸
y C 0 x
=
ŷ 0 C x̂

• Closed-loop case:
ẋ = Ax + Bu
x̂˙ = (A − LC)x̂ + Bu + LCx
∙ ¸ ∙ ¸∙ ¸ ∙ ¸
ẋ A 0 x B
⇒ = + u
x̂˙ LC A − LC x̂ B

• Example uses a strong u(t) to shake things up


Fall 2001 16.31 16—12

Figure 1: Open-loop estimator. Estimation error converges to zero, but very


slowly.
Open loop estimator
1

0.5
states

x1
−0.5 x2

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

0.5
estimation error

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

Figure 2: Closed-loop estimator. Convergence looks much better.


Closed−loop estimator
1

0.5
states

x1
−0.5 x2

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

0.5
estimation error

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time
Fall 2001 16.31 16—13

Where to put the Estimator Poles?


• Location heuristics for poles still apply — use Bessel, ITAE, ...
— Main difference: probably want to make the estimator faster than
you intend to make the regulator — should enhance the control,
which is based on x̂(t).
— ROT: Factor of 2—3 in the time constant ζωn associated with the
regulator poles.

• Note: When designing a regulator, were concerned with “band-


width” of the control getting too high ⇒ often results in control
commands that saturate the actuators and/or change rapidly.

• Different concerns for the estimator:


— Loop closed inside computer, so saturation not a problem.
— However, the measurements y are often “noisy”, and we need to
be careful how we use them to develop our state estimates.

⇒ High bandwidth estimators tend to accentuate the effect of


sensing noise in the estimate.
— State estimates tend to “track” the measurements, which are
fluctuating randomly due to the noise.

⇒ Low bandwidth estimators have lower gains and tend to rely


more heavily on the plant model
— Essentially an open-loop estimator — tends to ignore the mea-
surements and just uses the plant model.
Fall 2001 16.31 16—14

• Can also develop an optimal estimator for this type of system.


— Which is apparently what Kalman did one evening in 1958 while
taking the train from Princeton to Baltimore...
— Balances effect of the various types of random noise in the
system on the estimator:
ẋ = Ax + Bu + Bw w
y = Cx + v
where:
3 w is called “process noise” — models the uncertainty in the
system model.
3 v is called “sensor noise” — models the uncertainty in the
measurements.

• A symmetric root locus exists for the optimal estimator.

— Define Gyw (s) = C(sI − A)−1Bw ≡ N (s)/D(s)

— SRL for the closed-loop poles λi (A−LC) of the estimator which


are the LHP roots of:
Rw
D(s)D(−s) ± N(s)N (−s) = 0
Rv
where Rw and Rv are, in some sense, associated with the sizes of
the process/sensor noise (spectral density).

— Pick sign to ensure that there are no poles on the jω-axis.


Fall 2001 16.31 16—15

• Relative size of the noises determine where the poles will be located.
— Similar to role of control cost in LQR problem.

• As Rw /Rv → 0, the n poles go to the


1. LHP poles of the system

2. Reflection of the RHP poles of the system about the jω-axis.


— The “relatively noisy” sensor case
⇒ Closed-loop estimator essentially reverts back to
the open-loop case (but must be stable).

— Low bandwidth estimator.

• As Rw /Rv → ∞, the n poles go to


1. LHP zeros (and reflections of the RHP zeros) of Gyw (s).

2. ∞ along the Butterworth patterns — same as regulator case


— The “relatively clean” sensor case
⇒ Closed-loop estimator poles go to very high band-
width to take full advantage o the information in y.

— High bandwidth estimator.

• If you know Rw and Rv , then use them in the SRL, but more
often than not we just use them as “tuning” parameters to
develop low → high bandwidth estimators.
— Typically fix Rw and tune estimator bandwidth using Rv
Fall 2001 16.31 16—16

Final Thoughts

• Note that the feedback gain L in the estimator only stabilizes the
estimation error.
— If the system is unstable, then the state estimates will also go to
∞, with zero error from the actual states.

• Estimation is an important concept of its own.


— Not always just “part of the control system”
— Critical issue for guidance and navigation system

• More complete discussion requires that we study stochastic pro-


cesses and optimization theory.

• Estimation is all about which do you trust more: your


measurements or your model.
Topic #16

16.31 Feedback Control

State-Space Systems
• Open-loop Estimators
• Closed-loop Estimators

• Observer Theory (no noise) — Luenberger


IEEE TAC Vol 16, No. 6, pp. 596—602, December 1971.
• Estimation Theory (with noise) — Kalman

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 16—1

Estimators/Observers
• Problem: So far we have assumed that we have full access to the
state x(t) when we designed our controllers.
— Most often all of this information is not available.

• Usually can only feedback information that is developed from the


sensors measurements.
— Could try “output feedback”
u = Kx ⇒ u = K̂y
— Same as the proportional feedback we looked at at the beginning
of the root locus work.
— This type of control is very difficult to design in general.

• Alternative approach: Develop a replica of the dynamic sys-


tem that provides an “estimate” of the system states based on the
measured output of the system.

• New plan:
1. Develop estimate of x(t) that will be called x̂(t).
2. Then switch from u = −Kx(t) to u = −K x̂(t).

• Two key questions:


— How do we find x̂(t)?
— Will this new plan work?
Fall 2001 16.31 16—2

Estimation Schemes
• Assume that the system model is of the form:
ẋ = Ax + Bu , x(0) unknown
y = Cx
where
1. A, B, and C are known.
2. u(t) is known
3. Measurable outputs are y(t) from C 6= I

• Goal: Develop a dynamic system whose state


x̂(t) = x(t)
for all time t ≥ 0. Two primary approaches:
— Open-loop.
— Closed-loop.

Open-loop Estimator

• Given that we know the plant matrices and the inputs, we can just
perform a simulation that runs in parallel with the system
˙ = Ax̂ + Bu(t)
x̂(t)

• Then x̂(t) ≡ x(t) ∀ t provided that x̂(0) = x(0)

• Major Problem: We do not know x(0)


Fall 2001 16.31 16—3

• Analysis of this case:


ẋ(t) = Ax + Bu(t)
˙
x̂(t) = Ax̂ + Bu(t)

• Define the estimation error x̃(t) = x(t) − x̂(t).


Now want x̃(t) = 0 ∀ t. (But is this realistic?)

• Subtract to get:
d ˙ = Ax̃
(x − x̂) = A(x − x̂) ⇒ x̃(t)
dt
which has the solution
x̃(t) = eAt x̃(0)
— Gives the estimation error in terms of the initial error.
Fall 2001 16.31 16—4

• Does this guarantee that x̃ = 0 ∀ t?


Or even that x̃ → 0 as t → ∞? (which is a more realistic goal).

— Response is fine if x̃(0) = 0. But what if x̃(0) 6= 0?

• If A stable, then x̃ → 0 as t → ∞, but the dynamics of the estima-


tion error are completely determined by the open-loop dynamics of
the system (eigenvalues of A).
— Could be very slow.
— No obvious way to modify the estimation error dynamics.

• Open-loop estimation does not seem to be a very good idea.

Closed-loop Estimator

• An obvious way to fix this problem is to use the additional informa-


tion available:
— How well does the estimated output match the measured output?
Compare: y = Cx with ŷ = C x̂
— Then form ỹ = y − ŷ ≡ C x̃
Fall 2001 16.31 16—5

• Approach: Feedback ỹ to improve our estimate of the state. Basic


form of the estimator is:
˙
x̂(t) = Ax̂(t) + Bu(t) + Lỹ(t)
ŷ(t) = C x̂(t)
where L is the user selectable gain matrix.

• Analysis:
x̃˙ = ẋ − x̂˙ = [Ax + Bu] − [Ax̂ + Bu + L(y − ŷ)]
= A(x − x̂) − L(Cx − C x̂) = Ax̃ − LC x̃ = (A − LC)x̃

• So the closed-loop estimation error dynamics are now


x̃˙ = (A − LC)x̃ with solution x̃(t) = e(A−LC)t x̃(0)

• Bottom line: Can select the gain L to attempt to improve the


convergence of the estimation error (and/or speed it up).
— But now must worry about observability of the system model.
Fall 2001 16.31 16—6

• Note the similarity:

— Regulator Problem: pick K for A − BK

3 Choose K ∈ R1×n (SISO) such that the closed-loop poles


det(sI − A + BK) = Φc(s)
are in the desired locations.

— Estimator Problem: pick L for A − LC

3 Choose L ∈ Rn×1 (SISO) such that the closed-loop poles


det(sI − A + LC) = Φo(s)
are in the desired locations.

• These problems are obviously very similar — in fact they are called
dual problems.
Fall 2001 16.31 16—7

Estimation Gain Selection


• For regulation, were concerned with controllability of (A, B)

For a controllable system we can place the eigenvalues


of A − BK arbitrarily.

• For estimation, were concerned with observability of pair (A, C).

For a observable system we can place the eigenvalues


of A − LC arbitrarily.

• Test using the observability matrix:


 
C
 CA 
 
 2 
rank Mo , rank  CA  = n
 ... 
 
CAn−1

• The procedure for selecting L is very similar to that used for the
regulator design process.

• Write the system model in observer canonical form


      
ẋ1 −a1 1 0 x1 b1
 ẋ2  =  −a2 0 1   x2  +  b2  u
ẋ3 −a3 0 0 x3 b3
 
£ ¤ x1
y = 1 0 0  x2 
x3
Fall 2001 16.31 16—8

• Now very simple to form


   
−a1 1 0 l1 £ ¤
A − LC =  −a2 0 1  −  l2  1 0 0
−a3 0 0 l3
 
−a1 − l1 1 0
=  −a2 − l2 0 1 
−a3 − l3 0 0
— The closed-loop poles of the estimator are at the roots of

det(sI − A + LC) = s3 + (a1 + l1)s2 + (a2 + l2)s + (a3 + l3) = 0

• So we have the freedom to place the closed-loop poles as desired.


— Task greatly simplified by the selection of the state-space model
used for the design/analysis.
Fall 2001 16.31 16—9

• Another approach:
— Note that the poles of (A − LC) and (A − LC)T are identical.
— Also we have that (A − LC)T = AT − C T LT
— So designing LT for this transposed system looks like a standard
regulator problem (A − BK) where
A ⇒ AT
B ⇒ CT
K ⇒ LT
So we can use
Ke = acker(AT , C T , P ) , L ≡ KeT

• Note that the estimator equivalent of Ackermann’s formula is that


 
0
 .. 
.
L = Φe(s)M−1 o  
0
1
Fall 2001 16.31 16—10

Estimators Example
• Simple system
∙ ¸ ∙ ¸ ∙ ¸
−1 1.5 1 −0.5
A = , B= , x(0) =
1 −2 0 −1
£ ¤
C = 1 0 , D=0
— Assume that the initial conditions are not well known.
— System stable, but λmax (A) = −0.18
— Test observability:
∙ ¸ ∙ ¸
C 1 0
rank = rank
CA −1 1.5
• Use open and closed-loop estimators
— Since the initial conditions are not well known, use
∙ ¸
0
x̂(0) =
0
• Open-loop estimator:
x̂˙ = Ax̂ + Bu
ŷ = C x̂

• Closed-loop estimator:
x̂˙ = Ax̂ + Bu + Lỹ = Ax̂ + Bu + L(y − ŷ)
= (A − LC)x̂ + Bu + Ly
ŷ = C x̂
— Which is a dynamic system with poles given by λi (A − LC)
and which takes the measured plant outputs as an input and
generates an estimate of x.
Fall 2001 16.31 16—11

• Typically simulate both systems together for simplicity

• Open-loop case:
ẋ = Ax + Bu
y = Cx
x̂˙ = Ax̂ + Bu
ŷ = C x̂
 
∙ ¸ ∙ ¸∙ ¸ ∙ ¸ ∙ ¸ −0.5
 
ẋ A 0 x B x(0)  −1 
⇒ = + u , = 
x̂˙ 0 A x̂ B x̂(0)  0
0
∙ ¸ ∙ ¸∙ ¸
y C 0 x
=
ŷ 0 C x̂

• Closed-loop case:
ẋ = Ax + Bu
x̂˙ = (A − LC)x̂ + Bu + LCx
∙ ¸ ∙ ¸∙ ¸ ∙ ¸
ẋ A 0 x B
⇒ = + u
x̂˙ LC A − LC x̂ B

• Example uses a strong u(t) to shake things up


Fall 2001 16.31 16—12

Figure 1: Open-loop estimator. Estimation error converges to zero, but very


slowly.
Open loop estimator
1

0.5
states

x1
−0.5 x2

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

0.5
estimation error

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

Figure 2: Closed-loop estimator. Convergence looks much better.


Closed−loop estimator
1

0.5
states

x1
−0.5 x2

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time

0.5
estimation error

−0.5

−1
0 0.5 1 1.5 2 2.5 3 3.5 4
time
Fall 2001 16.31 16—13

Where to put the Estimator Poles?


• Location heuristics for poles still apply — use Bessel, ITAE, ...
— Main difference: probably want to make the estimator faster than
you intend to make the regulator — should enhance the control,
which is based on x̂(t).
— ROT: Factor of 2—3 in the time constant ζωn associated with the
regulator poles.

• Note: When designing a regulator, were concerned with “band-


width” of the control getting too high ⇒ often results in control
commands that saturate the actuators and/or change rapidly.

• Different concerns for the estimator:


— Loop closed inside computer, so saturation not a problem.
— However, the measurements y are often “noisy”, and we need to
be careful how we use them to develop our state estimates.

⇒ High bandwidth estimators tend to accentuate the effect of


sensing noise in the estimate.
— State estimates tend to “track” the measurements, which are
fluctuating randomly due to the noise.

⇒ Low bandwidth estimators have lower gains and tend to rely


more heavily on the plant model
— Essentially an open-loop estimator — tends to ignore the mea-
surements and just uses the plant model.
Fall 2001 16.31 16—14

• Can also develop an optimal estimator for this type of system.


— Which is apparently what Kalman did one evening in 1958 while
taking the train from Princeton to Baltimore...
— Balances effect of the various types of random noise in the
system on the estimator:
ẋ = Ax + Bu + Bw w
y = Cx + v
where:
3 w is called “process noise” — models the uncertainty in the
system model.
3 v is called “sensor noise” — models the uncertainty in the
measurements.

• A symmetric root locus exists for the optimal estimator.

— Define Gyw (s) = C(sI − A)−1Bw ≡ N (s)/D(s)

— SRL for the closed-loop poles λi (A−LC) of the estimator which


are the LHP roots of:
Rw
D(s)D(−s) ± N(s)N (−s) = 0
Rv
where Rw and Rv are, in some sense, associated with the sizes of
the process/sensor noise (spectral density).

— Pick sign to ensure that there are no poles on the jω-axis.


Fall 2001 16.31 16—15

• Relative size of the noises determine where the poles will be located.
— Similar to role of control cost in LQR problem.

• As Rw /Rv → 0, the n poles go to the


1. LHP poles of the system

2. Reflection of the RHP poles of the system about the jω-axis.


— The “relatively noisy” sensor case
⇒ Closed-loop estimator essentially reverts back to
the open-loop case (but must be stable).

— Low bandwidth estimator.

• As Rw /Rv → ∞, the n poles go to


1. LHP zeros (and reflections of the RHP zeros) of Gyw (s).

2. ∞ along the Butterworth patterns — same as regulator case


— The “relatively clean” sensor case
⇒ Closed-loop estimator poles go to very high band-
width to take full advantage o the information in y.

— High bandwidth estimator.

• If you know Rw and Rv , then use them in the SRL, but more
often than not we just use them as “tuning” parameters to
develop low → high bandwidth estimators.
— Typically fix Rw and tune estimator bandwidth using Rv
Fall 2001 16.31 16—16

Final Thoughts

• Note that the feedback gain L in the estimator only stabilizes the
estimation error.
— If the system is unstable, then the state estimates will also go to
∞, with zero error from the actual states.

• Estimation is an important concept of its own.


— Not always just “part of the control system”
— Critical issue for guidance and navigation system

• More complete discussion requires that we study stochastic pro-


cesses and optimization theory.

• Estimation is all about which do you trust more: your


measurements or your model.
Fall 2001 16.31 16–17

Interpretations
• With noise in the system, the model is of the form:
ẋ = Ax + Bu + Bw w , y = Cx + v
– And the estimator is of the form:
x̂˙ = Ax̂ + Bu + L(y − ŷ) , ŷ = C x̂

• Analysis: in this case:


x̃˙ = ẋ − x̂˙ = [Ax + Bu + Bw w] − [Ax̂ + Bu + L(y − ŷ)]
= A(x − x̂) − L(Cx − C x̂) + Bw w − Lv
= Ax̃ − LC x̃ + Bw w − Lv
= (A − LC)x̃ + Bw w − Lv

• This equation of the estimation error explicitly shows the conflict


in the estimator design process. Must balance between:
– Speed of the estimator decay rate, which is governed by λi(A −
LC)
– Impact of the sensing noise v through the gain L

• Fast state reconstruction requires rapid decay rate (typically re-


quires a large L), but that tends to magnify the effect of v on the
estimation process.
– The effect of the process noise is always there, but the choice of
L will tend to mitigate/accentuate the effect of v on x̃(t).

• Kalman Filter provides an optimal balance between the two con-


flicting problems for a given “size” of the process and sensing noises.
Fall 2001 16.31 16–18

• Filter Interpretation: Recall that x̂˙ = (A − LC)x̂ + Ly

• Consider a scalar system, and take the Laplace transform of both


sides to get:
X̂(s) L
=
Y (s) sI − (A − LC)

• This is the transfer function from the “measurement” to the “esti-


mated state”
– It looks like a low-pass filter.

• Clearly, by lowering r, and thus increasing L, we are pushing out


the pole.
– DC gain asymptotes to 1/C as L → ∞
Scalar TF from Y to \hat X for larger L

0
10
|\hat X / Y|

Increasing L
−1
10

−2
10
−1 0 1 2 3 4 5 6
10 10 10 10 10 10 10 10
Freq (rad/sec)
Fall 2001 16.31 16–19

• Second example: Lightly Damped Harmonic Oscillator


      
ẋ1 0 1 x1 0
= + w
ẋ2 −ω02 0 x2 1
y = x1 + v
where Rw = 1 and Rv = r.
• Can sense the position state of the oscillator, but want
to develop an estimator to reconstruct the velocity state.
• Find the location of the optimal poles.
   
  s −1 −1 0 1 b(s)
Gyw (s) = 1 0 = =
ω02 s 1 s2 + ω02 a(s)

• So we must find the LHP roots of


 2   1 1
s + ω02 (−s)2 + ω02 + = (s2 + ω02 )2 + = 0
r r
Symmetric root locus
1.5

0.5
Imag Axis

−0.5

−1

−1.5
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Real Axis

• Note that as r → 0 (clean sensor), the estimator poles tends to ∞


along the ±45 deg asymptotes, so the poles are approximately
−1 ± j 2 2
s≈ √ ⇒ Φe(s) = s2 + √ s + = 0
r r r
Fall 2001 16.31 16–20

• Can use these estimate pole locations in acker, to get that


 2    −1  
0 1 2 0 1 2 C 0
L = + √ + I
−ω02 0 r −ω02 0 r CA 1
    −1    2 
2
− ω02 √2
1 0 0 √
= r r  = r
− √r ω0 r − ω0
2 2 2 2
0 1 1 2
r
− ω02

• Given L, A, and C, we can develop the estimator transfer function


from the measurement y to the x̂2
    2  −1  
x̂2   0 1 √   √2
= 0 1 sI − + r
1 0 r
y −ω0 02 2
r
− ω0 2 2
r
− ω02
 −1  
  s + r −1
√2 √2
r
= 0 1
r − ω0
2 2 2
s
 r
 
  s 1 2

r 1
= 0 1 −2 √2
r s+ r
2
r
− ω 2
0 s 2 + √2 s + 2
r r
−2 √2 √
r r + (s + r )( r − ω0 )
√2 2 2
s − rω02
= ≈ 2
s2 + √2r s + 2r s + √2r s + 2r

• Filter zero asymptotes to s = 0 as r → 0 and the two poles → ∞


• Resulting estimator looks like a “band-limited” differentiator.
– This was expected because we measure position and want to
estimate velocity.
– Frequency band over which we are willing to perform the dif-
ferentiation determined by the “relative cleanliness” of the mea-
surements.
Fall 2001 16.31 16–21

Vel sens to Pos state, sen noise r=0.01 Vel sens to Pos state, sen noise r=0.0001
4 4
10 10

2 2
10 10
Mag

Mag
0 0
10 10

−2 −2
10 10

−4 −4
10 10
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)

200 200

150 150
Phase (deg)

Phase (deg)

100 100

50 50

0 0
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Vel sens to Pos state, sen noise r=1e−006 Vel sens to Pos state, sen noise r=1e−008
4 4
10 10

2 2
10 10
Mag

Mag

0 0
10 10

−2 −2
10 10

−4 −4
10 10
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Vel sens to Pos state, sen noise r=1e−006
200 200

150 150
Phase (deg)

Phase (deg)

100 100

50 50

0 0
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Topic #17

16.31 Feedback Control

State-Space Systems
• Closed-loop control using estimators and regulators.
• Dynamics output feedback

• “Back to reality”

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 17—1

Combined Estimators and Regulators


• Can now evaluate the stability and/or performance of a controller
when we design K assuming that u = −Kx, but we implement
u = −K x̂

• Assume that we have designed a closed-loop estimator with gain L


˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
ŷ(t) = C x̂(t)

• Then we have that the closed-loop system dynamics are given by:
ẋ(t) = Ax(t) + Bu(t)
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
y(t) = Cx(t)
ŷ(t) = C x̂(t)
u = −K x̂

• Which can be compactly written as:


∙ ¸ ∙ ¸∙ ¸
ẋ A −BK x
= ⇒ ẋcl = Acl xcl
x̂˙ LC A − BK − LC x̂

• This does not look too good at this point — not even obvious that
the closed-system is stable.
λi (Acl ) =??
Fall 2001 16.31 17—2

• Can fix this problem by introducing a new variable x̃ = x − x̂ and


then converting the closed-loop system dynamics using the
similarity transformation T
∙ ¸ ∙ ¸∙ ¸
x I 0 x
x̃cl , = = T xcl
x̃ I −I x̂
— Note that T = T −1

• Now rewrite the system dynamics in terms of the state x̃cl


Acl ⇒ T Acl T −1 , Ācl
— Note that similarity transformations preserve the eigenvalues, so
we are guaranteed that
λi(Acl ) ≡ λi(Ācl )

• Work through the math:


∙ ¸∙ ¸∙ ¸
I 0 A −BK I 0
Ācl =
I −I LC A − BK − LC I −I
∙ ¸∙ ¸
A −BK I 0
=
A − LC −A + LC I −I
∙ ¸
A − BK BK
=
0 A − LC

• Because Ācl is block upper triangular, we know that the closed-loop


poles of the system are given by
det(sI − Ācl ) , det(sI − (A − BK)) · det(sI − (A − LC)) = 0
Fall 2001 16.31 17—3

• Observation: The closed-loop poles for this system con-


sist of the union of the regulator poles and estimator poles.

• So we can just design the estimator/regulator separately and com-


bine them at the end.
— Called the Separation Principle.
— Just keep in mind that the pole locations you are picking for these
two sub-problems will also be the closed-loop pole locations.

• Note: the separation principle means that there will be no ambi-


guity or uncertainty about the stability and/or performance of the
closed-loop system.
— The closed-loop poles will be exactly where you put them!!
— And we have not even said what compensator does this amazing
accomplishment!!!
Fall 2001 16.31 17—4

The Compensator
• Dynamic Output Feedback Compensator is the combina-
tion of the regulator and estimator using u = −K x̂
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
= Ax̂(t) − BK x̂ + L(y − C x̂)

˙
⇒ x̂(t) = (A − BK − LC)x̂(t) + Ly
u = −K x̂

• Rewrite with new state xc ≡ x̂


ẋc = Acxc + Bcy
u = −Ccxc
where the compensator dynamics are given by:
Ac , A − BK − LC , Bc , L , Cc , K
— Note that the compensator maps sensor measurements to ac-
tuator commands, as expected.

• Closed-loop system stable if regulator/estimator poles placed in the


LHP, but compensator dynamics do not need to be stable.
λi(A − BK − LC) =??
Fall 2001 16.31 17—5

• For consistency in the implementation with the classical approaches,


define the compensator transfer function so that
u = −Gc(s)y
— From the state-space model of the compensator:
U (s)
, −Gc(s)
Y (s)
= −Cc (sI − Ac )−1Bc
= −K(sI − (A − BK − LC))−1L
⇒ Gc(s) = Cc(sI − Ac)−1Bc

• Note that it is often very easy to provide classical interpretations


(such as lead/lag) for the compensator Gc(s).

• One way to implement this compensator with a reference command


r(t) is to change the feedback to be on e(t) = r(t) − y(t) rather
than just −y(t)
r e -
u y -
6
Gc(s) G(s)

⇒ u = Gc(s)e = Gc(s)(r − y)
— So we still have u = −Gc (s)y if r = 0.
— Intuitively appealing because it is the same approach used for
the classical control, but it turns out not to be the best approach.
More on this later.
Fall 2001 16.31 17—6

Mechanics
• Basics:
e = r − y, u = Gce, y = Gu

Gc(s) : ẋc = Acxc + Bce , u = Ccxc

G(s) : ẋ = Ax + Bu , y = Cx

• Loop dynamics L = Gc(s)G(s) ⇒ y = L(s)e


ẋ = Ax +BCc xc
ẋc = +Ac xc +Bce
∙ ¸ ∙ ¸∙ ¸ ∙ ¸
ẋ A BCc x 0
L(s) = + e
ẋc 0 Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc

• To “close the loop”, note that e = r − y, then


∙ ¸ ∙ ¸∙ ¸ ∙ ¸µ ∙ ¸¶
ẋ A BCc x 0 £ ¤ x
= + r− C 0
ẋc 0 Ac xc Bc xc
∙ ¸∙ ¸ ∙ ¸
A BCc x 0
= + r
−BcC Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc
— Acl is not exactly the same as on page 17-1 because we have re-
arranged where the negative sign enters into the problem. Same
result though.
Fall 2001 16.31 17—7

Simple Example

• Let G(s) = 1/s2 with state-space model given by:


∙ ¸ ∙ ¸
0 1 0 £ ¤
A= , B= , C= 1 0 , D=0
0 0 1

• Design the regulator to place the poles at s = −4 ± 4j


£ ¤
λi (A − BK) = −4 ± 4j ⇒ K = 32 8
— Time constant of regulator poles τc = 1/ζωn ≈ 1/4 = 0.25 sec

• Put estimator poles so that the time constant is faster τe ≈ 1/10


— Use real poles, so Φe(s) = (s + 10)2
∙ ¸−1 ∙ ¸
C 0
L = Φe (A)
CA 1
Ã∙ ¸2 ∙ ¸ ∙ ¸! ∙ ¸−1 ∙ ¸
0 1 0 1 100 0 1 0 0
= + 20 +
0 0 0 0 0 100 0 1 1
∙ ¸∙ ¸ ∙ ¸
100 20 0 20
= =
0 100 1 100
Fall 2001 16.31 17—8

• Compensator:
Ac = A
∙ − BK¸ −∙LC¸ ∙ ¸
0 1 0 £ ¤ 20 £ ¤
= − 32 8 − 1 0
0 0 1 100
∙ ¸
−20 1
=
−132 −8
∙ ¸
20
Bc = L =
100
£ ¤
Cc = K = 32 8

• Compensator transfer function:


U
Gc(s) = Cc(sI − Ac)−1Bc ,
E
s + 2.222
= 1440
s2 + 28s + 292

• Note that the compensator has a low frequency real zero and two
higher frequency poles.
— Thus it looks like a “lead” compensator.
Fall 2001 16.31 17—9

2
10
Plant G
Compensator Gc

1
Mag 10

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

50
Plant G
Compensator Gc
0
Phase (deg)

−50

−100

−150

−200
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 1: Plant is pretty simple and the compensator looks like a lead
2—10 rads/sec.
2
10
Loop L

1
10
Mag

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

−120
−140
−160
Phase (deg)

−180
−200
−220
−240
−260
−280
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 2: Loop transfer function L(s) shows the slope change near
ωc = 5 rad/sec. Note that we have a large PM and GM.
Fall 2001 16.31 17—10

15

10

5
Imag Axis

−5

−10

−15
−15 −10 −5 0 5
Real Axis

Figure 3: Freeze the compensator poles and zeros and look at the root
locus of closed-loop poles versus an additional loop gain α (nominally
α = 1.)
2
10
Plant G
closed−loop Gcl

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 4: Closed-loop transfer function.


Fall 2001 16.31 17—11

8·14·20
Figure 5: Example #1: G(s) = (s+8)(s+14)(s+20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=10.978 dB (at 40.456 rad/sec), Pm=69.724 deg. (at 15.063 rad/sec)
50

0
10
0
Mag

−1
10 −50
Phase (deg); Magnitude (dB)

−100
−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −150

0
0
−50
−50 −100

−150
Phase (deg)

−100
−200
−150 −250

−200 −300

−350
−250
−400
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—12

8·14·20
Figure 6: Example #1: G(s) = (s+8)(s+14)(s+20)
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−80 −70 −60 −50 −40 −30 −20 −10 0 10 20
Real Axis

25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−50 −45 −40 −35 −30 −25 −20 −15 −10 −5 0
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—13

• Two compensator zeros at -21.54±6.63j draw the two lower fre-


quency plant poles further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—14

0.94
Figure 7: Example #2: G(s) = s2 −0.0297
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=11.784 dB (at 7.4093 rad/sec), Pm=36.595 deg. (at 2.7612 rad/sec)
50
0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−100
0

−50 −150
Phase (deg)

−100
−200
−150

−200 −250

−250
−300
−2 −1 0 1 2
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—15

0.94
Figure 8: Example #2: G(s) = s2 −0.0297
6

2
Imag Axis

−2

−4

−6
−8 −6 −4 −2 0 2
Real Axis

1.5

0.5
Imag Axis

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—16

• Compensator zero at -1.21 draws the two lower frequency plant poles
further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—17

8·14·20
Figure 9: Example #3: G(s) = (s−8)(s−14)(s−20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=−0.90042 dB (at 24.221 rad/sec), Pm=6.6704 deg. (at 35.813 rad/sec)
50

0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−150
0

−50 −200
Phase (deg)

−100
−250
−150

−200 −300

−250
−350
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—18

8·14·20
Figure 10: Example #3: G(s) = (s−8)(s−14)(s−20)
100

80

60

40

20
Imag Axis

−20

−40

−60

−80

−100
−140 −120 −100 −80 −60 −40 −20 0 20 40 60
Real Axis
25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−25 −20 −15 −10 −5 0 5 10 15 20 25
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—19

• Compensator zeros at 3.72±8.03j draw the two higher frequency


plant poles further into the LHP. Lowest frequency one heads into
the LHP on its own.
• Compensator poles are at much higher frequency.
• Note sure what this looks like.
Fall 2001 16.31 17—20

(s−1)
Figure 11: Example #4: G(s) = (s+1)(s−3)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=−3.3976 dB (at 4.5695 rad/sec), Pm=−22.448 deg. (at 1.4064 rad/sec)
20
0
10
0
Mag

−20
−1
10
Phase (deg); Magnitude (dB)

−40

−2 −60
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −80

220
0
210
−50 200

190
Phase (deg)

−100
180
−150
170

−200 160

150
−250
140
−1 0 1 2 3
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—21

(s−1)
Figure 12: Example #4: G(s) = (s+1)(s−3)
40

30

20

10
Imag Axis

−10

−20

−30

−40
−40 −30 −20 −10 0 10 20
Real Axis
10

2
Imag Axis

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—22

• Compensator zero at -1 cancels the plant pole. Note the very un-
stable compensator pole at s = 9!!
— Needed to get the RHP plant pole to branch off the real line and
head into the LHP.
• Other compensator pole is at much higher frequency.
• Note sure what this looks like.

• Separation principle gives a very powerful and simple way to develop


a dynamic output feedback controller

• Note that the designer now focuses on selecting the appropriate


regulator and estimator pole locations. Once those are set, the
closed-loop response is specified.
— Can almost consider the compensator to be a by-product.

• These examples show that the design process is extremely simple.


Topic #17

16.31 Feedback Control

State-Space Systems
• Closed-loop control using estimators and regulators.
• Dynamics output feedback

• “Back to reality”

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 17—1

Combined Estimators and Regulators


• Can now evaluate the stability and/or performance of a controller
when we design K assuming that u = −Kx, but we implement
u = −K x̂

• Assume that we have designed a closed-loop estimator with gain L


˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
ŷ(t) = C x̂(t)

• Then we have that the closed-loop system dynamics are given by:
ẋ(t) = Ax(t) + Bu(t)
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
y(t) = Cx(t)
ŷ(t) = C x̂(t)
u = −K x̂

• Which can be compactly written as:


∙ ¸ ∙ ¸∙ ¸
ẋ A −BK x
= ⇒ ẋcl = Acl xcl
x̂˙ LC A − BK − LC x̂

• This does not look too good at this point — not even obvious that
the closed-system is stable.
λi (Acl ) =??
Fall 2001 16.31 17—2

• Can fix this problem by introducing a new variable x̃ = x − x̂ and


then converting the closed-loop system dynamics using the
similarity transformation T
∙ ¸ ∙ ¸∙ ¸
x I 0 x
x̃cl , = = T xcl
x̃ I −I x̂
— Note that T = T −1

• Now rewrite the system dynamics in terms of the state x̃cl


Acl ⇒ T Acl T −1 , Ācl
— Note that similarity transformations preserve the eigenvalues, so
we are guaranteed that
λi(Acl ) ≡ λi(Ācl )

• Work through the math:


∙ ¸∙ ¸∙ ¸
I 0 A −BK I 0
Ācl =
I −I LC A − BK − LC I −I
∙ ¸∙ ¸
A −BK I 0
=
A − LC −A + LC I −I
∙ ¸
A − BK BK
=
0 A − LC

• Because Ācl is block upper triangular, we know that the closed-loop


poles of the system are given by
det(sI − Ācl ) , det(sI − (A − BK)) · det(sI − (A − LC)) = 0
Fall 2001 16.31 17—3

• Observation: The closed-loop poles for this system con-


sist of the union of the regulator poles and estimator poles.

• So we can just design the estimator/regulator separately and com-


bine them at the end.
— Called the Separation Principle.
— Just keep in mind that the pole locations you are picking for these
two sub-problems will also be the closed-loop pole locations.

• Note: the separation principle means that there will be no ambi-


guity or uncertainty about the stability and/or performance of the
closed-loop system.
— The closed-loop poles will be exactly where you put them!!
— And we have not even said what compensator does this amazing
accomplishment!!!
Fall 2001 16.31 17—4

The Compensator
• Dynamic Output Feedback Compensator is the combina-
tion of the regulator and estimator using u = −K x̂
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
= Ax̂(t) − BK x̂ + L(y − C x̂)

˙
⇒ x̂(t) = (A − BK − LC)x̂(t) + Ly
u = −K x̂

• Rewrite with new state xc ≡ x̂


ẋc = Acxc + Bcy
u = −Ccxc
where the compensator dynamics are given by:
Ac , A − BK − LC , Bc , L , Cc , K
— Note that the compensator maps sensor measurements to ac-
tuator commands, as expected.

• Closed-loop system stable if regulator/estimator poles placed in the


LHP, but compensator dynamics do not need to be stable.
λi(A − BK − LC) =??
Fall 2001 16.31 17—5

• For consistency in the implementation with the classical approaches,


define the compensator transfer function so that
u = −Gc(s)y
— From the state-space model of the compensator:
U (s)
, −Gc(s)
Y (s)
= −Cc (sI − Ac )−1Bc
= −K(sI − (A − BK − LC))−1L
⇒ Gc(s) = Cc(sI − Ac)−1Bc

• Note that it is often very easy to provide classical interpretations


(such as lead/lag) for the compensator Gc(s).

• One way to implement this compensator with a reference command


r(t) is to change the feedback to be on e(t) = r(t) − y(t) rather
than just −y(t)
r e -
u y -
6
Gc(s) G(s)

⇒ u = Gc(s)e = Gc(s)(r − y)
— So we still have u = −Gc (s)y if r = 0.
— Intuitively appealing because it is the same approach used for
the classical control, but it turns out not to be the best approach.
More on this later.
Fall 2001 16.31 17—6

Mechanics
• Basics:
e = r − y, u = Gce, y = Gu

Gc(s) : ẋc = Acxc + Bce , u = Ccxc

G(s) : ẋ = Ax + Bu , y = Cx

• Loop dynamics L = Gc(s)G(s) ⇒ y = L(s)e


ẋ = Ax +BCc xc
ẋc = +Ac xc +Bce
∙ ¸ ∙ ¸∙ ¸ ∙ ¸
ẋ A BCc x 0
L(s) = + e
ẋc 0 Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc

• To “close the loop”, note that e = r − y, then


∙ ¸ ∙ ¸∙ ¸ ∙ ¸µ ∙ ¸¶
ẋ A BCc x 0 £ ¤ x
= + r− C 0
ẋc 0 Ac xc Bc xc
∙ ¸∙ ¸ ∙ ¸
A BCc x 0
= + r
−BcC Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc
— Acl is not exactly the same as on page 17-1 because we have re-
arranged where the negative sign enters into the problem. Same
result though.
Fall 2001 16.31 17—7

Simple Example

• Let G(s) = 1/s2 with state-space model given by:


∙ ¸ ∙ ¸
0 1 0 £ ¤
A= , B= , C= 1 0 , D=0
0 0 1

• Design the regulator to place the poles at s = −4 ± 4j


£ ¤
λi (A − BK) = −4 ± 4j ⇒ K = 32 8
— Time constant of regulator poles τc = 1/ζωn ≈ 1/4 = 0.25 sec

• Put estimator poles so that the time constant is faster τe ≈ 1/10


— Use real poles, so Φe(s) = (s + 10)2
∙ ¸−1 ∙ ¸
C 0
L = Φe (A)
CA 1
Ã∙ ¸2 ∙ ¸ ∙ ¸! ∙ ¸−1 ∙ ¸
0 1 0 1 100 0 1 0 0
= + 20 +
0 0 0 0 0 100 0 1 1
∙ ¸∙ ¸ ∙ ¸
100 20 0 20
= =
0 100 1 100
Fall 2001 16.31 17—8

• Compensator:
Ac = A
∙ − BK¸ −∙LC¸ ∙ ¸
0 1 0 £ ¤ 20 £ ¤
= − 32 8 − 1 0
0 0 1 100
∙ ¸
−20 1
=
−132 −8
∙ ¸
20
Bc = L =
100
£ ¤
Cc = K = 32 8

• Compensator transfer function:


U
Gc(s) = Cc(sI − Ac)−1Bc ,
E
s + 2.222
= 1440
s2 + 28s + 292

• Note that the compensator has a low frequency real zero and two
higher frequency poles.
— Thus it looks like a “lead” compensator.
Fall 2001 16.31 17—9

2
10
Plant G
Compensator Gc

1
Mag 10

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

50
Plant G
Compensator Gc
0
Phase (deg)

−50

−100

−150

−200
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 1: Plant is pretty simple and the compensator looks like a lead
2—10 rads/sec.
2
10
Loop L

1
10
Mag

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

−120
−140
−160
Phase (deg)

−180
−200
−220
−240
−260
−280
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 2: Loop transfer function L(s) shows the slope change near
ωc = 5 rad/sec. Note that we have a large PM and GM.
Fall 2001 16.31 17—10

15

10

5
Imag Axis

−5

−10

−15
−15 −10 −5 0 5
Real Axis

Figure 3: Freeze the compensator poles and zeros and look at the root
locus of closed-loop poles versus an additional loop gain α (nominally
α = 1.)
2
10
Plant G
closed−loop Gcl

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 4: Closed-loop transfer function.


Fall 2001 16.31 17—11

8·14·20
Figure 5: Example #1: G(s) = (s+8)(s+14)(s+20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=10.978 dB (at 40.456 rad/sec), Pm=69.724 deg. (at 15.063 rad/sec)
50

0
10
0
Mag

−1
10 −50
Phase (deg); Magnitude (dB)

−100
−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −150

0
0
−50
−50 −100

−150
Phase (deg)

−100
−200
−150 −250

−200 −300

−350
−250
−400
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—12

8·14·20
Figure 6: Example #1: G(s) = (s+8)(s+14)(s+20)
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−80 −70 −60 −50 −40 −30 −20 −10 0 10 20
Real Axis

25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−50 −45 −40 −35 −30 −25 −20 −15 −10 −5 0
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—13

• Two compensator zeros at -21.54±6.63j draw the two lower fre-


quency plant poles further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—14

0.94
Figure 7: Example #2: G(s) = s2 −0.0297
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=11.784 dB (at 7.4093 rad/sec), Pm=36.595 deg. (at 2.7612 rad/sec)
50
0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−100
0

−50 −150
Phase (deg)

−100
−200
−150

−200 −250

−250
−300
−2 −1 0 1 2
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—15

0.94
Figure 8: Example #2: G(s) = s2 −0.0297
6

2
Imag Axis

−2

−4

−6
−8 −6 −4 −2 0 2
Real Axis

1.5

0.5
Imag Axis

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—16

• Compensator zero at -1.21 draws the two lower frequency plant poles
further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—17

8·14·20
Figure 9: Example #3: G(s) = (s−8)(s−14)(s−20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=−0.90042 dB (at 24.221 rad/sec), Pm=6.6704 deg. (at 35.813 rad/sec)
50

0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−150
0

−50 −200
Phase (deg)

−100
−250
−150

−200 −300

−250
−350
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—18

8·14·20
Figure 10: Example #3: G(s) = (s−8)(s−14)(s−20)
100

80

60

40

20
Imag Axis

−20

−40

−60

−80

−100
−140 −120 −100 −80 −60 −40 −20 0 20 40 60
Real Axis
25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−25 −20 −15 −10 −5 0 5 10 15 20 25
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—19

• Compensator zeros at 3.72±8.03j draw the two higher frequency


plant poles further into the LHP. Lowest frequency one heads into
the LHP on its own.
• Compensator poles are at much higher frequency.
• Note sure what this looks like.
Fall 2001 16.31 17—20

(s−1)
Figure 11: Example #4: G(s) = (s+1)(s−3)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=−3.3976 dB (at 4.5695 rad/sec), Pm=−22.448 deg. (at 1.4064 rad/sec)
20
0
10
0
Mag

−20
−1
10
Phase (deg); Magnitude (dB)

−40

−2 −60
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −80

220
0
210
−50 200

190
Phase (deg)

−100
180
−150
170

−200 160

150
−250
140
−1 0 1 2 3
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—21

(s−1)
Figure 12: Example #4: G(s) = (s+1)(s−3)
40

30

20

10
Imag Axis

−10

−20

−30

−40
−40 −30 −20 −10 0 10 20
Real Axis
10

2
Imag Axis

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—22

• Compensator zero at -1 cancels the plant pole. Note the very un-
stable compensator pole at s = 9!!
— Needed to get the RHP plant pole to branch off the real line and
head into the LHP.
• Other compensator pole is at much higher frequency.
• Note sure what this looks like.

• Separation principle gives a very powerful and simple way to develop


a dynamic output feedback controller

• Note that the designer now focuses on selecting the appropriate


regulator and estimator pole locations. Once those are set, the
closed-loop response is specified.
— Can almost consider the compensator to be a by-product.

• These examples show that the design process is extremely simple.


Topic #17

16.31 Feedback Control

State-Space Systems
• Closed-loop control using estimators and regulators.
• Dynamics output feedback

• “Back to reality”

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 17—1

Combined Estimators and Regulators


• Can now evaluate the stability and/or performance of a controller
when we design K assuming that u = −Kx, but we implement
u = −K x̂

• Assume that we have designed a closed-loop estimator with gain L


˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
ŷ(t) = C x̂(t)

• Then we have that the closed-loop system dynamics are given by:
ẋ(t) = Ax(t) + Bu(t)
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
y(t) = Cx(t)
ŷ(t) = C x̂(t)
u = −K x̂

• Which can be compactly written as:


∙ ¸ ∙ ¸∙ ¸
ẋ A −BK x
= ⇒ ẋcl = Acl xcl
x̂˙ LC A − BK − LC x̂

• This does not look too good at this point — not even obvious that
the closed-system is stable.
λi (Acl ) =??
Fall 2001 16.31 17—2

• Can fix this problem by introducing a new variable x̃ = x − x̂ and


then converting the closed-loop system dynamics using the
similarity transformation T
∙ ¸ ∙ ¸∙ ¸
x I 0 x
x̃cl , = = T xcl
x̃ I −I x̂
— Note that T = T −1

• Now rewrite the system dynamics in terms of the state x̃cl


Acl ⇒ T Acl T −1 , Ācl
— Note that similarity transformations preserve the eigenvalues, so
we are guaranteed that
λi(Acl ) ≡ λi(Ācl )

• Work through the math:


∙ ¸∙ ¸∙ ¸
I 0 A −BK I 0
Ācl =
I −I LC A − BK − LC I −I
∙ ¸∙ ¸
A −BK I 0
=
A − LC −A + LC I −I
∙ ¸
A − BK BK
=
0 A − LC

• Because Ācl is block upper triangular, we know that the closed-loop


poles of the system are given by
det(sI − Ācl ) , det(sI − (A − BK)) · det(sI − (A − LC)) = 0
Fall 2001 16.31 17—3

• Observation: The closed-loop poles for this system con-


sist of the union of the regulator poles and estimator poles.

• So we can just design the estimator/regulator separately and com-


bine them at the end.
— Called the Separation Principle.
— Just keep in mind that the pole locations you are picking for these
two sub-problems will also be the closed-loop pole locations.

• Note: the separation principle means that there will be no ambi-


guity or uncertainty about the stability and/or performance of the
closed-loop system.
— The closed-loop poles will be exactly where you put them!!
— And we have not even said what compensator does this amazing
accomplishment!!!
Fall 2001 16.31 17—4

The Compensator
• Dynamic Output Feedback Compensator is the combina-
tion of the regulator and estimator using u = −K x̂
˙
x̂(t) = Ax̂(t) + Bu(t) + L(y − ŷ)
= Ax̂(t) − BK x̂ + L(y − C x̂)

˙
⇒ x̂(t) = (A − BK − LC)x̂(t) + Ly
u = −K x̂

• Rewrite with new state xc ≡ x̂


ẋc = Acxc + Bcy
u = −Ccxc
where the compensator dynamics are given by:
Ac , A − BK − LC , Bc , L , Cc , K
— Note that the compensator maps sensor measurements to ac-
tuator commands, as expected.

• Closed-loop system stable if regulator/estimator poles placed in the


LHP, but compensator dynamics do not need to be stable.
λi(A − BK − LC) =??
Fall 2001 16.31 17—5

• For consistency in the implementation with the classical approaches,


define the compensator transfer function so that
u = −Gc(s)y
— From the state-space model of the compensator:
U (s)
, −Gc(s)
Y (s)
= −Cc (sI − Ac )−1Bc
= −K(sI − (A − BK − LC))−1L
⇒ Gc(s) = Cc(sI − Ac)−1Bc

• Note that it is often very easy to provide classical interpretations


(such as lead/lag) for the compensator Gc(s).

• One way to implement this compensator with a reference command


r(t) is to change the feedback to be on e(t) = r(t) − y(t) rather
than just −y(t)
r e -
u y -
6
Gc(s) G(s)

⇒ u = Gc(s)e = Gc(s)(r − y)
— So we still have u = −Gc (s)y if r = 0.
— Intuitively appealing because it is the same approach used for
the classical control, but it turns out not to be the best approach.
More on this later.
Fall 2001 16.31 17—6

Mechanics
• Basics:
e = r − y, u = Gce, y = Gu

Gc(s) : ẋc = Acxc + Bce , u = Ccxc

G(s) : ẋ = Ax + Bu , y = Cx

• Loop dynamics L = Gc(s)G(s) ⇒ y = L(s)e


ẋ = Ax +BCc xc
ẋc = +Ac xc +Bce
∙ ¸ ∙ ¸∙ ¸ ∙ ¸
ẋ A BCc x 0
L(s) = + e
ẋc 0 Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc

• To “close the loop”, note that e = r − y, then


∙ ¸ ∙ ¸∙ ¸ ∙ ¸µ ∙ ¸¶
ẋ A BCc x 0 £ ¤ x
= + r− C 0
ẋc 0 Ac xc Bc xc
∙ ¸∙ ¸ ∙ ¸
A BCc x 0
= + r
−BcC Ac xc Bc
∙ ¸
£ ¤ x
y = C 0
xc
— Acl is not exactly the same as on page 17-1 because we have re-
arranged where the negative sign enters into the problem. Same
result though.
Fall 2001 16.31 17—7

Simple Example

• Let G(s) = 1/s2 with state-space model given by:


∙ ¸ ∙ ¸
0 1 0 £ ¤
A= , B= , C= 1 0 , D=0
0 0 1

• Design the regulator to place the poles at s = −4 ± 4j


£ ¤
λi (A − BK) = −4 ± 4j ⇒ K = 32 8
— Time constant of regulator poles τc = 1/ζωn ≈ 1/4 = 0.25 sec

• Put estimator poles so that the time constant is faster τe ≈ 1/10


— Use real poles, so Φe(s) = (s + 10)2
∙ ¸−1 ∙ ¸
C 0
L = Φe (A)
CA 1
Ã∙ ¸2 ∙ ¸ ∙ ¸! ∙ ¸−1 ∙ ¸
0 1 0 1 100 0 1 0 0
= + 20 +
0 0 0 0 0 100 0 1 1
∙ ¸∙ ¸ ∙ ¸
100 20 0 20
= =
0 100 1 100
Fall 2001 16.31 17—8

• Compensator:
Ac = A
∙ − BK¸ −∙LC¸ ∙ ¸
0 1 0 £ ¤ 20 £ ¤
= − 32 8 − 1 0
0 0 1 100
∙ ¸
−20 1
=
−132 −8
∙ ¸
20
Bc = L =
100
£ ¤
Cc = K = 32 8

• Compensator transfer function:


U
Gc(s) = Cc(sI − Ac)−1Bc ,
E
s + 2.222
= 1440
s2 + 28s + 292

• Note that the compensator has a low frequency real zero and two
higher frequency poles.
— Thus it looks like a “lead” compensator.
Fall 2001 16.31 17—9

2
10
Plant G
Compensator Gc

1
Mag 10

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

50
Plant G
Compensator Gc
0
Phase (deg)

−50

−100

−150

−200
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 1: Plant is pretty simple and the compensator looks like a lead
2—10 rads/sec.
2
10
Loop L

1
10
Mag

0
10

−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

−120
−140
−160
Phase (deg)

−180
−200
−220
−240
−260
−280
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 2: Loop transfer function L(s) shows the slope change near
ωc = 5 rad/sec. Note that we have a large PM and GM.
Fall 2001 16.31 17—10

15

10

5
Imag Axis

−5

−10

−15
−15 −10 −5 0 5
Real Axis

Figure 3: Freeze the compensator poles and zeros and look at the root
locus of closed-loop poles versus an additional loop gain α (nominally
α = 1.)
2
10
Plant G
closed−loop Gcl

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)

Figure 4: Closed-loop transfer function.


Fall 2001 16.31 17—11

8·14·20
Figure 5: Example #1: G(s) = (s+8)(s+14)(s+20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=10.978 dB (at 40.456 rad/sec), Pm=69.724 deg. (at 15.063 rad/sec)
50

0
10
0
Mag

−1
10 −50
Phase (deg); Magnitude (dB)

−100
−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −150

0
0
−50
−50 −100

−150
Phase (deg)

−100
−200
−150 −250

−200 −300

−350
−250
−400
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—12

8·14·20
Figure 6: Example #1: G(s) = (s+8)(s+14)(s+20)
50

40

30

20

10
Imag Axis

−10

−20

−30

−40

−50
−80 −70 −60 −50 −40 −30 −20 −10 0 10 20
Real Axis

25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−50 −45 −40 −35 −30 −25 −20 −15 −10 −5 0
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—13

• Two compensator zeros at -21.54±6.63j draw the two lower fre-


quency plant poles further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—14

0.94
Figure 7: Example #2: G(s) = s2 −0.0297
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=11.784 dB (at 7.4093 rad/sec), Pm=36.595 deg. (at 2.7612 rad/sec)
50
0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−100
0

−50 −150
Phase (deg)

−100
−200
−150

−200 −250

−250
−300
−2 −1 0 1 2
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—15

0.94
Figure 8: Example #2: G(s) = s2 −0.0297
6

2
Imag Axis

−2

−4

−6
−8 −6 −4 −2 0 2
Real Axis

1.5

0.5
Imag Axis

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—16

• Compensator zero at -1.21 draws the two lower frequency plant poles
further into the LHP.
• Compensator poles are at much higher frequency.
• Looks like a lead compensator.
Fall 2001 16.31 17—17

8·14·20
Figure 9: Example #3: G(s) = (s−8)(s−14)(s−20)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L Gm=−0.90042 dB (at 24.221 rad/sec), Pm=6.6704 deg. (at 35.813 rad/sec)
50

0
10
Mag

−1
10
Phase (deg); Magnitude (dB)

−50

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −100

−150
0

−50 −200
Phase (deg)

−100
−250
−150

−200 −300

−250
−350
0 1 2 3
10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—18

8·14·20
Figure 10: Example #3: G(s) = (s−8)(s−14)(s−20)
100

80

60

40

20
Imag Axis

−20

−40

−60

−80

−100
−140 −120 −100 −80 −60 −40 −20 0 20 40 60
Real Axis
25

20

15

10

5
Imag Axis

−5

−10

−15

−20

−25
−25 −20 −15 −10 −5 0 5 10 15 20 25
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—19

• Compensator zeros at 3.72±8.03j draw the two higher frequency


plant poles further into the LHP. Lowest frequency one heads into
the LHP on its own.
• Compensator poles are at much higher frequency.
• Note sure what this looks like.
Fall 2001 16.31 17—20

(s−1)
Figure 11: Example #4: G(s) = (s+1)(s−3)
1 2
10 10
Plant G Plant G
Compensator Gc closed−loop Gcl
0
10
Mag

1
−1
10
10

−2
10
−1 0 1 2 3
10 10 10 10 10 Mag
Freq (rad/sec) 0
10

50
Plant G
Compensator Gc
0
Phase (deg)

−1
−50 10

−100

−150

−2
−200 10
−1 0 1 2 3 −1 0 1 2 3
10 10 10 10 10 10 10 10 10 10
Freq (rad/sec) Freq (rad/sec)
Bode Diagrams
1
10
Loop L
Gm=−3.3976 dB (at 4.5695 rad/sec), Pm=−22.448 deg. (at 1.4064 rad/sec)
20
0
10
0
Mag

−20
−1
10
Phase (deg); Magnitude (dB)

−40

−2 −60
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) −80

220
0
210
−50 200

190
Phase (deg)

−100
180
−150
170

−200 160

150
−250
140
−1 0 1 2 3
10 10 10 10 10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec) Frequency (rad/sec)
Fall 2001 16.31 17—21

(s−1)
Figure 12: Example #4: G(s) = (s+1)(s−3)
40

30

20

10
Imag Axis

−10

−20

−30

−40
−40 −30 −20 −10 0 10 20
Real Axis
10

2
Imag Axis

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
Real Axis

3 — closed-loop poles, 5 — open-loop poles, 2 — Compensator poles, ◦ — Compensator zeros


Fall 2001 16.31 17—22

• Compensator zero at -1 cancels the plant pole. Note the very un-
stable compensator pole at s = 9!!
— Needed to get the RHP plant pole to branch off the real line and
head into the LHP.
• Other compensator pole is at much higher frequency.
• Note sure what this looks like.

• Separation principle gives a very powerful and simple way to develop


a dynamic output feedback controller

• Note that the designer now focuses on selecting the appropriate


regulator and estimator pole locations. Once those are set, the
closed-loop response is specified.
— Can almost consider the compensator to be a by-product.

• These examples show that the design process is extremely simple.


Topic #18

16.31 Feedback Control

Closed-loop system analysis


• Robustness
• State-space — eigenvalue analysis
• Frequency domain — Nyquist theorem.
• Sensitivity

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 18—1

Combined Estimators and Regulators


• When we use the combination of an optimal estimator and an opti-
mal regulator to design the controller, the compensator is called
Linear Quadratic Gaussian (LQG)
— Special case of the controllers that can be designed using the
separation principle.

• The great news about an LQG design is that stability of the closed-
loop system is guaranteed.
— The designer is freed from having to perform any detailed me-
chanics - the entire process is fast and can be automated.

• Now the designer just focuses on:


— How to specify the state cost function (i.e. selecting z = Cz x)
and what value of r to use.
— Determine how the process and sensor noise enter into the system
and what their relative sizes are (i.e. select Rw & Rv )

• So the designer can focus on the “performance” related issues, be-


ing confident that the LQG design will produce a controller that
stabilizes the system.

• This sounds great — so what is the catch??


Fall 2001 16.31 18—2

• The remaining issue is that sometimes the controllers designed using


these state-space tools are very sensitive to errors in the knowledge
of the model.
— i.e., Might work very well if the plant gain α = 1, but be
unstable if it is α = 0.9 or α = 1.1.
— LQG is also prone to plant—pole/compensator—zero cancellation,
which tends to be sensitive to modeling errors.

• The good news is that the state-space techniques will give you a
controller very easily.
— You should use the time saved to verify that the one
you designed is a “good” controller.

• There are, of course, different definitions of what makes a controller


good, but one important criterion is whether there is a reason-
able chance that it would work on the real system as
®
well as it does in Matlab. ⇒ Robustness.
— The controller must be able to tolerate some modeling error,
®
because our models in Matlab are typically inaccurate.
3 Linearized model
3 Some parameters poorly known
3 Ignores some higher frequency dynamics

• Need to develop tools that will give us some insight on how well a
controller can tolerate modeling errors.
Fall 2001 16.31 18—3

Example
• Consider the “cart on a stick” system, with the dynamics as given
in the notes on the web. Define
∙ ¸ ∙ ¸
θ q
q= , x=
x q̇
Then with y = x
ẋ = Ax + Bu
y = Cx

• For the parameters given in the notes, the system has an unstable
pole at +5.6 and one at s = 0. There are plant zeros at ±5.

• The target locations for the poles were determined using the SRL
for both the regulator and estimator.
— Assumes that the process noise enters through the actuators
Bw ≡ B, which is a useful approximation.
— Regulator and estimator have the same SRL.
— Choose the process/sensor ratio to be r/10 so that the estimator
poles are faster than the regulator ones.

• The resulting compensator is unstable (+16!!)


— But this was expected. (why?)
Fall 2001 16.31 18—4

Symmetric root locus


10

2
Imag Axis

−2

−4

−6

−8

−10
−8 −6 −4 −2 0 2 4 6 8
Real Axis

Figure 1: SRL for the regulator and estimator.


4
10
Plant G
Compensator Gc
2
10
Mag

0
10

−2
10

−4
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

200
Plant G
Compensator Gc
150
Phase (deg)

100

50

0
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 2: Plant and Controller


Fall 2001 16.31 18—5
1
10
Loop L

0
10
Mag

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

−100

−150
Phase (deg)

−200

−250

−300
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 3: Loop and Margins

• Looking at both the Loop plots and the root locus, this system is
stable with a gain of 1, but
— Unstable for a gain of 1 ± ² and/or a slight change in the system
phase (possibly due to some unmodeled delays)
— Very limited chance that this would work on the real system.

• Of course, this is an extreme example and not all systems are like
this, but you must analyze to determine what robustness mar-
gins your controller really has.

• Question: what analysis tools should we use?


Fall 2001 16.31 18—6
10

2
Imag Axis

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
Real Axis

Figure 4: Root Locus with frozen compensator dynamics. Shows sen-


sitivity to overall gain — symbols are a gain of [0.995:.0001:1.005].
2

1.5

0.5
Imag Axis

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis
Fall 2001 16.31 18—7
Analysis Tools to Use?
• Eigenvalues give a definite answer on the stability (or not) of the
closed-loop system.
— Problem is that it is very hard to predict where the closed-loop
poles will go as a function of errors in the plant model.

• Consider the case were the model of the system is


ẋ = A0x + Bu
— Controller also based on A0, so nominal closed-loop dynamics:
∙ ¸ ∙ ¸
A0 −BK A0 − BK BK

LC A0 − BK − LC 0 A0 − LC

• But what if the actual system has dynamics


ẋ = (A0 + ∆A)x + Bu
— Then perturbed closed-loop system dynamics are:
∙ ¸ ∙ ¸
A0 + ∆A −BK A0 + ∆A − BK BK

LC A0 − BK − LC ∆A A0 − LC

• Transformed Ācl not upper-block triangular, so perturbed closed-


loop eigenvalues are NOT the union of regulator & estimator poles.
— Can find the closed-loop poles for a specific ∆A, but
— Hard to predict change in location of closed-loop poles for a range
of possible modeling errors.
Fall 2001 16.31 18—8
Frequency Domain Tests

• Frequency domain stability tests provide further insights on the


“stability margins”.

• Recall from the Nyquist Stability Theorem:


— P = # poles of L(s) = G(s)Gc (s) in the RHP
— Z = # closed-loop poles in the RHP
— N = # clockwise encirclements of the Nyquist Diagram about
the critical point -1.
Can show that Z = N + P (see notes on the web).
So for the closed-loop system to be stable, need
Z,0 ⇒ N = −P

• If the loop transfer function L(s) has P poles in the RHP s-plane
(and lims→∞ L(s) is a constant), then for closed-loop stability, the
locus of L(jω) for ω ∈ (−∞, ∞) must encircle the critical point
(-1,0) P times in the counterclockwise direction [Ogata 528].
— This provides a binary measure of stability, or not.
Fall 2001 16.31 18—9

• Can use “closeness” of L(s) to the critical point as a measure of


“closeness” to changing the number of encirclements.
— Premise is that the system is stable for the nominal system
⇒ has the right number of encirclements.

• Goal of the robustness test is to see if the possible perturbations


to our system model (due to modeling errors) can change the
number of encirclements

• In this case, say that the perturbations can destabilize the system.

Nichols: Unstable Open−loop System Nichols: Unstable Open−loop System


1
10 1.05
1
0.99
1.04 1.01

1.03

1.02

1.01
Mag

Mag

0
10 1

0.99

0.98

0.97

0.96

−1
10 0.95
−260 −240 −220 −200 −180 −160 −140 −120 −100 −180.5 −180 −179.5 −179 −178.5
Phase (deg) Phase (deg)

Figure 5: Nichols Plot for the cart example which clearly shows the
sensitivity to the overall gain and/or phase lag.
Fall 2001 16.31 18—10

stable OL
1.5

0.5 L (jω)
A
Imag Part

ω2
0

−0.5 ω1 L (jω)
N

−1

−1.5

−1.5 −1 −0.5 0 0.5 1 1.5

Real Part
Figure 6: Plot of Loop TF LN (jω) = GN (jω)Gc (jω) and perturbation
(ω1 → ω2) that changes the number of encirclements.

• Model error in frequency range ω1 ≤ ω ≤ ω2 causes a change in the


number of encirclements of the critical point (−1, 0)
— Nominal closed-loop system stable LN (s) = GN (s)Gc(s)
— Actual closed-loop system unstable LA(s) = GA(s)Gc (s)

• Bottom line: Large model errors when LN ≈ −1 are very dan-


gerous.
Fall 2001 16.31 18—11
Frequency Domain Test
stable OL

0.5
Imag Part

|d(jω)|
|LN(jω)|
−0.5

−1

−1.5 −1 −0.5 0 0.5 1

Real Part
Figure 7: Geometric interpretation from Nyquist Plot of Loop TF.

• |d(jω)| measures distance of nominal Nyquist locus to critical point.

• By vector addition gives −1 + d(jω) = LN (jω)


⇒ d(jω) = 1 + LN (jω)

• Actually more convenient to plot


1 1
= , |S(jω)|
|d(jω)| |1 + LN (jω)|
the magnitude of the sensitivity transfer function S(s).
Fall 2001 16.31 18—12

• So high sensitivity corresponds to LN (jω) being very close to the


critical point.
Sensitivity Plot
3
10
|S|
|L|

2
10

1
10
Mag

0
10

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 8: Sensitivity plot of the cart problem.

• Ideally you would want the sensitivity to be much lower than this.
— Same as saying that you want L(jω) to be far from the critical
point.
— Difficulty in this example is that the open-loop system is unsta-
ble, so L(jω) must encircle the critical point ⇒ hard for L(jω)
to get too far away from the critical point.
Fall 2001 16.31 18—13

8·14·20
Figure 9: Sensitivity for Example 1 G(s) = (s+8)(s+14)(s+20) with a low
bandwidth controller Nichols: Stable Open−loop System
Nichols: Stable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Fall 2001 16.31 18—14

8·14·20
Figure 10: Sensitivity for Example 3 G(s) = (s−8)(s−14)(s−20)
Nichols: Unstable Open−loop System Nichols: Unstable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Fall 2001 16.31 18—15

8·14·20
Figure 11: Sensitivity for Example 1 G(s) = (s+8)(s+14)(s+20) with a
high bandwidth controller
Nichols: Stable Open−loop System Nichols: Stable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Shows that as the controller bandwidth increases, can expect L(jω) to get much closer to the critical point.
“Push—pop”
Fall 2001 16.31 18—16
Summary
• LQG gives you a great way to design a controller for the nominal
system.

• But there are no guarantees about the stability/performance if the


actual system is slightly different.
— Basic analysis tool is the Sensitivity Plot

• No obvious ways to tailor the specification of the LQG controller to


improve any lack of robustness
— Apart from the obvious “lower the controller bandwidth” ap-
proach.
— And sometimes you need the bandwidth just to stabilize the
system.

• Very hard to include additional robustness constraints into LQG


— See my Ph.D. thesis in 1992.

• Other tools have been developed that allow you to directly shape
the sensitivity plot |S(jω)|
— Called H∞ and µ

• Good news: Lack of robustness is something you should look for,


but it is not always an issue.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #18

16.31 Feedback Control

Closed-loop system analysis


• Robustness
• State-space — eigenvalue analysis
• Frequency domain — Nyquist theorem.
• Sensitivity

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 18—1

Combined Estimators and Regulators


• When we use the combination of an optimal estimator and an opti-
mal regulator to design the controller, the compensator is called
Linear Quadratic Gaussian (LQG)
— Special case of the controllers that can be designed using the
separation principle.

• The great news about an LQG design is that stability of the closed-
loop system is guaranteed.
— The designer is freed from having to perform any detailed me-
chanics - the entire process is fast and can be automated.

• Now the designer just focuses on:


— How to specify the state cost function (i.e. selecting z = Cz x)
and what value of r to use.
— Determine how the process and sensor noise enter into the system
and what their relative sizes are (i.e. select Rw & Rv )

• So the designer can focus on the “performance” related issues, be-


ing confident that the LQG design will produce a controller that
stabilizes the system.

• This sounds great — so what is the catch??


Fall 2001 16.31 18—2

• The remaining issue is that sometimes the controllers designed using


these state-space tools are very sensitive to errors in the knowledge
of the model.
— i.e., Might work very well if the plant gain α = 1, but be
unstable if it is α = 0.9 or α = 1.1.
— LQG is also prone to plant—pole/compensator—zero cancellation,
which tends to be sensitive to modeling errors.

• The good news is that the state-space techniques will give you a
controller very easily.
— You should use the time saved to verify that the one
you designed is a “good” controller.

• There are, of course, different definitions of what makes a controller


good, but one important criterion is whether there is a reason-
able chance that it would work on the real system as
®
well as it does in Matlab. ⇒ Robustness.
— The controller must be able to tolerate some modeling error,
®
because our models in Matlab are typically inaccurate.
3 Linearized model
3 Some parameters poorly known
3 Ignores some higher frequency dynamics

• Need to develop tools that will give us some insight on how well a
controller can tolerate modeling errors.
Fall 2001 16.31 18—3

Example
• Consider the “cart on a stick” system, with the dynamics as given
in the notes on the web. Define
∙ ¸ ∙ ¸
θ q
q= , x=
x q̇
Then with y = x
ẋ = Ax + Bu
y = Cx

• For the parameters given in the notes, the system has an unstable
pole at +5.6 and one at s = 0. There are plant zeros at ±5.

• The target locations for the poles were determined using the SRL
for both the regulator and estimator.
— Assumes that the process noise enters through the actuators
Bw ≡ B, which is a useful approximation.
— Regulator and estimator have the same SRL.
— Choose the process/sensor ratio to be r/10 so that the estimator
poles are faster than the regulator ones.

• The resulting compensator is unstable (+16!!)


— But this was expected. (why?)
Fall 2001 16.31 18—4

Symmetric root locus


10

2
Imag Axis

−2

−4

−6

−8

−10
−8 −6 −4 −2 0 2 4 6 8
Real Axis

Figure 1: SRL for the regulator and estimator.


4
10
Plant G
Compensator Gc
2
10
Mag

0
10

−2
10

−4
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

200
Plant G
Compensator Gc
150
Phase (deg)

100

50

0
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 2: Plant and Controller


Fall 2001 16.31 18—5
1
10
Loop L

0
10
Mag

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

−100

−150
Phase (deg)

−200

−250

−300
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 3: Loop and Margins

• Looking at both the Loop plots and the root locus, this system is
stable with a gain of 1, but
— Unstable for a gain of 1 ± ² and/or a slight change in the system
phase (possibly due to some unmodeled delays)
— Very limited chance that this would work on the real system.

• Of course, this is an extreme example and not all systems are like
this, but you must analyze to determine what robustness mar-
gins your controller really has.

• Question: what analysis tools should we use?


Fall 2001 16.31 18—6
10

2
Imag Axis

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
Real Axis

Figure 4: Root Locus with frozen compensator dynamics. Shows sen-


sitivity to overall gain — symbols are a gain of [0.995:.0001:1.005].
2

1.5

0.5
Imag Axis

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Real Axis
Fall 2001 16.31 18—7
Analysis Tools to Use?
• Eigenvalues give a definite answer on the stability (or not) of the
closed-loop system.
— Problem is that it is very hard to predict where the closed-loop
poles will go as a function of errors in the plant model.

• Consider the case were the model of the system is


ẋ = A0x + Bu
— Controller also based on A0, so nominal closed-loop dynamics:
∙ ¸ ∙ ¸
A0 −BK A0 − BK BK

LC A0 − BK − LC 0 A0 − LC

• But what if the actual system has dynamics


ẋ = (A0 + ∆A)x + Bu
— Then perturbed closed-loop system dynamics are:
∙ ¸ ∙ ¸
A0 + ∆A −BK A0 + ∆A − BK BK

LC A0 − BK − LC ∆A A0 − LC

• Transformed Ācl not upper-block triangular, so perturbed closed-


loop eigenvalues are NOT the union of regulator & estimator poles.
— Can find the closed-loop poles for a specific ∆A, but
— Hard to predict change in location of closed-loop poles for a range
of possible modeling errors.
Fall 2001 16.31 18—8
Frequency Domain Tests

• Frequency domain stability tests provide further insights on the


“stability margins”.

• Recall from the Nyquist Stability Theorem:


— P = # poles of L(s) = G(s)Gc (s) in the RHP
— Z = # closed-loop poles in the RHP
— N = # clockwise encirclements of the Nyquist Diagram about
the critical point -1.
Can show that Z = N + P (see notes on the web).
So for the closed-loop system to be stable, need
Z,0 ⇒ N = −P

• If the loop transfer function L(s) has P poles in the RHP s-plane
(and lims→∞ L(s) is a constant), then for closed-loop stability, the
locus of L(jω) for ω ∈ (−∞, ∞) must encircle the critical point
(-1,0) P times in the counterclockwise direction [Ogata 528].
— This provides a binary measure of stability, or not.
Fall 2001 16.31 18—9

• Can use “closeness” of L(s) to the critical point as a measure of


“closeness” to changing the number of encirclements.
— Premise is that the system is stable for the nominal system
⇒ has the right number of encirclements.

• Goal of the robustness test is to see if the possible perturbations


to our system model (due to modeling errors) can change the
number of encirclements

• In this case, say that the perturbations can destabilize the system.

Nichols: Unstable Open−loop System Nichols: Unstable Open−loop System


1
10 1.05
1
0.99
1.04 1.01

1.03

1.02

1.01
Mag

Mag

0
10 1

0.99

0.98

0.97

0.96

−1
10 0.95
−260 −240 −220 −200 −180 −160 −140 −120 −100 −180.5 −180 −179.5 −179 −178.5
Phase (deg) Phase (deg)

Figure 5: Nichols Plot for the cart example which clearly shows the
sensitivity to the overall gain and/or phase lag.
Fall 2001 16.31 18—10

stable OL
1.5

0.5 L (jω)
A
Imag Part

ω2
0

−0.5 ω1 L (jω)
N

−1

−1.5

−1.5 −1 −0.5 0 0.5 1 1.5

Real Part
Figure 6: Plot of Loop TF LN (jω) = GN (jω)Gc (jω) and perturbation
(ω1 → ω2) that changes the number of encirclements.

• Model error in frequency range ω1 ≤ ω ≤ ω2 causes a change in the


number of encirclements of the critical point (−1, 0)
— Nominal closed-loop system stable LN (s) = GN (s)Gc(s)
— Actual closed-loop system unstable LA(s) = GA(s)Gc (s)

• Bottom line: Large model errors when LN ≈ −1 are very dan-


gerous.
Fall 2001 16.31 18—11
Frequency Domain Test
stable OL

0.5
Imag Part

|d(jω)|
|LN(jω)|
−0.5

−1

−1.5 −1 −0.5 0 0.5 1

Real Part
Figure 7: Geometric interpretation from Nyquist Plot of Loop TF.

• |d(jω)| measures distance of nominal Nyquist locus to critical point.

• By vector addition gives −1 + d(jω) = LN (jω)


⇒ d(jω) = 1 + LN (jω)

• Actually more convenient to plot


1 1
= , |S(jω)|
|d(jω)| |1 + LN (jω)|
the magnitude of the sensitivity transfer function S(s).
Fall 2001 16.31 18—12

• So high sensitivity corresponds to LN (jω) being very close to the


critical point.
Sensitivity Plot
3
10
|S|
|L|

2
10

1
10
Mag

0
10

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 8: Sensitivity plot of the cart problem.

• Ideally you would want the sensitivity to be much lower than this.
— Same as saying that you want L(jω) to be far from the critical
point.
— Difficulty in this example is that the open-loop system is unsta-
ble, so L(jω) must encircle the critical point ⇒ hard for L(jω)
to get too far away from the critical point.
Fall 2001 16.31 18—13

8·14·20
Figure 9: Sensitivity for Example 1 G(s) = (s+8)(s+14)(s+20) with a low
bandwidth controller Nichols: Stable Open−loop System
Nichols: Stable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Fall 2001 16.31 18—14

8·14·20
Figure 10: Sensitivity for Example 3 G(s) = (s−8)(s−14)(s−20)
Nichols: Unstable Open−loop System Nichols: Unstable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Fall 2001 16.31 18—15

8·14·20
Figure 11: Sensitivity for Example 1 G(s) = (s+8)(s+14)(s+20) with a
high bandwidth controller
Nichols: Stable Open−loop System Nichols: Stable Open−loop System
1
10 1.5
1
0.95
1.4 1.05

1.3

1.2

1.1

Mag
Mag

0
10 1

0.9

0.8

0.7

0.6

−1
10 0.5
−260 −240 −220 −200 −180 −160 −140 −120 −100 −195 −190 −185 −180 −175 −170 −165
Phase (deg) Phase (deg)

Sensitivity Plot
2
10
|S|
|L|

1
10
Mag

0
10

−1
10

−2
10
−1 0 1 2 3
10 10 10 10 10
Freq (rad/sec)
Shows that as the controller bandwidth increases, can expect L(jω) to get much closer to the critical point.
“Push—pop”
Fall 2001 16.31 18—16
Summary
• LQG gives you a great way to design a controller for the nominal
system.

• But there are no guarantees about the stability/performance if the


actual system is slightly different.
— Basic analysis tool is the Sensitivity Plot

• No obvious ways to tailor the specification of the LQG controller to


improve any lack of robustness
— Apart from the obvious “lower the controller bandwidth” ap-
proach.
— And sometimes you need the bandwidth just to stabilize the
system.

• Very hard to include additional robustness constraints into LQG


— See my Ph.D. thesis in 1992.

• Other tools have been developed that allow you to directly shape
the sensitivity plot |S(jω)|
— Called H∞ and µ

• Good news: Lack of robustness is something you should look for,


but it is not always an issue.

®
MATLAB is a trademark of The MathWorks, Inc.
Topic #19

16.31 Feedback Control

Closed-loop system analysis


• Bounded Gain Theorem

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 19–1

Bounded Gain
• There exist very easy ways of testing (analytically) whether
|S(jω)| < γ, ∀ω

• SISO Bounded Gain Theorem: Gain of generic stable system


ẋ = Ax + Bu
y = Cx + Du
is bounded in the sense that
Gmax = sup |G(jω)| = sup |C(jωI − A)−1B + D| < γ
ω ω

if and only if (iff)

1. |D| < γ

2. The Hamiltonian matrix


 
A + B(γ 2I − DT D)−1DT C B(γ 2I − DT D)−1B T
H=
−C T (I + D(γ 2I − DT D)−1DT )C −AT − C T D(γ 2I − DT D)−1B T
has no eigenvalues on the imaginary axis.

• Note that with D = 0, the Hamiltonian matrix is


 
1 T
A BB
H= γ2
−C T C −AT
– Eigenvalues of this matrix are symmetric about the real and
imaginary axis (related to the SRL)
Fall 2001 16.31 19–2

• So supω |G(jω)| < γ iff H has no eigenvalues on the jω-axis.

• An equivalent test is if there exists a X ≥ 0 such that


1
AT X + XA + C T C + 2 XBB T X = 0
γ
and A + γ12 BB T X is stable.
– This is an Algebraic Riccati Equation (ARE)

• Typical appplication: since e = y − r, then for perfect tracking, we


want e ≈ 0
⇒ want S ≈ 0 since e = −Sr + . . .
– Sufficient to discuss the magnitude of S because the only require-
ment is that it be small.

• Direct approach is to develop an upperbound for |S| and then test


if |S| is below this bound.
1
|S(jω)| < ∀ω?
|Ws(jω)|
or equivalently, whether |Ws(jω)S(jω)| < 1, ∀ω

• Note: The state-space tests can also be used for MIMO systems –
but in that case, we need diffferent Frequency Domain tests.
Fall 2001 16.31 19–3

• Typically pick simple forms for weighting functions (first or second


order), and then cascade them as necessary. Basic one:
s/M + ωB
Ws(s) =
s + ωB A

1
10

M
10
0

ω
b
|1/Ws|

−1
10

−2
10
−2 −1 0 1 2
10 10 10 10 10

Freq (rad/sec)

Figure 1: Example of a standard performance weighting filter. Typically


have A 1, M > 1, and |1/Ws| ≈ 1 at ωB

• Thus we can test whether |Ws(jω)S(jω)| < 1, ∀ω by:


– Forming a state space model of the combined system Ws(s)S(s)
– Use the bounded gain theorem with γ = 1
– Typically use a bisection section of γ to find |Ws(jω)S(jω)|max
Fall 2001 16.31 19–4

• Example: Simple system


150
G(s) =
(10s + 1)(0.05s + 1)2
with Gc = 1

• Require ωB ≈ 5, a slope of 1, low frequency value less than A = 0.01


and a high frequency peak less than M = 5.
s/M + ωB
Ws =
s + ωB A

1
Sensitivity and Inverse of Performance Weight
10

0
10
Magnitude

−1
10 S Ws
1/Ws

−2
10

S γ= 1.0219

−3
10
−2 −1 0 1 2
10 10 10 10 10

Frequency
Figure 2: Want |WsS| < 1, so we just fail the test
Fall 2001 16.31 19–5

Sketch of Proof
• Sufficiency: consider γ = 1, and assume D = 0 for simplicity
r u y y2
G(s) T ✲
✻ G (−s)
+

   
A B −A T
−C T
G(s) := and G˜(s) = GT (−s) :=
C 0 BT 0

• Note that
u/r = S(s) = [1 − G˜G]−1

• Now find the state space representation of S(s)


ẋ1 = Ax1 + B(r + y2) = Ax1 + BB T x2 + Br
ẋ2 = −AT x2 − C T y = −AT x2 − C T Cx
u = r + B T x2

   T
   
ẋ1 A BB x1 B
⇒ = + r
ẋ2 −C C −A
T T
x2 0
 
  x1
u = 0 BT +r
x2
⇒ poles of S(s) are contained in the eigenvalues of the matrix H.
Fall 2001 16.31 19–6

• Now assume that H has no eigenvalues on the jω-axis,


⇒ S = [I − G˜G]−1 has no poles there

⇒ I − G˜G has no zeros there

• So I − G ˜ G has no zeros on the jω-axis, and we also know that


I − GG → I > 0 as ω → ∞ (since D = 0).

– Together, these imply that


I − GT (−jω)G(jω) = I − GG > 0 ∀ ω

• For a SISO system, this condition (I − GG > 0) is equivalent to


|G(jω)| < 1 ∀ ω
which is true iff
Gmax = max |G(jω)| < 1
ω

• Can use state-space tools to test if a generic system has a gain less
that 1, and can easily re-do this analysis to include the bound γ.
Fall 2001 16.31 19–7

Issues
• Note that it is actually not easy to find Gmax directly using the state
space techniques
– It is easy to check if Gmax < γ
– So we just keep changing γ to find the smallest value for which
we can show that Gmax < γ (called γmin )

⇒ Bisection search algorithm.

• Bisection search algorithm (see web)


1. Select γu , γl so that γl ≤ Gmax ≤ γu

2. Test (γu − γl )/γl < TOL.


Yes ⇒ Stop (Gmax ≈ 12 (γu + γl ))
No ⇒ go to step 3.

3. With γ = 12 (γl + γu), test if Gmax < γ using λi (H)

4. If λi (H) ∈ jR, then set γl = γ (test value too low), otherwise


set γu = γ and go to step 2.

• This is the basis of H∞ control theory.


Topic #20

16.31 Feedback Control

Robustness Analysis
• Model Uncertainty
• Robust Stability (RS) tests
• RS visualizations

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 20—1
Model Uncertainty
• Prior analysis assumed a perfect model. What if the model is in-
correct ⇒ actual system dynamics GA(s) are in one of the sets
— Multiplicative model Gp(s) = GN (s)(1 + E(s))
— Additive model Gp(s) = GN (s) + E(s)
where
1. GN (s) is the nominal dynamics (known)

2. E(s) is the modeling error — not known directly, but


bound E0(s) known (assumed stable) where
|E(jω)| ≤ |E0(jω)| ∀ω

• If E0(jω) small, our confidence in the model is high ⇒ nominal


model is a good representation of the actual dynamics

• If E0(jω) large, our confidence in the model is low ⇒ nominal model


is not a good representation of the actual dynamics
GN
0
10

−1
10

−2
10
|G|

−3
10

10
−4
multiplicative uncertainty

−5
10

−6
10
−1 0 1 2
10 10 10 10

Freq (rad/sec)

Figure 1: Typical system TF with multiplicative uncertainty

Fall 2001 16.31 20—2

• Simple example: Assume we know that the actual dynamics are


ωn2
GA (s) = 2 2
s (s + 2ζωns + ωn2 )
but we take the nominal model to be GN = 1/s2.

• Can explicitly calculate the error E(s), and it is shown in the plot.

• Can also calculate an LTI overbound E0(s) of the error. Since E(s)
is not normally known, it is the bound E0(s) that is used in our
analysis tests.

3
10
G
A
2 G
10 N
E
E0 E0
1
10
E=G /G −1
0
A N
10
|G|

−1
10 G
N

−2
10
G
−3 A
10

−4
10 −1 0 1
10 10 10
Freq (rad/sec)
Figure 2: Various TF’s for the example system
Fall 2001 16.31 20—3

4
10
GA

GN
2
10 Possible G’s given E0

0
10
|G|

G
N
−2
10

−4
10

−6
10 −1 0 1
10 10 10
Freq (rad/sec)

Figure 3: GN with one partial bound. Can add many others to develop
the overall bound that would completely include GA.

• Usually E0(jω) not known, so we would have to develop it from our


approximate knowledge of the system dynamics.

• Want to demonstrate that the system is stable for any possible


perturbed dynamics in the set Gp(s) ⇒ Robust Stability
Fall 2001 16.31 20—4
Unstructured Uncertainty Model
• Standard error model lumps all errors in the system into the actu-
ator dynamics.

— Could just as easily use the sensor dynamics, and for MIMO
systems, we typically use both.
Gp(s) = GN (s)(1 + E(s))
— E(s) is any stable TF that satisfies the magnitude bound
|E(jω)| ≤ |E0(jω)| ∀ω

- -
E

u
y
? -
G

• Called an unstructured modeling error and/or uncertainty.


— With a controller Gc(s), we have that
GpGc = GN Gc(1 + E) ⇒ Lp = LN (1 + E)
— Which is a set of possible perturbed loop transfer functions.

• Can use |E0(jω)| to accentuate the model uncertainty in certain


frequency ranges (percentage error)
Fall 2001 16.31 20—5

• Typically use
τ s + r0
E0(s) =
(τ /r∞)s + 1
where
— r0 relative weight at low freq (¿ 1)
— r∞ relative weight at high freq (≥ 2)
— 1/τ approx freq at which relative uncertainty is 100%.

1
10

r∞

0
10 1/τ
|E0|

−1
10

r
0

−2
10 −2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)

Figure 4: Typical input uncertainty weighting. Low error at low fre-


quency and larger error at high frequency.
Fall 2001 16.31 20—6

• Note that Lp = LN (1 + E) ⇒ Lp − LN = LN E
• So we have that
|Lp(jω) − LN (jω)| = |LN (jω) E(jω)| ≤ |LN (jω) E0(jω)|

• At each frequency point, we must test if


|Lp(jω) − LN (jω)| < α
is which is equivalent to saying that the actual LTF is anywhere
within a circle (radius α) centered at point LN (jω).

• Example: Consider a simple system with


−8s + 64 0.18s + 0.09
G(s) = 2 with E0(s) =
s + 12s + 20 0.5s + 1
Weight E0(s)
0
10
Magnitude

−1
10 .09*[1/.5 1]/[1/2 1]

−2
10 −2 −1 0 1 2 3
10 10 10 10 10 10
Freq
Figure 5: Uncertainty weighting.

Possible Perturbations to the LTF: Multiplicative

Fall 2001 2 16.31 20—7

0
Imag
−1

−2

−3

−4
−2 −1 0 1 2 3 4
Real
Figure 6: Nominal loop TF and possible multiplicative errors.
Possible Perturbations to the LTF: Multiplicative
2
LN
LN(1+E0)
1 LN(1−E0)
LN(1−jE0)
LN(1+jE0)
0
Imag

−1

−2

−3

−4
−2 −1 0 1 2 3 4
Real
Figure 7: Consider 4 possible multiplicative perturbations.

Lp(s) = LN (s)(1 + E(s)) And can have


E(s) = E0(s) E(s) = −E0(s)
E(s) = jE0(s) E(s) = −jE0(s)
Fall 2001 16.31 20—8
Robust Stability Tests
• From the Nyquist Plot, we developed a measure of the “closeness”
of the loop transfer function (LTF) to the critical point:
1 1
= , |SN (jω)|
|d(jω)| |1 + LN (jω)|
— Magnitude of nominal sensitivity transfer function S(s).

• Based on this result, the test for robust stability is whether:


¯ ¯
¯ LN (jω) ¯ 1
|TN (jω)| = ¯¯ ¯< ∀ω
1 + LN (jω) ¯ |E0(jω)|
— Magnitude bound on the nominal complementary sensitiv-
ity transfer function T (s).
— Recall that S(s) + T (s) , 1

• Proof: With d(jω) = 1 + LN (jω), criterion of interest for robust


stability is whether the possible changes to the LTF
|Lp (jω) − LN (jω)|
exceed the distance from the LTF to the critical point
|d(jω)| = |1 + LN (jω)|
— Because if it does, then it is possible that the modeling error
could change the number of encirclements

⇒ Actual system could be unstable.


Fall 2001 16.31 20—9

• By geometry, we need to test if:


|Lp(jω) − LN (jω)| < |d(jω)| = |1 + LN (jω)| ∀ω

• But Lp = LN (1 + E)
⇒ Lp − LN = LN E

• So we must test whether


|LN E| < |1 + LN | ∀ω
or ¯ ¯
¯ LN ¯
¯ ¯
¯ 1 + LN E ¯ < 1

• Recall that T (s) , L(s)/(1 + L(s))


|TN (jω) E(jω)| = |TN (jω)| · |E(jω)| ≤ |TN (jω)| · |E0(jω)|

• So the test for robust stability is to determine whether


|TN (jω)| · |E0(jω)| < 1 ∀ω
Fall 2001 16.31 20—10

Visualization of Robustness Tests


• Stability robustness test with multiplicative uncertainty given by:
1

|TN (jω)| <


∀ω

|E0(jω)|

• Consider typical case of a system with poorly known high frequency


dynamics, so that
— |E0(jω)| ¿ 1 ∀ ω < ωl
— |E0(jω)| À 1 ∀ ω > ωh
2
10

1
10
1/|E |
0
Robustness
0
10
Boundary
Good Perf
|.|

−1
10

|TN|

−2
10

−3
10
−2 −1 0 1 2
10 10 10 10 10
Freq (rad/sec)
Figure 8: Visualization of the robustness test.

• Bottom line: With high frequency uncertainty in the system dy-


namics, we must limit the bandwidth of the nominal system control
if we want to achieve robust stability.
Fall 2001 16.31 20—11
Summary
• Robust Stability Analysis
— Use GN (s) to design Gc (s)
— Develop bound for uncertainty model E0(s) (stable, min phase)
— Check that |TN (jω)| < 1/|E0(jω)| ∀ω

• State space tools for testing this condition are imperative. Can use
the bounded gain theorem to determine if
max |TN (jω)E0(jω)| < 1
ω

• Robust Stability Synthesis


— Explicitly design the controller Gc(s) to ensure that
|TN (jω)| < 1/|E0(jω)| ∀ω
— Harder, but can do this using H∞ techniques.

• Primary difference between additive and multiplicative uncertainties


is at high frequency. Additive approach still allows large errors, but
the multiplicative errors are washed out by the roll-off in G.

• Potential problem with this approach is that the test only considers
the magnitude of the error. All phases are allowed, since we only
restrict |E| < |E0|.
— Actual error could be very large, but with a phase that takes it
away from the critical point.
— Tests exist to add the phase information, but these are harder
to compute.
Topic #21

16.31 Feedback Control

MIMO Systems
• Singular Value Decomposition
• Multivariable Frequency Response Plots

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 21—1
Multivariable Frequency Response
• In the MIMO case, the system G(s) is described by a p × m trans-
fer function matrix (TFM)
— Still have that G(s) = C(sI − A)−1B + D
— But G(s) → A, B, C, D MUCH less obvious than in SISO case.
— Discussion of poles and zeros of MIMO systems also much more
complicated.

• In SISO case we use the Bode plot to develop a measure of the


system “size”.
— Given z = Gw, where G(jω) = |G(jω)|ejφ(w)

— Then w = |w|ej(ω1 t+ψ) applied to |G(jω)|ejφ(w) yields


|w||G(jω1)|ej(ω1 t+ψ+φ(ω1 )) = |z|ej(ω1 t+ψo ) ≡ z
— Amplification and phase shift of the input signal obvious in the
SISO case.

• MIMO extension?
— Is the response of the system large or small?
∙ 3 ¸
10 /s 0
G(s) =

0 10−3/s
Fall 2001 16.31 21—2

• For MIMO systems, cannot just plot all of the Gij elements of G
— Ignores the coupling that might exist between them.
— So not enlightening.

• Basic MIMO frequency response:


— Restrict all inputs to be at the same frequency
— Determine how the system responds at that frequency
— See how this response changes with frequency

• So inputs are w = wcejωt, where wc ∈ C m


— Then we get z = G(s)|s=jω w, ⇒ z = zcejωt and zc ∈ C p

— We need only analyze zc = G(jω)wc

• As in the SISO case, we need a way to establish if the system re-


sponse is large or small.
— How much amplification we can get with a bounded input.

p
• Consider zc = G(jω)wc and set kwck2 = wcH wc ≤ 1. What can
we say about the kzck2?
— Answer depends on ω and on the direction of the input wc
— Best found using singular values.
Fall 2001 16.31 21—3
Singular Value Decomposition
• Must perform the SVD of the matrix G(s) at each frequency s = jω
G(jω) ∈ C p×m U ∈ C p×p Σ ∈ Rp×m V ∈ C m×m

G = U ΣV H

— U H U = I, UU H = I, V H V = I, V V H = I, and Σ is diagonal.

— Diagonal elements σk ≥ 0 of Σ are the singular values of G.


q q
σi = λi(GH G) or σi = λi(GGH )
the positive ones are the same from both formulas.

— The columns of the matrices U and V (ui and vj ) are the asso-
ciated eigenvectors
GH Gvj = σj2vj
GGH ui = σi2ui
Gvi = σiui

• If the rank(G) = r ≤ min(p, m), then


— σk > 0, k = 1, . . . , r
— σk = 0, k = r + 1, . . . , min(p, m)

• An SVD gives a very detailed description of how a ma-


trix (the system G) acts on a vector (the input w) at a
particular frequency.
Fall 2001 16.31 21—4

• So how can we use this result?


— Fix the size kwck2 = 1 of the input, and see how large we can
make the output.
— Since we are working at a single frequency, we just analyze the
relation
zc = Gw wc, Gw ≡ G(s = jω)

• Define the maximum and minimum amplifications as:


σ ≡ max kzck2
kwc k2 =1

σ ≡ min kzck2
kwc k2 =1

• Then we have that (let q = min(p, m))


σ = ½
σ1
σq p ≥ m “tall”
σ =
0 p < m “wide”

• Can use σ and σ to determine the possible amplification and atten-


uation of the input signals.

• Since G(s) changes with frequency, so will σ and σ


Fall 2001 16.31 21—5
SVD Example
• Consider (wide case)

∙ ¸ ∙ ¸∙ ¸ 1 0 0

5 0 0 1 0 5 0 0 

Gw = = 0 1 0 

0 0.5 0 0 1 0 0.5 0
0 0 1

= U ΣV H
so that σ1 = 5 and σ2 = 0.5

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0 6= σ2


kwc k2 =1

• But now consider (tall case)



 


5 0 1 0 0
5 0 ∙ ¸
1 0
G̃w = 
0 0.5  = 
0 1 0 


0 0.5 

0 1
0 0 0 0 1
0 0
= U ΣV H
so that σ1 = 5 and σ2 = 0.5 still.

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0.5 = σ2


kwc k2 =1
Fall 2001 16.31 21—6

• For MIMO systems, the gains (or σ’s) are only part of the story, as
we must also consider the input direction.

• To analyze this point further, note that we can rewrite


 
σ1 
H 

£ ¤  ...  v1
  
.. 

Gw = U ΣV H = u1 . . . up   .
 σm  H
vm
0
X m
=
σi uiviH
i=1

— Assumed tall case for simplicity, so p > m and q = m

• Can now analyze impact of various alternatives for the input


— Only looking at one frequency, so the basic signal is harmonic.
— But, we are free to pick the relative sizes and phases of each
of the components of the input vector wc.
3 These define the input direction
Fall 2001 16.31 21—7

• For example, we could pick wc = v1, then


à m !
X
zc = Gw wc = σiui viH v1 = σ1u1
i=1

since viH vj = δij .


— Output amplified by σ1. The relative sizes and phases of each
of the components of the output are given by the vector zc.

• By selecting other input directions (at the same frequency), we can


get quite different amplifications of the input signal
kGw wck2
σ≤ ≤ σ

kwc k2

• Thus we say that


— Gw is large if σ(Gw ) À 1

— Gw is small if σ(Gw ) ¿ 1

• MIMO frequency response are plots of σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—8

• Example: Just picked a random 3x3 system


a =
-0.7500 -2.0000 0 0
2.0000 -0.7500 0 0
0 0 -1.0000 -4.0000
0 0 4.0000 -1.0000
b =
-1.9994 6.4512 -0.0989
3.4500 3.3430 -0.7836
4.0781 5.9542 -8.0204
3.5595 -6.0123 1.2865
c =
-1.0565 0.5287 -2.1707 0.6145
1.4151 0.2193 -0.0592 0.5077
-0.8051 -0.9219 -1.0106 1.6924
d =
0.0044 0.0092 0.0041
0.0062 0.0074 0.0094
0.0079 0.0018 0.0092

• The singular value plot for this state space system is shown below:
2
SV Plots
10

1
10
SV

0
10

−1
10

−2
10
−1 0 1 2
10 10 10 10

Freq (rad/sec)

Figure 1: SVD of a typical 3x3 TFM

Fall 2001 16.31 21—9

• Then applied a sinusoid input at about 3 rad/sec using the v1 di-


rection (see code on how this is done)
wc |wc| arg wc
0.4715 0.4715 0
−0.2684 + 0.7121i 0.7610 1.9313
−0.2411 − 0.3746i 0.4455 −2.1427
so the three input sinusoids are scaled quite differently and phase
shifted quite substantially.
Best input. Gain 16.0751

15
lsim

sin

10

5
Yi

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 2: MIMO system response using the v1 input direction. Outputs


converge to the expected output directions.
Fall 2001 16.31 21—10

• Also picked another random input direction at this same frequency


and got this response

Random input. Gain 4.6334

15

10

5
i
Y

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 3: MIMO system response using a random input direction. Out-


puts quite different from the maximum output directions.
Fall 2001 16.31 21—11
Summary

• Gw is said to be large if σ(Gw ) À 1

• Gw is said to be small if σ(Gw ) ¿ 1

• MIMO frequency response plots σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—12
MIMO Performance
• Not much changes from the SISO case, but all elements in the block
diagram are now TFM — so we must pay attention to the order of
the multiplication since GGc 6= GcG in general.

di do

r
e y
Gc(s) ? G(s) ? -
6
— u n
¾

• Now use input (·)i and output (·)o loops, depending on where we
break the loop.
Li = GcG Lo = GGc

Si = (I + Li)−1 So = (I + Lo)−1

Si + Ti = I So + To = I

• Now have that


y = To(r − n) + So(Gdi + do)
u = GcSo(r − n) − Gc Sodo − GcSoGdi

• So the primary objectives are still the same:


— So and Si should be small at low frequency
— To should be small at high frequency
Fall 2001 16.31 21—13

• Loop conditions for So to be small are: 1

σ(So ) = ¿ 1 ⇔ σ(I + Lo ) À 1

σ(I + Lo)
Since σ(I + Lo ) ≥ σ(Lo) − 1, then if σ(Lo) À 1, we have

σ(I + Lo) ≥ σ(Lo) − 1 À 1

• So, if we make σ(Lo) À 1 then we get σ(So) ¿ 1

• Conditions for To to be small are:2


σ(To) = σ([I + Lo]−1Lo) ≤ σ([I + Lo]−1)σ(Lo)
= σ([I + Lo])−1σ(Lo)

• So if we make σ(Lo) ¿ 1, then we will get σ(To) ¿ 1

1
1 useful identities are σ(Lo ) − 1 ≤ σ(I + Lo ) ≤ σ(Lo ) + 1 and σ(G−1 ) = σ(G)
2 σAB ≤ σAσB
Fall 2001 16.31 21—14

• Similar to SISO loop shaping, but we have redefined large and small
to use the singular values of Lo.
Topic #21

16.31 Feedback Control

MIMO Systems
• Singular Value Decomposition
• Multivariable Frequency Response Plots

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 21—1
Multivariable Frequency Response
• In the MIMO case, the system G(s) is described by a p × m trans-
fer function matrix (TFM)
— Still have that G(s) = C(sI − A)−1B + D
— But G(s) → A, B, C, D MUCH less obvious than in SISO case.
— Discussion of poles and zeros of MIMO systems also much more
complicated.

• In SISO case we use the Bode plot to develop a measure of the


system “size”.
— Given z = Gw, where G(jω) = |G(jω)|ejφ(w)

— Then w = |w|ej(ω1 t+ψ) applied to |G(jω)|ejφ(w) yields


|w||G(jω1)|ej(ω1 t+ψ+φ(ω1 )) = |z|ej(ω1 t+ψo ) ≡ z
— Amplification and phase shift of the input signal obvious in the
SISO case.

• MIMO extension?
— Is the response of the system large or small?
∙ 3 ¸
10 /s 0
G(s) =

0 10−3/s
Fall 2001 16.31 21—2

• For MIMO systems, cannot just plot all of the Gij elements of G
— Ignores the coupling that might exist between them.
— So not enlightening.

• Basic MIMO frequency response:


— Restrict all inputs to be at the same frequency
— Determine how the system responds at that frequency
— See how this response changes with frequency

• So inputs are w = wcejωt, where wc ∈ C m


— Then we get z = G(s)|s=jω w, ⇒ z = zcejωt and zc ∈ C p

— We need only analyze zc = G(jω)wc

• As in the SISO case, we need a way to establish if the system re-


sponse is large or small.
— How much amplification we can get with a bounded input.

p
• Consider zc = G(jω)wc and set kwck2 = wcH wc ≤ 1. What can
we say about the kzck2?
— Answer depends on ω and on the direction of the input wc
— Best found using singular values.
Fall 2001 16.31 21—3
Singular Value Decomposition
• Must perform the SVD of the matrix G(s) at each frequency s = jω
G(jω) ∈ C p×m U ∈ C p×p Σ ∈ Rp×m V ∈ C m×m

G = U ΣV H

— U H U = I, UU H = I, V H V = I, V V H = I, and Σ is diagonal.

— Diagonal elements σk ≥ 0 of Σ are the singular values of G.


q q
σi = λi(GH G) or σi = λi(GGH )
the positive ones are the same from both formulas.

— The columns of the matrices U and V (ui and vj ) are the asso-
ciated eigenvectors
GH Gvj = σj2vj
GGH ui = σi2ui
Gvi = σiui

• If the rank(G) = r ≤ min(p, m), then


— σk > 0, k = 1, . . . , r
— σk = 0, k = r + 1, . . . , min(p, m)

• An SVD gives a very detailed description of how a ma-


trix (the system G) acts on a vector (the input w) at a
particular frequency.
Fall 2001 16.31 21—4

• So how can we use this result?


— Fix the size kwck2 = 1 of the input, and see how large we can
make the output.
— Since we are working at a single frequency, we just analyze the
relation
zc = Gw wc, Gw ≡ G(s = jω)

• Define the maximum and minimum amplifications as:


σ ≡ max kzck2
kwc k2 =1

σ ≡ min kzck2
kwc k2 =1

• Then we have that (let q = min(p, m))


σ = ½
σ1
σq p ≥ m “tall”
σ =
0 p < m “wide”

• Can use σ and σ to determine the possible amplification and atten-


uation of the input signals.

• Since G(s) changes with frequency, so will σ and σ


Fall 2001 16.31 21—5
SVD Example
• Consider (wide case)

∙ ¸ ∙ ¸∙ ¸ 1 0 0

5 0 0 1 0 5 0 0 

Gw = = 0 1 0 

0 0.5 0 0 1 0 0.5 0
0 0 1

= U ΣV H
so that σ1 = 5 and σ2 = 0.5

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0 6= σ2


kwc k2 =1

• But now consider (tall case)



 


5 0 1 0 0
5 0 ∙ ¸
1 0
G̃w = 
0 0.5  = 
0 1 0 


0 0.5 

0 1
0 0 0 0 1
0 0
= U ΣV H
so that σ1 = 5 and σ2 = 0.5 still.

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0.5 = σ2


kwc k2 =1
Fall 2001 16.31 21—6

• For MIMO systems, the gains (or σ’s) are only part of the story, as
we must also consider the input direction.

• To analyze this point further, note that we can rewrite


 
σ1 
H 

£ ¤  ...  v1
  
.. 

Gw = U ΣV H = u1 . . . up   .
 σm  H
vm
0
X m
=
σi uiviH
i=1

— Assumed tall case for simplicity, so p > m and q = m

• Can now analyze impact of various alternatives for the input


— Only looking at one frequency, so the basic signal is harmonic.
— But, we are free to pick the relative sizes and phases of each
of the components of the input vector wc.
3 These define the input direction
Fall 2001 16.31 21—7

• For example, we could pick wc = v1, then


à m !
X
zc = Gw wc = σiui viH v1 = σ1u1
i=1

since viH vj = δij .


— Output amplified by σ1. The relative sizes and phases of each
of the components of the output are given by the vector zc.

• By selecting other input directions (at the same frequency), we can


get quite different amplifications of the input signal
kGw wck2
σ≤ ≤ σ

kwc k2

• Thus we say that


— Gw is large if σ(Gw ) À 1

— Gw is small if σ(Gw ) ¿ 1

• MIMO frequency response are plots of σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—8

• Example: Just picked a random 3x3 system


a =
-0.7500 -2.0000 0 0
2.0000 -0.7500 0 0
0 0 -1.0000 -4.0000
0 0 4.0000 -1.0000
b =
-1.9994 6.4512 -0.0989
3.4500 3.3430 -0.7836
4.0781 5.9542 -8.0204
3.5595 -6.0123 1.2865
c =
-1.0565 0.5287 -2.1707 0.6145
1.4151 0.2193 -0.0592 0.5077
-0.8051 -0.9219 -1.0106 1.6924
d =
0.0044 0.0092 0.0041
0.0062 0.0074 0.0094
0.0079 0.0018 0.0092

• The singular value plot for this state space system is shown below:
2
SV Plots
10

1
10
SV

0
10

−1
10

−2
10
−1 0 1 2
10 10 10 10

Freq (rad/sec)

Figure 1: SVD of a typical 3x3 TFM

Fall 2001 16.31 21—9

• Then applied a sinusoid input at about 3 rad/sec using the v1 di-


rection (see code on how this is done)
wc |wc| arg wc
0.4715 0.4715 0
−0.2684 + 0.7121i 0.7610 1.9313
−0.2411 − 0.3746i 0.4455 −2.1427
so the three input sinusoids are scaled quite differently and phase
shifted quite substantially.
Best input. Gain 16.0751

15
lsim

sin

10

5
Yi

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 2: MIMO system response using the v1 input direction. Outputs


converge to the expected output directions.
Fall 2001 16.31 21—10

• Also picked another random input direction at this same frequency


and got this response

Random input. Gain 4.6334

15

10

5
i
Y

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 3: MIMO system response using a random input direction. Out-


puts quite different from the maximum output directions.
Fall 2001 16.31 21—11
Summary

• Gw is said to be large if σ(Gw ) À 1

• Gw is said to be small if σ(Gw ) ¿ 1

• MIMO frequency response plots σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—12
MIMO Performance
• Not much changes from the SISO case, but all elements in the block
diagram are now TFM — so we must pay attention to the order of
the multiplication since GGc 6= GcG in general.

di do

r
e y
Gc(s) ? G(s) ? -
6
— u n
¾

• Now use input (·)i and output (·)o loops, depending on where we
break the loop.
Li = GcG Lo = GGc

Si = (I + Li)−1 So = (I + Lo)−1

Si + Ti = I So + To = I

• Now have that


y = To(r − n) + So(Gdi + do)
u = GcSo(r − n) − Gc Sodo − GcSoGdi

• So the primary objectives are still the same:


— So and Si should be small at low frequency
— To should be small at high frequency
Fall 2001 16.31 21—13

• Loop conditions for So to be small are: 1

σ(So ) = ¿ 1 ⇔ σ(I + Lo ) À 1

σ(I + Lo)
Since σ(I + Lo ) ≥ σ(Lo) − 1, then if σ(Lo) À 1, we have

σ(I + Lo) ≥ σ(Lo) − 1 À 1

• So, if we make σ(Lo) À 1 then we get σ(So) ¿ 1

• Conditions for To to be small are:2


σ(To) = σ([I + Lo]−1Lo) ≤ σ([I + Lo]−1)σ(Lo)
= σ([I + Lo])−1σ(Lo)

• So if we make σ(Lo) ¿ 1, then we will get σ(To) ¿ 1

1
1 useful identities are σ(Lo ) − 1 ≤ σ(I + Lo ) ≤ σ(Lo ) + 1 and σ(G−1 ) = σ(G)
2 σAB ≤ σAσB
Fall 2001 16.31 21—14

• Similar to SISO loop shaping, but we have redefined large and small
to use the singular values of Lo.
Topic #21

16.31 Feedback Control

MIMO Systems
• Singular Value Decomposition
• Multivariable Frequency Response Plots

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 21—1
Multivariable Frequency Response
• In the MIMO case, the system G(s) is described by a p × m trans-
fer function matrix (TFM)
— Still have that G(s) = C(sI − A)−1B + D
— But G(s) → A, B, C, D MUCH less obvious than in SISO case.
— Discussion of poles and zeros of MIMO systems also much more
complicated.

• In SISO case we use the Bode plot to develop a measure of the


system “size”.
— Given z = Gw, where G(jω) = |G(jω)|ejφ(w)

— Then w = |w|ej(ω1 t+ψ) applied to |G(jω)|ejφ(w) yields


|w||G(jω1)|ej(ω1 t+ψ+φ(ω1 )) = |z|ej(ω1 t+ψo ) ≡ z
— Amplification and phase shift of the input signal obvious in the
SISO case.

• MIMO extension?
— Is the response of the system large or small?
∙ 3 ¸
10 /s 0
G(s) =

0 10−3/s
Fall 2001 16.31 21—2

• For MIMO systems, cannot just plot all of the Gij elements of G
— Ignores the coupling that might exist between them.
— So not enlightening.

• Basic MIMO frequency response:


— Restrict all inputs to be at the same frequency
— Determine how the system responds at that frequency
— See how this response changes with frequency

• So inputs are w = wcejωt, where wc ∈ C m


— Then we get z = G(s)|s=jω w, ⇒ z = zcejωt and zc ∈ C p

— We need only analyze zc = G(jω)wc

• As in the SISO case, we need a way to establish if the system re-


sponse is large or small.
— How much amplification we can get with a bounded input.

p
• Consider zc = G(jω)wc and set kwck2 = wcH wc ≤ 1. What can
we say about the kzck2?
— Answer depends on ω and on the direction of the input wc
— Best found using singular values.
Fall 2001 16.31 21—3
Singular Value Decomposition
• Must perform the SVD of the matrix G(s) at each frequency s = jω
G(jω) ∈ C p×m U ∈ C p×p Σ ∈ Rp×m V ∈ C m×m

G = U ΣV H

— U H U = I, UU H = I, V H V = I, V V H = I, and Σ is diagonal.

— Diagonal elements σk ≥ 0 of Σ are the singular values of G.


q q
σi = λi(GH G) or σi = λi(GGH )
the positive ones are the same from both formulas.

— The columns of the matrices U and V (ui and vj ) are the asso-
ciated eigenvectors
GH Gvj = σj2vj
GGH ui = σi2ui
Gvi = σiui

• If the rank(G) = r ≤ min(p, m), then


— σk > 0, k = 1, . . . , r
— σk = 0, k = r + 1, . . . , min(p, m)

• An SVD gives a very detailed description of how a ma-


trix (the system G) acts on a vector (the input w) at a
particular frequency.
Fall 2001 16.31 21—4

• So how can we use this result?


— Fix the size kwck2 = 1 of the input, and see how large we can
make the output.
— Since we are working at a single frequency, we just analyze the
relation
zc = Gw wc, Gw ≡ G(s = jω)

• Define the maximum and minimum amplifications as:


σ ≡ max kzck2
kwc k2 =1

σ ≡ min kzck2
kwc k2 =1

• Then we have that (let q = min(p, m))


σ = ½
σ1
σq p ≥ m “tall”
σ =
0 p < m “wide”

• Can use σ and σ to determine the possible amplification and atten-


uation of the input signals.

• Since G(s) changes with frequency, so will σ and σ


Fall 2001 16.31 21—5
SVD Example
• Consider (wide case)

∙ ¸ ∙ ¸∙ ¸ 1 0 0

5 0 0 1 0 5 0 0 

Gw = = 0 1 0 

0 0.5 0 0 1 0 0.5 0
0 0 1

= U ΣV H
so that σ1 = 5 and σ2 = 0.5

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0 6= σ2


kwc k2 =1

• But now consider (tall case)



 


5 0 1 0 0
5 0 ∙ ¸
1 0
G̃w = 
0 0.5  = 
0 1 0 


0 0.5 

0 1
0 0 0 0 1
0 0
= U ΣV H
so that σ1 = 5 and σ2 = 0.5 still.

σ ≡ max kGw wck2 = 5 = σ1


kwc k2 =1

σ ≡ min kGw wck2 = 0.5 = σ2


kwc k2 =1
Fall 2001 16.31 21—6

• For MIMO systems, the gains (or σ’s) are only part of the story, as
we must also consider the input direction.

• To analyze this point further, note that we can rewrite


 
σ1 
H 

£ ¤  ...  v1
  
.. 

Gw = U ΣV H = u1 . . . up   .
 σm  H
vm
0
X m
=
σi uiviH
i=1

— Assumed tall case for simplicity, so p > m and q = m

• Can now analyze impact of various alternatives for the input


— Only looking at one frequency, so the basic signal is harmonic.
— But, we are free to pick the relative sizes and phases of each
of the components of the input vector wc.
3 These define the input direction
Fall 2001 16.31 21—7

• For example, we could pick wc = v1, then


à m !
X
zc = Gw wc = σiui viH v1 = σ1u1
i=1

since viH vj = δij .


— Output amplified by σ1. The relative sizes and phases of each
of the components of the output are given by the vector zc.

• By selecting other input directions (at the same frequency), we can


get quite different amplifications of the input signal
kGw wck2
σ≤ ≤ σ

kwc k2

• Thus we say that


— Gw is large if σ(Gw ) À 1

— Gw is small if σ(Gw ) ¿ 1

• MIMO frequency response are plots of σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—8

• Example: Just picked a random 3x3 system


a =
-0.7500 -2.0000 0 0
2.0000 -0.7500 0 0
0 0 -1.0000 -4.0000
0 0 4.0000 -1.0000
b =
-1.9994 6.4512 -0.0989
3.4500 3.3430 -0.7836
4.0781 5.9542 -8.0204
3.5595 -6.0123 1.2865
c =
-1.0565 0.5287 -2.1707 0.6145
1.4151 0.2193 -0.0592 0.5077
-0.8051 -0.9219 -1.0106 1.6924
d =
0.0044 0.0092 0.0041
0.0062 0.0074 0.0094
0.0079 0.0018 0.0092

• The singular value plot for this state space system is shown below:
2
SV Plots
10

1
10
SV

0
10

−1
10

−2
10
−1 0 1 2
10 10 10 10

Freq (rad/sec)

Figure 1: SVD of a typical 3x3 TFM

Fall 2001 16.31 21—9

• Then applied a sinusoid input at about 3 rad/sec using the v1 di-


rection (see code on how this is done)
wc |wc| arg wc
0.4715 0.4715 0
−0.2684 + 0.7121i 0.7610 1.9313
−0.2411 − 0.3746i 0.4455 −2.1427
so the three input sinusoids are scaled quite differently and phase
shifted quite substantially.
Best input. Gain 16.0751

15
lsim

sin

10

5
Yi

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 2: MIMO system response using the v1 input direction. Outputs


converge to the expected output directions.
Fall 2001 16.31 21—10

• Also picked another random input direction at this same frequency


and got this response

Random input. Gain 4.6334

15

10

5
i
Y

−5

−10

−15
0 1 2 3 4 5 6 7 8 9 10

Time sec)

Figure 3: MIMO system response using a random input direction. Out-


puts quite different from the maximum output directions.
Fall 2001 16.31 21—11
Summary

• Gw is said to be large if σ(Gw ) À 1

• Gw is said to be small if σ(Gw ) ¿ 1

• MIMO frequency response plots σ(jω) and σ(jω).


— Then use the singular value vectors to analyze the response at a
particular frequency.
Fall 2001 16.31 21—12
MIMO Performance
• Not much changes from the SISO case, but all elements in the block
diagram are now TFM — so we must pay attention to the order of
the multiplication since GGc 6= GcG in general.

di do

r
e y
Gc(s) ? G(s) ? -
6
— u n
¾

• Now use input (·)i and output (·)o loops, depending on where we
break the loop.
Li = GcG Lo = GGc

Si = (I + Li)−1 So = (I + Lo)−1

Si + Ti = I So + To = I

• Now have that


y = To(r − n) + So(Gdi + do)
u = GcSo(r − n) − Gc Sodo − GcSoGdi

• So the primary objectives are still the same:


— So and Si should be small at low frequency
— To should be small at high frequency
Fall 2001 16.31 21—13

• Loop conditions for So to be small are: 1

σ(So ) = ¿ 1 ⇔ σ(I + Lo ) À 1

σ(I + Lo)
Since σ(I + Lo ) ≥ σ(Lo) − 1, then if σ(Lo) À 1, we have

σ(I + Lo) ≥ σ(Lo) − 1 À 1

• So, if we make σ(Lo) À 1 then we get σ(So) ¿ 1

• Conditions for To to be small are:2


σ(To) = σ([I + Lo]−1Lo) ≤ σ([I + Lo]−1)σ(Lo)
= σ([I + Lo])−1σ(Lo)

• So if we make σ(Lo) ¿ 1, then we will get σ(To) ¿ 1

1
1 useful identities are σ(Lo ) − 1 ≤ σ(I + Lo ) ≤ σ(Lo ) + 1 and σ(G−1 ) = σ(G)
2 σAB ≤ σAσB
Fall 2001 16.31 21—14

• Similar to SISO loop shaping, but we have redefined large and small
to use the singular values of Lo.
Topic #22

16.31 Feedback Control

Deterministic LQR
• Optimal control and the Riccati equation
• Lagrange multipliers
• The Hamiltonian matrix and the symmetric root locus

Factoids: for symmtric R


∂uT Ru
= 2uT R
∂u
∂Ru
=R
∂u

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 22—1

Linear Quadratic Regulator (LQR)


• We have seen the solutions to the LQR problem using the symmetric
root locus which defines the location of the closed-loop poles.
— Linear full-state feedback control.
— Would like to demonstrate from first principles that this is the
optimal form of the control.

• Deterministic Linear Quadratic Regulator


Plant:

ẋ(t) = A(t)x(t) + Bu(t)u(t), x(t0) = x0

z(t) = Cz (t)x(t)

Cost: Z
tf £ T ¤
T
JLQR = z (t)Rzz (t)z(t) + u (t)Ruu(t)u(t) dt + x(tf )Ptf x(tf )
t0

— Where Ptf ≥ 0, Rzz (t) > 0 and Ruu(t) > 0


— Define Rxx = CzT Rzz Cz ≥ 0
— A(t) is a continuous function of time.
— Bu(t), Cz (t), Rzz (t), Ruu (t) are piecewise continuous functions
of time, and all are bounded.

• Problem Statement: Find the input u(t) ∀t ∈ [t0, tf ] to mini-


mize JLQR .
Fall 2001 16.31 22—2

• Note that this is the most general form of the LQR problem —
we rarely need this level of generality and often suppress the time
dependence of the matrices.
— Aircraft landing problem.

• To optimize the cost, we follow the procedure of augmenting the


constraints in the problem (the system dynamics) to the cost (inte-
grand) to form the Hamiltonian:
1¡ T ¢
H = x (t)Rxx x(t) + u (t)Ruu u(t) + λT (t) (Ax(t) + Buu(t))
T
2
— λ(t) ∈ Rn×1 is called the Adjoint variable or Costate
— It is the Lagrange multiplier in the problem.

• From Stengel (pg427), the necessary and sufficient conditions for


optimality are that:
T
∂H
1. λ̇(t) = − ∂x = −Rxx x(t) − AT λ(t)

2. λ(tf ) = Ptf x(tf )

3. ∂H = 0 ⇒ Ruuu + BuT λ(t) = 0, so uopt = −Ruu


−1 T
Bu λ(t)
∂u

2
4. H2 ≥ 0 (need to check that Ruu ≥ 0)

∂u
Fall 2001 16.31 Optimization-1

• This control design problem is a constrained optimization, with the


constraints being the dynamics of the system.

• The standard way of handling the constraints in an optimization is


to add them to the cost using a Lagrange multiplier
— Results in an unconstrained optimization.

• Example: min f (x, y) = x2 + y2 subject to the constraint that


c(x, y) = x + y + 2 = 0
2

1.5

0.5

0
y

−0.5

−1

−1.5

−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
x

Figure 1: Optimization results

• Clearly the unconstrained minimum is at x = y = 0


Fall 2001 16.31 Optimization-2

• To find the constrained minimum, form the augmented cost function


L , f (x, y) + λc(x, y) = x2 + y 2 + λ(x + y + 2)
— Where λ is the Lagrange multiplier

• Note that if the constraint is satisfied, then L ≡ f

• The solution approach without constraints is to find the stationary


point of f (x, y) (∂f /∂x = ∂f /∂y = 0)
— With constraints we find the stationary points of L
∂L ∂L ∂L
= = =0
∂x ∂y ∂λ
which gives

∂L

= 2x + λ = 0

∂x

∂L
= 2y + λ = 0
∂y
∂L
= x + y + 2 = 0

∂λ

• This gives 3 equations in 3 unknowns, solve to find x? = y ? = −1

• The key point here is that due to the constraint, the selection of x
and y during the minimization are not independent
— The Lagrange multiplier captures this dependency.

• The LQR optimization follows the same path as this, but it is com-
plicated by the fact that the cost involves an integration over time.
Fall 2001 16.31 22—3

• Note that we now have:


−1 T
ẋ(t) = Ax(t) + Buopt(t) = Ax(t) − BuRuu Bu λ(t)
with x(t0) = x0

• So combine with equation for the adjoint variable


λ̇(t) = −Rxx x(t) − AT λ(t) = −CzT RzzCz x(t) − AT λ(t)

to get:

¸ "
−1 T
#∙ ¸
ẋ(t) A −BuRuu Bu x(t)
=
λ̇(t) −CzT RzzCz −AT λ(t)
which of course is the Hamiltonian Matrix again.

• Note that the dynamics of x(t) and λ(t) are coupled, but x(t) is
known initially and λ(t) is known at the terminal time, since λ(tf ) =
Ptf x(tf )
— This is a two point boundary value problem that is very hard to
solve in general.

• However, in this case, we can introduce a new matrix variable P (t)


and show that:
1. λ(t) = P (t)x(t)
2. It is relatively easy to find P (t).
Fall 2001 16.31 22—4

• How proceed?
1. For the 2n system
∙ ¸ " −1 T
#∙ ¸
ẋ(t) A −B R B
u uu u x(t)
=
λ̇(t) −CzT Rzz Cz −AT λ(t)
define a transition matrix
" #
F11(t1, t0) F12(t1, t0)
F (t1, t0) =
F21(t1, t0) F22(t1, t0)
and use this to relate x(t) to x(tf ) and λ(tf )
∙ ¸ " #∙ ¸
x(t) F11 (t, t f ) F12 (t, t f ) x(tf )
=
λ(t) F21(t, tf ) F22(t, tf ) λ(tf )
so
x(t) = F11(t, tf )x(tf ) + F12(t, tf )λ(tf )
h i
= F11(t, tf ) + F12(t, tf )Ptf x(tf )

2. Now find λ(t) in terms of x(tf )


h i
λ(t) = F12(t, tf ) + F22(t, tf )Ptf x(tf )

3. Eliminate x(tf ) to get:


h ih i−1
λ(t) = F12(t, tf ) + F22(t, tf )Ptf F11(t, tf ) + F12(t, tf )Ptf x(t)
, P (t)x(t)
Fall 2001 16.31 22—5

4. Now, since λ(t) = P (t)x(t), then


λ̇(t) = Ṗ (t)x(t) + P (t)ẋ(t)
⇒ − CzT Rzz Cz x(t) − AT λ(t) =

−Ṗ (t)x(t) = CzT RzzCz x(t) + AT λ(t) + P (t)ẋ(t)

−1 T
= CzT RzzCz x(t) + AT λ(t) + P (t)(Ax(t) − BuRuu Bu λ(t))

−1 T
= (CzT Rzz Cz + P (t)A)x(t) + (AT − P (t)BuRuu Bu )λ(t)

−1 T
= (CzT Rzz Cz + P (t)A)x(t) + (AT − P (t)BuRuu Bu )P (t)x(t)

£ −1 T
¤
=
AT P (t) + P (t)A + CzT RzzCz − P (t)BuRuu Bu P (t) x(t)

• This must be true for arbitrary x(t), so P (t) must satisfy


−1 T
−Ṗ (t) = AT P (t) + P (t)A + CzT RzzCz − P (t)BuRuu Bu P (t)
— Which is a matrix differential Riccati Equation.

• The optimal value of P (t) is found by solving this equation back-


wards in time from tf with P (tf ) = Ptf
Fall 2001 16.31 22—6

• The control gains are then


−1 T
uopt = −Ruu Bu λ(t)
−1 T
= −Ruu Bu P (t)x(t) = −K(t)x(t)

— Where K(t) , Ruu


−1 T
Bu P (t)

• Note that x(t) and λ(t) together define the closed-loop dynamics
for the system (and its adjoint), but we can eliminate λ(t) from the
solution by introducing P (t) which solves a Riccati Equation.

• The optimal control inputs are in fact a linear full-state


feedback control

• Note that normally we are interested in problems with t0 = 0 and


tf = ∞, in which case we can just use the steady-state value of P
that solves (assumes that A, Bu is stabilizable)
−1 T
AT P + P A + CzT RzzCz − P BuRuu Bu P = 0
which is the Algebraic Riccati Equation.
— If we use the steady-state value of P , then K is constant.
Fall 2001 16.31 22—7

• Example: simple system with t0 = 0 and tf = 10sec.


∙ ¸ ∙ ¸
0 1 0
ẋ = x+ u
0 −1 1
" # Z 10 ∙ ∙ ¸ ¸
0 0 q 0
J = xT (10) x(10) + xT (t) x(t) + ru2(t) dt
0 h 0 0 0

• Compute gains using both time-varying P (t) and steady-state value.

• Find state solution x(0) = [1 1]T using both sets of gains


q=1r=1h=5
1.4 5
K (t) K2(t)
1
K K2
1 4.5
1.2
4

1 3.5

3
0.8
Gains
Gains

2.5

0.6
2

1.5
0.4

0.2
0.5

0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Time (sec) Time (sec)
Dynamic Gains Static Gains
1.4 1.4
x x
1 1
x x
2 2
1.2 1.2

1 1

0.8 0.8

0.6 0.6
States

States

0.4 0.4

0.2 0.2

0 0

−0.2 −0.2

−0.4 −0.4

−0.6 −0.6
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Time (sec) Time (sec)

Figure 2: Set q = 1, r = 1, h = 10, Klqr = [1 0.73]


Fall 2001 16.31 22—8

• As noted, the closed-loop dynamics couple x(t) and λ(t) and are
given by

¸ "
−1 T
#∙ ¸
ẋ(t) A −BuRuu Bu x(t)
=
λ̇(t) −CzT RzzCz −AT λ(t)
with the appropriate boundary conditions.

• OK, so where are the closed-loop poles of the system?


— They must be the eigenvalues of
"
−1 T
#

A −BuRuu Bu
H ,

−CzT Rzz Cz −AT

• When we analyzed this before for a SISO system, we found that the
closed-loop poles could be related to a SRL for the transfer function
b(s)

Gzu(s) = Cz (sI − A)−1Bu =


a(s)

and, in fact, the closed-loop poles were given by the LHP roots of
Rzz
a(s)a(−s) + b(s)b(−s) = 0
Ruu
where we previously had Rzz/Ruu ≡ 1/r

• We now know enough to show that this is true.


Fall 2001 16.31 22—9

Derivation of the SRL

• The closed-loop poles are given by the eigenvalues of


" −1 T
#
A −BuRuu Bu
H ,

−CzT RzzCz −AT


so solve det(sI − H) = 0
" #
A B

• If A is invertible: det = det(A) det(D − CA−1B)


C D

£ ¤
⇒ det(sI − H) = det(sI − A) det (sI + AT ) − CzT Rzz Cz (sI − A)−1 BuRuu
−1 T
Bu
£ ¤
= det(sI − A) det(sI + AT ) det I − CzT Rzz Cz (sI − A)−1 BuRuu
−1 T
Bu (sI + AT )−1

• Note that det(I + ABC) = det(I + CAB), and if a(s) = det(sI −


A), then a(−s) = det(−sI − AT ) = (−1)n det(sI + AT )

£ −1 T
¤
det(sI−H) = (−1)n a(s)a(−s) det I + Ruu Bu (−sI − AT )−1 CzT Rzz Cz (sI − A)−1 Bu

• If Gzu(s) = Cz (sI −A)−1Bu, then GTzu(−s) = BuT (−sI −AT )−1CzT ,


so for SISO systems

n
£ −1 T
¤
det(sI − H) = (−1) a(s)a(−s) det I + Ruu Gzu(−s)RzzGzu(s)
∙ ¸
R zz
= (−1)na(s)a(−s) I + Gzu(−s)Gzu(s)
Ruu
∙ ¸
R zz
= (−1)n a(s)a(−s) + b(s)b(−s) = 0
Ruu
Fall 2001 16.31 22—10

• Simple example from before: A scalar system with


ẋ = ax + bu
with cost (Rxx > 0 and Ruu > 0)
Z ∞

J =
(Rxxx2(t) + Ruuu2(t)) dt
0

• Then the steady-state P solves


2aP + Rxx − P 2b2/Ruu = 0

a+ a2 +b2 Rxx /Ruu
which gives that P =
R−1 b2
>0
uu

• Then u(t) = −Kx(t) where


p
−1 a+ a2 + b2Rxx/Ruu
K= Ruu bP =
b

• The closed-loop dynamics are


µ ¶
b p
ẋ = (a − bK)x = a − (a + a2 + b2Rxx /Ruu ) x
b
p
= − a2 + b2Rxx/Ruu x = Acl x(t)

p
• Note that as Rxx /Ruu → ∞, Acl ≈ −|b| Rxx /Ruu

• And as Rxx /Ruu → 0, K ≈ (a + |a|)/b


— If a < 0 (open-loop stable), K ≈ 0 and Acl = a − bK ≈ a
— If a > 0 (OL unstable), K ≈ 2a/b and Acl = a − bK ≈ −a
Fall 2001 16.31 22—11

Summary
®
• Can find the optimal feedback gains u = −Kx using the Matlab
command
K = lqr(A, B, Rxx, Ruu )

• Similar derivation for the optimal estimation problem (Linear Quadratic


Estimator)
— Full treatment requires detailed of advanced topics (e.g. stochas-
tic processes and Ito calculus) — better left to a second course.
— But, by duality, can compute optimal Kalman filter gains from
Ke = lqr(AT , CyT , Bw Rw BwT , Rv ), L = KeT

®
MATLAB is a trademark of The MathWorks, Inc.
Fall 2001 16.31 22–12

Weighting Matrix Selection


• A good rule of thumb when selecting the weighting matrices Rxx
(or Rzz ) and Ruu is to normalize the signals:

 
α12
 (x1)2 
 max 
 α 2 
 2 
Rxx = 
 (x2)2max 

 ... 
 
 αn2 
(xn)2max
 
β12
 (u1)2 
 max 
 β22 
 
Ruu = 
 (u2)2max 

 ... 
 
 2
βm 
(um)2max

• The (xi)max and (ui)max represent the largest desired response/control


input for that component of the state/actuator signal.

• The αi and βi are used to add an additional relative weighting on


the various components of the state/control
Fall 2001 16.31 17–23
Reference Input - II
• On page 17-5, compensator implemented with a reference command
by changing to feedback on e(t) = r(t) − y(t) rather than −y(t)
r e ✲
u y ✲

Gc(s) G(s)

– So u = Gc(s)e = Gc(s)(r − y), and have u = −Gc(s)y if r = 0.


– Intuitively appealing because it is the same approach used for
the classical control, but it turns out not to be the best approach.

• Can improve the implementation by using a more general form:


ẋc = Ac xc + Ly + Gr
u = −Kxc + N̄ r
– Now explicitly have two inputs to the controller (y and r)
– N̄ performs the same role that we used it for previously.
– Introduce G as an extra degree of freedom in the problem.

• First: if N̄ = 0 and G = −L, then we recover the same imple-


mentation used previously, since the controller reduces to:
ẋc = Ac xc + L(y − r) = Acxc + Bc(−e)
u = −Kxc = −Ccxc
– So if Gc(s) = Cc(sI−Ac)−1Bc, then the controller can be written
as u = Gc(s)e (negative signs cancel).
Fall 2001 16.31 17–24

• Second: this generalization does not change the closed-loop poles


of the system, regardless of the selection of G and N̄ , since
ẋ = Ax + Bu , y = Cx
ẋc = Acxc + Ly + Gr
u = −Kxc + N̄ r
      
ẋ A −BK x B N̄
⇒ = + r
ẋc LC Ac xc G
 
  x
y = C 0
xc
 
A −BK
– So the closed-loop poles are the eigenvalues of
LC Ac
regardless of the choice of G and N̄
– G and N̄ impact the forward path, not the feedback path

• Third: given this extra freedom, what is the best way to use it?
– One good objective is to select G and N̄ so that the state esti-
mation error is independent of r.
– With this choice, changes in r do not tend to cause such large
transients in x̃
– Note that for this analysis, take x̃ = x − xc since xc ≡ x̂

x̃˙ = ẋ − ẋc = Ax + Bu − (Acxc + Ly + Gr)


= Ax + B(−Kxc + N̄ r) − ({A − BK − LC}xc + LCx + Gr)
Fall 2001 16.31 17–25

x̃˙ = Ax + B(N̄ r) − ({A − LC}xc + LCx + Gr)


= (A − LC)x + B N̄ r − ({A − LC}xc + Gr)
= (A − LC)x̃ + B N̄ r − Gr
= (A − LC)x̃ + (B N̄ − G)r

• Thus we can eliminate the effect of r on x̃ by setting G ≡ B N̄

• Fourth: if this generalization does not change the closed-loop poles


of the system, then what does it change?
– The zeros of the y/r transfer function, which are given by:
 
sI − A BK −B N̄
general det  −LC sI − Ac −G  = 0
C 0 0

 
sI − A BK 0
previous det  −LC sI − Ac L  = 0
C 0 0

 
sI − A BK −B N̄
new det  −LC sI − Ac −B N̄  = 0
C 0 0
Fall 2001 16.31 17–26

• Hard to see how this helps, but consider the scalar case:
 
sI − A BK −B N̄
new det  −LC sI − Ac −B N̄  = 0
C 0 0
⇒ C(−BKB N̄ + (sI − Ac )B N̄ ) = 0
−CB N̄ (BK − (sI − [A − BK − LC])) = 0
CB N̄ (sI − [A − LC]) = 0
– So that the zero of the y/r path is the root of sI − [A − LC] = 0
which is the pole of the estimator.
– With this selection of G = B N̄ the estimator dynamics are can-
celed out of the response of the system to a reference command.
– No such cancelation occurs with the previous implementation.

• Fifth: select N̄ to ensure that the steady-state error is zero.


– As before, this can be done by selecting N̄ so that the DC gain
of the closed-loop y/r transfer function is 1.

 −1  
 
y A −BK B
 C 0 − N̄ = 1
r DC LC Ac B

• The new implementation of the controller is


ẋc = Acxc + Ly + B N̄ r
u = −Kxc + N̄ r
– Which has two separate inputs y and r
– Selection of N̄ ensure that the steady-state performance is good
– The new implementation gives better transient performance.
Fall 2001 16.31 17–27

8·14·20
Figure 13: Example #1: G(s) = (s+8)(s+14)(s+20) .

• Method #1: previous implementation.


• Method #2: previous, with the reference input scaled to ensure
that the DC gain of y/r|DC = 1.
• Method #3: new implementation with both G = B N̄ and N̄ selected.

Step Response
1.4
meth1
meth2
meth3
1.2

0.8

0.6

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Fall 2001 16.31 17–28

0.94
Figure 14: Example #2: G(s) = s2 −0.0297
.

• Method #1: previous implementation.


• Method #2: previous, with the reference input scaled to ensure
that the DC gain of y/r|DC = 1.
• Method #3: new implementation with both G = B N̄ and N̄ selected.

Step Response
1.5
meth1
meth2
meth3

0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Fall 2001 16.31 17–29

8·14·20
Figure 15: Example #3: G(s) = (s−8)(s−14)(s−20) .

• Method #1: previous implementation.


• Method #2: previous, with the reference input scaled to ensure
that the DC gain of y/r|DC = 1.
• Method #3: new implementation with both G = B N̄ and N̄ selected.

Step Response
4
meth1
meth2
meth3
3

−1

−2

−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
16.31 Handout #3
Prof. J. P. How September 5, 2001
T.A. TBD Due: September 14, 2001

16.31 Homework Assignment #1

1. Plot the root locus diagram for positive values of K for the solutions of the equation

s3 + (5 + K)s2 + (6 + K)s + 2K = 0

2. The open loop transfer function of a closed-loop control system with unity negative
gain feedback is
K
G(s) = 2
s(s + 3)(s + 6s + 64)
Plot the root locus for this system, and then determine the closed-loop gain that gives
an effective damping ratio of 0.707.

3. A unity gain negative feedback system has an open-loop transfer function given by

K(1 + 5s)
G(s) =
s(1 + 10s)(1 + s)2

Draw a Bode diagram for this system and determine the loop gain K required for a
phase margin of 20 degs. What is the gain margin?

(a) A lag compensator


1 + 10s
Gc (s) =
1 + 50s
is added to this system. Use Bode diagrams to find the reduction in steady state
error following a ramp change to the reference input, assuming that the 20 deg
phase margin is maintained.

4. Plot the Nyquist diagram for the plant with the unstable open-loop transfer function

K(s + 0.4)
G(s) =
s(s2 + 2s − 1)

Determine the range of K for which the closed-loop system with unity negative gain
feedback which incorporated this plant would be stable.

16.31 Handout #4
Prof. J. P. How September 14, 2001
T.A. TBD Due: September 21, 2001

16.31 Homework Assignment #2

1. (Root Locus Analysis) [FPE 3.32, page 159].

2. (Dominant Pole Lo cations) [FPE 3.36 (a),(c),(d), page 161].


(a) State the steps that you would follow to show that this is the step response.
Which inverse transforms would you use from the Tables?

3. (Basic Root Locus Plotting) Sketch the root locus for the following systems. As we
did in class, concentrate on the real-axis, and the asymptotes/centroids.
K
(a) Gc G(s) =
s(s2+ 2s + 10)
K(s + 2)
(b) Gc G(s) =
s4
K(s + 1)(s − 0.2)
(c) Gc G(s) =
s(s + 1)(s + 3)(s2 + 5)
(d) Once you have completed the three sketches, verify the results using Matlab. How
closely do your sketches resemble the actual plots?

4. The attitude-control system of a space booster is shown in Figure 2. The attitude


angle θ is controlled by commanding the engine angle δ, which is then the angle of the
applied thrust, FT . The vehicle velocity is denoted by v. These control systems are
sometimes open-loop unstable, which occurs if the center of aerodynamic pressure is
forward of the booster center of gravity. For example, the rigid-body transfer function
of the Saturn V booster was
0.9407
Gp (s) =
s2 − 0.0297
This transfer function does not include vehicle bending dynamics, liquid fuel slosh dy-
namics, and the dynamics of the hydraulic motor that positioned the engine. These
dynamics added 25 orders to the transfer function!! The rigid-body vehicle was stabi-
lized by the addition of rate feedback, as shown in the Figure 2b (Rate feedback, in
addition to other types of compensation, was used on the actual vehicle.)

(a) With KD = 0 (the rate feedback removed), plot the root locus and state the
different types of (nonstable) responses possible (relate the response with the
possible pole locations)

2
Figure 2: Booster control system

(b) Design the compensator shown (which is PD) to place a closed-loop pole at s =
−0.25 + j0.25. Note that the time constant of the pole is 4 sec, which is not
unreasonable for a large space booster.
(c) Plot the root locus of the compensated system, with Kp variable and KD set to
the value found in (b).
(d) Use Matlab to compute the closed-loop response to an impulse for θc .

3
16.31 Handout #5
Prof. J. P. How September 21, 2001
T.A. TBD Due: September 28, 2001

16.31 Homework Assignment #3

1. Given the plant G(s) = 1/s2 , design a lead compensator so that the dominant poles
are located at −2 ± 2j

2. Determine the required compensation for the system


K
G(s) =
(s + 8)(s + 14)(s + 20)

to meet the following specifications:

• Overshoot ≤ 5%
• 10-90% rise time tr ≤150 msec

Simulate the response of this closed-loop system to a step response. Comment on the
steady-state error. You should find that it is quite large.
Determine what modifications you would need to make to this controller so that the
system also has

• Kp > 6

thereby reducing the steady state error. Simulate the response of this new closed-loop
system and confirm that all the specifications are met.

3. Develop a state space model for the transfer function (not in modal/diagonal form).
Discuss what state vector you chose and why.

(s + 1)(s + 2)
G1 (s) = (1)
(s + 3)(s + 4)

(a) Develop a “modal” state space model for this transfer function as well.
(b) Confirm that both models yield the same transfer function when you compute

Ĝ(s) = C(sI − A)−1 B + D

4. A set of state-space equations is given by:

ẋ1 = x1 (u − βx2 )
ẋ2 = x2 (−α + βx1 )

where u is the input and α and β are positive constants.

(a) Is this system linear or nonlinear, time-varying or time-invariant?


(b) Determine the equilibrium points for this system (constant operating points),
assuming a constant input u = 1.
(c) Near the positive equilibrium point from (b), find a linearized state-space model
of the system.

16.31 Handout #5
Prof. J. P. How September 28, 2001
T.A. TBD Due: October 5, 2001

16.31 Homework Assignment #4

1. State space response:

(a) Assume that the input vector u(t) is a weighted series of impulse functions applied
to the m system inputs, so that
 
k1
 . 
u(t) =  
 ..  δ(t) = Kδ(t)
km

where the ki give the weightings of the various inputs. Use the convolution integral
to show that the output response can be written as:

yimp (t) = CeAt [x(0) + BK] + DKδ(t)

(b) Repeat the process, but now assume that the inputs are step functions
 
k1
 . 
u(t) =  .. 

 us (t) = Kus (t)
km

where us (t) is the unit step function at time zero. In this case show that the
output can be written as:

ystep (t) = CeAt x(0) + CA−1 (eAt − I)BK + DKus (t)

(c) If A−1 exists, find the steady state value for ystep (t)
(d) Use the functions in (a) and (b) to find an analytic expression for the response of
a system with zero initial conditions to an input

0 
t<0
u(t) = 1 0 ≤ t < T


0 t≥T

(e) Confirm the result in (d) using the system dynamics given in question # 2

2. For the system  


−2 2 " #
  0
ẋ =  x + u
2 −3 1

Compute the matrix exponential the following ways:

(a) Using the series expansion.


(b) Using the inverse Laplace transform of (sI − A)−1
(c) Using the eigenvalues and eigenvectors

Which approach seems easiest for this system?

3. For the two-input, 1-output system,


   
−1 0 0 3 0

ẋ =  0 0 1 x +  0 0 
 
u
0 −2 −3 0 1
h i
y = 1 −1 4

Find the corresponding transfer function matrix — it will be a row of 2 transfer functions.

4. Prove that:

(a) e(A+B)t = eAt eBt if AB = BA


(b) e(A+B)t 6= eAt eBt if AB 6= BA
®
Confirm this result in Matlab with a simple 2 × 2 example.

5. Use state space techniques to find the zeros of the system


 
−2 −3 " # " #T
  1 1
A=  , B= C= D=1
1 0 0 −1

®
(a) Compute the result by hand, and then confirm using tzero in matlab.
(b) Convert this state-space model to a tranfer function and confirm the result that
way too.

®
MATLAB is a trademark of The MathWorks, Inc.

16.31
Handout #5

Prof. J. P. How
October 5, 2001

T.A. TBD
Due: October 12, 2001

16.31 Homework Assignment #5

1. For the system


      
ẋ1 −1 0 x1 1
      
  =   + u
ẋ2 1 −2 x2 1
 
h i x1
y = −1 1 

−u
x2
®
(a) Find the modes of this system (It is OK to use Matlab )
(b) Check the observability and controllability of the system using the rank tests
of the observability and controllability matrices.
(c) Check the observability and controllability of each mode of the system (compare
result with (b))
(d) Form the transfer function for the system. Is your result consistent with parts
(a)—(c)?
2. Consider the system with three states, and the state-space model matrices given by:
   
−6 1 0 0 h i
A =
   
 −11 0 1  B =  1  C = 1 0 0
−6 0 0 K

(a) Find the transfer function for the system G(s). Discuss the structure of G(s) for
various values of K.
(b) Form the observability matrix for the system. Is the system observable for all
values of K?
(c) Form the controllability matrix for the system. Is the system controllable for all
values of K?
(d) Compare your observations in (b) and (c) with those in (a).
3. The differential equations for the system with 2 inputs and 2 outputs are:

ÿ1 + 5ẏ1 + 6y1 = ü1 + 3u̇1 + 4u̇2 + 8u2


ẏ2 + y2 = u̇1 + 2u̇2 + 2u2

Find the transfer function matrix for the system.

1
4. Consider the system
      
ẋ1 19 42 x1 5
      
  =   + u
ẋ2 −9 −20 x2 −2
 
h i x1
 
y = 3 7  
x2

(a) Use the state-space tools to find the zeros (and their right directions) of the
system.
(b) Using these directions and the conditions given in the notes, check the modes of
the system for possible pole/zero cancellation. Form the transfer function of the
system and confirm that the results agree.

5. Consider a simple system with three identical masses m1 = 1, m2 , m3 connected


together with five identical springs in the following way:

Figure 1: Problem # 5. M1 = 1 and ki = 1

(a) Form a state space model of this system


(b) Find the modes of this model
(c) Describe the motions of the masses associated with each mode
®
(d) Confirm with a Matlab simulation that you can initialize the system to excite
each mode independently.

®
MATLAB is a trademark of The MathWorks, Inc.
2

16.31 Handout #6
Prof. J. P. How October 12, 2001
T.A. TBD Due: October 19, 2001

16.31 Homework Assignment #6


1. (FPE 6.47) The open-loop transfer function for a unity gain feedback system is
K
G(s) =
s(1 + s/5)(1 + s/60))
Design a compensator for G(s) so that the closed-loop system satisfies the following
specifications:
• The steady-state error to a unit ramp reference input is less than 0.01
• The phase margin is 40◦ ± 3◦
Verify your design in Matlab.®
2. State the Cayley-Hamilton theorem. Verify that it is true on a random 5×5 matrix in
®
Matlab using polyvalm.
3. The goal is to prove that the condition for controllability is that
 
rank Mc = rank B AB A2 B · · · An−1 B =n
To proceed, start with the orthogonality condition:
(x )T eAt B = 0
and expand the matrix exponential as a power series. Then show that the orthogonality
condition can be rewritten as the product of three matrices
(x )T M1 M2 (t) = 0
where the entire time dependence of the matrix exponential is embedded into M2 (t).
The basic test is derived by noting that this orthogonality condition must hold for all
time t, and confirm that (since x = 0) this condition can then only be true if M1 is
rank deficient.
At this point, M1 and M2 will have an infinite number of columns and rows, respec-
tively. Show how to use the Cayley-Hamilton theorem to convert the infinite matrices
to finite ones, thereby recovering the controllability condition given above.
4. Do Problem 3.23 on page 111 in Belanger on observability.
5. Do Problem 3.25 on page 111 in Belanger on controllability.
6. Do Problem 3.36 on page 114 in Belanger on the two pendula problem. Discuss if
the loss of controllability/observability that are analyzed in the problem make physical
sense to you?
®
MATLAB is a trademark of The MathWorks, Inc.
1
16.31 Handout #7

Prof. J. P. How October 17, 2001

T.A. TBD Due: October 26, 2001

16.31 Homework Assignment #7

1. Describe a physical system that you commonly use that exhibits either a loss of ob­
servability and/or controllability.

2. For the simple system:


   
0 1 0

   
ẋ =
  x +
  u

−2 2 1

(a) Find the poles of the system.


(b) Use the rank test to check controllability of the system.
(c) Repeat the controllability check using the modal test.
(d) Use the techniques on Page 13-2 of the notes to design a full-state feedback con-
troller for the system.
®
(e) Confirm the result in Matlab using acker.

3. Develop a state-space model of the following system:


s2 − 4.4s + 5
G1 (s) =
(s2 − 3s + 4)(s + 2)
(a) Find the target pole locations using a symmetric root locus for r = 1.
(b) Design a full-state feedback controller that places the pole in these locations.
(c) Simulate the state response to a step command. Comment on the system response
and control effort required.
(d) Repeat (a)–(c) for the system (you should be able to develop a very similar looking
state space model as the one for G1 (s))

s2 + 4.4s + 5
G2 (s) =
(s2 + 3s + 4)(s + 2)

(e) Now, for both G1 (s) and G2 (s), find the target pole locations using a symmetric
root locus as r → 0 and as r → ∞.
(f) Find the four sets of full-state feedback controller gains to put the poles of these
two systems in these two sets of locations. Compare the results. Are there any
surprises here?

1
4. The modified Longitudinal Dynamics of an old F-8 Aircraft are given as (see following
discussion):

ẋ = Ax + Bu
y = Cx + Du
   
−0.80 −0.0344 −12.0 0 −19.0 −2.50
 0 
−0.0140 −0.2904 −0.5620   
−0.0115 −0.0087 
 
A=  B= 
 1.0 −0.0057 −1.50 0   −0.160 −0.60 
1.0 0 0 0 0 0
   
0 0 0 1 0 0
C= D=
0 0 −1 1 0 0

(a) Find the eigenvalues and eigenvectors for these dynamics. Describe the mode
shapes for this system. Clearly discuss to what extent each state participates in
the mode.
®
(b) Use Matlab to check the controllability of the aircraft dynamics using the two
actuators separately.
(c) Using the elevator input δe (t), design a full state-feedback controller that doubles
the magnitude of the real part of each pole (leaving the complex parts the same
as open-loop).
(d) Use the techniques shown in class to modify the reference input so that the control
system would track a change in the perturbed pitch angle from trim with zero
steady-state error.
®
(e) Simulate the response in Matlab to a commanded 2 deg increase in the pitch angle
and discuss the results. Show the actual elevator inputs required.

Modified F-8 Aircraft Longitudinal Dynamics

1 Introduction
We shall present here the dynamics of an aircraft. We shall present a brief discussion of the
aircraft dynamics, and present the nominal differential equations.
The F-8 is an ”old-fashioned” aircraft that has been used by NASA as part of their digital
”fly-by-wire” research program. We have modified the equations of motion by including a
large ”flaperon” on the wing so as to obtain two control variables in the longitudinal dynamics
of the F-8. This flaperon does not exist in the F-8 aircraft. However, such surfaces exist
in other recent aircraft, e.g. the X-29, and provide some additional flexibility for precision
maneuvers.

2 Modeling Discussion
In Figure 1 we show an aircraft with a Cartesian coordinate system fixed to its center of
gravity (cg). This coordinate system, which is the so-called ”stability axes” coordinate frame,
has the x-axis pointed toward the nose of the aircraft, the y-axis out the right side, and the
z-axis pointed down.
We shall assume that the aircraft is flying in the vertical plane with its wings level (i.e.
without banking or turning) so that we can study its motion in the vertical plane, i.e. its
longitudinal dynamics. The important variables that characterize the aircraft in this motion
are the horizontal velocity of the airplane, the pitch angle θ which is the angle of the x-
axis with respect to the horizontal, the pitch rate is the rate of change of the pitch angle,
q = dθ/dt, and the angle of attack α. The angle of attack, α, is the angle of the nose with
respect to the velocity vector of the aircraft. Holding the wings at the angle of attack α with
respect to the incoming wing, which necessitates a tail, is what provides the lift force needed
to fly, i.e. to just balance the force of gravity, but it also produces drag; both lift and drag
are approximately proportional to the angle of attack α for small α. The flight path angle,
γ, defined by
γ =θ−α
is the angle between the aircraft velocity vector and the horizontal. As its name implies, γ
describes the trajectory of the aircraft in the vertical plane.
The longitudinal motion of the aircraft is controlled by two hinged aerodynamic control
surfaces as shown in figure 1: the elevator is located on the horizontal tail, and we shall
use the elevator angle δe (t) as a control variable; the flaperons are located on the wing, and
we shall use the flaperon angle δf (t) as another control variable. Most people are familiar
with elevators; the flaperons are just like the ailerons except that they move in the same
direction. Deflection of either of these two surfaces downward causes the airflow to be
deflected downward; this produces a force that induces a nose-down moment about the cg.

3
put the figure here

Figure 1: Variables for F-8 problem

As the aircraft rotates, it changes its angle of attack which results in additional forces and
moments (we shall show the equations below.)
The longitudinal motion of the aircraft is also influenced by the thrust generated by the
engines. However, in this problem we shall fix the thrust to be a constant and we shall
not use it as a dynamic control variable. (Actually, the dynamic coordination of the thrust,
elevator, and flaperons becomes important and significant when the aircraft is in its landing
configuration).
In general, the differential equations that model the aircraft longitudinal motions are non-
linear. These nonlinear differential equations can be linearized at a particular equilibrium
(steady-state) flight condition which is characterized by constant airspeed, altitude, cg lo-
cation, ”trimmed” angle of attack α, ”trimmed pitch angle θ so that γ = 0, and ”trimmed”
elevator angle δe to maintain zero pitch rate. One can then obtain a system of linear time-
invariant differential equations that describe the deviations of the relevant quantities from
their constant equilibrium (trimmed) values.

3 Linearized F-8 Dynamics


The following linear differential equations model the longitudinal motions of the F-8 aircraft
about the following equilibrium flight condition:

Altitude: 20,000 ft (= 6095 meters)

Speed: Mach 0.9 = 281.58 m/sec = 916.6ft/sec

Dynamic Pressure: 550 lbs/ft2 = 26,429 N/m2

Trim Pitch Angle: 2.25 deg.

Trim Angle of Attack: 2.25 deg.

Trim Elevator Angle: -2.65 deg.

The following four state variables represent perturbations from the equilibrium values:

x1 = q(t) = pitch rate (deg/sec)

x2 = u(t) = perturbation from horizontal velocity (ft/sec)

x3 = α(t) = perturbed angle of attack from trim (deg)

x4 = θ(t) = perturbed pitch angle from trim (deg)

The two control variables are:

δe (t) = elevator deflection from trim (deg)


δf (t) = flaperon deflection (deg)

The dynamics are given as

ẋ = Ax + Bu
y = Cx + Du

   
−0.80 −0.0344 −12.0 0 −19.0 −2.50
 0 
−0.0140 −0.2904 −0.5620   
−0.0115 −0.0087 
 
A=  B= 
 1.0 −0.0057 −1.50 0   −0.160 −0.60 
1.0 0 0 0 0 0
   
0 0 0 1 0 0
C= D=
0 0 −1 1 0 0

®
MATLAB is a trademark of The MathWorks, Inc.

16.31 Handout #8
Prof. J. P. How October 26, 2001
T.A. TBD Due: November 2, 2001

16.31 Homework Assignment #8

1. Consider the simple system


s − zo
G(s) =
(s + 3)(s + 4)

(a) Confirm that one possible state-space model is given by:


   
−7 1 1 h i
A=   
  , B=  , C= 1 0 , D=0
−12 0 −zo

(b) Evaluate the controllability of this system as a function of the value of zo .


(c) Use pole placement techniques to derive the full-state feedback gains
 
h i x1
 
u = − k1 k2  
x2

necessary to place the closed-loop poles at the roots of:

s2 + 2ζωn s + ωn2 = 0

(d) Use your analytic expressions for k1 and k2 to support the following two claims:
• “The system has to work harder and harder to achieve control as the control-
lability is reduced.”
• “To move the poles a long way takes large gains.”

2. We have talked at length about selecting the feedback gains to change the pole locations
of the system, but we have not mentioned anything about how the open-loop zeros are
changed. Part of the reason for this is that it can be shown that:
When full state feedback is used (u = N¯ r − Kx) to control a system, the zeros remain
unchanged by the feedback.
Confirm that this statement is true by analyzing the zero locations for the closed-loop
system, which are given by the roots of the polynomial:
 
sI − (A − BK) −N̄B
det 


 =0
C 0

The best way to proceed is to show that, through a series of column and row operations
that do not change the value of the determinant, you can get the following reduction:
   
sI − (A − BK) −N̄ B sI − A −B
   
det   =0 ⇒ det   =0
C 0 C 0

which, of course, is the same polynomial used to find the open-loop zeros of the system.

3. Consider the stick-on-the-cart problem (dynamics are given on the web page).
(a) Develop a state-space model for the transfer function dynamics given on page 2-8
of that handout.
(b) Confirm that the system is controllable using the force actuator.
(c) The objective is to design a full-state feedback controller for this system using
pole-placement techniques. The overall goals1 are to obtain a settling time of 4—5
sec with a maximum overshoot of ≈ 15%. Generate four controllers using the
placement locations from:
• Dominant second-order (discuss where you put all the poles)
• Bessel
• ITAE (locations will be posted)
• LQR (show the SRL in this case using y = x)
(d) Simulate the response of the system to a 3 unit step change in the position of the
cart x. Use u = N¯ r − Kx to implement the control.
• Discuss any aspects of the response of the system that seem particularly
interesting. Is the system minimum phase or NMP?
• Compute (and plot on the same graph) the control effort required using each
of the four placement methods. Compare the amount of effort required in
each case2 .
4. Consider the simple system
1
G(s) =
s+a
(a) Draw the SRL plot for this system.
(b) The SRL equation is only second order in this case, so use it to explicitly solve
for the closed-loop pole location as a function of r, the control weight.
(c) Use this solution to find the feedback gain u = −Kx as a function of r. Discuss
what happens when r → 0 and r → ∞. Be sure to consider the two separate
cases: a > 0 and a < 0. Any surprises here?

1
Note that these specifications on the closed-loop performance are not very tight, they are given only as
targets for you to use in roughly selecting where to place the dominant poles.
2
Note that this is a dangerous process in general, because we should really only be concerned if a technique
gives the same performance as the rest, but takes a lot more control effort

2
16.31 Handout #9
Prof. J. P. How November 2, 2001
T.A. TBD Due: November 9, 2001

16.31 Homework Assignment #9

1. Suppose that ẋ = Ax and that


   
1 1
    2t
x(0) =   gives trajectory x(t) =  e , and
−2 −2
   
0 0
    −t
x(0) =   gives trajectory x(t) =  e , and
−1 −1

(a) Find x(t) when x(0) = [ −1 3 ]T


(b) What are the eigenvalues and eigenvectors of A?
(c) Is there enough information to find A and eAt . Either do so, or explain why not.

2. Suppose that ẋ = Ax where


 
1 1
 
ẋ(t) =   x(t)
0 −2
 
y(t) = 1 1 x(t)

Where we take u = 0 for simplicity.

(a) Suppose that we know y(3) = 1, what does this tell us about x(3)? Plot the
region in the x1 (3)–x2 (3) plane consistent with this measurement.
(b) Now suppose that we also know that ẏ(3) = 0, what does this tell us about x(3)?
Plot this region on the same graph and from this combined plot show whether or
not you can determine x(3).
 
(c) Repeat parts (a) and (b) using the same A matrix but with C = 0 1 . What
happens in this case? What causes the difference?

3. Estimator of a non-minimum phase system Consider the system dynamics

ẋ1 = w
ẋ2 = −x1 − 2x2 + w (1)

with continuous measurements y(t) = x2 (t)+ v(t). The measurement and process noise
sizes (spectral densities) are Rv and Rw , respectively.

1
(a) Find the transfer function Gyw (s) from w(s) to y(s) and identify the poles and
zeros. Recall that right-half plane zeroes are called non-minimum phase.
(b) Use this transfer function to sketch the symmetric root locus for the estimator
poles versus Rw /Rv .
(c) Use this plot to clearly demonstrate that one of the estimator poles tends to
s = −1 as Rv /Rw → 0, even though there is no zero there (only a reflected one).
(d) Find the gains to place the estimator poles in the locations associated with
Rv /Rw =  (pick a small  and use acker as in the notes). Simulate the re­
sponse of the resulting closed-loop estimator to confirm that this implies that
part of the estimation error will never attenuate faster than e−t , even with noise
free measurements.
(e) Comment on the impact of the nonminimum-phase zero on our ability to do good
estimation for this system.

4. Consider the F-8 problem in HW7, #4. Assume that the process noise disturbance
(size ≈1) enters through the flaperon δf and the sensor is the perturbed flight path
angle  
y2 (t) = 0 0 −1 1 x + v

(a) Draw a symmetric root locus for this system to find the closed-loop estimator
poles as function of the size Rv of the sensor noise v. Clearly show the pole
locations associated with the limiting cases Rv → 0, ∞.
(b) Select the estimator pole locations that maximize the decay rate of the highest
frequency set of estimator poles. Find the estimator gains to place the estimator
poles at these locations.
(c) Simulate the combined system/estimator response to determine the estimation
error as a function of time when
   
1 0
 −1   0 
   
x(0) =   but x(0)
ˆ = 
 1   0 
−1 0

(d) Discuss the performance of this estimator.

16.31 Handout #10


Prof. J. P. How November 21, 2001
T.A. TBD Due: November 30, 2001

16.31 Homework Assignment #10

1. Consider the control of


10
G(s) =
s(s + 1)
using the model with y = x1 and ẋ1 = x2 .

(a) Design a full-state feedback controller that yields closed-loop poles with ωn = 3
and ζ = 0.5.
(b) Design a state estimator that has estimator error poles with ωn = 15 and ζ = 0.5
(c) Combine these two to obtain the compensator Gc (s).
• Plot the Bode diagram of the compensator.
• Can you give classical interpretation of how this compensator works?
• What are the gain and phase margins of this system?
(d) Plot the closed-loop root locus as a function of the plant gain (nominally 10) —
how sensitive does this controller appear to be?

2. The linearized longitudinal equations of a helicopter near hover can be modeled by the
normalized third order system
      
q̇ −0.4 0 −0.01 q 6.3
      
 θ̇  =  1 0 0   θ  +  0 δ
u̇ −1.4 9.8 −0.02 u 9.8

where q is the pitch rate, θ is the pitch angle of the fuselage, u is the horizontal velocity,
and δ is the rotor tilt angle. Suppose that our sensor measures the horizontal velocity,
so y = u

1
(a) Find the open-loop pole locations.
(b) Sketch out how you would design a classical controller that stabilizes the system
(i.e., Discuss the number of compensator poles and zeros and show roughly where
they need to be.)
(c) Is this system controllable and observable?
(d) Plot the regulator SRL for this system — choose the value of control weighting r
that places the real pole near s = −2. Design the regulator gains K that place
the poles at the resulting locations.
(e) Plot the estimator SRL for this system — choose the value of noise ratio that places
the real pole near s = −8. Design the estimator gains L that place the poles at
the resulting locations.
(f) Compute the compensator transfer function using the K and L gains obtained.
• Plot the Bode diagram of the compensator.
• How does this design compare with yours in part (b)?
(g) Plot the closed-loop root locus as a function of the plant gain (as done in class)
— how sensitive does this controller appear to be?
(h) Compute and plot the sensitivity function S(s) for this closed-loop system — does
this design look feasible for implementation?
3. Consider the classic example
" # " # " #
1 1 0 1
ẋ = x+ u+ w
0 1 1 1
h i
y = 1 0 x+v
h i
z = 1 1 x

(a) Use SRL arguments to show that, as the control weight ρ → 0 the regulator gains
are given by Kr = k[ 1 1 ] (and find an approximate expression for k).
(b) Use similar arguments to show that, as the relative sensor noise θ → 0 the esti-
mator gains are given by L = l[ 1 1 ] (find an approximate expression for l)
(c) Form the compensator using these gains and describe how the compensator sta-
bilizes the system. (Try to do this analytically if possible, but if not, consider
three designs with ρ = θ ∈ {1, 10−2 , 10−4 }).
(d) Compute and plot the Nyquist plot for the system — How large a circle can you
put around the critical point −1 without changing the number of encirclements?
Again consider ρ = θ ∈ {1, 10−2 , 10−4 }.
(e) Compute and plot the sensitivity plot for the system — is this plot consistent with
your findings in the Nyquist diagram?
(f) What can you conclude about the stability margins for this controller as
ρ = θ → 0?

Fall 2001

Topic #6

16.31 Feedback Control

Control Design using Bode Plots


• Performance Issues
• Synthesis
• Lead/Lag examples

Copyright 2001 by Jonathan How.


Topic #3

16.31 Feedback Control

Frequency response methods


• Analysis
• Synthesis
• Performance
• Stability

Copyright 2001 by Jonathan How.

1
Fall 2001 16.31 3–1

Introduction
• Root locus methods have:
– Advantages:
∗ Good indicator if transient response;
∗ Explicity shows location of all closed-loop poles;
∗ Trade-offs in the design are fairly clear.
– Disadvantages:
∗ Requires a transfer function model (poles and zeros);
∗ Difficult to infer all performance metrics;
∗ Hard to determine response to steady-state (sinusoids)

• Frequency response methods are a good complement to the root


locus techniques:
– Can infer performance and stability from the same plot
– Can use measured data rather than a transfer function model
– The design process can be independent of the system order
– Time delays are handled correctly
– Graphical techniques (analysis and synthesis) are quite simple.
Fall 2001 16.31 3–2

Frequency response Function


• Given a system with a transfer function G(s), we call the G(jω),
ω ∈ [0, ∞) the frequency response function (FRF)
G(jω) = |G(jω)| arg G(jω)
– The FRF can be used to find the steady-state response of a
system to a sinusoidal input. If
e(t) → G(s) → y(t)
and e(t) = sin 2t, |G(2j)| = 0.3, arg G(2j) = 80◦ , then the
steady-state output is
y(t) = 0.3 sin(2t − 80◦)
⇒ The FRF clearly shows the magnitude (and phase) of the
response of a system to sinusoidal input

• A variety of ways to display this:


1. Polar (Nyquist) plot – Re vs. Im of G(jω) in complex plane.
– Hard to visualize, not useful for synthesis, but gives definitive
tests for stability and is the basis of the robustness analysis.

2. Nichols Plot – |G(jω)| vs. arg G(jω), which is very handy for
systems with lightly damped poles.

3. Bode Plot – Log |G(jω)| and arg G(jω) vs. Log frequency.
– Simplest tool for visualization and synthesis
– Typically plot 20log |G| which is given the symbol dB
Fall 2001 16.31 3–3

• Use logarithmic since if


 

(s + 1)(s + 2) 


log |G(s)| = 


(s + 3)(s + 4) 


= log |s + 1| + log |s + 2| − log |s + 3| − log |s + 4|


and each of these factors can be calculated separately and then
added to get the total FRF.

• Can also split the phase plot since


(s + 1)(s + 2)
arg = arg(s + 1) + arg(s + 2)
(s + 3)(s + 4)
− arg(s + 3) − arg(s + 4)

• The keypoint in the sketching of the plots is that good straightline


approximations exist and can be used to obtain a good prediction
of the system response.
Fall 2001 16.31 3–4

Example
• Draw Bode for
s+1
G(s) =
s/10 + 1
|jω + 1|
|G(jω)| =
|jω/10 + 1|
log |G(jω)| = log[1 + (ω/1)2]1/2 − log[1 + (ω/10)2]1/2
• Approximation


 0 ω ωi
log[1 + (ω/ωi )2]1/2 ≈ 
 log[ω/ωi ] ω ωi
Two straightline approximations that intersect at ω ≡ ωi
• Error at ωi obvious, but not huge and the straightline approxima-
tions are very easy to work with.
2
10

1
10
|G|

0
10

−2 −1 0 1 2
10 10 10 10 10
Freq
Fall 2001 16.31 3–5

To form the composite sketch,


– Arrange representation of transfer function so that DC gain of
each element is unity (except for parts that have poles or zeros
at the origin) – absorb the gain into the overall plant gain.
– Draw all component sketches
– Start at low frequency (DC) with the component that has the
lowest frequency pole or zero (i.e. s=0)
– Use this component to draw the sketch up to the frequency of
the next pole/zero.
– Change the slope of the sketch at this point to account for the
new dynamics: -1 for pole, +1 for zero, -2 for double poles, . . .
– Scale by overall DC gain

2
10

1
10
|G|

0
10

−1
10
−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 1: G(s) = 10(s + 1)/(s + 10) which is a “lead”.


Fall 2001 16.31 3–6

• Since arg G(jω) = arg(1 + jω) − arg(1 + jω/10), we can construct


phase plot for complete system in a similar fashion
– Know that arg(1 + jω/ωi ) = tan−1(ω/ωi )
• Can use straightline approximations

0 ω/ωi ≤ 0.1







arg(1 + jω/ωi ) ≈ 

90 ω/ωi ≥ 10


 45◦

ω/ωi = 1

• Draw the components using breakpoints that are at ωi /10 and 10ωi

100

90

80

70

60
Arg G

50

40

30

20

10

−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 2: Phase plot for (s + 1)


Fall 2001 16.31 3–7

• Then add them up starting from zero frequency and changing the
slope as ω → ∞

80

60

40

20
Arg G

−20

−40

−60

−80

−2 −1 0 1 2 3
10 10 10 10 10 10
Freq

Figure 3: Phase plot G(s) = 10(s + 1)/(s + 10) which is a “lead”.


Fall 2001 16.31 3–8

Actual
0 LF
10 MF
HF

−1
+1

−1 −2
10 0
Magnitude

−2
10
+1

−2

−3
10
−4 −3 −2 −1 0 1
10 10 10 10 10 10
Freq (Hz)
20
Actual
LF
0 MF
HF

−20

−40

−60
Phase (deg)

−80

−100

−120

−140

−160

−180
−4 −3 −2 −1 0 1 2
10 10 10 10 10 10 10
Freq (Hz)
4.54s
Bode for G(s) = .
s3 + 0.1818s2 − 31.1818s − 4.4545
The poles are at (-0.892, 0.886, -0.0227)
Fall 2001

Non-minimum Phase Systems


• Bode plots are particularly complicated when we have non-minimum
phase systems
– A system that has a pole/zero in the RHP is called non-minimum
phase.
– The reason is clearer once you have studied the Bode Gain-
Phase relationship
– Key point: We can construct two (and many more) systems
that have identical magnitude plots, but very different phase
diagrams.
• Consider G1(s) = s+1
s+2
and G2(s) = s−1
s+2

0
10

MP
|G|

NMP

−1
10
−1 0 1 2
10 10 10 10
Freq

200
MP
NMP
150
Arg G

100

50

0
−1 0 1 2
10 10 10 10
Freq

Figure 4: Magnitude plots are identical, but the phase plots are dramatically different. NMP has a 180 deg
phase loss over this frequency range.
MIT OpenCourseWare | Aeronautics and Astronautics | 16.31 Feedback Control Systems,... Page 1 of 1

z Belanger. Control Engineering: A Modern Approach. Chapter 1.


z Van de Vegte. Feedback Control Systems. Chapter 5 and 6.
z Bode (PDF)
z Stability in the Frequency Domain (PDF - 2.4 MB)
z Bode Synthesis - Lead / Lag (PDF - 1.1 MB)

http://ocw.mit.edu/OcwWeb/Aeronautics-and-Astronautics/16-31Feedback-Control-Syste... 8/12/2005
Fall 2001

Topic #5

16.31 Feedback Control

Stability in the Frequency Domain


• Nyquist Stability Theorem
• Examples
• Appendix (details)

• Remember that this is the basis of future robustness tests.

Copyright 2001 by Jonathan How.

You might also like