r i'
Linear Contro l Theory
Linear Control Theory The State Space Approach
Frederick Walker Fairman Queen's University, Kingston, Ontario, Canada
John Wiley & Sons Chichester • New York· Weinheim ·Brisbane· Singapore· Toronto
Copyright
1998 John Wiley & Sons Ltd, Baffins Lane, Chichester. West Sussex P019 IUD, England 01243 779777 National International ( -r 44) 1243 779777
e-mail (for orders and customer service enquiries): cs-books(c!;wiley.co.uk Visit our Home Page on http:/ jwww.wiley.co.uk or http://www. wiley .com All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means electronic, mechanical, photocopying , recording, scanning or otherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency, 90 Tottenham Court Road, London WIP 9HE, UK without the permission in writing of the Publisher. Other Wiley Editorial Offices
John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012, USA Wiley-VCH Verlag GmbH, Pappelallee 3, D-69469 Weinheim, Germany Jacaranda Wiley Ltd, 33 Park Road, Milton, Queensland 4064, Australia John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809 John Wiley & Sons (Canada) Ltd, 22 Worcester Road, Rexdale, Ontario M9W ILl, Canada
Library of Congress Cataloguing-in-Publication Data
Fairman, Frederick Walker. Linear control theory : The state space approach ; Frederick Walker Fairman. p. em. Includes bibliographic al references and index. ISBN 0-471-97489-7 (cased: alk. paper) I. Linear systems. 2. Control theory. I. Title. QA402.3.F3 1998 97-41830 629.8'312-dc21 CIP British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library ISBN 0 471 97489 7 Typeset in part from the author's disks in 10jl2pt Times by the Alden Group, Oxford. Printed and bound from Postscript files in Great Britain by Bookcraft (Bath) Ltd. at least This book is printed on acid-free paper responsibly manufacture d from sustainable forestry, in which two trees are planted for each one used for paper production.
To Nan cy for her unt irin g sup por t
crt,,
Contents xiii
Preface
1
Introduction to State Space 1.1 1.2
1.3 1.4
1.5
1.6
1.7
1.8
1.9
1.10 1.11
2
Introdu ction Review of Second Order System s Pattern s of behavi or 1.2.1 1.2.2 The phase plane Introdu ction to State Space Modeli ng Solving the State Differe ntial Equatio n The matrix expone ntial 1.4.1 1.4.2 Calcula ting the matrix expone ntial 1.4.3 Proper and strictly proper rationa l functio ns Coordi nate Transfo rmation Effect on the state model 1.5.1 1.5.2 Determ ination of eAt Diagon alizing Coordi nate Transf ormatio n Right-e igenve ctors 1.6.1 1.6.2 Eigenv alue-ei genvec tor proble m 1.6.3 Left-eig envect ors 1.6.4 Eigenv alue invaria nce State Traject ories Revisit ed Straigh t line state trajecto ries: diagon al A 1.7.1 1.7.2 Straigh t line state trajecto ries: real eigenv alues 1.7.3 Straigh t line trajecto ries: comple x eigenv alues 1.7.4 Null output zero-in put respon se State Space Models for the Comple te Respon se Second order proces s revisite d 1.8.1 1.8.2 Some essent ial feature s of state models 1.8.3 Zero-s tate respon se Diagon al form State Model Structu re 1.9.1 1.9.2 Proper ties 1.9.3 Obtain ing the diagon al form state model Compu ter Calcula tion of the State and Output Notes and Refere nces
State Feedback and Controllability 2.1 2.2 2.3
Introdu ction State Feedba ck Eigenv alue Assign ment Eigenv alue assign ment via the contro ller form 2.3.1
1
2 5 7 9 9 10 12 12 13 14 15 16 17 19 20 21
22 23
24 25 26 26 28 29 32 32 33 35 37 39
41 41 42
44 45
viii
2.4
2.5
2.6 2.7
3
2.3.2 Realizing the controller form 2.3.3 Controller form state transformation 2.3.4 Condition for controller form equivalence 2.3.5 Ackermann"s formula Controllability 2.4.1 Controllable subspace 2.4.2 Input synthesis for state annihilation Controllable Decomposed Form Input control of the controllable subspace 2.5.1 Relation to the transfer function 2.5.2 Eigenvalues and eigenvectors of A 2.5.3 Transformation to Controllable Decomposed Form Notes and References
State Estimation and Observability
47 49 50 52 55 56 59 60 61 62 63 64 66
67
Introduction Filtering for Stable Systems Observers Observer Design Observer form 3.4.1 Transformation to observer form 3.4.2 Ackermann's formula 3.4.3 Observability A state determination problem 3.5.1 3.5.2 Effect of observability on the output Observable Decomposed Form 3.6.1 Output dependency on observable subspace 3.6.2 Observability matrix 3.6.3 Transfer function 3.6.4 Transformation to observable decomposed form Minimal Order Observer 3.7.1 The approach 3.7.2 Determination of xR(t) 3.7.3 A fictitious output 3.7.4 Determination of the fictitious output 3.7.5 Assignment of observer eigenvalues Notes and References
67 68 69 71 72 73 74 75 75
Model Approximation via Balanced Realization
91
4.1 4.2 4.3 4.4
91 91 94 96 96 98 99 101 104 107 108 109 111 111 112 114
3.1 3.2 3.3 3.4
3.5
3.6
3.7
3.8
4
~
Contents
4.5 4.6 4.7
4.8
4.9
Introduction Controllable-Observable Decomposition Introduction to the Observability Gramian Fundamental Properties of W0 4.4.1 Hermitian matrices 4.4.2 Positive definite and non-negative matrices 4.4.3 Relating E0 to -\[W0 ] Introduction to the Controllability Gram ian Balanced Realization The Lyapunov Equation Relation to the Gramians 4.7.1 Observability, stability, and the observability Gramian 4.7.2 Controllability Gramian Revisited The least energy input problem 4.8.1 Hankel operator 4.8.2 Notes and References
77 78 79 80 80 81 82 82 83 84 85 86 90
Content s
"-
115
Quadratic Control
5
5_1 5.2 5.3
5.4
5.5
5.6 5.7 5.8
6
6.3
6.4 6.5
6.6 6.7
7
Introd ucti on Observe r Based Controlle rs Quadrat ic State Feedbac k Control Motivatin g the problem 5.3.1 5.3.2 Formula ting the problem 5.3.3 Develop ing a solution Solving the OCARE Stabilizin g solutions 5.4.1 5.4.2 The Hamilton ian matrix for the OCARE 5.4.3 Finding the stabilizin g solution Quadrat ic State Estimatio n Problem formulat ion 5.5.1 5.5.2 Problem solution Solving the QFARE Summar y Notes and Referenc es
Introduc tion LOG State Feedbac k Control Problem Problem formulat ion 6.2.1 6.2.2 Develop ment of a solution LOG State Estimatio n Problem Problem formulat ion 6.3.1 6.3.2 Problem solution LOG Measure d Output Feedbac k Problem Stabilizin g Solution The Hamilton ian matrix for the GCARE 6.5.1 6.5.2 Prohibiti on of imagina ry eigenval ues 6.5.3 lnvertab ility of T11 and T21 6.5.4 Conditio ns for solving the GFARE Summar y Notes and Referenc es
7.3
Introduc tion Time Domain Spaces 7.2.1 Hilbert spaces for signals 7.2.2 The L 2 norm of the weightin g matrix 7.2.3 Anticaus al and antistabl e systems Frequen cy Domain Hilbert Spaces 7.3.1 The Fourier transform 7.3.2 Converg ence of the Fourier integral 7.3.3 The Laplace transform 7.3.4 The Hardy spaces: 1-£ 2 and 7.3.5 Decomp osing £ 2 space 7.3.6 The H2 system norm The H:x. Norm: SISO Systems 7.4.1 Transfer function characte rization of the Hx norm 7.4.2 Transfer function spaces 7.4.3 The small gain theorem The Hoo Norm: MIMO Systems 7.5.1 Singular value decompo sition
Hi
7.4
7.5
147 149 149 150 153 154 155 157 158 158 159 162 165 166 166
167
Signal and System Spaces 7.1 7.2
115 116 119 120 121 122 127 127 130 133 137 137 140 143 145 145
147
LQG Control 6.1 6.2
ix
167 167 168 170 172 173 173 175 176 177 178 179 181 181 183 184 185 185
Contents
X
7.6 7.7
8
System Algebra 8.1
8.2
8.3
8.4
8.5
8.6
8.7 8.8
9
Introduction Parallel connection 8.1.1 8.1.2 Series connection System Inversion Inverse system state model 8.2.1 SISO system zeros 8.2.2 MIMO system zeros 8.2.3 Zeros of invertible systems 8.2.4 Coprime Factorizatio n Why coprime? 8.3.1 Coprime factorizatio n of MIMO systems 8.3.2 Relating coprime factorizatio ns 8.3.3 State Models for Coprime Factorizatio n Right and left coprime factors 8.4.1 Solutions to the Bezout identities 8.4.2 Doubly-cop rime factorizatio n 8.4.3 Stabilizing Controllers Relating W(s) to G(s), H(s) 8.5.1 A criterion for stabilizing controllers 8.5.2 Youla parametriza tion of stabilizing controllers 8.5.3 Lossless Systems and Related Ideas All pass filters 8.6.1 Inner transfer functions and adjoint systems 8.6.2 Summary Notes and References
H00 State Feedbac k and Estimation 9.1 9.2
9.3
9.4
9.5 9.6 9.7
10
7.5.2 Induced 2-norm for constant matrices 7.5.3 The L.x. Hx norm for transfer function matrices Summary Notes and References
Introduction Hoo State Feedback Control Problem 9.2.1 Introduction of P_ 9.2.2 Introduction of G~(s) 9.2.3 Introduction of J-inner coprime factorizatio n 9.2.4 Consequen ces of J-inner coprime factorizatio n Hoc State Feedback Controller Design equations forK 9.3.1 On the stability of A+ B 2 K 2 9.3.2 Determinat ion of 6. 9.3.3 Hx State Estimation Problem Determinat ion of Te(s) 9.4.1 Duality 9.4.2 Design equations for L 2 9.4.3 Sufficient Conditions Summary Notes and References
H00 Output Feedbac k Control 10.1 10.2
Introduction Developme nt
186 189 190 191
193 193 193 195 196 197 198 199 200 201 202 204 205 206 207 209 212 213 214 215 217 219 220 221 223 223
225 225 227 229 229 230 231 234 234 236 239 242 242 243 244 245 246 246
247 247 248
Cont ents
10.3
10.4
10.5 10.6
10.2.1 Refor mulat ion of P" 10.2.2 An Hx state estim~tor ack 10.2.3 Introd ucing estim ated state feedb Hx Outpu t Feed back Contr ollers 10.3.1 Centr al contr oller 10.3.2 Contr oller param etriza tion 10.3.3 Relat ion to Youla param etriza tion Hx Sepa ration Princ iple 10.4.1 A relati on betwe en Hami ltonia ns 10.4.2 Relat ing stabil izing soluti ons 10.4.3 Deter minat ion of L0 Summ ary Notes and Refer ences
Linear Alge bra
A
A.1 A.2 A.3 A.4 A.5
Multi ple Eigen value s and Contr ollabi lity Block Uppe r Trian gular Matri ces Singu lar Value Deco mpos ition (SVD) Differ ent Form s for the SVD Matri x Inver sion Lemm a (MIL)
B
Reduced Ord er Model Stability
c
Problems C.1 C.2 C.3 C.4 C.5
D
Probl ems Relat ing to Chap ter 1 Probl ems Relat ing to Chap ter 2 Probl ems Relat ing to Chap ter 3 Probl ems Relat ing to Chap ter 4 Probl ems Relat ing to Chap ter 5
MATLAB Experiments 0.1
0.2
D.3
0.4
State Mode ls and State Resp onse 0.1.1 Contr oller form 0.1.2 Seco nd order linear beha vior 0.1.3 Seco nd order nonlin ear beha vior 0.1.4 Diago nal form Feed back and Contr ollabi lity 0.2.1 Contr ollabl e state mode ls 0.2.2 Unco ntroll able state mode ls Obse rver Base d Contr ol Syste ms 0.3.1 Obse rver based contr ollers vior 0.3.2 Obse rver based contr ol syste m beha State Mode l Redu ction ble syste ms 0.4.1 Deco mpos ition of uncon trolla ble and/o r unob serva ty 0.4.2 Weak contr ollabi lity and/o r obser vabili rvabi lity 0.4.3 Energ y interp retati on of the contr ollabi lity and obse Gram ians 0.4.4 Desig n of reduc ed order mode ls
xi 248 251 253 254 255 256 260 261 262 267 269 269 270
271 271 272 274 276 277
279
283 283 285 287 288 290
293 293 293 293 295 296 297 297 298 299 301 303 303 304 305 306 307
References
309
Index
313
Preface g control This book was written with the intent of prmidin g students and practicin system control use to needed theory engineers with the basic backgro und in control those of nt treatme detailed a with begins design software more productively. The book the of er remaind the in needed are that aspects of the state space analysis of linear systems manner: text. The book is organized in the following n \ia • The first four chapters develop linear system theory including model reductio balanced realization. • Chapter s S and 6 deal with classical optimal control theory. Hx control • The final four chapter s are devoted to the development of suboptim al theory. needed The mathem atical ideas required in the development are introduc ed as they are beyond venture to reader the e motivat to using a "just-in -time" approac h. This is done ic contror ', .the usual topics appeari ng in introduc tory undergr aduate books on .. automat leYel books duate postgra to d restricte been to more advanced topics \Yhich have so far titles. their in control" "robust and having the terms "mathem atical control theory" the final at course ester two-sem or one a This book can be used as the text for either lewl. duate postgra g beginnin the at course r year undergr aduate level or as a one semeste " or S}Stems and ''signals either in course Students are assumed to have taken a basic state the of ge knowled tory introduc an . "autom atic control ... Althoug h not assumed would space analysis of systems together with a good understa nding of linear algebra book. this in d presente ideas benefit the reader's progress in acquiring the t Yiew of Ideas presented in this book which provide the reader with a slightly differen are as ks textboo other reading by d obtaine control and system theory than would be follows: and 1or • The so-called PBH test \Yhich is usually presented as a test for controllability ues in eigenval obserYability is used through out the present book to characterize output and;or control problems involving eigenvalue assignment by state feedback injection. deYelop• An easy to underst and matrix Yariational technique is used to simplify the LQG and ic ment of the design equation s for the time invarian t, steady-state. quadrat controllers. ment of the • The relatively simple idea of the L 2 gain is used as a basis for the develop H 00 controller.
xiv
Preface
Concerning the style of the book, the beginning section, "Introduction", for each chapter contains motivational material and an overview of the ideas to be introduced in subsequent sections in that chapter. Each chapter finishes with a section called "Notes and References", which indicates a selection of other sources for the material treated in the chapter, as well as an indication of recent advances with references. I would like to thank the following colleagues in the Department of Electrical and Computer Engineering at Queen's University for proof-reading parts of the manuscript: Norm Beaulieu, Steve Blostein, Mingyu Liu, Dan Secrieu and Chris Zarowski. Special thanks go to my former research student Lacra Pavel for proof-reading and advice on Chapters 6, 9 and 10 as well as to Jamie Mingo in the Department of Mathematics and Statistics at Queen's University for his help with some of the ideas in Chapter 7. Thanks go also to Patty Jordan for doing the figures. Finally, I wish to acknowledge the contribution to this book made by my having supervised the research of former research students, especially Manu Missaghie, Lacra Pavel and Johannes Sveinsson. The author would appreciate receiving any corrections, comments, or suggestions for future editions should readers wish to do so. This could be done either by post or e-mail: <
[email protected] >.
1 Introduction to State Spa ce
1.1
Introduction
A well known behavioral phenomen on of dynamic systems is the appearanc e of an output in the absence of an input. This effect is explained once it is recognized that the internal storage of energy in the system at the beginning of the response time will produce an output. This kind of behavior is referred to as the system's zero-input response. Alternative ly, the production of an output caused solely by an input when there is no energy storage at the start of the response time is referred to as the zero-state response. These two classes of response are responsibl e for all possible outputs and in the case of linear systems we can always decompose any output into the sum of an output drawn from each of these classes. In this chapter \Ye will use the example of a second order system together with both the zero-input response and the zero-state response to introduce the reader to the use of the state space in modeling the behaYior oflinear dynamic systems.
1.2
Review of Second Order Systems
A commonly encountere d physical process which we will use in the next two sections to introduce the state modeling of linear dynamic systems is the electric circuit formed by connecting an ideal constant resistor Rc, inductor Le, and capacitor Ce in series in a closed loop as shown in Figure 1.1 Suppose the switch is closed at t = t, < 0 so that there is a current flow i(t). t ::.0: 0. and a voltage across the capacitor y(t), t ::.0: 0. Then applying Kirchhoff' s voltage law yields
Rei(t)
+Led~~)+ y(t) =
0
where the current in the circuit depends on the capacitor voltage as
"( ) =
l
t
ce dy(t) dt
Combining these equations gives a second order differential equation in the capacitor voltage, y(t), d l'(t) d\·(t) (1.1) -·-+a2 y(t) = 0 -·-+a I dt dt 2
2
Introduction to State Space
i(t)
L,
Switch
C,
Figure 1.1
y(t)
Electric circuit with charged capacitor. Switch closed prior to t = 0
where
and we refer to the capacitor voltage as the system's output.
1.2.1
Patterns of behavior
The differential equation (1.1) is said to gm;ern the evolution of the output, y( t), since it acts as a constraint relating y( t), d~~t) , and ddt~r) to each other at each instant of time. We will see now that once the initial conditions, i.e., the values of initial output, y(O), and initial derivative of the output, y(O), are specified, the differential equation, (1.1 ), completely determines the output, y(t), for all positive timet E (0, oo). We obtain y(t) as follows. Suppose we have y(t) such that (1.1) is satisfied. Then denoting the derivatives of y(t) as dy(t) = g(t) dt
d2y( t) = h( t) dt 2
we see that equation (1.1) becomes ( 1.2)
Now the only way this equation can hold for all t > 0 is for h(t) and g(t) to be scalar multiples of y(t) where g(t)
=
sy(t)
( 1.3)
Otherwise equation (1.2) can only be satisfied at specific instants of time. Therefore with this assumption assumption (1.2) becomes p(s)y(t) = 0
( 1.4)
Review of Second Order Systems
3
where p(s) is the second degree polynomial pi,sj =
l- + a 1 1--:- a2
Finally, equation (1.4) holds for all time, when y( t) is not zero for all time, i.e., the trivial solution. if and only if sis any one of the roots. {..\, : i = 1, 2} of p(s),
(1.5) Returning to the requirement that y(t) and its derivatives must be constant scalar multiples of each other, equation ( 1.3), the function that has this property is the and has series expansion exponential function. This important function is denoted as
est=~ (st)i ~
i=O
.,
( 1.6)
/.
where i!. (factorial i). is the product i! = ( i) ( i - 1) (i - 2) ... ( 1)
i i
=1
>0 =0
Notice that a bit of algebra shows us that the derivative of ~.Y. equation (! .6 ). has the desired property of being an eigenfunction for differentiation, dest
-=se dt
sr
Now we see from the foregoing that est satisfies equation (1.1) when s = )q or .A 2 . Therefore any linear combination of e)'~t and e>-,t satisfies equation (1.1) so tharthe output y(t) is given in general as
(1.7) where the k;s are constant scalars chosen so that y(t) satisfies the initial conditions. We can be do this by solving the equations which result from setting the given values for the initial conditions, y(O) and y(O). equal to their values determined from equation ( 1. 7), i.e., by solving ( 1.8)
for k1, k2. Notice that we can do this only if .A 1 t- A.c- In orderto proceed when A. 1 = .A2 we replace equation (1.7) with ( 1.9)
4
Introduction to State Space
and determine the k;s from the appropriate equations to ensure that the initial conditions are satisfied. Returning to the behavior of the physical process that is under analysis, notice that since R"' Le, and Ce are real, the a;s are real. As a consequence the roots >.; of p(s). equation (1.5), are both real or are both complex. Moreover when these roots are complex they are conjugates of each other, i.e., ).. 1 = >.2. More generally, if all the coefficients of a polynomial of any degree are real, each complex root must be matched by another root which is its complex conjugate. This property is important in the context of the behavior oflinear physical processes since the parameters of these processes, e.g., mass, heat conductivity, electric capacitance, are always real so that the coefficients of p(s) are always real. Now a plot of the output, y( t), versus time, t, reveals that there are two basic patterns for the behavior of the output depending on whether the >..;s are real or are complex conjugate pairs. If the A;s are real, we see from equation (1.8) that the k;s are also real and the output y(t): t E (0, oo) is given as equation (1.7) or (1.9). In this case we see that the output voltage y(t) exhibits at most one maximum and decays without oscillation to the time axis as t tends to infinity. Notice from equation (1.5) that the A;s are real provided the parameters Re, L"' Ce have values such that C'i/ ~ a2 . < a2 , then we see from (1.5) that Alternatively, if the >..;s are complex, i.e., if >.. 1 = X2 and from (1.8) that k 1 = k;. Thus k 1 e>'~ 1 and k 2e>- 21 are complex conjugates of each other and their sum which gives y(t), equation (1.7), is real. Incorporating these conjugate relations for the >..;sand the k;s in equation ( 1. 7) allows us to write the output as a damped oscillation
C1/
(1.10) where k 1 = Re[kt]
+ jim[kt]
_ _1 (Im[ktl) e -tan Re[ki] Thus we see from (1.1 0) that the output voltage across the capacitor, y( t), swings back and forth from its initial value to ever smaller values of alternating polarity. This behavior is analogous to the behavior of the position of a free swinging pendulum. The capacitor voltage (pendulum position) eventually goes to zero because of the loss of heat energy from the system resulting from the presence of Re (friction). In this analogy, voltage and current in the electric circuit are analogous to position and velocity respectively in the mechanical process. The inductance Le is analogous to mass since the inductance resists changes in the current through itself whereas the inertial effect of mass causes the mass to resist change in its velocity. In addition, notice from equation ( 1.1 0) that the frequency of the oscillation, Im[).. J], as well as the time constant associated with the decay in the amplitude of the oscillation, (Re[>..J])- 1 , are each independent of the initial conditions and depend on the system parameters, Re, Le, Ce only, i.e., on a1, az only.
Review of Second Order Systems
5
The previous discussion leads to the following characterization of the zero-input · response of dynamic processes whose behavior can be modeled by second order differential equations with constant coefficients. 1 (i) The zero-input response, y(t): t > 0, depends on the set of signals {e'\; : i = 1, 2} referred to as modes of the system where the constants >..il (system eigenvalues), are roots of the polynomial p(s), (characteristic polynomial). (ii) The steady state zero-input response is zero, i.e., limy(t) = 0, for any initial conditions if and only if all the >..;s are negative or have negative real part, i.e., Re[>..;] < 0, i = 1, 2 . In this situation we say that the system is stable. (iii) We have Re[>..;] < 0, i = 1, 2, if and only if a 1 > 0 and a 2 > 0. More generally, the condition a; > 0, i = 1, 2, · · · n for systems whose behavior is governed by differential equations in the order of n > 2, is necessary but not sufficient for the system to be stable, i.e., is necessary but not sufficient for all >..;s to have negative real part t~oo
1.2.2
The phase plane
We have just seen that, when there is no input, a second order system having specified a;s has output,y(t), which is specified completely by the initialconditions,y(O) andy(O). This important observation suggests that the same information concerning the behavior of the system is contained in either (a) a plot of y(t} versus tor (b) a plot of y(t) versus y(t). Thus if we make a plot of y(t) versus y(t), the point representing y(t),y(t) in the y(t) versus y(t) plane traces out a curve or trajectory with increasing time. The two dimensional space in which this trajectory exists is referred to as the state space and the two-element vector consisting of y(t) and y(t) is referred to as the state, denoted as x(t) where
x(t)
=
[~(t)] y(t)
This approach to visualizing the behavior of a dynamic process was used by mathematicians at the end of the last century to investigate the solutions for second order nonlinear differential equations, i.e., equations of the form (1.1) but with the a;s functions of y(t) and/or y(t). The term phase plane plot was used to refer to the state trajectory in this case. Since, in general, the dimension of the state space equals the order of the differential equation which governs the output behavior of the process, the state space cannot be displayed for systems of order greater than two. Even so, the mathematical idea of the state space has become of great practical and theoretical importance in the field of control engineering. Referring to the previous section, we see that the state trajectory for a dynamic process whose behavior can be modeled by a second order differential equation with constant coefficients; can exhibit any one of the following four fundamental shapes. (i) If the A;s are complex and Re[>..;] < 0 the system is stable and the state trajectory spirals inwards towards the origin. (ii) If the \·s are complex andRe[>..;] > 0 the system is unstable and the state trajectory spirals outwards away from the origin.
6
Introduction to State Space
y(t)
b d
y(t)
y(t)
a
Figure 1.2
Plot of y(t) vs. t and y(t) vs. y(t) when A;s complex
(iii) If the A.;s are real and both A;s are negative the system is stable and the state trajectory moves towards the origin in an arc. (iv) If the A.;s are real and one or both are positive the system is unstable and the state trajectory moves away from the origin in an arc. Notice that state trajectories (ii) and (iv) do not occur in the present example of an electric circuit. This results from the fact that the parameters R"' Le, Ce are positive. Thus the coefficients, a; : i = 1, 2 of the characteristic polynomial, equation (1.4) are positive so that the A;S are negative or have negative real parts. This implies that we are dealing with a stable dynamic process, i.e., state trajectories tend to the origin for all initial states. So far in this chapter we have used an electric circuit as an example of a system. We used the character of the behavior of this system in response to initial conditions to
Introduction to State Space Modeling
7
introduce the concept of the state of a system. In the next section this concept is made more specific by introducing the mathematical characterization of a system referred to as a state model.
1.3
Introduction to State Space Modeling
We saw in the previous section that once a second order system is specified, i.e., once the a;s are given numerical values, the zero-input response is determined completely from the system's initial conditions, y(O),y(O). In addition, we noted that the second derivative of the output is determined at each instant from y(t) and y(t) through the constraint (1.1). These facts suggest that it should be possible to obtain the zero-input response by solving two first order differential equations involving two signals, x 1 ( t), x 2 ( t), which are related uniquely to y(t),y(t). One straightforward way of doing this is to identify y(t) with x 1 (t)and y(t) with x 2 (t), i.e.,
y(t)
= XJ (t)
(1.11)
y(t) = x 2 (t)
( 1.12)
An immediate consequence of this identification is that at every instant the derivative of x 2 (t) equals x 1 (t)
x2(t)
( 1.13)
= x1 (t)
Moreover, rewriting the second order differential equation, (1.1), as
:t (y(t)) =
~a 1 y(t) ~ a2y(t)
andusing equations (1.11-1.13) gives us the differential equation for x 1 (t) ail(1.14)
Thus we see from equation (1.13) and (1.14) that the derivative of each of the x;s is a (linear) function of the x;s. This fact is expressed in matrix notation as ( 1.15)
x(t) = Ax(t) where
A=
[ ~al I
x(t)=
[xi(t)] x2(t)
with the vector x(t) being referred to as the state, and the square matrix A being referred to as the system matrix. In addition we see from equation (1.12) that
y(t) = Cx(t)
(1.16)
Introduction to State Space
8
where
c
=
[0
1]
t matrix. with C being a row vector referred to as the outpu ion (1.1) is equivalent to the vector equat ential differ In summ ary the second order (I.l6) . These equat ions, (1.15, 1.16) differential equat ion (1.15) and the outpu t equat ion system in the absence of an input. constitute a state mode l for the second order d by a block diagr am involving the Alternatively, the state model can be represente integrators, and scalar multipliers interc onnec tion of blocks which opera te as summers, tor 1/sis used to indicate integration. on the comp onent s of the state. The Laplace opera to obtai n a state model for the More generally, we can use the foregoing procedure sses as follows. zero-input response of higher order dynam ic proce 1h order process is gover ned by n an of nse respo Supp ose the zero- input ( 1.17) where
fy comp onent s of the state with Then we proce ed as in the second order case to identi derivatives of the outpu t as
(t) = y(n~l)(t) x2(t) = Y(n~2)(t)
X]
(1.18)
equat ion (1.15) having a system Thus using (1.17, 1.18) we obtai n a vecto r differential
x.(t)
i,(t)
x,(t)
x,(t)
-a,
-a,
Figure 1.3
Block diagra m repres entati on of the state model
·g
Solving the State Differential Equation
matrix A given as -a I 1
A=
-a2
0
-a3 0
-an
0
0
0
0
0
0
0
0 (1.19)
and output equation, (1.16), having an output matrix C given as
c=
[0
... 0
1]
The pattern of zeros and ones exhibited in A, (1.19), is of particular importance here. Notice that the coefficients of the characteristic polynomial
appear as the negative of the entries in the first row of A. Matrices exhibiting this pattern are referred to as companion matrices. We will see shortly that given A in any form, the characteristic polynomial is related to A as the matrix determinant
p(s)
=
det[s/- A]
This fact is readily seen to be true in the special case when A is in companion form.
1.4
Solving the State Differential Equation
Recall that the solution to a scalar differential equation, e.g., (1.1), involves the scalar exponential function, e>.t. In this section we will show that the solution to the state differential equation, (1.15), involves a square matrix, eAt, which is referred to as the matrix exponential.
1.4.1
The matrix exponential
Suppose we are given the initial state x(O) and the system matrix A, either constant or time varying. Then we obtain a solution to the state differential equation, (1.15), by finding (t), the square matrix of scalar functions of time, such that
x(t) = (t)x(O)
(1.20)
where (t) is referred to as the transition matrix. Since the state at each instant of time must satisfy the state differential equation, (1.15), the transition matrix is a matrix function of the system matrix A. In this book A is constant. In this case the dependency of (t) on A is captured by the notation
(t)
=eAt
(1.21)
10
Introduction to State Space
where the square matrix eAt is referred to as the "matrix exponential of At" since it can be expressed as an infinite series reminiscent of the infinite series for the exponential of a scalar. (1.5), i.e., ( 1.22)
In order to show that the transition matrix given by (1.22) solves the state differential equation, (1.15), we differentiate the foregoing series expansion for the matrix exponential of At to obtain 2A 2 t 3A 3 t 2 At deA 1 ~=A+--+--Ae
2!
dt
=
3!
4A 4 t3
+--+··· 4!
AeAt
Then using this relation to differentiate the assumed solution x(t) =eAr x(O)
( 1.23)
yields
x(t) = AeA 1x(O) = Ax(t) and we see that (1.23) solves the state differential equation, (1.15).
1.4.2
Calculating the matrix exponential
There are many ways of determining eAt given A. Some of these approaches are suitable for hand calculation and others are intended for use with a digital computer. An approach of the first kind results from using Laplace transforms to solve the state differential equation. We develop this approach as follows. We begin by taking the Laplace transform of (1.15) to obtain ( 1.24)
sX(s) - x(O) = AX(s)
where A is 2 x 2 we have x;
Xi(s) =
j xi(t)e-' dt 1
0
Then rewriting (1.24) as (sf- A)X(s)
= x(O)
( 1.25)
we see that provided sis such that (sf- A) is invertible, we can solve (1.25) for X(s) as X(s) = (sf- A)- 1x(O)
( 1.26)
Solving the State Differential Equation
11
Now (sl- A)- 1 can be expressed using Crammer's rule as (
sl -A
)
adj[s/- A] - det[s/ -A]
_1 _
where when A is an n x n matrix, the adjugate matrix, adj [s/ - A], is an n x n matrix of polynomials of degree less than n and det[s/ - A] is a polynomial of degree n. Finally, taking the inverse Laplace transform of (1.26) yields
x(t) = £- 1 [(s/- A)- 1)x(0) and we see, by comparing this equation with (1.23), that
Now in the case where A is the 2 x 2 matrix given by (1.15), we have (sl _A)-I= adj[s/- A] det[s/- A]
=
[
s+ai -1
a2]-I
(1.27)
s
/
where
adj[s/- A]=
[s s -a2] +a 1
1
Notice from the previous section that det[s/- A]= p(s), (1.4), is the characteristic polynomial. In general any n by n system matrix A has a characteristic polynomial with roots {>..i : i = 1, 2 · · · n} which are referred to as the eigenvalues of A. The eigenvalues of the system matrix A play an important role in determining a system's behaviq.r. Returning to the problem of determining the transition matrix for A, (1.15), we apply partial fraction expansion to the expression for (sl- A)- 1 , (1.27), assuming det[s/- A] has distinct roots, i.e., >.. 1 -1 >..2 , to obtain (1.28) where
12
Introduction to State Space
Finally, taking the inverse Laplace transform of (1.28), we obtain the transition matrix a~~ -)q)•'l(e>" 1 -.\2e;.,,
-
e.>.'')]
+ AJe;.,,
(1.29)
We will show in the next section that there are other ways of modeling a dynamic process in the state space. This non-uniqueness in the state model representation of a given dynamic process results from being able to choose the coordinates for expressing the state space. In the next section we will use this fact to simplify the determination of eAr by working in co-ordinates where the state model has a diagonal A matrix.
1.4.3
Proper and strictly proper rational functions
Before continuing to the next section, notice that when A is ann x n matrix, adj [sf - A] is an n x n matrix of polynomials having degree no larger than n - 1. Thus, since the characteristic polynomial for A, det[sl- A], is of degree n, we see from (1.27) that 1 is ann x n matrix of strictly proper rational functions. (sfIn general a rational function
Ar
n(s) r(s) = d(s) is said to be; (i) strictly proper when the degree of its numerator polynomial is less than the degree of its denominator polynomial, i.e., deg[n(s)] < deg[d(s)] (ii) proper when the degree of its numerator polynomial equals the degree of its denominator polynomial, i.e., deg[n(s)]
=
deg[d(s)]
In subsequent chapters we will see that this characterization of rational functions plays an important role in control theory.
1.5
Coordinate Transformation
In Section 1.3 we saw that the zero-input response for a system could be obtained by solving a state vector differential equation where the components of the state were identified with the output and its derivatives. In this section we examine the effect of changing this identification.
.
..,.,.
~··.
Coordinate Transformation
1.5.1
13
Effect on the state model
Referring to the second order process used in the previous section, let x( t) denote the state obtained by setting
= v[x1(t)] [.Y(t)] y(t) x (t)
(1.30)
2
where Vis any invertible (nonsingular) 2 x 2 matrix of constants. In the previous section V was the identity matrix. Now we see from (1.11, 1.12, 1.30) that the state x(t) used in the previous section is related in a one-to-one fashion to the state x(t) as
x(t)
(1.31)
Vx(t)
=
where we say that x(t) is the state in the old or original coordinates and x(t) is the state in the new or transformed coordinates. Then the state model parameters in the old coordinates, (A, C), are transformed by a change of coordinates to (A, C) in the new coordinates as
v
- -
(A, C) ~ {A, C)
(1.32)
where
We can develop this relation as follows. First using (1.31) in (1.15) we obtain
V x= AVx(t) which, since V is invertible, can be multiplied throughout by
x (t) = Ax(t) where
Again, using (1.31) in (1.16) we obtain
y(t) = Cx(t) where
v-I
to give
14
Introduction to State Space
Notice that the transition matrix, eAt, which applies in the new coordinate s is related to the transition matrix, eAt, in the original coordinate s as
(1.33)
1.5.2
Determination of eAt
The flexibility provided by being able to choose the coordinate s for the state model representa tion of a dynamic process is often of considerab le use in the analysis and design of control systems. We can demonstra te this fact by using a change of coordinate s to calculate the transition matrix. Suppose we are given a two dimension al system matrix A having a characteris tic polynomia l, det[s/- A], with distinct roots (eigenvalues), i.e., )q -=f. >. 2 . Then we can always find a coordinate transforma tion matrix V so that the system matrix A in the new coordinate s is diagonal and
i (t) = Ax(t)
( 1.34)
where
with entries along the diagonal of A being the eigenvalues of A. Now when the system matrix is diagonal, the correspond ing transition matrix is also diagonal. We can see this by noting that the state differential equation in these coordinate s, (1.34), consists of two scalar first order differential equations which are uncoupled from each other
x 1(t)
=
.A 1x 1(t)
x2(t)
=
>-2x2(t)
so that their solution can be immediate ly written as
x1 (t) = /· 1 t x1(0) x2 (t) = e>.'tx 2 (0)
( 1.35)
which in matrix form is ( 1.36)
Diagonalizing Coordinate Transformation
15
Thus we see that the transition matrix is indeed diagonal
Having determined the transition matrix for A, we can use (1.33) to determine the transition matrix for A as
(1.37) with V being the coordinate transformation matrix which makes A diagonal. Now we will see in the next section that, in general, the coordinate transformation matrix V needed to make A diagonal depends on the eigenvectors of A. However in the special case when A is a 2 x 2 companion matrix, (1.15), with >.. 1 -=1- >..2, the required coordinate transformation matrix is simply related to the eigenvalues of A as
(1.38) We can see that this coordinate transformation gives rise to a diagonal system matrix by / . using
(1.39) to obtain
Then since J + a1s + a2 = (s- A.I)(s- >..2) we have a 1 = -(>.. 1 + >.. 2) and""a2 = >..,>..2. Therefore the foregoing expression for A reduces to
(1.40) Finally, the expression obtained for eAt using V, (1.38), in (1.37) equals (1.29) which was obtained at the end of Section 1.4 through the use of Laplace transforms. The foregoing approach to the determination of the transition matrix requires the determination of a coordinate transformation matrix V which diagonalizes the system matrix A. We will see in the next section that the columns of the coordinate transformation matrix required to do this are right-eigenvectors for A.
1.6
Diagonalizing Coordinate Transformation
As mentioned previously, the roots of the characteristic polynomial for a square matrix A are called the eigenvalues of A. In this section we will see that corresponding to each of A's
Introd uctio n to State Spac e
16
igenvector. More over we will see that eigenvalues there is at least one right and one left-e transf orma tion V requi red to make when the eigenvalues of A are distinct, the coord inate A. [n addit ion we will see that A diagonal has columns equal to the right-eigenvectors of of A. ectors v-I has rows which are the transpose of the left-eigenv
1.6.1
Righ t-Eig env ecto rs
matri x in comp anion form, (1.15), Cons ider the special case when A is a two-b y-two g the chara cteris tic polyn omial as having unequ al eigen value s{.\: 1,2}. Then writin At= -a 1 Ai- a 2 we see that i
= 1, 2
(1.41)
or
i = 1, 2
( 1.42)
where
i = 1, 2 the i1h eigenvalue, right-eigenvector Notic e that (1.42) is a general expression relating vi is said to be the right-eigenvector pair (Ai, vi) for the any squar e matri x A, where a major role in the state analysis of corre spond ing to the eigenvalue Ai· These pairs play prese nt instan ce is a result of A being systems. The partic ular dependence of vi on Ai in the in comp anion form. v- 1A V diagonal, we combine the Conti nuing with the const ructio n of V to make n equat ions given by (1.42) fori= 1 and i = 2 to obtai
AV= VA
( 1.43)
where V, A are given as
A=[A01 A2OJ A , V is invertible and we can preNow when A has distinct eigenvalues, i.e., A1 i= 2 multiply (1.43) by v- 1 to obtai n
matri x requi red to make A diagonal. Thus we see that Vis the coord inate trans forma tion necessarily in comp anion form, x, More generally, suppo se A is any n x n matri not out that this condi tion of turns it Now j. which has distin ct eigenvalues, ,\ i= A1 : i ic of A to be indep enden t, i.e., vi and vi distinct eigenvalues is sufficient for the eigenvectors enden t colum ns and is theref ore point in different directions. There fore V has indep
Diagona lizing Coordina te Transfor mation
17
invertible where (1.44) i
=
1, 2,- · · ,n
( 1.45)
and v- 1AVis diagonaL In the special case when A is in compani on form, (1.19), its eigenvalues, {>..- : i = 1, 2, · · · , n} are related to its eigenvectors, {vi : i = 1, 2, · · · , n} as ,n-1 v iT -:_ [ /\" I
.A;
1)
In order to see that this result holds, set the last entry in vi equal to one. Then taking A in compani on form, (1.19), solve the last scalar equation in (1.45) and use the result to solve the second to last scalar equation in (1.45). We continue in this way solving successive scalar equation s in (1.45), in reverse order, until we reach the first scalar equation. At this stage we will have all the entries in vi. These entries satisfy the first scalar equation in (1.45) since A; is a root of the characteristic polynomial whose coefficients appear with negative signs along the first row of A. Jn general, when A is not in any special form, there is no special relation between the eigenvalues and the corresponding eigenvectors. Thus in order to determine the eigenvalue, right-eigenvector pairs when A is not in any special form we need to determine (.A;, vi) : i = 1, 2, · · · n so that the equations i = 1,2, · · ·n
(1.46)
are satisfied.
1.6.2
Eigenvalue-Eigenvector problem
The problem of determining (.A;, vi) pairs which satisfy (1.46) is referred to as the eigenvalue-eigenvector problem. There are well established methods for solving this problem using a digital computer. In order to gain additional insight into the nature of the eigenvalue-eigenvector problem we consider a theoretical approach to finding eigenvalue-eigenvector pairs to satisfy (1.46). To begin, suppose we rewrite (1.46) as (AI- A)v = 0
(1.47)
where 0 denotes the null vector, i.e., a vector of zeros. Then in order for the solution v to this equation to be non-null we must choose .A so that the matrix .AI - A is singular, i.e., does not have an inverse. Otherwise, if AI- A is invertible we can solve (1.47) as
~nd the only solution is the trivial solution v = 0. However when (AI - A) is not Invertible, (1.47) can be satisfied by v f= 0.
Introduction to State Space
18
Now from Cramme r's rule for matrix inversion we have (AI _ A )_ 1= adj[M- A]
det[M- A] an Therefor e )...] -A does not have an inverse when det[>..I -A] = 0, i.e., )... = >..; eigenvalue of A. Next recall that singular matrices have dependen t columns. Therefor e A;!- A has dependen t columns so that we can find scalars {vk : k = 1, 2, · · · , n} not all zero such that n
L[(\1 - A)]ku~
= 0
( 1.48)
k=l
be where [(>..J- A)]k: k = 1,2· · · ,n denote columns of >..J- A. Notice that (1.48) can where vi = v and >..; = )... rewritten as (1.47) with
Since we can always multiply (1.48) through by a nonzero scalar a, the solution, vi, to (1.48) or (1.47) is not unique since m/ is another solution. More generally, we say that the eigenvectors of a given matrix are determin ed to within a scalar multiple, i.e., the directions of the eigenvectors are determin ed but their lengths are arbitrary . Assumin g that A has a complete set of (n independ ent) right-eigenvectors, we can decompo se any initial state as n
x(O) = l:a;vi = Va
(1.49)
i=l
where
with the a 1s being found as a=
v- 1x(O)
This decompo sition of the state into a linear combina tion of right-eigenvectors of A plays an importan t role in the analysis of system behavior. This is illustrate d in the next of section where we will use the eigenvectors of A to reveal certain fundame ntal properties state trajectories. Unfortun ately, when an n x n matrix A has multiple eigenvalues, i.e., when det[>..I - A] does not have n distinct roots, the number of eigenvectors may or may not be equal ton, i.e., A may or may not have a complete set of eigenvectors. When A does not ed have a complete set of eigenvectors, other related vectors, referred to as generaliz a provide to tors eigenvectors, (Appendix), can be used together with the eigenvec it case this in However (1.49). decompo sition of the state space in a manner similar to
Diagonalizing Coordinate Transformation
19
is impossible to find a nonsingular matrix V such that v- 1AVis diagonal. Then A is said to be not diagonalizable. In summary, the condition that A has distinct eigenvalues is sufficient but not necessary for A to be diagonalizable. Most of the time, little additional insight into control theory is gained by discussing the case where A does not have a complete set of eigenvectors. Therefore, we are usually able to avoid this complication without loss of understanding of the control theory.
1.6.3
Left-Eigenvectors
Suppose A is any n x n matrix having n distinct eigenvalues. Then we have seen that the matrix V having columns which are right-eigenvectors of A is invertible and we can write (1.50) where Avi =>..;vi: i = 1, 2, ···nand /
Now suppose we post-multiply both sides of (1.50) by
v- 1 to obtain
v- 1A = Av- 1 Then if we denote
(1.51)
v- 1 in terms of its rows as
and carry out the matrix multiplication indicated in (1.51) we obtain
A] [)..>..2w2T w Tl
w:T A ws [
..
1
1
.
...
wnT A
)..n wnT
Therefore it follows, by equating corresponding rows on either side of this equation, that i = 1,2, · · · ,n
(1.52)
20
Introduction to State Space
which transposing through out gives i = 1, 2, · · ·, n
( 1. 53)
of AT Thus we see from equatio n (1.53) that the column vector w; is an eigenvector left the on with corresponding eigenvalue .A.;. However, since the row vector wiT appears it ish distingu to side of A in equatio n (1.52), w' is referred to as a left-eigenvector of A from the correspo nding right-eigenvector of A, namely, v;. rs just Notice that, since v-I V is an identity matrix, the left and right-eigenvecto defined are related to each other as
=0 i=fj} = 1 i =i
(1.54)
In addition notice that any nonzero scalar multiple of w;
satisfies (1.52), i.e.
Therefore zi is also a left-eigenvector of A and we see ftom equation (1.54) that the left and right eigenvectors are related as ziT v
1
=0 = 'li =I 0
i
=I j
i
=j
in general
nality This basic characteristic ofleft and right-eigenvectors, referred to as the orthogo r of behavio the to property, is responsible for a number of fundam ental facts relating state models.
1.6.4
Eigen value invari ance
eigenvalues Before we go to the next section, it is importa nt to note the basic fact that the invertible of A and of A are the same whenever A is related to A as A = v-I A V for any v-I and matrix V. We can see this by premultiplying both sides of equatio n (1.45) by inserting vv-I between A and vi, viz.,
Then setting
ti
= v-I vi and taking v-I A v =A gives
Thus the which implies that the eigenvalue, right-eigenvector pairs for A are (A.;, t;).
State Trajectories Revisited
21
eigenvalues of A equal the eigenvalues of A independent of the coordinate transformation matrix V. Alternativelv. another way we can see this fact is to carry out the following manipulations det[s/- A]= det[sl- V- 1AV] = det[V- 1 (s/- A)Vj
v-I det[s/- A1 det V
=
det
=
det[s/- A]
Thus A and A have the same characteristic polynomial, and since the roots of a polynomial are uniquely dependent on the coefficients of the polynomial. A and A have the same eigenvalues. Finally, since the differential equations modeling the behavior of dynamical processes must have real coefficients, we can always work in coordinates where the state model parameters, (A, C), are real. As a consequence, if (.\,vi) is a complex eigenvalue-eigenvector pair for A, then (,>,j. l,tx) is also an eigenvalue-eigenvector pair for A.
1. 7
State Trajectories Revisited
We saw in Section 1.6.2 that assuming A has a complete set of eigenvectors. any initial state can be written in terms of the eigenvectors of A, (1.49). In this section this fact is used ~to gain additional insight into the nature of a system's state trajectories and zero-input response. More specifically, under certain conditions on the matrix pair, (A, C), a system can exhibit a null zero-input response, y(t) = 0 for all r > 0, for some non-null initial state, x(O) -=1- ¢.When this occurs we say that the state trajectory is orthogonal (perpendicular) to cT, denoted cT __Lx(t), since the output depends on the state as y(t) = Cx(t). Two vectors a, f3 are said to be orthogonal if aT
f3 = 0
When the state space is n dimensional, a state trajectory which produces no output lies in an n - 1 dimensional subspace of state space which is perpendicular to the vector cT. For example, if the system is second order, this subspace is a straight line perpendicular to cT: if the system is third order. this subspace is a plane perpendicular to cT Thus, in the second order case, we obtain a null output if we can find an initial state such that it produces a straight line trajectory
x(t)
=
1(t)v
satisfying Cv
=0
where !(t) is a scalar function of time and vis a constant two-element vector. When n > 2,
Introduction to State Space
22
straight line any trajecto ry orthogo nal to cT can be decomp osed into a sum of re an Therefo cT. to nal trajecto nes all lying in the n - 1 dimensi onal subspac e orthogo property the of nding understa an understa nding of straight line trajectories is essential to states. posed by certain systems of having a null zero-inp ut response to certain initial
1.7.1
Straig ht line state trajectories: diago nal A
a straight line Suppose A is a 2 x 2, real, diagona l matrix. Then the state trajecto ry is can see this We axes. ate whenever the initial state lies only on one of the two coordin immedia tely as follows. Conside r the initial states
x1 (0) =
[
.X1 (0)]
0
1.5.2 that where x1 (0) and, x2 (0) ~re any real nonzero scalars. Then recalling from Section the state that (1.36) from see we l, the transitio n matrix eAt is diagona l when A is diagona correspo nding to each of these initial states is
x(t)=
[.xJ(OJe,x'r]
x(t) =
[.x2 (~e,\2 t J
for x(O)
= x1(0)
for x(O)
=
(1.55) x 2 (0)
ates The foregoin g suggests that the trajecto ry for any initial state in these coordin
x(O)
=
[~I (0)] x2(0)
can be written as
( 1.56) where
/ :k
=
1, 2
are columns from the 2 x 2 identity matrix, viz.,
ry More generally, when A is a real, diagona l, n x n matrix, the state trajecto
(1.57) results when the initial state
State Trajectories Revisited
23
has components which satisfy
.X;(O)
=0 #0
fori# k
fori= k
where ik is the k 1h column from the n x n identity matrix. The foregoing result implies that the zero-input state response for any initial state can be written as n
x(t)
= .L:(xk(O)/'k 1) / k=I
when n
x(O)
=
L .xk(O)ik k=I
In summary, the state trajectory is the vector sum of state trajectories along coordinate axes where each coordinate axis trajectory depends on one of the system modes in the set ). I . of _system modes, {e k : k = 1, 2 · · · , n}. 1 Now in order to generalize the foregoing result to the case where A is not diagonal, we suppose, in the next section, that the foregoing diagonal case resulted from a coordinate transformation from the original coordinates in which A is given.
1.7.2
Straight line state trajectories: real eigenvalues
Recalling that V, equation (1.44), is the coordinate transformation needed to diagonalizeA and taking x(O) as in (1.57) we have (1.58) where Avk = >.kvk. Then, using the series expansion for the matrix exponential, (1.22), we see that when x(O) is given by equation (1.58) we have
(1.59) Now with >.k real we see from equation (1.59) that the point representing the state moves along the eigenvector, if, towards the origin when >.k < 0 and away from the origin when >.k > 0. The case where >.k is complex is taken up in the next subsection. More generally, assuming A has a complete set of eigenvectors, we can write any initial state as n
x(O)
= 2:: "(;Vi i=I
(1.60)
Introduction to State Space
24
where 'Y
=
v-t x(O) and
Then the state trajectory can be written as n
x(t) =
2,:,)'Y;e.\')v;
(1.61)
i=l
Now recall, from Section 1.2, that a system is stable if lim x(t)
=
for all x(O)
0
( 1.62)
t--+'XJ
Therefore assuming A has real eigenvalues, we see from equation (1.59) that the system is stable if and only if i = 1, 2, · · ·, n
It should be emphasized that a system is stable if and only if equation (1.62) is satisfied. Therefore if we need to restrict the initial condition in order to ensure that the zero-input state trajectory goes to the origin, the system is not stable. For example, referring to the expansion (1.60), any initial state, x(O), which is restricted so that its expansion satisfies
ri = o
when\ 2': 0
has a state trajectory which goes to the origin with time even though A has some nonnegative eigenvalues.
1.7.3
Straight line trajectories : complex eigenvalue s
Since the differential equations governing the input-output behavior of the physical processes we are interested in controlling have real coefficients, we can always choose to work in coordinates so that A, Care real matrices. Then since the eigenvalues, if complex, occur in conjugate pairs we see that the corresponding eigenvectors are also conjugates of each other, i.e., if(>., v) is a complex, eigenvalue-eigenvector pair, then(>.*, v*T) is also an eigenvalue-eigenvector pair of A. Now if the initial state is any scalar multiple of the real or imaginary part of v, the resulting state trajectory lies in a two dimensional subspace of state space composed from the real and imaginary parts of v. More specifically, suppose ( 1.63)
where 'Y is any real scalar and v
= Re[v] + jlm[v]
25
State Trajectories Revisited
Then frow (1.59) we obtain
x(t)
=
O:re(t)Re[v]
+ O:;m(t)Im[v]
( 1.64)
where
a,e(t) =
1'eRe[.X]t cos(Im[A.]t)
O:;m(t) =
-1'eRe[.X]t
sin(Im[A.]t)
The foregoing generalizes the observation made at the beginning of the chapter that, for second order systems, spiral shaped trajectories result when the roots of the characteristic equation consist of a complex conjugate pair. In the present case where the system order n > 2, the spiral shaped trajectory lies in a two-dimensional subspace of the n-dimensional state space. Notice that the initial stat~ was chosen to ensure that the state x( t) is real. However if we choose the initial state as
/'
with the real scalars o:; satisfying
. then x(O) would be complex and the resulting trajectory would lie in a 2-dimensional subspace of a complex state space.
1.1.4
Null output zero-input response
Having discussed straight line state trajectories, we return to the problem $.tated at the beginning ofthis section concerning the possibility of having initial states which produce null outputs. Suppose the output matrix happens to satisfy (1.65) for some eigenvector, v\ of A. Then it follows from (1.59) that if x(O) = 1'kvk then
and we see the output is null for all time when the initial state lies along vk. This effect of the existence of non-null initial states which do not affect the output, is related to a property of the state model's A and C matrices which is referred to as the system's observability (Chapter 3). More is said about this matter in Section 3.5.2. In order to obtain some appreciation of the importance of this effect consider a state model with A having all its eigenvalues, except A.k, in the open left-half plane. Then this state model is internally unstable since x( 0) = vk produces a trajectory which moves away
Introduction to State Space
26
equa tion (1.65) from the origin. How ever if C satisfies outp ut a;Jd in this case we have
this traje ctor y has no effect on the
for all x(O)
lim y(t) = 0
t-v:yc
and the system is exte rnal ly stable. beha vior mod el is inter nally unst able its outp ut This dem onst rate s that while the state ical process, ly impossible to exactly mod el a phys is stable. How ever , since it is practical r only and is resp onse to initial state s exists on pape the fore goin g stab ility of the outp ut in on, we say not robu stly outp ut stable. For this reas referred to by saying that the system is open left-half A matr ix has all its eigenvalues in the that a system is stab le if and only if its plane. which uctiv e to cons ider cond ition s on C Before we leave this section, it is instr t and leftfied. Recall, from Section 1.6.3, that righ guar ante e that equa tion (1.65) is satis eigenvalues are orth ogon al, eigenvectors corr espo ndin g to different
of eigenvectors so that The refo re supp ose A has a com plete set of the left-eigenvectors of A,
we can expa nd C in terms
n
C
( 1.66)
L...a ;wiT = "'"' I
when ak = 0 fied whe n Cis inde pend ent of wk, i.e., The n we see that equa tion (1.65) is satis pter 3 to acte riza tion of C will be used in Cha in equa tion (1.66). This stru ctur al char h relat e to their observability. develop prop ertie s of state models whic
1.8
lete Response State Space Models for the Comp
section el a syst em's zero -inp ut response. In this So far we have used the state space to mod zeroem's syst a of g conn ectio n with the mod elin we take up the use of the state space in state response.
1.8.1
Sec ond ord er pro ces s rev isit ed
age source Sect ion 1.2, supp ose we conn ect a volt Retu rnin g to the electric circuit used in (cap acito r t) al equa tion gove rnin g the outp ut, y( as show in Figu re 1.4. The n the differenti voltage), beco mes d2y(t) +a dy(t ) +a2y(t) 1 dt dt2
and where u(t) is the inpu t (sou rce voltage)
alla 2
= b2u(t)
are as in (1.1) with b2
( 1.67)
= a2 .
State· Space Models for the Complete Response
27
i(t)
u(t)
Vollagc Souroc
y(t)
Figure 1.4 Electric circuit with voltage input
Suppose, as in Section 1.3, that we choose the components of the state as [ xx 1 (t)] 2 (t)
[y(t)]
(1.68)
y(t)
so that (1.69)
"Then we see from (1.67) that (1.70)
and from (1.68-1. 70) that the state differential equation and output equation are given as
x(t) = Ax(t) + Bu(t)
(1.71)
y(t)
(1.72)
=
Cx(t)
where
A= [
-a, 1
B=
[~]
C= [ 0
with B being referred to as the input matrix. This state model is complete in as much as it can be used to obtain the output caused by any specified combination of initial state, x(O), and input, u(t). We will see that the matrix product of the initial state and transition matrix, which gives the zero-input response, is replaced in the calculation of the zero-state response by an integral, referred to as the convolution integral, of the i:nput and transition matrix. Before showing this, consider the following modification of the foregoing state model.
Introduction to State Space
28
Suppose we rewrite (1.67) as
where
and proceed in the manner used to get equation (1.71, 1.72). This gives the alternative state model
+ Bcu(t)
: 1 and m > 1 are referred to as multiple-input-multipleoutput (MIMO) systems and systems having p = 1 and m = 1 are referred to as singleinput-single-output (SISO) systems.
1.8.3
Zero .. state response
Recall from Section 1.3 that the zero-input response, Y:,(t), depends on the transition matrix and initial state through multiplication as Yzi(t) = CeAr x(O). In this section we will show that the zero-state response, Yzs(t), depends on the transition matrix and the input through integration as
where the integral is known as the convolution integral. We begin the development of the foregoing relation by assuming that the initial state is null, x(O) = o, and that the state model parameters. (A, B, C, D) are known. Then taking Laplace transforms throughout the state differential and output equations, ( 1. 74 ),
lntf'oduction to State Space
gives sX(s)
=
AX(s)
+ BU(s)
( 1.7 5)
Yzs(s)
=
CX(s)
+ DU(s)
(1.76)
Next solving (1.75) for X(s) yields X(s) = (sf- A)- 1 BU(s) and substituting this expression for X(s) in (1.76) yields Yzs(s) = G(s) U(s)
( 1. 77)
G(s) = C(sf- A)- 1B + D
(1.78)
where
Now, recalling from Section 1.4.3 that (sf - A) - 1 is a matrix of strictly proper rational functions, we see that Gsp(s) is strictly proper where
so that
=0
lim Gsp(s) S--->00
Thus G(s), (1.78) is given by G(s)
= Gsp(s) + D
( 1.79)
and lim G(s) = D S--->00
Notice that two state models which are related by a coordinate transforma tion have the same transfer function. We can see this by calculating the transfer function using the state model in the transformed coordinates, (A, ii, C, D) -
-
-
1-
-
G(s)=C( sl-A)- B+D and substituting A=
v- 1AV, ii = v- 1B, C = CV, I>= D to obtain G(s)
= CV[V- 1 (sf- A) vr 1 v- 1B + D = C(sf- A)- 1B + D = G(s)
State Space Models for the Complete Response
31
Next recalling the following general property of Laplace transforms
J 00
Yzs(s) = F,(s)Fz(S)¢=}-Yzs(t) =
J,(t- T)fi(T)dT
0
we see that setting
F1 (s) = C(sl- A)- 1 so that
fi (t) = CeAt
f 2 (t) = Bu(t)
gives the inverse transform of (1. 77) as
Yzs(t) =
C
1
00
eA(t-r) Bu(T)dT
+ Du(t)
Notice that when Dis null and the input is an impulse, u(t)
(1.80)
= 8(t), (1.80) gives
/
( 1.81)
In addition recalling from section 1.4.2 that
we see that Yzs(t), (1.81), has Laplace transform equal to Gsp(s) as we expect since the Laplace transform of the impulse response equals the transfer function. In addition we see from (1.81) that the zero-input response equals the impulse response when the initial state is x(O) = B. Now we need to define eAt as a null matrix when t < 0 in (1.80, 1.81). This is done to match the mathematics to the physical fact that the future input, u(T) : T > t, does not affect the output at time t, i.e., y 2 s(t) is independent of future values of the input. This property of the transition matrix, i.e., (t) = 0 for all t < 0, is referred to as the causality constraint and applies when we use the transition matrix in connection with the zero-state response. Thus the causality constraint forces the integrand in (1.80) to be null forT> t and enables (1.80) to be rewritten as
Notice that when the transition matrix is used in connection with the zero-input response we can interpret¢( -t) fort> 0 as the matrix needed to determine the initial state from the state at timet, i.e., x(O) = ¢>( -t)x(t), which implies that¢( -t) is the inverse of (t). At this point we can see, by recalling the principle of superposition, that when a system is subjected to both a non-null initial state, x{O), and a non-null input, u(t), we can write
32
Introduction to State Space
the output as y(t)
= Yz;(t)
+ Yz (t)
(1.82)
1
where Yz;(t)
= CeA 1x(O)
Yzs(t)
=Clot
eA(t-T) Bu(T)dT
+ Du(t)
Notice that: (i) y 2 ;(t), the zero-input response, is caused solely by to x(O) (ii) Yzs(t), the zero-state response, is caused solely by to u(t). In this section we have developed several essential relations involving the state model of a dynamic process. These important relations provide the complete response of a system to any specified input and any specified initial state.
1.9
Diagonal Form State Model
In subsequent chapters we will encounter a number of fundamental properties of state models in connection with their use in the design of feedback control systems. A simple way of beginning to appreciate these properties is to consider state models in coordinates where the system matrix A is diagonal. This type of state model is referred to as a diagonal or normal form state model. We encountered this model earlier in Section 1.5.2 in connection with the determination of the matrix exponential, and in Section 1. 7.I in connection with straight line state trajectories.
1.9.1
Structure
Suppose the state model for a given nth order SISO system has an A matrix which is diagonal. Then the state vector differential equation decomposes into n scalar equations
x;( t)
=
.\x;( t)
+ b;u( t)
i = I, 2, · · ·, n
(1.83)
with the output being a scalar multiple of these components 11
y(t)
=
L c;x;(t) + Du(t)
( 1.84)
i=l
We can visualize these equations as a block diagram of the sort introduced in Section 1.3 to model the zero-input response. Alternatively, when we view this state model in the frequency domain so as to obtain the plant's transfer function, we see that since the state model's system matrix, A, is
Diagonal Form State Model
Figure 1.5
33
Block diagram representation for diagonal form state model
di~onal, we have (sf- A)- 1 diagonal,
0 0 (1.85)
0
0
This fact simplifies the dependency of the transfer function on the elements in the Band C matrices since we have G(s) = C(sl- A)- 1 B + D
C·b· =~ L-'-'-+D i=1
s- .A;
(1.86)
where
1.9.2
Properties
Notice from (1.83) that the evolution of the components of the state, xk(t), are dccoupled from each other, i.e., xk(t) is independent of {x;(t): i E [O,n], i # k}. This fact plays an important role in the following discussion.
34
Introduction to State Space
We begin by noting that this decoupling of components of the state from each other implies that any component of the state, say xk(t), depends on the input through the kth component of the input matrix, bkl only. Therefore, if one of the components of B is zero, the corresponding component of the state is not affected by the input. Alternatively, notice from (1.86) that when bk = 0, the transfer function, G(s), does not have a pole at ).,k and the zero-state response does not involve the mode e>.k 1. These phenomena are related to a property of state models known as controllability. Roughly speaking, a system is said to be controllable if its state can be forced, by the input, to equal any point in state space at some finite time . Therefore if bk = 0, the evolution of the kth component of the state, xk(t), is independent of the input, u(t), and the state model is not controllable since there is no way of manipulating the input to make xk(t1 ) equal some specified value after the passage of a finite amount of time, t1 . We will see in the next chapter that controllability is a necessary and sufficient condition for being able to arbitrarily assign the closed loop system matrix eigenvalues by using state feedback. Unlike the diagonal form state model, the controllability of a state model in other coordinates, depends on both the A and B matrices. The foregoing observations were obtained by viewing the system from the input side. We can obtain dual observations by viewing the system from the output side involving the output instead of the input. We develop these observations as follows. First, since equation (1.83) decouples the evolution the components of the state from each other, we see that the output, y(t), (1.84), depends on the kth component of the state, xk(t), through ck only. Therefore, if one of the components of Cis zero, the corresponding component of the state does not affect the output. Alternatively, notice from (1.86) that when ck = 0, the transfer function, G(s), does not have a pole at )..k and the zero-state response does not involve the mode e>.kt. The foregoing phenomena are related to the property of state models known as observability. Recall that we encountered this property in the previous section in connection with the system's zero-input response. In the present instance we see that the observability of a system also relates to the system's zero-state response. Notice that unlike the diagonal form state model, the observability of a state model in other coordinates, depends on both the A and C matrices. In summary, we see from equation (1.86) that if either bk or ck is zero for some integer k E [0, n], then the system transfer function G(s) does not have a pole at Ak and the zerostate response does not involve the mode e>.kt. Moreover, under these conditions, if we transformed coordinates and recomputed the transfer function from the parameters of the state model in the new coordinates, i.e.,
we would find that the both the numerator polynomial, Cadj(s/- A)B, and denominator polynomial, det(s/- A) (or det(s/- A) since the characteristic polynomial is invariant to coordinate transformation), would have a zero at )..k· Since s- Ak would then be a common factor of Cadj(s/- A)B and det(s/- A), it would cancel from the ratio of these polynomials and be absent from the transfer function. Thus the eigenvalue of A at )..k is not a pole of G(s) and has no effect on the system's input-output. Given a transfer function, any state model that is both controllable and observable and has the same input-output behavior as the transfer function, is said to be a minimal
Diagonal Form State Model
35
realization of the transfer function. Notice that this terminology reflects the fact that lack of either controllability or observability increases the dimension of the state model over the minimal dimension needed to match the zero-state behavior of the state model with that of the transfer function. As we will see, this fact play's an important role in control theory.
1.9.3
Obtaining the diagonal form state model
The relation between the form for the transfer function, equation (1.86) and the diagonal form state model suggests a way of determining a diagonal form state model for a given SISO transfer function, G(s), having simple poles. This is done as follows. We begin by using one cycle of division when the given transfer function is proper, to separate out the strictly proper part of the transfer function. Thus suppose we are given a transfer function which is proper n
L Gp(s)
=
!
.
f3n-iS 1
i=On-1 sn + L an-isi i=O
Then dividing the denominator into the numerator enables Gp(s) to be written as the sum of a strictly proper transfer function plus a constant, i.e.,
where
i = 1,2, · · ·n .,..
Then assuming the strictly proper part, Gsp(s), can be expanded in partial fractions as n
Gsp(s) =
k·
L s_ 1
i=l
'·
( 1.87)
/\l
we can obtain the diagonal form state model by factoring the k;s as k;
.l
; ~: '
'
= C;b;
and referring to equation (1.86). Notice it is only possible to obtain a diagonal form state model if the transfer function can be expanded as equation (1.87), i.e., if the system can be decomposed into first order systems. When Gsp(s) has simple poles we can always expand Gsp(s), as equation (1.87). Notice that if Gsp(s) has gjmple poles some of which are complex, the diagonal form
Introduction to State Space
36
state model will be complex. In some situations we may want the benefits of the diagonal form state model, i.e., decoupled state differential equations, but require the state model to be real. In this case a reasonable compromis e is to combine complex conjugate pairs of terms in equation (1.87) so that the resulting realization has an A matrix which is block diagonal with each pair of complex conjugate poles correspond ing to a 2 x 2 real block on the diagonal of A. More specifically we expand Gsp (s) as
G,p(s)
=
G,pr(s)
+ G,p,(s)
(1.88)
where n,.
Gspr(s)
=
k·
L s _'A i=l
A; real 1
with the nc complex pairs of poles of Gsp(s) being the poles of Gspc(s), i.e.,
Now we can obtain a state model from (1.88) as
A=
[A1
A3
c
= [
A2] A4
cl c2]
where (A 1 ,B 1 , C 1) constitute a diagonal form state model for Gspr(s), i.e., A 1 is diagonal with diagonal elements equal to the real poles and the elements of B 1 and C 1 satisfy cub; 1 = k; fori= 1, 2, · · · n1 . Both off diagonal blocks of A, namely A 2 and A 3 are null. The remaining blocks constitute a state model for Gspc(s) as A4I
0
0
A42
0 0
0 =
B22 B2 =
A4 =
c2
B21
0
[ c21 c22
A4n,
B2n,
C2n,]
where {(A 4 ;,B2;,C2 ;): i= 1,2,···nc} are 2 dimensional real parameter state models which we obtain from { Gci : i = 1, 2, · · · nc} with
Computer Calculation of the State and Output
37
One such real parameter state model is given as A4;
= [ -~il
C2;
= [hi]
-a,.2l 0 J
i
1.89)
bi2)
Finally notice that we encountered a restricted version of the state model (1.89) in Section 1.8.1. In the next Chapter we will make extensive use of this form which is referred to as a controller form. At that time we will provide a means for its determination from a given transfer function.
1.10
Computer Calculation of the State and Output
A fundamental problem encountered in using digital computers to analyses control problems is created by the fact that the dynamic processes needing to be controlled operate in continuous time whereas digital computers perform operations in discrete time. In this section we indicate how this fundamental mismatch is overcome. In order to be able to use a digital computer to calculate the system output y(t) from (1.82) we need to employ a piecewise constant approximation of the input u( t) owr the time interval of interest, [0, tN]· This is done by partitioning the interval into N equal nonoverlaping contiguous subintervals each of time duration T. Then the piecewise constant approximation, u( t), of the input is given by u(t)
= u(t;.;)
(1.90)
where
tk = kT: k = 0, 1, 2, · · · N. The set {u(tk) : k = 0, 1, 2, · · · N} is referred to as the discrete-time equivalent of the continuous-tim e input, u(t), and the values, u(tk), of the discrete-time equivalent input are referred to as the sampled values of the input. The continuous time "staircase like" function u(t) generated by this approximation is referred to as the sample and hold equivalent of the input. Figure 1.6 shows a plot of a typical input and its sample and hold equivalent. The output, y( t), at the sample times, tk : k = 0, I, 2, · · . , N, is computed by repeating the calculation indicated in equation (1.82) for each subintenal with kT considered as the start time for the computation of y([k + 1] T). This is carried out in a cyclical fashion with the state that is computed at the end of a given subinterval being used as the initial state for the computation of the state at the end of the next subinterval. More specifically, the computations are started by specifying the initial state, x(O), and the input. u( t), over the interval of interest, [0, t\;. The computer program then decides on the sample spacing T. This is done so that the sample and hold version of the input is a "close" approximation to the actual input in the time interval [0, tN]· Then taking the
Introduction to State Space
38
u(t)
ii(t)
Figure 1.6
Typical input and its piecewise constant approximation
input as u(O) over [0, T] and using (1.82) we compute y(T) from T
x(T)
=eAT x(O)
+
j
eA(T-T) Bu(O)dT
0
y(T)
=
Cx(T)
+ Du(T)
which can be rewritten as x(T)
= Fx(O) + Gu(O)
y(T) = Cx(T)
( 1.91)
+ Du(T)
where
T
G
=
j
eA(T-T) EdT
0
Then to compute y(2T), we replace x(O) by x(T) and u(O) by u(T) in (1.91). This gives x(2T)
= Fx(T) + Gu(T)
y(2T) = Cx(2T)
+ Du(2T)
This procedure continues with the output at the (k + l)th sample time being given as
+ I)T] = Fx(kT) + Gu(kT) y[(k + I)T] = Cx[(k + l)T] + Du[(k + l)T]
x[(k
r-···
Notes and References
-~-'
39
There are several ways in which the computation ofF and G can be carried out. A simple way of doing this is to truncate the series expansion for the matrix exponential, (1.22), with the upper limit, n0 , of the sum being chosen large enough to achieve some specified accuracy. Thus F, Gin (1.91) can be expressed as
G=
(lo
0
T
no A;
i
)
L~da B+Eo i=O
l.
where the error matrices Ep and E 0 are made negligible by choosing n0 "large enough" so that we can take F and G as
/
Notice that the choice ofthe number of subintervals needed to cover the main interval, i.e., [O,tN], also plays a role in the accuracy of the computation, with an increase in accuracy being achieved at the expense of more computation time i.e., the accuracy goes up the smaller T and the larger N.
1.11
Notes and References
There have been a number of excellent textbooks expounding on state space analysis of systems. Some of these books are [5], [4], [23], [6], [9], [15]. Throughout the eighties the book by Kailath [23] was used widely as a text for courses on state space analysis of linear systems. Although Brockett's book [5], is quite old and was . written for a more mathematically sophisticated reader, the first half of the book does give the reader a nice exposure to the more general nature of the subject. The treatment of state modeling in the brief book by Blackman [4], shares the view with the present book that understanding basic ideas in the state space can be facilitated by thinking geometrically. Concerning books that provide insight into matters pertaining to linear algebra, Strange's book [39] gives an excellent introduction. The book by Golub and Van Loan [17] provides a more advanced treatment which is more orientated towards computer computation. In addition the book by Brogan [6], plus the appendix to Kailath's book also provide useful information on linear algebra.
2 State Feedba ck and Controllability
2.1
Introduction
An important and well known consequence of feedback is behavioral modification.
F~edback is present when the input to a system depends on that system's output. When feedback is used to modify a system's behavior the resulting closed loop system is referred to as a feedback control system. For the purposes of discussion we can separate the control system into a plant and a controller. The plant consists of the physical process to be controlled plus any transducers, actuators or sensors, needed to interface the physical process output to the controller and the output of the controller to the input of the physical process. While controllers were implemented in the past by a physical process such as an electric filter, their implementation now is often done by a digital computer. Figure 2.1 shows the general setup for a control system. Ut(t)
Yt(t)
-·
PLANT
u2(t)
Y:(t)
CONTROLLER
Figure 2.1
Block diagram of the feedback control scheme
external input controlled input
desired output measured output
where u 1 (t), u2 (t),y 1(t),y2 (t) have dimensions mh mz,PI ,p2 respectively.
State Feedba ck and Controllability
42
The general form of the state model for the plant is ,"\:(t) = Ax(t) + B 1 (t)u 1 (t) + B2 u2 (t) } YI(t) = C1x(t) + D 11 u1(t) + D 12 u 2 (t) Y2(t) = C2x(t) + D21u 1(t) + D 22 u2 (t)
(2, 1)
the This chapter focuses on the effect of using a feedback signal compos ed from compon ents of the plant's state as the controlled input, (2.2) input. This where K has m 2 rows, one row for each scalar signal making up the controlled nts ingredie two of one is and k feedbac state as to referred is importa nt kind of feedback er. controll the of needed to complete the design it is The need for something in addition to state feedback can be appreciated when state use to are we if re Therefo n. unknow usually is recognized that the plant state ng the feedback as a basis for the design of a controller, we must have a means for estimati is which r, estimato state a as to referred model, state plant state. This is done by a state plant the on tion informa The model. state plant's designed from knowledge of the signals is containe d in measurements of all or some of the plant's input and output measurethese to equal input r's estimato the supplied to the state estimato r by setting There plant. the of state the mimics state its that so ments. The state estimato r is designed about made ions assumpt the on ng dependi r are several different types of state estimato exact, e.g., ments, measure their and signals the relation between the actual plant chapters ent subsequ In n. unknow partly or corrupte d by random measurement noise, ance of the we will study both the design of these estimators and the effect on the perform feedback. state with tion conjunc in use their by feedback control system that is caused so that we known is model state plant's the of In this chapter we assume that the state in using goal Our (2.2). equation by given can use it to generate the state feedback signal input zero and state zero the which in system state feedback is to produce a closed loop which to extent The use. plant's the to al behavior is changed in some way which is benefici a system's the plant's controlled input can affect the plant state, is referred to as es determin model state plant the of ability controllability. We will see that the controll plant's the from differ can system loop the extent to which the state model of the closed model state model when we use state feedback. The importa nt property of state chapter this out through guises t differen controllability will be encountered in several and the rest of the text.
2.2
State Feedback
state model Applying state feedback, equation (2.2), to the plant, equation (2.1) gives the for the feedback system as x(t) y 1 (t) Y2(t)
= = =
(A+ B 2 K)x(t) + B 1 (t)uJ (t) } (C 1 +D 12 K)x(t) +D 11 u 1(t) (C2 + D 22 K)x(t) + D21u1 (t)
Figure 2.2 gives a block diagram interpre tation of state feedback.
(2.3)
State Feedback
43
YI(t)
u1(t)
PLANT u2(t)
x(t)
L__
Figure 2.2
CONTROLLER
1.-----
Block diagram representation of state feedback.
Notice that the main effect of using state feedback is the transformation of the system matrix from A, when the plant stands alone, to A + B 2 K, when the plant is embedded in a state feedback loop. Thus we see that the main purpose of state feedback is the assignment of eigenvalues to the closed loop system matrix A + B 2K to achieve a set of specified performance criteria for the behavior of the closed loop system from the external input u1 (t) to the desired output y 1 (t). This fact leads immediately to the question: can we choose K so that the eigenvalues of A+ B2K are assigned to any specified set of values? The answer to this question is obviously of great importance to the use of state feedback in the design of feedback control systems. The answer to this question, which is given in the following theorem, involves the use of the left-eigenvectors of A. Since this property applies in general to any state model (A, B, C, D) we will drop the subscript on B, i.e., B2 will be replaced by B. Theorem 2.1 Whenever A has a left-eigenvector w;, i.e., wiT A= >.;wiT, such that
the corresponding eigenvalue of A, ,X;, is invariant to state feedback, i.e., >.; E >.(A + BK) for all K. Proof Suppose the condition in the theorem is satisfied. Then multiplying the closed loop state feedback system matrix, A+ BK, on the left by wiT gives
wiT(A +BK) =wiT A +wiTBK However since wiT A= >.;wiT and wiT BK = 121, the previous equation becomes
and we see that >.1 is an eigenvalue of the system matrix for the state model of the feedback control system, since>.; E >.(A+ BK) for all K. • It turns out that when there are no left-eigenvectors of A which satisfy B = 0, the eigenvalues of A are all assignable to any specified values by state feedback. This is shown later in Theorem 2.4. Notice that when we have the condition B = 0 so that the corresponding eigenvalue >.1 cannot be assigned by state feedback, we refer to >.1 as an
wT
wT
State Feedb ack and Controllability
44
ion wf B 1- 0 we refer to uncontrollable eigenvalue. Conversely, when we have the condit state feedback, as a conthe corresponding eigenvalue A; which can be assigned by trollable eigenvalue. llable (uncontrollable) Definition 2.1 An eigenvalue >..; of A is said to be a contro A;~ >.[A+ BK] eigenvalue of the pair (A, B) if we can (cannot) find K so that invari ant to changing Uncon trollab le (controllable) eigenvalues for a pair (A, B) are coordinates. This can be seen as follows. have Suppose A; is an uncontrollable eigenvalue of (A, B). Then we (2.4) (2.5)
n wiT and A, in equation Now insert rr-l between wiT and Bin equati on (2.4) and betwee by T. Then we obtain (2.5). In additio n, postm ultiply both sides of equati on (2.5)
where
of the state model in the Thus we see that A; remains an uncontrollable eigenvalue transfo rmed coordinates. have no eigenvalues Reflection on the foregoing reveals that plant state models which ty that state feedback of A which are both uncontrollable and unstable have the proper having this proper ty are can be used to make the closed loop system stable. State models is not stabilizable when referred to as stabilizable state models. Conversely, a state model impor tant proper ty since it has uncon trollab le eigenvalues which are unstable. This is an condit ion for a control the stability of a contro l system is almost always a necessary system to be of arty use. if all its uncontrollable Definition 2.2 A plant state model is said to be stabilizable eigenvalues are stable. feedback control Recall that the poles of the transfer function for an SISO output the present case of state system are constr ained to lie on branches of the root locus. In matrix A + BK are system loop closed the of feedback, the locatio n of the eigenvalues nal flexibility additio This llable. contro are they that , uncon straine d provided, of course one adjustable param eter of state feedback over output feedback arises from there being ck, whereas there is only in K for each compo nent of the state when we use state feedba ck. one adjustable param eter when we use consta nt output feedba
2.3
Eigenvalue Assignment
has the same eigenvalues Recall, Section 1.6.4, that a state model's system matrix . In addition, notice that independent of the coordi nates used to express the state model
Eigenvalue Assignment
45
if the state, x(t), in the original coordinates i& related to the state, x(t), in the new coordinates as
x(t) = Tx(t) then the state feedback matrix is transformed as
K = KT since
u(t) = Kx(t) = KTx(t) This fact provides us with the flexibility of being able to carry out the determination of the state feedback matrix in coordinates which are the most suitable for this computation. We saw in the previous section, that we can choose K to achieve a specified set of closed loop eigenvalues, {JL; : i = 1, 2, · · ·, n }, provided that each uncontrollable eigenvalue of the pair (A, B) equals one of the desired closed loop eigenvalues. Assuming this condition is satisfied, the state feedback matrix, K, which is needed to make the set of closed loop eigenvalues equal the specified set of eigenvalues can be obtained by equating the characteristic polynomial for A+ BK, denoted a(s), to the characteristic polynomial 1(s) having roots equal to the specified set of eigenvalues, {JL; : i = 1, 2, · · · n}, as /
a(s)
=
')'(s)
(2.6)
where
()= II( n
/
S
S -
JL;
)=
S
n
+ 'YI S n-I + 'Y2S n-2 + · · · + /n
i=l
Notice that the coefficients of a(s) are functions of the elements of K. Thus we see that equation (2.6) gives rise to n equations in the unknown elements of K, i.e., a;=/;
i = 1,2, · · ·n
In general, these equations in the elements of K are coupled in ways which depend on the A and B matrices. Therefore it becomes difficult to set up a computer program to form and solve these equations for all possible (A, B) pairs. However if the plant's state model is in controller form these equations are uncoupled and therefore easy to solve.
2.3.1
Eigenvalue assignment via the controller form
A state model for an nth order SISO system is said to be in controller form when A = Ac is a companion matrix and B = Be is the first column of the n x n identity matrix. More
46
State Feedback and Controllability
specifically the controller form state model has parameters ~a I
Ac =
~a2
~an-I
~an
0
0
0
0
0
0 0
0 B
~
c~
0
0
0
0
with D and C being whatever is needed to model the plant's behavior in these coordinates. Use of the controller form state model greatly simplifies the calculation of the state feedback matrix Kc needed to make Ac + BcKc have a specified set of eigenvalues. This results from the fact that in these coordinates the state feedback system matrix, Ac + BcKn is also in companion form ~a 1
+ kc1
~a2
+ kc2 0
Ac +BcKc =
0 0
0
~a3
+ k3
~an-I+ kn-1
~an+
0
0
0
0
0
0
kn
0
0
with the kc 1s being the elements of the state feedback matrix
Recall from Chapter 1 that since Ac + BcKc is a companion matrix, the coefficients of its characteristi c polynomial appear, with negative signs, along its first row. Therefore the coefficients of the characteristi c polynomial for the closed loop system o:(s), equation (2.6), are related to the elements of the state feedback matrix K as
i = 1, 2, · · · n
(2.7)
Then if we want the closed loop system matrix, Ac + BcKn to have eigenvalues at {p,1 : i = 1, 2, · · ·, n }, the o: 1s are obtained from
and the elements {kci : i from equation (2. 7) as
=
1, 2, · · · , n} of the feedback matrix K are easily determined
i
=
1, 2, · · · n
(2.8)
Before showing how to transform coordinates so that a given state model is transformed to controller form, we consider the problem of determining a controller form state model from a given transfer function.
Eigenvalue Assignment
2.3.2
47
Realizing the co-ntroller form
Having seen that the assignment of eigenvalues is easy to do when the system state model is in controller form, we turn now to the problem of getting a controller form state model for a system specified by a transfer function or differential equation. Theorem 2.2 Suppose we are given the a;, b; parameters in the differential equation or transfer function model of some plant, i.e., n-1
n-1
Y(n)(t) + I:>n-iY(i)(t )
=
Lbn-iU(i)(t ) i=O
or
(2.9)
where
Y(s) = Gsp(s)U(s)
= 0 for all i = 0, 1,2,· ·: ,n- 1 Then the controller form state model for this plant has parameters (Ac, Be, Cc) given by
with yn-;Z(i)(t)
u(t)
=
(2.13)
i=O
and setting i
=
1, 2, · · ·, n
(2.14)
in (2.13) gives
where the matrices Ae, Be are as stated in the theorem. Finally, since the initial conditions are all assumed zero, we see from (2.11) that n-1
y(t) = l::)n-iz(il (t) i=O
and using the relation between the componen ts of the state and the derivatives of z(t), (2.14), we see that the foregoing expression for the output can be written as
• where the matrix Ce is as stated in the theorem. Notice that since Gsp(s) is strictly proper, De = 0. Alternatively when the given transfer function, Gp(s), is proper, we can proceed as in Section 1.9.3 to obtain its controller form (Ac, Be, Cc, De) with Ae, Be, Cc as in Theorem 2.2 and D = {30 where n
2:: f3n-i Si GP (s) =
0- - -''-.=-'--
n-1
sn
+ "'a 0
n-1
si
i=O
with i
= 1, 2, · · · n
In summary, Theorem 2.2 shows that the controller form state model is easily obtained when we are given either the transfer function or the differential equation governing the process behavior. In some cases we may be given a state model for an SISO plant which is in a form other than the controller form. In this situation it may be possible to simplify the determina tion of the state feedback matrix K by:
Eigenvalu e Assignme nt
49
(i) determinin g the coordinate transforma tion matrix, Tc, to transform the given plant state model to controller form (ii) choosing Kc using (2.8) to assign the eigenvalues to the controller form state model (iii) using the coordinate transforma tion matrix Te to obtain the require state feedback matrix asK= KeT-; 1 . This approach, while not of practical significance when applied as just described, does enable the developme nt of a practical computati onal algorithm for determinin g K. This algorithm which is referred to as Ackerman n's formula will be developed in Section 2.3.4. At this point we need to develop both a method for determining Te and conditions on the given state model which enables its transforma tion to controller form.
2.3.3
Control ler form state transformation
Suppose we want to find a coordinate transforma tion matrix, Te, which transforms a given state model, (A, B, C), not in controller form to a state model, (A, ii, C), which is in controller form. Then assuming, for the time being, that such a transform ation exists, we can solve this problem by proceeding as follows. Since, in general A, and A= T- 1AT have the same characteris tic polynomia l, we can use the coefficients of the characteris tic polynomia l for the given A matrix, det[s/ - A]. to construct the controller form system matrix A = Ae from Theorem 2.2. In addition, since Be is the first column of the n x n identity matrix we have ii = Be without doing any calculation. Therefore neither Ae nor Be requires the determina tion of Tc. However Tc is needed to determine C = CTc = C,. In what follows we use Ac- Be and their relation to . Te to develop an algorithm for determinin g Tc, one column at a time. To begin with, notice that the first column of Tc can be obtained immediate ly from inspection of the relation Tcii = B when T e is written in terms of its columns.
r
0
where ti is the irh column of Tc. Having determined the first column of Tc as B, we can see how to determine other columns of Tc by inspection of the relation TeA= ATe with A set equal to Ac and Te expressed in terms of its columns,
0
0
0
-an-1
-an
0
0
0
0
0
0
0
0
=
A[t 1
t"
t"
l
:Ju
;,(ale
l"eeaoacle and Controllabili ty
Thus equating like positioned columns on either side of this equation gives -a 1 t 1 +t 2 =At 1 -a2 t 1 + t 3 = At 2 -ant 1 +
)
(2.15)
t~ = Atn-!
(2.16) and we see that the remaining columns of Tc can be generated successively from (2.15) by starting with t 1 = B and proceeding as t 2 =a 1t 1 +At 1 t 3 = a2 t 1 + At 2
)
(2.17) tn
= an_ 1t 1 + Atn-l
To recap, we can generate the columns of Tc by (i) obtaining the coefficients of the characteristic polynomial for the given A (ii) setting the first column of Tc equal to the given B. (iii) using (2.17) to determine the remaining columns of Tc in succession. Notice that so far we have no assurance that the matrix Tc which results from using (2.17) will be invertible. However T c must be invertible if it is to be a coordinate transformati on matrix. We show now that only those state models which have the property of controllability will produce a nonsingular Tc matrix as a result of applying the foregoing algorithm. Before doing this notice that we did not need (2.16) to get (2.17). This extra equation will be used in Section 2.3 .5 to derive the Cayley-Ham ilton theorem.
2.3.4
Condition for controlle r form equivale nce
In order to determine conditions on the given state model which guarantees that it can be transformed to a controller form, i.e., to insure that the matrix Tc which is generated by (2.17) is invertible, we expand (2.17) by successive substitution to obtain
(2.18)
Eigenvalue Assignment
51
Then writing these equations in matrix form gives (2.19)
where
fl= [B
AB
A 2B
...
An-Is'
R=
al
az
an-I
a!
an-2 an-3
0
1
0
0
0
0
0
Now since the product of two square matrices is invertible if and only if each matrix in the product is im ertible. Tc is imertible only if both \2 and R are invertible. However since R is an upper-triangula r matrix having nonzero elements along its diagonal, R is invertible for any given state model. Therefore T, is invertible if and only iffl is invertible. The matrix n, which depends on the interaction between the given state model's A and B matrices, is referred to as the given state model's controllability matrix. For systems having only one input the controllability matrix is square and the state model is said to be controllable if its controllability matrix is invertible. However when the input consists of m scalar inputs, n. has nm columns and only n rows. In this case the state model is said to be controllable if its controllability matrix is full rank, i.e., all its rows are independent or equivalently, n of its nm columns are independent. More generally. the property of controllability of a given state model is preserved under coordinate transformation. We can see this by noting that the controllability matrix n of the state model in the transformed coordinates is related to the controllability matrix n of the state model in the original coordinates as
n = [JJ
.4.e ...
= [T- 1B
=
;p-Iel
T- 1ATT- 1B
···
T- 1An-IB]
r- 1n
(2.20)
Therefore since D has fewer rows than columns we have
for some a -1 0 only iffl has dependent rows, since ,BT = implies that
aT T- 1
= 0T only if a
= 0.
This
rank[n] = rank[T- 1D] = rank[D] where the rank of a matrix equals the maximum number of its columns which are independen1. However since, for any matrix, the number of independent columns equals the number of independent rows. we see that, in general rank[D] .::::; n
52
State Feedback and Controllability
since n is ann x nm matrix for any n dimension state model having m scalar inputs. This fact will be used later in the fourth section of this chapter. When the state model is single input and controllable, m = 1 and n, 0 in (2.20) are square and invertible. Therefore we can obtain the coordinate transformation matrix, T, from (2.20) as
r
=
nrz-l
(2.21)
Then comparing this expression with (2.19) we see that rz-l = rl;:- 1= R. Moreover the controllability matrix for a state model in controller form is readily calculated as
A~- I Be]
nc = [Be AcBc -a I
0
2 al-
a2
-a I
0
0
0
0
* * *
(2.22)
0
which, being upper-triangular with fixed nonzero entries along the diagonal, is invertible. Thus all controller form state models are controllable. To recap, a given single input state model can be transformed through an appropriate coordinate transformation to a controller form state model if and only if the given system is controllable. Moreover we have just seen that an uncontrollable state model cannot be made controllable by a coordinate transformation and that any controller form state model is controllable. In addition, we will see that there are several other aspects of system controllability which play important roles in control theory. A more basic view of system controllability is developed in the fourth section of this chapter.
2.3.5
Ackermann's formula
As mentioned at the end of Section 2.3.1, we could calculate K to assign the eigenvalues of + BK, for a given single input controllable system by transforming the given system to controller form , finding Kc, and transforming Kc back into the original coordinates through the relation K = KcT;:- 1• We will see now that we can use this idea to develop a computational algorithm for obtaining K which is known as Ackermann's formula. In order to do this we will need the following result. Theorem 2.3 (Cayley-Hamilton) Any square matrix A satisfies its own characteristic equation. Before proving this theorem, the following explanation may be needed. Recall that the characteristic equation for A, A
(2.23) is a scalar equation which is satisfied by the eigenvalues of A.
53
Eigenvalue Assignment
Therefore Theorem 2.3 tells us that if we replace the scalars in (2.23) by the matrix A, we obtain the result
We can readily show the Cayley-Hamilton theorem as follows. Proof Premultiplying (2.18) by A and using (2.16) yields (An+ a 1 An-I
+ a2An- 2 + · · · anl)B = 0
(2.24)
Now (2.24) holds for any B. Therefore letting B = I in the foregoing equation yields An+ a 1An-I
+ a2An- 2 +···ani= 0
•
Theorem 2.4 (Ackermann' Formula) Given a single input controllable state model (A, B, C, D) and the desired characteristic polynomial, a(s), for the closed loop system
a(s)
=
det[si- (A+ BK)]
then the required feedback matrix K is given by K
= -qT[a(A)]
where qT is the last row of the inverse of the controllability matrix, 0, for the given pair (A, B). Proof For convenience, and without loss of generality, suppose the given plant is of dimension n = 3. Then the plant state model's system matrix A has characteristic polynomial
a(s) = det[si- A] = s 3 + a 1s 2 + a2 s + a3 Let the desired characteristic polynomial, a(s), for the state feedback system matrix be denoted as
Then using the coordinate transformation matrix Tc developed in Section 2.3.3 we transform the given state model for the plant to controller form
so that the state feedback system matrix in these coordinates is given by
State Feedback and Controllability
54
where
Therefore the desired characteristic polynomial can be written by inspection from the companion form for Ac + BcKc as
a(s) = s3 + (al- kc1)i
+ (a2- kcl)s + (a3- kc3)
= a(s)- (kc1i + kc2s + kc3)
(2.25)
Next recalling that A and T- 1AT have the same characteristic polynomial for any invertible T, we see that a(s) is the characteristic polynomial for both A and A c. Therefore from the Cayley-Hamilton theorem (Theorem 2.3) we have
a(A) = a(Ac) = 0
(2.26)
Therefore we see from (2.25, 2.26) that
(2.27) where I is the 3 x 3 identity matrix
However we can readily verify that
Therefore we see that pre-multiplying (2.27) by the third row of the identity matrix gives
-3T a (A c ).
l
= -
k ell·IT
-
k c2l-2T
-
k c3l·3T
(2.28)
Then inserting the identity matrix T;; 1 Tc between i 3 T and a(Ac) on the left side of (2.28) and post-multiplying throughout by r;; 1 yields (2.29) Moreover using the facts that
(2.30)
Controllability
and that KcT-;: 1
55
= K we see that (2.29) can be rewritten as i 3TT;: 1a(A)
= -K
(2.31)
Finally recalling (2.19) we see that
~
"' R-•n-•
~ [~ ~
}-•
.(2.32)
where
and* are elements of R- 1 which are not needed. Thus using (2.32) in (2.31) gives
and the theorem is proved. • Notice that since only the last row of n- 1 i.e., qT, is required when we use this result to compute the feedback matrix, K, we need only compute q which satisfies
with in being the last column of the n x n identity matrix. This avoids having to do the more intensive computation of n- 1 .
2.4
Controllability
So far we have encountered the effects of system controllability twice, once in connection with the condition for eigenvalue assignment by state feedback, (Theorem 2.1 ), and again in connection with the existence of a coordinate transformation matrix which transforms a given state model to controller form, (Section 2.3.4). In this section we encounter system controllability in the context of the basic problem of the input's ability to manipulate the state of a given state model. The following definition of a state model's controllability is made with this problem in mind. Definition 2.3 A state model (A, B, C, D), or pair (A, B), is said to be controllable iffor every possible initial state, x(O), we can find at least one input u(t), t E [0, t1 ] and some finite final time t1 < oo so that x(t1 ) = !ll, i.e., so that the state is annihilated by the input in a finite time. . It is important to notice in the foregoing definition, that t1 is required to be finite. This IS done to prevent all stable systems from being considered to be controllable. More specifically, since stable systems have the property that lim x(t) = !ll
1--+oo
for any x(O) when u(t) is null
56
State Feedback and Controllability
all stable systems would be controllable if the final time, tr, in Definition 2.3 were allowed to be infinite. · In order to develop the implications of the foregoing definition we need to recall, from the first chapter, that the state x( tr) which results from having an initial state, x(O), and an input, u( t), is given by
J It
x(tr)
+
= eA 11 x(O)
eA(tr-T) Bu(T)dT
(2.33)
0
Then if the state is annihilated at time t1 , i.e., if x(tr) u(t), must be chosen so that
=
0, we see from (2.33) that the input,
J It
eA 11 x(O)
=-
eA(It-Tl Bu(T)dT
(2.34)
0
However from the series expansion for
eAt,
(Section 1.4.1) we see that
and so that we can simplify (2.34) as
J It
x(O)
=-
e-AT Bu(T)dT
(2.35)
0
This equation is the basic constraint which must be satisfied by any input which drives the system state from x(O) to the origin in state space in finite time, t1 < oo. Notice that the following three questions are immediately evident: 1. For each initial state, x(O), is there at least one input, u(t), which satisfies (2.35)? 2. If it is not possible to satisfy (2.35) by some input for each initial state, how should the initial state be restricted to enable (2.35) to be satisfied by some input u(t)? 3. Iffor a specific initial state, x(O), it is possible to satisfy (2.35), what is the specification of the input u(t) which does so? Notice that when the answer to the first question is in the affirmative the system is controllable in the sense of Definition 2.3.
2.4.1
Controllable subspace
We will show now that a criterion for a given state model or pair (A, B) to be controllable in the sense of Definition 2.3 is that the controllability matrix be full rank, i.e., rank[S1] = n, when the state model is n dimensional where
Controllability
57
Notice that when rank[fl] = n, n has n independent columns so that we can always find a constant vector, 1, for any initial state, x(O), such that x(O) = !:11
(2.36)
However, if rank[OJ < n, then n has fewer than n independent columns, and it is not possible to find 1 to satisfy equation (2.36) for some x(O). However, those x(O) for which we can find 1 to satisfy equation (2.36) are said to lie in the range or image ofn, denoted as x(O) E range[fl] We we will show, later in this section, that those initial states, x(O), satisfying x(O) E range[fl], are those initial states for which we can find u(t) to satisfy equation (2.35). This fact answers question 2 and leads to the following definition. Definition 2.4 Initial states, x(O), for which we can (cannot) find u(t) to satisfy equation (2.35) are said to lie in the controllable subspace Sc (uncontrollable subspace Sc) of the state space. Thus we see from the answer just given to question 2 that Sc = range[fl]
An important property of the controllable subspace is given in the following theorem. Theorem 2.5 If x(O) Erange[n] then Ax(O) Erange[fl]. Proof Suppose x(O) E range[fl]. Then we can find a constant vector, 1, to satisfy (2.37) where the I;S are constant vectors having the same length as u( t). However, we know from the Cayley-Hamilton theorem, (Theorem 2.3), that n
An
= -
L a;An-i i=l
where the a;s are coefficients of the characteristic polynomial
Therefore multiplying (2.37) by A and using the Cayley-Hamilton theorem gives Ax(O) = AB11 +A 2 B12 + · · ·An-lBin-l
+
(t
-a;An-iB )In
=fl')'
(2.38)
where ···
ln-2 - lna2
In- I
-
lnaJ]
State Feedback and Controllability
58
and we see from (2.38) that Ax(O) E range[n]
•
Notice that this theorem implies that if x(O) E range[n], then Akx(O) E range[n] for all integers k. This fact enables us to show that rank[D] = n is a necessary and sufficient condition for S, to be the entire state space so that there is an input satisfying (2.35) for all initial states. Thus rank[D] = n is a necessary and sufficient condition for a state model to be controllable in the sense of Definition 2.3. This fact is shown now in the following theorem. Theorem 2.6 If a state model (A, B, C, D) or pair (A, B) is controllable in the sense of Definition 2.3 then rank[D]
=
n
where
Proof Suppose (A, B) is controllable in the sense of Definition 2.3. Then substituting the series expansion for eAT in (2.35) yields
= Bro + AB11 +A 2B12 + · · · =
n,o +Ann/! + A2nn/2 + ...
(2.39)
where I
kT
=
[
T rkn
T rkn+l
k
= 0, 1' 2 ...
with i=0,1,2···
However from Theorem 2.5 we have k
=
0, 1, ...
(2.40)
Therefore the columns on the right side of (2.39) span the entire state space if and only if rank[D] = n. Otherwise when rank[D] < n there are initial states x(O) ¢:. range[D] so that (2.39) is impossible to satisfy by any u( t) and the state model is not controllable in the sense of Definition 2.3. This implies that rank[O] = n is necessary for the state model to be • controllable in the sense of Definition 2.3.
59
Controllability
2.4.2
Input synthesis for state annihilation
The following theorem shows that rank[n] = n is sufficient for a state model (A, B, CD) or pair (A, B) to be controllable in the sense of Definition 2.3. Theorem 2.7 Ifrank[n] = n then we can satisfy (2.35) for any x(O) by choosing u(t) as
where
Proof Suppose W is invertible. Then substituting the expression for u(t) given in the
theorem into the right side of (2.35) gives
tf e-ArBu(T)dT= ~ }otf e-Ars [-BTe-A T]r dTW- 1x(O) - }o /
=
ww- 1x(O)
=
x(O)
which is the left side of (2.35). Thus we have shown that the state model is controllable in the sense of Definition 2.3 when W is invertible. In order to show that W is invertible, suppose rank[n] = n and W is not invertible. Then we can find a =f. 0 such that (2.41) Now since the integrand in the definition of W is quadratic, i.e.,
where
we can only satisfy (2.41) if for all '
T
E [0, tf]
(2.42)
However using the power series expansion of the matrix exponential we see that
60
State Feedback and Controllability
where kT _
{3
-
l"
(-T )kn
(kn)!
( -T )kn+l
(kn
+ 1) !
(-T)(k+l)n-1
]
([k + l]n- 1)!
Thus (2.42) is satisfied only if (2.43)
However since rank[r!] = nand n is n x nm, we see that n has independent rows and only a= 0 satisfies (2.43) and (2.41). This proves that W is invertible when rank[r!] = n. • In the next section we will see that when rank[r!] < n we can still use the foregoing approach to provide a method for determining an input which annihilates an initial state x(O) in a finite time provided x(O) Erange[r!]. This is achieved by using a controllable decomposed form for the system's state model so that the controllable part of the system is immediately evident.
2.5
Controllable Decomposed Form
So far we have considered two special types (canonical forms) of state model, the controller form and the normal or diagonal form. In this section we introduce another form for the state model of an n dimensional system. The purpose of this form of state model is to simplify the specification of the controllable and uncontrollable subspaces, denoted as Sc and S 2 respectively, by aligning them with subsets of the coordinate axis. More specifically, when a state model is in controllable decomposed form the state is given by
where x;(t) is of length n; and
x(t) ESc
if x 2 (t)
x(t) ESc
if x 1 (t) =0
= 0
Then any state, x(t) can be decomposed as (2.44)
where xc(t) ESc and xc(t) E S 2 with ac, ac being scalars. Notice that Scl_Sc A state model whose state space is orthogonally decomposed in the foregoing manner is referred to as being in controllable decomposed form. The state model for a system to be in this form is defined as follows. Definition 2.5 A state model having m scalar inputs is said to be in controllable
61
Controllable Decompose d Form
decomposed form when its A and B matrices have the following block matrix forms
B=[~]
A=[~
(2.45)
where (All B!) is a controllable pair; All A 2 , A 4 and B 1 have dimensions: n 1 x n 1 , n 1 x n2 , n 2 x n 2 , n 1 x m respectively with n = n 1 + n2 being the dimension of the state space.
2.5.1
Input control of the controllable subspace
We begin the discussion of the effect of an input on the state when the state model is in controllable decomposed form by noticing that the product of upper-triang ular matrices is upper-triang ular, and that the coefficients of the series expansion of eAt involve powers of A. Therefore the transition matrix, eAt, for a state model in controllable decomposed form, (2.45), is upper-triang ular, At_
~
e
l
f[A~ * ~ i=O
0
A~
il
where the block marked * is not of importance here. Next recall, from the previous section, that if u(t) drives the state from x(O) to the origin in finite time, t1 , then (2.35) is satisfied. Therefore since the eAt is upper-triang ular and B has its last n2 rows null when the state model is in controllable decomposed form, we see that (2.35) can be written as
x'(O)l [~(0)
=-
lot (oo2:.)-l)i [A;Bl. ~Ii) U(T)dT 1
I
i=O
0
0
I
(2.46)
l.
or
x 2 (0)
=
0
Thus we see that (2.46) can not be satisfied by any input u(t) ifx2 (0) f= 0. Alternatively , 1 since (A 1 , B!) is a controllable pair, we can always find u(t) to force x (tr) = 0 for any 1 x (0) and ~(0). More specifically, when the state model is in controllable decomposed form, (2.45), we see that
so that
State Feedbac k and Controllability
62
Therefore, proceeding in the&ame manner as was done to obtain (2.35) we see that if x 1 (tr) is null then we must choose u( t) to satisfy the following equation (2.47) where
Then using the result given in Theorem 2.7 we see that one input which satisfies (2.47) is
where
To recap, we have just shown that we can always find an input to annihilate the projection of the initial state onto the controllable subspace. More specifically since any initial state can be written as (2.44) with t = 0, we can find u(t) so that xc(tf) = 0 for any tf
< oo.
2.5.2
Plelation to the transfer function
Concerning the input-ou tput behavior, suppose the state model has A,B as specified by (2.45) and C partition ed as
with ci beingp X ni, i = 1' 2 where pis the number of scalar outputs. Then from the block upper-triangular form for A, (2.45), we see that (sf- AJ)- 1A 2 (sl- A4)- 1 ] (sf- A 4 )- 1
Therefore the system transfer function is given as G(s)
=
C(sl- A)- 1B
(I _- C IS
-
C 1adj[s/- AI]B1 A )-IEI _ I det[s/- AI]
(2.48)
Notice that the order of the transfer function is no more than n 1 • This reduction in the order of the transfer function results from the eigenvalues of A4 being uncontrollable. We
tion in the numb er of eigenvalues of A that will see in the next chap ter that a furth er reduc funct ion may occu r as a resul t of the go over as poles of the corre spon ding trans fer order to bette r appre ciate the fact that the inter actio n of the state mode l's (A, C) pair. In the following. eigenvalues of A 4 are unco ntrol lable , consi der
2.5. 3
Eig env alue s and eige nve ctor s of A
ectors of A when the state mode l is given Supp ose we attem pt to deter mine the left-eigenv to solve in contr ollab le deco mpos ed form. Then we need WT A= AWT
struc ture of A, (2.45), we see that the for the pair {.:\, w}. How ever from the block , foregoing equa tion expa nds to two equa tions (2.49) (2.50) where
ied when we let w1 = with w; being oflen gth n;. Then (2.49) is satisf
o and (2.50) becomes (2.51)
2 1 .:\ is an eigenvalue of A 4 • w is the Ther efore for this choice of w , we see that = [ 0 wf} is the corre spon ding leftcorre spon ding left-eigenvector of A 4 , and wT s of A4 are eigenvalues of A. Notic e that eigenvector of A. Thus we see that eigenvalue in this case we have
H'T B
= [0 w
n [:
1
l
=0
s of A 4 are unco ntrol lable . so that eigenvalues of A which are also eigenvalue values of A 1 . We can see this by notin g Now the rema ining eigenvalues of A are eigen of A 1 and w1 is the corre spon ding leftfrom (2.49) that if w 1 i- 0 then .:\ is an eigenvalue mpos ed form the pair (AJ>B!) is contr oleigenvector of A 1 . Since in contr ollab le deco s of A I are contr ollab le. More over since lable, eigenvalues of A whic h are also eigenvalue s of any pair (A, B) are disjo int \Ve have the contr ollab le and unco ntrol lable eigenvalue 1 is invertible. Ther efore when w is a leftthat if.:\ E .:\[Ad then .:\ ¢:. .A(A 4 ] and .AI- A 4 2 red w 2 to make wT = [ w 1T w T J a lefteigenvector of A I, we can deter mine the requi eigenvector of A from (2.50) as w2T = w!T A2(A I-
A4)-1
A is imme diate ly evide nt when one The foreg oing prop erty of the eigenvalues of state feedback when the state mode l is in attem pts to use state feedback. Thus if we use
64
State Feedback and Controllability
uncontrollable decomposed fDrm, the closed loop system matrix is
where the state feedback matrix is partitioned as (2.52)
with K 1 , K 2 being m x n 1 and m x n2 . Now we just saw that block upper-triangular matrices have the property that their eigenvalues equal the union of the eigenvalues of their diagonal blocks. Thus the eigenvalues of the state feedback system matrix satisfies
and A+ BK has a subset of eigenvalues, .A[A 4 ], which is clearly unaffected by state feedback. However since (A 1B 1 ) is a controllable pair, all the eigenvalues of A 1 + B 1K 1 can be assigned by K1 . Notice also, from the definition of stabilizability, Definition 2.2, that a system is stabilizable if, when its state model in controllable decomposed form, the A 4 partition of A is stable. Finally notice that Ackermann's formula, which we developed to assign the eigenvalues of single input controllable state models, can also be used to assign the controllable eigenvalues of uncontrollable systems. This is done by transforming coordinates to put the given state model in controllable decomposed form. Ackermann's formula is then applied to the controllable pair (A 1 , B 1) to determine the K 1 partition of K, (2. 52), with K2 being chosen arbitrarily. Finally, we can obtain the feedback matrix K 0 in the original coordinates from K 0 = KT- 1 where Tis the coordinate transformation matrix needed to transform the given state model to controllable decomposed form. In the next section we consider how this coordinate transformation matrix can be determined.
2.6
Transformation to Controllable Decomposed Form
In this section we will indicate the role played by the controllability matrix in constructing a coordinate transformation matrix to put any state model in controllable decomposed form. We begin by noting that when a state model is in controllable decomposed form with the (A, B) pair being given by (2.45), the last n2 rows of the controllability matrix consist of nothing but zeros, i.e.,
0
[i i] where
(2.53)
Transformation to Controllable Decomposed Form
65
Notice that the columns of 0 2 depend on the columns of 0 1 , i.e., we can always find a constant matrix 8 to satisfy Therefore recalling that the subspace spanned by the independent columns of n is the controllable subspace, Sc, we see that range[O]
=range([~])= Sc
This fact together with computationally robust methods for finding a basis for the range of a matrix, e.g., singular value decomposition, (Chapter 7), provides a means for constructing a coordinate transformati on matrix T which takes any state model to controllable decomposed form. The following theorem provides some insight into why a coordinate transformati on based on the controllability subspace is able to achieve this result. Theorem 2.8 A coordinate transformati on matrix T transforms a given state model (A, B, C, D) to controllable decomposed form, (Definition 2.5) if range[TJ] = range[O] = Sc where
n is the controllability matrix for the given state model and
with T 1 , T2 being n x n 1 , n x n2 and with T invertible where rank(O) = n1. Proof Let QT denote the inverse of T, i.e.,
[~n [ T1
QTT=l
Tz] = [
~ ~]
(2.54)
Then the transformed A, B matrices are given by
Recall that for the transformed state model to be in controllable decomposed form, (Definition 2.5), we need to show that A3 and B2 are each null. To show that B2 = 0, notice from (2.54) that QJ T 1 = 0 so that the columns of T1 are orthogonal to the columns of Q2 • However range(TJ) = Sc so that we have Qfx=!ll
when
X
ESc
(2.55)
State Feedback and Controllability
66
Now since B appears as the first m -.-t C ; + 21! /\; t + 3! /\; t + · · · v = e ' v =
(IS
(3.23)
We can illustrate this important effect by considering the unobservable state model
C= [+1 +1] Then since A is in companion form, (Section 1.6.1 ), we can express its right-eigenvectors as A1 =
-1,
A2 =
-2}
and any initial state given by x(O) = av 1 =
[+a] -a
gives rise -to a trajectory which lies in the null space of C for all time so that y(t) = 0 for all t.
State Estimation and Observability
78
Notice also that the transfer function corresponding to the foregoing state model is given by
G(s)
=
s+1
s 2 + 3s + 2
s+2
and the unobservable eigenvalue of A at -1 is not a pole of the transfer function. This effect was encountered in Section 1.9.2 in connection with diagonal or normal form state models. We will see, in Chapter 4, that this property of having certain non-null initial states which produce no output when a state model is unobsevable leads to a characterization of observability in terms of the rank of a matrix called the observability Gramian. The observability Gramian is involved in determining the energy in the output caused by a given initial state .
. 3.6
Observable Decomposed Form
Recall, from the previous section, that we are unable to determine x 6 (t) Enull[U] from knowledge of a state model's input and output derivatives at timet. We refer to null[ U] as the state model's unobservable subspace, denoted S 6 , i.e., S 6 =null [U]. Moreover we refer to range[ UT] as the state model's observable subspace, S 0 • Now it turns out that any solution to (3.21) can be written as x(t)
= x (t) + x 6 (t) 0
where (i) x 6 (t) Enull[U] = S6 and is arbitrary otherwise; (ii) x 0 (t) Erange[UT] = S0 and depends uniquely on z. Moreover the observable and unobservable subspaces are orthogonal, S 6 ..LS0 , i.e., (3.24) for any x 0 (t) Erange [ ur] and any x 6 (t) Enull[ U]. This can be seen by using the fact that
if and only if we can find w to satisfy
so that we have
In this section we show that any unobservable state model can be transformed, using a change of coordinates, so that in the transformed coordinates the observable and
Observable Decomposed Form
79
unobservable subspaces align with subsets of the coordinate axes. More specifically, when a state model is in observable decomposed form the state is given by
x(t)
=
[:~~~n
(3.25)
where xi(t) is oflength n; and
x(t)
E Sa
if x 2 (t) =Ill
x(t)
E
S0
if x 1 (t) =Ill
Notice that (3.24) is satisfied when the state is given by (3.25). Now the structure required for the state model to be in observable decomposed form is given in the following definition. Notice that this structure is dual to the structure of the controllable decomposed form, Definition 2.5, in the sense described in Section 3.4.1. Definition 3.3 A state model having p scalar outputs is said to be in observable decomposed form when its A and C matrices are in the following block forms
where (AhC 1) is an observable pair and AhA 3 ,A4 , C 1 have dimensions n1 x n 1, n2 x n 1, n 2 x n2 and p x n 1 respectively with n = n 1 + n 2 being the dimension of the state space.
3.6.1
Output dependency on observable subspace
?•
One way of seeing that a state model in observable decomposed form decomposes the state space in the manner specified in equation (3.25) is to note that, in these coordinates, the transition matrix is lower triangular,
so that the zero input response is given by
(3.26) Thus the zero input response is independent of x 2 (0) and S 0 is as specified in equation '(3.25). In addition since (All CJ) is observable, we could determine x 1 (t) from derivatives of the output. Thus Sa is also as specified in equation (3.25).
80
State Estimation and Observabi lity
3.6.2 Observ ability matrix Alternatively, we can also see that the decomposi tion of the state space given by equation (3.25) is achieved when the state model is in observable decomposed form by inspection of the observability matrix.
0 0
c1 CIA
U=
C An 1 -l 1 1 C1A~ 1
0 0
C1Ai- 1
0
~]
[u1 u2
where
rank[U] = rank[UJ] = n 1
and we have
x E null[U]
if and only if
x
= [ :2 ]
(3.27)
for any x 2 of length n - n 1 .
3.6.3
Transfe r function
Again, notice that the observable decompose d form gives the transfer function as G(s)
= [C 1 0] [
(s/-AJ)- 1
* with order equal to or less than n 1 depending on the controllability of the pair (A 1, B1). Notice also that the eigenvalues of A 4 are not poles of the transfer function since they are unobservable. This latter observatio n is readily verified from the structure of (A+ LC) in these
Observable Decompose d Form
81
coordinates since
and since A
+ LC is block lower triangular we have
with >.[A4 ] being eigenvalues of A (A, C).
3.6.4
+ LC for all L, i.e., being unobservabl e eigenvalues of
Transformation to observab le decomposed form
Now we saw in Chapter 2 that the controllable subspace is A-invariant, i.e., if x Erange[n] then Ax Erange[n], (Theorem 2.5). The analogous result here is that the unobservabl e subspace is A-invariant, i.e., if x Enull[U] then Ax Enull[U]. When the state model is in ot>servable decomposed form we can see this fact directly from (3.27) and the block structure of A. Alternatively, we can see that this result holds more generally in any coordinates by noting that we can always express the last block row of UA using the Cayley-Ham ilton theorem, Theorem 2.3, as
Therefore the last block row of UA depends only on block rows of U and thus if Ux = 0 thenUAx = !1). Now the A-invariance of the unobservabl e subspace provides a means for determining the coordinate transformati on matrix needed to put a given state model in observable decomposed form. Theorem 3.2 A coordinate transformati on matrix T transforms a given state model (A, B, C, D) having observability matrix U with rank[U] = n 1 to observable decomposed form if ?·
range[T2 ] = null[U] where
with T~o T2 being n x ni> n x n """- n 1 such that r- 1 exists. Proof Let QT denote the inverse ofT, i.e., (3.28)
··~
State Estimation and Observability
82
Then the transformed A and C matrices are given by -
A= T
_1
AT=
[Qf AT1 Qf AT2] QJ AT1 QJ AT2
C=CT=[CT1
CT2J= [cl
C2]
Now since C appears as the first prows ofU and T 2 is chosen so that UT2 = 0, we have CT2 = 0. Finally since range[T2 ] = S 8 and QT is the inverse ofT we see from (3.28) that
C2 =
when x E S 0
Q[x = 0
Then since AxE Sa if x E Sa, we have range[AT2 ] = S 0 and thus
3.7
Qf AT2 =
0.
•
Minimal Order Observer
Recall from Section 3.3 that use of the plant output enables the construction of an asymptotic state estimator for unstable plants. This estimator, referred to as an observer, has dimensions equal to the dimension of the plant state model. In this section we further recruit the plant output into the task of estimating the plant state by using it to reduce the dimension of the observer. More specifically, if the plant output y( t) consists of p independent scalars, {yJt): i = 1,2, · · ·p}, then y(t) contains information about the state in the form of a projection of the state onto a p dimensional subspace of state space. This fact allows us to concentrate on the design of an estimator for the remaining part of the state consisting of its projection on the remaining n - p dimensional subspace of the state space. In this way we will see that we can obtain a plant state estimator having dimension n- p which is referred to as a minimal or reduced order observer. We can develop this reduced order observer as follows.
3.7.1
The approach
Suppose the model for the plant whose state is to be estimated is given as
x(t) = Ax(t) y(t)
=
Cx(t)
+ Bu(t)
(3.29) (3.30)
where
Notice that there is no loss of generality in assuming that the state model has D = 0, since when D =1- 0 we can replace the left side of (3.30) by q( t) = y( t) - Du( t) and use q( t) in place of y(t) everywhere in the following. Now we assume throughout that the components {yi(t) : i = 1, 2, · · · ,p} of the plant
Minimal Order Observer
83
output y( t) are independent , i.e., we assume that p
l::O';Y;(t) = 0
for all t E [0, oc)
only if n;
=
0
for all i E [Lp]
i=i
This implies that C has independent rows. As mentioned earlier in this chapter, if p = n then Cis invertible and we can solve (3.30) for x(t) as x(t)
= c- 1y(t)
Since we usually have p < n, Cis not invertible. However, even in this case, we can still use y(t) and (3.30) to obtain information on the state. More specifically, we can determine xR(t),the projection of the state on range [cT], from (3.31) where c# = cT ( ccT)- 1is referred to as aright inverse ofC since cc# =I. Then we can wrjte x(t) as (3.32) where XN (t) E
null[CJ
Now since we can be obtainxR(t) from(3.31), we see from (3.32) that we can determine the complete plant state provided we can develop a method for estimating xN (t). Before doing this we show that xR (t) can be determined from (3.31 ).
3.7.2 Determination of xR(t) Notice that the independenc e of the rows of Censures that CCT is invertible. We can see this as follows. Suppose ccT is not invertible. Then we can find y # 0 such that
where w = cTy. However this is possible only if w = 0 and therefore cT has dependent columns. Since this contradicts the assumption that C has independent rows we must have CCT is invertible. Now the expression for c#, (3:31), can be derived as follows. Since xR(t) Erange[CT] it follows that (3.33) for an appropriate w(t). Then multiplying this equation through by C and using the
~-/--
84
State Estimation and Observabilit y
invertability of CCT enables
US
to determine w(t) as (3.34)
However from (3.32) we see that
y(t) = Cx(t) = CxR(t) and we can rewrite (3.34) as (3.35) Finally, premultiplyi ng this equation by CT and using (3.33) yields (3.31).
3.7.3
A fictitious output
Having determined the projection, xR(t), of x(t) on range [cT] along null[C], we need to develop a method for estimating xN (t). This is done by introducing a fictitious output, yF(t), and using it withy(t) to form a composite output, yc(t) as
y c (t)
=
y(t) [ YF (t) ]
=
c ] x(t) [ CF
=
Ccx(t)
(3.36)
where C F is chosen so that Cc is invertible, i.e., C F has n - p independent rows each independent of the rows of C. Then we can solve (3.36) for x(t) as (3.37) Before showing how to generate YF(t), it should be pointed out that we can ensure the invertability of C c by choosing C F so that range[CJ]
= null[C]
(3.38)
We can see this by using the general result for matrices which is developed at the beginning of Section 3.6 in terms of the matrix U, i.e., range [ uT] l_null[ U] Therefore we have range [cJJ l_null[C Fl and it follows from (3.38, 3.39) that null[C] n null[CF] = {0}
(3.39)
Minimal Order Observer
85
so that only if
X=0
which implies that Cc is invertible. Now assuming we chose C F to satisfy (3.38) we can readily show that (3.40) where
This enables (3.37) to be rewritten as (3.41) I
3.7.4
Determination of the fictitious output
Having obtained the state of the plant model in terms of the known plant output and the fictitious plant output, (3.41 ), we need a means for generating the fictitious output. This is done by using the plant state differential equation to set up a state model which has the plant's input and output, (y(t), u(t)), as input and has state which can be used as an estimate of the fictitious output. The derivation of this state model is given as follows. We begin by multiplying the plant state differential equation (3.29) by CF to obtain (3.42)
Then differentiating x(t), (3.41), and substituting the result in (3.42) gives
However from (3.38, 3.40) we have CFC# written as
=
0 and CFC# =I. Therefore (3.43) can be
(3.44) Now equation (3.44) suggests that an estimator for yF (t) has differential equation (3.45) where YF(t) will be an asymptotic estimate of y(t) provided CFAC# is stable. This follows from the differential equation for the estimation error, yF (t), which we can
86
State Estimation and Observability
determine by subtracting equation (3.44) from equation (3.45) to obtain
where
Thus we have
so that for all
yF (0)
(3.46)
if and only ifF R is stable.
3.1.5
Assignmen t of observer eigenvalue s
Now the eigenvalues ofF R = CFACt are fixed by the plant state model. Therefore when some of these eigenvalues are unstable we cannot satisfy (3.46). Recall we encountered the same sort of difficulty in Section 3.2 in connection with trying to estimate the state of a plant state model without using the plant output. We can overcome the present problem when the state model, whose state is to be estimated, is detectable by replacing CF everywhere in the foregoing development by (3.47)
where LR is used in the same way that Lis used in Section 3.3 to assign the eigenvalues of an observer's system matrix, A+ LC. This replacement is effected by replacing yF (t) by z(t) = Tx(t) in (3.36) to obtain [ y(t)] = Crx(t)
(3.48)
z(t)
where Q= [ I LR
0] I
Notice that since Cc is invertible and Q is invertible, independent of LR, Cr is invertible for any LR. Therefore we can determine x(t) from (3.48) for any LR as x(t)
=
My(t)
+ Nz(t)
(3.49)
Minimal Order Observer
87
where (3.50 i
Now by forming C rCi 1 =I we can show that .'vi and X must satisfy CN=0 TN=!
(3.51)
Therefore recalling from (3.38. 3.40) that
[cFc] Lc~
(3.52)
#
we see that the constraints (3.51) on Jf and X are satisfied when S=Ct
In order to obtain a differential equation for z(t), we follow the approach used to get a differential equation for yp(t). (3.44). Therefore multiplying equation (3.29) by T and substituting for x(t) from (3.49) yields :i(t) = TAXz(t)
where z(t)
=
+ TAMy(t) + TBu(t)
(3.53)
Tx(t) and TAN= CpAC1
+ LRCAC1
TAM= CpAC#
+ LRCAC#- CpAC1LR- LRCAC1LR
This differential equation suggests that an estimator, having the same form as an observer, (3.13), can be formulated for z(t) as
z· (t) = Fri(t) + Gr [u(t)] y( t)
(3.54)
where Fr =TAN
Gr=[TB
TAM]
Then the estimation error for z(t) is given by
I(t)
=
(eFT 1)i(O)
where i(t) = z(t)- z(t) and we have an asymptotic estimate of z(t) if and only ifF r is " stable. Thus provided F Tis stable, we can usez(t) generated by equation (3.54) in place ofz(t)
88
State Estimation and Observabilit y
in (3.49) to obtain an asymptotic estimate of x(t) as x(t)
=
My(t)
+ Nz(r)
(3.55)
Notice that the dependency ofF T = TAN on LR, (3.53), implies that we are only able to choose LR so that TAN is stable if the pair (CpAC'J;, CAC'J:) is detectable. We show now that this detectability condition is satisfied when the plant state model or pair (A, C) is detectable. Theorem 3.3 The pair (CpAC#, CAC#) is detectable if and only if the pair (A, C) is detectable. Proof Suppose (>., v) is an eigenvalue, right-eigenvector pair for A. Let r be a coordinate transformati on matrix given as
r = [ c# c#]
(3.56)
Then premultiplying the eigenvalue-e igenvector equation Av rr- 1 between A and v gives
=
AV by r-l and inserting
Aq = >.q where q =
(3.57)
r- 1v and
Then from (3.52) we see that Cis transformed as
c = cr = C[ c# c# ] =
[1
0]
Now suppose A is an unobservable eigenvalue of the pair (A, C). Then recalling that unobservable eigenvalues are invariant to coordinate transformati on, we see that q, (3.57), satisfies
Cq =
0
which from the form for C requires q to have its first p elements zero
where q2 has n- p components. Then using the form just obtained for eigenvalue-e igenvector equation, (3.57) becomes
A, we see that the
Minimal Order Observer
89
implying that ,\is an unobservable eigenvalue of the pair (A 4 , A2 ) which equals the pair (CFAC1, CAC1) specified in the statement of the theorem. This shows that the observability or detectability. (if Re )] ~ 0 I. of (A. C) is necessary for the obsen ability or detectability of the pair (C FAC1, CAC1). Sufficiency can be shown by reversing the • foregoing argument. Notice that when the plant state model's (A, C) pair is observable the coordinate transformation r, (3.56), just used in the proof of Theorem 3.3, can be used to determine LR, (3.47), to achieve some specified set of eigenvalues for the minimal order observer's system matrix, F T, (3.54). One way of doing this \Vouid be to use Ackermann's formula, introduced in the previous chapter, on the pair (A 4 . A 2 ). (3.57). The proof of Theorem 3.3 suggests that if we work in coordinates where the state model's C matrix is
C= [I 0] then a minimal order obsener to estimate the state in the transformed coordinates can be determined by taking T, (3.47), as
where Q is any nonsingular matrix of appropriate size. This ensures that CT, (3.48), is invertible independent of LR. Notice that Q plays the role of a coordinate transformation matrix for the coordinates of the minimal order observer and therefore Q does not affect the minimal order observer eigenvalues. Therefore referring to (3.54, 3.55) and taking Q =I for simplicity. we obtain a minimal order obsener for the estimation of the transformed state as
ij(r) = My(t)
+ ~vz(t)
z (t) = T ANz(t)
+
T AMy(t)
+ T Bu(t)
where N=
TAN = A4
[~]
+ LRA2
TAJ1 = LRAI- A4LR- LRA2LR
+ A3
In summary, we have seen that a minimal order observer for ann-dimension al plant state model is (n- p )-dimensional, where p is the number of independent scalar plant outputs available for use in estimating the plant state. As in the case of the full order observer introduced in the first few sections of this chapter, unobservable eigenvalues of the plant state model's pair (A, C) are fixed eigenvalues for the minimal order clJserver's system matrix FT, (3.54). Thus as in the case of the full order observer we are unable to design an asymptotic observer when the plant state model is not detectable.
90
State Estimation and Observabilit y
3.8
Notes and Referenc es
The obse1 ver was originally proposed by David G. Luenberger in his Ph.D. thesis in 1964. For this reason the observer is sometimes referred to as a Luenenberge r observer. Previously, in 1960, the use of a state model having the same structure as an observer was proposed by R. E. Kalman for the purposes of least squares signal estimation in the presence of additive noise. We will encounter the Kalman filter in Chapter 6. For further discussion of observers the reader is referred to Chapter 4 of [23] Finally, the term " output injection" is used by some authors to refer to the system signal manipulatio n we use to obtain an observer having system matrix A + LC. This terminology should be compared with the use of the term "state feedback" in connection with the formation of a system having system matrix A + BK.
4 Mod el Approximation via Bal anc ed Rea liza tion
4.1
Introduction
In previous chapters it was noted that whenever a state model (A, B, Ci is either not cotitrollable or not observable the transfer function resulting from the calculation C(sl- A)- 1B has pole-zero cancellations. Thus system uncont;oll ability and/or unobservability gives rise to a transfer function with order less than the dimension of the state space model. Therefore systems that are "almost uncontroll able" or "almost unobservable", should be able to be approxima ted by a transfer function model of order less than the dimension of the state model. Reduced order model approxima tion can be of importanc e in the implement ation of feedback control systems. For instance, model order reduction may be beneficial when the large dimension of the full state model gives rise to computati onal problems during the operation of the control system. This chapter treats the problem of extracting a subsystem of a given full order system which works on that part of the state space which is most involved in the input-outp ut behavior of the original system. This is accomplished by introducin g t\m m;trices called the observability Gramian and the controllab ility Gramian. It is shown that these matrices can be used to quantify the energy transfer from the input to the state and from the state to the output. In this way it is possible to identify which part of the state space is controlled most strongly and which part is most strongly observed. Then in order to construct a reduced order model by extracting a subsystem from the given system. it will be shown that the strongly controlled subspace must coincide with the strongly observed subspace. To achieve this coincidence we change coordinate s, if necessary, so that the Gramians become equal and diagonal. The resulting state model is said to be a balanced realization. The reduced order model is then obtained by extracting a subsystem from the balanced realization.
4.2
Controllable-Observable Decomposition
The idea for model order reduction being pursued in this chapter grew out of the basic fact that only the jointly controllable and observable part of a state model is needed to model the input -output behavior.
Model Approximation via Balanced Realizati on
92
The controlla ble and observable part of the state space can be viewed as one of four possible subs paces for the state space of any given state model. More§pecifically, consider the four dimensional state model in diagonal form which is shown in Figure 4.1. Inspection of the block diagram reveals that the four dimensional state model has a is transfer function which is only first order since only the first compone nt of the state which space state the of part that Thus output. the affects both affected by the input and is is both controlla ble and observable forms a one dimensional subspace Sea which specified as if x 1(t) = 0 fori= 2, 3,4 x(t) E Sea where
On further inspection of Figure 4.1 we see that there are three other subspaces sci5J SCOJ Sea specified as
Sea x(t) E Sea x(t) E Sea
x(t)
E
if x,(t) = 0 fori= 1,3,4 if x 1(t) = 0 fori= 1,2,4 if x 1(t) = 0 fori= 1, 2, 3
where Sea' Sea' Sea' Sea are referred to as follows.
Sea Sea Sco
Sea
is the controllable and observable subspace is the controllable and not observable subspace is the not controlla ble and observable subspace is the not controlla ble and not observable subspace
More generally when we are given a higher dimension state model, (A, B, C), which is
~~--~
u(t)
~ -~ Figure 4.1
Example of controllab le-observa ble decompos ition
Controllable -Observable Decomposit ion
93
not in any special form, we can extract a subsystem from the given system which has its state space coincident with the controllable and observable subspace. This can be done by using two successive coordinate transformati ons as described now. First we change coordinates so that the state model is in a controllable decomposed form . (4.1) with (Ac1, Bc1) being a controllable pair. The transformati on matrix to do this was discussed in Chapter 2. Notice that, in the new coordinates, we have the full n dimensional state space split into controllable and uncontrollable subspaces, Sc, Sc. It remains to split Sc into observable and unobservable subspaces, i.e., to split Scinto Sco and Sco· Next we carry out a second coordinate transformati on which affects only the controllable part of the controllable decomposed state model, (4.1). This is done using a coordinate transformati on matrix, T, which is constructed as I
with To being chosen so that the controllable state model (Ac1, Bc1, Cc1) is transformed to observable decomposed form, i.e., so that
0]
(4.2)
with (Aol, Col) being an observable pair. The transformati on T0 to do this was discussed in Chapter 3. Since coordinate transformati on preserves controllability, the.state model (4.2) is controllable. Therefore the subsystem of the observable part of the ~tate model (4.2), i.e., (A 01 , B01 , C01 ) is both controllable and observable. Thus the transfer function for the entire system has order equal to the dimension of this subsystem and is given by
G(s)
,~;
-
= Col (sf -
-
Ao!)
-1-
Bol
Notice that the foregoing model reduction procedure applies to full order state models which are either not controllable or not observable or both not controllable and not observable. More important, the reduced order model we obtain has exactly the same input-outpu t behavior as the full order model. In this chapter we are interestedin obtaining a reduced order model when the full order state model is completely controllable and observable. In this situation any reduced order model will have input-outpu t behavior which differs from the input-outpu t behavior of the full order state model. Our goal is to develop a method for achieving a reduced order state model having input-outpu t behavior which approximates the input-outpu t behavior of the full order state model. We will see that we can develop an approach for solving this model approximati on problem by replacing the concepts of controll-
Model Approximation via Balanced Realization
94
ability and observability by concepts of energy transfer. We will see that the distribution of energy among components of the state is related to properties of Gramian matrices which replace the controllability and observability matrices in this analysis. Just as coordinate transformations are important by extracting the controllable and observable part of a state model, so too are coordinate transformations importanUo being able to separate out that part of a controllable and observable state model which is most important in the transfer of energy from the system's input to the system's output. The state model in coordinates which enable the identification of this part of the system is called a balanced realization.
4.3
Introduction to the Observability Gramian
In order to define the observability Gramian we need to consider the related idea of output energy. Recall that if the state model (A, B, C) is known, then the zero input response, y(t), caused by any specified initial state, x(O), is given as
y(t) = CeA 1x(O)
(4.3)
The output energy, E 0 , for each initial state, x(O), is then defined as the integral of a nonnegative, real, scalar function v( t) of y( t), i.e., v(t) ;:::: 0 for all t E [0, oo)
Notice that since v(t) is non-negative real for all t, the output energy E 0 for any initial state x(O) must satisfy for all x(O)
E0
;::::
E0
= 0 only if v(t) = 0 for t;:::: 0
0
A simple way to choose v(t) so that E 0 has these properties is as follows. if y(t) is a real scalar if y( t) is a complex scalar
then choose then choose
if y(t) is a real vector if y(t) is a complex vector
then choose then choose
v(t) = /(t) v(t) =I y(t)l2 v(t) = YT (t)y(t) v(t) = y*(t)y(t)
Notice that when y(t) is a scalar, y*(t) denotes the complex conjugate of y(t) and IY( t) 12 = y* (t)y( t). Alternatively when y( t) is a complex vector, y* (t) denotes the transpose of y(t) and the complex conjugation of each entry in the resulting row vector. Thus if y(t) is a complex vector of length p then p
y*(t)y(t)
=
LIYz(t)l 2 1=1
More important, notice that each of the foregoing choices is a special case of the last
Introduction to the Observabillty Gramian
95
choice. Therefore, to avoid special cases, we define the output energy E 0 , in general as
Eo
=
looc y* (t)y( t)dt
(4.4)
so that after substituting from (4.3) we obtain
Eo= x*(O) r
=
(loao eA'rc*ceA dt)x(O) 1
(4.5)
(4.6)
x*(O) W 0 x(O)
where the constant n x n matrix W 0 is called the observability Gramian. Notice that in order for the foregoing integral to converge, or equivalently for W 0 to exist, the observable eigenvalues of (A, C) must be in the open left half plane. This can be seen by referring to section 7 of Chapter 1. Alternatively, if (A, C) is observable W 0 exists only if A is stable. Notice also that W 0 must be 1. an Hermitian matrix, i.e., W o = W ;, 2. a non-negative matrix, denoted W 0 ~ 0. I
Requirement number one results from the integral defining W 0 , (4.5). Hermitian matrices have entries in mirror image positions about the diagonal which are conjugates of each other, i.e., (Wo)ij = (W 0 )j;. When W 0 is real we require W 0 = W~ and W 0 is referred to as a symmetric matrix. Hermitian (symmetric) matrices have eigenvalues and eigenvectors with some rather striking properties which we will develop in the next section. Requirement number two results from the output energy being nonnegative for all initial states since a non-negative matrix, W 0 , has the property that
for all vectors x(O) of appropriate length. Now it turns out that we can always find a matrix M such that any Hermitian, nonnegative matrix W 0 can be factored as W 0 = M* M. This fact allows us to write x(O) W 0 x(O)
=
x(O)* M* M x(O) n
= z*z =
L)d2 i=l
where z = Mx(O). Since I: 7= 1 lz;l 2 ~ 0 for any z we have W 0 ~ 0. Moreover since L %:1iz;l 2 = 0 if and only if z =¢,we have x(O)* W 0 x(O) = 0 for some x(O) -=f 0 if and only if M and hence W 0 is singular, i.e., if and only if W 0 has one or more zero eigenvalues. More is said about this in the next section. Finally the observability of a state model is closely tied to the nonsingularity of its observability Gramian. This can be seen by noting from (4.4) that E 0 = 0 if and only if y(t) = 0 for all time. However we saw in Chapter 3 that the zero input response is null, y(t) = 0, for some x(O) -=f 0 if and only if (A, C) is unobservable. Therefore it follows that
Model Approximation via Balanced Realization
96
(A, C) is unobservable if and only if W 0 is singular. Further insight into this fact is given in subsequent sections where it is shown that W 0 can be obtained by solving a linear matrix equation which is referred to as the Lyapunov equation and which involves A and C in a simple fashion.
4.4
Fundamental Properties of W0
In the previous section we saw that the observability Gramian is a member of the class of matrices which are characterized as being Hermitian and nonnegative. In this section we give some of the essential features of these kinds of matrices.
4.4.1
Hermitian matrices
Recall that a matrix W 0 is said to be Hermitian if it equals its conjugate transpose, W 0 = W~. This implies the ijth and jith entries are conjugates of each other. The eigenvalues and eigenvectors of Hermitian matrices have some rather striking properties which are given as follows. Theorem 4.1 If W 0 is Hermitian then: (i) W 0 has real eigenvalues (ii) W 0 has right eigenvectors which satisfy v;*v 1 = 0, when er 0 ;
#- er J 0
Proof (i) Let (er 0 , v) be any eigenvalue-eige nvector pair for W 0 , i.e.,
(4.7) Then premultiplying (4.7) by v* gives (4.8) and taking the conjugate transpose throughout this equation gives v* W~v
= er~v*v
(4.9)
Then subtracting (4.9) from (4.8) we obtain v*(W 0
-
W~)v
=(era- er~)v*v
(4.10)
.
Now since W 0 is Hermitian, the left side of (4.1 0) is zero. Therefore either er o = er~ or v* v = 0. However v* v = 0 holds only if v = 0, and since vis an eigenvector of W 0 , we have v*v #- 0. Therefore (4.10) can only be satisfied if er 0 = er~ which shows that era must be ~.
era!
Proof(ii) Let (er 0 ;,v;: i = #- ero2· Then we have
1,2) be two eigenvalue-eige nvector pairs for W 0 with (4.11) (4.12)
97
Fundamen tal Properties of Wo
Next operate on these equations as follows: (i) premultipl y (4.11) by 1·2* (ii) postmultip ly the second form for (4.12) by v 1 (iii) subtract the result of (ii) from (i) This yields (4.13)
However, since H" 0 is Hermitian , the left side of (4.13) is zero. Moreover we are assuming • that 0'01 =fc 0'~ 2 . Therefore (4.13) is satisfied only if vtv 2 = 0. different to ing correspond rs eigemecto , symmetric .. i.e reaL is Notice that when W 0 . .. v iT v j = 0 : 1. 1_;_ ],. 0'0 ; 1_;_ O'oJ· Iues are orth ogona,I I.e . e1genva Recall that if a matrix has distinct eigenvalues, it has a complete set of eigenvectors and can be diagonaliz ed by a matrix haYing columns made up from its eigemecto rs. Thus when Wa has distinct eigenvalues we can use its eigenvectors {v; : i = 1, 2, · · · n} to form a matrix V 0 \vhich diagonaliz es W 0
v- 1 w v 0
0
-2: 0
(4.14)
0-
where
:E 0
=
["~1
0
0
(l'o2
0 =
.
0
0 V 0 = [v 1
v2
diag[0'0 J, O'o2'
· · ·, O'on]
O'on vn]
HoweYer if the eigenvectors are normalized ,
then we see from Theorem 4.1 that
( 4.15)
1 Therefore V~ 1 = V~ so that V~W 0 V = 2: 0 . Matrices satisfying the condition V~ are referred to as unitary matrices. Alternatively, when W 0 is real then (4.15) becomes
=
V~
V~Va =I and therefore V~ 1
=
V~ so that V~ W 0 V 0 = 2: 0 • Matrices satisfying the condition
98
Model Approximation via Balanced Realization
v,;
are referred to as orthogonal matrices. It can be shown that any Hermitian V;,- 1 = matrix car1 be diagonalized by a unitary matrix even if the Hermitian matrix has multiple eigenvalues. To recap, we have encountered the following matrix types. Definition 4.1 If M is complex then M is Hermitian
if M
=
M*
M is unitary
if
M- 1 =
M is symmetric
if
M = M
M is orthogonal
if M- 1 = M
M*
If M is real then
4.4.2
7
7
Positive definite and non-negative matrices
Suppose that we change coordinates, viz., x(O) = Tz(O), with T nonsingular. Then for each initial state x(O) in the old coordinates, there is a unique initial state z(O) in the new coordinates and vice versa. Thus we see from the expression for the output energy, (4.6), that the output energy can be rewritten in terms of the initial state in the new coordinates as (4.16) where W0 = T*W 0 T. Now if we choose T as the unitary matrix V 0 , (4.14), then
and (4.16) becomes 11
E0
= z*(O)~oz(O) =
L
(4.17)
CT0 ;IzJO)I 2
i=1
However since there is a unique z(O) for each x(O) we have that E 0 2 0 for all x(O) if and only if E 0 2 Oforallz(O). Thusweseefrom(4.17)thatE 0 2 Oforallx(O) ifandonly if all eigenvalues of W 0 are non-negative, i.e., croi
20
i= l,2,···n
Otherwise, if W 0 were to have some negative eigenvalues, we could choose z(O) so that z1(0) c/c 0 if cr01 < 0
and
z1(0) = 0 if cr 01 > 0
i = 1, 2, · · ·, n
which would give E 0 < 0, for the initial state x(O) = Tz(O) and the requirement for Eo to be non-negative for all initial states would be violated.
Fundamental Properties of Wo
99
Finally, we can show by a similar argument that E 0 > 0 for all x(O) of 0 if and only if all eigenvalues of W 0 are positive. To recap, we have defined the matrix properties of positive definiteness and nonnegativeness as follows. Definition 4.2 W 0 said to be:
(i) (ii)
when x*W 0 x > 0
positive definite, denoted as W 0 > 0 non-negative, denoted as W 0 ~ 0
when x* W 0 x ~ 0
for all x for all x
of 0
Moreover these properties impose certain restrictions on the eigenvalues of W 0 namely
4.4.3
>0
(i)
then
U0;
(ii)
then
U0 ; ~
0
for
U0;
for
U0; E
E
>.[W 0 ] >.[W0 ]
Relating E0 to .A[W0 ]
In order to begin to appreciate the role played by the eigenvalues of W 0 in achieving a lower order state model approximation we consider the problem of finding the initial state, Xmax(O), which produces the most output energy, Eomax• when the initial state is constrained so that X~ax(O)Xmax(O)
=1
(4.18)
When x(O) is constrained in this way we say x(O) is normalized to one. Notice that this constraint on the initial state removes the possibility of obtaining an unbounded output energy by choosing an initial state with an unbounded component. We begin the development of a solution to this problem by noticing that if we use a coordinate transformation matrix T which is unitary, the constraint (4.18) is preserved, i.e., if T satisfies T* T = I then we have ?·
x*(O)x(O)
=
z*(O)T*Tz(O)
=
z*(O)z(O)
(4.19)
Therefore if x*(O)x(O) = 1 so does z*(O)z(O). Now we have seen that using the unitary matrix T = V 0 as a coordinate transformation matrix makes the observability Gramian diagonal in the new coordinates. Therefore our problem can be solved by first solving the problem in coordinates in which the observability Gramian is diagonal and then transforming the solution, Zmax(O) in these coordinates back into the original coordinates. Suppose we are in coordinates where the observability Gramian is a diagonal matrix, E 0 • Suppose also that we have reorder the components of the state in these coordinates so that the largest entry on the diagonal ofE 0 is first, i.e., u01 ~ CT0 ; : i = 2, 3, · · · , n. Then we see from equation (4.17) that the output energy satisfies n
n
Eo=
Luo;iz;(O)I i=l
2
::=;
U0 1
L i=l
I
z;(O)
2
1
(4.20)
100
Model Approximation via Balanced Realization
However since we are assuming that x(O) is normalized to one, we see from (4.19) that z(O) is also normalized to one n
z*(O)z(O)
=
L
I
z;(O)
12
= 1
(4.21)
i=l
Therefore under this constraint we see from (4.20) that the output energy, E 0 , is bounded by the observability Gramian's largest eigenvalue, i.e., (4.22) Notice that if we choose
then (4.21) is satisfied and the output energy becomes n
Eo=
L D"o;lz;(O)I
2 = D"oJ
i=O
and we achieve the upper bound on E 0 , (4.22). Thus the normalized initial state in the original coordinates which maximizes the output energy is obtained as (4.23)
1 0
0
Therefore our problem is solved by setting the initial state equal to the eigenvector of W 0 corresponding to the largest eigenvalue of W a when that eigenvector is normalized to one. Moreover, it is not hard to see from the foregoing that, in general, we have
when x(O)
= vk
The foregoing analysis indicates that the relative importance of the components of z(O) in producing output energy depends on the size of an eigenvalues of W 0 relative other eigenvalues of W 0 . We can use this observation to suggest how we are going to be able to obtain a reduced order state model approximation. We do this as follows. Suppose we choose the coordinates for the state space so that the eigenvalues of W 0 are in descending size, i.e., a 01 ?: a 02 ?: · · · ?: a 0 n with W 0 diagonal. Suppose we consider z(O)
_.{.,;:;.
".
Introduction to the Controllability Gramian
to have all its elements equal, z;(O)
=
101
zi(O). Then the output energy is given by 0
0 0: 0
1z(O) = I~ 11
!Joi
!Jon
where
Moreover, we can always choose an integer n 1 E [0, n]large enough so that (4.24)
where
n,
Eo]
= ~.
L i=l
n
IJc;
Eo2 =
~.
L
!Joi
i=n 1+1
Therefore in this situation a good approximation to the output energy is
Since the last n- n 1 components of the initial state are less important to the zero input response than the first n 1 components under the foregoing condition of an equal element initial state, a reduced order state model in these coordinates could be formed as (AhB 1 , C\) where A1 is the n 1 x n 1 partition in the top left corner of A and .8 1, C\ are corresponding partitions of B, C. However, our interest in this chapter is in obtaining a reduced dimension state model whose input-output behaYior approximates the input-output beha\io;· of the full dimension model. The foregoing argument for neglecting the last n- n 1 components of z(t) focuses only on the zero input response. Therefore what is missing from the previous argument, if we are interested in modeling the input-output behavior, is the effect the input has on the neglected components of z(t). The effect of the input on different components of the state is related to properties of a matrix known as the controllability Gramian.
4.5
Introduction to the Controllability Gramian
The controllability Gramian. which we introduce in this section, is im olved in characterizing the energy delivered to the state when the input is a unit impulse and the initial state is null. Since the Laplace transform of the zero state response to this input is the given system's transfer function the distribution of energy among the components of the state in this situation is appropriate to our goal of obtaining a reduced order transfer function approximation. We begin the dewlopment of the controllability Gramian as follows.
102
Model Approxim ation via Balanced Realizatio n
Suppose we are given a state model, (A, B, C). Then the state in response to a unit impulse at time zero when the initial state is null is given by
Then the energy, Ec, transferred from this input to the state is given by (4.25) Notice that the integrand obtained here is strikingly different from the one obtained in the integral for the output energy, (4.5). We proceed now to express Ec (4.25) as an integral which appears as the dual of the integral expression of E 0 • More specifically, we show now that Ec can be expressed as the trace of the integral obtained earlier for E 0 , (4.5) with A replaced by A* and C replaced by B*. The trace of a matrix is a scalar which is defined as follows. Definition 4.3 The trace of any square matrix M of size n, is defined as the sum of its diagonal entries, n
= 2: m 11
trace[M]
i=l
where mu is the ijth entry in M. In order to proceed we need the following result involving the trace of the product of two, not necessarily square, matrices Theorem 4.2 Given two matrices M, N of size p x n, and n x p then trace [M N] Proof Let M N
trace [N M]
=
= Q. Then p
trace[MN] =
2: q
11
i=l
where q 11 is the result of multiplying the
ith
q,, =
row of M by the
ith
column of N,
n
2:munii j=l
Therefore we can rewrite the trace of the matrix product as p
trace[MN]
n
= 2: L
mun;;
i=l j=l
Next interchang ing the order of the summation s gives n
trace[MN]
=
p
L L n mu 11
j=l i=l
·.~
Introductio n to the Controllab ility Gramian
103
and we see that
• where SjJ is the /h entry on the diagonal of S = N M, and the result follows the is matrix square any of trace the that is theorem this of ce consequen An immediate 1 sum of its eigenvalues. More specifically if JJ = 1"- \Y, then n
trace[M] = trace[V- 1AV] = trace[Avv - 1] =
2:..:::\ i=l
where>..; E .\[Jf1 • Returning to the problem of re-expressing the energy En (4.25), we use Theorem 4.2 with
to obtain
Ee
= trace[Wc]
(4.26)
\Vhere We. the controllab ility Gramian. is given by (4.27) Notice that We is Hermitian and that We is non-negative since the integrand in (4.27) is quadratic. Notice also that if we replace A by A' and B by C* in the foregoing definition of the controllab ility Gramian. We. (4.27), we obtain the obsenabil ity Gramian, W 0 , (4.6). Thus all the properties discussed in connection with W 0 hold for WeMore specifically. since We is Hermitian , Tre has real eigemalue s and can be diagonalized by a unitary matrix, V 0 i.e., (4.28) where V;:- 1 = v; and E, is real and diagonal. Notice that Vc has columns which are normalized right eigenvectors of We and the diagonal entries in the diagonal matrix Ec are the eigenvalues of rr,. In addition recalling the discussion following the proof of Theorem 4.2 that the trace of a square matrix equals the sum of its eigenvalues, we have
Now we will see in the next section that we can always transform coordinate s so that the controllability Gramian is diagonal. Assuming we have done this transfon11ation, we permute componen ts of the state, if need be. so that the entries along the diagonal of Ee appear in descending size, i.e., uc; 2': uc(i+I) : i = 1, 2, · · · n- 1. Then we can always
104
Model Approximat ion via Balanced Realization
choose n 1 so that
where with
Eel =
L"'
n
aci
i=l
and with
Ec2 =
L
ac;
i=n 1+1
This inequality implies that the first n 1 components of the state in these coordinates receive most of the energy from the input. If in addition, in these coordinates, the observability Gramian happened to be diagonal with entries on the diagonal being in descending size, the first n 1 components of the state would also be relatively more important than the last n- n 1 components in the transfer of energy to the output. We could then obtain an approximati on to the full order transfer function for the system as
where the full state model in these special coordinates has its system parameters, (A 6 , Bb, Cb), partitioned to reflect the partitioning of the state, i.e.,
In the next section we will see that it is always possible to transform the coordinates so that any controllable and observable state model has controllability and observability Gramians which are equal and diagonal, i.e., so that in the new coordinates
with L:b having entries in descending size along its diagonal. A state model having this property is referred to as a balanced realization. A reduced order approximati on, Gapx(s), to the full order system is obtained from the balanced realization in the manner just described. Finally, we are assuming the pair (A, B) is controllable so that every component of the state receives some of the energy supplied by the input. Therefore, from the foregoing, we have all eigenvalues of We bigger than zero or We> 0 when (A, B) controllable. In addition, it turns out that rank[Wc]
4.6
=
rank[D]
Balanced Realizati on
Suppose we are given the controllability and observability Gramians, W"' W 0 , for a controllable and observable state model, {A, B, C, D}, of the system to be approximate d. Then in this section we will show how to construct a coordinate transformati on matrix so
~;
Balanced Realization
105
that the state model in the new coordinates is a balanced realization. Just as in Section 4.2 we saw that a succession of two state coordinate transformations are required to achieve a controllable-observable decomposed form, so too in this section we will see that we need a succession of two transformations to achieve a balanced realization. The first coordinate transformation gives a new state model with controllability Gramian equal to an identity matrix. The second coordinate transformation keeps the controllability Gramian diagonal and diagonalizes the observability Gramian obtained from the first transformation so that the resulting Gramians are equal and diagonal. To develop these transformations we need the fact that, if the coordinates are changed using coordinate transformation matrix T, then the Gramians (We, W0 )for the state model in the new coordinates are related to the Gramians ( W c• W 0 ) for the state model in the original coordinates as (4.29) where x(t) = Ti(t). These relations can be obtained by replacing (A, B, C) in the integrals for ~lie and W0 by (T- 1 AT, T- 1 B, CT). We use (4.29) now to develop a the sequence of three coordinate transformations T; : i = 1, 2 and P so that T b = T 1 T 2 P transforms the given controllable arid observable state model to a balanced realization, where Pis the permutation matrix required to put the diagonal elements of the Gramians in decreasing size. We will show now that these coordinate transformation matrices are determined from the Gramians for the given state model. In the next section, we will show that the Gramians for the given state model can be determined by solving two linear matrix equations known as Lyapunov equations. For the time being suppose we are given the controllability and observability Gramians, We, W 0 for the state model we wish to approximate. Then we form the first coordinate transformation as
1
1
r,..~
where v; WcVc = Ee with v; = V;:- 1and E~ > 0 is diagonal with mE~= Ec· Then using (4.29) we see that the Gramians which result from the first coordinate transformation are given as
Next, we take the second coordinate transformation as Tz
-
=
- _!
VoEo4
where V(; W0 V0 = E0 and E~ > 0 with (E~) 4 = E 0 . Then using (4.29) we see that the Gramians which result from the second transformation are given by
-I
Wo
=
TiWoTz
and we have the Gramians equal and diagonal.
=E~
106
••••
•
Model Approxim ation via Balanced Realizatio n
'
It remains to permute the componen ts of the state so that the entries on the diagonal of
the Gramians are ordered in decreasing size. This correspond s to a third coordinate transforma tion, this time using a permutatio n matrix Pas the coordinate transforma tion matrix so that
where
and the ub;s are referred to as the Hankel singular values for the system. More is said about this in Section 4.9 At this stage we can obtain the balanced realization, (Ab, B1, Ch), from (T- 1AT, T- 1B, CT) with T = T 1 T 2 P. Then partitionin g the balanced realization as (4.30)
with n 1 large enough so that n1
n
i=1
i=n 1+1
I:: ubi » I::
ubi
we obtain the reduced order state model as (Ab 1 ,Bh 1 ,Ch 1,D) and the reduced order transfer function model as
Recall that we are assuming that the full order state model is stable, i.e., Ab is stable. Therefore we get a bounded output for every bounded input to the full order, unreduced system. Thus if Gapx (s) is to be a meaningfully reduced order approxima tion to the full order transfer function, we expect Gapx(s) to be stable. Otherwise the behavior of the reduced order system would be dramatical ly different from the behavior of the original full order system. The following theorem specifies conditions which guarantee that the reduced order model is stable. Theorem 4.3 If in (4.30) we have ubn 1 'I uhn 1 _,_ 1 then Ab 1 is stable. Proof Appendix In the next section we show that the Gramians for a given state model can be determined by solving linear matrix equations called Lyapunov equations. In this way the calculation of the integrals in the definition of the Gramians is avoided. We will also see that further relations between the Gramians for a state model and the observability, controllability, and stability of that state model are uncovered by considering the Gramians to be solutions to Lyapunov equations.
I
The Lyapunov Equation
4.7
107
The Lyapunov Equation
We begin this section by generalizing the output energ~ as follows. Recall that in the absence of an input the observability Gramian gives the output energy caused by any initial state as
Now suppose we replace this constant quadratic function of the initial state by e0 (tl, a time varying quadratic function of the state given as (4.31)
e0 (t) = x*(t)Px(t)
where Pis a positive definite Hermitian matrix and xit) function is always positive for all t
E
= eA 1x(O).
(0, oo) and all x(O) #
"Kotice that this
(4.32)
0
Next assume that e0 (t) has a derivatiYe \\hich is a negative quadratic function of the st;rte de 0 (t) · _ = -x*(t)Qx(t) < 0 dt
for all t
-
E
(0, oo) and all x(O)
#
0
(4.33)
where Q is a positive definite Hermitian matrix. Then we see from (4.32, 4.33) that e0 (t) is a positive, decreasing function of time which is bounded below by zero. This implies that (4.34)
However since Pis invertible we have e0 (t) lim x(t)
= 0
= 0 only if x(t) = 0 and (4.34) implies that for all x(O)
(4.35)
t-+00
Therefore equations (4.31). and (4.33) imply that the state model is internally stable, i.e., the state model's A matrix has all its eigenvalues in the open left half plane. NmY if we differentiate (4.31) and use :\"(t) = Ax(t) we can express the time derivative of e0 (t), as
e (tl 0
=
x*(r)(A*P~ PA)x(tl
These observations lead us to formulate the following theorem concerning the stability of A. Theorem 4.4 If for any Hermitian Q > 0 we obtain P > 0 as a solution to the linear matrix equation A*P+ PA = -Q
then A is stable.
(4.36)
108
Model Approximation via Balanced Realization
Proof Suppose (.A, v) is any eigenvalue, right-eigenvector pair for A. Then pre and post multiplying (4.36) by v* and v respectively gives v*(A*P+ PA)v
= -v*Qv
which recalling v* A* = .A*v*becomes (.A*+ .A)v* Pv = -v*Qv
(4.37)
However since v* Pv > 0 and -v*Qv < 0 for all v # 0, we see that (4.37) is satisfied only if (.A*+ .A)= 2Re[.A] < 0. This shows that all eigenvalues of A lie in the open left half plane and therefore A is stable. • The linear matrix equation (4.36) is called a Lyapunov equation after the Russian mathematician who originated this approach in the study of stability.
· 4.7.1
Relation to the Gramians
We show next that when we take Q = C*C the solution P to the Lyapunov equation, (4.36), is the observability Gramian, i.e., W 0 satisfies the Lyapunov equation (4.38)
Analogously, the controllability Gramian, We, is the solution the Lyapunov equation (4.39)
The foregoing relations between the Gramians and the solutions to Lyapunov equations are shown in the following theorem. Theorem 4.5 IfF is a square stable matrix and if (4.40)
then
FW+ WF* = -Q
(4.41)
Proof We begin the proof by defining the matrix function
Then we differentiate Z(t) to obtain
Next recalling the series expansion of er 1 , we see thatF* and eF' 1 commute. Therefore
The Lyapunov Equation
109
the foregoing equation can be written as dZitl
---crt= FZI t) + Z( t)F
(4.4.:2)
Finally, since A is being assumed stable, we hcne Zix) = 0. Therefore integrating (4.42) from 0 to oo gives
lax dZ(tl =lax [FZ(tl Z(t)Fjdt Z(oo)- Z(OJ =
F[laoo
-Q=FW+
eF1 QeF' 1dt]
+[lax
eF1 QeF'rdt]F*
wr
•
No\Y there are two important observations we can make when \Ye compare the Lyapunov equation (4.36) with the Lyapunov equations for the Gramians (4.38, 4.39). First, notice that unlike Q on the right side of(4.36), C*C and BB* in (4.38, 4.39) are only non-negative. Second, (4.38, 4.39) are linear equations in the elements of the matrices W 0 , We. Therefore we may be able to solve (4.38, 4.39) for matrices W 0 and rv, when A is not stable. However since the observability and controllability Gramians (4.5, 4.27) are only defined when A is stable, the matrices W 0 , We obtained by solving (4.38, 4.39) are system Gramians only if A is stable. The implications of these observations are taken up next.
4.7.2
Observabil ity, stability, and the observabil ity Gram ian
What follows are theorems which describe how the concepts named in the title of this section are interrelated. Theorem 4.6 If (A. C) is observable and if P > 0 satisfies the Lyapunov'equa tion AXP+PA = -C*C
(4.43)
then A is stable. Proof Suppose, contrary to the theorem, that A is not stable, i.e., Av = ,\v with Re[.A] :::0: 0 for some .A E .A[A]. Then proceeding as in the proof of Theorem 4.4 we obtain 2Re[.A](v*Pv) = -v*C*Cv
(4.44)
Now since (A, C) is observable we have Cv = ~ i=- 0 and L'·c~ Cc· > 0. However we are assuming that Re[.A]::;:: 0. Therefore (4.44) is satisfied under these conditions only if we have~·· Pv < 0 which contradicts the condition P > 0 specified in the Theorem. Therefore • our assumption that A is unstable is false. is C) (A, and unstable is A when that proof, Notice, in connection with the foregoing have we observable (4.45)
110
Model Approximation via Balanced Realization
is unbounded and the observability Gramian, W 0 , is undefined. However this does not mean that we are unable to find P to satisfy (4.43) in this case. The foregoing theorem has the following corollary. Theorem 4.7 If A is stable and Pis positive definite and satisfies (4.43) then (A, C) is observable. Proof Suppose, contrary to the theorem, that (A, C) is not observable. Then we must have a(?., v) pair, Av = >.v and Cv = 0. Therefore proceeding as in the proof of Theorem 4.6 we obtain 2Re[>.](v' Pv) = -v*C*Cv = 0
(4.46)
Now in order to satisfy (4.46) we must have Re[>.] = 0 or v* Pv = 0 or both. The condition Re[>.] = 0 is impossible since we are assuming that A is stable. The condition v* Pv = 0 is also impossible since we are assuming that P > 0. Thus (4.46) can not be • satisfied and therefore (A, C) must be an observable pair. To recap, the foregoing pair of theorems state that A is stable when (4.43) is satisfied by P > 0 if and only if (A, C) is an observable pair. Since the observability Gramian W 0 , (4.45) is defined when A is stable and positive definite when (A, C) is an observable pair, if the solution P to (4.43) satisfies P > 0 when (A, C) is not an observable pair Pis not the observability Gramian. The following theorem characterizes the effect of having a P > 0 as a solution to the Lyapunov equation (4.43) when the pair (A, C) is not observable. Theorem 4.8 If the pair (A, C) is not observable and P > 0 satisfies the Lyapunov equation (4.43) then A has imaginary axis eigenvalues. Proof Since the pair (A, C) is not observable, we can choose a (>., v) pair so that Av = >.v and Cv = 0. Then we see from (4.46), that 2Re[>.](v* Pv) = 0
(4.47)
However since P > 0, (4.47) is satisfied only if Re[>.] = 0. • To recap, we have shown in the foregoing theorems that A is stable when the Lyapunov equation A*P+ PA
= -C*C
is satisfied by P > 0 if and only if the pair (A, C) is observable. Alternatively, if this Lyapunov equation is satisfied by P > 0 when (A, C) is not observable, the unobservable eigenvalues of A lie on the imaginary axis. Notice from the proof of Theorem 4.7 that eigenvalues of A that are not on the imaginary axis are observable and lie in the left half plane. Analogously, A is stable when the Lyapunov equation AP+PA*=-BB*
is satisfied by P > 0 if and only if the pair (A, B) is controllable. Alternatively, if this Lyapunov equation is satisfied by P > 0 when (A, B) is not controllable, the uncontrollable eigenvalues lie on the imaginary axis and the controllable eigenvalues are all in the left half plane.
Controllabil ity Gramian Revisited
4.8
111
Controllability Gramian Revisited
In this section we develop another use for the controllability Gramian which provides us with a different way of viewing the process of model reduction and a new way of thinking about a system's input-outpu t behavior.
4.8.1
The least energy input problem
An alternative use for the controllability Gramian, We, arises in connection with the solution to the problem of finding the input u0 (t) : t E ( -oo, 0] which expends the least energy in taking the null state at time t = -oo to some specified state at time t = 0. In order to solve this problem we need to recall, from Chapter 1, that the basic equation relating the initial state and input to the final state is
x( t1 )
=
eA 1f x( -oo) +
l
lf
-oo
eA(tr -T) Bu(T)dT
(4.48)
Then, in the present situation, we have x( -oo) = !Zl, and t1 = 0 so that (4.48) becomes x(O) ·=
/
1:
e-AT Bu(T)dT
(4.49)
Now we want to choose u(t) to satisfy (4.49) so that the input energy, EcUl given by (4.50)
achieves its minimum value, Ecua, determined from
Ecua
=
min Ecu u(t)
It turns out that one input that solves this problem is given as (4.51)
where We is the controllability Gramian, (4.27). Notice that this input satisfies (4.49) and has energy determined as Ecu
=
1:
u*(T)u(T)dT
(1:
=
x*(O)W~ 1
=
x*(O)W~ 1 x(O)
=
e-AT BB*e-A'TdT ) W~ 1 x(O) Eeuo
Notice that u0 (t) exists provided We is invertible. This requirement that the (A, B) pair be controllable is a necessary condition for being able to satisfy (4.49) for any x(O), (see Chapter 2 Section 2.4). Recall that the coordinate transformati on matrix, Ve, (4.28), that diagonalizes We is unitary, V~ 1 = v;. Thus we see that this coordinate transformati on also diagonalizes
112
~
Model Approximation via Balanced Realization
} I
w;:- 1 since Therefore we can use this fact to rewrite E,uo as
(4.52) where
z(O)
=
v:x(O)
Then if the components of z(O) are equal and have been permuted so the entries along the diagonal of ~c are ordered, abi 2': ab(i+ 1l : i = 1, 2, · · · n - 1, we see from (4. 52) that most of the energy in the input is needed to achieve components in the lower partition of z(O). This implies that the lower partition of z(t) is harder to control than the upper partition. Now in the following we make use of the foregoing alternative interpretation of the controllability Gramian to provide further insight into the use of a balanced realization to achieve model reduction. Recall that a balanced realization has both Gramians equal to the same diagonal matrix with the entries encountered in descending the diagonal forming a nonincreasing sequence. Then we saw, in Section 4.4.3, that most of the energy supplied to the output by an initial state with equal component values comes from components in the upper partition of the initial state. However, we have just seen that the components in the upper partition of the state are more easily manipulated by the input than components in the lower partition. Therefore, in balanced coordinates, the subspace of the state space corresponding to the upper partition of the full state is more involved in the input-output behavior than the subspace corresponding to the lower partition of the state. This suggests that we can capture most of the full order system's input-output behavior by using a reduced order state model formed by truncating the balanced realization in the manner given at the end of Section 4.6.
4.8.2
Hankel operator
We can obtain further insight into a system's input-output behavior by using the present interpretation of the controllability Gramian. This is done by noting that: (i) the controllability Gramian is used to characterize the system's transformation of u(t) : t E ( -oo, OJ into x(O); (ii) the observability Gramian is used to characterize the system's transformation of x(O) into y(t) : t E [0, oo) when u(t) = 0: t E [0, oo). This suggests that, in addition to the concept of a system implied by its transfer function, G(s), i.e., that the system transforms or maps system inputs, u(t) : t E [0, oo ), to system outputs, y(t) : t E [0, oo ), we can view the system as a map from past inputs, u(t) : t E ( -oo, OJ to future outputs, y( t) : t E [0, oo ). This map is referred to as the
n '
Controllabil ity Gramian Revisited
113
system's Hankel operator and is denoted as r G· When a system is stable its Hankel operator has an operator norm which is referred· to as the Hankel norm. Operators and operator norms will be developed in more depth in Chapter 7. For the time being we want to show that the Hankel norm of a system equals the largest entry on the diagonal of the Gramians when the state model for the system is a balanced realization. Suppose we are given a strictly proper transfer function, G(s), and minimal state model, (A, B, C), for some stable system. Then the Hankel operator, r G' for this system has output y(t) : t E [0, oo) produced by input u(t) : t E ( -oo, OJ when x( -oo) = 0 and
u(t) = 0: t E [O,oo).
Now we define the system's Hankel norm, denoted IIG(s)IIH as
IIG(s)IIH
=
(max
u(~12..
y*(t)y(t)dtl)~ [It' tao u*(t)u(t)dt
(4.53)
IE(O,oo) x(-oo)=l'l
where (-)! indicates the positive square root. There is a close connection between a system's Hankel norm and that system's balanced realization as shown in the following t~orem.
Theorem 4.9 The Hankel norm IIG(s)IIH.'for a stable system having transfer function G(s) is given as (4.54) where ab 1 is the largest entry on the diagonal of the Gramians in balanced coordinates. Proof Recalling (4.29) we see that the eigenvalues of the product of the controllability and observability Gramians are invariant to a coordinate transformati on since we have
ww c
0
=
r- 1 wc r-•r·w
0
T
=
r-'wc w r 0
(4.55)
Thus when Tis the coordinate transformati on which puts the system in balanced form we have
where {ab; : i = 1, 2, · · · n} are referred to as the Hankel singular values. Next recall from Section 4.4.3 that when the state model is a balanced realization, the ~aximum output energy, Eomax> produced ?Y ~n initial state, z(O), constrained to satisfy z (O)z(O) =a , when u(t) = 0: t E [0, oo ), 1s giVen by Eomax
[Eo]= = max "(0)
[z",.x(o)] *:Eb[zmax(O)] = a 2ab 1
z' (O)z(O)=a2
where [~ax(O)f =[a
0
· · · OJ
114
Model Approxim ation via Balanced Realizati on
Alternatively, recalling the solution to the least energy input problem, we see from produce (4.52) that using the least energy input u0 (t) : t E ( -oo, 0] when z( -oo) = 0 to zmax(O) gives the least energy as )
E cmin
=
· [Ecu ] mm
=
[z max ( 0 )] * :Eh-I z max ( 0 )
ull) IE( -x.O]
Cl=(}hI
.:;(-'X)=O
:(Oj=:max (O)
Therefor e we see that the maximum value of the ratio of energy ~ut to energy in is given as Eomax
~
=
2
,2
(Tbi =/\max
[
we wo ]
cmm
which from (4.53, 4.55) yields (4.54 ).
4.9
•
Notes and References
Hermitia n matrices play an importan t role in many branches of science and engineering, e.g., quantum mechanics. In general a square matrix having repeated eigenvalues may not be able to be diagonalized by a similarity transform ation, i.e., we may not be able to find V such that v-I MV is diagonal. However a Hermitia n matrix can always be diagonalized even if it has repeated eigenvalues, [39]. The term "Gramia n" arose originally in connectio n with the problem of determining if the vectors in a set of vectors {v; : i = 1, 2, · · · , n} were linearly independent. The Gramian G was defined as the scalar whose value was determined as G = det[M], where (M)u = v; *v1. The independence of the v;s required G to be nonzero, [5]. As used in system theory, the term Gramian describes a matrix, not a scalar, which is formed in manner reminiscent of the foregoing matrix G. Balanced realization was first used in the area of digital filters to combat inaccuracies (roundoff) resulting from computa tion errors brought about by the requirem ent that calculations be done using finite precision arithmeti c [29]. The use of a balanced realization to obtain a reduced order model approxim ation and the method given here for calculating a balanced realization was originally presented in [27]. Theorem 4.8 and the proof of Theorem 4.3 (Appendix) were originally given in [34]. The idea of a balanced realization was extended to unstable linear systems, [22] and to a class of nonlinea r state models, [38]. Finally, we need to take note of the following importan t aspect of model reduction. We will see in the remainde r of this book that optimal controller design techniques, e.g., quadratic , Gaussian , and H x feedback control theories, make use of an observer as part of the feedback controller. Since the observer order matches the plant order, there can be problems in implementing controllers for use with high order plants. Unfortun ately, the stability of the closed loop system may not be preserved when the controlle r designed using the optimal control theory is replaced by a reduced order model. A good summary of approach es to this problem up until 1989 is given in [2]. A more recent approach to solving this problem, involving H X! robust control theory is given in [30] for linear plants and in [32] for a class of nonlinea r plants.
5 Qua drat ic Control
5.1
Introduction
In the preliminar y part of this chapter. we introduce the basic approach to feedback control known as observer based feedback control. In this scheme the plant state x(t) in the state feedback control signal u(t1 = Kx(t) + v(r) (Chapter 2) is replaced by the estimated plant state i(r) obtained from an observer (Chapter 3). As we will see in the remainder of this book, this scheme has enabled the developme nt of several optimizati on based controller design techniques . In addition to quadratic control treated in this chapter, we will see that observer based feedback control is used in linear quadratic Gaussian, LQG, control and in HX! control. Following this, we take up the use of quadratic control to determine the K and L matrices in an observer based feedback control setup. Quadratic control arises\\ hen there is a need to maintain the control system's steady-stat e output constant in response to a constant control input. In this situation the control scheme is said to operate as a regulator. In practice, impulse like disturbanc e signals, i.e .. signals having large amplitude and short time duration. enter the control loop and cause the output to jiggle about its desired level. A well known example of this is the regulation of the pointi~g direction of an outdoor dish antenna. Unfortuna tely the dish acts like a sail and experience s torque disturbanc es because of wind gusts which tend to change its pointing direction. Therefore we need to choose K and L so as to alter the closed-loo p system dynamics. i.e .. assign the eigenvalue s of the closed-loo p system matrix, in a way which reduces the effect on the output of these impulse like disturbanc e signals. In quadratic control this choice of K and Lis done so as to minimize the energy in the output signal caused by the disturbanc e. We will see that the determina tion of the optimal K and L matrices needed to achieve this minimum requires the solution to two nonlinear matrix equations known as algebraic Riccati equations. Special solutions to these equations, referred to as stabilizing solutions are required. We will develop conditions on the plant and optimizati on criteria which will ensure the existence of such solutions. We will encounter the Riccati equation again in connection with other optimal control schemes developed in this book. More specifically, w_e will see that the algebraic Riccati equation is invohed in the solution of the di~turbance attenuatio n problem when the disturbanc es are viewed as rand::>m signals With known statistics (Chapter 6) and when the disturbanc e signals are restricted to the so-called L 2 class of signals (Chapters 9 and 10).
116
5.2
Quadrati c Control
Obser ver Based Contro llers
Although errors in the estimated plant state in an observer based control system produce effects at the control system's output, we will see that the dynamics of the observer do not contribut e to the control system's zero-state response. More specifically, we will show that the control system's transfer function equals the transfer function for the closed loop feedback system when exact state feedback is used, i.e., when the estimated state equals the plant state. Suppose the plant state model paramete rs (A, B, C, D) are given. Then recalling the development of the observer, (Chapter 3), we see that the-plant state, x(t), and the observer state, x(t), are governed by the following vector differential equation s
x(t)
=
Ax(t)
+ Bu(t)
x (t) =(A+ LC)x(t)
(5.1)
+ (B + LD)u(t) - Ly(t)
(5.2)
Now recall from Chapter 2 that to apply state feedback we set u(t) = Kx(t) + v(t). a Lacking exact knowledge of the plant state we replace it by its estimate, .X( t), to get control input
u(t) = Kx(t)
+ v(t)
(5.3)
Then substitut ing (5.3) in (5.1, 5.2) and the plant's output equation , we see that the control system is a 2n dimensional system having state model given as
Xc(t) = AcXc(t) + Bcv(t)
(5.4)
+ Dcv(t)
(5.5)
y(t) = Ccxc(t) where
Ac =
BK
[A
- LC A + LC + BK
Cc = [C
v(t) +
]
x(t)] Xc(t) = [ x(t)
DK]
u(t)
~
y(t)
PLANT
+
~
STATE FEEDBACK
x(t)
OBSERVER
1.[A,] = >.[A,] = >.[A + BK] u >.[A + LC] Thus half the closed loop system eigenvalues depend on K and are independent of L, and the other half depend on L and are independent of K. This spliting of the closed loop eigenvalues is responsible, in part, for being able to break the optimal control problems treated in this book into two simpler problems: 1. the state feedback control problem 2. the state estimation problem This fact, referred to as the separation principle, has been a major theme running through the development of linear control theory since its discovery in the 1960s.
Quadra tic State Feedba ck Control
119
state In summar y, the use of an observer-estimated plant state in place of the true plant having system control k feedbac a to leads ration in a state feedback control configu as we would transfer function (steady-state. input-ou tput behavior) which is the same system, control the of start-up the at initially r. Howeve . feedback obtain using exact state the affect will state plant true the from state ted r-estima observe any departu re of the state ted control system output. This effect diminishes \Vith time as the observer-estima approac hes the true plant state. ues for Recall, from Chapter s 2 and 3. that we needed the specification of eigenval control k A + BK and A + LC in order to determine K for the design of the state feedbac , we are only and L for the design of the state estimato r, respectively. However, in practice re, in this given some desired goals for the behavio r of the control system. Therefo control the situation, we need methods for turning specified goals for the behavio r of and in system into values for the K and L matrices. In the remaind er of this chapter, for goal subsequ ent chapters , we will show in each case that by interpre ting the specified develop can the control system's behavio r as a mathem atical optimiz ation problem , we equation s for determi ning the required K and L.
5.3
Quadratic State Feedback Control
mandato ry There are many possible control system design objectives in addition to the ents arises requirem al addition these of One requirem ent that a control system be stable. control the entering signals nce disturba ration when there are large-amplitude, short-du the design to need we n situatio this In t. constan loop and we want to maintai n the output , possible as much as , diminish to and system controller both to stabilize the closed-loop optimal the to solution The output. plant the on the effect of the disturba nce signals L both to quadrat ic control problem attempt s to achieve this goal by determining K and control the of re departu the in energy the e minimiz stabilize the closed-loop system and to \\e section, s previou the in ed mention As value. tate system output from a desired steady-s lems: subp.rob simpler two into problem this can use the separati on principle to split l. the quadrat ic state feedback control problem and 2. the quadrat ic state estimati on problem with the solution to 1. determining K, and the solution to 2. determining L. ic state In this section we develop the design equation s forK which solves the quadrat of the sum the s, equation feedback control problem . When K satisfies these design ed. minimiz is signal, nce energies in the output and feedback signal caused by the disturba ic quadrat the as known One of these design equation s is a nonline ar matrix equation to needed und backgro cal theoreti control algebraic Riccati equatio n (QCAR E). The solve this equatio n is provide d in the next section, Section 5.4. ic state !n S~ction 5.5 we develop the design equation s for L to solve the quadrat c algebrai an of solution the involves this es!Imatlon problem . Again we will see that the as known is and QCARE the to related Riccati equation . This equatio n is closely to the quadrat ic filtering algebraic Riccati equatio n (QF ARE). The required solution the solving for 5.4 Section in ed develop res procedu using QFARE can be obtaine d ~ QCARE .
Quadratic Control
120
5.3.1
Motivating the problem
Let the disturbance input to the plant be denoted as u 1 ( t); let the controlled input involved in implementing the state feedback be denoted by u2(t). Then the plant state model is given by the equations
x(t)
=
Ax(t)
+ B1 u1 (t) + B2u2(t)
(5.12)
y(t)
=
Cx(t)
+ D 1u 1 (t) + D 2 u2 (t)
(5.13)
and setting u2 (t) = Kx(t) + v(t), where v(t) is the command input, we obtain a state feedback control system having state model given as
x(t)
=
Ax(t)
+ Bl
+ B2v(t)
(5.14)
y(t)
=
Cx(t)
+ D 1u 1 (t) + D 2v(t)
(5.15)
Uj
(t)
. where
disturbance input controlled input
y(t) v( t)
control system output control system command input
However, if (i) the disturbance input is null, u 1 (t) = 0 (ii) the control system command input is constant, v(t) = v5 , (iii) the feedback matrix K makes the control system stable so that all eigenvalues of A lie in the open left half plane, then the constant steady-state control system state, x" is obtained from the control system state differential equation, (5.14) by setting x(t) = 0. Then using x, in (5.15) gives the steady-state control system output y 5 as
u,(t)
PLANT v(t)
+
y(t)
u,(t)
~
+
I+--CONTROLLER
Figure 5.2
If
Setup for disturbance input attenuation
Quadratic State Feedback Control
121
where Xs =
limx(t)
t-x
Now suppose the control system is operating at this steady-state level at time t = t 1 when a short-duration disturbance signal, lasting T seconds, arrives at the disturbance input. Then the disturbance input can be written as u 1 (t)
#
for t E h
o
t1
+ Tj
otherwise
=o
Therefore, shifting the time origin to the instant immediately following the end of the disturbance, i.e., to time t 1 + T. we are left \vith the state immediately following the end of the disturbance being given by
However since A
+ BK is assumed stable we have lim xd(t) = o {-H:X!
and the state of the plant returns to its steady~state Yalue with time, limx(t) = x, {-H)O
Our goal in choosing K is to decrease the effect of the disturbance input on the control system output during the return of the output to its steady-state value. Since superposition applies. we can assume, without loss of generality, that the control system command input is null, v( t) = vs = 0. Then the desired steady-state output is null and any deviation of the output away from being null is caused by the presence of the disturbance input. Thus we want to choose K so that the action of the feedback signal attenuates these deviations as much as possible.
5.3.2
Formulatin g the problem
Recall, from the previous chapter, that we used the observability Gramian and its relation to the output energy to obtain a measure of the zero-input response. We use this idea here to reformulate the problem just discussed as the problem of choosing K to minimize the ~ffect of a non-null initial plant state on the sum of the energy in the output and the energy In the feedback signal, i.e.,
where lQc =
=
laoo (y'(t)y(t)- pu2(t)u2(t))dt la
00
[x*(t)C*Cx(t)
+ u;(t)[pJ]u 2 (t)]dt
(5.16)
122
Quadrati c Control
with p being a positive scalar and JQc being referred to as the cost or the performa nce index for the quadratic control problem. Notice that the reason for including the feedback signal energy in the performa nce t) index, i.e., for including u 2 ( t) in the integrand , is to limit the feedback signal u 2 ( t) = Kx( given is this of on explanati detailed more A to a level that can be physically implemented. as follows. When we choose K to minimize J QCo we discover that the smaller p the larger the elements inK. If we were to let p be zero so that there would be no contribut ion to the to cost, lQc, from the feedback control signal, u2 (t), we would find that the K required feedback required the case this in Thus entries. minimize lQc would have unbound ed control signal u 2 ( t) would be an impulse. This physically unrealizable requirement prohibits the use of p = 0. However, while increasing the size of p has the beneficial on effect of reducing the size of the required feedback signal, the effect of the disturban ce between ise comprom a pis of size the for choice the output is increased. Thus a beneficial limiting the size of the control signal, u2 ( t) and limiting the effect of the disturban ce on the outpu~.
In order to simplify the development to follow, we will assume that there is no direct feed through of the feedback controlle d input u 2 ( t) to the plant output, i.e., we assume D 2
=0
In addition, since it is always possible to choose coordina tes for the state space so that the paramete rs of the state model are real, we will assume that these paramete rs are real. Finally, for generality in what follows, we will replace C* C and pi in (5.16) by Qc and Rc respectively so that the performa nce index becomes ( 5.17) all where Qc, Rc are real, symmetric matrices with Qc ?: 0 and Rc > 0 implying that for x(t) and u(t) we have
x*(t)Qcx(t)?: 0 u).(t)Rcu2(t) > 0 These restrictions on Qc and Rc are needed to ensure that the contribut ions to lQc from both u2 (t) and x(t) are never negative and so that R, is invertible. In summary , we have formulate d the problem of designing a state feedback controlle r to combat the effect of unknown short-du ration disturban ce inputs as an optimiza tion problem. The solution to this optimiza tion problem requires that K be determin ed so that is a quadratic performa nce index in the disturbed state and the controlle d input minimized.
5.3.3
Develo ping a solution
From the discussion earlier in this section, we suppose that the comman d input is null, has v( t) = 0, and that the time origin is taken at the instant a short-dur ation disturban ce
Quadra tic State Feedba ck Contro l
just ended. This leaves the plant state at some non-null value, x(O) · have the plant state given by
= xd
123
and thereafter we
( 5.18)
and the controlled input given by (5.19)
Thus using (5.18, 5.19) in the quadratic control cost, (5.17), yields ( 5.20)
where Qc = Qc + K*RcK
J. =A +B2K -
I integral, (5.20), Now since we are assuming that K is stabilizing, i.e., A is stable, the converges to a real symmetric matrix PQc, ( 5.21)
and the performance index, (5.20), can be written as (5.22)
ov ¥AUation Recall from Chapte r 4 that PQC• (5.21), is the solution to the Lyapun (5.23)
to this Lyapunov Therefore, since A, Qn (5.20), depend on K, so does the solution, PQc, writing PQc and by fact this denote We equatio n and the performance index, JQc, (5.22). JQc as PQc(K ) and JQc(K, xd) respectively. From the foregoing we conclude that our goal is to find K such that (i) K is stabilizing, i.e., A + B 2 K is stable, and all initial states, xd . (ii) the solution, PQc(K ), to (5.23) minimizes JQc(K, xd), (5.22), for satisfies (i) and .. In the following development we use K 0 to denote the value of K which (u). Thus K 0 satisfies (5.24)
for all disturbed initial states, xd·
124
Quadratic Control
Now we are going to use a matrix variational approach in connection with the Lyapunov equation, (5.23) to develop an equation for P QCo, where P QCo denotes the matrix PQc which solves (5.23) when K = K 0 • We begin by noting that any real and stabilizing K can be written as ( 5.25) where Eisa positive real scalar and b K is a real matrix having the same dimension as K with E(bK) being referred to as a perturbation on K,n the desired value forK. Since P QC depends on K through the Lyapunov equation, (5.23), the perturbation, E(bK), on K 0 produces a series expansion for PQc about its optimal value PQco, ( 5.26) where HOT (higher order terms) stands for terms in the expansion involving powers of E which. are 2 or greater. The term (b1P QC) is a symmetric matrix which depends on (b K) in a manner to be determined. Next we substitute the expansion of PQc, (5.26), into the expression for the cost lQc, (5.22). This gives an expansion for lQc about its minimum value lQco (5.27) where
and again HOT stands for terms in the expansion involving powers of E which are 2 or greater. Now since the terms indicated by HOT in both (5.26) and (5.27) depend on {Ei: i=2,3,···}weseethat lim[HOT] E-->0
=
0
( 5.28)
E
Therefore it follows that the scalar, (b 11Qc), in (5.27) and the matrix, (b 1PQc), in (5.26) can be expressed as (5.29)
( 5.30) Notice that (5.29) is reminiscent of the derivative in calculus. This fact together with ideas we encounter in using calculus to obtain minima of a scalar function of a scalar variable enables us to visualize the present problem of minimizing a scalar function J QC of a matrix K as follows.
Quadratic State Feedback Control
125
Suppose, for simplicity we assume u2 ( t) is a scalar. Then K is a row vector with n scalar entries. Then we can think of JQc together with the components of K as forming ann+ 1 dimensional space. Imagine making a plot of the scalar JQc on the "vertical axis" vs. K with K being represented by a point in a "horizontal" hyperplane, or plane when n = 2. The resulting surface in this space would appear as a bowl with the bottom of the bowl as the "point" {JQCo• K 0 }, i.e., the optimal point. At this point (8tJQc), (5.29), is zero both for all8 K and for all initial disturbed states xd. This is analogous to the derivative of a scalar function of a scalar variable being zero at points where the function has a local minimum. Notice from the dependency of (8 1JQc) on (8 1PQc), (5.27), namely
that (81J QC) is zero for all xd if and only if (81PQC) is a null matrix. Therefore the optimal value forK, K 0 , makes (8 1PQc) null for all (8K) which maintain K, (5.25), stabilizing. Therefore in order to determine K 0 we need to determine an equation for the matrix (8 1PQc) which involves (8K). We can do this by substituting the expansions forK and for PQc (5.25, 5.26), in the Lyapunov equation, (5.23). The results of doing this are detc;rmined as follows. begin by denoting the result of using the expansion of K, (5.25), in A and Qc, (5.20), as
We
A= A + EB2(8K) 0
Qc = Qco + E[(8K)* RcKo + K~Rc(8K)] +HOT
(5.31)
where
Then substituting these expressions for A, Qc as well as the expansion of P Q~' (5.26), in the Lyapunov equation, (5.23), yields A~PQCo + PQCoAo + Qco + E(M + M*) +HOT= 0
(5.32)
where
Notice that the first three term~ in (5.32) sum to a null matrix since PQco satisfies the Lyapunov equation, (5.23), when K = K 0 • Thus (5.32) becomes
E(M + M*) +HOT = 0
(5.33)
Then dividing (5.33) through byE, letting Ego to zero, and using the limiting property,
126
Quadratic Control
(5.28), yields M
+ M* = 0
Finally, substituting for M from (5.32) yields the following Lyapunov equation relating (8 1PQc) to (8K) (5.34)
Recall, from discussion earlier in this subsection, that K = K 0 when matrix for al18K which maintain K, (5.25) stabilizing. Therefore when matrix, (5.34) becomes
(8 1PQc) (8 1PQc)
is a null is a null
( 5.35)
which· is satisfied for all stabilizing perturbations, 8 K, only if M 1 is a null matrix. Therefore we see from the definition of M 1, (5.32) that (5.36)
where we have used the assumption Rc > 0 to insure that Rc is invertible. Notice, at this stage of the development, that the state feedback matrix K 0 is readily determined from (5.36) once we have P QCo· It turns out that P QCo is a solution to a nonlinear matrix equation known as the quadratic control algebraic Riccati equation (QCARE). This equation can be developed by setting K = K 0 , (5.36), in the Lyapunov equation (5.23). After carrying this out, we get the QCARE as A* P QCo
+ P QCoA -
P QCoRQcP QCo
+ Qc = 0
(5.37)
where
Having determined the QCARE it remains to solve it for PQca such that A+ B2Ka is stable when PQco is used to determine K 0 from (5.36). We can recap this section as follows. We began by introducing a matrix variational approach and using it to determine an equation for the optimal feedback matrix, Ka, (5.36). This equation involves P QCo• the matrix which solves the Lyapunov equation, (5.23), when K = K 0 . Then we saw that by eliminating K 0 from the Lyapunov equation by using (5.36) we obtained a nonlinear matrix equation in PQCo referred to as the QCARE, (5.37). In the next section we will be concerned with conditions on the plant state model parameters and the parameters of the performance index, Rc and Qc, which ensure the existences of the so-called stabilizing solution, P QCo• to the QCARE, i.e., the solution which makes A- B 2 R; 1B* PQco stable.
127
Solving the QCARE
5.4
Solving the QCARE
We have just seen that the determin ation of the state feedback matrix K 0 , (5.36), which g minimizes the performa nce index JQc, (5.17), requires the determin ation of a stabilizin establish to is section present the of goal main The (5.37). , solution to the QCARE condition s on the plant state model paramete rs and weighting matrices Qc and Rc which ensure the existence of a stabilizing solution to the QCARE. We will be aided in this task by resorting to a 2n x 2n matrix called the quadratic control Hamilton ian matrix. Before doing this we consider aspects of the closed loop stability which are brought out using the fact the PQco is the solution to the Lyapuno v equation , (5.23), when K = K 0 •
5.4.1
Stabilizing solutions
Consider the following theorem and its proof. Theorem 5.1 A0 is stable if (i) (A, B2 ) is a stabilizable pair and (ii) P QCo satisfies the QCARE with P QCo 2': 0 and (iii) (A, Qc) is a detectabl e pair. wh(;e A0 =A+ B2 K 0 with K 0 given by (5.36) and PQco satisfying (5.37). Proof The necessity of (i) is obvious since we have, from Chapter 2, that a pair (A, B) is we stabilizable if we can find K such the A+ BK is stable. Therefor e assuming (i) holds, stable. be to A for sufficient 0 will show that (ii) and (iii) together are Notice from (5.36, 5.37) that
Therefor e adding and subtracti ng PQcoRQcPQCo on the left side of the QCARE , (5.37), gives the Lyapuno v equation , (5.23), with K = K 0 , (5.38) where
We proceed now to use the ideas from Chapter 4 concernin g stability in connectio n with the solution of Lyapuno v equations . First we rewrite (5.38) by expandin g Qc0 , (5.31), using K 0 , (5.36). This enables (5.38) to be rewritten as (5.39)
~en pre and post-mul tiply this equation by
Yields
vi* and vi respectively where
A vi
= >..vi
0
(5.40)
128
Quadratic Control
Next recalling that R, > 0 and that Q, 2: 0 we have (5.41) and the right side of (5.40) is either negative or zero, i.e., either (a) or (b)
Suppose (a) holds. Then we see from (5.40) that (5.42) and neither Re[A;] nor vi* PQcoVi can be zero. Therefore we see from condition (ii) in the theorem that v'* PQcov' > 0. Thus (5.42) is satisfied only if Re[A;] < 0. Alternatively, suppose (b) holds. Then we see from (5.41) that both and This implies that and
(5.43)
and we see that ' i /\;V
=
A~ o V ;
=
(A
~
1 B 2 Rc B*P 2 QCo ) V ;
=
AV i
(5.44)
Thus (A;, vi) is an eigenvalue, right-eigenvector pair for A satisfying Qcv; = 0 implying that\ is an unobservable eigenvalue for the pair (A, Q,). However (A, Q,) is detectable, condition (iii). Therefore if (b) holds we have Re[\] < 0. To recap, since the right side of(5.40) is either negative or zero and we have shown that in either case Re[A] < 0 when the conditions in the theorem hold. Thus we have shown that the conditions in the theorem are sufficient for A0 to be stable. • We will show in the next subsection that condition (iii) in the statement of the foregoing theorem is not necessary for A0 to be stable. Instead, we will show that only condition (i) in Theorem 5.1 and the condition that any imaginary axis eigenvalues of A be observable eigenvalues for the pair (A, Qc) are needed to ensure the existence of a stabilizing solution to the QCARE. Some appreciation of this weakening of condition (iii) can be obtained by reconsidering the foregoing proof as follows. First, notice that when case (b) in the proof holds, (5.40) implies that
Solving the QCARE
129
and either (bl): Re[.\] = 0 or (b2): PQcoV; = 0
However, recall from the proof that when case (b) holds the eigenvalue).., of A0 is also an unobservable eigenYalue for the pair (A, Q,). Therefore if we impose the condition that (A, Qc) has no unobservable imaginary axis eigenvalues, then case (bl) is impossible. Second, though not apparent at this stage in the discussion. we will see in the next subsection that if both condition (i) in Theorem 5.1 and the condition that (A, Qc) haYe no unobservable imaginary axis eigenvalues are satisfied, then eigenvectors of A can only satisfy the condition for case (b2) to apply if the corresponding eigenvalue of A is stable. Finally, notice in the proof of Theorem 5.1, that case (b) is impossible when the pair (A, Qcl is observable and thus PQcu > 0 \\hen (A. Qc) is obseryable. Again, though not obvious now, we will show that we can replace this condition for P QCo > 0 in case (b) by the condition that (A, Q,) have no stable unobservable eigenvalues. Therefore this condition together with condition (i) in Theorem 5.1 and the condition that (A, Q,) haye no imaginary axis eigenvalues are the necessary and sufficient conditions for PQco > 0.
The uniqueness of the stabilizing solution is shown in the following theorem. Theorem 5.2 The stabilizing solution to the QCARE is unique, when it exists. Proof Suppose P QCI and P QC are two stabilizing solutions to the QCARE. This enables us to write
+ Qc = 0
A*PQcl
+ PQClA-
A* PQc2
+ PQc2A- PQc2RQcPQc2 + Q, = 0
PQciRQcPQc!
where A; = A - RQcP QCi : i = 1, 2 are each stable. Next taking the difference between these two equations yields A*(b.PQc)
+ (b.PQc)A- PQclRQcPQcl + PQc2F·QcPQc2 =
0
where (b.PQc) = PQCI- PQc 2. Then adding and subtracting P QCl RQcPQc 2 enables this equation to be rewritten as (5.45) Now pro_cee~ing in the same manner as was done to prove Theorem 4.5, we can shO\v that when A 1 , A 2 are stable the matrix equation "4i(~PQc)
+ (!:::,.PQc)A2 =
has solution !:::..PQc which can be written as the integral
.\1
130
Quadratic Control
However since the right side in (5.45) is null, M is null and the integrand of the foregoing integral is null for all time. Therefore we have !::,.PQc = 0 which implies that • PQci = PQc 2 and the stabilizing solution to the QCARE is unique. Having examined certain properties of stabilizing solutions to the QCARE, we turn next to questions concerning the existence and calculation of such solutions. An important tool for answering these questions is the Hamiltonian matrix.
5.4.2
The Hamiltonian matrix for the QCARE
In this section we will show the relation between the solutions of the QCARE and properties of a 2n x 2n matrix made up from the parameters of the QCARE, (5.37). This matrix, called the quadratic control Hamiltonian matrix, is defined as HQc =
[AQ,
( 5.46)
where RQc = B 2 K; 1B;. Notice that the blocks of H QC depend on all the matrices in the QCARE, (5.37), except its solutions P QC· Recall that we are interested in the stabilizing solution denoted P QCo· In the following theorem, we give a property of H QC which is important in establishing conditions for the existence of a stabilizing solution to the QCARE. Theorem 5.3 It is not possible to find a stabilizing solution to the QCARE, (5.37), if H Qc, (5.46), has imaginary axis eigenvalues. Proof Define the 2n x 2n matrix T as (5.47)
where P QC is any Hermitian matrix. Notice that Tis invertible for all Hermitian matrices, P QC, having inverse given by
r-I =
[P~c ~]
Next let HQc be related to H QC as -HQc =
T -1 HQcT =
[Az-
R-- QAc*
l
where A= A- RQcPQc Z =A* PQc
Notice that
+ PQcA- PQcRQcPQc + Q,
( 5.48)
•
Solving the QCARE
131
independent of P QC· Therefore if we choose P QC so that Z is null, H QC is block uppertriangular and (5.49) >.[HQc] =>.[A] u >.[-A'] However since complex eigenvalues of A occur in conjugate pairs, we have A[A*] = >.[A]. This together with the fact that >.[-A] = ->.[A] allow us to rewrite (5.49) as >.[HQcl =>.[A]
u -A[A]
(5.50)
This shows that the eigenvalues of H QC are mirror images of each other across the
imaginary axis, i.e., if 'TJ E >.[H Qcl then-ryE A[HQcl· Now when we choose PQc so that Z is null, PQc is a solution to the QCARE, (5.37). Moreover, recalling the expression for the feedback matrix K 0 , (5.36), we see that A, (5.48) can be rewritten as
when PQc = PQco, the stabilizing solution to the QCARE. However, if HQc has an imaginary axis eigenvalue, (5.50) shows that this eigenvalue must also be an eigenvalue for Xfor z!l Hermitian matrices PQC which satisfy the QCARE. Therefore it is impossible • to choose P QC to satisfy the QCARE, i.e., to make Z null, so that A is stable. To recap, the 2n eigenvalues of H QC split into two sets of n eigenvalues each such that each eigenvalue in one set has a corresponding eigenvalue in the other set which is its mirror image across the imaginary axis. Thus if PQC is a stabilizing solution to the QCARE, the eigenvalues of A, (5.48), equal n of the eigenvalues of H QC which are in the · open left half plane. However, if H QC has imaginary axis eigenvalues, H QC does not have n eigenvalues in the open left half plane. Therefore, in this situation, a stabilizing solution to QCARE does not exist since the eigenvalues of A must include at least one imaginary axis eigenvalue of HQc for all solutions, PQc, to the QCARE. We need now to establish conditions which ensure that H QC does not have imaginary ?~ axis eigenvalues. This is done in the following theorem. . Theorem 5.4 The quadratic control Hamiltonian matrix H QC• (5.46), is devoid of Imaginary axis eigenvalues if (i) (ii)
(A,,RQc) has no uncontrollable eigenvalues on the imaginary axis and
(A, Qc) has no unobservable eigenvalues on the imaginary axis
Proof Suppose HQc has an eigenvalue atjw. Then we have
(5.51)
HQcv=jwv
[ A .
Qc
R.Q: ] [ v 1 ] = jw [ v 1 ] -A
Vz
Vz
or (jwl - A )v 1 = RQcVz (jwl + A*)vz
=
Qcvi
(5.52) (5.53)
Quadratic Control
132
Next, we premultiply (5.52) by
v2 and (5.53) by vr
to obtain
v}(jwl- A)v 1 = v.2RQcv2 v[(jwl
+ A*)v2
=
v[Qcvl
(5.54) (5.55)
Then taking the conjugate transpose on either side of (5.55) and recalling that Q,. 1s Hermitian enables us to rewrite (5.55) as ( 5. 56) Now we see, by comparing (5.54) with (5.56), that (5.57) How~ver Qc and RQc are each non-negative. Therefore the only way (5.57) can be
satisfied is for each side to be zero. Thus we have (5.58) (5.59) and (5.52, 5.53) become (5.60) (5.61) This shows that jw is an eigenvalue of A and that v 1 , v 2 are the corresponding right and left-eigenvectors of A. However if v 2 f 0, (5.58, 5.61) imply that (A, RQc) has an uncontrollable eigenvalue on the imaginary axis and condition (i) is not satisfied. Therefore if (i) is satisfied, we must have v 2 = 0. Alternatively, if v 1 f 0, (5.59, 5.60) imply that (A, Qc) has an unobservable eigenvalue on the imaginary axis and condition (ii) is not satisfied. Therefore if (ii) is satisfied, we must have v 1 = 0. From the foregoing we see that if conditions (i) and (ii) are satisfied, (5. 51) holds only if v = 0. Thus, contrary to the assumption we made at the beginning of the proof, H QC has • no imaginary axis eigenvalues when the conditions of the theorem are satisfied. 1 Notice that since R, is non-singular and RQc = B 2R-; B2, we have only if Therefore condition (i) in the foregoing theorem is equivalent to (i)
(A, B 2 ) has no uncontrollable eigenvalues on the imaginary axis.
We will show in the next subsection that, though sufficient for H QC to have no
Solving the QCARE
133
iJDaginary axis eigenvalues, the conditions in the foregoing theorem are not sufficient to ensure that the QCARE has a stabilizing solution.
5.4.3
Finding the stabilizing solution
The proof of Theorem 5.3 suggests a way of determining the stabilizing solution to the QCARE. More specifically, we saw t~at when the stabilizing solution to the QCARE exists, we can find T, (5.47), such that HQc, (5.48), is block upper-triangular with the top diagonal block being stable. This suggests that the stabilizing solution to the QCARE can be determined from the eigenvectors of H QC corresponding to the stable eigenvalues. However, it turns out that we can avoid having to compute eigenvectors. Instead we can use Schur decomposition on H QC to determine the stabilizing solution to the QCARE. In order to see how to do this we need the following basic result form linear algebra. Theorem 5.5 If (5.62)
MU=UW
where M and Ware square with W being invertible and U having independent columns, then/ (i) each eigenvalue of W is an eigenvalue ofM, i.e., .A(W] c .A(M] (ii) range[U] is an M-invariant subspace corresponding to A.[W], i.e., range(U] is spanned by the eigenvectors of M corresponding to the eigenvalues of W. ~oof ~et (.A;, vi) be any eigenvalue-eigenvec tor pair for W. Then premultiplying . Wv' = .A;v' by U and using (5.62) we obtain
Mw=A.;w
.
where w = Uvi and we see that A; is also an eigenvalue of M. This completes the proof of ~
.
Next assuming the eigenvectors of W are complete, we can express any vect~r q of the same dimension as these eigenvectors as
n, q= LO'.;Vi i=i
so that post-multiplying (5.62) by q gives
Ms=r where
n, r= Up
p = L(A.;a;)vi
i=i S=
Uq
We see that M maps range(U] into itself, i.e., range[U] isM-invariant.
134
Quadratic Control
Finally, notice that if V 1 is a matrix whose columns are the eigenvectors of M corresponding to the eigenvalues of M which are also eigenvalues of W, then MVI =VIAl
where A 1 is diagonal with the eigenvalues of W along its diagonal. Then post-multiplying this equation by the non-singular matrix e such that U = V 1e and inserting ee-l between V 1 and A 1 gives MU=VW
where
Thus .A[W] =.-\[AI]. Moreover since
e is non-singular, we have
range[U] = range[V 1e] = range[VI] This shows that range[U] is spanned by eigenvectors of M corresponding to the • eigenvalues of W. In order to develop a relation between the quadratic control Hamiltonian matrix and the QCARE which we can use as a basis for solving the QCARE for its stabilizing solution, we proceed in the following manner. Suppose we have the stabilizing solution, P QCO" Then the QCARE, (5.37), can be written as
and we see that (5.63) where HQc
=
[A
Qc
Now since A- RQcPQco is stable, we see from Theorem 5.5 that (5.63) implies range [ _ :QCo ] is the H Qc-invariant subspace corresponding to the stable eigenvalues of H QC· The standard way of computing this subspace, when it exists, is to use Schur decomposition. This numerically reliable method computes an orthogonal (unitary when H Qc is complex) matrix T such that the transformed quadratic control Hamiltonian matrix, HQc, (5.48), is block upper-triangular with first diagonal block, H11, being
Solving the QCARE
135
stable, i.e., ( 5.64)
Notice from (5.48) that H 11 =A- RQcPQco = "4o. the stable system matrix for the state feedback control system. Now since Tis unitary, T* = T -t. we see that premultiplying (5.64) by T and equating the first n columns on either side of the resulting equation gives (5.65) where Tis partitioned into n x n blocks, T;i, with T 1 denoting the first n columns ofT, i.e.,
Then we see from Theorem 5.5 and (5.65) that (i/ >.[Hn] c >.[H Qcl (ii) range[Td is an HQcinvariant subspace corresponding to >.[H 11 ]. Therefore since H 11 is stable, the columns ofT 1 span the stable eigenspace of H QC• i.e., the columns of T 1 can be expressed in terms of the eigenvectors of Hoc whose corresponding eigenvalues lie in the open left half plane. Recall that range[Td =range[T 18] for any non-singular matrix 8 of appropriate dimension. Hence if T 11 is non-singular the columns of T 1T]} also span the stable eigenspace of H QC· Therefore assuming T 11 is invertible, we postmultiply (5.65) by T]} and insert T]}T 11 between T 1 and H 11 on the right side of(5.65) to obtain HQc[T21IT]/]
= [T21/T)/](TuHIIT)/)
Then comparing this equation with (5.63) we see that PQco is given by PQco
=
-T21TJ11
(5.66)
and we have the stabilizing solution to the QCARE. Notice that in order to use the foregoing approach to solYe the QCARE for its stabilizing solution, not only must H QC have no imaginary axis eigenvalues, (Theorem 5.3), but in addition T 11 must be invertible. Notice also that when T 11 is invertible we have P QCo > 0 only if T 21 is also invertible. The following theorem establishes conditions ?n the parameters of the plant ahd control cost which ensure that T 11 and T 21 are Invertible. Theorem 5.6 Suppose we can find a unitary matrix T so that H 11 is stable and
Quadratic Control
136
where
Then we have the following results: (i) T 11 is invertible if (A, B 2 ) is stabilizable; (ii) if T 11 is invertible, then T 21 is invertible if (A, Qc) has no stable unobservable eigenvalues. Proof (i) From (5.65) and the blocks in H QC and H
+ RQcT 21
11
we have
= T 11 Htt
( 5.67)
QcT11- A*T2l = T21H11
( 5.68)
AT 11
letting let (,\, v) be any eigenvalue-right-eigenvector pair for H 11 and postmultiplying (5.67, 5.68) by v gives Th~n
AT 11 v + RQcT 21 v = ,\Tllv
( 5.69)
QcT11v- A*T2lv = ,\T21 v
( 5.70)
Now suppose TIIv = 0. Then T 11 is not invertible and (5.69, 5.70) become RQcw = 0 A*w
=
-,\w
(5.71) (5.72)
where w = T 21 v. Then if w = 0 we would have
T ]v=0 [T21 11
implying that T has dependent columns and is therefore not invertible. This is impossible since we are assuming that Tis unitary. Therefore 1v -:10. Now since H 11 is stable, (5.71, 5.72) imply that (A, RQc) is not stabilizable, and since RQc = B 2R-; 1B2 with R-; 1 non-singular, we have (A, B 2) is not stabilizable. This contradicts the condition given in (i). Therefore no eigenvector v, of H 11 satisfies T 11 v = 0 when (A, B 2 ) is stabilizable. Thus assuming the eigenvectors of H 11 are complete, the foregoing condition shows that T 11 is invertible when (A, B 2 ) is stabilizable. Proof (ii) Suppose TII is invertible and T 21 v = 0 for an eigenvector v of H11· Then (5.69, 5.70) become As= ,\s
(5.73) (5.74)
where Tllv = s. Therefore since H 11 is stable and,\ is an eigenvalue of H 11 , we have that (A, Qc) has a
Quadratic State Estimation
137
Stable unobserva ble eigenvalue. This contradict s the condition given in (ii). Therefore no eigenvector v ~f H 11 satisfies T 21 v # 0 if (A! ~c) has no stable unobs~rvable e_i~envalues. Finally assummg H 11 has a complete set of eigenvectors. the foregomg cond1t1on shows • that r 21 is non-singul ar when (A, Qc) has no stable unobservable eigenvalues. Although more involved, it can be shown that the foregoing theorem holds even when done using generalized H 11 does not have a complete set of eigenvectors. This is . . . . eigenvectors. In summary, in thts sectwn, we ha\e considered the problem of solvmg the QCARE for its stabilizing solution. The so-called Hamiltoni an matrix was introduced for this purpose. By using this matrix it was shown that _the comp~ta:ionally ~seful technique of Schur decompos ition could be employed to obtam the stabthzmg solutiOn to the QCARE when it exists. In addition, the Hamiltoni an matrix enabled the developme nt of important conditions on the plant and performan ce index parameter s which are necessary and sufficient for the existence of a stabilizing solution to the QCARE.
Quadratic State Estimation
5.5
So far we have solved the quadratic control problem under the assumptio n that the state of th7 plant is known. In this case the controlled input is I
However, when the plant state is unknown, we must resort to the use of an observer in an observer based feedback control scheme as discussed at the beginning of this chapter. Doing this and using the optimal quadratic state feedback matrix K 0 , developed in previous sections, gives the controlled input as (5.75)
where
x(t) = x(t)- x(t) Since u2s(t) = K 0 x(t) is the controlled input \vhich minimizes the quadratic state fee~back control cost, JQc, (5.17), the departure of the controlled input, u2E(t), from its optimal value, u25 (t), causes the cost JQc to increase. Our goal in this section is to design an observer to minimize this increase in the quadratic control performan ce index. We approach this goal by solving the optimizati on problem of choosing the observer's L ~atrix so as to minimize the energy in the state estimation error caused by both an un~uls~ disturbanc e in the measurem ent of the plant output and an initial plant state esttmatwn error.
5.5.1
Problem formula tion
Recall, from Section 3.3, that ideally the observer estimates the state of the plant hased on the true plant output, y(t) = Cx(t), where for simplicity, we assume, as in the quadratic state feedback control problem, that the plant is strictly proper. However, in practice,
138
Quadratic Control
only a measured plant output is available and this output differs from the true plant output by an additive measurement noise signal, w(t). Thus ify 111 (t) denotes the measured output we have Y111 (t) = y(t)
+ 1r(t)
It should be emphasized that, unlike the quadratic state feedback control problem where the disturbance is at the plant input, the disturbance here is at the input to the observer.
v(t)
PLANT
+
u,(t)
:E
y(t)
+
~ CONTROLLER
Figure 5.3
Setup for output measurement noise attenuation
output measurement noise
y(t)
control system output
controlled input
v( t)
control system command input
Now applyingy 111 (t) to the input of an observer, we obtain an estimate of the plant state from
x= Ax(t)
.Y(r)
=
+ Bu(t) + L[.Y(t) - Ym(t)]
cx(r)
and we see that the plant state estimation error, x(t) differential equation
.x (r) =
Ax(t)
+ LHi(t)
=
x(t)- x(t), is governed by the
A= A +LC
(5.76)
As in the state feedback control problem, we assume the unknown disturbance is a largeamplitude, short-duration signal which we model as an impulse, w(t) = 15(t- to)· Suppose the control system has been in operation with a constant command input and no measurement noise, for a time which is great enough so that the plant state estimate has converged to the steady-state value for the plant state, i.e.,
x(t)
=
x,
x(t)
= 0
Quadratic State Estimation
139
. Then shifting the time origin to t 0 , the time where the output measurement noise impulse occurs, we have w(t) = 8(t), x(O) = 0 and we see from (5.76) that the state estimation error becomes (5.77) Now we want to return the state estimation error to its null value as rapidly as possible following the occurrence of the measurement noise impulse. Therefore (5. 77) implies that L = 0 is the best choice for this purpose since then x(t) = 0 and the disturbance would have no effect on the state estimate. However, this approach to setting up the quadratic state estimation problem does not take into account effects on the state estimation error which arise from the initial plant state being unknown. For instance, if the plant is unstable, we have seen in Chapter 3 that choosing L null causes any estimation error present at start-up to grow without bound. To overcome this problem, we reformulate the foregoing optimization problem by assuming that the initial state estimation error has an additional component not caused by the output m~asurement noise, w(t), i.e., we take x(O) as
..x(o) =
.xd
Thet'we see from (5.76) that the plant state estimation error, x(t), caused by both x(O) = xd and w(t) = 8(t) is given by (5.78)
Now we want to choose L to decrease the effect on the plant state estimation error of having both a non-null initial state estimation error, and an impulsive output measurement noise. One way of doing this is to solve the problem of choosing L so as to minimize the energy in the state estimation error, i.e., find L such that
where JQE
=loco x*(t)x(t)dt
However recalling the use we made of the trace of a matrix in connection with the deve!opment of the controllability Gramian in Chapter 4, we see here that JQE can be rewntten as
Which using (5.78) becomes (5.79)
Quadratic Control
140
where A= A +LC
Now in order to make the optimization problem more tractable we replace M by
(2e,
where Re, Qe are real symmetric matrices with Qe 2' O,Be > 0. Then our problem is to choose L to minimize J QE such that A is stable, where· ( 5.80)
with A =A+LC
The development of equations for doing this proceeds along lines similar to those used to develop the equations for K 0 in Section 5.3.
5.5.2
Problem solution
We begin the development by noting that the required stability of the observer ensures that the integral, (5.80), converges to a real symmetric matrix P QE so that (5.81)
where PQE =
l
(X)
-
At-
e Qee
-
A't
dt
( 5.82)
Recall, from Chapter 4, that PQE' (5.82), solves the Lyapunov equation (5.83)
Notice that since A and Qe, (5.80), depend on L so does PQE and JQE· We use the notation PQE(L) and JQE(L) to denote this fact. Therefore our goal is to find L so that (i) A(L) is stable, and (ii) the solution, PQE(L), to (5.83) minimizes JQE(L), (5.81). We denote the value of L that satisfies (i) and (ii) as L 0 . Thus L 0 , the optimal value of L, satisfies
Quadratic State Estimation
141
Now we employ the matrix variational technique used in Section 5.3 to develop L 0 • Thus suppose Lis perturbed away from L 0 as L
=
L0
+ E(fJL)
(5.84)
where Eisa small positive real scalar and (8 L) is any matrix having the same dimensions as L such that A is stable. Then we can write the expansion of PQE about PQEo as (5.85) where HOT (higher order terms) stands for terms in the series involving powers of Ewhich are 2 or greater. Next we obtain the expansion of J QE about its minimum\ alue, J QEo, by substituting (5.85) in (5.81). Doing this and using the fact that the trace of sum of matrices is the sum of the trace of each matrix gives JQE
= trace[PQ£] = trace[PQEo] + Etrace[(8 1PQ£)] +HOT (5.86)
= JQEO + E(SIJQE) +HOT Notice that
( 5.87) Now comparing the present development of equations for L 0 with the development used to obtain equations for K 0 , Section 5.3. we see that the optimal value for L, L 0 . makes (S 1JQE) = 0 for all8L. Therefore we see from (5.87) that an equation for (8 1P QE) is needed. W~ begin the determination of an equation for (S 1PQE) by using (5.84) to express "4 and Qe , (5.80), as
A= A + E(8L)C 0
Q" = Qo -t- E[L
0
Rc(8L)*-'- (8L)ReLo]-r- HOT
where
Then substituting these expressions for Lyapunov equation, (5.83), yields
A, Q and
the expansion for
PQE•
(5.85), in the
(5.88)
142
Quadratic Control
Now the first three terms on the left side of (5.88) sum to a null matrix since P QEo the Lyapunov equation, (5.83), when L = L 0 • Thus using this fact and recalling from Section 5.3 that satisfie~
l.im ,~o
[HOT] = 0 E
we see that dividing (5.88) byE and letting Ego to zero gives (5.89) Notice that (5.89) is a Lyapunov equation in (8 1PQt} Therefore, since A0 is required to be stable we must have (81 PQE) ;::: 0. Thus no eigenvalue, <J;, of 81P QE is negative, i.e., { <J; ;::: 0 : i = 1, 2 · · · , n}. Moreover, referring to the development in Section 5.3, we see that J QE is minimized by choosing L so that 81J QE = 0 for all 8 L. Thus after rewriting (5.87) as n
81JQE
= trace[(8IPQ£)] =
L<J;
i=1
we see that 81J QE = 0 for all 8 L only if all the O";S are zero for all 8 L which implies that (8 1PQE) is null for all8L. Now referring to (5.89) we see that if (8 1PQ£) is null then
(8L)Mt + M1 (8L)* = 0 which holds for all 8 L only if M 1 is null. Therefore L 0 must satisfy
which since Re
> 0 can be solved for
L 0 as
(5.90) Notice that in the same way that K 0 depends on P QCo• the stabilizing solution to the QCARE, so L 0 depends on P QEo• the stabilizing solution to an algebraic Riccati equation commonly referred to as the quadratic filtering algebraic Riccati equation (QF ARE). This equation is obtained by substituting L 0 , (5.90) in the Lyapunov equation, (5.83). Thus after some algebra we obtain the QF ARE as (5.91) where RQE = C* R;: 1 C. This completes the development of the equations for the optimal value of L. In summary, the same variational approach which was used in Section 5.3 to determine equations for the optimal state feedback matrix K 0 was used to determine equations for the optimal observer matrix L 0 • In the next section we will find PQEo so that the QFARE,
Solving the QFARE
143
I), is satisfied and A - PQEoRQE is stable by resorting to ~ Ham_il_t~nian m~trix approach similar to the approach used to solve the QCARE for Its stabthzmg solutiOn.
5.6
Solving the QFARE
In this section we exploit the dual nature of the quadratic state feedback and state estimation problems. We begin by recalling the QCARE, (5.37) and QFARE, (5.91)
QCARE: QFARE: where
RQE- C*R-e 1 C Then comparing these equations we obtain th correspondences given in Table 5.1. Recall that if (A*, C*) is stabilizable then (A, C) is detectable. Therefore the foregoing corf!Spondences together with Theorem 5.1 in Section 5.4.1, imply the following sufficient conditions for the existence of a stabilizing solution to the QFARE. Theorem 5.7 A0 is stable if (i) (A, C) is a detectable pair and (ii) P QEo satisfies the QFARE with (iii) (A, Qe) is a stabilizable pair.
P QEo :::::
0 and
where A0 =A+ L 0 C with L 0 given by (5.90) and PQEo satisfying (5.91). Next recalling the quadratic control Hamiltonian matrix, H QC• (5.46), we see from the foregoing correspondences that the quadratic estimation Hamiltonian matrix, H QE• needed to solve the QFARE for its stabilizing solution should be defined as
_[A*
HQE-
Qe
RQE]
(5.92)
-A
where RQE = C* R;;'c Then substituting PQE in place of PQc in the similarity transformation matrix T, (5.47)
Table 5.1 Estimation A C*
QCARE-QFARE Symbol Correspondences Control A*
Re Qe
B2 Rc Qc
pQEo
PQco
144
Quadratic Control
gives the transformed quadratic estimation Hamiltonian matrix as T
-1
-
H QE T = H QE =
[A-*y
where A=A-PQERQE
Y = PQEA*
+ APQE- PQERQEpQE + Qe
Notice that H QE and fi QE have the same eigenvalues for all T. Therefore we can see, by choosing T so that Y is null, that H QE has eigenvalues which are mirror images of each other across the imagin~ry axis. This means that any imaginary axis eigenvalues of H QE are also eigenvalues of A for all P QE that make Y null, i.e., that satisfy the QF ARE. Thus when H QE has imaginary axis eigenvalues the QF ARE does not have a stabilizing solution, cf., Theorem 5). Conditions which ensure that H QE has no imaginary axis eigenvalues are determined by analogy with Theorem 5.4. Theorem 5.8 The quadratic estimation Hamiltonian matrix, H QE• (5.92), is devoid of imaginary axis eigenvalues if (i) (A, C) has no unobservable eigenvalues on the imaginary axis and (ii) (A, Qe) has no uncontrollable eigenvalues on the imaginary axis Assuming a stabilizing solution to the QF ARE exists, we can use the Schur decomposition of H QE to determine this solution as was done in Section 5.4.3 to determine the stabilizing solution to the QCARE. Therefore referring to Section 5.4.3, we use the first n columns ofT, the unitary or orthogonal matrix which transforms H QE to a block upper triangular matrix with the first diagonal block stable. Then the stabilizing solution to the QF ARE is given as PQEo
= -T21T]}
where
Conditions required for the existence of the stabilizing solution to the QF ARE can be obtained by analogy with Theorem 5.6. Theorem 5.9 Suppose we can find a unitary matrix T so that H 11 is stable and
where HQE= [
A*
Qe
Summary
145
we have the following results: (i) Tn is invertible if (A, C) is detectable; (ii) if TIl is invertible, then T 21 is invertible if (A, Qe) has no stable uncontrollable eigenvalues. Finally we can show that the stabilizing solution to the QF ARE is unique, when it exists, by proceeding in the same fashion as was used to prove Theorem 5.2. This completes the discussion of the stabilizing solution to the Q FARE.
5.7
Summary
We began this chapter with a description of observer based state feedback and its properties. This was followed by the derivation of desig_n equations f~r both an optimal quadratic state feedback controller and for an optimal quadratic state estimator (observer). In each case the design equations were nonlinear matrix equations referred to as algebraic Riccati equations, i.e., the QCARE and QF ARE. The requirement for the state feedback system and observer to be stable restricted the use of the solutions of each of these equations to their so-called stabilizing solution. Conditions for the existence of these stabilizing solutions were developed, in each case, in terms of the parameters of the planyand performance index. This was done through the use of a related four-block matiix known as a Hamiltonian matrix. We saw, in Theorems 5.4 and 5.6, that the QCARE has a stabilizing solution if and only if (A, B2 ) is stabilizable and (A, Qc) has no unobservable imaginary axis eigenvalues. Alternatively we saw in Theorems 5.8 and 5.9 that the QFARE has a stabilizing solution if and only if (A, C) is detectable and (A, Qe) has no uncontrollable imaginary axis eigenvalues.
5.8
Notes and References
The algebraic Riccati equation has played a role of great importance in the evolution of control theory. An extensive view of this subject is given in [3]. The use of the Schur decomposition of the Hamiltonian matrix to solve the quadratic state feedback control problem, is implemented in the MATLAB Control System Toolbox under the '"dommand lqr. More detailed information on the Schur decomposition is given in [17]. The matrix variational technique used here to develop the design equations for the optimal K and L matrices was used previously to reduce the effect of inaccurate modeling ofthe plant on the performance of a quadratic control system [28]. For more recent uses ofthis approach see [13] and the references therein. Since the stabilizing solutions, P, to either of the algebraic Riccati equations ~countered in this chapter are uniquely determined from the corresponding Hamiltontan matrix, H, we have H f---+ Pis a function. This fact has lead to the use of H Edom(Ric) to d~ote those H that admit a stabilizing P and P =Ric(H) to denote the stabilizing . ~lution P determined fr~m H_. Thi~ notation has become standard in the control · terature. For a more detailed discussiOn see Chapter 13 of [47]. When either the plant is time-varying, or when the control cost is evaluated over a finite of time, the optimal controller is time-varying and is determined by solving two matrix differential equations. The development of these conditions is beyond the ofthe present text. The reader is referred to [I] and [1 O]for more information on this
6 LQ G Control
6.1
Introduction
metho ds for choosing the This chapte r continues the development, begun in Chapt er 5, of As in Chapt er 5, our goal K and L matrices in an observer based feedback contro l system. on the contro l system's here is to comba t the effect that unkno wn disturbances have t loss of generality, that output. Thus, as discussed in Section 5.3.1, we can assume, withou l system output is caused the contro l system's comm and input is null so that the contro durati on charac ter of the solely by the disturbance input. The assumed sporadic, short characterized as being disturbances used in Chapt er 5, is replaced here by disturbances a linear system produce an persistent random signals which when applied as an input to average power if output with bound ed average power, where y(t) has bound ed lim T->oo
2_ fT y*(t)y (t)dt < oo T }o
energy unbou nded. Notice that the persistence of the disturbances makes the output the output energy use longer Therefore unlike the quadra tic contro l problem, we can no to attenu ate ability 's system l caused by the disturb ance input as a measure of the contro mance perfor a as used is disturbances. Instea d the steady-state average power output measure. zero mean Gauss ian We will assume throug hout that the disturbances w;( t) are random vectors with covariance given as (6.1)
148
LQG Control
and E[·] is the expectation operator from probability theory. Moreover we will assume that the output caused by these random disturbances is ergodic so that the steady-state average power at the output is given as lim _!._ {T y*(t)y(t)dt T }o
=
T -we
lim E[y*(t)y(t)]
(6.2)
t-->cc
Now we will begin by assuming that the plant to be controlled has state model specified as
x(t)
=
y 1(t)
=
Y2(t)
=
+ wo(t) + B2u2(t) I C 1x(t) + w1 (t) + D12u2(t) C2x(t) + w2(t) + D22u2(t)
Ax(t)
(6.3) (6.4)
(6.5)
where disturbances
controlled output
controlled input
measured output
and u2 ( t), y 1 (t), y 2 (t) have dimensions m 2 ,p 1 ,p2 respectively. Our goal here is to choose K, Lin an observer based feedback control system so that J cc is minimized where
fcc= {-'>CC lim E[y7(t)yJ (t)]
(6.6)
Since the disturbance signals are assumed to be zero mean Gaussian random vectors, this type of optimal control is known by the acronym LQG (Linear Quadratic Gaussian). More recently this optimal control problem was interpreted as a minimum norm problem and the term H 2 optimal control was also used. More will be said about this in Chapter 8 following the development of ideas involving signal and system spaces. w,(t)
~ y,~) -~~~------------~~+~ wo(t)
PLANT u,(t)
CONTROLLER
Figure 6.1
LQG control configuration.
LQG State Feedback Control Problem
149
As in the quadratic control problem, the separation principle allows us to obtain the solution to the LQG control problem by combining the solutions to two subproblems: (i) the LQG state feedback control problem (ii) the LQG state estimation problem. The LQG control problem is also referred to as (iii) the LQG measured output feedback control problem. In what follows we assume that all matrices are real so that we can write (·)Tin place of(·)*
6.2
LQG State Feedback Control Problem
In this section we dewlop the design equations for the optimal state feedback control matrix K which minimizes lee, (6.6). We will do this using the \ariational approach introduced in the previous chapter. We will see that the determination of the optimal K requires the solution of an algebraic Riccati equation.
6.2.1
Problem formulation
Suppose the plant state, x(t). is known. Then we want to determine the state feedback matrix, K, involved in generating the controlled input, u2 (t) = Kx(t), so that1cc, (6.6), is minimized. Notice from (6.3. 6.4) that under state feedback the system relating the disturbances to the controlled output is given as x(t) = Ax(r)
+ 1r0 (t)
(6.7)
Yt (t) = Cx(t)
+ w 1(t)
(6.8)
where
and w0 (t) and 1r 1 (t) are unknown zero mean Gaussian random wctors having covariances given by (6.1). Now in order to proceed \Ye must have H 1 (t) = o. This requirement can be seen by noting from (6.1) that when w1 (t) cf0 the performance index, fcc, (6.6), is unbounded for all K because of the impulsive nature of the covariance of w1 (t). Therefore in order for the LQG state feedback control problem to be properly posed we must have w1 ( t) = o. Therefore under this assumption the statement of the LQG state feedback control problem becomes: minJcc K
150
LQG Control
given that lim E[yf (t)yl (t)] lee= 1---+x x(t) YI (t)
=
Ax(t)
+ w0 (t)
= Cx(t)
(6.9) (6.10) (6.11)
with A stable where (A, C) are given in (6.7, 6.8) and w0 (t) is characterized from (6.1) as
The variational method used in the previous chapter is used now to develop equations forK to solve this problem.
6.2.2
Development of a solution
Since A is stable and lee, (6.9), involves the steady-state behavior, the performance is unaffected by the initial state of the plant. Therefore only the zero state controlled output response is needed. Thus referring to (6.1 0, 6.11) we see that this response is given by (6.12) Then using (6.12) we see that the expectation needed in the cost, (6.9), can be written as
Now we can express the right side of this equation by employing the trace relation used in the development of the controllability Gramian in Chapter 4. This relation is restated here as (6.14) for any compatible vectors vi and matrix 8. Therefore identifying w0 ( T 1 ) with v 1 and w0 ( T2 ) with v 2 enables (6.13) to be rewritten as
Next evaluating the expectation using (6.1) reduces (6.15) to
LQG State Feedback Control Problem
151
Finally, use of the sifting property of the impulse gives
E[yf (t)y 1 (t)] =trace and substituting T = t index, JGe• (6.9) as
T2
[1 W 1
and allowing t
00 e"F(t-T2 )CT CeA(t-T2 )dT2
--->
J
(6.17)
oo enables us to express the performance
J 6 e = trace[WooPGcl
(6.18)
where
Now recalling Theorem 4.5 in Chapter 4, we see that P 6 e satisfies the Lyapunov equation (6.19) and isfthe o.>servability Gramian for the pair (A" C). Thus since (A, C) depends on K so does PGe· Now the equations which determine K so that J 6 e, (6.9), is minimized can be developed by following the variational approach used in the previous chapter. Thus if K 0 denotes the optimal value forK we have
and expanding he and PGe about K 0 yields
he= heo + t:(l5,he) +HOT = trace[WooPGeol
+ t:trace[W00 (8 1P 6 e)] +HOT
(6.20)
where
~d
t:
is a small positive real scalar with l5 K being any real matrix having the same
~ension as K such that A is stable. In addition, recall that HOT denotes higher order 'Fms in E and therefore satisfies
limHOT =0 0
E
(6.21)
we see from (6.20, 6.21) that (6.22)
152
LQG Control
Recall from the previous chapter that lee is minimum when (o 1Jcc) = 0 for all bK. Thus we see from (6.22) that we need a relation between (61 Pcc) and 0 K. This relation is developed by substituting the expansions for K and Pc;c as given in (6.20) into the Lyapunov equation (6.19). This gives (6.23) where
A
0
=
A+B2Ko
Co = C 1 + D12Ko
Notice that the first three terms on the left side of (6.23) sum to a null matrix since P GCo satisfies (6.19) when K = K 0 . Therefore dividing (6.23) through byE, letting Ego to zero, and using (6.21) yields (6.24) where
and we see that (o 1PGc) is governed by a Lyapunov equation. Now in order for (o 11Qc), (6.22), to be zero for all OK, we must have W 00 (o 1PGc) null for all OK. However W 00 is independent of OK. Therefore we can have W 00 (o 1PGc) null for all oK only if (8 1PGc) is null for all8K. Thus we see from (6.24) that if (8 1PGc) = 0 for all8K then we must have M 1 = 0. Therefore assuming that the columns of D 12 are independent so that Df2D 12 invertible, we can solve M 1 = 0 for K 0 as (6.25) where
As in the case of the optimal quadratic control problem, the matrix PGco is obtained as the solution to an algebraic Riccati equation. We develop this equation by substituting, Ko, (6.25), in the Lyapunov equation, (6.19). Thus after substituting for A, C from (6.7, 6.8) in (6.19) we obtain
AT PGco
+ PGcaA + K"[; Qo + Q(; K + Cf C1 + K"[; Df2D12Ko = 0 0
which after substituting for K 0 from (6.25) becomes
AT PGco
+ PGer,A- 2QT; (Di;D\2)-l Qo + cf cl + QT; (Df2Dl2)- 1Qo = 0
(6.26)
LQG State Estimation Problem
153
Finally substituting for Q0 , (6.25), gives [AT~ C[ Dn(D[zDtz)- 1 BfjPGco
~PGcoBz(Df2Dl2)- 1 BzPGco
+ PGco[A ~ B2(D[zDn)-I D[zCJ]
+ CfCt
~ CfDJ2(DfzDn)- 1DfzCt
=0
which we can write more compactly as (6.27) where At= A~ Bz(D'fzDn)- 1DTzC 1 Rt = Bz(DfzDI2f 1B[ QI = C'f[I ~ DI2(D'fzDu)- 1D'fzJCt
Notice that
Now the algebraic Riccati equation (6.27) is referred to as the Gaussian control algebraic Riccati equation, (GCARE). Thus we obtain the optimal K, K 0 , by solving the GCARE for its stabilizing solution, i.e., the solution P GCo which makes A + B 2 K 0 stable. As in the previous chapter, we will show that the GCARE can be solved for its stabilizing solution by using an appropriate Hamiltonian matrix. This matter is considered further after taking up the state estimation problem. Before leaving this section, notice that the requirement that D[2D 12 be invertible is similar to the requirement we encountered in Section 5.3.2 that Rc be invertible. Both Rc and D[2D 12 play the role of introducing a penalty on the use of the controlled input in "~ minimizing the control costs JQc and lac respectively.
6.3
LQG State Estimation Problem
In this problem we assume that the plant state x( t) is unknown and that we want to design an observer to estimate it from the controlled input, u2 (t) and measured output, Yz(t), (6.3, 6.5). Unlike the problem just treated, the controlled output y 1 (t), (6.4) is not used. Our goal now is to choose the observer matrix L so that JGE> the steady-state average power in the state estimation error, i(t), is minimized where JGE
=lim E[.XT(t)i(t)] =lim trace[E[i(t)ir(t)]] (----700
(6.28)
t-oo
Notice that this performance index involves the steady-state, state estimation error covariance matrix P GE where
154
LQG Control
n of the In order to proceed we need to review the role played by L in the evolutio estimati on error. This is done as follows.
6.3.1
Probl em formu lation
having the Recall, from the beginnin g of this chapter, that the state model for the plant as given is output only its measure d output, Y2(t), as
+ wo(t) + B2u2(t)
x(t)
=
Ax(t)
Y2(t)
=
C2x(t)
( 6.29)
+ w2(t) + D22u2(t)
(6.30)
vectors where the unknow n disturba nces w0 (t) and w2 ( t) are zero mean Gaussia n random that an see we 3, Chapter to referring Then (6.1). with covarian ce matrices as specified by as observer for this state model can be cast
+ B 2u2(t) + L[y2(t) - Y2(t)]
.X (t)
=
Ax(t)
.Y2(t)
=
C 2x(t)
+ D22u2(t)
(6.31) (6.32)
where we have replaced the unknow n disturba nces by their expected values. on Again as in Chapter 3, we can obtain a differential equatio n for the state estimati gives This 6.32). (6.30, using and (6.29) error by subtract ing (6.31) from
i
(t)
=
Ax(t)
(6.33)
+ Bw(t)
where
w(t) =
[wo(t)l
x(t) = x(t)- x(t)
w2(t)
A= A+ LC2
B=
[I
L]
nce vector, Notice from (6.1) that the compos ite zero mean Gaussia n random disturba w(t), has covarian ce (6.34)
where
that A is Recall from Chapter 3, that in the absence of disturbances, we chose L so hes the approac which estimate state a s generate r observe stable. This ensures that the l beneficia this nately Unfortu error. on estimati state plant initial plant state for any t persisten of asympto tic behavio r of the state estimato r is not possible in the presence
··--..... ·~'!".'"""''- 0 if (A 1 ,D~C 1 ) has no stable unobservable eigenvalues.
6.5.4
Conditions for solving the GFARE
In order to obtain conditions on the plant parameters which ensure that the GF ARE has a stabilizing solution, we can use the correspondence between matrices in the GCARE and the GF ARE given in Table 6.1. Therefore substituting these correspondences in (lc, 3c) we see that the GFARE has a stabilizing solution, PoEo if (le) (AT, Cf) is stabilizable; (2e)
rank [[
AT-jwi T
Bt
cf]] = T
D21
n + P2
wE
(-oo,oo)
.,~
Moreover, if a stabilizing solution, P GEo, exists then 1
(3e) POEo
> 0 if (AJ, D~Bi) has no stable unobservable eigenvalues, where
However these conditions can be restated in a more convenient form by using the facts that the stabilizability of any pair (A, B) is equivalent to the detectability of the pair (AT, BT), and that the rank ofamatrixequals the rank of its transpose. Thus the GFARE has a stabilizing solution, PoEo• if (le) (A, C2 ) is detectable; (2e)
rank [[
A- jw/
Cz
B1 D21
]]
=
n +p 2
wE
(-oo,oo)
166
LQG Control
Moreover, if a stabilizing solution,
PG£o,
exists then
(3e) Pc;eo > 0 if ( A2, B 1Df) has no stable uncontrollable eigenvalues.
6.6
Summary
In this chapter we have given a derivation of the design equations for the LQG optimal feedback controller for a linear time-invariant continuous-time plant. The performance criterion or cost function which is minimized by the optimal LQG controller is the steadystate expected or average value of a quadratic form in the output vector to be controlled (the controlled output) when the disturbance input is a zero mean Gaussian random vector. Necessary and sufficient conditions were given for being able to design the LQG controller.
6. 7
Notes and References
Again, as in the quadratic control problem treated in the previous chapter, we have seen that the algebraic Riccati equation plays a central role in the design of optimal controllers. For other instances where the algebraic Riccati equation arises in control theory see Chapter 13 of [47]. The LQG optimal control problem was recently referred to as the H 2 optimal control problem. The reason for this will be given in Chapter 7. Assuming the appropriate existence conditions are satisfied, the LQG controller can be calculated using the command h2lqg in the MATLAB Robust Control Toolbox. The observer obtained by solving the LQG state estimation problem was originally given by Kalman as an alternative to the Wiener filter for extracting a desired signal from an additive combination of the desired signal and noise. This aspect of the LQG problem has had a great impact on a wide variety of industrial problems. There are many books which deal with this subject. For example, informative treatments are given in [7, 10, 25].
7 Signal and System Spaces
7.1
Introduction
In the previous two chapters we were concerned with the problem of designing controllers to attenuate the effects of disturbance inputs on the output of a feedback control system. We assumed that the disturbance input was either an impulse (Chapter 5) or a random signa1with an impulsive covariance (Chapter.6). In the next two chapters we develop ideas needed to solve the disturbance attenuation problem for a broader class of disturbance input. Signals in this class have finite energy and are denoted by £ 2 [0, oo) where £ is used in recognition of the mathematician H. L. Lebesgue, pronounced "Lebeg", the subscript 2 is used in recognition of the quadratic nature of energy, and the bracketed quantities indicate the time interval over which the signals are not always zero. Therefore f( t) E £ 2 [0, oo) if (i) f(t) has bounded L 2 norm (finite energy),
[lao J*(t)J(t)dt]!= IIJ(t)ll2
0
Notice that y r ( -oo) is zero only if- A is stable, i.e. only if A has all its eigenvalues in the open right half-plane or equivalently, only if no eigenvalue of A is in the closed left half-plane. Systems that have this property are referred to as being antistable. Recall that
173
Frequency Domain Hilbert Spaces
a system is unstable if at least one eigenvalue of its A matrix lies in the closed right halfplane. Thus we see that antistable systems are a special class of unstable systems. The introduction of this class of system allows us to express the transfer function of an unstable system, provided it has no imaginary axis poles, as the sum of two transfer functions, one for a stable system and one for an antistable system. We can obtain this sum decomposition by expanding the given transfer function in partial fractions. The foregoing readily extends to the multi-input, multi-output case as follows. If an anticausal system is antistable the system's weighting matrix satisfies lim W(t)
l-----+-00
=0
and the system's A matrix has no eigenvalues in the closed left half-plane. Moreover, the system's zero state response is given by
y(t)
=-lot
W(t- T)U(T)dT
W(t) = -CeA 1B
t E (-oo,O]
so that 0
II W(t)llz=
l
(trace[["" W*(t) W(t)dt])
2
Finally, in summary, we have shown that the weighting matrices for causal systems which are stable satisfy
whereas the weighting matrices for anticausal systems which are antistable satisfy
W(t) E C2( -oo, OJ
7.3
Frequency Domain Hilbert Spaces
We begin this section by relating the time domain Hilbert space C2 ( -oo, oo) to the frequency domain Hilbert space £ 2 . This relation is made possible by Parseval's theorem in the general theory of the Fourier transform. Following this we introduce two frequency domain Hilbert spaces, 1i2 and Ht which constitute an orthogonal decomposition of C2 and are known as Hardy spaces.
7.3.1
The Fourier transform
Recall that the Fourier transform and the inverse Fourier transform are defined as
F[.f(t)] .f(t)
=
F(jw) = l:.f(t)e-Jwtdt
I =27f
loo -oo
.
F(jw)e1wt dw
(7.24) (7.25)
174
Signal and System Spaces
Also recall the following well known sufficient condition for the convergence of the integral defining the Fourier transform of[(t), (7.24)
1: [f*(t)f(t)]~dt
= < F1(jw),F2 (jw) > where F;(Jw)
(7.32)
= F[fi(t)] and = 1:ft(t)f2(t)dt
(7.33)
(7.34)
Thus .C2 is an inner product space which can be shown to be complete. Therefore .C2 is a Hilbert space with inner product defined by (7.34). The reason which make it possible for us to extend Parseval's theorem from .C 1( -oo, oo) to .C2(-oo, oo) arises from the theory of Lebesgue integration which is beyound the scope of this book. However the following subsection is included in an attempt to provide some insight into this matter.
7.3:2
Convergence of the Fourier integral
Supposef(t) is specified as
f(t)
=
(t + l)- 1
t::=:o
=0
(7.35)
ta+
(7 .38)
.C_[f(t)] =
~~1~f(t)e-' 1 dt
: Re[s] 0 when f(t) E .C2 [0,oo). This implies that .C+[f(t)] is devoid of poles in the open right halfplane whenf+(t) E .C2 [0, oo ). We can use a similar argument to show that .C_ [/( t)] is devoid of poles in the open left half-plane whenf(t) E .C2 ( -oo, 0] Now suppose we are given a causal signalf+(t) E .C2 [0, oo) and an anticausal signal f_(t) E .Cz(-oo,O]. Then we have
f+(t)e-a+t E .C 1 (-oo,oo)
a+ E (0, oo)
f_(t)e-a_t E .C,(-oo,oo)
a_ E (-oo,O)
and
F[f+(t)e-a+t]
= l:f+(t)e-a+te-Jwtd t = F+(a+ + jw)
F[f_(t)e-a_t] = l:f-(t)e-a_te-Jwtd t = F_(a_
+ jw)
for any real scalars a+ > 0, a_ < 0. Recall that the Fourier integral, (7.24), converges for almost all w when f(t) E .C2 ( -oo, oo ). Therefore if we take a+ and a_ zero we have the Fourier transforms , forf+(t) andf_(t) as
= .C+[f+(t)]ls=jw F_(jw) = .C_[f_(t)]ls=jw
F+(jw)
(7 .41)
with {F+(jw) :wE S+}, {F_(jw) :wE S_} being sets of arbitrary finite elements where S+,S- are sets of measure zero. Then we see thatf(t) E .Cz[O, oo) (j(t) E .Cz(-oo,O]) has a Fourier transform almost everywhere on the imaginary axis if and only if the Laplace transform .C+[f(t)] (.C_ [f(t)]) has no poles in the closed right (left) half-plane. Functions having these properties are said to belong to the Hardy space 'Hz ('H~-).
7.3.4
The Hardy spaces: 1{2 and
Hi
In this section we will introduce frequency domain spaces denoted 'Hz and 'Ht so that we can write any F(jw) E .Cz as
where
These spaces are called Hardy spaces after the mathematician G. H. Hardy who carried out extensive studies on these and other related spaces, e.g., 'H00 space.
,
Signal and System Spaces
178
The definition of the Hardy spaces H 2 and Ht involve ideas from the theory of a complex functions of a complex variable. A function of this sort is said to be analytic at are exist not does e derivativ point, if it has a derivative at that point. Points where the referred to as singular points. The only singular points a rational function has are its poles. H 2 consists of all complex functions of a complex variable which are analytic at every point in the open right half-plane and have a finite L 2 norm, (7.31). Alternatively, the Hardy space Ht consists of all complex functions which are analytic in the open left halfis plane and have a finite L2 norm, (7.31). The analytic requirement in these definitions either in function No spaces. these for norm needed to ensure that (7 .31) is a well defined H 2 or Ht can have imaginary axis poles. In the rational case, H 2 consists of all strictly proper functions which have no poles in the closed right half-plane, whereas Ht consists of all strictly proper functions which have no poles in the closed left half-plane. In summary, if F(s) is real rational then (i) F(s) E H 2 if and only if F(s) is strictly proper and has no poles in the closed right half-plane. (ii) F(s) E Ht if and only if F(s) is strictly proper and has no poles in the closed left halfplane. (iii) F(s) E £ 2 if and only if F(s) is strictly proper and has no poles on the imaginary axis. Notice that if F(s) is the transfer function of some system, then in case (i) the system is stable, and in case (ii) the system is antistable.
7.3.5
Decom posing £ 2 space
Recall that the L 2 time domain Hilbert spaces decompose as
Then since the Fourier transform maps £ 2[0, oo) onto H 2 and £ 2( -oo, OJ onto Ht and the same inner product is used for £ 2 , H 2 and 1-if, we have
(7 .42) and the Fourier transform is an isomorph ism such that
£2 ( -oo, oo) £2[0,oo) £2( -oo, 0]
is isomorph ic to is isomorph ic to
£2 H2
is isomorph ic to
'Hf
As an illustration, suppose we are given the following signal f(t)
where a, bare real and positive.
=e-at
t 2::0
Frequency Domain Hilbert Spaces
179
Then we can writef(t) as
f(t)
= f+(t) + f_(t)
where
f+(t) =e-at f_(t) = 0 f_(t) =it f+(t) = 0
fort~
0
fort :s; 0
Since the Laplace transforms of these signals are given by £+[1'-..(t)]
.
= - 1-
Re[s]
s+a
1 C_[f_(t)] = - b s-
>-a
Re[s] < b
we see that both C+[f+(t)] and C_[f_(t)] are free of poles on the imaginary axis. Thereforef(t) has a Fourier transform which can be written as 1
1
F[f(t)] = -.- b + -:-------+a JW-
JW
However £+[f+(t)] and C_[f_(t)] are each zero at w = oo with £+[/+(t)] being analytic in the closed right half-plane and£_ [J_ (t)] being analytic in the closed left halfplane. Therefore we have C_[f_(t)] E Hf
F[f(t)]
E
£2
The foregoing example demonstrate that, in general, systems with transfer function ,~ satisfying G(jw) E £ 2 can be written as
G(s) = G 1 (s)
+ G2 (s)
where
G2(s)
7.3.6
E
Hf
The H2 system norm
Recall from Section 7.2.2 that when the state model for a given system is minimal, the time domain L 2 norm of the weighting matrix is finite only if A is stable and Dis null. Therefore in this case the system's transfer function
G(s) is strictly proper, i.e., G( oo)
=
=
.C+ [CeAt B]
= C(sl- A)-I B
0 and has no poles in the closed right half-plane. Thus we
Signal and System Spaces
180
have G(s)
E
7-i 2 and using Parseval's theorem we have
[[CeA 1B[[ 2
=
(trace[lx (ceA 1 B)*(ceA 1B)drJY
=(trace [L 1: G*(jw)G(jw)dw] Y= [[G(Jwll2
(7 .43)
Thus the time domain L 2 norm of the system's weighting matrix equals the frequency domain L2 norm of the system's transfer function, G(s). Moreover, since in this case we have G(s) E 7-i 2 , this norm is usually referred to as the system's H 2 norm. Notice that if G(s), U(s) E 7-{ 2 with G(s) rational, then G(s) U(s) E 7-{ 2 since each term in the product is analytic in the open right half-plane has no poles on the imaginary axis with the product being zero at infinity. Thus the zero state response from a stable causal system having a strictly proper transfer function satisfies Y(s) E 7-{ 2 or y(t) E £ 2[0, oo) for any input u(t) E £ 2 [0, oo ). In order to extend this result to the case where the transfer function is only proper we need another Hardy space. In the next section we will see that transfer functions of stable systems which are only proper, i.e., G(oo) -=f. 0, lie in a Hardy space denoted 7-iCXJ. Thus if U(s) E 7-{ 2 and G(s) E 1ix then the product G(s)U(s) is analytic in the open right halfplane and has no poles on the imaginary axis. Clearly, in the case when U(s) is rational we have G( oo) U( oo) = 0 and Y(s) E 7-i 2 or y(t) E £ 2 [0, oo) for any input u(t) E £ 2[0, oo ). It turns out that this result holds in the more general case when U(s) is irrational. Thus we have
Y(s)
=
G(s)U(s)
E
(7.44)
H2
when
G(s)
E
7-i 00
Just as there is a frequency domain norm for functions in either 1i2 or Ht, namely the L 2 norm, we will show in the next section that there is a norm for functions in Hem called the H 00 norm. Thus 7-{ 00 is a normed space. However, unlike 7-{ 2 or Ht there is no inner product defined on 7-i 00 . Therefore H 00 is not a Hilbert space. Now the space of rational transfer functions that have no poles in the closed left halfplane and are finite at infinity is denoted 7-i~. Notice that we do not use 1i~ to denote this space since the concept of orthogonality is missing. Therefore in addition to (7.44) we have the dual result
Y(s)
=
G(s)U(s)
E
Ht
(7.45)
when G(s)
E 7-i~
U(s)
E
Ht
We will see in the next three chapters that the Hardy spaces, 1i00 , 1i~, 1i 2 and Ht, that
The H 00 Norm: SISO Systems
181
we are examining in this chapter are essential to the solution of the Hoo control problem. This solution consists of a feedback controller which stabilizes the plant and constrains the Hx norm of the plant's transfer function, from disturbance input to desired output, to be less than a specified scalar. The Hx norm is introduced now as follows.
7.4
The H00 Norm: SISO Systems
At the end of the previous section we introduced the H 2 norm of a system's transfer function, IIG(s)lb by relating it to the time domain L2 norm of the system's impulse response, CeAt B. In this section we introduce another type of frequency domain system norm referred to as the "H infinity norm" denoted IIG(s)lloo- We do this now by relating IIG(s)llx to an equivalent time domain norm referred to as the "L2 system gain". Suppose we are given a stable single-input, single-output system having zero state response y(t) when the input is u(t). Then we define the L 2 system gain, /'o, as /'o
= sup lly(t)ll2 . u(t)E£2[0,oo) llu(t)ll2
(7.46)
u(f),'O
where "sup" is the abbreviation for supremium or smallest upper bound of a set, which in this case is the set of positive real numbers generated by the ratio of the L 2 norms in (7.46) as u(t) is varied over £ 2 [0, oo). Notice that "sup" is used instead of"max" in case the set over which the search is carried out does not contain a maximal element. In addition, notice that we do not consider the null input to avoid dividing by zero. Now the use of a signal norm to define a system norm as in (7.46) is referred to by saying that the signal norm induces the system norm. Therefore the L 2 system gain, (7 .46), is induced by the L 2 signal norm. Notice that, for a given system, this norm is, in general, not equal to the L 2 norm of the system's impulse response, CeAt B. Since we are assuming the system is stable, we saw in the previous S€ction that y(t) E £ 2[0,oo) when u(t) E £ 2[0,oo). In addition we can use the fact that £ 2[0,oo) is isomorphic to 1t2 to rewrite the L 2 system gain, (7.46) in the frequency domain as l'o =
sup II Y(s)ll2 U(s)EJt2ll U(s) ll2
(7.47)
U(...k : k E [1, m]. However since )...k is repeated nk times. we obtain a complete set of eigenvectors only if there are nk independent eigenvectors, vki : i = 1, 2, · · · nkl corresponding to each >..k, k E [1, m], i.e., only if
has nk independent solutions v = vki, i = 1, 2, · · · nk for each k E [l, rn]. Any square matrix of size n having a complete set of n eigenvectors gives rise to a
272
Appendix A: Linear Algebra
diagonal matrix under the transformati on
where then columns of V are eigenvectors of A, i.e.,
and A is a block diagonal matrix having n1 x n1 diagonal blocks, A 1 : i ).. 1 at each diagonal position, i.e.,
l
0
1.0
A,~
=
1, 2, · · · m, with
r :,0 ;,0]
[>..,
Matrices having a complete set of n eigenvectors are referred to as diagonalizable matrices. Any matrix whose eigenvalues are simple, i.e .. do not repeat, is a diagonalizable matrix. Alternatively, a matrix A that does not have a complete set of eigenvectors cannot 1 be diagonalized by any invertible matrix V in the transformati on v- A V. In this case A is said to be defective, i.e., defective matrices are not diagonalizable matrices. For more detail the reader is referred to [17, pp. 338-339]. Concerning the controllability of a state model having an A matrix with multiple eigenvalues, it turns out that when A has more than one eigenvector correspondin g to any eigenvalue it is not possible to control the state from one input, i.e., the pair (A, B) is uncontrollable for all B having only one column. The foregoing fact can be shown as follows. Whenever A has two independent righteigenvectors correspondin g an eigenvalue >.., A has two independent left-eigenvectors, w 1 , w2 correspondin g to this eigenvalue. Then any linear combination of these lefteigenvectors is also a left-eigenvector of A, i.e.,
where
with the a 1s being arbitrary, constant, non-zero scalars. Therefore we can always choose the a 1s for any vector B of length n so that wTB= 0
showing that >.. is an uncontrollable eigenvalue for all vectors B.
A.2
Block Upper Triangular Matrices
Block upper triangular matrices play an important role in many different situations in control theory. They are directly related to invariant subspaces. A subspace W of Vis said to be an A-invariant subspace if for all x E W we have Ax E W.
~
'
J
rj
r l
I
Block Upper Triangular Matrices
273
Suppose we are given a square matrix of size n which has a block upper triangular structure, e.g., (A.2)
where All A 2 , A 3 , and A 4 are n 1 x any x of the form
nb
n1 x
n2, n2
x
n~>
and n 2 x
n2
with n
=
n 1 + n 2 . Then
where x 1 is any vector of length nh lies in an A-invariant subspace, since x E W
In this case W is called an eigenspace corresponding to the eigenvalues of A which are also eigenvalues of A 1• To see this consider the eigenvalue-eigenvector equation for A. We can rewrite this equation in the following way A 1v\
+ A2v~ = >.;v~
(A.3)
= >.;v~
(A.4)
A4v~ where
is the partitioned form for the eigenvector vi corresponding to eigenvalue>.;. Suppose that v~ is null. Then we see from (A.3) that must be an eigenvector of A 1 corresponding to eigenvalue >.;. Thus the eigenvalues of A1 are eigenvalues of A i.e. >.(AI) C >.(A) with the corresponding eigenvectors of A being
vi
with A 1v\ =>.;vi Real Schur decomposition [17, p. 362], provides a computationally robust method for obtaining an orthogonal matrix Q such that
has the form (A.2). In addition there are ways of doing this so that the eigenvalues of A 1 are a specified subset of the eigenvalues of A.
274
A.3
Appendix A: Linear Algebra
Singular Value Decomposition (SVD)
In this section we give a proof of Theorem 7.1, viz., Theor.:m 7.1 Any p x m matrix of complex constants, M, which has rank r can be decomposed as Jf
=
U:EV*
(A.5)
where U, and V are p x p and m x m unitary matrices with
U 1 is p x r
U2 is p
Vl ism
V2 ism
X I'
X jJ- I'
m- r
X
and 'Eo is an r x r, real, positive definite, diagonal matrix denoted as O'J
0
0
0
0'2
0 = diag[0" 1 , 0'2 , · · ·, 0',.]
'Eo= 0
0
O'r
with diagonal entries referred to as singular values and ordered so that
i = 1. 2, .. · , r
-
1
Proof Let (O'T, v;) denote an eigenvalue-eigenvec tor pair forM* Man m x m Hermitian non-negatve matrix. Thus we have M* Mv; = O'JV;
(A.6)
with O'T real and positive so that we can always order the eigenvalues as 2 O'J
::0.
2 O'r+l
2 0'2
=
::0. .. • ::0. O'r2 2
O'r+2
= ··· =
>0 2 O'm
= 0
Notice that since rank[M] = r, only r of the eigenvalues of M* Mare non-zero. In addition, since M* l'vf is Hermitian, we can always choose the eigemectors so that they are orthonormal =
1
=0
i = 1, 2, · · · m
(A.7)
1- j
(A.8)
for i
Next we form a matrix V from the foregoing orthonormal eigenvectors of M* }.1 so
.ll
215
that (A.6) can be written as the matrix equations (A.9)
M*MVI = V 1 I;6
(A.lO)
M*MV2 = 0
where V = [VI V1
= [v 1
V2] v2
,..2 "-'O = ···
V2
v,]
d"' Iag [a 21 o Cf 22' ... '
=
[vr+l
Vr+2
2]
rJ r
...
Vm]
Notice that the orthonormal nature of the eigenvectors, (A.7, A.S), makes them x r matrix V 1 satisfy Vj V 1 =I, and the m x m- r matrix V 2 satisfy Vi V 2 =I. Thus we have V* V = VV* =I, i.e., them x m matrix Vis unitary. )Jext, pre-multiplying (A.9) by Vj and then pre- and post-multiplying the resulting equation by I; 01 gives
which we can interpret as
(All) where
Notice from (A.11) that the p x r matrix U 1 has orthonormal columns. Therefore we can always choose a p x p- r matrix U 2 having orthonormal columns so that the p x p matrix U
is unitary. i.e., U' U = UU* = I. We show next that the foregoing unitary matrices. U, V satisfy (A.5) in the statement of Theorem 7.1. We begin by expanding U* MV in terms of its blocks U*MV= [
U*MV I
I
Ui"o\t!VI
U·*.1MV2] U2MVc.
(A.12)
Then we see that the 1,1 and 1,2 blocks can be reduced by substituting for U 1 from (All) and using (A.9, A.10). Doing this yields I;r) 1 VjM*A'fV 1 = I; 01
UjMV1
=
U)MV 2
= I; 01 V) M* MV 2 =
I::6 = I;o
I; 0 Vj V2
=0
p;ext the reduction of the 2,1 block in (A.l2) relies on using the
expres~ion
for Uh
-------
---·~--·u
(A. ll) to ena ble MV 1 to be repl aced by U,E o so tha t
u;M v, = u;u ,E 0 = 0 Fiually in ord er to reduce the 2,2 block in (A.12) we use the fact tha t MV 2 seen by not ing , from the con stru ctio n of V b (A.IO), tha t M* Mv ; =
= 0. This is
0
where v; is any colu mn of V . Thi s implies tha t 2 v;M *M v;= O
and letting z;
= Mv ; we see tha t
which is only possible if z; is null . Thu s ivfv ; mu st be null and sinc e v; is any colu mn of V 2 we have MV 2 = 0. The refo re we see tha t the 2,2 block of (A. l2) becomes
Thu s from the foregoing we see tha t (A. l2) is reduced to U'M V
=
[~ ~]
and we hav e the form for the SVD of M which is given in the theo rem .
A.4
Different Forms for the SVD
•
The re are occasions where con stra ints imp ose d on the SVD by the dimensions of the mat rix being dec omp ose d can be tak en into acc oun t so as to pro vid e a mor e explicit fom1 for the SVD. Thi s possibility aris es from the fact tha t the ran k of a rect ang ular mat rix can not exceed the sma ller of its dimensions. The refo re since Af is p x m, we hav e rank[M]
= r:::;
min (p, m)
and the SVD of M, (A.5), can be expressed in one of the following form s dep end ing on which of the dim ens ion s of M is larger. If p < m, i.e., M has mor e colu mns tha n rows, then (A.5) can be wri tten as
I
~ '\;i
where U, V in (A.5) equal UP and [ Vrl
Vr 2 ] respectively. In add itio n Vr 1 , Vp 2 are
.
.
-
Matrix Inversion Lemma (MIL)
277
m x p and m x (m- p) with :EP being a p x p diagonal matrix :EP = diag[a 1 , a 2, ···,a, 0, · · ·, 0]
In this case it is customary to refer to the p diagonal entries in :EP as the singular values of M and the p columns of UP and of VP 1 as the left and right singular vectors of M respectively. Similarly, if p > m, i.e., M has more rows than columns, then (A.5) can be written as V m2 ] [
:E.m] 0 V*m
where U, V in (A.5) equal [ U mi U m 2 ] and V m respectively. In addition U 1111 , U m 2 are p x m and p x (p - m) with L:m being the m x m diagonal matrix
Again it is customary to refer to the m diagonal entries in :Em as the singular values of M and the m columns of Umi and of V m as the left and right singular vectors of M respectively.
A.5
Matrix Inversion Lemma (MIL)
The following relation has been of considerable importance in the development of control theory. Lemma If D and I: are nonsingular matrices then
where L = r2 R
+ \li I:
= ~.r~-
o-I\li(o-1\li- I:-Ir'o-1
Proof Expanding the product RL yields
(A.l3) where =
o-1\li(o-'\li
+ I;-~~-~
r2=
o-'\li ( rl- 1\li
+ I::- 1) -I o- 1wE
r,
278
Appendix A: Linear Algebra
Then we see that r1
+
r2
=
D~ 1 W(.., v*:E~ 1 B 1 = 0
CI:E~Iv
=0
i=l,3, .. ·,2k+l
(B.14)
i = 0,2, ... ,2k
(B.15)
~BIB;
(B.16)
~C2,CI
(B.17)
Returning to (B2, B.3) we have
+ :Eb1A:i = A2,:Ebl + l:b2A3 =
A2l:b2
Then premultiplying (B.l6) by (B.l4, B.15) gives "' 2ubiV = ub2 A*"'; A *"'i+l 2L..bl V
=
~
v*:E
hi> and postmultiplying (B.l7) by :Ei 1v
"'i+l V A )L.Jbl
"'
~L.Jb2
i = 1, 3, ... '2k
"'; A 3uhJV
+1
i = 0,2, ... ,2k
and using
(B.l8) (B.l9)
Next we can rewrite (B.l8) as (B.20)
and (Bl9) as I "' 2 :Eblv L..b2 A*[
3 :Eblv
···
"'2 AM 2k+l v ] = ~ub2 3 :Ebl
(B.21)
where :Eb2 was used to premultiply (B.l9) and M was defined previously in (B.l2). Now since the left sides of (B.20, B.21) are equal we have (B.22)
282
Appendix 8: Reduced Order Model Stability
Moreover we can use (B.l2) to rewrite the expression on the left side of this equation. Doing this gives rise to the following Lyapunov equation ~Q- 2:;~2~
=0
(B.23)
where Now it turns out if Q and 2:;~ 2 do not have any eigenvalues in common then~= 0 is the only solution to (B.23). Indeed Q and 2:;~2 do not share any eigenvalues since the eigenvalues of Q were shown to be a subset of the eigenvalues of 2::~ 1 , (B.l3), and from the statement of the theorem we have that no eigenvalue of 2:;~ 1 is an eigenvalue of 2::~ 2 . Thus we have A 3M = 0. Since the columns of M consist of all the right-eigenvectors of A 1 corresponding to the imaginary axis eigenvalue,\ of A 1 , we have that (.X, q) is an eigenvalue right-eigenvector pair for the full system matrix A 6 where q
=
[~]
smce
However, since ,\ lies on the imaginary axis, A 6 is unstable. This contradicts the fact that A 6 is stable. Therefore our assumption at the start of the proof that A 1 is unstable is false and the proof is complete. •
l..
·.·.·.i
Ap pen dix C: Pro ble ms
of the The following problem s illustrate the basic ideas introduc ed in the earlier chapters ment. develop under are es principl d advance more book. Problem s dealing with
C.1 1.
Problems Relating to Chapter 1 matrix Use the fact that any matrices M 2 and M 3 have the same eigenvalues as the M 1 if
ied for any nonsing ular matrix S, to determi ne relations between the unspecif of set same the has matrix each that so 4, 3, 2, 1, = k elements in the matrices Ak : akjs. the for values the specify 3} eigenvalues. If this set is { 1, -2,
AI=
A3=
2.
["i' [!
1
a12 0
0 0
Tl ""]
A2 =
["'' !] a21
a31
A,
a23 a33
[
c
0 0
:
0
a31
a32
n
matrices Find the eigenvalues {Aki : i = 1, 2} for each of the following system for tors, Ak : k E ~1, 6;. Then calculate the correspo nding right eigenvec one. Ak : k = 1, 2 letting the first compon ent of each eigenvector be
vi
AI= [
A4=
~3 ~1]
[~~
j~]
A2
=
As=
[-1 O
3
l
-2j
[-5 -6 ~]
A3
= [ ~2
A6=
~1]
[:2 !s J
284
3.
4.
Appendix C: Problems
Using Laplace transforms, and without calculating numerical values, determine which of the transition matrices corresponding to the Aks. k E [1, 6], given in the previous question have entries dependent on only one mode, e:u. A certain system has a zero-input state response of
x(t)
=
[x1(t)] x 2 (t)
where
5.
6.
7.
Find, without using Laplace transforms, the eigenvalues and eigenvectors of the A matrix for the system's state model. Using the trajectories obtained when the initial state is an eigenvector, sketch the state trajectory for the given initial states x;(O) : i = L 2 and system matrix A. Use your result to determine a relation between the elements of C, namely, c 1, and c2 , so that the system output is bounded for all initial states.
Calculate the eigenvalue left-eigenvector pairs,{.\. 11i: i E [L 2]}, for A given in the previous question. From this result determine an output matrix C such that for any initial state the zero-input response y(t) depends only on the mode e~ 21 • What is the relation between the C matrix you obtain here and the C matrix you obtained in the previous question. Suppose a state model has system matrix, A, which is partially specified as
If the last component of each right-eigenvector is 1, find: (i) the initial state, x(O), which gives a zero input response of
y(t)
=
when C = [ -1
4e- 1
l
1
(ii) the output matrix C which gives a zero input response of
y(t) 8.
=
when x(O) = [ 1 ]
4e- 1
-2
Recall that if ¢(t) is a transition matrix then
(i)
0(0) =I
(ii)
O(t) = Ao(r)
If M(t) is a transition matrix Aflt) = ~]
' , find the
et;s
3
[
I
+2
-21
ole e ct3et - e-2r
a 2ei a4e'
-,
~e
-c l
+ e-2t J
and the corresponding system matrix A.
functions Determ ine diagon al form state models for systems having transfe r
9.
GI (
3s- 1 s) = -,s2'+---:3,--s_+_2
Gz(s)
=
s 2 - 3s+ 2 2 3 2 s + s+
10. If the transfe r functio n for a certain system is s+4 G(s)
= (s + l)(s + 1 + j)(s +I- j)
system where find the real parame ters a 1, a2 , a 3 , c1 , c2 , c3 in the state model for this
D=O
that the state goes to 11. Use the eigenvectors of A to find B (other than the null vector) so the initial state is and the origin with time when the input is a unit impulse, u( t) = c5( t) null. It is known that one of the eigenvalues of A is at + 1 and
, u(t) 12. Ifthe steady-state output is zero when the input is a unit impulse when b and b for 3 values 2 (withou t using Laplac e transfo rms) the
-1
4/3] 8/3
0
3
-3/2
c = [1 C.2
1]
=
c5(t), find
D=O
Problems Relating to Chapter 2
a system matrix, A certain plant is known to have a control ler form state model with for the plant is A, which has eigenvalues at {-1, 1,2,3}. Furthe r, this state model steady state plant's known to have direct feedthrough matrix, D, which is zero. If the x(O) = 0, and 1 = output is y( oo) = 5 when the plant input and initial state are u( t) find the control ler form state model for the plant. If the state model for 2. Suppose we are given the transfe r functio n G(s) for some plant. in each case, so that xi(O), state, the plant is in control ler form, determine the initial
1.
286
Appendix C: Problems
the correspondin g output, y;(t), is as specified. The input is zero.
(s+4)(s+5 )
G (s) = . .,.s-+-'-1-) .( . .,.s-'. (---!--'-2..,...). .,.s-'---~--3...,-) .(
3.
Given that .\[A]= {I, 2, -3} determine left-eigenvectors of A, w;, assuming the first entry in each left-eigenvector is one. Use your result to find a and (3 in B so that x( oo) is null when u(t) = 8(t) and x(O) = 0
A= [ 07 0l 0]1 -6
4.
0 0
Suppose there is a set of three state models each having the same A matrix but different B and C matrices as given. Determine which models if any can be transf2rmed to controller form. Do this without using Laplace transforms. case(i)
A=[; ~] 5.
6.
~1]
c1 = [1
1J
1]
case(ii)
B2 = [
~]
c2 =
case(iii)
B3 = [
~]
C3 = [ -4
[2
3]
Specifyfore achstatemod el,{(A,B;,C ;): i= 1,2,3},given intheprevio usproblem: (i) the controllable eigenvalues, (ii) the uncontrollable eigenvalues. In addition. specify which of these three state models is stabilizable. Given the state models
CI=[1
7.
B! = [
0 0
l]
find, without using Laplace transforms, a coordinate transformati on matrix T in each case so that the state models in the new coordinates are each in controller form. Specify T and the controller form state model, C4, B, C) in each case. Use your knowledge of the controllable decomposed form and the eigenvalues of lower triangular matrices to rapidly determine the polynomials PI (s)
= det[s/- A]
P2(s)
= Cadj[s/-
A]B
Pro'bfiiiiilflfiilatlng 16 Cftapter 3 if the state model paramet ers are 0
7
-6
0
0
0
0
0
0
0
0
0
0
0
-2
-3
-2
0
A=
5
3
4
-4 6
8.
0
0
D=O
2
-1
C= [3
0
B=
zeros, i.e., Determi ne the transfer function which is free from coincide nt poles and whose numera tor and denomi nator are coprime . = 5 for all Determi ne B so that the steady state output is y(oo) = 10 when u(t) positive t and
+2 A=
r+1
0 0]
C=[1
-2
C.3 1.
Problems Relating to Chapter 3
Den(s), of Find the numera tor polynom ial, Num(s), and denomi nator polynom ial, model state g follmvin the to nding the transfer function G(s) correspo
-5 A=
0
0
0
-10
0
-10
0
0
-4
0
0
0
0
OJ
C= [1
0
0
B=
4
0
D= 1
where
G(s) = Num(s) Den(s) matrix but Suppose there is a set of three state models each having the same A can be any if models which ne Determi given. as matrices C differen t B and
288
Appendix c:
Problems
transformed to observer form. Do this without using Laplace transforms.
A=[: ~]
case(i)
Bl=
case(ii)
B2
case(iii) 3.
4.
=
[-;1]
c1
[!]
c2 =
B3 = [
~]
c3
=[I [2
1] 1j
= [ -4 3]
Specify for each state model, {(A, B;, C;) : i = 1, 2, 3}, given in the previous problem: (i) the observable eigenvalues, (ii) the unobservable eigenvalues. Specify which of these state models allow the design of an observer to estimate their state . Suppose a plant state model is in controller form and is 3 dimensional with A having eigenvalues at 1,2,-3. If the C matrix in this model is partially specified as
-2 q]
C =[I
determine values for q which would make it impossible to design an observer which could be used to obtain an asymptotic estimate of the plant state.
C.4 1. 2.
Problems Relating to Chapter 4
If every entry in a square matrix is either 1/2 or -1/2 determine the size of the matrix and the sign pattern of its entries if the matrix is orthogonal. Find real numbers a, b, c 1 , c2 , and c3 such that M is orthogonal where a
= [a
M
a 3.
4.
b 0 -b
c1 ] c2
c3
M 1 and M 2 are square matrices having eigenvalue- right eigenvector pairs as follows:
forM 1:
{0,1}
and
0,2(.[2-1 (}
for M 2 :
{0, 1}
and
{[1,2]T.[2
1]T}
respectively. Is either of these matrices symmetric? If so which one. Justify your answer. For each matrix, specify which of the following properties holds: positive definite, non-negative, indefinite, i.e., not positive definite. not nonnegative. not negative definite. (Hint: use the distinguishing properties of the eigenvalues of each type of matrix) l'vfl =
[ 1 -2] [] 0 0] -2
0 0
5
2 0
0 3
M2 =
[~
~] [01 00 02] 2
0
I
. Jl --~~
5.
Which of the following matrices could be either a controllability or an Gramia n. Give reasons for your answer in each case.
[1-2]
MI=[l 2] 2
observability
2
-1
-1
The observability Gramia n for a system is determined to be
6
w
= [
2 -4]
-4
0
8
the input, Is there an initial state vector, x(O) other than the null vector, which when justify. If If"no" zero? always is which y(t), u(i), is always zero, produces an output, has this which vector, null the than other "yes", give an example, i.e., give an x(O), property. ed such that 7. If, in the previous problem, the initial state vector is restrict e for the possibl value largest the find zero), xT(O)x(O) = 1, (and u(t) is always ion. restrict this under y(t) signal output the integral from 0 to oo of the square of value. this e produc would which Specify x(O) (subject to the restriction) te the observability 8. Determine, in each case, if the pairs (A, C) are observable. Calcula n in each case. equatio ov Lyapun riate Gramia n manually by solving the approp definite. Relate positive is n Gramia onding Determine, in each case, if the corresp bility in each observa the on s finding your to your findings on the positive definiteness case
9.
case(i):
A=[-10 -22]
C =[I
I]
case(ii):
A=[-10 -22]
C= [0
1]
that the r;s are Determine the observability Gramia n for the given system assuming real.
c=
[0
0
1]
D=O
r;s make the What values of the r;s make the Gramia n singular? What values of the . explain so if related? system unobservable? Are these values
Appendix C: Problems
290
10. A certain plant has state model matrices (A, B) and observability Gramian W 0 given as
w
0
=
[31 21]
Given that D = 0 and recalling that the integral defining W o does not exist when A is unstable, find the transfer function of the plant using the Lyapunov equation relating A, C, W 0 to find a and C. 11. Suppose that a certain system is known to have maximum output energy equal to 2 0. Suppose the for all possible initial states satisfying x~(O) + x~ (0) = I, \vhen u(t) this system that suppose addition In ~]. [~, = 0) ( xT is this achieves initial state that satisfies also which state has minimum output energy equal to I for some initial xt(O) + x~(O) = 1 when u(t) = 0. Find the system's observability Gramian and the initial state that gives this minimum output energy.
=
C.5 I.
Problems Relating to Chapter 5
An observer based controller (Fig. 5.1) generates a feedback signal,f(t), from
f(t)
=
Hz(t)
i(0 =Fz(0 +G 1v(0+G2y(0 where
2.
If the plant output equals the first component of the plant state \ector, find: (i) the closed loop transfer function from v(t) to y(t), (ii) the characteristic polynomial for the observer. If in the previous problem the plant state model is in controller form and the plant output is the sum of the first three components of the plant state, determine the closed loop transfer function from v to y for the observer based feedback control system where 4
3.
0
-4
0
7
-13
0
13
If in the observer based feedback control system shown in the Figure 5.1 we are given the transfer functions from v(t) to y(t), Gvy(s), and from y(t) to f(t), Gyr(s), where
f(t) is the feedb ack signal, deter mine the contr oller when GV\(s) . ·
1
~-= -3~~-2 + 2s + 1
s
+ 3s
state mode l matri ces (Q, R, S, T)
-2 ' 3s-? + 2 s + 3 Gyr(s · ) = s·,
with plant mode l param eters given as
and contr oller equa tions
i(t) = Qz(t)
+ Rv(t) + Sy(t)
f(t) = T::(t)
Appe ndix D: MATL AB Exper iment s
0.1
State Models and State Response
The intention of this lab is to introduce some of the ways MATLAB can be used in connection with state models and to provide further experience in thinking in terms of the state space.
D.1.1
Controller form
Given the transfer function model for some system, the command
[a, b, c, d]
= tf2ss(num. den)
can be invoked to find an equivalent state model, (use the help facility), where num and den are entered as row vectors containing coefficients of the numerator and denominator of the transfer function. Try the following examples 1
Gl (s) = s2 G2 (s ) =
+ 3s + 2
s-7
+ 2s +-i
---co-----
3s2
+ 2s + 1
Check your result by using the command "ss2tf', (use the help facility), to convert back to the transfer function models.
D.1.2
Second order linear behavior
Recall that the state at any time is represented by a point in ann-dimension al space and the path traced out by this point is referred to as a state trajectory. Unlike cases where the system order is greater that 2 , we can readily display the trajectory for a second order system as a graph with the two components of the state forming the axes of the graph.
~~-"'-""'""
294
~·- '-_
...,.,-.
Appendix D: MATLAB Experiments
Consider the system whose behavior is governed by the following second order linear differential equation
where
Then the controller state model is
A
= [ - 2~wn
-;~ ]
C= [0 w~]
B
= [ ~]
D=O
Now we are going to investigate the zero-input state response by obtaining the state trajectories for one value of natural frequency, say wn = 1 and different values of the damping ratio, say
( = 0.3, I, 10,-0.3 each for some initial state, say xT (0) = [2 0] One way to do this is to invoke the command, (use the help facility), initial(A, B, C, D, xO)
Then from the resulting graph of the output vs. time that is obtained on the screen, you can decide over what interval of time you will need the state. Suppose you decide you need to know the state in the time interval [0. 5] seconds every 0.5 seconds. We can create a vector, t, of these times by incorporating this data in a vector as start:increment: end. This is done here by typing t =
0: 0.5: 5
and
[y, x, t]
=
initial(A, B. C, D, xO)
This produces a column y, followed by two columns. one for each component of the state. The entries in these columns give the values of the output, and components of the state at 0.5 s intervals from 0 to 5 s. Now you can obtain the graph of the state trajectory by entering
plot(xi:.l),x(:. 2)) where x(:, i) is all rows in the ith column of x. Your graph can be labelled using the
295
same line procedu re (on line help) where you enter each line (there are four) on the separate d by commas . Explain why these plots are markedl y different for different signs on(.
D.1.3
Secon d order nonlin ear behav ior
nonlinea r Consider the system whose behavio r is governe d by the second order , equation Pol der van a as to differential equation , referred /
2
l(t)- (1 -/(t))y (ll(t)
+ y(t) = 0
manner Then if \Ve assign compon ets of the state to derivates of the output in the same of the ents compon the of r behavio the case, linear the in form er as done to get the controll equation s state are seen to be governe d by the following first order nonline ar differential
x1 (t) = (1- x~(t))x 1 (t)- x 2 (t) x2(t) = x 1 (t) ned using Now the state trajecto ry obtained for a specific initial state can be determi and type editor an open file this create MATLA B by creating an m-file called vdpol.m. To
functionyp yp
= vdpol(t, q); = [(1- q(2) * q(2)) * q(l)- q(2); q(l)];
solvers, say Save the file and invoke one of the ordinary (vector) differential equatio n ODE23
[t, q] = ode23('vdpol', [tO,({], qO) as a column where tO is the start time, if is the finish time and qO is the initial state, entered vector by typing
of q. The sample values of the compon ents of the state are returned as the columns states initial the of each for state the getting try Use tO= 0, if= 25 and
x(O)
=
[0.2] 0
and
[~]
Obtain a graph of the state trajecto ry in each case by typing
plot(q(:, I). q(:. 2)) on as Notice that q( :, 1) is all the elements in the first column of q produce d by the simulati state. the of ent compon first the values of the
296
Appendix D: MATLAB Experiments
In the second case where xT (0) = [2 0] it is instructive to concentrate on the latter part of the trajectory, say from time step 40 to the end of the simulation. To find out what this end valt:e is type
size(q) Then if this end value is 200 type
plot(q(40: 200, l),q(40: 200,2)) to obtain the trajectory from time 40 to time 200. Generalize the nature of the trajectories in terms of their dependency on the initial state. Compare the state trajectories you obtain for the present nonlinear system with those you obtained for the linear system in the previous section.
D.1.4
Diagonal form
So far we have only considered the controller form state model. There are several other important canonical forms for the state model of a linear dynamic system. One of these is the diagonal or normal form. This form is characterized by having its system matrix A which is diagonal. This simplifies solving the state differential equation since the derivative of each component of the state is dependent on itself only. Recall that if [A, B, C, D] is a state model for a given system so is [Q- 1AQ, Q- 1B, CQ, D] for any nonsingular matrix Q of appropriate size. where Q is a coordinate transformation matrix. Also recall that if the eigenvalues of A are distinct, we can change coordinates so that A in the new coordinates is diagonal. This is done by letting Q have columns equal to the eigenvectors of A. We are going to use these facts. Use MATLAB to determine the parameters, (A. B, C, D), of the controller form state model for the system having transfer function
G(s)=
2
s -s+20 s 4 + 5s 3 + 5s 2 - Ss - 6
Use the command ·'roots" to decide if all the roots of the denominator are poles of G(s). Calculate the eigenvalues and eigenvectors of A by typing
[Q, E]
=
eig(A)
and the characteristic polynomial of A by typing
poly( A) How do the poles of G(s) compare with the eigenvalues of A, i.e .. diagonal entries in E? Should each of these sets be the same and if not why not? Use Q to transform the controller form state model to a diagonal form state model.
..j. ) ~·/'
Feed back and Cont rolla bility
297
This can be done by typin g
*A *Q inv(Q ) * B
aa = inv(Q )
bb =
cc = CA
*Q
dd= D
the poles of G(s)? How do the diago nal entries of aa comp are with mine the residues, poles and any deter to due" "resi Finally, inYoke the comm and r). This is done by typin g const ant term D (nonz ero only if G(s) is prope [res,poles, d]
= residue(num, den)
s in bb and cc? How do the residues of G(s) relate to the entrie
0.2
Feedback and Controllability
with the tasks described in what follows, In order for you to proce ed as rapid ly as possible us matrices you will be enter ing in the you shou ld plan a subsc riptin g scheme for the vario computer.
D.2.1
Controllable state mod els
Enter the state mode l 5
9
-6
3
0
-3 0
3 2
0
0
0
0
4
a44
0
b2 b3 b4
0
0
5
7
-6
hs
2 0
A=
c=
[1
B=
D=O
1]
s with the following assignment to the variable entrie
bi = 1 : i = 2, 3, 4, 5
and
function using the comm and "ss2z p". Obta in the poles and the zeros of the trans fer that part of the state space is superfluous Are there any pole-zero cancellations indicating to the input -outp ut beha vior? comm and "ctrb " and check its rank Next obtai n the contr ollab ility matri x using the using the comm and "rank ". of A. Then find the state feedback gain Using the comm and "eig" find the eigenvalues s to -1. Try doing this with both the matrix K which shifts the unsta ble eigenvalue Check using the comm and "eig" to see comm and '"place'' and the comm and "ack er". m matrix A + BK are those you specified. that the eigem alues of the state feedback syste
298
Appendi x D: MA TLAB Experim ents
Obtain the poles and zeros of the state feedback system using the comman d "ss2zp". Are there any pole-zero cancellations? What effect does the state feedback have on the transfer function zeros? Do other experiments if need be so that you can give a general reasons for your answers to the foregoing questions. Obtain the feedback matrix which produces a closed loop transfer function which has no finite zeros (they are all cancelled) and poles which are all in the open left half-plane. Does the rank of the controllability matrix change. Explain your answer by using eigenvectors to identify uncontro llable eigenvalues.
D.2.2
Uncontrollable state model s
In this section we are going to examine the use of state feedback when the given state model for the plant is not controllable. One way to obtain an uncontro llable system to enable this study, is to form the input matrix B so that it is linearly dependen t on a subset of the eigenvectors of A. We do this as follows. Invoke "eig" to get the eigenvectors of A. These will be displayed in a square matrix you specify in the argumen t for "eig". Suppose this matrix is V and Dis used as the diagonal .matrix displaying the eigenvalues. Create a new input matrix which we call Bl by combining a subset of the columns of V. i.e., some of the eigenvectors of A. Suppose we do this by combinin g all the eigenvectors correspo nding to the unstable eigenvalues of A with all the weights used to combine these eigenvectors equal to 1. This can be done using the MATLA B subscripting rules (note the use of:). Obtain the controllability matrix ("'ctrb") for (A, B1) as well as the rank of this controllability matrix. Obtain the transfer function for the state model (A, Bl, C, D) and comment , with an explanation, on any pole-zero cancellations. What is the order of the system indicated by the transfer function and does the transfer function indicate that this system is stable? To gain more insight into the nature of uncontro llable state models. invoke "ctrbf' to transform coordina tes so that the state model is in controlla ble decompo sed form, (Section 2.5). In this case we see that the block matrix consisting of the last two rows and columns of A and the last two elements of Bin these coordina tes has special significance. If(Aban Bhar) are the system and input matrices in the controlla ble decompo sed form then we can extract the subsystem correspo nding to these rows and columns by typing AC = AhaA4: 5,4: 5) BC = Bhar(4: 5, 1) CC = Cbm·(1,4: 5)
Then calculate the transfer function using the command ·'ss2zp" for the system (AC, BC, CC) and compare it with the transfer function you obtained earlier for the system in the original coordinates. Explain what you see. Next can you find a state feedback matrix Kin these coordina tes so that the resulting system is internally stable? Repeat the foregoing by making up a new B matrix from a linear combina tion of the eigenvectors correspo nding to the stable eigenvalues of A. Notice that the new AC matrix will be a 3 x 3.
Obse rver Based Control Systems
299
Controllability and Repeated Eigenvalues
s are uncontrollable for any Recall that we showed in Appendix A that single-input system ector associated with eigenv one than input matrix B when the system matrix A has more s. follow as d procee we fact any repeated eigenvalue. To investigate this A. Then use typing by A recall can We lab. this of Assume A is as given at the beginning eigenvectors of A. Are the the comm and "eig" to determine the eigenvalues and typing eigenvalues distinct? Next change the 4,4 element in A by A(4,4 ) = A(4,4 )
+3
matrix. Are the eigenvalues Find the eigenvectors and eigenvalues of the new A input matrix B so that the an ruct Const ? distinct? Is there a complete set of eigenvectors new (A, B) pair is controllable. Explain.
0.3
Observer Based Control Systems
the plant state from measureRecall that.a n observer is used to provide an estimate of will examine the design and ments of the plant' s input and outpu t. In this lab 'YOU estimate of the plant state in behavior of observers and the effect of using an observer's l system. place of the actual plant state in a state feedback contro the tasks described in what In order for you to proceed as rapidly as possible with e you will use in connection follows, read the lab throug h and plan the subscripting schem computer. This is especially with the various matrices you will need to enter in the you will need to make a block impor tant in connection with the second section where t numb ered for use with the diagram of the contro l system with each input and outpu commands "blkb uild" and "conn ect". Observer Estimates of the Plant State
[To Be Done Prior to Using Computer] Suppose you are given the unstable second order plant
for the plant and with a 1 = 0 and a2 = -1. Write the observer form state model observer (Section 3.3)
design an
i(t) = Fz(t) + c[u(t )] y(t) where F=A +LC
G= [B+L D
-L]
with F having eigenvalues at -1, -2. TLAB that the observer state Now you will attem pt to verify experimentally using MA alues of the observer and eigenv and plant state appro ach each other with time. Use the
300
Appendi x D: MATLAB Experime nts
plant state model to determine a suitable length of time over which to let the simulatio n operate. [To Be Done Using Compute r] Begin by entering the observer form plant state model matrices: A. B, C, D. Then use the comman d "acker" or "place" to determine the observer matrix L so that the observer eigenvalues are at -1 ,-2. This is done by typing
where
pis a column vector of the desired observer eigenvalue locations. Construc t F and G and check the eigenvalues ofF using the comman d "eig". Now we are going to check
this observer's ability to track the compone nts of the state of the plant by generating both the plant and observer states when the plant input is a unit step. Invoke the comman d "step" to obtain the plant output, y and state x. Try using a time interval of ten seconds in steps of 0.1 s. In order to do this you will need to create a row vector t having elements equal to the computa tion times. This can be done by typing t=O:O. l: 10
You will need t in the last section of this lab. Next use the comman d "1sim" to obtain the state of the observer when the plant input is a step andy is the plant output in response to a step. This can be done by typing [yl,zl]
= !sim(F,G ,CI>DB, UB,t)
where UB = [uu,y]
DB=[O;O]
and uu is a column vector of 1's of the same length as y withy being a column vector of samples of the plant output you just compute d. The input sequence. uu. could be generated by typing uu
=
ones(IOL 1)
Once you have z l, the state of the observer, (a matrix having two columns of samples of the compone nts of the observer's state) you can compare the observer state, zl. just obtained , with the plant state x by generating the error err=(z l-x)
However recall that since the plant is in observer form, the plant output is the first compone nt of the plant state. Therefore we need only compare the second compone nts of the plant and observer states in order to characterize the performa nce of the observer as a state estimator . In addition in attemptin g to commen t on this performa nce, you might find it helpful to examine the relative error, i.e., z1 (:. 2)- x(:, 2)/x(:, 2)
j
Obser ver Based Contro l System s
301
type For instanc e if we want to compu te this for time 10 we would [zl(lO l, 2)- x(IOI, 2)]/x(I OI, 2) the plant output is null. Now the initial state of the plant in the foregoing genera tion of plant. Theref ore to test the However in practic e we do not know the initial state of the state of the plant and observer's ability to estimate the plant state when the initial state was xT(O) = [1, 1]. observer are not equal, suppos e you though t the initial plant ption, use the comm and Then setting the initial state of the observ er equal to your assum "lsim" with the observer, i.e., type zO
= [1, 1]
[y2, z2] = lsim(F , G, C, DB, UB, t, zO) tion time and obtain a Next obtain the history of the estima tion error over the simula n by typing divisio t elemen by t elemen plot of this history. This can be done using rele
= (z2- x).jx
ts in the first row of the Notice that since the actual initial plant state is null. the elemen (not a numbe r) or oo as its matrix xs are zero, so that the first listing in "rele" has NaN state, e.g., set the initial first entry. Try other guesses for the "unkn own" initial plant ng relative error in the observer state to zO = [100, 100] and obtain a plot of the resulti estimate of the plant state.
D.3.1
Obse rver base d cont rolle rs
[To Be Done Prior to Using Compu ter] section to implem ent a Suppose you want to use the observer studied in the previous study the interac tion which state feedback contro ller. In this section you will begin to connec ted via a feedback takes place between the plant and the observ er when they are matrix K in a closed loop configuration. were used the closed loop Choos e the feedback matrix K so that if exact state feedback model in observer form system would have eigenvalues at -3, -4. Do this for the plant state which you used in previo us sections. the feedback system, i.e., Next referring to Section 5.2, obtain the system equati ons for q for the closed loop system let the plant input u be given as u = Kz + v. The state vector has four entries, viz.,
state for the observer you where xis the state for the plant (in observer form) and:: is the designed in the previous section. [To Be Done Using Compu ter] the plant state model Use the comm and "acker " to find the feedback matri:-; K so that the observer based denote Then -4. -3, (in observer form) has its eigenvalues shifted to
302
Appendix D: MA TLAB Experiments
controller state model as
where F,G, were determined in the previous section and K was just determined. Now you are going to use the commands "blkbuild" and .. connect" to form the observer based feedback control system by interconnecting the various subsystems involved. This is done in two steps. First enter each subsystem, either as transfer functions, (nidi) or as state models (ai. bi, ci, di). In each case i should identify a different subsystem and should be the integers starting with one. In the present case there are three subsystems: the input-controller (i = 1), the plant (i = 2) and the observer-controller (i = 3). The input-controller is trivial and is done by entering its transfer function as nl = 1 and dl = 1. Then the plant and observer-controller can be entered in terms of their state models as [a2,b2,c2,d2] and [a3,b3,c3,d3] respectively. Once you have entered all the subsystems, type nblocks = 3 blkbuild
A message appears "state model [a. b, c, d] of the block diagram has 4 inputs and 3 outputs". You are now ready to proceed to the second step which involves specifying how to interconnect the subsystems you have just identified. This is done through the use of a connection matrix, Q. The connection matrix, Q, specifies how the subsystems inputs and outputs are to be connected to form the observer based control system. Notice that the outputs r 1, y2, and y3 are the outputs from the input-controller. the plant and the observer-controller respectively. The inputs ul, u2, u3 and u4 are the input to the input-controller, the plant and the two inputs to the observer. It is important to keep the ordering of the inputs to the observer consistent with the ordering used in the previous section in forming the state differential equation for the observer. Draw a block diagram showing how all inputs and outputs relate to one another. The connection matrix, Q, has rows corresponding to subsystem inputs with the integer in the first position of each row identifying the subsystem input. Subsequent entries in a given row are signed integers which identify how the subsystem outputs are to be combined to make up the subsystem input. Zero entries are used when a subsystem output does not connect to a subsystem input. The sign associated with each integer entry in Q indicates the sign on the corresponding output in the linear combination of subsystem outputs making up a given input. Since there are three inputs which depend on the subsystem outputs, Q will have three rows. Using your block diagram, enter the matrix Q. Once Q is entered, the inputs and outputs of the feedback control system must be declared by typing inputs= ·1 outputs = [2]
rol er, i = 1, is the obse rver base d feed back cont where here the inpu t to the inpu t-con troll rol cont t, i = 2, is the outp ut from the feedback system inpu t and the outp ut from the plan system. ectio n info rmat ion in the Q matr ix to form At this stage you are read y to use the conn m m from the mult i-inp ut mult i-ou tput syste the observer base d feedback cont rol syste the i.e., de], cc, be, [ac, m The conn ected syste [a, b, c, d) you form ed using "blk buil d". obta ined by typing is m, syste rol cont observer based feedback
ts, outputs) [ac, be, cc, de] = eonneet(a, b, c, d, Q, inpu obta ined in the penc il-an d-pa per work you Check your result with the state mod el you did before start ing this com putin g session. model. calculate the poles and zeros of the Once you have the corr ect closed-loop state side m by using ·'ss2 zp'' (don 't use k on the left transfer func tion for the closed-loop syste s matrix). Are there any com mon pole and if you have alrea dy used it for the feedback of trans fer function with the trans fer function zeros indicated? If so, why? Com pare this uss Disc state feedback (wit hout the observer). the closed loop system assuming exact ms. syste rol cont d base rYer obse of theo ry your obse rvati ons by relating them to the el by mod state loop d close the of ility rvab Finally, check the cont rolla bilit y and obse and com putin g rank s by using "ran k". using the com man ds"c trb" and "obs v"
0.3 .2
avi or Ob ser ver bas ed con tro l system beh
(To Be Don e Prio r To Using Com pute r] for on, and assuming the state s are available For the plan t intro duce d in the first secti state with m syste inpu t for the closed loop feedback, calcu late the outp ut for a step l has poles at -3, -4. Do this for the initia m syste feedback such that the closed loop or asef achc tine earo ugh sket chof theo utpu conditionxO = [O,O]andxO = [10, lO]. Mak using MAT LAB . in com paris on with the results you will obta [To Be Don e Usin g Com pute r] d ut of the state mod el of the obse rver base Using "lsim " obta in the state and outp d" buil "blk g usin prev ious section as a resu lt of cont rol system that you obta ined in the ofO. l Do this over a ten second inter val in steps followed by '·con nect ", i.e., [ac, be, ec, de]. of part first the uu, which you created for use in s (use the t vect or and step inpu t vector, when 10] 0, [1 the plan t state is x(O) = [0, 0] and this lab). Obta in a plot of the outp ut when the observer state is zO = [0, OJ in each case.
0.4
State Mo del Reduction
estimation we saw that cont rolla bilit y and In previous labs on state feedback and state n to (i) assign feedback system poles (ii) assig observability play a key role in being able the tion model of a system has orde r less than observer poles. Recall that the trans fer func ntro lstate model is unobservable and/ or unco dimension of the state model when the ost" vior of a given state model which is ''alm lable. Ther efor e the inpu t-ou tput beha state a ld be able to be appr oxim ated using unco ntro llabl e and; or unobservable shou dimension of the given state model. This model whose dime nsio n is less than the to do in Cha pter 4. In this lab we are going possibility was intro duce d theoretically
some simu lation studies to furth er investigate the effectiveness of this model order reduc tion technique.
D.4.1
Dec omp osit ion of unc ont roll able and /or uno bse rvab le systems
Recall that we can always trans form the coord inate s so that a given state model that is not contr ollab le is trans form ed to contr ollab le deco mpos ed form Ac= [ Acl Ac3
cc =
[eel
0]
Ac4
Be=
[:J
c,2J
where (Ac2, Bc2 ) is contr ollab le (done using "ctrb f"). Alternatively if the given model is unobservable we can chan ge coord inate s so the state mode l becomes
where (A 04 , C02 ) is obser vable (done using "obsv f"') Ther efore when a given state mode l is both unco ntrol lable and unob serva ble we can use the foregoing deco mpos itions to obtai n a state mode l which has a state space which is divided into four subspaces. In the following list of these subspaces C, C indicates contr ollab le and unco ntrol lable , respectively with a similar notat ion for observable and unobservable. Thus the state space splits up into 1 a subsp ace CO of dimension n 1 2 a subspace CO of dimension n2 3 a subsp ace CO of dimension n 3 4 a subsp ace CO of dimension n4 Notice that if the dime nsion of the given state model is n then
An example demo nstra ting the use of MA TLA B to do this deco mpos ition can be carrie d out as follows. Ente r the system state mode l matrices
[ AI " Cl= [O
I :
5
7
-2
0
0
-3
0
0 0
!.] 1l
Iii
[J'
Dl = 0
r
State Model Reduction
305
and determine the corresponding transfer function by entering [zl,pl,kl] = ss2zp(Al,Bl, Cl,Dl)
f_
What is the order of the system? What can be said about the controllability and observability of the state model? We can use the eigenvector tests for controllability and observability to answer this question by interpreting the result of making the following entries [Vl,DRIJ = eig(AI) Cl *VI
and [WI,DLl] = eig(AI') Bl' *WI
As a further check on your results, obtain the rank of the controllability and observability matrices using the commands "'ctrb". "obsY" and '·rank". Use your results to specify basis vectors for each subspace in the decomposition of the state space.
0.4.2
Weak controllabi lity and/or observabil ity
Enter the following system state model matrices
A2~
-1
5
7
:
-2 0 0
0 -3 0
[
I]
.01
C2= [ 0
D2 = 0
and repeat the preyious section for this state model. Contrast the results you obtain now with those you obtained in the previous section. Next obtain the controllability and observability Gramians, (f·Vc, W 0 ), for the system you just entered. Do this by typing
QO = C2'
* C2
QC
= B2*B2'
WO
= lyap(A2'. QO)
we= lyap(A2, QC) (Use "'help" for information on the command '·lyap".l Obtain the eigenvalues of the product of the Gramians. Record these values for future reference. Next use the command "balreal" to obtain a balanced realization by typing [A2b, B2b, C2b,g2, t2]
= balreal(A2, B2, C2)
306
Appendix D: MATLAB Experiments
Determine the eigenvalues of the product of the Gramians you just entered and compare them with the entries in g2. Comment on any correspondences. Next obtain a reduced order model by discarding parts of the balanced realization correspondin g to elements of g2 that are relatively small. For example suppose g2(3) < < g2(2). Then since the elements of g2 are arranged in descending size we can obtain a reduced order model, (A2r, B2r, C2r) by typing A2r
= A2b(l : 2, I : 2)
B2r = B2b(l : 2) C2r = C2b(l : 2)
Use use the command "ss2zp" to determine the poles and zeros of the transfer function for the reduced order system. Is there any obvious relation between the original system transfer function and the reduced order system transfer function?
0.4.3
Energy interpret ation of the controlla bility and observab ility Gramian s
Recall, from Chapter 4, that the sum of the diagonal entries in the controllabili ty Gramian equals the energy transferred into the state over all positive time, from the input when the input is a unit impulse at time zero. We can check to see if this is the case here. Recall from Chapter 1 that the zero state response to a unit impulse is the same as the zero input response to an initial state x(O) =B. Therefore we can use "initial" with the initial state set to B. As before we need to decide on the time interval and sample times for doing this. Suppose we use an interval of 10 s with samples taken every 0.1 s. Then we create a vector of sample times by typing ts=O:O.l: 10 Notice that ts has 10 I elements. Therefore using the command "initial" with B2 in the position reserved for the initial state, we can obtain the resulting state by typing [Y2, X2, ts] = initial(A2, B2, C2, D2, ts)
where X2 has four columns with each column correspondin g to a different component of the state and each row correspondin g to a sample time. Recall that the energy transferred to the state is given by
where
State Model Reduct ion
307
fact we can is the energy transfe rred to the i1h compo nent of the state. Using this an approx imation , EAc, to Ec by enterin g
compu te
eei=X 2(1: 10l,i/* X2(1: lOl,i) with i = 1, 2, 3, 4 in succession and then enter 1
EAc
=
4
-L:ee i 10 i=l
by typing Compa re your result with the trace of the control lability Gramia n
ETc= trace(WC) output from an Recall, from Chapte r 4, that the energy, E 0 , which is transfe rred to the initial state can be determ ined using the observability Gramia n as
te E01 when the Now we can use the proced ure just described for compu ting Ec to compu Y2. Compa re your initial conditi on x(O) = BI by using the data stored previously in result with the result obtaine d by using the observability Gramia n (B2)'
D.4.4
* WO * B2
Design of reduced orde r models
ch to model order In this part of the lab you will examine the balance d realization approa filter. This analog orth reduction. The system to be reduced is a degree eight Butterw of degree inator denom a and system has a transfe r function with constan t numera tor origin. A the from e distanc eight. The poles are located in the open left half-plane at unit list of the poles can be obtaine d by enterin g
[zbw,pbw, kbw] = buttap(8) ing the We can check that the poles are equidis tant from the origin by examin elements of the matrix obtaine d by enterin g
diagon al
pbw * pbw' is obtaine d by first A balance d realiza tion (state model) for the Butterw orth filter to balance d form. it rming transfo then and calculating a control ler form state model Therefo re enter [A3, B3, C3, D3] = zp2ss(z bw,pbw , kbw) and [A3b, B3b, Cb3,g3 , t3]
= balreal(A3, B3, C3)
308
Appendix D: MA TLAB Experiments
Recall that the reduced order model is obtained by discarding the latter part of the state vector in balanced coordinates so that the corresponding discarded part of g3 is negligible in the sum of the elements in g3. Notice that there is a significant decrease in the size of the elements in g3 in going from the fifth to the sixth element. Therefore a reduced order model obtained by discarding the last three elements in the state should give a good approximation to the full order system. The state model for the reduced order approximation can therefore be obtained by entering A3b5 = A3b(l : 5.1 : 5) B3b5 = B3b(l : 5) C3b5
= C3b( 1 : 5)
Notice that this reduced order state model approximation is also balance. This can be seen by generating the controllability and observability Gramians by typing QObS
= C3b5' * C3b5
QCbS = B3b5
* B3b5'
Wob5
= lyap(A3b5'. QOb5i
WebS
= lyap(A3b5. QCbS)
The final part of this lab concerns the performance of the reduced order model. One possible test would be to compare the step responses of the reduced and full order models. [y3b, x3b] = step(A3b, B3b, C3b, D3, 1, ts) [y3b5, x3b5]
= step(A3b5, B3b5, C3b5, D3, I, rs)
Note any marked differences in the plots on the screen and proceed to compare the error between the reduced order model output and the full order model output. This can be done using element by element division, i.e., rete =(y3b5- y3b).jy3b plot( rs, rele)
Repeat the foregoing by deleting more than the last three elements of the state to obtain a reduced order model and use the step response to compare the performance of this approximation with the performance of the fifth order approximation just studied.
r·
References
[I] [2] [3] [4] [5] [6] [7] [8] [9] [10] [II] [12]
Anderson, B. D. 0. and Moore, J. R Optimal Control: Linear Quadratic Methods. PrenticeHall, Englewood Cliffs, New Jersey, 1990. Anderson, B. D. 0. and Liu, Y. "Controller reduction: Concepts and Approaches", IEEE Trans. Automatic Control, TAC-34, pp. 802-812, 1989. Bittanti, S., Laub, A. J. and Willems, J. C. (Eds.) The Riccati Equation. Springer-Verl ag, Berlin, 1991. Blackman, P. F. Introduction to State-variable Analysis. The Macmillan Press, London, 1977. Brockett, R. W. Finite Dimensional Linear Systems, John Wiley and Sons. New York, 1970. Brogan, W. L. Modern Control Theory. 3rded., Prentice-Hall , Englewood Cliffs, N.J., 1991. Brown, R. G. Introduction to Random Signal Analysis and Kalman Filtering. John Wiley and Sons, Chichester, 1983. Chandrasekha ran, P. C. Robust Control of Dynamic Systems. Academic Press, London, 1996. Chen, C. T. Introduction to Linear Systems Theor. Holt Rinhart and Winston, New York, 1970. Dorato, P., Abdallah, C. and Cerone, V. Linear Quadratic Control, An Introduction. Prentice-Hall , Englewood Cliffs, N.J., 1995. Doyle, J. C., Francis, B. A. and Tannenbaum, A. R. Feedback Control Theory. Maxwell Macmillan Canada, Toronto, 1992. Doyle, J. C., Glover, K., Khargonekar, P. P. and Francis, B. A. "State space solutions to standard H 2 and Rx: control problems", IEEE Trans. Automatic Control, AC-34, pp. 831-
847, 1989. Fairman, F. W., Danylchuk, G. J., Louie, J. and Zarowski, C. J. "A state-space approach to discrete-time spectral factorization" , IEEE Transactions on Circuits and Systems-ll Analog and Digital Signal Processing, CAS-39, pp. 161-170, 1992. [14] Francis, B. A. A Course in Hx Control Theory, Springer-Verl ag, Berlin, 1987. [15] Furuta, K., Sana, S. and Atherton, D. State Variable Methods in Automatic Control, John Wiley and Sons, Chichester, 1988. [16] Glover, K. and Doyle, J. C. "A state space approach to H"" optimal control", Lecture Notes in Control and Information Science, 135, pp. 179-218, 1989. [17] Golub, G. H. and Van Loan, C. F. Matrix Computations, 2nd ed., The Johns Hopkins University Press, Baltimore, Maryland, 1989. [18] Green, M. and Limebeer, D. J. N. Linear Robust Control. Prentice--Hall, Englewood Cliffs. New Jersey, 1995.
[13]
310
[19] [20] [21] [22]
[23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44]
References
Green, M., Glover, K., Lime beer, D. J. N. and Doyle, J. "A J spectral factorization approach to Hoc control", SIAM Journal on Control and Optimi::.ation, 28, pp. 1350-1371, 1990. Green, M. "Hx controller synthesis by J lossless coprime factorization", SIAM Journal on Control and Optimization, 30, pp. 522-547, 1992. Isidori, A. "Hx control via measurement feedback for affine nonlinear systems", Int. J. Robust and Nonlinear Control, 4, pp. 553-574, 1994. Jonckheere, E. A. and Silverman, L. M. '"A new set of imariants for linear systemsapplications to reduced order compensator design", IEEE Trans. Automatic Control, AC28, pp. 953-964, 1983. Kailath, T. Linear Systems, Prentice-Hall, Englewood Cliffs, l\. J .. 1980. Kimura, H. Chain-Scattering Approach to Hx Control, Birkhausser Boston, 1997. Kwakernaak, H. and Sivan, R. Linear Optimal Control Systems, Wiley Interscience, New York, N.Y .. 1972. LePage, W. R. Complex Variables and the Laplace Tran.sformj!Jr Engineers, Dover, 1980. Moore, B. C. "Principal component analysis in linear systems: controllability, observability, and model reduction". IEEE Trans. Automatic Control. AC-26. pp. 17-32, 1981. Missaghie, M. M. and Fairman, F. W. "Sensitivity reducing obsen ers for optimal feedback cont.!;_ol", IEEE Transactions on Automatic Control, AC-22, pp. 952-957, 1977. Mullis, C. T. and Roberts, R. A. "Synthesis of minimum roundoff noise in fixed point digital filters", IEEE Trans. Circuits and Systems. CAS-23. 551-562, 1976. Mustafa, D. and Glover, K. "Controller reduction by Hac balanced truncation". IEEE Trans. Automatic Control, AC-36, pp. 668-682, 1991. Pavel, L. and Fairman, F. W. "Robust stabilization of nonlinear plants-an L 2 approach", Int. J. Robust and Nonlinear Control, 6, pp. 691-726. 1996. Pavel, L. and Fairman, F. W. "Controller reduction for nonlinear plants-an L 2 approach", Int. J. Robust and Nonlinear Control, 7, pp. 475-505, 1997. Pavel, L. and Fairman, F. W. (1998). "Nonlinear H" control: a J-dissipatiYe approach", IEEE Trans. Automatic Control, AC-42, pp. 1636-1653, 1997. Pernebo, L. and Silverman, L. M. "Model reduction via balanced state space representation", IEEE Trans. Automatic Control, AC-27, pp. 382-387, 1982. Petersen, I. R. "Disturbance attenuation and Hex- optimization: a design method based on the algebraic Riccati equation", IEEE Trans, Automatic Control, AC-32, pp. 427-429, 1987. Rudin, W. Principles of Mathematical Analysis, 3rd ed., McGraw-Hill Book Company, New York, 1976. Rudin, W. Real and Complex Analysis, 3rd ed., McGraw-Hill Book Company, Ne\\ York, 1987. Scherpen, J. M. A. "Hx balancing for nonlinear systems'', Int. J. Rohust and Nonlinear Control, 6, pp. 645-668. 1996. Strang, G. Linear Algebra and irs Applications, 2nd ed., Academic Press, Ne\\ York, 1980. Sveinsson, J. R. and Fairman, F. W. "Simplifying basic Hx problems", Proc. Conference on Decision and Control, 33,2257-2258, 1994. Tsai, M. C. and Postlethwaite. I. ''On 1 lossless coprime factorization and Hx control", Int. J. Robust and Nonlinear Control, 1, pp. 47-68, 1991. van der Shaft, A. J. "L 2 gain analysis of nonlinear systems and nonlinear state feedback Hoc control", IEEE Trans. Automaric Control, AC-37, pp. 770-784. 1992. Varga, A. "A multishift Hessenbcrg method for pole assignment of single-input system,;", IEEE Trans. Automatic. Control, AC-41, pp. 1795-1799, 1996. Vidyasagar, M. Control System Synthesis: A Factori::.ation Approach, The MIT Press, Cambridge. Massachusetts, 1985.
r
Referen ces [45] [-+6] [47]
311
onal, EngelVidyasag ar, M. Nonlinear Systems Analysis, 2nd ed., Prentice -Hall Internati wood Cliffs, 1993. Cambrid ge, 1988. Young. N. An Introduction To Hilbert Space, Cambrid ge Universit y Press, Prentice -Hall, Control, Optimal and Zhou, K. with Doyle. J. C. and Glover, K. Robust Upper Saddle River, New Jersey, 1996.
Ind ex
Ackerm ann formul a 52, 64, 74 adjoint system 221 adjugate matrix 11, 18 algebraic Riccati equatio n (ARE) 115, 119, 1-!5, !66, 224, 246 GCAR E 153 GFAR E 157 HCAR E 236 HFAR E 244 QCAR E 126 QFAR E 142 system 221 pass all anticausal, antistab le systems 172 asymptotic state estimat ion 69 average power 147 balanced realization I04 Bezout identity 204, 209 causality constra int 31 causal system, signal 172 Cayle:- Hamilt on theorem 52 characteristic polyno mial 9 co inner functio n 22 I compan ion matrix 9 comput er determ ination of state 37, 66 contrac tion 162 controllability 34, 55 Gramia n 101, 112 matrix 5 L 57, 63 control lable decomp osed form 60, 93, 118 eigenvalue 4-t subspace 56
control ler form 47 Hoc-central, parame trized 255 LQG 157 quadra tic 120 convol ution integral 29 coordin ation transfo rmation 12, 28 coprim e factoriz ation 201, 204, doubly 212 J-inner 230 state models 206 covariance 147 decomp osition of a space 169, 178 detectable system 72 direct sum 169 disturb ance 115, 120, 138, 147, 154, 225, 232, 242,24 8 dom(R ic) 145 doubly coprime factoriz ation 212 dual system 72 eigenvalue 17, 96 assignment 43, 64, 74, 82, 86 controllable, observa ble 44, 72 invariance 20 eigenvector 1'7. 96 left-eigenvector 19 right-eigenvector 16 tests (controllability, observability) 43, 71 energy 94, 102. 110, 167 feedback 41 filtering 68
314
Index
filtering (contd.) H.00 242 LQG (Kalman) 90, 155, 166 quadratic 138 Fourier transform 173 Gaussian random vector 147 Gramian controllability 10 I, 112 observability 94, 109 Hamiltonian matrices 130, 158 Hx relation 262 Hankel norm Ill Hardy spaces H2, H.~ 177 H,X)) H.~ 183 Hermitian 111atrix 95 Hilbert space 167 induced norm 181 initial condition response (see zero-input response) inner function 221 inner product space 169 input-output response (see zero-state response) invariant subspace 133 inverse left matrix 259 right matrix 83 system 197 isomorphic, isomorphism 178, 229 Laplace transform 176 Lebesgue spaces time domain: ..CE(-x,oo), £")()(-x,x) 167, 174 frequency domain: £", Lx: 174 L 2 gain 181 linear combination 3, 18 lossless system 219 LQG control requirement for solution 165 state estimation !53 state feedback 149 Lyapunov equation in balanced realization l 07 Hex, control 234
LQG control 151, 155 quadratic control 123-129, 140 matrix Hermitian 95 nonnegative 96 positive definite 98 matrix exponential 9 matrix fraction description (see coprime factorization) matrix square root 160 measurement noise 138 minimal realization 34 reduction to 91 nonnegative matrix 96 norms 2-norm for vectors 94 H 2 signal norm 167 H 2 system norm 172, I 79 H 00 system norm 181, 191 Hankel norm 112 induced 2-norm for matrices 186 L2 induced system norm 181 L 2 time domain signal norm 95, 167 L 00 function norm 182 null space of a matrix 78 null vector. matrix 17. 36 observability 34, 76 Gramian 94, I 09 matrix 73 observable decomposed form 82, 94 eigenvalue 72 subspace 78 observer 70 form 72 minimal order 82 observer-based controllers 116 orthogonal 21 compliment 169, 178 matrix 98 spaces, signals 169 output feedback 149. 157. 254 output injection 90 Parsevars theorem 174 PBH (Popov-Belevich-Hautus) tests
Index (see eigenvector tests) performance index Gaussian 148, 153
H 00
224, 233, 242-252
quadratic 121, 139 phase plane 5 pole placement (see eigenvalue assignment) pole-zero cancellation 34 positive definite matrix 98 projector 161 proper 12 quadratic control 115 requirement for solution state estimation 13 7 state feedback 119
147
range of a matrix (operator) 57, 77, 163 rank of a matrix 51, 59, 76 rational function 12 realization balanced 104 minimal 34,35 Ric(H) 145 robustness (see stability) separation principle 118, 149, 157, 261 singular value decomposition 185, 274 small gain theorem 184, 191 spaces Hardy 179, 185 Hilbert 168, 173 Lebesgue 167 stability internal, external 25 reduced order model 279 robustness 26, 69, 203 stabilizable system 43 stabilizing controllers 213, 215
315
stabilizing solution 128, 135, 158, 227, 267 stable system 6, 109 state computation 37, 66 estimation 67, 153, 242, 251 feedback 41, 120, 151, 227 state model forms controllable decomposed 60 controller 48 diagonal (normal) 32 observable decomposed 78 observer 72 state trajectory 5, 21 strictly proper 12 symmetric matrix (see Hermitian) system factorization 201 system interconnections 193 system inverse 196 system zero 198 trace of a matrix 102, 150 transfer function 34 proper, strictly proper 12 transformatio n to controllable decomposed form 64 controller form 49 observable decomposed form ,81 observer form 73 transition matrix 9, 31 unitary matrix
98
weighting matrix 170 well posed feedback control 214 worst disturbance 234, 259 Y oula parametrization
217, 260
zero-input (initial condition) response
1, 25,
32
zero-state (input output) response
I, 32