Amme 3500 : System Dynamics & Control
State Space Design
Dr. Stefan Williams
Slide 2 Dr. Stefan B. Williams Amme 3500 : Introduction
Course Outline Week Date Content Assignment Notes 1 1 Mar Introduction 2 8 Mar Frequency Domain Modelling 3 15 Mar Transient Performance and the s-plane 4 22 Mar Block Diagrams Assign 1 Due 5 29 Mar Feedback System Characteristics 6 5 Apr Root Locus Assign 2 Due 7 12 Apr Root Locus 2 8 19 Apr Bode Plots No Tutorials 26 Apr BREAK 9 3 May Bode Plots 2 10 10 May State Space Modeling Assign 3 Due 11 17 May State Space Design Techniques 12 24 May Advanced Control Topics 13 31 May Review Assign 4 Due 14 Spare
Slide 3
Higher Order Poles
• Classical controller designs are based on selecting the location of the dominant second order pole locations
• Higher order poles are generally not able to be set explicitly
Dr. Stefan Williams Amme 3500 : State Space Slide 4
Higher Order Poles: Example
• For the following plant
• Design a PD controller to yield an overshoot of 5% and a settling time of 1s
Dr. Stefan Williams Amme 3500 : State Space
G(s) =1
s(s + 2)(s +10)
Slide 5
Higher Order Poles: Example
• Consider the design of a PD controller to achieve the required specifications
• Desired root locations are at
Dr. Stefan Williams Amme 3500 : State Space
s = !4 ± 4.08 j
x x x
x
x
o
!z "!1 "!2 "!3 = (2k +1)180°!z = 134.4 +116.1+ 34.2 "180!z = 104.7°# zc = 2.93 With K=44.7
Slide 6
Higher Order Poles: Example
Dr. Stefan Williams Amme 3500 : State Space
Slide 7
Higher Order Poles
• As can be seen, the position of the higher order poles can have a significant impact on the actual system behaviour
• Classical techniques do not easily afford us with a means of choosing the position of higher order poles
Dr. Stefan Williams Amme 3500 : State Space Slide 8 Dr. Stefan Williams Amme 3500 : State Space
State Space Modelling
• Recall that for the state space approach, we represent a system by a set of n first-order differential equations:
• The output of the system is expressed as: !x = Ax +Bu
[ ]= +y Cx Dux - state vector y - output vector u - input vector
A - state matrix B - input matrix C - output matrix D - feedthrough or feedforward matrix (often zero)
Slide 9 Dr. Stefan Williams Amme 3500 : State Space
State Space Control • We can represent a
general state space system as a Block Diagram.
• If we feedback the state variables, we end up with n controllable parameters.
• State feedback with the control input
u=-Kx +r.
* N.S. Nise (2004) “Control Systems Engineering” Wiley & Sons
Slide 10 Dr. Stefan Williams Amme 3500 : State Space
State Space Control
• We can then control the pole locations by finding appropriate values for K
• This allows us to select the position of all the closed loop system roots during our design.
• There are a number of methods for selecting and designing controllers in state space, including pole placement and optimal control methods via the Linear Quadratic Regulator algorithm.
Slide 11 Dr. Stefan Williams Amme 3500 : State Space
State Space Control
• Setting u=-Kx+r yields
• Rearranging the state equation and taking LT yields
• Essentially we select values of K so that the
eigenvalues (root locations) of (A-BK) are at a particular location
˙ x (t) = Ax(t) + B(!Kx(t) + r)y(t) = Cx(t)
sX(s) = A ! BK( )X(s) + BR(s)sI! A ! BK( )( )X(s) = BR(s)
X(s)R(s)
= sI! A ! BK( )( )!1B
Slide 12
Pole Placement
• Given a system of the form
• We can find the characteristic equation by solving for det(sI-(A-BK))
Dr. Stefan Williams Amme 3500 : State Space
A =
0 1 0 !0 0 1 !" " " #
!a0 !a1 !a2 !
000
!an!1
"
#
$ $ $ $
%
&
' ' ' '
B =
00"1
"
#
$ $ $ $
%
&
' ' ' '
C = c1 c2 ! cn[ ]
Slide 13
Pole Placement
• Using u=-Kx, we can find the system matrix A-BK
• With characteristic equation of the form
Dr. Stefan Williams Amme 3500 : State Space
A ! BK =
0 1 0 !0 0 1 !" " " #
!(a0 + k1) !(a1 + k2) !(a2 + k3) !
000
!(an!1 + kn )
"
#
$ $ $ $
%
&
' ' ' '
det(sI! (A ! BK)) = sn + (an!1 + kn )sn!1
+! + (a1 + k2)s + (a0 + k1) = 0Slide 14
Pole Placement
• Given a desired pole placement of
• and equating terms, we find
• or
• This will allow us to place all of the closed loop poles where we want them
Dr. Stefan Williams Amme 3500 : State Space
sn + dn!1sn!1 +! + d1s + d0 = 0
di = ai + ki+1 i = 0,1, 2,…, n !1
ki+1 = di ! ai
Slide 15
Pole Placement • Represent the plant in state space via the
phase-variable form • Feed back each phase variable to the input
of the plant through a gain, ki • Find the characteristic equation of the closed-
loop system • Decide upon closed-loop pole locations and
determine an equivalent characteristic equation
• Equate like coefficients of the characteristic equations and solve for ki
Dr. Stefan Williams Amme 3500 : State Space Slide 16
Pole Placement Example
• For the following plant
• Design a full state feedback controller to yield an overshoot of 5% and a settling time of 1s
Dr. Stefan Williams Amme 3500 : State Space
G(s) =1
s(s + 2)(s +10)
Slide 17
Pole Placement Example
• The OL transfer function for the system is
• Convert the transfer function to SS
Dr. Stefan Williams Amme 3500 : State Space
˙ x 1˙ x 2˙ x 3
!
"
# # #
$
%
& & &
=0 1 00 0 10 '20 '12
!
"
# # #
$
%
& & &
x1
x2
x3
!
"
# # #
$
%
& & &
+001
!
"
# # #
$
%
& & & u
y = 1 0 0[ ]x
G(s) =1
s3 +12s2 + 20s( )
Slide 18
Pole Placement Example • Decide on desired root locations • From specifications, we require
– 5% OS and – settling time of 1s
• Select dominant second order roots to be at
• Select third root 5 times to left at • Desired characteristic equation:
Dr. Stefan Williams Amme 3500 : State Space
s = !4 ± 4 j
s = !20
s3 + 28s2 +192s + 640
Slide 19
Pole Placement Example
• Feeding back states we find
Dr. Stefan Williams Amme 3500 : State Space
˙ x = Ax + Bu= Ax + B(!Kx + r)= A ! BK( )x + Br
˙ x 1˙ x 2˙ x 3
"
#
$ $ $
%
&
' ' '
=0 1 00 0 10 !20 !12
"
#
$ $ $
%
&
' ' ' !
0 0 00 0 0K1 K2 K3
"
#
$ $ $
%
&
' ' '
(
)
* *
+
,
- -
x1
x2
x3
"
#
$ $ $
%
&
' ' '
+001
"
#
$ $ $
%
&
' ' ' r
Slide 20
Pole Placement Example
• So
• Solve for the characteristic equation
Dr. Stefan Williams Amme 3500 : State Space
sX =0 1 00 0 1
!K1 !(20 + K2) !(12 + K3)
"
#
$ $ $
%
&
' ' '
(
)
* *
+
,
- - X +
001
"
#
$ $ $
%
&
' ' ' r
s !1 00 s !1K1 (20 + K2) s + (12 + K3)
= 0
s3 + (12 + K3)s2 + (20 + K2)s + K1 = 0
Slide 21
Pole Placement Example
• Equating like terms we find
• So
Dr. Stefan Williams Amme 3500 : State Space
s3 + 28s2 +192s + 640s3 + (12 + K3)s
2 + (20 + K2)s + K1
K1 = 640K2 = 172K3 = 16
Slide 22
Pole Placement Example
• Looks like we have met the overshoot and settling time requirements
• However, steady state error is not addressed here
Dr. Stefan Williams Amme 3500 : State Space
Slide 23
Steady State Error • Full state feedback does not directly
address the issue of steady state error • A common strategy is to feedback the
output and add additional state variables
Dr. Stefan Williams Amme 3500 : State Space
* N.S. Nise (2004) “Control Systems
Engineering” Wiley & Sons
Slide 24
Steady State Error
• Looking at the previous diagram, we find
• We can augment the state equations yielding
Dr. Stefan Williams Amme 3500 : State Space
˙ x N = e = r !Cx
˙ x ˙ x N
!
" #
$
% & =
A 0'C 0!
" #
$
% &
xxN
!
" #
$
% & +
B0!
" #
$
% & u +
01!
" # $
% & r
y = C 0[ ] xxN
!
" #
$
% &
Slide 25
Steady State Error
• But
• So
• We can now choose gains to yield desired pole locations and zero steady state error
Dr. Stefan Williams Amme 3500 : State Space
u = !Kx + KE xN = ! K KE[ ] xxN
"
# $
%
& '
˙ x ˙ x N
!
" #
$
% & =
A ' BK BKe
'C 0!
" #
$
% &
xxN
!
" #
$
% & +
01!
" # $
% & r
y = C 0[ ] xxN
!
" #
$
% &
Slide 26
Steady State Error Example
• Let’s consider the previous example where we wanted the roots at
• We now have an additional pole which we will place at s=100 so the new desired characteristic equation is
Dr. Stefan Williams Amme 3500 : State Space
s3 + 28s2 +192s + 640
s4 +128s3 + 2992s2 +19840s + 64000
Slide 27
Steady State Error Example
• The system is now characterised by
• Finding the eigenvectors of this equation yields
Dr. Stefan Williams Amme 3500 : State Space
sXXN
!
" #
$
% & =
0 1 0 00 0 1 0
'K1 '(20 + K2) '(12 + K3) Ke
'1 0 0 0
!
"
# # # #
$
%
& & & &
(
)
* * * *
+
,
- - - -
XXN
!
" #
$
% & +
001
!
"
# # #
$
%
& & & r
s4 + (12 + K3)s3 + (20 + K2)s
2 + K1s + Ke
-C
BKe
Slide 28
Steady State Error Example
• Equating like terms we find
• So
Dr. Stefan Williams Amme 3500 : State Space
s4 + (12 + K3)s3 + (20 + K2)s
2 + K1s + Ke
s4 +128s3 + 2992s2 +19840s + 64000
K1 = 19840K2 = 2972K3 = 116Ke = 64000
Slide 29
Steady State Error Example
• We now have a system that meets all of our requirements
• We haven’t considered the required control effort
Dr. Stefan Williams Amme 3500 : State Space Slide 30
Observer Design
• The previous development assumes that we have access to all state variables for state feedback
• In some instances, the state variables may not be available – They may be difficult to observe – Sensors may be expensive
Dr. Stefan Williams Amme 3500 : State Space
Slide 31
Observer Design • We may need to
design an Observer to estimate the state variables
• We can compare the estimated output against the measured output to close the loop on our estimate
• The estimated state is then used as the feedback in the controller
Dr. Stefan Williams Amme 3500 : State Space
* N.S. Nise (2004) “Control Systems Engineering” Wiley & Sons
Slide 32 Dr. Stefan Williams Amme 3500 : State Space
Linear Quadratic Regulator Control
• Optimal control methods attempt to find optimal gains subject to certain conditions
• One such algorithm is called the Linear Quadratic Regulator (LQR) algorithm.
• An objective/cost function can be defined and the appropriate state feedback gain K that minimizes the cost function can be found.
• Weighting factors/matrices are used to penalize the states and control input. This generally requires a good engineering judgment depending on the control performance requirements.
Slide 33 Dr. Stefan Williams Amme 3500 : State Space
LQR Control • Consider a dynamic system in a state space
form:
• We can set a particular objective/cost function which governs the performance of the closed-loop system:
• Here, Q and R are the weighting matrices that respectively penalize the states x and control input u (Q!0, R>0).
J = xTQx + uTRu( )0
!
" dt
˙ x = Ax + Bu
Slide 34 Dr. Stefan Williams Amme 3500 : State Space
LQR Control • Then, the state feedback gain that minimizes this
cost function is:
• P can be obtained by solving the Riccati equation:
• In Matlab, the feedback gain can be found via [K]=lqr(system,Q,R)
ATP + PA ! PBR!1BTP +Q = 0
u = !(R!1BTP)x = !Kx
Slide 35 Dr. Stefan B. Williams Amme 3500 : Introduction
An Example System
Slide 36 Dr. Stefan B. Williams Amme 3500 : Introduction
Inverted Pendulum
Inverted pendulum – video courtesy of Colorado State University
Slide 37
Inverted Pendulum
• We will look at the modelling and control of the inverted pendulum solutions provided by the University of Michigan
• http://www.engin.umich.edu/class/ctms/examples/pend/invpen.htm
Dr. Stefan Williams Amme 3500 : State Space Slide 38
State Space Systems
• There are many other aspects of state space systems that we have not touched on here
• These include accounting for non-linear or digital systems
• We have also only touched briefly on optimal control methods
Dr. Stefan Williams Amme 3500 : State Space
Slide 39 Dr. Stefan Williams Amme 3500 : State Space
Conclusions
• We have looked at techniques for modelling systems using State Space techniques.
• We have provided a brief introduction to designing controllers using the State Space techniques using pole placement and the LQR algorithm.
Slide 40 Dr. Stefan Williams Amme 3500 : State Space
Further Reading
• Nise – Sections 3.1-3.7 and 12.1-12.8
• Franklin & Powell – Section 2.2 and 7.1-7.6
Top Related