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

EPE3302

State Space Analysis and Control


in Power Engineering
Dr. Khalid ABIDI
Objectives
The objective of this lecture are as follows:
• Extend the Pole Placement approach to multi-input systems
• Design of Servo Type Control Systems
• Design of State Observers
Introduction
So far we have learned the Pole Placement approach for SISO (single-input
single-output) systems. As it will be seen in todays lecture, the approach is
also applicable to MIMO (multiple-input multiple-output) systems except
with a some differences.
In addition to regulation the servo control and reference tracking problem
is also important for control engineers. In many instances it is necessary to
design a controller that will allow a system to either hit a certain stationary
point or track a moving target.
Pole Placement: MIMO
Example:
0 1 0 0 0
𝐱𝐱̇ 𝑡𝑡 = 0 0 1 𝐱𝐱 𝑡𝑡 + 1 0 𝐮𝐮(𝑡𝑡)
2 3 4 0 1
Compute the state feedback gain 𝐾𝐾 such that the control input
𝐮𝐮 𝑡𝑡 = −𝐾𝐾𝐱𝐱(𝑡𝑡)
places the closed-loop eigenvalues at the locations 𝜇𝜇1 = −1, 𝜇𝜇2 = −2 and
𝜇𝜇3 = −3.
Pole Placement: Direct Substitution
Solution:
The system
0 1 0 0 0
𝐱𝐱̇ 𝑡𝑡 = 0 0 1 𝐱𝐱 𝑡𝑡 + 1 0 𝐮𝐮(𝑡𝑡)
2 3 4 0 1
is a MIMO system and controllable canonical form is not defined for MIMO
systems. Therefore, we must first make sure that the system is completely
state controllable by computing the controllability matrix
0 0 1 0 0 1 0 0 1
𝑊𝑊c = 𝐵𝐵 | 𝐴𝐴𝐴𝐴 | 𝐴𝐴2 𝐵𝐵 = 1 0 0 1 3 4 → 1 0 0 = 1 → rank 𝑊𝑊c = 3
0 1 3 4 14 19 0 1 3
Therefore, the system is controllable and we can proceed with the
controller design.
Pole Placement: Direct Substitution
The desired eigenvalues (poles) are 𝜇𝜇1 = −1 and 𝜇𝜇2 = −2, therefore, the
desired characteristic polynomial is given as
𝜙𝜙 𝜆𝜆 = 𝜆𝜆 + 1 𝜆𝜆 + 2 𝜆𝜆 + 3 = 𝜆𝜆3 + 6𝜆𝜆2 + 11𝜆𝜆 + 6
and
1 0 0 0 1 0 0 0
𝜆𝜆𝜆𝜆 − 𝐴𝐴 − 𝐵𝐵𝐵𝐵 = 𝜆𝜆 0 1 0 − 0 0 1 + 1 0 𝐾𝐾
0 0 1 2 3 4 0 1
1 0 0 0 1 0 0 0 𝑘𝑘
11 𝑘𝑘12 𝑘𝑘13
= 𝜆𝜆 0 1 0 − 0 0 1 + 1 0
𝑘𝑘21 𝑘𝑘22 𝑘𝑘23
0 0 1 2 3 4 0 1
𝜆𝜆 −1 0
= 𝑘𝑘11 𝜆𝜆 + 𝑘𝑘12 𝑘𝑘13 − 1 = 𝜆𝜆3 + 𝑘𝑘12 + 𝑘𝑘23 − 4 𝜆𝜆2 + (𝑘𝑘12 𝑘𝑘23 − 4𝑘𝑘12 − 𝑘𝑘13 𝑘𝑘22 +
𝑘𝑘21 − 2 𝑘𝑘22 − 3 𝜆𝜆 + 𝑘𝑘23 − 4
3𝑘𝑘13 + 𝑘𝑘11 + 𝑘𝑘22 − 3)𝜆𝜆 + (𝑘𝑘11 𝑘𝑘23 − 4𝑘𝑘11 − 𝑘𝑘13 𝑘𝑘21 +
𝑘𝑘21 + 𝑘𝑘13 − 2)
Pole Placement: Direct Substitution
If we compare the coefficients then we have three equations:
𝑘𝑘12 + 𝑘𝑘23 − 4 = 6
𝑘𝑘12 𝑘𝑘23 − 4𝑘𝑘12 − 𝑘𝑘13 𝑘𝑘22 + 3𝑘𝑘13 + 𝑘𝑘11 + 𝑘𝑘22 − 3 = 11
𝑘𝑘11 𝑘𝑘23 − 4𝑘𝑘11 − 𝑘𝑘13 𝑘𝑘21 + 𝑘𝑘21 + 𝑘𝑘13 − 2 = 6
Note that we have 6 unknowns but only 3 equations. So this gives us the
liberty to choose the values of 3 of the unknowns and calculate the
remaining 3. Let 𝑘𝑘23 = 𝑘𝑘13 = 𝑘𝑘11 = 0 then we have
𝑘𝑘12 − 4 = 6
−4𝑘𝑘12 + 𝑘𝑘22 − 3 = 11
𝑘𝑘21 − 2 = 6
0 10 0
𝐾𝐾 =
8 54 0
Pole Placement: Servo Control
As was mentioned before, servo control is an important problem for control
engineers. In many instances it is necessary to design a controller that will
allow a system to hit a certain stationary point, i.e. a robotic arm moving
objects from one point to another.
In servo control, an additional term is added to the regulation controller.
This term is used to achieve servo control while the regulation controller is
designed as shown in previously.
Pole Placement: Servo Control
Consider the State Controllable State Space system given as
𝐱𝐱̇ 𝑡𝑡 = 𝐴𝐴𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐮𝐮 𝑡𝑡
𝐲𝐲(𝑡𝑡) = 𝐶𝐶𝐱𝐱(𝑡𝑡)
Let the control input be selected such that
𝐮𝐮 𝑡𝑡 = −𝐾𝐾𝐱𝐱 𝑡𝑡 + 𝐾𝐾r 𝐫𝐫
where 𝐾𝐾r is a 𝑚𝑚 × 𝑝𝑝 matrix. Substitution of this control input into the State
Space system, it is obtained that
𝐱𝐱̇ 𝑡𝑡 = 𝐴𝐴𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐮𝐮 𝑡𝑡
= 𝐴𝐴𝐱𝐱 𝑡𝑡 − 𝐵𝐵𝐵𝐵𝐱𝐱(𝑡𝑡)
= 𝐴𝐴 − 𝐵𝐵𝐵𝐵 𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐾𝐾r 𝐫𝐫
Pole Placement: Servo Control
Let 𝐴𝐴m = 𝐴𝐴 − 𝐵𝐵𝐵𝐵 then the closed-loop system is given as
𝐱𝐱̇ 𝑡𝑡 = 𝐴𝐴m 𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐾𝐾r 𝐫𝐫
𝐲𝐲(𝑡𝑡) = 𝐶𝐶𝐱𝐱(𝑡𝑡)
Since our goal is to have 𝐲𝐲(𝑡𝑡) = 𝐫𝐫 at steady state we will use Laplace
Transform and apply the Final value theorem as follows
−1 1
ℒ 𝐱𝐱̇ 𝑡𝑡 = 𝐴𝐴m 𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐾𝐾r 𝐫𝐫 → 𝑿𝑿 𝑠𝑠 = 𝑠𝑠𝑠𝑠 − 𝐴𝐴m 𝐵𝐵𝐾𝐾r 𝐫𝐫 �
𝑠𝑠
−1 1
→ 𝒀𝒀(𝑠𝑠) = 𝐶𝐶 𝑠𝑠𝑠𝑠 − 𝐴𝐴m 𝐵𝐵𝐾𝐾r 𝐫𝐫 �
𝑠𝑠
Using the Final value theorem
−1 1
𝐲𝐲ss = lim 𝑠𝑠𝐶𝐶 𝑠𝑠𝑠𝑠 − 𝐴𝐴m 𝐵𝐵𝐾𝐾r 𝐫𝐫 � = −𝐶𝐶𝐴𝐴−1
m 𝐵𝐵𝐾𝐾r 𝐫𝐫
𝑠𝑠→0 𝑠𝑠
Pole Placement: Servo Control
By looking at the equation given as
𝐲𝐲ss = −𝐶𝐶𝐴𝐴−1
m 𝐵𝐵𝐾𝐾r 𝐫𝐫
it is clear that for 𝐲𝐲ss = 𝐫𝐫 the matrix 𝐾𝐾r must be selected such that
𝐾𝐾r = − 𝐶𝐶𝐴𝐴−1
m 𝐵𝐵 −1

Note that the State feedback gain 𝐾𝐾 is designed using the usual approach
that we have seen earlier. Therefore, the difference between regulation and
servo is the inclusion of the term 𝐾𝐾r 𝐫𝐫 in the control input.
Pole Placement: Servo Control

𝐫𝐫 𝐮𝐮 𝐱𝐱̇ 𝐱𝐱 𝐲𝐲
𝐾𝐾r +
+ 𝐵𝐵 +
+ ∫ 𝑑𝑑𝑑𝑑 𝐶𝐶

𝐴𝐴

−𝐾𝐾

Fig. 1: Closed-Loop State Space System

The Closed-Loop system can be shown in block diagram form as in


Figure 1.
Pole Placement: Servo Control
Example:
1 0 1
𝐱𝐱̇ 𝑡𝑡 = 𝐱𝐱 𝑡𝑡 + 𝑢𝑢 𝑡𝑡
2 3 2
𝑦𝑦(𝑡𝑡) = 1 0 𝐱𝐱(𝑡𝑡)
Compute the state feedback gain 𝐾𝐾 and the matrix 𝐾𝐾r such that the control
input
𝑢𝑢 𝑡𝑡 = −𝐾𝐾𝐱𝐱 𝑡𝑡 + 𝐾𝐾r 𝐫𝐫
places the closed-loop eigenvalues at the locations 𝜇𝜇1 = −1 and 𝜇𝜇2 = −2
and the output reaches the set-point 𝐫𝐫 at steady state.
Pole Placement: Servo Control
Solution:
The system
1 0 1
𝐱𝐱̇ 𝑡𝑡 = 𝐱𝐱 𝑡𝑡 + 𝑢𝑢(𝑡𝑡)
2 3 2
is clearly not in controllable canonical form. We must first make sure that
the system is completely state controllable by computing the controllability
matrix
1 1
𝑊𝑊c = 𝐵𝐵 | 𝐴𝐴𝐴𝐴 = → 𝑊𝑊c = 6 → rank 𝑊𝑊c = 2
2 8
Therefore, the system is controllable and we can proceed with the
controller design.
Pole Placement: Servo Control
The desired eigenvalues (poles) are 𝜇𝜇1 = −1 and 𝜇𝜇2 = −2, therefore, the
desired characteristic polynomial is given as
𝜙𝜙 𝜆𝜆 = 𝜆𝜆 + 1 𝜆𝜆 + 2 = 𝜆𝜆2 + 3𝜆𝜆 + 2
and
1 0 1 0 1
𝜆𝜆𝜆𝜆 − 𝐴𝐴 − 𝐵𝐵𝐵𝐵 = 𝜆𝜆 − + 𝐾𝐾
0 1 2 3 2
1 0 1 0 1 𝑘𝑘 𝑘𝑘
= 𝜆𝜆 − + 1 2
0 1 2 3 2
𝜆𝜆 0 1 0 𝑘𝑘1 𝑘𝑘2
= − +
0 𝜆𝜆 2 3 2𝑘𝑘1 2𝑘𝑘2
𝜆𝜆 − 1 + 𝑘𝑘1 𝑘𝑘2
= = 𝜆𝜆2 + 𝑘𝑘1 + 2𝑘𝑘2 − 4 𝜆𝜆 + 3 − 3𝑘𝑘1
−2 + 2𝑘𝑘1 𝜆𝜆 − 3 + 2𝑘𝑘2
Pole Placement: Servo Control
Therefore, we have
𝜆𝜆2 + 𝑘𝑘1 + 2𝑘𝑘2 − 4 𝜆𝜆 + 3 − 3𝑘𝑘1 ≡ 𝜆𝜆2 + 3𝜆𝜆 + 2
If we compare the coefficients then we have two equations:
𝑘𝑘1 + 2𝑘𝑘2 − 4 = 3
3 − 3𝑘𝑘1 = 2
with the solution
1 10
𝑘𝑘1 = and 𝑘𝑘2 =
3 3
In other words, the matrix 𝐾𝐾 is given as
1 10
𝐾𝐾 = 3 3
Pole Placement: Servo Control
The next step is to compute 𝐾𝐾r which is given as
𝐾𝐾r = − 𝐶𝐶𝐴𝐴−1
m 𝐵𝐵 −1
= − 𝐶𝐶 𝐴𝐴 − 𝐵𝐵𝐵𝐵 −1 −1
𝐵𝐵
−1
−1
1 0 1 1 10 1
=− 1 0 −
2 3 2 3 3 2
𝑦𝑦
2
= −
3 1

The system is simulated for a unit-step reference


as shown in the Figure.

0
𝑡𝑡
State Observers
We have until now learned how to design controllers that utilize full state
feedback in order to achieve the desired control task. However, it was
stated many times before that in practice it may not be feasible to measure
all the states in order to achieve state feedback. In that case, how is it
possible to utilize the controllers those controllers without compromising
on the performance? The answer is State Observers.
State Observers are used to estimate or compute the states that are not
available through measurement. In order for us to design state observers, it
is required that the system be observable.
State Observers
Consider the Observable State Space system given as
𝐱𝐱̇ 𝑡𝑡 = 𝐴𝐴𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐮𝐮 𝑡𝑡
𝐲𝐲(𝑡𝑡) = 𝐶𝐶𝐱𝐱(𝑡𝑡)
Assume that only the output y(t) is available through measurement, then
the state observer is given as
𝐱𝐱�̇ 𝑡𝑡 = 𝐴𝐴�𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐮𝐮 𝑡𝑡 + 𝐿𝐿 𝐲𝐲 𝑡𝑡 − 𝐲𝐲(𝑡𝑡)


𝐲𝐲(𝑡𝑡) = 𝐶𝐶 𝐱𝐱� (𝑡𝑡)
where 𝐱𝐱� is the estimate of the actual states 𝐱𝐱 and 𝐿𝐿 is called the observer
gain and is designed to achieve proper state estimation.
State Observers
Note that if we subtract the observer from the system as shown below
𝐱𝐱̇ 𝑡𝑡 − 𝐱𝐱�̇ 𝑡𝑡 = 𝐴𝐴𝐱𝐱 𝑡𝑡 − 𝐴𝐴�𝐱𝐱 𝑡𝑡 − 𝐿𝐿 𝐲𝐲 𝑡𝑡 − 𝐲𝐲(𝑡𝑡)

𝐲𝐲 𝑡𝑡 − 𝐲𝐲� 𝑡𝑡 = 𝐶𝐶𝐱𝐱 𝑡𝑡 − 𝐶𝐶 𝐱𝐱� (𝑡𝑡)
and define 𝐱𝐱� 𝑡𝑡 = 𝐱𝐱 𝑡𝑡 − 𝐱𝐱� 𝑡𝑡 as the state estimation error then we obtain
𝐱𝐱�̇ 𝑡𝑡 = 𝐴𝐴𝐱𝐱� 𝑡𝑡 − 𝐿𝐿𝐿𝐿 𝐱𝐱� (𝑡𝑡)
= 𝐴𝐴 − 𝐿𝐿𝐿𝐿 𝐱𝐱� (𝑡𝑡)
From the last equation it is clear that if we want the estimation error to
converge to zero then the matrix 𝐴𝐴 − 𝐿𝐿𝐿𝐿 must have stable eigenvalues.
Note that the matrix 𝐴𝐴 − 𝐿𝐿𝐿𝐿 is very similar to the matrix 𝐴𝐴 − 𝐵𝐵𝐵𝐵. Thus, the
matrix 𝐿𝐿 can be designed using approaches similar to that used for 𝐾𝐾.
State Observers
𝐮𝐮 𝐱𝐱̇ 𝐱𝐱 𝐲𝐲
𝐵𝐵 +
+ ∫ 𝑑𝑑𝑑𝑑 𝐶𝐶

𝐴𝐴

+
𝐿𝐿 _

+ 𝐱𝐱�̇ 𝐱𝐱� 𝐲𝐲�


𝐵𝐵 +
+ ∫ 𝑑𝑑𝑑𝑑 𝐶𝐶

𝐴𝐴

Fig. 2: Observer implementation

The Observer implementation can be shown in block diagram form as


in Figure 2.
State Observers
Example:
0 1 1
𝐱𝐱̇ 𝑡𝑡 = 𝐱𝐱 𝑡𝑡 + 𝑢𝑢 𝑡𝑡
2 3 2
𝑦𝑦(𝑡𝑡) = 1 0 𝐱𝐱(𝑡𝑡)
Compute the Observer gain 𝐿𝐿 such that the Observer
𝐱𝐱�̇ 𝑡𝑡 = 𝐴𝐴�𝐱𝐱 𝑡𝑡 + 𝐵𝐵𝐮𝐮 𝑡𝑡 + 𝐿𝐿 𝐲𝐲 𝑡𝑡 − 𝐲𝐲(𝑡𝑡)


𝐲𝐲(𝑡𝑡) = 𝐶𝐶 𝐱𝐱� (𝑡𝑡)
has the eigenvalues 𝜇𝜇1 = −1 and 𝜇𝜇2 = −2.
State Observers
Solution:
The system
0 1 1
𝐱𝐱̇ 𝑡𝑡 = 𝐱𝐱 𝑡𝑡 + 𝑢𝑢(𝑡𝑡)
2 3 2
𝑦𝑦(𝑡𝑡) = 1 0 𝐱𝐱(𝑡𝑡)
is clearly not in observable canonical form. We must first make sure that
the system is observable by computing the observability matrix
𝐶𝐶 1 0
𝑊𝑊o = = → 𝑊𝑊o = 1 → rank 𝑊𝑊o = 2
𝐶𝐶𝐶𝐶 0 1
Therefore, the system is observable and we can proceed with the observer
design.
State Observers
The desired eigenvalues (poles) are 𝜇𝜇1 = −1 and 𝜇𝜇2 = −2, therefore, the
desired characteristic polynomial is given as
𝜙𝜙 𝜆𝜆 = 𝜆𝜆 + 1 𝜆𝜆 + 2 = 𝜆𝜆2 + 3𝜆𝜆 + 2
and
1 0 0 1
𝜆𝜆𝜆𝜆 − 𝐴𝐴 − 𝐿𝐿𝐿𝐿 = 𝜆𝜆 − + 𝐿𝐿 1 0
0 1 2 3
1 0 0 1 𝑙𝑙1
= 𝜆𝜆 − + 1 0
0 1 2 3 𝑙𝑙2
𝜆𝜆 0 0 1 𝑙𝑙1 0
= − +
0 𝜆𝜆 2 3 𝑙𝑙2 0
𝜆𝜆 + 𝑙𝑙1 −1
= = 𝜆𝜆2 + 𝑙𝑙1 − 3 𝜆𝜆 − 2 + 𝑙𝑙2 − 3𝑙𝑙1
−2 + 𝑙𝑙2 𝜆𝜆 − 3
State Observers
Therefore, we have
𝜆𝜆2 + 𝑙𝑙1 − 3 𝜆𝜆 − 2 + 𝑙𝑙2 − 3𝑙𝑙1 ≡ 𝜆𝜆2 + 3𝜆𝜆 + 2
If we compare the coefficients then we have two equations:
𝑙𝑙1 − 3 = 3
−2 + 𝑙𝑙2 − 3𝑙𝑙1 = 2
with the solution
𝑙𝑙1 = 6 and 𝑙𝑙2 = 22
In other words, the matrix 𝐿𝐿 is given as
6
𝐿𝐿 =
22
State Observers
If we implement this observer on Matlab we can see how it performs
𝐱𝐱

𝑥𝑥�1

𝑥𝑥1

𝑥𝑥�2
0
𝑥𝑥2

𝑡𝑡

You might also like