Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Modern Control Design

Digital Controls & Digital Filters


Lecture 27

M.R. Azimi, Professor

Department of Electrical and Computer Engineering


Colorado State University

Spring 2017

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

Algorithms for Finding Gain K-Cont.

Example 2:
Redo the previous example to design a state feedback control with deadbeat response.
In this case, p1 = p2 = 0.
and ρcl (z) = |zI − A + BK| = z 2 = 0 =⇒ all αi0 s = 0.
Then, using Algorithm 2, we have
K = [(α2 − a2 ) (α1 − a1 )] = [−a2 − a1 ] = [−0.16 − 1].
Note that the closed loop state equation (assume r(n) = 0) is
 
0 1
x(n + 1) = (A − BK)x(n) = x(n)
0 0
For an arbitrary IC x(0)
   2
0 1 0 1
x(1) = x(0) and x(2) = x(0) = 0
0 0 0 0
i.e. any non-zero IC can be brought to the origin in 2 steps (two-step deadbeat).

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

Deadbeat Response with Pole Placement

In general, for an N th order system


 
0 1 0 ··· 0
 0 0 1 ··· 0 
 
(A − BK) = N =   ...


 0 0 0 ··· 1 
0 0 0 ··· 0
which is called Nilpotent matrix since N N = O i.e. zero matrix. Eigenvalues of N are
all zero as expected (N -step deadbeat).

Important Remark
As can be seen, using pole placement N step deadbeat can be designed where only
parameter that determines speed is T (sampling period).

Fast settling time =⇒ Very small T =⇒ Large control amplitude control signal
=⇒ Plant saturation =⇒ Nonlinear behavior.

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

State Estimation/Observation -Phase II


Thus far, we have assumed all plant states are measurable. In practice, however, not
all the state variables can be measured.

u(n) : Control signal


y(n) : Output of plant
x̂(n) : Estimate of x(n)

Two Types of Observers


1 Full-Order Observer: None of the state variables are available.
2 Reduced-Order Observer: Some of the state variables need to be estimated while
the others are available.
Condition: Complete State Observability
A system (plant) given by:
x(n + 1) = Ax(n) + Bu(n)
y(n) = Cx(n)
is completely state observable iff any IC x(0) (or any other state) can be completely
determined from knowledge of u(n) and y(n), ∀n ∈ [0, N ].
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

State Estimation/Observation -Cont.


For example, system shown by the following state diagram is not state observable.

Theorem 2:
A system given by state equations above is completely state observable iff the
observability matrix
ON = [C t At C t . . . (AN −1 )t C t ]
is of rank N or det ON 6= 0.
Example:
 Consider state equationswith 
0 1 0 0  
A= 0 0 1  , B= 0  , C= 4 5 1
−6 −11 −6 1

4
−6 6

det O3 = det[C t At C t (A2 )t C t ] = 5 −7 5 = 0 =⇒ Not observable

1 −1 −1
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

State Estimation/Observation-Cont.

If we generate the transfer function,


(z+1)(z+4)
Gp (z) = C(zI − A)−1 B = (z+1)(z+2)(z+3)

i.e. pole-zero cancellation.


Remarks:
1 Necessary and sufficient condition for complete state observability is that
pole-zero cancellation does NOT occur in Gp (z)
2 Again, in digital systems observability is also dependant on T (sampling period)
since
A = eAc T = φc (T )
B = A−1c (A − I)Bc
and it is possible that for some T ,
(Ai )t C t = (Aj )t C t for i, j ∈ [1, N − 1], i 6= j
i.e. ON will be rank deficient.

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

State Estimation/Observation-Cont.
Full-Order Observer Design
Requirements:
1 x̂(n) should be as close as possible to x(n).
2 Speed of state estimation should be much higher than the actual system.

To satisfy goal 1, the dynamic model for the observer should be identical to that of the
plant, i.e.
x̂(n + 1) = Ax̂(n) + Bu(n)
Then the error vector between the true state (not available) and its estimate is
e(n) = x(n) − x̂(n)
which gives the error dynamics
e(n + 1) = Ae(n)
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

State Estimation/Observation -Phase II


Since e(n) = An e(0), to have lim ||e(n)|| = 0
n→∞
all eigenvalues of matrix A must be inside the unit circle which may not be possible or
if they are, the error may not go to zero with an adequate speed.

To meet both goals modify state equations for observer as such:


x̂(n + 1) = Ax̂(n) + Bu(n) + G[ y(n) − C x̂(n) ]
| {z }
Innovation process
or
x̂(n + 1) = (A − GC)x̂(n) + Bu(n) + Gy(n)
Note that C x̂(n) = ŷ(n): Estimate of output based upon x̂(n)
At the same time we can rewrite state equation of the plant as
x(n + 1) = (A − GC)x(n) + Bu(n) + Gy(n)
Subtracting these equations yields the new error dynamics,
e(n + 1) = (A − GC)e(n)
i.e. error dynamics can be controlled by proper design of G (as fast as possible).

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

Algorithms For Observer Design G


Algorithm 1: Direct Approach

1 Check state observability,. If yes, proceed.


2 Choose desired locations of poles of observer q1 , q2 , . . . qN
ρob (z) = (z − q1 )(z − q2 ) . . . (z − qN ) = z N + β1 z N −1 + . . . + βN = 0
3 Also, ρob (z) = |zI − A + GC| = 0
Equate both equations to find elements of G = [g1 g2 . . . gN ]t .
Algorithm 2: Mapping to OCF
Steps 1 and 2 are the same as in Algorithm 1.
3 Find the mapping matrix S that maps the state equations to OCF, i.e.
S = (ON W )t
where ON is the observability matrix, W was defined before, and ai s are the
coefficients of the open loop CE.
4 Then the gain vector G can be found using,
G = S −1 [(βN − aN ) · · · (β1 − a1 )]t
where S −1 is the inverse of the transformation matrix S.
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

Algorithms For Observer Design G-Cont.


Algorithm 3: Ackermann’s Formula
Steps 1 and 2 are the same as in Algorithm 1
3 Use Ackermann’s formula to find G
 
0
 .. 
G = ρob (A)(OtN )−1  . 
 
 0 
1
where ρob (A) = AN + β1 AN −1 + . . . + βN I
Important Remarks:
1 Observer error dynamics must be at least 4-5 times faster than closed loop
system. This guarantees that the error goes to zero before state estimates are
used in the state feedback.
2 In algorithm 2, if the system is already in OCF, there is no need to compute
matrix S (i.e. S = I) and in this case G is simply
G = [(βN − aN ) · · · (β1 − a1 )]t .
Thus, in this case, Algorithm 2 is the simplest method to use.
3 For deadbeat observer design ρob (z) = z N = 0 and hence all βi = 0, ∀i.
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

Algorithms For Observer Design G-Cont.


Example: Consider
 double
 integrator
 2 given
 by:
1 T T /2
x(n + 1) = x(n) + u(n)
0 1 T
y(n) = [1 0]x(n)
where T is the sampling period. Design a full-order observer with deadbeat response.
Algorithm 1:
 
1 1
1 O2 = [C t At C t ] =
0 T
det O2 6= 0 =⇒ Observable
2 Choose p1 = p2 = 0 =⇒ ρob (z) = z 2

z − 1 + g1 −T
3 ρob (z) = |zI − A + GC| = =
g2 z−1
2 2
z + (g1 − 2)z + (1 − g1 + g2 T ) = z
g1 = 2, g2 = T1
 t
G = 2 1/T and
   2   
−1 T T /2 2
x̂(n + 1) = x̂(n) + u(n) + y(n)
−1/T 1 T 1/T

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

Algorithms For Observer Design G-Cont.


Algorithm 2:
z − 1 −T
ρol (z) = |zI − A| = = z 2 − 2z + 1 = 0
0 z−1
Also,    
a1 1 −2 1
W = =
1 0 1 0
Thus,    
−1 T 0 1
S = (ON W )t = and S −1 =
1 0 1/T 1/T
Thus, G is     
0 1 −1 2
G = S −1 [−a2 − a1 ]t = =
1/T 1/T 2 1/T
Algorithm 3:  
0
G = ρob (A)(Ot2 )−1
1
 
1 2T
ρob (A) = A2 =
0 1
   
1 1 t −1 1 0
O2 = and (O2 ) =
0 T − T1 T1
   
0 2
G = ρob (A)(OtN )−1 =
1 1/T
M.R. Azimi Digital Control & Digital Filters
Modern Control Design

Effects of Adding Full-Order observer on Phase I Design

Questions: (1) In Phase I design, we assumed knowledge of the state vector. Does
adding the full-order observer change our Phase I design? (2) In observer design, we
ignored the effect of state feedback. Should that be considered?
The answer to both questions is No because phases I and II are decoupled.

Recall for plant:


x(n + 1) = Ax(n) + Bu(n)
y(n) = Cx(n)
Equation for the control law with observer is
u(n) = r(n) − K x̂(n) = r(n) − K(x(n) − e(n)):
where e(n) = x(n) − x̂(n)
Applying the control law to the plant,
x(n + 1) = Ax(n) + B(r(n) − K(x(n) − e(n))) = (A − BK)x(n) + BKe(n) + Br(n)
On the other hand, the error dynamics (or state equation),
e(n + 1) = (A − GC)e(n)

M.R. Azimi Digital Control & Digital Filters


Modern Control Design

Effects of Adding Full-Order observer on Phase I


Design-Cont.

Now, augmenting the two state equations yields the closed-loop state equations with
the state feedback and observer as,
      
x(n + 1) (A − BK) BK x(n) B
= + r(n)
e(n + 1) 0 (A − GC) e(n) 0
| {z }
  Ã
x(n)
y(n) = [C 0]
e(n)
Therefore, the overall CE of the system is,
ρ(z) = |zI − Ã| = |zI − A + BK| |zI − A + GC|
| {z }| {z }
ρcl (z) ρob (z)

i.e. the closed loop CE of system with full order observer is the product of CEs of the
closed loop system designed in Phase I and that of the observer designed in Phase II
(i.e. Phases I and II are decoupled).

M.R. Azimi Digital Control & Digital Filters

You might also like