You are on page 1of 44

MODERN CONTROL

SYSTEMS ENGINEERING
COURSE #: CS421
INSTRUCTOR:
DR. RICHARD H. MGAYA

Date: October 25th, 2013

Optimal Control System Design


Consider a state differential equation:
x Ax(t ) Bu (t )

The system can be represented in a general form:


x g x(t ), u (t ), t

(i)

where
x(t) states of the system
u(t) control effort
Optimal control:
Seeks to maximize the return from a system at minimum cost
Finding the control u which causes the system (i) to follow an optimal
trajectory x(t) that minimizes the performance criterion or cost function
t1

J hx(t ), u (t ), t

(ii)

t0

Dr. Richard H. Mgaya

Optimal Control System Design


Types of Optimal Control Problems
Terminal control problems: Deals with bringing the system as close as
possible to a given terminal state within a given period of time
Example an automatic aircraft landing system
Optimal policy-Minimizing errors in state vector at the point of landing
Minimum-time control problem: Reaching the terminal state in shortest
time possible
Example Bang-bang control policy
Control is set to umax initially, switching to umin at some specified time
Minimum energy control problem: Transferring of the system from initial
state to final state with minimum expenditure of control effort
Example Satellite control
Dr. Richard H. Mgaya

Optimal Control System Design


Types of Optimal Control Problems
Regulator control problems: System initially displaced from the
equilibrium, will return to equilibrium state in such a manner so as
to minimize a given performance index
Example an autopilot for aircraft, shipping vessel or yacht
Optimal policy-Minimizing errors between actual course and desired
course

Tracking control problem: Cause the state of the system to track as


close as possible some desired state time history in such a manner so
as to minimize a given performance index
Example missile tracking a target

Dr. Richard H. Mgaya

Optimal Control System Design


Selection of Performance Index
Decision on the type of performance index depends on the
nature of the control problem
Example: Autopilot system - yacht
Goal Maintain course
Minimize the error e , between desired course d , and the actual
course a , with minimum transient period
Source of disturbance wind, waves and currents

Requirements
Minimize distance off-track, ye(t) wandering off track increases the
distance
Minimize course or heading error e
Minimize radar activity a minimize control energy
Minimize forward speed loss ue(t) yaw movement increases angle of
attack resulting to increased drag and forward speed loss
Dr. Richard H. Mgaya

Optimal Control System Design


Selection of Performance Index
General performance index:
t1

J h ye (t ), e (t ), ue (t ), a (t ) dt
t0

Control variable:
x1 = ye(t) , x2 = e , x3 = ue(t) , and u = a
Performance index equation
t1

J q11 x1 q22 x2 q33 x3 r1u dt


t0

t1

J Qx Ru dt
t0

If the state and control variables are square then the performance index
becomes quadratic performance index
Dr. Richard H. Mgaya

Optimal Control System Design


Quadratic Performance Index
A linear system with quadratic performance index has a
solution that yield a linear control law
u(t ) Kx(t )
Therefore,

t1

J q11 x12 q22 x 22 q33 x 32 r1u 2 dt


t0

J x1
t0

t1

General form

x2

q11
x3 0
0
t1

0
q22
0

0 x1

0 x2 u r1 u dt

q33 x33

J xT Qx u T Ru dt
t0

Q and R are control and weight matrix respectively, J is a scalar quantity


Dr. Richard H. Mgaya

Optimal Control System Design


Quadratic Performance Index
When is J finite?
Can converge to a limit or diverge to infinity

Note:
If (A, B) is stabilizable, then the uncontrollable eigen values are of A have
negative real part

Re [ ( A)] 0

If (A, C) is detectable, then the unobservable eigen values are of A have


negative real part
Suppose (A, B) is stabilizable and (A, M) is detectable where Q = MTM and
u(t) = -Kx(t), then the cost function J is finite for every x(0) Rn if and only
if Re[(A + BK)] < 0
Note:
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Provides optimal control law for a linear system with quadratic
performance index
Continuous Form
Functional equation:
t1

f ( x, t ) min u h( x, u )dt
t0

f ( x, t0 ) f ( x(0))
f ( x, t1 ) 0
from eqn. i and ii a Hamilton-Jacobi can be expressed as follows
T

f
f
min u h( x, u )
g ( x, u )
t
x

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Continuous Form
Substitution g ( x, u ) : x Ax Bu
t1

h( x, u ) : J ( xT Qx u T Ru )dt
t0

T
T

T
min u x Qx u Ru
( Ax Bu )
t
x

Introduce the relationship of the form:


f ( x, t ) xT Px

where P is square and symmetric, Riccati matrix


Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Continuous Form

f
T
x
Px
t
t
f
2 Px
x

f
T

2
x
P
x
T

Substitution:
xT

P
x min u xT Qx u T Ru 2 xT P( Ax Bu )
t

(iii)

In order to minimize u then

f
t
2u T R 2 xT PB 0
u
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Optimal control law:
1 T

uopt R B Px

uopt Kx

(iv)

where K = -R-1BTP

Substitution: eqn. (iv) to eqn. (iii)


xT P x xT (Q 2PA PBR 1BT P) x
But

2xT PAx xT ( AT P PA) x

then

P PA AT P Q PBR 1BT P

(v)

Equation (v) belong to a class known as matrix Riccati equations


Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Discrete Form
Discrete solution to state equation:

x(k 1)T A(T ) x(kT ) B(T )u (kT )

or

x(k 1) A(T ) x(k ) B(T )u(k )

Discrete quadratic performance index:


N 1

J ( xT (k )Qx ( k ) u T (k ) Ru ( k ))T
k 0

Solution of matrix Riccati is solved recursively for P and K

K N (k 1) TR B (T ) P( N k ) B(T ) BT (T ) P( N k ) A(T )
T

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Recursive equation for P:

PN (k 1) TQ K T ( N (k 1))TRK ( N (k 1))

A(T ) B(T ) K ( N (k 1)T P( N k )A(T ) B(T ) K ( N (k 1)


Boundary condition:
P( N ) 0

Optimal regulator:
r

x Ax Bu

K
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Example: The plant and performance index are given as follows:
x1 0
x 1
2
y 1 0x

T0
0 x 1

1 x1 0
u

2 x2 1

1
2
x

u
dt
2

Determine Riccati matrix P, state feedback matrix K and the


closed-loop eigenvalues
Soln:

PA AT P Q PBR 1BT P
P
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
p11
PA
p21
0
A P
1
T

p12 0
p22 1
1 p11
2 p21

1 p12

2 p22

p12 p21

p22 p11 2 p21

p12 0
p
PBR 1 B T P 11
110
p
p
22
21
p
12 p21
p22
p22
p p
12 21
p22 p21

p11 2 p12
p21 2 p22

p
1 11
p21

p22
p12 2 p22
p12
p22

p12 p22

2
p22

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
p11 2 p12 p21
p12
p
p 2p
p

2
p
22
21
22
21

11
2 0 p12 p21 p12 p22
0
0 1 p p
2
p

22 21
22

p22

p12 2 p22

Four Simultaneous Equations:


P is symmetric, i.e., p21 = p12
2
p12 p12 2 p12
0

p11 2 p12 p22 p12 p22 0


p22 p11 2 p12 p12 p22 0
2
p12 2 p22 p12 2 p22 1 p22
0

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Solving simultaneous equations:
P is symmetric, i.e., p21 = p12

p12

2
p12
2 p12 2 0
p21 0.732 and 2.732

p12 = p21 = 0.732


From the last simultaneous eqn.:
2
2 p12 4 p22 1 p22
0
2
p22
4 p22 2.464 0

p22 0.542 and 4.542


p22 = 0.542
From second simultaneous eqn:

p11 (2 0.732) 0.542 (0.732 0.542) 0


p11 2.403
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Ricatti matrix P:
p
PA 11
p21

p12 2.403

p22 0.732

0.732
0.542

Feedback Matrix K

2.403 0.732
K R 1 B T P 10 1

0
.
732
0
.
542

K 0.732 0.542

Closed-loop eigen values: sI A BK 0


s
0

0 0

s 1

s
1

1 0

s 2 0.732

s
1.732

1 0
0.732

2 1

0.542 0

0
0

0.542

1
0, s 2 2.542s 1.732 0, s1, 2 1.271 j 0.341

s 2.542
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Generally, for 2nd order systems if Q is diagonal and R is
scalar then the elements for Riccati matrix are given as:
b22
p11
p12 p22 p22 a21 p12 a22
r
2
r
q
b
2
p12 p21 2 a21 a21
11 2
b2
r
r
2 p12 q22
2
p22 2 a22 a22

b2
r

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Tracking Problem:
Control effort to drive the plant state vector x(t) to follow a
desired trajectory r(t) in optimal manner
Continuous Form
Performance index to be minimized:
t1

J (r x)T Q(r x) u T Ru dt
t0

State tracking equation:


s ( A BR 1BT P)T s Qr

(vi)

Boundary conditions for tracking vector s:


s(t1 ) 0
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Tracking Problem:
Optimal control law:
uopt R 1 B T Px R 1 B T s

Let
v R 1BT s

(vii)

and
K R 1 BT P

Then

uopt v Kx

If r(t) is known then the system can be designed to follow the


command v(t) from eqn. (vi) and (vii)
Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Optimal Controller for Tracking System
r

s ( A BR B P) s Qr
T

Tracking vector

R B

uopt

Command vector

x Ax Bu

Discrete Form
Discrete quadratic performance index
N 1

J r (k ) x(k ) Qr (k ) x(k ) u T (k ) Ru (k ) T
k 0

Dr. Richard H. Mgaya

Optimal Control System Design


Linear Quadratic Regulator, LQR
Discrete Form
Discrete state tracking equation:

sN (k 1) F (T ) s( N k ) G(T )r ( N k )

where F(T) and G(T) are control and transition matrices


Boundary condition:
s( N ) 0

Command vector v:
vN k R 1BT s( N k )

Optimal control at time (kT):


Thus,

uopt (kT ) v(kT ) K (kT ) x(kT )


x(k 1)T A(T ) x(kT ) B(T )uopt (kT )
Dr. Richard H. Mgaya

Robust Control System Design


Deals with finding the control law which maintains system
response and error signals within prescribed tolerances despite
the effect of uncertainties on the system
Form of uncertainties:
Disturbance effect on the plant
Measurement noise
Modeling error due to nonlinearity
Model uncertainties due to time varying parameter

Generally, physical system are nonlinear


Linearized for small perturbation about an operating point
Controller design for that operating point
Dr. Richard H. Mgaya

Robust Control System Design


If we consider a family of operating points the uncertainty in
the nominal model is taken into account by considering all
possible variations in the family of models
Controller is said to have robust stability if it can stabilize all
plants within the family
Controller is said to have robust performance if all the plants
within the family meet a given performance specification
Trade-off between conflicting requirements is also taken into account

Dr. Richard H. Mgaya

Robust Control System Design


Consider a feedback control system bellow

N(s) and D(s) are disturbance and measurement noise


Y ( s ) G ( s )U ( s ) D( s )
B( s) Y ( s) N ( s)
U ( s ) C ( s )[ R( s ) B( s )]

(viii)

Substituting U(s) and B(s) in Y(s)


G( s)C ( s) R( s)
D( s )
G ( s)C ( s) N ( s)
Y ( s)

1 G ( s)C ( s) 1 G ( s)C ( s) 1 G ( s)C ( s)

(ix)

Dr. Richard H. Mgaya

Robust Control System Design


Introduce sensitivity function S(s) relates Y(s) and D(s) when
R(s) = N(s) = 0
Y ( s)
1
S ( s)
D( s )
1 G( s)C ( s)

Complementary sensitivity function:


T ( s) 1 S ( s)

G ( s )C ( s)
1 G ( s )C ( s )

If N = 0 eqn. (viii) becomes:


Y (s) T (s) R(s) S (s) D(s)

If T(s) = 1 and S(s) = 0, then perfect set point for tracking and
disturbance rejection
If N(s) 0 then
Y (s) T (s) R(s) S (s) D(s) T (s) N (s)

Therefore, T ( j) 1, Tracking, T ( j) 0, Noise rejection


Dr. Richard H. Mgaya

Robust Control System Design


Model Uncertainties
Unstructured model uncertainties relates to the unmodelled
effects such as plant disturbance and are related to the nominal
plant as either additive or multiplicative
Additive uncertainties, (a):
G(s) Gn (s) la (s)

(x)

Multiplicative uncertainties, (b):


G(s) 1 lm (s) Gn (s)
la (s)

Gn (s)
(a)

(xi)

lm (s)
+

Gn (s)

(b)
Dr. Richard H. Mgaya

Robust Control System Design


Model Uncertainties
Structured model uncertainties relates to parametric variation
in the plant dynamic
Uncertain variation in coefficients of the differential equation

Normalized System Input:


All inputs to the control loop are normalized
Inputs , i.e., changes in set-point or disturbance, are represented by V(s)

V ( s ) V 1 ( s )W ( s ) W ( s )

Impulse : V 1 ( s ) 1 W ( s ) 1
1
Step :
V 1 ( s) 1 W ( s)
s

where V1(s) and W(s) are bounded input and input transfer function, .i.e.,
the input weight, respectively
Dr. Richard H. Mgaya

Robust Control System Design


Normalized System Input:
Set of bounded input : 2-norm of the input signals
v1 (t )

2
2

v1 (t ) 2 dt 1
0

Transformation to frequency domain Parsevals Theorem


v1 (t )

2
2

1
2

V ( j )
W ( j ) d 1

Dr. Richard H. Mgaya

Robust Control System Design


Linear Quadratic H2 Optimal Control
Consider the performance index of the linear quadratic
tracking problem
t1

J (r x)T Q(r x) u T Ru dt
t0

In scalar for with u not constrained = Integral Square Error


t1

ISE e 2 (t )dt
t0

H2 - Optimal control problem:


Find a controller c(t) such that the 2-norm of ISE is minimized for a
specific input

Transformation using Parsevals Theorem:


min c e(t )

2
2

1
min c
2

E ( j )

Dr. Richard H. Mgaya

Robust Control System Design


Linear Quadratic H2 Optimal Control
H2 - Optimal control problem:
From set of eqn. (viii)
If B(s) and Y(s) are substituted and U(s) be written as C(s)E(s), then

1
R( s) D( s) N ( s)
1 G ( s )C ( s )
S ( s )R( s ) D( s ) N ( s )

E ( s)

Since, V(s) = W(s) for specific input


Thus,

min c e(t )

2
2

1
min c
2

S ( j )W ( j ) d
2

Therefore, H2 optimal controller minimizes the average


magnitude of sensitivity function S(j) weighted by W(j)
Dr. Richard H. Mgaya

Robust Control System Design


Linear Quadratic H Optimal Control
Assumption: The input V(j) belong to a set of bounded
function with weight W(j)
2

2
1
V ( j )
v1 (t )
d 1

2
2 W ( j )
Each input V(j) in a set will result in a corresponding error, E(j)

H - Optimal control problem:


Minimize the worst error that can arise from any input in the set, i.e.,
the final result will have the least upper bound

min c e(t )

min c sup S ( j )W ( j )

Therefore, H optimal controller minimizes the maximum


magnitude of weighted sensitivity function S(j) over a
frequency range .

Dr. Richard H. Mgaya

Robust Control System Design


Robust Stability
Let Gm(j) be a nominal model belong to a family of plants
If G(j) is modelled exactly, i.e., disturbance D(s) and
noise N(s) are zero, G(j) = Gm(j)
If la() is the bound of additive uncertainties, then G(j) belonging in the
family is given as

G : G ( j ) Gm ( j ) la ( )
Multiplicative uncertainties bound: from eqn. (x) and (xi)

lm ( )

la ( )
Gm ( j )C ( j )

la ( ) Gm ( j )C ( j ) lm ( )

Note: G(j)C(j) is the open-loop forward transfer function


Dr. Richard H. Mgaya

Robust Control System Design


Robust Stability
Closed-loop uncertainty bound:

or

Gm ( j )C ( j )
lm ( ) 1
1 Gm ( j )C ( j )
T ( j ) lm ( ) 1

Robust stability:
If all plants G(s) in the family have same number of RHP poles then
controller C(s) stabilizes the nominal plant iff the complementary
sensitivity function satisfy the following condition

T ( j )lm ( )

sup T ( j )lm ( ) 1

lm() is referred as the weighted function for T(j)

Note: Robust stability provides minimum requirements, .i.e., stability


Dr. Richard H. Mgaya

Robust Control System Design


Robust Performance
Control system is said to have robust performance if the
controller can minimize the worst plant error in the family
Recall:

S ( j )W ( j )

sup S ( j )W ( j )

If a bound is placed on the sensitivity function S(j) such that:


S ( j ) W ( j )

Then,
sup S ( j )W ( j ) 1 for all G ( j )

Dr. Richard H. Mgaya

Robust Control System Design


Example: Given the following control system

(a) Plot the bode magnitude for sensitivity function S(j) and
complementary sensitivity function T(j), for k = 10 and
comment on their values
(b) For step input, let W(s) = 1/s and produce a bode magnitude
plot for S ( j )W ( j ) for k = 10, 50, and 100 and identify the
optimal value for using both H2 and H criteria
Dr. Richard H. Mgaya

Robust Control System Design


Soln:
(a) Sensitivity function:
S ( s)

1 G ( s )C ( s ) 1

1
K
(1 s )(1 2 s )

2 s 2 3s 1
2
2 s 3s (1 K )

Complementary sensitivity function:


2 s 2 3s 1
T ( s) 1 S ( s) 1 2

2
s

3
s

(
1

K
)

K
2
2 s 3s (1 K )
Dr. Richard H. Mgaya

Robust Control System Design


Soln:
(a) Bode plot:

The system has approximately set-point tracking error of -0.8dB and


disturbance rejection of -20dB for up to 1 rad/s

Dr. Richard H. Mgaya

Robust Control System Design


Soln:
(b) Weighted sensitivity function for step input:
2 s 2 3s 1
S ( s )W ( s )
s{2 s 2 3s (1 K )}

The H2-norm reduces as k increases, thus k = 100 is the be value


H-norm: Maximum magnitude of the weighted sensitivity function occurs
at the lowest frequency. Thus, the least upper bound is is 0dB at 0.01rad/s
where k = 100
Dr. Richard H. Mgaya

Robust Control System Design


Example: The nominal forward path transfer function for a
closed-loop system is given as follows
K
Gm ( s )C ( s )
s ( s 2 2 s 4)

Let the bound for multiplicative model uncertainty be


lm ( s )

0.5(1 s )
(1 0.25s )

What is the maximum value of K for a robust stability?


Soln:
T ( j )lm ( ) sup T ( j )lm ( ) 1

T ( s)

Gm ( s )C ( s )
1 Gm ( s )C ( s )

T ( s)

K
s 3 2s 2 4s K
Dr. Richard H. Mgaya

Robust Control System Design


Soln:
T ( s )lm

0.5 K (1 s )
(1 0.25s )( s 3 2 s 2 4 s K )

Marginal stability occurs at k = 3.5, thus maximum value for


robust stability

Dr. Richard H. Mgaya

Robust Control System Design


If N(s) 0 then
Therefore,

Y (s) T (s) R(s) S (s) D(s)

Y (s) T (s) R(s) S (s) D(s) T (s) N (s)


T ( j) 1, Tracking, T ( j) 0, Noise rejection
Dr. Richard H. Mgaya

You might also like