Adv Control & Robotic Lec 3
Transcript of Adv Control & Robotic Lec 3
-
8/14/2019 Adv Control & Robotic Lec 3
1/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:1
METR4202 Advanced Control & Robotics
Lecture 3
Material from Various Sources,Mainly Nise Chapters 5.8 and 12
Similarity Transformations andIntroduction to State-Space Control
G. Hovland 2004-2006
METR4202/7202AAdvancedControl&Robotics,
Semester2,
2005:Page:2
The Simplest Controller: The P-Controller
K G(s)-
Goal: Relate the value of K to percentage overshoot
and settling/peak time in y(t) for a stepresponse in u(t)
u(t) y(t)
Before we start with state-space design, we will lookbriefly at frequency response design.
-
8/14/2019 Adv Control & Robotic Lec 3
2/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:3
Frequency Design
In Frequency Domain: Y(s)/U(s) =
++=
=
42
2
412
2tan
1
a
Tw
M
p
n
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 ourfingers and hope that higher-order poles do notaffect the step-response.
s
nT
w4
=
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:4
Phase Margin vs Gain Adjustment
Bode plots.For a simple gain adjustment, desired phase margincan be achieved.
To increase cross-over frequency, a PD controller canbe used (topic for Pendulum prac)
n
You can alsouse the Nyquistplot to design thecontroller
-
8/14/2019 Adv Control & Robotic Lec 3
3/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:5
Limitations of Frequency Domain Techniques
We want to place all poles, not only the 2nd
order dominant
In frequency domain, we have threeparameters: gain, compensator pole andcompensator zero.
Three parameters are not sufficient to place allpoles for systems of high order
Example: For the 5th order system
design a controller that yields 10% overshoot and peak time 1.0 secfor a step-response.
01
2
2
3
3
4
4
5
1
)(
)(
asasasasassR
sY
+++++=
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:6
Controller Design via State-Space (Ch. 12.1-4)
State-space formulation of the uncontrolled system:
State-space formulation of the controlled system:
CxyBuAxx =+=
CxyBrxBKAKxrBAxBuAxx =+=+=+= )()(
-
8/14/2019 Adv Control & Robotic Lec 3
4/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:7
Figure 5.31State-space forms for
)(
)6)(4(3
)()(
tcy
sss
sRsC
=
++ +=
Summary State Space Forms
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:8
Phase-Variable Form
u
x
x
x
x
aaax
x
x
x
n
n
nn
n
+
=
1
0
0
0
1000
0100
0010
1
2
1
110
1
2
1
A MatrixB Vector
+++
=
)()()(
1000
0100
0010
12110 nn kakaka
BKA
Majoradvantage ofthe phase-
variable andcontrollercanonicalforms
-
8/14/2019 Adv Control & Robotic Lec 3
5/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:9
Phase-Variable Form
Poles of uncontrolled system:
0011
1 =++++
asasasn
n
n
n system parameters to adjust
Poles of controlled system:
0)()()( 10211
1 =+++++++ kaskaskas nnnn
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:10
Example 12.1: State-Space Controller Design
Given the plant
)4)(1(
)5(20)(
+++
=sss
ssG
design the phase-variablefeedback gains to yield9.5% overshoot and asettling time Ts of 0.74 sec.
= 0.60 0.94==
sn
Tw
Desired poles:
))(2(22
pswsws nn +++
Should not
interfere withdesign requirements!
-
8/14/2019 Adv Control & Robotic Lec 3
6/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:11
Example 12.1: Desired Poles
Bode plots
)2(
20)(
)2)(1.5(
)5(20)(
222
221
nn
nn
wwssG
wwss
ssG
++=
+++
+=
and
In general:Use extra poles to cancelout zeros. If no cancellations
required, place poles far away
from 2nd
order pole.
NB: Watch input saturation - fastpoles require high feedbackgains.
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:12
Example 12.1: Signal-Flow Diagram
)4)(1(
)5(20)(
+++
=sss
ssG
]020100[
540
100
010
=
=
C
A
How?
-
8/14/2019 Adv Control & Robotic Lec 3
7/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:13
Example 12.1: Controller Gains
++
=
)5()4(
100
010
321 kkk
BKA
Characteristic equation:
0)4()5( 122
3
3 =+++++ ksksks
Must match design requirements:
1.41308.1369.15))(2(2322
+++=+++ ssspswsws nn
Controller gains by inspection:
k1 = 413.1, k2 = 132.08, k3 = 10.9
Large poles result in largefeedback gainsand possible saturation.
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:14
Example 12.1: Final Transfer Function
1.41308.1369.15
)5(20
)2)(1.5(
)5(20)(
2322 ++++
=+++
+=
sss
s
wswss
ssT
nn
RWhat happens tothe transfer functionif we increase thecontroller gains?
-
8/14/2019 Adv Control & Robotic Lec 3
8/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:15
State-Space Design: Summary so far
For systems on phase-variable state-space form, wecan easily place all poles by state feedback.
For systems of high order, you can design the poles asa series of 2nd order poles, which all meet the designrequirements on overshoot and settling time.
Alternatively, you can use additional poles to cancel outzeros.
If there are left-over poles, place them at frequencieswhere they have little influence on design requirements.
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:16
State-space control for other model forms
If we can transform the original model to phase-variableor controller canonical form, we can easily place allpoles for any controllable state-space model.
After the state feedback gains have been designed, theymust be transformed back to the original system.
In the following material, similarity transformations willbe introduced. Keep in mind the motivation for thesetransforms: easy state-feedback control design inphase-variable (or controller canonical) form.
-
8/14/2019 Adv Control & Robotic Lec 3
9/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:17
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
systems without using signal flow graph andtransfer function.
This can be realised by transfer matrix.
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:18
Expressing any vector in terms of Basic vectors
State variables form the axis of the state space.
The same points can be represented by differentrepresentations of state space in different coordinatesystems.
Coordinate frames may be rotated, but can not bedilated because the coordinate systems are based onunit vectors, and the origin is not allowed to be shifted.
-
8/14/2019 Adv Control & Robotic Lec 3
10/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:19
State-space transformations
=+=
2
1
2211x
xxx xx UUx
||,
|| 2
2
1
1
21 x
xU
x
xxx==U
O
xx
zz
=+=
2
1
2211z
zzz zz UUz
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:20
Vector transformations
The basis vectors of z1z2 space canbe represented by basis vectors of x1x2 space:
2221122
2211111
xxz
xxz
pp
pp
UUU
UUU
+=
+=
=+=
2
1
2211z
zzz zz UUz
Seeing x=z, we have:
+
+=+++=
222211
122111
22222111122111 )()(pzpz
pzpzpzpzpzpz xx UUx
Pzx =
=
2
1
2221
1211
z
z
pp
ppxPz 1
=
Also:
=+=
2
1
2211x
xxx xx UUx , compare coefficients:
-
8/14/2019 Adv Control & Robotic Lec 3
11/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:21
Finding the transformation matrix, P=[Uz1, Uz2 ,,Uzn], for n-th system
2221122
2211111
xxz
xxz
pp
pp
UUU
UUU
+=
+=
=+=
2
1
2211
z
zzz zz UUz
The columns ofP 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 :
Pzx =
=
2
1
2221
1211
z
z
pp
ppxPz 1
=
P=[Uz1, Uz2 ,,Uzn], for n-th order system
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:22
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:
332211 zzz zzz UUUz ++=
( ) ( )( ) ( )
+
=
+
+
=
21
21
3
321
2121
2121
0
0
1
2/1
2/1
0
2/1
2/1
0
zz
zz
z
zzzx
Pz=
=
3
2
1
02121
02121
100
z
z
z
=
==
1
0
83.2
3
2
1
001
707.0707.00
707.0707.001xPz
!x x1x2 z z1z2 "x z #
-
8/14/2019 Adv Control & Robotic Lec 3
12/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:23
Transforming the state equations
Vector transformation selection of different set of state variables torepresent the same system transfer function.
Now, convert state space representation with state vector x into a statespace representation with a state vector z.
u
u
DCxy
BAxx
+=
+= Let x=Pzu
u
DCPzy
BAPzzP
+=
+=
u
u
DCPzy
BPAPzPz
+=
+= 11
Multiply P-1
$%
#$%
#$&%
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:24
Similarity transformations on state equations
[ ]x001
1
0
0
752
100
010
3
2
1
3
2
1
=
+
=
y
u
x
x
x
x
x
x
'%(%(%
$)*+),
xPxz 1
541
023
002=
=
u
u
DCPzy
BPAPzPz
+=
+= 11
=
=
2.64.05.2
4.07.025.1
015.1
541
023
002
752
100
010
541
023
0021
1APP
=
=
5
0
0
1
0
0
541
023
0021BP [ ] [ ]005.0
541
023
002
001
1
=
=
CP,
[ ]z
zz
005.0
5
0
0
2.64.05.2
4.07.025.1
015.1
=
+
=
y
u
-
8/14/2019 Adv Control & Robotic Lec 3
13/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:25
Similarity transformations on state equations
[ ]x001
1
0
0
752
100
010
3
2
1
3
2
1
=
+
=
y
u
x
x
x
x
x
x
xPxz 1
541
023
002=
=
( )
=
=
=
=
==
2.04.05.0
05.075.0
005.0
4810
01015
0010
0*32*2)1*04*2(2*14*3
)0*30*2(1*05*2)1*05*3(
2*00*0)4*05*0(4*05*2
)det(
)(
541
023
002
201
201
1
1
1
11
P
PPP
adj
-
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:26
Diagonalising a system matrix decoupled stateequations
1. Eigenvalues and eigenvectors:
Axi=ixi
All vectors xi0 are the eigenvectors ofA corresponding to(constant) eigenvalue i.
Solve for xi and i :
ii xAI0 )( =
0AI
AI0AIx )det(
)()(
1
==
i
iii
adj
0)det( =AIi i
-
8/14/2019 Adv Control & Robotic Lec 3
14/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:27
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
Verify eigenvector solution
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:28
Diagonalising a system matrix
# ./%%&%
=diag{i} &x=[x1,x2,xn].
# * P = x=[x1,x2,xn].
0# . , Axi=ixi (: AP=P,
( =diag{i}.
1# ( =P-1AP
2# $&%%.
u
uu
DCPzy
BPzBPAPzPz
+=
+
=+= 1
2
111
0
0
[ ]
== 2,22,1
1,21,1
21 xx
xx
P xx
-
8/14/2019 Adv Control & Robotic Lec 3
15/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:29
Diagonalising a system in state space
[ ]x
xx
32
2
1
31
13
=
+
=
y
u
8631
13
31
13
0
0)det( 2 ++=
+
+=
=
AI
.det(I-A)=0&%A 2 4#&Axi=ixi (
=
2
1
2
12
31
13
x
x
x
x $%
=
=
1
11
choosec
cx.3
.31
=
2
1
2
1
431
13
x
x
x
x $%3
=
= 1
12
choosec
cx
[ ]
==
11
1121 xxP
*
[ ]zDCPzy
zBPAPzPz
15
2/1
2/3
40
0211
=+=
+
=+=
u
uu
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:30
Example: Similarity Transformation
[ ]x
xx
41
3
1
64
31
=
+
=
y
u
xz
=
41
23
-
8/14/2019 Adv Control & Robotic Lec 3
16/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:31
Class Question
[ ]x
xx
41
3
1
64
31
=
+
=
y
u
Find the transformation matrix P such that
[ ]zy
uzz
6.2121.2
20
39.18
30
02
=
+
=
What advantage does system (2) have that (1) does not?
Use:P-1APP-1B
CP
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:32
Summary Similarity Transformations
Given the base vectors of the two systems x and z, wecan easily form the transformation matrix P. Thecolumns of P contain the basis vectors of z.
The transformation P formed by the eigenvectors alongthe coloumns of P, will diagonalise the system.
For two system descriptions, the transformation matrix Pcan be cumbersome to find. We need a better procedureof finding P, than solving A2*P = P*A1
We will develop such a procedure, but first we need to
define controllability of a system.
-
8/14/2019 Adv Control & Robotic Lec 3
17/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:33
Controllable and Uncontrollable system
Controllable: the input u influencesall the states x1, x2 and x3.
Uncontrollable: the input u does notinfluence the state x1.
Parallel Form
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:34
Controllability by inspection
Form the diagonalised system by the transformationmatrix P given by the eigenvectors.
The system is controllable if the B-vector of thetransformed system (P-1B) has no rows that are zero(when the states are decoupled, the input u mustinfluence all the states as in the previous example.)
-
8/14/2019 Adv Control & Robotic Lec 3
18/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:35
An nth-order plant whose state equation is:
is completely controllable if the matrix
is of rank n.
Controllability: General Test
BuAxx +=
][ 12 BABAABBC nM=
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:36
Controllability: Example 12.2
Convert the signal-flow diagram above to the form
Cxy
BAxx
=
+= u
The above form has a special name
-
8/14/2019 Adv Control & Robotic Lec 3
19/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:37
Controllability: Example 12.2
Controllability matrix CM:
The system is controllable if the rows of CM are linearlyindependent. One way to check this is to find the
determinant. If det(CM)0, then the system iscontrollable.
In Matlab: rank(ctrb(A,B)) must be 3
==
421
111
210
][ 2BAABBCM
123))1*1(2*1(*2)1*14*1(*1))2*1(4*1(*0)det( =+==MC
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:38
Summary so far: state-space control
First check if the system is controllable, either bychecking the rank of CM or by transforming the system toparallel form (whichever method is easier).
Second, if the system is controllable, transform thesystem to phase-variable form or controller canonicalform and place the poles by state-feedback gains.
Third, transform the controller gains back to the originalsystem, ie. Korig = K*P
-1
-
8/14/2019 Adv Control & Robotic Lec 3
20/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:39
P from controllability matrix CM
For the original system
For the transformed system
Hence, P = CMZ * CMX-1
In Matlab: P = ctrb(Az,Bz) * inv(ctrb(Ax,Bx))
][ 12 BABAABBC nMZ=
][
])()([
121
11121111
BABAABBP
BAPPBPAPPBAPPPBPC
n
n
MX
=
=
PP-1
termsdisappear
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:40
P-matrix that gives phase-variable form
If we have the original system
and the phase-variable form
P = ctrb(Az,Bz) * inv(ctrb(Ax,Bx)) will transform anysystem z to the phase-variable form x!!!!
uBzAz zz +=
uBxAu
x
x
x
x
aaax
x
x
x
xx
n
n
nn
n
+=
+
=
1
0
0
0
1000
0100
0010
1
2
1
110
1
2
1
-
8/14/2019 Adv Control & Robotic Lec 3
21/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:41
Controller design by transformation: Ex 12.4
Convert the signal-flow diagram above to the form
CxyBAxx
=+= u
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:42
Ex 12.4: Check Controllability
==
111
310
100
][ 2BAABBCM
Is this system state controllable? Check by inspection
-
8/14/2019 Adv Control & Robotic Lec 3
22/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:43
Ex 12.4: Transform to Phase-Variables
10178
1
)5)(2)(1(
123 +++
=+++ ssssss
==
==
+
=
1710
015
001
*
4781
810
100
][
1
0
0
81710
100
010
1
2
3
2
1
3
2
1
MXMZ
M
CCP
BAABBC
u
x
x
x
x
x
x
Phase-variableform
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:44
Ex 12.4: Desired Response
20.8% overshoot and settling time Ts=4.0
= 0.447 24.24==
sn
Tw
Desired poles:
20136)4)(52(
))(2(
232
22
+++=+++=
+++
ssssss
pswsws nn
We use the extra pole
to cancel the zero
-
8/14/2019 Adv Control & Robotic Lec 3
23/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:45
State-Feedback Controller
+++
=
)8()17()10(
100
010
321 kkk
BKA
20136)4)(52(
))(2(
232
22
+++=+++=
+++
ssssss
pswsws nn
Desired:
By inspection: k1=10, k2=-4, k3=-2
METR4202/7202AAdvan
cedControl&Robotics,
Semester2,
2005:Page:46
State-Feedback Controller: Original
Korig = K * P-1 = [ -20 10 -2]
DBAIC +== 1)()(
)()( s
sU
sYsT
Verify design withdesired poles
-
8/14/2019 Adv Control & Robotic Lec 3
24/24
METR4202/7202AAdvancedContro
l&Robotics,
Semester2,
2005:Page:47
Class Exercise: DC Motor Control
Design a state-feedbackcontroller to yield20.8% overshoot andsettling time of Ts=4.0
seconds for a step-response
Shaft
position
Follow the procedure in Example 12.4