Sunteți pe pagina 1din 24

METR4202 – Advanced Control & Robotics

Lecture 3

Material from Various Sources,


Mainly Nise Chapters 5.8 and 12
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 1

Similarity Transformations and


Introduction to State-Space Control

G. Hovland 2004-2006

The Simplest Controller: The P-Controller

Before we start with state-space design, we will look


briefly at frequency response design.

u(t) y(t)
K G(s)
-
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 2

Goal: Relate the value of K to percentage overshoot


and settling/peak time in y(t) for a step
response in u(t)
Frequency Design

In Frequency Domain: Y(s)/U(s) =


π 4
wn = wn =
Tp 1 − ζ 2 Tsζ

Φ M = a tan
− 2ζ 2 + 1 + 4ζ 4
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 3

Example: 10% overshoot ζ = 0.5912, ΘM=58.6o


Peak time Tp = 1.0 sec ωn = 3.90 rad/sec
Assumption:
wn is the correct frequency for all systems.

We are in practice only placing the dominant


2nd order pole. After the design, we cross our
fingers and hope that higher-order poles do not
affect the step-response.

Phase Margin vs Gain Adjustment


Bode plots.
For a simple gain adjustment, desired phase margin
can be achieved.
To increase cross-over frequency, a PD controller can
be used (topic for Pendulum prac)
ωn
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 4

You can also


use the Nyquist
plot to design the
controller
Limitations of Frequency Domain Techniques

• We want to place all poles, not only the 2nd


order dominant

• In frequency domain, we have three


parameters: gain, compensator pole and
compensator zero.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 5

• Three parameters are not sufficient to place all


poles for systems of high order

Example: For the 5th order system Y ( s ) 1


=
R( s ) s + a4 s + a3 s + a2 s 2 + a1s + a0
5 4 3

design a controller that yields 10% overshoot and peak time 1.0 sec
for a step-response.

Controller Design via State-Space (Ch. 12.1-4)


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 6

State-space formulation of the uncontrolled system:


x = Ax + Bu y = Cx
State-space formulation of the controlled system:

x = Ax + Bu = Ax + B( r − Kx ) = ( A − BK ) x + Br y = Cx
Summary State Space Forms

Figure 5.31
State-space forms for

C (s) s+3
=
R( s ) ( s + 4)( s + 6)

y = c(t )
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 7

Phase-Variable Form
x1 0 1 0 0 x1 0
x2 0 0 1 0 x2 0
= + u
xn −1 0 0 0 1 xn −1 0
xn − a0 − a1 − an −1 xn 1
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 8

A Matrix
B Vector

0 1 0 0 Major
advantage of
0 0 1 0
the phase-
A − BK = variable and
0 0 0 1 controller
canonical
− ( a0 + k1 ) − ( a1 + k2 ) − ( an −1 + kn ) forms
Phase-Variable Form

Poles of uncontrolled system:

s n + an −1s n −1 + + a1s + a0 = 0

n system parameters to adjust


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 9

Poles of controlled system:

s n + ( an −1 + kn ) s n −1 + + ( a1 + k2 ) s + (a0 + k1 ) = 0

Example 12.1: State-Space Controller Design


Given the plant design the phase-variable
feedback gains to yield
20( s + 5)
G( s) = 9.5% overshoot and a
s( s + 1)( s + 4) settling time Ts of 0.74 sec.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 10

4
= 0.60 wn = = 9.0
Tsζ

Desired poles: Should not


interfere with
( s 2 + 2ζwn s + wn )( s + p )
2 design requirements!
Example 12.1: Desired Poles
Bode plots

20( s + 5)
G1 ( s ) = and
( s + 5.1)( s 2 + 2ζwn + wn )
2

20
G2 ( s ) =
( s 2 + 2ζwn + wn )
2
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 11

In general:
Use extra poles to cancel
out zeros. If no cancellations
required, place poles far away
from 2nd order pole.

NB: Watch input saturation - fast


poles require high feedback
gains.

Example 12.1: Signal-Flow Diagram

20( s + 5)
G( s) =
s( s + 1)( s + 4)

How?

0 1 0
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 12

A= 0 0 1
0 −4 −5
C = [100 20 0]
Example 12.1: Controller Gains

0 1 0
A − BK = 0 0 1
− k1 − ( 4 + k2 ) − (5 + k3 )
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 13

Characteristic equation:

s 3 + (5 + k3 ) s 2 + ( 4 + k2 ) s + k1 = 0
Must match design requirements:
( s 2 + 2ζwn s + wn )( s + p ) = s 3 + 15.9 s 2 + 136.08s + 413.1
2

Large poles result in large


Controller gains by inspection:
feedback gains
k1 = 413.1, k2 = 132.08, k3 = 10.9
and possible saturation.

Example 12.1: Final Transfer Function


20( s + 5) 20( s + 5)
T ( s) = =
( s + 5.1)( s 2 + 2ζwn s + wn ) s 3 + 15.9 s 2 + 136.08s + 413.1
2

What happens to
the transfer function
R
if we increase the
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 14

controller gains?
State-Space Design: Summary so far

For systems on phase-variable state-space form, we


can easily place all poles by state feedback.
For systems of high order, you can design the poles as
a series of 2nd order poles, which all meet the design
requirements on overshoot and settling time.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 15

Alternatively, you can use additional poles to cancel out


zeros.
If there are left-over poles, place them at frequencies
where they have little influence on design requirements.

State-space control for other model forms

If we can transform the original model to phase-variable


or controller canonical form, we can easily place all
poles for any controllable state-space model.
After the state feedback gains have been designed, they
must be transformed back to the original system.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 16

In the following material, similarity transformations will


be introduced. Keep in mind the motivation for these
transforms: easy state-feedback control design in
phase-variable (or controller canonical) form.
Similarity transformations

Similar systems: systems of different state


space representations, but have the same
transfer function, so the same poles /
eigenvalues and the same response.
We will study how to transform between similar
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 17

systems without using signal flow graph and


transfer function.
This can be realised by transfer matrix.

Expressing any vector in terms of Basic vectors


State variables form the axis of the state space.
The same points can be represented by different
representations of state space in different coordinate
systems.
Coordinate frames may be rotated, but can not be
dilated because the coordinate systems are based on
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 18

unit vectors, and the origin is not allowed to be shifted.


State-space transformations

x1
x = x1U x1 + x2 U x 2 =
x2
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 19

x x
x1 x
U x1 = , U x2 = 2
| x1 | | x2 |

z z
z1
z = z1U z1 + z 2 U z 2 =
z2 O

Vector transformations

The basis vectors of z1z2 space can


be represented by basis vectors of x1x2 space:

U z1 = p11U x1 + p21U x 2 z1
z = z1U z1 + z 2 U z 2 =
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 20

U z 2 = p12 U x1 + p22 U x 2 z2

Seeing x=z, we have:


z1 p11 + z 2 p12
x = ( z1 p11 + z 2 p12 )U x1 + ( z1 p21 + z 2 p22 )U x 2 =
z1 p21 + z 2 p22
x1
Also: x = x1U x1 + x2 U x 2 = , compare coefficients:
x2
p11 p12 z1
x= = Pz z = P −1x
p21 p22 z2
Finding the transformation matrix, P=[Uz1, Uz2 ,…,Uzn], for n-th system

U z1 = p11U x1 + p21U x 2 z1
z = z1U z1 + z 2 U z 2 =
U z 2 = p12 U x1 + p22 U x 2 z2

p11 p12 z1
x= = Pz z = P −1x
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 21

p21 p22 z2

The columns of P are the coordinates of the basis vectors of the z1z2 space
expressed as linear combinations of the basis vectors of the x1x2 space.
1st column of P is Uz1, 2nd column of P is Uz2. We have P=[Uz1, Uz2], or :

P=[Uz1, Uz2 ,…,Uzn], for n-th order system

Example 5.9 vector transformations

Transform vector x=[1 2 3]T expressed with its basis vectors, Ux1=[1 0 0]T, Ux2=[0 1 0]T
and Ux3=[0 0 1]T into a vector expressed in Uz1=[0 1/√2 1/√2]T, Uz2=[0 -1/√2
1/√2]T,Uz3=[1 0 0]T.
SOLUTION:
z = z1U z1 + z 2 U z 2 + z3 U z 3

0 0 1 z3
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 22

x = z1 1 / 2 + z 2 − 1 / 2 + z3 0 = 1 ( ) ( 2 )z
2 z1 − 1
(1 2 )z + (1 2 )z
2

1/ 2 1/ 2 0 1 2

0 0 1 z1 0 0.707 0.707 1 2.83


−1
= 1 2 −1 2 0 z 2 = Pz z = P x = 0 − 0.707 0.707 2 = 0
1 2 1 2 0 z3 1 0 0 3 1

! x x 1x 2 z z 1z 2 "x z
#
Transforming the state equations

Vector transformation ⇔ selection of different set of state variables to


represent the same system transfer function.
Now, convert state space representation with state vector x into a state
space representation with a state vector z.

x = Ax + Bu Let x=Pz Pz = APz + Bu Multiply P-1


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 23

y = Cx + Du y = CPz + Du

$ % z = P −1APz + P −1Bu
#$
%
y = CPz + Du
#$ & %

Similarity transformations on state equations


x1 0 1 0 x1 0
' x2 = 0 0 1 x2 + 0 u
% x3 − 2 − 5 − 7 x3 1
( y = [1 0 0]x
% ( %
2 0 0
z = 3 2 0 x = P −1x
$)* +
),
1 4 5
−1
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 24

2 0 0 0 1 0 2 0 0 − 1.5 1 0
−1
P AP = 3 2 0 0 0 1 3 2 0 = − 1.25 0.7 0.4
1 4 5 −2 −5 −7 1 4 5 − 2.5 0.4 − 6.2
−1
2 0 0 0 0 2 0 0
P −1B = 3 2 0 0 = 0 , CP = [1 0 0] 3 2 0 = [0.5 0 0]
1 4 5 1 5 1 4 5
− 1.5 1 0 0
z = − 1.25 0.7 0.4 z + 0 u
z = P −1APz + P −1Bu − 2.5 0.4 − 6.2 5
y = CPz + Du y = [0.5 0 0]z
Similarity transformations on state equations
x1 0 1 0 x1 0 2 0 0
x2 = 0 0 1 x2 + 0 u z = 3 2 0 x = P −1x
x3 − 2 − 5 − 7 x3 1 1 4 5
y = [1 0 0]x -
−1
2 0 0
adj (P −1 )
P= P ( )
−1 −1
= 3 2 0 =
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 25

det(P −1 )
1 4 5
2*5 − 0* 4 − (0 * 5 − 0 * 4) 0*0 − 0*2
= 1
20 − (3 * 5 − 0 *1) 2 * 5 − 0 *1 − (2 * 0 − 3 * 0)
3 * 4 − 1* 2 − (2 * 4 − 0 *1) 2 * 2 − 3* 0
10 0 0 0.5 0 0
= 1
20 − 15 10 0 = − 0.75 0.5 0
10 −8 4 0.5 − 0.4 0.2

Diagonalising a system matrix – decoupled state


equations

1. Eigenvalues and eigenvectors:


Axi=λixi
All vectors xi≠0 are the eigenvectors of A corresponding to
(constant) eigenvalue λi.
Solve for xi and λi :
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 26

0 = (λi I − A)x i

det(λi I − A) = 0 λi
adj (λi I − A)
x i = (λi I − A) −1 0 = 0
det(λi I − A)
Verify eigenvector solution

To be an eigenvector, the transformation Ax


must be co-linear with x; thus in (a), x is not
an eigenvector; in (b),it is.

Axi=λixi
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 27

Diagonalising a system matrix

#. / %
%& %
Λ=diag{λi} & x=[x1,x2,…xn].
#* P = x=[x1,x2,…xn].
0#. , Axi=λixi ( Λ,
: AP=PΛ
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 28

( Λ=diag{λi}.
1# ( Λ=P-1AP
2#$ & % % .
λ1 0
x x2,1 z = P −1APz + P −1Bu = z + P −1Bu
P = [x1 x 2 ] = 1,1 0 λ2
x1, 2 x2 , 2
y = CPz + Du
Diagonalising a system in state space
−3 1 1
x= x+ u
1 −3 2
y = [2 3]x

λ 0 −3 1 λ + 3 −1
det(λI − A) = − = = λ2 + 6λ + 8
0 λ 1 −3 −1 λ + 3
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 29

. det(λI-A)=0 & % A –2 –4# &Axi=λixi (


− 3 1 x1 x $ % c 1
. λ 3 = −2 1 x1 = =
1 − 3 x2 x2 c choose 1
− 3 1 x1 x $ % c 1
. λ 31 = −4 1 x2 = =
1 − 3 x2 x2 3 −c choose −1
−2 0 3/ 2
* 1 1 z = P −1APz + P −1Bu = z+ u
P = [x1 x2 ] = 0 −4 −1/ 2
1 −1
y = CPz + Du = [5 − 1]z

Example: Similarity Transformation

1 3 1
x= x+ u
−4 −6 3
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 30

y = [1 4]x

3 −2
z= x
1 −4
Class Question
Use:
1 3 1 P-1AP
x= x+ u P-1B
−4 −6 3 CP

y = [1 4]x
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 31

Find the transformation matrix P such that


−2 0 18.39
z= z+ u
0 −3 20
y = [− 2.121 2.6]z
What advantage does system (2) have that (1) does not?

Summary Similarity Transformations

Given the base vectors of the two systems x and z, we


can easily form the transformation matrix P. The
columns of P contain the basis vectors of z.
The transformation P formed by the eigenvectors along
the coloumns of P, will diagonalise the system.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 32

For two system descriptions, the transformation matrix P


can be cumbersome to find. We need a better procedure
of finding P, than solving A2*P = P*A1

We will develop such a procedure, but first we need to


define controllability of a system.
Controllable and Uncontrollable system
Controllable: the input u influences
all the states x1, x2 and x3.

Parallel Form
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 33

Uncontrollable: the input u does not


influence the state x1.

Controllability by inspection

Form the diagonalised system by the transformation


matrix P given by the eigenvectors.
The system is controllable if the B-vector of the
transformed system (P-1B) has no rows that are zero
(when the states are decoupled, the input u must
influence all the states as in the previous example.)
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 34
Controllability: General Test

An nth-order plant whose state equation is:

x = Ax + Bu
is completely controllable if the matrix
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 35

CM = [ B AB A2 B An −1B ]
is of rank n.

Controllability: Example 12.2


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 36

Convert the signal-flow diagram above to the form


x = Ax + Bu
y = Cx
The above form has a special name
Controllability: Example 12.2

Controllability matrix CM:

0 1 −2
CM = [ B AB A2 B ] = 1 − 1 1
1 −2 4
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 37

The system is controllable if the rows of CM are linearly


independent. One way to check this is to find the
determinant. If det(CM)≠0, then the system is
controllable.
det(C M ) = 0 * ( −1 * 4 − (1 * −2)) − 1 * (1 * 4 − 1 * 1) − 2 * (1 * −2 − ( −1 * 1)) = −3 + 2 = −1

In Matlab: rank(ctrb(A,B)) must be 3

Summary so far: state-space control

First check if the system is controllable, either by


checking the rank of CM or by transforming the system to
parallel form (whichever method is easier).
Second, if the system is controllable, transform the
system to phase-variable form or controller canonical
form and place the poles by state-feedback gains.
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 38

Third, transform the controller gains back to the original


system, ie. Korig = K*P-1
P from controllability matrix CM

For the original system


CMZ = [ B AB A2 B An −1B ]

For the transformed system


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 39

CMX = [ P −1B P −1 APP −1B ( P −1 AP ) 2 P −1B ( P −1 AP ) n −1 B ]


= P −1[ B AB A2 B An −1B] PP-1
terms
disappear
Hence, P = CMZ * CMX-1

In Matlab: P = ctrb(Az,Bz) * inv(ctrb(Ax,Bx))

P-matrix that gives phase-variable form


If we have the original system

z = Az z + Bz u
and the phase-variable form
x1 0 1 0 0 x1 0
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 40

x2 0 0 1 0 x2 0
= + u = Ax x + Bx u
xn −1 0 0 0 1 xn −1 0
xn − a0 − a1 − an −1 xn 1

P = ctrb(Az,Bz) * inv(ctrb(Ax,Bx)) will transform any


system z to the phase-variable form x!!!!
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 41 Controller design by transformation: Ex 12.4

Convert the signal-flow diagram above to the form


x = Ax + Bu
y = Cx

Ex 12.4: Check Controllability

0 0 1
CM = [ B AB A2 B ] = 0 1 − 3
1 −1 1
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 42

Is this system state controllable? Check by inspection


Ex 12.4: Transform to Phase-Variables

1 1
= 3
( s + 1)( s + 2)( s + 5) s + 8s + 17 s + 10
2

x1 0 1 0 x1 0 Phase-variable
x2 = 0 0 1 x2 + 0 u form
− 10 − 17 − 8 x3
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 43

x3 1
0 0 1
CM = [ B AB A2 B ] = 0 1 −8
1 −8 47
1 0 0
−1
P = CMZ * CMX = 5 1 0
10 7 1

Ex 12.4: Desired Response


20.8% overshoot and settling time Ts=4.0
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 44

4
= 0.447 wn = = 2.24
Tsζ

Desired poles: We use the extra pole


to cancel the zero
( s 2 + 2ζwn s + wn )( s + p )
2

= ( s 2 + 2 s + 5)( s + 4) = s 3 + 6s 2 + 13s + 20
State-Feedback Controller

0 1 0
A − BK = 0 0 1
− (10 + k1 ) − (17 + k2 ) − (8 + k3 )

Desired:
( s 2 + 2ζwn s + wn )( s + p )
2
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 45

= ( s 2 + 2 s + 5)( s + 4) = s 3 + 6s 2 + 13s + 20

By inspection: k1=10, k2=-4, k3=-2

State-Feedback Controller: Original

Korig = K * P-1 = [ -20 10 -2]


METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 46

Verify design with


Y (s) desired poles
T (s) = = C( sI − A) −1 B + D
U (s)
Class Exercise: DC Motor Control

Shaft
position
METR4202/7202 – AAdvanced Control & Robotics, Semester 2, 2005: Page: 47

Design a state-feedback
controller to yield
20.8% overshoot and
settling time of Ts=4.0
seconds for a step-response

Follow the procedure in Example 12.4

S-ar putea să vă placă și