Design of Control Systems in State Space

Transcription

Design of Control Systems in State Space
Lectures 16-18
Design of Control Systems
in State Space
Lecture objectives
In these lectures we will learn the following:
How to design a state-feedback controller using pole placement to meet transient
response specifications.
How to design an observer for systems where the states are not available to the
controller.
How to design steady-state error characteristics for systems represented in state
space.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
232
Introduction
• We have seen before how to model and analyze a control system with the concept of
state-space representation. Next we will learn how to design a controller for systems in state
space to meet some specifications.
• Unlike frequency domain methods (root locus technique and frequency response technique),
state-space technique can be applied to a wide class of systems including nonlinear systems and
multi-input multi-output systems.
• The main drawback of frequency domain methods in design is that after designing the location
of the dominant second-order pair of poles, we keep our fingers crossed, hoping that the
higher-order poles do not affect the second-order approximation. Unlike frequency domain
methods, state-space technique allows us to properly place all the poles of the closed-loop
system.
• Finally, there is a wide range of computational support for state-space method. However, the
advantage of computer support are balanced by the loss of graphic insight into a design
problem that the frequency domain methods yield.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
233
Before starting . . .
• An nth-order system in state-space representation
x˙
=
Ax + Bu
y
=
Cx
has its characteristic polynomial as P(s) = det(sI − A) = sn + an−1 sn−1 + . . . + a1 s + a0 , which can be
written in factored form as
P(s) = (s − p1 )(s − p2 ) . . . (s − pn )
where pi are the system poles. To change the location of the poles pi we need to adjust the
parameters ai .
• The transfer function of a system represented in phase-variable form, controller canonical form,
or observer canonical form can be easily identified.
• The system performance of a second-order system can be determined by the location of system
poles via analytic formulae. Assuming that a system can be approximated by a second-order
system, same formulae could be used; Eventually, this second-order approximation should be
justified.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
234
Controller design
Pole placement methodology
Further, we show how to introduce additional parameters (controller gains) into a system (to be
controlled) so that we can control the location of all its poles. An nth-order system has an nth-order
characteristic polynomial of the form
sn + an−1 sn−1 + . . . + a1 s + a0
where the values of the n coefficients ai ’s determine the system’s pole locations. Thus, our mission is
to introduce n adjustable parameters into the system and relate them to coefficients ai ’s so that all
of the closed-loop poles can be set to any desired locations.
Consider a plant represented in state space by
x˙
=
Ax + Bu
y
=
Cx
which is shown pictorially in the figure below.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
235
Controller design
Pole placement methodology
As shown above, instead of feeding back the output y, we feed back all the state variables. If each
state variable is fed back to the control u, though a gain ki , there would be n gains ki ’s that could be
adjusted to yield the required closed-loop pole values. The feedback gains ki ’s can be collected in a
feedback vector K = [k1 k2 . . . kn ].
With the feedback controller u = −Kx + r, the state and output equations for the closed-loop system
become
x˙
=
Ax + Bu = Ax + B(−Kx + r) = (A − BK)x + Br
y
=
Cx
Statement: The design of state-variable feedback for closed-loop pole placement consists of equating
the characteristics equation of a closed-loop system to a desired characteristic equation and then
finding the values of the feedback gains ki ’s.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
236
Controller design
Pole placement methodology
In the figure on the left above, the plant assumed in phase-variable form is represented in signal-flow
graph. The figure on the right shows how the closed-loop system is implemented.
Remark: As will be shown after, the phase-variable form or the controller canonical form yields the
simplest evaluation of the feedback gains ki ’s. If a plant is not represented in phase-variable form or
controller canonical form, the solution for the gains ki ’s can be intricate. It is advisable to transform
the system to either of these forms, design the gains ki ’s, and then transform the system back to its
original representation.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
237
Controller design
Pole placement for plants in phase-variable form
The pole placement methodology for plants in phase-variable form can be achieved by taking the
following steps:
1. Represent the plant in phase-variable form.
2. Feed back each phase variable to the input of the plant through a gain ki .
3. Find the characteristic equation for the closed-loop system represented in step 2.
4. Decide upon all closed-loop pole locations and determine an equivalent characteristic equation.
5. Equate like coefficients of the characteristic equations from steps 3 and 4 and solve for ki ’s.
Now, let us examine these steps. First, the phase-variable



0
1
0
...
0



 0


0
1
...
0





A= .
; B=
.
.
.
.


.
.
.
.
 ..


.
.
.
.



−a0
−a1
−a2
...
−an−1
representation of the plant is given by

0

0 


.  ; C = [c1 c2 . . . cn ]
. 
. 
1
The characteristic polynomial of the plant is by inspection thus
sn + an−1 sn−1 + . . . + a1 s + a0
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
238
Controller design
Pole placement for plants in phase-variable form
Now, we feed back the plant with the feedback control law
u = −Kx + r
where K = [k1 k2 . . . kn ] and ki ’s are the phase variables’ feedback gains. Therefore, the system
matrix for the closed-loop system is


0
1
0
...
0




0
0
1
...
0



A − BK = 
.
.
.
.
.


.
.
.
.
.


.
.
.
.
.


−(a0 + k1 )
−(a1 + k2 )
−(a2 + k3 )
...
−(an−1 + kn )
Since the closed-loop system is also in phase-variable form, the characteristic polynomial of the
closed-loop system can be written by inspection as
det(sI − (A − BK)) = sn + (an−1 + kn )sn−1 + (an−2 + kn−1 )sn−2 + . . . + (a1 + k2 )s + (a0 + k1 )
Notice that, for plants represented in phase-variable form, we can write by inspection the closed-loop
characteristic equation from the open-loop characteristic equation by adding the appropriate ki to
each coefficient.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
239
Controller design
Pole placement for plants in phase-variable form
Now assume that the desired characteristic polynomial for proper pole placement is
sn + dn−1 sn−1 + dn−2 sn−2 + . . . + d1 s + d0
where the di ’s are the desired coefficients. Equating yields
di = ai + ki+1
or
ki+1 = di − ai
i = 0, 1, 2, . . . , n − 1
Interestingly enough, The higher-order closed-loop poles should be selected in order to make a
second-order approximation. For this, we need a priori to know the closed-loop zeros. Since the
closed-loop system is in phase-variable form with the same output coupling matrix C as for the
plant in phase-variable form, the closed-loop zeros are the same as the plant’s zeros.
Let us look at an example.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
240
Controller design
Pole placement for plants in phase-variable form: Example
Problem Given the plant
G(s) =
20(s + 5)
s(s + 1)(s + 4)
design the phase-variable feedback gains to yield 9.5% overshoot and a settling time of 0.74 second.
Solution First, we write the closed-loop system, with the feedback control law
u = −Kx + r = −[k1 k2 k3 ]x + r, in phase-variable form as




0
1
0
0








x˙ =  0
0
1
x + 0 r
−k1 −(4 + k2 ) −(5 + k3 )
1
y
=
[100
20
0]x
whose closed-loop characteristic polynomial is
det(sI − (A − BK)) = s3 + (5 + k3 )s2 + (4 + k2 )s + k1
Now we calculate the desired closed-loop characteristic polynomial. Using the transient response
requirements, the dominant closed-loop poles should be at −5.4 ± j7.2. The third closed-loop pole
can be selected to cancel out the closed-loop zero at -5, which is the same as the open-loop system
zero. However, to demonstrate the effect of the third pole and the design process, including the need
for simulation, let us choose -5.1 as the location of the third closed-loop pole.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
241
Controller design
Pole placement for plants in phase-variable form: Example
Solution (Cont’d) The closed-loop characteristic polynomial must match the desired characteristic
polynomial, which is formed as
(s + 5.4 − j7.2)(s + 5.4 + j7.2)(s + 5.1) = s3 + 15.9s2 + 136.08s + 413.1
Equating the coefficients, we obtain the phase-variables’ feedback gains as
k1 = 413.1; k2 = 132.08; k3 = 10.9
Thus, the state-space representation of the closed-loop system is




0
1
0
0







x˙ = 
x
+
0
0
1


 0 r
−413.1 −136.08 −15.9
1
y
=
[100
20
0]x
whereas the closed-loop transfer function is
T (s)
=
=
20(s + 5)
s3 + 15.9s2 + 136.08s + 413.1
20(s + 5)
20
≈
(s + 5.4 − j7.2)(s + 5.4 + j7.2)(s + 5.1) (s + 5.4 − j7.2)(s + 5.4 + j7.2)
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
242
Controller design
Pole placement for plants in phase-variable form: Example
Solution (Cont’d) Figure below shows a simulation of the closed-loop system with 11.5% overshoot
and a settling time of 0.8 second. A redesign with the third pole canceling the zero at -5 will yield
performance equal to the requirements.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
243
Design via state space
Controllability - - Problem statement - To control the pole location of a closed-loop system, it is implicitly assumed that the control signal
u can effect the behavior of each state variable xi .
Clearly, the state variables of the system in the figure on the left are all effected by the control
signal u, whereas this is not the case for the system of the figure on the right. The state variable x1
of the last system is not effected by the control signal u; if x1 exhibited an unstable response due to
nonzero initial condition, there would be no way to effect a state-variable feedback design to
stabilize x1 . Thus, in some systems, a state-variable feedback design is not possible.
Now, let us make the following statement: If an input to a system can be found that takes every state
variable from a desired initial state to a desired final state in a finite time interval, then the system
is said to be controllable; otherwise, the system is uncontrollable.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
244
Design via state space
Controllability by inspection
Let us evaluate the controllability of a system from the state equation viewpoint. The simplest way
to explore controllability is when the system is in parallel form, with a diagonal system matrix
(eigenvalues are assumed distinct). That was the case for the systems described earlier whose state
equations are








−a1
0
0
1
−a4
0
0
0















(sys1) x˙ =  0
(sys2) x˙ =  0
−a2
0  x +  1  u;
−a5
0 x + 1 
u
0
0
−a3
1
0
0
−a6
1
or
x˙1
=
−a1 x1 + u;
x˙1 = −a4 x1
x˙2
=
−a2 x2 + u;
x˙2 = −a5 x2 + u
x˙3
=
−a3 x3 + u;
x˙3 = −a6 x3 + u
From the state equations above, we see that all the state variables of sys1 are controlled by the
control u, whereas the state variable x1 of sys2 is not controlled by the control u, which makes sys2
uncontrollable.
Conclusion: A system with a diagonal system matrix is controllable if the input coupling matrix B
does not have any rows that are zero.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
245
Design via state space
The controllability matrix
Previous test for controllability can be used only for plants represented in parallel form with
diagonal system matrix. For systems with other representations, the controllability, or the ability of
designing a state-feedback control, can be determined by evaluating the rank of some related
matrix; the controllability matrix. Let us state our definition next.
An nth-order plant whose state equation is
x˙ = Ax + Bu
is controllable if the controllable matrix
CM = [B AB A2 B . . . An−1 B]
is of rank n.
Problem Given the system of figure below, represented by a signal-flow graph, determine its
controllability.
Solution The state equations for the system written from the signal-flow graph is




−1
1
0
0







x˙ = Ax + Bu = 
x
+
−1
0 
 0
 1 u
0
0
−2
1
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
246
Design via state space
The controllability matrix
Solution (Cont’d) The controllability matrix is

0

CM = [B AB A2 B] = 
 1
1
1
−2
−1
1
−2
4




Since the determinant of CM is −1 6= 0, the rank of CM is 3, which is also the system order. We
conclude that the system is controllable.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
247
Alternative approach to controller design
Controller design by transformation
Next we show how to design a state-variable feedback controller for systems that are not represented
in phase-variable form. Actually, many times the physics of the problem requires feedback from
state variables that are not phase variables. The design method consists of transforming the system
to phase-variable form, designing the feedback gains, and transforming the designed system back to
its original state-variable form. This method requires developing the transformation between the
system and its representation in phase-variable form.
Assume a plant not represented in phase-variable form,
z˙
=
Az + Bu
y
=
Cz
whose controllability matrix is
CMz = [B AB A2 B . . . An−1 B]
Assume that the system is transformed to the phase-variable form with the transformation
z = Px
which leads to
Prof. K. Melhem (Qassim University)
x˙
=
P−1 APx + P−1 Bu
y
=
CPx
Applied Control
Academic year 2012-2013
248
Alternative approach to controller design
Controller design by transformation
whose controllability matrix is
CMx
=
[P−1 B (P−1 AP)(P−1 B) (P−1 AP)2 (P−1 B) . . . (P−1 AP)n−1 (P−1 B)]
=
P−1 [B AB A2 B . . . An−1 B] = P−1CMz
Solving for P, we obtain
−1
P = CMzCMx
Thus, P can be found from the two controllability matrices. After transforming the system in
phase-variable form, we design the feedback gains as done previously, considering the control signal
u = −Kx x + r. Hence, the closed-loop system is
x˙
=
P−1 APx − P−1 BKx x + P−1 Br = (P−1 AP − P−1 BKx )x + P−1 Br
y = CPx
Using x = P−1 z, we transform the system back to the original form as
z˙
=
Az − BKx P−1 z + Br = (A − BKx P−1 )z + Br
y = Cz
which gives the state-variable feedback gain Kz for the original system as
Kz = Kx P−1
The design is completed by observing that the transfer function of this closed-loop system is the
same as the transfer function when the phase-variable form is considered.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
249
Alternative approach to controller design
Controller design by transformation: Example
Problem Design a state-variable feedback controller to yield a 20.8% overshoot and a settling time of
4 seconds for a plant
s+4
G(s) =
(s + 1)(s + 2)(s + 5)
that is represented in cascade form as shown in the figure below.
Solution The state equations from the signal-flow graph is

−5
1
0

z˙ = Az z + Bz u = 
−2
1
 0
0
0
−1
y
=



0



z+ 0 u



1
Cz z = [−1 1 0]z
from which the controllability matrix is evaluated as
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
250
Alternative approach to controller design
Controller design by transformation: Example
Solution (Cont’d)

0

CMz = [Bz Az Bz A2z Bz ] = 
 0
1
0
1
−1
1


−3 

1
Since the determinant of CMz is −1 6= 0, the system is controllable.
We now convert the plant to the phase-variable form using the numerator and denominator’s
coefficients of the transfer function to yield




0
1
0
0







x˙ = Ax x + Bx u =  0
0
1 x + 0 
u
−10 −17 −8
1
y
=
[4
1
0]x
The controllability matrix of the plant in phase-variable form is

0
0

CMx = [Bx Ax Bx A2x Bx ] = 
1
 0
1 −8
Prof. K. Melhem (Qassim University)
Applied Control
evaluated as

1

−8 

47
Academic year 2012-2013
251
Alternative approach to controller design
Controller design by transformation: Example
Solution (Cont’d) We can now calculate the transformation matrix between the plant’s state-space
forms as


1
0 0


−1

P = CMzCMx =  5
1 0 

10 7 1
We now design the controller using the phase-variable form. For a 20.8% overshoot and a settling
time of 4 seconds, a factor of the desired characteristic equation of the closed-loop system is
s2 + 2s + 5. Since there is a closed-loop zero at s = −4, we choose the third closed-loop pole to cancel
the closed-loop zero. Hence, the desired closed-loop characteristic polynomial is
(s + 4)(s2 + 2s + 5) = s3 + 6s2 + 13s + 20
The system in phase-variable form with state-variable feedback controller is given as



0
1
0
0



x + 0
x˙ = (Ax − Bx Kx )x + Bx r = 
0
0
1



−(10 + k1x ) −(17 + k2x ) −(8 + k3x )
1
y
=


r

[4 1 0]x
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
252
Alternative approach to controller design
Controller design by transformation: Example
Solution (Cont’d) whose closed-loop characteristic polynomial is
det(sI − (Ax − Bx Kx )) = s3 + (8 + k3x )s2 + (17 + k2x )s + (10 + k1x )
By equating, we obtain the phase-variables’ feedback gains as
Kx = [k1x k2x k3x ] = [10 − 4 − 2]
which gives the cascade feedback gains Kz as
Kz = Kx P−1 = [−20 10 − 2]
Let us now verify our design. The state equations for the designed system are




0
−5
1
0







z˙ = (Az − Bz Kz )z + Bz r =  0
−2
1 z+ 0 
r
1
20 −10 1
y
=
Cz z = [−1 1 0]z
Using T (s) = Y (s)/R(s) = C(sI − A)−1 B + D, the closed-loop transfer function is
T (s) =
s+4
s+4
1
=
=
s3 + 6s2 + 13s + 20
(s + 4)(s2 + 2s + 5)
s2 + 2s + 5
Thus, requirements for our design have been met.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
253
Observer design
Problem statement and solution
Statement: Controller design with
u = −Kx + r
is only possible when the state variables are available from measurements.
Hardware are used to provide these state variables. For example, gyros can be used to measure
position and velocity on a space vehicle while thermocouple can be used to measure temperature, in
the form of electricity.
Difficulties: Sometimes, it is impractical to use these hardware for reasons of cost, accuracy, or
availability.
Alternate solution: We estimate the state variables through an estimator (or an observer). Estimated
states, rather than actual states, are now fed back to the controller as shown in figures hereafter.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
254
Observer design
Problem statement and solution
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
255
Observer design
Problem statement and solution
One scheme of an observer is as shown in the figure on the left. Let us look at the disadvantage of
this topology. Assuming a plant,
x˙
=
Ax + Bu
y
=
Cx
x˙ˆ
=
Axˆ + Bu
yˆ
=
Cxˆ
this topology suggests an observer of the form
Here the observer is a model of the plant. We aim to build an observer such that the estimated
state vector xˆ approaches the actual state vector x in a finite interval of time. Suppose that a control
u = −K xˆ + r is applied, in which the estimated state vector xˆ is used in place of the unmeasured
actual state vector x. The plant dynamics in closed loop with u becomes
x˙
=
(A − BK)x + BK(x − x)
ˆ + Br
y
=
Cx
whereas the observer dynamics becomes
Prof. K. Melhem (Qassim University)
x˙ˆ
=
(A − BK)xˆ + Br
yˆ
=
Cxˆ
Applied Control
Academic year 2012-2013
256
Observer design
Problem statement and solution
For analysis convenience, we find the error dynamics of the observer as,
x˙ − x˙ˆ
=
A(x − x)
ˆ
y − yˆ
=
C(x − x)
ˆ
which is unforced. Thus, observer can be designed separately from the controller design.
Two remarks are in order:
• If the plant is unstable (i.e., A is not Hurwitz), the observation error x − xˆ grows without bound;
actual state is not reachable by the observer.
• If the plant is stable (i.e., A is Hurwitz), with normal differences in initial state vectors, the
observation error x − xˆ approaches zero. However, the speed of convergence determined by the
eigenvalues of A cannot be made fast and thus plant output y cannot be approximated by
observer output y,
ˆ which is to be controlled to follow the reference input r as required by
specifications.
We should find a way to speed up the observer and make its response fast. This gives rise to the
second topology, as shown previously in the figure on the right.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
257
Observer design
Problem statement and solution
In the second topology, the speed of convergence for the observer can be increased by feeding back
to the observer the outputs of the plant and observer. Now, we can design a transient response for
the observer which is much faster than that of the plant. With this topology, the state and output
equations for the observer are given by
x˙ˆ
=
Axˆ + Bu + L(y − y)
ˆ
yˆ
=
Cxˆ
Here, the observer is a plant based model. The error dynamics of the observer is thus,
x˙ − x˙ˆ
=
A(x − x)
ˆ − L(y − y)
ˆ
y − yˆ
=
C(x − x)
ˆ
Substituting the output equation into the state equation and letting ex = x − x,
ˆ we have
e˙x
=
(A − LC)ex
y − yˆ
=
Cex
Now, the observer design consists of finding the gain vector L in order to place the eigenvalues of
A − LC in the right location of the s plane to yield stability and a desired transient response, which is
to be faster than that of the controlled plant.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
258
Observer design
Problem statement and solution
Next, we give some insight about the last development. The plant dynamics with a feedback
controller u = −K xˆ + r is
x˙
=
(A − BK)x + BKe + Br
y
=
Cx
Thus the feedback-controlled plant augmented by the suggested observer error dynamics is




 

x˙
A − BK
BK
x
B

 = 

+
r
e˙x
0
A − LC
ex
0


h
i
x

y =
C 0 
ex
from which we get the following conclusion:
• The poles of the augmented system are those of A − BK and those of A − LC; If we choose the
poles of A − LC faster than those of A − BK, the dynamic characteristics of the augmented
system will thus be determined only from the poles of A − BK.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
259
Observer design
Problem statement and solution
• The zeros of the augmented system are those of (A − BK, B,C), which are in turn the zeros of the
open-loop plant (A, B,C). In designing the controller gain vector K, we should choose the
higher-order poles in order to cancel out the possible open-loop plant zeros. This will result in
achieving our control objective that output y follows reference input r with the required
specifications.
• Based on the above discussion, we state that observer can be designed separately from
controller design. This makes linear control much easier than nonlinear control.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
260
Observer design
Observer design for plants in observer canonical form
Let us now clarify our observer design assuming the plant in the observer canonical form. Like the
controller design for which phase-variable form or controller canonical form yields the easiest
solution for the controller gains, in designing an observer, it is the observer canonical form that
yields the easiest solution for the observer gains.
Now, let us demonstrate the design procedure for
canonical form. We first evaluate A − LC,

−an−1 1 0 0

 −a
0 1 0
n−2


.
. . .

.
. . .
A − LC = 
.
. . .


 −a1
0 0 0

−a0
0 0 0

−(an−1 + l1 ) 1 0

 −(a
0 1
n−2 + l2 )


. .
.

. .
.
= 
. .
.


 −(a1 + ln−1 ) 0 0

−(a0 + ln )
0 0
Prof. K. Melhem (Qassim University)
an nth-order plant represented in observer
...
...
.
.
.
...
...
0
0
.
.
.
0
0
0


l1
 

0 
  l2
 
.   .
. − .
.   .
 

1 
  ln−1
ln
0

... 0

... 0 


. 
.
. 
.
. 
.

... 1 

... 0
Applied Control






 [1 0 0 0 . . . 0]




Academic year 2012-2013
261
Observer design
Observer design for plants in observer canonical form
The characteristic polynomial for A − LC is
sn + (an−1 + l1 )sn−1 + (an−2 + l2 )sn−2 + · · · + (a1 + ln−1 )s + (a0 + ln ) = 0
which can be found by inspection if the plant is represented in observer canonical form.
Now, we assume the desired closed-loop observer characteristic polynomial be
sn + dn−1 sn−1 + dn−2 sn−2 + · · · + d1 s + d0 = 0
Equating coefficients and solving for the observer gains li ’s yield
li = dn−i − an−i
i = 1, 2, . . . , n
Let us take an example demonstrating the design of an observer using the observer canonical form.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
262
Observer design
Observer design for plants in observer canonical form
Problem Design an observer for the plant
G(s) =
s+4
s+4
= 3
(s + 1)(s + 2)(s + 5) s + 8s2 + 17s + 10
which is represented in observer canonical form. The observer will respond 10 times faster than the
controlled loop designed in the previous example.
Solution The state and output equations of the observer for the plant in observer canonical form are






−8 1 0
0
l1











˙xˆ = Axˆ + Bu + L(y − y)
ˆ =  −17 0 1  xˆ +  1  u +  l2 
ˆ
 (y − y)
−10 0 0
4
l3
yˆ
=
Cxˆ = [1 0 0]xˆ
While the observer error dynamics is

e˙x
y − yˆ
=
=
Prof. K. Melhem (Qassim University)
−(8 + l1 )

(A − LC)ex = 
 −(17 + l2 )
−(10 + l3 )

1
0
0

1 
 ex
0
0
Cex = [1 0 0]ex
Applied Control
Academic year 2012-2013
263
Observer design
Observer design for plants in observer canonical form
From which, we obtain (by inspection) the closed-loop observer characteristic polynomial as
s3 + (8 + l1 )s2 + (17 + l2 )s + (10 + l3 )
Now, we evaluate the desired characteristic polynomial. First, the closed-loop controlled system of
the previous example has dominant second-order poles at −1 ± j2. To make our observer 10 times
faster (with the same percent overshoot), we select the observer dominant closed-loop poles at
−10 ± j20. We then select the third pole to be 10 times the real part of the dominant second-order
poles, or -100. Hence, the desired observer characteristic polynomial is
(s + 100)(s2 + 20s + 500) = s3 + 120s2 + 2500s + 50, 000
Now, equating the coefficients, we find the observer gains li ’s as
l1 = 112; l2 = 2483; l3 = 49, 990
A simulation of the observer with an input of r(t) = 100t is shown in the following figures. The initial
conditions of the plant were all zero, and the initial conditions of xˆ1 were 0.5. Since the dominant
poles of the observer are set at −10 ± j20, the expected settling time should be about 0.4 second. It
is interesting to note the slower response in the figure at the bottom, where the observer gains are
disconnected and the observer is simply a copy of the plant with a different initial condition.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
264
Observer design
Observer design for plants in observer canonical form
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
265
Observer design
Observability - - Problem statement - A requirement for the design of an observer is the ability to deduce the state variables from a
knowledge of the input u(t) and the output y(t). This is called observability. If any state variable has
no effect upon the output, then we cannot evaluate this state variable by observing the output.
Let us give an exact definition of observability:
If the initial state vector x(t0 ) can be found from u(t) and y(t) measured over a finite interval of time
from t0 , the system is said to be observable; otherwise, the system is said to be unobservable.
Next we use the above definition to check observability of systems represented in parallel form with
distinct eigenvalues.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
266
Observer design
Observability by inspection
The output equation for the diagonalized system of the figure on the left is
y = Cx = [1 1 1]x
while the output equation for the diagonalized system of the figure on the right is
y = Cx = [0 1 1]x
Clearly, the first system is observable, since each state variable can be observed at the output.
While, the system 2 is unobservable, since x1 is not connected to the output and cannot be
estimated from a measurement of the output.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
267
Observer design
The observability matrix
For systems not represented in parallel form with distinct eigenvalues, observability can be better
checked by evaluated the rank of a matrix.
An nth-order plant whose state and output equations are, respectively,
x˙
=
Ax + Bu
y
=
Cx
is observable if the so-called observability matrix




OM = 



C
CA
.
.
.
CAn−1








is of rank n.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
268
Observer design
Observability via the observability matrix
Problem Determine whether the system of figure below is observable.
Solution The state and output equations for the system is




0
0
1
0







x
+
x˙ = Ax + Bu = 
0
1 
 0  u;
 0
1
−4 −3 −2
Thus, the observability matrix OM is



0
C
 

 
OM = 
 CA  =  −4
−12
CA2
5
y = Cx = [0 5 1]x

1
−3
3
−13
−9



Since the determinant of OM is −344 6= 0, OM is of rank 3 and the system is observable.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
269
Observer design
Observability via the observability matrix
Problem Determine whether the system of figure below is observable.
Solution The state and output equations for the system is




0
0
1
 u;
x +
x˙ = Ax + Bu = 
1
−5 −21/4
y = Cx = [5 4]x
Thus, the observability matrix OM is

OM = 
C
CA


=
5
−20
4
−16


Since the determinant of OM is 0, OM is not of full rank and the system is unobservable.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
270
Observer design
Observer design by transformation
Next we design observers for systems not represented in observer canonical form. One method is to
transform the plant to observer canonical form so that the design equations are simple, then
perform the design in observer canonical form, and finally transform the design back to the original
representation. For this, we need to find the transformation between the original system
representation and its representation in observer canonical form.
Assume a plant not represented in observer canonical form,
z˙
=
Az + Bu
y
=
Cz
whose observability matrix is

C

 CA


 CA2

OMz = 
.

..



n−2
 CA
CAn−1
Prof. K. Melhem (Qassim University)













Applied Control
Academic year 2012-2013
271
Observer design
Observer design by transformation
Now, assume a transformation z = Px so that the system can be written in observer canonical form as
x˙
=
P−1 APx + P−1 Bu
y
=
CPx
whose observability matrix is






OMx = 





CP
CP(P−1 AP)
CP(P−1 AP)2
.
.
.
CP(P−1 AP)n−1

 
 
 
 
 
=
 
 
 
 
C
CA
CA2
.
.
.
CAn−1






 P = OMz P




Solving for P, we obtain
P = O−1
Mz OMx
Thus, the transformation matrix P can be found from the two observability matrices.
After transforming the plant to observer canonical form, we design the observer gain vector Lx , as
done previously. The observer error dynamics is
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
272
Observer design
Observer design by transformation
e˙x
=
(P−1 AP − LxCP)ex
y − yˆ
=
CPex
Since x = P−1 z and xˆ = P−1 zˆ, we have ex = x − xˆ = P−1 ez . Thus, the observer error dynamics for the
system in its original representation is
e˙z
=
(A − PLxC)ez
y − yˆ
=
Cez
which gives the observer gain vector Lz as
Lz = PLx
Next we take an example demonstrating the design of an observer for a plant not represented in
observer canonical form.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
273
Observer design
Observer design by transformation
Problem Design an observer for the plant
G(s) =
1
1
= 3
(s + 1)(s + 2)(s + 5) s + 8s2 + 17s + 10
represented in cascade form. The closed-loop performance of the observer is governed by the
characteristic polynomial s3 + 120s2 + 2500s + 50, 000.
Solution First represent the plant in its original cascade form




0
−5
1
0







z˙ = Az + Bu =  0
−2
1 z+ 0 
u
1
0
0
−1
y
=
Cz = [1 0 0]z
The observability matrix OMz is



1
C
 

 
OMz = 
 CA  =  −5
25
CA2

0
0
1

0 

1
−7
whose determinant is 1 6= 0. Hence, the plant is observable.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
274
Observer design
Observer design by transformation
Solution (Cont’d) Use the numerator and denominator’s coefficients of the transfer function to form
the observer canonical form as




0
−8 1 0







x
+
x˙ = Ax x + Bx u = 
 0 u
 −17 0 1 
1
−10 0 0
y
=
Cx x = [1 0 0]x
whose the observability matrix is



Cx
1

 
 
OMx = 
 Cx Ax  =  −8
Cx A2x
47

0
0
1

0 

1
−8
We now design the observer for the observer canonical form. First, we form Ax − LxCx ,
 




−8
1 0
l1
−(8 + l1 ) 1 0
 









Ax − LxCx = 
−
[1
0
0]
=
 −17 0 1   l2 
 −(17 + l2 ) 0 1 
−10 0 0
l3
−(10 + l3 ) 0 0
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
275
Observer design
Observer design by transformation
Solution (Cont’d) whose characteristic polynomial is
det[sI − (Ax − LxCx )] = s3 + (8 + l1 )s2 + (17 + l2 )s + (10 + l3 )
Equating to the desired closed-loop observer characteristic polynomial, we get the observer gain
vector Lx as


112



Lx =  2483 

49, 990
Now transform the design back to the original representation

1
0


P = O−1
1
Mz OMx =  −3
1
−1
by using the transformation matrix P,

0

0 

1
Transforming Lx to the original representation, we obtain the observer gain vector Lz as


112



Lz = PLx =  2147 

47, 619
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
276
Observer design
Observer design by transformation
Solution (Cont’d) A simulation of the observer is shown below. The second figure shows the reduced
speed if the observer is simply a copy of the plant and the observer feedback paths are disconnected.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
277
Steady-state error design via integral control
Next we show how to design state-variable feedback controller for systems represented in state space
for improving steady-state error as well as transient response performance.
Methodology We add a unity-feedback path to form the error e, which is fed forward to the controlled
plant via an integrator. The integrator will increase the system type and reduce the previous finite
error to zero. A new state variable xN , at the output of the integrator, is defined such that
x˙N = r −Cx
The new state equations, with augmented dynamics, are
Prof. K. Melhem (Qassim University)
x˙
=
Ax + Bu
x˙N
=
−Cx + r
y
=
Cx
Applied Control
Academic year 2012-2013
278
Steady-state error design via integral control
In matrix form,


x˙
x˙N


=


=
y
A
0
−C

0

[C

0] 
x
xN



B
+

u+
0
0
1

r

x

xN
But the state-variable feedback controller is
u = −Kx + Ke xN = −[K
Thus, the closed-loop system is


x˙


x˙N
y
=

A − BK
=
[C
−C


0] 
BKe
x
xN
0


− Ke ] 


x
xN
x
xN




+
0
1

r

Thus, the system type has been increased and we can use the closed-loop characteristic equation to
design K and Ke , via the pole placement technique, to yield the desired transient response.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
279
Steady-state error design via integral control
Design of integral control: Exercise
Problem Consider the plant given by the following state-space representation




0
1
0
x +
u
x˙ = 
−3 −5
1
y
=
[1
0]x
a. Design a controller without integral control to yield a 10% overshoot and a settling time of 0.5
second. Evaluate the steady-state error for a unit-step input.
b. Repeat the design of (a) using integral control. Evaluate the steady-state error for a unit-step
input.
Solution
a. Using the requirements for settling time and percent overshoot, we find the desired characteristic
equation as
s2 + 16s + 183.1
Since the plant is represented in phase-variable form, the characteristic polynomial for the plant
with state-variable feedback is
s2 + (5 + k2 )s + (3 + k1 )
Equating the coefficients, we get
K = [k1 k2 ] = [180.1 11]
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
280
Steady-state error design via integral control
Design of integral control: Exercise
Thus, the plant with the designed state-variable feedback controller becomes




0
1
0
x +
r
x˙ = (A − BK)x + Br = 
−183.1 −16
1
y
=
Cx = [1 0]x
We now calculate the steady-state error for a unit-step input as

−1 

0
1
0
 
 = 0.995
e(∞) = 1 +C(A − BK)−1 B = 1 + [1 0] 
−183.1 −16
1
b. We now represent the plant with an integral control based state-variable feedback as
 

 



 

 


x1
0
0
1
x˙1
0
x
0
−
 [k1 k2 ] 
 Ke   1  


 


 x˙2  = 
  x2  +  0  r; y = [1 0 0]  x2
−3 −5
1
1




 


xN
1
x˙N
xN
−[1 0]
0



 




x˙1
x1
0
1
0
0
x1



 




 x˙2  =  −(3 + k1 ) −(5 + k2 ) Ke   x2  +  0  r; y = [1 0 0]  x2 



 




x˙N
xN
−1
0
0
1
xN
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
281




Steady-state error design via integral control
Design of integral control: Exercise
whose characteristic polynomial is

A − BK
sI − 
−C

BKe  = s3 + (5 + k2 )s2 + (3 + k1 )s + Ke
0
Since the plant has no zeros, the integral-controlled plant is so. Therefore, we choose the third
closed-loop pole at -100, which is greater five times than the real part of the desired dominant
second-order poles (−8 ± j10.9133). Thus, the desired third-order closed-loop characteristic
polynomial is
(s + 100)(s2 + 16s + 183.1) = s3 + 116s2 + 1783.1s + 18, 310
Equating the coefficients, we obtain the controller gains as
Prof. K. Melhem (Qassim University)
k1
=
1780.1
k2
=
111
Ke
=
18, 310
Applied Control
Academic year 2012-2013
282
Steady-state error design via integral control
Design of integral control: Exercise
The closed-loop plant with the designed integral control becomes




x˙1
x1
0
1
0




 x˙2  =  −1783.1 −116 18, 310   x2




x˙N
−1
0
0
xN


x1



y = [1 0 0]  x2 

xN


0

 

+ 0 r
 

1
In order to check our design, we find the closed-loop transfer function as
T (s) =
18, 310
18, 310
=
s3 + 116s2 + 1783.1s + 18, 310
(s + 100)(s2 + 16s + 183.1)
Since the transfer function matches our design, we have the desired transient response. Now, we
evaluate the steady-state error for a unit-step input as

−1 

0
0
1
0

 




e(∞) = 1 + [1 0 0]  −1783.1 −116 18, 310   0 
=0
1
−1
0
0
Thus, the system behaves like a Type 1 system.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
283
Antenna control: Design of controller and observer
Problem Using the simplified block diagram of the plant for the antenna azimuth position control
system shown in the figure below, design a controller to yield a 10% overshoot and a settling time of
1 second. Place the third pole 10 times as far from the imaginary axis as the second-order dominant
pair.
Assume that the state variables of the plant are not accessible and design an observer to estimate
the states. The desired transient response for the observer is a 10% overshoot and a natural
frequency 10 times as great as the system response above. As in the case of the controller, place the
third pole 10 times as far from the imaginary axis as the observer’s dominant second-order pair.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
284
Antenna control: Design of controller and observer
Solution: The general configuration of the control system is shown in the subsequent figure.
Controller design We first design the controller by finding the desired characteristic equation. A 10%
overshoot and a settling time of 1 second yield ζ = 0.591 and ωn = 6.77. Thus, the dominant
closed-loop poles are set at −4 ± j5.46. The third pole will be 10 times as far from the imaginary
axis, or at -40. Hence, the desired closed-loop characteristic equation is
(s + 4 + j5.46)(s + 4 − j5.46)(s + 40) = s3 + 48s2 + 365.8s + 1832 = 0
The transfer function of the plant is
G(s) =
1325
1325
= 3
s(s + 1.71)(s + 100) s + 101.71s2 + 171s
From this, the state equations of the plant in phase-variable form are




0
1
0
0







x˙ = 
x
+
0
1
 0
 0  u = Ax + Bu

0 −171 −101.71
1
y
=
[1325
Prof. K. Melhem (Qassim University)
0
0]x = Cx
Applied Control
Academic year 2012-2013
285
Antenna control: Design of controller and observer
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
286
Antenna control: Design of controller and observer
Controller design (Cont’d) We now pause in our design to evaluate the controllability of the plant.
The controllability matrix CM is


0
0
1


2

CM = [B AB A B] =  0
1
−101.71 

1 −101.71 10, 173.92
The determinant of CM is −1 6= 0; thus, the plant is controllable.
Continuing with the design of the controller, the system matrix of the plant with state-variable
feedback controller is


0
1
0




A − BK =  0
0
1

−k1 −(171 + k2 ) −(101.71 + k3 )
Thus, the closed-loop system’s characteristic equation is simply given by inspection as
det[sI − (A − BK)] = s3 + (101.71 + k3 )s2 + (171 + k2 )s + k1 = 0
Matching coefficients, we get the controller gains ki ’s as
Prof. K. Melhem (Qassim University)
k1
=
1832
k2
=
194.8
k3
=
−53.71
Applied Control
Academic year 2012-2013
287
Antenna control: Design of controller and observer
Observer design Before starting the design
observability matrix OM is

C

OM = 
 CA
CA2
of the observer, we test the plant for observability. The


 
=
 
1325
0

0
0
1325
0
0
0
1325



The determinant of OM is 1325 6= 0. Thus, OM is of rank 3, and the plant is observable.
We now proceed to design the observer. Since the order of the system is not high, we will design the
observer directly without first converting observer canonical form. We first form the observer error
dynamics’ system matrix A − LC as


−1325l1
1
0



A − LC = 
0
1

 −1325l2
−1325l3 −171 −101.71
Thus, the observer closed-loop characteristic equation is
det[λI −(A−LC)] = λ3 +(1325l1 +101.71)λ2 +(134, 800l1 +1325l2 +171)λ+(226, 600l1 +134, 800l2 +1325l3 ) = 0
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
288
Antenna control: Design of controller and observer
Observer design (Cont’d) We now determine the desired observer closed-loop characteristic equation
from the requirements. The dominant closed-loop poles of the observer are to be placed to yield
10% overshoot and a natural frequency 10 times that of the system’s dominant pair of poles. Thus,
the observer’s dominant poles yield s2 + 2 × 0.591 × 67.7s + 67.72 = s2 + 80s + 4583. Since the real part
of these poles is -40, the third pole is then placed 10 times farther from the imaginary axis at -400.
Thus, the desired characteristic equation for the observer is
(s2 + 80s + 4583)(s + 400) = s3 + 480s2 + 36, 580s + 1, 833, 000 = 0
Matching coefficients, we solve for the observer gains li ’s to yield:
l1
=
0.286
l2
=
−1.57
l3
=
1494
Figure below shows the complete design with the controller and the observer.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
289
Antenna control: Design of controller and observer
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
290
Antenna control: Design of controller and observer
Figure on the left below shows the impulse response of the closed-loop system without any
difference between the plant and its modeling as an observer. The figure on the right shows the
impulse response of the plant and observer with different initial conditions.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
291
Suggested problems
Students are suggested to solve the following problems from the book of [Control
Systems Engineering by N. Nise, Chapter 12]:
4, 6, 10, 11, 14, 19, 22, 30
Students are encouraged to solve the assigned problems by hand before seeking help
from classmates or the teacher. Subsequently, the accompanying solutions can be
checked for confirmation.
Prof. K. Melhem (Qassim University)
Applied Control
Academic year 2012-2013
292