."
!
t
I

THIRD EDITION
• Digital Control • of Dynamic Systems
Gene F. Franklin
Stanford University
J. David Powell
Stanford University
Michael L. Workman
IHM Corporation
!
~
......... ADDISONWESLEY An imprint of Addison Wesley Longman, Inc.
Menlo Park, California. Reading. :Massachusetts· Harlow, England Berkeley. California. Don :"1iIl5, Ontario. Sydney. Bonn. Amsterdam. Tok)'o • Mex.ico Ciry
~.:
Additional Addison Wesley Longman Control Engineering titles:
Feedback Contral oj Dynamic Systems. Third Edition. 0201527472 Gene F Franklin and 1. David Powell Modem Control Systems. Eighth Edition. 0201308649 Richard C. Dorf and Robert H. Bishop The An oj Control Engineering. 0201175452 Ken Dutton. Steve Thompson. and Bill Barraclough Introduction to Roborics. Second Edition. 0201095299 John J. Craig Fuz::.y Comral, 020ll8074X Kevin M. Passino and Stephen Yurkovich Adaptive Contral. Second Edition. 0201558661 Karl J. Astrom and Bjorn Wittenmark Colltrol Systems Engineering, Second Edition. 080535424 7 Nonnan S. Nise
. II. Workman.
World Student Series
Editorial Assistant, Royden Tonomura Senior Productioll Editor. Teri Hyde Art and Design Supen·;sor. Kevin Berry Manujacruring Supervisur, Janet ,"Veaver CapyedilOr, Steve Feinstein Proofreader. Holly McLeanAldis Cumpusitor. Eigentype Compositors COl'er Desi!!ll. 'l'Vo Riezebos JIIus/ratiuns. Scientific Illustrators. Bruce Saltzman
Copyright
© 1998. Addison Wesley Longman. Inc.
All rights reserved. ~o part of this publicatIOn may be reproduced. or stored in a database or retrieval system. or transmitted, in any form or by any means. electronic. mechanical. photocopying. recording. or otherwise. without the prior written permission of the publisher. Printed in the United States of America. Printed simultaneously in Canada. Many of the designations used by manufacturers and seHers to distinguish their products are claimed as trademarks. Where those designations appear in this book. and AddisonWesley was aware of a trademark claim. the designations have been printed in initial caps or in all caps. MATLAB is a registered trademark of The Math Works. Inc. 24 Prime Park Way. Natick. MA 017601520. Phone: (508) 6531415. Fax: (508) 6532997 Email: info@mathworks.com Cover Photo: Telegraph Colour Library/FPG International LLC.
Library of Congress CataloginginPublication Data
Franklin. Gene F. Digital control of dynamic systems / Gene F. Franklin. J. David Powell. Michael L. Workman. ~ 3rd ed. p. em. Includes index. ISBN (}201331535 I. Digital control systems. 2. Dynamics. 1. Po\\elJ. J. David. 1938Michael L. III. Title. TJ223.M53F73 1997 629.8'9  dc21
Computer Control oj Machines and Processes. 0201106450 John G. Bollinger and Neil A. Duffie Multivariable Feedback Design. 0201182432 Jan Maciejowski
9735994 CIP
Instructional Material Disclaimer:
The programs presented in this book have been included for their instructional value. They have been tested with care but are not guaranteed for any particular purpose. ~either the publisher or the authors offer any warranties or representations. nor do they accept any liabilities with respect to the programs.
ISBN 0201331535
I 2 3 4 5 6 7 8 9 1OMAD I 00 99 98 97 Addison Wesley Longman. Inc, 2725 Sand Hill Road Menlo Park. CA 94025
b
• Contents •
~_.._._.
__
.
.

.
.

Preface
xix
I
5
7
1
Introduction
1.1 Problem Defmition
1.2 OWrliew of Design Approach
13 ComputetAided Design
7
14 Suggestions for Further Reading 1.5 Summary 8
16 Problems
8
2
Review of Continuous Control
21 Dynamic Response 2.12 2.13 2.14 215
II
II
12 12
2.11 Differential Equations
Laplace Transforms and Transfer Functions Output Time Histories HThe Fmal Value Theorem 15 Block Diagrams IS 16 20
2. 1.6 Response versus Pole LocatlOns
2.1 7 TimeDomain Specifications 2.2 Basic Properties of Feedback 22
ix
_ •. .... ,b _
x
Contents
Contents xi
22.1 Stability 22 2.2.2 SteadyState Errors 2.2.3 PID Control 24 2.3 Root Locus 24
4.2.1 The zTransforrn 23
79
82
4.2.2 The Transfer Function 80 4.2.3 Block Diagrams and StateVariable Descnptions 4.2.4 Relation of Transfer Function to Pulse Response 4.2.5 External Stability 93 4.3 Discrete ~1odels of SampledData Systems 96
90
2.3.1 Problem Definition 25 2.3.2 Root Locus Drawing Rules 26 2.3.3 ComputerAided Loci 28 2.4 Frequency Response Design 31 2.4.1 Spectfications 32 2.42 Bode Plot Techniques 34 2.4.3 SteadyState Errors 35 2.4.4 Stability Margins 36 2.4.5 Bode's GainPhase Relationship 37 2.4.6 Design 38 2.5 Compensation 39 2.6 StateSpace Design 41 2.6.1 Control L,W 42 2.62 Estimator Design 46 2.6.3 Compensation: Combined Control and Estimation 2.6.4 Reference Input 48 2.6.5 Integral Control 49 2.7 Summary 50 2.8 Problems 52 48
4.3.1 Using the zTransforrn 96 4.32 *Continuous Time Delay 99 4.3.3 StateSpace Form 101 4.3.4 *StateSpace Models for Systems with Delay 110 4.3.5 *Numerical Considerations in Computmg ~ and r 4.3.6 *Nonlinear Models 117 4.4 Signal Analysis and Dynamic Response 119 4.4.1 The Cnit Pulse 120 4.4.2 The Cnit Step 120 4.4.3 Exponential 121 4.4.4 General Sinusoid 122 4.4.5 Correspondence with Continuous Signals 125 4.4.6 Step Response 128 4.5 Frequency Response 131 4.5.1 *The Discrete Fourier Transform (OFT) 46 Properties of the zTransform 137
114
134
3
Introductory Digital Control
3.1 3.2 3.3 3.4 35 Dlgitlzation 58 Effect of Sampling PID Control 66 Summary 68 Problems 69 63
57
4.6.1 Essential Properties 137 4.6.2 *Convergence of zTransform 142 4.6.3 * Another Deri\'ation of the Transfer Functton 4.7 Summary 4.8 Problems
148
146
149
5
73
SampledData Systems
5.2 5.3 5.4 55
155
156
5.1 Analysis of the Sample and Hold
4
Discrete Systems Analysis
4.1 Linear Difference Equations 73 4.2 The Discrete Transfer Function 78
Spectrum of a Sampled Signal 160 Data Extrapolation 164 BlockDiagram Analysis of SampledData Systems 170 Calculating the System Output Between Samples: The Ripple
180
b
......,
xii
Contents
Contents
xiii
5.6 Summary 5.7 Problems 5.8 Appendix
182 183 186
8.1.1 Pole Placement
282 286
6
Discrete Equivalents
187
189
8.1.2 Controllability 285 8.1.3 Pole Placement Usmg CACSD 289 8.2 Estimator Design 290 8.2.1 Prediction Estimators
6.1 Design of Discrete Equi\'alents na Numerical Integration 200 6.2 Zero~Pole Matchmg Equi\'alents 6.3 Hold Equivalents 202 6.3.1
Zero~Order
Hold Equivalent
203
6.3.2 A Non~Causal FirstOrderHold EqUIvalent: The TriangleHold Equivalent 204 6.4 Summary 208 6.5 Problems 209
82.2 Observability 293 294 8.2.3 Pole Placement Csing CACSD 295 8.2.4 C:urrent Estimators 8.2.5 Reduced~Order Estimators 299 8.3 Regulator DesIgn: Combined Control Law and Estlmator 8.31 The Separation Principle 302 8.3.2 Guidelines for Pole Placement 308 310 84 Introduction of the Reference Input 310 8.4.1 Reference Inputs for Full~State Feedback 8.4.2 Reference Inputs with Estimators: 314 The State~Command Structure 317 8.4.3 Output Enor Command 8.4.4 A Comparison of the Estimator Structure and Classical Methods 319 8.5 Integral Control and Disturbance Estimation 8.5.1 Integral Control by State Augmentation 8.5.2 DIsturbance Estlmation 337 8.6 Effect of Delays 8.6.1 Sensor Delays 338 341 8.6.2 Actuator Delays 8.7 'Controllability and Observability 8.8 Summary 35l 352 89 Problems 328
302
7
Design Using Transform Techniques
7.1 System Specifications 7.2 Design by EmulatlOn 212 214
211
7.2.1 Discrete Equivalent Controllers 218 7.2.2 Evaluation of the Design
215 222
322
323
7.3 Direct Design by Root Locus in the zPlane 7.3.1 zPlane Specifications 222 7.3.2 The Discrete Root Locus 7.4 Frequency Response Methods 7 41 Nyquist Stability Cmerion 227 234 238
345
7.4.2 Design Specifications in the Frequency Domain 243 7.4.3 Low Frequency Gains and Enor Coefficients 259 7.4.4 Compensator Design 260 7.5 Direct Design Method of Ragazzini 264 7.6 Summary 269 7.7 Problems 270
9
Multivariable and Optimal Control
9.1 Decoupling 360
359
8
Design Using StateSpace Methods
8.1 Control Law Design 280
279
364 9.2 TimeVarying Optimal Control 9.3 LQR SteadyState Optimal Control 371 93.1 Reciprocal Root Propertles 372 9.3.2 Symmetric Root Locus 373
>...,
r
xiv
Contents Contents xv
9.3.3 Eigenvector Decompos1tion 9.3.4 Cost Equivalents 379 9.3.5 Emulation by Equivalent Cost 9.4 Optimal Estimation 382 9.4.1 LeastSquares Estimation 9.4.2 The Kalman Filter 389
374
380 383
12
System Identification
479
481 484
495
12.1 Defimng the Model Set for Linear Systems 12.2 Identification of "lonparametnc Models
12.3 Models and Criteria for Parametric Identification 12.3.1 Parameter Selection 496 12.3.2 Error Definition 498
394 396 400
9.4.3 Steady~State Optimal Estimation
12.4 Determimstic Estimatlon
502 506
9.4.4 NOlse Matrices and Discrete Equtvalents 9.5 Multivariable Control Design 400 9 5.1 Selection of \Veighting 'vlatrices Q I and Q2 9.5.2 Pincer Procedure 401
12.4.1 Least Squares 503 12.42 RecurSive Least Squares
9.5.3 PaperMachine Design Example
403 407
510 12.5 Stochastic Least Squares 521 12.6 'Maximum Likelihood 127 Numerical Search for the J\laximumLikelihood Estimate
526
9.54 MagneticTapeDrive Design Example 9.6 Summary 419 9.7 Problems
420
12.8 Subspace Identification Methods 538 12.9 Summary 539 12.10 Problems
535
10
Quantization Effects
425
13
Nonlinear Control
13.1.1 Simulation
543
544 545
550
10.1 Analysis of RoundOff Error 426 102 Effects of Parameter RoundOff 437 10.3 Limit Cycles and Dither 440
104 Summary
13.1 Analysis Techniques
13.1.2 Linearization
13.1.4 Equivalent Gains
445 445
131.3 Describing Functions
559 573
10.5 Problems
13.1.5 Circle Criterion
)77
11
13.1.6 Lyapunov's Second Method
579
582 582
Sample Rate Selection
449
450
451
13.2 Nonlinear Control Structures: Design
11 1 The Sampling Theorems Limit 11.2 Time Response and Smoothness
13.2.1 Lnge Signal Linearization: Inverse Nonlinearities 13.2.2 TlmeOptimal Servomechanisms 454
465
599
611
615 635 635
11.3 Errors Due to Random Plant Disturbances 11.4 Sensili\1t)· to Parameter Variations 461 11.5 Measurement Noise and Antialiasing Filters 11.6 Multirate Sampling 469
11.7 Summary 11.8 Problems 474 + 76
13.23 Extended PTOS for Flexible Structures
13.2.4 Introduction to Adaptive Control
13.3 Design with Nonlinear Cost Functions
13.3.1 Random Neighborhood Search
13.4 Summary 642 643
135 Problems
b
_
[easurement Sensor 14.2 Shorted Turn 658 659 660 Appendix D Summary of Facts from the Theory of Probability and Stochastic Processes 713 D.2.4.2 The DiskDrive Sen"o 654 14.1 Overview of Disk Driws 650 649 652 C.4 Actuator and HDA Dynamics 142.2.1.1 High Performance Disk Driw Servo Profile 14.1 Voice COli Motors 14.Transforms Appendix C A Few Results from Matrix Analysis C.3.4 Implementation Considerations 14.2 Design by Random Numerical Search 14.1 Deslgn of the Linear Response 611 14.2 A Servomechanism for Antenna Azimuth l:ontrol 699 Appendix B Tables 701 701 702 B.3 Similarity Transformations C.2 Expectatlcm 715 0.4 SlOchastic Processes 719 14. I Properties of zTransforms B.l Determinants and the Matrix Inverse C2 Eigenvalues and Eigenvectors 707 705 705 h ~ .4 The CayleyHamilton Theorem 709 III 14.2.3 Power AmplIfier SaturatlOn 14.2 Table of z.1.l SingleAxis SatellIte Aultude Control A 3 Temperature Control of Fluid in a Tank A4 Control Through a Flexible Structure A.5 Summary 686 14.l Random Variables 713 717 655 D.6 Runout 664 143 Design SpeCifications 666 663 Appendix E Appendix F 66 i MATLAB Functions 725 727 Differences Between MATLAB v5 and v4 f..6 Problems N:l7 683 674 678 References Index 737 731 14. I System SpeClficatlon 721 F.5 Positlon '.2 Contlnuous to Discrete Comusion F3 Optimal Estimation 730 729 14.r xvi Contents Contents xvii 14 Design of a Disk Drive Servo: A Case Study 14.2 Components and \[odels 655 14.4 Disk Servo Design 6iO 14.3 TimeDomain Response of XPTOS Structure Appendix A Examples 689 689 691 694 69i A.1 Plant Parameters for Case Study Design 14 3.2.S Control of a Pressurized Flow Box A.3 tvlore Than One Random Vanable D.2 Goals and Objectives 669 14.4.4.4.2.
and consideration of nonlinear phenomena. and considerable emphasis is given to the ~transform and the c1use connections between the . Closely related to the mainstream of ideas for designing linear systems that result in satisfactory dynamic response are the issues of samplerate selection. model identification. The rootlocus method can be used virtually unchanged for the discrete case. and vehicles that move over water. the results of the separation theorem in the presence of noise are stated but not proved.J . chemical processes.:transform and the Laplace transform. The special topics of discrete and sampleddata system analysis are introduced. as well as leastsquares parameter estimation. land.• Preface • This book is about the use of digital computers in the realtime control of dynamic systems such as servomechanisms.. however. Each of these design methodsdassical and modem alikehas advantages and disadvantages. air. Both transform (classical control) and statespace (modern control) methods are described and applied to illustrative examples. strengths and limitations. The material requires some understanding of the Laplace transform and assumes that the reader has studied linear feedback controls. The book's emphasis is on designing digital controls to achieve good dynamic response and small errors while using signals that are sampled in time and quantized in amplitude. The topic of model making is treated as measurement of frequency response. It is our philosophy that a designer must understand all of them to develop a satisfactory design with the least effort. or space. Bode's frequency response methods require modification for use with discrete systems. The statespace methods developed are the technique of pole assignment augmented by an estimator (observer) and optimal quadraticloss control. every designer should be aware that all models are nonlinear xix b. Finally. The optimal control problems use the steadystate constantgain solution. The transform methods emphasized are the rootlocus method of Evans and frequency response.. Samplerate selection is discussed in the context of evaluating the increase in a leastsquares performance measure as the sample rate is reduced.
A~I the routmes given are tabulated in Appendix E for easy reference. is a detailed design example of a dicrital servo for a disk drive head. Chapter II presents methods of analysis and design guidelines for the selection of the sampling period in a digital control system. . Chapter 4 presents the ztransform. for example. if the reader is willing to take some details on faith: however. Subspace methods are also introduced for estimating the state matrices directly. PI shows the dependence of material in each chapter on previous chapters. we present the e1eme~tary parts of quadraticloss Gaussian design with minimal proofs to give some Idea of how this powerful method is used and to motivate further study of its theory. The statespace material assumes no prevIOus acquamtance with the phase plane or state space. and performance enhancement by nonlinear controllers and by adaptive designs are also included in Chapter 13." Most of the graphical figures in this third edition were generated usinu MA~AB>: supplied by The Mathworks. To review the chapters briefly. The files that created the figures ar~ avaIlable from Addison Wesley Longman atftp. In many cases. and 9. . Fig. Furthe:more. In Chapter 10 the nonlinear phenomenon of amplitude quantization and its effects on system error and system dynamic response are studied. The use ofc?mputeraided design (CAD) is universal for practicing engineers m thIS field. By following the solid lines. Chapter 3 introduces the key effects of sampling in order to elucidate many of the topics that follow. the most WIdely used CAD software package in universities. as m most other fields. met~ods of studymg stabIlIty of nonlinear systems. thIS book can be used as a reference for learning how to use MATLAB m control calculations as well as for control systems analysis. Parametric methods are introduced by starting with deterministic least squares. We have recognized this fact and provided gUldance to .. to relate the ztransform to the Laplace transform and to describe the implications of poles and zeros III the zplane to the known meanings attached to poles and zeros in the . Chapter 5 mtroduces combmed discrete and continuous systems. This approach leads us. Chapter 1 contains introductory comments. the basic ideas of the later chapters wlll be understood along these paths. actual MATLAB scripts are included in the text to explain how to carry out a calculatIon. But we hasten to add that it is mandatory that the student retain the abilIty ~o compute simple answers by hand so that the computer's reasonableness can be Judged. from learning the concepts to computing the de~ued results. The b· ~ . and completing the solution with an algorithm for maximum likelihood. by the end. the reader will have all the background required to understand the material in a particular chapter. The final chapter. Chapter 6 shows methods by which to generate discrete equations that will approximate continuous dynamics. Chapter 2 is a review of the prerequISlte contmuous control. In ?ther cases. sections with a star (*) are optional and may be skipped with no loss of contInUIty. and be familiar with the co~cepts of the describing functions of nonlinear systems. The basic deterministic design methods are presented in Chapters 7 and 8the rootlocus and frequency response methods in Chapter 7 and pole placement and estimators in Chapter 8. the first eight chapters represent a comfortable load. For more sophisticated methods. and a few unusual or more advanced topics SUCh.mt:com or from The Mathworks Inc.the reader so that learning the controls analysis material can be mtegrated WIth learnmg how to compute the answers with MATLAB. indicate a dIrectIOn toward wider horizons. The philosophy of presentation is that new material should ~e closely related to material already familiar. Some familiarity with simultaneous linear equations and matnx notation is expected. 14. Mat~ria! that may be new to the student is the treatment of signals which are ~Iscrete In time and amplitude and which must coexist with those that are contmuous III both dimensions. Chapter 9 introduces optimal quadraticloss control: First the control by state feedback is presented and then the estimation of the state in the presence of system and measurement noise is developed. and EmamiNaeini (1994). 8. introducing random errors. The reader is encouraged to us~ these MATLAB figure files as an additional guide in learning how to perform the varIOus calculations. in examples illustrating the effects of sample rate.math. at ftp. and the necessary analysis is developed from the ground up. The First Law of Computers for engineers remains "Garbaue In '" . stability analysis.:orks. including examples of plant nonlinearities and methods for the analysis and design of controllers for nonlinear models. . Garbage Out. in developing the design methods. and the basic concepts of and the phenomenon of aliasing. as eigenvalues. Nonparametric methods are based on spectral estimation.l shows the differences between the se~ond·and third editions of the book. Chapter 12 introduces both nonparametric and parametric identification. For purposes of organizing a course. Chapters may also be skipped. Simulation. The first seven chapters (skipping or quickly reviewing Chapter 2) constItute a comfortable onequarter course that would follow a course in continuous linear control using a text such as Franklin. Powell. we relate the digital control deSign methods to those of continuous systems. and yet. the sampling theorem. based on a recursive leastsquares estimation derivation. ~herefore. In short. the MATLAB routine is simply named for reference. especially in the earlIer chapters. Also.splane. even if the path omits some chapters. Nonlinear control is the subject of Chapter 13. It utilizes the design methods discussed in Chapters 7. Methods of linear analysis are presented m Chapters 4 through 6. Table P. For a onesemester course. and the CayleyHamilton theorem are presented m Appendix C. we have tne? to descnbe the entire process. Inc. The chapter ends with a nonlinear design optimization alternative to the techniques presented in Chapter 9. Cha~ters 2 and 3 are new to the third edition. eigenvectors.xx Preface Preface xxi nonlInear deSIgn. as suggested by the dashed lines.comJpublbooks(franklin.
S.. no discussion of mu analysis or design. Control System Maga~ine (1989). Texas A&M University. A. Rice University: William Perkins.. Jr.. Stephen Phillips. however.. and a CAD package capable of performing the basic computations and plolling graphs. We also wish to express our appreciation to Laura Cheu. and all the staff at AddisonWesley for their quality production of the book. Emilie Bauer. J. we want to thank the following people for their helpful reviews of the manuscript: Fred Bailey. Boyd. University of Illinois. wtthChapter 10. II. a digital storage scope. Stanford. S. Clemson University. We also wish to express our appreciation for many valuable suggestions to the current and former students of E207 and E208. University of Minnesota. thus allowing for more flexibility in the sequence of teaching.. for his careful reading and many spirited suggestions. Hal Tharp.: I I G content 8 d 9 .J . Lehigh University: Thomas Kurfess. and S.. all fourteen chapters can be covered.1 . On a more personal level. an analog computer (or equivalent) with ten operational amplifiers.W. I. we wish to express our appreciation to Profs. Bryson. University of New Orleans. Jr. California G. Dan DeBra. and Gary Young. R. It has been found at Stanford that it is very useful to supplement the lectures with laboratory work to enhance learning..P M. A very satisfactory complement of laboratory equipment is a digital computer having an NO and a D/A converter.F. Cannon. Prof. Clarkson University. University of Arizona. James Carroll.I..1 Comparison ofthe Table of Contents 3rd Edition Chapter Title Introduction Review of Continuous Control Introductory Digital Control Discrete Analysis and the zTransform Sampled Data Systems Discrete Equivalents Design Using Transform Methods Design Using StateSpace Methods Multivariable and Optimal Control Quantization Effects SampleRate Selection System Identification Nonlinear Control Application of Digital Control  Preface xxiii 2nd Edition Chapter Number Chapter Number 1 2 3 4 5 6 7 8 9 2 3 4 5 6 9 7 10 8 11 12 10 11 12 13 14 figure P. The list of references gives some indication of those to whom we are in debt. Chris Rahn.. or 12. One of the chang~s made i~ this third edition is that the optimal control material no longer depends on the leastsquares development in the system identification chapter. Case Western Reserve University.L. .F J. T. or convex optimization. Rock for their valuable suggestions for the book and especially to our longtime colleague. Oklahoma State University. It is our expectation.D. As can be seen from the fi ure many options eXist for Including the material in the last five chapters For agfull' year course.. There are many important topics in control that we have not been able to include in this book. for example.B. 1 Cha t of a second course has many POSSI'b'I'!tIes. Georgia Institute of Technology. Citron.. As do all authors of technical works. >.. that careful study of this book will provide the student engineer with a sound basis for design of sampleddata controls and a foundation for the study of these and many other advanced topics in this most exciting field. There is. Wilkes University. Walter Higgins. an . Russell Trahan. One possibility is to combine p ers. How. Pearson. Arizona State University: Stanley Johnson. for whom this book was wrillen. xxii Preface Table P.. In addition. A description of the laboratory equipment and experiments at Stanford is described in Franklin and Powell. I I rr+. linear matrix inequalities. John Fleming. Srinivasan.. we wish to acknowledge the vast array of contributors on whose work our own presentation is based...
Computer Aided Control System Design (CACSD) issues and how the book's authors have chosen to handle those issues are discussed in Section 1. one hardware design can be used with many different software variations on a broad range of products. and what the basic elements are. which can be combined with the dynamic control function to meet other system requirements. Furthermore.1. A typical structure of the elementary type of system 1 b . automobiles.. Examples of electromechanical servomechanisms exist in aircraft. Section 1. masstransit vehicles.1 Problem Definition The digital controls studied in this book are for closedloop (feedback) systems in which the dynamic response of the process being controlled is a major consideration in the design. oil refineries.3. ~  ~ Introduction A Perspective on Digital Control The control of physical systems with a digital computer or microcontroller is becoming more and more common. Among the advantages of digital approaches for control are the increased flexibility of the control programs and the decisionmaking or logic capability of digital systems. In addition. The key issucs are discussed and an overview of where those issues are discussed in the book is given. thus simplifying and reducing the design time. many new digital control applications are being stimulated by microprocessor technology including control of various aspects of automobiles and household appliances.2 discusses the design approaches used for digital control systems and provides an overview of where the different design approaches appear in the book. and papermaking machines. 1.. Chapter Overview In Section 1. you will learn about what a digital control system is. what the typical structure is.
In the first ease the sample period is precisely fixed. bits) composed I See especially the book by Bode ( 1945) . This device acts on a physical variable. is referred to generally as the process of regulation.he computer. y. Most commonly. to be sampled and to have the error formed in t.e.1] and despite errors in the sen50r [v(t) in Fig. A system that has good regulation in the face of changes in the plant parameters is said to have lo:v s~nsitivity to these parameters. It is also essential that the tracking succeed even if the dynamics of the plant should change somewhat during the operation. providing no logic branches are present that could vary the amount of code executed: in the third case. For that we must consider the unique features of Fig. We need to know the times at which these numbers arrive if we are to analyze the dynamics of this 5ystem.1 Block diagram of a basic digital control system w(t) vIr) Notation: r :. This figure wIll help to define our ba5ic notation and to introduce several features that distingui5h digital control5 from th05e implemented with analog device5. In practice. r(t). Thus in Fig.: ry::: system erTOr 0 is now commonly taken quantization w = disturbance input to the plant v :: disturbance or noise in the sensor AJD = analogtCHIigitai converter DJ A = digitaltoanalog converter The means by which robust regulation is to be accomplished is through the control inputs to the plant [u(t) in Fig. In addition to generating a discrete signal. The proce55 to be controlled (sometime5 referred to as the plant) may be any of the phY51cal proce"es mentioned above whose satisfactory response requires control aclton.1. such as an encoder on an engine crankshaft that supplies a pulse to trigger a computer cycle..1].1 we identify the sequence of numbers into the computer as e(kT). however. We consider first the action of the analogtodigital (AJD) converter on a signal. y(l). l. most commonly an electrical voltage.• 2 Chapter 1 Introduction 1. 1. the sample period varies with the engine speed. is to be forced ~o follow or track the reference input. the AJD converter acts on the sensor output and supplies numbers to the digital computer. It is common for the sensor output. digital control systems sometimes have varying sample periods andior different periods in different feedback paths.1 Problem Defmition 3 that will. of course. A system that has good regulation in the presence of dIsturbance signals is said to have good disturbance rejection. A further alternative is to use some other device to determine a sample. Much of our effort in later parts of this book will be devoted to illustrating thi5 discovery and demonstrating how to exploit the advantage5 of feedback. In Fig. 1. the notation from statistics to mean an estimate of 6. We call these variables discrete signals to distinguish them from variables like wand )'. a scheme often referred to as free running.. 1. (For any variable. like e(kT). Ihe problem of control as discussed thU5 far is in no way restricted to digital control. This scheme is referred to as eventbased sampling.l.) = ry = indicated error e :. including the case where r == O. the logic is based on binary digits (i. which change continuously in time.occupy m05t of our attention i5 5ketched 5chematically in Fig. the AJD converter also provides a quantized signal. and converts it into a stream of numbers.1]. 1. and the AJD converter sends a number to the computer each time the interrupt arrives. despite the presence of disturbance mput5 to the plant [w(t) in Fig. usually an approximation to or estimate of y. Usually there is a clock as part of the computer logic which supplies a pulse or interrupt every T seconds. It was discovered long ago! that a scheme of feedback wherein the plant output is measured (or sensed) and compared directly with the reference input has many advantages in the effort to design robust controls over systems that do not use such feedback. A system that has both good disturbance reJeclton and low sensitivity we call robust. We conclude from the periodic sampling action of the AJD converter that some of the signals in the digital control system. By "satisfactory response" we mean that the plant output. The process of holding y(t) close to r(t).: reference or command inputs u y ji = control or actuator input signal = controlled or output signal = instrument or sensor output. By this we mean that the output of the AJD converter must be stored in digital logic composed of a finite number of digits. 1. In this book we will make the assumption that all the numbers arrive with the same fixed period T. 1. are variable only at discrete times. An alternative implementation is simply to access the AJD upon completion of each cycle of the code execution. However. say 8.1 introduced by the use of a digital device to generate the control action. sample period Figure 1. called the sample period. in the second case the sample period is essentially fixed by the length of the code. A system having both discrete and continuous signals is called a sampleddata system..
digital signals are nearly continuous. in the domain of discrete systems. In addition to data extrapolation.'erYleW of Design Approach 5 emulation of D's and I·s. and the effects of qu~nti~ationfor large and small word sizes.1. m thlS case. Here we are concerned with the question of data extrapolation to convert discrete signals as they might emerge from a digital computer into the continuous signals necessary for providing the input to one of the plants described above. has been truncated to one decimal place. We develop the equations and give examples using both transform methods and statespace descriptions. We would say that. for costsensitive digital systems. For example. the best design is the one with the lowest cost computer that will do the required job.2 r t O. In order to make meaningful these references to a background in continuoussystem design. we will review the concepts and define our notation in Chapter 2. We will be interested in this text in gaining an understanding of the effects of all sample rates. The resulting design could then be converted to the digital fornlat for Implementati?n in a computer by using the simple methods described in Chapter 3 or the emulatIon method described in Chapter 7. This action typically occurs in conjunction with the D/A conversion. and we use Fourier analysis to give a clear picture for the ambiguity that can arise between continuous and discrete signals. we consider the issue of the dynamic response of discrete systems. which specifies the conditions necessary if this ambiguity is to be removed and only one continuous signal allowed to correspond to a given set of samples. In a real sense the problems of analysis and design of digital cOlllmls are concerned with taking account of the effects of the sampling period T and the quantization size q. 0. The plain fact is that more than one continuous signal can result in exactly the same sample values. (We will use q for quantum size. Y I • at frequency f 1 has the same samples as a sinusoid Ye of a different frequency f. with a slow sampling rate. As mentioned above. Such situations are studied in Chapter 5... A signal that is both discrete and quantized IS called a digital signal. as the designs evolve. That translates mto bemg the computer with the slowest speed and the smallest wor~ size. If a sinusoidal signal. can be thought of as a number with a fixed number of piaces' of accuracy. For this purpose we introduce impulse modulation as a model of sampling.4 4 Chapter I lntroductlon 1. we consider the analysis of sampled signals from the viewpoint of continuous analysis. and digital systems. there can be significant ripple between sample instants.. and continuous methods of analysis and design can be used. systems that are called sampleddata systems. Having the discrete transfer functions.2 Plot of output versus input charaderistics of the AID converter y aliasing "1 .1 units. since S' changes only in fixed quanta of. 1. A sampleddala system has both discrete and continuous signals. sampleddata systems.. in generaL) Note that quantlzatlOn IS a nonlinear function. We also develop discrete transfer functions of continuous systems that are sampled. Figure 1. but we will call upon previous experience in continuoussystem analysis and in design to give alternative viewpoints and deeper understanding of the results. and the computer is specified and frozen early m the deSign cycle. ~e first conSider q to be zero and study discrete and sampleddata (combined discrete and continuous) systems that are linear. is done so that . We will analyze these in Chapter 4 and develop the ztransform of discrete signals and "pulse"transfer functions for linear constant discrete systems. These are discrete systems.2.2 Overview of Design Approach An overview of the path we plan to take toward the design of digital controls will be useful before we begin the specific details. however. from the beginning.' A corollary of aliasing is the sampling theorem. treat the problems of varying T and q separately. but the essential feature is that the representation has a finite number of digits. If w'e plot the val~es of y versus the resulting values of . Furthermore. digital computers in this book process digital signals. we place systems of interest in three categories according to the nature of the signals present. Not surprisingly. W~ will. In discrete systems all signals vary at discrete times only. In Chapter 10 we will analyze in more detail the source and the effects of quantization.' we can obtain a plot like that shown I~ FIg. however. A common situation is that the conversion of r to . more demands are placed on the system.. and the only way to accommodate the increased computer load is to slow down the sample rate. Many systems are originally concelve~ WIth fast sample rates. fast and slow. Our approach to the design of digital controls is to assume a background in continuous systems and to relate the comparable digital problem to its continuous counterpart. and we will discuss in Chapters 7 and 11 specific effects of samplerate selection. or that y IS qual1fl~ed WIth a q of 0. If both T and q are extremely small (sampling frequency 30 or more times the system bandwidth with a 16bit word size). also known as aliasing. We will develop the essential resuhs. 1. and often it is important to be able to compute the continuous time response. is said to be an alias of Y.
Again. Specific MATLAB routines that can be used for performing calculations are indicated throughout the text and in some cases the full MATLAB command sequence is shown. we introduce system identification. which tS ~ne aspect of the field of digital filters. Chapter 14 includes a case study of a diskdrive design. including a Scientific American Book (1955). Digital filters are discrete systems d~slgned to process discrete signals in such a fashion that the digital device (a dIgital computer. contained m Chapter II. All the graphical figures were developed using MATLAB and the files that created them are contained in the Digital Control Toolbox which is available on the Web at no charge. Once we have developed the tools of analysis for discrete and sampled systems we can begin the design of fcedback controls. In our earlier analysis we develop methods for examining the effects of different sample rates. the computer can identify problems but the designer must make intelligent choices in guiding the refinement of the computer design. MATLAB Digital Control Toolbox 1. The results are a valuable part of the designer's repertoire and are the only techniques presented here suitable for handling m~ltivariable designs. CACSD support for a designer is universal. Only the most elementary of the concepts in this enormous field can be covered. and many other references are cited by these authors for the . analysis methods treated are the describing function. with emphasis on the steadystate solution for linear constant discrete systems with quadratic loss functions. of course. 3 :oe state space is an extension of the space of displacement and velocity used in physics. Chapter 8 includes control design using feedback of all the "state variables" as well as methods for estimating the state variables that do not have sensors directly on them.4 Suggestions for Further Reading Several histories of feedback control are readily available. The last four chapters cover more advanced topics that are essential for most ~omplete designs. but in this chapter we consider for the first time the question of sample rate as a design parameter. The first of these topics is sample rate selection. 1. Appendix F describes the adjustments that need to be made. both transform methods and statespace methods are developed to help understanding and computation of particular cases of interest. optimal control (especially timeoptimal control). We present the method of least squares and some of the concepts of maximum likelihood. The MATLAB statements in the text are valid for MATLAB v5 and the Control System Toolbox \'4. The 2 Named becau~e they use the Laplace or Fourier transform to represent ~ysterns. Design techniques described are the use of inverse nonlinearity.4 Suggestions for Further Readmg 7 digital filters modern control identification As a special case of discrete systems and as the basis for the emulation ?esign method. we rely mainly on pole placement.com/pub/books/franklin/digital. Our treatment in Chapt~r 6 will concentrate on the use of discrete filtering techniques to find dIscrete eqUIvalents of continuouscontrol compensator transfer functions. Many commercial control system CACSD packages are available which satisfy that need. especially in Chapters 8 and 9. however. Much of the discussion in the book assumes that a designer has access to one of the CACSD products.ards. and treatment of both implementation and manufacturing issues is discussed. A good discussion of the historical developments of control is given by Dorf (1980) and by Fortmann and Hitz (1977). and Lyapunov's second method of stability analysis. and adaptive control. For those with older versions of MATLAB. In Chapte~ 13. For purposes of understanding the design method. In Chapter 12. In Chapter 9 the topic of optimal control is introduced. The use of statespace techmques for design is introduced in Chapter 8. we consider discrete equivalents to continuous systems. as well as files based on MATLAB v5 with Control System Toolbox v4 are available at ftpmathworks. for example) can be used to replace a continuous filter. These figure files should be helpful in understanding the specifics on how to do a calculation and are an important augmentation to the book's examples. equivalent linearization. In designing practical digital control systems. it is essential that the designer is able to work out very simple problems by hand in order to have some idea about the reasonableness of the computer's answers. and the study of Mayr (1970). In Chapter 7 we study the transform methods of the root locus and the frequency response as they can be used to design digital control systems. an interactive computeraided control system design (CACSD) package with simple access to plotting graphics is crucial. MATLAB'" and Matrix. Here the matter of model making is extended to the use of experimental data to verify and correct a theoretical model or to supply a dynamIC descnptlOn based only on inputoutput data. design of control systems requires many computations that are greatly facilitated by a good library of welldocumented computer programs.3 ComputerAided Design As with any engineering design method. Having the knowledge of doing the calculations by hand is also critical for identifying trends that guide the designer. Much that IS called modem control theor~' uses differential equations in statespace fonn. A study of quantization effects in Chapter to mtroduces the Idea of random signals in order to describe a method for treating the "average" effects of this important nonlinearity. and especially in iterating through the methods many times to meet essential specifications. being two very popular ones. We discuss the selection of the desired pole locations and point out the advantages of using the optimal control methods covered in Chapter 9. a scheme for forcing the closedloop poles to be in desirable locations. We introduce this representation in Chapter 4 and use it extensively aftern. Files based on MATLAB v4 with Control System Toolbox v3. an int:oduction to the most important issues and techniques for the analySIS and deSign of nonlinear sampleddata systems is given.Jj 6 Chapter 1 Introduction 1. Here we divide our tel:hniques into two categories: transform 2 and statespace 3 methods.
4 • In a digital control system. that is. or digital control system" (e) Show that it is possible for the pilot of flight 1081 to fly a zigzag course which would show up as a straight line on the controller's screen. called emulation. good transient response. or digital: i. A feedback control system is establi. or designing the digital system directly. 1. Nichols. the range data as plotted on the radar screen.tal. we suggest a comprehensive text by Cannon (1967). in seconds. including Franklin. and EmamiNaeini (1994). He wishes to do so each 9 mi of travel of the aircraft. The ideas of tracking and robustness embody many elements of the objectives of control system design. however the designer needs 10 know the handbased methods in order to intelligently guide the computer design as well as 10 have a sanity check on its results.obtain a COPy of the Student Edition or use what's available to you) and plot \ vs x for x = I to 10 ~here v = Xl.6 Problems 9 intere. sampleddata.hed through the controller who gives course corrections to the pilot. Label each axis and put a tille on it. most thermostats are dlg. discrete. Flight 1081 is traveling directly toward the airport at 540 miJhr.3 1. iv. Describe five digital control systems that you are familiar with. (a) What is the sampling rate. • The design of a digital control system includes determining the effect of the sample rate and selecting a rate that is sufficiently fast to meet all specifications.lts. in seconds. Put a plot of y = x on the lOp of the page and y = IX on the bollom.ted reader. an analogtadigital (AID) converter. of the controller's instructions') (c) Identify the following signals as continuous.6 Problems 1. l _ . of the range signal plotted on the radar screen? (b) What is the sampling rate. and a digitaltoanalog (D/A) converter. the aircraft's range from the airport. Robustness is a property essential to good performance in practical designs because real parameters are subject to change and because external.5 Summary 1. Use MATLAB .6 1. • Most designs today are carried out using computerbased methods. (d) Is this a continuous. Either method can be carried uut using transform or statespace system description. the analog electronics used for compensation in a continuous system is replaced with a digital computer or microcontroller. It is concerned with writing the equations of motion of physical systems in a form suitable for control studies. Describe how vou think they work and list some of their benefits. if the resoilltion must bc 5 mv. and good steadystate accuracy. We will study these matters in later chapters with particular reference to digital control design. What IS the (lowest).1 Suppose a radar search antenna at the San Francisco airport rotates at 6 rev/min. State whal you think the advantages of the digital implementation are over an analog ImplementatIOn. Discussion of performance specifications of control systems is given in most books on introductory control. unwanted signals invade every system. 1. all concepts fundamental to every control system.hed studies of control systems operating on discrete time data (sampleddata systems in our terminology) is given by Hurewicz in Chapter 5 of the book by James. iii. house heating system thermostats were a bimetallic strip that would make or break the contact depending on temperature.• 8 Chapter I Introduction 1. Use MATLAB (obtain a copy of the Student Edition or use what's available to you) an~ make two plots (use MATLAB's subplot) of Y vs x for x = I to 10. frequency of a sinusoidal zigzag course which will be hidden from the controller s radar') 1. and data points corresponding to the position of flight 1081 are plotted on the controller's screen once per antenna revolution. The concept of tracking contains the requirements of system stability. Historically. Powell. and Phillips (1947). the controller's instructions 10 1 the pilot.5 1. • Design of a digital control system can be accomplished by transforming a continuous design. To obtain a firm understanding of dynamics.2 If a signal varies between 0 and 10 volts (called the d)'namic range) and it is required that the signal must be represented in the digital computer 10 the nearest 5 mllh~·o. and his instructions consist of course headings in integral degree values. ii. determine how many bits the analogtodtgltal converter must have. One of the earliest publi. the pilot's actions on the aircraft control surfaces. Today.
it is designed to state concisely the key relationships for your reference as you move to the new material in the ensuing chapters. Chapter Overview The chapter reviews the topics normally covered in an introductory controls course. dynamic response. and EmamiNaeini (1994). frequency response design. Powell. Linear analysis allows the designer to examine quickly many candidate solutions in the course of design iterations and is. feedback properties. rather. We do this by analyzing the equations of the system model. 11 .1 Dynamic Response In control system design. see an introductory control text such as Feedback Control of DVIlamic Systems. For a more indepth treatment of any of the topics. and statespace design. The equations can be solved using linear analysis approximations or simulated via numerical methods. The discussion below focuses on linear analysis. therefore. a valuable tool.2. 2.Review of Continuous Control A Perspective on the Review of Continuous Control The purpose of this chapter is to provide a ready reference source of the material that you have already taken in a prerequisite course. by Franklin. Numerical simulation allows the designer to check the final design more precisely including all known characteristics and is discussed in Section 13. The presentation is not sufficient to learn the material for the first time. it is important to be able to predict how well a trial design matches the desired performance. rootlocus design.
u is the m x I input vector to the system. Any set of differential equations of any order can be transformed into a coupled set of firstorder equations called the statevariable form. r ..it 12 Chapter 2 Review of Continuous Control 2. for the discrete plant description in order to delineate the variou~ ~ystem equation usages. H is a p x n output matrix. s . The most important property of the Laplace transform (with zero initial conditions) is the transform of the derivative of a signal.2 Laplace Transforms and Transfer Functions The analysis of linear systems is facilitated by use of the Laplace transform. for example a2 an+ I ]· state where the state In MATLAB v5 with Control System Toolbox v4' the numerator and denominator are combined into one system specification with the statement sys = tf(num. We prefer 10 use F.2) are F. H. (2.. See Appcndlx F if you have prior versions.c{j(t)} = sF(s).l. for example It is also common 10 use A..y can be written in the statevariable fom] as = Koli. the transfer function._1 where the MATLAB quantity specifying the numerator is a I x the coefficients. Many systems involve coupling between one part of a system and another. version 4. for a continuous plam description. G is n x I.3) has the transform (s' II I statevariable form + 2sw"s + w~)Y(s) =yes) = KoU(s). for compensation. H is I x n. .1) (2. .l.6) (m y + 2{ wo 5' + w.5) p) '. an n x I matrix of the poles.den)..~sm' + . G is an n X m input matrix. and J is a scalar. So we see that Eq. the transfer function is written as the ratio of two factored polynomials.1 and 2. B.\IArL. given the differential equation of that system.\B statemenb in the text a~sume the use of \1ATLAB . The quantities specifying the statevariable form (Eqs. Using this system description. is the vector of variables necessary to describe the future behavior of the system.1 Dynamic Response 13 2.3) + 1) matrix of num = [b l (2. G(s).. therefore. a l s + a. is O(s) i ! I ~! I Fx +Gu J = Hx +Ju. in this case. The transfer function is specified in a polynomial form ("'tf') or a factored zeropolegain form ("zpk·'). and J. C..7) and the quantities specifying the transfer function are an m x I matrix of the zeros. all systems will have a scalar input.1 Differential Equations Linear dynamic systems can be described by their differential equations. II. + bm + 1 ". and J is p x m. (2. F is an /I x II system matrix. for example G(s) = (2. + 2swos + w~ Ko where the column vector x is called the state of the system and contains n elements for an nthorder system."ersion 5 with Control System Toolbox.I . x= (2.. W' (s . (2.s + . G. and. 2. D in place of F. we see that the secondorder differential equation CACSD software typically accepts the specification of a system in either the statevariable form or the transfer function form.) O(s) = K ni~l(s  ~~I 2. and a scalar output y.. H. (2...4) b2 bm + l ] (n and the quantity specifying the denominator is a I x den = ral + 1) matrix. I Until Chapter 9. G (s). So a general way of expressing the dynamics of a linear system is This relation enables us to find easily the transfer function. and eJlo.2) U(s) = . The transfer function in polynomial form is bjs m + h. and a scalar gain. of a linear continuous system. G. + a. In the zeropolegain form.. This is referred to as the "ss" form in MATLAB. given the initial conditions of those variables. y is the p x I output vector. . A.. J as ~lATLAB does throughout. G. 2 An .c. B .
Usually. H.8) is expanded into its elementary terms using partial fraction expansion.= H(sI 11(5) Y(s) F)'G + J. If the equations of motion are in the statevariable form and the transfer function is desired.4 The Final Value Theorem A key theorem involving the Laplace transform that is often used in control system analysis is the final value theorem.H)) Using Laplace transforms. The theorem allows us to solve for that final value without solving forthe system's entire response. is the sum of these terms. the output Y(s) from Eq. v(l). = . The most common and useful result is that the transfer function of the feedback system shown in Fig..2): however.m for an arbitrary input time history. The total time function. with the transform V(s).1. ss(tf(num.rl(t). typical inputs considered in control system design are steps u(I) 2. It states that. u(l). the easiest way to find the transfer function is to use Eg. s V parabolas ll(t) = tlU).p. one can find the polynomial transfer function form by the MATLAB script sys '" tf(ss(F. (2.G. the Laplace transform of Egs. only the simplest cases are analyzed this way. if the system is stable and has a final. ~~ (2.n(evt)l(t).5 Block Diagrams Manipulating block diagrams is useful in the study of feedback control systems.9) .1 An elementary feedback system R(s I __. Y(s) = G(s)V(s).1 reduces to Y(s) R(s) = Rol(!). This will be very useful when examining steadystate errors of control systems..1 Dynamlc Response 15 and can be combined into a system description by sys '" zpk(z.den»).1) and (2.1_0 2. =} V(s) = ".H)) 2. s' A Figure 2. system output time histories are solved numerically using computer based methods such as MATL\.:. then the time function associated with each term is found by looking it up in the table. At' =:> V(s) = i'.2) yields G(s) = '. (2. Typically.1.3 Output Time Histories Given the transfer function and the input.a 1. In MATlAB. In order to do the partial fraction expansion. constant value 1~ Likewise. G. and J. given F. a topic to be discussed later. (2.5) and do the math by hand. or the zeropolegain form by sys '" zpk(ss(F. s R G(s) ramps ll(l) =:> 1 + H(s)G(s) (2. one can find a statespace realization of a transfer function by sys".10) Vis) = '.B·S stepm for a step input or Isim.G.k) For the equations of motion of a system with secondorder or higher equations. Chapter 2 Rniew of Continuous Control 2. However.8) The transform of a time function can be found by use of a table (See Appendix B. it is necessary to factor the denominator. lim x(t) = x = limsX(s). These will be important because specifications for a control system are frequently given in terms of these time responses.1.. 2. (2. the output is the product.. useful information about system behavior can be obtained by finding the individual factors without ever solving for the time history. =:> U(s) = 0" r +ev" Bev ._ YI 5) and sinusoids u(t) = B s.
3.wn and w d = w"Jl _t. and these values of s are called poles of H(s). Entry 8. Likewise.1.1 Dynamic Response 17 2. as may be seen by a partial fraction expansion of H(s).. Each pole location in the splane can be identified with a particular type of response.13) . the denominator corresponding to a complex pair will be (2. and w" is called the undamped natural frequency. that is .2 Firstorder system response poles zeros [' impulse response the values of s such that a (s) = 0 will be places where H (s) is infinity. and wd ' the damped natural frequency. the pole is located at s < 0. equals w". the exponential decays. This means that a pole has a negative real part if (J is positive. the poles are at s = a ± jwd .6 Response versus Pole Locations Given the transfer function of a linear system. values of s such that b(s) = 0 are places where H(s) is zero.13).a 16 Chapter 2 Review of Continuous Control 2. i By expanding the form given by Eq. = T Time (sec) 1 s+a Table B. and the system is said to be stable. we find the correspondence between the parameters to be (J . (2. In other words. In rectangular coordinates. Figure 2. the impulse response is given by the time function corresponding to the transfer function.2. the undamped natural frequency. indicates that the impulse response will be an exponential function.wn s + w~ (2. as shown in Fig. Since the Laplace transform of an impulse is unity. t! = O. the exponential grows with time and is referred to as unstable. The poles of this transfer function are located at a radius w in the splane and at an angle t! = sinIt. the pole is to the right of the origin. the poles identify the classes of signals contained in the impulse response. For a first order pole H(s)=~. "the damping ratio reflects the level of damping as a fraction of the critical damping value where the poles become real. Since complex poles always come in complex conjugate pairs for real polynomials.12) Rels) When finding the transfer function from differential equations. (2.and the corresponding 5 locations are called zeros. Figure 2.11) damping ratio as the time when the response is l times the initial value. Complex poles can be described in terms of their real and imaginary parts.1. s' + 2t. I ! = t. t .. W 2 n .3 splane plot for a pair of complex poles = (J ±jwd . a(s) I \ ' Figure 2. (2. Therefore. is called the damping ratio.14) stability time constant When (J > 0. if a < 0. 2.2 shows a typical response and the time constant (2. On the other hand.12) and comparing with the coefficients of the denominator of H (s) in Eq. H(s) = b(s) . we typically write the result in the polynomial form I: H(s) =. When t. tradi tionally referred to as 5 where the parameter t. = 0 we have no damping.
the natural response .() .den) I mpulse(sys) step response It is also interesting to examine the step response of H(s). the response of the system H (s) to a unit slep input Ii = I(t) where U (s) = 1. that is. " + (wnt + w. 2.2. (. therefore.14).2 and the definitions in Eq.Q 18 Chapler 2 Review of Contmuous Control 2 I Dynamic Response 19 For the purpose of finding the time response corresponding to a complex transfer function from Table B.I WI: .2 num = Wn'2 den = [1 i 2*Ze*Wn Wn'2] " sys = tf(num.t" decreases slightly as the damping ratio increases.5 Time functions associated With pOints In the splane (m!sl (coswdt + :J sin Wi) . Note that if a ll2J ' '. so stability is a matter of definition. (2. and the system is said to be unstable. w.{1 . 2.eO"' Figure 2. For w n = 3 rad/sec and ( = 0. The negative real part of the pole. plotted with time normalized to the undamped natural frequency w n ' Note that the actual frequency. If a = O. A few step responses are sketched in Fig. a.5 committed to memory so that there is an instant understanding of how changes in pole locations influence the time response. ./)I(t). Also note that for very low damping the response is oscillatory. because then the time response can be found directly from the table. (2. (2. The H (s) from Eq. (2. we see that the impulse response is h(t) = wne"' sin(w.15) LHP RHP where wJ = wn Jl=? and a = (w n ' This could also be obtained by modifying the last line in the MATLAB descriptiun above for the impulse response to step(sys) Figure 2.4 is a plot of vCr) for several values of i:. the response neither grows nor decays. If a is positive. determines the decay rate of an exponential envelope that multiplies the sinusoid. the pole is in the righthalf plane.' IbJ EJ is negative. is v(t) = 1. lhe impulse response time history could be obtained and plotted by the MATLAB statements: Wn = 3 Ze = 0. while for large damping ( near 1) the response shows no oscillation.12). contained in the tables in Entry 22.4 Step responses of secondorder systems versus/. the response will grow with time. It is very useful for control designers to have the mental image of Fig.. il is easiest 10 manipulate the R(s) so that the complex poles fit the form of Eq. The step response transform given by Yes) = H(s)U(s).2. from Emry 21 in Table B.5 to show the effect of pole locations in the splane on the step responses.13) can be written as H(s) = Figure 2.
13). the time responses of Fig. the system will eventually converge to the commanded value. no matter how complex the system is. and negative real part a.0 0.w n 4. and settling time for just about any system. if the rise "t Figure 2.17) (2.1 Dynamic Response 21 decays and the system is said to be stable.l8) charactenze the transient response 0 f a system h aving no finite zeros and two complex poles with undamped natural frequency w" damping ratio 1.0 . All these notions about the correspondence between pole locations and the time response pertained to the case of the step response ofthe system of Eq.7 The overshoot M is plotted in Fig. Figure 2. the secondorder system response is useful in guiding the designer during the iterations toward the final design. however.. another iteration of the design is required.6: The rise time t. the overshoot would be repressed and the response would likely go initially in the opposite direction to its final value. If they have not been met.8 1. = 0. the effect would generally be an increased overshoot: the presence of an additional pole would generally cause the response to be slower. settling time I.1.. The settling time t.. Two frequently used values from this curve are M = 1~9I: for I. 2. P .16}{2. If there had been a zero. For example. It is important to keep in mind. They are meant to provide a starting point for the design iteration and the time response should always be checked after the control design is complete by an exact calculation. overshoot. and overshoot MD :f 50 ~o . "'::= 4.6 a (2.16) w/1 t . 7 TimeDomain Specifications Specifications for a control system design often involve certain requirements associated with the time response of the system. In analysis and design. usually by numerical simulation. 2.6 I. 2.7. If there had been a zero in the righthalf plane. Nevertheless. (2.2 04 0.. Note that.18) M ~e. to verify whether the time specifications are actually met. = 0."r (2.7. as long as the damping is strictly positive. is the time it takes the system to reach the vicinity of its new set point. that is. The requirements for a step response are expressed in terms of the standard quantities illustrated in Fig. ________ 30 20 10 O· 0. For a secondorder system. 20 Chapter 2 Re\'iew of Continuous Control 2. a secondorder system with no zeros. The commonly used approximations for the secondorder case with no zeros are 1. that they are qualitative guides and not precise design formulas.P · Equations (2. is the time it takes the system transients to decay.6 Plot of the peak overshoot Mp versus the damping ratio ( for the secondorder system 60 t'::: Definition of rise time t."r:.a. 1.'~ r 2.5 and M = 591: for I. they are used to obtain a rough estimate of rise time.4 yield information about the specifications that is too complex to be remembered unless approximated.8 t ". The overshoot is the maximum amount that the system overshoots its final value divided by its final value (and often expressed as a percentage).6 0.
K . e. e. and the acceleration constant as K = lims'D(s)G(s). (2. I 'f~there is an integrator in D or G. the dynamic characteristics and stability are detennined by the poles of the closedloop transfer function. and decrease the sensitivity to parameter variations. provide disturbance rcjection.1 Stability The dynamic characteristics of the openloop system are determined by the poles of G(s) and D(s). an parabolas. The roots of the characteristic equation represent the types of motion that will be exhibited by the feedback system.2 SteadyState Errors . 2. ThiS kmd of system IS reterre ' to as type 0.not hal'e .~. 8) and the output .21) sometimes referred to as the sensith·it)'.2 BasIc Properties of Feedback 23 time of the system turns out to be longer than the specification. ramps. .2. (2.8 is Yes) R(s) D(s)G(s) system type = lim D(s)G(s) \~fl .· II' kew'I' s. . ~. is finite. For the case where rtf) is a step input and the system is stable. ' . (? 10) for the case where the deSIred output _. 2. (2. 2.22. we . K . For the unity feedback case. . is e.> when.20) that they can be altered at will by the designer via the selection of D(s}. .d and e d oes .. .gam. e' e ? ' The difference between the cornman d mpu t I' (s eFiu' _. '" ' . F ? 8 I d These results can also be seen guaiJtatll'ely by exammmg Ig. speed up the transient response.categonz~ the error chara~teristics for command inputs conslstmg of steps. the target natural frequency would be increased and the design repeated.. (2. lS " ' called the system error. Using Eq.01 ) This equation is called the characteristic equation and is very important in feedback control analysis and design.I' as a factor . (2. 2.1 summarizes the results. It is clear from Eq.2 Basic Properties of Feedback An openloop system described by the transfer function G(s) can be improved by the addition of feedback induding the dynamic compensation D(s) as shown in Fig.'. If'D( s )GI') has a denominator that . we define the Yelodt)' constant as K = limsDlslG(SI • 1.'~' . the lower the value of the error. 22 Chapter 2 Review of Contmuous Control 2.8 A unity feedback system Command input 1 When K is finite.T(s) 1+ D(s)G(s)  . .20) and is called the positionerror constant.I ~:feasurement nohe. the steadystate gam mfimte . the Final Value Theorem tells us that e = " 1+ KI' where K fI I 2. .. U "Ing E g. There f'ore.2. Continuing.. Table 2. thus producmg an .8. An mtegrator . the roots of the denominators of G(s) and D(s). K1 ' " are finite. the roots of 1+ D(s)G(s) = characteristic equation O. R(sl 1+ I D(s)G(s) = Sis).10).\.. or e~ for \ to be at some desired value (= r). .. It IS convement to .. we can see that the transfer function of the closedloop system in Fig. Type 2 f' 0' . In this case. will be x' and the error will be zero.as t e Property that a zero :. . we find that Ei. that is.19) sometimes referred to as the complementary sensitivit).eadv input can produce a finite output.. Table 2... (/ J'U Figure 2. call the system type 2.1 Errors versus system type for unity feedback_ Step Ramp "'1 _ Parabola X Type 0 Type 1 1 (lK a ) 0 0 K X . The feedback can be used to improve the stability. we call the system t ype. the hIgher the forward loop ham ~ Dc' (defined to be K i. improve the steadystate error characteristics. that is.
Eq. addition of a term proportional a' .25 »).25) ProportlOnal feedback control I d still bas a small st d can ea to reduced errors to disturbances but but t icall ea ystate error. I (2. Fmally.. we call this the positive or 180 locus. if we arrange h(s )Ia(s) in polar form as magnitude and phase. ' Typically. (2.. a(s} b(s) = Ke(t) e(I))dl) =} D(s) = K. If the controller also eliminated as we s ' . r t . . (2) helps the designer verify and understand computergcnerated root loci. The significance of the definition is that. thus producing a root locus. It is widely used in the'proces~ mercia controller hardwar b h only need "tune" t h ' h e can e purc ased where the user e gams on t e three terms. while it is very difficult to solve a highorder polynomiaL computation of phase is relatively easy.s)/{ds) is the sel of poinls in the where the phase of his) / a (5) is 180.er unctIOn IS r: D (5) . P d} namlc charactenstlcs. The root locus methol.= a(s) b(1) 180 + 1360. there tends to be a further to the erro d ' . 1I(t) = KTDe(t) =} D(s) = KTDs. 3 L refers 10 the pha:"le of I l. Equation (2.2. and K the position feedback oain. Thus. the method can be used to study the roots of any polynomial versus parameters in that polynomial. When K is real and negative. f en.. and (3) gives insight to the design process. We thus define the root locus in terms of the phase condition as follows. however. h(s}lals) must be real and positive for s to be on the locus. ThiS technique . 1I(t) 2.3 Root Locus 25 if ~~s):~~~~~~~:~:~. root locus definition s~plane 180' loClls definition: The root locus of h(.. IS called the integral (or reset) time T the d .23) and derivative control . (2.l 2.l~ case the type is determined by the number of whO h ' (5) anI}. For the typical case.. ne rans. When K is positive..ut In th. t' . then the phase of h(s)la(s) must be 180. inltegral. if K is real and positive. • . The root locus is the set of values of s for which Eq.o or G(s).s \ne~ 0 • ._.3 Root Locus The rootlocus is a techniq h' h h characteristics influence th~eC~O:~d_~o~wS ~ow c... In fact. (2. Therefore. = u(s) e(s) = K(l + T 5 + TDs).22) (2. the error to a step can be deterioration of th:~m the prevIOus seetlOn. this need not be the case. In other words. h(s)la(s) must be real and negative. IS most commonly used to study the effect of the 100 the method is general and can be used to studY~hgal~ (K Ifn Eq. The purpose of the root locus is to show in a graphical form the general trend of the roots of a closedloop system as we vary some parameter. op ". and derivative (PID) control contains three terms They are proporttona control .e~~:~~tstate error System type can also be defined with respect to the dt'sturb . e ellec t 0 any parameter In D(s) where I is any integer.. A key atlribute of the technique is that it allows you to study the closedloop roots while only knowing the factors (poles and zeros) of the openloop system. 2.26) represents the characteristic equation of the closedloop system. It can also increase the speed of response inclu~~s a t~~tpt~ep~~~~no~ ~I~ger ttran~ie~t overshoot. the phase of b(s)1 a (s) must be 0 .1 Problem Definition The first step in creating a root locus is to put the polynomials in the root locus form I+K=O.24) T. .3. This case is called the 0' or negative locus. ynamlc response. (2.26) integral control u(t) =  T. . Thus the combl' d t' " . h Id b . K[' 0 (2. Since the phase is unchanged if an integral multiple of 360 is added. It a system had a disturbance as shown in Fig 28 e" of the system would only be ~e. we can express the definition as' L'.26) shows that. ance Inputs w The sam'd integrato.26) holds for some real value of K.3 PID Control ProPortional. (2. Being able to do this by hand (1) gives the designer the ability to design simple systems without a computer... However... envauve can add dmpmg to the dynamiC response These thre i~::t~i~~~nmdecdof. e In egra 0 the error.morm the ~l'lassical PID controller.hanges in t~e system:s openloop allows us to plot the I f h.va Ive tIme. ocus 0 t e closedloop roots m the splane as an 0 enIo parameter vanes. Kb(s )/a(s) is the open loop transfer function D(s )G(s) of a feedback system: however.0+ Chapter 2 Review of Continuous Control 2.. 2..
Lo/. For n . STEP 5 If further refinement is required at the stability boundary. STEP 2 Draw the locus on the real axis to the left of an odd number of real poles plus zeros.2···/)m. centered at 11 (Y STEP 8 Select the desired point on the locus that mee!s the speCifiCatI. . For this case. mark poles (roots of ofv I) by an x and zeros (roots of a(s)) by a o. .. the definition of the root locus in terms of the phase relationship is o loclls definition: The root locus of IJ(s)! 0 (s) is the set of point. qo/. in the splane where the phase ofb(s)!a(s) is O. They are STEP I On the splane. . . therefore. there will be a branch of the locus arriving from infinity along each asymptote.J L. STEP 4 Compute locus departure angles from the poles and arrival angles at the zeros where =" 0/ . '··11  m.. along ... STEP 3: n . 1fI. the negative real axis. there is one asymptote"nd it departs at 180 .26 Chapter 2 Rc\iew of Continuous Control .m < O.. that IS.1 R110{ LoCHS where q is the order of the pole or zero and I takes on q integer values so that the angles are between ± 180'.HiO .180 = .. There is a zere at I = 0 and poles at I = ±j. STEP 6 For the case of multiple roots.. (J J6) to find that the va ue a _. .2 Root Locus Drawing Rules The steps in drawing a 180· root locus follow from the basic phase definition.In = I. nm l1m 180' + (I .. two loci come together at 180 and break away at ±90'. The loci branches start at poles and end at zeros or infinity. STEP 3 Draw the asymptotes.nr For n . .1)360 and leaving at angles <PI' where m = number of asymptotes 11 = order of a(s) m = order of b(s) 0'= A. STEP 7 Complete the locus.o.3 Root Locus 27 2.J)360' 1= L 2 l1m LP.90 . STEP I: STEP 2: Firstlet"s do the 180 locus.' K 2. There will be a branch of the locus departing from every pole and a branch arriving at every zero. Three loci segments approach each other at angles of 120 and depart at angles rotated by 60 . is the angle of the line going from the i". the Steps above are modified as follows STEP 2 Draw the locus on the real axis to the left of an even number of real poles plus zeros.. then use the magnitude conditIOn from E q.'ons (f:'K')' .J r ~ <Pi . + L L 180 1360 180 +1360 • Example 2.' When K is negative. q "."<P.. . Similarly. + 1360. There is a locus on the entire negative real axis.1360 =" "0/. 'I' I __ ~~ a l +b l .. <P.. Sketch the root locus versus K (pOSitIve and negan\e ) f or th> ca" where the openloop system ~ is given by I G(I)= K I' + I' Solution. assume sl> = jwo and compute the point(s) where the locus crosses the imaginary axis for positive K.3.1' = 0/. STEP 4: The departure angle at the upper pole is calculated as <PI = 90 .associated with that point is 1 Ib(s"Jla(s)1 . The locus departure and arrival angles are modified to q If'Jt'p A. 0/.m > O....L. ¢>i is the angle of the line from the if I.L.. using the facts developed in the previous steps and making reference to the illustrative loci for guidance. Shd(h .. Note that the 180' term has been removed.. rP l STEP 4 = IIIn 1=1. = L¢>. qrP". zero. . STEP 3 The asymptotes depart at (l . L. pole tll the pole or zero whose angle of departure or arrival is being computed. there will be a branch of the locus approaching each asymptote and departing to infinity.
J 1. 1.k). ong t e entire negatIve real axis: however. + .a 28 Chapter 2 Review of Continuous Control 2. Plot the root locus using MATLAB I .5 Root Locus 29 0. .< and Drs) = K s + 10' +3 1...5 2.IO(a1.3 ComputerAided Loci The most common approach to machi . (2.. and that erefore.5 3.18).is I. The result is sh~wn in the figaUongbt ehpodsltlve real axis and the angles of departure re y t e otted Imes.. are both 0 .9 For the 0 locus. complex branches form a senu' . . h ..16)(2. the sensitivity of the root locations to the parameter value is very great. 1. . also know that there is a locus b . 2... for the openloop system shown in Fig. The statement \' \' f [K.8 with 10 G(s) = s(s + 2)' .• 0.7 sysCL = feedback(K*sys. 2. it is useful to have the root locus plotting rules in mind when interpreting computer plots. we .5 '.~ its n roots by any of many available numerical methods. The departure angle from the lower pole also turns out to be 180 and h to the left.IO(b).p] = rlocfind(sys) will place a crosshair on the plot which can be moved with the mouse to the desired point on the locus in order to find the associated gain K and pole locations p. wc e as t ey app h hI' sho.3. (~3.5 ::0~0~. there is a segment I h . . The MATLAB script following will generate the desired locus plot which is shown in Fig.5''_. The polynomial is generally solved by transforming the problem to statevariable form and using the QR algorithm which solves for the eigenvalues of the closedloop system matrix. ) to the lett. Real .. Reconcile the root locus plot with the hand plotting rules and compare the computerbased step response with the rules of thumb in Eqs. and sometimes important features are missed. . denD = [1 2 10J Ij' 1\ 1\ numG = 10. and. 2.. I h P t In OpposIte directions.3 Figure 2. The solid lines in Fig. the locus departs from the upper pole horizontall ' . . It turns Out that the two .9 Example root locus sketch 1. 2. t at branch of the locus also departs horizontally We know that there is a locus segment al h' . denG = [1 '1 1 °] sys = tf(numD.denD)*tf(numG. the plots appear to be irregular. As a result. for a sequence near zero to a large value. near a point of multiple roots.1:4 rlocus(sys.7) the script • 2. the problem as a polynomial in th t: ne c~mputalton of the root locus is to cast of values of K varying from e orm a s) Kb(s) = 0.i' thus. roac t e rea aXIs.2 CACSD Root Lows 1.. solve the polynomial for K = 3. 1) step(sysCLl produces the desired step response shown in Fig..' the sketch of this 180 locus. Find the gain K associated with the point of maximum damping and plot the step response with that value of K... h h ranc movIng to the right and t ere is a branch departing to infinity at th f 1 f Th amvIng at t e zero. Solution. th~ tw·o branches from the poles must join the real axis at some point and: : e t. For example.2. Given this value of K. A disadvantage of this method is that the resulting root locations are very unevenly distributed in the splane.5 • Example 2. and the roots just fly through such points.~ .. numD = [1 3]. ~~_~'_~ 2 __ 2 15 I 0.. o r+j_4..denG) k = 0:0.
can K = (4...' would be found by performing the partial fraction expansion. 2.pansion of Eq.74.2 14 1.and centered at 2 UoW t (2.4 Frequency Response Design 31 Figure 2. A partial fraction ex.7)(3.~:':''c_.JW. 6 '. Providing that all the natural behavior is stable. the time response is 35 h. "" I.1 ± '3 j' ~ Ph complex roots.3 sec w" 4.6 u IG(S)II'~jw. 0...2)( 10) .. suggest that where a and a.t_ W 05 oOJ(0~.5 is the distance to the pole J cr u' + __ + __ s + JW I S . that is Yes) = . The predicted Mf is sub.J 10 5 o Real Axis (a) < ~I/ ~ v U(s) where the input u(r) is a sine wave with an amplitude of Uo and frequency u(t) = U"sinw.~ IS e distance to the pole at s .27) a= +32 10 = 4. (2. The rules of thumb given m Seellon~. = 0. !. t us .7 radlsec d _ 3 . J . A system described by Y(s) = G(s). (s:e p 3 )~~g_ has branches departing the real axis at the multiple root.IO(a) has locus segments to the left of odd numbers of poles and zeros (Step 2).29) Mp "" e"'~ = 4S! (F'I g. The root locus in Fig. that are a linle slow due to the presence of the extra pele. o After the natural transients have died out. K step response The ruleofthumb value.8 I 1. s· + 11Jj has a response with the transform.'. ~o oS 2 4 .4!n:r::O.tantially too small due to the pre.28) = . .8 Time (sees) Ibl which has a Laplace transform . 1.5)(7. _ 0. or t e .:.2) _ (3." ' an a .(Step 6). based on the second order 'ystem with no zero' predict a t.:~_ _. ""  1. _ (2..fl O ' • 2. w = 4. where A = IG(jwt)1 = t. .2~rot.30) . _.. 0.6 1.7).27) will result in terms that represent the natural behavior of G(s) and terms representing the sinusoidal input. .ence of the zero at s = 3.8 = 0.38 sec = 1.10 Example of CACSD for (a) root locus and (b) e.2 is the distance to the zero at The slep response shown in Fig.4 sec. has two asymptotes departing at ±90. 7 _ . those terms will die out and the only terms left in the steady state are those due to the sinusoidal excitation. and t...3. (2._J 0.sa 30 Chapter 2 Re\iew of Continuous Control 2. J _. (2.6 0.. and 10 IS from the gain of G(s). t . ' .1 Orb) has t. be determmed from Step 8 by .4 Sec and M :::lOS!. The gain associated with the desired root at s = 3 5 ± '3 I .4 Frequency Response Design The response of a linear system to a sinusoidal input is referred to as the system's frequency response.3. 2. Uow. between the two po es at .. :hse~ ~~is7t~edi~ance from the root to the pele at s = 0: 3.5. ~ I 7 .5. Y(s) = G(s)~"" s' +Wj I ~ 3. U(s) = .7 are at 5 = 5.2.10: 3..:. The closedloop roots with K = 3. . .
1 0.11 Magnitude and (b) phase of a secondorder system 10 . A (Cr)1 ) of Y with respect to the input. A key reason that the frequency response is so valuable is that the designer can determine the frequency response experimentally with no prior knowledge of the system's model or transfer function. as evidenced by Fig.11 which is done by MATLAB with bode(sys).08 ... a stable linear system G(s) excited by a sinusoid will eventually exhibit a sinusoidal output y with the same frequency as the input u. ...6 0.ncies.02 f .. or the splane measure of natural frequency w. The bandwidth w BW is a measure of the speed of response and is therefore similar to the timedomain measure of rise time I. = IG(jwl)1 and the phase. . I 0.6~ 04 02 0. 2.13 depicts the idea graphically for the frequency response of the closedloop transfer function (defined to be T(s) in Eq." I are plotted for various values of ~ in Fig. By convention. Figure 2. is LG(jw ): that l l is. 2.. 2.i + + 0.11 where the peak is approximately the value at w = w".6 0.8 I CrJ/w n 4 6 8 10 (bl ..04 . for the system shown in Fig.2 0.4 Frequency Response Design 33 So. the bandwidth is the frequency of r at which the output y is attenuated to a factor of 0.. is a measure of the damping.~  t~ I 180' . the analysis of the frequency response of a system is very useful in the determination of stability of a closedloop system given its openloop transfer function.707 times the input (or down 3 dB).32 Chapter 2 Review of Continuous Control 2. ¢(w ). at the higher excitation freque. ITI < I....12 with a sinusoidal input T.7.6 4 1 _ 20 .0. In addition to the response to a sinusoid.. 1 + KG(s) The plot is typical of most closedloop systems in that I) the output follows the input.5.1 0.8 I 4 6 10 8 10 2.. The phase <!>(w) is the measured difference in phase between input and output signals.19» Vis) .._~ (s/w. .1 0... For other damping ratios.01 0.1 Specifications A natural specification for system performance in terms of frequency response is the bandwidth. The resonant peak M. 0.' In fact.2 04 0. As an example. [TI ~ I.. bandwidth I I' 30 9 . (2. the magnitude and phase of G(s) is evaluated by letting s take on values along the imaginary (j w) axis. R(s) 0' i'l !I !. which is b for ~ < 0. and 2) the output ceases to follow the input.8 1_•• 0. 2. The magnitude. defined to be the maximum frequency at which the output of a system will track an input sinusoid in a satisfactory manner. 120' .06 _. KG(s) =T(s)=.11 that the bandwidth will be equal to the natural frequency when ~ = 0...4 0. The system is excited by a sinusoid with varying frequency and the magnitude A(w) is obtained by a measurement of the ratio of the output sinusoid to input sinusoid in the steadystate at each frequency.)' 2~(s/w.) I (a) Figure 2.0.8. the bandwidth is approximately equal to the natural frequency with an error typically less than a factor of 2. at the lower excitation frequencies.I 0. frequency responses of the secondorder system G(s) = '.4. it can be seen from Fig.
14 Phase plot for jwr r = 0.3 I I I 1' Bandwidth.11(a) using the relation that IG(jw)1 = 1/(2~) at the break. Use dividers if an accuracy of about ±5 is desired. Complete the composite magmtude asymptotes by extending the low frequency asymptote until the first frequency break point. the gradual change of phase is +90'...1 w(radlsec) 0.. in the denominator.)r '" . Asymptote + 1. H..4. the composite curve can be done by eye.4 (+3 dB) at first ordernumerator breaks and decreasing It by a factor of 0.4 . Sketch in each individual phase curve as indicated by Fig. This idea is very useful in designing compensation. the change is 90·c • For second order terms._. For first order terms in the numerator.sl~ . + I) + l)(jwTb + I) . and continuing through all break points in ascending order. In plotting a composite magnitude curve..3. STEP 8 Graphically add each phase curve.707 (..2._.. the change is ±180'. wEW . STEP.. Figure 2.. STEP 4 Sketch in the approximate magnitude curve by increasing from the asymptote by a. . and will approach the intermediate asymptotes to an extent that is determined by the proximity of the break points to each other. sketch in the resonant peak (or valley) according to Fig. the low frequency asymptote is given by (2. then stepping the slope by ± I or ±2.factor of 1...1 \(b).. sketch in the approximate phase curve by changing the phase gradually over two decades by ±90' or ±180 c at each break point in ascending order.1.. (b) check computer?ase~ results..02 0. Figure 2. 0. STEP 7 Locate the asymptotes for each individual phase curve so that their phase change corresponds to the steps in the phase from the approximate curve indicated by Step 6.4.2 Bode Plot Techniques It is useful to be able to plot the frequency response of a system by hand in order to (a) design simple systems without the aid of a computer.//Asymptote / + .3 SteadyState Errors Section 2. 2.2 showed that the steadystate error of a feedback system decreases as the gain of the open loop transfer function increases. 30 0 001 0.~ .4 Frequency Response Design 35 Figure 2. Chapter 2 Re\iew of Continuous Control 2. If lessor accuracy is acceptable... keeping in mind that the curve will start at the lowest frequency asymptote and end on the highest frequency asymptote. the lower the steadystate errors will be for the closed loop system. Bode developed plotting techniques in the 1930s that enabled quick hand plotting of the frequency response.31) Therefore.1 Break point 11 0 STEP 2 Determine the value of n for the K)jw)" term. Plot the lowfrequency magmtude asymptote through the point K a at w = I rad/sec with a slope of n (or n X 20 dB per decade). and (c) understand the effect of compensation changes in design IteratIOns...: " C. + l)(jwT. </J = n x 90'. 2.2 0.. depending on whether the break point is from a first or second order term in the numerator or denominator.14 or Fig. W.7 o ._. 60' ::: ..13 Definitions of bandwidth and resonant peak 10 20 :. ::j " 30" " 0" r~.2 e ~ ] I 0.3 dB) at first order denominator breaks.12 Simplified system definition STEP 5 Plot the low frequency asymptote of the phase curve. 2.. 2.. His rules are: STEP I Manipulate the transfer function into the Bode form KG(jw) = K (jw)" (jm l o (jWTu 2.~. 3 Determine the break points where w = 1/ f. we see that the larger the value of the magnitude on the lowfrequency asymptote.1 20 I: I I (J) (rad/sec) STEP 6 As a guide. At second order break points.
4 Stability Margins If the closedloop transfer function of a system is known. (2. the stability condition is IKG(jw)l> I 90 180 if 11 = 1. The easiest way of determining' the v~lue of K. Typically. it is usually only . When IK G (j w) I = I. (2.I I Thus a Bode plot of a system that is neutrally stable (that is. That means that the magnitude plot must equal I at the same frequency that the phase plot equals 180'. The phase margin (PM) is the amount by which the phase of G (s) exceeds . The two margins are alternate ways of measuring the degree to which the stability conditions of Eq. However. if it were known that a system was to be designed using frequency response methods. and L(KG(jw)) = 180'.34) at L(KG(jw» = 180. One way that will frequently resolve the ambiguity is to perform a rough sketch of the root locus to resolve the question of whether increasing gain leads to stability or instability.32) When the slope of IG(jw)1 versus w on a loglog scale persists at a constant value for nearly a decade of frequency. therefore. (a type I system) the low frequency constant. K p ' For a system where II asymptote has a slope of 1 and K.4. In some cases. the closedloop transfer function is not usually known.. (2. The gain margin (GM) is the factor by which the gain is less than the neutral stability value when the phase = 180 . the PM would be approximately 90'. Two quantities that measure the stability margin of a system are directly related to the stability criterion of Eq. however.33): gain margin and phase margin.5 Bode's GainPhase Relationship One of Bode's important contributions is his theorem that states For any minimum phase system (that is. (2.1 that all points on the root locus have the property that IKG(s)1 = I and L(KG(s») = 180'. (a type 0 system) the low frequency asymptote is a constant and the gain K of the open loop system is equal to the position error 1. we have the condition for stability jKG(jw)1 < I x 90'. directly.33) crossover frequency where 11 is the slope of IG(jwll in units of decade of amplitude per decade of frequency. therefore the asymptote can be extended to w = I rad/sec in order to read K. We saw in Section 2. one with no time delays. This can be done without a math model of the system by experimentally determining the openloop frequency response. to ensure a reasonable PM. the lowest frequency break point will be below w = I rad/sec.34) is used as a guide to infer stability from IG(jw)1 alone. in a type I system is to read the magnitude of the low frequency asymptote at a frequency low enough to be weI! below the any of the break points because ~ equals the magnitude at these frequencies. Equation (2. we would like to detennine closedloop stability by evaluating the frequency response of the openloop transfer function K G(jw) and then performing a simple test on that response. therefore. = K .32). the most common situation.4. (2. the crossover frequency. it would make sense to specify the speed of response of the system in terms of a required bandwidth and the stability of the system in terms of a required phase margin. 0 = gain margin phase margin 2. at L(KG(jw» = 180'. (2. the phase of G(jw) is uniquely related to the integral of the magnitude ofG(jw).36 Chapter 2 Review of Contmuous Control 2. Therefore. For stability we want LG(jw) > 180 for a PM> O. ~ 100 PM is commonly used.4 Frequency Response Design 37 For a system with n = 0. with the value of K such that the closedloop roots fall on the imaginary axis) will satisfy the conditions of Eq.1 for continuous systems. For a secondorder system. there are systems where an increasing gain can lead from instability to stability and in this case. The phase margin is generally related to the damping of a system. 2. RHP zeros or At the point of neutral stability we see that these rootlocus conditions hold for s = jw. the phase LG(jw) LG(jw) ~ ~ This stability criterion holds for all systems where increasing gain leads to instability and IK G(jw)1 crosses the magnitude = I once. The rigorous way to resolve the ambiguity is to use the Nyquist stability criterion. the relationship is particularly simple LG(jw) ~ 11 ! I I .3. If the slope is I for a decade above and below the crossover frequency.33) are met. the stability of the system can be detennined by simply inspecting the denominator in factored form to observe whether the real parts are positive or negative.5. if 11 = 2. the approximation that l. so IKG(jw)1 = I poles). a system becomes less stable as the gain increases.180 when IKG (j w) I = I. However. which is reviewed in Section 7. Therefore we adjust the IKG (j w) I curve so that it has a slope of I at the crossover frequency.
2.4....T _.2.0.den) bode(sys). noting (STEP 4 in Section 2..15 Magnitude and phase plots with PM and GM for 1/s(s + 1)2 [0 20 ~ ~ . 2..20 I I ! . . We need only indicate on the figure where IK G(jw) I = I for selected trial values of K since varying K has the effect of sliding the magnitude plot up or down. Solution. We can then sketch in the actual magnitude curve..:.. The Cune is sketched in Fig. In fact. Typically.:. it takes the form D(sl=K s+~ s+p = 0. • lead compensation lag compensation where it is called lead compensation if ~ < p and lag compensation if ~ > p.2 4 All MATLAB statements in the text assume the use of !VlATLAB version 5 with Control System Toolbox ver~ion 4. The curve.i'\: .15.. (a) We can read the PM from Fig.1 I I .5... and iii! 70'.s are drawn in Fig.pullscDestgn For a plant given by I G(s) = K . will also create the plots of magnitude and phase for this example. The slope changes to 3 at the break point (w = I). the statements 1 ~ lSO' t f. 2. . we see that the low frequency asymptote has a slope of I and goes thm magnitude = I at IV = 1 rad/sec. 2.15 to be 22'. figure 2. (el (i) PM = . & 0.2 w I radlsec~ 10 L num=l. Using the hand plotting rules.Ir02 I I t.~ 1 I 0..6 Design One of the very useful aspects of frequencyresponse design is the ease with which we can evaluate the effects of gain changes.16 showing the PM's for K = 5. ..5 when K 2. ~ ~lJ ~ I 05 ll. Lag compensation approximates integral control and tends to Improve the steadystate error.II 'j 0.. SiS + 1)90' W (radl~~cl I I I I ·t··t . (b) detennine if the system is stable if K = 5.4.. L sing MATI.5.::.. we can detennine the PM for any value of K without redrawing the magnitude or phase infonnation.5 .. and Ic) find what value of K is required to achieve a PM of (i) .16 shows that the system is unstable for K=5. Lead compensation approximates the addition of a derivative. (b) Fig.. then some modl~catl~n or compensation must be made in the feedback to achieve the deSlfed speCIficatIons.: I I I 10 I • Example 2...::. 2.3 friqU~llc\'Rc.2) that it will go below the asymptote intersection by 6 dB because there is a slope change of 2 at that break pain!.::.AB"..38 Chapter 2 Renew of Continuous Control 25 Compensation 39 necessary to insist on a I slope (20 dB per decade) persisting for a decade in frequency that is centered at the crossover frequency.5 Compensation If the plant dynamics are of such a nature that a satisfactory design cannot be achieved by adjustment of the feedback gain alone. 2. I I I I I I I I I I I determine the PM and OM for the system with unity feedback and (a) K = I. See Appendix F if you have prior version~. and (ii) PM = 70' when K = 0. control tenn and tends to increase the bandwidth and the speed of response while decreasmg the overshoot.15 showing the PM and GM for K = 1 and the same cun'es are drawn in Fig. The phase curve starts aU! at 90' and drops to 270 along the asymptote as sketched in the figure according to STEP 7. den=11 2 OJ sys = tf(num..
is to detennine the control. (2. The maximum phase increase is o¢ = . the low frequencies. called multivariable or multi inputmulti output (MIMO). One of the attractive features of the statespace design method is that it consists of a sequence of independent steps. 2..pace design.1) and (2. Chapter 9 extends statespace de. The desig~ of lead compensation typically entails placing the zero ~ at a frequency that IS lower than the magnitude = I crossover frequency and the pole higher than the crossover frequency. Lead compensation provides an increased magnitude slope and an increased phase in the interval between these two break pOInts..he discrete case and that chapter does not require that the reader be knowledgeable about continuous state.17. we will review only the single inputsingle output (SISO) case here. The purpose of the control law is to allow us to design a set of pole locations for the closedloop system that will conespond to satisfactory dynamic response in terms of risetime.1. However. The statespace design approach utilizes this way of describing the plant and anives directly with feedback controllers (compensation) without the need to determine transforms.5 0.KG()WJI ~ I for K ~ 5 . discussed in Section 2. overshoot. The design of lag co~pensation typically entails placing both break points "':el.. this will decrease the steadystate error. ~ should be well below the crossover estimator observer . which computes an estimate of the 270' 0.2).6 StateSpace Design We saw in Section 2.6 SWleSpace Design 41 Figure 2. the maximum being halfway between the two break points on a logarithmic scale.6. . 1 ~o 10 I .2.2 ~ 6 ~ 10 I cO ~IJ 60 lIt) OJ .1 that equations of motion could be written in the statevariable form of Eqs. · 40 Chapter 2 Review of Continuous Control 2. 2. or other measures of transient response.2 w~radl)ec) 10 .1.ign for discrete systems to optimal control design for the multi variable case. The first step.3. The second stepnccessary if the full state is not availableis to design an estimator (sometimes called an observer). J Sin  Ia I+a where a=p III I and is plotted versus a in Fig.I . For readers not familiar with statespace design.c ~ u Maximum phase increase for lead compensation ~() B 30 ()' IL_ 0 1J.4. the material in this section is not required for comprehension of the remainder of the book.he frequency response) at. The basic ideas of statespace design are covered in detail in Chapter 8 for r.s Figure 2. frequency in order to prevent the compensation from degrading the PM and the system stability.~~KOO' ~ ~~~ I IKGI)w) I for K ~ o. Lag compensation decreases the phase in the VICInity of the two break points: therefore. The primary role of lag compensation is to increase the gain (magnitude of r.1 below the crossover frequency.16 PM versus K for 1/(s + 1)2 ':k0~..17 ~o ~ . Advantages of state· space design are especially apparent when the system to be controlled has more than one control input or more than one sensed output. As we saw in Section 2.
18 shows how the control law and the estimator fit together and how the combination takes the place of what we have been previously referring to as compensation. p. It is theoretically possible to solve for K by hand with Eq.6. . however.37) are in desirable locations. Substituting the feedback law.37) When evaluated. Slate "'ector estimate : I Compensation will provide the desired value of K. . the system may be nearly uncontrollable and moving such a pole may .. say s=Sj.1 2 )'" (s . A modest limitation on place. (2. P) I I I : L. The third step consists of combining the control law and the estimator. Their output is the feedback gain K.. that the poles are distillct. K". G. implemented in MATLAB as the function place.2). (2.m is that none of the desired closedloop poles are repeated: i. (2. For now.. Ackermann's formula for this calculation has been implemented in MAT LAB as the function ackerm and can be used for the design of SISO systems with a small (s 1m number of state variables. F and G. an infrequent situation for an actual system. The calculation of K can be done providing the system is controllable. .. For more complex cases a more reliable formula is available.e .38). K". : Hence the required elements of K are obtained by matching coefficients in Eq.(F .. We review estimator design in Section 2. this is almost never done.. (2.5. sn· 2. The controllaw design then consists of picking the gains K so . Both acker and place require inputs consisting of the system description matrices. Then the corresponding desired (control) characteristic equation is u.18 Schematic diagram of statespace design elements I Plant c!!+ x ~ Fx + Gu ~I~.. In practice. Systems that are not controllable have certain modes or subsystems that are unaffected by the control. When selecting the desired root locations. when a zero IS near a pole. by Eq..GK)] = O.s:! . and SInce there are n roots (or poles) ofthe system."'2 Chapler 2 Review of Continuous Control 2.4 we will show how to introduce the reference input in a different way that results in a better system response. This usually means that parts of the system are physically disconnected from the input. Eq...37) and Eq. overshoot and settling time values. The fourth and final step is to introduce the reference input in such a way that the plant output will track external commands with acceptable risetime. Thus the MATLAB statements : I ~ K \latrix of constanlS I :1.36) = Fx~ GKx.35) into the system described by Eq. this yields an /lthorder polynomial in . (2.that the roots of Eq.35) controllability X rl ji pole placement Ii 'I We assume for design purposes that all the elements of the state vector are at our disposal.18 shows the command input r introduced in the same relative position as was done with the transform design methods.3 entire state vector when provided with the measurements of the system indicated .6 StaleSpace Design .1 .(s) = (s .'" K]l':~J' t! • (2. we will assume that the desired locations are known. Figure 2. it is good practice to insist on the stronger condition that the control input be as mungly coupled to the modes of interest as possible..I. x I Estimator : I ~ r K = acker(F. in Section 2. .I containing the gains K" . (2.6... Furthermore.2.37) and Eq. a requirement that does not apply to acker.1 Control Law The first step IS to find the control law as feedback of a linear combination of all the state variablesthat is. (2. it is always useful to keep in mind that the control effort required is related to how far the openloop poles are moved by the feedback. (2.. (2. and a vector. x The characteristic equation of this closedloop system is det[sI . Selection of deSirable locatIOns for the roots is an inexact science and may require some iteration by the designer. Figure 2. Y . This forces the system characteristic equation to be identical with the desired characteristic equation and the closedloop poles to be placed at the desired locations. G.6..) = O..38).38) u=Kx=~[K I j 1 _ K. of Il desired pole locations. Pl or K = place(F. but an expedient assumption for the time being. I : Control law 1 '. Although there is a mathematical test for controllability. it is possible that there are enough degrees of freedom to select arbitrarily any desired root location by choosing the proper values of K i • Figure 2.)(. (2. For an nthorder system there will be 11 feedback gains K.. J ~ ..1) yields (2.
J. (2.5]. which produces natural frequencies of r ill" = I.05] K = Iqr(F. in more complex systems with higher order roots.(s) J = 1" = s' [xTQx + uTRu] dt + 2i. (a) The desired characteristic equation is Cl'.4 SlateSpace Control Design For a plant given by 1 G(s)= " K = [J 1.39) Therefore..2. it is easier to use Iqr rather than iterate on the best value for all the roots. (2) the damping increases as the term in Q that weights the velocity type state elements increase. R is an III x III control weighting matrix.. = O. K.Q.. and 0.00] where Q is an n x n state weighting matrix.79. p = eig(F . Q= and R = I."'. a pole placement philosophy that aims to fix only the undesirable aspects of the openloop response and avoids either large increases in bandwidth or efforts to move poles that are near zeros will typically allow smaller gains and thus smaller control actuators.G.R) solves for the K that minimizes the cost. and (3) a portion of a system can be made faster by increasing the weights on the state elements representing that portion of the system.G.71. = 0. III = 1 and R is a scalar R... 2.1] Wn=3 Ze = 0.. Therefore.71. Q = [10. G = [~] = O..4]. and damping of = 3 rad/sec and i. and F= [~ ~l 0]. i. the element representing the system output is often the only element weighted.'.G. and 3.2 rad/sec (a) Find the feedback gain matrix K that)'ields closedloop roots with = 0.. A method called the linear quadratic regulator (LQR) specifically addresses the issue of achieving a balance between good system response and the control effort required. = I) The statevariable de&eription of G(s) is (Eq. The method consists of calculating the gain K that minimizes a cost function Solution.... Rules of thumb that help in picking the weights are that (I) the bandwidth of the system increases as overall values in Q increase.4) with "'" = O. The weights Q and R are picked by the designer by trialanderror in order to arrive at the desired balance between state errors x T x and control usage u~. It is perfectly acceptable to only weight one element. R= 1 K = Iqr(F.  .. . and III is the number of control inputs in a multiinput system. i. Chapter 2 Review of Continuous Control LQR .G*K) [Wn. thus avoiding the necessity of picking desired pole locatiuns that do not use excessive control. 0..p) provides the answer K .8]. For this simple example. The MATLAB statement G = [0. use of acker is the easier way to find K: however. (b) Investigate the roots obtained by using LQR with IJ.Q. Q is a diagonal matrix with a weighting factor on one or more of the statevector elements while R = I. and [10 5]..0 0].[9 (b) The scripts 4.. For the 5150 systems that we are primarily concerned with here. [10 4. "=[1 J =0.8 P = roots([l 2*Wn*Ze Wn"2]) K = acker(F. Generally.Ze) = damp(p) compute feedback gains of • Example 2. in fact. 3.R) [100 0.' + w~ (2.. [~ ~l 0] [100 5 o . the MATLAB script F = [0 1.8.0 OJ.6 StateSpace Design 45 optimal control require large control effort. and [1000.
1) and (2. and a random sensor noise. If sensor noise is particularly large. (2. Since the only quantity affecting the result is the ratio R.42) == O. R. H'. but the sensor noise. we compute L to achieve estimator poles at ~he de~r:~ IocatlOn.40) Here L is a proportional gain defined as L=[l.J R. (2. This ensures a faster decay of the estimator errors compared with the desired dynamics. (2. Errors in the model of the plant (F. 2. The solution is calculated by MATLAB as L = acker(F'. The dynamics of the error can be obtamed by subtractmg the estimate (Eq.)'" (s  f3. The tradeoff between fast and slow estimator roots can also be made using results from optimal estimation theory. R". It turns out that the optimal solution to this balance can be found as a function of the process noise intensity. (2. the' funclJons acke~.1) as x == Fx + Gil + GIlL'. On the other hand. (2. The state of a lowgain estimator will not track uncertain plant inputs very well or plants with modeling errors. Roughly speaking..(F . then the desired estimator characteristic equation is x where F T is indicated in MATLAB as F'.. As In the control case. observability refers to our ability to deduce information about all the modes of the system by monitoring only the sensed outputs. X. This means that x(t) wtll converge to x(t)' .LH)] (2.LH)x + G[lL'  Lt'. a balance between these two effects is required. . However.48) the sensor noise is multiplied by L and the process noise is not.45) and we now see that this is identical in fonn to Eq.HTLT)] = O.(F T . H'. (2. . then the estimator response will be fast and the disturbance or process noise will be rejected. . both of which are scalars for the SISO case under consideration.44) . . If L is very small.Rv).6 StateSpace Design 47 2. lL'.. x. It is important to emphasize that the nature of the plant and the estImator are quite different.46) entering Eq. (2. needs to be varied by the designer rather than picking II estimator poles for an /I'/' order system. (2. G.42). (2.43) IS detlsI .. the penalty in making the estimator poles too fast is that the system becomes more noise sensitive.41) and is chosen t? achieve satisfactory error characteristics. and the sensor noise intensity. Therefore. I. The characteristic equation of the error is now given by det[sI . L can typically be chosen s~ that the error IS kept accep~ably small.m are used. but with a slight twist. can be obtamed based on measurements of the output. results in large errors. The transpose of E q. R". called process noise. etc.f. (2. H) cause additional errors to the state estllnate from those predicted by Eq.ler's consider that there is a random input affecting the plant. from observability i = Fi + Gu + L(y  Hx). that enters Eq.Rw. First.2 Estimator Design For a system describ~d by Eqs. of the full state vector. (2. If we specify the desired location of the estimator error po les as Sf = fJ" f3" "" f3.2).I" . The selection of the estimator poles that determine L are generally chosen to be a factor of 2 to 6 faster than the controller poles.44) We can solve for L by comparing coefficients in Eq. so decays to ze!o.48) a.40).47) The estimator error equation with these additional inputs is ~ == (F .37) where K a d L T I the same role. y. it makes sense to let R.. Rather. to get the error equation ~ = (F. . (2. .. The seleclJon of L IS approached in exactly the same fashion as K is selected In the controllaw deSIgn. (2.40) from the state (Eq 2 I) . m~ependent of the control u(t) and the initial conditions.43) and Eq. p)' or L == place(F'. it sometimes makes sense for the estimator poles to be slower than two times the controller poles. (2. which would yield a system with lower bandwidth and more noise smoothing. There will be a unique solution for L for a 51S0 system provided that the system is observable. p)' L = kalman(sys.m and place.LH)x. Unobservability results when some mode or subsystem has no effect on the output. On the other hand. p. by typIng m MATLAB In Eq. l' (2.troillc U~ll computing the estimated state according to Eq. (2.43) optimal estimation We choose L so that FLH has stable and reasonably fast eigenvalues. this is almost never done by hand. an estimate. thus causing the controller poles to dominate the total system response.(s) ~ (s  f3 1 )(s  fJ. Clearly.). multiplied by L.6.. if L is "large".1) as v = Hx+ 1'. (2. (2. The plant is a physical system such as a chemical process or servomechanism whereas the estimator is usually an elec. An important advantage of using the optimal solution is that only one parameter. = I and vary R" only.46 Chapter 2 Review of Conunuous Control 2. then the effect of sensor noise is removed but the estimator's dynamic response will be "slow". so the error will not reject effects of lL' very well.
' steadystate values of the state. the design is complete and the equations describing the result are Figure 2. + L(y . Therefore..+KN. thus causing an estimation error that decays with the estimator dynamic characteristics in addition to the response corresponding to the control poles.IOta response consists of controller characteristics only. Since the Figure 2. and implement the Control law using the estimated state elements.6.40). e.20 . x n ' that result in no steadystate error..49). (2. 1I. /I.20(b). y. 2. The result is :~~t~e l' l Plant l Sensor N= N.49) These eguations describe what we previously called compensation. ThIS approach IS usuall) supenor. t· Its value is based on computing the steadystate value of the control. The poles and zeros of the compensator alone could be obtained by examining the system described by Eq. l' tl's dt'fficult to obtain an accurate value for I' plant gam.19 Estimator and controller mechanization )1" Ib) command creates a step in II that affects the plant and es~imator in an identical fashion both respond identically. that step need not be carried out unless the designer is curious how the compensation from this approach compares with compensation obtained using a transform based design method. = (F . that is. iherefore. ignoring for the time being the effect of a command input.LH)x = ~Kx. r.I ! I I the r n many cases. In . (2.6.6. 2. This scheme is shown schematically in Fig. 2. 2.a~o~ l.2. is calculated given the measured output. I I I I Compemawr laj _ : Estimator Plant 2. If we take the control law (Eq. Using this approach.a~eP:ors . + Lv.  HX) C~~~~:. Figure 2. (b) compensation in the feedforward path I L Plant 1 I Estimator : I i II (2. the control..48 Chapter 2 Review of Contmuous Control 26 StateSpace Deslgn 49 2.4 Reference Input One obvious way to introduce a command input is to subtract y from r in exactly the same way it has been done for the transform design methods discussed previously. An alternative approach consists of entering the command r directly into the plant and estimator in an identical fashion as shown in Fig.19 shows schematically how the pieces fit together. however. the value of N will not be accurate an ste " wifI result even though the model is suffiCiently accurate for good :.3 Compensation: Combined Control and Estimation We now put all this together. a step command in r enters directly into the estimator.6. fon pan because plants are typically nonlinear an<! the plant mode lS a me:nzaa~v icular oint.50) ~ 1 x=Fx+Gu ~ H  : : I I U(l)": Control Jaw K Estimator: : " ~ x=Fx'Gu ~ I ~ " ':'" j 2. combine it with the estimator (Eg.35). . Possible locations for introducing the reference input: (a) compensation in the feedback path.1 and 2. The roots of this new closedloop system can be shown to consist of the chosen roots of the controller plus the chosen roots of the estimator that have been designed in separate procedures in Sections 2. and no estimator error IS mduced.6.5 Integral Control . N. can be computed so that no steadystate error . where ~_Ylt) .20(a). 'The feed forward gain.GK .. there ar~ no estimator error characteristics in the response and the .
50
Chapter 2
Re\~ie\V
of Continuous Control
2.7
Summar)
51
feedback control design. The solution is to incorporate an integral control tenn in the feedback similar to the integral control discussed in Section 2.2.3. Integral control is accomplished using statespace design by augmenting the state vector with the desired integral x I" It obeys the differential equation
(= e).
• The key property of the Laplace transform that allows solution of differential equations is Eq. (2.5)
,[(j(t)} = s F(s).
Thus
X,
=
Ii
• A system's output can be determined by the inverse Laplace transfonn for very simple cases or, more often the case, by numerical methods such as impulse.m, step.m. or Isim.m in MATLAB.
edt.
• If a system's output is described by Xis) and is stable. the Final Value Theorem states that
,I~~ x(t) = x." = ~iI]sX(s)~
This equation is augmented to the state equations (Eq. 2.1) and they become (2.5l ) The feedback law is • One can associate certain time response behavior with pole locations in the splane as summarized in Fig. 2.5. • Control system specifications are usually defined in terms of the rise time t,. settling time t" and overshoot M p which are defined by Eqs. (2.16)(2.18). or simply • For an open loop system given by D(s)G(s). the closed loop system as defined by Fig. 2.8 is given by Eq. (2.19)
Yes)
i'l
With this revised definition of the system. the desion techniques from Section 2.6.1 can be applied in a similar fashion. The eleme~ts of K obtained are implemented as shown in Fig_ 2.21.
R(s)
= I + D(s)G(s)
D(s)G(s)
T
(5).
• The basic types of feedback are proportional, integral, and derivative. and are defined by Eqs. (2.22)(2.24). • The root locus is a method to sketch the location of the closedloop roots of a system vs. some parameter of interest. usually the feedback gain. It is based on phase considerations which can easily be detennined graphically by hand, and are therefore very useful in checking computer based results . • The frequency response of the openloop transfer function of a system can be easily analyzed to determine the stability of the related closedloop system. The openloop transfer function can be determined experimentally or analytically. • Design of control systems using the state space approach is carried out by specifying the desired closedloop root location. called poleplacement, or by selecting weighting matrices in a cost function. called optimal or LQR control. Either method tends to reduce the design iterations required over root locus or frequency response design, especially for higher order systems and those with multiple inputs and/or outputs. • State space design requires that all elements of the state vector are available for the control; therefore. they must be measured directly or estimated using measurements of a portion of the state vector. Pole placement or optimal methods can also be used to arrive at the best estimator for this purpose.
2.7 Summary
• System dynamics can be represented by a statespace description. Eq. (2.1). or by a transfer function, Eqs_ (2.6) or (2.7).
Figure 2.21
Integral control strudure
52
Chapter 2
Re\1eW of ContinUOUS Control
28
Problems
53
2.8 Problems
2.1 Design feedback with lead compensation for the openloop system
G(sl
2.7
Consider a pendulum with control torque
equation is
7;. and disturbance torque 7;, whose differential
=~. s
iI+41i=7;+7;r
Assume there is a potentiometer at the pin that measures the output angle fl. that is. \. = fl.
The rise time should be I sec or less and the overshoot should be less than lO'7r. 2.2 Design feedback with lead compensation for the openloop system
G(.<)=,.
(a)
,
5
The bandwidth should be faster than I rad/sec and the phase margin should be better than 50. 2.3 For the openloop system
G(.<)=,.
(b) Add an inte~ral tenn to your controller so that there is no steadystate error in the presence of a constant disturbance. I;I' and modify the compensation so that the specifications are still met. 2.8
Design a lead compensation using a root locus that provides for an Me < lOQ and a rise time. I < I sec.
Consider a pendulum with control torque T, and disturbance torque TJ whose differential equation is
ij
\'=&.
2
+ 48
=
7; + 7;"
(I,
r (a) design feedback assuming you have aCcess to all the state elements. Ensure that there are closedloop system poles at, = 3 ± 3j, (b) Design an estimator for the system so that it has poles at, = 6
Assume there is a potentiometer at the pin that measures the output angle
that is.
± 6j,
(a)
Design a lead compensation using frequency response that provides for a PM > 50' and a bandwidth. Ill ... > I rad/sec,
(e) Find the transfer function of the complete controller consisting of the control from part (a) and the estimalor Irom part (b). 2.4 For the openloop system
G(J)=~.~.
Ib) Add an integral tenn to your controller so that there is no steadystate error in the presence of a constant disturbance. 7;,. and modify the compensation so that the specifications are still met. 2,9 Consider a pendulum with control torque equation is
I
I;. and disturbance torque 7;, whose differential
sl,
+ 4)
(a) design feedback assuming you have access to all the state elements. Ensure that there are closedloop system poles that provide a natural frequency of III = 3 rad/sec with I; = 0.5. ' (b) Design an estimator for the system so that it has poles that provide a natural frequency of Ill, = 6 rad/sec with I; = 0.5. (e) 2.5 Find the transfer function of the complete controller consisting of the control from part la) and the estimator from pan (b).
i!'+4f1=I;+TJ
Assume there is a potentiometer at the pin that measures the output angle fl. that is, v = !:i. (a) Taking the state vector to be
Can you stabilize the system
G(,) = ',=,~
write the system equations in state fonn, Give values for the matrices F, G, H,
I
.,err + 25)
(b) Show. using slatevariable methods. that the characteristic equation of the model is ,,' +4 = O. (e) Write the estimator equations fm
2.6
with a single lead compensation" ffyou can. do it. ffyou can't. show why not. For the openloop system
Grs) =
, ,I sc(, + 25)
(a) design feedback assuming you have access to all the state elements. Place the closedloop system poles aU = I ± Ij. O,5±5j. (b) Design an estimator for the system so that it has poles als =  2 ± 2j. 2 ± 8j. Ie) Find the transfer function of the complete controller consisting of the control from pan (a) and the estimator from pan (b).
Pick estimator gains [L I • L]' to place both roots of the estimatorerror characteri"ic equation at , = 10. (d) Usin" state feedback of the estimated state variables 1:1 and to pl:ce the closedloop control poles at s = 2 ± 2j. Ie)
(f)
e. derive a control law
Draw a block diagram of the system. that is. estimator. plant, and control law. Demonstrate the perfonnance of the system by plaiting the step response to a reference command on (i) (I. and (ii) Td •
54
Chapter 2
Review of Continuous Control
2.8
Prohlems
55
(g) Design a controller with an integral tenn and demonstrate its perfonnance to the step inputs as in (f). 2.10 For the openloop system
Gisl =
de(ermine
,
2.18 Sketch a Bode plot for the openloop system
(5
+ 0.1)
+ 2.1 + 1(0)'
G(s) = ;(, < l)(s'
3
5+253
,
After completing the hand sketch, verify your result using MATLAB. With unity feedback. would the system be stable'7 2.19 Sketch a Bode plot for the openloop system
(a) the final lalue to a unit step input. ih) Answer (a) for the case where
100(.1
G(s) = s'C'
+ I) + 10) .
Gis) = _, _3_ _ .
s'
+ 2s + 3
After completing the hand sketch. verify your result using MATLAs. With unity feedback. would the system be stable" What is the P~1" 2.20 Sketch a Bode plot for the openloop system 500015 + 11 G(s) = .1'(.1 + lO)(s + 50)' After completing the hand sketch, verify your result using MA~AS, With unity feedback, would the system be stable" If not. how would you stablhze 11.
2.11 For the openloop system
3 G(s)=cc,s + 2,  3
assume there is a feedback with a proportional gain, K. and sketch a locus of the closedloop roots "', K. What is the minimum value of K to achieve a ,table system? 2.12 For the openloop system
I
II
j
!
,: 'I:, i
G(.»= , • r(r + 2s
+ 1(0)
.
Use a single lead compensation in the feedback to achieve as fast a response as possible. keeping the damping of the resonant mode better than i:; = 0.05. 2.13 Sketch the locus of roots "s, the parameter b for
\i
'I.,
s' + bs + b + 1 =
G(s) =
KC,
O.
If II:
i:l~
i ,.
2.14 Sketch the root locus with re.spect to K for the openIuop system
+ 3)
sC,
+ 2)(s + 1)
,.
!I ifi
After completing the hand sketch, verify your result using MATLAB. 2.15 Sketch the root locus with respect to K for the openloop system
K(s +2)
G(S) = 5''
~I' ,
Ii
After campleling Ihe hand sketch. verify your result using MATLAB. 2.16 Sketch the rool locus with respect to K for the openloop system
Gis) =
,jl
s,,
K(s +2)
After completing the hand sketch. I'erify your result using MATLAB, 2.17 Sketch Ihe root locus with respect 10 K for the openloop system
G(s)
=
sis
K(s
+, I)
+ 2)(r + 25)
After completing the hand sketch. verify your result using MATLAB.
,
.
l ,~
,i l
Introductory Digital Control
A Perspective on Introductory Digital Control
The continuous controllers you have studied so far are built using analog electronics such as resistors. capacitors. and operational amplifiers. However, most control systems today use digital computers (usually microprocessors or microcontrollers) with the necessary inpuUoutput hardware to implement the controllers. The intent of this chapter is to show the very basic ideas of designing control laws that will be implemented in a digital computer. Unlike analog electronics, digital computers cannot integrate. Therefore. in order to solve a differential equation in a computer. the equation must be approximated by reducing it to an algebraic equation involving sums and products only. These approximation techniques are often referred to as numerical integration. This chapter shows a simple way to make these approximations as an introduction to digital control. Later chapters expand on various improvements to these approximations, show how to analyze them. and show that digital compensation may also be carried out directly without resorting to these approximations. In the final analysis, we will see that direct digital design provides the designer with the most accurate method and the most flexibility in selection of the sample rate. From the material in this chapter. you should be able to design and implement a digital control system. The system would be expected to give adequate performance if the sample rate is at least 30 times faster than the bandwidth of the system.
I
f
',rI
I
,.
'11 I'
Chapter Overview
In Section 3.1. you willieam how to approximate a continuous D(J) with a set of difference equations. a design method sometimes referred to as emulation. Section 3.1 is sufficient to enable you to approximate a continuous feedback controller in a digital control system. Section 3.2 shows the basic effect of
57
58
Chapter 3
Introductory Digital Control
J I
DignizJtlon
59
sampling on the perfonnance of the system and a simple way to analyze that effect. SectIOn 3.3 shows how to convert a continuous PID control law to the digital fonn.
sample period sample rate
3.1 Digitization
Figure 3.1 (a) shows t~e topology of the typical continuous system. The computatIOn of the error signaL e. and the dynamic compensation. D(s), can all be accomplIshed In a digital computer as shown in Fig. 3.l(b). The fundamental differences between the two implementations are that the digital system operates on samples of ~e sensed plant output rather than on the continuous signal and that the dynamICs represented by D(s) are implemented by algebraic recursive equatIOns called difference equations. . We consider first the action of the analogtodigital (AID) converter on a sIgnal. This device acts on a physical variable. most commonly an electrical voltage. and converts it into a binary number that usually consists of 10 or 12 bits. A bmary number with 10 bits can take on 211) = 1024 values: therefore, an AID converter with 10 bits has a resolution of 0.1 o/c. The conversion from the analog signal y(f) occurs repetitively at instants of time that are T seconds
Figure 3.1
Basic controlsystem block diagrams: (a) continuous system, (b) with a digital computer
~
ZOH
Euler's method
Plant
r(f)
apart. T is called the sample period and 1/ T is the sample rate in cycles per The sampled second or Hz (also sometimes given in radians/second or 2IT / signal is y(kT) where k can take on any integer value. It is often written simply as v(k). We call this type of variable a discrete signal to distinguish it from a co~tinuous variable like \'(t). which changes continuously in time. We make the assumption here that the 'sample period is fixed: however. it may vary depending on the implementation as discussed in Section 1.1. There also may be a sampler and AID converter for the input command, r(t), producing the discrete r(kT) from which the sensed y(kT) would be subtracted to arrive at the discrete error signal. e(k T). The differential equation of the continuous compensation is approximated by a difference equation which is the discrete approximation to the differential equation and can be made to duplicate the dynamic behavior of a D(s) if the sample period is short enough. The result of the difference equation is a discrete u(kT) at each sample instant. This signal is converted to a continuous u(t) by the D/A and hold. The D/A converts the binary number to an analog voltage. and a zeroorder hold (ZOH) maintains that same voltage throughout the sample period. The resulting u(t) is then applied to the actuator in precisely the same manner as the continuous implementation. One particularly simple way to make a digital computer approximate the real time solution of differential equations is to use Euler's method. It follows from the definition of a derivative that 8.1' .r = lim (3.1)
n.
",081
r
,
r
I
G(q
yU)
where 8.1' is the change in x over a time interval 8t. Even if 8t is not quite equal to zero. this relationship will be approximately true. and .i:(k) :::: x(k + I)  x(k) =T (3.2)
I , ,
I L __
~
yfn
~
where
T = t'+1  t k (the sample interval in seconds),
'k
la)
,
j
I~
= k T (for a constant sample interval).
Digital controller
rlr)~
T'
Plam
Gisl
ylt)
k is an integer,
x(k) is the value of x at t k • and x(k
,
:
, , ,
I , r(kTj ,
+ I) is the value of x
at
t
HI
.
:"(kTj
1=====:_1
(bJ
T'"""t,""1,'..,
.lIt)
difference equations
~
This approximation 1 can be used in place of all derivatives that appear in the controller differential equations to arrive at a set of equations that can be solved by a digital computer. These equations are called difference equations and are solved repetitively with time steps of length T. For systems having bandwidths
This particular version
.rectangular version.
IS
called the forward rectangular rule. See Problem 3.2 for the backward
60
Chapter 3
Introductory DIgital Control
3.1
Digitizalion
61
of ~ few Hertz, sample rates are often on the order of 100 Hz. so that sample penods are on the order of 10 msec and errors from the approximation can be qUIte small.

Table 3.1
       _.
Real Time Controller Implementation

   
•
Example 3.1
Di[fuf11ce Equations Using ElIla's Method
USing Euler's method. find the difference equations to be programmed into the control computer FIg. 3.1 (b) for the case where the 0(5) in Fig. 3.1 (a) is
0(5)= V(s) =K s+a £(5) " , b
In
x = 0 (initialization of past values for first loop through) Define constants: ", = 1bT "2 = Ko(aT  1) READ AID to obtain y and r e=ry u=x+Koe OUTPUT u to DIA and ZOH now compute x for the next loop through
x=a,u+Ct 2 e
(33)
+
go back to READ when T seconds have elapsed since last READ
Solution.
First find the differential equation that corresponds to D(s). After cross multiplying Eq. (3.3) to obtain
(s
+ b!U(s)
Ii
= K"L'
+ a)£(s), + ae).
(3.4)
we can see by inspection that the corresponding differential equation is
+ hu =
K,,(e
:1 1:,.'
Csing Euler's m~thod to approximate Eg. (3.4) according toEq. (3.2), we get the approximating dIfference equallon
/Ilk
+
I) ~ u(k) . [elk T +hu(k) = K n
+ I) T
elk)
.] +aelk) .
(3.5)
The sample rate required depends on the closedloop bandwidth of the system. Generally. sample rates should be faster than 30 times the bandwidth in order to assure that the digital controller can be made to closely match the performance of the continuous controller. Discrete design methods described in later chapters will show how to achieve this performance and the consequences of sampling even slower if that is required for the computer being used. However. when using the techniques presented in this chapter, a good match to the continuous controller is obtained when the sample rate is greater than approximately 30 times the bandwidth.

Rearranging Eq. (3.5) puts the difference equation in the desired form
u(k
+ 1) =
u(k)
+T
[bU(k)
+ K"
(e(k
+ I; 
e(k)
+ ae(k))].
(3.6)

Equation (3.6) shows how to compute the new value of the control, u(k + I). given the past value of the control. u(k). and the new and past values of the error signal, elk + I) and elk). For computalional effiCIency, it is convenient to rearrange Eq. (3.6) to
u(k
•
Example 3.2
Lead Compfl1sation L'sing a Dlgltul Complitcr
Find digital controllers to implement the lead compensation
0(,) =
+
I) = (l  hTlu(k)
+
Ko(a T  I leek)
+ K"e(k + I).
70
.I .I
(37)
+ 10
t
+2
(3.8)

•
for the plant
G(s)=5(.1
+ I)
In principle, the difference equation is evaluated initially with k = 0, then k = I. 2, 3.... '. However, there is usually no requirement that values for all limes be saved In memory. Therefore, the computer need only have variables defined for the current and past values for this firstorder difference equation. The InstruCllons to the computer to implement the feedback loop in Fig. 3.1 (b) With the dlfferenc.e equation from Eq. (3.7) would call for a continual looping through the code In Table 3, I. Note in the table that the calculations have been arranged so as to m~nimize the computations required between the reading of the AID and the wnttng to the D/A, thus keeping the computation delay to a mInlmum.
using sample rates of 20 Hz and 40 Hz. Implement the control equations on an experimental laboratory facility like that depicted in Fig. 3, I. that is, one that includes a microprocessor for the control equations. a ZOR and analog electronics for the plant. Compute the theoretical step response of the continuous system and compare that with the experimentally detennined step response of the digitally controlled system.
Solution,
Comparing the compensation transfer function in Eq. (3.8) with Eq. (3.3) shows that the values of the parameters in Eq. (3.6) are II = 2. b = 10. and K" = 70. For a sample rate of 20 Hz, T = 0.05 sec and Eq. (3.6) can be simplified to
u(k
+
I) = O.Su(k)
+ 70[e(k + t) 
O.ge(kJ].
62
Chapter 3
Introductory Digital Control
3.2
Effect of Sampling
63
For a sample rate of 40 Hz. T = 0.025 sec and Eq. (3.6) simplifies to
u(k
+
11 = 0.75u(k)
+ 70[e(k + 1)
 O.95e(kl].
The statements in MATLAB' to compute the continuous step response is numD
= 70'[1
2J,
denD
= [1
0]
10]
In Chapter 6. you will see that there are several ways to approximate a continuous transfer function. each with different merits. and most with better qualities than the Euler method presented here. In fact. MATLAB provides a function (c2d.m) that computes these approximations. However, before those methods can be examined. it will be necessary to understand discrete transfer functions. a topic covered in Chapter 4.
numG = 1,
denG = [1
sysl = tf(numD,denD)*tf(numG,denG) sysCL = feedback(sys 1,1) step(sysCL) Figure 3.2 shows the step response of the two digital controllers compared to the continuous step response. Note that the 40 Hz sample rate (about 30 x bandwidth) behaves essentially like the contmuous case, ;hereas the 20 Hz sample rate (about 15 x bandwidth) has a detectable mcreased overshoot slgmfymg some degradation in the damping. The damping would degrade further lf the sample rate were made any slower. The MATLAB file that created Fig. 3.2 (fig32 .m) computed the digital responses as well as the contmuous response. You willleam how to compute the response of a digital system in Chapter 4.
3.2 Effect of Sampling
It is wurthy to note that the single most importal1t impact of implementing a control system digitally is the delay associated with the hold. A delay in any feedback system degrades the stability and damping of the system. Because each value of u(kT) in Fig. 3.I(b) is held constant until the next value is available from the computer, the continuous value of 11 (t) consists of steps (see Fig. 3.3) that. on the average. lag u(kT) by T 12. as shown by the dashed line in the figure. By incorporating a continuous approximation of this T 12 delay in a continuous analysis of the system, an assessment can be made of the effect of the delay in the digitally controlled system. The delay can be approximated by the method of Pade. The simplest firstorder approximation is
Gh(s) =    .
•
Figure 3.2
21T
s
+ 21T
(3.9)
Continuous and digital step response using Euler's method for discretization' (a) 20 H? sample rate, (b) 40 Hz sample rate .
1.5
15
'~'
"
•......
g0
:;
_Figure 3.3
Figure 3.4 compares the responses from Fig. 3.2 with a continuous analysis that includes a delay approximation according to Eq. (3.9). This linear approximation of the sampling delay (Eq. (3.9» could also be used to determine the effect of a particular sample rate on the roots of a system via linear analysis, perhaps a locus of roots vs. 1. Alternatively. the effect of a delay can be analyzed using frequency response techniques because a time delay of T /2 translates into a phase decrease of
81> =
T'
wT
(3.10)
1.0
I
E ~ 0: 05
...
~._
t~_
...
~
0:
0.5
~
..1
I
u
  Analog control
~
  Analog controJ DigiLaI control
Digital control 0.8
The delay due to the hold operation
0
0
02
0.4
0.6
Time (sec)
(a)
fbi
2 Assumes the use of MATLAB \'5 and Control System Toolbox \'4. Fur prior versions. see Appendix F.
kT
.3 continuou~ control digital control u...L.3 (at 10 Hz sample rate) !.7".5" at a crossover frequency of 6.continuoli'.. Ai _!:!oing from 16q to 3S~'( for a 2ndorder .r.. (3.:) 06 0...6 0._ ..2 can he ohtain~d from the \IATLAB 1001"""""" damp(sysCL) \\'her~ sysCL is that computed in Example 3.. (3. One should. the usc of margln..tem with the simple delay approximation added IEq. For more precision. that this uecrea"..64 Chapter 3 IntroduClory Digital Contw[ 32 Effect of Sampling 65 Figure 3..3  • Example 3. ing Euler'... thus the PM of the digital system would be 0.. stalement 111' F(~qu~ncy (radr':'. The result is ( = ..r~_. (3. Both analvsis methods indicat~ a similar reduction in the damping of the syqem.I' For the syst~m in Example 3.. = ..R 0...l 01 then indicates that the eorr~ction due to sampling should he 17. that the PM decreases to about 30"... p   Thus... So.5 0.5 Frequency response for Example 3.7 0..._...3~ for the digital system. m~thod with dela}...m in \IATLAB shows that the continuous system has a P~I of 49. rc..33...10) and.· An.3 Apl"""IIII[/I.. Th~ frequency response of the continuou" system is shown by the solid line in Fig...cro~.5 and shows that the crossover frequency is about 6 rad/sec and the P\I is abour 50". the "gain crossover frequency:' by invoking Eq. Since the PM is approximately 100 X(. 1. 0. we see that the loss of phase margin due to sampling can be estimated (V equal to the frequency where the magnitude equals one.overshoot for the continuous system and abou~ 30? for the digital ease. sampk rale cau. . \\e see that the appro:\imate imalysi~ was somcv.._..... The trend that deLTeasing.. ex~ct that th~ o\'ershoO! of the 'tep r~"pons~ should increase.S.hat conSii:?rvatlve In the prediction of the d~creascd damping and incr~as~d overshoot in the digital case.. The damping of the 'y.6 Continuous and digital responses for Example 3.j() 16(J ~ T = 1/10 numDL = 21T...... damplsysCL) where sysl is that computed in Example 3.approx 31X'..... therefo"re.120 ~ I..17 rad/sec.~.r_. control if* ._~r__r___..91) is ohtai ned from g.1 0. Solution.ec) IIl' • Th~ damping of the "ystem in Example 3. this analy"is shO\<s that the (decreases from approximatelY 0. ing dampmg and stabihty \'\']ll be analyzed more complelely throughout the hook.pon~e...4 Continuous and digital step response at 20 Hz sample rate showing results with a Ti 2 delay approximation I.56.'r. " .. Compare the time response of the COnl/llUOUS system with the discrete implementation to validate the analysis. Use hoth linear analysis and the frequencY response method.7 indicate:. that is.5 for the continuous svstem to 0. 10 Frequency (rad/st'LJ sys2 = tf(numDL.5 Time be.b have about 2C)C.. The result of this calculation is I:... d~termin~ th~ d~crea"e in damping that would result from sampling at ][J Hz.'. Equation t3... 1) Figure 3.~..+ 0..7 O. The actual step 0.__..~.t_..e" denea.J~_'~ ~I. Th~ line of small circles shows th~ phase corrected by Eq.llnis or til" E[(cC1 ''I SWl1l'lillg 10 I L to') ~_'.e in t should result in lh~ ~tep response o\·er~hoot.ystem with no lCro'i.9 . For the case with no 7..10) with • Figure 3.'i r_r___. 3.J ' j~J I~ .J1r"J...denDU*sys 1 sysCL =feedback(sys2. Fig. denDL = [1 21T] ISO L'''.~ 0.5 OJ 02 o. J..... th~refore.8 in Fig..
14) follows directly while Eqs. Kit 0 e(TJ)dll.17) This example once again showed the characteristics of a digital control system. But before we can do that.7 shows that the digital response (T = 0. Compare the digital step response with the calculated response of a continuous system. It shows that the digital performance has improved to be essentially the same as the continuous case. 13. T.12) and (3. produces the results in Fig. Some trial and error. the combination needs to be done carefully.e(k I)].4 Ttansfollmng a ContimwllS PID to a Digital Computer A micro~servo motor has a transfer function from the input applied voltage to the output speed (rad/sec). where K is called the proportional gain.12) and derivativc control u(t) = KTndt). (3. therefore Eq. Increasing the sample rate. These three constants define the control. So let's pick T = 0. The revised PID parameters that pro~ duced these results are K = 3.+ TDs).I) + 2. 3. = 0. i. Also. The combined continuous transfer function (Eq. 3. the three terms are proportional control 1I(r) • Example 3. This implementation shows a considerably increased overshoot over the continuous case. and T.8.3 PlO Control 67 3. however.1)+ K [ (I +. K.e . (2.2) l (3. . should be reduced to slow the system down and the deriva~ tive time. Solution. a sample rate about 30 times bandwidth. (3.13) It has been determined that PID control with K = 5. we need to (3. (3.0008 sec.2 kHz sample rate. The solid line in Fig.14) know how fast the system is or what its bandwidth is. The integral reset time. + e + T[)e) T1 I • and the use of Euler's method (twice for e) results in u(k) = lI(k . T.18) integral control 1I(t) =  T.16) result from an application of Euler's method (Eq. integral.. A look at Fig. it was possible to restore the damping with suitable adjustments to the control. To = 0. the sample rate would be about 3.2 kHz if 10 times bandwidth. and TD the derivative time.13). Reviewing again briefly.6.66 Chapter 3 Introductory Digital Control 3. The damping was degraded an increasing amount as the sample rate was reduced.7667e(k) . 3. the integral time.16). The approximations of these individual control terms to an algebraic cqu<ltion that can be implemented in a digital computer are proportional control lI(k) = Ke(k). 2. and derivative (PID) control is reviewed in Section 2. (3. the differential equation relating lI(t) and e(t) is u = K(e .7 shows the step response of the continuous system ami indicates that the rise time is about I msec. Based on Eq. there will be a cost benefit by improving the performance while maintaining the 3.11) + 60)(s + 600)' (3. Therefore.0011 sec.2 and Tv = 0. Use of Eq. separately investigate the effect of a higher sample rate and re~tuning the PID parameters OIl the ability of the digital system to match the continuous response..3 msec.15) and derivative control lI(k) = KT /[e(k) . when implemented in the digital computer results in the line with stars in Fig. T. and implement on a digital system. (3.16) • Equation (3. Pick an appropriate sample rate.15) and (3. will increase the cost of the computer and the AID converter: therefore. this suggests that wn ~ 1800 rad/sec. in this case.3333elk . T. keeping these ideas in mind. TD • should be increased to increase the damping. However. while using the same PID parameters as before.3 PIO Control The notion of proportional.2» to Eqs. (3.3 msec) has a faster rise time and less damping than the continuous case.17) results in the difference equation u(k) integral control lI(k) = lI(k ~ I) = lI(k I) +5[3. (3. The line with circles in the figure shows the improved performance obtained by increasing the sample rate to 10 kHz. normally these terms are used together and. (3.003 sec gives satisfactory performance for the continuous case. Furthermore. and so the bandwidth would be on the order of 2000 rad/sec or 320 Hz.6667e(k  2)] + K Te(k).3.7. (3. 360000 G(s) = (s = Ke(t).2. The sample rate needs to be selected first. Therefore. determine the corresponding digital control law. 3. + ~ ) e(k) ~ (I + 2 ~ ) e(k  1)+ i' e(k .s I which. This suggests that the proportional gain.24) is lI(S) D(s) = = K(1 e(s) + . was left unchanged.11) is already algebraic.
5 Problems 3. In order to analyze the system accurately for any sample rate.7 Step response of a micromotor.~~.5 . 3.x{k l) I I • For sample rates on the order of 10 10 30 times the bandwidth. eliminating approximation errors. but use the approximalion that .is should be decreased by . digitaL T::: 0. digital.100Hz..I so that the complex roDts are at approximately s = 4. Example 3. • For digital control systems with sample rates less than 30 times bandwidth. Assume the continuous values from Eq.7) for the forward rectangular case as {I .. 3. = 5 Hz.. 2/ T G.+ TDs) TJs can be implemented digitally using Eq.10) = K(] + .9) T .. into a set of difference equations that can be programmed directly into a control computer...1.4. you will have to proceed on to the next chapters to learn about ztransforrns and how to apply them to the study of discrete systems. T= O. the backward rectangular version of Euler's method.. of interest are given in Eq.Jmsec 456 Time (msec) 9 10 The digital control system will behave reasonably close to the continuous system providing the sample rate is faster than 30 times the bandwidth. but especially for sample rates below about 30 times bandwidth.. (3. 'II .5 .4 ± j4. The delay can be analyzed more accurately using frequency resp0n!ie where the phase from the continuous analy. A zeropole approximation for this delay is (3. f + ~ ) elk)  (I +2 1) elk . 0. • Euler's method can be used for lhe digitization . i . sample rate for w.. a first order analysis can be carried out by introducing a delay of T /2 in the continuous analysis to see how well the digital implementation matches the continuous analysis. .4 rad/sec. approximate the effect of the digital implementation tD be a delay of T /2 as given by • As long as the sample rale is on the order of 30 x bandwidth or faster..17) u(k) = lI(k .____.r. sec.. = I .2)] eee..2) Design a continuDus lead compensatiDn for the satellite attitude cDntrol example (G(s) = I/s') described in Appendix A.____r__.1 msec 456 Time {msec) 9 10 wT 2 • A continuous PID control law whose transfer function is u(s) I 8¢ = .commuous 1. design is often carried out directly in the discrete domain. and 20 Hz where T = l/UJ. D(s) = e(s) (3..1 Do the following: (a) + I) T x(k) .___.68 Chapter 3 Introductory Digilal Control 35 Problems 69 Figure 3..8 Effect of PID tuning on the digital response.digitaL T::: 0. :IDte that the cDefficient. (3. elk .continuous . Compare the resulting difference equations with the fDrward reclangular Euler methDd. (b) Assuming the compensation is to be implemented digitally. Also compute the numerical value of the cDefficients fDr both cases VS. 1) + ...3 msec e&e. Example 3.bTl and (aT .>ilk) ~ x(k) .l).I) + K [( 1+ Figure 3.r. D(s)..4 ._.4 Summary • Digitization methods allow the designer to convert a continuous compensation... (3.(s) = s + 2/T and detennine the revised rool IDcations for sample rales of UJ.2 Repeat Example 3.8). ~ x(k x(k) = 3. the digitally controlled system will behave close to its continuous counterpart and the continuous analysis that has been the subject of your continuous control systems study will suffice. same PID parameters 1.. 10Hz.
Modify the MATLAB file fig32. G(s) =.(. 500 10 s(s + 2) . 3. and has no output error for a constant bias torque from the drive motor.4 For the compensation D(s)=5.7 For 1 r (a) design a continuous compensation so that the closedloop system has a rise time I.3 For the compensation s 1 D(s) = 25 s + 15' + use Euler's forward retangular method to detennine the difference equations for a digital implementation with a sample rate of 80 Hz.2) and compare the difference equation coefficients. 1000 .9 The antenna tracker has the transfer function G(s)=. Modify the MATLAB file fig32m so that you can evaluate the digital version of your lead compensation using Euler's forward retangular method. The read arm on a computer disk drive has the transfer function r Design a continuous lead compensation so that the closedloop system has a bandwidth of 100 Hz and a phase margin of 50'. 3. WOO s Design a digital PID controller that has a bandwidth of 100Hz. p (b) revise the compensation so the specifications would still be met if the feedback was implemented digitally with a sample rate of 5 Hz. a phase margin of 50'.6 The read arm on a computer disk drive has the transfer function G(s) = . G(s)= . Repeat the calculations using the backward retangular method (see Problem 3. 3. and find the slowest one where the overshoot does not exceed 309r.5 Problems 71 3. .8 find difference equations that will implement the compensation in the digital computer. . Design a continuous lead compensation so that the closed· loop system has a rise time " < 0.m so that you can evaluate the digital version of your lead compensation using Euler's forward retangular method. Approximate the effect of a digital implementation to be 2iT G 1. Try different sample rates. Repeat the calculations using the backward retangular method (see Problem 3.70 Chapter 3 Introductory Digital Control 3. Use a sample rate of 6 kHz.. Try different sample rates. 3.3 sec and overshoot MI' < 10%.2) and compare the difference equation coefficients.. < I sec and overshoot M < 15% to a step input command. 3.I)= s+l/T' and estimate M p for a digital implementation with a sample rate of 10 Hz.3 sec and o\'ershoot M p < 1O<7c. and (c) 3. 3.10 The antenna tracker has the transfer function 10 G(s) = s(s + 2)' s+2 s + 20 use Euler's forward retangular method to detennine the difference equations for a digital implementation with a sample rate of 80 Hz. and find the slowest one where the overshoot does not exceed lOSf." Design a digital controller that has a bandwidth of 100Hz and a phase margin of 50".5 The read arm on a computer disk drive has the transfer function G(s)=. Use a sample rate of 6 kHz. Design a continuous lead compensation so that the closedloop system has a rise time " < 0.
1 Linear Difference Equations We assume that the analogtodigital converter (AID) in Fig.1 is the digital computer. statespace models of discrete systems are developed in this section. 4.1.if Discrete Systems Analysis A Perspective on Discrete Systems Analysis The unique element in the structure of Fig.4 shows the correspondence between roots in the :plane and time response characteristics while Section 4. Chapter Overview Section 4. and it does so at discrete steps in time. a topic covered very briefly in Section 3.3 to show how it applies to the combined system in Fig. Section 4. Use of the :transform is developed further in Section 4. 4.1 takes samples of the signal y at discrete times and passes them to the computer so that 5'(kT) = 73 .1 restates the difference equations used by a computer to represent a dynamic system. digital computers can do many things other than control linear dynamic systems. 3. it is our purpose in this chapter to examine their characteristics when doing this elementary control task and to develop the basic analysis tools needed to write programs for realtime computer control. the :transform.6. dynamic control component. The purpose of this chapter is to develop tools of analysis necessary to understand and to guide the design of programs for a computer sampling at discrete times and acting as a linear. Furthermore. Needless to say.transform. 1. The tool for analyzing this sort of system. The fundamental character of the digital computer is that it takes a finite time to compute answers. The last section. is introduced and developed in Section 4. derives properties of the .2.1.5 discusses characteristics of the discrete frequency response. 3.
the output of the system represented by Eq. see if they are stable or unstable and even understand the general shape of the solution."4~~6:7:~ Leonardo Fibonacci of Pisa. Assume that no rabbits die and that a new pair begin reproduction after one period..rabbits. 1 constant coefficients Although the two forms are equivalent.2) is more convenient for computer implementation. we have all the old rabbits. The job of the computer is to take these sample values and compute in some fashion the signals to be put out through the digitaltoanalog converter (D/A).• . Figure 4.3) for the values of u" ences.2) and. dynamic systems. (4. 20 U'_2 U.2' . which are u 1. However that may be. 8. 2.~ notation to the Latin ". We plan to demonstrate later that with such equations the computer can control linear constant dynamic systems and approximate most of the other tasks of linear. The name "difference equation" derives from the fact that we could write Eq.1) is linear and depends on only afinite number of past e's and u's.VU'_I V"u. . versus k is shown in Fig. . + (a.1) Because we plan to emphasize the elementary and the dynamic possibilities. to say the least._. we will drop the form using differences.. For example.1 Lmear Difference Equations 75 y(kT).e.2) using u.I' Then.2) are constant. I.:_2  •••  Q. 13. 2VII. u l. + bmek _ m • a 2 u f. = Vu.)Vu. Suppose we call the input signals up to the kth sample eo' e l • er ..2) is called a linear recurrence equation or difference equation and. + b. are named after the thirteenthcentury mathematician I who studied them.. (4.  + V u. we assume that the function! in Eq. Here we consider the treatment of the data inside the computer.1. A plot of the values of u. to get the next output. To do so.. has many similarities with a linear differential equation. (4. including performing the functions of electronic filters.2) Equation (4. = VIII.D. We would like to be able to examine equations like Eq.  in terms of differ25 U'_I = = U._.. 2 I. we need to know the (initial) values for U o and u l • Let us take them to be U o = u I = 1. to refer to our equations as "difference equations:' If the a's and b's in Eq.V'. I" plus the newborn pairs born 10 the mature. = 0 for simplicity). + a l + l)u. 3. (4.IUk_n (4.: uD' . . (4. we find the equivalent difference equation to be IS 10 a. and to compute u. then the computer is solving a constantcoefficient difference equation (CCDE).'orld about 1200 A. e" and the output signals prior to that time u o' II I' u" . Eq. The results. the recurrence form of Eq.3) 35r~~~~~.4) would seem to be growing. 5. pairs of rabbits and thai babies are born in pairs.··" e. The first nine values are I. we have the machine compute some function. . it is necessary first to examine methods of obtaining solutions to Eq.  Vu. U'_I)' (4. for a secondorder equation with coefficients ai' a" and bo (we let b. suppose we take the case (4. 34 . V'u. (4... Thus at time k. we call the system unstable.. °OL~i. 2 u(k) Thus. who introduced Arabic. Here there are no input values. The characteristics of the NO and D/A converters will be discussed later...lun_I' If we solve Eq. (4.2) and to study the general properties of these solutions. 2 Wilde (1964). = !(e o..1 The Fibonacci numbers (4. constant._I' and u. 30 U. .74 Chapter 4 Discrete Systems Analysis 4.. without having to solve them explicitly. = b. II . = Uk  U'_I V'u.4) has been used to model the growth of rabbits in a protected environment'. (4. (4. + . 4. Thus we write Uk = a1u k _ 1  +boe. and start at k = 2. we find Uk =U".. Assume that uK represems.2 O. the Fibonacci numbers. which we can express in symbolic form as To solve a specific CeDE is an elementary matter. We need a starting time (kvalue) and some initial conditions to characterize the contents of the computer memory at this time. as wc shall see. We will continue. If the response of a dynamic system to any finite initial conditions can grow without bound. = boe.4) u. For example.r. however.(a l + 2a. plus the differences in Uk' which are defined as VU.
The characteri. . we get the equation the corresponding difference equation is unstable in the specific sense that for some finite initial conditions the solution will grow without bound as time goes to infinity. Let's call these z./5/2.5 . of which a segment is sketched in Fig.:. :c u = 1/2 ± . Consider Eq. Thus. which confirms our suspicion that the equation represents an unstable system. = (1 + .4) is of the fonn and the characleri.=. we obtain the simultaneous equations I = A. stable·) or Solution. _. e(tk_')' e(t. . + A:. we have found that a solution to Eq. and we call it u l _. We can solve for the unknown constants by requiring that this general solution satisfy the specific initial conditions given.· The problem is to obtain u from this information. This polynomial of second degree has two solutions.76 Chapter 4 Discrete Systems Analysis 4.' +A.. the term in :.I) .5) lui ~"~lI' ~ I ! .5 and.2u{k .tic roots are ~ = 0. 4. we can see that since :. For continuous. a sum of the individual solutions will also be a solution.. it turns out that solutions of the form :c' will do where :c has the role of 5 and k is the discrete independent variable replacing time. difference equations. (4./5)/2 is greater than I. As an example of the origins of a difference equation with an extemal input. The equation in : that we obtain after we substitute u =:c' is a polynomial in z known as the characteristic equation of the difference equation. If any solution of this equation is outside the unit circle (has a magnitude greater than one). Since both these roots are in. and we WIsh to compute an approximation to the integral I = A. 4. We assume that we have an approximation for the integral from zero to the time 1. e(t). If we assume that u(k) = Al. These equations are easily solved to give A. u(k) = A.1 DISCh'le Stabilil\ Is the equation ulk) = O. the corresponding difference equation is stable..2. (4. exponential solutions of the form e') are used. If all the roots of the characteristic equation are iI/side the unit circle.. ordinary. I.O.)..:c.4). In the case oflinear. Figure 4. Three altematives are sketched in Fig. We can generalize this result./5 + I 2". Taking the view of the integral as the area under the curv~ e(t).:c/. (4. If we substitute k = 0 and k = I. • Example 4.I A.4.2.ide the unit circle.=~. = 0.2 Plot of a function and alternative approximations to the area under the curve over a single time interval using only the discrete values e(O). ~'. differential equations that are constant and linear. we can divide by A and multiply by z'. .4) in a closed form.9~ +02 = O. we see that this problem reduces to finding an approximation to the area under the curve between 11 _ 1 and I. Furthermore. ./5 .1 Linear Difference Equations 77 One approach to solving this problem is to assume a form for the solution with unknown constants and to solve for the constants to match the given initial conditions.' will grow without bound as k grows./5 And now we have the complete solution of Eq.0._.. constant.' . Suppose we have a continuous signal.2) =I 0 and A =I O. A:c' Now if we assume :c with the result = A:c'' + A:c''. and :c" Since our equation is linear. +A.table. We can use the rectangle of height el_J' or the rectangle r i characteristic equation '~'t:L '~ kl k kI k kl k .9u(k . the equation is . " 2. (4. J = L e(t)dt. we consider the discrete approximation to integration.tic equation is :c' =:c + I.
discrete systems by the method of ztransform analysis.. defined as:" . and one for t:::. 3 Vole use the notation to mean hi>.. Yo K L...78 Chapter 4 Discrete Systems Analysls 4.h It from the on.7) and is exactly the integral of e.:. T. constant. called the Iv.: I . ~transform of thi.4: we first examine the use of the transform to reduce ~ 4. f k ~ tk_1' is a constant. (4. we define the z transform of the signal as the function ! .6) If a signal has discrete values e u. If elf) = t. (It should be. '{ handle (he value of give identical results. we can describe the relation between u and e by a transfer function.. For sionals that are zero for k < O. A logical alternative viewpoint that requires a bit more mathematics but has some appeal is given in Section 4.2. \\ e mu~. .8) converges._1' the result is called the forward rectangular rule (sometimes called Euler's method.6. e mllOn.o~ k ~ 0 ~e included. . . e. .Fmdthe . • Example 4.::transform to dl~[mgUl:<. Th en eJ. (4. (4. It turns out that if the difference equations are linear with coefficients that are constant. the area of the trapezoid is 4.ampling period Twhere 1(/) . in Chapter 6. Applying Eq. . e .2 The zhanS/(Jrm The data £' are taken as samples from the time signal e'" 1(t I at .2).81. . E.J ek~ . . ..~tep function. . we find thaI Each of these integration rules is a special case of our general difference equation Eq. (4. while discussing means to obtain a difference equation that will be equivalent to a given differential equation. _ e. x e _I. by a straight line. In Eq.2 The Discrete Transfer Function We will obtain the transfer function of linear. and thereby gain a great aid to analysis and also to the design ot'linear. . ~ I' and thu. signaL The other possibility is the backward rectangular rule."i are initial conditions introduced by (h. Finally.aT • We will return to the analysis of signals and development of a table of useful in Section 4.8) the lower hmit lS x ~o that values_ of C'k on both sides. A diSCUSSion of convergence is deferred until Section 4. e l . constant.:oslded . (4.1 The zTransform £(:::) ~ 2{e(k)} ~ = A = 2(ek Trapezoid rule fk  f _ k 1 + eH ). Th. if we assume that the sampling period.\a~l\lnatl0n of this ~r~perty and other features of the oncs. we are led to a simple formula for discrete integration called the trapezoid rule Uk '" L.6.e o~esidC'd transform. 0 is the unit . zero for I < O. the trapezoid is the exacf area.e akT](kTi.::.ided transform are m\'Hed by the problem~_ \\Ie select the 1"0 SIded tram form because we need 10 consider signals thaL extend into negative time when .2. because if e(t) is a straight line.2.~ . .esld~d ·h 'h would be " .ve study random signals in Chapter 12. We also show how these same results can be expressed in the state space form in Section 4. T (4.7) i'. "'J' . Thus we see that difference equations can be evaluated directly by a digital computer and that they can represent models of physical processes and approximations to integration. or the trapezoid formed by connecting ek _ 1 to e.2 The Discrete Transfer Function 79 of height ek . as discussed in Chapter 3 for an approximation to differentiation) and is described by and we assume we can find values of "0 and R u as bounds on the n:agnit~de of the complex variable ~ for which the series Eq.8) k="!C = Uk_I + 2'(ek + ek _ I ). To take the ones. ... (4.ided transform of Uk _ l' hO\H':\ er. (4. the transforms obnously d fi . then ek = kT and substitution of Uk = (T' /2)e satisfies Eq. ~transforms 1 _ e "T. If we take the third choice.e transform:so defined b sometime:>. .3. discrete controls. We will examine the properties of these rules later. given by Solution.{I /. The results are the same..) If we approximate the area under the curve by the rectangle of height e.
..80 Chapter 4 Discrete Systems Analysis 4. (4. constant..m .:1 (4. Solving it we obtain U(z) = '2 I _ ZI E(z).2). For example.'~1 (z   . we use the terminology of that subject. (4.15) would be specified in MATLAn as a I x (II + I) matrix of the coefficients. + bmz1+ a .. in the same way.14) has a simple pole at z = I and a simple zero at z = 1. and u. Suppose we call the numerator polynomial b(z) and the denominator a(z).8) and. (4. + [E(z) + ZI E(z)].~" u .': 1 + a z': z + . we let k . and if n . b.. (4. The general inputoutput relation between transforms with linear.Z1 + .l = ' " U . (4. When completely factored. The quantity specifying the denominator would be specified as a 1 x (II + I) matrix.15).2) or in the trapezoid integration (4.... for example den = [I (4.~e. in this case.} as U(z) = .. T) .0.. we recognize the lefthand side as U(z).. In the first term on the right.z.I + .:) where T is the sample period. Because H(z) is a rational function of a complex variable.9) b..1 = j to obtain :x.}'" )=x I Ute) .z' (4. when 1/1 = II num = [bo '" L ~=x u. eL. To find the relation.2 The Transfer Function The . (2.~x.:transform has the same role in discrete systems that the Laplace transform has in analysis of continuous systems. ~ k=x. z'1+al:fll+a~::J12+ (4. + b".ljTII .z" + l~e'_lzk ) and when n > m. for example.. it is also true that the transfer function is the ratio of the output to the input when both vary as Zk..:transform of the sequence {u.:transforms for e.z'.. The numerator of Eq. in the difference equation (4.2.12) is now simply an algebraic equation in z and the functions U and E.. + an': " ~ n.. the transfer function for trapezoidrule integration is U(z) ~ T E(z) = H(z) = poles '2 z _ I' z+1 (4..7) are related in a simple way that permits the rapid solution of linear. there would be II . (4. If Zo is a pole and (z . Thus. we can write this as a ratio of polynomials in.. _. T I +.: as H(") = b z" 0 +b I Z.m zeros after b". az a"J From Eq. u. For prior \'er~ions. it is readily verified by the same techniques that m H(z) = b. The transfer function Eq. the transfer function would be H(') = K n7~1(:: For the more general relation given by Eq.14) Although we have developed the transfer function with the ztransform.9).7) by z' and sum over k. H(z). ' " Ii .17) 5 As. (4...x..) + b. and the places in z where a(z) = 0 are the poles of H (z).. the pole is simple.11) By similar operations on the third and fourth terms we can reduce Eq. an 4. we define the .zoY H(z) has neither pole nor zero at ZOo we say that H(z) has a pole of order p at ZOo If p = I.16) Equation (4.:' + '2 .6).z) p) (4.13) zeros We define the ratio of the transform of the output to the transform of the input as the transfer function.. Note that H(z) was assumed to be in the form given by Eq. see Appendix F .2 The Discrete Transfer FunctlOn 81 difference equations to algebraic equations and techniques for representing these as block diagrams. We get "" x T('" x . constant. the . 2 T (4..15) or H(z) = .:IU(. 1/1. difference equations of this kind. with positive powers of z.12) (4. b(z) aU This transfer function is represented in MATLAB in the tf form similarly to the continuous case as discussed after Eq. that is. (4. The discrete system is specified as' sys = tf(num. difference equations is U(z) = H(z)E(z).1:1'" . den.5 and Control Toolbo:'\ \'4. We take the definition given by Eq.sumes the use of MATLAB . = . (4. The places in z where b(z) = 0 are zeros of the transfer function. we proceed by direct substitution.. bmJ Now we multiply Eq...10) a..10) to U(z) = .
they can be expressed in terms of . These can be solved by the methods of linear algebra or by the graphical methods of block diagrams in the same Figure 4. an n x I matrix of the poles.:1.7) . and EmamiNaemi (1986) for a di. Suppose we let all coefficients in Eq.7). 4. The transfer function of paths in series is the product of the path transfer functions (Fig.3 The unit delay Figure 4. where hoth time and transform relations are shown.3. I .l_o U(z) = l~ I E(l) 6 !\1ason (1956). For example.. and unity gain.. 4.4 A block diagram of trapezoid integration as represented by Eq.7)...5). il I ' and cycle delay I . Mason's rule" can also be used. (4. U'_I' is added to the new area to form the next value of the integral estimate. the present value of e.k.16) is a linear algebraic relationship. (4.:1 as the symbol for a unit delay.2 The Discrete Transfer FuncllOn 83 and the quantities specifying the transfer function in the MATLAB zpk form are an m x I matrix of the zeros.82 Chapler 4 Discrele Systems Analysis 4..6 Block diagram of cascade blocks = HI(I) + H 2(l} ~ H(z) = HI (l}H 2(l} !~~~ _e k_=_Ut_+ 1 . and a scalar gain. But H(. To use blockdiagram analysis to manipulate these discretetransferfunction relationships.. 1 I The system is then sys = zpk(z. After this. The present value of the output.=_ek... Thus we see that a transfer function of Zi is a delay of one time unit.2).. 2. We can now give a physical meaning to the variable :. 4. Powell.:1.. T). See Franklin... Uk' equals the input delayed by one period. is passed to the first summer.:) represents the transform of Eq. (4.7) using the transfer function . . Consider Eq. Since the relations of Eqs.3 Block Diagrams and StateVariable Descriptions Because Eq. (4.. For the general difference equation of (4.2. The transfer function of an arbitrary multipath diagram i..cussion. a system of such relations is described by a system of linear equations.2). ..•• xI 1 E(z) !_u. 3. 1. The discrete integration occurs in the loop with one delay. 4.. (4.II~.15) are all composed of delays.:.4 we illustrate the difference equation (4. Then H(:) = .:1. u.. (4..15) be zero except b i and we take b i to be 1.6).5 Block diagram of parallel blocks BJ+ H(l} ~ 4. We can picture the situation as in Fig. where it is added to the previous value e'_I' and the sum is multiplied by T /2 to compute the area of the trapezoid between e'_1 and e. 4. The transfer function of paths in parallel is the sum of the singlepath transfer functions (Fig. . there are only four primitive cases: I .. The transfer function of a single loop of paths is the transfer function of the forward path divided by one minus the loop transfer function (Fig. (4. 4.15). (4. This is the signal marked a.4.. We can follow the operations of the discrete integrator by tracing the signals through Fig. It is interesting to connect this case with a block diagram Figure 4.. given by combinations of these cases. p.. (':+. in Fig.14).. 4..7). k. 4. (4. In Fig.. we already have the transfer function in Eq..4. where the previous output. and with these coefficient values the difference equation reduces to way as for continuous system transfer functions.18) Z1 .. for example Figure 4. there is another sum.
~ [H (4.a 2x 2(k) . + 3) = e(k) . we will get back to Hk). I 0 a.x. we can now compute ~)~ from e and the lower powers of z and ~ given in the block diagram: the picture is now as given in Fig.a. where x and thus a(z)~ = E(z).22) We collect these three equations together in proper order. and ~ according to Eq. (k). If we operate on this with z·.xJ(k) x 2 (k x. The first one we will consider leads to the "control" canonical form. x 2 (k). as shown in Fig.~ume lhe reader has some knowledge of rnalrices. which is to say that we have ~ (k + 3) because zJ is an advance operator of three steps.a2~(k + I)  a3~(k).x.x. The completed picture is shown in Fig. 4.8(b). we see that xi(k + I) = x. (4. The results we require and references to "rudy material are given in Appendix C. expressing the sum at the far left of the figure.24) We can write Eq. Finally.21) .a.(k) and x 2 (k + I) = x. almost by inspection. three times in a row. the internal variables have been named x" x" and xJ' These variables comprise the state of this dynamic system in this fonn. From Eq. a 0 I 0 0 ] (4.z" + a2z + a)~ + bl~2 + b 2z + b))~ = e.(k) + e(k). 4. we can write down.8(c). In Fig. .::~. The problem is caused 7 \Ve a. a. + e(k).a 2 x 2 (k) . (4. 4. 7 Using vectormatrix notation.(k) .z2~ . x(k we can write this in the compact form where ~ = E(z) a(z) + I) = A. (4.21).~(k + 2) . Now assume we have zJ ~. At this point we need to get specific. (4. (4.x(k) + BAk). ~'..19) as /~ = e . We begin with the transfer function as a ratio of polynomials b(z) U(z) = H(~)E(~) = E(z) = b(z)~. again using the fact that the transfer function z' corresponds to a oneunit delay.(k a. (4. (k) . (4. the difference equations that describe the evolution of the state. Z2~. ~(k The output equation is also immediate except that we must watch to catch all paths by which the state variables combine in the output. + a.7 Feedback transfer function using onlY simple delay forms for ~ in order to see several "canonical"' block diagrams and to introduce the description of discrete systems using equations of state.a.23) and B. In the development that follows. (k).8(a).20) (hoz) = u. consider the equations (z' A [:: ] [ x. 4.19) and (4. and we have control canonical form + I) = + 1) = x)(k + 1) = x. Having the block diagram shown in Fig.I).2 The Discrete Transfer Functlon 85 Figure 4.2) to a block diagram involving ~ only as the delay operator.a. e. To complete the representation of Eqs. a(~) + I) = u.z~ .a)~.8(c). and rather than carry through with a system of arbitrary order. we will work out the details for the thirdorder case. we will consider the variables u.20). we have x/k "Canonical Forms There are many ways to reduce the difference equation (4.a.20). we need only add the formation of the output u as a weighted sum of the variables zJ~. With this convention (which is simply using the property of z derived earlier). and ~ as time variables and z as an advance operator such that zu(k) = u(k + I) or z' u(k) = u(k . For example.8(c).84 Chapter 4 Discrete Systems AnalYSIS 4. 4.19) (4.
9(c). The terms with factors of z are timeshifted toward the future with respect to k and must be eliminated in some way.I :.1 (4.x3 • and the corresponding matrix form is immediate. l x(k + 1) = A. and the response is u(k). .x(k) + B.9(a). 4. we finally arrive at the place where all that is left is u alone! But that is just what we assumed we had in the first place. Now in this internal result there appear a. If bo = O. which can be canceled by adding proper multiples of u and e.25). bO .e.86 Chapter 4 Discrete Systems Analysis 4. as shown in F'ig. In vector/matrix notation. which is the solution of this equation. the remainder can again be operated on by . which is drawn in Fig. if ho is not O. (4. If we continue this process of subtracting out the terms at k and operating on the rest by ZI. I!' . To do this. the external input is e(k). Z'e + h. el·el)' term on the right is multiplied by at least one power of z. we assume at the start that we have the u(k). I' We can combine the equations for the state evolution and the output to give the very useful and most compact equations for the dynamic system. The other canonical form we want to illustrate is called the "observer" canonical form and is found by starting with the difference equations in operator/transform form as .u and b.:3 U + alz'u + a. are given by Eq. for this control canonical form are given by Eq.Zu + G.:1. 4." !Iii: !. then u = bix i + b.U = boz3e + b. and C. and D. where A. (4.25) II I! :1' . In this equation. XI for example not only reaches the output through hi but also by the parallel path with gain boG..e(k). The complete equation is n. (b) solving for ~(k + 3) from e(k) and past (c) solving for U(k) from (al by the bo term. 1.. and once they have been removed.26) (b) .8 Block diagram development of control canonical form: (a) Solving for ~(k).. + b. and B. and we rewrite the equation as (e) Here.ze + b 1e. we have where (4.2 The Discrete Transfer Function 87 n Figure 4.9(b).23). and thus we can operate on the lot by ZI as shown in the partial block diagram drawn in Fig. However. and of course the e(k).x.. Ij observer canonical form . 4. so connecting this term back to the start finishes the block diagram.
O.um and delay.0.25 can be associated with the secondorder pole factor::' .25 = " .6~ + 0.8 to form another. (4.6:: (:: + 1)(::' (c' .8 and 4.2 The Discrete Transfer Functlon 89 Figure 4.:.25) + 0.9 Block diagram development of observer canonical form: (a) the first partial .5:: + 0. suppose we have a transfer function H(::) ::' + 0.. In this case. (b) the second partial sum and delay. Another useful form is obtained if we realize a transfer function by placing several first.27) where elk) (aJ cascade canonical form (b) The block diagrams of Figs. the H(::) is represented as a product of factors. and the zero factor ::' .6.10. a cascade canonical form.:: to fonn one secondorder system.5. make a cascade form as shown in Fig. + 2.5::' . (c) the completion with the solution for u(k) elk) A preferred choice of numbering for the state components is also shown in the figure.:: + 0.9 are called direct canonical form realizations of the transfer function H(~) because the gains of the realizations are coefficients in the transferfunction polynomials. The cascade factors. (cJ Figure 4. we find that the matrix equations are given by x(k + 1) = A"x(k) lI(k) = C"x(k) + Boe(k) + D"e(k). The zero factor. Following the technique used for the control form.10 Block diagram of a cascade realization .::)(::'  0.:: + 1 can be associated with the pole factor ::' .88 Chapter 4 Discrete Systems Analysis 4.8~ " :: 2. which could be realized in a direct fonn such as control or observer fonn. and the poles and zeros of the transfer function are clearly represented in the coefficients.or secondorder direct forms in series with each other. For example.8) .1.0. 4. 4.25:: + 0.:: 1.4.
2 +eahoz 3 +e2 h l Z .1 Stepbystep construction of the unit pulse response for Fig. (4.re is no reason wh) \.4 k 0 1 2 3 ek _ 1 0 1 0 0 e. (k = 0).T(l  1. is zero for k < O.11 Representation of the product E(z)H(z) as a product of polynomials Table 4. h.\".. . e could not also solYe for u I.30) I' UU = H(z). Then the product that produces U(z) IS the polynomial k product given in Fig. Likewise. .3 +eoh3z. Figure 4. (k =I 0). and equals T thereafter.i2 0 0 U _1 k u. A final point of view useful in the interpretation o~ the dIscrete transfer function is obtained by multiplying the infinite polynorruals of E(z) and H(. (4. 0" Then it follows that i (4.i2 T.transform is defined by Eg.90 Chapter.ZI T T  (1 < Izl) 2T .3 8 !n this development we assume that Eq. a5.2.13) from direct analysis of the difference equation.4 Relation of Transfer Function to Pulse Response We have shown that a transfer function of ~l is a unit delay in the time domain.2 +eoh2z. Discrete Systems AnalysIs 4. (4.11. = O.16) as H (~) when the input and output are related by U(~) = H(~)E(~).2 The Discrete Transfer Function 91 4. T.1 +eOhlz1 +e2 hoz.16).. k take~ on negative \alues. 1 0 0 0 a. (4. Recall that the ~.4 and put a umt pulse In at the e k node (with no signals in the system beforehand). is T /2 at k = O. (4. we have a simpler sum. 2(1.i2 T T eoho+e1hoz. we will assume that the unitpulse response.1.:1) T + Tz.a +e 1 h 2 z. as k itJ(:r('t1s~. For purposes of illustration.28) = 2(1 ~ = E(~) = I and therefore that Tz+1 2z1 (1 < Izl). The dm?ttlOn of time comes from [he application and not from the recurrence equalion.7) i~ intended to be used as a fonnula for computing values of u. as follows H(z) = L TzA: =0 x k  2 2 Zl) T = 1. ~ We can readily follow the pulse through the block and build Table 4. 4. this is the transfer function we obtained in Eq.I ZI) ::. We can also give a timedomain meaning to an arbitrary transfer function. The ztransform of this sequence is Of course.:) as suggested in Eq. Now suppose we deliberately select elk) to be the unit discrete pulse defined by If we add T /2 to the ZO term and subtract T /2 from the whole series. Thus the unitpulse response is zero for negative k. (4.8) to be E(~) = Lek~k. '" h k T/2 T T T 0 T.29) Thus the transfer function H(z) is seen to be the trallsform of the response to a umtpulse Input. .. For example. and the transfer function IS defined from Eq. 4.2 +e 1 hlz.. The. 4. (4. 1'. we will take k = 0 to ~ the starting time for e . let us look at the system of Fig.
1 z. For example. . 2. is all. if the system is stationary then a delay of the input will delay the response.I • 4. then the system is linear if and only it for every scalar a and fJ. Values for j greater than k occur if the unitpulse response is nonzero for negatIve argume~ts. k =I k =II. To venfy Eq.. which leads to U(::. Furthennore. such a system._r 10 Now let k .h o' k U. This is the discrete convolution sum and IS the ana~og of the convolution integral that relates input and impulse response to output In lInear.h. By de6nition. and we can consider internal or external stability. continuous systems. = O.. + fJlI. elk .) = E(z)H(::. ~ x }="X.h'_1 + .2 The Dlscrele Transfer FunClion 93 Since this product has bee~.~.. if the system should be noncausal.2. Linearity: A system with input e and output II is linear if superposition applies.5 External Stability A very important qualitative property of a dynamic system is stability. + e. constant.. the response to CUI + fJe. if e = e/. Listing these coefficients.Ukz'.. which is to say.J l=rx L. A. A constant coefficient difference equation is stationary and typically referred to as a constant system.(k).tp 92 Chapter 4 Discrete Systems AnalysIs 4. which responds before the mput that causes It occurs. II.. then response to a pulse of intensity eo is ciz(k) if the system is linear. t z'h. Ilk = L ) hj. II~ = eoh c + e. + e.. Internal stability is concerned with the responses at all the internal variables such as those that appear at the delay and we recognize these two separate sums as U(::. The general case is thus (again) u. = eoh. _II+j) = Le. Uk = ei1. suppose we observe a response lI(k). Similarly.32) L J='X eJz j L {=x hlz. IS called noncausal. = L J=::xJ '" ejh'_J' (4. shown to be U(z) = I. we have the relatIOns 11 0 = eoho u. If response to a unit pulse at k = 0 is h(k). Now note that if the input sequence began in the distant past. Zk j=x t cjh'_j' or + e/z. perhaps back to / = x.N).h o We can also derive the convolution sum from the properties of linearity and stationarity. '""" e t )=0 By extension.(k) and u. (4..h. or time invariant.(k) is the response to e. = but ZII }/ T = ::.h I=x. if 1I. it must therefore follow that the coefficIent of z m the product is u.j = I in the second sum U(z) = L. the total response at time k to a sequence of these pulses is the slim of the responses. If we repeat this experiment at any later time when the system is again at rest and we apply the shifted input..31) we can take the ztransform of both sides These properties can be used to derive the convolution in Eq. if we see II (k . Thus. if a time shift in the input results in only a time shift in the output. future values of e where I > k may also come in.j." f. x k_ l • (4. if we take the system at rest (no internal energy in the system) and apply a certain signal elk).31) convolution Negative values of j in the sum correspond to inputs applied before time equals zero. Interchanging the sum on j with the sum on k leads to U(z) = t j=X ej k=:x. + eJh o' The extrapolation of this simple pattern gives the result . Stationarity: A system is stationan.N)._. we let the lower limit of the sum be x and the upper limit be +00: II. namely.. h .31) as follows. + .). + e.) = L e. = eOh J + echo + e. then the system is stationary. First we need more fonnal definitions of "linear" and "stationary:' 1. we must include tenns for / < 0.Zk = k=~x t e j Finally.(k) is the response to e.h c + ech. (4. by linearity again.=x t II.
(4. not BIBO stable I .. we should have a Bounded Output. lui < I.38) Uk =a1ul. . there is an M such that lerl~M<ec Thus.l = b. x • But. Applying the test. Ih. (4. b 'E (4 35) can be applied to the unit pulse response used 10 Solution. the most common definition of appropriate response is that for every Bounded Input._.1 = TI2 + L T = unbounded.33). (4. i=l IU.2 The Discrete Transfer Function 95 elements in a canonical block diagram as in Fig. this discrete appro:<ImatlOn to mtegratlOn IS .36) For a more general rational transfer function with many simple p~:~.32). These differ in that some internal modes might not be connected to both the input and the output of a given system. • Example 4. the output at k = 0 is 11 0 'bed b' this equation is BIRO stable if Thus we conclude that the system d escn J unstable otherwise. ._rl. x. (4.39) 't' 0) x Llh.1. (4. (4.I ~ l2:e/1'I!' TII~r~rure. 4._ 1 +bOe l · Thus the output will be bounded for every bounded input if Is this equation stable' Solution. 4.33) ho = TI2 h.35) = boo U I This condition is also necessary.~er. The test gIven ~ q. . ~:d~~n expand the function in partial fractions ~bout lIS p~le~::~::.1 < X.~ I=(J ex: (Ial < I) 1). column in Table 4. A test for BIBO stability can be given directly in terms of the unitpulse response..34) • Example 4. for if we consider the bounded (by I r) input 11_ 1 el = 111 _II =0 (II _I ll. The result IS for all I.94 Chapter 4 Discrete Systems Analysis 4.. The unitpulse response is easily developed from the first few tenns to be IlO L [=x "'::.4 Genera! Difference Equation Stability Consider the difference equation (4.. the system is not BIBO . (4. compute the u.9 (the state). is bounded.35)'IS tru e . and = 2: elh_ I=e>.8 or Fig.32). it is easy to see that " L 11r. For external stability. 4.bo' k::c:O.=boa'. that is. (h_t=O) = unbounded (Ia 12': and apply it to Eq. k > 0 (4. h k' First we consider a sufficient condition. stable.32). s . '" 1 ~~~~==~~~~~~ • =2:I~'>o Ih_/I 1 x (11 )' = 2: Ihrl!=x x (4. i~ a pOl~ pulse response wiII be a sum of respective terms. 1 (4. unless the condition given by Eg. . = T. this result is in turn bounded by (4. .37) If we consider the magnitude of the response given by Eq. because we assume Eq.7) BIBO stableo . which is surely less than the sum of the magnitudes as given by ~ L jell Ih.l = Lhola.h a· u2 = a. If this is true we say the system is BlBO stable. we have = a.:.2) with all coefficients except a l and bo equal to zero [4. Suppose the input e. Otherwise we can be satisfied to consider only the external stabilitJ as given by the study of the inputQutput relation described for the linear stationary case by the convolution Eq.3 IntegratIOn Stability Is the discrete approximation to integration (Eg.=h.
s 4.3. III the dtscrete case.41) '. for a discussion of Ihe Jory teSt.n]. however.(kT)l ~ e. The piecewise constant output of the D/A is the signal. i Ii. are described by continuous transfer functions in the Laplace variable s. (t). The first pan is Z{ G~'I}.13. (s) = (I s and the required transfer function is the ztransform of the samples of the inverse of Y. which can be expressed as G(z) = ZlY. are continuous systems and. (s). finding the poles of a particular transfer function is no big deal. J' : Figure 4. or. 1.96 Chapter 4 Discrete Systems AnalysIs 4. as in an adaptive control system. (4.12. The Laplace transform of the step response is G (s)!s. the corresponding pulse response decays with time g~ometI:cally and is stable. we wish to test for stability of an entire class of systems. Powell.40) = ZlCI{Y. however. 4. the most convenient such test was worked out by Jury and Blanchard(1961). and the use of s for the continuous transform and z for the discrete transform is always maintained.L G(s) 1= z' Z{ G(s)} s s because e. If u(k T) = 1 for k = 0 and u(k T) = 0 for k ~ O.T . the system with ratIonal transfer function is stable. accepts a sample u (k T) at t = k T and holds its output constant at this value until the next sample is sent at t = kT + T. they do describe the same plant.1(£ . if linear. To This is the sum of two parts.(s)1 = Zl(l _ e~T') G(s) I. 4. unitpulse input iD In Chapter 5. 1O The situation is drawn in Fig. 1990. As for the D/A converter. a comprehensive frequency analysis of sampled data systems is p~esented. 4. that is applied to the plant.) G(s). 2nd edition. commonly called a zeroorder hold or ZOH. we assume that this device. u(t). if all poles are inside the unit circle.13 y. this pulse is given by I (T) .. Thus. Sometimes. is exactly a delay of one period. (4. and the second is Z{e. In this section we develop the analysis needed to compute the discrete transfer function between the samples that come from the digital computer to the DI A converter and the samples that are picked up by the NO convener. With modem computer programs available.3 Discrete Models of SampledData Systems The systems and signals we have studied thus far have been defined in discrete time only. Thus in the transform domain the unit pulse response of the plant is Y. Our problem is now really quite simple because we have just seen that the discrete transfer function is the ztransform of the samples of the output when the input samples are the unit pulse at k = O.1 Using the zTransform We wish to find the discrete transfer function from the input samples u(kT) (which ~robably come from a computer of some kind) to the output samples y(kT) pIcked up by the NO convener. we follow convention and call the discrete transfer function G(z) when the continuous transfer function is G(s).12 Figure 4. Let us call the particular output in response to the pulse shown in Fig.13 D/A output for 2 I j I~ ! The prototype sampleddata system 9 See Franklin. Most of the dynamic systems to be controlled.1. The interface between the continuous and discrete domains are the NO and the DIA converters as shown in Fig. find G(z) we need only observe that the y(kT) are samples of the plant output when the input is from the D/A converter.3 Discrete Models of SampledData Systems 97 is inside the unit circle. if at least one pole is on or outside the unit circle.r . the potential poles are constantly changmg and we wish to have a quick test for stability in terms of the literal polynomial coefficients. the output of the DIA converter is a pulse of width T seconds and height L as sketched in Fig. and Workman. Although G(z) and G(s) are entirely dIfferent functIOns. Thus the transfer function is G(z) = (l z')Z {G:S)}. the corresponding system is not BlBO stable. Here we und~nake only the special problem of finding the sampJetosample discrete transfer function of a conlmuous system between a D/A and an AID. . This response is the difference between the step response [to I (t) ] and the delayed step response [to 1(1 . Although it is possibly confusing at first. Mathematically. such a test was provided by Routh.9 ZOH 4. In the continuous case.n.(s)}}~Z{Y.
98 Chapter 4 Discrete Systems Analysis . The samples of this signal are I (k T) s e"Uu I (k • Example 4." s= preceded by a ZOH..aT · (4. (4.o '. It is able to accept the system in any of the forms. We have G(z) = (I Z"I)Z • {~}. and the :transfonn of these samples is :.6 Di. • Example 4. We will apply the fonnula (4. c2d. (: .}Ii" 4.~~~ The MATLAB script =1 denC=[l 0 0) numC=l.43) with T = 1.e"'7) to find the discrete transfer function of I Gls)= .l)~ : +I which is the same as Eq.·s that T'(." .)=. + 0..T] = tfdata(sysD) • • Example 4.2: .41) shm.5 Discrete Transfer function of 1stOrder System What is the discrete transfer function of G(s) = a/is 21: .5.  eu7 ) 1.5 +1 = 0. + 0. + 1) G(. ~'.T z{G(S)}= ~ __:_ .41) (the ZOH method is the default) as well as other discrete equivalents discussed in Chapter 6. preceded by a ZOH" Solution. Now we can compute the desired transfonn as I (I_e"uT) Gtz) = '_.43) + il) preceded by a ZOH" Solution. z (:  II{.B n. assuming the sample period i.e"uT sysC = tf(numC..2 *Continuous Time Delay We now consider computing the discrete transfer function of a continuous system preceded by a ZOH with pure time delay.5. T Solution.4. (4.7 Discrete Transfer function of a Use MATL.denD.3 Discrete Models of SampledData Systems '. _ e~iJ..3.z .. The responses of many chemical processcontrol plants exhibit pure time delay because there is a finite time of transport of fluids or materials between the process and the controls and/or the This time we refer to the tables in Appendix B and find that the ztransfonn associated with l/s 3 is . _ e.41) Gis) a sls+ol s+a • The MATLAB function.denC) = .m computes Eq. (: .~'c " \ 99 and therefore Eq.I)" 1.:.B lis' Plant USing ~1ATV.5J and denD = [1 2 1] which means that GI:) = O~2 =.5 O.1Hz  e"'7)' We could have gone to the tables in Appendix B and found this result directly as Entry 12. S" :.42) sysD = c2d(sysC.".. T I sec. .T) [numD. .. and the corresponding time function is G(S)} £"1 { s. ".=1(I)e""'I(I). 14.luek Transfer function of a 1/s2 Plant What is the discrete transfer function of Gis) I produces the result that numD = [0 0.1 :(1 . 4.
when m approaches O. and this is exactly the same as if the process had a pure time delay.transform using the Laplace transfonn as in Eq. and the second term is an exponential shifted left by the same amount. Solution.Td) . and no sample is picked up in negative lime. Notice thatth:is zero is near the origin of the :plane when m is near I and moyes outside the unit circle to near 0(.emf'H(s) =e . = (I_e'aml) :+cr .. T = I.8 I I I I I Discrete Tians(n Flinction o{ 1stO"der System wIth Delav Find the discrete transfer function of the mixer in Appendix A. .0. To prepare this function for computation of the :transform.3679) .s ' emf.1) as a set of firstorder matrix differential equations. = 1. constantcoefficient system of differential equations was expressed in Eq.. For these values.3 Discrete 'y[odels of SampledData Systems 101 sensors. these shifts are less than one full period. we haye : .:::::=::: : + 0. (4.3 is described by GIS) = e'" H(s).amf)} (:I)(:~e"T) . 2T T o 2 T 2T 3T 4T ST 6T = 1.aT ~ (: . u. it becomes ~ I? Ie ~ I . x.'td'.0 such that ).e'aT). Because 111 < I.I {:[: .n To complete the transfer function. T = 1. linear.46) .8 illustrates. if any.5.41) is a very tedious business that is unnecessary with the availability of computers. Because In < 1. and The term e'. we take a = I." represents the delay of A seconds. We assume that H (5) is a rational transfer function. = (T . Consequently the final transfer function is Gl:) = : • 4.6025 where u is the scalar control input to the system and w is a scalar disturbance input.e. A continuous. the transfer function for this system would be computed by Td=1. The first term is a unit step shifted left by In T seconds. we must often consider finite computation time in the digital controller.44) (4. after the partial fraction expansion of H(s)/s. we need the :lransforms of the inverses of the terms in the braces. = 1. Figure 4. we first define an integer ( and a positiye number 111 less than 1. For specific values of the mixer.2) as a linear combination of the state.In T.:::::'~T :' I = : . sysC = a=l. (4. +a I tf(a.5. sysD = c2d(sysC.5.100 Chapter 4 Discrete Systems Analysis 4. as Example 4. With these definitions we can write G(si "f.:t(i_ei~T) where the zero position is at cr = _(e.5.l G(:) = :iI In MATLAB.1\. w. we get G(:) = x= Fx + Gu + G.e. With the techniques we have developed here. The corresponding :transforms are :/(: .umT . T=1 Z {e mT s.amf).amf /(: .3 with a ). The samples are given by 1(kT) and e'aT.3 StateSpace Form Computing the ~. and the input.e'''fi/(I . which includes both the proces> delay and the computation delay. it is possible to obtain the discrete transfer function of such processes exactly.[l aJ.1)e. which becomes for scalar output y = Hx+ JII.'+"" l(kTi.14 Sketch of the shifted 2t signals showing sample points • Example 4. The fluid mixer problem in Appendix . Also.45) :"(: .14. and t. (2. We will next develop a fonnula using state descriptions that moves Ihe tedium to the computer.I) and :e. Then we can compute that e = 2 and m = 0. For a scalar input. this term reduces to :" when we take the :transform. (4. (2. 4. The signals are sketched in Fig. the transform of the other term is quite direct. s s Because ( is an integer. The output was expressed in Eq.3. We select H(s) = a/(s + ai and.
45) and (4.48) . If we designate the system matrices for the new state ~ as A. and application of the lran.15 and the attitude (0) and attitude rate (e) are defined to be XI and xl' respectively. (4. To analyze the result. Given one state representation. . y = Tl~+ Ju.47) gives l u. This is the homogeneous equation (4. interchange the states is I =.47) A=[~~] B=[~] C=[O I]. B. Ultimately. the equations of motion Can be written as [~ ~] [.9 Slate Representation of a 11s 2 Plant Apply Eqs. 4.46). (4. 4. We saw earlier how a single highorder difference equation could be represented by a state description in control or in observer canonical form.1'.45) and (4. we find ~ = Tx = T(Fx + Gu + G I w) = TFx+TGu + TGlw. We begin by solving the equation with only initial conditions and no external input.formation equations to the system matrices of Eq.46) is zero and will frequently be omitted. Fig. State transformations can take a general description for either a continuous or a discrete system and. operate on that sequence by means of a difference equation. (4. be closed.47): or.10 Statt" Trans(tJinwti.102 Chapter 4 Discrete Systems Analysis 4. Ifwe let ~ = Tx in Eqs. as needed.. • • The representations given by Eqs. where • Example 4. turns out to be a rather involved way of writing ii =U. The satellite attitudecontrol example is shown in block diagram form in Fig. we must solve Eq.3 Discrete Models of SampledData Systems 103 Often the sampleddata system being described is the plant of a control problem. To do this. in this case. and put out a sequence of numbers. We will solve the general equation in two steps.entation for the case with the state definitions of the previous example interchanged.tale repre.~] + [n F T=[~ ~] In this case T. ~J. Figure 4. subject to some technical restrictions.46) are not unique. ~ = TFTl~ + TGu + TG1w. C. Therefore. then y=q+Du.I G(s) =~. (4AS).] "G (4. The loop wilL therefore.' 1/s2 Plant Find the . and the parameter J in Eq..mlo. which.46) to the double integrator plant of the satellite control problem in Appendix A.15 Satellite attitude control in classical representation Most often. Solution. Let ~I = . convert it into a description in one or the other of these forms. and~. the tramformation 10 Solution. a change of state is made to bring the description matrices into a useful canonical form. \vhich are the inputs to the plant. We wish to use the state description to establish a general method for obtaining the difference equations that represent the behavior of the continuous plant. (4. u(k). Also. there is a very useful state description corresponding to the pat1ialfraction expansion of a transfer function. • Example 4. any nonsingular linear transformation of that state such as Bx = Tx is also an allowable alternative realization of the same system.1'. and D.45) and (4. (. the digital controller will take the samples Y(k). (4. in matrix notation. we must be able to relate the samples of the output y(k) to the samples of the controlu(k).16 again depicts the portion of our system under consideration.= T. in Eq.
. (4... by definition." To solve this. ) + Fo . (t) = [ 1 + F(t . using the results of Eq.52). but because the equations are hnear. we obtain xI... If we differentiate Eg. '" xU) = eFiI"o)x(Tu) + "'xU I ). For example.". we can express xU.U  to) + 3A.51 ) Assuming that the control u(T) is zero for' < to obtain l'(t) = '0' we can integrate v from to to t k I' I" e·Flr""JGu(r)dr. The particular solution when u is not zero is obtained by using the method of variation of parameters.' = 1 + F(r .'vU). Hence we conclude that (4. where.104 Chapter 4 Discrete Systems AnalysIs . (4.45). and.3 Discrete I\lodels of SampledData Systems 105 We now have two separate expressions for xU). (t (0) '(J' Note especially that if t 2 = '0' then + A. . Figure 4. consider two values of t : t l and '.16 System definition with sampling operations shown . (4."' 2! + F' (t .~o k! Hence. we assume the solution is sufficiently smooth that a series expansion of the solution is possible xh(tI = Ao + A.50)]. .'.) = eF'I.49) If we let r = ro' we find immediately that Au = \.48).xU(. from Eq.50) is unique.53) into Eq.. (4.50) i·(t) = e·F"""'Gu(T).)' + . (4. (0) .54) XU) = eFII'""x(rIl)' Because is arbitrary also.(t  . we have Aj Thus we can obtain the inverse of et"< by merely changing the sign of" We will use this result in computing the particular solution to Eg. (4. 'J . (4. using the fact that the inverse is found by changing the sign of the exponent. for which x(t.53). the effect of 11' can be added later. (4. )2 (1 = L F' (t _. I I Due to Jo~eph Loui~ Lagrange. we obtain the particular solution (convolution) Xp{t) and = [eFu. and simplifying.) + . = AI = Fx o' ~ow we continue to differentiate the series and the differential equation and equate them at to arrive at the series '0 '0 where v(r) is a vector of variable parameters to be detennined [as contrasted to the constant parameters xU u) in Eq.52) for all'.t0 ) + F'(t 2 1)2 OJ + F'(.53) + 2A. if the solution is unique. (4. 11 (4.491 and substitute into Eq.(t) = eF'I""'x(to)' and.54): (4..> e·FIT"n'Gu(r)dr.) as if the equation solution began atl.50) and (4.. we get xp{t) = eFu'"t It can be shown that the solution given by Eq. (4. 6 t[) )J + . l' '" (4. the matrix exponential is e FII .. we can sol ve for i' as (4. these must be the same.. Substituting Eq..r'GU(T)dr.·. (4. .55) e FiI · rt GII(r)dr. French mathematician (17361813>.' 4.. (t .... at . II We guess the solution to he in the form xr(r) = eF'I"..45)... . (4. 'eF". = Fx" and.x O' This series is defined as the matrix exponential and written x..t )J 3! ..) = e F1L '(I The total solution for w = 0 and 'i 0 is the sum of Eqs. We aSSume 71' = 0.' We have I' '1.).. which leads to very interesting properties of the matrix exponential. Substituting for xU I ) gives x(r.(l  'Ii +.
57) and (4. <P = eFT = 1+ FT + FeT' 5. that is.I + FTV TV . :~ 1(I + F:)) . is given by Eq. ! 8.transform ofEq.) Eqs. To compare this method of representing the plant with the discrete transfer functions. (.Identity Matrix 4J +. and T for Simple cases. The program logic for computation of <P and r for simple cases is given in Fig.T'I'G Matrix <P +. (4. Hx(k). We evaluate V by a series in the form (4.. If w is a constant. 4. 9.+ . 2! 12 If urU) varies significantly between its sample values. Select sampling period T and description matrices F and G. A common and typically valid assumption is that of a zeroorder hold (ZOH) with no delay. MATLAR's c2d. and assume that J = 0 in this case. Matrix V +.59) with w = 0 and obtain [. over the sample interval. 4. Matrix I +.63) x(k + I) v(k) = = <Px(k) + ruCk) + r. u(l). A discus. (4.. is replaced by..56).58) can be evaluated term by term to give V=I+.'I . G. and a review of various methods is found in a classic paper by Moler and Van Loan (1978). (4. (4.60) + T) = eFT x(kT) + This result is not dependent on the type of hold because u is specified in terms of its continuous time history. 10.. (4. (The left arrow .. ~ + (4. this fact can be accounted for in the evaluation of the integral in Eq.56) is required to describe its influence on x(k I). is read as ..11 [We are using N = 11 in Eq..62). then r . If w is an impulse.IC The <P series expansion 2.57) If we define <P = eFT r = iT eFOdl}G. (4. men an imegrallike thaI of Eq.46) reduce to difference equations in standard form (4.56) for a ZOH with no delay.] If k = 1. Random di~lurbances are treated in Chapter 9. kT:::: r < kT l kT~T where eFiU+r"Gu(r)dr. 6.59) figure 4. We then find r from Eq..58) which has better numerical properties than the direct series of powers. (4.k + 1 Go to step 5.G (k+ I)' M x F<T<+' x FkTk + T.m and all control design packages that we know of compute <P and r from the continuous matrices F. Y(z) = HX(. To facilitate the solution of Eq. (4.61 ) V 1 F: (1+ F. then r .") I. (4. (4. go to step 9..17 Program logic to compute'" and r from F. (4.17.). ). Then we have (4. we can take the . The equations for a delayed ZOH will be given in the next subsection. (4.ion of the selection of N and a technique to compute V for comparatively large T is given by Kallstrom (1973).r. (4.56) FT kT The r 2' 3! integral in Eq.62) +T . (4.55): x(kT can also be written (4.<PIX = rUe.. = G.w(k).+ F CT 2 r=L. we change variables in the integral from r to I} .uch that 'I = kT =VTG.I + k +. u(r) = u(kn. where we include the effect of an impulsive or piecewise constant disturbance.61) and <P from Eq. G. 7.58) with G replaced by G I . and the sample period T.106 Chapter 4 Discrete Systems Analysis 4.I k +.. 3.60).. =LTG k~O (k+I)! If some other hold is implemented or if there is a delay between the application of the control from the ZOH and the sample point.3 Discrete 1\10dels of SampledData Systems 107 We wish to use this solution over one sample period to obtain a difference equation: hence we juggle the notation a bit (let t = k T + T and to = kT) and arrive at a particular version of Eq.. Matrix r +. w.
Combining the two parts of Eq. then :':0 is a zero of the system.I)' = O. corresponding to the two integrations in this plant's equations of motion. To compute the poles numerically when the matrices are given.63). [phi. c (4. we have det[zI . one would use an eigenvalue routine. (4.59). In MATLAB.108 Chapter 4 Discrete Systems Analysis 43 Discrete . we must satisfy the requirement [ zI i sysC '" ss(F.TLAB statements i I will produce a vector. Using the ~ from the previous example.'.gam.Iodels of SampledData Systems 109 therefore Y(z) = U(z) H[I _ ~]Ir.47).) . (4. we have ° ~ ~] .:) .60.$).I) 13 Vle do nOl consider here the case of different numbers of inputs and outpuh. lam. (4.c: .41) and the ~transform tables.~) = O. An interpretation of transferfunction poles from the perspective of the corresponding difference equation is that a pole is a value of z such that the equation has a nontrivial solution when the forcing input is zero.I [ ~ o T'/2] . Once more the condition for the existence of nontrivial solutions is that the determinant of the square coefficient system matrix be zero.9. I} For the satellite example. (4. using Eq.61) and the values for F and G defined in Eq. (4. Use Eqs. Along the same line of reasoning.c: . This determinant is the characteristic polynomial of the transfer function. and the zeros of the determinant are the poles of the plant.]] . which comes from the matrix inverse in Eq._I det T .H)) sysD '" c2 d(sysC. hence.65) i I. calculate the <I> and 4. as we have seen.64). r matrkes for the satellite attitudecontrol system of Example Solution.64). . (4. (4.64) • Example 4.G. From Eq.T o [ TI T'/2] _T 7 _ c = + T' + 2' (T') (.1 T ] = (z . Note that the values for <I> and r could have been obtained for a specific value of T by the M. we have . We have two poles at z = 1 in this case.11 $ and r CalculatlOn We can explore further the question of poles and zeros and the statespace description by considering again the transform equations (4. det = [0] .$] = det [[ = det [ ~ By hand. Thus !f we are able to find a nontrivial solution for X(zo) and U(zo) such that Y(zo) IS zero. of the poles of~.[~ 0 . From matrix algebra the wellknown requirement for this is that det(:.. T) ~~ or][ ~ i~n = I . and (4. .$]X(::) = [0] have a nontrivial solution. Since F' = in this case. we obtain = [1 0+ [~ T' (~+ 1) n[~ nr[Tt ] which is the characteristic equation.1 z. the statement lam=eig(phi) 2 (~ l)" which is the same result that would be obtained using Eq.h)] '" ssdata(sysD) • Note that to compute Y/ U we find that the denominator is the determinant det(::. this implies that the linear eigenvalue equations [zI . a system zero is a value of z such that the system output is zero even with a nonzero state~andinput combination.63a). (4.
(4. ~ kT . (4.A) dT. (4. into an integral number of sampling periods plus a fraction.66) is given by Eq.J Using the discrete model sysD found in Example 4. (4.11 the statement zer=tzero(sysD) T2 If we now separate the system delay).18). These zeros are called transmission zeros and are easily computed using MATLAB'S tzero. In Eg. <1. then + + T) = eFT x(kT) l O kT . we find that the discrete system is described by produces the transmission zeros in the quantity zero + Tl = eFTx(kT) + ( ef'Gu(kT }" +T . (4.3. (4. kT Figure 4. (4. We begin With a statevariable model that includes a delay in control action. kT .11) dl1. The state equations are x(t) = Fx(t) If we sketch a segment of the time axis near t = k T . which we assume is piecewise constant. the control.I: T + T + fIl T backward to kT .69) eFlt'''GU(T . Therefore.' I If we substitute 11 = kT Eq.A 11)(drj) Sketch of a piecewise input and time axis for a system with time delay ~~_.~T + 2T . (4. it is X(I) = eFII"o'x(to) . we can define an integer t and a positive number m less than one such that 1.t T (Fig.70) If we let to = kT and 1= kT x(kT + T.69) we defined and (4.110 Chapter 4 DIscrete Systems AnalysIs 4.66) into two parts as follows x(kT + Gu(t  A).57) x(kT +T  T for r in the integraL we find a modification of + T) = eFTx(kT) + = efT x(kT) i +1 T ef"Gu(kT eF"Gu(kT +T .A) dr. takes on first the value u(kT . 4.3 Discrete Models Dr SampledData Systems III =+z+2 2 T2 T2 = +2(z + I). T eFlkT+T·nGu(r .iT + T) and then the value u(kT . (4. With this substitution.18 u(1) . the nature of the integral in Eg. Over this period. + I ef"GdYju(kTtT) = «!lx(kT) + it '0 + r.u(kT  tTl + r 2 u(kT I:T + T). ordinary differential equations of motion.=tTmT.~T + T kT .~T I~/I 14 In us~ng th~s function.includ~ng a time delay in the model and also a time prediction up to one penod whIch corresponds to the modified ztransform as defined by Jury. Now we presenlthe formulas for .4 *StateSpace Models for Systems with Delay Thus far we have discussed the calculation of discrete state models from continuous. The integral runs for I) from 0 to T.55).m. Thus we have a single zero at z = I.67) and t > o :=::m x(kT O.l.tT). as we have seen from the transfer function.t T + mT. .68) 4.68) with respect to the variable 11 will become clear.~~ +T  A . lO ~cale the finite number~ so they don"t appear to be zero by the computer.tT +mT 11)dl1. one must be careful to account properly for the zeros that are at infinity~ the functIon mIght return them as very large numbers that the user must remove to "uncover" the finite zeros: that is. l mT 0 ef"Gdl)U(kT . we can break the integral in (2.66) + T) = efTx(kT) T mT + y = Hx. which corresponds to t frum k T .iT + T) The general solution to Eq.
= O. = ~m T according to Eq. (4. we have <II(a) = 1+ L Fj' a_ __ x J. Note especially that if m = 0. the two matrices (4. To do this. which implies not delay but prediction.74) If we let k = j + I in the sum. If we return to the case f = 0. From Eq.77).u(k) + Jdu(k). = + I) .76).u(k + I) <II[~(k) + r. for any positive nonzero scalar number.u(k). + [. Ii.~O k! F' a'I F'u' du +I Thus for £ = O.eFodaG.71) For notational purposes we will define. (4.u(k  I) + r. and these equations reduce to the preV'ious model with no delay.73). a. 1'. To do so we first convert 1'1 to a form similar to the integral for 1'. m =I 0 is called the modified Z transform.73) The output equation is Hx(k) The definitions in Eqs. the transform of the system with f = 0. (4.72) are also useful from a computational point of view.70) we factor out the constant matrix G to obtain o =L' bo(k+I)! But now we note that the series for <II(a) can be written as x F'a' (4. (4. and £ > I.77) = Hd~(k) L~ a . (4.I )0 (j + I)! =1+ L x Pa) aF U+I)l FO 1'1 If we set a = I]  = 1 T mT e d1)G.67).60). by taking £ = 0 and m =I 0 we pick up the response values between the normal sampling instants.70). (4. 15 The statevariable form requires that we evaluate the integrals in Eq.)u(k) <II~(k) + ruCk). ~(k) = x(k) .mT)<II(mT)'I'.69) in standard statespace form. F* ' k.112 Chapler 4 Discrete Systems Analysis 4. = mT'I'. (4. (4.3 Discrete Models of SampledData Systems 113 To complete our analysis it is necessary to express Eq. then. mT 1'1 = eF'mT+a'daG o T mT . The point ofEq.u(k). = H(~(k) + r. are given by Eq. as in Eq. we must eliminate the term in u(k + I). the discrete state equations are x(k + I) = <IIx(k) Fry = 1+ a'l'(a)F.u(k)] = H~(k) + Hr. m = 0 would show at t = m T. we have T.~O x +. y(k) = [2u(k + I). and the discrete system will be causal.76) (4.u(k + I). = e Fm 1 1 + rlu(k) + [. the state equations are given by Eqs. In order to put these equations in state·variable forin.u(k + I) + rlu(k) + [.r.r. If we recall the series definition of the matrix exponential <II(a) = e F " = then we get 'I'(a) = I . (4. (4. + [. we have 1'1 = (T . and (4. we define a new state. (4.73). (4.75) m T in this integral. In =I O. In ztransform theory. (4. the output will not show a sample before k = 0. however. the equations are given by x(k + I) = <IIx(k) 15 See Jury (1964) or Ogata (987). Then the equations are ~(k ~(k + I) = x(k = <IIx(k) + 1) = = In terms of these matrices. and [.69). then r. £ = I.1" L x L . which the same system with t = 0. In other words.75) is that only the series for 'I'(a) needs to be computed and from this single sum we can compute <II and r.72) where 1'. From Eg.. . For t = 0. m =I 0 will show the response at t = 0. Our next case is C = I.u(k)l + rlu(k) <IJ~(k) + (<III'. Because m T is restricted to be less than T. (4.~O k! k a I 0 x . To do this we must consider separately the cases of t = 0. (4. The result is that the discrete system computed with t = O.
to = 2T and II .+I(k) xn+Jk) xn+3(k) 0 0 0 0 + 0 0 u(k) [ xn+.3.+~(k + I) + I) j <f:> r l r. i=l Taking the log of both sides. namely. which we do by defining a new state x n _ 1 (k) = liCk . To do this we introduce new variables such that '.3 Discrete Models of SampledData Systems 115 In this case. we must eliminate u(k . A . and before acceptable accuracy is realized most computer number representations will overflow.) I T. we can compute the series for T 12 and square the result. which can be written o o H o o 0 0 0 0 0 0 0 ] xu+i(k) y(k) = [ o . We will select k. the equations are I) + 1) = Wx(k) + rju(k + r.78) For our final case. The problem is that if FT is large. and the equations are x(k + 1) ] = [W [ ''''_I(k + I) 0 y(k) Figure 4. to yield a small remainder term R. (FTI2')j (j + I)! = 'It + R. A simpler method is to select k such that the size of FT divided by 2' is less than I. The rule is to select k such that 2' > 4. We have thus an increased dimension of the state. we compute the series for T I 4.li(k  e+ I) e which has been found effective by Moler and Van Loan (1978). if T is too large. (4. (4.74) or. If T 12 is too large. R ~ (FT)'/(N + 1)!2"'. The structure of the equations is x(k+l) x..\. 4. 0 0 I 0 0 0 0 1 0 0 x(k) x. In this case.x. The basic idea comes from Eq.80) and we must eliminate the past controls up to liCk). the factor that decides how much the sample period is divided down.1).19 Block diagram of system With delay of more than one period... 0] [ '\:+(I~~) : x"~i(k) 'It 2' (4. We need a test for deciding Oll the value of k.(k+l) Thus. 0).62).114 Chapter 4 Discrete Systems Analysis 4. as shown in Fig.52) with t~ . (4. Kallstrij~ suggests that we estimate the size of R by the size of the first term ignored in 'It. destroying the value of the computation. until we find a k such that '1'/2' is not too large.. vector valued variables r j ] [ x(k) xu+l(k) ] . then (Fn s IN! becomes extremely large before it becomes small.1) from the righthand side. by Eq. from which we select k = max(f log~ II FT II.+I(k . for a = T. we consider x(k > 1.19. This final solution is easily visualized in terms of a block diagram.79) ( T) = "" [F. namely (4. (4. and so on.. II FT II = max J " L I F. the series for FT12' will surely converge.10 = T.5 *Numerical Considerations in Computing ell andr The numerical considerations of these computations are centered in the approximation to the infinite sum for 'It given by Eq.(Tli)]l "I ~ (j '" + 1)! + ~ . Double line indicates .81) . We propose to approximate the series for 'It. ] 0 +[ r2 I ] lI(k) = [H 0] [ X'~+I t (4. In this case. Kallstrom (1973) has analyzed a technique used by Kalman and Englar (1966). we find k > log~ II FT II . x"jk) = u(k  I).
3. tl 12. 'I' +. 13.TLAB in C20. 14. (4.)I(T).S. To obtain the suitable formula for 'IT. simply x= x= f(x. (4.m executes the logic with a delay if one is specified. We assume stationarity by the approximation that f and h do not change significantly from their initial values at too Thus we can set 16. = 2. . I' . We begin with the assumption thaI our plant dynamics are adequately described by a set of ordinary differential equations in statevariable form as $(2T) = $(T)$(T).80). we must implement the logic shown in Fig. f(x.ul·····llm·tl. 5. u). . y = h(x.III·····um· t ). '1') 'IT k+kI' Go to step 15.maxj{L: i I F'j IJ x T k +. . we use the relation between $ and 'IT given by Eq. x~ = I.60) as follows to obtain the "doubling" formula for 'IT A rx For that. or. 4. it is often advantageous to linearize the system so the methods in this text can be utilized. .6 *Nonlinear Models Contrary to the predominant developments in this book. II. If k = O. x ' U I . t). Having selected k.20. Comment: Now double 'IT k times. the function c2d.' ·. to) 16 Similar logic is u>ed by M. The program logic for computing 'IT is shown in Fig. 'J =hl(XI····. u. +. go to step 14. U m' 1). • x"' III' . 16 This algorithm does not include the delay discussed in Section 4.3.smallest nonnegative integer greater than log. 6.. it (4. (x t •••• . 1 + 2TF'IT(2T) = [I = 1 I 2TF'IT(T) therefore 2TF'IT(2T) = 2TF'IT(T) This is equivalent to 'IT(2T) = + TF'IT(T)J[I + TF'IT(T)] + T'F''IT~(T). terns are generally nonlinear.II If j = 1.. Controls engineers commonly use numerical simulation of nonlinear models to evaluate the performance of control systems. which is the form to be used. 10. 4.X". 19. • T.83) 'I' +. it is more difficult to apply analysis to nonlinear models and.20 Logic for a program to compute'" using automatic time scaling ilJ I. we assume that our plant dynamics are described by x= f(x. (1+ T: 'IT(T)) \. more compactly in matrix notation. 4. thus. less insight is gained if models are left in their nonlinear form throughout the entire design process.x".. stop. which satisfied Eq. u). (4.(I +..116 Chapter 4 Discrete Systems AnalysIs 43 Discrete Models of SampledData Systems 117 where the symbol means the smallest integer greater than x. 4. . we now have the problem of computing ~(T) from 'IT ( T/2').I j +. (:>.M. Figure 4. V. Comment: compute '1'( T /2'). models of dynamic sys. 8.1 + HI 'IT J x(tll ) = xu' y = h(x.v. 7. One proceeds as follows with the process of linearization and smallsignal approximations. + T'F''IT"(T}.:. a technique that should always be a part of any control system design. To aid in the design synthesis of controllers and to gain insight into approximate behavior.3. V+.. . • U III' t). The maximum of this integer and zero is taken because it is possible that II FT II is already so small that its log is negative. Select F and T.T /2' 1 +.Identity 'IT +. u. Comment: Compute II FT II.82) or. (4.84) .>.4. In the Control Toolbox. XI =/1(x. 9. However. j+jl Go to step 10. 15. in which case we want to select k = O. Our original concept was based on the series for $. u. 18. 17.
We then write the model as x(k I: I' I. (4. + J u(k). (4.87). which is the transform of the output signal.J J = h. and these can be substituted into Eq. (4. E(z). to return to Eq.87) where we define the partial derivative of a scalar by a subscript notation: with respect to the vector x I ~ (aI.84). aXn (4.d lI»T + 1.93) + f. Uo + 8u). it is tedious but simple to verify that Eq. so we drop the 8x. If the system description is available in differenceequation form.Il. u (x o' u.. If r IS a vector. to be an equilibrium point of Eq. (4. is tedious if done by hand.88) Thus we see that nonlinear models can be approximated as linear statespace models or as transfer function models.. (4. aI2 f" ax ax "i~. ay = h" 8x + h. and. (4. where r(x o ' uo) Uo But now the notation is overly clumsy.87) is zero.85) F H = f" (x o' uo). The final design of the control system should always be checked via numerical simulation of the nonlinear equations. u to be an equilibrium point.2 we demonstrated that if two variables are related by a linear constant difference equation. (4. We thus have a vector equation and need the expansion of a vectorvalued function of a vector variable. The fact that ax and au are small is now used to motivate an expansion of Eq.86) Hx(k) + ruCk). u and y and define the constant matrices = 0. 8u and 8y notation and simply call them x. Our approach to this problem is to present a C. (4. we note that by Eq. (4. and the ratio is called the transfer function. . if x and u are "close" to X o and uo' they can be written as x = X o + Ilx: u = + 8u.4 Signal Analysts and D)11amic Response 119 The assumption of small signals can be reflected by taking x and u to be always close to their reference values x o' u o' and these values. however. G = r. we define its partial derivatives with respect to the vector x as the matrix (called the Jacobean) composed of rows of gradients. (4. then the ratio of the ztransform of the output signal to that of the input is a function of the system equation alone..). = h. (4.82).86) can be written as'7 8x = f(xo' u o) from which the transfer function is G(z) = Y(z)/ U(z) = H(.82) and do the expansion of the components f. ' i d df + I) = y(k) = lI>x(k) (Xu + 8x) = f(x o + 8x. (4.90) 17 Kate that dxoldr = 0 because our "reference trajectory'· o is a constant here. so the first term on the right of Eq. ax.91) We go even further and restrict ourselves to the case of single input and single output and discrete time. In the subscript notatiun.. and if the input signal is elementary. but is generally useful in designing the control system. then the first three steps of this process require very little effort or computation. f. consisting of the following steps: aI.118 Chapter 4 Discrete Systems Analysis 4. (4. . The accuracy of the approximation varies with the problem. because we will later be preoccupied with design of transfer functions to give desirable responses. we omit the specific subscript such as I or 2 but hold its place by the use of a comma 'I 4.84) about Xu and U o and to suggest that the only terms in the first power of the small quantities Sx and au need to be retained. if we mean to take the partial of all components. furthermore. (xo' uo)' X=Fx+Gu.92) If we go back to Eq.. we are led to the approximation ax "" 1. we attach great benefit to gaining intuition for the kind of response to be expected from a transform without actually inverting it or numerically evaluating the response. E(z)H(~). U. I. Compute the transform of the input signal. The final step.1.o 8u.1 y = Hx +Ju. This results in the form we used earlier in Section 2. (xo' uo)Sx + Co (xo' uo)Su + . o (x[l' uo)' Now.4 Signal Analysis and Dynamic Response In Section 4. A method for study of linear constant discrete systems is thereby indicated. 3. (4. 2. Form the product.'.. X (4. (x o' uo)ax + Cu (xo' uo)au. one at a time. fJ I ..88) is called the gradient of the scalar I. Invert the transform to obtain u (k T).' " i I = (4. (4.oand because the terms beyond those shown depend on higher powers of the small signals Sx and 8u. with respect to the vector x. 4.85) we chose x .89) af" I' " ax Now. The row vector in Eq. Compute the transfer function of the system H (z).
3 Exponential The onesided exponential in time is =0 . 'iub.(k) = I 4. :(k' l_e__e __e_e __e_e__e k'" (b) (a) . the ztransfonn is E1(z) = t ("="X. re~ertoire 4. To begm this process of attaching a connection between the time domain and the ztransform domain. = 0 = Ok: therefore we have '" E 1.~ ____e. Izi = 1... Beside the zplane.4.97) . The Laplace transform of the unit step is I! 5: we may thus keep in mind that a pole at s = 0 for a continuous signal corresponds in some way to a pole at ~ = I for discrete signals. using the symbol Ilk) for the unit step function. To emphasize the connection between the time domain and the zplane. In any event. _k = .ve ~hifted notation here to use elk) rather than e~ for the kth sample. \Vr: USl.~ ""... we compute the transforms of a few elementary signals. when given an unknown transform we will be a~le.4. by reference to these known sol~tions. e/k) Zk = t z( . whi~h is the umt pulse response: then Viz) = H(z)...a. 4. we sketch the time plot of dk).21 the zplane with the unit circle shown and the pole of E.95) 1 = I . (b) Plot of e1 lk) This result is much like the continuous case. (k :0. wherein the Laplace transform of the unit impulse is the constant 1. I(k). will correspond to a constant for positive time and zero for negative time..2 The Unit Step Consider the unit step function defined by e.r~' 18 :le h. to infer the major fea: tures of the tlmedomam signal and thus to detennine whether the unknown is of sufficient interest to warrant the effort of detailed timeresponse computation.(k)=l (k=O) (k =.(k) = r' (k ~ 0) (k < 0) =0 (4.21 (a) Pole and zero of £I(Z) in the zplane. () ~0J:"" _0 (4.96) which is the same as r'l(k). . we sketch in Fig.\Cnpb to zr (izi > 11'1)· (1.=0 I __ I ~ = L(I'~')( (~O " z I (lzl> I).. we record that a pole at z = I with convergence outside the unit circle.(z) marked x and the zero marked c. In this case.120 Chapter 4 Discrete Systems Analysis 4. = I .. consider the signalu(k). 4.1. . (4..4.94) Figure 4..0. The unit circle is shown for reference.~ Identity dIfferent signals.0) (k < 0) Now we get e. Thus.1 The Unit Pulse We have already seen that the unit pulse is defined by" e. The significance of the convergence being restricted to I~I > I will be explored later when we consider the inverse transfonn operation. The quantity E.+ Signal Anah'sls and DynamIC Response 121 of elementary signals with known features and to learn their representation m the transfonn or zdomain. (z) gives us an instantaneous method to relate sianals to sy:tems: To characterize the system H(z).i 0) Here the transfonn is characterized by a zero at ~ = 0 and a pole at ~ = I. We will explore this further later.
~ '. and b~cause the ztransform is Iinear.. (b) Plot of e1(k) (lzi > 1'). We collect these for later reference.' given above is simple and is gIven m Section . (4.(k) 2row.(z) is at z = r. we see immediately that the other half is found by 4 replacing e by e in Eq.J " ~ } .re J " + Z .7 and = 45'. We thus take first (4.39). (4.. By exploiting the features of E 4 (z).re.101) 4.f. From Eq. z(zrcosli} Z2  (a) 2r(cosli)z + 1'2 (izi > 1').7 In the zplane. The demonstration. r = 0.122 Chapter 4 Discrete Systems Analysis 4.96) we know that e.100) • and thus that • • • (b) E (Z) = J { ~I 2 z .98) and compute x Figure 4. If such a signal were the unitpulse response of our system such as ?ur digital control program.(z) In the zplane.'k k~ • x • • • • • • = L(reJ".97) we conclude that a ztran~fo~ that converges for !arge z and has a real pole olltside the circle Iz I = I corresponds to a growIng signal. we can decompose e (k) into the sum of two 4 complex exponentials as The . We plot in Fig. Actually. (I) (b) . (b) Plot of e4 (k) E. 4.99) The signal es(k) grows without bound as k gets large if and only if r > Land a system with this pulse response is BIBO stable if and only if 11'1 < I.23 (a) Poles and zeros of E4 (z) for e = 45. where we assume I' > O. (4.4.22 the zplane and the corresponding time history of EJ(z) as e. we would say the program was unstable a~ we saw In Eq. To complete the argument given before for e (k) = r k cos kli I (k). (izi > 1'). 4.·I/ ~=o 19 ~Ve have not shO\~n .plane polezero pattern of E 4 (z) and the time plot of e.23 for I' = 0. without bound if 11'1 > 1. then e..4 General Sinusoid Our next example considers the modulated sinusoid e4 (k) = irk cos(kli)]l(k).(z) = Lrke1"k. e e4 (k) = r k ( eJk" + ikH) 2e I(k). 19 we need only compute the transform of each SIngle complex exponential and add the results later. reduces to e3 and. (4. (4. We note in passing that if Ii = O. with I' = I.(k) tor the stable value. r = 0. (4.(k) are shown in Fig..6. to e2 . so that three of our signals are special cases of e.99) Figure 4..this formally.22 (a) Pole and zero of f. we can draw a number of conclusions about the relation between pole locations in the zplane and the timedomain signals to which the poles correspond.4 Signal Analysis and Dynamic Response 123 The pole of E.6. From Eq. using the definition of linearif\. (4. The boundary of stability is the unit circle.
.. 4. \\ e take the continuous signal ._ exploit our kno\\'ledge of splane features by transfemng t~em to eqUlvalent ~ plane properties. The corre sponding system is BIBO stable.samples/cycle. we have established that the duration of a time signal is related to the radius of the pole localto~s ~nd th~ number of samples per cycle is related to the.24 along with other contours that will be explained in the next section.. e(l). ± Iw". N. angle. 0 0. We can compute the settling time in samples. bT=n/4.1021 with A compilation of signal responses versus their pole location in the zplane is shown in Fig.g T = sampling period 2Jr 360 4.+ figure 4. WIth thiS devlCe we can .9 0. 8/ T is the frequency in radians/second.124 Chapter 4 Discrete Systems Analysts +.23(b) shows the eight samples in the first cycle very clearly.8 0.3567. and the signal frequency is f = 1/ NT so that N = fJf and 1/ N is a normalized signal frequency. we have N = 8.. s) continuous Signal. aT = 0. Since fJ = (2n)/ N."(1) For 8 = 45'. of the poles.r rad contains N samples. For the specific numbers represented In the tllustratlon of e•. . e = e . fJ"d8d. : plane loci of roots of constant rand wIt • =1'''\. The sampling frequency in Hertz is 1fT. is set mainly by the value of the radius.6 0. r.. 4. The settling time of a transient.24 . 8: Another set of \ef) ~sefu relationships can be established by consldenng the Signals to be samples from a ..~ z:. If we require cos(fJk) = cos(8(k + N». I SIgnal Analysis and Dynamic Response 125 1. (c) For r < I. e unit Clrele with angle ~ marked Sketc h 0 f th In numbers of samp es per eye e __ I  _r 1m axis (a) r > I corresponds to a growing signal that will not decay at all. which encompasses all possible signals. where N ..4.. It demonstrates visually the features just summarized for the general sinusoid. .8 0. we find that a pcriod of 2. cos bl I (I) (4. r. (b) r = I corresponds to a signal with constant amplitude (which is nor N 4 BI80 stable as a pulse response). Pole Radius Response Duration N 0. and the plot of e4 (k) given in Fig. N"2_1. 4.25. .e Tt 2.6 z :. defined as the time required for the signal to decay to one percent of its maximum value. the closer r is to 0 the shorter the settling time. A sketch of the unit circle with several points corresponding to various numbers of samples per cycle marked is drawn in Fig.I . The number of samples per oscillation of a sinusoidal signal is determined bye.. in terms of the pole radius. is the normalized signal frequency in radians/sample.4 43 21 9 5 (d) A pole at r = 0 corresponds to a transient of finite duration.5 Correspondence with Continuous Signals From the calculation of these few :transforms. wit h L ap Iace trans f orm E( " .
e •• . 7\~V ••••• Figure 4.. .. .25 Time sequences associated with pole locations In the zplane From Eq. the discrete signal can be generated by samples from continuous signals where the relation between the splane poles and the corresponding ~ plane poles is given by (4. E(~) can be expressed as a sum of elementary terms like E.26.103) shows us where to look in the ~plane to find a representation of discrete samples having the same time features. multipl)'ing .4 Signal Analysis and Dynamic Response 127 Figure 4.(k).5 Rel~) If E(~) is a ratio of polynomials in ~.. e_r~h. .I (k) 4 lrk = (0. ..7)' cos . .. .26 Corresponding lines in the splane and the zplane accord ing to iw '\. Each feature should be traced in the mind to obtain a good grasp of the relation. . (4. 0. . (4.(~) has poles at ~  _ Iml:) but because v(kT) equals e. These features are given in Table 4. (/ . The result is readily shown to b~ a polynomial in II.plane (a) (b) The poles of the Laplace transform of yft) (in the splane) are at sl2 = a + jb. .um1 l cos .. then by partial fraction expansion. ~ ... It is useful to sketch several major features from the splane to the zplane according to Eq. (4.I (k) 4 = e. We note in passing that the map h. . \Ve have yet to compute lhe discrete version ofa signal corresponding to a higherorder pole..(k).. Such a sketch is shown in Fig. it follows that .103) If we know what it means to have a pole in a certain place in the splane.101)..103) to help fix these ideas.:) is repeated. . I·' z. which will be the case if e(k) is generated by a linear difference equation with constant coefficients. 20 Unless a pole of E(:.jb. and E/" In all such cases..2.126 Chapter + Discrete Systems AnalysIs 4.= esT a And... . the ~transfonn of E. we have v(k T) = :rk (e.. then Eq... . taking samples one second apart (T = I). 4. e= bT ~ Ll V.
is seen to be then e' . a:5:D . Likewise. in the splane (semicircles centered at the origin) are also mapped into the . of course.' 1 _ .24. = e': r. and (I.101) . a. = + L th~ map of i.(kl. In fact.. Figure 4. We let . Our attention will be restricted to the step responses 'of the discrete system shown in Fig. . a + jb Constant damping ratio if i:. Lines of constant damping in the splane are mapped into the . in Fig.6 Step Response Our eventual purpose.28 for g = 18.) = . 4._= z = rei" where r = exp(swn T) = e. You will see its use in the figure files of discrete root loci in Chapter 7. (4.PI and explore the effect of the (remaining) zero location.plane according to Eq..1 = PI' the members of the one polezero pair.. and (v" looks exactly like the splane in the vicinity of s = O. if . 4. (4. the system response. Note that if .::2.. r:5 1 DDD = c. Because of the usefulness of this mapping. = e'! of Eq." Logarithmic spiral =bT z =r . is fixed and w n varies s = ±j(:riT) + ".. a l = 21' cos(8).T\'. In every case. e= and a 2 selected for 18. = r.5 .. we show the pole at ~ = I and the zero at. the Control System Toolbox has the function zgrid.J n t.2rcos&~+1 s... =  '~I + jN. 4. (·ll (3) is manytoone. H=w. and 72 degrees. so that the poles of the system correspond to a response with an equivalent splane damping ratio i.5 is also shown for reference. It's interesting to note that in the immediate vicinity of. lines of constant natural frequency. For our first study we consider the effect of zero location. The situation in the . = 0. .103) for several values of w in Fig. 4.5 and consider values of 8 of 18.s.. We often refer to the damping of a pole in the ~plane in terms of this equivalent splane damping.QT . and we will conclude this discussion of discrete system dynamic response with an examination of the relationships between the polezero patterns of elementary systems and the corresponding step responses for a discrete transfer function from II to l' of a hypothetical plant. = 0.) = I (a unit pulse) is y(. (..m that allows one to superimpose this mapping on various plots to help in the interpretation of the results.1). or sometimes we simply refer to the damping of a ~plane pole. figure 4.o. = P" U(z) = z/(z . cancel out: and if at the same time.1 . T and we conclude that under these circumstances the system pulse response is a delayed version of e. (4. :. with Z.101).plane according to Eq. given by :/(: . 4. Tn addition to the two poles and one zero of H(:). The curve for i. w".) given in Eq. 45.27 for a selected set of values of the parameters. Y(~). Polezero pattern of Y(z) for the system of Fig. we will take the gain K to be such that the steadystate output value equals the step size.r cos _. Lo Ihe input with transform U(. and s = 0.27. when compared with the transform E. e (4.103) for several values of i. a typical secondorder system pulse response. U(. 2:rr This transform. There are many values of s for each value of .I).128 Chapter + Discrete Systems AnalysIs ++ Signal AnalySIS and Dynamic Respc'nst' 129 Table 4.O.jro n\. which come from the transform of the input step. = 1'cos(8). The generic dynamic test for controls is the step response.2 Description of corresponding lines in splane and zplane splane Symbol z·plane 1 5 =1'" Real frequency axis S = fT ~ 0 5 = iT :s: 0 S x x x Izl ceo 000 Unit circle z=r~l =.4. The (great) significance of this fact will be explored in Chapter 5. and our interest in the relation between :plane poles and zeros and timedomain response comes from our need to know how a proposed design will respond in a given dynamic situation... = O.).plane is sketched in Fig.28 4..' on the stepresponse overshoot for three sets of values of (II and a" We select (II and (I.27 Definition of the parameters of the system whose step responses are to be catalogued z = r. is to design digital controls.24.
0 0 ~ • ~ • ~ . e = 18'._ i ~ 20~ 10 "1. = I and let PI vary from near I to near + l. However. Also included on the plots of Fig..130 Chapter 4 DIscrete Systems Analysis Figure 4. 4.~.5 on Fig. continuous system. however. for ~ = 0.45.5 3 2 1..29. The knowledge helps guide the iterative 1000 t = 0. the numerical simulation of the impulse response for a discrete system.29 Plot of step responses for a discrete plant descrrbed by the polezero pattern of Fig. constant. 4. but this time we fix ZI = ~.7 = 0. and 72' !l ~200 lli g 100 72' ISO '.. 4..5 soo 300 = 0.. If the transfer function is written in gainphase form as H(j:V) = A (w)eJ\.. .27.5. which is progressively increased.0 Zero location z2 design process and helps the designer understand why a response is the way it is. and for the zero very near +I. transform inversion would never be carried out.'I. a zero moving toward ~ = + l greatly increases the system overshoot.. sysD is accomplished by Figure 4. and 72 degrees and ~ = 0. We plot this effect for e = 18.30 for ~ = 0. For this case we again consider the system of Fig. then the steadystate response to a unitamplitude 21 Such systems are called nonminimum phase by Bode because the phase shift they impart 10 a sinu!loidal input is greater than the phase of a system whose Jnilgllicude response is the same but that has a zew in the stable ralher than the unstable region. Our conclusions from these plots are that the addition of a pole or zero to a given system has only a small effect if the added singularities are in the range from o to I. both functions result in a plot of the response on the screen. '8 SO .21 Our second class of step responses corresponds to a study of the influence of a third pole on a basically secondorder response.u. 4. w . the major influence of the moving singularity is on the rise time of the step response. A pole placed toward ~ = + l causes the response to slow down and thus primarily affects the rise time.5 and in Fig. In this case.. as the input.31. we plot the percent overshoot versus zero location in Fig. The understanding of how poles and zeros affect the time response is very useful for the control system designer.95.0 1. either by numerical simulation or an experimental evaluation.9 y = impulse(sysD) and the discrete step response by y 0%2 ~0.:. The major feature of these plots is that the zero has very little influence when on the negative axis.•••• • 0 0 ~ ~ ~ C 0 c e·· Invoked without a lefthand argument (y =). Ultimately. 4. If a sinusoid at frequency (0" is applied to a stable.6 = step(sysD) 0 0 ~ 1. the test of a design is typically the actual time response.30 Effects of an extra zero on a discrete secondorder system. linear. 4. but its influence is dramatic as it comes near + I. In MATlAB.. which is to 50C of its final value.8 ~ %2 • %2 c 0 ~ =0.30 are overshoot figures for a zero in the unstable region on the positive real axis. 45'. We see here that the extra pole causes the rise time to get very much longer as the location of PI moves toward ~ = + I and comes to dominate the response. . as can be seen from the four step responses for this case plotted in Fig. These responses go in the negative direction at first.32. on the step response y(k) is to change the percent overshoot.5 Frequency Response A very important concept in linear systems analysis is the frequency response.707. 4.28 for various values of Z2 y(k} c c c c c c c 0 %2 ~ 0. To summarize all these data. the negative peak is larger than 1 . the response is a transient plus a sinusoidal steady state at the same frequency.5 Frequency Response 131 The major effect of the zero z. S 30 . 4. Today. In the figure we defined the rise time as the time required for the response to rise to 0. ~ 4.
1. then in the steady state. constant. (4. are samples at kT instants un a sinusoid of amplitude A..107) 1.106) If we substitute Eq.707.32 Effects of an extra pole on rise time for a discrete thirdorder system.(z) is IS' e: +2z A eJ~z _ejW.. 7. 0 30 A eJwz U. (4.105). we C . and frequency woo We will defer the plotting of particular frequency responses until later chapters (see. _ eJ0. which.. : and the inverse transform of U. (4. e}w. We can say almost exactly the same respecting the frequency response of a stable. of course..109) n' 1.105) ~ 50 30 20 > " If e(k) have = cos(wJk) I (k). then.J)z 2.5' _.0 U (kTl = s.106) into Eq.. ..107) associated with the two poles on the unit circle.o (4. there are other continuous sinusoids of frequency w" + t2n: / T for integer f.09 01 II !'"is.~ :S '0. .108) .109). 72 100 If H(e J0J ) = A (w o T)e}0 'w"T1 . we obtain 5 3 2 U (~) c = ~ { zH(z) JWO z~e: + zH(z) ze JWO· (4. e = 18 .. and 7.8.0 Zero location The steady state of u(kT) corresponds to the terms in the expansion ofEq. (4. ~ = 0. III to 5 3 . " " l:! E(z) = 10 ~ {z _ ~J""" + 2 Z _ ~j0. two zeros at . then we have ~ so 20 . It is worthwhile going through the calculations to fix ideas on this point.. the steady state part can be found as 1 H(e)wJ)z U}} () = 2 :: . to which we will return in Chapter 5. we define the discrete frequency response of a transfer function H (~) to sinusoids of frequency Wo as H(e J0"T) so that the amplitude A and phase 1/1 are A = IH(eJw"T)1 and 1/1 = L(H(ejw"T)) (4.c.45. and 72 .5: e = 18. 6.. 6. phase 1/1.28). This is the phenomenon of aliasing. for example.. From Eq. *. from Eq. Here.16). If the system has a transfer function H(z). Figs. However.110) . '2 = A cos(w"Tk ~ej~elwJk + ~ej~e!'"Jk 2 + 1/1).0 1..0 0..0 1.31 Effects of an extra zero on a discrete secondorder system. If we expand U(z)!z into partial fractions and multiply back by z..16. (4. If a unitamplitude sinusoid is applied. which also pass through these points. '" D a 0 (4. the response samples will be on a sinusoid of the same frequency with amplitude A(wJ) and phase 1/I(wJ). discrete system. } r (4. one zero at x: ~ = 0..(z) = ? .132 Chapter 4 Discrete Systems Anal)'sls 45 Frequency Response 133 Figure 4. ~ ._ _ 2.45 . CE .0 Pole location sinusoidal signal has amplitude A(w) and phase 1/I(w) relative to the input sIgnal. the discrete response transform is U(z) = H(z)E(z). O ......0 } . percent overshoot versus zero location 1000 500 300 ~ t = 0. + 1 H(eJ"'.3.101) with r = I and () = wJ.  <r 0.: _ ejw"T • Figure 4. linear. (4.4:::. it should be noticed here that although a sinusoid of frequency w" could be passed through the samples of Eq. (4.707 " '" ~ " a 200 100 we define its magnitude and phase for z taking on values around the unit circle by H(e j0T ) = A(wT)eNlwTI.T .
which l~ads us t. but it is not the best for the analysis of realtime signals as they occur in the laboratory or in other experimental situations. constant system or the corresponding difference equation. The case where the properties are reversed is the ztransform we have just been studying. we need a transform defined over a finite data record. Because the function is periodic.1)..phase) where amplitude is plotted as a ratio as in the figures in this text. by analogy with the standard Fourier transform. (4.e. then replacing w = w + 2rr kiT leaves z unchanged.111) with summing index t into this. we have a signal that is neither periodic nor discrete and its Fourier transform is also neither discrete nor periodic.i2"'''''i\ } eJ2W'kl '" t=O Interchanging the order of the summations gives The sum in the braces is a finite geometric series. the time functions are discrete.J.den. We can summarize these results with the following table: To complete the DFf. for if z = eiwT .e = 1.. or Suppose we now have a time function that i" both periodic and ~iscrete. In other words. we would expect the transform of thIS functlOn also to be both periodic and discrete.2). corresponding to real frequencies. 2. And this is the case. we find Fast Fourier Transform f {f 11=0 . which can be computed quickly and accurately.13.. which we can evaluate as follows ={~ kt=O k . Let the I1me tunctlOn In questIon be !(kT) = !(kT + NT). which.VT'. This is the same as the z. "I .w] =bode(sysD) subplot(2.H. the Fast Fourier Transform. If the system is described by the statespace matrices. For the analysis of real data.1 . semilogx(w.. if the function in time is periodic. the scripts above can be invoked with F (2rrn) NT = L !CkT}eJ'"I"n".transform over one period evaluated at the discrete frequencies of a Fourier serics w = 2rrnl NT. the function in frequency is discrete.:1.t. Based on what we have "een. and the ztransform is periodic in w.I. Chapter 4 Discrete Systems Analysis 4 5 Frequency Response 135 which can be evaluated and plotted by MATLAB's bode. the transform can be defined as the finite sum [mag. 1. If.mag) subplot(2. being sampled. The required formula is that of the Discrete Fourier Transform. To understand the DFf. Implementation of a version of the FFf algorithm is contained in all signalprocessing software and in most computeraided controldesign software.m with the scripts Time Fourier Series ~transform Frequency discrete periodic sysD =tf(num. the FFf. then the appropriate form of the transform is the Fourier series. It is standard practi~e to suppress all the arguments except the indices of time and frequency and wnte (4. . we guess to be the sum L \'1 F!1eJ2~1)1J.phase.T) periodic discrete bode(sysD) where amplitude is plotted in decibels (dB).':V.5.T). and the transform is defined only for the discrete frequencies w = 2:rrnl To.G. loglog(w.111) 4. it is useful to consider two properties of a signal and its Fourier transform that are complements of each other: the property of being periodic and the property of being discrete. and its numerical cousin.~O sysD =ss(F. we need the inverse transform.o the fi~ite discrete Fourier transform and its finite inverse. In ordinary Fourier analysis.. N . however.. In this case.1 *The Discrete Fourier Transform (OFT) The analysis developed above based on the ztransform is adequate for considering the theoretical frequency response of a linear. . the time function f(t) is periodic with period To. the DFf. n=iJ If we substitute Eq.
it would appear that to compute the OFT for one frequency it will take on the order of N multiply and add operations. several authors.) = a!(x l ) + fJf(x. such as the transform of the convolution. have showed how to take advantage of the circular nature of the exponential so that all N values of F" can be computed \vith the order of N log( N) operation. With this evaluation. 4.1 Essential Properties In order to make maximum use of a table of ztransforms.136 Chaptn 4 Discrete Systems Analysis 4. and we have studied the relationship between the polezero patterns of transfer functions in the zplane and the corresponding time responses. a ..\. Some of these. this is a saving of a factor of lOO.urn is periodic with period N.e sum t =Ill f = II.}] II=(] .6.2 convergence issues concerning the ztransform are discussed and in Section 4.6. each evaluated at n = t.urn in Eq. and others. To use the DFTlFFT in evaluating frequency response. Equations (·U II) and (4.6 PropertIes of the zTransfonn 137 The . At this time.(kT}}. 2/ 4 t =Ill f = II. we have previously derived. For reference. the frequency response at the frequency W = (21f t) / NTis given by H (e1 l2:rt 1/.(::.112) comprise the OFT £.inusoid at frequency Wi = 21ft/ NT so that e(kT) = A sin(2JrEkT/ NT). and thus we have the inver.) = ZIJ. the output i. • J. We will discuss in Chapter 12 the general problem of estimation of the total frequency response from experimental data using the DFTlFFT as well as other tools. a very large value.. consider a system de. it would take on the order of N' multiply and add operations. We began a table of ztransforms. if N is a power of 2. we find immediately that Z{a!1 (kT) + fJ!. In Section 4. . 4.) + fJZINk)} + fJF.1 we turn to consideration of some of the properties of the ztransform that are essential to the effective and correct use of this importanl 1001.(k)}Zk = aZlfl(k)} = a F I (::. For N = 1024.111).(::.).6.ed the ztransform to show that linear. (·UI2) Dividing these results.'""' F ei~TI'" lV L.(kT)} = L k=x x la!. we will demonstrate a few properties here and collect them into Appendix B for future reference. (4. t: I XI = .6 Properties of the zTransform Because there are N terms in the . Linearity: A function fix) is linear if !(In l + fJx. Applying this result to the definition of the ztransform.3 an alternate derivation of the transfer function is given.:"") = Vi'. Their algorithm and related schemes are called the Fast Fourier Transform or FFT. such as linearity.). we see that with sinusoidal input and output. The DFT of elk) is We have u. The DFT of the output is 1. we have already used without making a formal statement of it. In all the properties listed below. one must be able to use a few simple properties of the ztransform which follow directly from the definition. constant. and to compute the OFT for all N frequencies. especially Cooley and Tukey (1965). In Section 4. discrete systems can be described by a transfer function that is the ztransform of the system's unitpulse response.).6. However. = F FT(u) and £.(k) + fJI. and a more extensive table is given in Appendix B. we assume that F'. = F FT(e.105) and where the input i. = { ~'. We apply this input to the system alld wait ulltil all transients hm'e died Glmy.. where U.cribed by Eq. given by u(kTj = B sin(2Jrtk/ N + JjJ). (4. we see that the sum we have been considering is ill!.
.113) We demonstrate this result also by direct calculation: As a more general example.k 1(k)} = . if we have a polynomial a(z) = Z2 + alZ + a. (4. See Problem 4. = lim ~(z + I)  T :lz0.32). The size of this constant is given by the coefficient of I/(z . Because V(z) satisfies the conditions of Eq. The conditions on F(z) assure that the only possible pole of I'(z) not strictly inside the unit circle is a simple pole at z = I.= .115).5 2 z 1 = F(rz). QED As an illustration of this property. Therefore. Scaling ill the zPlane: Z{r.. with the possible exception of the constant tenn due to the pole at z = 1. then ~ +n = ). :1 4. which we have computed before 2. the fact that FCz) converges as the magnitude of z gets arbitrarily large ensures that I(k) is zero for negative k. and Eq.115) results.138 Chapter 4 Discrete Systems Analysis 4. and sometimes used in adaptive control as described in Chapter 13. because all other terms in I(k) tend to zero. This is an example of radial projection whereby the roots of a polynomial can be projected radially simply by changing the coefficients of the polynomial.. QED = z" F(z). x :1 (4. has roots (rla)e±J". The technique is sometimes used in poleplacement designs as described in Chapter 8. the constant C is the final value of I(k). 5.Transfonn 139 Thus the ztransform is a linear function. then the scaled polynomial 0" z' + a. then lim I(k) = lim(z .:=x ex I(k + n)zk.. As an illustration of this property. This effect causes initial conditions for the difference equation to be introduced when solution is done with the onesided transform.. Z{f(k If we let k + n)} = L f. (4. with roots re±)". rzI z(llr) 3.. we have = L k=oc x T ~ +1 lim liCk) = lim(z l)~~ kx . ~ . Convolution 01 Time Sequences: Z{l(k)} = f:Zk = ~. all components of I (k) tend to zero as k gets large. namely C = lim(z .I Z 0.52 .6 Properties of the z. Furthermore.I) in the partialfraction expansion of F(z).1)F(z).kI(k)z'k I(k)(rz)k QED > I. Time Sh ift: ZIf(k + n)} = z+" F(z)." . It is this result with linearity that makes the transform so useful in linearconstantsystem analysis because the analysis of a combination of such dynamic systems can be done by linear algebra on the transfer functions.Value Theorem: If F(z) converges for Izi > I and all poles of (z 1) F(z) are inside the unit circle. (4. This property is the essential tool in solving linear constantcoefficient difference equations by transforms.k I(k)} = F(rz).13. we consider the ztransform of the unit step. I (k). It is the linearity of the transform that makes the partialfraction technique work.az + a..115) ZIf(k +Il)} = " L J=oc I()z(Jn. (4.114) However. rZ Z{r.I) F(z). Final. we obtain (4. which is removed in (z I)F(z). We should note here that the transform of the time shift is not the same for the onesided transform because a shift can introduce terms with negative argument which are not included in the onesided transform and must be treated separately.kI(k)} = L k=oc x Izi r. we consider the signal whose transform is given by Z{r. By direct substitution. k~O ~ I  By property 4 we have immediately that We have already developed this result in connection with Eq.
625: ' 3.5.625:' 3.119) and divide as follows ~[l + 2.='")(.5:. We first examine two elementary schemes for inversion of a given F(~) which can be used if we know beforehand that F(::.1 + 0. . This tenn will be unbounded if the magnitude of ~ is unbounded.on: As with the Laplace transfonn.5:. and when the division is done.) is rational in::.625:' +. Such an expansion is especially easy if F(::.5 This result can be checked against the closed form for u(k) given b) Eq. "0 By direct comparison with we conclude that = T/2.5: ' 2. The :transfonn of the output is U(:) = E!(:)H(:) T:+I = : .5~e· 1+:. 14.625: 1 . we write Vi:) as a ratio of polynomials in :1 U(:) = 2I_ T I.52 2T. (4.1.5:' 2. (4.25z.) The inverse ~transfonn is a means to compute a sequence in k from a given function of ~. approaches infinity.(.116) with a positive power of ~.25:" 3. We need only divide the numerator by the denominator in the correct way. (18) represents the transfonn of the system output. Determine the output for an input which is the geometric series represented by e.25: ' . lmers. and thus if F(::.5:. (4.12 using the panial fraction expansion method.25: J 3. An example we have worked out before will illustrate the process.5z. Some may prefer to use synthetic division and omit copying over all the extraneous z's in the division..116) is onesided.1 + 3.118) Equation (4.5z' '" L J.1.1 + 0.) converges as 1::. the ::. V (:) = L~ lI(k): k. (4.13 z. we know that f(k) is zero for k < 0.75:' + 1. F(~) = "" L f(k)~'.Tmn. the ~transfonn is actually one of a pair of transfonns that connect functions of time to functions of the complex variable~. the coefficient of Zk is automatically the sequence value f(k). Eq. (4. (4.120) Clearly.140 Chapter 4 Discrete Systems Analysis 4. but there is nothing in the transform per se that requires this. The righthand side of Eq. = '2 z _ Tz+1 I' Izi > 1. Lo=D u l = (T/2)2. and we can write ) 1+ Z I 1 . lI(k). In this case.1 .) = '2:  I 1:1 > I.1 + 0.117) is a .116) If any value of f(k) for negative k is nonzero.14) H(:) The second special method for the inversion of ~transfonns is to decompose F(~) by partialfraction expansion and look up the components of the sequence f(k) in a previously prepared table. (4. I . (4. For a sequence f (k). Izi > OS .0.5e' .625z) .transfonn has been defined as F(::.5:.1.eries expansion of F(~) about infinity or about ~I = 0.3. and converges as ::.1 approaches infinity. Keeping out the factor of T/2. the use of a computer will greatly aid the speed of this process in all but the simplest of cases.875:. + I) Solution.12 z.25z' . • • Example 4.0. f(k)::. then there will be a tenn in Eq. The ~tmnsfonn computes a function of ~ from a sequence in k. (We identify the sequence number k with time in our analysis of dynamic systems. The process is identical to convening Ftz) to the equivalent difference equation and solving for the unitpulse response.6 Properlles of the zTransform 141 I T = (I = 10.e + 3..3 + 1.4. 6.121) below.) is the ralio of two polynomials in ::.117) u e = (T/2)3.1.Transform Inversion by Partial Fraction Expa1l5ion Repeat Example 4.lk) with r = OS That is  • Example 4..25.1.1 (4.lform Imefswn by Long Diviswn The system for trapezoidrule integration has the transfer function given by Eq.
{k) 3T = 2Te2 {k) . T I +~I 1 O. and that is I. which demonstrates Eg.123) In Eq.. We begin with another example. complex integral" f(k) = ~ _IT) I We multiply both sides by I  let ZI = I.. By Eg.d~ (4122) T 2 20. the integral is zero if k of I and is 211') if k = I..95). Or) I(k) =f[4f. If F(~) has a pole of order 11 at ~I' then (~. _ ..~ion and long diyi~ion.]I(k).2 *Convergence of zTransform We now examine more closely the role of the region of convergence of the :transform and present the inversetransform integral. Res(~.1 = 2. This transform is exactly the same as the transform of the unit step I(k). then we write 4. it is useful to apply Cauchy's residue calculus [see Churchill and Brown (1984)].+ I (~ +A0(~ .123).~I)" F{~) is regular at ~I andean be expanded in a Taylor series near ~I as (4.. and it has zero residue at the pole at ~ = 0 if k .O. (4... is given by (4..142 Chapter 4 Discrete Systems Analysis . (4.  ~I )"F() ~ = A n +A . I. will be considering only rational functions.. except that this transform converges inside the unit circle and the transform of the I (k) converges outside the unit circle. and compute A=~=2T.122). +. Knowledge of the region of convergence 22 If it is known that f(k) is cau'al. (4.I < O.6. To demonstrate the correctness of the integral and to use it to compute inverses.+A_I{::I)..~/'  I )+". The inverse ~transform is the closed. that is. Thus we have = {I k<O Ok::: 0 .124) • The residue of F(:) at:' 1 is A_I' First we will use Cauchy's formula to verify Eq. then the regiun of convergence is outside the ~malle<.5~1 A = l 1. Only if k = I does the integral have a residue.121) Looking back now al e 2 and e y which constitute our "table" for the moment. (4. will. . The sequence f(k) has the transform The argument of the integral has no pole inside the contour if k I ::: I. (:. at . (4.C + B ..118) and expand U{z) as a function of ~I as follows U(~) = 2 1. I .121) for k = O.ZI I ZI. We assume that the series for F(~) converges uniformly on the contour of integration.' . and these have only poles as smgulantles. give the same values for u(k) as we found in Eq. we can copy down that ". It is thb propeny that permits in\"'ersion by partial~fra("tionexpan. (4.t circle' that contain~ all the poles of F(:} for rational transfonns.I Evaluation of Eg.. Thus I = f (k). i(k) = 0 for k 0::: 0.. Consider again Eg. 4.6 Propertles of the zTrans[orm 143 Solution. If F(~) is the ~transform of f(k).... so the series can be integrated term by term.2"e J {k) = (2T  3. (4. naturally.5 Similarly. = Ae2 (k) + Be. 2.123).5z I' is obviously essential to the proper inversion of the transform to obtain the time sequence. Eq.. Cauchy's result is that a closed integral of a function of: which is analytic on and inside a closed contour C except at a finite number of isolated singularities :. f F(~)~:.123).) means the residue of F (~) at the singularity at ~" We...120). (4. we evaluate T 1+2 3T B=212=2' where the contour is a circle in the region of convergence of F(~). (4.
there is a pole at the origin of I there. F/z) in terms of F.. This particular theorem shows how we can compute the sum of squares of a time sequence by evaluating a complex integral in the zdomain. we will use the function z/(z . when we substitute this. 2Jr} Equations (4. the contour C. then the pole) z·! removes F .} as..transform. we have the discrete version of Parseval's theorem. Suppose we have where the contour is a circle of radius greater than I.. where convergence is on the unit circle (4. = I in Eq. If. in this case (4.l. as we have just seen. I F. In this case. we can replace le(k) by an integral + Zl + Z·2 + .126) I'or k ::: O.(zll.) and F.(z) will converge forthe range of values of Z for which C3 can be found.(z) = .109)(if k < O.. (4. the argument of the integral in Eq. we have ZI when z/(z . then for k ::: 0.I I(k) (4. and as before. (4.I Izi < I. First. the residue is equal to k < O.. = O..«()F.144 Chapter 4 Discrete Systems AnalysIs 4. 2Jr} . We wuuld write the inverse transform symbolically Z'{. The residue is thus I for all k.123) and (4. there are no poles of the integrand contained in the contour. (4. We assume that we can find a region where we can exchange the summation with the integration.(l. The contour will be called C. I z (4. so z.'I~R>' Z  . .I) and consider first the case of convergence for Izi > I and second the case of convergence for Izi < 1. We consider one such case that will be of some interest later.129) At k < 0. k::: O. the argument of the integral has two poles inside the contour: one at z = I with residue lim(z :~I and II and 12 are such that the transform of the product exists. .) and. (4. F. By definition and one pole at z = 0 with residue found as in (2.I) converges for {!:} ~ .. corresponding to Eq. Then F.).129).125) has only the pole at = I with residue I.). we consider an expression for the transform of a product of two sequences.. in this case ZI {~} = z. the inverse integral can be used to compute an expression for a sequence to which a transform corresponds.(k)/2 (k)z'.124) correspond to the unitstep function..I = I(k) . An expression for ' I)~Z  I = I. and c.6 Properties of the zTransfonn 145 To illustrate the use of Eq. If we let II = 12 and::. Thus Ij(k) = I. The result is useful in the design of systems by least squares. (4. l. (4. (z) and F2 (z) can be developed as follows.123) to compute the inverse of a .125) Although. a more effective use of the integral is in more general manipulations. Eq. .1 = (1 From the inversion integral. must be in the overlap of the convergence regions of F.I) converges for Izi > 1.128) i when zl(z . _k_~_!_ = __1_ Z I z. (4. convergence is inside the unit circle.. and 11 (k) Z k < O.. Suppose k < O. on the other hand. For the first case I I (k) =  I f " d~"!~ . (Z)dl.130) In symbols.127) The sum can now be recognized as F I (Z/l. + z! + . as they should.122).128). (z) = L k=oc x 1. and the sum of the residues is zero.
then an arbitrary finite response can be written u(k) = H(. it must follow that = ~I_. 2IT] r JH(:. Consider e.136) + j) must result in no other (4. (4. we sa)' that ~l i\ an derivation was suggested by L.131). (4.k.'.135) and note that u. k).'. expressing this as an operator on elk).' for a value of.6 Propenies of the zTransform 147 4. 2rr] If' E(:. then (4. and this region is the whole :. z (4. We call E(.136) converges. II. .)::k.d:. k < O. j~.. for which the output is finite at time k.k)=H(z.). it follows that H(." It is somewhat more satisfying to derive the necessary transform than to start with the transform and see what systems it is good for.) the :.) by comparison with Eq. Zadeh in 1952 at Columbia University.)[responseto.134). (4. and the (closed) path of integration is in the annular region of convergence of Eq. (4. Better to start with the problem and find a tool than start with a tool and look for a problem.'.transform as the natural tool of analysis from the fact that input signals in the form z' produce an output that has the same shape.)z'.3 * Another Derivation of the Transfer Function Let V be a discrete system which maps an input sequence..134) From a comparison of Eqs.i = zi. Although Eg.' = H(. = . the result still holds. (4. then R > DO. (4.)[H(z):. ~l_.137) We can define U(z) = H(z)E(:. + j) j + k).k):." Then.).'+).)E(z):.146 Chapter 4 Discrete Systems Analysis 4.sage through the linear constant sy:.(k) = u(k = H(z. then the output will be of the form H (:.kdz.132) + j)} = lI(k + j) for all j if V{e(k») = u(k). (k) = . Thus for the elemental signal elk) = .6. . into an output sequence (u(k)). which is Eg. (4. (4. (4. r < 1::1 < R.131) If the system is time invariant. u(k) = H(.1. (4. as follows (4. and we can write u(k) = Theorem If V is linear and time invariant and is given an input . Unfortunately.138). the direct approach requires extensive use of the inversion integral and more sophisticated analysis to develop the main result. U(k)::. U(z) = L k=x ex. which is the ratio of the transforms of e(k) and u (k) as well as the amplitude response to inputs of the form ::.k+j) for all j that is. (4.transform of elk). This derivation begins with linearity and stationarity and derives the :. the response to z' is H (z):. (e(k)}. a shift in elk) to e(k effects but a shift in the response. Therefore we can write u(k) = . if we let a = :. Can we represent a general signal as a linear sum (integral) of such elements~ We can.136).131). is unchanged in shape by pao.. if e(k) = . A.plane outside a circle of finite radius. In general. :.'jdZ. z but.135) is the limit of a sum. We write V{e(k E(z) = Le(k)zk. (4. we have a solution u(k) of the same (exponential) shape but modulated by a ratio H(:. 24 Because::. we have lI(k) = V{e(k)).133) and (4. H does not depend on the second argument and can be written H(:. Chanin Q son gout. eigenfunction of such systems.138) (4. we must have u.'+i for all j.. The consequences of linearity are that the response to a sum of signals is the sum of the responses as given in Eg.ill(k) = z.135) where x If V is linear. for signals with r < R for which Eq. From Eq.k = H{z)E(z). by the inverse integral derived above. 23 Thi~ Thus H(z) is the transfer function..'.k)c k.132). 2IT] r JE(.tem.133) From Eq./H(. If elk) = 0. by the theorem.' for some fixed j.'.
113) • A system will be stable in the sense that a Bounded Input will yield a Bounded Output (BIBO stability) if which can be evaluated by MATLAB'S bode. (b). • A system represented by H (z) has a discrete frequency response to sinusoids at w". • The discrete Final Value Theorem.:x. (4. r = l tal Assume a solution u(kl = Ai. .m.64) and find Al and A. 4.I) .8(c) is given by the same H(. A..2. (4. • For the continuous statespace model x= Fx+Gu. for an F(z) that converges and has a final value. Verify that the transfer function of the system of Fig.2 (e) u(k) = 0. and taking the area under this parabola between t = k T .41) 4. l. as A = IH(e"" T)I and 1{! = L(H(eJ"J» (4.. . preceded by a zeroorderhold.7 Summary • The .59) 4.T and t = k T as the appro~imation to the integral of e(t) over this range. • The discrete transfer function in tenns of the statespace matrices is Y(z) U(z) A. l." + A~.45) (4. '" Ih.23 and summarized in Fig._11 < :xl.:transfonn of the samples of a continuous system G(s) preceded by a zeroorderhold (ZOH) is G(z) = (I .: . • The key property of the .plane.:plane is shown in Figs.2) which is typically evaluated using MATLAB's c2d. e. e. (4. to match the initial conditions u(O) = (d) Repeat parts (a).148 Chapler 4 Discrete Systems Analysis 48 Problems 149 4. T eF"d1JG.4 (al Derive the difference equation corresponding to the approximation of integration found by fitting a parabola to the points e.3 4.9Ic).5u(k .25t1(k}.' and find the characteristic equation in .5 Consider the difference equation l/(k where If> = eFT + 2) = 0.I)l = • The characteristic behavior associated with poles in the . 1{!.8u(k .:transform that allows solution of difference equations is Zlf(k ... and. given by an amplitude.2) G~S) } (b) u(k)=1.m or step. (a) Compute and plot lhe unitpulse response ofthe system derived in Problem l.58) (b) Find the characteristic roots. (4. _. Responses are typically detennined via MATLAB'S impulse. _..46) 4. is given by lim f(k) = lim(. ~ (4.25.8 Problems 4.35) • A discrete system can be defined by its transfer function (in . • The . and phase.:J F(.I) + O.:)..m.115) k'>:. (4. II( I) = I.21 through 4. + 2) = ~O.110) .1 Check the following for stability: (a) ulk) = 0.0.m.: .3u(k . (4.) as the system of Fig.:) or its state space difference equation.:). (b) Is this system HIBO stable? y = Hx + JII. Hx(k) + JII(k).. 4.:transfonn can be used to solve discrete difference equations in the same way that the Laplace transfonn is used to solve continuous differential equations. and te) for the equation tllk o.1 L !=. the discrete statespace difference equations are x(k + I) = If>x(k) y(k) = + ruCk).~ and decide if the equation solutions are stable or unstable.. m./ = H[I _ If>]I r.I)F(. which can be evaluated in MATLAB by the tf function.:I)Z { 4. (e) Assume a general solution of the form lI(k) = which can be evaluated by MATLAB'S c2d.25u(k). (b) Find the transfer function of the resulting discrete system and plot the poles and zeros in the ..lulk .6u(kI)u(k2} (4.
2" . 4. 1.2. let Uk = 11'_1 + 11'_2 + e and let e.9. 8 ' I) l7W=G(s)= (s+IHs+3)' (a) Draw the block diagram corresponding to this system in control canonical form. Plot the zeros and poles of the resulLs in the zplane..6. + O.. (4. (d) Verify that the matrices you have found are related by the formulas has the roots A = T1FT.+0.4) as Uk+2 = ul+ 1 + u.7 to compute the transfer function of Fig. C=HT. 4. applying Figs.2) and (4.+. 4. denne the state vector.mass system with the colocated actuator and sensor given by Eg.!' c". 1. D=J 4. can be found in this way. 'I~" (g) (h) . will go to (f) (b) Show that if we add a forcing term. G. 4. the golden ratio of the Greeks. 4.screte transfer function if the G(s) in Fig.5u(k) (b) Write G(s) in partial fractions and draw the corresponding parallel block diagram with each component part in control canonical form. Compute for the sampling period T = 0.2l) with sampling periods T = 0. 4. 4. . Plot the zeros and poles of the results in the ~plane.15) and (4.] (c) Compute the location of the poles of the transform of the Fibonacci numbers. (4.5.6 = 0 (e) 4.23). H.02 and T = 0. 'r (cl the twoinputtwooutput paper machine described in Eg. and ~~ .+1 :'+" L!. Repeat the calculation of these discrete transfer functions using MATLAB.9 Compute by hand and table lookup the di. the two.8(c). (e) 4.2.'~ tc) (d) .I. .1. express Xl and x 2 in terms of~. Let T = 0. = 1.3z H(z) = (. 0. = Do(k) (Do(k) = I at k = 0 and zero elsewhere). Let wI' = 5./u. Show that if is the kth Fibonacci number. Use the onesided transform to solve for the transforms of the Fibonacci numbers by writing Eg.7 (a) ese the method of blockdiagram reduction.1.13 The onesided ~transform is defined as (b) lL':.12 is (a) the twomass system with the noncolocated actuator and sensor of Eg.01.0')/( 1.6~2 + 4:  1. elk). B = T1G. = 3.0I. (a) c' + 025 = 0 (b) ~'llc'+0. C. B.24).1.6 Show that the characteristic equation ~'. U and X 2 / U of part (a) in partial fraction form. Repeat pan (a) for the diagram of Fig.9(c). F(z} = '" L i(k)z'. then the ratio (I + .8 Problems 151 (e) Repeat parts tal.30 for ~ 1 < a < I. Let wI' = 5.12 The firstorder system (z . o (a) Show that the onesided transform of i(k + 1) is ~F(z) (e) (f) Z[f(k (b) + III =  ~i(O). (d) Compute the inverse transform of the numbers. 4..14). and (c) for the equation u(k + 2) = u(k + I) + r' 0.12 is (a) K 4. H_  + 0.8. tb). '" = 0. ese T = 0.e.5 and plot the location of the poles and zeros in the ~plane. 4. w.05 and T = 0.405=0 (e) Plot the step response for this system for a = 0.O')z has a zero at: = a.8 Use \1ATLAB to determine how many roots of the following are outside the unit circle. Draw a cascade realization.4. using observer canonical forms for secondorder blocks and in such a way that the coefficients as shown in H (z) above are the parameters of the block diagram. (A.2 _ ". Write these relations as the twobytwo transformation T such that x = T~.' Let 11 0 = ".'.. Denne the state ~ and give the corresponding state description matrices A.1. 4. k Take the twosided transform and show the same U(Z) results as In part (b). Egs.~ + 0.j~~~l!'::'\3.14 Substitute II = A~' and e = Bz' into Egs.81) . 1. [You will need to compute the transform of i(k + 2). (4. = I. ln what way is the step response ofthis system unusual for 0' > I? ~J  3. 4.4) we can generate the Fibonacci numbers by a system that can be analyzed by the twosided transform: i. Plot the overshoot of this system on the same coordinates as those appearing in Fig. "k ". (4. and 4.11 Consider the system described by the transfer function Yes) 3 (z + I)(~' .5.7) and show that the transfer functions. D.15 Consider the transfer function 4.(5)/2.1 and T = 0.10 ese \1ATLAB to compute the discrete tramfer function if the G(s) in Fig. and give the corresponding description matrices F. J. = o..02 and T = 0. to Eq.150 Chapter 4 Dlscrete Systems Analysis 4. (A.2r cos(e)~ (c) By finding the transfer functions X'. (a) (b) (b) 4. (A.
4.17 Show that the observer canonical fonn of the system equations shown in Fig. What would the parallel realization be in this case? Problems 153 4. 0 k < O.1 < 2. 4..10 in (a) control and (b) observer canonical fonn. 4. 4.100) applied to this U(z): r where there is a one cycle delay after the AID converter..21 (a) Explain why the two results of (a) and (b) differ. (4.2 and the 0.23 Use MATLAB to plot the rime sequence associated with each of the transfonns in Problem 4. '~I > I: 1:1> [: (b) F(:) = "~(~S~~015' (e) (d) F(:) = ':_~:I . solve using MATLAB.I) . Then compute the eigenvalues of cI> and thc transmission zeros of the statespace model.22 Compute the inverse transform. and detennine values of : for which both terms converge.1 + I) + 10/ and the sample period is T = 10 msec. 4..22. (e) 4.5). Find the ~transfonn and be sure to give the region of convergence for the signal r < I. 4.30 Find the statespace model for Fig..24 Use the :transfonn to solve the difference equation )'(k) . l)(~ .16 (a) Write the H (~) of Problem 4. find the individual transfonns.2u(k .2).12 is !Of" GiS) = . 1/2 < 1. using partialfraction expansion and the tables. using the observer canonical form for each block and showing the coefficients of the partialfraction expansion as the parameters of the realization. for each of the following transfonns: ~ 1+':. 4.15 in partial fractions in two tenns of second order each.20 Consider a signal with the transfonn (which converges for Izi > 2) U(z) = (.2) = 2u(k . (a) F(:) Irk).3y(k .26.152 Chapter 4 Discrete Systems Analysis 4. one for k 0> 0 and one for k < O.28 Compute by hand and table lookup the discrete transfer function if the GI s) in Fig.81 to 0.25 For the difference equation in Problem 4. 0 k > 0 k. show how partialfraction expansion can be used to compute the inverse transform.19 For a secondorder system with damping ratio 0. Verify the calculation using MATL~B.) were identical (say we change the 1. 4.I) + 2y(k . 4.29 Find the discrete statespace model for the system in Problem 4. [Hint: Write u as the sum of two functions.27 Find the discrete statespace model for the system in Problem 4. and draw a parallel realization. 4.28.12 is lOts + 1) G(s)= s'+s+1O and the sample period is T = 10 msec. 4.6? e '2 4. Apply your result to the transfonn you found in part (a). 4.9 can he written in the statespace fonn as given by E'I. what percent overshoot to a step would you expect if the system had a zero at = 0. (b) Find the final value of u(k) by taking the inverse transfonn of U{e).27). O. ).. 4.26 Compute by hand and table lookup the discrete transfer function if the G(s) in Fig.2) (a) What value is given by the fonnula (Final Value Theorem) of (2. 4.1(.8 4. I 2 with I Gis) =. 4.24._. .  .. (b) Suppose the two faclOrs in the denominawr of H (.18 Draw out each block of Fig. Write out the statedescription matrices in each case.5 and poles at an angle in the :plane of = 30".. 4.1 > I: F(z) = "_!~(.) (b) Ifa rational function U(:) is known 10 converge on the unit circle 1:1 = I.4 to 1. Verify the calculation using ~1ATLAB and lind the DC gain of both the Gis) and the G(:). u(k) = { y(k) = k.
.  '.: .•. Samples are taken from the continuous physical signals such as position. The analysis of linear.'. :'}. time"invariant continuous systems can be done with the Laplace transform and the analysis of linear timeinvariant discrete systems can be done with the z . SampledData Systems A Perspective on SampledData Systems The use of digital logic or digital computers to calculate a control action for a continuous. If one is willing to restrict attention to only the samples of all the signals in a digital control one can do much useful analysis and design on the system as a purely discrete system using the ztransform. 155 . or temperature and these samples are used in the computer to calculate the controls to be applied. dynamic system introduces the fundamental operation of sampling.. However the physical reality is that the computer operations are on discrete signals while the plant signals are in the continuous world and in order to consider the behavior of the plant between sampling instants.•.. Systems where discrete signals appear in some places and continuous signals occur in other parts are called sampleddata systems because continuous data are sampled before being used."'.. In many ways the analysis of a purely continuous system or of a purely discrete system is simpler than is that of sampleddata systems. it is necessary to consider both the discrete actions of the computer and the continuous response of the plant. This analysis requires careful treatment using the Fourier transform but the effort is well rewarded with the understanding it provides of sampleddata systems. and we must study the process of sampling and how to make mathematical models of analogtodigital conversion and digitaltoanalog conversion.transform alone.~"'. Thus the role of sampling and the conversion from continuous to discrete and back from discrete to continuous are very important to the understanding of the complete response of digital control.. velocity. ..~ ~ .
The number obtained by the ADC is a quantized version of the signal represented in a finite number of bits. A simple electronic schematic is sketched in Fig. S in position 1. For the purpose of the analysis. We also describe the companion process of data extrapolation or data holding to construct a continuou~ time signal from samples. Analysis of sampleddata systems in the frequency domain is introduced in Section 5. and in many instances this time is significant with respect to the sample period of the control or with respect to the rate of change of the signal being sampled.1 Analogtodigital converter with sample and hold R 5.:.2.156 Chapter 5 SampledData Systems Figure 5. is selected to be high compared to the input signal bandwidth.1 the analysis of the sample and hold operation is considered and in Section 5. 12 being a typical number. the AID converter is typically preceded by a sampleandhold circuit (SHC). S. and the circuit is again tracking. For those familiar with the idea. '~' to position 2 and the capacitor C holds the output of the operational amplifier frozen from that time at v . II RC. commonly called an AID converter or ADC.(kT) = v (kT). 5. R V out t I I " I HI I I T T H = Hold. The symbol or schematic of the ideal sampler is shown in Fig. we typically have a sensor that produces a voltage proportional to the physical variable and an analogtodigital converter. that transforms the voltage into a digital number. waiting for the next command to freeze a sample. a continuous signal is recovered by the hold process and we can approximate the sinusoidal response of a sampler and hold by fitting another sinusoid of the same frequency to the complete response.1. the digital number is presented to the computer at which time the calculations bascd on this sample value can begin. However. The value converted is held inside the computer for the entire sampling period of the system.4 including block diagram analysis of these combined systems. T. We show hoI'. As part of this analysis we show that a sampleddata system is made time varying by the introduction of sampling. In order to give the computer an accurate representation of the signal exactly at the sampling instants kT. The SHC needs only to hold the voltage for a short time on the order of microseconds in order for the conversion to be completed before it starts tracking again.2 the frequency analysis of a sampled signal is given. this approach is equivalent to the use of the '"describing function" that is used to approximate a transfer function for simple nonlinear systems. During this '"tracking time. In Section 5.3 MHz. A detailed study of quantization is included in Chapter 10. where the switch. In Section 5. The ADC is now signaled to begin conversion of the consta~t input fr~~ the SHC into a digital number which will be a true representation of the input voltage at the sample instant. As a result. 5. to compute this bestfit sinusoidal response analytically and use it to obtain a good approximation to a transfer function. The SHC switch is now moved to position 1." the ADC is turned off and ignores V OU1 ' When a sample is to be taken at t = kT the switch S is set j. However. With the switch. 5. S in position 2. the device is nonlinear.1 Analysis of the Sample and Hold 157 Chapter Overview In this chapter. When the conversion is completed.3 the zeroorder hold and some of its generalizations are considered. is an electronic device driven by simple logic from a clock. C = 30 x 10" farads for a bandwidth of f = I/br RC = 5. Typical values are R = 1000 ohms. so the combination of the electronic SHC plus the ADC operate as a sampleandhold for the sampling period. Here the important phenomenon of signal aliasing caused by sampling is introduced. we separate the sample and hold into two mathematical operations: a sampling operation represented by impulse modulation and a hold operation represented as a linear filter. The circuit bandwidth of the SHC. Its operation is described in the following paragraph. we introduce the analysis of the sampling process and describe both a timedomain and a frequencydomain representation. in position I. its role is to give a mathematical representation of the process of taking periodic samples from r(t) to produce r(k T) and . the signals are typically large with respect to the smallest quantum and the effect of this nonlinearity can be ignored in a first analysis. Finally in Section 5. which may be many milliseconds long. S.5 computation of intersample ripple is discussed. and thus it is not possible to describe such systems exactly by a continuoustime transfer function. The physical conversion always takes a nonzero time. the amplifier output vout(t) tracks the input voltage vin(t) through the transfer function I/(RCs + I).1 Analysis of the Sample and Hold To get samples of a physical signal such as a position or a velocity into digital form. T = Track.
*". (5. exchanging integration and summation and using Eq.1) is shifted a small amount then different samples will be selected by the sampling process for the output proving that sampling is not a timeinvariant process. The essential property of the impulse is the slftmg property that f: 1(t)8(t . as represented by r'(t) in r(l)8(t .c{r'(t)} 2  4L.rh.'ill define the unit step to be continuous from the right and assume that the impulse.1) for r'(t).5) We assume that the reader has some familiarity with Fourier and Laplace transfonn analysis.l) we compute r(r)eS(r .·'ill be equivalent to appl}'ing a step function. T  to do this in ~uch a way that we can include the sampled signals in the analysis of contmuo.l5. 5.e y. we pIcture the output of the sampler as a string of impulses r'(I) = L K=')Cj oc The notation R'(s) is used to symbolize the (Laplace) transfonn of r'(t).2. (b) sampled signal r. (5.2). Consequently one must be very careful in using transform analysis in this context.. The impulse can ~ visualized as the limit of a pulse of unit area that has growing a~?htude and shrinking duration. the discominuom tenn s. we obtain XI no = LOU kT). (5. (d) sample and hold 4 4 2/'\.. showing typical signals (aJ Input signal r.0 x and now. 81 . depends only on the dIscrete sample values r(kTj.~. Once the samples are taken.J 30 4~ 10 20 30 (h) f~ 8(r)dr = . using Eq. we obtain = 1 00 L k=x oc cast" we . the sampled or impulsemodulated r(t).vill consider . (e) output signal r.4) o~ .sH (5.hould be warned tnat the Fourier int~gral conyergcs to the m'eroge yalue of a function at a dlscontinuity and not the 'value approached from the right as we assume. (S.2).us sIgnals using the Laplace transfonn.2 The sampler ~ "<t)= I'(1)6(tkr) k" ..3. we have R'(s) = L k=x Ibl r(kT)e.1 ) . B) this convention and Eq. (5. we need to model the hold operation to complete the description of the physical sampleandhold which will take the impulses that are produced by the mathematical sampler and produce the piecewise constant output of the device. . (5./ \. to consider sampling a signal that is not cominuous.. . 5. For the purposes of this book ". The reader :. 0· \ I /1"\ \\ \ .lysis of the Sample and Hold 159 figure 5. to a sampler. \ \ 'J .'~~~! l::s" ' 20 j r ~~ r _~.3 The sample and hold. ( I I I 2 ~ o \\ <a) i ! 0 for all functions step f that are continuous at a. Typical signals are sketched in Fig. In ca"e of doubt. from time to time...1 Am. = f: 00 o 30 (d) r'(r)e"dr. Thus. perhaps in the time domain.kTje"dr. A general reference IS Bracewell (1978). I The technique is to use impulse modulatIOn as the mathematical representation of sampling. because = f: eS(rV"dr = I. The integral of the impulse is the unit . and.hould be separated and treated by ~pecial analysis. [t will be necessary. ] (t). The only If we substitute Eq.158 Chapter 5 SampledData Systems 5..3) 4 2 and the Laplace transfonn of the unit impulse is I.'~.2 Notice that if the signal r(t) in Eq.1 ).~ jL I r 10 (e) l Using th~se properties we can see that r'(I)..c{eS(t)} l(t). from Fig. (5.kT). (5. Becau'\e our use of the transform theory is elemenlafY and the convenience of equation lb) abme i~ sub~tantiaL we have sekcled the continuousfrornlheright convention.2) f Figure 5. The Laplace transfonn of r'(t) can be computed as follows . Having a model of the sampling operation as impulse modulation..'. defined in Eq. 8(1). pich up the full value of unity.a)dt = I(a) (5.
We define w.. 5.e >C j1h "/TIt.9) is shown in Fig. x .4.1) we see that . If the extrapolation is done by a constant. = 2IT! T as the sampling frequency (in radians per second) and now substitute Eq.T).3(d) will receive one unitsize impulse if the input signal is zero at every sample time except r = 0 and is equal 10 I there. but the sifting property from Eq. and Eq. rather it is a hypothetical signal introduced to allow us to obtain a transferfunction model of the hold operation and to give an inputoutput model of the sampleandhold suitable for transform and other linear systems analysis.3 is not expected to represent a physical signal in the AID converter circuit. I:<5(t . A general technique of data extrapolation from samples is to use a polynomial fit to the past samples. is illustrated at the frequency marked WI' Two curves are drawn representing two of the elements that enter into the sum given in Eq. and integrate the sum.7) .9) shows that when r(t) modulates all these carriers. is a pulse of height 1 and duration T seconds. Cn .1) using w.T' Thus we have derived the representation for the sum of impulses as a Fourier series >C I >C 8(t .6) j T 2 i 8(t)e.wYdt. In communication or radio engineering terms.c{r'(t)} = j x x ret) {I n~x T x e .9). 5.l(t .2 Spectrum of a Sampled Signal We can get further insight into the process of sampling by an alternative representation of the transform of . (5. (5.8) expresses the fact that the impulse train corresponds to an infinite sequence of carrier frequencies at integral values of 2Jr! T. the hold is defined as the means whereby these impulses are extrapolated to the piecewise constant signal (t). (5.' } e<t dt Thus the linear behavior of an AID converter with sample and hold can be modeled by Fig. A sketch of the elements in the sum given in Eq. shown in Fig. r.'(t) in Fig.(t) and the train of impulses.kT) = T ell23niTlr.'(t) = <5(t). k=~oc 3 The hold filter in Fig. (5.e. That is.. The latter series. it produces a neverending train of sidebands. We take the Laplace transform of the output of the mathematical sampler.(t)eJnw. 3 If . (5. which is a zeroorder polynomial. where the Fourier coefficients.0 and reO) 1. k =t. We can compute ZOH(s) as the transform of its impulse response. (5.kT). we get R'(s) =  5.231!T)dt. with the result Cn .3.2) makes this easy to integrate.8) into Eq. are given by the integral over one period as Cn= To I jT!2 L Xl <5(t . being periodic.2 Spectrum of a Sampled Signal 161 Eq.c{p(t)} k=x rr=x = [X'[I(t) _ l(t . n=x The integral here is the Laplace transform of r(t) with only a change of variable where the frequency goes. We must emphasize that the impulsive signal .9) L <5(t k=x kT) = L C. 5.T)!s.J ' (5. 5. (5. (5. An important feature of sampling.1). (5.(t).4. Fwm Eq. (5. and its transfer function is designated as ZOH(s). so the integral reduces to C = I n T kT::: t < kT + T. T Il=X L.8) I L L The required transfer function is the Laplace transform of p(t) as ZOH(s) = .o.kT)eJ"(bU!T)dt. = where R(s) is the transform of . The smaller . The value of the larger amplitude component located at the frequency w( is the value of R(jw 1 ). The mathematical representation of the impulse response is simply p(t) = l(t) .'(t) is a product of .jnw ).'(t) using Fourier analysis. defined as 'h The only term in the sum of impulses that is in the range of the integral is the <5(t) at the origin. term by term to obtain R'(s) = T n~ex 1 I ex jX :x.l ". (5. (5. which is now the impulse response of the Z 0 H. The result can therefore be written as W(s) =  1 x ' " R(s . if r(kT) = O.Tl]e"dt = (I . T(~. lnw . Eq. can be represented by a Fourier series T L 00 jX r(t)eI'J'.160 Chapter 5 SampledData Systems 5. then 'h (t).'e"dt. If we combine the exponentials in the integral. then the extrapolator is called a zeroorder hold. 5.
We cannot. the phenomenon is called aliasing.8 1/ N (' . If we sample these waves at I Hz. Bandlimited signals that have no components above the Nyquist frequency are represented unambiguously by their samples. fo= S I I = S· 7 sampling theorem The significance of the negative frequency is that the iHz sinusoid in Fig. 5..4 ·0.6. hidden oscillations effect. = t t.2rr/T.Jio roT /' J . 5. = 2rr/ T) is at least twice the highest frequency (rr / T) in the signal.4.5 shows a plot of a sinusoid at Hz and of a sinusoid at ~ Hz. This signal at frequency w() which produces a component at frequency w.4 (a) Sketch of a spectrum amplitude and (b) the components of the spectrum after sampling.: '~tf (a) '1':. Thus. This is the sampling theorem: One can recover a signal from its samples if the sampling frequency (w. when data are sampled at frequency 2rr / T. Once the spectrum is recovered by inverse transform.4==6~~..~'\ \ 1 \. then sampling at intervals of T sec. above rr / T.6 f!i V \\1\\ I ~i I\ (\ n iI 1/ V 6 Time 2~1~~~~~~~ L5 L ITROI I I II\~\ I 1\ 0.9) and sketched in Fig. A corollary to the aliasing issue is the sampling theorem. as indicated by the dots. it is standard practice to precede the sampling operation (such as the sampleandhold circuit discussed earlier) by a lowpass antialias filter that will remove substantially all spectral content above the halfsampling frequency. If all spectral content above the frequency rr/ T is removed. Two continuous sinusoids of different frequencies appear at the same frequency when sampled.!2 or rr / T. we can calculate the original signal itself.2 o 0.5 5.162 Chapter 5 SampledData Systems figure 5. rr / T. will produce no aliasing and the original spectrum can be recovered exactly from R*.0_::g6==:r:4=_~202~:::::::. A phenomenon somewhat related to aliasing is that of hidden oscillations. Conversely.2 Spectrum of a Sampled Signal 163 Figure 5. therefore. i. after sampling is called in the trade an "alias" of wj .5 is a negative sine function. then no aliasing is introduced by sampling and the signal spectrum is not distorted.e. The phenomenon of aliasing has a clear meaning in time. (5. we noticed that if R(jw) is zero for Iwl 2: rr/ T. the spectrum of the samples. To minimize the error caused by this 5. A sketch suggesting the result of an antialiasing filter is drawn in Fig. as a direct result of the sampling operation.I n 0. distinguish between them based on their samples alone. components from all frequencies w + n2rr / T = W + I/W as shown in the formulaofEq. then we get the same sample values from both signals and would continue to get the same sample values for then all time. showing aliasing 0. even though it is repeated endlessly.8 t o ~ Wil \ 4 1\ \ \1 J 8 ~ V to \ I) \ 12 aliasing component shown at WI comes from the spectrum centered at 20r/ T and is R(!wo)' where W o is such that W o = WI . There is the possibility that a signal could contain some frequencies that the .4 0. j Plot of two sinusoids that have identical values at unit sampling intervalsan example of aliasing / 0. centered at I/lrr / T. the total harmonic content at agiven frequency WI is to be found not only from the original signal at WI but also from all those frequencies that are aliases of WI' namely. Figure 5. The errors ca~sed by aliasing can be very severe if a substantial quantity of highfrequency components is contained in the signal to be sampled. Notice that the sampling theorem requires that R(jw) is exactly zero for all frequencies above rr / T. The critical frequency. We have seen that if R(jw) has components above the Nyquist frequency w.2 0. Note that the sampling frequency is L and.6 0. if f . was first reported by H. then overlap and aliasing will occur. Nyquist and is called the Nyquist frequency.
if R(jw) has zero energy for frequencies in the bands above :rr I T (such an R is said to be bandlimited). Therefore..r(tkTl T . It shows explicitly how to construct a bandlimited function ret) from its samples. We showed in Eq. 7. (5. to recover R(jw) we need only process R*(jw) through a lowpass filter and multiply by T. of which the zeroorder hold already mentIOned in connection with the ADC is the most elementary and the most common. (5.3 Data Extrapolation The sampling theorem states that under the right conditions it is possible to recover a signal from its samples. showing removal of aliasing with an antialiasing filter 2~. 7 .r / T ::: w ::: . its inverse transform ret) must be the convolution of the time functions e(t) and r* (t). r(kTlsinc ." an example of which is shown in a design problem in Fig. The sinc functions are the interpolators that fill in the time gaps between samples with a signal that has no frequencies above JT IT. we find that their convolution is r(t) = I x x x .7.164 Chapter 5 SampledData Systems 5. (5.6 (a) Sketch of a spectrum amplItude and (b) the components of the spectrum after sampling. T = 27T j t 4 ~ 1. it follows that this filter is noncausal because t(t) is nonzero for t < O.:=x:. In Section 5. Suppose we define this ideal lowpass filter characteristic as L(jw). L5t I INI response can be computed by using the definition of L(jw) from which the inverse transform gives l(t) = \ r 8 6 4 0. (5. Hidden oscillations can only occur at multiples of the Nyquist frequency (Jr IT). .• to L(jw).10) Equation (5. A plot of the impulse response of this "ideal" hold filter is drawn in Fig.r IT and zero elsewhere would recover R(jw) from W(jw) exactly.7'. we have r(t) = L x f. 5.1) for r*(t) and Eq. (5. From Fig.71 e .12) is a constructive statement of the sampling theorem.11).50' 10 (a) 1 ·2 I f\/\ 0 roT \~ 27T .e.2 we introduced the z~roorder hold as a ~odel ~or the sto~age( register in an AID converter that mamtams a constant SIgnal \alue bel\\een samples.13) . we now consider a formula for doing so.10) R(jw) is the product of two transforms. (5. so we avoid such approximations to this funclton and use somethmg else.11) T Using Eq. Using the sifting property of the impulse.7"TJ)' ' 27Tjt sin(7Tt I Tl .for stability. a large delay IS. (5. LJ.jw.1. Then we have the result R(jw) = L(jw)W(jw). when they occur in a digital control system. and because by Eq.7 ' [ T e1M .r(fr) r(r) k~'" o(r ~ kTlsmcTdr.11).. • (5. usually dIsastrous . like the polynomial holds.ls processed through it. e.()·'. The form of the filter impulse 1 .7) that it has the transfer functIOn The signal ret) is the inverse transform of R(jw). 5. In feedback control systems. Such signals.T 6 10 = T e ..3 Data Extrapolation 165 Figure 5.jwT ZOH(jw) = jw (5.11) for £(f). l(t) starts at t = 00 while the impulse that triggers it does not occur until t = O! In many communicatiuns problems the interpolated signal is not needed until well after the samples are acquired. are called "hidden oscillations.. Because e(t) is the impulse response of the ideal lowpass filter L(jw). and the noncausality can be overcome by addmg a phase lag.."T . There is one serious drawback to the extrapolating signal given by Eq. which adds a delay to the filter and to the signa. then an ideal lowpass filter with gain T for . As a matter of fact..12) samples do not show at all. (5.6 we can see that the spectrum of R(jw) is contained in the lowfrequency part of R'(jw).7 from the formula of Eq.rt IT rrt = smc. 5. [ Te)W'dw 1.29.
The phase is ZOH()w) = e iWT Z jwT .1. / \ Irr \J . ~~'I .2 II \.7 Plot of the impulse response of the Ideal lowpass filter o. A plot of the magnitude is shown in Fig.16) 2]' .\':. Thus it is not possible to describe this system by a transfer function.8 (a) Magnitude and Ib) phase of polynomial hold filters i I I I \ \ ~ 2.:C2~.14) Thus the effect of the zeroorder hold is to introduce a phase shift of w T /2. To do this.5 I 0·4 ~ 0.~' ~~ 0.. it has a cutoff frequency well beyond the Nyquist frequency. ]w The term in brackets is recognized as the sine. which is simpler. so this can be wrinen ZOH(' ) = TeiwT/zsin(wT/2) JW wT/2 and.13) in magnitude and phase form. (5. it is clear that the output rh(t) contains more than one frequency.g~I 06~ . rro.. and to multiply the gain by a function with the magnitude of sinc(wT /2). We consider first the time domain.'~.01.9. 5. 2] . the output is clearly not sinusoidal. at we = 50 . The magnitude function is IZOH(jw)1 = T sine w: I I. The sampleandhold system is linear but time varying.·./. which illustrates the fact that although the zeroorder hold is a lowpass filter.8. then the plot of the resulting rh(kT) is as sh~wn in Fig.15) plus the 180 shifts where the sine function changes sign. (5. = 2][ / T. For purposes of illustration. Notice that although the input is a single sinusoid.t::0::~. 5.. 5. t"~~~~~...~FOH 14 Ca) roT j.3(d) for a sinusoidal input r(t) in both the time and the frequency domains.166 Chapter 5 SampledData Systems 5. In the frequency domain.iwT /2 Tsinc(wT /2). because the fundamental property of linear.' "~ ~ i 1 . and a complete analysis requires that we compute the amplitudes and phases of them all. we will use r(t) = 3 sin(50t + ][/6) as planed in Fig.:e. We can now give a complete analysis of the sampleandhold circuit of Fig.e.3'.3 Data Extrapolation 167 Figure 5. using the definition of the sine function. 5.=~~<_ o 2 4 6 8 10 12 . we factor out e. However.9.jwT /2 and multiply and divide by 2) to write the transfer function in the form which slowly gets smaller as w gets larger until it is zero for the first time at w = w. l FOH. Z 0 H(jw) = e.J4 )~~~ o (b) We can discover the frequency properties of Z 0 H (j w) by expressing Eq. {e / _ ejWT/Z} . the output of the hold will typically be applied to a dynamical system that is of lowpass character. (5. in the application to control systems. If we sample r(t) at the instants kT where the sampling frequency is w = 2][/ T = 200][ and T = 0.2 wT LZOH(jw) = 2' (5. °l~ IH[·~i" ~' 12 t4 4 10 roT . timeinvariant systems is that a sinusoid input produces an output that is a sinusoid of the same frequency and the relative amplitudes and phases determine the transfer function.. \ \ Figure 5. thus the most important component in r h (I) is the fundamental harmonic. being just an exercise in construction. which corresponds to a time delay of T /2 seconds.
The other harmonics are imposrors. After sampling. Finally.:. A plot of the result normalized by T is shown in Fig.9.. the spectrum of r(t) = A cos(W) + ep) is given by two impulse functions at W o and wo of intensity ll' A and phase ep and ~ep as" R(jw) = ll' A[eJ~8(w ... I.~~~~\. appearing as part of the output signal when they are really unwanted consequences of the sampleandhold process. Naturally. 5. Firs!. is also a sum of an infinite number of terms.:. We represent the impulses by arrows whose heights are proportional to the intensities of the impulses.11 along with both the original input and the sampledandheld output to show the nature of the approximation. 'Ii \. the corresponding sinusoid is given by vl(t) = A sketch of this spectrum is shown in Fig 5. (5. The controller design is then done in the continuous domain but is implemented by computing a discrete equivalent.· osL / 25 o I 0"'0 r tIT (e) rad/sec in this case. A[sinc(wT/2)]sin[w.LJ)i 10 15 20 \~ /i .1O(a) for A = I/ll'. Because a sinusoid can be decomposed into two exponential>. \ 1 / I If I /M"\iI \ l' I: Plot of the spectra of (a) R. In control design. .2)]' T (5. of 1 \: \1 \l .168 Chapter 5 SampledData Systems Figure 5. but now with intensities modified by the sinc function and phases shifted by the delay function wT /2.' I t\1n \\ 0 Iff] I~ o "Il (a) ~~roT 10 15 \~ \ 1 \ ! I I rI: .jWT2 sinc(wT/2). either by analysis or by a lowpass smoothing filter...17) A plot of this approximation for the signal from Fig 5. I 71'\ J . 5. we need the spectrum of r(t).10(c). as we saw in Eq. they sum to the piecewiseconstant staircase function plotted earlier in Fig. and (c) R. 4 See the appendix to this chapter for details. These intensities are plotted in Fig.IO(b). 1~ 05~ I 1 I· • \1 L \. 'I \ 30:~'\LA'="/.3 Data Extrapolalwn 169 Figure 5. which is ZOH(jw) = Te.9).w) + eJ~8(w + w)]. sometimes called emu/arioll.9 Plot of 3 sin(50t + :r (6) and the output of a sampleandhold with sample period T = 0. we can proceed to analyze rh (t) for all its harmonics and select out the fundamental component.10 I.. (b) R'.. when all the harmonics included in R h are convened to their time functions and added.01 3. 5.J \l 2~ 1 \~. j 5. where some examples illustrate the results. will be given in Chapter 6. the spectrum of R' is directly derived from that of R as the sum of multiple copies of that of R shifted by 112ll'/ T for all integers 11 and multiplied by 1/ T. More discussion of this technique. If we want a best approximation to r using only one sinusoid. we need " only take out the first or fundamental harmonic from the components of R'. In the time domain. to find the spectrum of R h • we need only multiply the spectrum of R' by the transfer function Z 0 H(jw). This component has phase shift ep and amplitude A sinc(w T /2).(t . 5.:.. In any event. we can frequently achieve a satisfactory design for a sampleddata system by approximating the sample and hold with a continuous transfer function corresponding to the delay of T /2. Thus the spectrum of R. .jJ /1 ~ .9 is given in Fig.
170
Chapter 5 SampledData Systems
5.4
BlockDiagram Analysls of Sampled.Data Systems
171
Figure 5.11
Plot of the output of the sample and hold and the first harmonic approximation
2)X
//i " ~/
I
/;~ /1: "
\\
~'\ \
\
\ l
\\i
'1
ZOH Output
r
I I
" First 1.j\_
'ri Hannonic I.
Impulse modulation of continuoustime signals like e(t) and 1I(t) produces a series of sidebands as given in Eq. (5.9) and plotted in Fig. 5.4, which result in periodic functions of frequency. If the transform of the signal to be sampled is a product of a transform that is already periodic of period 2iT / T. and one that is not, as in V(s) = E'(s)C(s). where £*(.1) is periodic and C(s) is not. we can show that £'(.1) comes out as a factor of the result. This is the most important relation for the blockdiagram analysis of sampleddata systems, namely5
V'(s)
Or
I
d
, I
I,
'1['
'I
,+J :i
."1
= (£'(s)C(s))' = £'(s)C·(s) .
(5.19)
t
·3
/1
.
10 15
20
25
We can prove Eg. (5.19) either in the frequency domain, using Eq. (5.9). or in the time domain, using Eg. (5,1) and c;unvolution. We will use Eg. (5.9) here. If V(s) = £'(s)C(s), then by definition we have 1
V'(s) = x j'nw
j
o
"" £'(.1 T n~
)C(s  j'lIw ).
"
(5.20)
but £'(s) is
£'(s) =
~
I
T
L
k=~
x
£(.1  jkw;),
5.4 BlockDiagram Analysis of SampledData
Systems
We have thm; far talked mainly about discrete, continuous, and sampled signals. To analyze a feedback system that contains a digital computer, we need to be able to compute the transforms of output signals of systems that contain sampling operations in various places, including feedback loops, in the block diagram. The technique for doing this is a simple extension of the ideas of blockdiagram analysis of systems that are all continuous or all discrete, but one or two rules need to be carefully observed to assure success. First, we should review the facts of sampledsignal analysis. We represent the process of sampling a continuous signal and holding it by impulse modulation followed by lowpass filtering. For example, the system of Fig. 5.12 leads to
E(s) = R'(s)H(s), U(s) = E'(s)C(s).
so that
I f£ ' (s  jllw) = T L...J £(.1  jkw,  jnw),
~=x.
(5.21)
Now in Eq. (5.2i) we can let k = f
£'(s
II
to get
~ jIlUJ) =
T
I
L
x
t =::x.:
£(s  jew)
= £'(.1).
(5.22)
In other words, because £ is already periodic. shifting it an intcgral number of periods leaves it unchanged. Substituting Eg. (5.22) into Eg. (5.20) yields
V'(s) = £'(.1)
2. f C(s T~
jllw )
,
(523)
(5.18)
= £'(s)C·(s).
QED
Figure 5.12
Note especially what is nortrue. If V(s) = £(s)C(s). then U'(s) =I E'(s)G'(s) but rather V«s) = (£C)"(s). The periodic character of £' in Eq. (5.19) is crucial.
A cascade of samplers and filters
~~
R(.)
H{.)
RO (.r)
5 'W"e of course a.ssume the existence of [J* L, l. which i, a;sured if CIs) tends to zero as s tends to infinit)' at leasl as fa,,( as I/s. \\'e must be careful to avoid impulse modulation of impulses. for olr)o(t) is
undefined.
172
Chapter 5
SampledData Systems
5.4
BlockDiagram Analysis of SampledData Systems
173
Figure 5.13
Block diagram of digital control as a sampleddata system
~~~~~~~~~~~~~
and effective model of the processes to which Laplacetransform methods can be applied. From the results given thus far. we can \\:rite relations among Laplace transforms as
ModeloC
ModeloC
Plant
AID
DIA
converter
E(s)=RY. M'(s)= E"D".
T
(a)
(bl
'].
U=M,[Ise Y=GU.
(e)
Cd)
(5.251
The usual idea is to relate the discrete output. Y'. to the discrete input. R'. Suppose we sample each of these equations by using the results of Eg. (5.19) to "star" each transform. The equations are 6 E' = R"  Y'. M'=E'D'. U·=M'. Y·=[GUr.
(a)
(bl
(e)
(d)
The final result we require is that, given a sampledsignal transform such as U*(s), we can find the corresponding ~transform simply by letting e'! = z or
U(:) = U*(s)
(526)
1_,,=,.
(5.24)
Now Eq. f5.26Id)) indicates that we need U. not U·. to compute Y'. so we must back up to substitute Eq. (5.25(c)) into Eq. (5.26(d)): (5.27) Taking out the periodic pans. which are those in which s appears only as e'T [which include M'(sl), we have
There is an important timedomain reflection of Eq. (5.24). The inverse Laplace transform of U*(s) is the sequence of impulses with intensities given by u(kT); the inverse ztransform of U(~) is the sequence of values u(kT). Conceptually. sequences of values and the corresponding ~transforms are easy to think about as being processed by a computer program, whereas the model of sampling as a sequence of impulses is what allows us to analyze a discrete system embedded in a continuous world (see Fig. 5.13). Of course. the impulse modulator must always be eventually followed by a lowpass circuit (hold circuit) in the physical world. Note thatEq. (5.24) can also be used in the other direction to obtain U'(s), the Laplace transform of the train of impulses, from a given U(d·
y' =
(I 
eT'),W (
~)' .
(5.28)
Substituting from Eq. (5.26(b)) for M" gives
Y' = (1 eT'jE'D'(G/s)'.
And substituting Eq. (5.26(a)) for E' yields
(529)
•
Example 5.1
Bloch Diagram Analysis
Compute the transforms of Y* and Y for the system block diagram of Fig. 5.l3. Solution. In Fig. 5.13 we have modeled the AID convener plus computer program plus DI A convener as an impube modulator [which takes the samples from e(l)l. a computer program that proce"es these samples described by D'(s). and a zeroorder hold that constructs the piecewiseconstant output of the DI A convener from the impulses of m . In the actual compUler we assume that the samples of e(l) are manipulated by a difference equation whose inpuloutput effect is described by the ~ transform D(:). These operations are represented in Fig. 5.13 as if they were performed on impulses. and hence the transfer function is D'(sl according to Eq. (5.24). Finally. the manipulated impulses. m'U). are applied to the zeroorder hold from which the piecewisecon stantcontrol signal u(r) comes. In reality, of course, the computer operates on the sample values of err) and the piecewiseconstant output is generated via a storage register and a DI A converter. The impulses provide us with a convenient. consistent. [fwe call
Y" = (l  eT')D'(G/s)'[R"  Y'j.
(5.30)
(5.3 !)
then we can solve Eq. (5.30) for Y'. obtaining
Y' =    R ' . 1 + H'
H'
(532)
•
6 In sampling Eq. (5.25Ic» we obtain Eq. (5.26IC)) by use of 'he continuousfromtheright convention
for Eq. (5.5) for impulse modulation of discontinuom. funoions, From the timedomain operation of the zeroorder hold. it is clear that the samples of 1I and m are the same, and then from this Eq. (5.26(c))
follows.
174
Chapter 5
SampledData Systems
5.4
BlockDiagram Analysis of SampledData Systems
175
•
Example 5.2
AnalvSlS of a Spcnfic Bloch DlQgralll
Apply the results of Example I to compute Y' and Y for the case where
G(s)=   .
a
(5.331
s+a

and the sampling period T is such that e aT discrete integrator
= ~,
The computer program corresponds to a
u(kT) = u(kT  T)
+ Koe(kT),
(5.34)
and the computer DI A holds the output constant so that the zeroorder hold is the correct model. Solution. We wish to compute the components of H' given in Eq, (5.311. For the computer program we have the transfer function of Eq. (5.34), which in terms of ~ is
D()
Equation (5.38) shows how to compute the response of this system in between sampling instants. For a given r(t). the starred terms in Eq. (5.38) and the (I  e T , )term correspond to a train of impulses whose individual values can be T computed by expanding in powers of e ,. These impulses are applied to G(s)/s. which is the step response of the plant. Thus. between sampling instants, we will see segments of the plant step response. With the exception of the oddlooking forward transfer function, Eq. (5.32) looks like the familiar feedback formula: forwardoveroneplusfeedback. Unfortunately. the sequence of equations by which Eq. (5.32) was computed was a bit haphazard, and such an effort might not always succeed. Another example will further illustrate the problem.

= U(~) = ~ = Ko~
E(~I l~I
•
Example 5.3
Another Bloch Diagram AnalySIS
Compute Y'and Y for the block diagram of Fig. 5.14. Solution. The equations describing the system are (all symbols are Laplace transforms)
E=RY. U=HE, Y=U'G: (a)
(b)
(e)
:1'
Using Eq. (5.241. we get the Laplacetransform form
D
'"
(5)
= e,r _ I .
Koe
1T
(5.351
For the plant and zeroorderhold we require 11 e T ' )(G(S)!5)' = (l _ er,) ( _ _ "(5 + a)
= (l _
15.39)
e r»
(~
s
__
a_)' 1_)'. +
s a
1 _ eI"T e T' ) '
and after sampling, the equations are
E'=R'  Y'. U'=(HE)'. Y'=U'G'.
(a) (b)
(5.40)
\'sing Eq. (5.5). we have
I]  eT')(G(s)!sl" = (l  eT ,)
(e)
(I _
~T' 
How do we solve these? In Eq. (5.40(b)) we need E. not (5.39(a»)
U' = (H(R  Y))'
e. So we must go back to Eq.
Becau&c e aT =
!' this reduces to
(I eT')(G(s)/s)' =
~ r1 Oj2)e ,
(l!")e r ,
= (HR)'  (HY)'.
Using Eq. (5.39(c)) for Y, we have (5.361
U' = (HR)'  (HU'Gi'.
lj2 = e T'  1/2' Combining Eq. (5,36) and Eq. (5.35) then, in this case. we obtain
W(s) = "
Taking outlhe periodic U' in the second term on the right gives 15,371
U' = (HR)'  V'(HG)'.
K
eo'!
2 le'T  I )(e"T  I j2)
.
Equation (5.37) can now be used in Eq. 15.32) to find the closedloop transfer function from which the dynamic and static responses can be studied, as a function of K o' the program gain. We note also that beginning with Eq. (5.25), we can readily calculate that
Y{s)
= R', 1+ H
D'
(l 
e T ,)
s
G(s),
(538)
Figure 5.14 A simple system that does not have a transfer
function
•
176
Chapter 5
SampledData Srstems
54
BlockDiagram Analysis of SampledData Systems
177
Solving. we get
Next we sample these signals. and use the "if periodic. then ouC rule from Eq. (5.191:
U' =
(HRj" I +IHC('
(5...111
E' = R'  M'C;
M' = £'(HC,I'.
From Eq. (5...10\ c)). we can solye for Y' We solve these equations by substituting for M< in Eq. (5,.1.41 from Eq. (5.'131 Y'
=
(5.+11
<HR( C. l+(HCj"
(5.'12,
E' = R'  E"(HGt)"C;
•
W
To obtain Y we use the equation
Y = E"H
(5.45)
Equation (5.42) displays a curious fact. The transfonn of the input is bound up with H (s) and cannot be divided out to give a transfer function! This system displays an important fact that with the manipulations of stars for sampling might be overlooked: A sampleddata system is time \'tlITing. The response depends on the time relatil'e to the sampling illstants at which the signal is applied. Only when the inpllt samples alone are required to generate the output samples can we obtain a discrete transfer function. The time variation occurs on the taking of samples. In general. as in Fig. 5.14, the entire input signal r{t) is involved in the system response. and the transferfunction concept fails. Even in the absence of a transfer function. however. the techniques developed here pennit study of stability and response to specific inputs such as step, ramp, or sinusoidal signals. We need to know the general rules of blockdiagram analysis. In solving Fig. 5.14 we found ourselves working with U, the signal that was sampled. This is in fact the key to the problem. Given a block diagram with several samplers. always select the mriables at the inputs to the samplers as the unknowns. Being sampled. these variables have periodic transfonns that will always factor out after the sampling process and result in a set of equations in the sampled (starred I variables that can be sol ved.
WH
1 +(HC,)'C~' and
15.46)
Y' = _ _ _ _ R_H,'
l+IHC,.I'C:·
15.47)
In this case we have a transfer function. Why'] Because only the samples of the external input are used 10 cause the OUlput. To obtain the ~transform of the samples of Ihe output. we would let e,T = ; in Eq. 15.47). From Eq. (5.46) we can soh'e for the continuous output. which consists of impulses applied to His) in this case.
. _ +
As a final example of analysis of sampleddata systems we consider a problem of experimental transfer function measurement in a sampleddata system.

+ Example 5.5
+
Example 5.4
Anotha Blo.J1 DiagmlJ] AnC/lysis
Compute the transfonns of Y and Y for the block diagram drawn in Fig. 5.15.
Mmslmng rhe
TransIl'r
fllncrlOll
oj a SampledDatu
S\SlCI11
It has been proposed to use an experiment to measure the loop gain of a trial sampleddata design on the actual physical system using the setup of Figure 5.16. The proposal is to have zero reference input but 10 inject a sinusoid into the system at Wand to measure the responses
Solution.
\.Ve select £ and M as independenl yariables and write
£(5) = R  M'C,.
M(s) =
Figure 5.16 A block diagram for experimental measurement of a sampleddata transfer function 15.43,

E' HC,.
Figure 5.15 A final example for transferfunction analysIs of sampleddata systems
178
Chapter 5
SampledData Systems
54
BlockDiagram Analysis of SampledData Systems
179
at that frequency at locations £, and £,. [t is thought that the (complex) ratio of these signal> will give the loop gain from which the gain and phase margins can be detennined and with which a frequency response design can be worked out.
If we now substitute this result into Eq. (5.48) and Eq. (5.49; we have the solution of this part as
D'(WG)" £, = W 
1+ D'(HG)'
H
1. Compute the Iransfonns of £, and
£~
for a general signal input at w.
2. Suppose that the signaill' is a sinusoid of frequency "'0 less than IT I T (no aliasing). Plot the spectra of G Wand (GW)' and show that CCW)' = yG W at the frequency "'0' 3. Use the results of 2) when "'0 < IT I T.
10
E. = _ D'(WG)' H I +D'(HG)'
(554)
get an expression for the complex ratio of the signals £, and L
Clearly we do not haw a transfer funclion since the transform of the signal is imbedded in the signal transfonns. 2. For the second part. we can consider the sinusoid one exponential at a time and consider ll' = 2"8(,,,  "'oJ. Then
1 ;.
4. Repeat these calculations for the setup of Fig. 5.17 where the input signal is first sampled and held before being applied to the system.
(CH)
= 
T.~_x
1 k~, 2:r 2rrk L... C(j",jk)2;ro(",(Vo   ) .
T
T
Solution.
The spectra involved are easily sketched. Since "'" < the signal is
(GWj'
;r
I T there is no overlap and at "'n
1. Following the procedure just given, we express the signals of interest in tenns of sanopled signals as follows
£, = W+V'H £,=V'H y= IVG+U'HG y' = (IVG)'

=
1'G(joJ n )2:T8(",  (V,,)
I .
(548) (5.49) (550) (5.51) (5.521
= ' C\l':',,, T
(5.55)
+ V'(HG)'
3. If we substitute Eq. (5.55) into Eq. (5.5+) and take the ratio. we find the de.scribing function
I DCH
U' = D'Y'
T
15.56)
Solving Eq. (5.52) for V' V'Cs) =
D'(WG)' I+D'(HG)'
1+ D'(GH)'  'D"CH T
(553'
Notice that if IC I = 0 for i"'l > then Eq. (5.56) reduces to
IT
I T so
that C· = C for frequencies less than
;r
IT.
~~
(
,=
D"(GH)'.
which is the transfer function. Thus the proposed method works well if there is a good antialias filter in the loop. Figure 5.17 A block diagram for experimental measurement of a sampleddata transfer function with sampled Input
4. With the input applied through a sample and hold as drawn in Fig. 5.17 the key expressions are gil'en by
E, = U'H
+
W'H
E, = U'H
U' = D'Y'
Y=U'HG+IV"HC.

(5.57;
These equations can be readily solved. after taking the "star" of Y to give
E, =
1+
W"H D'(HG)'
E = D'(HG)' lV' H. , I+D'(HG)'
180
Chapter 5
SampledData Systems
5.5
Calculating the System Output Between Samples: The Ripple
181
From these. the ratio giyes the true discrete transfer function
Figure 5.18 . Three methods used to evaluate ripple. (a) Partial fraction expansion; (b) Modified s ztransform; (c) Multlrate sampling

•
5.5 Calculating the System Output Between
Samples: The Ripple
In response to a particular input. the output of a sampleddata system at sampling instants can be computed by the ~transform, even in those cases where there is no transfer function. However. in many problems it is important to examine the response between sampling instants. a response that is called the "ripple" in the response. Often, for example, the maximum overshoot will not occur at a sampling instant but at some intermediate point. In other cases, hidden oscillations are present, oscillations that mayor may not decay with time. The ripple is generated by the continuoustime part of the system at the output. For example, in the case drawn in Fig. 5.13, the ripple is given by the response of G(s)ls between sampling instants. Three techniques have been suggested to compute ripple. The first. suggested by J, Sklansky, is based on the partialfraction expansion of G(s)ls. The second, suggested by E. Jury. is based on introducing a time shift in the sampler at the output of the system. If this shift is less than a sample period, the new samples are taken between the system samples. The modified transform from input samples to shifted samples is called the modified z  tram! arm of G(s) Is. The third technique, introduced by G. Krane. is based on sampling the output at a faster rate than the feedback loop is updated. Block diagrams representing the three methods are given in Fig. 5.18. In the partialfraction method, shown in Fig. 5.18(a), the outputs of the several fractions are sampled and the values of v, (k T). y/k T) .... are computed in the regular way with ~  trans! orllls or MATLAB statements. These values at the instant k T represent initial conditions for the several partial fraction continuous dynamics at time KT and frum them the transient over the period from kT to (k + I)T can be computed. The total system output is the sum of these components. The method is somewhat tedious but gives an exact expression for the ripple during any given sample period from which. for example, the peak overshoOl can be exactly computed. The modified z  t ran s! arm of the plant with zeroorder hold is defined as
G(z, m) = (I  ZI)Z { se mT '
G(s) ,}
(a)
(b)
R
(c)
Tin
<Y<I kT11I1
.
and represents samples taken at the times k T + m T. The modified transform of the output of the system shown in Fig. 5.18(b) is given by
y
(~. Ill) = I
D(z)G(~. Ill)
and its inverse will give samples at k T but is only being used as a computational device to obtain intersample ripple. For example, if III = 0.5 then use of Eq. (5.58) will find sample values halfway between sample updates of the control. MATLAB only permits delays (causal models) and can be used to find the output of the modified plant delayed by one sample shown in the figure as ~l Y(~. m).lfthe plant is given in state form with description matrices [F, G. H. Jj, then the representation of the delayed modified transform can be computed in MATLAB using
SYS = ss(F.
(5.58) + D(z)G(~) R(~), + m T, The modified operation is noncausal
G.
H. J).
The delay for sample period T and shift 111 is set by the command
0:::
III
< I.
set(SYS.'td', (1  m)T).
182
Chapter 5
SampledData Systems
5.7
Problems
183
and finally. the discrete representation of the system which has a delayed modified ~ ~ transf orlll is given by the standard conversion
5.2 5.3
Show how to construct a signal of hidden oscillations that grows in an unstable fashion. "''here in the splane are the poles of the transforms of your signal(sr) A firstorder hold is a device that extrapolates a line overthe interval from k T to (k + I) T with slope given by the samples r(kT  T) and r(kTj starting from r(kT) as shown in Fig. 5.19. Compute the frequency response of the firstorder hold. Consider the circuit of Fig. 5.20. By plotting the response to a signal that is zero for all sample instants except t = 0 and that is 1.0 at t = 0, show that this circuit implements a firstorder hold. Sketch the step response vCr) of the system shown in Fig. 5.21 for K = ~, I, and 2. Sketch the response of a secolldorder hold circuit to a step unit. ""hat might be the major disadvantage of this data extrapolator? A triangle hold is a device that has an output, as sketched in Fig. 5.22 that connects the samples of an input with straight lines.
(a)
SYSD = c2d(SYS. TJ.
The method of multirate sampling is shown in Fig. 5. l8(c). The output 01 the controller is held for the full T seconds but this signal is again sampled at the rate T/ n for some small n. such as 5. The plant output is also sampled at the rate T / n. The feedback loop is unchanged by these additional samplers but th<, output ripple is now available at 11 points in between the regular sample time~. This technique is readily programmed in MATLAB and is regularly used in thi.' book to compute the ripple. An interesting case is given in Fig. 7.14 where it can be seen that the maximum overshoot occurs in the ripple.
5.4
5.5 5.6 5.7
Sketch the impulse response of the triangle hold. Notice that it is noncausal. l'se MATl..AB to plot the frequency response of the triangle hold.
5.6 Summary
In this chapter we have considered the analysis of mixed systems that are panl> discrete and partly continuous. taking the continuous point of view. These system, arise from digital control systems that include AJD and D/A converters. The important points of the chapter are • The largesignal behavior of an AID converter can be modeled as a linear impulse modulator followed by a zeroorderhold.
• DI A converter can be modeled as a zeroorderhold.
Figure 5.19
Impu Ise response of a firstorder hold filter
(b) Compute the transfer function of the hold.
(c)
I I
I
I
I
I ____ 1I
I +I
• The transform of a sampled signal is periodic with period 2rr / T for sample period T. Sampling introduces aliasing. which may be interpreted in both the frequenc) and the time domains. • The sampling theorem shows how a bandlimited signal can be reconstructed from its samples. • Interconnections of systems that include sampling can be analyzed by blockdiagram analysis. • If the input signal to a sampleddata system is not sampled, it is impossible to define a transfer function. • The output of a sampleddata system between sampling instants can be computed using partial fraction expansion, using the modified ~ ~ transforlll, or by multirate sampling. With a computer. multirate sampling is the most practical method.
Figure 5.21
A sam pleddata system
o
I
~~+I I I I I I
I
I
I
===rsJ~~~s~~~
I
I
I
I
I
2
L.._ _L _ _L _ _:_'
o
2
3
4
Figure 5.20
Block diagram of a sample and firstorder hold
5.7 Problems
5.1 Sketch a signal that represenb bounded hidden oscillations.
Indicate the frequency of the components in the sampled signal up to (V = 32. (b) Indicate the relative amplitudes of the signals in the output if the signal is passed through the antialiasing filter with transfer function . (e) (a) A sinusoid of frequency (v)10./10.24 Block diagrams shOWing the modified ztransform ::./ R /~oyo (s.lform of Gis I. (5.. as shown in the hlock diagram of Fig.184 Chapter 5 SampledDala Syslems 5. let I GI. if the sampler is followed by a zerohold.16 Assume the following transfer functions are preceded by a sampler and zeroorder hold and followed by a sampler.17 One technique for examining the response of a sampled data s.15 Find the transform of the output Y (sl and its samples }" (5) for the block diagrams shown in Fig. Compute the resulting discrete transfer functions. + II (e) (a) (d) C"(SI=C "'/«sII 5. illld . 5. (e) (a) C. = 16.m( is called the modified: trall.23 Block diagrams of sampled data systems. 5.22 Response of a sample and triangle hold Figure 5. (e) 5.12 A sinusoid of frequency II radisec..13 A signal r(l) = sinOr) (a) A. 1'1.n = 1/.\ A step input. You can use MATLAB to compute the filter gain.. (a) 5.8 Sketch the output of a sample and zeroorder hold to (a) T A step input. The function GI:..24 and described by the equation Y<ls. is sampled at the frequency w. 5.II 5. I 8Is(=. a function of .1 7=1. (b) A ramp input. H (b) Sketch the output of a sample and firstorder hold to (b) A ramp input.c before sampling. 5.(.1 2 C.11 Sketch the output of a sample and cal/sa/triangle hold to (bi A ramp input. = 5 rad! sec.(sl = 1/.7 Problems 185 Figure 5.'~. A sinusoid of frequency Ib) C. the output .. = 20 rad/ sec. Indicate the component frequencies up to uJ (b) Indicate the relative amplitudes of the components up to 20 rad / sec.23. . .. A step input. (b) multiple loop (a) T (d) How would the frequency response be changed if the triangle hold is made to be causal by adding a delay of one sample period'} 5.II + sint 15r) is sampled at the frequency iV.1 = RIc IGI:.1s1 = I/(s~ . the equivalent equation i.T'f'. (a) Single loop. ta) Compute .tem between sampling instants is to shift the response a fraClion of a period to the left and to sample the result.m) Y 'l: G(s) em 1 ~ T T y(t) yet + mn OSm<l . A sinusoid of frequency A step input.". The effect i.CI+ll Ie) lei (b) A ramp input.(SI=c·"'. 5. A sinusoid of frequency (vJIO... "'./10. (I' i.14 Derive Eg. 5. 5.9 (a) "'.1'(1) hy calculating rlkTj from the Drdinary : trallsform and observing that hetween samples.(.I)=. In the figure.10 Sketch the output of a sample and triangle hold to G...38). m). Indicate whether a transfer function exists in each case."(1) is an exponential decay with Figure 5.m) = R"lsI/GCslc".
There the issue is that ideal transmission requires that all desired frequencies be (5. Now the general form of the inverse Fourier transform is given by fUJ = c!. 60 Including microprocessors and special·purpo:. 271' x However. in signal processing it is common to represent signals as a sum of sinusoids and to define the "desirable components" as those signals whose frequencies are in a specified band. devices for digital signal pn. In longdistance telephony some filters playa conceptually different role.w). The argument is more natural as (w ..8 Appendix To compute the transform of a sinusoid. Plot these on the same plot as that of vtll and verify that you have found the values at the midpoints of the sampling pattern.transform for til = ~ and compute the samples according to the equation for H:. considering the sifting property. Discrete Equivalents A Perspective on Computing Discrete Equivalents One of the exciting fields of application of digital systems' is in signal processing and digital filtering.Jr F(jw)eJ''''dw. In electrocardiography it often happens that powerline frequency signals are strong and unwanted.· . 2IT Figure 6. 5. m). The direct transform of this object is easy. (5.w"J rather than the opposite. "X U we apply the inverse transform integral to the impube and its transform.. Notice that this technique is the essence of the partialfraction method of obtaining the ripple.591 This integral does not converge in any obvious way.5 and 60. Thus a radio receiver is designed to pass the band of frequencies transmitted by the station we want to hear and reject all others. Consider again the impulse.)('t~~illg_ call~d DSP chips 187 . we take f(lJ = .1 Magnitude of a lowfrequency bandpass filter with a narrow rejection band Eq.f"'. where the amplitude response between 59. but we can approach it from the back door..186 Chapter 5 SampledData Systems unit time constant. as it were.59) is of this form V(jw) = = e!¢ f: f: 20 log I Hit e!J.W'dt 0~   = 2ITeJ~8(w . If we exchange t with w the integral reads I 8(w) = ~ t <'i(t) = ~ f'" fA 'XC ejw'dl. the sign of the argument in the delta function was changed. For this we have V(jw) = f: e"w"IJ~'eJwldr.1 on a logfrequency scale. this is exactly the integral we needed to evaluate the spectrum of the single exponential.tJ~'eJHdl eJIIQ'. The magnitude of the transfer function for this purpose may look like Fig. (b) Compute the modified ~ . Here we have a bandreject filter with a 60dB rejection ratio in a IHz band centered at 60 Hz. 6.(t) and F(jw) = 1 with the result . so a filter is designed to pass signals between I and 500 Hz but to eliminate those at 60 Hz. which is legal because "(I) is an even function and "(I) = or I). as follows f: <'i(t)ej""dt = 1. Sketch the response for five sample inter.~ At the last step in this development. eJ""dw. we consider first the Fourier transform of v(r) = e Jw //¢.als. except for notation and a simple change of variables. "(f).5 Hz might reach 10'. We would call a filter which does this a bandpass filter. A filter is a device designed to pass desirable signal components and to reject undesirable ones..
Whatever the namefilter. H(s). The first method is based on numerical integration of the differential equations that describe the given design. We call the devices that make these changes compensators. represent the response of a discrete filter with a pole at:. the system . (6. () U 7  ll(kT) = 1 () rall + ae]dr + + 1" r U7 (Ill + aejdr (6.T S T < kT. 6. The methods are compared with respect to the quality of the approximation in the frequency domain as well as the ease of computation of the designs.3) = ll{kT . Three possibilities are sketched in Fig. The design of continuous electronic filters is a wellestablished subject that includes not only very sophisticated techniques but also welltested computer programs to carry out the designs [Van Valkenburg (1982)).{kT . For example.188 Chapter 6 Discrete Equi\'alents 61 Deslgn of Discrete EqUl\'alents via l'umericallntegrauon 189 emulation treated equally but transmission mediawires or microwavesintroduce distortion in the amplitude and phase of the sinusoids that comprise the desired signal and this distortion must be removed. (65) 1 Also knov. Finally.1) is equivalent to the differential equation Ii + au = ae. While there are many techniques for numerical integration. (6.1 Design of Discrete Equivalents via Numerical Integration The topic of numerical integration of differential equations is quite complex. Although much of our presentation in this book is oriented toward direct digital design and away from emulation of continuous designs with digital equivalents. This is called pole and cem mapping.T) + TIau. The first approximation leads to the forward rectangular rule 2 wherein we approximate the area by the rectangle looking forward from k T . aT~' a (forward rectangular rule).2) Now.4) The transfer function corresponding to the forward rectangular rule in this case is H F(:':) = 1(1aT)~~. if we write Eq.: = e'J. Chapter Overview The specific problem of this chapter is to find a discrete transfer function that will have approximately the same characteristics over the frequency range of importance as a given transfer function. it is important to understand the techniques of discrete equivalents both for purposes of comparison and because it is widely used by practicing engineers.T. Consequently.aT)lI. The result is an equation in the first approximation. This technique is called hold equil'alence. Filters to correct the distortion are called equalizers. or compensatormany fields have use for linear dynamic systems having a transfer function with specified characteristics of amplitude and phase. For example. and only the most elementary techniques are presented here. For digital control systems we have much the same motivation: Continuouscontrol designs are well established and one can take advantage of a good continuous design by finding a discrete equivalent to the continuous compensator.2) in integral form.n as Effler"s rule.T) + ae{k T . (k T) = ll. (k T .T)] = (1 . except that the integral is more complex here u(t) = 1'rau(T)+ae(Tl]dr. Il.. The width of the rectangle is T. u. Many rules have been developed based on how the incremental area term is approximated. The fundamental concept is to represent the given filter transfer function H (s) as a differential equation and to derive a difference equation whose solution is an approximation of the differential equation. we only consider formulas of low complexity and fixed stepsize. Increasingly the power and flexibility of digital processors makes it attractive to perform these functions by digital means.T and take the amplitude of the rectangle to be the value of the integrand at kT . when sampled with period T. (6. equalizer.T) area of au + ae { over kT . Three approaches to this task are presented.= H(s)=E(s) s U(s) a +a (6. This formula can be used to map the poles and zeros of the given design into poles and zeros of an approximating discrete filter. .2. The second approach is based on comparisons of the sand 2 domains. and passing this approximation through the given filter transfer function.T) + aTe{kT . This method of design is called emulation.n. (k T . the dynamic response of control systems requires modification in order for the complete system to have satisfactory dynamic response. extrapolating between samples to form an approximation to the signal. 6. The third and final approach is based on taking the samples of the input signal. an important approach to digital filter design is to start with a good analog design and construct a filter having a discrete frequency response that approximates that of the satisfactory design. Note that the natural response of a continuous filter with a pole at some point s = s" will. we have a development much like that described in Chapter 4. only simple formulas based on rectangular and trapezoid rules are presented.
(b) backward rectangular rule. (c) trapezoid rule Again we take the ztransform and compute the transferfunction of the backward rectangular rule aT HB(z) = I +aT 1 . (6.T) 1+ (aTIZ) . (cJ Trapezoid Rule a (21 T)[(z .T) aT l+aT +l+aTe(kT).(kT) = IIpT .6) .T) + [e.7) Our final version of integration rules is the trapezoid rule found by taking the area approximated in Eq.:e had to eliminate u(kT) from the riohthand side where it entered from the integrand. • H(s) a s+a a s+a a s+a Method Forward rule Backward rule Trapezoid rule Transfer function a HF = (zI)IT+a a H B(z . This topic is the subject of predictorcorrector rules. Had Eq.2) been nonlinear.10) + I)l + a From direct comparison of H (s) with the three approximations in this tabulation.(kT .2 Sketches of three ways the area under the curve from kT to kT + T can be approximated: (a) forward rectangular rule. (trapezoid rule).T) .190 Chapter 6 Discrete Equivalents 6.9) A second rule follows from taking the amplitude of the approximating rectangle to be the value looking backward from kT toward kT . we can see that the effect of each of our methods is to present a discrete transfer function that can be obtained from the given Laplace transfer function .3 It b worth noting that in order to solve for Eq. been an im~licil equation requiring an iterati\'e 501ution.T.I)/(z (6. The approximating difference equation is 1I.z a (a) Forward Rectangular Rule I aT~ ~(l+aT)l '/0 +aT) (zI)ITz+a (backward rectangular rule). (6.l. The equation for u 2 . (6. A discussion is found in most books on numerical analysis. the result would hav. 1+ (aTI2) .T:=Z + e.6) I.8) +ae(kT .(kT . (6.(aTIZ) aTI2 II..+a. See Golub and Van Loan i 19831.(kT)].(kT . "'hIen are beyond our scope of interest. namely. .(kT  T T) (6.T) (b) Backward Rectangular Rule + '2[all.(kT) = 11l(kT . The corresponding transfer function from the trapezoid rule is aT(z + 1) H T (z) = (Z:+aT)z. au(kTj + ae(kT)..' is 1l.1)/ Tz + a a H= (2/ T){(z .1 Design of Discrete Equi\'alents \ia Numerical Integratlon 191 Figure 6. 16.3) to he that of the trapezoid formed by the average of the previously selected rectangles. the second approximation.all.I )/(z + 1)]+ a Suppose we tabulate our results obtained thus far.(kT) + ae(kT)] 1.T) + T[au/kT) + ae(kT)] 1l. (0.
Because the unit circle is the stabilitv boundarv in the ~plane. we discuss a fonnula that extends TustIn s rule one step In an attempt to correct for the inevitable distortion of real frequencies mapped by the rule. 1 1.13) If we let s = j w in these equations.w'/a'+l' .10) Into the zplane. (bilinear rule).I'plane.3(b). (b) Backward rectangular rule. We begin with our elementary transfer function Eq.192 Chapter 6 DIscrete EqUIvalents 6. In spite of .I J~ ~l (6. + 1)1 + a' The original H(s) had a pole at magnitude of H(jw) is given by 5 = (l.3 that the fOrlvard recta~oular rule'could cause a stable continuous filter to be mapped into o an unstable digital filter.Iplane IS compressed mto the 21fIength of the umt Circle.1 Design of Discrete EqUIvalents vIa 'Jumericallntegration 193 H (5 l by substitution of an approximation for the frequency variable as shown Figure 6. the ~+ I L H _I Ts  11 = 2' .Ts/2 (forward rectangular rule).plane. 6. (backward rectangular rule).21  + Ts T5 (6. It is especially interesting to notice that the bilinear rule maps the stable region of the .plane. Obviously a great deal of distortion takes place in the m~ppmg. A further understanding of the maps can be obtained by considering them graphically. The unit circle is shown for reference. it would be interesting to know how the jwaxis is mapped by the three rules and where the left (stable) half of the .3 Maps of the lefthalf of the splane by the integration rules of Eq (6. we obtain the boundaries of the regions in the zplane which originate from the stable portion of the . H(s).Ts 1+ Ts/2 1. . (a) Forward rectangular rule.1) and conSider the bilinear rule approximation I I z 1+ Ts.(z) = (2/ n[(.Iplane to the . s = jw.Iplane appears in the . The design method can be summarized by stating the rule: Given a continuous transfer function (filter). as Tustin's method [Tustin (1947)J after the British engineer whose work on nonlinear circuits stimulated a great deal of interest in this approach. For example.I l/(. especially in digital and sampleddata control circles. it is apparent from Fig.3 are these stable regions for each case. ~ is added to and subtracted from the righthand side to yield . To show that rule (ii) results in a circle. (l) (b) Now it is easy to see that with s = jw.the congruence of the stability regions. (6.:. .11) can be viewed as a map from the .  t is constant 1. a discrete equivalent can be found by the substitution (6. 6.+I The trapezoidrule substitution is also known. = a H. (6.12) Each of the approximations given in Eq. (6. because the {s = jw)axis is the boundary between poles of stable systems and poles of unstable systems. and for real frequencies.11) T.21= 2' and the curve is thus a circle as drawn in Fig.14) .I 5 < T s <T2. (c) Trapezoid or bilinear rule below Method Forward rule Backward Rule Trapezoid Rule Approximation .: . The shaded areas sketched in the ~plane in Fig. As our final rule den:'mg from numencal integration ideas. The transformation is also called the bilinear transformation from consideration of its mathematical fonn. 6. I I) for z in tenns of s. Stable splane poles map Into the shaded regions In the zplane. the magnitude of. For this purpose we must solve the relations in Eq.Iplane exactly into the stable region of the ~plane although th~ entire jwaxis of the . (6.. We find i) ii) iii) .
= WIT aT It is clear from Eq. we realized a halfpower point at WI = (2/ T) tan.17) 7/'21 1 . As we saw in Chapter 4. . We can tum our intentions around and suppose that we really want the halfpower point to be at Wi' Equation (6. Solution. This is the consequence of prewarping. 2 2 (6. Powell and Emami~Naeinl (1986). However. Write the desired filter characteristic with transform variable frequency WI in the form H(S/W I )4 2.1.) = 1. only with prewarping do we have a design that comes even close to the continuous response.r. the Tustin bilinear rule and the bilinear rule with prewarping at r.J'". 6. Hp(z) approaches H(jw/w i ). such as bandpass filters. Finally. 3.1 DeSIgn of Discrete Equivalents via Numerical Integratlon 195 Thus our reference filter has a halfpower point.15) Hp(z) = H(~I{!. 6'. where the ratio of sampling frequency to passband frequency is wjw p '" 63.194 Chapter 6 Discrete Equivalents 6.8) for Hr(zl) and manipulate it into a more convenient form for our present purposes and in place of H (s / WI)' consider the prewarped function H (s / a). We also note that as the sampling period gets small.17) that when W = WI' Hp(Zi) = H(jl) and the discrete filter has exactly the same transmission at WI as the continuous filter has at this frequency. at w = a. For more complicated shapes. such as band edges and center frequency. that is.4(b) we see that at w!w = 2".~+1 or tan.T/ T . Fig 6.{) at very slow sampling frequency with w)w p = .16). the rectangular rules are useless (the forward rule is unstable). 1. J).I (a T /2).1 Computing a Discrete Equil'alent The transfer function of a third order lowpass ButIerworth filIer' designed to have unity pass bandwidth (w p = 1) is HIS) = 53 + 25' + 25 + l' A simple frequency scaling would of course translate the design to have any desired passband frequency. then.4. WI will be approximately correct only if aT /2 « I so that tan. using Tustin's bilinear rule for the design.. A sinusoid of frequency WI corresponds to Zl = e.(= 27r / T) » a and the sample rate is much faster than the halfpower frequency. It will be interesting to know where Hr(z) has a halfpower point. From Fig. in Fig. In each case at the Nyquist frequency. w = .4(a) shows that at a high sample rate (T = O. Replace WI by a such that 5 and critical 2 WIT a = rtan2' 4 The critical frequency need not be the band edge. Whereas we wanted to have a halfpowerpointatw = a. IHI' = {.T corresponding to a sampling period of T = 2 sec. (6. and then the bilinear transformation will bring all these points to their correct frequencies in the digital filter. the magnitude 5 A description of the properties of Bulteru:orth filters is given in most books on filter design and briefly in Franklin. all the rules do reasonably well but the reclangular rules are already showing some deviation. and T = 2. Compute the discrete equivalents and plot the frequency responses using the forward rectangular rule. the backward rectangular rule. the specification frequencies. = WI _1_>1 [anfw (6. l!se sampling periods T = 0. should be prewarped before the continuous design is done.: aT /2.4(. 6. we must have UJ 1 < Jr/ T if a stable filter is to remain stable after warping. Computation of the discrete equivalents is numerically tedious and the statespace algorithms described below were used in MATLAB to generate the transfer functions and the response cun'es plotted in Fig. Substitute 2z1 s= L:+! in H(s/a) to obtain the prewarped equivalent H/z). if w.16) Equation (6. (6. and the response of Hr(z) to a sinusoid offrequency Wi is Hr(zl)' We consider now Eq. the halfpower point will be at WI' A statement of a complete set of rules for filter design via bilinear transformation with prewarping is • Example 6. (6..16) can be made into an equation of prewarping: If we select a according to Eq.16) is a measure of the frequency distortion or warping caused by Tustin's rule. We can use the band center of a bandpass filter or the crossover frequency of <l Bode plot compensalOr.I (aT /2) . T = 1. As a frequency substitution the result can be expressed as (6. signals with poles on the imaginary axis in the 5plane (sinusoids) map into signals on the unit circle of the zplane.
5 0 0 t •• •••• t...4 0. .0.18) .19) We can now substitute for sin Eq.. '$ i ~'c • 0 • ° o o... ~ 0. ~ = Cx+ De. ' LH LH ·tOO L ISO~ 200 I ...(. w = I..... (6.5: 1..8 0.. This is no surprise.1 DeSign of Discrete Equivalents \~a "Jumerical Integration 197 Figure 6....... + + • .. • The fonnulas for discrete equivalents are particularly simple and convenient when expressed in statevariable fonn and used with a computeraided design package. .6 !HI ... 1I . because such matching was the whole idea of prewarping .. U = CX+DE.5 Nonnalized frequency (J)/CDp responses of the discrete filters start to repeat according to the periodic nature of discretetransferfunction frequency responses. +. o + 0 00 ."" : t ~~'". 0... 0... .' .r (c) Response of thirdorder lowpass filter and digital equivalents forw/w{j =:T l~"'..( ° 0 1 (c) I . (6. + . 0. (bl Response of thirdorder lowpass filter and digital equivalents for (j)/wc = 2. (6...6r 0...5 ·250 0 ° 0 •• I 1.22. .5 . . .. The Laplace transform of this equation is sX = AX+BE.. the forward rectangular rule is to replace s with (z 1)IT from Eq. + + +.." .11) Z. ~ 0.. ~ .. 1X = AX + BE..2 00·......5 Jrill.+ =...... (6..5 2.20) U = CX+DE.... for all these cases.196 Chapter 6 Discrete Equi\'alents 6. It can be seen that the magnitude and phase of the prewarped designs match those of the continuous filter exactly at the band edge..4 la) Response of thirdorder lowpass filter and digital equivalents for 'v/w" = 20.19) any of the forms in z corresponding to an integration rule. .9"C1 + 0 ° 0 0 + ° 2.. " .. For example. suppose we have a vectormatrix description of a continuous design in the fonn of the equations x= Ax+Be....5 SO~ ! ! . (6. .5 0..8fIHI .. For example.4~ I bilinear =0 warped = + backward forward = x 0. i ..
obtain the output equation for the bilinear equivalent. With this expression for x.31). ~x(k) = x(k + I). x(k) + x(k) + elk) (6. (6.I )/~T with the result ~X=AX+BE.:ed ~o thu( th~ gain of the discrete equi\'al~nt \\ill be balanced between input and output. and the output equation is now u(k) = C(I .30) into the second pan of Eq.A n1w(k) + (I  ArrIBre(k). the ~transform equivalent is obtained from u(k) = fle AT)l BT} 1.T (6. Thus the corresponding discrete equations in the time domain are Once more. 2 ~ flw(k+ I). u(t) Cx(t} + De(t).T ( T AT) (AT)l w(k)+ (AT)l Bfle(k). .T ~e(k) T (6. (6. Suppose we have a continuous system described by = = Ax(t) + Be(t).(~ . For the backward rule.29) AT BT 2 Equation (6.+ T e + Te(k) AT) ( 1 . we expressed the identity I as (1.25) plus Eq. In order to get an equation with such terms only on the left. solve for x as before .29). = ( I+ 1.31) (6.21) is a statespace formula for the forward rule equivalent.A T) x = 2 flw+ BTe 2 which corresponds to the time domain equations AT)l x= ( 1. (6.An1BTe. ~ Writing the definition of w at time k.An1BTje. x(k + I) = (I + TA)x(k) + TBe(k).x(k) = TAx(k) + TBe(k).25) In following this algebra. for the trapezoid or bilinear rule. (6.221 Substituting Eq.ATj1w + (I ..27) BT 2 These results can be tabulated for convenient reference.26) To Equation (6.30) x(k + I) .I) + I) (~ I)X = (~ AT 2 + I)X+ (~ + 1)E (6.T flw+ (6. and the time domain equation for the state is x(k + I)  x(k) = (x(k 2 AT + I) + x(k)) + (elk + 1) + elk»~. x(t) X=AX+BE T(~ 2(: .198 Chapter 6 Discrete Equivalents 6. the operator ~ corresponds to forward shift: that is.26) are a statespace description of the backward rule equivalent to Eq. BT 2 (6.¥HI . (6.30) into Eq. See Al Sagg3t' and Franklin (1986) for many more derails. there are terms in k + l on both the right. (6. substitute s +.231 From this equation.28) 6 The ~(.27): + I) = (I .ale factor ol .ATjx = w + TBe x = (1. Finally.¥)l on the right.1 Design of Discrete Equn'alents \"Ia "lumericallntegration 199 In the time domain.211 + I)  AT x(k 2 + I)  + I) = = Cx+De.I (1.x(k) = TAx(k + I) + TBe(k + I).. (6.T (1./ f b intnxluo. I8). solving for x in terms of wand e (I . it is useful to know that in deriving the last pan of Eq.ATr1w + {D + C(I . U = CX+DE. Eq. collect all the k as follows" + I terms onto the left and define these as w(k + I) BT elk 2 x(k + 1) .T w(k) + {D + e (AT)l T elk).T 1. (6. transpose all k + 1 terms to the left and define them as a new state vector flw(k+ I) = w(k x(k + I)  T Ax(k + I)  TBe(k + I) = x(k) ~ + 1) w(k + 1). we substitute Eq.¥)1 and factored out (1.and lefthand sides.T {flw(k).T AT)' w(k) = ( 1+ T AT)l +1 } BJT + { I+ AT) ('1. (6. (6.23) can be put in standard form as w(k (6. we obtain (AT)l T e . a rather technical condition.24) AT) AT)l BT} BT (1+ T (1. In this equation. BT 1. 11 x(k (6.
lf H(s) has a pole at a + jh. where r = e"T andlJ = bT.p (~) is left with a number of finite zeros one fewer than the number of finite poles. using rule 3(b). All finite zeros are also mapped by: = e'T. (b) If one sample period delay is desired to give the computer time to complete the output calculation. 2. We must go through the :transforlll process to locate the zeros of £(:)..2 H(s)15~O = H'P(~{~l ' A Zcroroi~ Marchmg Equivalmt Compute the discrete equivalent to H(s)= .2 ZeroPole Matching Equi\'alents 201 Then a discrete equivalent at sampling period T will be described by the equatiom w(k where <1'. the highest frequency that can be processed by the digital filter. the critical frequency iss = 0.p(~)1 should be zero at ~ = I. The rules are as follows: 1. If H(s) has a zero at .I'(~) has a zero at ~ = e"T. If we take the :transform of samples of a continuous signal e(t). 3. equivalent transfer function that approximates the given H(s).e"') aT)  2(:e (6.2 ZeroPole Matching Equivalents A very simple but effective method of obtaining a discrete equivalent to a continuous transfer function is to be found by extrapolation of the relation derived in Chapter 4 between the .l to the poles of £(. IH.and :planes.0 will map toa pole of H(:) ate"T The zeroat" = x will map to a zero at: = 1.( I . and J are given respectively as follows: Badmmf (I increasing w is onto the unit circle at .z = e jO = I until ~ = e jer = I. H ..200 Chapter 6 Discrete EqUIvalents 6. • Example 6.2 . an algorithm to generate the matched zeropole equivalent is also readily constructed. r. the highest frequency possible in the discrete transfer function. then the poles of the discrete transform £(:) are relate. In MATLAB. and setting the gain of a :transform that will describe a discrete. The zeros of H(s) at .' r H II . The gain of H(s) at s = 0 is 1. With this choice. H. all zeros at s = Xl are mapped to : = I. The technique consists of a set of heuristic rules for locating the zeros and pole. in a real way.uT : = I requires gain of .1) according to: = e'T.c(:) has a pole at ~ = eaT. If H(s) has a pole at .I) is zero at the highest (continuous) frequency. To march this gain in H(:) at 1.1f'BT/2 The MATLAB Control Toolbox provides for the computation of Tustin bIlinear equivalents with the function c2d. the result is (6.T.Ts.I = .¥J"Bv'T . computed.z = oc and the others mapped to ~ = 1.' The final function is given by H () 'I" ~ ~c'c'"'C'T:c' (: + IHI ./fcn "'. The pole of H(s) at s = .I = Xl is mapped to .33) or. then H.(:) has apole at re lH . + Je(k). 'tustin') If 'tustin' is replaced with 'prewarp'.An' CII An! II .e. (a) If no delay in the discrete response is desired.p(:) to the point: = I.I = oc are mapped in H. The gain of the digital filter is selected to match the gain of H(s) at the band center or a similar critical point.34) • As with the rules based on numerical analysis. then H. The syntax of computing the bilineiJr equivalent SYSD of a continuous system SYS at sampling period Ts is 4. then one of the zeros at . In most control applications. All poles of H(s) are mapped according to ~ = e.1. 6. the bilinear equivalent with prewarping i. Th~ rationale behind this rule is that the map of real frequencies from jw = 0 to o . Solution.( I . The idea of the zeropole matching technique is that the map: = e" could reasonably be applied to the zeros ab(l. Thus the point ~ = .I = . then H. and so on. a matched . so it is appropriate that if H (. hO\vever.1 represents..T )1 D+ J D+CiIAn'BT en  1. Fonrcml Bilinear <l> [ +AT BT D An'BT n+ ¥'II  ¥. + II = <1'w(k) = Hw(k) u(k) + reek).+a by zeropole matching. and hence we typically select the gain so that SYSD c2d( SYS.
u sra Solution.5(b) provide the samples at the input of Hho (z) and take samples at its output insuring that HhO (z) can be realized as a discrete transfer function. using the equivalent Hrz) = ZIH(.3. If we use a first"order polynomial for extrapolation.form equivalent.7 Suppose we have the e(t) as sketched in Fig.'matched')._ 7 Some books on digitalsignal processing suggest using no hold at all. (b) Block diagram of an equivalent system. This figure also shows a sketch of a piecewise constant approximation to e(l) obtained by the operation of holding eh(t) constant at e(k) over the interval from kT to (k + I) T.ize of this delay i~ one meawre uf the quality of the approx. 5 (6. on the average. at sample period Ts to the continuous system. 6. This choice isoalled lhe z"tran. 6.5 System construction for hold equivalents.5. Ts. is given by : figure 6. This operation is the zero"ol'der hold (or ZOH) we've discussed before.3 A. The philosoph" of the design is the following.3 Hold Equivalents For this technique. 8 Recall that we noticed in Chapter 5 that the signal. HtJld Equi\alcnt z _I ) Z {H(S)} . The paJ1ial fraction expansion of the '"plane [enm of Eq. we construct the situation sketched in Fig.e1ection of T.)I. and .) a sis +u) s +a and the (bl ~"lransform is (636) . The :. (6.0 on for higher"order holds. and its approximation by a zeroorder hold SYSD = c2d(SYS.6.9 along with that of other equivalents for purposes of comparison. its samples. sec.1 is plotted in Fig. has an output that approximates the output of the continuous filter H (s) whose input is the continuous e(t).6 .imation and can he u'led a~ a guide to the s. Therefore.351 is Hr. in Fig. There are man" techniques for taking a sequence of samples and extrapolating or holding them to produce a continuous signa!.202 Chapter 6 Discrete Equivalents 6.3 Hold Equi\'alems 203 zero"pole equivalent. then we have for our approxima" tion exactly the same situation that in Chapter 5 was analyzed as a sampleddata 8 system. is.35) ~ ~''~ ~H(SI (al Find the zero"order"hold equivalent to the firstorder transfer function H(s)=~. 6. . 6.1 ZeroOrder Hold Equivalent If the approximating hold is the zeroorder hold. SYS. 6.I) is given by HhO(z) = (I ~ Figure 6. The discrete hold equivalent is constructed by first approximating e(t) from the samples e(k) with a hold filter and then putting this eh(t) through the given H(s). • Example 6. we have afirsHirder hold (or FOH). (al A continuous transfer function. The sampler. A signal. We are asked to design a discrete system that. The frequency response of the matched zero"pole equivalent for the third"ord"r Butterworth filter of Example 6. dela)'ed from e by 1'/"2. 6. SYSD. with an input consisting of samples of e(t). the zeroorderhold equivalent to H (.
341.8.40) Hrn(:)=~6 (: . by definition of the operation given in Eq. (6. this is not generally true as is evident in the comparison with frequency responses of other equivalents for the thirdorder Butterworth filter example plotted in Fig. 6.2u(r)8(t) + u(t  T)8(t .f>ke"IT = I) 0 I I . (6.3.~I)_(l_:]) eT '  (1. We note that for the trivial example given.(:) = : e "T (6. from the tables of :transforms z {H.39) + Example 6.. the zeroorderhold equivalent of Eq.~S)} = z I?} (:' TJ +4: + I): SYSD = c2d(SYS. 6. In this case. the zeroarderhold equivalent of H(s) is found as (I _ e.7 Impulse response of the extrapolation filter for the triangle hold 1.L  1 1 _ e. the resulting discrete equivalent is causal. Although the continuous system that does this is noncausal. The block diagram is shown in Fig.9. (6.I j' T' (:' + 4: + I): (:_1)' (6. However. The effect of the triangle hold is to extrapolate the samples so as to connect sample to sample in a straight line.zoh') where the continuous system is described by SYS and the sample period is Ts...38) is identical to the matched zeropole equivalent given by Eq.4 A IilanglcHold EquimlOlt Compute the trianglehold equivalent for H (5) = If s'.7. The continuous equations are Figure 6. Chapter 6 Discrete Equivalents 6.39) results in (:  I)~ (6.I)' + An alternative.aT ::1 _e"T:') hold. u.35) is (z ._'__2_+_e__Ts. i' = wiT.:')(1 2 + e. (6.3H) Therefore the discrete equivalent that corresponds to Eq.41) 6.I)' {H(S) } H"i(z) = ~z 7  " • (6.20. (6.42) Figure 6.T5 Ts' Substituting Eq. Because a sample and zeroorder hold is an exact model for the sample and hold with AID converter used in the majority of discrete system" we have already seen the computation of this equivalent in MATLAB as Solution.aT) H . Ts.2 A NonCausal FirstOrderHold Equivalent: The TriangleHold Equivalent An interesting hold equivalent can be constructed by imagining that we have a noncausal firstorderhold impulse response.36) z { H(s) S I t :k . = u(t + T)8(t + T) . as sketched in Fig.35)..37) in Eq. convenient way to compute the trianglehold equivalent is again to consider the statespace formulation.J~ .0 x= Fx +Gu.. 16.::. The Laplace transform of the extrapolation filter that follows the impulse sampling is (I_e"T.8 2T Block diagram of the trianglehold eqUivalent ~_eT. The result is called the trianglehold equivalent to distinguish it from the causal firstorder T::: +4: + I 6 (~. 16.3 Hold Equi\alents 205 and. '6 and direct substitution into Eq.T)' (6. 6.
In the MATLAB Control Toolbox.5 =J +H[" Normalized Frequency wlw!J (hi where~.47) 800 C = H.[)u(k) + ([.)u(k). and triangle = x where urepresents the input impulse functions. LH 400 600 B = [. 6. which corresponds to a sampling frequency to passband frequency ratio of only wjwp = IT.5 With care.5 2. and the trianglehold equivalents are compared again for the thirdorder Bunerworth lowpass filter.w(k). the last two equations of Eq. J] ".42) can be integrated to show that v(k) = u (k) and that w(k) = lI(k + I) . are defined by Eq.[.[lv(k) I I.II(k). (6..411 LH 200 ·300 then the equation in x becomes x(k 400 + 1) = 0 05 ~x(k) . In Fig.3 Hold Equivalents 207 and. G. . Ifa new state is defined as ~(k) = x(k) . Ts. (6.[Ju(k). + lI>[. the zeroorder hold.5 Normalized Frequency Wllllp (aJ 2. 0 0 0.5 1 1."ith sample period T is given by A=~. figure 6.43) as Fr' and the onestep solution to this equation is + 1) = elrr~(kT) O_=:. and [. even with the relatively long sampling period of T = 2. because ii consists only of impulses at the sampling instants.'foh'l. then the state equation for the triangle equivalent is ~(k 0. D 0 0.451 IHI 0.~.  [.206 Chapter 6 Discrete Equl\alents 6. H.44). in matrix fonn.4 0. the function c2d will compute the trianglehold equivalent (referenced there as a tirstorderhold equivalent) of continuous system SYS by SYSD = c2d(SYS. (6.9 Comparison of digital equivalents for sampling period (a) T = 1 and fllJWp = 2rr and (b) T = 2 and c = Jr where ZOH = 0..5 0 (6. If we define 100 exp(FrT) = [ ~~ [~l [~.u(k») + Ju(k) H~(k) + (J + H[.u(k).461 200 Thus the triangle equivalent of a continuous system described by [F.2 +++ + + + + + The output equation is r(k) = Hx(k) = = + JII(k) H(~(k) + [. + et>r.. . (6.u(k») + ([I . zeropole = +.6 + 1) = ~(~(k) = ~~(k) + [.8 0.5 2. [I . (6. We define the large matrix in Eg. Notice in particular that the triangle hold has excellent phase responses.] + [. ~(kT wJw (6.9 the frequency responses of the zeropole.
15 +1 (a) Forward rectangular rule (b) Backward rectangular rule (c) Trapezoid.1 ~ w" = 100 the amplitude and phase Bode plots for each of the above equivalents. method) +1 + I For each of the following design methods. Bilinear with prewarping (Use w. 6. T if T = 0.25 sec. Backward rectangular rule iii.2 Sketch the zone in the .3 1. Let T = 0. Ts. (b) Plot overthe frequency range Wi lOs H(s) = 10 1005 (a) All methods except the forward rectangular rule guarantee a stable discrete system from a stable continuous prototype with the provision that the warping frequency of the bilinear transfonnation with prewarping must be less than the Nyquist frequency of f radj sec. Bilinear rule il'. by a factor of 10 and have negligible phase lag at w. (6. Triangle~hold equi. Zeroorderhold equivalent 1'. vii. Forward rectangular rule ii. = 3 rad H(s)= . i.4 Summary In this chapter we have presented several techniques for the construction of di. Hold equil'Glents (a) Zeroorderhold equivalent (b) Noncausal firstorder. Fomard rectangular rule ii.208 Chapter 6 Discrete Equivalents 65 Problems 209 6. The following transfer function is a lag network designed to increase K. or Tustin's rule (d) Bilinear transfonnation with prewarping For each of the following design methods compute and plot in the :plane the pole and zero locations and compute the amount of phase lead given by the equivalent network at =. Backward rectangular rule iii.1 6. Triangularhold equivalent = 0. = 3 rad. Zeropole matching vi. = 0. Zeropole matching is the simplest method to apply computationally if the zeros and poles of the desired filter are known and takes advantage of the known relations between response and poles and zeros.·alent (b) For each case computed. = e l '''1 T corresponding to w. The methods presented were 6.crete equivalents to continuous transfer functions so that known design methods for continuous systems can be used as a basis for the design of discrete systems. method method method method method 'zoh' 'foh' 'tustin' 'prewarp' 'matched' .. = 3. With a reasonable computeraideddesign tool. Bilinear rule il'. = eJ~...plane where poles corresponding to the left half of the 'plane will be mapped by the zeropole mapping technique and the zeroorderhold technique.4 Zeropole mapping vi. Zeropole matching 3. The following transfer function is a lead network designed to add about 60 phase lead atw.or trianglehold equivalent 6. Zeroorderhold equivalent vii. the designer can select the method that best meets the requirements of the design.5 Problems 6. bilinear.15) is true. Bilinear with prewarping (use WI as the warping frequency) 2. compute and plot on the :plane the zeropole patterns of the resulting discrete equivalents and give the phase lag at :.01 + w h = 10 rad. Show that Eq.25 sec and the design is via i. = 3 radians as the warping frequency) where zeroorder hold firstorder hold (triangle hold) Tustin's bilinear method bilinear with prewarping zeropole matching v. Numerical integration (a) 5+1 0. The MATLAB function c2d computes the discrete description for most of these discrete equivalents from a continuous system described by SYS with sample period Ts as follows. plot the Bode amplitude and phase curves over the range w. SYSD c2d(SYS. This is one of the most effective methods in the context of an overall design problem and in later chapters the zeropole matching method is frequentl) selected.
The unifying theme of these methods is the use of Fourier and Laplace transforms to represent signals and system dynamics and to describe the control specifications. are considered fair targets for control. The landmark contributors to this "classical" theory are Evans (1950) [root locus) and Nyquist (1932) and Bode (1945) [frequency response). The methods based on transforms were developed before computers were available and the engineer had to depend on hand calculations and careful hand plotting to achieve the design. Systems from airplanes to the national rate of unemployment. the understanding of the design process gained by the experience of doing a simple design by hand is well 211 . In this role. From the perspective of the 90's the terms "classical" and "modern" seem a bit pejorative and v. a body of control theory was developed based on electronic feedback amplifier design modified for servomechanism problems.Design Using Transform Techniques A Perspective on Design Using Transform Techniques The idea of controlling processes that evolve in time is ubiquitous. Over a period of three decades from about 1930 until 1960. For random inputs. the work of Wiener (1948) should be added. The availability of computers and software such as MATLAB have made calculations and plotting simple. from unmanned space vehicles to human blood pressure. fast and accurate: and now the handplotting guidelines are used as verification of the automatic calculations and as a guide to design decisions.e prefer to classify the methods as transform techniques and statespace techniques. Controller design is then carried out in the selected transform domain. This theory was coupled with electronic technology suitable for implementing the required dynamic compensators to give a set of approaches to solve control problems now often called classical techniques to distinguish these methods from designs based on a statespace formulation which came to be called modern techniques.
5S f_O 7. • The requirement on the magnitude of the real part of the pole is jRe{s. Each of these developments must be understood in order to apply transform methods to digital control. In addition to the usual results..1 System Specifications 213 worth the effort spent in developing the required skills. T. i. The meaningful part of the frequency respome is restricted to half the sampling frequency. which is to say. The second method introduced is the root locus where it is demonstrated that the nIles of the root locus are unchanged from the continuous case but the relations between pole location and time response must refer to the ~plane rather than the splane.2) • The fractional overshoot.w" ::::4. magnitude and phase in the frequency response. The introduction uf digital control and sampled data adds new constraints and new possibilities to the transform design methods. Finally. the system is Type 1 if DC has a simple pole at s = O. smoother control results if there are more than 10 samples in the rise time. • The requirement on natural frequency is w" :::: 1.. developed to show how frequency response can be used to cause the system to be robust with respect to both stability and performance when the plant transfer function is subjected to bounded but unknown perturbations. The result may be evaluated in tenns of poles and zeros in the ~plane. The continuous controller is simply replaced with a digital equivalent computed b) using one of the techniques described in Chapter 6.212 Chapter 7 DesIgn Using Transform Techniques 7. M : and the steadystate error.2..1) (7.6/t" (7. The specifications on steadystate error to polynomial inputs is detennined by the error constant appropriate for the case at hand as described in Section 4. the central concerns of controller design are for good transient and steadystate response and for sufficient robustness. The ~transform is added to the Laplace and the Fourier transforms and poles and zeros have meaning relative to the unit circle rather than to the imaginary axis. by the plot of Fig.: the settling time. The splane expressions of these requirements are summarized by the following guidelines: The fact that in discrete systems the control is applied as a piecewise constant signal causes a roughness in the response that is directly related to the sample frequency. e. • A reasonable choice of T is one that results in at least 6 samples in the closedloop rise time and better. = "0/ K.: the percent overshoot. which apply equally well to discrete control as to continuous control. Mr' is given in terms of the damping ratio. For a singleloop system with unit:v'feedback'gain and forward transfer function D(s)C(s) as shown in Fig.1. the fiN method for digital design is based on emulation of a continuous design. t. Figure 7. the Nyquist stability criterion for discrete systems is developed and Bode's design methods for gain and phase margins are extended to discrete systems. the better the approximation to continuous control and the smaller the roughness. The most frequently used parameters are the rise time. velocity consta nt The velocity constant is then given by K I' =!i = limsD(s)C(s). or transient response to step. where K is the velocity constant. A specification on roughness leads to a specification on sample period.l1 =(J =I. At this point. systems that have zero steadystate error to a step input and finite error to a ramp input of slope "0 of size e . t. 4.7. let it suffice to point out that the smaller the T. Requirements on time response and robustness need to be expressed as constrainton splane pole and zero locations or on the shape of the frequency response in order to permit design in the transform domains.3) Chapter Overview design by emulation design by root locus design by frequency response Building on previous understanding of the design of continuous systems.7 which can be very crudely approximated by (7. Dynamic performance in the time domain is defined in terms of parameters of system response to a step in command input.1 System Specifications We first consider the design specifications that the controller is expected to achieve.' These t parameters.1. are discussed in Section 4.2.1 A unity feedback system r_~~ ~ + e u + Y . This parameter is so important to the design of discrete controls that Chapter II is devoted to the decision. the concept of system sensitivity i. impulse or other input. The most common case is for systems of Type 1.8/!. As reviewed in Chapter 2. e. 7.
after a sample period is selected.2. gain margin.. in effect. Sampling time to give at least 10 samples in a risetime Design a controller for this system using the method of emulation.2 Design by Emulation The elements of design by emulation have been covered already. Solution. A controller design is done as if the system is to be continuous and. This discrete controller may then be simulated and tested in the discrete control loop and modifications made. An alternative approach that considers directly the performance for the discrete controller in the feedback context has been described by Anderson (1992).. Substituting for T. • A typical robustness requirement is that one should have gain margin of two so that the loop gain must double from the design value before reaching the stability boundary.8 lOT 7./35. if necessary. (7. One can readily compare the system gain at the desired operating point and at the point(.2 Design by Emulation 215 • Example 7. 7. From the over>hoot requirement. ' • • Example 7. the sample rate. a discrete equivalent is computed and used in place of the continuous design.214 Chapter 7 Design Using Transform Techniques 7. Slower sampling can be nsed but one would expect the resulting transients to be excessively rough.ster than the natural frequency. w. The sampling frequency in radians/sec is given by w. w. we conclude that the damping ratio 7. Overshoot to a step input less than 16'7c 2. Control design by emulation is Figure 7. 1. we are interested in controllers for feedback control and in performance comparisons on the basis of time responses. = 2Jf / T and we a"ume th"t rise time and natural frequency are related by Eq.1 Discrete Equivalent Controllers Techniques to compute discrete equivalents are described in general terms in Chapter 6. Design oj Antenna Servo Controller A block diagram of the plant for an antenna angletracker is drawn in Fig. The transfer function is given by G(s) = 5(105 + I)' The specifications for this system are 1. Any of the techniques from Chapter 6 can be used for the purpose.2 Block diagram of the plant transfer function . Robustness is the property that the dynamic response (including stability of course) is satisfactory not only for the nominal plant transfer function used for the design but also for the entire class of transfer functions that express the uncertainty of the designer about the dynamic environment in which the real controller is expected to operate.01 rad 4. Solution. The method described in that reference leads to a multirate sampling problem of the sort which will be considered in Chapter II . A more comprehensive discussion of robustness will be given when design using frequency response is considered. here we illustrate the use of the polezero mapping equiYalent and explore the choice of sample period by example." should be 35 times fa.1 What is the r~lation between sampling frequency and system natural frequency if there sample~ in a rise time': ar~ III mainly a combination of these two ideas.11 so thaI W I1 = 1. the natural measure of robustness is. In this chapter. and in Chapter 6 the techniques of computing discrete equivalents are described. From the specifications one can estimate the acceptable region in the splane for the closed loop poles.2 From this example.8/f. we conclude that typically the sample frequency should be chosen to be 20 to 35 times the closed loop natural frequency. Continuous control design is reviewed in Chapter 2.2. For root locus design. Tracking error to a ramp input of slope 0.01 rad/sec to be less than 0. and their performance is illustrated on the basis of filter frequency responses. In other words. we find that or W" 'C w. Settling time to 19c to be less than 10 sec 3.) of onset of instability to determine how much gain change is acceptable.
.4 Root locus for compensated antenna model OJ =tl(np. 17. 7...:'="~.9802 =K 10. The natural frequency for the gilen pole location.3 Acceptable pole locations lor the antenna control 1. rlocus(sysol) ::I~I~~ 1. sysol. lead1 = tf(nc. I.5 = . D(.:>. = 1. Based on the limits on the damping ratio and the realpart of the poles.5 05 : . = e·I".5 J 0.:''.PI o OJ ·1 and place a zero at and a pole at 1'. de = [1 1].5. np = 1.A. The polezero mapping technique reguires that each singularity is mapped according to : = e' T: therefore. i. nc = [101]. has two firstorder factors: the zero is at s = 0.6/10 = 0.5 de gain 'c. To make the de gain of D(. the compensation as lead 1. sysol = lead1*ant. The locations of the roots with K = I corresponding to a velocity constant of K. From the sellling time requirement.L'J. given by Eq.46.2 will be used for this example and a value of T = 1.5 0 0. and the product as the open loop system.5 1. ant. Figure 7.0 illustrated later to dramatize the effects of the choice ofT.2). ::> ..0.. = 0.i.18. a first choice for controller might be lOs + I D(s)= .1.0. Using lead compensation to cancel a plant pole./10 = 0.):. Finally.0).1 lim DI~) = lim DCs) = \"+IJ I 2 I ~ 0.. from the steadystate error requirement.8187 .5 Real.. we conclude that the velocity constant is constrained to be K.dp). we take D(:) of the form D(:I = K _"_'_1 .216 Chapter 7 Design Usmg Transform Techniques 7.4). which corresponds to a rise time of r. 1. The compensation. dp=[10 1 0]..3. ant Figure 7.. I and Dis) be identical. we can sketch the acceptable region for closed· loop poles in the splane as done in Fig.2 Design by Emulation 217 must be ~ ::> 0. s+1 The root locus for this choice is drawn in Fig. and the pole is at s = I..4 using MATLAS commands to enter the plant as a system. we conclude that the roots must hale a real part of rr ::> 4..8187. we regoire that 1.J ~ 0 OJ 1. A vahle of T = 0.dc.:i:: = 1. 7. = I are marked by the dots computed by p = rlocus(sysol. essentially w" = 1.8 sec The indicated sampling period is thus T = 1.
. we first multiply lOp and bottom by c to obtain I ..15 ~ .8) + 9.15 (elk) .1 which can be restated as (l ..: _ I) ~ + . we can obtain the system difference equation and compute the step response. this evaluates to G(:) The ~lransform expression above is converted to the difference equation form by noting that ~I represents a Icycle delay.2.5. To analyze the behavior of this compensation.9802 ~1 )EU. In this case..._. ~ _ e.O. sysold = lead 1d * antd syscld = connect(sysold.. The transfer function is com'erted into a difference equation for implementation using the ideas developed in Chapter 4. A block diagram of the sampleddata system \vith discrete controller is given in Fig. • Example 7.. 7.0.I)' A~ a(. U(~) ~ . With the transfer function of the plantplushold and the discrete controller.. this can be computed in MATLAB as the discrete model of the antenna by  • antd = c2d(ant.. ~ S' CIS a s +a I _I_} . Figure 7. The figure confirms that the discrete controller will perform satisfactorilv.1.'matched') ~ which is I + .0. The steps are 7.15. As mentioned earlIer.9802e(k .2. Thus u(k) = 08187u(k .15 (I .9S02~1 D( c) = E(~) = 9..I]) step(syscld ).9934 =0.2 and a = 0. 7.0.3 Il1ll'kl1lt'/Hillg lite (11/1[I'L)1I0 O(z) G()=~12{.  Of course. we first determine the :transform of the continuous plant (Fig. This simulation was camed out using the linear. This equal ion can be directly evaluated by a computer.8187 r .I {T~ ~ (~.5 Block diagram of sampleddata system and the de'ign of the discrete equivalent compen'ation has the transfer function D(~) = 9..2 DeSign by Emulatton 219 Solving for K we have K = 9. 7...2) preceded by a zeroorder hold (ZOH).0.2 { : 1 a ~(s + a) }• (7. we find G(:) = Solution. the step response of the system with the discrete controller is shown in Fig.00199 (~ I )(.1)).2 Evaluation of the Design A description of a digital controller that is expected to satisfy the specifications for the antenna controller is now complete. with T = 0. 15 IO'.. albeit with somewhat increased overshoot. discrete model of the system.. 0980) . Specifically.uT +B a(~I)(~e aT)' where For this example. obviously most easily using a computer aided design package.. To compute this result in MATLAB.02). simulations can be embellished with the important noniinearities such as ffictlOn and WIth ~I G(:)= . the command IS '()H Olel: T I T I I lead 1d = c2d(leadl . 0. Using the tables in Appendix B.8187 ~I jU(:1 = 9.7) ."S187~ .6).._ ..6.I) : + 0. [1 .218 Chapter 7 DesIgn Using Transfonn Techniques 7. ~ } Give the difference equation that corre'ponds to the given by Eq.0.9802 ~0.~+! .1. J (7.
_~__. 'PM A plot of the step response of the resulting system is shown in Fig. Figure 7.':. 048 ~ + 09672 4 (~ _ 1)(. The designed phase margin in the continuous system is seen to be 51. As was indicated in Chapter 4.3679 (7.7 Step response of the 1Hz controller \' with di~('fe(C' controller y..8" .6:"t::0't 2:t.__.4 0'~'4.5 /ullO for discrete controller a "5 ~ 0.2 0.4 rather than 0.p = 0.8 ~ ~ 06 ~.. 7.~20 Time (sec) 0.23' = 28.___.6) but with T = I sec.10) i!: t 150 180 200 10. 0. Thus the effective phase margin with a sample and hold is reduced to Pm = 51.4 0. the sample and hold can be roughly approximated by a delay of T /2 sec. ~ . and with sampling at T = 0. computed with bode(sysol) and plotted in Fig. Figure 7.0. (7.9) G(~) = O. at T = 1.220 Chapter 7 Design Using Transfonn Techmques 72 Design by Emulation 221 Figure 7..5 / y \. so most of the extra overshoot is explained hy the samplehold delay.4 Antenna SUI'O >l1t11 Slow Sampling ~ 10.8". A partial explanation of the extra overshoot can be obtained by looking at the Bode plot of the continuous design. this corresponds only to r/J = w. 1 10" ~ Repeat the antenna design with a sample rate of 1 Hz (T = I sec). The step response shows the actual Mp = D..9048. the samplehold delay corresponds to ¢ = 23".'ith continuou. (7.8..6 Step response of the 5 Hz controller 1. h '2 .7) with T = I sec results in 10\ 10" 10 1 ·50 (7.0.p T = 4S .8 rad.____r. With this small phase margin.. we obtain '3 " " ~ ~ 100 D(~) = 6.64 ~ .16 a.0 1.s designed. the effective damping I()IJ 10' I radJ~ec) ratio is about 0. discrel~ control 1. Repeating the calculations as in Eq. 7.____r____.29 amI the O'ershool is expected to be about D. controller "":i 0...2. _ 0.8 Bode plot of the continuous design for the antenna control 10' ~ 10(1 + Example 7. in this case the sample rate is approximately IwO samples per rise time. + .5 0 6 10 Time b~Cl 12 14 16 18 20 computation delays in order to assess their effects in addition to the effect of the discretization approximations. Solution.7 and shows substantial degradation of the response as a result of the slow sampling. At the crossover frequency of w.2 8 o = " o 0.9048) Furthermore.8" . However.5. 1 W .4:1':6~18:.4 ..0. repeating the calculations that led to Eq.
Here we now turn to consider the direct discrete design methods.0~.5. plotting i'. in this case a polynomial in . In linear discrete systems also the dynamic performance is largely determined by the roots of the closedloop characteristic polynomial.1 from 0.:plane as II = WI T where (0 = / I . • Mark the region of acceptable closedloop pole locations on the plane. lines of constant damping map into logarithmic spirals in the :plane. to get the specifications on acceptable pole locations in the zplane • Estimate the desired wn ' i'. d " Sett Img time is found to be inversely proportional to the magnitude of the real part of a pole in the splane (a) which maps to the radius of the pole in the :plane as r = e'aT. The command axis equal will cause the unit circle to be plotted as a circle and the command axis([1 1 0 1Dwill cause only the upper half of the circle to be plottecl. With these guidelines.9 31T15T 71T/IOT 7.8 . The step response overshoot varies inversely with the damping I In the :\1ATLAB Control Toolbox funclion c2d. (7.0:.2 0.3 Direct Design by Root Locus in the zPlane The root locus introduced by W. getting acceptable pole location in the zplane ratio..:plane. In summary.0. Under the stoz mapping. . Other than this modification. one can readily estimate the dynamic response parameters based on the polezero pattern for simple transfer functions and can derive useful guidelines for design of more complex systems. the other algorithm~ for discrete equivalent design can be tried. we have seen that rise time of a continuous secondorder system is found to be inversely proportional to natural frequency as given by Eq. the required performance specifications and the practical constraints introduced by the technology to be used for implementation to guide the final choice.5.4 ·0. in steps of 0. 7. The most common root locus is a plot of the roots of a closedloop characteristic polynomial in the splane as the loop gain is varied from a to 00.6 41T15T o 0. For example. ILl.9.26 is a map of the unit disk in the . The consequences for direct digital design are that one can use Evans' root locus rules unchanged.: with stability represented by having all roots inside the unit circle. These include the very simple Euler rectangular rules..:plane.9 and wn = N If /l OT for integer N from I to 10. the natural frequency in s maps to the angle of the pole in polar coordinates in the . Figure 7.1).6 0. the triangle hold is called a firstorder hold in recognition of th~ fu.wn • • Compute the radius r = eaT • 7.=:::=. An example is shown in Fig. • Obtain a plot of the zplane showing lines of fixed damping and wn ' The MATLAB command zgrid will do this. lines of constant damping and natural frequency in the zplane 0.' There does not seem to be a dominant technique that is best for every case.:===. Since poles in the splane are mapped to : = e'T.2 w . These can be used to make the translation of dynamic response performance specifications to a region of acceptable pole locations. The triangle hold equivalent appears to be especially promising. and the several holdequivalent methods.:t that it i~ a firstorder hold although it is nUl/causal.:plane on which is superimposed discrete system time responses that correspond to several typical :plane pole locations. beginning with design by USE' of the root locus in the . The designer needs to explore alternatives based on the particular system.8 0.222 Chapler 7 Design Usmg Transform Techniques 7.i'. Compute (Y = i:.J' . and M p from the continuoustime response specifications. · . Evans is based on graphical rules for plotting the roots of a polynomial as a parameter is varied.3.1 to 0.3 Direct Design by Rooi Locus in the zPlane 223 The examples presented here illustrate only a small selection of the alternatives for design by emulation.1 zPlane Specifications Figure 4. An immediate improvement would be expected if the continuous design were to include at the outset the characteristic T /2 delay of the sample and zeroorder hold. the bilinear transformations. but that the performance iipecifications must first be translated into the .
K p ' of the Type 0 system in discrete time if the limit in Eq. and the realparts of the roots are to be greater than 0. is.I 1+ D(z)G(z) 1 1+ D(l)G(1) G(::) = (l  z')Z {G~S)}.ll) The closedloop system can now be represented in a purely discrete manner.0.5.4 = lim ..::) E(z) = 1 + D(z)G(z) .115) . .5r = 0. combined as before according to Fig. 7.12) is zero.5. if the closed loop system is stable with all roots of 1 + DG = 0 inside the unit circle. then the error given by Eq. (4.::.10..12) is finite.0~..< 0" . The last requirement means that the roots in the ~plane must be inside a circle of radius r <: eU. The discrete transfer function of the plant is given by The final value of e(k). With the requirement that the roots correspond to a natural frequency greater than w" = I.8 ILl::0':. and the plant..224 Chapter 7 Design Using Transform Techniques 7.2.10 Plot of acceptable pole locations in the zplane 08 0.1). D(z).. The given specifications are that the system is to have a damping ratio of ~ :::: OS natural frequency of w" :::: I.1 1 + D(z)G(z)' discrete time final value The specification of steadystate error also follows the continuous case but transferred to the .1)(1 + DG) L 1 Tz 0.64.... where it is now understood that the reference r and the disturbance ware sampled versions of their continuous counterparts.1)(1 K = I1m ':1 + D(z)G(z») Tz .2 0..~./Jr = 2/Jr :. suppose the input r is a step. The curve. 7..). .5. except that now we use D(z) and G(z).1). The transform of the error is computed using the same blockdiagram reduction tools that apply for continuous systems represented by their Laplace transforms. (7. ~ 0 '". and the disturbance w is zero. ~ ~ eeoc) = lim(z . r (k) = I (k).. . we need a plot on the standard grid corresponding to N = IOTw. by Eq.. D(I)G(1) is the position error constant. Doing this yields the tran.§0.form of the error R(. (7. The discrete transfer functions of the controller.:::::'=:==:::::.I (z . 1 eeoc) = lim(..13) 0.5 ZPlane SpecifIcations Indicate on a ~plane map the region of acceptable closedloop poles for the antenna design of Example 7. are I 1+ Kp ' discrete system type (7. Then we have a Type 1 system and we can compute the error to a unit ramp input.6 K.:: . (:: . (7.12) Figure 7. Solution. Suppose there is a single pole at z = 1. (7..:: 1 • z .6 Thus. G(z)..5. corresponding to these criteria are marked in Fig.. If DG has a pole at Z = 1.9048. Proceeding as we did for the continuous system.. The standard grid of the ~plane shows the curve corresponding to ~ = 0.3 Direct Design by Root Locus in the zPlane 225 • Example 7. r(kT) = kT1(kT) as Tz E(z) = (z _ 1)2 1 + D(z)G(z) T' 1 1 Now the steadystate error is .::plane when the controller is implemented in a computer and represented by its discrete transfer function D(::)..1)~<'c=cc c' z .1 + DG . 7.J Thus the velocity constant of a Type 1 discrete system with unity feedback (as shown in Fig.5) is · (z .
In K .H(z» = K.2. therefore (omining a factor of z in the numerator.1) H(z». (7. (7.=hm TK v . can be increased and the errors decreased by zeros close to z = 1.14) that K. 7.. the limit in Eq.226 Chapter 7 Design Using Transform Techniques 7. at z= l. and that H(z) has poles Pi and zeros Zi' Then we can write (7. (7. this proportionality will be approximately correct. (7.:1 TZ · Because ofEq. 7. Discrete Case Because systems of Type I occur frequently. dz However.. J Furthermore. we have did d In H(z) = H(z) = H(z). which makes no difference in the result) . for the continuous case. From the results of Chapter 4 on dynamic response.= hm =:=:c:TK. and so we can use L'H6pital's rule (7. The implication is that the mechanics of drawing the root loci are exactly the same in the ~plane as in the splane: the rules for the locus to be on the real axis.I .I)D(Z)G(Z) I1m . for asymptote construction. . which implies that the steadystate error of this system to a step is zcro and requires that H(I)=1.= I TK. ~ Pi .. by Truxal (1955). K.17) is indeterminate.) = O.~l I .L z ~ :.16).18) is that this is exactly the same equation as that found for the splane root locus.) } = hm...diagram analysis.. Thus is expressed one of the classic tradeoff situations: We must balance small steadystate errors against good transient response.3 Direct Design by Root Locus In the zPlane 227 which simplifies to K t' = (z . it is useful to observe that the value of K. Th~ reason is that the transfer function of G(z) computed from Eq.18) z.2 The Discrete Root Locus to and the final value of this error is given by eeoc) = ~~(z  I) (z ~"1)2 (I T' .L~' /I 1=1 r r=1 .)G(:..14) I .. by definition we can express the error to a ramp as Eel) R(z)(l .(I  We note especially that the farther the poles of the closedloop system are from z = I.17) The significant thing about Eq. (7.. this is not the case if comparing for the same G(s). The result of this proportionality is that the dc gain of a continuous plant alone preceded by a ZOH is essentially the same as that of the continuous plant.z. .H(z» . For systems with a finite K. the characteristic equation of the singleloop system is 1+ D(:. is inversely proportional to the sample period. (7. From Fig. (7. is fixed by the closedloop poles and zeros by a relation given." :~l dz n(zp. :~l Although it appears from Eq.p.5 and block. as can be seen by using Eq. This proportionality is exact for the very simple case where G(s) = Ijs. Similarly.11) is typically proportional to the sample period. we recall that a zero close to :.) = lim :~l = ~ {"In(z dz ~ II :. I The root locus is the locus of points where roots of a characteristic equation can be found as some real parameter varies from zero to large values. and fast sample rates. (djdz)(I ."In(:. the larger the velocity constant and the smaller the errors. Suppose the overall transfer function Y j R is H(z). d { n (z .\ } 1 1 =L IJ] .) ~ + In K} !~~ {L :.3.16) again. and .. 1.H(z) (7.. (7.16) ..15) Now suppose that H(z) is the closedloop transfer function that results from a Type I system. Tz (z .. limlnH(z) :~l dz d *Truxal's Rule. :~l (djdz)(zI) = lim {_ dH(::J}..) .11) and inspecting Entry 4 in Appendix B.H(z» . note that by using Eq. (7. dz H dz dz so that .. = 1 usually yields large overshoot and poor dynamic response.
A compensation that achieves the desired result is = !.1\1$ radius of the roots never gets Ie" than 0.14)]. with two poles and one zero. '" 1 applies in either plane but is computed by Eq. preventing the'..5. As mentioned earlier.9672) and breaking away from the real axis between the two real poles. The root locus for Eq. The root locus for this control versus the gain K [K was equal to 6. and the overshoot requires that the roots are inside the ~ = 0. From the root locus of the uncompensated system (Fig. 10). K can be found by solving the characteristic equation I + 0.19) : = ptar. (7. 7. using the discrete root Solution. further iteration is required to improve the damping and to prevent the real root from slowing down the response.'. but there is an additional real root at ~ = 0. After some trial and errDr. 7. which may degrade the actual response from that expected if it were a secondorder system. (7.lfwe transform the specifications to the zplane we compute that the " specification requires that the roots be inside the radius Oj r = e= 0.5 spiral.228 Chapter 7 DesIgn Using Transform Techniques 7. If the controller consisted simply of a proportional gain I D(.6.6 Discreec ROOf Lows DeSign Design the antenna system for the slow sampling ca5e with T locus.10)] computed with rlocus(sysold) is also sketched in Fig. The fact that all requirements seem to be met is encouraging. The Figure 7. Therefore.n meets the required :plane constraints for the complex roots and has a K.. The only way to raise K" and to meet the requirements for damping and settling time is to move the zerO to the left also. • Example 7.64) and marked by dots.0. as can be verified by using Eq. 0. The actual time history' is shown in Fig. 7. More lead is obtained in the . p. the locus of roots versu. We can see that a damping ratio of about 0. = 0.19) is shown in Fig. After a few trials. we see that ° D(~) = 6 : _ 0. and the same holds true in the ~plane.61. :s 10 sec. (7. = 1. The result computed by rlocus(antd) is shown in Fig. Therefore.:~ :: 'w". ( 7. as we have previously seen from the step response of Fig. 7. and the roots corresponding to K = 6 are marked by squares.80 0. let's keep the zero where it is (canceling the plant pole) and move the compensation pole to the left until the roots and K.09(48) _ 0 for many values of K.12(a)..3679. The requirement that K..l z"'t'T.e loci of root~ OfCOrHLml 5 t and L<. K" would lower the damping ratio still further. The problem with the emulationbased design is that the damping is too low at the mandated gain.0. : + 05 0. It shows that the overshoot is 299< and the settling time is 15 sec. 0. It is therefore clear that this choice of compensation pole and zero cannot meet the specifications.11 as the dashed arc marked (a). The system goe5 unstable at K ~ 19 [where K. the difference lies in the interpretation of the results because the pole locations in the :plane mean different things than pole locations in the splane when we come to interpret system stability and dynamic response. = 1 sec. specification from being met. but then the criterion of steadystate error would be violated.88.14) for the ~plane. does result in the specified value of K.20) .95.92.9672 I )(z . I = K]. 7. = I because this criterion was used in arriving at Eq. A bener choice of compensation can be expected if we transform the specifications into the ~plane and select the compensation so that the closed loop roots meet tho'e values.91. (7 10) [":. a situation that is typically remedied by adding more lead in the compensation. 7. This gain.12(b). 0.64 in Eq. It is typically advantageous to use the design obtained using emulation and 10 modify it using discrete design methods so that it is acceptable. T = samrlin~ D(~) = 13 ~ . for a first try.8.26. are acceptable. where K = 6. The exact discrete model of the plant plus hold is given by the G(e) in Eq.7.3 Direct Design by Root Locus til the zPlane 229 for arrival/departure angles are all unchanged from those developed for the splane and reviewed in Chapter 2. The locus shows that increasing the gain. however. the gain K" is not sufficiently high to meet the criterion for steadystate error.74 and a zero at ~ = 0. If we cancel the plant pole at 0.11 Root loci for antenna design: (a) Uncompensated system.10).9048 with a zero and add a pole at 0.1Ila)) it is clear that some dynamic compensation is required if we are to get satisfactory response from this system. and~ '" O. we find that there is no pole location that satisfies all the requirements! Although moving the pole to the left of ~ ~ will produce acceptable :plane pole locations./I~ peno<.05 ~ .64 are computed with p = rlocus(sysold. From study of the root locus we should remember that this locus. is a circle centered at the zero (z = 0.11 as the solid curve (b). (b) Locus with D(z) having the poles and zeros of Eq. The points.2 is to be expected.Iplane by increasing the separation between the compensation's pole and zero. which means that there is no stable value of gain that meets the steadystate error specification with this compensation. The original specifications were K" '" I. Better damping could be achieved by decreasing the gain. we are using the lead compensation of Eq.0484K (z  =+ 0.
In the control implementation example in Table 3. :.I3(b).as carried oUl by computing it at a much higher sample rate than the digital controller.4_2. 7. I 0 r I I • ~ c l U . the results can be serious as can be seen by an analysis using the root locus.3.'stem would appear to hme yef)' good response.8) 17.4. (7. The designer can usually determine the expected delay and account for it in the design.230 Chapter 7 Design Csing Transform Techmques 7.13(a) and the time response for K = 13 in Fig. consider the compemation D(~I = 9(~ 0.::. 1/. however.8). had been determined. the computed output time histories have assumed that the control.. 7. or the frequency response. 7. has large oscillations with a damping and frequency consistent with the negatlYe real root. So we see that a compensation pole in a lightly damped location on the negative real axis could lead to a poorly damped syslem pole and undesirable performance . 7. was available from the computer at the sample instant.1. All roOls are real with one root at : = 0. r ! 0 4 6 10 12 14 16 t8 20 Time (sec) (b) In the design examples to this point. .3 Direct DesIgn by Root Locus in the zPlane 231 Figure 7.ote that if only the output at the . Although the real root is slower than the previous design. and K. has been written to do these calculations. however. placement of poles on the negative real axis . and has K = 1. The computation of the intersample behavior ". u(kl.20) is on the negative real ~plane axis. (~+ 0. The :'>1ATL.. The root locus for all K"s is shown in Fig.19) (a) root locus. t\VO poles will be added to the :plane origin. included in the Digital Control Toolbox.12 Antenna design with D(z) given by Eq. Its effect on performance can be evaluated precisely using the transform analysis of Section 4.13. it is very close to a zero that attenuates its contribution to the response. comes ." . no adverse effects resulted because all root.\ roob substantia]]y exceed the specified limits.. taking care that the control "alue was constant throughout the controller sample period. in a real system this is not always true. = 1.B function ripple.14.9:0 0 1 . However.ample point. In this case.21) (al The root locus versus K and the step response are shown in Fig. This design uses much more control effort than that shown in Fig. Note that the pole of Eq.04. were in \vdldamped locations.59.2 and represents a damped sinusDid with frequency of 0))2. This time delay is called latency and usually can be kept to a small fraction of the sample period with good programming and computer design. . If there is a delay of two cycles. the .hould be donc with some caution. However. This will result in an additional pole at the origin of the :plane.1 +. (b) step response The damping and radius of the comple. we see that some time must pass between the sample of Y(k) and the output of u(k) for the computer to calculate the value of II (k). Bm this negativc real axis roDt has ~ = 0. 0. This indicates that there are "hidden oscillations" or "intersample ripple" in the output that are only apparent by computing the continuous plant output between sample points as is donc in Fig. In general. the statespace analysis of Section 4. and so on." . The output has very low ovef'hoot. 7. a fact that is usually very undesirable. Because a onecycle delay has a :ttansform of :1.ef) close to meeting the settling time specification. As an example of what could happen. the control.. the effect of a fullcycle delay can be analyzed by adding :1 to the numerator of the controller representation. if not taken into account.
(b) step response l.4 0.2 0.6 (a) ).14 Antenna design with D{z) given by Eq (721) (a) root locus.8 ~0.4 0.:~"'+_""""1:::::c.2 0. (7.+iL.8 1. 1 Uu 6 10 12 i i~· o (b) Time (sec) (b) 14 16 18 20 Time (sec) .6 0.4 0.6 0. .13 Antenna design with D(z) given by Eq.0 0.2 (al 0.8 0.3 Direct Design by Root Locus in the zPbne 233 Figure 7.0 0.0 0.ofl.20): (a) root locus.0 ~0. (b) step response Imagz Figure 7.++__+__i 1.2 0.6 0.0 Real z .232 Chapeer 7 Design Csmg Transform Techniques 7.
3. or gain changes of a compensator on the speed of response (which is proportional to the crossover frequency) can be quickly and easily determined using the gain curve alone. (b) step response z ./ i \ \.221 The root locus and time response are shown in Fig. has been reviewed in Chapter 2 and the idea of discrete frequency responses has hi \ \. mainly Kp or K". (7. \ Y  oj ' . (7. Use of the frequency response in the design of continuous system. 1. can be read directly from the lowfrequency asymptote of the gain plot. Nyquist's stability criterion can be applied. The corrections to the gain and phase curves (and thus the corrections in the gain and phase margins) introduced by a trial pole or zero of a compensator can be quickly and easily computed.15. 7. The severity of the onecycle delay is due 10 the fact that this controller j.21) and plot the resulting root locus and step response.22): (a) root locus. 4. \ o (bl 14 '6 18 20 .88 13.0 Real z 7. which are both substantially changed from the sanne controller without the delay as shown in Fig.15 Onecycledelayantenna design With D(z) given by EQ.l .0.0 0. 2. The system error constants. If a physical realization of the system is available. zero. which are easily seen on the plot of log gain and phaseversuslog frequency.4 0. z(z + 0.13. and dynamic response specifications can be readily interpreted in terms of gain and phase margins.8 1.4 Frequ~nc)" Response \'lethods 235 • Example 7.7 Effect of Unexpected Dc/ay Add one cycle delay to the compensation of Eq. • 0. operating at a very slow sample rate (six times the closed loop bandwidth). The only difference is the new pole at z = D.6 0.5) 0. The new controller representation is D(z) = Figure 7. This sensitivity 10 delays is one of many reasons why one would prefer to avoid sampling at this slow a rate . The gain and phase curves for a rational transfer function can be easily plotted by hand.234 Chapter 7 Design Using Transform Techniques 7.2 0. the frequency response can be measured experimentally without the necessity of having a mathematical model at all. The effect of pole. 7.i" \ 1_I~~\ ) 4 10 Time (sec) 12 . 5. using the gain curve alone. Their attractiveness for design of continuous linear feedback systems depends on several ideas.4 Frequency Response Methods The frequency response methods for conlinuous control system design were developed from the original work of Bode (1945) on feedbackamplifier techniqueI'. Solution. 6.
.LW'::'::'''.... The approximation to the discrete phase lag given by (~1)(:0...1 Frequency (rad/sec) • Example 7.. + I) :r 80~~~~m 130 i180 280 L_. are accomplished by letting z take on values around the unit circle.. but plots of the magnitude and phase of a discrete transfer function. magnitude phase ..c .2 (b) Frequency (rad/sec) sampling with a zero order hold at T = 0... n. (7...2) with transfer functions a loglog plot does not apply. We begin with the discrete form of the Nyquist stability criterion and follow with a discussion of specifications ._~''~. and 4 are essentially unchanged. H(z)..') • Nyquist stability criterion It is clear that the curves for the discrete systems are nearly coincident with the continuous plot for low frequencies but deviate substantially as the frequency approaches 11: / T in each case. .i. The primary effect of sampling is to caWie an additional phase lag..11(: . which corresponds to frequencies up to l/4 the sample rate.[l 1 0]) sysd1 =c2d(sysc...."" """ . 1) sysd3=c2d(sysc.T.16 Frequency responses of continuous and discrete transfer functions 10' 10 1 .•• ..:':! 10. 40 IH(zll"'. The discrete transfer functions for the specified sampling periods are computed with c2d.m as sysc = tf([ 1].13) (~_ 1)(: _ 0. .t:) = 0..s(.. if 230 Solution.24) are plotted in Fig... ~ H (..: .. and 6 above are less true for discrete frequencyresponse design using the . The concepts are the same as for continuous system.2..523 G 3 (:) = 1. response.. tlljJ. one can obtain a good estimate of the phase margin if a sample and hold is introduced into a continuous design by simply subtracting the factor wT /2 from the phase of the continuous design's phase margin. points 2.+ J 100 lO' I .T...... the amplitude plots do not approach the simple asymptotes used in the handplotting procedures developed by Bode.8 Discrete Bode Plot Plot the discrete frequency response corresponding to the plant transfer function I G(s)= .'''. sysd1. .. In particular..718 Ic .368 =+ 0.'.241 The frequency responses ofEg. With some care in the interpretations however."". 3.' '.:transform than they are for continuous systems and we are more dependent on computer aids in the discrete case..'''! 10· 10.•. : .' '.. The inability to use the standard plotting guidelines detracts from the ease with which a designer can predict the effect of pole and zero changes on the frequency response.:: ...2 sec M =  wT 2 (725) G.. . :: ~ 20 ....16 using the bode(sysc. .0187 ~+ 0.231 and Eg. and his theorem relating the phase to the derivative of the magnitude curve on is also shown and demonstrates the accuracy of this approximation for sample rates up to wT = IT /2..135) statement for T = 1 sec for T = 2 sec . . I. ~. All these points will be discussed further in this chapter as they pertain to design using the discrete frequency response. "'" .' ..i.y" ~"T:  ~ .i..."''. and 2 seconds and compare with the continuo".. z = el'"T . that is.". Crossover frequencies (where magnitude = Jl for designs will almost always be lower than J14 the sample rate: therefore. between the continuous case and the discrete cases. 7. In order to apply these concepts to the design of digital controls.. ' i . the basic results on stability and performance must be translated to the discrete domain. (7.sysd2..17 shows this additional phase lag by plotting the phase difference.. Figure 7. Fig... 7.236 Chapter 7 Design Using Transform Techniques 7...02) sysd2 = c2d(sysc.... Therefore.0368) _ : + 0. .' I"" " o 20 40 10 1 dB 10" •• 10" 10.9355 for T = 0. .....8187) GU I = 0.::) le•. points 1..2 (a) : ....sysd3.4 Frequency Response :'kthods 237 been introduced in Chapter 4. .'...<. 5."..
roT (rad) b of performance and slability robustness as expressed in the frequency domain before we introduce the design techniques directly.. thezplane 0<. (b) In Imag .18 Contours used for Nyquist stability criterion: (a) In the splane.=~d.gh is taken to be high enough that it is known that the magnitude is much less than I for all higher 0.18(aj. 0. <Joe (portion used for open loop freq uency response evaluation) 1 sec Real' 20 to 3.. = fr~~h the unstable region~ the map of this small semicircle is done analytically by letting s = rJ'i> for r « I..5 Normalized frequency.. is small enough to allow the lowfrequency behavior to be decided (usually the gain is very high at WI"" and the phase is approaching a fixed multiple of 90').. 7.. the Nyquist stability criterion seeks to deterrnim: whether there are any zeros of the closedloop characteristic equation 1+ K D(s)G(s) = 0 (7.:~~~: 0.5 ° 0.. the plot is to be made for (u I "" ::: W ::: W. (7..1 Nyquist Stability Criterion For conrinuous systems. 7. The entire contour evaluation is fixed by examining K D(s)G(~') over s = jw for 0::: W <::xl.18(a) shows the full D contour and the portion of the contour for W < W < w. 0 . . For experimental data..5 frequencies.___~. which is the frequencyresponse evaluation of the openloop system.17 Phase lag due sampling to 9Or~~....4 Frequency Response Methods 239 Figure 7..238 Chapter 7 Design l:sing Transform Techniques 7.'} s rjJ S '}.:. .h' where w.26) in the right halfplane.. The method establishes stability by determining the excess of zeros over poles of the characteristic equation in the righthalf plane by plotting K D(s)G(s) for s along the D contour that encloses the entire righthand side (unstable region) of the splane as sketched in Fig. 80 figure 7. Fig. It is assumed that the designer knoH's the number of (unstable) poles that are inside the contour and from the plot can then determine the number of zeros of Eq. The indentation near W = 0 excludes the (known) poles of K DG~t..8 1 (b) I L~~~:e:==_.""".4..8 7. and where Wh.26) in the unstable region that is the same as the number of closedloop system unstable poles.
:n the characterlstic equation tS written a" I T K DC. P. to keep Evaluate the stability of the unity feedback discrete 'ystem with the plant tran.)Ci:. (7. (7. The proof of this criterion relies on Cauchy's principle of the argument and is given in most introductory textbooks on continuous comrol systems.. Points for the plot can be conveniently taken from a discrete Bode plot of K DC. This is a counterclockwise path around the unit circle. In summary.28) reveals that the (possibly unknown) total number of stable plus unstable poles. For unstable openloop systems.28).26) (that are unstable closedloop poleS). \"'e can plol only DC and count encirdemenb of DC = and thus easily con~ider the effecu. = • From all of this. Z. In this case. 7. (7.P in Eq. the splane vector angle also goes through 360. P. For the discrete case. The elementary interpretation is based on the following points: • If we take values of s on a contour in the splane that encloses the unstable region.18(b) will encircle the origin N times where N = {number of stable zeros} . The characteristic equation of the discrete system is written as 1+ K D(~)G(:.)C(:.but the eomribution to the image angle is a negative 360 . N. of unstable poles of K DC. the image contour will encircle the origin in the same direction. P + N.).e distinguished.271 (7.terns is Z where • Z = the number of unstable zeros of Eq.29) • Thus the lleT number of samedirection encirclements. Eq. the image contour will encircle the origin in the opposiTe direction.N.)C(:.fer function 3 Vlh(. as in the continuous case. of unstable poles of K D(z)C(:. t 1 GiS) = s (s + I) .N.{number of stable poles) = {II .9 ]\'yqtdSI Stability h 1':> much easier to remember samedirection and oppositedirection encirclements than and countercl(xkwi:. of K On stabitity and ~tability margins. • Compute Z = P .28). (7. the discrete Nyquist stability criterion is (7. Therefore. For stability.Z and the number of stable poles is 11 . (7. The system is stable if and only if Z = O. the Nyquist stability criterion for discrete systems is Z = P .Z) . shown in Fig 7. Example 7. • If the splane contour encircles a :. the angle of the vector from the zero to s on the contour goes through 360 .P. of unstable zeros of Eq. we can plot the corresponding values of the function 1 + K D(s)C(s) in an image plane. (7. Examination of Eq.4 Frequency Response l\lethods 241 The specific statement of the Nyquist stability criterion for continuous sy. (7.). • Plot K D(:. the closedloop system is stable if and only if the contour evaluation encircles the I point counter to the s direction as many times as there are unstable openloop poles (N = . l • The origin of the I + K DC plane is the same as the point K DC = I so we can plot K DC and count N as the encirclements of the I point just as welL' • clock\\'i~e • Determine the number.) for the:. • If the splane contour encircles a pole of I + K DC. equals the difference N = Z _ P.30) . contour of Fig. Z = O. Usually s is taken clockwise around D and therefore clockwise encirclements are taken as positive. The problem can be avoided by the simple device of considering the encirclement of the stable region and calculating the stability result from that. (7. In the splane. the ideas are identical: the only difference is that the unstable region of the zplane is the OUTside of the unit circle and it is awkward to visualize a contour that encloses this region. P = the number of unstable (openloop) poles of K D(s)C(s). • Set N equal to the net number of counterclockwise (same direction) encirclements of the point Ion the plot. = eJ.28) and. :.240 ChJpter 7 Design lsing TrJnsform Techniques 7. Thus the number of stable zeros is n . the map of I + K D(:.J = O.27) follows immediately. is the same as the total number of zeros of Eq. it is assumed that the number.27».r and 0 :'0 wT :'0 2n. • N = the net number of encirclements of the 1 point for the contour evaluation of KD(s)C(s) in the same direcTion as that taken by s along D a. 11.ero of I + K DC in a certain direction. is known and we wish to determine the number.P) = PZ.18(a).) for the unit circle.{Il . which are the unstable closedloop poles. For the common case of a stable openloop system (P = 0) the closedloop system is stable if and only if the contour evaluation of K D(s)C(s) does not encircle the I point. which are also unstable poles of I + K D(:.. Following the mapping result used by Nyquist.
we conclude that the closedloop system will be stable as plotted for K = I.16.8.1. Note that all the necessary information to determine stability is contained in the Bode plot information from Fig.19. The discrete transfer function at the specified sampling rate and ZOH is given hI' sysd3 of Example 7.0012 I.I :" ¢ :" I' Because this system is openloop stable and there are no . 7. 1.f2}. If the Nyquist plot is multiplied by 1. it has been observed that the phase margin. the higher sample rate here causes the magnitude to be e>sentially zero at wT =!T. 7. Gain and phase margins are defined so as to provide a twopoint measure of how close the Nyquist plot is to encircling the I point. .10 SWbrlitl'Ma.a is the analytically drawn map of the small semicircle about z = ] drawn by letting (z .19. ~ 02. and the section from c > d > e is the same information reflected about the real axis. Using the data from Fig. there are no I point eneirclemenb if K = I as ploned IN = 0). Thus the gain margin is G M = IX For values of K > 1.. 7.9 e I I I \ \ ~ . (7. The plot is marked with corresponding points from Fig.I)(z .8 with transfer function G(:) = 7. the I point lies withm the contour thus creating two encirclements IN = 2) and two unstable closedloop poles (Z = 21. The large semicircle from e .5 which had a .523) .I point encirclements.135(: + 0. 7. . so the phase margin is t8 Figure 7.0.16 for 0 S wT:: JT.: ~ 0 I 2 3 4 phase margin and damping ratio 4 For continuous systems. The discrete transfer functiun is given by • G(z) = 0.21. then the plot will go through the I point. The discrete Bode plot is given in Fig. and since there are no unstable poles \ P = 0). The PM is a measure of how much additional phase lag or time delay can be tolerated in the loop before instability results. The plot is very similar to what would re~ult for a cOlllinuolis controller.31) for r « I and . the angle of the plot when the gain is 1 is 18 from the negati\'e axis. Gain margin (GM) is the factor by which the gain can be increased before causing the system to go unstable. the plot of K D(z)G(z) can be drawn a.. i:. and hence the ~yquist plot goes almost to the origin.4. ju~t a~ in the continuous case... b . which determines the ponion from a > c in Fig. . 7. shown in Fig. 7.381(. (. + Frequency Response Met hods 243 with sampling at the rate of I /2 Hz or T = 2 and zeroorder hold.. Note that the portion from a > b > c is directly from Fig.16. As indicated on the plot. phase margin • Example 7.18(b) to facilitate undcrstanding the results.1Hz 0.2 Design Specifications in the Frequency Domain Gain and Phase Margins The Nyquist plot shows the number of encirclemenb and thus the stability of the closedloop system. (: . and they are identical to the definitions developed for continuous systems.16 for T = 2. Cnlike Example 13. for a secondorder system by the approximate 3 4 .19 Nyquist plot of Example 7. The controller is proponional discrete feedback [K D(:) = K]. 1 sis + 1) wilh ZOH and sample rale of 5 Hz. The phase margin (PM) is the difference between ISO and the phase of D(:)G(:) when its amplitude is I. PM.8187) What are the gain and phase margins when in a loop with proportional discrete feedback WU = K = I)" Solution.20 and the ponion of the l\yquist plot representing the frequency response in the vicinit)' of I is ploned in Fig.311 9ain margin and the plot of magnitude and phase of G(:) for: = e)Wr is included in Fig.135) (7. the plot can be made by the statements nyqUlst(sysd3) axis equal grid The axis statement sets the x and y axes to have equal increments. 7.ery slow sample rate. Furthennore. is related to the damping ratio. and is usually the inverse of the magnitude of D(: )G(:) when its phase is ISO. 7.gim Consider the upenIoop transfer function GlSI=. Solution. the system will be stable at this gain (Z = 0).242 Chapter 7 Design Using Transform Techniques T.8.1) = rei<P in Eq. 7. Using MATLAB.
5 I5 0 Real Axis A ztransform analysis of this system resulted in .. = 6 x Oln) . of the resulting splane roots are plotted in the figure.22 Damping ratio of a secondorder system versus phase margin (PM) / 0._••.... This relationship is examined in Fig..Of. 7. the relationship between.80.. relation.. s(s I) .~~_. Figure 7.5 ~ n.:.5 . :::.: PM/ 100 is equally valid for continuous and discrete systems with reasonably fast sampling. 7.5 L.: PM/IOO..=5:'0:C.\ I . :::.22 was generated by evaluating the damping ratio of the closedloop system Tracking Error in Terms of the Sensitivity Function The gain and phase margins give useful information about the relative stability of nominal systems but can be very misleading as guides to the design of realistic . which represent 6 and 30 times the openloop system pole at I rad/sec. 1 + .90.:::plane roots that were then transformed back to the splane via the inverse of.I.. and PM in the figure shows that the approximation of 1. For higherorder systems..:.c_':]_0c:.244 Chapter 7 Design Using Transform Techniques 74 Frequency Response t>.22 is that the PM from a discrete zplane frequency response analysis carries essentially the same implications about the damping ratio of the closedloop system as it does for continuous systems.T = 0.5 .~~...20 Gain and phase margins on a Bode plot for Example 7.. = 30 x Oln) .: = e·'T. As the feedback gain was varied.lethods 245 Figure 7. the damping of the individual modes needs to be determined using other methods. .. The actual sample rates used in the figure are I Hz and 5 Hz..=5:.~~~_1 Figure 7. The conclusion to be drawn from Pig.10 10" f~~=:""""'___.21 Gain Clnd phase margins on a Nyquist plot for Example 7.10 I.t7'f"=++.T = ] sec (Cll.~ . The.. 7. For secondorder systems without zeros.2 sec (Cll._f___.22 for the continuous case and for discrete systems with two values of the sample rate. .7continuous . .22. that resulted when discrete proportional feedback was used with the openloop system G(s)=."1.ec) 10 1 30 50 Phase margin (degrees) 60 70 80 Figure 7.. 200 250 10" w (radJ. I 100 150 PM~_. 0. the damping ratio and phase margin were related as shown in Fig.
4 Frequency Response Methods 247 control problems. A more accurate margin can be given in tern1S of the sensitivit) function. a Nyquist plot that comes close to the point of instability. A large value for S indicate.23 a Nyquist plot is sketched that is much closer to instability than either gain or phase margin would indicate.o:~~~::.'~tOl 10·' 10·' 10 to w (rad/sec} accuracy)for any sinusoid of frequency w" and of amplitude given by R(jw) We can now define the size of the error in terms of the sensitivity function and the amplitude of the input.. The maximum value of lSI is often a more accurate measure of stability margin than either gain or phase margin alone. \\'hich represents a signal with sinusoidal components each having about the same amplitude of 150 up to some value Wi and very small amplitudes for frequencies above that. A less sophisticated description which is adequate for our purposes is to assume that the signals can be represented as a sum of sinusoids with frequencies in a specified range. the frequencybased error specification can be expressed as 1 = ISIIRI ::: e. Figure 7. we can usually describe the frequency content ofthe reference input as a sum of sinusoids with relative amplitudes given by a magnitude function IRI such as that plaited in Fig.: I . For example. from the critical point I. For example. DC. 7. then the vector margin is the same as the standard gain margin. We can express more complete frequency domain design specifications than any of these margins if we first give frequency descriptions for the external reference and disturbance signals. The vector gain margin (VGM) is defined as the gain margin in the direction of the worst possible phase.331 '" 1J . L the error is given by E(ju)) sensitivity function = ~~R. S" .ln addition to being a factor of the system error.I (7.. (7. For example.23. For example. Figure 7. 7.:: ..24 Sketch of typical specification of frequency content for reference input tracking f f) 10' VCM=~.23 A NyqUist plot showing the vector gain margin tm(KDG) 1 +DG S(jwlR.~ 10' The VGM and related geometry are marked on the Nyquist plot in Fig. it would pas>through 1 and by definition.. A more realistic description of the actual complex input signals is to represent them as random processes with corresponding frequency spectra.. the product If C M x (I = I. In orderto normalize the problem without EI I I·" .0 I that defines the required tracking i'" 10° 10·' L~~~. Therefore . we have that ' f.24. 7. 7..~x lSI. the distance from the curve to I is I + DC = and with the definition that GM Re(KDG) 1 S" = rr. we have described so far dynamic performance by the transient response to simple steps and ramps. it follows that the distance of the closest point on the Nyquist curve from I is If the Nyquist curve came this close to the I point on the real axis. With this assumption the response specification can be expressed by a statement such as "the magnitude of the system error is to be less than the bound e/> (a value such as 0. I vector gain margin where we have defined the sensitivity function S. if the Nyquist plot comes closest to Ion the negative real axis. in Fig. For the unity feedback system drawn in Fig.32 ).J~'c~~~~'. From the geometry of the Nyquist plot. Using Eq.246 Chapter 7 Design L'sing Transform Techniques 7. the sensitivity function is also the reciprocal of the distance of the Nyquist curve.
IDGI iDGI::: W." a". A realistic way to express plant uncertainty is to describe the plant transfer function as having a multiplicative uncertainty as G(jw) = GJj(tJ)[1 • The expression in Eq.12 ~l.and the requirement is approximately (7. and the requirement can be written as case that over the frequency range when errors are small the loop gain is large. age. 7.'· frequt"nci~.)dd C'Jlc. However. The spectrum. (7. The function is plotted in Fig.11 PnfOrmal1Cf BOUl1d FllHCtiOI1 A unity feedback system is to have an error less than a. and other environmemal factors vary the plant dynamics from the nominal case.en range. having frequency below 100 Hz.005. Ivlany small effects are omitted.36'.36) 10' 10' W. The value of the bound IF.25.. Usually these effects influence the transfer function at frequencies above the control bandv. G. design. (tV) for thi. • Example 7. and the real function.(jw) is the nominal plant transfer function. DG. (7. 11'" (wi. thc actual system is expected to be stable for an entire class of transfer functions that represent the range of changes that are expected to be faced as all elements arc included and as changes due to temperature. 10" In Eq. (7.005 for all unity amplitude sinusoid.11 tO J 200 + 1l'. 17. we define the real function of frequency WI (w) = IR I / ej. while the design is done for the nominal plant transfer function. the designer is usually required to design for stability robustness. is unity for a '" uJ '" 200. is used for the design. is a magnitude function that expresses the size of changes as a function ot' frequency that the transfer function is expected to experience and is knOll'll to be less Ihon some upper hound W"(w). G". from the problem description. Since eb = 0. by observing Figure 7. In that I lSI"" .. The models used for design are almost always only approximations to the real system.. such as slight flexibility in structural members or parasitic electrical clcmcnts in an electronic circuit.34) can be translated to the more familiar Bode plot coordinates and given as a requirement on the openloop gain.35) Stability Robustness in Terms of the Sensitivity Function In addition to the requirements on dynamic performance. Draw the performance frequency function W. the required function is given by a rectangle of amplitude 1/0.371 (radJ~eCJ K (. is almost always very small for low frequencie~ (we know the model very well~there) and increases substantially as we go to high frequencies where parasitic parameters come into play and unmodeled structural flexibility is common.(w)6(jwl]. . Solution.005 = 20U over the gi.1.idth and a nominal transfer function.nail11\ A magnetic memory read/write head assembly can be \veIl modelled at 10\.25 Plot of performance frequency function for Example 7.. <I (7.34) IDGI < w] • Example 7.248 Chapter 7 Design Using Transform Techniques 74 Frequency Response \1ethmls 2f9 defining both the spectrum R and the error bound each time.T.11= . .
36l.27. Figure 7. Thc model transfer function given by Eq. In this case.(~)' 10' ] Comparing Eq. (7. To derive the requirement. a model uncertainty bound is small for low frequencies and large for higher frequencies.. fI" (j w). A typical shape is sketched in Fig. the more accurate model is represented as . . (7.. .  . If the system is to have stability robustness. 7. With scaling to place the resonant frequency at (v"' and damping B. Solution." .. the model uncertainty function is given by 10' 10. the equation 1+ D(jw)Co(jwj = 0 is never satisfied for any real frequency.. (7...Plot of model uncertainty function for disk dnve read/Write head assembly 10' 7.sing Transform Techniques Figure 7. the ann supporting the read/write head has some lightly damped ftexibility with uncertain resonant frequency. The complex function.411 " ~L~ ~ [D" 11)" Stability robustness requires that we construct a control design for C. (7. G(S) s (~r + B~ + I Compute the model uncertainty function for this case. the characteristic equation using the uncertain plant as described by Eq. \ve begin with the assumption that the nominal design has been done and is stable so that the Nyquist plot of DC" satisfies the Nyquist stability criterion.27 A plot of a typical plant uncertainty frequency function IO J 10 2 i'! 10 ' In general...36).. 7.26 However. [1 s + (~) +B~+I . s B+I K w" = ..03. 1 10(1 10' w I radJ"ec~ (7AOI A pint of this function is given in Fig.(s) which will result in a stable system for any transfer function described by Eq. 1 101) w (rad/sec) 10' [D~ .36) 10" 10' 10.250 Chapter 7 Design L. (7. .381 can be written as G(s) =...(jwll ::: I. (7.26 for (V n = I and B = . represents the uncertainty in phase and is restricted only by the constraint IfI.391 with Eq.4 Frequency Response Methods 251 10 2 ~.
03 and w = I and w = 6 in Fig. .1161 which reduces to < l... The function 1/w. .i0.. Ill. . Bode Plot (7. DC" is small.. Therefore we can approximate T "" DC" and the constraint becomes IDCoIW. • Example 7. then the bound 1/ W. .421 (7. . . is nonnegligible.. is plotted for B = .(V. . or 6..46) are included on the same plot.~ ~ " ~ 100 l . to" 10. W. < I I IDCol < We' In practice.41) and the fact that w. . needs to be extended at the value . ..6) =.4~ 10" 1+ DC)I + w..y .. . 0. As with the performance specification.. Plot the stability robustness bound.i O. (7.46) . Over the range of high frequencies where there is significant model uncertainty and W.. < 1. 7. The boundary line i.. Solution. . the magnitude of the loop gain is plotted on loglog coordinates."'i"f~~""""'~"""'~~ .j w. for singleinputsingleoutput unity feedback system~ this requirement can be approximated by a more convenient form. • 1O~1 10' W I fad/sec) 10" . ifEg. (7... (7.. marked with hatching in Fig. then it is necessary and sufficient that . (7. .i 0...35) and Eg.45 ) making use of Eg.. . 7...0. any w. ::E 10° toI 17W261 1711w. . : .0... ::'0 Woo or for any phase function 6. ..1 UJ 10° I r3d/~ec) 10' (7.i O. (l + D(jw)G.12.13 51abihty Robustness Fllnction The uncertainty in the model of a disk read/write head assembly is given in Example 7..42) is not to be zero for any frequency.. to' fi77'7TrFTT'Fi7'7'i'7'i'TTPi~Tn=. I Figure 7. Thus.6j =. (7.252 Chapter 7 Design Gsing Transform Techniques 1.' .. a • (7..28 using bode.. 1/ W.. is not zero for any w. Suppose it is known that the parameter B is restricted to the range ..03 for all frequencies greater than 1.28. A Figure 7.441 ~ " ~ 10 ' complementary sensitivity function where the complementary sensitivity function is defined as T(jw) ~ DC.03 :" B :" .=r. Because the nominal system is stable. and the constraints of Eq. . . for this problem.0.6) =. It is clear that if the resonant frequency can take on any value greater than 1..29 Typical design limitations as displayed on a Bode magnitude plot _.4 Frequency Response Methods 253 must not go to zero for any real frequency for any value of either W.42).l . (d+ ." . is bounded by W.28 Plot of the sta bility robustness frequency function for disk read/Write head assembly 10" + DC =.3 and that the resonant frequency w" is known to be no less than 1. The requirement can be written as a function of jw in the form . . the first term in Eq.(jw». (1 I + DG) n (l (I + 1+ DG" DG 10' + DG)(1 + TW... / (I + DG) = I ~ S.
47) is a hard limit that cannot be av. then I. The designer is expected to construct a loop gain that will stay above WI for frequencies below WI' cross over the magnitudeand stay below II W. The algebra and the equatiom are the same for the discrete case. while maintaining stability which can be expressed as having a good phase margin. aile expects espeCially great dll J[ 180 "" 1. (7. Modifications to this rule need of course to be made in particular cases. The important point about thIS mtegral IS that if the nonminimum phase zero is close to a righthalf plane pole. The weighting function in Eq. From this condition there developed the design rule: • The asymptotes of the Bode plot magnitude. We have developed the design constraints Eq. This is a constraint on the integral of the sensitivity function dependent on the presence of openloop righthalf plane poles. the ght side of the integral can be very large and the excess of positive area I. ~ _'" dll 12 (7. In Freudenberg and Looze (1985) an extension to another of Bode s relalions was derived.667 in the neighborhood of crossover.29. the phase is to be kept above 150' to maintain a 30" phase margin. for example. which are restricted to be integral values for rational functions. then the magnitude slope is estimated to be constraint on nonminimum phase systems dM "" (150) 2 ~ If If there are no righthalf plane poles.' Thus the loop gain is expected to plunge with a large negative slope from being greater than WI to being less than II W. and thus ~. should be made to crossover the magnitude I r: .47) is concentrated near w o ' and if the slope is constant for a substantial range around w o ' then the formula can be approximated by rP(w) "" (I JT 2 du ~ dMj '1l=(I . thiS means that there IS an excess of at least two more total poles than zeros.35) and Eq. (7. possibly large. then the sensitivity function is constrained to take on a finite.471 where M = In(IDCI) andll = 11l(f::). we would like to have the system error kept small for the widest possible range of frequencies and yet to have a system that is stable in the presence of uncertainty in the plant transfer function. In terms of the plot in Fig. po~slble to keep the magnitude of the sensitivity small by spreadIng the se~sltlVlty Incre~se over all positive frequencies to infinity but such a des~gn req~lfes an excessIve bandwidth and is rarely practical. If th:r.46) in terms o(jw as for continuous systems.254 Chapter 7 Design Using Transform Techniques 7. where (J > O. w.~ is the magnitude slope on the loglog (Bode) plot. the situation is worse because the positive area where senslttVlty magmfies the error must exceed the negative area where the error is reduced by the feedback. Now the condllion can be expressed ' de d as a tWOSI weighted integral (7. (7. An alternative to Eq.4 frequency Response Methods 255 typical sketch is drawn in Fig. line at a slope of lover a frequency range of about one decade around the crossover frequency. For example. we want WI and W. in a short span."rolls off" at high frequencIes at a slope faster than 1. Suppose the zero is located at Co = (J" + lW". (7.. to be large in their respective frequency ranges and for WI to be close to w. There are also consequences if DC" has any zeros in the righthalf plane.e are unsta?le poles. positive value at some point below the bandwidth and a large value of 151= leads to a small VGM and generally an unsatisfactory design. 7.. If we try to make the average slope steeper (more negative) than this near crossover. Suppose the loop gain DC" has n p poles.48) is also true if there is a (nonminimumph~se) zero of DC" in the righthalf plane.}. with conjugate values p. For rational functIOns. P P. A common form of the formula for phase is 1'" In(ISI)dw = J[ t Re{p. then the integral is zero. If a specific bandWidth IS Imposed.48) !/>(w) =  I JT !~'" (dM) In(coth 'UIi)du. then of necessity ln lSI will be positive over another part of the band and errors will be amplified there.' in the righthalf plane and . Then it can be shown that sensitivity integra I limitations on Design: Continuous Case Bode's gainphase formula Bode's gainphase integral One of the major contributions of Bode was to derive important limitations on transfer functions that set limits on achievable design specifications. If the openloop system has no zeros in the righthalf plane. (7.r.t IS ln pnnclple.oided. we will lose the phase margin. Bode showed that this is impossible with a linear controller by showing that the minimum possible phase is determined by an integral depending on the slope of the magnitude curve.S reqUIred to be correspondingly large. but the limitation expressed by Eq. p. If. (7. This means that if we make the log of the sensitivity function very negative over some frequency band to reduce errors in that band. one need only substitute the discrete transfer functions for the continuous ones and use the variable eJ".49) In this case we do not have the '"rolloff' restriction and there is no possibility of spreadin~ the positive area over all high frequencies because the weighting function goes to zero with frequency. Based on this result. for ofI line (/ og (I DC Il = 0) in the range WI :::: W :::: frequencies above w.29. Again we assume there are n nghthalf plane poles at locatIons " . 7..
The constraint is especially severe if there is a nonminimum phase zero near an unstable pole (f3o "" CI'). The situation is illustrated by the Bode plot in Fig.4 while that for G 2 is 2. (7. the sensitivity is given by sens = feedback(sysf. one suspects that the restriction on phase due to gain slope is more severe in the discrete case than in the continuous case.sys2) generates the loop with fOf\vard system sysl and feedback system sys2.l.¢.30 for the plant G = lise.50) is over a finite limit. unstable poles make the situation worse and the effect increases if the poles are located far from the unit circle. (7. The plot is given by the statements [mag.50) The implications of Eq. the relation between gain slope and phase does not hold although it is approximately true for frequencies well below the Nyquist frequency. This can be done with the statement sysf = ss(O.Cl i The main consequence of this constraint is that it expresses a limitation imposed by the nonminimum phase zero on the sensitivity function. 7. We can illustrate the implications of Eq. DG is the feedback system. Limitations on Design: Discrete Case In the discrete case.(s) = .~  21"0 r.I cos(¢ .mag) grid. the open loop discrete system sysold. The expression syscl ::: feedback(sysl . The step responses are shown in Fig. 7. The vector gain margin for G I is 5.51J fic .. Notice the substantially larger value of the sensitivity for the unstable plant compared to that of the stable one." r.sysold).2 and in each case the controller transfer function is D = 15 ~=~:~. weighted integral of the discete sensitivity function The weighted integral of the discrete sensitivity function is similar to that of the continuous case. The effect is approximated by the delay of T /2 due to the sample and ZOH.w]=bode(sens). I"0 > L Then II j '"ln(IS(eJ¢)ll" .25.31(a) and the sensitivity plots are shown in Fig. as before. This can be done using the feedback function if a representation of the open loop system DG is given as. We consider the singleloop unity feedback structure and define the sensitivity function as S = I+~(. semilogy(w. r. and ~'e need to construct the dummy gain of I for the forward system. If we require that sensitivity is small (negative log) over a given range of frequencies. Notice that the phase is always slightly more negative than the ~ 180 one would get for this plant in the continuous case and deviates more as we approach the Nyquist limit at IT / T. r > L and conjugate a. for example. I G./. Again.f3.31(b). It can be shown that (7..256 Chapter 7 Design Using Transform Techniques 7.50) by two simple examples. there is only a finite frequency range over which we can spread the required sensitivity gain or "positive log" area. For sensitivity. 7. and also has a zero outside ' the unit circle ~t f3 ~ I"n eJJ. selected to give approximately the same rise time and bandwidth. The two transfer functions are G I (5)   1 (5+1)2 chemical process. > I. .O.r1 discrete sensitivity integral In each case we will include a zeroorder hold and sample with T = 0. magnetic levitation. = riel~ .Ts) Finally. From this example. We also assume that the openloop transfer function D(z)G(z) has n p poles outside the unit circle at z.ph..= 2rr t i~1 ln !la. To plot the sensitivity magnitude.. In Sung and Hara (1988) the discrete versions of these design limitations are derived. (7.'1 Frequency Response Methods 257 difficulty meeting specifications on sensitivirr with a system having righthalf plane poles and zeros close together. less than half as much. Consider a stable generic model of a chemical process and an unstable model of a magnetic levitation system. it is necessary to obtain a system having the transfer function of S.50) are the same as in the continuous case except for the fact that the integral in Eq. (7. We assume again that the system has Ill' poles outside the unit circle at CI = re J ¢·.) +I drf.O.
... the procedure is again identical to the continuous case fn that the magnitude of D(:>G(z) at w = I on the lowfrequency asymptote is equal to K.'''T ~ I + jwT.4 Frequency Response :vlethods 259 Figure 7... = I1m .I · (z . (7. This fact is most easily used if the frequencyresponse magnitude is plotted versus w in units of rad/sec so that w = I rad/sec is readily found. • Example 7. 1 OL'4L. Evaluation of the magnitude of the lowfrequency asymptote al w = I indicates that K.6 with the compensation giv'en by Eq. the error constants could be calculated directly with good software tools. The openloop discrele transfer function is (b) : + 0.r . = 1..J0:'12::"14'"16 6 1 w (rad/sec) Solution. In the frequency domain.. . the higher the magnitude cun'e at 10H' frequenn.32.r..itation 7...26. and by K ~~ ..6 04 for a Type 0 system. and the magnitude frequencyresponse plot will show a constant value on the lowfrequency asymptote which is equal to K . 10.05' which yields the magnitude versus frequency in Fig. For a Type I system...... 7..1 0.14 Finding 1£lociry Constant on (1 Bode Plot Use the discrete Bode plot 10 determine the K. . one would need to perform a calculation to find the w = I rad/sec point However.90'+8) (6): _ 0..0..'c'..J = (0.. .6 !''c'34'c''6 0 Time for a Type I system..0'+8'+) (: _ l)(: _ 0.:: ) It!+ 0 ~agnetic levitation '..:: .. therefore the issues in their calculation are of passing interest only.r .. .. Therefore · (z ...2 08 Process control [) . the fact remains for discrete and continuous frequency response alike...4 0. .. . 0. 17.. 1 i '" ? ~ 0.52) 0. for the antenna system of Example 7..4...rr.19). the procedure is identical to the continuous case. the lower the steadystate errors. T. / ~agne(ic le.. . Proces~ control thus establishing the fact that evaluation of the lowfrequency asymptote of DC~) G(~) at w = I yields K.r .= tmw.9672 ..I) I' Il m . Since z = e jGT . This can be seen from Eq.:1 (a) 10 1 .258 Chapter 7 Deslgn Usmg Transform Techniques 7..80 G(:)D(.31 Comparisons of a stable process control with an unstable magnetic levitation: (a) step responses (b) sensitivity plots 14 . Also note in the figure thai the ....52) if we note that for wT + O.r ... .I)D(z)GCz> T: . z + I implies that wT + O. e. But no matter how the constants are found.2 and are given by K = lim D(z)G(z) 1.3 Low Frequency Gains and Error Coefficients The steadystate error constants for polynomial inputs for discrete systems were established in Section 7. If the magnitude is plotted versus w in units of Hz or versus wT. for a Type 0 system.1 / Process control 0.
= I provided the DC gain of D(~) = I. keeping in mind that their fidelity degrades as frequency approaches the Nyquist frequency. To maintain an acceptable K. In order to arrive at trial compensations with potential for better PM.:: I. the compensated system will also have K.0484 (~ 7.4. 7. Because of the equivalence of the breakpoint concept between the continuous and discrete cases. .. the equivalent idea in the . some intuition from continuous design can be used if the zplane poles and zeros on the real axis are measured by their distance from + 1. = 0. In terms of the frequency response. settling time less than 10 sec and K.) of 0. the angular position on the unit circle in radians.I)Gi~) at ~ = 1 is I.1 rad. For example. + • Example 7. In carrying out direct digital designs. these slopes are readily and adequately approximated by constants I As a consequence the amplitude curve must cross unity gain (zero on a log scale) at a slope of ~ 1 for a reasonable phase margin. has the same value as the fractional distance of the singularity on the real axis to z = + 1.3 rad/sec.:: 0. The 160/< overshoot requirement translates into ( ..~5 indicate that with a compensator gain of K = 1 the system has a PM of 8' and a gain crossover frequency (we. it is useful to understand how a pole or zero placement will affect the magnitude and phase curves.26 since thiS Type I system has a lowfrequency slope of I. steadystate errors.~~). The ability to predict stability from the amplitude curve alone in minimum phase systems is an important contributor to the ease with which designers can evaluate changes in compensator parameters in those cases. Solution. The specifications are as before: overshoot less than 16'7c. Bode's relationship between the amplitude and phase curve is lost for discrete systems because the variable.260 Chapter 7 Design Lsing Transform Techniques 7. This equivalence is very accurate for low angular values (wT :s 0.4 Frequency Response Methods 261 Figure 7.5~) The magnitude and phase of the uncompensated system [Gi~) I shown in Fig. The specification for settling time translates into the requirement that w.plane systems and not depend on magnitude alone for an accurate assessment of the stability.47). In the continuous case with minimumphase transfer functions.32 Determination of K from frequency response Kv =1.2+. a pole at. 7.plane for the "breakpoint" in Bode's handplotting rules is that the magnitude will change slope at a frequency when wT.4 Compensator Design The amplitude and phase curves can be used to determine the stability margins based on the Nyquist stability criterion for either continuous or discrete system. it is typically  ~ + 0. It is easiest to select compensator break points if the frequencyresponse magnitude and phase is plotted versus wT so that the correspondence between those curves and the location of the compensation parameters is retained.16 illustrates the degree to which the relationship is Imt and indicates that the error would be small for frequencies lower than 1/2()th of the sample frequency.. Because the gain of (~ . However. The system transfer function is G(z) = 0. and T = l.15 Design of [he Antenna SaVl) Cancrol Design a discrete controller for the antenna system with T = I using the frequency response. 7.9 will produce a slope change at wT = 0.26 10' Frequency (rad/sec) extension of the lowfrequency asymptote reaches crossover at w = 1.e" sampling at more than 60 times the frequency) and is a reasonable approximation for angular values less than 0. this is accomplished for discrete systems using the ideas from the continuous Bode handplotting techniques. If the function is rational. which translates in turn into the requirement that the PM be . or crossover frequency. al~u necessary to determine both magnitude and phase for discrete .1 rad. we will evaluate only D(z}'s with a DC gain of 1. = 1. thus indicating that K. and the gain of this lowfrequency asymptote should not be decreased with any candidate compensation.5.:: 50· from Fig. (7. The uncompensated ..0.e" sampling at more than 8 times the frequency).26.92. For example. .:: 0. Figure 7. takes on values around the unit circle in contrast to 5 traversing the imaginary axis as in continuous systems.9048) (7. GM.8 rad (i.9672 I)(~ . i.. this means that the extension of the lowfrequencymagnitude asymptote should pass through the value I at w = 1 for the uncompensated case (in Fig. Bode showed that the phase is uniquely determined by an integral of the slope of the magnitude curve on a loglog plot as expressed by Eq.
(:) has a 58 PM and a 0.5 in D.g but achieved an increase in the PM to 50 . ~ 0.9) causing a w" of 0.8 : +0. Figure 7. Frequency (fad/sec) !00 10' 10° 10' Frequency (rad/sec) system's PM of 8' indicates poor damping.5 00.33 shows several attempts to produce a design. The breakpoint of the first attempt (D..8 rad/sec w.5 :O~8~3 to·.15 rad/sec" and did not increase the slope of the magnitude curve at a low enough frequency to bring about the desired w. etc. "'.. occurs approximately at the system bandwidth and dominant natural frequency: therefore... Because both goals are met.. = 0. but. is 1 ~ec.15 ° "::rT0fIDE..1 rad/sec (zero at ~ = 0. 0 1i . whereas the rules were derived assuming a secondorder system without a zero. Frequency (rad/sec) ~ 150 ~ ~ 150 L _ _ D.85 would translate inlO a 1. we will need to check whether the settling time and overshoot specifications are actually met.The guidelines were not successful in meeting the specifications because the system is third order with a zero.15 0.~ 20 0 dB to· I ~ lOi~'C. = 0..9 rad/see. the calculation of a time history of the system response to a step input shows that the I..Ut'< J ~ .. the overshoot is 270/.0 £ 200 250 10" ~ f ·25010..I..33) was at 0. = 10 sec. (z) in Fig.. 1 __ 10" P.g of about 0.85 lransla(e~ into a 0..6 rad/sec W. where the breakpoint was lowered to 0. but the resulting PM of 10 was still lower than desired.. Once we find a compensation that meeb the guidelines of PM = 50' and we. alas.5 1 . D.° with controllers 0" 4 .. D. By moving the compensator pole out to ~ = 0..34 shows the system frequency response using D. 7. the design of the system imposed the constraint that K.' The time history of the system 4 The zero al::::: 0..D. T..(:) in Fig.35 shows that it exactly meets the requirements for 16~ overshoot and [.< ..262 Chapter 7 Design Usmg Transform Techniques Figure 7. 10 sec. 0.' This was remedied in D. because the design guidelines followed are only approximate. 7.ec breakpoint.(oJ=1O :0.15 rad/sec breakpoint only because the sample period..35 Step response of the system with controller Os 1.9 rad/sec.' Figure 7. (:) has a 60 PM and a 6.··l':':_:~O~ 10° 40 . Just as for continuous systems.9 :+0. :::...g' and D. ..~ .(o)=15 ~ . . Figure 7..9 radi sec in order to meet Ihe [.34 Bode plots of designs 7. we had very little effect on the W.(~). = 1 and the design is complete.33 Frequency responses with 2 .. Furthennore. The necessary revisions to our design guidelines are clear: we want more than a 50' PM and do not require a 0...40 to' Frequency (radlsec I ·100 . is 7 sec.5 0 1 I '" I ·d 0 4 10 Time (seC) J2 t4 16 18 20 response to a step using D.:'"''"~"c~~'~~~~ _~. and the "'" of 0.(.3 rad/see indicates that it will be too slow. For T ::: 0. and OJ for Example 7... a zero at :.85 .5 J 8 '0 ~ = 0' .(~) along with two revisions of D(~) that satisfy our revised goals. I~) has a reasonable chance to meet the specifications: in fact..9 rad/sec w.4 Frequency Response Idethods 263 Figure 7.(oJ = 12.1 sec. "..200. we should try to change the design so that it has a W.. and Os for Example 7..:'O··'.5 radJ.
t"" 264 Chapter 7 Deslgn Lsing Transform Techniques 10 1 r. Thus we have the constraint that for D(~) to be causa! H (:) must have a zero at infinity of the same order It is interesting to look at the sensiti\ it)' fun<.ag~ I + D(~)C(~) = O. and d are polynomials. <7.elopment. 7. where much of Ihi~ theory i~ collected at about the height of its first of de.:tion~ for these designs. and 05 for Example 7. 7. a chapler i~ de\ll!~d to Re network $) nlh\?~is. The causality requirement on H(~) is that the closedloop system must have at least as long a delay as the plant. and to cancel it we have c(~) = (~. (7. O.) 3. <7. Let this factor be ~ . a linear frequency scale to illustrate the balance between posit.\" log of th~ sensitivity v'~"u.'". Sl.54 ). Looking at Eq. The structure is assumed to be a unity feedback system and the design is to select the computer transfer function D(:) to realize H (:).5 In the book b~ Truxal i 1955). The roots of the characteristic equation of the closedloop system are the roots of the equation 7. <7.58) .~~~~.5 ltJlT Irad) From Eq. plotted in Fig. splits the difference and meets eadl I as the zero of C(:) at infinity. the design must be causal..54) IW' L~~'c_ ____'_ _____. In particular.a)e(:). many constraints were imposed in order to assure the realization of electric compensator networks D(s) consisting only of resistors and capacitors.56) We can express Eg. <7. Finally. results in the highest bandwidth and also the highest maximum of the . not relevant and one can ignore these particular constraints. The overall transfer function is given by the formula 101' H(~) DC = I + DC' H(:) from which we get the direct design fonnula D(:) = . C(:) 1. The problem is to discover and implement constraints on H (:) so that we do not ask for the impossible.\" and negative areas for such plots for stable systems.a)e(~) (z . as would result if D(:) were called upon to cancel a pole or zero of C(~). e.J () 05 Ij 2.55) ~pccification. then as ~ > x its transfer function is bounded and does not have a pole at infinity.0 4 . First. h. then D(:) would have a pole there unless we require an H(~) that cancels it.HU I <7.15 technology has been found to be useful in adaptive controls.a)ii(~)d(:) + b(~)(: .30 :. An alternative design method that ignores constraints of .sensitivity or lowe" v~ctor gain margin. so we can write a(~) = (~ ~ a)a(~).57) becomes (: . such limitations on realization are. • This requirement has an elementary interpretation in the time domain: A zero of order k at infinity in C(:J corresponds to a delay of k samples in the pulse response of the plant. Considerations of stability add a second constraint.5 Direct Design Method of Ragazzini 265 Figure 7.36 Sensitivity plots of designs with controllers 0 3 . <7.56) as a polynomial if D and C are rational and we identify D = e(:)jd(:) and C = b(~)ja(~) where a. we see that if C(:) were to have a zero at infinity. Controller D~ has impro\'ed robustness (lower maximum of the sensitivit! bm also lower band\\ idth.a and suppose it is a pole of C(~). Then Eg. of course. the design given by 0.' With controllers realized by digital computer.57) Now suppose there is a common factor in DC.a)lad be] + o.5 Direct Design Method of Ragazzini Much of the style of the transform design techniques we have been discussing in this chapter grew out of the limitations of technology that was available for realization of continuoustime compensators with pneumatic components 01 electric networks and amplifiers. Suppose we are given a discrete transfer function C(:) of the plant (plus hold) and a desired transfer function H(:) between reference R and output Y. On this plol. <7. From ~transfonn theory we know that if D(~) is to be causal. onc can sec that controller 0.54) we can see that this design calls for a D(:I that will cancel the plant effects and add whatever is necessary to give the desired result. Then the characteristic polynomial is ad + be = O. <7.
if D(z) is not to cancel a zero of G(z).:)] 1 z1 = O. Thus we write the constraints 6 1 . so that to evaluate the limit in Eq.' +. h. if necessar)'. + 2b.5820. which have the solution b l + b. (7.3679:' The causality design constraint.62) Therefore = 1 h. or 0·651 dc' Ic~' T' K" = (O. we use Eq.: = I.. The velocity constant requirement is that e(oo) = lim(~ 1)~. 0.3679 + h. we see that if D(z) is not to cancel a pole of G(z).. I .711 b.60) add no constraints because G(:J has all poles and zeros inside the unit circle except for the single Lero at x.H(.7859: + IU6788 =O.050l4j = I. then that factor of a(z) must also be a factor of 1 .55 J requires that Hr:) = 17.[1 . the error transform is given by E(z) = R(.59) and 17.61 ) Thus if the system is to be Type 1 with velocity constant Kr • we must have zero steadystate error to a step and 1/ K. 6 Roots on the unit circle are also unstable by some definitions. it is necessary to use L'Hopital's mle with the result Because in this case hoth T and K. r I (764) _TdHI d: c~1 ='K. (7.69) which implies HO) = 1.. + b. • Example 7.64). 0.68. + .0. h" + hi :1 + b.:)(1 .. If this factor is outside the unit circle.:' + .c" + b. 17. From Eq. (7.1). .70) Because we hav'C' only two equations to ~ati~fv. additional poles at : = 6.. and good practice indicates that we should not cancel singularities outside the radlus of desired ")ettling time.16 Design by the Direct Method Consider again the plant described by the transfer function of Eq. + 3b.691 and the derivative with respect to :" to obtain dHI Tdz .0.5820)(0. 17.~l 1)[1 . = 0. (7. 17. The resulting equations arc' .. +s+ I= O.5318.5X20][07S59 + 0. error to a unit ramp.0501. (68) Consider finally the constraint of steadystate accuracy.661 Let us therefore ask for a design that is stable.5820) b l + 2h.63) we know that 1 .54). using Eq.e can truncate H(:J at h.3679(2)] (0. b l = 0.' 10. (7.67) 0.66) plus. + 2b.H(z). 0. such zeros must be factors of H(z).H(z) must contain as zeros all the poles of G(z) that are outside the unit circle. 0.7859: 1 +0. (7. = 0.J . The form of H(:) is thus 0.72) . where the transient is as shon as possible. Because H (z) is the overall transfer function.5820  [O. Solution.266 Chapter 7 Design Using Transform Techmques 75 Direct Design Method of Raga==int 267 In other wordsperhaps it was obvious from the starra common factor remains a factor of the characteristic polynomial. which is taken care of by Eq. The discrete characteristic equation according to the specifications is :' . we need only (\vo unknowns and . = 1.~I (z .:) is zero at.1 1 I='=~I K._+ h. 17.53) and suppose we ask for a digital design that has the characteristic equation that is the discrete equivalent of the continuous characteristic equation + 3h. and has poles at the roots of Eq. s' with a sampling period T = I sec. The first requirement is e(oo) Equations 0. 0. Likewise.7X~9 + 0.H(. 0. = 1.f.1. .. the system is unstable! How do we avoid such cancellation'! Considering again Eq.63) and b l + h.H(z». has K. + 0. = 0.H(~)] = K .10. The steadyslote error requirement leads to ' H(i) = lim(~ .59) H (~) must contain as zeros all the zeros of G(z) that are outside the unit circle. = 0.6321.5820)[h. are I.601 or h" = O.5820.
I H: .''' ~. (: . :I .5 J ~ 6 'I.268 Chapter 7 Design Using Transfonn Techlllques 1.3679 10 RU I +DG that is designed to have only two welldamped roots" The answer lies in the fact that the control response is determined from the bas Ie .= H(~)=. This pole was brought about because we allowed the controller to have a pole to cancel a plant zero at this position.07(~ . (7. 7. + 0.7859~ + 0.7859: + 0.".0501 .07932).4180) = 13. • Root locus rules for discrete system characteristic equations are shown to be the same as the rules for continuous system characteristic equations..3679 control that cause a large ripple in the system response between samples. 0.I)I~ . 7. ~nd require that H(~I be zero at ~ = 0..5~~~~~~_~~~ 7. The large control oscillation in turn causes the ripple in the output response.l)(~ .37 and verifies that the response samples behave as specified by H(~J.9672) I: .0793 (~.6 Summary 269 Thus the final design gives an overall transfer function H(~) = ~' .= R(~) U(~) • A plot of the step response of the resulting design for this example is provided in Fig. we compute D I +DG H(~) G(~) DU ~ (: .0.10.(7932) 10.0.01837)(: I: which for this example is ~ .1)(: .9672 The pole at ~ = 0.0. + 0.541.7. turning design formula.14) in terms of openloop transfer functions and in Eg.0. :3 Q.0.9018) (~. Eg.12) and Eq. • Step response characteristics such as rise time and overshoot can be correlated with regions of acceptable pole locations in the ~plane as sketched in Fig..OA180) :.7859~ + 0. How can this be for a system response transfer function. Y(~) DG We know that H ( I) = I so that I . Now.9(72) (: .0. large oscillations occur in the Figure 7. so this zero of G(:) is not canceled by D(~).J 16 18 20 Time (se<.3679 ~ + 0. (7.0. The poor response that resulted could have been avoided if this nearly unstable zero had been included in the stabilitv constraint list. 0. . However..9672.0. The poor transient due to the pole did not show up in the output response because it was exactly canceled by a zero in the plant transfer function.H (: I must havc a zcro at : = 1..90l8) 13.. • Successful design by emulation typically requires a sampling frequency at least 30 times the expected closedloop bandwidth. • Expressions for steadystate error constants for discrete systems have been given in Eq.0.6321: .. root locus.. 0.9018)(06321).06 .37 Step response of antenna system from direct design 1.) • Discrete controllers can be designed by emulation.OA180) .5  In this chapter we have reviewed the philosophy and specifications of the design of control systems by transform techniques and discussed three such methods.9672. . very near to the unit circle.11 We shall also need I _ HI:) = . 0. b..~'.. as can he seen also from the figure. or frequency response methods. is the source of the oscillation in the control response.I: . The result will be a simpler D(~) with a slightly more complicated H(:).0.J__~ 10 ~__~ t2 t4 .0.6 Summary 1 r 0.0.18) in terms of closedloop poles and zeros. In that case we would introduce another term in H(~).. .
is expressed in Eq. Plot the step response of the discrete system and compare the rise time and overshoot to those of the continuous design. Repeat the design of the satellite attitude control of Problem 4 including method of choice of sampling period but using the triangle hold equivalent Inoncausal firstorder hold) to design the discrete compensations. and 2.9. Pay close attention to the real axi.Pc) =0 7. I.2 Use the ~ = e. (c) The locus for 1+ K (s'+ I)' .3 What is the sample period T if there are to be 8 samples per rise time" ROOllocl/s rel·. (7. and 20. . ii.) =0 is typical or the behavior near < = () of a double integrator with lead compensation or a single integration with a lag network and one additional real pole. • The direct design method of Ragazzini can be used to realize a closedloop transfer function limited only by causality and stability constraints. 7.50) and Eq. 5 is a show that the locus is a circle of radius v~ centered at the origin (location of the zero). compute the discrete equivalent using Tustin's method. The following root loci illustrate important features of the root locus technique. All are capable or being sketched by hand.270 Chapler 7 DesIgn lsing Transform TechnIques 7. i. breakin and breakaway points.s+1 s(s + P. Can this result be translated to the case of two poles and a zero on the negative real axis'J A servomechanism system is e"peeted to have a risetime of no mOre than I0 milliseconds and an overshoot of no more than 5 '7c . =0 illustrates the use of complex zeros to compensate for the presence of complex poles due to structural flexibility. (a) Design a continuous lead network compensation so as to give closedloop poles corresponding to " = 0. and it is recommended that they be done that way in order to develop skills in wrifying a computer's output..T mapping function and prove that the curve of constant t. 7.ith the continuous case. Sketch the locus wrsus K for values of P. tb) What is the estimated Bode gain crossowr frequenc)' (rad/sec)') (e) What is the estimated phase margin in degrees" 7. The ratio of pole to zero of the lead is to be no more than 10. Once sketched roughly by hand. of 5. including method of choosing sampling periods but using the matched polezero method to obtain the discrete compensations. Be sure to note the departurc angles from the complex poles in each case.5 Repeat the design for the satellite attitude control of Problem 4. sir +4) +w. in logarithmic spiral in c. Lead and lag compensation can be used to improve the steadystate and transient response of discrete systems. • Stability robustness in terms of the overall transfer function.0. (a) Plot in the splane the corresponding region of acceptable closedloop pole locations. • The sensitivity function was shown to be useful to develop specifications on performance robustness as expressed in Eq. it is useful to till in the details with a computer.7 Problems 271 • Asymptotes as used in continuous system frequency response plots do apply for discrete frequency response.1 7. (c) Select a sampling period that will give 5 samples per rise time.47). IIOf (b) The locus for 1+ K I • Nyquist's stability criterion and gain and phase margins were developed for discrete systems.7 Problems 7. Plot the locus for a = 0. «s+ 1)((s+01"+4) .6 . (7. T. (7. What is the system type and corresponding error constant? (b) Select a sampling period to give 10 samples in a rise time and compute the discrete equivalent to the lead using the Tustin bilinear transformation. and compare rise time and overshoot of this design v. I s (d) What is the sample period. if the estimated phase shift doe to the sample and hold is to be no more than 10' at the gain crossover" (e) 7.. • Limitations on the frequency response of closedloop discrete designs ar~ made more severe by poles and zeros outside the unit circle as expressed b) Eq. the complementary sensitivity function. Sketch the loci for w n = I and w n = 3 Which case is unconditionally stable (stable for all positive K less than the design valuer' (d) For 1+ K (s  s PI lis .34). (a) The locus for l+K . Be sure to estimate the angles of departure and arrival. (7. Plot the step response of the design and note the rise time and the percent overshoot.5 and natural frequency w" = 1.51).=0 is a typical locus thaI includes complex poles and shows the \'alue of departure angles.4 The basic transfer function ofa sateHite attitude control is Gis) = .ell'.
5 and natural frequency w" = 1. = 0. for this problem'} How many samples do you expect to find per rise time? Plot the step response and compare result with expectation. 7. (bl Augment the plant model with an approximation of the samplehold delay consisting of X= lI1g + f(X. and then neglect higherorder terms. Plot the step response and "erify that the respon~t: meets the specification~_ (bl What is the system type and corresponding error constan!"! 'Vhat can be done to reduce the steadystate error to a step input? I 1+'1 before doing the continuous design.0. . ::: 0. (c) Design a discrete lag compensation that will cut the qeadystate error in half. Use the matched polezero method to obtain the discrete compensallons. plot the step response.i. tb) Repeat the discrete design with sampling period Ts = 1. Compare the design with the continuous case. The equations of motion are III tal Use the zeropole mapping equinlent emulation method.. Plot the step response and compare the complete response~ to the transient and steadystate error specifications.5 sec and compute the discrete model of the piant with a sample and zeroorder hold. P(S]=~. . Once the design of the lead compensation is completed.4 sec.. Design the antenna wntrol system as specified in Example 7.Kx. design a discrete lead compensation with pole at : = 0.O:! kg. k. including the method of choosing sampling periuds. continue with the discrete equivalents as in Problem 4.5 and a zero so as to give closed loop poles at the mapped place from the continuous poles.38. /. due to sampling for both design methods. = 0. we ohtain a linear approximation then redesign DIs) and find the discrete equiv'alem with the matched polezero equivalent emulation method. (a) Let sampling period be Ts = 0. Compare the discrete design v. " (a) Compute the transfer function from i to x and draw the (continuous 1root locus for proportional feedback i = . Plot the step response and compare with the continuous design done on the unaugmented plant. (c) Design a digital control for thc magnetic levitatiun to meet the specifications /. A schematic of a possible setup is shown in Fig. (c) Compare the degradation of the equivalent damping ratio I.02 sec and compute the plant discrete transfer function when used with a sample and zeroorder hold. 7.<: 0. = 0.2 with a sample period of T = 0.llls+3/ is to be comrolled with a digital controller using a sample period of T = IJ. w. 7. rn.13 It is pos~ible to suspend a steel ball bearing by. 7.8 Design a discrete compensation for the antenna control system as specified in Example 7. k. design a lead compensation 10 give c1osedloop poles with damping <. <. given by rt X.2 with a sample period of T = 0.::: wj5. S + 2/ T where the force on the ball due to the electromagnet i. wI) ~ WI (b) (e) /10.9 7.2 sec..1 using a matched polezero equivalent for the discrete compensation. = 20 :slIm. I)..5 and w" = 1. (b) Let the sample period be T = 0.5 sec.10 For the satellite with transfer function 1/5'.x and expand f about X = X" and J = I". (a) Design compensation using the :plane ro01locus that will respond to a step with a rise time of::: 1 sec and an overshoot::: SQ.7 Repeat the design for the satellite attitude control of Problem 4 but augment the plant with a Pade approximation to the delay of T /2 which is to say. and compare rise time and overshoot with the continuous case. It is found that the magnet force balances the gravity forte when the magnet currem is I" and the hall at X"' If we write I = I" + i and X = X" . Using this model. Values measured for a particular device in the Stanford Control> Laboratorv are III = O. /w. 7.means of an electromagnct whose current is controlled by the position of the rna" [Woodson and Melcher 11968)1.::'S (1))30.. multiply the plant transfer function by 1.38 A steel ball balanced by an electromagnet wl!.II.272 Chapter 7 Design Usmg Transform Techniques 77 Problems 273 7.'"PIS) = ~ 7. The poletozero ratio of the compensation should not be more than 10.0.4 N/A. and oV'ershoot ::: 20'!c. 0> 0.l = k1x + kJ. What is the ratio of w. Plot the step response and compare rise time and overshoot with those of the continuous design.5 and (a} Figure 7. Plot the step response of the closed loop and note the rise time and overshoot.1 sec. ith the continuous design.I sec.12 The plant transfer function G(sJ=Is+0.11 Sketch the region in the :plane of discrete pole locations correspcnding to <.
14 A discrete transfer function for approximate derivative control is . G. If the sensor can measure x over a range of only ±~ em. Select the variable(s) on which you would like to place a . Note that the integrator in the actuator block indicates that a constantvoltage command to the servomotor will produce a constant v'elocit\' of the attachment ~M . The block diagram of the system is shown 10 Fig. where the pole at ~ = [) adds some destabilizing phase lag. the sample period is T = 0. 7. (e) design"? 7. you are to design a compensation that will result in a closedloop settling time t.15 For the automotive cruisecontrol system shown in Fig.02 kg: 7. Plot the step response and compare it with the continuous design's response.5.torgues can be produced for allitude control. (e) 7.Spacecraft Figure 7. = 0. Compare these three designs with respect to meetlOg the transient performance..39. you can include a Pade approximation to the delay and do a redesign of the continuous compensation before computing tbe discrete equivalent.17 The tethered satellite system shown in Fig. Assume a sampling period T = 1 msec and use matched polezero emulation.e.. what is the maxim~lIn initial displacement.ellsor(sllu augment the iI feedback. It therefore seems that it would be advantageous 10 remove it and to use derivative control of the fonn D(~) Ie) = KpTn .39 An automotive cruisecontrol system Tether Sensor T . 7.. tal Is it p05'ible to stabilize this system with & feedback to a PlD controller" Support your ansv"cr with a root locul:' argument. Assume no sampling and use a continuous compensation. Prohlems 275 A disk drive read/Write head assembly Electronic lag Head dynamics y Plot a step response of your design to an initial disturbance displacement on the ball and show both x and the control current i. If you wish.39). What is the velocity constant of your (b) Suppose it is possble to measure 8.42. and if the amplifier can provide a maximum current of IA. 7. of 5 sec with no overshoot. Design a PO controller to achieve a t.274 Chapter 7 Deslgn Using Transform Techniques Figure 7. and e as well as e. = 3 in Fig. Figure 7.I D(:) = K.JJ. 7A I has a moveable tether attachment point so that .. (b) Detennine the speed error on a 3o/c grade (i. using m = 0.16 For the disk drive read/write head assembly described in Fig.40 (d) Plot a root locus of your design versus m and discu" the possibility of balancing balls of various masses. 7. (e) Design a PID controller to meet tbe same specifications as in part (a) and that has zero steadystate error on constant grades. (a) (b) Design compensation for the system using the sensorhi that you selected in part (bl so that it has a 2sec rise time and equivalent closed loop damping of :. = 20 msec and with overshoot 10 a step input Mp <:: 20o/c.40.1) Do a :plane design for the same specifications and plot its step response.5 sec... (a) 7. 7.41 A tethered satellite system . Plot the step response and verify that your design meets tbe specifications.Tv • T~ .:t1I. T (~. Can this be done" Support your answer with the difference equation that would be required and discu" the requirements to implement it. x(O)m" that will keep the variables within these limits.
0.02 sec (a) ~'""'I M = moment on satellite 6 = satellite attitude Sensor!s) ~.'2 sec. (a) De.. The oscillatory roob in Gis) arise from the compressibility of the hydraulic fluid (with some entrained air' and i~ often referred to a~ the oilmass resonance. is f(XI = K' 1. Ie) Determine the high"l K po"ible I i.. Ie) sis + lOl(s' + 1. at the stability boundary) for PD plus acceleration (K. (a) Pial the Bode pial for this syslem and design a lead compensation to haw a phase margin of 50 and a crosso\'er w.')).Vith sample frequency l = 50H~. The sensed sti~k angle is to be used to dete.2~1 + ~. (j The compensation is implemented in a control computer sampling at l = 50 Hz and" of the form Di~) = Kil + Kill . (bJ . figure 7. Plor the step response of the re. The schematic diagram for this control system is shown in Fig 7'+'+. 7.. = 0). f (= ii.18 with transfer function Gil) = sis + IOlIs~ + 1. With . 7.ulting design and note the rise time and the oyershoot. Plot the Bode plor of the design and verify that the specifications are met.n= (bl With sample period of T = 0. a gain margin as measured at the resonance peak of at least 2 and a cro~sover of at least w( t.ation to give 50 phase margin and crossO\~er w" = 1.~I) + K.2s + 14+) ](jOO . where GIs) is the system transfer function gi\'cn by Gl.l? ofh)'dralllic s~'~lems.'+3 has a sensor measuring the angle of the stick as part 01 a control system to control automatically the motion of the bucket through the earth.. .ign a compensation that will give a phase margin of 50 .2\ + IO()() 1'+4) plot the Bode plot and measore the gain and phase margins with just unity feedback.20 A simple model of a satellite attitude control has the transfer function 1/s".21 For a system given by G(s)=~.44 Schematic diagram for the control system of the excavator "~ T = 0. = K. at the stability boundary) for proportional control (K.42 Block diagram for the tethered satellite system Servo figure 7.ample period T = 0.Il. 7. design a discrete compensation to gil'e 50 phase margin and crossover w" = 1.43 An excavator with an automatic control system ~I'J (bl Determine the highest K pO>sible (i.276 Chapter 7 Design Lsing Transform Techniques 7.e. Plot the step response and compare rise time and overshoot with the continuous design.0. at the stahility houndary I for PD {K.  Id) Determine the highest K possible (i.18 The exca\~ator shown in Fig.? 6 = displacement of tether attachment point To = tether tension Show that the steady· state error.14 when 8r is <1 unit ramp. design a discrete compen.e. = 0) control.. :::: 1. .' 7. =J 0' control.tI). 7.mine the control signal to the hydraulic actuator mo\'ing the stick. Plot the step response and compare rise time and overshoot \\"ith the continuous design. design a discrete controller to meet the .1 Problems 277 figure 7. Plot the step response and note " the rise time and overshoot.19 For Ihe excavator described in Problem 7.. see Vlersma (19RO).e.arne specifications given for the continuous ca'e. . sis + a) For further reading on damping the oilmass r~sonan(.0.0 rad/'ec. of 1.5 sec.
(b) Repeat part (a) using the . The same two methods apply 10 the statespace fonnulation as well. the open loop gain for frequencies belo" (J) = 0.B< T I"( S' + B5 + I) I For the parameters K = 0. one for T = 100 msee and one for T = 250 mscc.180 sO the system will not be conditionally stable.5 scc. In Chapter 7. we discussed how to design digital controllers using transfonn techniques. owrshoul < 25'if. Ie) Plot the sensitivity of the digital design and compute the vector gain margin. those with more Ihan one control input and/or sensed output. no further discussion of emulation is required. making the transient response comparison between experiment and theory much easieLI (a) Detennine a D(. one would design a continuous controller using statespace methods. [Him: Cancclthe plant pole aI s = 0.278 Ch. then transfonn the controller to a discrete fonn by using one of the discrete equivalents from Chapter 6. Do two designs.5. The difference in the two approaches is entirely in the design method. of the continuous system is approXimatel\ equal to the K orthe system preceded by a ZOH and represented by its discretc tralhrer function. Design Using StateSpace Methods A Perspective on StateSpace Design Methods In Chapter 7. Statespace methods also offer advantages in the structure for command inputs and disturbance estimalion. Using emulation.) using emulation with the m"tched polezero mapping technique.05 and B = 0. (a) Design a continuous compensation [a meet the specifications. Compare the four digitally controlled responses with the original specitication.+ with a compensator zero.1. The discussion of the method and its accuracy in Chapter 7 applies equally well here. a secondorder closedloop system will result. multioutput (MIMO) systems." The goal of this chapter is to solve the identical problem using the statespace fonnulation. With amplitude and time scaling. the end result. Furthennore. which often rely heavily on this system representation. the model can be reduced 10 GIl) = K . a set of difference equations providing controL is identical. 7. The phase margin must be at least 35' . A prize will Ik given to the student who obtains the lowest sampling frequency wilh a design that meets the specifications. two basic methods were described: emulation and direct digital design. For performance tracking. L"se the discrete equi\alent of the plant in your calculalions. Therefore.plane root locus method for the two sample periods. However. Chapters 4 and 5 have already demonstrated the advantages of the statespace formulation in using CACSD packages for the computation of discrete equivalents. similar to those found in Chapter 7 with classical methods. and we will concentrate solely on the direct digital design method. methods now commonly designated as "'classical design. plot the Bode plot and indicate the gam and phase margins. statespace methods are also an aid in the design of controllers for singleinput. singleoutput (5150) systems because of the widespread use of computeraided control system design (CACSD) tools. 279 . that is. the development in Chapter 6 used both classical and statespace system descriptions in the computation of the equivalents. If possible. keep the phase above . In this chapter.lpter i Design Lsmg Transform Techniques determine the conditions under which the K. Ie) Simulate the ciosedIoop system response to a unit step with the O(:)'s obtained in pans laJ and (b). . Advantages of the statespace formulation are especially apparent when designing controllers for multiinput. and zero steadystate error to a step command.23 A generic mechanical control problem is that of two masses coupled by a lightly damped flexible structure. (b) Design a discrete compensation for the system with the lowest sampling frequenc\ possible. Explain any differences that you lind. Techniques for MIMO design are discussed in Chapter 9.. we will limit our statespace design efforts to SISO controllers. ' 7.005 must be above 50 and the gain for frequencies above (J) = I must be belm..22 Design a digital controller for I Gis) = sis + OA) preceded by a ZOH so that the response has a rise time of approximately 0. 0.
21 We assume the control is applied from the computer through a ZOH as shown in Fig.6) is (::. As for the continuous case.2) have an exact discrete representation as given by Eq. usually referred to as a regulator.transform of Eg.59) x(k (8. (or sysD) with a sample period T. (8.. (8. which estimates the entire state vector. H.AB 4. G.1) x= and Eq.1 Control Law Design In Chapter 2. Section 8.280 Chapter 8 Design Lsmg StateSpace Methods 8.T) One of the attractive features of statespace design methods is that the procedure consists of two independent steps. (2. to the statespace continuous description by the MATLAB script l + I) = <l>x(k) .eo but the read~r '::In think of the krm:. The chapter concludes in Section 8. (8. Substituting Eq.. Appendix F.41 Note that this structure does not allow for a reference input to the system. Hx(k) + Iu(k).e ·ob~t'r\'("· implie~ 3 direl:t mea:. interchangeabl).6) Therefore the ::. T . therefore. Section 8. find it necessary to purchase such a large number of sensors.5).2). the control law. Therefore."··: hO\\t"\t"L \. as ··obsen"er. then design of an estimator to reconstruct the state given a partial measurement of it.2 cover. <1>. In thi . using the MATLAB script sysD = c2d(sysC. Section 8. 1. In general. that is 8.5) + 1) y(k) <l>x(k) + fu(k).2) Fx +GII.5 presents how a designer builds an integral control feature or disturbance estimation. The tirst step assumes that we have all the state elements at our disposal for feedback purposes. and how they accomplish similar goals. design using statespace involves separate design of the control assuming all state elements are available. where sysC contains F.) = O.3). the control law is simply the feedback of a linear combination of all the state elements. f.fcl eF"d'lG.6 discusses the limitations imposed by delays in the system and how to minimize their effect. r. the required conditions fOI the design to be possible. of course. Eqs. In Section 8.(('l(" IS mm:h more tle~cripti\(" of {h~jr function bccau:. given measurements of the portion of the state provided by Eq. 1. hook [he term ··e~[jmato(· i" u. Provided the continuous system is preceded by a ZOH.fKxlk).6. this would not be a good assumption: a practical engineer would not. G(s) (represented by sysTF in MATLAB). .auld be represented b) [num.$ + fK)X(.1 Control La\\" Deslgn 281 Chapter Overview As for the continuous case reviewed in Section 2. given by Eq. 1. the discrete estimator design.1 covers the discrete control design while Section 8. The remaining step is to design an "estimator" (or "observer'" l. (83) where eFT. assumes that r = 0 and is.5) always included a reference input. Eg. See 2 The literawn: [Luenhergcr ! 196011 L:ommnnl~ n:. and (8. Section 8. we can transform to the discrete model.1. (8.'nTI '''e"tima.·f("r~ to the~e devlce.. (8.3 puts it together into what is called the regulator and Section 8. sysC = ss(sysTF) In \L\Tt. we saw that the statespace description of a continuous system i. as a rule. The final control algorithm will consist of a combination of the control law and the estimator with the controllaw calculations based on the estimated states rather than on the actual states. (8. Section 8. 1. The assumption that all states are available merely allows us to proceed with the tirst design step. 18.7 with a discussion of observability and controllability.1 ) y = Hx + 111. especially because he or she knows that they would not be needed using classical design method~. (2.4 will discuss ho'w one introduces reference inputs.4 discusses the relative merits of the various ways of introducing the reference input command.uremcnt. The topology that we used all through Chapter 7 (Fig.3 we show that this substitution is reasonable and that the combined control law and estimator can give closedloop dynamic characteristics that are unchanged from those assumed in designing the control law and estimator separately. (8.. G(S) . namely. (8. H.5) in Eq. (8. we have x(k We can easily transform between the classical transfer function of a continuous system.\t' feel that the tt.den] and the tf2ss function \\uuIJ bt:' in\'flked. (4. 7. The dynamic system we obtain from the combined control law and estimator is the same that has been previously referred to as compensation..1. The control law.
l .' (011". control roots roOlS /j. J Discu~~ion of how one selecb pole location. having picked a controllmv with enough parameters 10 infiuence all the closedloop poles. we use it here to illustrate the power of full state feedback.ec.:. i..7) and Eq.6: + 0.7).18. Example 4.5 and real pan of s = 1. was fevie. we will arbitrarily select the desired pole locations of the closedloop system and see if the approach will work.l2 radfsec translates to: = 0. (8.9) and the evaluation of Eq. . 13[)(~ I = '90'" the desired controlcharacteristic equation is a.1 The desired characteristic equation is then :' . are in the desired locations. s = 1. we tind (hal s = 1.ec.4 IfIJI axis fJ[.1...ample period of T = 0.7) 8. then.1 . for the discrete case. we will build on this idea to arrive at a more practical design methodology.6 and 8. to or :' i 1T K.8 ± /3.. for any control law K lead.' say ~. fJ. Unlike classical design. Pick the :p]ane roots of the closedloop characteristic equation so that the equivalent splane rools have a damping ratio of!.10) Figure 8.8 ± j(J.d. (~ .]2 rad/sec l. estimator will occur through the follo\"' ing examples and in Section 8. .e . as shown in Fig.7.70 = O.(T '/2)K . (8.6 for the continuou~ case and W" =T .~) = (~  . • Example 8.8 ~ 1. 0.11 showed that the di. consists of finding the elements of K so that the roots of Eq.T with a sample period of T = (J.t = O.282 Chapter 8 Design L'sing StateSpace \lelhods 8.) . fJ.47)..e a ... = 0.1 P"le Placement tor Satd/ite AtUtt.ing: = e.cussion in Chapta 7 can also he used to specify poles. they must be identicaL term by term.1 Pole Placement The approach we wish to take at this point is pole placement: that is. The controllaw design.8). poleplacement approach guarantees success and allows us to arbitrarily pick any pole location. where we iterated on parameters in the compensator (hoping) to find acceptable closedloop root locations.'/ Design a control law for the satellite attitudecontrol system described by Eq.25. Given desired pole locations. the poles of the closedloop system.ed in Section ~. I~l Solution. (8.. The results of the z=e TJ T = sampling p~riod specification dis.1.crete model for thIS syqem is and .= C.8) are both the characteristic equation of the controlled system: therefore.1 Conlrol Law Design 283 and the characteristic equation of the system with the hypothetical control law i.. Although this approach can often lead to trouble in the design of complex systems (see the discussion in Sections 2.1 DeSired root locations for satellite attitudecontrol system of Examples 8. Thus we see that the required elements of K are obtained by matching the coefficients of each power of ~ in Eq.. . 13". (4..0 ! "" plane loci of roots of constant and WI! s = rw" : : jw \. In Chapter 9.8) Equations (8./3. .8 radfsec ii.T K. (8.3). (8. U. that is.8 ± J3.) o.1 It... the full state feedback.<t> + r KI = O..7) and (8. 8.1 and 8. .. (8. (8./"f=11 . and there will be II equations for an nthorder system. providing that II poles are specified for an 11thorder system.21: + IT '/2lK..13.
If any r element was zero.. equations in the two unknown elements of K then the necessary values for control gains are TK.. Uncontrollability is best exhibited by a realization (selection of state elements) where each state element represents a natural mode of the system. K. + I) o ~ o A..1 COnlml Law Design 285 Equating coefficients in Eqs.5. If we now form the closedloop system matrix <fl. then. finally. 4. A good physical understanding of the system being controlled usually prevents any attempt to design a controller for an uncontrollable system: however. n'J The answer is almost always "yes:' The exception occurs in certain pathological systems.7) to obtain the characteristic equation. Because this gain is for the state in' the' control form. 10) with like powers of~.8(c). we must.<fll = 0 are distinct. (8. If all the roots of the openloop characteristic equation controt canonicat form <fl. The key idea here is that the elements of the first row of <flc are exactly the coefficients of the characteristic polynomial of the system. . and explicitly exhibits the criterion for controllability: No element in r can be zero.a" Conceptually.121 By inspection. (8. there is a mathematical test for controllability applicable to any system description.15)." for which no control will give arbitrary pole locations. Therefore.K ~ ["r' or' "f' l = O.K. .2 Controllability The first question this process raises is existence: Is it always possible to find an equivalent (<1>. = [ o o J ]. we have the canonicalform design method: Given an arbitrarv (<I>. and the associated state would remain uncontrolled. we find AI x(k ". K.70. the transfomlation is transparent to the designer.. to control form (<fl. example becomes rather tedious when the order of the system (and therefore the order of the determinant to be evaluated) is greater than 2. we find that the characteristic equation of Eq. + K.) :3 Thus. Referring to that figure and taking the state elements as the outputs of the delays (~' blocks).10 = 10.. • The calculation of the gains using the method illustrated in the previou. we get (assuming bo = 0 for this case) 8.14) (8. which are easily soh'ed for the coefficients and evaluated for T = 0. the characteristic polynomial of this system is a(z) = z' + a. These systems haye certain modes or subsystems that are unaffected by the control. This method is sometimes used by CACSD packages because of the numerical advantages: however. which may be an additional aid in discovering this condition: a discussion of this test is contained in Section 8. who generally prefers to use a state definition that is related to the physical system's characteristics. . Hc = [b I b. This structure is called "'control canonical form" because it is so useful in control law design. the control would not influence that normal mode. ]".):' + (a 2 + K): + (a.35 n r) T =3. A computer does not solve the tedium unless it is used to perform the algebraic manipulations necessary in expanding the determinant in Eq. = TT 0. ) for arbitrary (<fl. [~.284 Chapter 8 Design Using StateSpace Methods 8.1.1 sec K. (4..7..r. (8.. = O. other approaches have been developed to provide convenient computerbased solutions to this problem.9) and (8. n and a desired characteristic equation (l'(~) = O.:' + 0'. express the result back in terms of the original state elements.r..: + 0'.13). . The algebra for finding the specific value of K is especially simple if the system matrices happen to be in the form associated with the block diagram of Fig. = a a a] [ I 2 } I ~I .12) is :' + (a l + K. (T'/2)K.2 = 1. numbered from the left. + (T'/2. we convert (by redefi'nition of the state) (<fl. (8.TK. and solve for the gain by Eq. (8. dubbed "uncontrollable.. we obtain two simultaneou. then Eq.= 0.3) written in this way (normal mode or "Jordan canonical form") becomes I 0 0 010 .=O'.+ 1 =0. (8.6. if the desired pole locations result in the characteristic equation + 0'. K.11 ) Note that from Eq.~' + a7~ + a. (8. r.
O 1] Gam = [T 2 /2. The sample rate should be 15 rad/sec which translates to approximately T = OA sees. Note that these functions are used for both the continuous and discrete cases because they solve the same mathematical problems given by Eqs.17) we can write the statespace description as r 1\IATLAB x=[d d T= . 0.091 H=[IOOO] O. satisfactory for 5150 systems of order less than 10 and can handle systems wilh repeated roots. place [Kautsky.0036 Nsec/m. (A. C.8+i* 25. and Van Dooren (1985)] is best for higher order systems and can handle MIMO systems.1 Phi = [1 T. b = 0. The relation is (8. Nichols. Place the zplane closedloop poles at z = 0.286 Chapter 8 Deslgn Using StaleSpace ~lethods 8.1 are due to roundoff error in the hand calculation. it is helpful to move poles as little as possible in order to minimize the required amount of control effort and to avoid exciting the system any more than necessary.G.UUB Design a control law for the satellite attitudecontrol system as in Example 8.05.091 ~ . that is.1 kg. Solution. Solution.~I 0. (z) to fonn (8.1.1. The only difference is that the desired root locations are in substantially different locations for the splane and zplane and that F. This system is representative of many systems where there is some flexibility between the measured output and control input. (a) All poles at p = 1. The difference between these values and those shown in Example 8. A more complex system demonstrates the kind of difficulty you might encounter in using the pole placement approach.036 o ] G J = O. (2. G have been replaced by «fI and r. • controllability matrix where C = [f «fIf . Discuss why the response is better for case (b). ] is called the controllability matrix.02 and select a 10: I ratio of the two masses. the ~ATLAB script sysC = ss(F.9. • Example 8.2 Clmlml Ul'" Pole Placement with M.9 ± jO. but will not handle systems where the desired roots are repeated. • Example 8.15 ) result in K = [10. place would have given the same answer.091 Kim.. Where should the higher frequency poles be picked" The system specifications typically help the designer pick only two of the desired poles.p) = 0.17) The controllability matrix.'18751.~036 0. 11 is the order of the system or number of state elements.37) and (8.Gam.T] 0 F _ [_0091 0.3 Pole Placement for a 4thOrder System with :'lATL\B Design a control law for the double massspring system in Appendix AA using d as the measurement. and we substitute «fI for z in ct. must be full rank for the matrix to be invertible and for the system to be controllable.9. Pick the sample rate to be 15 times faster than the resonance and show the free response to an initial condition of d = I m for two cases. nJ = 0. The parameters th~l provide these characte.0036 0 0.istics are M = I kg.8 ± jO.7). As discussed in Section 2.8i*25] K = acker(Phl. Assume the resonant mode has a frequency w = I rad/sec and damping ( = 0. and k = 0.8 ± JOA . Acker is based on Ackennann's fonnula [Ackermann (1972)] and j. The following example specifically illustrates how a poor choice of desired poles can cause an undesirable response. (a) Pick all the poles at ~ ~ = 0. From Eg..3 Pole Placement Using CACSD Ackermann's formula MATLAB has two functions that perfonn the calculation of K: place.m.6.25 3.1 Control Law Design 287 8.i]' 1 _0 036 0 0.m and acker. and how a wise choice of desired poles can drastically improve the situation.. The statements (b) Pick the poles at = 0.H. (8. The specific difficulty is brought about by the necessity to pick II desired pole locations.16) where the cti 's are the coefficients of the desired characteristic equation.25.J) .
although the resonant mode oscillations did influence the response with damping consistent with the poles selected. the control is not attempting to change the natural frequency of the resonant mode at all~ rather.9681.8 ± JOA. It exhibits a response that is IIlllCh larger than that of the initial condition.9i*. 8. Pole placement by itselfleaves something to be desired. a step response. not all elements are measured: therefore.458 .2{a).l . 0.651 . Typically.0.7 give a better balance between system response and control usage. U output. The primary reason for the superior response is that the oscillatory mode was not changed substantially by the control.05.8i* . = 0.9 =: jO. steadystate errors. shown in Fig.9.7181. ilk)." There are two basic kinds of estimates of Ihe stale. But it is useful as a design tool to be used in conjunction with the other design methods discussed ill Chapter 7 or as a part of an optimal design process that will be discussed in Chapter 9.Xo) produces the closedloop response for d(O) = I m.181 place cannot be used for case (a) because of the repeated roolS. '" 0. if based on measurements y(k) up to and including the kth instant: and we call it the predictor estimate. (b) For the desired poles at ~ which produces the response to an initial condition.'zoh'i p = [9. the missing portion of Ihe state needs to be reconstructed for use in the control law..3.288 Chapler 8 Design Using SlaLeSpace \lelhods 8. but the time characteristIcs are consistent with the selected poles.2 Estimator DeSign 289 sysD = c2d(sysC. or the entire frequencyresponse shape. gain and phase margins. 10  (a) o .2(b).OS affect the overall motion of the system and their placement is Ie" criticaL Generally.9+1 * . . y 10 o (b) 10 15 20 Time (sec) 25 30 35 40 The control law designed in the last section assumed that all state elements were available for feedback. 18.. The selected poles at c = 0..9J [phl.249 0. It exhibits /l1l/cll less response of d with no increase in control effon.p) results in the feedback gain K = [0.1). The trick is to pick a good set of poles' The designer should iterate between pole selections and some other system evaluation to detennine when the design is complete.0] y = initial(sysCL.H. This will provide the missing elements as well as provide a smoothed value of the measurement. its oscillations are still visible on the output. = I rad/sec with a damping!.2 Estimator Design . x(k): We call il the current estimate. pole selections with a damping z: '" 0. For the response to an initial condition.gam. shown in Fig.0. 8. the only task for the control in modifying this pole is to increase il'. (a) desired poles all at z = 09. which is often contaminated with random errors or "'noise. The control is clearly much more effective with these desired pole locations.9 ± jO.gam.. Therefore.19) .9. and (b) desired poles at z = 0.4.8 ± JOA) have a narural frequency". The idea eventually will be 10 let 1/ = Ki or 1/ = KX.J) = ssdata(sysDl K=acker(phi. we modify the script above with p = [.. damping from!.05. Syslem evaluation might consist of an initialcondition time response as shown in the example. 1) Xo = [1 .0. the script sysC L = feedback(K*sysD.. 20 25 30 35 40 O~~"l control. We will first discuss methods to obtain an estimate of the entire state given a measurement of one of the stale elements. 15 8. _.0.2 Initial condition response for Example 8.9 ±jO. '" 0. once the desired pole locations are known. ilk).. .4J Figure 8. Since the mode remains lightly damped.02 to !..5) by its estimate.0.8 ±jOA o i ~ 5 0 10 l.tH5 0.. if based on measurements up to y(k . Two of the selected poles (: = 0.T. 0. J.05.2. + controller pole selection So we see thai the mechanics of computing the control law are easy.650 and this results in the feedback gain K = [0.2. replacing the true state used in Eq.05. (8.. d = I m.568 0.8+i* . (8. = 0.
(8. + The follm\ing section.4 Closedloop estimator Plant 8. L".LpH]. and hence this estimator should work if we can obtai~ the correct x(O) and set x(O) equal to it. (8.1 Prediction Estimators One method of estimating the state vector which might come to mind is to construct a model of the plant dynamics.21).3). and we would expect that it would diverge from the truth. were large enough so that the roots of <IJ . we find that the dynamics of the resulting system are described by the estimatorerror equation x(k <lJx(k).both approach zero.LpH are sufficiently fast. •. First. the equatIOn for it is i(k where L p is the feedback gain matrix.23) Figure 8. specify the desired estimator pole locations in the ~plane to obtain the desired estimator characteristic equation. if we feed back the dIfference between the measured output and the estimated output and constantly correc: the model with this error signal. The issue was also djscu~~ed for the continuou_" case in Section 2. (8. (8. x (8. (8.22) Thus. The result is estimator error equation (8.(0) [0 the control pules and how both set~ of poles appear in the l'omhin~d system. r.26) .21 i and substitute Eqs.290 Chapler 8 Design Using SlateSpace :V[ethods Figure 8. typically the sensed quantity and L can be chosen so that the system is stable and the error is acceptably small.<I> + LpH I = O.2.23) from Eq. the dynamics of the estimate error are those of the uncompensated plant. an initial errOr will decrease only because the plant and estimate wIIl.3 Openloop estimator /I(k) x(O) This is a homogeneous equation. there are unmodelled disturbances. 8.20) into Eq.3) and (8. For a marginally stable or unstable plant. r Model where the {J's are the desired estimator pole locations" and represent hOIV fast the estimator state vector converges toward the plant state vector. the estimator is running open loop and not Utlhzlfig any continuing measurements of the system's behavior..3 depicts this "openloop estimator. if the initial value of x is off. the divergence should be minimized. stable plant. r Model + 1) = <lJx(k) + ruCk). This scheme is shown in Fig. that is. (8. However. the estimate has been predicted one cycle in the future. . but the dynamics are given by [<IJ .24). will converge to zero for any value of x(O).4. and if this system matrix represents an asymptotically stable system. r I ~I . We call this a prediction estimator because a measurement at time k results in an estimate of the state vector that is valid at time k + I. Then form the characteristic equation from the estimatorerror equation (8. In other words. A difference equation describing the behavior of the estimation errors is obtained by subtracting Eq. If we define the error in the estimate as .20) We know <IJ.r x= xx.25) Plant •. + 1) = (8. (8." discus" how one ~hould select these poles in relation (8. Basically. Figure 8. T6 find the value ofL p ' we take the same approach that we did ""hen designing the control law. In an actual implementation.6. irk) will converge toward x(k) regardless of the value ofi(O) and could do so faster than the normal (openloop) motion of x(k) if the estimator gain. i(k) will not equal x(k) because the model is not perfect. and u(k). The Idea IS to construct a feedback system around the openloop estimator with the estimated output error as the feedback. and the sensor has some errors and added noise. For an asymptotIcally. <IJ. the error will never decrease from the initial value.2 Estimator DeSIgn 291 8. x(k •.2. However.24) + 1) = <lJx(k) + ruCk) + Lply(k)  Hx(k)].
Pick the de. and. = 0.[~ ~] + [ ~::. ] [l 0 ]I = 0 18. Time hislory of the prediction estimator error 1.olved for the coefficients and evaluated for T = D.t] ] Solution. the initial transient might be unimportant compared to the longterm performance of the estimator in the presence of noisy measurements. 18.6 and w" is aboul three times faster than the selected control poles Isee Fig.S. a constant of integration is obscured.5 Equations (8.'slgll!nr Satellite Arl/Illde Construct an estimator for the same case as in Example 8.2 Observability Given a desired set of estimator poles. If the problem is one of regUlation.24) for the gains in E.28) wilh like powers of:. in 11 unknown elements of L. IS. T 18.26) for any estimator gain L" leads to (8.2Si Equating coefficients in Eqs.32. and consequently the velocity.l'dk) '. = =5. (IA 71. L e · that would result by selecting faster e'timator poles. This situation occurs with a lise plant if only velocity is measured. 1' It is important to note that an initial estimator transient or. 18.271 and IS.elocity e~timate.52 L. observed are affected by position.8~ + 0.5 o 0.32 = O.26/ must be identical.(kl r O. and the evaluation of Eq. Therefore. where the measurement is the position state element.23) with L r given by Eq.5 • Example 8.lkj l) = X.t 2 to measurement noi~e. a velocity measurement is sufficient to estimate position because the acceleration. For example.ircd poles oj the estimator to he at ~ = OA ± jOA so that the splane poles have ( ~ 0. (8.2 EstImator DeSIgn 293 Figure 8. • . could be hastened by higher ralues of the gains.29' 8.] sec 0.<. 1.i:. for then it is impossible to deduce the initial condition of the position.O.OOSII IkJ + 1. if only derivatives of certain states are measured and these states do not affect the dynamics.5 Time tsee) : or [~ ~] . LI" TLI':  2 = 0. The transient 'ettling in X.27.L". but this \I·ould occur at the expense of more response of both . A system with cycle delays can also be unobservable because the state elements representing the delays have no influence on the measurement and can therefore not be reconstructed by the measurements.291.." We might have an unobservable system if some of its modes do not appear at the given measurement.8 +t . very slow poles (maybe even slower than the control poles) and their associated low estimator gains would give smaller estimate errors. + + D.Ik 1+ D. Optimal selection of estimator gains based on the system's noise characteristics will be discussed in Chapter 9.¥ 1 and .292 Chapter 8 Design Usmg 5tal~Space \lelhl'ds 8. 1.2. 8. we obtain 11 equation. For an oscillator. In the regulator case with very small plant disturbances.4 btimalOl D. provided v is a scalar and the system is "observable. (k)j X. the occurrence of an unmodelled input to the plant.2lv(k) <.. The desired characteristic equation is then (approximately I :' . the coefficient of each power of: must be the same. is L r uniquely determined? It is. (k + t. can be a rare event.2. " I ' so that H = [I 01 as given by Eq. A mathematical test for observability is stated in the next section Thus the estimator algorithm would be Eq.1. equivalently.2[\'lk)  Fiaure 8 S shows the time history of the estimator error from Eq. we obtain two simultaneous equations in the two unknown elements of L I . 18. (8.291 and with an initial error' of 0 for the position estimate and I rad/see for the .(k II = .25) and (8. (k)J. "hich are easily . just as in the control case. and the equations to be coded in the computer are <.1 I. ~ § 05 1 e. for an 11thorder system.
1 Phi = [1 T. we substitute <Il for <Il. (8.. )(~ . x(k) = x(k) + L. ~ 0 we see that the result is the same form as the system matrix <Il .301 ob.311 and the a. and use the controldesign results.23) to yield this feature.(:u.I1 filter.'s are the coefficients of the desired characteristic equation. H T for rand L. that is a. (8. (8.4 Current Estimators As was already noted.6). If this latency in the implementation causes significant errors in the performance of the system compared to the analysis. Place the cplane poles at ~ = 004 ± )004.2.3 Pole Placement Using CACSD If we take the transpose of the errorequation system matrix from Eq.33) can be arranged to minimize computational delays by performing all calculations before the sample instant that do not directly depend on the v(k) measurement. either acker or place can be used by invoking the substitutions above. (8. [y(k) .1. Gam = [T2 /2.»' P"fe Placemcnt 1I'ul1 .. that is x(k) = <Ilx(k ~ I) + ruCk  I).O 1] Control from this estimator cannot be implemented exactly because it is impossible to sample.23) arrives at the state vector estimate x after receiving measurements up through y(k . this delay between the observation instant and the validity time of the control output can be a blessing because it allows time for the computer to complete the calculations.1): and here. (8. (8.>~d in Chapter 9. Solution. . di.\lATL~B Design an estimator for the satellite attitudecontrol system as in E 'ample SA.5 PrcdidlH EslInwt. the computation time required to evaluate Eq. (8. (8.B statements T =. the previous form of the estimator equation (8. Making the substitutions in Eq. For calculation of L" with ~ATLAB. which i:..rK of the control problem from Eq. we obtain . for K. the calculation of lI(k) based on Eq.34) + Example 8. it is useful to construct an alternative estimator formulation that provides a current estimate based on the current measurement Y(k)." Modifvinu Eq.H' . For highorder systems control1ed with a slow computer or any time the sample periods are comparable to the computation time. This means that the Cttrrent value of control' does not depend on the most current value of the observation and thus might not be as accurate as it could be. p + 8. and output with absolutely no time elapsed.:..15) results in Ackermann's estimator formula (8.321 x The coefficient matrix with rows H<IlI is called the observability matrix and must be full rank forthe matrix to be invertible and for the system to be observable.2. The l\!ATL. However.. T Therefore.33 ) where . to solve the problem. <Il (~ u " + .7. The same restrictions apply that existed for the control problem.T] p = 1.2 Estimator Design 295 as a necessary condition for the solution of Ackermann's formula: its proof is given in Section 8.:ould have given the same ans\\'er.L I' Hf = <Il T  pjace v. used in th~ Kalmi.1 + a.(~) = (~ f3. In many systems. and the delay of almost a cycle between lhe measurement and the proper time to apply the resulting control calculation represents an unnecessary waste.4+i*4.. and the mathematics of the solution is the same. HTe. (8. however.t(k) is the predicted estimate based on a model prediction from the previous time estimate.4i* 4J 6 This fonn of th~ equations i:>. we also had a u(k) that was dependent on y(k) (see Table 3.f3. (<Il) = <Il" + a I<Il".ervability matrix where a.p)' result in 8. too. 5 \Ve plan to usc u(kl = KX in place of u(/o = Kx.23) is quite short compared to the sample period. In Chapter 3. perform calculations. Lp = acker(Phi'.HX(kl).~"l + . + a". (8.1).)'" f3"l =~" + a.24) [<Il. + a). Therefore.294 Chapter 8 DesIgn Csing StateSpace Methods 8. we organized the calculations to minimize the delay.
.296 Chapler R DesIgn Using SlateSpace \!elhods Figure 8.lk  II .HIIJ)x(k).5. Using Eq.6 ClmI'Il! EsimWlor P. To use the control form of Ackermann's formula to perform the calculations. is i(k + I) = [IIJ . and after sampling v(k) = I I . (8.O. Solution.30) and then compute L.36) and (8. \J.i. we take the transpose of IIJ . (k  1) + 0.37). HiCkH. using Eq. Funhermore. It shows that and i( represent different outputs of the same estimator system.68)'i\ Ik).4.35) with (8. To help understand the difference between the prediction and current foml of estimationthat is.23) and (8.O 1] Gam = [T'/2. that is L.1 i(k + I) = [IIJ . (8. Place the ~plane poles at ~ = 0.Ik) = x.361 substitutions IIJT for <I> and $T H T for r yield L.4+1*.6. 8.f. which is the same form as the system matrix IIJ . (8. (8. the estimator implementation using Eg.4] Lc = acker(Phi'..4 and 8.3). .T.(8.34). Alternatively. instead of K.Hx(k)). + 0..33)it is useful to substituk Eq.33) in a way that reduces the computation delay as much as possible is.2). the estimationerror equation for x(k).391 Therefore.~ .381 The two error equations.T] P = [.lulk  x.i. The result is' Example 8.(k) +. as in Fig. (8.I'.4i*. (8.38).33) from (8. + 5. and that the estimator gain matrices are related by (8..p)' result in I 'c = [ 0.68 rlk). = IIJILI" ~ By comparing Eqs. (8. 18.005u(k .Phi'*H'. before sampling '" lkl = .38).311 and (8.l and compare the error response to an initial error in the velocity wilh that obtained in Example 8. obtained by subtracting Eq. (8.36) with (8.L.~s_ Xrd"ers (OIh{' ~'llk) = x. as should be the case because they simply represent the dynamics of different outputs of the same system.'.33). The MATLAB statements T =. e~limator error.:e u"e xhere to b: x .L. Therefore 7 Equation 18.". = (1 . (8. x.34) as a block diagram. howe\"er.'. we note that it i.5. .2 Estimator Design 297 it could be modeled and accounted for in the estimator equations by using the results of Section 4.331 and (8.IIJTH' L.35). we can conclude that x in the current estimator equation.3'2).IIJL.2v(k). + O.23) and (8.24).lk  Ii 1. To use Ackermann" fOffilUla for L.x_ In both l~a". (8.2 18.4.40) • The relationship between the tw'O estimates is further illuminated by writing Eqs. is the same quantity as x in the predictor estimator equation.3) from Eq.3.30) with H replaced by HIIJ and find Phi = [1 T. (8.33) into Eq. Equations (8. [y(k) . (8. we could compute L p using Eq.6 Estimator 8. (8.rK of the control problem. similar to Eq.0. we could use either form as the basis for computing the estimator gain. We can also determine the estimatorerror equation for by subtracting Eq. L.23).1) I). can be shown to have the same roots. (8.'1c PI~(Lm01t \lith ~trru\B x x Design a current estimator for the satellite attitudecontrol system as in Examples 8. (8.4 ± jO. {8.24) except that HIIJ appears instead of H. This results in x(k block diagram + I) = IIJx(k) L rll(k) + IIJL. I) dctinc~ xto ht x .x. Therefore. (8. we use Eq.Ik) = .HIIJ and get IIJI .68 ] 5.4. where 0' (cP) is based on the desired root locations and is given by Eqs.
4l).39) nor (8.7 shows the time history of the estimator error equation from Eq. Its disadvantage IS that tt IS out of date before the computer can complete the computation of Eqs. given measurements of some of the state elements. 15 and the portion describing the dynamics of the unmeasured Slate elements is (8. let us panition the state vector into two pans: Xu is the ponion directly measured.'o~~S:ll. The complete system description.40) can be used. If lJ> is singular. one should us" the 8.6. the predicted estimate [irk) from Eq~ (8.3).Luenbergcr (196+1.. which is v. [x(k) from Eq.42) .. (838). This development follow~ Gopinath (1971 l.' One might therefore ask: Why bother to reconstruct the state elements that are measured directly? The answer is: You don't have to. {or oh"CfVer"J w('[~ originall)' propo~ed ~). The current estimate is the obvious choice because It IS based on the most current value of the measurement. (8. although.5 ReducedOrder Estimators The estimators discussed so far are designed to reconstruct the entire state vector. neither Eqs. 8.7 Time history of current estimator error ~ (8.I). To pursue an eslimator for only the unmeasured part of the state vector. y.. whIch will cause less damping in the implemented system t~a~ specified by the deSIred poles.44) I 1.3). the current estim~tor implementation exhibits a response which is about a c)' cJe taster.41) Figure 8. thus creating a delay that is not accounted for in the des!gn process.5 2ol. when there is significant noise on the measurements. Note that we now have two estimates that could be used for control purpose. however.5). . Figure 8.~ 0.44) have the same relationship to the state vector x" that the original equation. like Eq~ (8. The figure shows verve similar results compared to the prediction estimator in Ftg.\. • current estimate because it provides the fastest response to unknown disturbances or measurement errors and thus better regulation of the desired output. estimators can be deSigned for these systems as discussed in Section 8. (8. .5: ho" cvcr.33)]. the estimator for the full state vector provides smoothing of the measured elements as well as reconstruction of the unmeasured state elements. we obtain o . Any deficiencies in the system response due to the latency from the computation lag that is found by simulation or experiment can be patched up with additional iterations on the desired pole locations or accounted for exactly by including computation delay in the plant model. (8. Therefore. If we reorder the . thus providing an entire sample period to complete the necessary calcula~lOns of u(k) before its value is required. agalll with an initial error of 0 for the position estimate and I rad/sec for the velOCity eSl1mate. However. and xh is the remaining portion to be estimated.. as can happen with systems having time ~elays.43) where the righthand two terms are known and can be considered as an input into the x" dynamics.43) and (8. becomes i 8. The use of the predicted estimate for control eltnunates the modehng ~rror from the latency because it can be calculated usmg the measurement.5 Time (sec) Note that this is a relationship between a measured quantity on the left and the unknown state vector on the right.33) and (8.5 ~ (8.23)] and the current estim~te. Eqs. (8. (8.2. portion of Eq. Generally. (8.\ (k .298 Chapter 8 Design Using SlateSpace Methods 8~2 Estimator DeSign 299 at which time the state vector estimate is available for the calculation of the control u(k). had to the 8 Reducedorder t:'qimatorl.
h(k  [I + 0.5 • Example 8.45) also exists: that is.dcr Eswnilwrfor Sau!litl' At/illUic Detennine a reducedorder estimator for the same case as in Examples 8A and 8..§ ~ 0 ] 0.r"u(k) . is into the prediction estimator equations (8.45) from (8. _  . + L.(k+l)<P.5: thcrefore L. from ~ $w $h"x)k) $.+91 2 OL.0.(0. (8..(k) and therefore L. (8.  We note here that Gopinath (1971) proved that if a fullorder estimator as given by Eq. (8.I) ..:) = 0 (8. ] .. are all scalars. (a) by picking routs uf 1. ] [ x.I = 0.$"h]xh(k)... look something like x' = 0.') .(k) + r"lI(k) +LJt. and there i. $"1> $bh Figure 8.471 to be in desirable locations. J' (8..'1 II and (8.4. the pole corresponding to the speed at which the estimate of scalar "elocity converges.I).481 .$""xh(k)].075/1(k = x' .005 u(k .t. the "elocny to be esttmated 18.7. The estimator equation. (8. Therefore L..46) .1 + LJ = 0.8 shows the time history of the estimatorerrorequation UU61 with an initialtv'elocity) estimate error of I rad/sec. that is... 8.5.5 and 8. x.. (8..5 I 1. r $"h ~I~.(k) + $"a\."x. A (~. or (b) using Ackermann's formula $"h $ ~h 4l'lr.\.2 ESllmalor Design 301 entire state vector x. Thus the reducedorder estimator equations are 'bik) = .L.47) anywhere we choose by choice ofL.5 and L..5'h(k .(k) . 18'+7) we pick L.5 Time (se(.I) Subtracting Eq.45J TI. = 5.'dIICcdO.23).'/.0"..(k)r"u(kl.5'~1. Following this reasoning.0 [_.I)]. we can place the roots of Eq. we will pick the pole at ~ = 0. Figure 8.8 Time history of reducedorder estimator error 1. is selected exactly as before.. is a scalar also.I 1. The figure shows very similar results compared to the velocity element estimates in Figs.[ uik  1) 18.'(k) . there is no position estimate because this formulation assumes that the measurement is used directly without smoothing.. which had two poles at ~ = 0.<P""x.43) yields the error equation xb(k + 0. (8.23) exists. Of course.II(k).(k + 1) . For this estimator to be about the same speed as the two previous estimator examples....1) . This results in . where <Il aa' and so on.1 1'.. Solution.50) +5.:1 ~ $hh + 5 Y(k). ./>' + r/.. From Eq... then the reducedorder estimator given by Eg. (8. = [ the measu~ed positionstate v.4 ± jO.'121.5 ylk . we arrive at the desired estimator by making the following substitutions x $ rll(k) +++ XI). T .45).300 Chapter 8 Design Lsing StateSpace Methods 8._ . only one estimator pole to pick.lk . + I) = and after sampling ($h" .$"b 1= u e (.. v(kJ H .5 X. \Ve start out by partitioning the plant equations to fit the mold of Eqs.5 '" 0.C implementation in a control computer would.ylk .7 R..(k + I) = $". beforesamp[ing..
L.LI'H]j(k .H$+ L. 8. (8. Using Eq.rl(j((k). lead to identical conclusion~.511 compensator which can also be written in terms of the estimator error using Eq. because we designed the control law assuming that the true state. u(k) Plant I x(k+l) 'hUe) +ru(k) ~ Sensor H _. (8. However.54) tI(k) = Kx(k).56) can be converted to lransfer functionform using the same steps that were used in arriving at Eq.33) or (8.9 that the portion within the dashed line corresponds to classical compensation. In other words.. for Eq.j((k)).rK .. If desired. (8.I) + LpY(k .I) + L. it is of intereq to examine what effect this has on the system dynamics.HrK I = O.521 Combining this with the estimatorerror equation (8. was fed back instead of or j(. Eq.56) and using Eq.H$ .Hx(k)] or Eq. Eq. x. (8.a y(k) x 8..~)a.. nor the estimator poles. zI$+LH 0 I' rK ~[$+ rK I 1=0 (8.only' the prediction e.6) becomes x(k + 1) = $x(k) . (8.33) yields for the current estimator The characteristic equation is x(k) = [$ .y(k).. (4.25).HrKjx(k . (8. (8. Ii(k) = I(j(k).23) yields for the prediction estimator irk) = [$ .. I u(k) • Estimator I I  Control law K ~ x(k+l) =4>x(k) + h(/<) +Lp lY(k) .. !~[  $ + L"H! I~I  $ + rK! = a.302 Chapter 8 Design Using StateSpace ]v\ethods Figure 8.rK . A schematic of such a system is shown in Fig.3. we note from Fig.8). We will see that it has no effect~ The poles of the complete system consisting of the estimator feeding the control law will have the same poles as the tWO cases analyzed separately.LeH 0 ] [ j((k) ] [ x(k + 1) rK $ .5 for an analy..L.57).59) and are neither the control law poles.I).21) x(k + I) = $x(k} . (8.1) and implement it.57) which...64). 10 This description of the entire sy~t~m does not apply if the e. the control system can be completed."timator model i~ imperfect see Section 1].1 The Separation Principle The control is now liCk) = Kj((k) I I I I I I L r . because of the zero matrix in the upper right.56). (8. The fact that the combined controlestimator system has the same poles as those of the control alone and the 9 \Ve shov.531 (8. + I) (8.(~) = O. (8..timator ca"e..2).9. using an estimated state vector (Section 8. can be written as The poles of the compensators above are obtained from.rK(x(k) .45) ~~ ~~~~~_~~ I I I I and the controlled plant equation (8.3 Regulator Design: Combined Control Law and Estimator If we take the control law (Section 8.$ + rK + L. (8. 8.55) and..is of that ca~e 1:1 .rK x(k)' i(k estimator alone is a special case of the separation principle by which control and estimation can be designed separately yet used together.24)" we obtain two coupled lO equations that describe the behavior of the complete system ] = [ $ . The uther estimator:. but can be of interest for comparison with compensators designed using the transform methods of Chapter 7. This results in what was called .58) (8. (8. The difference equation for this system or "statespace designed compensator" is obtained by including the control feedback (because it is part of the compensation) in the estimator equations. the characteristic poles of the complete system consist of the combination of the estimator poles and the control poles that are unchanged from those obtained assuming actual state feedback. To compare this method of design to the methods discussed in Chapter 7. for Eq. (8.9 Estimator and controller mechanization 83 Regulator Design: Comhined Control Law and Estimator 303 8. Eq. These poles need not be determined during a statespace design effort. (8.
45) is [ xj. it is easier to see what is going on by using x or in place ofi.. (8." 5. a" i:.0. to find that l .10 shows the response of the system and controller to the initial conditions.57) is • = Example 8. We now know that these desired root locations will be the closedloop system poles.63) Put together the full feedback control system based on lhe calculations already done in Examples 8. The overall system response is slower and has a seuling time of about ".. Determine the D(. It does not cost anything in terms of actuator hardware to increase the estimator gains (and hence speed of response) because they appear only in the computer.5.6(l) includes OJ mlnu~ "iign bCGlU. using the prediction estimator.smg StateSpace ~1ethod5 8. Detcrmine the D(~ I for comparison wilh a classical lead compensation. consi.60IJ. and then to pick the estimator poles somewhat faster (by a factor of 2 to 4) so that the total response is dominated by the response due to the slower control poles.5 sec.0 l r ~  ~. Use the control gain.L.561 with the \"alues of K and L o plugged in and. being in differenceequation form. Note lhe estimator error at the beginning which decays in about 0.4. Likewise. In practice. using the current estimator. Plot the response of the system variable. we developed techniques to compute K and L.) will have a one cycle delay between the input and output.I radi'ec and zero for all other inilial conditions.2 also apply to picking these poles. from Eq. and lhe estimator gain. . so that u(k) = [K" • Example 8. K = [10 3. from E(. x" directly in the conrrollaw and the estimated part.f"K. the normal convention used in Chapter 7. The upper limit to estimator speed of response is based 011 the behavior of sensornoise rejection. given the desired locations of the roots of the characteristic equations of the control and the estimator. for the remainder. However. formulated in Eq. (8.601 and where K" and K h are partitions of K according to the dimensions of Xu and xI>' The D(z) could also be found from Eq. the control gain K needs to be panitioned. (8.64) where mther than . K = [10 ).1 and 8. For the prediction estimator. for the current estimator.I radlsec and zero for all olher initial conditions. (k). when measurement noise is not an issue.2J. it is convenient to pick the control poles to satisfy the performance specifications and actuator limitations.:] where K = [K" Khl.~ J. we find U(z) YiZ) and = D (z) I' = K[ ~I  «I> + fK +L B = «I>". This is \ery similar to a classical lead compensator except that it has two poles instead of one.68 5. Comment On whether the responses are consistent with your expectations. The compensation equations consist of Eq. the transfer function for the reducedorder compensator is found by using the measured pan of the state.r = [0. 18.5J. D (~l = _.) and the result for the reducedorder estimator using Eq. that is.61 ) estimator pole selection In the previous sections.3 Regulator Design: Combmed Control Law and EstImator 305 compensation in Chapter 7 and usually referred to as D(z).istem with the estimator poles. we use zpm lor Eq.53). which is the subject of Chapter 9.1 and 8.8"5 0 2 :::: ) 0. To find the transfer functIOn form.fK .) for comparison with a classical lead compen'ation. Thu'.304 Chapter 8 Design L.(k + I) (8. In order to evaluate the full system response with the estimator in the loop. Figure 8.tent with the control poles.' Cll/T01[ Esl1nW(l'" (8. Comment on whether the respon'es are consistent with your cxpeclations."e it i~ the transfer function from ["is. L" = [I.H«I> «I> . (8. can be coded directly in a control compute~.65) x There is a compensator zero near the two plant poles at. (8. (8. and the estimator gain.9 [«I> fK ][X(k)] L. The same meter sticks that applied to the classical design and were discussed in Section 7. This could be thought of as a condition that would result from a sudden disturbance on the system.. to L'(. (8. Plot the response of the system variables for an initial plant velocity of . for an initial plant \elocity of . [~i~ : :: ] [ ~(k+I)] x(k + I) ~(k + I) ] [L~H «I>  r~~ LpH ][ ~i~~ l (8. Use the control gain. = + 1 and there arc two compensator poles considerably to the left.. The result for the predictor case using Eq.56) is Put together the full feedback control 'ystem based on the calculations already done in Examples 8. L. Solution.557 (8. xj. Note that the difference equation that results from this D(. Statcspace design using a fullorder estimator will always produce compensation thaI is the same order as the plant. it is necessary to simulate both the real system and the estimator system as wa.L.56) by using tfm in MATLAB or. 11 Equation (8.62) • the result for the current estimator using Eq. (8.H«I> x(k)' COlJlpensatIon Based l111 (h. co". (which define the compensation).21.7 'ec.57).5]. that is.«I>"h H JlL P I' (8.8 COtl1l'fIlsalwl1 Btlst'd Oil tht' Prcdl110r Estitl1ll[lll Khl [~.
Example 8.5.J " l~ Time I sec I Solution. (8.9 have the benefit of more attenualion at high frequencies. The closedloop root locations corresponding to K = 27.6. because 0( the extra: in the numerator. 8. Also. Plot the response of the system variables for an initial plant velocity of I rad/sec and zero for all other initial conditions. that is.5 li/4 11/4 1.8 ± jO.51. : .7 is now the variable K.5 2 0~. there is no I cycle delay between input and output._+ the Redl. thus reducing the sensitivitv to measurement noise.12 shows the response of the system to the initial cunditions.~:.50 I and (8. The compensation equations consist of Eq. plugged in. + + Example 8.8  Figure 8. For this design a gain of 27. Determine the D(:) for comparison with a classical lead compensation.5 . . .394 18. A sketch of a root locus.08182 . Put together the full feedback control system based on the calculations already done in Examples 8.25 and on the one estimator r~nt at c = (1.9 1..265 ± j0. K is given in Fig.61 )." <l.792) .1 and 8. 8.306 Chapter 8 Design Using StateSpace \'lethods 8.2375' .8 and 8. K = [10 3.O'.L5.67) This compensation is very much like that from the prediction estimator: however. as they should.10 ContpC!1SaUOI1 Bascd on Figure 8.' : _ 0. This faster cycle response required less lead from the compensation. we find that D (:) = 25. Figure 8.eedOrdcr EsUmatol The higher order compensators that resulted in Examples 8.7 are indicated by the trian"lcs and lie on the two control roots at ~ = 0.13. (8.IL.. = 5. It is vcrv similar to that of Example 8. (8.. Use the control gain.10 due to the more immediate use of the measured signal.5c. This also follows from the fact that they provided a smoo{hed value of the measured output as well as reconstructin o the velocitv state variable Full order estimators are also easier to implement be~ause of the< simpler matti.10 Time histories of controlled system with prediction estimator. As a result. with the values of K and L e• plugged in.1 Solution. we find after much algebra that D (.5. This compensation now looks exactly like the classic lead compensation that was used often in Chapter 7 and would typically be used for a I Is' plant.11 shows the response of the controlled system to the initial conditions.. L. using the reducedorder estimator. Example 8.9: the only notable diffcrence is the fiNorder response of the ~stimator error. as exhibited by the zerO being funher from: = 1. The compensation equations consist of Eqs.57) and. and the estimator gain. reducedorder estimation is not often used in practice. use the D(:) to construct a root locus for this system and show where the desired root locations for the control and estimation lie nn the locus.s.5 1.= '77: .0 e rl x~ t~ o 0. :(: . which slightly reduced the control usage.61). Comment on whether the responses are consistent with your expectations.5 L5 Time (sec) 2.) . Note the somewhat faster response as compared to Fig.0... equatIons that result using II = Ki rather than the partitioned Eq. With thc values nf K and L.11 Time histories of controlled system with current estimator.0..3 RegulalClr Design: Combined Control Law and Estimator 307 Figure 8.1""::'2.
This poleselection criterion will keep the actuator sizes to a minimum. The penalty associated with fast estimator poles is that they create an increased sensitivity between sensor errors and estimation errors. The optimal design methods discussed in Chapter 9 can also be used to select pole locations. Estimatorerror pole selection is a similar kind of design process to the controlpole selection process: however.·een various system specifications developed in Section 7. thus coupling the estimator design with the control design and complicating the process. For highorder systems.3..10 Real Axi~ 8.308 Chapter 8 Deslgn Lsing StateSpace Methods 8. which are the subject of this chapter. Fast poles in an estimator do not carry the penalty of a large actuator like they do in the control case because the large signals exist only in the computer. Typically.3 Regulator Design: Combined Control Law and Estim. or to ML\10 systems. PowelL and EmamiNaeini (1994). They are based on minimizing a cost function that consists of the weighted sum of squares of the state errors and control. Sections 7. have been encountered throughout the examples in Chapter 8 to this point.5 J. For an accurate plant model with small disturbances but large sensor errors. Optimal methods can be applied to the SISO systems. It is also convenient to keep the estimator poles faster than the control poles in order that the total system response is dominated by the control poles. the optimal estimation is achieved with very low estimator gains (slow response) because the estimator is best served by relying primarily on the plant model. the design tradeoff is somewhat different. in this case the total response could be strongly influenced by the location of the estimator poles.\) 15 ~_\. For cases where this criterion produces estimation errors due to sensor noise that are unacceptably large.3.4 in Franklin. a system with a plant model that includes the possibility of large disturbances but with an accurate sensor achieves the best . a tcchnique that minimizes control usage is simply to add damping with lillie or no change in frequency. we select welldamped estimator poles that are two to six times faster than the control poles in order to provide a response dominated by the control poles. the poles can be slowed down to be less than two times the control poles: however.:: + _i"~ 0.3.12 Time histories of system with reducedorder estimator. The key idea for controlpole selection is that one needs to pick the poles so that the design specifications are met while the use of control is kept to a level that is no more than needed to meet the specifications. and EmamiNaeini (1994). a technique called radial projection that was demonstrated in Example 8. which helps to minimize the cost and weight of the control system. On the other hand. The key idea for estimatorerror pole selection is that the estimation errors should be minimized with respect to the prevailing system disturbances and sensor noise.Itor 309 Figure 8. In the optimal estimation discussion in Chapter 9 we will see that the optimal estimator error poles are proportional to the ratio between the plant model errors and the sensor errors.13 Sketch of the root locus for Example 8.5.j Time '"eel Figure 8. The relationships betv.6 as well as Franklin. Powell.2 Guidelines for Pole Placement The selection criteria of the closedloop control and estimator poles (or roots.1 can be used as an aid in the poleselection process.4 and 7. The relative weightings between the state errors and control are varied by the designer in order to meet all the system specifications with the minimum control. Also see the review of statespace design for continuous systems in Section 2. For the case where there is a lightly damped openloop mode. Example 8. it is sometimes helpful to use the ITAE or Bessel prototype design root locations as discussed in Section 7.10 1.5 I ~ 1(/4 e.
is at equilibrium for the desired output. therefore. In these cases. Although so far in this book we have only considered systems with a single control input and single output (SISO). In some cases.ence value.68) If the system is Type I or higher and r is a step." but the feedforward component of the input is often not used. is at a desired refe. to a reference state that is an equilibrium one for that r.:vhether they require a steadystate control input or not. and then we will proceed to the case with estimators.15(a) with an integral that is an estimate of the steadystate control.. for example. a structure that occurs when the sensor is capable of providing onll an error signal. is that it should transform the reference input.4 Introduction of the Reference Input 311 estimation by using a large estimator gain (fast response) in order to use the sensed information to correct the model errors as quickly as possible. = [l 0): that is. We then tum to a discussion of output elTur command. The proportionality constant. of this section's results and compare the relative advantages of the structure made possible by the statespace control/estimation approach with the classical approach. we will include the possibility of a steadystate control term that is proportional to the reference input step. a topic that is the subject of Section 8.1.. thus I ~ Thi~ is the only case that ha~ a unique and exact answer. 8. but no mention was made of how to structure a reference input or of the considerations necessary to obtain good transielll response to reference inputs. which essentially replaces the u" in Fig. and. This desired output. we will allow for that in the development here and in the following subsection.· (0 inputs . and u = K(x . x . (8. Y. we will discuss the implication. we wish to command the position state element.1 with any of the estimators of Section 8. In conclusion. there will be an error because some control is required to maintain the system at the desired x . and the final state x(X) = x". = x. We will. of interest to study this structure in order to understand the impact of its use on the dynamic response of the system.might not be the same quantity that Ive sense and feed to an estimator that has been called y and determined by H in the previous two sections. although other situations have be~n . For example. however. that is.14 Block diagram for fullstate feedback with reference Input as shown in Fig. however..2 is a regulator design in that the' goal was to drive all states to zero. there will be no steadystate error. It is.69) Figure 8. feed forward is sometimes used to reduce the demands on the integral so that it need only provide the error in the feedforward control. The output error structure is also the one that results if one is designing the compensation using transferfunction methods and the reference input is structured according to Fig. '2 The basic idea in detennining N. Often the designer has sufficie~t knowledge of the plant to know what the equilibrium state is for the desired output. For complex plants. We wish to find N so that som~ system output.15(a). so that N.. of the control and the estimator to give satisfactory natural mode transients to initial conditions or disturbances. be the same.5.x. 13 See Trankle and Brys. 8. in which case the determination of N is complete. ~'.x. it is difficult to achieve a high enough bandwidth when replacing feedforward with integral control: therefore. will be solved for in the formulation.:alled "model fol1O\. therefore. Instead.1 Reference Inputs for FullState Feedback Let us first consider a reference input for a fullstate feedback system as in Eq. if matched by the actual state. we refer to it as "feedforward. often r.5). The structure is shown in Fig. for a step command to Example 8. r. More specifically. if we desire that d = rthat is.14 and consists of a state command matrix N that defines the desired value of the state.5. For the double mass"spring system of Example 8. 8.tudied. 7. is useful to solve for the equilibrium condition that satisfies" = r. N. 8. (8. require that the number of inputs in u and desired outputs in Y.3. but the velocity state element will be zero in steady state.on (1978) for a more complete discussion and exten~iom: of the ideas other than steps. 8. x" that. .310 Chapler R Design Using SlateSpace \Ielhods 8. than one input and output (MIMO). that H. = [1 0 0 OJthen we should set N: = [I 0 1 0] because that provides a state reference.r = x. Chapter 9 considers the case of mor~ For Type 0 systems. To study these matters we will consider first htm one introduces a reference input to the fullstate feedback case. it u 5\ =N r.4 Introduction of the Reference Input The compensation obtained by combining the control law studied in Section 8. N". an attitude error from a gyro or the pointing error from a radar signal.\ ing.. the preferred method of providing for zero steadystate error is through integral control or bias estimation.). the typical case.4. this can be difficult. If the resulting u H is aClllally computed and implemented in the reference input structure. I( (8. = ". we have defined N. We designed the characteristic equation." In order for the solution to be valid for all system types.
.l81 and iii = 0. and :'II" according to N = N" +KN.4 Introduction llf the Reference lnpul 313 Figure 8. and the evaluation ofEq._~~. (8. we are assuming the system is at steady state. Solution. note that this input structure can be very sensitive to errors in K [n thi. X.71 ) Furthermore. as already' discussed._ which defines the desired value of the state. from Eqs. cannot be .' .l5(a). 18. thus producing an extreme sensit. This example shows that there are some systems where it is better to use the structure of Fig. which is ensured by the resulting \'alue of N.. ol\'ed if lhe planl ha.73) (8. and N can be carried out bl' the MATLAB function refi... • (bl ~_.74) (al It is also possible to enter the reference input after the gain multiplication according to Fig. Compare rhe two strucfUres (a) and (hi in Fig.+ This._ • speeding up the system response. (8. therefore. = Y. = [I 0 I 0] and N" = O. panic"lar example. N" "ill be zero for any system of Type I or higher. H N = I.. = [I 0 0 0].m contained in the Digital C'~ntrol Toolbox.71) leads to iii = 0.15fb) is preferred due to its simplicity.71) and (8.. if one of the elements of K in Eg.. defined to be x = rd . However. 18.70) (<11. and the solution will simply give us N" = 0 and N. (8.005 using the K from Eq.191. The state wa. N is the result of a difference of two numbers (K j and K.. a nro m:: = I + rN" = O. .72) 1.15.j.. The fact that iV" = 0 makes sense because this system is in equilibrium without the need of any control as long as d .~ where it is desired to command d to a new value.731 leads to N.'  .. the resulting error in iii would be 120'CC' To avoid the high 'ensitivity for cases like this.r + rN"r = O. do not depend on specific values of any parameters in the plant and are therefore not sensitive to madding errors of the plant.. x(k + I) = <IIx(k) + ru(k) (<II ~ l)x" '* x" = <IIx" + ru" = 0: or + ru" . The elemeuts of:\. = r.. 8.I)N.701 which reduce to H.I yields the desired result" ~] [ ~J = [ n (8.x. . the steady state requirements for the system are that Example 8.] r. to command a desired value of d..18) were in error by I q. and. A. which reduces to (<II .72) into one matrix equation [ :. x" Continuing on then. Nrr = x r = x"' H.15(b) by combining N.\ ity.ical system shown in Fig.i \' . 18. 8.. it is advisable to structure the reference input as in Fig.N.69) and (8. In fact. most cases do not exhibit this sensitivity and Fig.15 (a) Block diagram and (b) modif'ed block diagram for fullstate feedback with reference input and feedforward Collecting Eqs.18. 8. On the other hand. 8.8.   . .I)N. llse of Eq.r. "' expected by inspecting thc phy. (8. the steadystate value uf cuntrol for a step will be zero.15(al. However.312 Chapter 8 Design Csing StateSpace I\lethods 8.) that are dose to each other in absolute salue...11 Compute the referenl'e input quantities for the system of Example 8.011 using the K from Eq. Calculation of N. extremely close for the first case I which also exhibited poor response I.r = rand " (8. H. if the system is Type I or higher. Specifically. Therefore. (8. .
(k.2 Reference Inputs with Estimators: The StateCommand Structure The same ideas can be applied to the case where the estimator is used to suppl~ a state estimate for control in place of the actual state feedback.561 and (8.x. lt may be useful to inspect the performance of the system in terms of the desired output y. that is u(k) ° = K(ii(k) . (878) For the predictor estimator. It is often lIseful to analyze the effect of disturbances. and the estimator error i.. the plant gain can vary considerably in practice: therefore.3) are augmented to include the disturbance.77) Under ideal conditions where the model in the estimator is perfect and the input u applied to plant and estimator is identical.[K .33) is used with u(k) = K(x(k) . input scale factor errors. (a) as derived. or. 8. This can be accomplished with the output equation y. should be used with u(k) as shown by Fig. We use the feedback to the estimator through y only to correct for imperfections in the estimator model.57) should 1101 be used in the estimator box in Fig. we must combine the estimator equations with the model of the system to be controlled. the designer can simply ignore the computed value of N" and solei) rely on N.79) Note that the term on the right with r introduces the command input in an identical way to both the plant and estimator equations. as Figure 8.x') + N"r = Kx(k) + ~r.) + N"r = KX{kJ + Nr. for the reducedorder estimator.5. 8. (8.:" ] . (876) 8. usually choose not to use any feedforward for Type systems. with the current estimator. (8.J ] u(k) Ib) [ ilk) [ ~' 1 _OK] [ ~(k) I ] x(k) (8.23. To analyze the response of a system. 8. +[ 1'1 ] 0 w(k).4. important to structure the system so that the control u that is applied to the plan! is also applied to the estimator as shown in Fig. (8. (8.16."ith u(k) = [K" K. and unknown plant disturbances. Eq. If this is the desired action for a control design usin~ state space. + lurk). it i.' the controlu.J [ ~: ] + Nr.314 Chapter 8 DesIgn Lmg SlateSpace Methods 84 Introduction or the Reference Input 315 If the system in the example had been Type O. Eq.16 because they were based on control feedback that did not include the reference input. This means that Eqs. Therefore.80) . the form of the estimator given by Eq. so the system equations (8.)] [ [ . (8. we would have found that N" was nonzero and that its value was inversely proportional to the plant gain However. Eq..62) is augmented with the input command and disturbance as follows: fK f~ [ x] k~l = [«I> «I> . However.rK . for guidance on how to command the state vector to the desired value.45) should be used '. 8. The basic idea of the estimator that resulted in the structure of Fig. (b) simplified rEJl I I (a) x(k + 1) = «I>x(k) y(k) = Hx(k) + fu(k) + fjll'(kl.16 Block diagrams for the best reference input structure with estimators: the state command structure. The term on the right with II' introduces the disturbance into the plant only: the estimator is unaware of it. designer. (8.75) or.4 is to drive the plant model in the estimator with the same inputs that are applied to the actual plant. (8. thus minimizing estimation errors.x r ] x /' +~ r~ r = ./ K. (8.16. no estimator error will be excited. II'.LI'H ] [ ix ] k + [ fN ] X L"H r(K) . relying instead on the feedback to keep errors acceptably small or by implementing integral contrll] as discussed in Section 8.
the system equations are found by combining Eqs.4 Introduclion of the Reference Input 317 For the current estimator.55). and this signal alone must be used for control.~2'. 8..3 Output Error Command Another approach to the referenceinput structure is to introduce the command only at the measured estimator input. The determination of the structure in which the reference command is entered into a system can be viewed as one of "zero placement" and. This solution is sometimes forced on the control designer because the sensor measures only the error. = [I OJT and N" = O. Using step III MATLAB yields the unit step responses shown in Fig. Evaluation of Eq.56) becomes • Figure 8.] .:) I I I I I 11 I I I I I I r \ \r . as shown in Fig. Therefore. 8. classical manner with the Dpl:) from Example 8. (8.316 Chapter 8 Design Using StateSpace l\1ethods 8.I'.~rl ] w(k). Note ai. 7.u/5 I I I Time r"e. in fact. temperature. The fact that the system response to an input structured as in Fig..78). Note that the estimator error remains zero: thus the response is exactly the Same as if no estimator were present. nor does it allow us to place Dp (:) in the lower feedback path.17 Stepresponse time histories for Example 8.:. D(z) ·5 O'. that the structure shown in Fig. ·2 ·3 ·4 .18 Reference input as an outputerror command and the system response can be determined by solving Figure 8..801. It is worthwhile to reflect on the fact that the combined system has poles that consist of the control alld the estimator poles.17 would also have resulted if using no estimator. (8.Ot5... Rather. the estimator equation (8. (8. or setpoint.4. 8. 8. 8..17. N = K] The desired response of the system is obtained from Eqs. or " reducedorder estimator.5c:.12 4 Plant y r.8 and verify that its step response does not excite an estimator error.16.J~ Output ermr Compen>ator. Likewise.18.79) and (8. some radar tracking systems have a reading that is proportional to the pointing error. a current estimator.57) and (8. as given by Eq. No absolute indication of the reference temperature is available to the controller.. many thermostats have an output that is the difference between the temperature to be controlled and the reference.811 ~~ + L.5. which yields [ ~ Ll = [L.73) yields 1'i.HrN ] r(k) + [ L. (8. Solution.8 placed in the upper path as in Fig. • Example 8. 8. In this case.~$ +[ $ r~[~\H$ ] [ ~ 1 (8.l6(b) does not allow us to represent the system in a simple.:. it is best to stay with the statespace description and enter the equations in the control computer based on Fig.l6( b) did not excite the estimator response means that the transfer function of this system had zeros that canceled the estimator poles. The response in Fig. it has been shown that it is possible to place the zeros of the closed loop transfer function at any arbitrary location [(EmamiNaeini and Franklin (1981 J] .5~ L_~ I " .12 Reference Input Command tv Sarellite Attitltdc Detennine the statecommand structure for the system whose regulator was found in Example 8. For example. 8.
8.17 (about 709< rather than 209<) and an increased use of control. therefore.318 Chapter 8 Design USIng StateSpace \Iethods 84 Imroductlon of the Reference [nput 319 Note that the command input r only enters the estimator. 8. and it starts at thc first cycle rather than being delayed by one cycle. The system is analyzed using Eq. The result is shown in Fig. 8. 2. A current estimator would produce results similar to this case because it. This result produced a settling time for the reducedorder case that is about one sample period faster than the prediction estimator. 100. shares the feature of an immediate response to the measured output.13 ~ and the transfer function that arose from the reducedorder estimator is given by Eq..5 15 Time (sec. Solution.19. 8 0 1 • ~t . Figure 8. Example 8.19. . .20.67). as was the case in Fig.19 Output time histories for prediction estimator with output command.80).821 and the output Eq.5 • Example 8. c.16 provides a faster response with less control usage than the 5 a OJ 1.19..3.14 Output Command Structure with a ReducedOrder Estimator Analyze the performance of Example 8. (8."ote again that there is more overshoot (about 50o/c) than shown in Fig.12 when using the outputcommand structure.5 Time (sec) 2. The output time histories using these transfer functions are shown in Fig.. c in overshoot as compared to that of Fig. Analyze the performance of Example 8.e is also less than in Fig.4 A Comparison of the Estimator Structure and Classical Methods This section has demonstrated a key result: The controller structure based on statespace design of the control and estimator exposes a methodology for the introduction of the reference input in a way that produces a better response than that typically used with transferfunction design.110 e Xl ""2 .nth a Predictor Estimator .17 but not as much as the prediction estimator.13 Outptll CClmmcmd Structure . 8.20 Output time hlstones for reducedorder estimator with output command. 8a 1 3 ~ " • ullO 8.5 . 8.. i8.13 when using the outputcommand structure amI a reducedorder estimator. The easiest way to analyze this system is by transform methods. the plant and estimator do not see the same command and an estimator error will be excited..0 0. Solution. Note the estimator error response and that it causes a suhstantial increa. The statecommand input shown in Fig. The control usage for this ca. The plant transfer function was analyzed in Section 4. . Although this degradation could be reduced with faster estimator·error rOOh. there are limits due to the adverse effect on the estimator's sensitivity to measurement noise.4..1 and found to be Gi~) = 2 (~ T' (~+ I) I)" Figure 8. Example 8. 8. 8. (8.14 • Example 8. specifically looking at the step responsc of the estimator error. Some of the degradation can be reduced by using a current or reduced order estimator because of their quicker response from the immediate use of the measured signal.
kHz and design control systems that have a rise time of 10 msec with an overshoot less thun 150/c.' I x lOR o + 2<.L_~L_c:': _L_. a good starting point is to pick the natural frequencies twice those of the controller. One such system is described in Chapter 14.' rl. However.6. (See Franklin.6.161 indicates that a t. o o o o where the resonance frequency IV.06. These advantages might nor always warrant transforming to the statespace form in order to achieve easily the better reference input structure. for higherorder plants. at 400 tad/sec and 2 kHz. !'Oote that the e5timator excitalion for this case caused an overshoot of 130Ck rather than the desired ISO/< and thc system appears to be lightly damped even though its poles are in precisely the same place as case (a). we havc retained the same natural frequency and increased the damping slightly. Although not discussed in this section using linear systems. it is not wise to move polcs any more than you havc to. the designs are made robust with Ie" effort. = 0.ec) . it applies to more complicated systems as well. = I kHz and the damping <. Iterate on whatever design parameters are appropriate for (a) and (c) to meet the design specifications. Whatever nonlinearity is present in the plant can usually be modeled to some degree in the estimator as well. so let's pick them at IV = 1 kHz and I.320 Chapter 8 DesIgn Csmg StateSpace Methods 8.. and EmamiNaeini (1994).·__tL"_~C:_~_. = 0.s + w.7 for both sets of poles in the estimator.05.21 Disk read head response. for example. For the estimator. and ":~()it. Ie) do a classical design with a lead compensator.15 Compmsation Deslgnfv/ a System wIth a Resonance A computer disk drive has a control system that commands the read head to move to specific' tracks on the disk. and experimental frequencyresponse data can be used to close a loop quickly without a timeconsuming modeling effort..82) shows the response of the 'ystem with the same K and L for the output error command case and it is shown in the figure also. for more details. In fact. Equation 12. 8.21.06.:' :'. We see that the rise time and overshoot specifications were met for this case and that the system settles to its final value at about 35 msec. (b) evaluate the K and L from (a) using the output error structure whether or not they meet the specifications. It is not mandalOry that the statespace representation and the stateestimator design approach be used in order to determine a structure that does not excite compensator modes. > 0.05 to 0.4 IntrodUCl1on of the Reference Input 321 outputerrorcommand scheme shown in Fig.) The system transfer function is G(s) Figure 8..15 25 . . The advantages of using the transferfunction representation are that highorder systems are easier to trouble shoot. which is the typical transfer function structure. although the derivation of it would involve rotational dynamics rather than the linear dynamics in Appendix AA. Evaluation of the response for the slate command structure is found using Eq. a good starting point would be with two of the desired poles at IV" = 200 rad/sec and S = 0. As discussed in Section 2.79) in step and is shown in Fig. the statecommand structure allows forsuperiorresponse of systems with nonlinear control characteristics. in part.~~~~~~~~~ t. 18. The damping was selected to be 0. The transfer function is the same as the massspring system shown in Appendix A.18. = 0. Two mOre poles also need to be selected for this 4'" order system. (a) For the state space design.'_}' ' 20 25 30 35 40 't_J 'v Time tm<. Example 8. Use a sample rate of (. Had the damping • Example 8. Here \\e wish to limit the flexibility to one resonance mode for simplicity. caused by using desired poles that increased the resonant mode damping from <. 11 is interesting that the large o\ershoot was. the determination is difficult using the transferfunction approach. 8. Powell.4.off actuators. especially in the MIMO case. thus reducing errors that would othern:ise be excited by the nonlinearity. < to msec would be met if w" > 180 rad/sec and the Mp < 150/. Solution.5. that is.. The selected poles were converted to their discrete equivalents and used with acker to find K and L. In this easc. Although the dynamIC' between the torquer and the head motion are primarily Gts) = lis'.5 o o o t\ '' 15 ~tate 0סooooo command structure error command dc"ign OUrpLlt (lu~~ical = '. (b) Csing Eq. The reason for the advantage is that the statecommand structure provides an immediate input to the plant and does not excite any modes of the compensator that degrade the response. higherorder compensators are often required with more modes for potential excitation.) . saturation or on. Chapter 2. (a) Do the design using a state estimator and the state command structure. would be met if I. Although this result has been specificall :shown only for a simple secondorder system. (8. there are typically se\'Cral resonances due to the arm's flexibility that limit the performance of the servo system.w.
• 8. the overshoot would have been about 50% which is still excessive but significantly less.4. This is accomplished b\ placing the zero a factor of 5 below 2oo (at 40 rad/sec) and the pole a factor of 5 abo\e 200 (al 1000 rad/sec). 8.4) will translate to a damping ratio of about 0. For these reasons. To accomplish the design of the feedback gains for both the integral and the original state vector. We also know that a 60' PM (Section 2. Furthermore. We then feed back that integral along with the estimated or measured state as shown in Figs. The ad"antage of this approach is that the compensator is first order while the estimator approach (a) required a 4'h order compensation.22 and 8. s + WOO Csing this with the G(s) above in a Bode plot shows that the resonant mode does not afrect the design significantly. Disturbanc~ estimation provides the same effect based on estimation of the state of a model which could generate the external signals. To convert to the digital form. the phase is 180 everywhere: therefore.21. In fact. (e) For the classical design.8465' 8.17).6 which will meet the overshoot specification. we can ignore the resonance for the first cut at the design and simply find a compensation for a lis' system. The idea of state augmentation for constant commands or disturbances was discussed for continuous systems in Section 2. The generalization augments the state in a way that achieves zero steadvstate error for a general class of reference and disturbance signals. The use of integral control eliminates the need to catalog nominal values or to reset the control. some form of integral control is typically included in most control systems. but a slow compensator mode \\a. excited and the settling time of this system is considerably longerthan the state command structure. We begin with the heuristic introduction of integral control.23 in a similar manner as before. Rather. thc desired PM will be obtained if we place the lead compensation so that the maximum phase lead is al the desired crossover point (~ 2oo rad/sec f. There are two basic methods to force zero steadystate error in the presence of persistent signals: state augmentation also called internal signal model control and disntrbance estimation. since the resonance frequency is significantly faster than the desired bandwidth (~ 2oo rad/sec J. the PM is met. thus producing 5 +40 D(s)=K.9934 + 0. A particular case is that of the disk drive servo required to follow a data track that is slightly off center so the reference signal is sinusoidal.1 Integral Control by State Augmentation The idea is to add an integrator so as to obtain an integral of the error signal. most actual control systems are nonlinear and the input gain r and the state matrix lj> vary with time and/or the set point.6.5 Integral Control and Disturbance Estimation Integral control is useful in eliminating the steadystate errors due to constant disturbances or reference input commands. It also meets the specifications. For a lis' plant. More generally.05. 2. Dl~) = 7394 ~ ~ + 0. we augment The closed loop slep response with D(:) in the forward path is found using step and shown in Fig. Furthermore. 8.5.22 Block diagram tor integral control with fullstate feedback Integrator Plant y . we note that the sample rate of 6 kHz is over loo times faster than the desired closed loop natural frequency 12oo rad/sec ~ 30 Hz). This integrator will be physically implemented as part of the controller equations. The linear analysis which is the subject of this book pertains to perturbations about a set point of the nonlinear plant and the control II is a perturbation from a nominal value.322 Chapter 8 Design Csmg StateSpace Methods 85 Integral Control and Disturbance EstimalLon 323 been kept at 0. and the desired crossover is achieved when K = 8000. Therefore. In the statespace design methods discussed so far.5 and is essentially the same as the addition of an integral term that was discussed for transform design in Section 2. statespace designs will not produce an integral action unless special steps are taken.2. the external signals frequently include persistent deterministic components and the control engineer is required to design a controller which will force the steadystate error to be zero in the presence of such signals.3. This illustrates the sensitivity of the system to the pole placement when using the output error command structure. we know that a lead compensation with a ratio of 25 between the zero and pole will yield a maximum increase in phase of about 61)' (Fig. the integral term can be thought of as constantly calculating the value of the control required at the Figure 8. we invoke c2d using the matched polezen 1 approach and find that set point to cause the error to go to zero. no mention has been made of integral control: nor have any of the design examples produced a compensation with an integral kind of behavior. the mo" expedient design method is to use the splane and convert the result to the discrete Case when through. L:sing frequency responsc ideas.
On the other hand.r <1>. the integrator output changes until its input. 8. 8.16 K] requires the augmented system matrices (Eq.75). • Example 8. If implemented as in Fig. + KNr(k).15(a) and 8. The configuration of Fig. system and requires the placement of 11 poles. (8. [K I be Il +I 4". Note that this does not cancel the integral action. in the difference equation '/(k Integral ContmljiJr the Sa/eHief AtUtudc Case Detennine the integral control structure and gains for the satellite attirude control problem using full state feedback.84): therefore. we augment the state with 'I' the integral of the error.5 Integral Control and Disturbance Estimation 325 Figure 8. the system of Fig. Note that the feedforward N. is zero.23. More speCifically.24 r(k). which result. 3. w. 8. 8. is \I' lI(k) = [K . A change in the disturbance.9 and use a sample + I) = 'I(k) + e(k) = '/(k) + Hx(k)  r(k). The estimator is based on the unaugmented model and is used to reconstruct the unaugmented state. Plant With this revised definition ofthe system.22 has been replaced by N which introduces a zero at ZI = I Using the zero to cancel the closedloop pole that was added for the integral state element cancels the excitation of that pole by command inputs. it merely eliminates the excitation of the extra root by command inputs. 8. it would be implemented as shown in Fig.15). (8. Place the control poles at ~ = 0. L 1+' 15 In fact. Following Figs.22 has a zero at 1 . e = y . (8. to the standard system x(k + I) = II>x(k) + rll(k) + r l 1L'(k). thus adding an error integral outpUl to the existing plant state outpu!.324 Chapter R Design Csing StateSpace lIkthods 8. 8. 8. Y(k) = Hx(kJ.24 so that it cancels the extra pole from the integrator.22 for the fullstate feedback case and as shown in Fig.25. This augmented model is then used as be~ore to calculate the feedback control gains for the augmented state. The discrete integral is simply a summation of aU past values of e(k) (Eq. H. wiU also excite the integral dynamics and the steadystate errors due to either constant disturbances or constant command inputs are eliminated. It will be 11thorder./~I so the selection of the zero location corrresponds to a panicular selection of N~ .[ ~ ] K] [ '. and has the additional role of eliminating errors due to w. .83) therefure arriving at the augmented plant model [~(~: 1\) ] = [~ :] [~(~: ] + [ ~ ] lI(k). following Eq. 0.24 can be changed to replace the feedforward of r to additional feed forward of e and modified feedback of y.r. r. the deslgn ot <I>. which is constructed to be the system error. .23 for the case where an estimator is used to proVIde x.841 Block diagram for integral control With fUllstate feedback and an added zero The control law.8 ± jO.lk) ] x(k) Figure 8. 8.23 Block diagram for Integral control with state estimation integrator pole cancellation the model of the plant with an integrator. tenn in Fig. The integral is replacing the feedforward tenn. there will poles to be selected for this portion of the design. it is also possible to retain the reference response obtained from a nonintegralcontrol design by placing a zero in the controller as shown in Fig. where 11 is the order of the original. 16(a). the design techniques already developed can be used directly for the control law design. While it is possible to iterate on the Il + I selected control poles until a satisfactory response is obtained. As always. 8. the addition of the extra pole foethe integrator state element will typically lead to a deteriorated command input response compared to that obtained without integral control. N".
5 instead of the commanded value of I.which produces a zero at ~ = 0. the integral action successfully eliminates the steadystate error. [K I KI = [1. 8. 8.. :'late that the de>ired result has been obtained in thaI there is no longer a steadystate enur in the output.12.9. ~3 .16 . Vic saw from Example 8.:." increased from the original 20<7r to about IOcr becnl"e ofthe additional root at ~ = 0.\ 0 Tim.21 with the added zero at: = +0. Example 8.' ____'.9. The only difference is that there is a step in the disturbance at 2 sec. The system model from Example 8.8 ± jO. 8. = [I O]T: therefore.J Time heel .025 13. (b) A steadystate error resulting from a disturbance is a classic motivation for the additll'll of integral control. x I' afler the transients from the disturbance die out.n.24 8.21. 1Il Fig.25. .2f>1" I. (sec) . the step in r at ( = 0 and the disturbance step in w starting at 2 sec.16 (a) As In Fig. The . 8.3131 by asking for control roots at ~ = 0. Compute the time responses for a unit step in r at r = 0 sec and . Note that the n"ulting response in Fig.22.. 8. Cse of 151m produces the response in Fig. We sec that the system responds identically to Fig.26 Response of satellite attitude to a unit step input at t = 0 and a step disturbance at t = 2 sec with integral control. .1 o I result is shown in Fig.12 that]'li.. 8.ior before the disturbance step has been degraded. (bl ul2 ·2 e u/5 XI before 2 sec is now identical to the case in Example 8.1 is augmented according I" Eq. then there is a steadystate error in the output..81) and used with acker to obmin the augmented feedback gain matrix. the system design is complete and can I>e implemented according to Fig. All other parameters are the same as (bl.25. 3 OL"~''4=~. 151m must be used in order to allow the multiple inputs.71 4.j . thus the final value of x I is 1.9. 8. The output crror can be shown via the final \alue theorem to he "'1 K I = 0.._4 Time heel raj 3 'I~__r~__r~ : ·1 (c) The implementation is structured as shown in Fig. XI' However. also note that it has come with a price: the beha. Example 8. 8. (a) This case is the same controller as used in Example 8. and (c) integral control as in Fig. 8. .5 Integral Control and Disturbance Estimation 327 period of T = 0. More control was used.. : : ~_t.9.12 with no integral control: yet.25 Response of satellite eXample to a unit reference Input at t = 0 and a step disturbance at t = Z sec with no integral control action.. Solution.22. (b) integral control a.17 f0r the first 2 sec. ib) with an added zero as In Fig. ! I ' r Id2 ulS aXI 2 . 8. lr!:! 1115 e t.1 'ec. (8. and the initial overshoot h.261 h I Figure 8. 0. Therefore.326 Chapter 8 Deslgn Using Sta[eSp<lce Me[hods Figure 8..5.tep disturbance of 5 deglsec' at t = 2 sec for (al no integral control.
86) become  [:.24 where the zero cancel. ~otc from Fig.1 ] . iI'..85) 18.89) (8. the continuous model is quite simple: and the discrete model is given by Xii = Fdx d u'=H. Rather.' X.2 still apply.lI(k) \(k) = H [ x{k) ] x"rk) disturbance modeling In the particular case where the disturbance is a constant. the augmented system described by reJ>". appear at any point in the plant equations. To obtain an estimate of the virtual disturbance. This is a virtual signal applied at the control input which woulLl produce the same sleady stale outpUl at y as the actual disturbance does.) ] = [~ ~IJH'i [:. (8. converges. the only change being that the system model IS the augmented one given above by eJ>" and H. 8.27 will cancel the actual disturbance. In falct.5. To reconcile these facts. the effect of th~ real disturbance at the output is cancelled and the error is driven to zero. n·. so Eqs.: [ x)k + I) + I) . 8. and any of the estlmatron methods can be used to reconstruct the state consistina of x alld X provided the system is observable. that t?e. ] = eJ>. when the control applies the negative of the virtual disturbance. and their effect on errors eliminated in steadystate.I(k+ I) =eJ>"xdlk) /L'lk) .een·· ~t th(' plant GUrul.jlk) ] + r. [r ] 0 lI(k). is /101 obtained using the augmented model. For purposes of disturbance estimation.ber\'i. n' x.tel11 will behave in the steady state as if no disturbance were present. If we assume the disturbance is a constant. the system will have no steadystate error. 8.lbility r('qujre~ thur tht" \ irrual di. in general. Therefore. we could say that the disturbance obeys 8. A sinusoiLlal disturbance would have the model u: = (v~Ul. After the estimate.. '·:. assuming. included in the estimator equations. estimated along with the plant state. K. IS a ('on".87) ' = [H 0 ] [ :. the control can apply a signal to cancel it onl: at the control input. AlI the ideas of state estimation in Section 8.1) ]+[~] ] lI(k). of course.88) which can be written as X(/.J will al~\ays be uncontrollable. however. It tS obtained uSll1g the eJ> and r associated with the unauomented F ~nd G.27. gmns IS exactly as given in Section 8. that the steadystale error was due to a disturbance described by the assumed equation used in the estimator. 18. and the sy. 8. these equations reduce to x(k + [ 1I'lk + I) I)] [ r = eJ> 0 J l ] [ w(k) X(k)] ] + .86) where 11>. (8. or. we introduce the "input equivalent" disturbance. jf the liiqurhaflCc .27 Block diagram for Input disturbance rejection Plant .i x.tanl..85) and r8. H. we augment the system model with the disturbance model.) (8.2 Disturbance Estimation An alternate approach to state augmentation is to estimate the disturbance signal in the estimator and then to use that estimate in the control law so as to forL~ the error to zero as shown in Fig.J.2. we build the estimator with the equations of the virtual disturbance included.328 Chapter 1:1 Design Csing StateSpace l\lelhods R5 Integral Control and Dislurbanc~ ESTimation 329 It should be clear from the discussion and the example that the prefcrr~d implementation of integral control is given by Fig. We have no Il1ftuence over the value of 11' by means of the control 16 ~~I.Hdx)k) disturbance rejection (8. Disturbances other than constant biases can be modeled. It is important to notice that while a disturbance may. in general. 16 The computation of the required estimat~. the integrator closedloop root. lhen th~ plan( cannot have a /I. [X(I. This is called disturbance rejection. This approach yields results that are equivalent to integral control when the disturbance is a constant.27. Thus.I.! = eF.lmb3IlCC i.~~/+l.90) y(k) = [ H o ] [ ll'(k) x(k) Figure 8. control gmnmatrix.~. TheIl.. the feedback of ih value as shown in Fig.'ro fr0m u to r at ~ = l.
as before. L'se .. but to use the estImated value of w in a feedforward control scheme to eliminate its effect on steady~state errors. StruclUnng the control as In FIg. It is modeled hy choosing Fd = [ 1'.' For a spinning satellite. predictor estimator and place the estimator poles at : = 0.. 0.~ St/tl'ilit.: designing the estimator.1+ ). :rotice thai in this Case the steady state error due to the reference input is made to be zero bv the calculation of and is not robust to small parameter changes in the way provided hy int~gral control. Our plan is not to control U'.I Solution.~.1 sec. this approach essentially duplicates the function of integral control.1 and.17.16.330 Chapter 8 Design Lsing StateSpace Methods 8. C:0mpute the t1fll. The following example shows how disturbance estimation can be used to estimate the value of the disturbance when it is a sinusoid.26(bJ up until the disturbance ente" at t = 2 sec. hence. or any combination uf functions that can be generated by a linear model. By picking those estimator poles at a slow fre4ueney. identjcal to Fig. Cas. Put in a step command of I at r = 5 see to verit~· that the input will no.8 ± jO. of the 8th order system and explain what eacb of Ihem represent. the augmented system is uncontrollable. for slow spin rates.5 Imegral Control ano DIsturbance EStll1latlOn 331 input.j~~____. • Example 8.16\a)~ in fact. Note further that the disturbance estimate. the dist~rbanee estimate will not respond much to otber higher frequency disturbances. .8 ± jO. The feedback for the unaugmented .turlxmce rejection control qructurc and gains for the attitude control with a di. and th~ system output to verify that. ISlm yields the response as shown m FIg.. a sinusoid.=[ I Il ] . the response j .turban(e torque from solar pres~ure act.18 Disturh.. When the disturbance is a constant.cd overshoot as in Fig. the estimate of the disturbanee. But also note the early response to the referell"c • Example 8..system is computed as in Example 8. Note the similarity to E. 8~_ and applying the inputs as specified above. I.oA. Determine the Lii.ui'ln Clnd R"I. 011 the svstem as a sinusoid at the spin frequency.+ ± jO'+. 8.. Example 817 " 8' 0 1 lr/2 ul5 e1.~. therefore. approaches the actual disturbance value asymptotically.excite any unwanted estimator errors. here the satellite is spinning FIt 15 rpm.17 Bias Estim.' responses for a unit step in .mv [Cl "Ill" Rcit'LllO/1 j"r t/ Sl'il1nill. The location of the e~timator pole~ corre~pondillg to the disturbance can be seIected" at a relatively slow frequency as abow .90) "~~ find that the desired poles yield L. This basic idea works if n' is a constant. II. find the same value of K = [10. PIOlthe tim~ hIstory of the disturbance.25 3. input: There is no increa:. and must live with whatever value nature deals us.27./7 10 be K = [to. It works regardless of where the actual disturbance~acts since the design is based on the virtual disturbance The only constraint is that the disturbance state.17 shows that disturbance estimation can be used to estimate a constant disturbance input and then 10 use that estimate so as to reject the effect of the disturbance on steady~state errors. thus creating disturbance rejection.+9) 3 oL'::. tv • Example 8.fthc sinusoidal disturbance is known to be relativel\' stable in magnitude and pha. (h~ dynamics may be approximated to be 1/..'CtlOn j~lt th.1' be observable.e. Use a predictor estimator and place the estimator poles at : = 0.28 Response of satellit!' example to a unit reference Input at t = 0 and a step disturbance at t = 2 sec with bias estimation as In Fig. 0.ample 8. For purpo.16 shown in Figs.25 and use a sampl~ period of T = 0. x. (8. Place thc control poles at ~ = 0. 8. in sleadystate.26Ia) and I bl. we use the un augmented model '" III Example 8.ample 8.9 ± ill. 8. = = Solution.25 3.' Detennine the bias rejection control structur~ and gains for th~ sat~llite altitude control problelll Place the control poles at : = 0.25 and use a sample period of T = 0. ~here is no error remaillin!::: from the disturhance. Figure 8.. 8. at r 0 sec and a step disturbance ot 5 Deg/sec at r 2 sec "nJ compare the results with the integral control in Example 8. = I' and H.9. 8. IL·.1 sec. we augment the plant mod:1 according to Eqs. The estimate is used to cancel the effect of the disturbance. Time (sec) The disturbance acts at the control input so tbere is no need for the coneept of the virtual disturbance. a di:. The <hsturbance reJ~ct1t11l approach also eliminates the steadystate error.'.turbance torque from ~olar pre~~urc of 1 deg/sec~ v.2].+ ± j.\" as m E.89) and r8." Satellite AwtuJ.3 6. The attilUde dynamics become 4th order as the t\~O axes are now coupled: however.+9].' = [1. Examine the rool. For purpos~s of finding the control gain..
0.2.s u.il SClISll."'1_ output )1'.8±O. there would have been a steady sinuSOidal error of ahuu! 0. The step at.881.25. Use of acker with <1>" and H.19 Sellc'lIu.3 at 15 rpm. L.state as well as the e'timate of the Figure 8. The roots of the closed loop Sth order system are: :=O.sturbance is modeled by augmenting the continuous plant with the matrices F. but replace Ihe sinusoidal disturbance torque with a sinusoidal measurement error of 0.::. the sensed attitude will have a sinusoidal component as the satellite naturally spins about its principal axis. • Repeal the design from E~ample S.25j. The estimate of the sensor error is ignored by the controller.18.ts of the augmented . the feedbackfor the un augmented system is K = r10. 0 and H" = [I 0] and the augmented continuou~ ~ystem j . The time response of the system described by Fig. 5 sec has no effeci on the estimate quality and therefore the response to the step is precisely as It was onglnally deSIgned Without the disturbance rejection.25 3. 8. use of c2d "ill compute the discrete matrices <1> and H" from which.' = [1.sired poles rhe estimator gain is computed as .. as in E.871 and (8. O.391 . J.S07 S. As in Example 8. it IS desirahle 10 spin about thc principal axis: therefore.1 1 = FilX d (S.S ± jO.' Atmud. "fote In the tlgure th:r the estimate takes"about I sec to com'erge to the correct value amI that Ihere is a noticeahle error in the output due to the disturbance until that time..332 Chapter 8 Design Using StateSpace \lethods R.' C'I1(. The output di.05 Solution.eful to ~:'l.slem consi.98S±0.7378].49J. The last 1\\ U represent the discrete equivalent of the pure oscillation at 15 rpm.alignm('nt and to reject that cOIHponent of the me~Sllrement. Typically.1 sec.:'~S~t9ltO Time (~ecl + + + di:.156j. disturbance e'Slimate .95 ± jO.18.175 6. an Sth order system. OlxO.9±0. • Example 8. control system. = O. it i. 8..S:r: jO.27 is found by use of 151m where. with the de. The fi"t 6 roots represent those selected in the control and estimation design.91) = [HH.Ij.se a predictor estimator and place the esrimator poles at • = O. The feedback of Ii. and use a sample period of T = 0.6.. Figure 8.27.18 :\:.30 is found by use of ISlm where the state of the complete sy.2 superimposed on the output.~ The previous example had a sinusoidal disturbance torque acting on the input to the system.ec.=[ " w. which are unchanged hy the feedhack. 0.29 shows the results. Place the control poles at . From these matrices.. The role of the estimator in this case is to use the contaminated measurement to reconstruct the errorfree state for use in the control.(imate the magnitude and pha~e of the mi~. Example 8.DislUrllitnct Rtlt'..01 \I'lth SI/1l<\'Jld.371) The time response of the system described by Fig.xample 8. = IlU899 01621 lJ.29 Response of satellite to a sinusoidal Input disturbance with disturbance rejection as in Fig. the state of the complete system consists of the augmented state as well as the estImate 01 the auemented state. x= Fx +Gu Figure 8.18.lj. Again include a step command of I at J ~ 5 . can be accompltshed by u"ng all au:mented feedback crain K = [K I OJ.U(111 \Vhen an attitude ~t'nsor on a ~pinning satellire j" misaligned from a principal axis of inertia. 3 oL':c'.OS55 0.. (8. '5 lntegral Control and Disturbance Estimalion 333 In Eqs. 8... L.turbance H'. I]. and the desired poles results in L.30 Block diagram for sensor disturbance rejection e. It is also possible to have a measurement or sensor error that I' sinusoidal in nature that one would like to eliminate as a source of error to the 0.
\. the system would normally exhibit a following error of sufficient magnitude to produce the required control effort. Since it would usually take some control effort to follow such a signal. then used in a feedforward manner to produce th~ desired control effort... The feedback gain K is designed Plant "'. ." r\_ ou1put. .~===::j"'". 8.Jl(} sensor disturbance estimate L:. L. Ro<. an 8th order system. Note in the figure that the estimate takes about 3 sec to converge lClthe correct value and that there is a noticeable error in the output due to the measurement error until that time. m~asured output. there would have been a steady sinusoidal error of about 0. p. at the conlrol input which would produce the system error at the plant output.. :. The estimate of I' is ignored. r. mca~urement. but the feedback signal is _. as shown in Figure 8.. with disturbance rejection except that the error is now not the output only but the difference between the reference and the output.n I + ..32(a). e.19 Actual reference model Plant "'.L. 8_32(b) \I.334 Chaptet" 8 DesIgn Usmg SlaleSpace \Iethods 8.l Figure 8.r".32 + Block diagram for sensor disturbance following. here the reference IS subtracted from the output to form the error.32(a).5 lntegral Control and Disturhancc ESlimauon 335 augmented state.2 as the controller attempted to follow the sinusoidal using the unaugmented plant described by 4J and the system error e.. By estimating p and feeding that estimate into the plant with the control as shown tn FIg. This is called reference following. The step at 5 sec has no effect on the estimate quality and therefore the response to the step is precisely as it was originally designed.timator 3 OL_~'~~4_. Example 8.. and the Figure 8.r I \1 + I'.em.'.. E.or di~lurb<Jm:c + + + ~'. r L~_!:::~====~ lal "'. Without the disturbance rejection.31 Response of satellite to a sinusoidal sensor disturbance with disturbance rejection as in Fig 830. L r Il (h) Time Isect . ':~~9.31 shows the rcsulb. and (b) the implementation model Virtual reference model reference following A final example of the use of the estimator to achieve zero steady stat" error arises when it is desirable to track a reference signal with as little error as possible and it is known that the signal follows some persistent pattern. The idea is the same a. H". (a) The pretend model. The actual situation that is implemented is shown in Fig. This following error can be eliminated if the systematic pattern can be modeled and estimated.. The idea again is to construct a virtual reference. Figure 8. Estimator r". the effect of p is eliminated in this virtual model and e == 0 III steady stat~.
336 Chapter 8 DCSlgn l'slng StateSpace \[eth0ds . h t De a samplsy~tcm ha~ a rise ~me b~tler than 3 msec and no more than a 15c.I' . the phase margin and hence stability will be reduced. for an actuator delay. a small .2 by adding a ~_I to the system model and using the root locus method to show that the stability of the system was decreased when no change to the compensation was made. The resulting feedback gain is 8. ' there j.tro!.' 0] ··h'09 L:se ofacker with oJ> andH. is subtracted from the con. I h.'.·plane poles that had natural frequencies ot I an ra "4' _'). U' F and G with c2d yields oJ> and fur the disk head dynamiCS.md fol 1(1\\ ing r... But we \\ish to include the virtual reference in the control a~ u = Kx. p causes. . '000 d 1000 .en 0 . . that 75 has Converged." ~ . • •. r. if 110 changes are made to the compensation. \ 1 I I i P~~:.J(h) is found h). The difference here compared to Example 8. ... 8.. For statespace design. Solution. _ the traCking reference.resultsinL. where w = ')000 rpm or 523.20 1. Assume Ihe transter tunctlon he input command and the read head response is GI\I=~. . _~_..tha~ the actLl~'l ret~erence is heing suhtracted from the oulput alld we \vi:. produce t e eSlre. . Th' 'stl'm'ltor is constructed usin~ the augmented sys... e" . •• .tem. we are able to achieve the same closedloop poles in a system with delays as one without delays: however. one state element must be added to the model for each cycle of delay or fraction thereof. we can assign any desired pole locations to the system.o. 'h' 'h I' ~ () Since we haw an estimate ot. Once following error. '. We can also analyze the effect of delays with frequency response methods as in Section 7.h to elimmate Its cttcd 0 e In other words.9 1012. in Fig. .9 ~'. Figure 8. .4 by reducing the phase by wi" This analysis easily shows that. The purpose of the feedforward is to pro"de a tontro t at WI pro C . ·t will hehave as if p was canceled..~~~n.'=IJ.1~.4 that.\ IS . there is no noticeable [_~.3. tracks on th e d'IS. a following r.J2(b). we want \" to follow r in Fig. some small amount. and so on. To meet t e rhl time specitic"ti.18.ls of the augmenled state a~ we II a~ I h e e~tlma te 0 f the aucornente state. the state consi". 'r (\ Ii\. DCY'wOOO f'. a deJay of T < A "': 2 T will increase the order by 2. .J d h F' 2.IS.6 rad/sec. = rand thu. '... . thus \\obbk in the tracks that the read head must folluw. A one cycle delay was analyzed in Section 7. e . r  H" = [ I 0] . T· piC . Il . 8. an Inpu!. i. {5.54 1. . h '. d.: The time response of the ~\"stem descn he y 19.' use of 151m whet".~ ~].state . J.i = G= [ I~O l a n d and H = [I IS ()] marked by small circle.L o F= [~ ~ l F.32.5 ~. .h: J Lf o¥ I !OOO r ·11.'it:. an n b order system. The disk head system is described hy r I I c 0 o .6 damping ratio. tcedton' ard ot. rdcrencc I I • Example 8. \'11 <. L"sing the pole placement approach. "': T will require an increase in the order of the system model by I.. ~ l rate uf 2 kHz.3. Therefore. "fote that. a delay of 0 < ). 0." p. . I I iih l'omm.p.' '.ershuot ~reduenc" K = [736.0865]. This produces the time respon" . In other words.33. a few iterations show that poles with a natural of 1000 radisec and a 0.alent .6 Effect of Delays Many feedback control systems have a pure time delay. ._" ..'ffset hCl\\een the center of the tracks and the rotational center of the disk.ns. . \\i~h • . there are extra a~~n~. .ek the gams sO I at t e no error e. .20 5il1liSl i{f(11 St~IlSl1r Dislurh~1I1l(' 1 FdllLlf. Design a control system that follows tracks on the di~.5 'md the disk spins at 5000 rpm. l i~i o /\ . we saw in Section 4.. .. con\'ened to the digital domain. .. '11 du 'e .': 1 . \. e = 0 tmplvm c t at . Example 8... th uoh the\' mal' he otT center b. 'Ve prctend that the disturbance is the same as in Example K. P. so th at ill s eady. A satisfactory design wbas th'ounct. 'all\ " computer disk drive read head must foliO'. dlsec ot sCls with equi. ."c overs 00. 86 Effecl of Dclays " 337 estimate of the viJ1uai reference.t h at WI II produce the track wobble VI .\ l~r u Disk Dn\'l 05 I k ) . 8.33 Response of disk drive to sinusoidal reference follOWing as In Fig. Either design method can be used to modify the compensation so the response is improved. respon5c. Therehfore. imbedded in some part of the loop.
The response o~ the system to command inputs and disturbances is also affected by the location of the delays.6. • Example 8.l~ difficulty \\ ith dlqr.(k) (8. is one more state element and is the value of y that is delayed by two cycles... Therefore.or delay where '\1 is the output y delayed by two cycles.\2. Sen. (bl actuator delay [ . for two cycles of delay. a disturbance input. 17 .ltdli[(: Atrirudc Resp"l1s.. (8. Therefore. The model for more than one cycle can be obtained by adding more similar equations and state elements. due to the column of zeros. On the other hand. Therefore. . a fact that will cause difficulties when calculating gains for a current estimator using acker in M\TLAB.. (8."l1sol' Delay 011 [he S.5 und 8.94) will always be singular. w.12.21 flied or ci 5. the undelayed state is available for control.34" shows systems with the delays in the two locations. ell" in Eg. where '\'. The model of a one cycle delay of a quantity " is (8.8 ± 0.'2d(k I) = [: 0 I 0 ~ ~] .2 and 8. we would add (8.tep re'ponse to a command inpnt r of th" satellite ultitude control with one cycle of delay at Ih" semor. + I) = eIlx(k) + rll(k) \'(k) = Hx(k). Place the poles for u prediction estimator ul : = 0.. and the additiDnal pole for the delay stule at : = O. (a) sensor delay. (894) 0 '<i(kl = [0 0 I] [.12.:~}) +[ ~ l J [ ] .\~./k) tt(k).. So. in exactly the same way that a system would respond without a sensor delay because the estimator sees the command through the feedforward of tt and does not depend on the delayed output to detect it. \1' responds: therefore. Fig. the augmented system matrix.92).34 System With delays.~~~}) ] .1 Sensor Delays For the sensor delay. Place two of Ihe contra] pDles at ~ = 0. If a sensor had delay that was not an integer number of cycles. Note that.. as lias the case for Examples 8. no estimator error is excited and the undelayed state estImate I' accurate. 8.338 Chapter 8 Design Usmg StateSpace I\lethods 86 Effect of Debys 339 poles in the system with delays. Y. Compare the results with Example 8.' Examine the .. the same 'yslem slep re'ponse without a delay. Those extra poles can slow down the response even if they are selected as fast as possible. that is. for a system given by x(k 8. sensor delays must be an integer number of samples. for Exumples 8.. will not usually be seen b~ the estimator until the output..4 ± OA). at: = O.93) to Eq. \b) ActualOf delay 17 \Ve will ~ce' in Chapter Y thai a ~ingular 4J matrix will abo caU<.12. Any number of cycles of delay can be achieved easily by using this scheme. it would not influence the sampled value until the next sample instance.. that is. Figure 8.95) la.25 j.92) where YI<i is the delayed version of Y and is an additional state element that is added to the system model. the estimator error will he increased by the delay. whether they are part of the control actuator or the sensor.34(a). the system model including a twocycle sensor delay is delay model Figure 8. an estimator can be used to reconstruct thc entire state: therefore. und the additional pole for the delay state ut : = o. . The system can be malie to respond to command inputs.~~~/+li)] + . a< was Ihe ca.
18. thus causing an increased sensitivity to dislurbances. that if the system had a disturbance. I s.Ikl ik ) = [0 0 I] l ::i~: ].94 and 8.1 ".". fractional or whole cycles. U'. Thi. the delayed output measurement would cause a delayed esti· mator response and. The primary disturbance is the motion of the throttle by the driver's foot. The fi"t two elements are the exact same values that were obtained in Examples 8. this motion can be sensed and used as feed forward to the estimator. which allows for any length delay. A disturbance 11' will influence the plant without delay. It is im~ortant to note. N = 10.35. for input commands or disturbance inputs. a degraded response of the system to that disturbance. The poles of a system with actuator delays can be placed arbitrarily.6.95. .1. It is remarkable that a svstem with a sensor delay can respond to a command input in precisely the same ~way that the undelayed system would respond.~TLAB with the augmented <I> and I' matrices as defined above with th" desired control pole location.r Note that the response 01 precisely the .25 " 0 ·1 0].2 and 8.4S75 ] +[ T.ult foliows because the current value of the . The ability tD design such a control system IS enhanced by the statespace controller/estimator approach. Thus the sel"<" delav has no dlect on the controller.'2 ] /llkl. just like the sensor delay case.12 and the zero third element means that the delayed . that was not fed mto the estImator In the" feedforward path.7~ [ 5.25.) the feedforward from the command input and the current value tit" the state was used by the controller.. application to engine control The use of step with the system defined hy Eq. implies that the system closedloop transfer function was such that the pole at : = 0 was not excited. Here. yields K = [10.tate" a.6 Effect llf Delays 341 Solution. the feedback through the estimator will be delayed before it can counteract the disturbance. . However. • 8.Ikl ". I ~ () !l/5 e xl (Y) 1'..~ U Time (sec) In evaluating the .arne as the response for Example 8.35 Step response for input command for Example 8. In this case. (4.:::~~ ~ \'. Thus the estimator structure is capable of instantaneous rejection of the throttle disturbance in spite of the significant delay of the exhaust sensor.79). however. however. 0 Figure 8. The 'tatespace equations for thl' systcm are (from Eqs. Eq. and it makes sense to add a pole at: = 0 for each added delay state element. y" estimated correctly d~e to An example of a system in common use with a sensor delay is the fuel injection control for an automobile engine.3..4. There is no way that the input r can influence the plant without passing through the delay.n Fig.791. ] . 18. = 1.21 L'se of acker in rv1..(k+11 .2 Actuator Delays The model for an actuator deJay is derived in Section 4. Thi. The result is Eq. the sensed value of the fuelair ratio in the exhaust is delayed by the piston motion and the time for the exhaust stream to reach the sensor. defined ahme "ilh Ihe desired estimator pole localions yields .1 ~ in Fig. Lse of acker in ~!ATLAB with the augmented <I> and H matrice.79) produces the step response shown . This fact can be understood by examining Fig.n) shows that and N" =0. Ik + I I ] x. however. N needs to be evaluated with the new values of". 1995.~ 1.X3C\'JI L. O.17 e"en though the only quantl1) fed back was the delaved output. 8. (See Fekete.+ . .340 Chapter R Design Csmg StateSpace kkthL)(Js 8.<!(k~ I) "J [ = [I 0 I o ~ 0 J l. thus. 8. It includes the output " and the delayed output . a.. re. the extra poles at: = 0 will be excited and the system response will be delayed by the actualor delay. S. and N". .tep respome according 10 Eq. 8.tate element is ignored.34(b).
timator. 8.37(d). which is a simple lirst order lag "ilh a time ('on stant of around:' sec so that a = 0. The model of the system with the delay in Fig.+_! SCn'. Qualitatively.37{c) ~hows the re~pon~e or the s)'stem with the estimator structure as shov.36 Engine speed control block diagrams.. we will use a sample time of T = ~ao msec and" one cycle actuator delay_ lm·estigate (he respon. The o'cillatory response shown in Fig. ~ a. Redu~ing the gain. 8.~.~6 Pick the controll'ain sO that the poles are al : = 0. Three ofthecases were analyzed for an impulsive disturbance.38(a. the same kind of responses were ohtained: however.36(b) . the response has slowed down. (c) the estimator structure with an actuator delay ~_7.. For the ideal case [fig. :rot only is the response delayed b. . K. (b) the classical feedback With an actuator delay.17lb) also can be eliminated bv reducin2 the 2ain in the classical struclure of Fig.a_H_. and Ct..57 j.Il. 8.or Ib) K = 9. The actuator dday "hown in Fig. u~uaH) a de\'ice that count.Iplane damping of . the tilll.. For this example. This yielded gains of K = [876 O.37(a) and was obtained using step.6 Effect of Delays 343 • Example 8.J la) Sen<.1a3 and IV = IO . an easier 'olution than adding an e. shows the block diagram including the engine model. some manufacturer~ use injectors that haye a full engine cycle deja) (~OO msec al 600 rpm)... 18. For a gasoline engine with a throttle actuator. O. . The step response for r = I is shown in Fig. There is no . 8. which yielded an estimator gain of Lc = [ O~l2 ] .36Ib) can be accomplished wilh the aid ofEq.36Ibl. the gaim were found to he Figure 8. Figure 8. For diesel engllles the actuator can be made to ae! more quickly. Select N sO that there is no steadystate error Solution. Forthis system it reduces to Xlk+l)] lk+l) = d [ " [<t> r ] [ o 0 () ] [ "'i lkl J \Ik) 1+ [()] I 1110 T [r ] 0 II'lkl. 8. Figure ~L~f.5l] and N = IlUa3 The estimator poles were placed at c = 0.2.·alue of gain in this simple structure that will duplicate the quality of the response obtained from the estimator system. il is typically around a half engine cycle due tll the piston motion 1100 msec at 600 rpmt.tIki ].38(c).. 8. the ickul case.c of the syslem for step input commands.. but it has he come oscillatory. O.tructured a~ in the three cases in Fig..n in Fig. Ihere is little difference between the response' in Figs.aries from engine to enginL'.47 ± a. it is delayed b}. la) the ideal feedback system Without a delay and Without an estimator.. from 9. r. While the oscillations have been removed.36thl using the same gains as in lat.79 J and is identical to lhe ideal case.1m. A :plane analysis of this sy stem explains why: the rooh are at : = 0.:._.3 to l. 8.13.or _p_la_"_I.16(all.22 An engine spced governor Lon~i~ts of an rpm sensor. IJI. S. Fig.37.IVI = [ 1 . and impulsive disturbance!'. 8.342 Chapter 8 Design Lsing StateSpace MC1hods 8.O produced the response in Fig. and logic to determine the input to the fud injectot" (diesel engine"l Of tll the throttle actuator or spark adqmcc (gasoline engines I.).361CI using the desired control pole locatiom of c = OA. u' and shown in Fig. however.4 for the ideal case and the estimator gam I if there is onel sO thaI lis pole is at : = a.79).one cycle_ As preyiously discu~sed" this delay cannot be reduced if its source is due to the actuator. 8. 8.· a cyck. which yidd an equivalent . Compare the re~ulb for control systems . The slep responses are shown in Fig.stem: lherefore. hut can abo be computed easily for thiS nrst order case to be <t> = edJ and The re'ponse was obtained using Eq. b. A ~urrent estimator figure 8.' bd\veen the passage of teeth on a gear. 8.36(al shows the ~ystem \~'ithout arl) delay.1U8(h) and 8. lI)kl lei where ep and r can be found using MATLAB·S c2d. the ~redictor estimator had an extra cycle of dday compared to the classical feedback s.371bl shows the response of this sy>tem with the cla"!cal feedback as shown in Fig.. however. ~. although the difference is not large for this example.
b.. We suggested in Section 8.:transform concept. evaluating Eq.·1 controllability definitions is nonsingular.~ .. We will discuss only a few of the known results for linear.dl I Time (~~(') The idea of pole placement that is used abm'e to define controllability is essentially a . ~ 0 5 oy' 2 ..( Figure 8.22. (c) predictor estimator With delay.1 Time I. 1/ CI (.e to a command input or a disturbance regardkss of the control implementation.] ..1 o Tim\" (.'.... 8. r. <I»rKisCl.~ 21L 8..<I». th~ re~p()n .I.3.ystems that have one input and one output.p'J. ' ~ 0 {/Jt ~ e \' ~ IIj~ . ho\\n in Fig.. \~ hieh \\:. use of an estimator including the delay minimizes its effect.. la) Ideal case. This is an inhcrent characteri. Itj:' ·2 .'.tic of an aclUator delay for any system.timator gains.7 uj~ ~ *Controllability and Observability Controllability and observabi]ity are propcrties that describe qructur<JI features of a dynamic system. 1"1 is controllabk if for every Jllhorder polynomia] there exists a control lav....ec) . we hale the test: U. Ho.J.\tra Jela:.. We have encountered these eonccpts already in conncction with design of controlla\\'s and e. (bl classical feedback with delay (K = 93).c. n iscontroHable if and only if the rankofC = [r: <l»f:· :<1». The system t$. IC) predictor estimator w/delay (K = 931. 2 t . = Kx such that the characteri>tic polynollli'al of . Example ~.22 shows that an aClUator delay wil] effect the respon. 1S II. However. (dl classical feedback with delay (K C ~ 017' :~ ulJ ~ formulation t'liminmes the' I.22 la) Ideal case. then by a transformation of the state we can C'on. eli the given description into the control canonical form and construct a control law such that the closedloop characteristic equation can be giwn arbitrary (rea]) coefficient'. from the results of Section 8. . w. We begin our discllssion of controllability by making the definition (the first of three l: I. (b) claSSICal feedback With delay iK = 4).ami imrw\'e:.I.' ~ ' . Use of a CUITent estimator provides the best rcsponse to <J disturbance. (d) current estimator w/delay IK = 93) ~ 4.. and Narendra (] 961). ~ 0 Tim~ l"L~ .344 Chapter 8 Design Usmg StateSpace \klhods 8. for Example 8. constant .1 f] I) (e I Time lseci ... no delay (K = 93). 0 0 8 0 E O And. no delay IK = 93).~ 0 Time IS~CI I '. ~ 2 ..38 Responses to ImpulSive disturbance. () 0 lal ~ I Time I~ec) Ibl Time . I' These concepts were explicitly identified and studied by Kalman (1960) and Kalman. A timedomain definition is the following: ...1.3 that if the matrix C given by \.eel ~ Ie I Idl Figure 8.: .37 Responses to a step input. g..j~ llbtaineJ b: • 2 . for Example 8.~ '2U{ ~ The pair ...('(:) = 40)  ~~.IS)n I and i" .38rdl.
.) Suppose we have a diagonal 4>. and the system is not controllable. even in this simple case. = .'=0 'rll(j) =4>'\o+[f:$l': .(k) + Yill.39 Block diagram for a system With a diagonal 4>matrix "Contwl1abI1ity and Observabilil) 347 II.I) u(O) I J corresponding input matrix r. + I) + I)  = '''''1 (k) = t'Ill'. ~oweYer. and our system is controllable by definition II if and only if the rank oj C is II. + Y:tI. this is not enough if the roots }_. But. and so on. II( 11 .7 Figure 8.. IIi N) such that if the system has stilte \ at k = O.. A. isee Appendix CJ. (The doubleintegrator model for the satellite does lIot qualify. it is forced to state x.4>'ln [II(J\':. If l'1i is less than II. with elements Vi' Then the structure is as shown In FIg. the input must be connected to each mode so that no Y. hy the CayleyHamilton theorem. n X In this definition we are considering the direct action of the control II on the state and are not concerned explicitly with modes or characteristic equation.w. is controllable if for every xl1 and XI there is a finite Nand a sequence of contro" lIiQ).".. If x( N} is to equal x.. (k li'2(k . The system ($. The system control input.(k + I) = I. If. Suppose..) = $ 'x" + 2:::4>'' . n is controllable if every mode in $ is connected to the Because of the \!eneralitv of modes. we find that if X(O) = x(l' then x( 1) = $x" + ru(Q).. we will add a column $''1'.. and the new columns add no new rank.Y. at k = iV. the equation in ~ is Y2 "'j(k + 1) . which is the same as We ha. and hence the number of ro\\. N is greater than II.346 Chapter 8 Design Lsmg StaleSpace \leth. and 2. we effectively have a hidden mode that is not con~e~ted to the control.IY:ll'I(kl .Y. tor Instance.39. we obtain III. x(2) = $xil) = (l + ruil) 4>2 X + $rll(Q) + ru(1). . we cannot possibly find a solation for every x.. The sy>tem equations are x(k + I) = $x(k) + l'ulk}. Therefore. and. :\"ow let us consider the controllability matrix of this diagonal system. matrix and C . exactly the same condition as we found for pole assignment~ Our final definition is closest to the structural character of controllability only olle input.Y:tI. are not distinct. are distinct. of the coefficient matrix of these equations. $' is a linear combination of lower powers of $. on the other hand.1ds 8. is zero. vI xU. solving for a few steps. we have two condltlons for controllability: The point is that if two characteristic roots are equal ill a dialional4> .n'srem H'ith 1. Al1 characteristic values of $. No element of r.. Then the equations in the first two states are w.'e assumed that the dimension of the state. we will treat only the case of systems fur which $ can b~ transfo~ed to diagonal form.. Ylli':. Therefore we haw" solution. is II: the number of columns is S. Let us develop a test for controllability for definition II. ($... then we must be able to solve the equations If we now define ~ = y 2 1!'. 8..'jYIII':(k) + Y1 Y:II. is zero. By direct computation. By the definition.
The concept of obserYability . 8. state reachability.' and the . nonsingular if anti only if each factor is nonsingular. again. it i. and the system is not controllable. multiplying (il by f on the right. Finally. we find H(:)=~ . which is clearly singular. an alternative to testing the rank (or detenninant) of C. This is the RosenbrockHautus~POpOY (RHP) test Isee Rosenbrock (1970). Thl' fe"ult is true for g. and the tests for any of these properties are found in the rank of the controllability matrix or in the rank of the input system matrix [:1 . Here the problem is that the mmlc at : = ~ appears to be connected to the input but is ma.961 (8. then we must test the rank of [~=l l n. It is easy to show that if such a . The engineer should be aware of the existence of a third simple situation. Kailath (1979)]. For if a nonzero v exists such that vT = (] by (i). rJ is controllable if the system of equations this allegation by computing the determinant of the controllability matrix. Thus we derive v'C= O' has a nontrivial solution. if we consider the RHP test.' . which means. illustrated in Fig. and mode coupling to the input.E . We )hov. To show that a nontri\'ial v' exists if C is singular requires a bit more work and is omitted.econd term is nonsingular if and only if the i" arc di. The system ($. As our final remark on the topic of controllability we present a test that i.olution v' = 0'. a product of two tenns. We have given two pictures of an uncontrollable system. First we will conflrm 19 Of cour~e. The system matrices are vl:1 . or.ed this only for $ that can [~(~ :=\ ±]. This test is equivalent to the rank~of~C test.tinct I So once again we fi nd that our definition of controllability leads to the same test: The matrix C must be nonsingular.:n~fal $ observability which is clearly less than two. equivalently rank[:I or there is 110 and $: f] = (iiJ II. th~ product of the Y. Either the input is not connected to a dynamic pan physically or else two parallel parts haw identical characteristic roots. not connected to the input. and we know that every mode is connected to the input.ked by the zero in the preceding member: the result is an uncontrollable system. multiplying by <lJf. If we compUle the transfer function from find to XI' we vT = (].348 Chapter 8 Design Csing State~Space hlethods Figure 8. If C is nonsingular.ystem pole.<IJ We have thus far discussed on Iy controllability. . ot" made diagomll. See Kailath (1979). exists. then C is singular. of controllability: pole assignment. The first term has a determinant that i. Because the natural mode at : = ~ disappears.$ : f] = 0' has only the trivial .'Contnllbbtlily and ObscnablJity 349 [ ~ (] (] u The controllability matrix i. by state feedback. then we can assign the . we find v$er = :v'$)" = (]. 1:1$ f]= and so on. uncontrollable. In conclusion.~ :1 :~ 1 :1 I  (8.97) Then. we can drive the state to any pan of the space in finite time. and let: = ~. then. and C i. The definitions are equivalent. ~ l II nonzero v' such that (i) v'$ = :y'. C is singular.40. C= rr $fJ = [. we have three definition.40 Block diagram of a simple uncontrollable system 0 0.
H ) of order /1.m using ct>r. J. + 1) = ct>x(k). 50uch a~ a disturbance U'. m performs this calculation. H T calculates L. The estimator is based on the nonaugmented model.. Estimator poles are usually selected to be approximately twice as fast as the controller poles in order for the response to be dominated by the control design. ."'1 Xi)' • Calculation of Nand N via refi.. in order to smooth the effects of measurement noise. :W Ckarly the input is.(0) = Hxo • \'(1) = Hx(1) = H. the controllability matrix.(:).r perform this function. acker. must be of rank 11. the order of the system.. there is a finite N such that x(O) can be computed from observation of . there exists a discrete full state feedback control law (K }that will place the n closedloop poles at arbitrarY • locations.xo_ y(2) = Hx(2) = Hct>xO) = Hct>"x Q_ "( N .r) of oruer 11. 011.. and most of the results thus far discussed can be transferred to statements about observability by the simple expedient 01 substituting the transposes ct>T for ct> and H T for r. there exists a discrete estimator with gain L that will place the 11 estimator error equation poles at arbitrary locations. The system (ct>. • C= r . it is sometimes useful to select estimator poles as slow or slower than the control poles.m or place.. 0111.. m performs this calculation. must be of rank n. We have already seen an application of duallty when we noticed that the conditions for the ability to select an observer gain L to give T . another manifestation of duality. H) is observable if for any x(O). Integral control eliminates steady state errors due to command inputs and input disturbances. pr~vides the best response to command inputs. for the system to be observable.8 Summary • For any controllable system (ct>.m and their usaoe with the structure in Figs. the observability matrix. irrelevant h(T~ if \\Je as~ume that all \'alues of !Iii·. . The result of these substitutions is a "dual"' system. H) is observable if for any nthorder polynomial O'. However.... Thus the test for observability is that the matrix 01. The other properties that are dual to controllability are As we saw in the discussion of state controllability. x(O) = xO' y(k) = Hx(k): and successive outputs from k = 0 are . I 'V must be controllableand we were able to use the same Ackermann formula tor estimator gain that we used for control gain...T . . • Feedback via K using the estimated state elements results in system poles that consist of the 11 control poles plus the n estimator poles. then we find the controllability matrix of (. r).. H .m or place. The system (ct>. acker.350 Chapter 8 Design Using StateSpace \lethods 8. there ~xists an estimator gain L such that the characteristic equation of the state error of the estimator is 0'.'omputatwll of xfI" If some inputs.... We will consider the development of a test for observability according to definition OIl. must be nonsingular. H) is observable if every dynamic mode in is connecteLl to the output y via H. The system is described bycO x(k 8. If we take the transpose of (') and let H T = rand ct>T = ct>.(0). these equations are . H"' .) are mailable in the I. the stateerror dynamics an arbitrary charactenstlc equatIOn were th at (". obsf. new rows in these equations cannot be independent of previous rows if N > n because of the CayleyHamilton theorem. ctrb.m using ct>.15 or 8. • (') = [H rr . are not available. the order of the system. ].I) = H'" In matrix form. 8. • The general rule in selecting the desired pole locations is to move existing openloop poles as little as possible in order to meet the system specifications.(:l.8 Summary 351 observability definitions is parallel to that of controllability..( I) yU'i . The system (ct>. we h<:l\t' a very different problem . 16: the stat~ command structure. for the system to be controllable.I l. • Integral control is achieved by implementing the desired error integral and including this as part of an augmented plant model in calculating K. • For any observable system (4J.
l U] r= H=[". Comparc the compensation transfer functions from (c I and Id) and discu" the dlfferences. so rhat the estimator poles h"'e an equilalent Iplane w" 20 rad/sec and I. then the equations in w will be in control canonical form. Sensor delays will cause a delay in the respon.7. (0" 8.hen USing: t? Examine the response of the closedloop system to an initial value of rand \'cnt\ that the response is consistent with the desired poles.=[~ 8.1. ~ .10 (al For called control canonical fonn'. = [~ n r =[ T/ l find a transform matrix T so that if x = Tw.'Isl = ue.(. (a) Find the predictor estimator equarions and thc value of the ~ain L so that the .8 8. Design a lead compensation using transform techniques so that thc equi"alent splane natural frequency w" ~ 10 rad/sec and I.6 ± jO.352 ChJpter 8 Design USIng StaleSpace \lethods SlJ Pmbkms 353 • Disturbance estimation is accomplished by augmenting the model u.5 For the system in Problem 83. (e) 8..< 200 TTl':E'C and an o\'ershoot AI.7. Compute G(~ I from Eq. < 200 msec and an mershoot M < IS'f when usino the state command struclure.9 I design the controller and estimator so that the clo. ~ 0. For both cases. " Ib) Find the estimator gain L j .. < 0. o Delays in the actuator or sensor can be modeled in the estimator so that no estimation errors occur.. I a a. = 0. find the estimator equations and the .ed in the estimator to include the unknown disturbance a.. However. 8. response.2.'alue of the gain L by hand so that ~J" = 0.1: + 4001 = '. (4.3 For the openloop system GiS) :l . a reducedordcr estimator (~J" = 0..6... called disturbance rejection or to cause the system to track the disturbance with no error. = = 8. actuator delays will cause a delayed response from command input. design the controller and estimator so that the closedloop unIt 'Ste~ re. is satisfied by plotting the responsc of .ponse a command mput ha~ a ri.9 ± jO. (bl the output error command structure. hJ. bv plotting (he stc.9 Problems 8. (a) the state command structure.2.1 For the openloop system G(s) (e) (d) Determine the discrCle transfer function of the compensatioll.61. check (hat the specifications are met by plotting the step response.1'1. Check that the specifications arc me'. < l::'le:} v. ese either rout locus or frequency response.e to a disturbance but there need not be any delay in the response to command inputs. called disturbance following. is satisfied by plotting the response to an initial \'alue of . 0 al. . (b) Verify that I.'+ 0. and 8. = [ a.7 (b) find the full state digital fcedback that provides equiHlent Iplane poles at rad/sec with ~ = OS (e) = 2 For the system in Problem 8. and disturbances. Gel) =~ =~ uls) . 8. .4 Verify that t. < I sec and find the K that will produce those poles with full state feedback.2 For the openloop system q.6+) for tal Find the discrete statespace modeL assuming there is a ZOH and the sample rate is T ~ 100 msec.3 for (al a predictor estimator.e time t. The disturbance could be an unknown constant or a sinusoid with unknown magnitude and phase..5 sec.6 For the openloop system (=1) ..7. /J.5 sec.\\ 8.edIoop unit step response to a command mput has a rise time r.= . q.) r=[l] For thc openloop system Gis) compute K hr hand so that the poles of the closedloop system with full slate feedbad are at ~ = 0. II(S) res + 2) 8. a state element. to an initial \'aluc."For thc system in Prohlem 8. The disturbance estimate can then be used in the control law to reject its effect. I r 0 [) Why is this form for q. = . (b) a current estimator. laJ Find the fecdback gain K so that the control poles hale an equilalem splane w 10 rad/sec and I.. preceded by a ZOH and a sample rate of 20 Hl. (bl Pick poles so that the settling time r.) ~~ _ . 0.. and (e) q. r lis) I Ie) (a) Find the discrete statespace representation assuming there is a ZOH and the sample period T = 0.!' estimator 1. = u(s) = .
. B = AL. the gain in the xstates.L.4562 0. 8.15 Derive Eg.' C = K.2 by state"ariable pole assignment." and ii' to a unit step in u' with r respon~es 0= 0.9669J e'1. u·. both poles are at the origin. Rationalize your results to (a) and (bi. that is. "'.354 Chapter 8 Design Csmg StaleSpace ~Iethods 8.i: for this system such that the errorsettling . 8.18 For the openloop system from Problem 8.3.118:>..H)(<I> .9.1'. Plot step responses of x .. = y and = j'. 8.57). 11'. (a) Plot the response nf . even when tv = O.. <11=[ (a) (b) x.6~ + 0.25 sec and owrshoot to an initial offset in x is less than 20'.Plotthestcp response of the resulting design.K w. the gain.8 )0. (a) Write the equations in state form with x. . W 0= Use pole placement to design this system to meet the specifications that settling time is less than 0. and H.11 (a) Show that the equations for the current estimator can be wriuen in standard state form ~i_.L. Give the matrices F. A = (I . 8.3 ± jO.=A~. and D= KL. ..9~ (e) H= 10 11· 0].meet your expectations. •.7903  1' _[0. Set the e. time will be less than 0.\'ill place control poles at (b) Let T = I and design K for equivalent poles ats = 1/2±j(J3/21.2 and estimator poles at : = 0.·here t = Xl . (b) (e) 8. 14.t.65) to show that the controller based on a current estimator always has a zero at : = 0 for any choice of control law K or estimator law L. Plot the response of rand 11' to a unit step in r with responses. Plot the unit step response from thi. G.) "'(5 ) Ie. Would there be a steadystate error if N = 0" (el l check the observability for: (a) r=[ ] Determine what the steady state value of r(k) would be if there was an input disturbance. meet your expectation~.1.4562] 0. II.I) (b) Design a reducedorder estimator for ..spome of rlk i for a unit step input III J command using the state command structure. (d) Plot the root locus for changes in the plant gain and mark the design pole location. (8. 8.8 we described an experiment in magnetic levitation described by the equations . Dete~ine values ofK and L p and sketch the block diagram showing how the various quantities are used in the control. .. 0.6718~O.63) from Eq.1.'(51 "(. stating why the observability or lack of it occurred. Powell.08 sec. Ie) Plot the response of r(k) for a unit step of the disturbance ("'). u=C~.13 Design the antenna in Appendix A. Place poles of the "'stem as in Problem 8. (d) Detennine an integral control gain and show the system block dialITam with the integral control term included.7. the characteristic equation will he • te) Use T from part (aJ to compute K.9 Problems 355 (b) Compute K a)eJ =~' (e) ". Set the extra control pole at ~ = ().0.t = lOOOx Let the sampling time.[KJ. .xtra control pok at ~ = 0. reference input and from a wind gust (step) disturbance that acts on the antenna just like the comrol force (but not on the estimator). = 0. Indude the command input r in the diagram using the .+B\. (d) Demonstrate that the system will have no steadystate error for a disturbance. Example 2.i: is not forced by r.17 For the openloop system 8. Design a prediction estimator with LI' selected so that (l)~) = ~'. 8.tate command structure. State whether the O.6 ± }'e13. 8.19 A disk drive read head" has the openloop transfer function Gisl = . State whether the + 2011. (8. such that if II = .(. (e) ~ind the control feedback K and estimator gain L p that .1185(e + 0.17. . (e) Plot the root locus of the closedloop system with respect to the plant gain and mark the locatiom of the closedlOOp poles. = IbJ Plot the re. Let a = 0. (d) Use the estimated states for computing the control and introduce the reference input so as to leave the state estimate undisturbed. Introduce a command reference with feedforward so that the e'timate of.6 ± JO. . and II for an initial x displacement 21 See Franklin. construct an estimator that mcludes an estimate of that disturbance.9048· 11(:) (a) "'(~I Find the control feedback K and estimator gain L that will place control poles at ~ = 0. Determine an integral control gain and show the system block diagram with the Integral control term included.12 For the openloop system r(~) = 0. and EmamI (19941. or an mput command.9. be 10 msec. Yleasure or compute the frequency response from r to svstem error r . T.17 (a) ~ssuming lC takes on some unknown but con~tant value.' Ib) Use the results of Eg.4.+Dv.4562' H=ll  0]. (b) H= [I (e) Demonstrate thaI the system will '2!J:w no steady state error for a disturbance.88150.x and give the highest frequency for which the error amplitude is l~" than 200/< of the command amplitude.] r.3 and estImator poles at : = 0.16 For the openloop system G(:) = rl:) = ".14 In Problem 7. except place the extra eSlimatorpole at: = 0.
.75 ± jO. whereas plocing it so that it measures d is called the wmcolocared case. 8.0 that the error due to the wobble is eliminated a.obbk in the location of the tracks that should be followed by the read head. (bl Use the controller IK and LpJ obtained in part lal in a . D (~I. O. that i. . best vou c..5 and (v" = ..4 ± jO. .tem model sO that the torquc bias is a state element.2. thus produtLng . so it is not acceptable to assume the steady slate error due to . Ie) (d) Dt'~igtl a digital .+9 (a) Com'en the system tn discrete state·space form with T = 0. that i.turbance Ie. yenfy hy simulation that it provides the correct response to a unitstep comm.8 ::: jO. (c) Compute L" with ~J" = 0. The "peclhca(IO~" are that the rise time I.n. aswme the coupling i. h this system observable? 8. rad/sec.25. (d.Ing the ~tatccommuIlJ input ~tructur~. we obtain a re.1:1 = angle ofthc pendulum from venical. (bJ Determine the compensation in tran. a situation that is addressed by this problem. k = 25 "11m. and h = measurement bia~.\ plane "'timator poles at I.. the designer is not aware initiallv that a resonance cxi~ts in the system. except add a delay of two sample periods between the "ystem output and when the measurement is available to the computer.nd usmg the statecommand input structure. O. Plot the frequency response of the compensation Icontrol plus estimatorl from paI1 (e)..input commands can be eliminated via feedforward with an N 1."itructural resonances. O. Determine the track folio\\' iog error due to thi~ wohble. . 0..12. (fi . The plant gain of 1000 lS not known precisely. A2ain. d.spring dcyice described in Appendix AA is representatiW of many deVlce:. described by [ 8.) v. . Answer the questions helo\'. = 0. (a) (bl Find K to obtain equivalent splane control pnlcs at ( = 0.1 ::: jlU.t. \ = [I OJ [:. I (a) Using your K and LI" determine the time response of the .4 To represent the case where the designer did not know about the resonance.» Im+Mls" Design a digital controller (K and L ) with T = 200 msec. la) Compute K for ~.22 Determine the stalecommand input structure for a feedback system with the Type 0 plant 10 Glsl= ..'+0.ec..ee and the 0\ eeshoot M" < 100. augment the system model so that the mca. 8. and estimator poles at ~ = 0. (e) Repeat panlbJ.ign becau. and 8.fer function form.b = 0.lput to the 'ystcm i. Find L to ohtain equivalent. u' = IOrquc bia~. the track wobble. that have some. There is typically a small oft"et between the center "I' th~ circular tracks on the di~k and the c. and estimator poles at ~ = 0. IU.:ornpen~at1on ~o that then: i~ no ~kady :o. The transfer function is then _ dis) 1'(1) G. '>Iark tbe frequency that represents thc spin rpm.18.: assuming the output i:sampled with T = 100 mseC and th" control (II + I/' Its applied through a ZOH. Plot th~ frequency respome of the tracking error (e in Fig. with.onance frequency of 5 rad/sec with a damping ratio. Vcrify by simulation that it proyides a response to a unitstep command using the statecommand input structure that is consistent with the selected poles. 0 ± JOA with d as the measurement.'. rigid. t~nn. Often. Expre~s the answer a~ a per('entagc.tate erro~ to an input command nor to a constant di. l So a sample rate of 3 kHz.. Ie) Design a founhorder controller with control poles at ~ = 0. (a) (bl (e) With no torque bias (11' = 0 I. = 0. directly (no estimator) and fed them back using your K fro'.5 and co" = 8 rad/sec. (el (n (bl The disk spins at 30L)O rpm.' ± JOA. On you expect there will be a steadystate error for this system fnr a step input" Plot the step responsc and confirm your answer to (e).23 Repeat the design of the controller (control and estimator) for Examples 8. III = I kg." = OA ± JOA. lIisl 11(.ystem to a unitstep Input u.32) whcrc the i.02. Is this system observable" With no measurement bias (i> = 0.ensor ~o that it measures r is called the c%cated case. h thi' system obsef\able'! Augment the system model so that both biases arc state elements. but replace the plant output.ltn of DI.02. to the \ alues computed for K and L 8.2 "Isec/m. a fourthorder plant with secnndorder controller..' pan la.) '>Iark the roob where the'~atn correspond. control poles at r ~ = 0.. augment the sy. Ie) Emhellish your desi~n from Ia) .. O.2.= '= .356 Chapter 8 Design Csing SwtcSpaCf r\ethods 89 Pmbkms 357 where we = hOOO radhec and (. Is the "ystem observable? Check for predictor and current estimator.t the wobble magnitude. and h = 0.imulation of the system where the infinite spring is replaced with the flexible one and the output is d. State why you think this kind of compemation is usualh referred to as a lIolch Plot the unit step response to an input command using the predictor estimator showing the plant output as well as the delayed sensor output. ] +h where Xl = [II &1. ComputeL: with (el ~J'.urement bias is a state clement. must be less than 2 m.3. ( = 0. (a) :~ ] = [  ~ ~ ] [ :~ ] +[ ~] II  [ ~ ] lJ.1 . 8. (b. (d) Analyze where the roots of the system would be if I'ou measured \' and . and construct a roOi locus" the de g.6. " Determine N" and ~" then sketch a block diagram specifying the controller equations including the reference input.'enter of rotation.e the system will senle in a finitc number of sample periods. (This is often referred to as afinile seIlling lime or deadbeat de.8. as in part Icl and with ~J.t.24 The double ma.20 A pendulum with a torquer at its hinge i.21 Design a controller (control plus estimatorl for the samc system as 111 Example 8.filrer.3 ± jO.. O. k is infinite. For M = 20 kg. Examine the response and compare it qualitatiwly with an analysis of the dosedloop roots of this combined system. but place all four desired pules at ~ = 0. Placing the s.75 ± jO.lsi = . II = torque.
Although this cannot 359 . However. of the system (plant plu.1 by discussing some of the steps thJt might be taken in order to convert a ~1MO system into a SISO one.S. O. a design approach is required \vhich intelligently uses this e. K or L. tra freedom for MI~10 systems. (b) Compute the zeroorderhold model with a sample period of 5 sec. no small feat. The method will determine the control !Jw that minimizes J. due to the sensor. controller) and comment on the sensitivity of this de.358 Chapter 8 Design Usmg S!ateSpace 'vlethods (gl Plot the ~plane root locu. (dl Compute the step response to a reference input step and to a disturbance inpul the control. are not uniqllely determined by the resulting equations. The material in this chapter provides a tool that meets both these needs.l ± jO. . (a) Write state cquations for this system. "I     . (e) Design the compensation including the command input with the control poles al 0. The subject of this chapter is the use of optimal control techniqlles as a tool in the design of control systems. the ideJ is 1O transfer the designer's itc[Jtion on pole locations as used in Chapter 8. 8. ± ·9 · Multivariable and Optimal Control .. or MI~10) system. In fact. It is important that the designer have no illusions that some true "optimal" design is being achieved: rather. each iteration on the pJrameters in J produces 'I candidate design that should be evaluated in the light of the design specifications. PowdL and Emami I 199~\ Example ~.8 jO. but becallse the parJrneters in J are Jrbitrarily selected. multioutpltt. The transferfunction approach in Chapter 7 is best sllited to SISO systems: the statespace methods of Chapter 8 were limited 1O S1SO in order to simplify the procedures. J. Vcrify that there is no delay for the command mpul. we find that the gains.       . Therefore. we saw in Example 8. In addition. Therefore. Chapter Overview The chapter starts out in Section 9. if we try to apply the poleplacement approach of Chapter 8 to a multi\'ariable (multiinput.16.   22 Se~ Franklin.25 and the estimator pob at O.ign to changes in the ol'erallioop gam.l.3 that the selection of desired pole locations for S1SO systems can be tricky business. A Perspective on Multivariable and Optimal Control The controldesign procedllres described in Chapters 7 and 8 were applied to systems with a single input and single Olltput (SISO).25 A heat exchanger" has the transfer function e. these designs will achieve some compromise between the use of control effort and the speed of response and will gUJrJntee a stable system. Some sort of systematic guidance for the selection of control and estimator pole locations seems highly desirable. the design is at best only partially optimal. or compensation parameters as used in Chapter 7. GIS) = (lOs + 1((60s + I)' where the delay i. to itemtions on elements in a cost function.
Into two secondorder equatiOn> and sho" 9.1 derilcs the companion optimal estimation problem. Although there is a small amount of coupling of lateral motion into longitudinal motion.1) arc of eighth order but are almost alway. II. the one typically used in control implementations. and the specification of four closedloop roots clearly causes the problem to be underdetennined and will leave man) possible values of K that will meet the specifications. Section 9. show.! D''Ull!l'ling Decouple the lateral aircraft founhorder equations how to design the control. p. Further decoupling of the equations is also possible. 9. This shows that the poleplacement approach to multi\'ariable systom design poses difficulties and additional criteria need to be introduced. Velocity components: u fOIVIard rate shows that there are eight elements in the gain matrix to be selected.3 shows how to find the stead)state lalue of the optimal feedback gain that is signi ficantly easier to implement and i.1 Decoupling Solution. Angular velocity components: p = roll rate q pitch rate r ::. The final section. typical I) the one implemented. x= K ll K" [] K" K"" and p = <p". This step will give better physical in. this is ignored with no serious consequences when the control.2 derives the timevarying optimal control solution that results directly from the optimal control problem statement. it can help to clarify the key control issues in acompkx system ' I ' that the later optimization of the whole system will be better understood.1 ) u =[ ~:. r.3) v = . Section 9. 1'). . 9.. q) and lateral motion (p. control surfaces affect longitudinal motion: the aileron and rudder primarily affect lateral motion. A comral law of the standard form [1:. how to use these resuIls in the design of \1H. there are unique values of the four nonzero components of K: hmvever. and the roll rate. The aircraft lateral equations are multivariable and of the fonn x(k The first step in any multivariable design should be an attempt either to find all approximatt modelcon"isting of two or more single inputoutput models or ehe to decouple thc control gain matrix K and the estimator gain matrix L.1 ec'rHr. (9.9.5.5) and therefore can be difficult to salle.ight iIllo the important feedback variables and can lead to a plant description that is substantially simpler for design purposes and) et yields no significant degradation hom an analysis based on the full multil'ariabk sl'stem. <P". then we fInd the steadystatc gain case that i. • Example 9. separated into two fourthorder sets repre." ] [~ ] (92) 2.]=[ Figure 9. A decoupling that removes the ambiguity is to restrict tho contrallaw 10 (9.ideslip rate Dateral . the timeI a 1"1 ing gain solution is found firs\.peed) L Ele. thus causing changes in the roll angle.1 Schematic of an aircraft shOWing variable deflnlclons KIJ K'J KI' K. GII'en an achievable set of desired pole locations. Section 9. and the ailerons primarily roll the aircraft about an axis through the nose.1 Decouplmg 361 always be done.10 control system". . the governing equations cannot be cast in the same form as in Eq.'ator B~ w = altitude rate LRudder5.enting longitudinal motion (U'. or "stabilityaugmentation:' systems are designed independently for the two founhorder systems.. thus directly causing sideslip i l·). The elevator + I) = <l>x(k) + ru(k).. yaw rate This makes good physical sense because the rudder primarily yaws the aircraft about a \'ertical axis (rmotion).J . As for the control ca'e.For example. the linearized equations of motion of an aircraft (Fig. (8.
x.. I" is important the rOOI' If the plant coupling that was ignored in the gam computa Ion .lkJ + r 1I1k1 + L I \'Ik) . cart motion is the mechanism for influencing stick motion and hence stabili7ing it. However. <P>. but this just acts like an additional control input and can be ignored in the calculation of the stick estimator gain matrix. one could revise the deSIred h thods of optimal control to be described In from Eq. Even without the \'ery weak oneway coupling in <P".. lculatin o the eigenvalues of the closed roots of the full lateral equatIOns can be.1 DecllUpling 363 Hinged stick and motOrized cart <P [ r ] = p [<P" <P <P" ¢" 0 0 0 0 IZ 19.~ I and the available measurements are <P '" f '2" K . Note that ignoring the coupling only causes approximations in the gainmatrix calculation and thus the root locations. . (9. one could assume this to be the case. The same ideas apply equally well to the decoupling of the estimator into SISO parts. hi' I oed loop characterisli. But because we can assume that <P" = O. ( " " .K'2 '" . {9. II.v (kI). then check the resulting fullsystem characteristic roots using a method similar to the previous airplane example.2)..L K 0/. ~. + l) = I..1 . where L.'ribed in Chapter 8.11 is of the fonn I' 9..3). from the stick equation.. .'1.f" 'J . and there is no reason 10 ignore the weak coupling. and L.'.' J • Example 9. K.. to 0 ~hm k db . 9:J I a"~ obtained from Eq. the cart equation in Eq. 9. I' bt' the oams T e resu tmg c os of Chapter 8 can be applied direct.f"K 2J K <P" .5) are satisfactory or else tum to t e me the following sections.<P" . 19. (9. the <PH coupling should not be ignored in the estimator equations. < I.." The stick pictured in Fig.] [ :' ].[11 K " '" '+"1.. . ecoup e J .' .362 Chapter 9 Multi\'ariable and Optimal Control Figure 9.f K" <pl.f'lIlkJ+L'iH\klAlkll. The equations of motion can be written as which can be done with the methods de.. This does not imply that <P" = 0: in fact. .r 2 1 " K 0/'1 ". (9.4).' .7) requires the determination of eight elements of an estimator gain matrix. In (9.] . rno between the two aircrafl This makes some physical sense but ignores Important coup I ~ f 'h' 'h the methods d 1 the . An estimator for the system de. + [ <PH ¢.m in MATLAB) .'lk). <P"x'(kl+</>". ec e .scribed by Eq. <P" x.du~:i~~"f~~her.  r.._ 0/22 . This means that slick motion has a small dynamic effect on cart motion. [ [ :~...4). the method . <p The final (predictOr) estimator would be of the form " (9. There is no .'\" 41 <p"f. specifying the four estimator roots and using the methods of Chapter 8 would not determine this L uniquelyanother example of an underdetermined system caused by the multi\'ariable nature of the problem.S) =[1 0][ ~. using the poleplacement methods of Chapter 8.. (k which resulis from combining Eq. L. and \\:c simply design an e~1ilJ1ator for x. however. {9.71 .~'ilI be ~c~:~~t~o. L Hence.K II '" .'" <p.:~~~s ::d i7::at~ until the correct rooh other cases." .ca e loop matrix: (see elg. <p" .. ] stick angle and angular rate. (9. that wa.. obvious for this example. = kTl [<p'. X (k + I) .. In many cases. are both 2 x I matrices.f.['2 K . ~"_f'cK2' 0/" '" 0/)"  _ f K ] .5) will differ from those used to com:utedthe gaJ:."stem into secondorder s"tems or W Ie ..2 is substantially lighter than the cart. 9. There is oneway coupling into the stick equation.c K 21 <P" . ~ J: ~: ] u(k)...] x~ where x.6! [ X. Solution.31 and (9.'ikl) \' = = <pxlk) + <p x.lk) + f. (9. which in turn implies that <P" '= O. = do~d'oop [ <P"f.[ " K 2" 19.2 Estimator Decoupling Decouple the estimator for the inverted pendulum on a motorized cart IFig..6) and Eq. P '+' and that the control law is given by Eq.6) uncouple. (9. modes.~ ~ ] cart position and velocity.f"K" . (9. It doe.2 A further decoupling that would pennit an easy gain calculation is to assume that Eq.
and A(k). rewnte Eqs. . are symmetric weighting matrices to be selected by the designer.1. u(k). which could saturate the actuator device.101 9. using Eq. With luck. (9.13) (9. The result amounts to another method of computing K in the centro I law Eq.' T 2:x (klQlx(k) + 2: uT (k)Q. ~ [I .10) aJ' au(k) we wish to pick u(k) so that a cost function I . (913) [9. but we let it be k + I because thIS . T~e In?ex on A is arbitrary conceptually.2) in Example 9.1. who bases the choice on the relative importance of the various states and controls. the two cost functions •. xTQ1X T ax(k) = x (k)QI .23.t. They correspond to placement of all poles at.364 Chapter 9 Multivariable and Optimal Control 9.u(k)J k~O I N [9. I The Q's must also be nonnegative definite. Such comrols are called "deadbeat"" because they beat the state to a dead stop in at most n step~. T.:: . howe\'er.11) aA(k + /J + I) + el'x(kJ + rUCk) state equations.15) Restating the results in more convenient fonns. (9. using very efficient computation tools. At worst. it ensures that possible x and u. th we WIsh to mlll1mize .: o. k = 0. and the states would be driven to zero at a very fast rate. Given a discrete plant x(k cost function an~ find the minimum of J' with respect to x(kj.11) '. for each value of k. i~ long. They also allow the designer to determine many good candidate values of the feedback gain. (8.1 = " l)x T (k)Q1X(k) + u T (klQ.11) as e ure IS to . and 2 k~O is minimized.chOIce WIll yIeld a particularly easy form 0 f th e equatIOns I ater on . are identical In magnttude. (9.5) u=Kx This is a standard constrainedminima problem which can be solved usin the meth. ". (9. .1 = . See Problem 8. we have from Eq. K. IS at In short.od of Lag~ange multipliers. [9. Another w~y of stating the problem given by Eqs. = x(k 1 control equations. 2 Matrix equivalenr ofa nonnegalive number. We will develop the timevarying optimal control solution first and then reduce it to a steadystate solution in the following section. P roceedIng wtth the minimization leads to .0): otherwise the solution will include large components in the control gains.1 =I. + 1) = el'x(k) + ruCk). (9. the estimation errors will still approach zero for stable estimator roots. . . There will be one Lagrange multiplie~ vector. (9. Some weight will almost always be selected for the control C1Q. can be written as the backward difference equation A(k) = el'TA(k + I) + Qlx(k).16) and uTQ:u are nonnegative for all .IOJ aJ' (9. Note that for an opltmal ~(kJ that obeys Eq. a control that moves the state along as rapidly as poS5ibie might be feasible.10) and (9.2 approximation in the system model used in the estimator: therefore.10) and (9. adjoint equations. it is often useful to apply your knowledge of the physical aspects of the system at hand to break the design into simpler and more tractable subsets. the whole job can be finished this way. TimeVarying Optimal Control 365 • easily accomplished by picking the Q's to be diagonal with all diagonal elements ~~~oruro . and Q.14) The la~t set of the equations. (9. Lagrange multipliers J = 2: ~)XT (klQlx(kj + u T (k)Q. The proc d . the adjoint equations.9) that was used in Chapter 8 and illustrated by Eq. insight will be gained that will aid in the design procedures to follow and in the implementation and checkout of the control system.2 TimeVarying Optimal Control Optimal control methods are attractive because they handle MIMO systems easily and aid in the selection of the desired pole locations for 5150 systems.u(k)] = u (k)Qz + AT (k + l)r = o.AT (k) adjoint equations a. + ru(k). Q.1' and.1' + AT (k + l)eI' = O.' which is most I If the samphng rate. (9.U(k) (9.12) I + AT (k + 1)(x(k + I) + el'x(k) + ru(k))] . (9.11] subject to the constraint that x(k + I) + el'x(k) + ruCk) = O.10) x(k where.17) + IJ = el'x(k) (9. = O. N. (9. "'hlch we wIll call A(k + I). 10).
(9. (9. (9. With the definition Eq. . It is not easy to solve because it is nonlinear in S. (9. (9.23) which is often rewritten as (9.16) for x(k S(k)x(k) = + I) «I>TS(k + IJ(<<I>x(k} + ru(k») + Q1x(k). thus S(N)=Q. + rTS(k + l)r where (9. and u(k).15) with u given by Eq. = O.22) Because Eq.15) for A(k) and A(k + I). (9.366 Chapter 9 :'lulm'ariahle and Optimal Control 92 TlmeVarymg Optimal Control 367 and from Eq. (9.16) to eliminate x(k + I) as follows.«I>TS(k S(k) = «I>TrS(k + 1)«1> + «I>TS(k + I )fR'rTS(k + 1)«1>  sweep method A set of equations describing the solution to the optimal control problem is now completely specified. is to assume A(k) = S(k)x{k) (9.17).25) with the single boundary condition given by Eq. (9. + I )«I>x(k)] + Q. (9. = _R1rTS(k + fTS(k + I )r)'rTS(k + I )«I>x(k) + 1)«I>x(k). we have A(k) = «I>TA(k and substituting Eq. and we are led to the endpoint to establish a boundary condition for A. we eliminate A.21) to obtain u(k) = K(k)x(k). and either (9. The boundary condition on the recursion relationship for S(k + I) is obtained from Eq.15) we can describe A(k + I) in the forward difference equation form A(k+l)=«I>TA(k)«I>TQ. One method. Then we substitute Eq. The solutlon to this twopoint boundaryvalue problem is not easy. provIded the initial (or final) conditions are known. 19). (9.18) are a set of coupled difference equations defining the optimal solution of x(k). (9.13) becomes Q.26).2C11 + I) . (9. (9. Let SiN) = Q. and the initial condition on x would be given in the problem statement. (9.20). To solve for u(k).. The recursiou equations must be solved backwards because the boundary condition is given at the endpoint.20). and we see now that the problem has been transformed so that the solution is described by the recursion relations Eq.24) where M(k + I) = S(k + I)  S(k + I)r[Q 2 + rTS(k + l)rr'rTS(k + I). (9. usually A(O) would not be known. (9.. which is usually less than the number of states. and Eq. (9. (9. (9. called the sweep method by Bryson and Ho (l975).15) or (9.13) suggests that A(N + I) = O.u(k) = rTS(k = rTS(k + I)x(k + I) + l)(<<I>x(k) + fu(k).191 Riccati equation Now we use Eq.14) thus shows that a suitable boundary condition is A(N) = Q.x(k). From Eq. (9.25) This definition allows the transformation of the twopoint boundaryvalue problem in x and A to one in S with a singlepoint boundary condition. we obtain u(k) = (Q. A(k). has the same dimension as the number of controls. the control Eq.19) and Eq.x(k). (9.]x(k) = O. (9.21) for u(k) in the above S(k)x(k) = «I>TS(k + 1)[«I>x(k) . (9. (9.16).17).25) R.x(k). (9. It consists of the two difference equations (9. From Eq.181 Equations (9.S(k + I)rR1rTS(k + 1)]«1> + Q. (9. and K(N) 2.24) and Eq.21) into Eq.22) must hold for any x(k). Equation (9.27) for convenience. The initial conditions on x(k) must be given: however. 1. the final condition on A given by Eq.rR1r'S(I: and collect all terms on one side Q.IO)].11) we see that u( S 1 should be zero in order'to minimize:J because urN) has no effect on x(N) [see Eq.23) is called the discrete Riccati equation.20) into Eq. Next we use Eq. we have S(k)x(k) = «I>TS(k K(k) = rQ o + rTS(k + I Wr'rTS(k + 1)«1> (9. (9. (9. from which follows a backward difference equation describing the solution ofS(k) [S(k) . Let k = N.26) Solving for uCk). (9.211 In Eq. Thus Eq. we use Eq. If we now substitute Eq.20).x(N).x{k). But note that the matrix to be inverted in Eq.16) and (9.28) + I) + Q. (9.15). the coefficient matrix must be identically zero. (9. (9.21) we have defined R = Q. and is the desired "optimal" timevarying feedback gain. (9. Let us now summarize the entire procedure: + I)x(k + I) + Q. (9.
0 :: • Example 9. = 0. of the problem is known. We could also view this result as a method to find Solution.I) = [Q..5 4. A.I) = ~r:\I(k)¢ Let k = k .1. 6.2~) through (9. 8r7 9 .3 Timt" \(:/1~\ing 0"Clwre of Ct1J1rrol Cains Solve for the time history of K for the satellite attitudecontrol example described in Appendi. k [9.3 contains the resulting gain time histories plotted by the computer. chosen long enough so that it was apparent that the gains were e5'entially constant over the initial lime period. i<'" 3. • .0 3. Example 9.281 need to be solved for the system transfer function G(s) = 1/ s'.. we use the stored gains K(k) and x(k Q2 = 0..0 e 2.27J 4. to apply the control.:.( + I) = ~x(k) + ru(k). 4. K(k). a scalar in this case because there is a single control input. _ 81.368 Chapter 9 Multlvanable and Optimal Control 9. the first portions of all cases show constant values of the gains.01. the mtmmlzatlOn of a cost funclion rather Ihan a computation based on speCIfied root locatIOns. Store K(k .. + Qj' ~6 . Figure 9. [9.0 O.2ino:fn:J. to have three values Q.5 I~~ O.1 except that the values of the constant gain. Let S(k .1 sec..I). 0.:..~ C g4 c u 3 2 I 0 0 For any given initial condition for x.S(k!r[Q2 + rTS(kWr1rTS(k)..5)" 1.5 Q 2 = 0. I sec. (9.2 Figure 9. If the problem length had been . and 1. 7.. Choose the stale weighting matrix to be (9. and the earh constam gam portion would have existed for a longer time. + rrS(k)r]jrrS(k)~.. optimal gains for all constant coefficient systems.:. and plot the resulting time histories of K.301 chosen to be 10ngeL the end characteristics would have been identical. S. The fact that the gain over the first portion of the example was constant is typIcal of the. Let M(k) = S(kl .3 Example of control gains versus time.01 Note that the optimal gain.291 a 2..I Go to 5tep 3. with the sample period of T = O. Let K(k .16J where u(k) = K(k)x(kl.0. This is so because no knowledge of the initial state x(O) is required for computation of the control gain K(k). Choose the control weighting matrix.01 ___ 5. Equations (9.OI~O~IO'. changes at each time step but can be precomputed and 5tored for later use as long as the length. are based on. We see from the figure that the problem length affects only the values of K near the end. which.3 TlmeVar)ing Optimal Control 369 3. I.Q2~= 0. The problem length for purposes of defining:J was chosen to be 51 steps. . means that the total time was 5. conslantgain portion is identical to the constantgain cases discussed In Chapter 8 and Section 9. N.=:::~~k which means thai the angle state is weighted but not Ihe angular velocity. K..S . and in fact. provided that the problem time IS long enough. This means that Ihe optimal controller over the early. This time wa.
..31 ) Thus we see that having computed S. (9. constant portion of a problem is to compute S backward in time until it reaches a steady value.370 Chapter 9 Multiyariable and Optimal Control 9. we find J' = J = _AT (O)x(O) I = _x T (O)S(O)x(O). and <Il are nonsingular. we find 9. The fact that S is positive definite follows by inspection of Eq. Its drawback is that it requires substantially more computation than the alternate methods. from Eq. We call this solution the linear quadratic regulator.x r (k)QI)x(k) T + (_u T (k)Q!)u(k)] + I)x(k + 1)] = 7 2:)A r (k)x(k) ~_o 1 N  AT (k =  I 1 AT (O)x(O) .23) reduces to regulator LQR J' = 2. S(k) becomes equal to S(k r. the cost is quadratic. optimal K during the earl\ . a satellneanitude control system might run for years.28) to compute K.'ing de\eJopment would fail.3 LQR SteadyState Optimal Control The previous section developed the optimal control gain that minimized the cost in Eq. foIJms.. Typically a deSIgner would evalu. (9. Another method is to look for steadystate solutions of the Riccati equation .19)..'kagC'~ )y~[ems with a pure tim~ delay rhi31 i~ gn:aler than th~ "ampling: period.. the timevarying gains act exactly as In the preceding example.16). Before we leave the timevarying case it is informattve to evaluate the optlll~al cost function J in terms of A and S.32) to find an analytical solution for S. 2)x T (k)Qtx(k) + u T (k)Q. thus yielding a much simpler implememation. and it applies to the regulator case. ually $ havt" features in their t0nnulation~ thai j:. We WIll show In Section 9. and one needs to know that S must be positive definite to select the correct one. 1 2 2 (9. EulerLagrange equations which is usually referred to as the algebraic Riccati equation. one is sometimes able to use Eq. using Eq. (9.. We can combine these equations into a set of difference equations in standard form in x and A if we assume that Q. and thus.. For extremely simple problems. In fact. Because of the quadratic appearance of S. which describe the timevarying solution. for the infinite time problem.. Q I and Q" are arbitrary quantities that change wlth the dIfferent desions. there is more than one solution. (9.3. it is not very useful because the.4 how to remoye the effect of sample rate on the value of Ihe cost..18). diftkult)'. Furthermore. welghtmg matrices. portion of the timevarying optimal solution is the tmeoptimal...13) and (9. In fact.I) (we'lI call them both S. in fact. This section will discuss how one finds the LQR solution and various properties of the solution. but that there would usually be a portion of the solution that produced a constant gain. K. because it applies to linear systems.1..' but in most cases this is impossible. 1 These equations are called Hamilton's equations or the EulerLagrange equations (933) 3 For circumvent thi . T. It is based on the linear description of the combined state and adjoint equations given by Eqs. The next section develops a method to compute the consta~t value ot the optimal gains so that they can be used in place of the limevarymg value. SofTware pa!. singular and the .20).. (9. In steady state.14) tor AT (k + I)r and AT (k + 1)<Il in Eq. (9.' This has been done in some software packages and gives reliable answers. many comrol systems are turned on and left to run for very long times: for example. or LQR. then use Eq.u(k) . the constantgain solution is the optimum. (9. Mosl software packages use variations on a method called eigenvector decomposition due to its superior computational efficiency compared to the methods above.11). we can immediately evaluate the COq associated with the control. (9. and therefore the constantgam .31) and that J must be positive. portion of the solution determines a set of closedloop roots. and a numerical solution is required.3 LQR SteadyStale Optimal Cl1mml 371 a "good" set of pole locations because the constant. Although the cost could be used in evaluatlllg dltferent candidate designs. This kind of problem tS treated mathematically as if it runs for an infinite time. (~..17). which would be much easier to implement in a control system. "\ie saw that the result was a timevarying gain. thus eliminating any usefulness m evaluatin£ the performance for different sample rates. If we substitute Eqs. A(N + 1) = O.Il) I' ro:ghly proportional to the sample rate. (9. The only regLOn where the gaLIh are not optimal is during the transient region near the end.te different designs by looking at the traditional measures that have been discussed in Chapter 7 or possibly by evaluating quadratic performance measures that are independent of the Q's and the sample rate..=0 I N AT (k + I)x(k + I) +(A (k) . L!. K(k). S. For MIMO problems.) and the Riccati Eq. called the regulator case. (9.Ar(N + l)x(N 2 2 (9. One obvious method to compute the value of K during the early.. algebraic Riccati equation However.. and (9." the value of the discrete cost as defined by Eq.12).32) + I). (9..
(9.<I> rQ~1 r .1 Reciprocal Root Properties Let us tum to the question of the reciprocal nature of the roots of Eq. the n unstable roots are the reclprocah of the n stable roots. the problem would now be complete. because if any unstable roots were included. the plant characteristic polynomial. (9.<I»det{:'I .Q . and the desired relationship has been established. u(. (9.36) into Eq. the /l stable ones are the roots of the optimal cOllstal1fgain case. Now we use the result (Eq. Therefore.39).:I)det/I T 1(= [ <I>+rQ~lrf<l>TQI _<I>T Q . (9. and as p gets large.:1 .2 Symmetric Root Locus An interesting special case of Eq.:). C.<l>T from the second term to find (9.33). Eg. A(. To simplify the notation. Furthermore. the roots go toward the zeros of G(z')G(z).I.:1 . But the limevarying gain solution includes the portion where the gains are constant. (9.15). _rQ~'~T<I>T].:J)G(.1 r is the plant transfer function G(z).:X(:) = <l>X(. rQ~1 r T ] [ <l>T XC.:Q~lrT A(z). and det(z'I . (9.:A(.39) If we replace z by ZI in Eq. we find.372 Chapter 9 Multivanable and Optimal Control 9. system described by Eq. if .:transforms of Eqs.34) det(d lI»det/(z11 .34) [or roots of Eq.33) are found. the optimal roots are near the poles of the plant (or the stable reflections of the poles if G(z) is unstable). (9.3 LQR SteadyState Optimal Control 373 and their system matrix is called the control Hamiltonian matrix Now we factor the tenn z'I .zII lI>T)'QJ U ~ <I»lrQ~TT)} = O. In fact. .36) (9. closedloop system! If we were trying to find the ~pttrnal K ~or a SISO system.<l>T){1 + (. Therefore. the parameter that reflects the relative weighting on output error y and control 1/. . which are inside the unit circle.(~I_<I»lrQ~'rT .:) = O.:A(z). during the constantgain portion. (9. (9. det [ _Q :11 _ <1>7 T 1 ] 0 .33).<l>T) = a(z'). because knowmg the ~pt~ma~ roots allows us to use Ackermann's formula to find K.opttmal K for MIMO systems. We will r<:tum to the eigenvector decomposition solution after establishing the charactensllcs of the roots Just stated. _ r If we now reduce th e tenn . If we take the . which describes the solution of the timevarying gain case.<I> QJ . (9.l6) with u(k) = 9.:). the cost function :J can be written as :J = py' + 1/' where y = Hx and Q. constantgain.:i is a characteristic root of lhe optimal system. (9. These 2n roots are those of the coupled x.X(z) + :<I>TA(z). too.33) is linear and the Hamiltonian matrix is constant.:) and . we obtam . If we substitute Eq.38) where Q.. 1+ pG(.system. Furthermore. the value of:J would be approaching infinity and would be far from optimal.:) = _.39) occurs for S[SO systems. ]0 (9.m in MATLAB).:1 .<I»lrQ~'rTj = O.40) and is the characteristic equation for SISO optimal control.to zero b y a ddt'ng Q I(I .<l>T + QI(. For . + p(zII 1 <l>Tr'HTHrzl lI»lrrTj = O.17). 10 matrix fonn [ . choosing A = (zII . (9. (9. It is an equation in rootlocus form with respect to p. (9.35) and writ~ the remaining two equations in terms of the variables XC.33). we note that det(. the result is unchanged because detAT = detA. We will show in the next sectIOn that 11 of the r?ots are stable and the other 11 are unstable. = pH H and rQ~ r = rr .39) reduces to Thus the roots of the Hamiltonian system are those values of.3) from Appendix C for the determinant of a sum of I and a matrix product AB. <1> Because the system described by Eq. = r and we see that H(zl . was set equal to I. But which ones are they? The answer must be the /l stable ones.3. But we want the .<l>TrlHr to write (9. Because this matrix is b10ckwise triangular.3. In this case. """e can solve for the eigenvalues of Eq. we have 71<1> rQ~lrT det [ ~ 0 z'I<I>{ +Q. so it's not that simple.<1» = a(.35) (9.371 K oc x(k).33)J using standard techniques (see eig. the n stable roots are the roots ofthe opttmal. so is the reciprocal Z. 11.:) = Q.:1 1 and the roots of this simplified /lth order description must be 11 of the 2n roots of Eq. Therefore we see that once the roots of Eq.: for which .:I .:) ] = [0].<1>. If p is small.:) 9. we find that the Hamiltonian characteristic equation is a(z)a(.:) + rUe. and (9.an nth order. there will be 2n eigenvalues. we have det(zl . (9. using the fact that det AB = det A det B. Thus. T T (9.<1»' times the first ~ rows to the second rows. the system can be described by Eq.16). (9.
l is a diaoonal matrix of the stable roots (1:1 < I). can be diagonalized to the fonn H..ershoot. the locus of optimal root locations versus the parameter p i. In this case.W. III those l:ast's. is obtained by the similarity transforrn~tion 9.=0.7. to be the optimal 'olution.I. find the roots that achieve a good balance between the output erwl" and the use of control. that is.  _. for this example. ~ 0. Comment on the damping of the optimal controller vs. \V.4 'ec. The optimal damping ratio for ImY p is . it abo tum.+. out.4 C(~) = (~+ II.7 produced a good compromise between speed of response. for each stable root. 11 will ha. Just as before. 11. and u. (~. . 4 therefore. .lltUling the two C 's into Eg. ~ 0. and cannut be made diagonal by a change ('If \"ariabl~':l.. there is an unstable "no that is its reciprocal. Designers have always known tlut picking. This result make.3 LQR SteadyState Optimal Control 375 • Example 9. I~ . the eigenvalues of this matrix are such that the reciprocal of every eigenvalue is also an eigenvalue.. Therefore. H.1) Therefore.e repeati"d roots.1 Draw the symmetric root locus for the satellite altitudecontrol problem in Example +.c of C0t11rol. The di.11 Replacing all the ~·s with :1 and multiplying top and bottom by:' results in C(. where . = [ EI 0 E 0] .4 SVIJ1IJ1"tllL Rl1(.4 9.11 is lUI Symmetric root locus of Example 9. half the roots of the characteristi l' equation must be inside the unit circle and half must be outside. where E is a diagonal matrix of the unstable roots (I: I > I) and E. (9AOI to aITi"e at :.(. where W is the matrix of eigenvectors of He and can be written in block fonn as H. I: .I j" The locus is drawn in Fig. ".3.. Abo note that.crele transfer function from Example 4.uh. and from this solution we can obtain the steadystate optimal cOn!rnl. fl· Solution. a sn'Jall change in Q 1 or Q: will remO\~ the problem. or ebe we must compute (he Jorda:l fann for 1i: [see Strang 11976)]. 9..t L'\([IS/"f SuldltlC Arlilwlc emlr.' can solve Eg.. =WIH.33) by transfonning to a new state that has a diagonal system matrix.I) = :(: . +. detennined by . sense because the optimal formulation is attempting to do the same thing that designers ha' e always tried to do.3 Eigenvector Decomposition Now let us return to the optimal constantgain solution for the general case. segments start from the openll)ur poles and tenninate at the zeros. "!ote how the stable locu.374 Chapler 9 \Iulll\'ariable and Optimal Contwl Figure 9.11 T = 1.cases.I)' I + p ._. (9.J In rare.
J with N + x is u(k) = K". dlqr. from Eq.28). An ~()] [ A x: ].(k) = X.5 From Eq. (9A2) To obtain the steady state. the poleplacement approach used in Example 8. Using the . Solution. ].ystem j .m can be used repetitively for varying values of elements in Q. Compute eigenvalues of the system matrix H.+1 . (9. can be used to transform x and X to the This same transformation matrix..4 and comment on the relative merits of this approach. So we see that the only sensible solution for t~e steadystate (N +x) case is for A'(O) = 0 and therefore A'(k) = 0 for all k. defined by Eg. we also have = In summary. + rTs". If the .lem is stahle and A~ ~ 0 if Q 1 i~ such that all the states affect J <1>... (9.33) can be simply stated in terms of the initial and final conditions and the normal modes.cc that if A*" is not zero then the state x \\ ill grm\' in time and the ~!.m to sol. and that the control law for this system corresponding to . x] [A [ = W [ X x~ ] = [ XI A. we find values for r which are then used with dlqr. (9.e . (9. Conversely.m for the continuous case) use algorithms for these calculations that are closely related to the procedure above.nrrTSxcf>. (9.X~IX(k) = Sxx(k). (9A51 Thus.given by Eq.5 Optl/llal ROtlr L[)Cl!s(or the Dot<blc c\!tbsSpring System Examine the optimal locus for the double massspring system of Appendix /\. . We have already seen that the stable eigenvalues from Step I above are the resulting system closedloop roots with constant gain K from Step 3..23).table and gi\. is the steadystate solution to (9.ing this control law is J.s. x(O). normal modes of the system. However..e for the closedloop roots for various values of be unstable.48) Furthermore.46) and (9. (9. K" = (Q. From Eq'. Although it is possible to find the LQR gain K". from a symmetric root locus and then using Ackermann's formula.3 I l. "T. from Eqs. I :zX T ((ns". Compute control gain K x from Eg. If a locus of the optimal roots is desired. x' ] A'" .. or Qc' .20) for the sweep method. because the solution for the normal modes is given by X' ] X' .43. It liU"" f~ll()w that the optimal sy:.3 is the matrix of eigenvectors associated with the eigenvalues (roots) outside the unit circle and LQR Stead)'State Optlmal Control 377 [ ~.41) is the matrix of eigenvectors of the optimal steadystate closedloop system..>". Because we have the optimal control in Eq. In some cases the sofm'are gives the user a choice of the particular method to be used in the solution. (90331. where x' and A' are the normal modes. 1. (9. controllahle we know that a control e.\lsIS \~'hICh ~rl1l m~ke the .slem ..E'x'W). we let N go to infinity: therefore x'( N) goes to zero and.v = [E\ 0] [ 0 E" [~. for a SISO system by picking optimal root. Most software packages (see MATLAB's dlqr.3 for this system .x'(k) (9.m for the discrete casc as developed here or Iqr. the complete computational procedure is: (9. it is easier to use the general Iqr routines in MATLA.. = A. (9.. ] is the matrix of eigenvectors associated with the eigenvalues of l(that are inside the unit circle. (9.44) and (9. the cost associated with u. so we conclude that (9. We can x also show that the matrix X.. of Eq. 3..41 J \.::[ < 1) eigenvalues ofH and call them ' The solution to the coupled set of difference equations Eq.42) with A'(k) == O..B for either SISO or MIMO systems. (9.~ill    • Example 9.. (9A6). from Eqs.461 .45) A(k) = A.48) with S". (9. (9..34) 2.43) leads to x'(O) = E'X~IX(k).47) where.'e a finite value to J. which is the same form as our assumption Eq.stem _I.arne model and sample period as in Example 8. Compute eigenvectors associated with the stable (1. (9A~) = A. (9.x'(k) = XjE'x'W). we have x(k) JI.376 Chapler 9 tvlultlvariahle and Optimal Control 9.x(k)..41) and (9.. in general.". Therefore Eq. that is. A'(N) would go to infinity because each element ot E lS greater than one.
. [k. 0.:. (9. the results fromth. therefore.3.49) Having this equivalence relationship will allow us to compute the J. (9.O.50) and because x(kT • + T) = $(T)x(kT) + l(T)u(kT).O.. o 0 0 0 and Qc is arbitrarily selected to be I.8 where 06 as indicated by Eq. it is also possible to formulate the LQR solution so that it can account for the cross terms. we see that a complication has arisen in that there are now cross terms that weight the product of x and u.58). which is the equi\'alent to an analog cost function of the form (9.11).3 that gave the best result. Because the output d is the only quantity of interest. it makes sen. In fac!. as we will show below: however. and the use of it for an emulation design will be discussed in Section 9.5.53) Equation (9.52) where l(T) ] d I T. lie at the points marked by stars on the stable portion of the locus.50) yields (9. (9.gam.s. (9. of two discrete designs implemented with different sample periods and.O]).9.53) is a relationship for the desired equivalent. So we see that the opum'll solution pros ides guidance on where to pick the oscillatory poles..s design led to the selection of the pole locations for the second case In Example 8.5 Locus of optimJI roots of Example 9. that is LQR SteadyState Optimal Control 379 9. The integration of the cost in Eg.51) Figure 9. discrete weighting matrices: however.O:~~. .378 Chapter 9 l\!ultivanable and Optimal Control 93 the weighting matrix Q. Q 1=diag{[q(i). 9. 02".2.TL\B script q '" logspace(3. (4.5 0.O"'.O:C. substitution of Eq.1 for i".1:100.5.3.02). It will also provide a method for finding a discrete implementation of an optimaL continuous designan "optimal" version of the emulation design method discussed in Section 7. The locus is detennined by sarying the salue of q [ i ' The l\l'..6 0. end produced a series of values of the closedloop system roots (e abose) which \Sere plotted 011 the ~plane in Fig.t _L1. (9.' to use weighting on that state element only.O 1.49) can be broken into sample periods according to Q[ = [q~1 ~ ~ ~].51) into (9.::'==.300).4 Cost EqUivalents It is sometimes useful to be able to find the discrete cost function defined by Eq..S.e]=dlqr(phi. we will develop the cost equivalence. s Real Axis (9. In this section.3 that yIelded the superior response. This can be circumvented by transforming the control to include a linear combination of the state. will provide a fair basis for comparison.8 .. K01e that the roots selected in Example 8.
i" ·1 .3. The resulting discrete weighting matrices include cross terms that weight the product of x and u.6. 0.47).380 Chapter 9 Multivariable and Optimal Control 9.5.5 Emulation by Equivalent Cost The emulation design method discussed in Section 7. T.6..2 took the approach that the design of the compensation be done in the continuous domain and the resu]tlTIg D(s) then be approximated using the digital filtering ideas of Chapter 6. and will also be useful in the emulation design method in the next section. 9. the continuous cost function Y. L'se of a continuous LQR calculation Oqr.. = 0. 0. The discrete approXimation is then obtained by calculatmg the discrete equivalent of the continuous cost function via Eq.5 o Real s .5'0 .55) Q'2 = [10000. and then using that cost in the discrete LQR computation of Table 9.5 ·2 1. In summary. (4... 0.1.Cll/Cllh•• =~"'.m) that finds the discrete controller for a continuous cost and computes the necessary discrete cost in the process. 3 0 0 2 ~ o 3 3 ·2. 0. I. These steps are all accomplished by MATLAR's Iqrd.. 0.2.. Q. whereas the entire matrix is multiplied by the sample period.6 Design by Equivalent Cosl Examine the aCCuracy of the equi\'alent cost emulation method for the satellite attitude control example. one needs to calculate the matrix exponential Eq..m. according to Eq. Example 9. 9. an optimal design iteration is carried out in the continuous domain until the 6 Note that superscript ( )T denotes trampose.s.. Furthermore.r~~ 0'" .m in Q" we have the desired result and = [~ ~ ] Qll Q12] _ <l>T q. The ablhty to compute the continuous cost from discrete samples of the state and control 15 useful for comparing digital controllers of a system with different sample rate. (9.53). I. MATLAR has an LQR routine (called Iqrd.j 0.22 = [ : q. is to form the matrix exponential6 _FT 0 Q cI _G T 0 0 exp [ 0 o 0 0 F 0 (9.54) in order to find <I> 12' Because Eq.55). (9. The continuous representation of the system is specified bv F and G from MATLAB) with . First.... The figure shows that very little change in root locations occur by this emulation method.1. due to Van Loan LQR SteadyState Optimal Control 381 (1978).~'4. In fact Ihe change in root locations is about I % when Figure 9. 9. Use of the Iqrd. however. with modifications to account for the cross terms in the weighting matrices.3 A method for computing the equivalent gains in Eq. (9.rn function computes the discrete controller that minimizes the same continuous cost.' n [ Q21 Q22  (9.i2. in Eq.7 as shown by the line in Fig.~i = q.m in the Digital Control Toolbox).49) can be computed from discrete samples of the state and control by transforming the continUOU5 weighting matrices.54) desired specifications are met. (9.02.6 Degradations of splane root location for the optimal emulation method. Contmuous deslgn Emulation deSIgn _ 2• • ..55)..5 . ~] • Example 9.6 3 I 2 I ~ 00 0 . The equivalent 'plane roots of these digital controllers are also plotted in Fig. results in splane roots exactly at i.011 Routines to calculate the discrete equivalent of a continuous cost are available in some of the CAD control design packages (see jdequiv.  It will tum out that q.05. (9. Solution. This same approach can be applied when using optimal design methods [see Parsons (1982)]. thus arriving at an emulation of the continuous design. 0.
(8. we take the derivative with respect to the unknown.4 Optimal Estimation Optimal estimation methods are attractive because they handle multioutput sy. Furthermore. As discussed in Chapter 7.58) and. Usually. This is both sensible and very convenient analytically. Eqs. the fit error. We want to determine the best estimate of x given the measurements y. Following the same route that we did for the optimal control solution. however. Given that reality.56) where irk + 1) = $i(k) + rUCk): however. due to the pressure of schedules. now L will be based on minimizing estimation errors rather than picking dynanuc characteristics of the estimator error equation.60) 11 where xdesignates the "best estimate" of x. We will first develop !he least squares estimation solution for the . the most expedient path is to perform the design directly in the discrete domain and obtain the best possible with that constraint. then performing discrete designs. and H is the matrix relating the measurements to the unknowns.34). too. and finally show the correspondence between the Kalman filter and the timevarying optimal control solution. We acknowledge that the scenario just presented is not the reality of the typical digital design process. But we maintain that the most desirable design scenario is to gain knowledge of the effects of sampling by first performing the design in the continuous domain.3: its calculations for a similar example showed that w.2 and Chapter 6. A good way to find the best estimate of x is to minimize the sum of the squares ofv. Note that the matrix to be inverted is x II and that p must be ::: 11 for it to be full rank and the inverse to exist. • we will extend that to the timevarying optimal estimation solution (commonly known as the "Kalman filter"). In the end. 9. + L(y(k)  v(k»). which are irk) = i{k) emulation advantages In general. and "')"'" = 6 resultcd in a 6091. and it is satisfying to be able to answer how good the control system can be in terms of disturbance rejection.for w)w" = 3. x. the system is overdetermined. The accuracy of the zeropole mapping emulation method was e\aluated in Example 7. which results in HX)T(H) =0 (9.33) and (8. Proceeding.1 LeastSquares Estimation Suppose we have a linear static process given by y=Hx+\·. the computer and sample rate are specified long before the controls engineers have a firm grasp on the controller algorithm. the designer is better equipped to select a sample rate with full knowledge of hoI\' that selection will affect performance. emulation design is attractive because it allows for the design process to be carried out before specifying !he sample rate. In this case. the most expedient path is to work directly in the discrete domain. L. If there . that is. steadystate errors. the emulation method described here is a useful tool to obtain quickly a controller to be implemented digitally or to use as a basis for further refinement in the discrete domain. A requirement to use the method.59) 9. we will then develop the optImal estImatIOn solution with a steadystate Lmatrix.change in root location. Often. the sum of squares can be written as :r = _v V = (y . then least squares estimate so that (9.tatic case as it is !he basis for optimal estimation. (957) where y is a p x 1 measurement vector. x is an 11 x 1 unknown vector. and so on.4. that is a:r ax = (\. In these cases.reduction in <Iamping. v is a p x 1 measurement error vector.Hx) I T 1 2 2 (9.4 Optimal EstImation 383 sampling at six times the closedloop natural frequency (w)ev" = 6) and increases to about 1091. use of the optimal emulation method will result in a digital controller whose performance will match the continuous design much closer than any of the emulation design methods discussed in Section 7.382 Chapter 9 Multivanable and Optimal Control 9. many design exercises are relatively minor modifications to previous designs. is that the original continuous design be done using optimal methods so that the continuous weighting matrices Qd and Q'2 are available for the conversion because they are the parameters that define the design. before !he sampling degradation is introduced. .tems easily and allow a designer quickly to determine many good candidate designs of the estimator gain matrix. this amounts to another method of computing the Lmatrix in the equations for the current estimator. there are more measurements in }' than the unknown vector./w" = 30 resulted in a 1091. This is called the least squares solution. Once the characteristics of a reasonable continuous design are known.HX)T (y . in order to minimize !his expression. (9. Sampling degrades the performance of any system to varying degrees.
.0 1.63) x=UJ Evaluation ofEq. Furthennore. v.01.x = [HTHr'HTv.7 LeastSquares flt 10 <F.7 14 12 • Example 9. Solution. assuming that the rms accuracy of the data is $700. (9. The difference between the estimate and the actual value of x is so that.. ' Figure 9.x)(i .0943 0. Also state what the predicted accuracy of the parabolic coefficienh are. are uncorrelated with one another. In this case. 9. where H contains the parabolic function to be fit. (9. ix. The solution is obtained using Eq. after that the parabola is an extrapolatlon.60) produces an estimate ofx where a is the rms value of each element in v.384 Chapter 9 Multivariable and Optlmal Control 94 Optimal Estimation 385 are fewer measurements than unknowns (p < n).5 1. § .1 L3 I.1 1.7. Each month's sales obeys .0239~. The data used to determme the parabola only occurred during the first 12 months. . which is used to plot the '"besl fit" parabola along with the raw data in Fig. 4 o 7 £ i~ called the expectation and effectively means the average of the quantity in { ).61) shows that. (9.09431 + 0.22. and (9. The square root of the diagonal elements of P represent the nns val!1es of the errors in each element in x.xl} = E{(HTHrIHT". sometimes referred to as an unbiased estimate.62) can be written as .2224. are given by yT . = [0. there are too few measurements to detennine a unique value of x.60). the error in the estimate. estimate accuracy (9. ." '" ~.. in vector form ix = IHTHIIH T(Hx + v) .f = [ 0..l 1. will also be zero mean.20.7 Leastsquares fit of parabola to data in Example 9.61 ) and we see that Equation (9.TH(HTH)I} = (HTH)l H T E(yyT}H(HTH)'. is defined to be P = E{(i . 10 I 15 (X1onlhs) 20 25 . The monthly sales (in thousands S) for the lirst year of Ihe Mewisham Co. E{vvTr is a diagonal matrix. which we shall call R.0. if all the elements of v have the same uncertainty. Eq..7432 0. ' = 07432 6 . ~ Find Ihe leastsquares fit parabola to this data and use that to predict what the monthly sales will be during the second year. (9.64) and is a measure of how well we can estimate the unknown x.. P. then all the diagonal elements of R are identical.62) and If the elements in the noise vector. if v has zero mean.2 1.0239 J (9. The covariance of the estimate error.
old and new. = '.7).77) .73) where "" is the best estimate given only the old data .0192. . estImate of x gi ven ate d " . Eq. we know a priori that some measurements arc more accurate than others so that all the diagonal elements in R are /lot the same. e x" " " " ..58) needs to be modified to .~H+HTRIHIDx=HTRIl' A T I which can be solved for the desired r~sult (9.. e ~ dB' arne. IS adjusted for the newly acquired data. 0.651 where W is a diagonal weighting matrix whose elements are in some wa) inversely related to the uncertainty of the corresponding element of v. so that the overall The problem is stated as A ".~ ~~e .0048 . at IS. ) pe ormmg the calculatIOn m small time steps Th 1 eas are preCIsely the s th' . .681 (9. (9. Performing the same algebra as for the un weighted case above.5234 0. recurSl\e formulatIOn solves both these difficulties b ' r f ' ·d.. shows that P= 0.67) reduces to Optimal Estimation 387 Equation (9./0.0655 0. (9.661 becomes (9691 (9.:J = :2VTWV. est u " ~ewM~ (9..' This choice of weighting matrix is proven in Section 12. With this choice.386 Chapter 9 Multi\'ariable and Optimal Control 9. A b~tch d ~~u~n ::~~:ation pr~blem that runs for a long time.0004 = 0. thus weighting the square of the measurement errors exactly in proportion to the inverse of their a priori mean square error. Ii h ata . . Let's define xas The covariance ofthis estimate also directly follows the development ofEq. for which we already an new data. (9. (9. e "ery arge.2559 = . in that all th/data is obtained a. . (9. .4 and Eq.74) yields x = x" + DX. DX.72) and using Eqs. a welghted least squares calculation is being f.b e .1670 0.. with H as above and rr' = 0.70) which means that the nns accuracy of the coefficients are Recursive Least Squares a il" rr ".ollows dIrectly from Eq (969) and . as .71) .7235 =.1670 [ om 11 0. t~~em~:s~~:~:~tU~~~~~.R.49 (rr was given to be 0. _.5234 = 0. it makes sense to weight the measurement errors higher for those measurements known to be more accurate because that will cause those measurements to have a bigger influence on the cost minimization.0004 (9. it satisfies . ..w.dthe'n dr~~~ (9 6?).H" R" Y".73) and (9...621 and results in (9.0048 0. In other words. d ut now we break the problem into old data. e~presslOn for the correction to this estimate. 1 where the subscript 0 re presents.75) n n" n ". for WhICh we want a correction to n new".0111 ] 0. and one would have to wait until the problem w complete In order to calculate the estimate The . The two leastsquares alcrorithms above E s (960 algorithms.~~~:atoS~n~d an v. 0 ld d ata and II represents new data Th b .as the best estimate given the old data. that is.661 [:~ [~I R~I] [ ::J x r = [ ::: r[~' R~J][~: l I (9.72) where x is the best estimate of" givcn all the data.64). let (9.74) Expanding our the terms in Eq.0:0655 = 0. the cost function in Eg.+ Weighted Least Squares In many cases.7 to minimize the trace ofP and is called the best linear unbiased estimate. ".I H]x _ T HTR'H n n n""+[H. (9. . [H 7 R. give~·the n:v.671 A logical choice for W is to let it be inversely proportional to R. we find that the best weighted least squares solution is given by (9. (9. In this case.0. (9. rr". are ~oth [~:: J= [::: J"+ [~: J.
Note that the correction to x is proportional to the difference between the new data y" and the estimate of the new data H i based on the old x. we start by assuming that Xo and P" are ayailable from previous calculations. and R n = R.R'. The solutIOn equauons are x(k) = irk) This algorithm assigns relative weighting to the old i vs.86) .process noise w(k) and measurement noise v(k) are random sequences WIth zero mean.6) in Appendix C) to convert Eq. (9.IH"rIH~R. By anai'ogy with the weighted least squares.80) shows that the new estimate will essentially ignore the new data. glv~n all the ?ata up to and including time k.2 The Kalman Filter (9. (9.76) reduces to 9. • Compute the new value ofX using Eqs. (9. (9. (9. H" = H. that is. hence the optimal state estimation solution IS gIven by Eg.801 We allow L in Eq. Comparing this problem to the recursive least squares. Let us pretend tempor~ly that WIthout using the current measurement y(k).82) where the . o • Take new data and repeat the process. which could be satisfied by virtue of Po being full rank. and (9. and Eq.78) ox = [p. .~1 + H~R.~ly". Now consider a discrete dynamic plant x(k with measurements y(k) = Hx(k) and we see that the correction to the old estimate can be determined if we simply know the old estimate and its covariance. The problem at this point is to update this old estimate based on the current new measurement. if the old data produced an extremely accurate estimate so that Po was almost zero. Po = P(k).. is optimal. in Example 9..O: [H~R'.0). • Compute the new covariance from Eg.81) + v(k).x(k) + fU(k) + f l w(k) (9.79) shows that P" is . which we WIll call x(k).79) is used to find P(k). (9.).4 Optimal Estimation 389 so that Eq.. (9. if the old estimates arc very poor.82) relates the new measurements to xjust as ~e lower row In Eq.. In other words. which ignores the old data. that is T E{w(i)w (j)} = E {vU)v T(j)} = ° if i ~ j. (9. (9. The size of the matrix to be inverted in Eq.56) to vary with the time step. (9. we see that the estimatIOn measure~ent equation Eq.. (9. (9. For the Kalman filter.84) ~uation (9.7 it would have been possible to start the process with the first three months of sales. y usually has fewer elements than x . (9.388 Chapter 9 Multiyariable and Optimal Control 9. In fact.85) is n x n.80) shows that + HTR. we already h~ve a pnor estimate of the state at the time of a measurement. then recursively update the parabolic coefficients using one month's additional sales at a time. recursive leastsquare procedure P" = [p~1 +H~R. L(k) = P(k)HTR. Eg. For example. and illS more effiCient to use the matrix inversion lemma (See Eg.79) shows that + L(k)(y(k)  Hi(k)).79) + I) = q. similarly to the weighted least squares.' (Y. (9.0: 0 and Eq. and have covariances or mean square "noise levels" defined by E{w(k)wT(k)} = Rfi' E{v(k)vT(k)} = R. that is £(w(k)} = E{v(k)} = O. new data based on their relative accuracies. where we now call the old covariance M(k) Instead of Po' thus P(k) = [M' P. we will see in the Kalman filter that it is typical for the new y to have fewer elements than x.8.4.85) i. then Eq. (9.79) Note here that it is no longer necessary for there to be more new measurements than the elements in x . (9. (9. The only requirement is that P" be full rank. where n is the ~lmenslOn of x .IHr l . To summarize the procedure. have no time correlation or are "white" noise.'H"r'.. the covariance of the new estimate is (9.71) does. (9.H"i).73). wher~ Xo takes the role of irk). and we wish to pick L(k) so that the estimate ofx(k).79) i = X + P"H~R'.'. Most cases are somewhere between these two extremes. (9. but the fact remains that this recursiveweightedIeastsquares algorithm weights the old and new data according to the associated covariance.H"i.83) where. (C. On the other hand.78). Po is very large.~IH"r'.85) to (9.'H"rIH~R..l(y" .O: [H.
The state estimate after the measurement.90) The idea of combining the previous estimate with the current measurement based on the relative accuracy of the two quantitiesthe recursive leastsquares conceptwas the genesis for the relationships in Eq. so will be the estimator gain. The state estimate at k . I. Use of dynamics in the propagation of the estimate of x between k . Thus ilk) = <l>x(k .. (9. R" =0.0.83) and Eq. given a priori kno\\']edge of the process noise maonitude R.x(k))(x(k) . .94) .x(k»(x(k) . E{w(k . commonly referred to as the Kalman filter.'M(O).1 deg=.x(k)) + r. has an error covariance P(k). th e d·III erence h L " .L is called x(k .1 (deg'/sec"!.87. (9. (9. the measurement noise magnitude.X(k))T} n.+ Opumal Estimation 391 M(k) is the covariance (or expected mean square error) of the state estimate. and assume several values for the mean square magnitude of this disturhance: and R.85) and is one of the basic ideas of the Kalman filter.001. P and M: P represents the estimate accuracy immediately after a measurement.3 assumina the I A sensed \\'tth a measurement noise co\'anance e ang e. = £{w(k)wT(k»). given data up through k . (9.89) reduces to ~I(k + I) = lflP(k)<I>1 + r.I. the change in the estimate from x(k) to x(k) as given by Eq.dition.x(k» '<1>1 + r. In the static least squares. . Eq. elllg t at IS tIme Yarylllg and determined so as to provide the minimum estimatIon errors. + I)  i(k + 1) = <I>(x(k) . L. we see that x(k where the initial conditions for x(O) and M(O) = E{x(O)x'(O)] must be assumed to he some value for initialization. (9.I and k did not come up in the static leastsquares estimation. given by Eq.871 The change in estimate from x(k . before the measurement.8 Time. whereas M is the propagated value of P and is valid just before measurements. (9.I)) is zero.. = 0. we see that the structure of the estimation process IS oiven by . (9.I) relatIons eSltmatlO~. Eq .1).93) and M(k + ruCk + I) = <l>P(k)<I>T (9.ying Kalman Filler Cams IS + I) = £[(x(k + 1) .84).11 to x(k) is called a "time update. b'exactly the 'same as the current estimator ~ . The other key idea has to do with using the known dynamics of x to predict its behavior between samples. an idea that was discussed in the development of the estimator in Chapter 8. (9. and the process noise." wherea. w.I).x(k + I))(x(k +]) ilk + Solve for L(k) for the salellite attitude control problem in Example 9. (9. A summary of the required IS: . (9. Furthermore. .'(y(k) . =[ But because P(k) = £{(x(k) . no·' IS d ue to d'Isturbance torques actmg on the spacecraft with the process .83) is a "measurement update.V". x(k). v.. because we know that this is the expected value of x(k) since the expected value of the plant noise. The same kind of time and measurement updates apply to the estimate covariances.I) = 0. R" and the covariance initial co.r.81) with w(k . . the estimatc ilk) is found from x(k .89' G.I. but here this issue needs In be addressed. (9. (9. If the measurement noise.390 Chapter 9 Muluvariable and Optlmal Control 9. these two quantities were identical and both called x because it was presumed to be a constant: but here the estimates differ due to ~he fact that the state will change according to the system dynamics as lime passes.I) by using Eq. Assume the .91 ) where P(k) = M(k) ." which occurs at the fixed time k but expresses the improvement in the estimate due to the measurement )·(k)..92) • Between measurements (time update) x(k + I) = <l>x(k) + rUCk) + rjR. the cross product terms vanish and we find that R. ilk).881 which we will use to find the covariance of the state at time k y(k + I) into account !\I(k + I before taking Il}T].01. Th~s completes the required relations for the optimal.81) and Eq. w(k}. (9. ~ . Ise .Hi(k). w(k)w T (k)r. whereas we defined ilk) to be the estimate at k given the same data up through k . (9. (956) . state • At the measuremem rime (measurement update) Kalman filter equations x(k) = x(k) + P(k)H'R.M(k)HT(HM(k)H T + RyIHM(k). From Eq.Rwr:. timevarying gain. Specifically. Because ~l is timevarying. (9. 0. dlsturbancemput dlstnbutlon matrix ~1(k + 1) = £[<I>(x(k) . • Example 9. . are uncorre]ated so that x(k) and w(k) are also uncorrelated.
. L( 'J. and the remaining components are equal to zero.l)me\\'h~lt analogou. one could logically assume that the components ofx(O) contained in yare equal to the first measurement. The disturbance noise model should be selected to approximate that of the actual known disturbances when practical. " I s uncertaintv in fI wa:i I and wa~ I . . In some cases. '.. In practice.isec.. R.392 Chapter 9 :vlultl\'ariable and Opllmal Control 9"1 Optlm. arbitrary.. colored noiseit can be accurately modeled by augmenting $ with a coloring filter that comens a whitenoise input into timecorrelated noise.84).order to tndleate [hatlhhe tnJ!la ~TL d'tion esti'mate during the initial transient.' h'· .. .e mimI j" made up and nol interc~teti in facts. . which is based on th~ sensor accuracy. I' the L's for the values gIVen a me.. the e\t." f MIa. tees 1m.:J h' • divergent filters Giyen an actual design problem. however. h a 'tead)' state.ed on the quality of the estimation that results in subsequent simulations including all known disturbances..92). u For an implementation of a timevarying filter.ystem. was selected in . the estimator gain would el'entually go to zero. this will not work because there are always some disturbances and the plant model is neYer perfect: thus. the time Istory II .' If an estimator mode with zero gain was also naturally unstable. k" found by eyaluatin o Eqs. ~ d". a value of . initial conditions for :\1 and x are also required. .. one can often assign a ~eani~g:uI ~'lIU~~~ R. Physically..~. Because only H is directly sensed.. is conrmllahle and all diagonal elements of R are nonzero.. 19. . r I l. dumb.: ) 994) the rather lengthy recursiw computation ot Eq.. whether they be steps. were t e ee ac f~ It I' ons. that is not typical.. I earl..ta~t coefficient svstems.uremem" It i" '.OA  l\ I\ \"''=::::::~~R"'::~O. ..94). In lieu of any better information. This is so because the optimal thing to do in the idealistic situation of 110 disturbances and ape/fect plant model is to estimate open loop after the initial condition errors haye cOlI/pletelY died out: after aiL the very best filler for the noisy measurements is to tOlalIy ignore them.' in the problem h h I' db"k gam reache a stea v' a ue .' . they represent the" priori estimate of the accuracy ofx(O). the estimator error would diverge from reality very quickly and likely result in saturation of the computer. . h t' alor 2ams essentla v real: figure that after an initial settlmg time.( . thi~ is often not done due to the complexity...l.1 and Eq. or somewhere in between. which in turn represents the a priori estimate of the state. ° . the disturbances are assumed white.10 = 10 13 ~o ~5 35 40 k assumption of white process noise is often a mathematical artifice that is used because of the ease of solving the resulting optimization problem. is crudely accounting for unknown di~turbances. FIgure 9. 19. Bryson showed that the filter will not be divergcnt if you select r so that l the . We therefore are often forced to pick values of R u and sometimes r "out of a hat" in the 1 design process in order to as. some \ a ue or.l1 . O.. This can arise when the process noise is modeled so that it does not affect some of the modes of the system. thus e!nmnatlng t e ne ~ " (h at It can e use " . In practice.::: .. we have from Eq. .e~? t IS mH1a con I e but the steady tinal values are not aHeeled.ith on~ ur rntlre modc_~ that i~ running open loop is somelime.I71 H =ll 0].R _. thus Eg.. Instead.ntua stea )" h '1 e of this stead".8 Example of estim~lor gains versus time O. In The time varying estimatorgatn. Physically.8 show. . and (9..~UI .ure that no modes of the estimator are without feedback and that the estimator will track all modes of the actual . the components in :\'1 that A tilter v.' as for the control problem.. The same cannot e sat or u' C Figure 9. Jno happy" bt"cau"'e it ign()rt'~ Ih~ me. is required. (.ll EstJn1aliC1n 393 Solution." to the ~r'()n v.9_. Ju.=!~. whether timecorrelated or not. and for imperfections in the plant model."ne. Although somew hat order to start these reCUr~l\e equutlons. If Ru was chosen to be zero due to a lack of knowledge of a precise noise model. white noise.~tat~ cram mainx "O subject of the next section is a method to compute t e' au. there might he test data of some kind to support their intelligent choice: however. 'b ' Vv" see from the ' .~ : . ho. It is possible to include a nonzero process noise input in the plant model and yet still end up with a divergent filter [Bryson (1978)).. ($. . e.... H. (9. but the designer often settles on acceptable values ba. d".~'stem. Similarly. If there is a random disturbance that i~ time correlatedthat is. the filter with zero gain will drift away from reality and is referred to as a divergent filter..i \[(0) = [ 10] 0 1 .6 .O. ed ~o ao throueh · b ' d j'n pla"e of the timevantng .. duhbed "Clbli\i(lu~" Or "fat. and the noise inten~ity is adjusted to giye acceptable results in the presence of expected disturbances.<. white and otherwise. The gain time hhtones are sen~ltl\. The ' '" I' 'd' value for L occurs or a mear c " tune..~ R. (9Jn) can also be made to describe nonwhite disturbances.
' must ave coupe equatIOns wIth the same form asEq (933) t ' .84) after some mampulatlOn we find the stead\' state Kalman fil ter gam to be 9 . (9. . it is often desirable to determine the constant gain during the design process and to implement that constant value in the controller. a constantgain Kalman filter j. its stable eigenvalues. (9. um~d modeI. Because P is the covariance of the estimation errors. ~re t~~ ~~genvectors of H. ' h corres d .~r~~:ro~!em as th~ desired steadystate solution to the estimation problem. (l)2'\ I 1l).92) and Eq.1 hsts the correspondences that result by direct comparison of the control and esttmatton recursIOn relations: Eq. the .. (9.3 SteadyState Optimal Estimation As shown by Example 9. (9. and R~ are based on some knowledge of the actual noise characteristic. 9. The equations to be solved that determine M and Pare Eq. (9. and Stengel (1986). . . \\e can simply change variables and directly use the steadystate solution of the I) ~~~'i~~:. (9. the steadystate yalue of 1\1 is deduced bv Eq.1 Control + I) = <fIp(k)<fIT + r.. r 0.92) and (9 94) h' ansen from two I d . . it was necessary to solve for the time history of P. the one that mmlmlzes onlv . However. .25) with Eq (99") dE (9?4 WIth Eq. and the remaining components set to a high value.. and that wand v are approximately white. T b ..'H<fI'r.24) does. . h' " ~ d h' ' . This approach replaces the poleplacement method of finding the estimator gain and has the highly desirable feature that it can be applied to MIMO systems. As discussed in Section 9. (he filter has c~n~tanr cocfth:ien(~ and. (9. The intent of this section and example is to give some insight into the nature of the solution so as to motivate and provide a basis for the following section.95) Therefore. ometlmes t IS solution IS to ::s:: d a~t ~ Im~a~ quadratic Gaussian (LQG) problem because it is ofte~ .R. for the a.92. Est. they are P(k) = M(k) . = ' [<fiT +HTR.fe m e ematron that the nOIse has a Gaussian distribution As can be seen " .1.4 OpLImal EstImation 395 represent a measured component could be logically set to R.94) goes forward instead of backward as Eq.941 Table 9.f..~~~~. (9. the estimator gains will eventually reach a steadystate value if enough time passes. assumptron.25) M(k) = Slkl .8. Hence. This is so because the values of :'\1 and P reach a steady value. . 19. (9. Eqs. the control Hamiltonian in Eq (9 ~4 l b ' . 'H<fI' <fI" J 19.394 Chapter 9 \lu]tiv'ariilhle and Opumal C.i\1(k)H T(H:'\lrk)H} I\I(k (9. ) and (9.96) where qs . 0.24) + 1)<fI + Q.8. v slOg t e .92) and (9. Whatever the motivation. r1R.. pon ences m a Ie 9.24) and Eq. provided that the value. is determined so that the estimate errors are minimized [tl!" the assumed lev'el of process and measurement noise. this rom th e developme n t h ere. the only difference being that the gain. we can sometimes use P as an indicator of estimation accuracy.94).. (9. no significant effect. J L". L. SLare.R. Readers interested in the application of Kalman filters are encouraged to reyievv' works devoted to that subject. Table 9.4. Repeated. . ri HT Rv we see that they are precisely of the same fonn! The only exception is that Eq. one can show that the esttmate is not.an q. . = 1\1". of R.97) This is a standard calculation in MATLAS's kalman m S ... . is (he _"arne as. associated with. 8 T (H:\f x 8 LQG T + R)l. identical in structure to the estimator discussed in Chapter 8._) . <fI'f. ' + R)'Hl\I(kl. (9. ug the equatIOns are solved 10 opposite directions in time. .R. Anderson and Moore (1979).46) and is ) comparison with 9. In obtaining the values of L in Fig. with .Ti HTR. .mation <l>T Comparing Eqs. from ["~. . h estlmatlon Hamiltonian .S(k)I'[Q~ S(k) = <fITM(k duality <I> M S P M + rTS(k)n·1r1S(k).94).2. Therefore. many control systems run for very long times and can be treated mathematically as if they run for an infinite time In this case the constant gain is the optimal because the early transient period ha.e"omes t e H.. Because of the substantial simplification in the controller afforded by a constant estimator gain matrix.mtml 9. ~~..94) to the optimal cuntrol recursion relationshI1"· Eq. (9. By analogy with the control problem. such as Bryson and Ho (1975). (9. t h'IS assumptIOn IS not necessary..r.
assuming that it is a white continuous process.the control and estimation optimal root loci are identical. c. derivation.56). one can apply the discrete covariance update Eq (994) to th ' where W IS cont"muous nOIsebUSing the approximation that " ' Y ' e case R. we find that Eq.approximatlOn thae 1"0110\\'''' for C. the. there IS no such thmg as white continuous no' A whlten d' b ~ . (44. r = r . .lI>'(T)dT. which can also be written!! R 'T Typically.:uraIet an theapproxlffialionu"ingG . f II R. Translated. (4. .4. or meansquare spectral density o t e contInUDUS white nOIse. for systems with a single output and a single process noise input. . . were defined in Section 9.2 as and r.·d ' .R ' the denvatlOnl<i of Eq.40) and the use of Table 9. It TIs very short.. (9. the result is referred to as the maximum likelihood estimate..99) "'t~e R'rJ is called the power spectral density. Calculation of this integral (see disrwm in the Digital Control Toolbo) .981 where q = R"J R. From Eqs. (9. for systems where the process noise is additive with the control inpUlthat is. I+. ~ R ~". Furthermore. the characteristic equation becomes (9.t revert to the integral in Eq.R"p'JG. Its effect over the sample period. The magnitudes of the diagonal elements are the yariances of the noise components. is ~ub . the eigenvalues have the same reciprocal properties in both cases. p.4 and 9.101) Process Noise. The on 1y reqUIrement for our use of the whitenoise ' e ran om . . pure f OOlse Istur ance would have equal magnitude content at ail frequencies rom . . "1 be camed out us'Ing a Simi ar exponential form due~ to Van Loan (1978)x can _.. cannot be determined as it was for Eq.88). j . .55) and (4. the symmetric root locus follows by analogy with Eq. onc has no information on the crosscolTelation of the noise elements and thereforc R. . it needs to be integrated. we 'ec that the effect of continuous noise input over one sample period is x(k as long as T is much shorter than the svstem time constants If th' .G{. Specifically. . ho\\ever.99) reduces to !'1(k .. (9. the loci in Figs. 10 Sec' Stengel 119861.i = l' 4> <Il(T)G. is not val..100) where Therefore.4. compulin'i! rh! l~xm:[I\' J c'Cor d·IIlg to Eq. The process noise acts on the continuous portion of the system and. that is as In e sy ~ I 9.Efw (I))W T (T)lG{<Il'(T)dTdl).. (9. But the white noise model for w means that Erw(I))WT(T)] = R..1. and R.4 Noise Matrices and Discrete Equivalents The quantities defining the noise magnitude. are selected as diagonal matrices.r). + I) = <l>x(k) + I' (l e ""G 1w(7))d7).. then the integral is approximately Cd ~ TG1R. if there is more than one process or measurement noise component. (9.. . In r . R. r (9. . ne m.34) and Eq. " Eq. ' . Therefore.p. )). IS assumption . Because Eq. (9. and R. For example.. the covariance matrices R.u.90): instead.' T <I>(7))G. varies widely throughout one sample period. Eq. (9. tantialh . to x. Ise.58 ). eahty.100). \9. SIgnal IS precise! y' zero.95) are the same form.' a.us.396 Chapter 9 t\lultiyariable and Optimal Control 91 Optimal Estimation 397 the error squared. therefore. and the control and estimation roots could be selected from the same loci. (9. w(k) in Eq..~r ~rl " .. Therefore. that means that the correlation time of th ' d .)4). ~ G. . 9. (9. epeatmg the Integral above replaCIng f.90) with .' + 1) = <IlP(k )<1>' + Ca' (9. . compare d to th " stem time constants. and where G Iis defined by' Eq..5 could be used to select estimator roots as well as the control roots.90) becomes M(k+ 1) =41Pik)<Il + f 11.. (9. . C. but also the one that is the statistically "most likely·' In thi. . ~" ~ • moreau. 8(1/. 327. T.
the desired result for our purposes is the discrete equivalent noise.5. L' One could also ignore this complication and proceed as if the noise were white. However. if the correlation time is extremely long.2.5. the same situation that was 12 Bry. The value of analyzing the continuou. Under these conditions the discrete equivalent mean square value is less than the continuous signal mean square because the continuous random signal acting on the continuous system is averaged over the sample period. augmented to the state. If T. that represents a physical process is aided by the realization that pure white noise does not exist in natur~. one can measure the mean square value. with the appropriate value of R.lote from Eq.100) is not valid: thus calculation of R" is not relevant. which can usually be interpreted as the random component and a~~umed to be white. In some cases. Furthermore. Disturbances all have a nonzero correlation time. that produces a response from the discrete model given by Eq. r". and the estimator accuracy will improve with sample rate. the diagonal elements of R w are the mean square values of the discrete noise. then the noise is not white and Eq. In practice.1031 :. the disturbance acts much like a bias.103) that R" and £( lC'(t)} are not the same quantities. with the knowledge that the ~ffect of the measurement noise is in error and that skepticism is required in the interpretation of estimate error predictions based on P. The assumption of no time correlation is consistent with the development of the optimal estimator that was discussed in Section 9. the continuous filter can be evaluated digitally.:ngd 119~61 or Bry~on and Ho ( 197:'.2. 1. and if the effect is not negligible. Furthennore. the designer wishes to know how the . r. . because the improved accuracy possible by modeling a random disturbance with a time constant on the same order as the sample period is not deemed worth the extra complexity. and estimated using the ideas of Section X. T r l (9. and can eithcr measure or estimate its correlation time. and finding the discrete equivalent noi~e is a method to approximate that design goal.2. The rms value is simply squared to arrive at the diagonal elements of E{I"U)}.on and flo 11975L p. Note that neither the sample period nor the correlation time of the sensor error has an impact on R.398 Chapter 9 Multilariable and Optimal Control 94 Optimal Estimation 399 model in discrete systems is that the disturbance have a correlation time that i.".' and that r. (9. thus allowing the computation of each diagonal element of R. R w ' It can be computed from Eq. ~. the relation between the power spectral density and the mean square of the signal is" (9.:11. If the correlation time of a sensor is longer than the sample period.1OJ) and Eq. The pertinent infonnation given by the manufacturcr of a sensor product would be the rms '"jitter" error level (or some other similar name). that is (9.4. Although this can be done in principle. disturbances are often assumed to be either white or a bias. that is. case is that the knowledge can be useful in selecting a sample rate. This component should at least be eYaluated to determine the scnsitivity of the system to the bias. [R J • is related to the mean squar~ and correlation time of the ith disturbance acc~rding to [R I "I . In fact. I. « T and that T « any system time constants. uncorrelated from one ~amplc to the next. «system time constants.90) that matches the response of the continuous system acted on by a w(t) with £{w'(t) I and T" Note also that it has been assumed that the noise is white compared to the sample period. and an accurate treatment of the noise requires that it'. where each diagonal element. short compared to the sample period.1021 Sensor Noise.. Sensor manufacturers typically list bias errors also. If the correlation time is on the same ordcr or longer than the sample period. in practice it is rarely done because of the low cost of digital implementations. one could no longer claim that the filter was optimal. Although the rms value of v is not affected by the sampling. the correct methodology entails adding the colorednoise model to the plant model and estimating the random disturbance along with the original state. is not « T. (9. The detennination of the appropriate \'alue ofR. Specifically. (9.ensor noi. the only question being: Hcm short'l Assuming that the time correlation is exponential with a correlation time r.102). that is. and we have already discussed its estimation 111 Section 8. (9. "coloring" model be included \vith the plant model and the measurement noise error estimated alon~ with the rest of the state. being the one that provides the discrete equivalent to thc continuous process. w(k I. jf v is white. (9. £{w'(r)}. sampling at a higher rate will cause more measurements to be averaged in arriving at the state estimate.104) Typically. = '::'[r £(11"(t)}] .e will affect an estimator that is implemented with analog electronics. . the bias should be modeled. Whatevcr the reason. Unlike the process noise case these values are used directly. 1~ S~e Stt. the assumption is not correct.. T. the designer is sometimes interested in creating a digital implementation whose roots match that of a continuous design.
1'1 = alii I' Y.Hx+u'Qc u. = am. (9.. T or lR).. (9. wher~ 0'.designer can introduce another degree of freedom into this problem bv re. suppose we have three outputs with maximum deviation. = ~lr. 15 KwCtkernaak and Sh':. [uk"". For example. .5. . QI. (9.E{.".5..."".3. (=(1 19. and Y.:'. There are. w~ I c :1. noise. which we 'Will call p..(a'uJ/ 19.11".. the proper relation in this special case is from Eq. we select a matrix with diagonal elements 'W hc:re EI'" (t)} is the mean square value of the .105) Similarly.2 and 9.5 Multivariable Control Design The elements of the dc:sign process of a MIMO system have been discussed in the preceding sections. is its correlation time. ol1·. then the magmtude of every transient in the closed loop wIll decay at least as fast as I /a'.101) or (9.. Altc:rnatively...1 Selection of Weighting Matrices Q 1 and Q 2 As can be . QllYi = q'2Y~ = q...e do thIS. J. however. is then II. Q. ... is only weakly connected to the performance specifications. i/I1~".ection discusses some of the issues in design and provides two examples of the process..107).107) There remains a scalar ratio between the state and the control terms. ~n(agt. z L k=fI yl Q. 11I. and all. = Llz'Q.. .108) 9. (9.umng that all the closedloop poles be inside a circle of radius I/O'. and Eg. l < For example. a few guidelines that can be employed. l'(k) = a"ulk). are given by Eg.. ala' and write it as lf ll r . Thus the total cost is J=px'HTQ.111) The equations in z and Yare readily found. (9.103) R R =~ ') A satisfactory solution for elements of Q. A computerinteractiye procedure that allows c:xamination of root locatIOns and transIent response for selected values of 12 and Q..m (1972) ~ugg:r:"t u~ing a pt. This is to take Q1 = HI Q I H so that the states enter the cost via the important outputs (which may lead to H = I if all states are to be kept under close regulation) and to select Q I and Q.ula".ows a deg:ee of direct control O\'er the settling time. then where . (9..106) . to be diagonal with entries so selected that a fixed percentage change of each variable makes an equal contribution to the cost.ensor noise and T.:entagc \:hange from nominal \alue~: Br~'._ I. wher.\'~: thus ztk) = a'x(k).110) The rule is that if .. one can use a pure continuous analysis of the tilter.106). \'1.een from the discussion in Sections 9. the selection of Q1 ami Q.+ Sec Bryson und Ho ~ 197. expedites 1 thIS process conSIderably. and p is to be selected by tnal and error.."n. (9.e Q1 and Q. QI" = I/m. if one desires only the continuous tilter performance for a l baseline. Bryson and Ho ( 19751 and Kwakernaak ani Sivan (1972) suggest essentially the same approach. + I) = (:l"+'x(k + I). 11I 1 .. Thi. = LlxTQ. which forms pincers around the transient.on and Ho l1~e rcn.2 Pincer Procedure The . = (9.. Consider 1. (9.x+uTQ.. It "". for Q.109) We can distribute the scaIJr teml a" in Eg.. We can introduce this effect III the following way.400 Chapler c) \lullivarL1hk and Oplimal Cl'ntml c:xamined for the proces. Q'II = 1//11. = am.  9. + Ij"r~ + q3'Y~' Bryson's rules = L[(a'x)'Qlfaix) ~'=r'1 + ia'u)TQ. and mi' The cost for diagonal Q 1 is to the pert'ormance criterion of E q. ) z(k 16 S()rn~timc~ called Br~ . = lim.'(I)Jl.. • which requires only R'lhJ' Q~II = 1/11. and a certain amount of trial and error is usually required with an interactive computer program before a satisfactory design results. ' Suppose that as a modification consider ' 9." changt' from the maximum \'ulucs. (9109) a. Therefore..
within which all states should settle to less tha.k~Iterm. x= [ 0.c. .108) is H=[Ia 0 [) OJ I .1131 2. x. or else zlk I could not be guaranteed to be stable. (~.1111 Q] = [0.25 0 0] I .402 ChaptC] 9 l\Iulu\anable and Optimal Control 9. PaperMachine Design Example As an illustration of a multivariable control using optimal control techniques. this is the same as + I) = a<l>z(kl +O'fv(k).115) which. Equation (9. if we work backward.2 0. accordmg to Eq. = 1.110 f and the equations of motion Eg. the Because we are interested only in x] and x" the output matrix H in Eq. (9. In summary. (0) = 1 and all other states are zero at k = 0. The units on control have been selected so that the maximum permissible deviation on II] (air control) is 5 units and thal of II. (9. The perfoffi1ance function Eq. or u(k) = Kx(k). = 2. for purposes of illustration. The continuous equations of motion are given by but from the definitions in Eq. which will be satisfied if 0' is such that I (1/0')' ::: 0. Based on the specifications and the discussion in Section 9.114) set I.  as X (k) "" X . application of the pincer procedure requires that the desig~~r select the settling time.1.4 sec for Xl and 8 sec for X. (9. <1>.01 = 100' Now let us select the cost matrices. then 0' > 100 1. Suppose we define settling time of Xi as that lime I. (9.0.0 units and the liquid level.109) Furthel1l1ore. To apply. will produce a response of all states that settle within the prescribed I.hele z(k) is a stable vector so that x(k) must decay al leasl as fast as I/O' .1 DeSign 403 From Eq. given by Eq.4 We conclude from all this that if we use the control law Eq. the state trajectory satl. .1141 is then used to compute 0' and. (9. The maximum sampling frequency is 5 Hz 0.5. we can write this as zlk revised system 0'<1> and 0' f for use in an LQR computation for the feedback gain matrix K. we will consider control of the papermachine head box described in Appendix A. '" is 1.for which t) T = 12.. (= liquid level) should bc Icss than 8 sec (40 periods). and thus or 0' > 100 1 ' = 100(' .the pincers we need to relate the settling time to the value of a.5.10).47.I I I).Olx j (()). (9.01 (1 'lc of the maximum I for all times greater than i.5. Use of K with the original system. we can conclude that III] = 2 and 111.1121 If we multiply through by the Q. we select the more stringent of these and in Eq.. If.2 sec)."(9. I. (9.' (O)(1/cd.1' = 1. are less than 0. (stock control) is 10 units. XI' is 2. + I) = z(k O'<I>(O"x(k)) + O'r(O"u(k) I. The settling time to demands on x. ". then when k T = I" we must have First let us apply the pincer procedure to ensure that the settling times are met. then a trajectory results that !s optimal for the perfonnance J. The I 'it settling time sec (12 periods).113) in the state equations (9.n I . (9. 9.sfies Eq. deviation on total head.(kT)::: O.1.10) we have the state equations for x(k z(k + l) = O'l~II<I>x(kl + 1)..111 I. The units on the states have been selected so that the maximum permissible 5. 0' (T = (9.. to demands on '] (= total head) should be less than 2. (9. such that If x.11 ~ f. so that + ru(k)J. We have asked that the settling times be 2. then the tranSients In X.' If we approximate the transIent In Xi 3.3 (9.1 0. is a'u(k) = K(O"x(k)) We assume the designer has the following specifications on the responses of this system: 1. 4.05 0 o 0 I 6] x + [~' 0 7] u.112) define a new problem in optimal control for which the solullon IS a control law v = Kz. '3 l\·lultlvariable Coml'. 19.
5 (b) Q.11.1776 ] 0.68.. Figure 9.404 Chapter 9 '\lullh'ariable and Optimal Control 9. eo . The control II.01 ] .25 0 0] Q.1390 [ 0.8187 and r = 0.. is larger than its specification for both initial condition cases. is just within the specification.79] K _ [ 6.L that is to unitstate initial conditions on 0.5c I 0.47 = 0. 9.491 ± )0.0009 o 0.9(a) shows the transient respon~~ x. the designer should be led by the fast response to relax the demands on response time in order to lower the overall need for control.5 o 1.0185 0. is 2. = 0. and closedloop poles at ~ = and used In 1.flO 0.". Fig.1141 selected to be 5 sec for the case with x(O) = [010] T. settles to within I ~c h\ 1.".5 3. However.81.7).m with the preceding Q. 0 Conver!. and Fig. let us try relaxing the cost on x" After som~ iteration (see Problem 9. Its response to x(O) = [OlO]T is shown in Fi"ur~ 9. Figure 9. [ 000 Furthermore. and the response time of x.94 0.068. u/5 u.8 sec.1813 0 (= 0') These two matrices are then multiplied by the scalar 1.5 l\lulthariable Control Design 405 and 0.9607 <IJ = [ 0.ion of the continuous system in Eq.0001 0. is 2. beats its specified maximum value and senling time by a substantial margin. 0. To correct this situation. 0.0196 0. All specifications are now met. = 10 a 0 Q2 _ [0. (9.47 MATLAB's dlqr. and further iteration on the design is required.25 0 0] [ 0 0 0 .9 Response of papermachine closedloop control to: (a) initial state xT(O) = [1 01.2 sec) yields 0.3 sec and that of x.. To capitalize on this observation. and Q2' The LQR calculation gives a control gain 9.10 . and x.5 Time (sec) 2.51\~ o & '5 1~ 1\ o.0 sec. (b) initial state xT(O) = [0 1 0] = 5 and tI. 9. 000 results in a design that still meets all specifications and substantiallv reduces the use of both controls.10 shows the response with " in Eq.~098 0.04 0.1974] 0.9(b) shows the same for initial conditions on x" Examination of these results shows that the requirement on settling time has been substantially exceeded because x.108. because tI.6 sec for both cases. 0 I •• on • I x/2 x·1. the control effort on tI. we find that no cost on. which are well within 1/1.5 2~~_ x.5~" I l C O~~~ ..1151 to a discrete one (T = 0. = 0 I 0 .. It is possible to improve the design still further by noting that the response of x.79 3. settles within 1'7c by 1.95 4.9999 0. (9.
4 MagneticTapeDrive Design Example 1. it is possible to control the tape position over the read head. The specification'> are that we wish to provide a step change in position of the tape head. Initial and final velocity of x..c.x.5 Magnetictapedrive design example . Although the figure shows the tape head to the left of the spring. is to be zero.12. damping. we will now apply the ideas to an example that includes integral control and estimation. +x.nd no weight on x2 1. .5 0 t.i2 .5 2. '1.10 Response of papermachine closedloop control to Initial state x'(O) = [0 1 OJ with t. There is an independently controllable drive motor on each end of the tape: therefore.. lengthened to 5 sec 9.) + b (.J.5 fe.::. should be controlled to 2 !\ with the constraint that 0 < T < 4 .~5:::.Il6) '1. The sy"tem is shown in Fig.5.~.5~~ Time (sec) .406 Chapter 9 \lultivanab1e and Optimal Clmlrol 9 5 \Iulmanable Control Design 407 Figure 9. x" as well as the tension in the tape.\. 9. The current is limited to I A at each drive motor. = (x. x.11 Response of papermachine closedloop control to initial state x'(O) = [0 1 0] with t_ lengthened to 5 sec .)/2.''~2. (9. r + K./.. We will carry out the design using MTMO techniques applied to the full system equations and conclude the discussion by illustrating how one could perform the design using a decoupled model and SISO techniques..200.51.5.5I~ 05~ 11.\i. The tape tension. .05~ 1!1. the springiness is distributed along the full length of the tape as shown by the equations below.3:. = k (x. The goal of the control system is to enable commanding the tape to specific positions over the read head while maintaining a specified tension in the tape at all times. x" of I mm with a 1'7c settling time of 250 msec with overshoot less than 20'7c. = fe. '1.n x~ x "."lIMO design. ' The equations of motion of the system are Figure 9... in fact. = ~r  + K.5 ~ Time (sec) A" a further illustration of .5 3./5 11/10 Z U 0..)...5 I Figure 9.12 11.5 1. We have modeled the tape to be a linear spring with a small amount of viscow.
T . let's try state feedback of all four states in Eq. angular position of motor/capstan assembly Iradians).113 0.5882 0.t:u""inn oflimt':. 19. where the oscillatory roots are from the springmass system consisting of the tape and the motor/capstan inertias.01". it would be wise to sample at 15 x the openloop resonance at 8 rad/sec.sec/m. respectively (A).~33 o ] [ II ] o I. and 3.\ 1 and "1.1 m.315 3315 0. The output quantities to be controlled are .5 sec instead of 250 msec for the actual system. Full State Feedback As a fiN step in the design. (9.117) are s .1 I XI.l 408 Chapter 9 t\lulm'anablc and Optimal Contwl 95 t\lulti\'ariablc Contwl DeSign 409 where i l . We will address the state estimation in a few pages. with the discrete equi\alent of Eq. The numerical equations below and all the following discussion pertain to the timescaled system. above so they run a factor of 10 slower than the actual system. motor torque constant. (9. 21 I3 N/m." We have chosen to timescale the equati(ln. iii' H" XI" x~ X.533 [~I (01) O~] and Q" = [~ n. .5 19.01/ A..120) The eigenvalues of the system matrix in Eq.0. P(mdl.T" WI [ w" I 10 ] [0 0  0 10 o 0 o 3.'0.5882 0.119) where the desired outputs are where a third output has been added to that of Eq.5 0 2..5882 3. A sample rate of T = 0. position of tape over read head (0101). it is often useful to timescale the equations so that the simulation runs slower in the laboralOr) than it would on the actual system.' 8. which represents in order to obtain better damping of the tension. 17 Sec Franllin. } r Km Ii h current into drive motors I and 2.117). tape damping constant.75N . This openloop resonance has a higher frequency than the required closedloop roots to meet the settling time specifications: therefore. capstan radius.006375 kg . 0.544 N .~75 ] . irad/seci. _QI = 19. Therefore. Thus we obtain the weighting matrix from where where WI' W. tension in tape (Nl. ~nd Use of the Q I and Q. t (9. position of tape at capstan (mOIl. the> settling time specifications become 2.H.315 0.117) in MATLAB's dlqrm results in the feedback gain matrix Emami:'olacini (19X61 fm a Ji·.315 3.106). = angular rates of motor/capstan assembly. 0.11 "71 +[ 8. ±j8rad/sec. tape spring constant.05 sec results.C ] XI (VI Although these weightings gave an acceptable resulL a somewhat more desirable result was found by modifying these weightings to W. motor and capstan inertia.5882 0 ] [ . Incorporating the parameter \alues and writing the timescaled equations in state form results in QI = [~ ~ l and because we expect each control to be used equally .375 o 0. so that it is logical to \\eight those quantities in the cost QI' According to the guidelines in Eq.caEng. 0. i" "1..5 0. we should pick In order to be able to simulate a control system design on inexpensive equipment where the system has time constants much faster than I sec. (9. (9. 0. 0.
= results in [O(} O~I ~] o 0 0.018 0.5 I 1.074] ~ 0.':.4.1211 Figure 9. o Evaluation of the time response lIsing the structure in Fig. 9.4 sec' '..018 0. and we no~' hav~ the steady state control.iliA) . we use the sta:e command structure described in Section 8. that should eliminate the tension error.15.5 2. The response of the system with this modification is shown in Fig.5 ± i5. u = N r = T rJ [ 0.14 Time response uSing Eq.947 mm. <3(mm) K _ [0. x" can be carried out frdm the physical r~lationships that must exist at the desired values of x.14.73) (see reflm in the Digital Control Toolbox) using H from Eq. (9121) 2. we can provide a feedfof\\'ard of the required steadystate value of the control input that eliminates steadystate errors. Solving these two equations and adding the zero velocities results in _ [ 0. 9. II .744 0.368]. Evaluation of Eq.5 Time(se<:) ..5. r = [I mm . lOA ± i 12. The figure shows that x .(N) 1.2... r from Eq.. 8..T.1. The steadystate tension error of the system is substantial. and X. and so we shall proceed to correct it. Tn order t~ slow down the response and thus reduce the control usage. we should lower QI' Revising the weightings to which can be used to command the system as in Fig. the tension did not go to the desired 2 N. which is significantly faster than required.. So 0 =' • . 9.14) shows that the input currenrlimits are violated and results in a settling time of 1 sec.410 Chapter 9 ~lulti\arl<lble and OptImal Control 95 \lultivariable Control Design 411 which can be used to form the closedloop system for evaluation..527 1. = 2 1\ x. . 8...2. 9.  0 . I II I! I To bring the system to the desired values of T. (9.. " + x..2366 N 1 '~O 0 o 0 I 0. = I mm and T.5 ± j9.4.13 Reference Input structure used for Fig. Calculation of the reference state. s = 5.1 and Q.15(a) with 2N]J..527 ] 1.. Note that N r = x = [0.368 0.074 0...744 .14 x 05~ I 0 ..2 secI.000947 m = 0. As discussed in Section 8.i2(A) ~ I 1' Figure 9. .473 I +0.. 4. has a settling time of about 2 sec with an overshoot less than 20% while the control currents are within their limits: however. Calculation of the ei"envalues of the discrete system and transformation of them to their discrek equiv~lent by : = e'T results in" closedloop roots at which produces a closedloop system whose roots transform to s = 3.13 (from Fig. = [~ n (9.210 0.118) and lI>. (8.1 ± i3.2366] [ arId x.210 0.473 0 Or as already computed above.5 .D Q.5 2. T 2 =. It verifies the elimination of the tension error and that all other specifications are met. 1 o :J'~============ 0. I t t = 2x) = 2. Let us first try without the feedtof\\unJ value of steadvstate control. (9.117) leads to = 0. = .k 2113 and produces the response shown in Fig.
I'd) from Eq.123) il(A. (9.26 0. Although measurements of fl and fI.137 and K _ [0.734 0..585] 0.. our measurement matrix is J 2.. as it should..113 2. and tape position. [ I 0 0 0 0 H xJ(mmJ Tt'~N) (9. we will integrate a measurement of the tension and use i·t to augment the feedback. The revised weighting matrices are then obtained by the use of Eq.113 2.122).1 and (9. xI" and that is used with the augmented state defined by Eq..8 sec. the only difference between this implementation and the previous one is that we have replaced the u feedforward with an integral of the tension error. Essentially.926 0.5 0.113 0. the integral control need onlv correct that.137 ] 0.113 0.734 1. T..51\5 1.375 0. for purposes of estimation. 0.113 0.'\ ) ~~. the tension.S Time (sec) 2. (9. the integral's function is simptv to provide a correction for a possible error in the feedfon\'ard and thus can be designed to have less of an impact on the system bandWIdth So let's design an integral control to replace the u" feedforward. according to Eq.16.137 0. We start out by augmenting the state with the integral of T. the tension goes to the desired 2 N.1 0 0] 1 0a 0 () 0 0.. which is based on the ideas from Fig.15 Time response uSing Eq.375 0. and all other specifications are met.5 QJ= [o () d a.5 0 0 2. The roots '~f the closedloop system transformed to the splane are s = 9.127) .926 0.0] 0 0. one for the integral and one for the original state K Nonnally.926 0. (9.734 0.926 0.412 Chapter 9 1I1ultivariable and Optimal Control 95 l\1uluvariahle Control Design 413 Figure 9.1221 where. (9.1\3) so that (9. I ± j3.5 a fourth output consisting of the tension integral. Again. (9. The result is _ . I.l20l that Includes H _ [0.1. Therefore.585 1..51\5]./ cc:~.1 0 0 0.26 . alone because its value depends on accurate knowledge of the plant gain. Add the Estimator The only unfinished business now is to replace the full state feedback with an estimated state. would possibly be ~asier to make.QR computation with a revised Q) that also weights the integral state vanabl~.26 (9.119) with an additional diagonal tenn in corresponding to an equal weight on XI' that is OJ / / . 5. (9.375 0 0 0 0. it is typically best to measure directly the quantities that one is interested in controlling. ThIS IS most easily accomplished by forming a revised H" from Eg.o 0. 3.. Therefore. 9. . designers prefer to avoid the use of feedforward of u. from Eq. 9.J • and the time response of the system is shown in Fig. X. We will assume there are two measurements.26 0.17. (8. (9121) and feedforward of u" 2.5 0 ()] . 8.375] We will use the augmented system matrices (<fl".2..3.) j~(.124) Perfonning the calculations results in an augmented feedback gain matrix K = [ 0 137 0. Because the tension was the only quantity with the error.5 OS .23...1 18) HI = [2. (9.375 0.113 I = [ 0.5 0.125) which can be partitioned into two gains.375 . The preferred method of reducing steadystate errors is to use integral control or pOSSIbly to combine inte<>ral control with feedforward.734 1.8 ± j 11. In the latter case.122) in an L.126) These feedback gain matrices are then used to control the system as shown in Fig..
:::~~::::. measurement.5 1.[ 0. we will somewhat arbitrarily pick Figure 9.5. (9.0004 0 0. f9.. but zero mean random noise with an rms of 0.02' = 0.r~ i II 1.104). Instead. O' . via Eqs.0 ± j4..321 0.120 L _ 0..01 mm.0001 ] .02 mm has been added to the x.. 'V:·~~·~··::==~++1 J I .'i/ I . (9. based on the estimator performance in simulations including measurement noise and plausible disturbances.' at 1. and a step disturbance of (WI A has been added to the i I entering the plant I.. .5 Time (sec) a 2.124 0.321 .. (9. is typically not based on the same degree of certainty as that possible for R. We could make measurements of the magnitude and spectrum of the inputcurrent noise to determine R". This results in R."~=.17.124 0. the response will be identical to Fig.129) to find that !! ·!i . OS .101) and (9. I +x 3 (mm) i[ (A) ~ T.17. I I . 9.16 R = [ 0. noise with an rms of 0.120] 0.. Proceeding.127) and the noise matrices from Eqs. we need to add measurement noise and/or some plant disturbance that is not seen by the estimator..128) Determining values for the processnoise matrix. In order to evaluate the estimator. we use the unaugmented 4> and f 1 based on Eq.01 N.5 sec...r.414 Chapter 9 Mulmariable and Optima] Control 9.1 ! \.0001 0 ] " 0 a. . .81). not the eqimalOr. Figure 9.131) I I ' . 9.1 ± j 15A secI.117) in MATLAS's kalman. (9126) and Integral control as In Fig. (9. . and i. = 3.18. . r j = r in Eq..16. Let us also suppose that the nTIS accuracy of the tension measurement is 0.m with H..5 If implemented using the state command structure as in Fig.0 I N has been added to the T. /' \ I I compute the estimator gains and resulting roots.5 1.0004. .102).128) and f9.. According to Eg. 4.) !/ 'I y 1+ I I i .142 . R. 9.130) +. = [ a 0. then modify R".'\lote in the figure that there is 18 Only lbc plant.5 ~luhi\¥Iable Contml Design 415 Figure 9. measurement.. .19 shows the system response to the same reference input as Fig. (9.17 Time response using Eq..' i.5 r. This follows because the estimator model receives the same control input that the plant does and thus no estimator error is excited. (9. (9. However. 0. (N) 0.OOOI .:. the first diagonal element of the R. other disturbances and modeling errors typically also affect the system and would need to be quantified in order to arrive at a truly optimal estimator. matrix is therefore 0... We will assume that the process noise enters the system identically to i.129) 2. from Eq.142 which results in estimator error roots that transform to 5 (9.: therefore..16 Integral control Implementation with reference input and full state feedback Let us suppose that the nns accuracy of the tape position measurement is 0. 9. I 0. (9.. which has the same reference input structure as in Fig. 9.i 2(A) .
.19 with everything identical except for the estimator gains results in Fig.5 i I I I I I I I I 'I ..5 Time (sec) c. if 0. 9. 9. to kill the t. we are essentially saying that the knowledge of the plant model is less precise: therefore.143] 0. one for x..131).. \.. .129) to R" = [ 0._._ . .20. The key idea to accomplish the uncoupling is to note that equal commands on the two current inputs will cause an increase in tension with no change in x" whereas equal and 19 \\'e.5 sec 2..(k) L = 0. The I'alue of R. but it i~ prderablc to reduceerror:.>rror.6 secI.. (9..001 . Let us suppose that we wish to reduce the steadystate error on x \ and we can tolerate increased noise effects. Carrying out the calculations yields [ ] ] => r. 0. which are faster than the previous roots in Eq. (9. The figllfe shows the expected result: larger sensitivity to the measurement noise but reduced sensitivity to the disturbance.{k)  T.5 the gain~ can be tolerar~d.18 Integral control implementation with reference Input and estimated state feedback some noise on T.497 [ 0. By increasing the process noise.19 Time response with integral control and an estimator with L from Eq (9130) including measurement nOise and a disturbance at 1.'1 ·······P.. and that the disturbance on i] caused a steadystate error in x" This result can b~ modified by changing the estimator. Note that the actual magnitude of the measurement noise and disturbance was nor changed in generating the figure.~r_____. ~ l 'J .497 0.329 19.stem for all kind~ of cITor:.5 l.3..r___...0 ± j8. (9.{k + I) = rikl + T... Evaillation of the same case as in Fig.... Using the gain tu form the estimator error equation and transforming its roots to the splane results in s = 4..130). .tirnalOr gain~ in order 10 havt" a rohu"l ~~ .1 ± j20. and the input currents. . and one for T.. the optimal filter will pay more altention to the measurements by increasing the estimator gains and speeding up the estimator. was changed in order to produce higher values in the gain matrix. we note that the plant can be uncoupled and designed as two independent secondorder systems.338 0._______...+16 Chapler 9 l\1ultil'ariable and Opllmal Control 9.could abo add a ~~cond integral l:ontrol loop on x:. / \ ( \\ I Ii f (\ which is larger in every term than the previOliS gain in Eq.338 0.2..Wilh high control and ~..9 0..5 \!u[liI'anable Clmtml DeSIgn 417 Figure 9.5 . Higher estimator gains should reduce the steadystate estimation errors and their effect on X r but at the cost of increased sensitivity to measurement noise. '" I 1." So let LIS increase the assumption tor the process noise Eq.___./ Decoupled Design As a final comment.132) Figure 9. 2.001 0 ] 0 0...1~3 .
:.5 3 opposite current commands will cause a change in x. (9..3 1. in Eq..5 l (9. (9. (9. . [ t] [() ~ = 66. (9. The two system equations.1351 ..6 where F d = T"FT..5 Time (sec) 2.. .. • Optimal control methods are essential in designing MIMO systems as they reduce the degrees of freedom in the design iteration down to a manageable few. 11.. .~tt\ ( . there would be differences and some coupling would be present.1 d).".133) We also define a new state 9.. We therefore transfonn the control accordingly Ud = [ ::: ] = [ ..5 sec and G" = T"GT~I... ] = [: : l The perfect uncoupling was due to the perfect symmetry of the problem: motors and capstan inertias identical.. and u . [ .. The resulting controls.18 1] [ ~ ] + [3. ./ ~ 15 fil ..5 I..I Summary 419 Figure 9.20 Time response with integral control and an estimator with L from Eq 19132) including measurement nOise and a disturbance at 1.5 hIo.136) Perfonning these calculations yields 2.c.134) • An optimal controller is one that minimizes a quadratic cost function where weighting matrices are selected by the designer to achieve a "good" design..2 ] II. (9. we see that there is a decoupling that results in two separate systems... ~f<".~""~"'i < I_mn:.418 Chapter 9 ~lulll\'ariable and Optlmal Control 9.18 and " T '. wc can write that (9.' ] T x = X d . ] 0 0 .. F" = 0 [ o 00 0I 00 00] o 0 0 I 66.tants identical.. I e 0.3 1.: ~][:.139) i I 0._ _~ ~ . and H are the partitions ofH.I.7 U.3.... Following the state transfonnation ideas in Section 4. \ +!. can then be "unscrambled" via T" to arrive at the desired i and i • that IS.. (9.:::·..127) and F is the system matrix from Eq: (9.. T 176..r: :j... where H. Due to the simplicity of the uncoupled design and its implementation.. however.. Criteria for evaluation of the design are based on all the same factors that have been discussed throughout the book. .:::.6 Summary (9. motor com. x" = [ f' = [H . ] = [() 1 ] [ x...138) and (9. it can be worthwhile to evaluate the performance of a decoupled design to see if its errors warranted the full MIMO design.l38) and =~~~~··=""':·'.. and tape read head exactly in the middle of the capstans.] ~ T" (X..' i:~) 1+''''=+==' . . In an actual system.3. • Optimal control methods are u_eful in designing SISO _ystems because they help the designer place the pole locations.:.139).i~ +[ 0 ] 42.:. can then be used to design two control systems using SISO methods." i l__ __ _ 2 :~ ~~~ ~.~=~~~'"'~~i"~ r~ ~. with no effect on tension.137) Therefore..5 1.r 1 H.
Pick roots alI 1 ± J \. given by Eg. = HHI' and Gle) is a columnmatrix transfer function given by HI:I .3. which is a scalar symmelric rootlocus problem and which can be put in the fonn 1+ pC. given by Eg. 19. Design a? optimal steadystate filter for the antenna.r' .30). then the matrix in the upper left comer of W.at]iO: Off <P"  :~t.3SI.". which is XI' has columm that arc eigenvectors of Ihe closedloop sy. Place all poles at s = 2 radisec.7 Problems 9. stationary systems. • Optimal estimators are useful for SISO system design and essential fur MIMO system design.1 Optimal control deri. IdJ Gi\'e the equivalent scalar plant transfer function G.elections of Q. Plot the step response of the closed loop sySlem for mitral errors 1~ .. (9.~~6:or ~~~2:67 ~nae0. [Hinr: Show that if Q.. The procedures do not eliminate trialanderror methods: rather. Use T = 02 sec. 10". they transfer iteration on classical compensation parameters to iteration on optimal costfunction parameters or assumed system noise characteristics. Generally. Design two sec()nd:or~er controllers by ignoring the crosscoupling terms. ] = [10 a 0 a] [ ~ ] 0 I 0 I' .<1>1' r. using the ~{eadystate gain~ given by Fig. IUse e'g. Plot the locus and locate the values of P corresponding to the .181 rP ] i> + (a) ~' 9. used in the plant equation Eq.. Which value of p most nearly meels the stepresponse speClficatlOo gn'en in Chapter 7 0 (b) Draw the symmetric loot locus corresponding to the design of pan (al.0 . Use a sample period of T = a.8.6 The equation. gnen by the steady final values of the curves of Fi~.33) and hence .) radisec for the yaw mode (I' and r) and I 2. wp 9. stationary systems. (e) 9. Ie). (b/ Take the discrete transfer function from 11 to Ii for the satellite design problem (Appendix AI and fonm Ihe symmetric root locus. for hnear.ation: (a/ (b) [~~?~ 0." and 5' in each case.)49 0))65] ~.O\... (9.05 sec.O.'i(h ':itable eigenvalue...~) are given by Show that for a system with one control it is always possibk trlconstrllct a symmelnc root locus correspouding to the optimal steadystate control. 19. 0.2. Demonstrate that if the optimal steadystale control. for linear.420 Chapter 9 ~Iultl\'ariable and Optimal Conlrol 9. K". 9.] = Deri.. = (c) Ib) Detennine the root locations that result when the crosscoupling terms are included.umple in Appendix A. 0. the steadystate optimal control solution is satisfactory and far more practical than the true optimal timevarying gain solution.an optimal controller corresponding trl the cost function J(y. Ie) Id) Plot the step f"ponse of the complete system with control law corresponding to p = 0.tcm.1 for the roll mode IrPr and PI. the steadystate optimal estimator is satisfactory and far more practical than the true optimal timevarying gain solution (Kalman filter). "'d' is white..erif) the control Hamiltonian".3 9. 9. a transformation that brings'}I to diagonal form. Assume that the receiver noise has a vanance R. ' la) ~esig:. of motion fOf a stick balancer (Fig. 9.3. = Io'rad' and that the wind gust noise.! = 10'.m In MATLAB.1 and filter correspondmg to R " = 10.I: 'IC.I (e) (d) Assuming One Cau measure rand <P .Il [1:.. u) = u' ~ PI" or p .334 0 0 I 1.5 The latera[leq. 9. and we \\anl three cases corresponding 10 R". • The most accurate discrete emulation method is based on finding the discrete equivalent of a continuous cost function and solving for the discrete optimal control system with that cost. if we have the satellite control problem and use Q I = I.~ ~~:~r:~i]ma[tel)~ 0 1.10 I. design two secondorder estimators bv r 19nonng the crosscoupling terms. 19. gi\'en in Eg. the 2 x 2 identity.7) i. J then the roolS of the optimal control are given by I .pG I: ')GI:) = O. a~~ociated~. 9.. Demonstrate that if Wi. then the first 11 columns of \V are eigenvectors of H. [ . Draw the symmetric rool locus lor thl::' case. For the antenna e.+1 0 (1.1: and \. and 106 .. 1. Determine the root locations that result from (e) when the crosscouplinu tenns are b mcluded.2 Symmetric root loem: (a) Compute the closedloop pok locations of the salellite design probkm.] [:H~!! "UUH i'J' Y. (:1 = 0 Use Eq.4 Compute the location of the closedloop poles of the optimal filter forthe satellite problem for each of the values of R".7 Problems 421 • Generally. • An optimal estimator is based on achieving the minimum mean square estimation error for a given level of process and measurement noise acting on the system.e Eq. • The optimization procedures provide a technique for which many good design candidates can be generated which can then be evaluated to ascertain whether they meet all the design goals. 19.
201. does not allo. 9. . and t. and ~l\'c of the nominal. w) and one for the can [x. 9. sysC = ss(F. Plot the closedloop frequency response of the error. The system should be robust with respect to variations in the resonance frequency as this can change by ±2'l due to temperature changes.' + w. 2 * ra ndn(size(Y n) I wherew = 19.tv! from the Digital Control Toolbox will be useful to you.21 Disk drive closed·loop system for Problems 9.05. design a controller and estimator that uses a measurement of d. 9. In order to evaluate how well vour system allenuates the disturbance response in the vicinity of +00 radJsec 13822 rpmi. that still meets the state specifications on maximum value and settling time.9 use optimal control and estimatIon to design compensation thal provides a 10 msec ri~e time with less than a lO'K overshoot to a command.w.5.10 Forthe double massspring system in Example 9. [Him: FIG97.5.·1 O]. 9.G. Q.1 9.k:")_J. Since the disk is rotating at 3822 rpm (400 radJsec). Note this is also the same generic model as the double mass. perform design iterations on Q. errors due to the actuator bius. Plot the frequency response of your compensatioll (control plus estimator) and qualitatively describe the features of the compensation. steady state trackin~ The measurement noi.1'.11 and 9.5.M and FIG911. :\ssume the initial 'i value of the ~tate has a co\arianL:e matrix 'I=[~ n and use a timevarying Kalman filter to reconstruct the Solule. 10) zeros(l.. Delennine the closedloop syslem bandwidth and the system phase margin.".sysC.se is zero mean and normallv distributed with R = 0. ~ . rIC. Compare the resulting time history of the optimal slate estimate with that from a constant gain Kalman filter.5.M from the Digital Control Toolbox will be useful to you.'(s + 2i. Verify that the oneway coupling (cart to stick only) causes the full fourthorderestimalor to have the same roots as the separate secondorder designs.15 Repeat Example 9. to find the lowest possible value of ". denne Ihe error to be the avcrage of that trom: the nominal spin rate of . 1]. (1I'J) and track wobble (v ) from an off center disk mounting. Design a discrete compensator with a sample rate no faster than 8 kHz that has un overshoot to a step command no greater than 209C. design a controller and estimator thai uses a measurement of d.G=[O. Ym= Yn+O.T=05.G PET +_C(:. J For the double massspring system in Example 9. In particular. .M from the Digital Control TDolbox "ill be useful to you.8 = 9. determine a Q that will yield an equivalent damping of the oscillatory poles that is greater than/.1822 rpm. It should respond to a command input for d with a rise time Df 3 sec with an overshoot less than 15'70.12 ZOH~ t F. The purpose of the servo h t~ follow the data tracks as closely as possible. It should respond to a command input for d with a rise time of 2 sec with an overshoot less than 20'K. A schematic diagram of d the system to be controlled is shown in Fig.5.M.5. = 0. e.M from the Digital Control Toolbox wIll be useful to you.422 Chapter 9 Multiyanable and Optimal Control 97 Problems 423 Design two secondorder estimators.U).] 9.11. 10) zerosl1..TJ Un=[ones(l.' of the nominal. U=Un+O.H=[l O]. one for the stick (e. 9.1 *randn(slze(Un)). . but fit the best straight line to the data.21.11 so that it provides the minimum possible error due to the dISturbance at .7 Starting with the papermachine design in Section 9. I 9.] For the double massspring system in Example 9. whether the disk is slightly off center or not because that allows higher data densities on the disk. Smce the spin rate dnfts some. [Him: FIG95 .J=O.3 whose output is shown in Fig.12 Design a compensatorforthe disk dme servo specified in Problem 9.JI 9. 10) ones(l. This is the transfer function between the torq~e applied to the disk head arm and the motion of the read head on the end of the arm.l 'l ' sysD=c2d. [Hinl: The routines FIG99.. on the closed·loop poles of the system. It is also desirable for the sen'0 to settle on a new track as quickly as possible because the disk access time is dirccth related to this settling time and is a major selling point for disk drives.] Figure 9. 11)]. [Hin/: FIG98.000radlsec (~3 KHz) and/. I Hilll: Re1'iew Section 8. an offset causes a sinusoidul l' to be added to the output of the transfer function above.13 For G(s) 9. FIG91 O. (A. The two biggest disturbances are due to an actuator biu. G(sj = .14 The MATL\B code below will generate some noisy data from an oscitlator driven by a square wave F=[O 1.1822 rpm. The system has the capability to measure where the heads are with respect to the data tracks on the disk.2' while the process noise is zeTO mean and normally distribut~d wilh R = 0. t').7. Yn=lslm(sysD.investigate the effect of different Q'. = 0.11 A simplified model of a disk drive is lOow. and has a settling time (to within 5c( of the final \'alue) to a stcp input less than 5 msec. spring system 111 Eq. H.
However. some products are very cost sensitive and it is desirable to use an 8 bit computer.1. discretetillIe device for implementing control designs. of the difference equations. calculated. we will consider the special nonlinearity of digital control: :.iumbers in the computer must be forced to fit in digital words that are defined by a finite number of bilS. and put out with finite accuracy. II. This can cause the machine to solve a slightly different equation than it \vas designed to do and has the potential to result in instability. if possible. The material in this chapter is primarily directed toward the design of such systems. usually 8. This section also develops several analysis methods for such random processes that are useful for quantization and then applies the random process 425 . these errors can often be analyzed as if there were noise sources in the computer. and thus errors are introduced into the output of the computer... First. Thus far we have considered the use of the digital computer as a linear. 16. Chapter Overview The random error mode! for the roundoff process is first developed in Section 10. 32. cannot be arbitrary real numbers but must be realizable by a finite number of bits.  . which must be stored in the computer. The technique of representing a real number by a digital value of tinite accuracy affects digital control in two principal ways. and b. stored. Second. the coefficients such as G.  . As we shall see. The effect of quantization when the microprocessor has 32 bits is typically not noticeable. or 64 bits. in this chapter.Quantization Effects   . Now we tum to consideration of the fact that numbers in the computer are taken in. and the internal state variables. x.  A Perspective on Quantization In Chapter 13 we will consider the analysis of systems having general nonlinearities: but first. the variable values such as e. used in the difference equations are not exact.. Our purpose in this chapter is to explore methods that can be used for the analysis of these two effects: quantization of variables and quantization of coefficient parameters.        .
WIt a cost premIum on the larger sizes. .11l with ordinary base 10 numbers where. The value 01 L 1II a panicular case depends on the word size of the parttcul~r computer in use.12 to two (decimal) places of accuracy.e. a process called truncation. 1 (10. .(lr signalprocessing applications. for example. like Fig. the location of thc decimal point to float.426 Chapter 10 Quantizmion Effects lL1. If we assume that the numbers are represented with base 2 and that t binary digib (bits) are to the right of the point (for the fractional part). Section 10. or C.3.<: of multiplication. of roundoff errors and what <. the result is the same as truncation if the first bit lost is a O. We can represent either truncation or roundoff by the equation 10. but the result is increased by 2' if the first bit lost is a 1. addition and subtraction are done without error except that the sum can overflow the limits of the representation. .124 becomes 5. Fixed point representation is typical in realtime control cumputers. MATLAB.1 Analysis of RoundOff Error In our first analysis of finite accuracy we will assume that the computer represents each number with a fixed location for the equivalent of the decimal point.125 is rounded to 5.1 AnalYSIS of RoundOff Error 427 analysi<.nallest word sIze conSIstent wIth the required performance. Overflow must be avoided by proper amplitude scaling or analyzed as a major nonlinearity. methods from Chapter 9 to the quantization ca<. lO. In the ca.teps can be taken to alleviate them. 10.iderations of amplitude scaling and dynamic range often require that different numbers in the same program have their decimal points in different location. and the corresponding error is shown ill x x fixed point (a) (b) floating point x (e) (d) quantization roundoff ~otice that the maximum error with roundoff is half that resulting from truncatton. For control implementations the choice is based on the reqUIred accuracy and dynamic range and is limited by the expense.2 examine. a process we generally call quantization. Although for any given number the point is fixed. being fitted into the proper compute) number format. With roundoff.Its. would 1001. With fixedpoint arithmetic. n ~ . however. Figure 10.\. describes some of the consequence<. One of the goals of this chapter IS to analyze the effect of t and thus of word size on the stabilitv and on the errors due to quantIzation's effects so the designer can select the s. The consequence is that different magnitudes of errors are introduced at ditlerent locations as the results of calculation<. in scientific calculations done in higherlevel languages such a' BASIC. or fixed point representation. floating point representations are mainly used. the least significant bit kept represents the magnitude 2'.1 a~~um(' thJt lht' number'i an: repre"('med In t\\ 0 Os I. The result of truncation will be accurate to this value (the part thrown away could be almost as large as r' I. where the error (shown in (b)) is decided by the quantum size. con<. 0. but 5. a doublelength product is produced and the machine must reduce the number of bits in the product to fit it into the standard word size. mIcroprocessors are readily available with word sizes of Q 16 a d ~') b'. An inputoutput plot of rounding is shown in Fig.1 Plot of effects of number truncation. For control. One way to perform quantization is b) ignoring the least significant half of the product..1 under the conditions mentioned above). .1) I The plOb in Fig. the logic is arranged so that the result of overtlo" is a saturation effect. Id) Roundoff error / 10.:umplement code. 10. 1O. however.I(a). The last section. (C) Plot of variable versus rounded values. Thus a plot of the "true" value of a variable x versus the quantized value. 5.1(?J. wherein the number representation has both a mantissa (magnitude and sign information I and an exponent that cause<.13. a nonlinearity that will be treated in Chapter 13. It is common practil'c' in control computers to use roundotT rather than truncation. (al Plot of variable versus truncated values (b) Plot of error due to truncation. q (which is 2. the detenninistic problem of parameter storage quantization errors and demonstrates the sensitivity of the errors to the structure of the difference equatiun mechanization.1 (cl.h ' . At this tIme (1997). The process is the same as is comm.
Taking the magmtudes at both sides on Eq."(IIJI'S tlh.J = y .3). 10.v(k).v(n) = ~ h I (k)f I (11 .' IfJl o  u(k) ~ U(z) U (z) H ~ Y(z) Finally. His analysis takes the pessimistic view that the roundoff occurs in such a way as to cause the maximum harm...428 Chapter 10 Quamizalion Effects 10. we_ are not looking for the exact value of Y but an upper bound on the tIme error. (10.. n = y = H. (10. (10. lSI = I I I)lf.2). and his analysis bounds the maximum error that can possibly result from roundoff. We can use this ~nformatlOn to determine in short steps the bound on S' as we did in Chapter 4 In thedlscusslon of BIBO (bounded input. (10. The function qwc. where q. and we can describe the situation by the equations Y(. which we can classify as (a) worst case. Because the error due to truncation equals a constant plus roundoff error./2.\. 10. until we have the values of x.). in which a single case of quantization is assumed to occur somewhere in an otherwise linear constant system.: x). for which we will bound the error due to roundoff: (b) steadystate worst case. is the quantum value fo~ the operatIOn whIch introduces the quantization being analyzed.)U(.iT H(. v(k). (10. so the output I error IS bounded by ~ < Figure 10.(~)£. we can conclude that if the lInear system IS BIBO stable in response to inputs applied at the point of the quantlzalIon. we will assume roundoff in our analysis unless otherwise stawd and assume that analysis of the effects of the additional constant bias \vhen truncation is used (which is rare) can be treated separately. we can see that whatever the exact values of f may be.(. Analysis of RoundOff Error 429 We write £1 as a function of the state variable x to emphasize that Eq.1 (d). its magnitude is bounded by (j. There is a transfer function from the point of roundoff to the output. lO. ])  (lOA) ~ ~ Y(z) Equation 00'7) is Bertram's worstcase bound. H?wever. which is the convolution sum given by .3) quantization models If we examine Fig. for which we will present a model of the roundoff etTor as a random process and compute the rootmeansquare of the output error due to roundoff.I~. HI Y(.2. for which we will compute the largest output possible if the system reaches a constant steady state: and (c) stochastic.I.21 but b~' Fig.1 where E is the error caused by the truncation or roundoff of x into the digital representation . although often with still another value for q than those resulting from roundoff during arithmetic in the microprocessor.. we need the time domam eqUivalent of Eq. the error magnitude is always less than q /2.m' computes It. Clearly the process of analogtodigital conversion also introduces a similar effect.k·. /lot B. '""' ~=(J " r) .)  (~)£I (~: x).2 A linear system and the introduction of one source of roundoff errors ~ 111 . We will analyze three such models. we have the mequalIty which is the same as n SLIII. bounded output) stability. The analysis of the effects of roundoff depends on the model we take for E. which we will call H I (.) = HI. we get The WorstCase Error Bound Bertram bound The worstcase analysis is due to Bertram ( 1958).I' n " I Because the sum is bounded by the sum of the magnitudes of each term.)U(~).IIE.t(d).2) is lInear because we do not know how to compute £. By comparIson WIth the condition for BIBO stability. then Introduction of the quantization will not cause the system to be 2 In the Digital Comrol Toolbox . the sum can only get larger if we increase the number of terms I. First we consider the case shown in Fig.ecause we V:ish to find a bound on the time signal .
. and we assume that all variables eventually. if ex > O. 10. (10.suming that the roundoff occurs in the computation of the product a. the error due to quantization at any particular time is bounded by the DC gain from the quantizer to the output times q /2. become constants.! Eq. In this case. Thi. q I .ignal with which is !.1 B. a. we have \Ik t. ' .St'lll' B. we assume that Eq.2 '~'J !al .vlk + II = O'v(kl . Using Eq. (10.2 and thus Eq. (10. (lOell is easily computed as follows for 10' I < I 1\. For this analysis. the system with quantization can have an output error that is nonzero either as a con5tant or as an 05cillatiun: so the system may not be asymptotically stable but the output error will not grow beyond the bound given by Eq.9) compute Bertram's bound. (1I1.".111 This is the same as the Bertram worstcase bound if a > O.3) reaches a steady state. qss..2 \\el m CdSl Slwd. we view the roundoff to cause some stable.. • qI:" .3)._+ So we see that this steadystate worst case yields the >!eneral result that the error is bounded by q /2 x de gain from the quantization s. (I/)f". the unit pulse response is ".la..11.'wtd . the transfer function is H. no saturation of the quantizer during the tran~ienl. transient errors of no special concern. ( 10. For multiple sources.2 1 . and Eq.1 0).' As ""e will see later. . in the steady state. at which time reduces to f is constant and in the range q /2 S f" S q /2. For the error system._.\1::: '2 j q I u ( 10. In this case. these equations can be extended in an + A function to compute (h~ qU3nlization :'l~advstatt' error i" i'!i\"t~n b.(:xlI = '" Lh. ( 10.'.. For this example.(xil S f" = q /2.v. I Ithl(IlJI!~' n  (10. (:) = 1/1. (lOA).T[nJl11 Bound Ap/'llCafl"/l The worst steadystate error is the magnitude of thi.1<.(I05) Use the \\oorst case analysis to compute the error bound for the tirstorder SYSI~1Il !liven bv • Solution. Equations (lOA) and (1O. however. Solution. (10. <. = 1. The SteadyState Worst Case The steadystate worst case was analyzed by Slaughter (1964) in the context of digital control.E(k). 3 We 3~sume _. and by Blackman (1965) in the context of digital filters.urce to the output. bound i5 only likely to be approached when a system has a constant input and has settled to its steadystate value.430 Chapler 10 Quanuzauon Effects llli AnalysIs 01 RoundOlr Error 431 unstable in the BIBO sense. Then Eq._ + Example 10.. We consider again the situation shown in Fig.9) or (10. and we can write" ( 10.lk) = a". a). 0 that there is.3) .:) at . From Eq. .9): The sum is the value of the transfer function HI (. we find that the bound is _ 1. We wish to know how large this steadystate error can be as a result of roundoff.E(k) + 1IIk)..1) There is one nice thing about Eq. m in the Diojral Control Toolbox.10) = a\'(k) .hl and thus . .10) express the consequences of roundoff from one source.. + Example 10.
(10.er. Unfortunately. the error bound is The third model for rollndoff error is that of a stochastic variable. + i f I.UI and (10. u . where we have a plot of the output versus the input of the roundoff operation and a sketch of error versus amplitude of the input signal x.13) does not always hold because of the assumption of a constant quantization error of '1/2 in the steady state.15 ) x" = «I>x" Solving for + riEL.. 10.. if we have K sources of roundofL each with possihh different ljuantization le\els 'I . (10.16) as compared to (10. However.432 Chapt~r 10 Quant\2'1I1(ln Eff~cts 10 1 . and because the model can be given a very reasonable heuristic justification without this mathematical apparatus.+) becomes .l3. A plot of the uniform density is shown in Fig. then Elj.12). (10. in some cases there is great expense ." + IHK(I)l q .1. it seems reasonable to assume that the valucs of error at one sample time will not be correlated with errors at other times.. .\nal)"SlS 01 Rc)unJOfl Enw 433 obvious way.1ndntll :. . Eq.8..rI)l~ +.161 The major ad\'antage of the steadystate result is the vastly simpler forms of Eqs. Suppose the equations from the point of the ljuantization to the output are given by x(k + I J= «I>x(kJ + riEl (ki." . because the "teeth" in the saw like plot of E versus x are linear and contain no fiat places that would signal a preference for one value of E ovcr another."i . wc lind which is bounded by ( 10.(11)1 +".1 ~) If all the quanta should he equal.1 .:h i:. giye a yaJuable eqirn3k on error ~ilc. .ign<ll \\Ilh ~tmllg (orrdation o\er a lime t'qual W ~ ~ilmplin£ pajoJ. An example of the usc of Bertram's bound in the design of a spectrum analyzer is gi\en in Schmidt I 19781.10) is extended to 1'"lx)l::: [:HI(I)I~ + IH. . . then it seems reasonablc to suppose that thc sequence of errors E (11) would be scattered over the entire range of possible values. hDwe\. . If lht' input i .. 10.. (10.~(ln~l~mt.y (0 CGmpUle fur complt\ "y~ll'm'i quantization variance (i If lh~ input to the quamin~r i~ a dt'tt'rrninhtic ... the error spc(lrum t~ pil'aJl) In.141 The assumptions of the stearlystate worstcase error are that x(k x" and E1(k) = E i . The analvsis will follow Widrow (19561 and has two parts: development of a stochastic ml~del for E (k) and analysis of the response of a linear system to a stocha. They do.. we give a heuristic argument for a "tochastic model of roundoff error. uch <I" ~l "..)1' a .. Furthermore.. j . (IO.prr~)\imatC' if Ihe input i~ a L. A careful anal) "i .'iot~ that Ett". (10. if thc signal into the quantizer typically moves several quanta during one sample period.3.. . on the t'ITor. Stochastic Analysis of RoundOff Error nO.} ~ And likewise for multiple sources.13) and ( 10. Eg. gi\'{~n in C13\'itT ("I ai. it seems reasonable that the values of E(n) are equally likely to be anywhere in the range '1/2 ::: E ::: q /2.\(111 is a random \ariable that takes values at sucee""i\e sampling instants in a scattered v>ay across the scale of values.17) Ivl::: {~11I\(1I)1 +~ 111. \\ hil.16) are nol hound .' due to distortion of the data ShOllld a signal overfio\\'.. a numocr ill' larg. If \\'e imagine that .10) in terms of a statevariable formu· lation of the equations of motion.121 is often excessively pessimistic. which we characterize as "white. (1O. clearly \\Tong. we develop the model heuristically and proceed with an analysis of the response. which is to say. ea. Because the development of the model requires use of somewhat sophisticated concepts of stochastic processes. Furthermore. {lO."lkJ = Hx{k) + JEI(k).' . A rc\iew of the necessary facts from the theory of probability and stochastic processes is to be found in Appendix D.yuare ~'·3"e. 'pike..' Then + I) = x(k) = (10.."" The reflection of this argument in tenns of stochastic processes is to asscrt that we can model E (k I as a white random process having a uniform probability density from q /2 to '1/2. I. and the absolute bound can be used to select 'I so that no O\erflo\\' is possible. First. 19171.' and yet the worstcase upper bound given by Eq. . For example... that is.l\~. It is easily possible to express Eq. its spectrum would be expccted to be fiat. then. over the range from '1/2 to '1/2. ignal . From this density we can immediately compute the mean and variance of E as follows ( 10.in~ wan"."_ far from nat or thi~ argument j~ \\hit~. \' = Hx II S. (10. It i~ al~u . We begin with examination of Fig.stic process that has the giyen characteristics. . ine \~<.
. (10..24) into a set of linear equations in the coefficients of R and solving these equations by numerical linear algebra as done by dlyap.20) we can compute the mean and variance of the Csystem error due to roundoff using statespace methods.._.. quanllzallon nObe~ let's review (see also Section 9.(k + I) = R.m i~ MATLAB..23) until R. ( I n.23) can be used with an initial value (typically zero) of R. (10. (10. U'.__.5) the general problem of findmg the effect DI zeromean noise.. i 10. is rounded Wilh a quamumle\'el q. we are only interested in the steady state..231 I \ Ii. with the rounding error represented by rlk f is is zero. u'(k))' I (10.181.. and others based on convening Eq..'] Thus we assume the following whitenoise model for €(n) for the case of roundoff error as sketched in Fig. The firstorder system of Eq. = \Ve define the covariance of the state as 12 'I' I I a' 11O.x(k) + J . ~ Q 2 Equation (10. R (k + 1) = E IXik + I Ix T (k + I) . In this case.. .. 10. 110. so that Eq.191 .201 Solution. ( t 0. (10..~·(k) = <I\x(k) + r.w.23) reduces to the equation (called the discrete Lyapunov equation for its occurrence in Lyapunov's stability studies) and a. = covariance propagation I(l1>l x (k) + 1'1 w(k))(l1>l x (k) + 1'. = E rY. and thus and and from Eq.5) for the ease where the mUltiplication.1 (d) dn) = U'(II).434 Chapter 10 Quanti=allon Effects 10 I Anah'sls of RoundOff Error 435 Figure 10. Af!ain.3 Plot of the uniform density function . (~) d~ = 3 1:: Lyapunovequation (~)C ~ d~ (HURl ( 10.. u'(k).~4) In order to analyze the effect of the random part of t~e.. (k) and. .19) and (10.5). Eg.. (IOXI and (10. 110. where ldll) has the autocorrelation function (defined in Appendix 0) R)J1)=[{IJ'(k)lt. I] O.' ~V 31' _"c l (10. we observe that analysis of the response to any constant nonzero mean can be computed separately from the response to the whitenoise component 11.(x).__. to compute the transient development of state covariance toward the steady state. and the mean value With the model . we see that 11: u·(n)..(k)l1>. (10.(k)r.261 A plot of Eq.+.3 RmldlllJ1 QlIalIIL::mi..211 R.24) Several numerical methods for the solution of Eq.elk)._. R.. ".1] I is shown in Fig.' = .(k) = R. q ~ ~.. = E!(€ = .I"r a FirstOrder S\.  . • Example 10.w(k) = H.+(I)~III. at k = E!x(klxT(k)}.+..221 Taking the square roOl. =l1>IR.1 along wilh the \'alue of the worstcase bound from Eqs.~5) R. on a linear system x(k IS + I) .elk) + Elk.'n E".=aR.  . (n=O) (10.24) have been developed.(k+n))=q'/12 =0 (n'1O).[ven by Eqs.'1' 3 I 1'1' ~ [~(q/2») _ ~ (Q/2)'] q' = 12' = 3q [qo 8 +8 q.stem Detennine the output of the firstorder system ofEq. .. 10. Typically.. which is obtained by letting R..~6._ . (10. +rIR. we find that + 1. .J1j} = = 1: (~ q 3 O)C f. no longer changes. (10. + I) = ". some based on solYing Eq.
1(k) + lI(k) + €(k).1(k + I) = + oaJ. . (10.436 Chapler 10 Quantization Effects 10. IVI <Iii xxx = worstcase bound Error estimates and error bound with quantization input to a secondorder system. bound~. tbe square rOOI of the result ofEq. and (10. Tn the ~'ultiplesource case.z+ I H(z)=K 10.271 Note that we can use Eg.T.. (10.1 0. given in normalized tenns by the angle we ha"e computed the estimated errors according to Eqs.5). e.000 = RMS estimate +++ steady state I 6 4 j~~~~.5 0.6 0. r10. it will actually solve in terms of the random root~meansquare response and compare it with the worstcase . and the parameters are related to the pole locations according to (/.27) for several values of e and plotted them in Fig 10.4 Error estimates and error bounds H(z) = de. to do the calculations for a controller.2 OJ 0. and. Experiments in the laboratory v.9 2~ ~ 4 O' 20 40 60 80 100 120 140 160 e In some cases.9 12. where there are n states and p sources. the output of a system is not one of the state elements. (10. (lOA).28) I). where r = 0. to the system give re~ults that compare \'ery favorably with the numbers given by the random model. In order to stud\' the role of the frequency of the pole. it is clear Ihat the worstcase hound is quite large compared to the other two computations fur most of the range of angles. which is to say R. For the randomnoise case.5.'ith random input:.24) to compute the covariance of the state due to roundoff error at several locations simply by taking w to be a column matrix and R to be a square diagonal matrix of covariances of the components ofw. is a matrix of dimension 11 x p.H.8 0.23) and (10.: o 0.7 0.2 Effects of Parameter RoundOff We have thus far anal yzed the effects of roundoff on the variables such as \' and II in Eq.4 0.et to be unity at frequency 0. In other words. ' (u(k) + Il{k 2 + 1) = (a a\'(k) + lI(k).r(k) " = 1 + a +11. the computer must also store the equation coefficients. therefore. From the plot. The gain of the system has been .R.!_~~. This means that although we might design the program to solve Y(k • Example 10. = worstcase bound 8. (10. = 21' cos(li) and 0" = 1". = H.::::. r.H(t) = I · . and if the machine uses fixed point arithmetic.16). + Ii R" 1. However. Solution.4 Randll l11 Qllantbltion Enm"jOi' a 5<'l1l1dOrdl'l" 5\'sl<111 Determine the quantization error of the secondorder sy)tem  rlk 2) ' cO 1 "(k + II +o. the parameter values must also be truncated or rounded off to the accuracy of the machine.5 Effecls llf Parameter RoundOff 437 Figure 10. 000 = RMS stoehaslIc estLmate a qji xxx. • 10.271 is plotled.2 Figure 10. ( 10.
if we wish to construct a digital lowpass filter with a narrowpass band and sharp cutoff.fi and add the I·term separately then fi = I . we compute iJp aThus Eq.. it will be necessary to store a to three decimal places and that the limit on 00' for stabilit) is 0.005.. and we ~'ish to compute the effect thi. 4. true if p~ .. I~J (10. and especially the effect on 1"/ so that stability can be checked.29) as a polynomial PI:. so the larger the power of I. then the system will have many poles in a cluster near ~ = 1. say 0'" is subject to error 00':'.c and especially the stability of the system will be altered when the parameters are altered.8c).33). and 00'.~.. and the relative accuracy requirements on r are much less than those on a. (J(l~61 is not bounded.. using Eq. For this purpose. we consider the characteristic equation and ask hl1l\ a particular root changes when a particular parameter changes.28). if we implement the salllc filter in the cascade or parallel forms. the roots should be kept far apart. then the higherorder terms are also negligible."~ . We conclude that the most sensitive parameter is cxn. the relative sensitivity decrea. . then the sensitivity is high. (10. It is often possible to select the realization structure in such a wa) that the desired dynamics are almost exactly realized with the available word length.32) reduces to 8i' l =  = nO. we give methods for the analysis of the eUects of the parameter error 00'. is given to first order by . and if possible. If 0\ and oak are both small. (10. (10.36. that if we structure the a term as a = I .. At: = \. and the new polynomial is P(). In the direct realization. However. (10. LcTO and the ("Qcflkient of it: in Eq. ..29) and the equivalent form Pi:.1 . i. 00'1' ( 10. then the sensitivity factor will hav'e only one term. (10.. I.. (10. so we have ( 10. 0'. However.995.. It is also the case that different canonical fonTIS realized vv ith a given parameter accuracy (word size) will be able to realize a different . is Ie.36) This equation has roots at A.32) from Eq. oal' ( 10. For example. ak+ 80'k l =P(). (lO. Because we are dealing with a stable system.31) is zero. ( 10.29)." . thi:.35) n i~II/. Mantey (1968) studies these issues and quotes an example of a narrowbandpass fi Iter of six poles for which 7 Thi". for values of \ near the unit circle. we can conveniently write Eq..30) we see that the first term on the righthand side of Eq. (10. using Eq. ~ote.. Thus we see that the details of the architecture of a realization can have a major impact on the robustness of the design to parameter value quantization.) ~ .. api 0) +~80' + a: . One way to study this problem is to look at the characteristic equation and ask what effect a parameter change has on the characteristic roots.)(~ I")'" (: .. for example. we can obtam results of some value by a linearized sensitivity analysis. This means that if all the roots are in a cluster. (10. onl~ ant" rom at /. deri\ari\c i . ~ 0. (10. " aO'I l (10. will have many factors in the denominator.. The general stud) of root variation with parameter change is the root locus: however.3DI If a. To study these matters. The denominator of Eq. to be preferred from a sensitivity point of view. The principal concern with parameter variations is that the dynamic respon.438 Chapter to QuantblliL1n Effects 10.29 ) = (~I. the magnitude of j .+01"J.36) is the product of vectors from the characteristic roots to \. to see which j. I". At a multiple roOl. INhere i. (10. all small.the constant term in Eq.a1 )+ =0..) and it is immediately obvious that if wc want a pole at : = 0.. is changed to a l + oak' then... ).). for the firstorder system described by Eq. . however.(1. 00..331 First..005 because a variation of this magnitude results in a pole on the unit circle. has on i. We can compare the direct and the cascade realizations of Chapter 4.).. Thus the change in J.et of pole locations. then the sensitivity given by Eq.. =  (JP/oa l aP /iJ: I.a = 0. also changes. we compute iJp (1034) and next.) ha.'. By Eq.. The numerator term varies with the index number of the parameter whose variation we are considering.29l. For example.36). the smaller the variation. the perturbed characteristic equation is ~  root sensitivity where the dots repre. the polynomial is zero.. (10. a) that depends on ~ and a k . We assume that one of the a·s. .\).2 Efkels of Parameter RoundOff 439 In this section. the characteristic equation is 00.s than one...es slowly as k gets smaller..31 ) We can say things about root sensitivity by examining Eq.~.ent terms of higher order in 01. If we implement such a filter in the control canonical form (Fig.32) (a + 00') = 0: We can evaluate the partial derivatives in Eq. = r c J ".
7. Figure 10. We .75) .t to the unit circle 1':> at :: = 0. Acnw. a root is mm'ed to the unit circk. it would take 17 bits of additional accuracy to implement this example in direct form over that retjuired for the parallel or cascade form' The papers collected by Rabiner and Rader ( 1972) contain many other interesting results in this area.1590 to 0. J staircase. To analyze a nonlinear system we must develop new tools because superposition and transforms do not apply. In other words. The point s is an equilibrium or stationary point of the equation.. dropping again.cadc form f)1.'+5901100 = O. we can also plot the function Q(elY) and trace the trajectory of the solution beginning at the point {/ on the .1580.1' versus ely as in Fig. . the . :'Jow.6. For example.\perimemation il is found thal a chan~e of ". ame controller in direct form If the tran~fer function j" rcaliLed as a La~cade of the tir~lorder term~_ then it je.c in the polynomial form.6 Trajectory of a firstorder system With truncation quantization Compare the ~cnsiti\'itJ of a fOUl1horder controller in ca.7 thus conclude that the trajectory can be found by starring with a point on the ( I/O' )line. Thus we . One such tool is to use graphic methods to solve the equations.1/0.I·axis. l\'ote that this time the trajectory gets stuck at the point s. The trajectory is plotted in Fig.001/0.11.22'7r. end on the segment of zero amplitude where ay Sq.3 Limit Cycles and Dither As a final study of the effects of finite word length in the realization of digital filters and compensators we present a view of the quantizer as a signaldependent gain and analyze more closely the motions permitted by this nonlinearity. + 11' = . Thi' is a change of only 10. Iq . r. • Figure 10. by numerical e..._.) \·erSll~ (.8511. from a at point b. One type of motion is an output that persists in spite of there being no input and that eventually becomes periodic: Such a motion is called a limit qcle.9)(. On the other hand.0.9. then the motion would have 10._. Note that the path will alway. and so on. . we plot the value O'Y from the line wilh slope I/O'. and the response does nor go to zero. 10. shown as d. u~ed arc thn:.91100 = 11. if the conlroller is realized in one of the direcl formseither control or observer canonical formthen the coefficient:..8)(.. Below b at c is the quantization of O'y.I·(k Trajectory of a firstorder system with truncation quantization and negative initial condition Q Qy + 1) = Q[O'\'(kl). 10. however. dropping 10 the Q[. I will mo\'e this pole to the unil circle and lead to instability. as shown by the dashed lines and arrowheads. 0. and hence the next value of Y.n. If the initial value of y had a magnitude smaller than .440 Chapter 10 Quantizatlon EffeCtS 1(13 Limil C\dcs and Dither 441 the parallel realization was less sensitive by a factor of 10'.\. and a change in the coefficierH b:: 0. In this case. clear that the poll:' neare. If we plot . from 0. where projection is up to Q and to the tight to Ihc (l/O')line. This is a percent "hange of 10. . suppose the initial value of Y is negative. projecting left to the ( I/O' Iline again. suppose we have the firstorder equation .ee that the cascade form is mnre robust to parameter changes hy a factor of almost 50 [}\'Cf the direct forms I Solution.
The effect of quantization on the {lltenn influences only the frequency of the oscillations in this model. = 0.: . Thus we sec that the system will have complex roots on the unit circle only if the action of the quantizer is to make the effective value of a.q/2.:q < . then the result is improved response: that is.8(b I that the staircase of this quantizer is centered about the line of slope 1. 10.0 rather than something greater than I. In fact. Thus we find in the firstorder. I .9.8(a) with the quantizer charucteristic shown in Fig.7 we see that the largest value of r at a stationary point is u I'alue r = 1. 2 I la.1. If the frequency of the dither is outside the desired pass band of the device.." I :" .38). if qUantization i.21' cos I:I~ + a. = 0. lO. limitcycle oscillation ean sometimes be removed this Ivay at the cost of a lowamplitude.39) dither + (/1 ~ ~' .:'1 such that I. selfsustained.38 ] The last result is the same as the worstcase bound thut would be found from Eq.a or (10. then the equilibrium uccur. Following an analysis similar to Eq. ignored. the largest value of .6 Qwmti::llliollCLlUScd Limll Cvcles .t case is rather likely to be realized. We will illustrate the conjecture by means of the secondorder control canonical fon11 shown in Fig.8) with the maximum I'alue of error 'I for truncation rather than '112 as i.. which. 1O. I (10. If we let {I.ystem that the wor. Thus the condition for an oscillation is that Qla. If an outside highfrequency signal of amplitude 3'1 is added to v. It is clear that s represenb the largest value of y that is at equilibrium and that thi. For this purpose.' at equilibrium. We should be able to find a rdation between kq. 1O. Such a viewpoint is provided by the observation that at the equilibrium points of Fig.7 with the signal stuck at s. If we consider the quantizer as a variable gain.. . The extrapolation of this idea to higherorder systems is to examine the range of possible equivalent gains of the quantizers and to conjecture that the limiting motion will be no larger than the largest signal for which the linear system with the resulting equivalent gain(s) has a pole on the unit circle.Y = k'1 . (10. the time constant of the filter. = r' = 1. I0. then the oscillation condition becomcs 1. 10. • Example 10. and its purpose is to make the effective gain of the quantizer 1. the property of the quantize. because the equivalent radius is L the equation for the digital frequency is (/ = COSI (a l 12). Ia ka > I. highfrequency noise that causes very low amplitude errors at the system output. The characteristic equation for this system.:'1 + q..0.8(b) corresponding to roundoff rather than truncation.78 and a. value depends on a.7 the gain of the quantizer is exactl~ I la.442 Chaptu III Qu. I (al (b) from which the amplitude is predicted to be less than I q I. the case for roundotT. is ~' . 1 II'I < q . 10\Nfrequency. Consider again the situation sketched in Fig.8 \\'ith {II qrw 10j Dither = 1. then one can expect that although the output would contain a fluctuating component.} intersect.md Forthe system in Fig.0 passing through the origin. 10. for a linear system. Another benefit of the view of quantization as a variable gain is the idea that a second signal of high frequency and constant amplitude added to the input of the quantizer can destroy the limit cycle. a large constant bias or else a highamplitude. where we assume that 0 < < 1 and (/1 corresponds to a real angle..8 A secondorder system In control canonical form and the quantlzer characteristic corresponding to roundoff Umit Cl'cles and Dither 443 mOl'ed down to the next equi librium where the ( I /a )line and Q{. Such a signal is called a dither.:<. + r' = O. .:'1 :" k'1qj'2 {I. and a. or or 1 1. 110.mlbltic.'11'2) S '112. ~ote from Fig. the average value would drift toward zero rather than remain stuck at s.' is that Qtx . In order to extrapolate these re'lllts to a higherorder system we must find a more subtle way to look at them.n E[[ccls 10. at those points where the combined gain of quantizer and parameter a are unity. would correspond to a pole at ~ = I.".:qa < 1.3 Figure 10. from inspection of Fig.
6. q=O.. correspond to roots at a radius of 0..9 (a) Secondorder response With and Without quantization showing limit cycle (b) Secondorder response With quantization q = 0. If we compute the frequency correspondin. A random dither '"'' Solution.1 case. of the 'y. lOA by simulating the response oflhe svstem from Eq.. ! 2~ . a = 0.1 and the frequency has been increased from that having a period of 1.q=O I 4~~~_"_::_=_:_ 40 tiO 80 !oo t20 !4O which is evaluated via MATLAB using dlyap m or qrmsm.~.. .10) where HI is the transfer function between the quantization error and the output. • The effect of parameter roundoff (or parameter storage error) is systematic and has the capability to render an otherwise stable system unstable.<~) = 27.~_. uncommanded oscillations will occur due to quantization called limit cycles which can be alleviated by the addition of low amplitude oscillations called dither. exactly the \alue given by Eq. repeating the simulation 20 or more times..Nodilher. according (10. after some experimentation.5. 2~ 0 .1 \\ i f . u(k)'.9.~_= '"".m input at each mUltiplicatio~. considering that the true period musl be an integral number of sample period~. The limit eycle is clearly visible for the q = 0. q = 0 ~ "_~. and it can be considered to be white (no time correlation). its variance is R. = = + fA. In this ca'e. The period of the limit cycle can be seen from the figure to be approximalely I~ >amples./. t 10. (10. • The effect of the random multiplication roundoff error is analyzed by using the discrete Lyapuno\ equation R.. . these errors are usually negligible.\'1 2 and . _. q =0._..391.(x) = <lJ1R. In Fig. .2 samples. Use a = 0. For 16 and 32 bit computers.O!./IS wkell as 1 in order to reflect the fact that the system is o~cillating. 10. • Under certain conditions (usually lightly damped systems).: \ i \! \.1 6 4( \ (.. Compare the result> 10 that predicled by Eq.2 Verify Fig.L~ o 80 !oo (b) 10.02.9. 10..78 I\'.ponse. / __ 10.IX)lP./h the /'(I(/. The system parameter. it was found that a squarewa. They could be significant using a computer with 8 bits or less. 10. which i.5 Problems ~ 10./ " . = q" /12. I Dithered case. in steadystate.9. the setection of the amplilllde and signal shape of an effeeti'e dither remains more a matter for experimentation than theory..~ . which was found to be much less effecti"e than the Nyquist frequency square wave. = 1. we find H = co~ I (a l .e to the \atue of II. The quanti7alion le\el was set at () I The response with quantization clearl\ shows the limit cycle with an amplitude of 0.30) Figure 10. q = 0.. The distribulion of the random input is flat. L'nfortunately..9131. I 111. (111. (7.' 4~.39) with ": = 0. ..yquist frequenc.. period of 13.1 For the system from Eq. f. and compute the response from k = 0 to k = 100..5 to 0.8 with and without quanti7ation i. a 1 I. Thi" angle correspond~ to an o~cillation with J.444 Chapter I (1 Quantization Errects 105 Problems 445 (al determine the response [0 lhe initial condll1on of ."e dither at the Nyquist frequency worked quite well at an umplitude of ~q.91bJ are plotted the response with q 0 and the response with q D..+ to that having a period of 2..5) with a \) 20 40 tiO Time = 0.1. Compute (T . as will be shown in Fig. A simulation • to lOA Summary • Multiplication roundoff errors are bounded.__. = =0 with q =0 and I b 1 Determine a dither signal that improves the re.  . namely the t'. whal is the rrns of the quantization error of y that you expect for random input. and I HI ( I) I is the dc gain of HI' • Multiplication roundoff errors can be analvzed under most conditions by considering them to be an additional mnd(..95 at an angle of 20 . its mean is O.hown in Fig. It was shown that a parallel or cascade implementation of the difference equations significantly reduces the sensitivity to this type of error as does the use of a large number of bits to represent the parameters being stored.9 and q = .1 and dither = 4q 6.5) to l/(k) = I with and without quantization of the ay multiplication.\'.. q 2 = =0. q = .783. 11.e a larger steadystate error response. 6 = 20". The experiments found that dither of Ie" amplitude did not remove the natural limit cycle and dither of higher amplitude ga. In that case the steadystate response has been reduced in amplitude from D. " also tried..I with dither added.l .tem of Fig. an estimate that \s quite good.~~~_ tv~ o 20 (a) / .
andb. with II bits to the right of the fixed point. (l0.995.. can be approximated by a constant. . what is the smallest gain penurbation that could cause instability? Which parameter would be most sensitive'? ib) Draw an implementation of DI. Compute the steadystate Worst error at the output due to quantization.8 using computer toobif".6 and". = 1.1. Use M.lu.ULAB to compute the rrns error due to quantization using the whitenoise model.10 A secondorder system with quantization u 10.4 A digital filter with the structure of Fig.51(.7 The filter shown in Fig. = 1. = (.8 is preceded by an AiD converter having] 2 bits of aCCuracv.6. The parameters are (1.} in control canonical fonn with parameters "" (I. IIO. (1024) for this case. ".. (a) If both quamizers operate with I bits to the right of the point. 9 bits to the right of the fixed point. At what value of a can the quantization error alone cause the mpu! to Q. ".0.99.I(k) = Q. = 1. (bl Give the relevant transfer functions necessary to compute the output guantizalil1n error.stem based On the whitenoise mDdel of quantization error. to exceed 1. lOA. Compute the firstorder sensitilities of these parameters according to Eq.81.D. The quam.cx)[llk .98. Csc M.0.81. 9. respectively. has 9 bits to the right). = . = I. (a) If implemented as a cascade of firstorder filters with coefficients stored to finite accuracy.81. = b. 10. . lel (d) (e) 10.65)  (d) Assume that R = [" "]. for the converter and each internal roundoff quantizer. The four quantizers are based on ] 6bit words scaled to h3\'e. I~. (a) Give the 4uanta 'Ie for each quantization location. 10.8 Consider the discrete compensation whose transfer function is DI~I R [OC} = ~.3 A digital lowpass filter is described by the equation .e .0. (b) (c) (d) Suppose the input AiD quamizer Q. = 0. <I> = [OI8~ ~ l r.\TLAB to compute the worstcase bound on output 4uatlli/alion error. 0.9.IIJ + QI [il . (a) Glve the 4uantum sizes q. 10. = 1.zer Q. and compute R.611c . what is thc mlue 01 the quantum q for this case? Give an expression in terms of a for thc minimum value that f must have 10 guarantee that quantization error cannot cause the input to Q.81. Let ". Evaluate your expression in part ib) and give the necessary bit coum if a = 0. ]0. The magnitude of the input is restricted to be Ie" than 0. (c) L"se JI. Q. [I ik).10 has input from an AiD converter that has 10 bits.0. I~.446 Chapter 10 Quantization Effects 105 Df the difference bet. A"ume that a > 0 and that the input.(k . is scaled to have only I (sign) bit to the left of the poim in a 16bit word length. = [~ n. = 0. " " and (I~. =0. Y.6.1 D.een the case with and without quantintion at k = 5 and k = 95 and compare with Fig.36J.6 and ".6 Solve for the rms output due to roundoff for the system of Fig.55Ii~ . is a slowly larying signal that. (I. is fixed at 12 bits with Ii bits to the rightl1! the fixed point. whal is the maximum steadystate error due to equal rounding quanta of ±'1/2" Icl Show that the stochastic statetransition model to use E4.27). H=[I OJ. and 13 bits to the right of the poinb (i. is a 16bit word length sc"aled to haw 3 bits 10 the left of the point. 10.~4) on this system has (d) Csc MATLAB to compule the rn" output errOr for this sy. cDinpute the transfer functions from the quantizers to the output.I )J. (10.5 For the secondorder obsener canonical form shown in Fig. how many need to he computed. Comment on the match you found and discu" any discrepancie\ Prohlems 447 Figure 10. Note carcfulh (bi Give the respective transfer functions from each quantizer to the output.!At t. (a) 10. 10.0. Which parameter is most sensitive" Compare the . for the purpose of this analysis. (OJ from Eq. The quantizer Q. (hf If b l = h. h c solve Eq. = 0. The input magnitude is resmcted to I.. to equal unity" 10.AB to computc the worstcase error bound on the output quantization error.
e on Sample Rale Selection The selection of the best sample rate (or rates) for a digital control system is a compromise.. = 2 and ". (al Use I'vL\TLAB to simulate the. (a) 2k G. and find a dithcr that improves the sltuatwn as much ". or more control capability is ayailable for a given computer...qi2. A decrease in sample rate means more time is available for the control calcuJations: hence slower computers are possible for a given control function..5 examines how sample rate affects the error due to the measurement noise 449 . On the other hand. M in the Digital Control Toolbox will be usefuLI 10. 10. (h) Add dither at the I\'yqui. and the savings in design time that are realized \". assume the deSign full scale is ±20 unib and lind the number of bits required in the cpu to eliminate the limit cycle withuut any dither.158. which would also increase cost. J Using the root locus.s.M in the Digital Control Toolbox will be usefuLJ 10. Generally.6.. but a"ume the design full scale is ±20 units and the system is being implemented with an 8 bit cpu. as. hut cost may also increase with faster sampling. Either result lowers the cost per function. 10.st frcquency to the quantizer of lI"I' with amplitude A and find the dither amplitude that minimi?es the peak output in the steady state.12 For the. we will see that faster sampling can sometimes require a larger word size.3000. A Perspecti.448 i ChJpter JC1 QUJotl=atlon Effects i I (e) I :.3 examines the regulation effectiveness as measured by the response errors trom random disturbances: Section I ] A looks at the effect of sample rate on the sensitivity to plant parameter variations: and Section 11.' + l.I how many bits are required for parameter storage in order to keep error.. In this case.. = 0.1~ For the discrete sy. find the maXllnum de\'iations po"ible for the parameters of the control canonical fom1 and compare with the rcsults of part (b I.' + 3:' + .6.98.6 with the same initial conditions. For systems with AID converters.fbit> required in the epu to eliminate the limit cvcle wilhout any dither. = n."ming Ihe dcsign full scale is ±20 units.1590 .2. Compare the amplitudes and frequencies of the limit cycles I]f any) with the "alues predIcted.tem DU = :~ _ }. and 0. x.10 For the system of Fig.responst to tht initial condition.:'i 2kI' k= 1.s.. find the number . the cost of the design effort can be more than the unil product costs.' .wstcm of Example 10. [Hill/: FIG1 09. This chapter will discuss the influence of Ihe sample rate on system performance in order to give some insight into how to reconcile the issues for a given design. Chapter Overview Section 11. [Him: FIG 109.9.. Show that the equi. Furthermore. 0. in the pole location"~ 'to be less than 0. and time lags: Section I 1.05. possible.0 I in the . = () with Zero input.jth very fast (> 'lOx band\'iidthj sampling dictates that a higher rate is the best choice. slower sampling means less conversion speed is required.Y5.9 and a quantization Ic\'eI of 0.' Assume the system i. the performance of a digital controller improves with increasing sample rate. (b) What is the largestamplltude limit cycle you would expect for a sccondorder control canonical form system with comple. which will also lower cost.11 Repeat Example 10..~ ~ 0. Sample Rate Selection .M in the Digital Control Toolbox will be usetuLI 10.9 For the equivalent· gain hvpothesis of limitcycle behavior. digital controllers are often designed and built for systems where a very small number will be built.~n~iti\"itie" of root locations for the ca~cade and the control forms for these nominal root positions. for a signal of amplitude Ie" than or cqual to kq . to be implemented in the direct form. but with the coet'licients selected so thallhe equivalent damping is i.1 examines the fundamental limit on the sample rale imposed by the sampling theorem: Section 11.0 I? 10.. [HlI1f: FIG1 09.22. n.0775. and (/. compare with the theory. smoothness.. Use iii = v· 2l1.alcnt gain of the roundoff quanti?er is gi\'en by 10. All these arguments suggest that the best choice when considering the unit product cost is the slowest sample rate that meets all performance specifications.1: .2 covers the effect on the time response.. Find the amplitude and frequency ot the Ilm1\ cycle..13 For a svstem structured as in Example 10.. roots at a radiUS of 0.plane in either the real or complex directlon.
the result would be that the sampled values of r would be aliased as discussed in Section 5./wh ) for a reasonably smooth ttme response IS sample rate lower bound basis from the sampling theorem discussed in Section 5. because r is an unknown signal that must be followed by the plant output Y.' I ± j) 1S approximate in that the actual bandwidth of the closedloop frequency response may be slightly different.j~ however.. Find the feedback gains for sample rales of 4.plane that are equivalent to s = 0. and the result would be a system response that was unstable or considerably slower than specified. some designers elect to have more than one sample rate (a "multirate system") and this topic is discussed in Section 11._om_~_~_~_~I_tio_n_~81./ ~r _. A similar argllment can be made with regard to the closedloop roots of a system. The sampling theorem states that in order to reconstruct an unknown bandlimited continuous signal from samples of that signal./'v" =.5 uJ. In practice. the actual root realized will be aliased and can have little results.\. this theoretical lower bound would be judged far too slow for an acceptable time response. we can specify the tracking perfomlance in tenns of the freqllency response from r to'y.2. 20. It is interesting to note that the x. which typically would be slightly slower than the bandwidth.1 DOl/hI<.6. that is '.:: ~O appears necc.l(llhne'ss 1. including the one wllh w.~ .1) provides the fundamental lower bound on the sample rate. A ~ampling multiple of (ujO)h ::. no designer would consider such a low sample rate. If we want the system to track r IIp to a certain closedloop bandwidth. Since there are often conflicts in selecting the sample rate for different functions in a controller. one must use a sample rate at least twice as fast as the highest frequency contained in the unknown signal. For a system with a rise time on the order of I sec (which translates to a closedloop bandwidth on the order of 0._+ The degree . resemblance to that specified.5 W"I 1 ± j J.1.1.. This means that the desired sampling IIlIl/riple (= w. Compute the unit step respome of the double integrator comro] problem as de'eloped in Example ~. (11. 1l.1 Digital control system schematic C.2 Trme Response and Smoothness 451 and the influence of analog prefilters or antialiasing filters on this error. /1. Discuss your Figure 11. T _.' so thaI the responses all have closedloop roo" In the . it would be ty~ical to choose a sample rate of 10 to 20 Hz in order to provide some smootlmess 1I1 the response and to limit the magnitude of the control steps.rnt". If a designer specified a closedloop root by its splane location and failed to sample at twice its frequency. its rate x •. the acceleration had large discontinuities and would have had a strong tendency to excite any flexible modes and produce high Slre"es in the actuator and its surrounding strueture._d_:n_~_n_~cs. and comrolll time hi'lories. Solution. The four responses are shown in Fig.of smoothness required in a particular design depends on the appltcatIon and IS hIghly subjective.5 Hz). Ihese acceleration steps produced noticeable changes of slope In the velocity.t and plot the output x. and 40 times the bandwidth. 11. response was smooth for all cases.1 The Sampling Theorem's Limit An absolute lower bound for the sample rate would be set if there is a specification to track certain command or reference input signals.plane poles were computed using _~ = Cd :"ote that the relation 5 = 0.ll w" If a designer were to specify a certain value of the closedloop bandwidth and then pick <1 sample rate that violated Eq.2) + Example 11.2. In ~racl!ce. 11. StirnI'll' Relic (ll. we bring it up only because it marks the theoretical lower limit of possibilities. the sample rate must be at least twice the required closedloop bandwidth of the system. Based on the sampling theorem therefore. The commands issued to an electric motor .~mrm Coni 'ui Sm.. Assuming we C<1n represent our digital control system by a singleloop structure as depicted in Fig. The gains were computed using pole placemem where the .1). .2. W (11. 8. Wi. it follows that r will have spectral content up to that frequency. This bound has a theoretical 11. This theorem applies to a feedback controller like the one illustrated in Fig. > 2.. ..~an· for a reasonable smoothne". (J)/>. howeyer. In tum.2 Time Response and Smoothness Equation (1 1.450 Chapter 1 I Sample Rate Selection 11.
o (aJ roil (rad) 5 o (b) roil (rad) 5 di.3) o (a) 5 roll (rad) + X. (bl 8. but the fiher . X.o depends on the application..e for the two ~lower ('a~t::s_ The o\crshom L" unl:hanged because the controller was adju'ted in each ea. with human input commands where the sy.e to maintain Lhe . X...can have large di. Solution.CUSS the impaci of this i .uch a..d) 40 the time delay to be IO'7c of the rise time. therefore. Assuming we wish to keep J Sometime~ 100\pas:'\ rilter~ are placed between the ZOH output and the actuutor:o. x" re. aware of the command input at time zero and that.452 Chapler II Sample Rate Selection 112 Time Response and Smoothness 453 Figure 11. in terms of the nondimensional sampling multiple ( 11. mu~t be taken into account during dc~ign and compemated for.. and . (dJ 40 Ii I 0. In addition to the smoothne" i»ue. A command input can occur at any time throughout a . discussed in the following section. but add a one c: de delay between the input mmmand and the .1.tem re.same ~plane [(Jots. .[(11 R"SI"'I1'" \ . An unmanned satellite controller can be rough. a topic that i.3.. if a person is being affected by the controller. flybywire flight control). critical (.pon.tem respon. I 1.s measured from the instant ufthe input command.e.ample period.y. Example 11. for example.tem. slow sampling contributes to increased pointing errors from disturbances. XI S. (c) 20.2 a»umed that the controller wa.hown in Fig. but the extra dela\' affected the tile tIme substantially a.pomes in Fig.2 Double integrator step response for the sampling multiple with (J)s!w D equal to (a) 4.imilar fashion.ornetimes important to reduce the delay between a command input and the sy. the time delay alone suggests that the sample period be kept to a small fraction of the rise time. I The tolerance to roughness in the response al. . It demonstrates the noticeable impact on the o (e) 5 roll (rad) o (d) 5 roll (rad) re~pon. (c) 20. SilnJpk RUle RepeaL Example 11.3 Double Integrator step response With worst case phaSing between command Input and the sampler With 0) Iw equal to (a) 4. . there can be a delay of up to a full >ample period before the digital controller is aware of a change in the command input. The result" . to ~ofren (h~ + time delay Figure 11.5 ~.~se~s the worst case phasing of the input.e i. it is . DI5.>continuilies.sue.ponded in a . whereas the commands issued to hydraulic actuators are best kept fairly smooth.2 O"U/J/"ll1kgr. therefore.tan of the cOlltrol input in order to a. For . all the attitude re'pon. C 0. a lOHz sample frequency should be used for I sec rise time or. 11.continuities. All the re.e to the command input.. a smooth ride is likely desirable. % Uk.. X. however.x~  "/4 (b) 8. A pilot flying an airplane with digital flybywire flight control wi11 complain if the sampling delay is on the order of a tenth of a second from input action to the beginning of the response.
F and G. m in the Digital Control Toolbox. The discrete equivalent of Eq. we will look at disturbances that are fast compared to the plant and the sample rate. which Can easily be done using disrw.81) and discu. and regardless of whether an estimator was used. (l1.m in MATLAB. (9. It will be used to establish a baseline again. Berman and Gran (1974) suggest that the sample rate for aircraft autopilots should be selected primarily on the basis of its effect on disturbance rejection. Disturbances enter a system with various characteristics ranging from steps to white noise. and 'D.t which discrete controllers are compared.4 shows the situation. that is. with both the continuous and the digital controllers. called the discrete Lyapunov equation (see dlyap. were used in computing the estimator gains. In order to do this. . w'e are at liberty to analyze the effect of w with a certain power spectral density regardless of what values of R" or R. we have a continuous system represented by where the power "pectral density of w is R"lhJ (alternatively referred to as the "whitenoise intensity" or "meansquare spectral density") so that the covariance of wi.1j Figure 11. (9.3.X) and then repeatedly evaluate Eq. Due III Randc. Furthermore. 11.6) with varying sample rates to establish the degradation versus sampling. where the plant noise can be considered to be white. necessary to evaluate Eg.7) exactly using Van Loan's ( J 978) algorithm. Indeed.. (11. It usually suffices to examine the diagonal elements for a perfOlmance measure and to compute their square roOl<. the entire . (= E!x(t)x(t I TIJ represents the amplitude of the random response of the stat~ due to the excitation from w. The block diagram in Fig.st evaluate Eg. In other words. it i. In fact.4 Block diagrams of the systems for disturbance analysis w w When the approximation is not valid. The solution is obtained by Iyap.+.45)) consistently. (r 1. in order to evaluate the etrect of sample rate on the performance of a controller in the presence of white plant disturbances. we will concentrate on their effect.90). The ability of the control system to reject disturbances with agood continuous controller represents a lower bound on the magnitude of the error response that can be hoped for when implementing the controller digitally. In order to analyze the degradation of the digital controller as compared to the continuous controller. See K\\akernaak and Si\iltl I 197:2). (4. w. Therefore. In fact.24).454 Chapler II Sample Rate Selection II 3 Error.Jnl Plant DlslurhmKcs 455 11. is the most important one. The steadystate value of the covariancc of x is given by the Lyapunov equation' (115) The solution to this equation. generall~ a vector quantity. it is important to consider the effect of the noise [w in Eq. the quantity that is typically measured. to find the rms value. this is the case for many control applications. (116) (1U) As discussed in Section 9.3 Errors Due to Random Plant Disturbances Disturbance rejection is an important aspect of any control system and. in mam cases. Elw(t)wTu + rll = R"". is continuous in nature and acts on the continuous part of the system independently of whether the controller is continuous or discrete. (11. Note that the system matrices. Proceeding then.4. The plant noise. It is also necessary to evaluate X when the system has a digital controller for the identical excitation applied to the plant.. can represent a closedloop system including a continuous controller. L.sed in Section 1. X. we tir. although there are multitudes of applications with widely varying conditions where other factors are more important. some degradation over the continuous design must occur because the sampled values are slighth out of date at all times except at the very moment of sampling.. (115) is giwll by Eqs.5) to find the baseline covariance . For determining the sample rate.Jo(rI.m in MATL\fJ) is <lJX<lJ where 1 + Cd = X. given by Eg. this integral can be approximated if T is shorter than all system time constants by where (118) x= Fx + Gu + G I W. (10. the higher frequency random disturbances are the most influential: therefore.st be transferred to its discrete equivalent a.ystem mll.34) in slightly different contexts The desired result for our purposes here.
.6 ~how~ the discrete to continuou:.... The 10\\e. . (I 1. n is for the rm~ of the J:] \.)_ the idea being that all the discrete controllers should he trying to du the ~ame thing_ Each di"Lftle design resulted in a unique K anJ system matri\..: = e..urlling there i~ quantiLucion in the e~tiJlla1l. With fullSlate feedback the closedloop continuOllS ~~'~tem matri.'ontrol and C'~timator roots were related to the L'onrinuous roots by. 1 I \~.01\ iT12' Eq.3 Examine the effect of sample rate on the performance of a digital control ..5 is the ratio of the rms \alues for the discrete case t" the. ClJ to' s / Wb R"r'cl = I has no effect on the lesults.3 • Example 11..continuoLl~ case....OUfce of error in the ~ystcm..6~ no quantization .. \\3)' a" the L'onlrol input ::. In this case. (b) We can analyze the disturbance response of the system when the controller includes an estimator in a simIlar manner to that aboyc. Becau. K. fast as the camrol roots... CUf\e . ..ay that the control Joe:...mple periods were all dt':~ign~d to the same continuous co~t function according to the method of Section 9.hen ... compared to Fig. 11.•. 1.. The lesult .~ .how n in Fig.ed....5 Discrete controller degradation versus sample rate for full state feedback and dflven by a white disturbance.3....g~ I 1 \ \ \ (a) A"... Example 113. whereas the gain by sampling faster is simply to reduce the degradation fmm about 2(Y/( downward. The family of dj .ume the plant i~ dri\"en oy white noi.: controllers ''I..\ is gi\en by F. one L'ould conclude from this example that a samplIng multiple of tV ~ ~~() OJ I . 2. 111. 1\.ilh onl) Xl l1l~a~urcd with additi\'e noi~e \\ilh RIO = I.. Because we wish to illustrate ])nl~ the degradation of Ihe discrete controller compared to the continuous one.. .4l '" 0 " 0 ~ 7 bit word size ~ ..y:. S.4 '\.ed in Examples 11.... The plant distllrbaIlC~ noise enters the plant in precisely the same \". .471. example had n~ dynamic characleristics that \\ cre faster than the slowest sample period.81 could ha\'e been used....: '" 2.l."r 1..(lriahlc: howen~r. 1.__ .timator \l.51 with F replaced \\ ith F. ~o(e that <I> now includes the pi am dvnamic.. is slightly higher.6:'1.. u.6~ 1.I~Kl./2"). to' Sampling multiple.. = F . ampling . The rdati\ e error~ grow quickly \\..tem for the double integrator plant u.. <I> in Ec:j.. Th~ ramily or dIScrete controllers were round by using pole placement ..61 is defined by Eq. the approximation for the plant noise gi\'en b~ Eq.61 to e\ aluate X. Therefore the re~ponse of a hypothdical continuous controller is found by :. ~o that the dosedloop ~Y'itcm had moh Lit s = 0... ~ama..7)and we a"ume that '''" = .5.tate kedbad.. the e~timator dynamic~. Example 11. ( 11.plant noise. The continuou~ comrol rooh are in the same location as for part I J I and the co~tinuous estimator roots were selech:~J twicc as.61.5w"ll ± jl (( = 0. 2..(cm compared In a continuou.. I ClJ b to' in Fig. wa' determined by s~le('ling optimal \\eighting marrice. (8..e thi. Solution. the choice Ill' E 0 "is \ ~ 1. cd in Eq... 9 bit word size .. mntrol 'y.. the 'y'tem matri. The control gain....2..__.. The specifil' CUfye shu\'.8 _. 0 0 ~ 2..6 Discrele controller degradation versus sample rate for the case with an estimator with quantization errors and a white disturbance.::lt..4 'Of 2 \ '\ "" . ~= $ . 8 bit word size 000 '" ::. which \\'<1_"1 u . .... tal The opcnloop F. although the exact ealcularion of £'1.. (h) A"isumc the same.. as wdl a. l:rl. (11..Iower than thi~ multiple. . (11.. is l:: ~ c 2:r t8~ 1. ' .2· \...41I I i would be a good choi\..cnsi·liyity to disturhances is th...456 Chapter II Sample Rme Seleclllln . If white plant di~turbance\ were the dominant ':..1 and 11. 3..ith JilTtTt'nl ~a. . _ . both cms ratio~ (lce es .. 11.0 Ihat the discrete l.lQ...e of full. Ill.GK. stated.. Figure 11. but now U~~ an e:.'e.7f was a<:lual]. lind 9 hit word .emially identical.. Figure 11.: 2. and Hare given by E'I..8  2. and G I a. 1]..2" I' 10° 10 1 Sampling multiple. G...c cnwring in the \\ nh R"p'J = I and lI"umc the u.'~ l' .3 Errors Due to Random Plant Disturbances 457 __ .... case a~:. G] = G. This is to he expected because the veloeitv information i~ now being e~timatcd from 3 positiOIl measurement and the greater . . Rep~al (hi . that is....i/e.l1 equivalent to 7... .2 ]1 tOO . rm~ ratio and. ] 1..
3.election fnr the. Except for controllers with small word size. (/J. except that we will conSIder the Casc with no natural dampmg as well as the lightly damped (e = 0.s design \I'as carried out in ordcr 10' achiel'e a 6: I ratio between the. Figure 11.at all "ample rates. ampling rate innca~e.. nothing encountered so far in this chapter would necessarily prevent the selection of such a slow sample rate.spring system that wa. (ll. Although the curve i" gencrall~ higher .' where disturbance~ arc the dominant con~id~ratl0n is the same: that i~. not the specitk magnitude a" much as the notion that there is a limit.2.. Whether the rms errors due to plant disturbances are the primary criteri on for selecting the sample rate is another matter.\! .e too high a sample rate.1. e gent.3 Errors Due tel Random Plant Dls\urhanccs 459 result of the approx.4 2.. h) improve as the sample rate is increased.atil'l1 noise added according to the discu"ion in Section 10. (8 bits or less). the performance continue. it can be useful to perform a :.. ' 2' zeta: 0 zeta =0..:ra s apeot t e CUl\'CS IS amazIngl.'.e critical sample rates. Do pan la) for full.'(1:'. although on a very . resonances in the plant that are faster than the bandwidlh sometimes can have a major impact on sample rate selection.. . that is. they can introduce unacceptable sensitivities to plant disturbances. similar to the previous example.. The excitation i. _ _ ::' .. but there are Ihree highly ~en~lh"'~ .tate feedback and part Ib) for an estimator based on a measurement of d...ample rates at:2 UJ r . l\ote that these are not re~Ollanl'e:'l in the traditi~n~l scn::. Ho\\ever. But the point i. With 16.imple plant.4 "I I2 I t J L 200.cade realization.5 and deScribed In Appendix A.. the increase in nn~ error.hghtlv e t • _ ~ 'u ~ eSlgn" were found by using pole placement so that the discrete r(JOb were related to the continuolls roots by ~ = e" The result for the full state feedback case is shlmn in Fio II 7 Th "1 'h .~ the damping ot the resonance mode . + Example 1104 DtHlhk "las5Sl'lln..ample rate.edpoint implementation of the control equation::. The analysis is identical to that used in the example above. ('ur\. ~ol~tion. \Vci!:!h~ino factors werc applIcd to d and y. h . although diminishing returns tend Il' occur for sampling faster than 40 times the bandwidth. and that if a designer is dealing.i. Abo note Ihat there is /II! peak at 2 OJ for the e'1'C w'th + (= 0.lJlcC Rl'.the ratIO of the r~spon".458 Chapter 11 Sample Rate Se1enicon 11.0].. Jl may be counterproductive to u..ults when a white disturbance acts on the plant: The degradation due' 10 the discrete nature of the control over that possible with a continuou. ~ample at ~O timl':the bandwidth or higher. ' ...ard ~iLe i.!i .6 it is a... (1)" ar~d (0)1. QuaotizalJon is lIslially important on]\ \vith a fL\.~ Dhltuh. The parameter values used arc as given in Example 8.e of the discrete ~V:'ltem compared to the continuous... (I)" and the 'iy'item handwidth.3 and 9. Although they dl) not change the fundamental limit discussed in Section 11..7 Discrete controller degradation for the double massspring system uSing full state feedback. the noncolocated casc wherc the resonance is betwcen the sensor and the actuator..7) be used because there are some plant dynamics that are faster than the sample period. Th.4 2.. Figure 11. the condu~ion conccming sample rale . 11.mal1 that v.'f full ~calc.irnilar analysi" to deIermine \vhcthn the word.' Repeat Example 1]. w'hich pI'" tded good damping of the rioid hods mode and mcreascd _ .. mean that the discretc controllcr at th'at sample rate exhibits poor dISturbance rejection compared 10 thc continuous controller. . broad band tor both controller< at all .. except that it is mandatory in this case that an accurate evaluation of the integral in Eq. " .> j'·'ml·I\· ot'd [. due III quantization at the fast sample rates is typically ~o s. if using an 8bit microproce''''or.. Example 11... a some\vhat arhitrar) a~sllmption.L:::. ol with fe\vcr than 12 bits. not an issue and nIl practical upper limit to the ~ample rate exi". 1 he.c'S reprc~en'.011 case used preVIOusly. On the other hand.."med thai the coni roller was scaled sO that the continuous nns error due to the plant dislurbance is ]C.. quantization The addition of the random noise from quantization shows that there are limih to the' improving noise respon~e as the .. The optImal continuou. so thm large spIke. In Fig. lIsed in Examples g. with a microproce.4.3 for the double ma. and an assumption \\·a~ therefnr~ required as to the scaling of the signa" for this analysis.ize errOl> are sufficicntly large to impact .! The origin of the ~ensici\ity peak at exactl! w r iii tha( (he controller has no information about the resonance at the.and 32bic mjcroproce~~ors and a parallel or ca..1. shows the basic trend that usually re.::~101 Sampling multiple.6 :i! '" l 2.... Plant damping j <>0 '" c ~ 0 . If cost was of primary importance and the errors in the system from all sources were acceptable with a sample rate at three times bandwidth..6 aho includes quan11/.{Tee d' .ts. The sampled resonance value will be constant resonances The example.~.imate differentia~ion that is occurring..8 2..5 1. W s Iwb . control is significant when sampling slower than 10 limes the bandwidth.02 10° ~1~~~~~. resonanl mode frequency.1I"'I1SC \5 Sum!'k Rdl.election of sample rate.~ .
Discrete systems generally exhibit an increasing zeta = 0 zeta = 0. ari"e.3. \W._~_:. Performance approaching that ot a contmuous controller can be achieved providing thc sample rate is 20 or more times faster than the bandwidth for systems with no significant dvnamics faster than the bandwidth. uue to both unobsenabilitlc" noted abo\'e.. As might be expected. For systems where the controller is adding'some damping to a lightly damped mode that is fa'acr than the bandwidth...' measurement of ci (essentially a notch tIlter)." Fo. use of a colocated sensor and actuatorthat is. the sensilivity peaks would have been more pronounced because use of the mode infoffilation by the controllers would have been more critical 10 the performance. =::!::==::=2. 11.perfor~s in the presence of plant disturbances. The impact of this is that. Furthennore. in some cases. and would cause this system to lack ':robustness. Figure 11. by which we found that the control and estimation roots designed independently remained unchanged when the feedback was based on the estimated state.4 Sensillvity LO Parameter Vanatilms 461 no matter what the pha. 11.460 Chapter 11 Sample Rate Sdection 11. therefore. we assumed that the actual plant and the model of the plant used in the estimator were precisely the same. provided that the controller is adding some damping to the resonant mode.cnable ~'ystcm. thus prodU. This peak is significantly Ie" likely to occur and Yani. senSlltvlty to parameter errors for a decreasing w . I. Vv'e will now proceed to revise that analysis to allow for the case .:in::: an ulloh".. syste~s wllh hIghfrequency resonant modes with adequate natural damping and to whtch the controller adds no damping. W I W s b J The phenomenon "a~ noted and di'icmsed hy K~d7 1]9711 and analYl_cd by Hirata {19R91. from a similar lInobscrvahilit~.c relation~hip between ~ampler and the resonant mode. or integer fractions of that value has difficull \ and amplifies the effect of random disturbances acting on the plant. that is ( IUO) • Example 11. thus renderimr this approach u~reliable.. Had more damping been added to the resonant modes by the Figure 11. using the measurement of. the sample rate has a major impact on how well a digital controller.8 shows the sensitivity of the discrete controller to disturbance noise for tile' more realiqic case where the full state feedback has been replaced with an estimator using til.8: however. the only safe place to select a sample rate is faster than twice the resonant frequency. Example 11. and these considerations can be ignored when selecting the sample rate. for systems where the controller is adding some damping to a lightly damped mode.vidth may be advisable in order to eliminate the possibility of these sensitive sample rates. The determination of the degree of sensitivity as a function of sample rate can'be carried out by accounting for the fact that the model of the plant in the estimator (or compensation) is different from the actual plant.vhere the .~~"' to' 10' Sampling multiple.ervability occu" only when the phasing is such that the samples are at the zero crossings.".. Factors that influence whether these sensitive sample rates exist have been studied by Hirata (1989) and generally show that the amount of damping added by the controller is the key aspect. resonant frequencies can often vary considerablv. with a small amount of natural plant damping.=.4 Sensitivity to Parameter Variations Any control design relies to some extent on a knowledge of the parameters repre~e~ting plant dynamics. In Section 8.4 demonstrates that.02 3 1 2~ I L '_ _ 100 ~_~_~~~~~2~. This resulted in the separation principle. In summary. Note that these resonant modes may be considerably faster than the system bandwidth and.he.4 9 :r Plant damping <>0 1 There is a possibility to pick the sample rate in one of the "valleys" in Fig. the sensitivity peaks h~l\(· become more serious. controller than shown by the example. except that in this case the unob. the sample rate should also be at least twice that resonant frequency. The figure shows a wider sample rate band of high sensitivity ahULIt eaeh of the previous trouble points anu auditional peaks at 2. sampling faster than 20 times band. and SO we now sec tim there are sensitive sample rates at all integer lractiom of 2w. there are typically no sensitive sample rates related to the resonant mode.8 Discrete controller degradation for the double massspring system uSing an estimator with the measurement from d. a digital controller with sample rates centered about 2w. The additional peak at :!w." instead of dproduces results that are very little different than those shown for the noncolocated case.
optimal. The purpose j. = M'J q .rt demonstrales a suh'itantial increa. Figure II 10 sho"'s the effect on (. (8. and the bending mode IS lightly damped (~.\4 = 2(0).'SS . to bending mode frequency w r ' ~ote the in~ensitivily to ~amp]e rate when knowledge of the bending mode is perfect Ino error in Ui") and the strong influence of sample rate for the ca.14) \\'ith the ideal case of Eq. C:i very deep and narrow notch filter that tilters out the UImanted bending frequencies.: " t I p . (Or·1.1:+ + wrK j Zii oe + K::. (11.14) Either the poleplacement approach of Chapter 8 or the steadystate. For this example. which we will refer to as the bendingmode weighting faclur Ql. <P"x(k) + r. the optimal estimator gains for the bending mode are \'~ry ]m.05 with a J()q W error and a sample ralt" only ~OQ. x+ = po~ition y(k) = Hx(k)..". E.it)' reduction. <P p = <p..' = UJ1Xt. = angk of attack.! ..e in robustne". they are the roots of the characteristic equation [similar to Eq. which arc ofkn referred to as robust design methods.5 rad/sec.(J)rZCt·.tabililr deri..t"r.13)..151 + This It:\ample i~ due 10 Katz t 197~ 1. "10k that it is theoretically possible to ha.5 RolnIStll. The control system consists of a sensor for XI (a rak gyro J. thus making the controller more tolerant to changes In the bendingmode frequency. cau. The width or the notch filter IS directl)' related to the low damping of the bending mode and the noise properties of the system. = quantitics depcnding on the specliic aircraft shape and mas. and the sy. if one parameter is particularly troublesome.ynthesis to s = 16 ± j 10 rad/sec with e"entially no change in the bendingmode root locations... and \e10Ctt) ofbcnding muue. and a feedhack to the elevator to be added to the pilot input.\ = 2 ='= j 13. (] 1.. to change the natural characteristics of the airerali so that it IS easier to fly. the component~ of the incoming . robust design The sensilivity uf the controlled system to t"rrOf"i in w. • Example 11..". this i~nores th~ disturbancenoise amplification that will occur at w. root sensitivity is obtained by repeating the closedloop root analysis with a perturbed plant or. (ll. One particularly simple method entails increasing the weighting term in Q.. as a function of the ratio of the sample rate w_. the root sensitivity is obtained by assuming some error in <P or r (thus <p. + I) = + L(y(k) . Solution. =I <Pi' and r. The oprimal compensator (control law plus estimator) generate. Z's = aircraft .LH)(<P .faster than the benJinQ mode: h~wc"". = 0.ignal to the estlmator due to the bending miss the notch and are transmitted as a positive feedback to the ekrator..ing Jow damping in this e"imation error mode.i. (1)1 = b~ndingmode frequency. If a system has been designed using the methods of Chapter 7.ubjecr 10 sume error or change from flight conditions._ can be reduced u~ing anyone of many method. which applies to the bending mode.e1agc bending arc+ i. Mach 1.11) and (11.edloop poles of the rigid body were located by optnnal discrete .. (= r).r~. =I <PI' and r. the bending mode wa. In the flight condition choscn for analysis (zero altitude. and u(k) = Ki(k). In both cases.siti. ( 11. error...21.'. =I r " the roots do not separate.Hx(k)).8" 0" + Za + Z" .and Lmatrices. Let us suppose the plant is described as x(k where t.12) r I <PII LH<P p ~ rK p (I . unstable 1(. (11. and the current estimator and controller as x(k) = X(k) x(k 8" = elevator control surface.e.l  . + I) = <Ppx(k) + rpu(k). 'Olnetimes rekrred to as stability augmentation. The effect Oflhis approach is to increase the width of the notch in Ihe controller frequency respon.tdts from Eqs. an e . imuLor to rccon"'lrucl the n:maindcr of the state. Figure 11. The c1o.:I . w: .de~ign if (l)r i~ :'.' and comparing the resulting roots from Eq. an analysis of a root locus versu. and the system c1osedloop roots are given by the controller and the estimator roots designed separately: that is. = bendingmode damping. (= <P) and r p = r.xamine the !)ensitiYit): to errors in the bending frequenc} versus the sample rate. Sample Rote' The equations of pitch motion of a highpert'ormance aircraft where there is some fu.: 2 discussed in the previo~s section.\'.ati. indicating a very sensitive ~ystcm and totally un~alisfaeto0'.. :\I's.55)] I ~I  [<P .rK111.(<P ~ LH<P) I = o.I.ll. di~tribution. Furthermore.I.e ( > 0. In the ideal case. = pitch rate.tem characteristic equation is obtained from the full 2/1 x 211 determinant that re.462 Chapter [I Sample Rate SeleCllon IIA S"nsiti"lly w ParJl11der VanatJollS 463 parameters representing the plant model in the estimator are different from those of the actual plant.1J I If we allow <P.~' ( 11. . (11. for scn.. K. that parameter might be worthwhile.LHr K . o (1l. If the bending frequenc)' of the \ehicle varies from thc assumed frequency. thc openloop rigidbody poles are located at .1': + M".01) with a natural frequency of 25 rad/sec H HZ/.ample rates \lith a 1O<:f W. as a function of the fourth dement in Q. K.e.121 (. =I r i.r K) . discrete design method of Chapter 9 could be used to arrive at the K.. = 'I + /11".'e where [he bending mode has a lO'f error.u(k). .9 shows the closedloop bending mode damping ~. < 0) for all .I) ) r.
9 Closedloop bendingmode damping of Example 115 versus (V. sensitivity of the system to offnominal parameters should be evaluated. an optical encoder provides a prefilters Figure 11.5 Measurement Noise and Antialiasing Filters In addition to the random plant disturbances.  . These errors are affected significantly by the presence of analog filters (called antialiasing filters or prefiltersJ.20 No error in w.5 :'leasurenwl1l :Joise and Anllallasmg Filters 465 Figure 11. M for Example 11. 19. there are usually some errors in the measurement or unmodeled bending mode oscillations as indicated by \' in Eq.82).5 with a 10% we error r. On the other hand. but it continues to show an increasing sensitivity to the w. Digital control systems are arranged this way for many cases in order to prevent the aliasing of the higherfrequency components of \'. if there is some error between the plant parameters used for the controller design and the actual plant parameters. 0. w..464 Chapler II Sample Rate Selecnon 11. we wish to examine the effect of the sample rate on the response of the system to measurement errors. 'table for a 1O~~ W.50/ Figure 11.1 I depicts the typical arrangement of the antialiasing filter. we will discuss antialiasing filters as well. 0. the use of reduced performance requirements or of robust design practice such as shown by the example can reduce the error to acceptable levels and thus does not impose extra criteria on the sample rate.3. In this section. Figure 11. there will be an error in the desired closedloop characteristics that increases with the sample period. However. that were evaluated in Section 11. Therefore.25 In summary. . in rare cases._:<5~~IJO_4'::""~:''Q=I'44 0.11 Block diagram showing the location of the antlaliasing filter With a'ufficienlly high \alue of Q 1+1' the example becomes "robust" in the selbe that iti. to increase the sample rate mer that suggested by other considerations. which are typically placed between an analog sensor and the sampler in order to reduce aliasing of highfrequency components of the signal. there is no effect of sample rate on bendingmode damping or any other closedloop dynamic characteristic. for the ideal case where the plant parameters are known exactly. _:::: Il/L_~6"""""1/doc. error tor decreasing sample rate. 11.10 Closedloop bendingmode damping versus 0 . 4 8 0.25 5=50 w. In most cases. Exceptions are those cases where the sensor is fundamentally digital so that there is no analog signal that can contain high frequency noise: for example. _ 0.50 10% error in w. and in some cases it might be necessary to design specifically for better robustness and. error.
aliasing of the noise to a lower frcquency as shown in Fig.. If this analog signal is sampkd as is. 0 I" .2 and shown to be capable of transforming a veryhighfrequency noise into a frequency that i.onh. 0 .12 Demonstration of the effects of an antialiaslng filter or prefilter. Fig.5) is used to determine the system OUlput errors due to continuousmeasurement noise acting on a continuous controller for comparison purposes. The only difference from the cases examined in Section 11. tv. Solution. the sample rate should be selected about five times higher than the prefi Iter breakpoint.l ~ o! through a first order antialiasing filter with a breakpoint.3 is that the noise to be examined enters on the plant output instead of on the plant input. ~ O~ I e '.466 ChJpter 11 Sample Rate Selecl10n 11.. = 28 Hz.#oJ 'I t 0 (d) .. ·1  1 ~' Time r. (a) Signal plus noise. ( 11. 11. and ITAE. The design goal is to provide enough attenuation at half the sample rate (wJ?. Butterv. It is therefore necessary to examine both quantities simultaneouslv. The breakpoint v. (c) signal m (aJ passed through antialiasing filter. w" is a design variable whose selection is intimately connected with the sample rat~.2 Hzl. find a prefilter that will eliminate distortions when sampled at 28 Hz. thc analysis procedure described above is carried out to determine more precisely what the effect of sampling is on the system performance.ulls for sampling at OJ.12(b i would allow the system to rcspond.as picked considerably below the noise frequency ~o there is a large attenuation of the noi~c: and yet sufficientl. well within the bandwidth of the control system. " 0 . and the simplest transfer function is 5 w (11. and the noise would not be apparent on the system output.A.Franklin.mel EmamiKaeini 119!).ave. the 60Hz nOl'e would be too faq for thc systcm to respond. 0 < .idth digital control ~ys(em without an analog prefilter. .cussed in this chapter. we use the same analysis procedure.. Equation ( 11. . For an analog control system \\ith a bandwidth on the ordcr of 1 Hz.6) is used to determine the degradation for digital controllers with various sample rales. Antiaiiasing filters are low pass. Furthermore. so that the noise above w.12(d J. of" '\I' 1. This .5 1. 1 LI1(c) shows the results of passing the nOIsy signal in (al 0 0. . Sampling this clean signal results in the faithful reproduction of the signal shown in Fig. and then Eq. 11. See.. The basic idea of aliasing was discussed in Section 5.(s) = s +I~ .?r t:p~~ arc Be:\:'Id.+) or Aslrom and \Vittenmark (1997. due to Peled (1978). #' . " . Demonstrate the effect of the prefilter..16/ G1.121a) shows the IHz sine wave with a 60Hz sine waYe superimposed to repre~ent measurement noise.5 .e L1g: c(~mm()n filtl.16)] is attenuated. 5 Figure 11. /2. For a IHL bandv. Example 11. producing ~C'n~itiyit. I' 1 so that the noise above the prefilter breakpoint [wI' in Eq. for a good reduction in the highfrequency noise at w)2.5 Tlmc (sec) 1. for dt:taib. = 28 Hz and we see that the 60Hz noise has been changed to a much lower frequency and appears as a distortion of the original sine v.. (\ 1. . Figure 11. arc al"D u~('d in OTikr to obtain bcttL'f highfrequency attenuation with minimal In"" frcqutn(~ pha:.6. is to allow significant phase lag from the prefilter at the system bandwidth and thus to require~ that the control design be carried out with the analog prefilter characteristics included. that were used for the random plant disturbances. lPA .I "' "v' Time (sec) For a IHz sine wave \\ ith a 60Hz sine wave superimposed to represent noise. above the IHL signal '0 it was not attenuated. thu..5 Time (sec) . This kind of conservative prefilter and samplerate design pro:edure is likely to suggest that the sample rate needs to be higher than the other factors di.:w. becau. Thus \\'e see the rea~on for using antiallasing filter~.. the highfrequency noisl~ will be aliased: Fig. will not be detrimental to the controlsystem performance. + To study the effect of scnsor noise on samplerale selection. ~ec) (e) o ' 0. = 20 tad/sec 13. thus allowing the system to respond to it. (bl samples of (a) at ")..ntialiasing Ftlters 467 digitized signal directly. 11. b. The implication of this prefilter design procedure is that sample rates need to be on the order of 30 to 50 times faster than the system bandwidth.12(bi shO\vs the re. .5 ~ °ttu. and lack of one.' O~ o()AO o . A conservative design procedure is to select the breakpoint and·w. ..Y to errors that do not C'xi~t for analog controllers. Furthermore. when aliased into lower frequencies by the sampler. 5 High~ronkr tlltt:r:. plotting the signals over 2 cycles. however.e the prefilter breakpoint. (d) samplmg of signal in Ic) 1 ~Ieasuremenl l"OlSC and :\.5 (bl 0. sufficiently higher than the system bandwidth so that the phase lag from the prefilter does not significantly alter the system stability: thus the prefilter can be ignored in the basic control system design. Powell. A complication arises. An alternative design procedure.
. Note in the tigure that.. The firsl is that pretllters for removing high frequency measuremenl noise are effective and a methodology has been presemed for their design.. w. Il. the opposite trend to that at the lower samrlc rates..2. and prefilter breakpoint>. (ll... The second is thaI the bandwidth of lhe prefilter should be seleCled primarily for the reduclion of sensor noise effecls.· E(f. Also note in the figure at the very fast sample rates {w. and their influence on random plant dislllrbanees should also be evalumed according to Section 11. r'l I 26~ 1\ . The result> of the normalized rms values of the output error due to white continuousmea~urement noi':>l' entering the system as shown in Fig.3 ± )3.2 ~ '~ 10' 10' " . . were all normalized to the results from a continuous controller with nO prefilter.468 Chapter 11 Sample Rate Selection ll. the figure shows that a sampling multiple of (ll. 9. Root mean square response of Example 11. because the tension results from faster natural dynamics than the tape positioning.50 E . in Fig.6 Multirate Sampling In mulliinput. the existence of the prefilter might itself. w p ' and sampling.: I = 10 b wplOJb=5 2.2 .Iw. (11. of the digital controllers with the various prefilter breakpoints. in the lapedrive design in Chapter 9.161. even though it includes the case where the breakpoint is only twice the bandwidth. T. 3i 2. Sampling multiple..8~ ~'f\~T"~\~~~~~~~~~~' . Howe\er. F 1 \" W + Example 11.'dS 1'S.I"' is adequate providing the prefilter breakpoint ratio O). 00 w IWb = 20 p W IW p 'll..0. \ "'.\1 \'1 l. . The exact evaluation of the integral in Eq. the performance improves as the prefilter breakpoint decreases.3 to demonstrate the degradation of the digitaJ system re~punse vs. the continuou~ control for variou~ sample ratc!. For example./ (u/' ~ 2) should be considered even though their phase lag needs to be adjusled' for in lhe controller design.\/c'lNiI'l'J)1Clll . /'u" = . lead to a more complex digital control algorilhm. An exception to this would occur if the prefilter lag was sufficient to require a more complicaled conrroller. and values approaching lhe system closedloop bandwidth (UJ. Figure 11. some cases can require increased complexity in lhe control implememation to maimain sufficiem stability in the presence of prefilter phase lag: that is. All the digital controlle" had roots at the discrete equivalent of those "plaoe locations by using: = e' T.13 for four different values "i the prefilter breakpoint. ~ 1. For MIMO syslems wilh significanl lime conslant differences in some natural modes or control loops.'( of the continuous case for all the fasl sample rates. > ~OO) that the rms respon'" decreased as the prefilter breakpoint increased. \ 1 i 10° Solution.l I are shown in Fig.3 rad/sec.18.3 before a design is finalized. In this + . w. 1989. improvements in performance can be realized by sampling at different rales: such a syslem is referred to as a multirate (MR) system. ese the antialiasing filter as shown in Eq./wh S 5. \ \\ \ \ \ p IOJ =2 h 1. because lhis increase in compUlation could offset any cost gains from slower sampling. the LQR and U)E method. I 1. there are two main conclusions. '" <: ~ 0 2.13 \lulnraLe Samplll1g 469 procedure allows us to use sample rates as low as 10 to 30 times the system bandwidth. whereas a sampling multiple ofw.'·"b. The continuous system was designed u"n. A"ume thai only r I IS available for measurement and use an estimatnr to reconstruct the stale.' same order as w . OJ I w s b In summary.. If a system is dominated by measurement noise as 1n this example and the designer chooses to limit the discrete degradation to 20\r~ compared tn the continuous case.• for some sample rates studied. An ewn slower sample rate would be adequate if a slower breakpoint was acceplable. multioutput (MIMO) syslems. for sampling multiples below w. /ev" = 40 is required if the more conservative prefilter breakpoint ratio orwr/we = 10 is used.ult. The re.5 ± j 1' radlsec and the e'timator roots were at s = 3. and 11.. 11.7) was required because the sample rate was on th.4r ~ \. In addilion. SlIm!'k Rate (lnd Prefilter Brc'llh!'oll1[ t'§ 0 Use the doubic integrator plant as in Examples ILL 1l.7 .7 to white sensor noise showing effects of prefiltenng.r. there are detrimental effects of prefilters that can be more serious (sec Hirma. one could logically sample the tension measurement. faster lhan the tape position measurement x. but at the expense of increased complexity in lhe design procedure..4 ~ ! ::~ I \\ \ \ . of Chapter 9 so thal the colllrol roots were at s = 1. il is somelimes useful to use different sample rates on the various measuremenls and control variables. This obser\'3lion has lillie effect on the overall design because all values were wnhll1 10'.
. including the previously ignored crosscoupling and the fast controller. of discrete systems throughout this book docs not apply to MR systems. if needed. It requires that the system initially be decoupled into two or more singlerate subsystems along the lines discussed in Section 9. The "Krane" operator" facilitates this transfonnation.11) or (1..1 and as shown in Fig. we see that the final design ofthe MR system should perform according to that predicted by linear analysis. This enables design of a digital controller for the sIal\' loop using the resulting discrete model.14 Block diagram of a MIMO system shOWing methodology for multlrate analySIS usmg successive loop closure Plant Slow subsystem i l. An analysis method often used is called successive loop closure (SLCI. which is ignored in the decoupling process.... The approximation made during the design of the inner (fast) loop is thc elimination of the crosscoupling: however. The computational burden for both the switchdecompusition and the statespace MR analysis is substantial: therefore. For systems with three or more identifiable loops where it is desirable to have three ur more different sample rales. encompassing the entire system. which makes it pussible to meld it into the slow portion of the plant.11. The controller for the subsystem with the highest frequencies (and fastest sample rate) is designed first with the sample rate selected according to the ideas in this chapter.' I Crosseoupllng I ". Figure 11. and Powell (1988) and. Thi.: 119:. ZOH at Tj r' : . can now be obtained using conventional techniques.tl. Ignoring noise effects leads one tu pick the same sampling multiple for all loops... (4. w)w". CI I.'hat inferior to that which could be obtained with an accurate MR analvsis and optimal design of the entire system together as described by Berg.is for the analysi.6 \lullirate Sampling 471 successive loop closure section we will address the issues of analysis of an :'1R system and selection of the sample rates. Note that this does not imply that the same sampling multiple. transfurmed to a continuous model followed by transfoTIllation to a discrete model at the next slower sample rate. The difference equatiuns have coefficients in «I» and r that change periudically at the longest sample period.470 Chapter 1 J )amplc Ralc Selcction 11. This model is exact provided the fast sample rate is an integer multiple of the slow rate. 11.. the sample rates for each loop are in the same proportion as the bandwidth fur each loop. The dashed lines in the figure show the crosscoupling between G r (. . An MR analysis procedure with this approach is cuntained in Berg. the model of the system at the slO\\ sample rate will accurately predict any innerloop root migratiun due to the approximation and can be corrected by a second design iteration. 6 StC' Krl. and so on until the final (slowest) loop is closed.71. Another approach uses a statespace description due to Kalman and Bemam (1959). be used for all loops.. the same ideas are invoked.1 thruugh 11. Amit. The innermost (fastest) loop is closed first. digital control designers typically opt for design methods during the synthesis process which bypass the need for using one of the exact MR analysis techniques. The :transform method that is presented in Chapter 4 and is the ba..5. which has been reviewed by Ragazzini and Franklin (195R) and Amit (1980) and extended to multiyariabJe systems by Whitbeck and Didaleusky (1980). Amit.. Considerable research on the subject was carried out in the 1950s and resulted in tbe "switch decomposition" method. reduces the MR system to an equiyalent singlerate system where conventional methods can be employed. t Therefore. A discrete representation at the slow sample rate of the entire plant. similarly to switch decompositiun.. The samplerate selection for an MR system designed using SLC is carried uut using the considerations discussed in Sections 11. 'and Powell (1988).I) and G. transformation is the inverse of Eqs. Fast subsystem '.58) and is exact in the sense that the continuous model outputs will match the discrete system at the sample times.. The appropriate sampling multiple is a function of the plant disturbance and sensor nuise acting on that portion of the system which may be quite different for the different loops. that is. This digitally controlled subsystem is then converted back to a continuous system (see d2cm in MATL\B I._ G.~ . The key idea in this method is that it is possible to analyze an MR system by reducing it to an equivalent singlerate system operating at the longest sample period of the system.(s) ~.ln. The effect of the approximatiuns made fur design of the inner loop serve only to produce an innerloop controller that may be sumev.
For evaluation of the MR controller.th control applied to both masses is shnw n in Fig... /(1 LI.pring ..uperior In thi~ configuration.. 7 This ~xamplt:' i. One could say that. We have defined XI as the ahsolute posllion of the large ma".~. are that of a ~imple ma~~. The sample rate of the singlerate controller was selected to be 40 Hz. The degradation of the large mass response with the MR controller is more than the improvement or the small mass: therefore.16 shows the relative rms responses for the two cases and generally shows the superiorit)' of the '....... changed to a closedloop frequencv of 8 Hz. "hereas . ystem. let u\ change the plant di~[urbance nois.. 0.c the bandw id..7..8 with w applied to the large mass Figure 11. and Powell (19R8 I. then obtained \ ia d2c.. «('. I' the position of the small rna" with respect to the large mass. Figure 11. a \alue that required approximately the .IR case in that its small mas.. its performance in the presencc of plant disturballL'e noise.Compare the mlS responll..t~ or control \'ariabl~ .8 with w applied to the small mass 1.... de~jgned using feedback from the slow sampled states so that thc rigidbody openloop roots at s = 0 were changed to I Hz with a damping of I.7. ..\.hereas the large mass response was approximately: the same... nine times faster than the closedloop root. \.h or the inner loop was faster and the plam diqurbance noise was applied 10 this mas. A continuous modcl of this fast inner loop wa.6 \lulttratc Sampling 473 • Example 11.:o ma~ses. becau. The rcas..to return to the innerloop des. applied to the small mass as shown in Fig. Fig.'i~e the design so that it re~ulted in acceptable dynamics after Ihe second loop closure.16 Relative rms state and control responses for Example 11.15 MIMO double massspring system used in Example 11. Thc sample rate was chosen to be 71 Hz.I Joop wa" designed using poleplacement for full ~tate feedback 0 06 0.ame amount of compute I computation time as the !viR controller_ thus yielding a fair comparison.\.17 and indicate~ a different conclusion..8 Admntage (1f . including the coupling between the tv.on of rdali\'e rm~ respon'\c" i. J 1. The sample rate for thi.. The entin~ system was then discretized at the shmr rate..2 . The oWer loop \l"W.ign and re. St3.17 Relative rms state and control responses for Example 11.. This follow.. The inner loop cnnsi. one could conclude that the siMIerate controller W<l5 .~ b) 0... To analyze the "ituation further. x~ U J U2 Stat~ or control yariablc employing a fastcr sample rale rorthe small mass feedback. = 0. for this configuration.8 Solution.'>.ith that of a ~ingJe rate (SR) controller that u~e~ the ~ame amount of computation effort.1R 5dmplmg(". 11.ement of the closedloop inner roots. Ami\. 5\"'d11 In\estigate the merits of multirate sampling in terms of rms response 10 plant noisc for the double mas~~pring system.\. 11. 11.8 0.. = 0.B and added to the dynamics nfthe 1arge mass.m in MATL. loop was chosen to be 9 Hz. shown in Fig.15. from Berg..t .2 0 Xl Xl .' . and the damping impTO\ ed from ( = 0 to I. response was approximatel Jo'..15 will be compared against the performance of a singlerate controller...he DUlin/.. The double massspring system w. it pays to a~~ign a large fraction of the computer power on the control of the small ma:.4 that its openloop resunant frequency of + Hz 'la..472 Chapter 11 Sample Rate Selection 11.. The effect of the coupling from ¥ I motion is ignored: so the dynamic.. The inner (fa"..1 kg k 0.c configuration from the small mass to the large mass and keep the controller described ahme..1.t> o(the mca~urement of x~ and jts feedhack through a controller to Ii".25 Xl x~ x. If the inner roots had moved an unacceptable amount.~OC( less than the ~inglerale case..e of an ~'1R controller .. it would hale been nece~~aI)'. The effect of the dynamics of the large mass and its coupling to the small mass along with the outerloop feedback causcd an insignIficant mo... The same compari.5/. also nine times the closedloop root.on is that the noi~e applied 10 th~ large ma~~ blow Figure 11. . .
• There is potentially a full sample period delay between command input and the system response. had been faster... this is of lessor importance. sufficient computer spced is available so that one sampk rale based primarily on the fastest mode can be selected even though one or more of the slower modes will be sampled faster than necessary.g. (he ~y.eJ b: ~hlning more computer pOWt'f to the slow mode compared to the previou:. it may be useful for robustness purposes to sample considerably faster than 2w.13. it is prudent to select a sample rate • For a system with a resonance at w..l·tHlllguratioll. 11. > 20 is often judged desirable.hown in Flg.6 to be counterproductive. kl\\' loop. situation where the o\erall ~y:. a sampling multiple of is required. > 20 • For a system with a resonance at w.(t::rn performance v. scnsiti\e to the allo{:ation of computer power to the fCl. 8 bits). • In order to provide a "reasonably smooth" control response. In order to keep the degradation to be within 20Ck of a continuous controller. sampling multiples greater than 50 were shown in Fig.. The net re~Ldt W~1' that an equal ~ampJc rate on (he tv. a sampling multiple of • Tn summan. ampling multiple.. Slower anti aliasing filters reduce the effect of measurement noise. Tn order to limit the possible delay to be 1091: of the rise time. the further the breakpoint is below wj2. . 11. the better the measurement noise attenuation.6 for a double integrator plant.. that is. (vj(v/. Multirate sampling is not necessary in the majority of digital control systenK In the usual case. that is being damped or stabilized by the controller.. This degradation is shown by the bottom cun'e in Fig.. wI" is a complex design step that involves interactions with the sample rate and control system bandwidth. but more phase lag is introduced into the feedback and..c vcr. It shows that a sampling multiple of II.' multiple of is required for a breakpoint ratio of wl'/wh = 5 if the designer wishes to limit the discrete noise degradation to 20% over that from the continuous case.. 11.. If all rate ..u."t or . (Oh' the theoreticallower bound on the sample rate to bandwidth multiple is tv)("" > 25 Other considerations usually dictate that the sample rate be considerably faster than 2 times the closedloop bandwidth. pronoullced.. The rea~on for this is that the etleel of diqurban('c noi . 7 Summary • For a control system with a specified closedloop bandwidth. that is being damped or stabilized by the controller. even though it could be claimed that computer pO\ver is being wasted on some of the slower modes.. ditTered by a ratio of 8: I.. This is a better overall design because it avoids the complication of multi rate sampling. • When using a small word size microprocessor (e. full below ahollt 20.pectivc closedloop root. The resulting design is typically acceptable. which . This is a subjective issue and depends heavily on the specific application... The tradeoffs for a double integrator plant are depicted in Fig. In comparison to a continuous control system with the same equivalent splane roots. Generally.a loop~ \\'a~ he~t in ~pilc of th~ fact tbat the roots of the 1\\0 loop. • Selection of the prefilter breakpoint.'n 11 7 Summary 475 mode" produced 3.e considerably simpler than exact MR techniques. wjw" is required. we see that multirate sampling allows for the assignment (11' available comp~ter power to the control modes that can most bene/it.16 is pamaH) due to the fact that bo~ sampk rate~ wen: relatl\·dy slow.. thus improving system response. Faster antialiasing filters require faster sample rates.cIl"iti\'c (0 hoth ~ample rate'i and thu. nine' tillle':' their re. Had the .... lC"". sample rale is ba~i(ally a quadratic function.. ... auld b~ k'l" :. The design of multirate systems can usually be carried out using a successive loop closure method that employs analytical techmque'.. • Analog prefiIters or antialiasing filters are typically required to attenuate the effect of measurement noise at frequencies greater than wj2.. a samplini. with slower rates often acceptable.. a digital control system degrades as the sample rate decreases. the advantage \\'oukl hu\'t' been Ie..474 Chapla 11 Sample Rale 5eleui. \\'jth the error~ growing quickly a<. may necessitate extra lead in the controller. It is also convenient to maintain the prefilter breakpoint above the control system bandwidth: however. 11.teJll respons~ \\'as imp[()\. The si~nificant bentfit of the MR sampling .. • The primary purpose of many feedback control systems is to limit the response to random plant disturbances.ampk rate~ been fasle'f. if excessive.
1 = e"'dk) j [e"r . loop is 10Hz (T = 100 msec I and the slow sampling on the XI to Ii I loop is 2 Hz (T = 500 msec).\+0.1 ]\.8 Problems 11. and gain) that yields dominant poles at i.10 For your design in Problem 11.5 In Appendix A.15.3 Consider the satellite design problem of Appendix A. that is.) is 4 rad/sec and the damping ratio Ii.476 Chapler 11 Sample Rate SelectIon 118 Problems 477 • The perfonnance of a digital control system can sometimes be enhanced by using more than one sample rate for different loops in the system. this yields a difference equation.. What do yOli conclude concerning the applicability of these design techniques versus sample rate'? 11.I]II(h 11.8/w .7." = 0.Ir = K.. Determine the lead network Ipolc. 2. Design an MR sampling controller where the fast sampling rate on the x.11 in Chapter 9). 11.1"" = 500 msec.81 (e) Repeat steps lal to (d) for T = 0. dk + 1. and 2()() rad/sec and comment on the selection of T for disturban~e rejection In this case.1 m' and a disturbing noise in the form Df a force on the main mass M with R .5 ]\..3.1. 20. 11. The :transfonn does not apply directly to this case and a successive loop closure design method for such systems was described in Section 11.3. For a low volume product. 10 a step input command and.1. ~ l\e . for the first 5 sec and compare for the different sample rates.8 In the disk drive servo design (Prohlem 9. the labor cost to design the controller far outweighs the extra cost of a fast computer: therefore the logical choice of the sampling multiple is on the order of 40 or more so that the extra complexity of digital design methods is not required. 5 sec. u(k) T'I~ + II 2(c .OOI ~.2 Plot the resulting step response. llsing the case where only the attitude. Plot the error for w = 6. 11.selected to be twice the resonance (i') = 6 kHz in this case) so that the notch at the J\yquist rate Iw. is measured and used by an estimator to reconstruct the state for control.6 For each design in Problem 11. namely. 10.. Cd) Simulate the response of the system designed above 11.l2) coincides with the'resDnance in order to alleviate the destabilizing effect of the resonance. 11.4 Following the satellite design problem used for Example I 1. plane design techniques followed by the polezero mapping methods of Chapter 6 to ohlain a discrete equivalent.1.2 and 5 sec. _me /sec as was done for Example I 1. Assume II = I sec I..9 For the MI!\10 system shown in Fig.5. = I. 11. and T = 0.25 sec. Selel't compensation so that the resulting undamped natural frequency (w. Base all discrete control gains Dn cplane roots that are equivalent to ( = 0. rr 2:: 1. Now use an exact ~plane analysis of the resulting discrete systems and examine the resulting root locations. vary the \'alue of the damping coeflicient b in the plant. 1.. for two case~: (a) fast sample period ~'"'' = 50 msec. Plot the control and output time hislOrie... 40..7 and w" = 3 radisel' and estimator gains on ::planc. = 0. to Ii.roots equivalent to t.5 Hz with ( = 0. 7.4 and the slow poles at 0. = 0. where the unit hardware costs dominate.i5 sec . Under what conditions would this be a bad idea? 11. (a) Design an optimal discrete control for this system with qlladratic cost:r = . (b) Design an optimal discrete filter based on measurements of d with R.1'. xis) illS) II S  II Controlled discretely with a ZOH. .1 Find discrete compensation for a plant given by OX G(sl=.sec/m.2.s a plant eonsisting of two coupled masses. Qualitatively note the sensitivity of the design to this parameter. 11. Therefore.7 Consider a plant consisting of a diverging exponential. b = 2 secI and do the problem for T = 0.9. + u'. Section A. 2.7 and 6)/1 = 6 radl~ec. 0. let k = 10 !'s'/m.5 and O)n = 2 rad/sec for w. • The cost of a digital control system increases wilh sample rate due to the microprocessor cost and AID cost.3 Hz with!. I is 0. Plot the step response for the three sample rates and determine the rise lime. Assume M = 20 kg. the torque disturbance has a pDwer spectral density of R" o<J = I ]\.\(. increase the gain bv 200 and detemline the change in the system damping. Is there an upper limit on the sample period that will stabilize this system" Compute the percent error in K that will result in an unstable system for T . = O.. for an rms "alue of It' = 0. = and compute the gain K that yields a ~plane root at ~ = eh!. Compare these \'alues against that predicted by the relatIOn in Section 2. (aJ Design full state feedback controllers with bOlh roots at ~ = 0 for T and I sec. . Do you judge that the case when T = 5 sec is practical" Defend YDUr answer. k = 144 N/m. . evaluate the steady state nns noise response of xI and . errors versus sample rate due to plant disturbance noise. Do the design for tWD sample periods: 100 ms and 600 ms. and 4 Hz. Assume Ic) e. Ibi Plot the closedloop magnitude frequency response of H for the three sample rates and determine the closedloop bandwidth for each case.. . = 0. 80. we discus. h (c) Combine the control and estimation into a controller and plot its frequency response from d to II.rkl.2 The satellite attitudecontrol tramfer function (Appendix A) is Gllcl = . Assume proportional feedback. zero. " 11. Pick the fast poles at 1. . evaluate the rm. Repeat the design wilh Ihe same pole locatiDns.6.01.4. leaving the controller coefficients unchanged. picking the slowest sample rate that meets the requirements is the logical choice. and slow sample period 1'.0. for high volume product. 0. m = I kg.. the sample rate is often .. = 0.
The initial design of a control system typically considers a small signal analysis and is based on models that are linear and timeinvariant.478 Chapter I 1 Sample Rate SelectIOn (b) fast sample period T".". A Perspective on System Identification Tn order to design cOnIrols for a dynamic system it is necessary to have a model that will adequately describe the system's motion. Examples include the force on a moving airplane caused by a control surface mounted on a wing and the heat of combustion of a fossil fuel of uncertain composition. and many other constituents of systems to be controlled.. and evaluate the rms response in both cases. Tn science. The information available to the designer for this purpose is typically of two kinds. \ b) process noise and measurement noise wilh an rms '= 1. no measurement noise was included. 100 msec.6 Ithat is.!u" 250 msec. For design via root locus or pole assignment. In these circumstances.11 Replot the information in the lower curve in Fig. which sample rate should be = = increased"? 11. there is the knowledge of physics. However. biology. chemical reactions. electric circuits and motors. If extra computational capability existed. where should it be used') In other words. In identifying models for control. and (c) rneasuremem noj~\: with an nns = I and no process noise. we find that the required plant models may be grouped in two categories: parametric and nonparametric.) for three cases: (a) process noise and no measurement noise (the case already planed). no quantization nois. First. Having accepted that the model is to be linear.. and the other sciences which have over the years developed equations of motion to explain the dynamic response of rigid and flexible bodies. M assumes R. If we examine the design methods described in the earlier chapters. it is often the case that for extremely complex physical phenomena the laws of science are not adequate to give a satisfactory description of the dynamic plant that we wish to control. = I for purposes of computing the continuous estimator gains: however.. fluids. chemistry.e can obtain the poles and zeros of the 479 . Use exactly tbe same cantrol1er and estimator as the current plot. the designer turns to data taken from experiments directly conducted to excite the plant and measure its response. we still must choose between several alternative descriptions of linear systems. 11. System Identification  .__. our motivation is very different from that of modeling as practiced in the sciences.Ole that FIG 116. . The process of constructing models from experimental data is called system identification. in computing the rms respon~e. we require a parametric description such as a transfer function or a statevariable description from which v.   _. and slow sample period T. one seeks to develop models of nature as it is: in control one seeks to develop models of the plant dynamics that will be adequate for the design of a controller that will cause the actual dynamics to be stable and to give good performance.
Data taken by single sinusoidal signal inputs as well as data in response to a complex signal are considered. For transfer functions.1) is equivalent to a Kalman filter and t' is called the prediction error. for in that case Eq. the elements of the statedescription matnce. including the possibility of known pole locations for rigid body cases.) is a general polynomiaL then Eq. to prevent the algorithm from distorting the estimated model in a futile effort to explain this noise.et. require the curves of amplitude and pha. In Section 7 the method of maximum likelihood i. or other compensation to achieve a desired bandwidth. then l' is called the output error.)" = h(. Clearly. \'(k) and assumptions about the err~r. the plant transfer function may have a known number of poles at .ults. Also pre.(" of:: <..T) a nonparametric model because in principle there is no finite set of numbers that describes it exactly. In contrast to parametric models. " is the output.)11 is known that the imp011ant features of the transfer function are contained in a known frequency range and that data outside that range is only noise. + c(. I/(k). Chapter Overview In this chapter. (1:211 where a. we can compute the transfer function and the corresponding frequency response.0 that the identification needs only estimate the unknown part. without parameters (perhaps obtained from experimental data) we hal'e all we need to design a lead.ed. one proceeds as follows with the process of linearization and smallsignal approximations. in Section 8 the estimation of state description matrices based on subspace methods is described. If C(. In summary. recursive least squares in Section 5.: \ariabh: of th(: 3tran"foml.. identification i. It is shown that bias is encountered when the equation error is not a white noise process in each of the techniques. We begin with the assumption that our plant dynamics are .e of the transfer function G(e i'LT ) = YCjw)/U(jw) as functions of w.).1 Defining the Model Set for Linear Systems Formally. if c(.)II. or other frequency respon. It i" ~xr<:ctcd that the raft:' U:. 11 is the input."stem identification consist mainly of the records of input. then one possible measure is ( Cle f •·J ) . = I corresponding to rigid body motion. the use of computer aids is essential in identification.1 Defining the ~lodcl Set for Linear Srstems 481 parametric model nonparametric model plant. notch. for it is the error by which the data y and 1/ fail to satisfy the equation given by af. and l' is the error and assumed to be a random process independent of II.. However if we are given the frequency response or its inverse transfoml.<triable q a. Also typically it I Snm~ aurhoL" u~e the .e performance objective without ever knowing what the parameters are. Algorithms for batch least squares are given in Section 4.) = al. In either case we call these numbers the [laramell:n of the model. the frequencyresponse methods of Nyquist.e components in so far as possible without distorting impOJ1ant feature. It is important to filter the raw data to remOle the. in addition to these records there is usually very important infomlation about the physical plant that must be used to get the best re. The data used in ". one must define the error to be minimized bv the model estimate. In Section :1 the construction of nonparametric models is considered. the model . lag. Because of the large data records necessary to obtain effective models and the complexity of many of the algorithms w.thr. and output. if we assume the true value is C(~I"'T) and the model is given by C(ef.ec. In Section 3 techniques for identification of parametnc linear models based on equation error are introduced with the selection of parameters and definition of the error. the criterion by which one proposed model is to be compared with another and the process of validation by which the model is confirmed to mimic the plant on data not used to construct the model. If there are such known components. phase margin.1) becomes y = [b(.l~ all operator will not cause confus. the \hift operator tel avoid confusion with:. In addition to the selection of the type of model desired. (12. Bode.480 Chapter 12 System Iclentilicatil1r1 12. We call the functional curves of G(e. we consider several of the most common and effective approaches to identification of linear models. and l' is noise added to the output of the system.)\' = b(. and stochastic least squares in Section 6. and Nichol. the data can be filtered . b.s by which a model is constructed from prior knowledge plus experimental data and includes four basic components: the data. or the numbers that specify the poles and zeros. However.)/a(:)] 11 + l'.ented is the concept of including prior knowledge of the plant response. if we happen to have a parametric description of the system. In Section I we consider the development of linear models as used in identification. and c are polynomials in the shift operator I .J).)l'. For example. introduced as a method that can overcome the bias considering the prediction error. a parametric description of the plant model. For di. a:e. These equivalent models are completely described by the numbers that specify the coefficients of the polynomials. Finally.. Developments such as the MATL\B System Identification Toolbox are enonnOlls aids to the practical use of the techniques described in this chapter. the proce.Q(eJ'''T) )'dw. (12. The important conclusion is that all a priori infomlation be used fully to get the best results from the computations.ion here 12.I = 1 then l' is called the equation error. Clearly other measures are also possible and can be ~onsidered. Finally.cretetime parametric models a standard form as'>umes that the output is generated by the discrete equation a(. and the category of such models i. the impuhe response.. If c(.
n. (12. (12.x (all aX I ii I l) . (12.(xo' u. with respect to the vector x by a subscript notation = i](x. (12. U o + ou).. it is tedious but simple to verify that Eq. more compactly in matrix notation.4) about Xu and u" and to suggest that only the terms in the first power of the small quantities ox and ou need to be retained.7). In the subscript notation.8) '\I/ = in {.3.>mall signals can be reflected by taking x and u to bc always close to their reference values x(l' uu' and these values. we note that by Eq. furthermore.lI j • • • • • ll m .14) . = l. The fact that ox and ou are small is now used to motivate an expansion of Eq. if x and u are close to xI) and u o_ they can be written as x = xr . and these can be substituted into Eq. fl. X.482 Chapter 12 System Identificatil1n 12.8) is called the gradient of the scalar I j with respect to the vector x. (12.8x + h u8u.. (12.. we use the bold vector as the sub'>cript yr=h r (X. =h l (x. + luCk).10) The assumption of . to be a solution ofEq.1/) We will go even further in this chapter and restrict ourselves to the case of single input and single output and discrete time. ( 12. Now. where we define the partial derivative of a scalar f.61 df If we go back to Eq..Thus we can set x= or.. as (12.4).21 iJi.+) oy ox "".13) and the unit pulse response is k = I. X n .. ' j.t] X"' U I' . iJx or. iiI. f. u. (1231 Y = h(x. if we mean to take the partial of all components.. u. .. fo) Now. (12.9) x= f(x. (12. ". simply.12) from which the transfer function is (12. iix The assumption of stationarity is here reflected by the approximation that f and h do not change significantly from their initial values at fo.5) we chose x ' u(J to be a O solution so the first terms ofEq. and.. •.6 ) can be written as (1271 y = Hx+Ju. = iJx ( 12.51 Now the notation is overly clumsy and we drop the oparts and define the constant matrices F = f. (12.1 Defining the Model Set for Linear Systems 483 adequately described by a set of ordinary differential equations in statevariable form as discussed in Section 4. we define its partial derivatives with respect to the vector x as the matrix (called the Jacobean) composed of lVII'S of gradients. we ar~ led to the approximation x= f(x.. because the terms bevond those shown depend on higher powcrs of the small signals ox and ou.• X"..(x{}' Un) G=fu(xo'uo ) J = hu(x()' U ll ) to obtain the form we have used in earlier chapters x=Fx+Gu.2) and do the expansion of the components f. We write the model as x(k + I) = ~x(k) . (12. ~ ox: u = U o + ou. u.7) balance. ax" (12. X n ·II I ·····lI. (12. Lim' t).. (12.. .)8x +fu(x".II] •. u). u).II.6 X. u o)8u = h. f. one at a time.t). . The row vector in Eq. = l(x] X". (12.v(k) = Hx(k) + rulk).·f).. y = h(x. (12. If f is a vector. \ve assume that our plant dynamics are described by iJi.exwuo)' H = h. We thus have a vector equation and need the expansion of a vectorvalued function of a vector variable d (xo + 8x) = f(x u + ox.• lI m . (12. to return to Eq.f).. lI m . f).4). f(x.
including Ljung (1987). we can c'ompute the '~'alues B and <P" as ot' B = V/(B.17) but with unknown amplitude and phase.. constant. a reasonable computational approach is to find that amplitude B and phase <P" which best fit the given data. so as to make . The situation to be considered is described by the transfonn equations Y(~) + <Po) = C(~)U(.. and the extent to which system transients have been allowed to decay before the recordings are started. and multivariable theory is covered in a number of advanced texts devoted 10 identification. N "\'2(Y'(kT) .~ + Bi)· <Po = arctan B: . onefrequencyatatime Given the situation described by Eq. sin(wokT). The first of these can be described as the onefrequencyatatime method and the other as the spectral estimate method. and we wish to find the amplitude B and the phase r/Jw from which one point on the frequency response can be computed according to Eq. ... for obtaining a nonparametric estimate of G(eJ'"T). and B.B( cos(wokT) .19) (12. the fast Fourier transform (FFT).1kT)) =0. where BIA = IC(e i . ( 12. the relative intensity of the noise.171 .B"sin(w"kT))'.18). Furthermore. (12. The accuracy of the estimate at anyone point is a function of the number of point'> taken. In each case we will require the computation of Fourier transforms using finite records of data: and for this the discrete Fourier transfonn (OFT) described in Chapter 4 is used. (12. identification.15) = B.L . in the steady state. In this equation.7)! (12. we set the derivative of. there are two basic scheme. = (I)" + 8(.=() .:) + H(~)W(~).v(kT))' . Keep in mind that y(kT) is the measured output and . If the noise is zero and the input u(k) is a sinusoid of amplitude A and frequency W. The presence of nonlinearity leads 10 the concept of the "describing function. cos(wokT) . Models based on such frequencyresponse data can then be used effectively in control system design using. and B.161 To find the best fit of. stable models. .J I . k=O "\'("(kT) .15). (12. cos(w"k T) + B.L.) and repeat until the entire range of frequencies of interest is covered with the desired resolution.16).v to the data. . we form the quadratic cost in the error between rand . Recognizing that the experimental data might reflect some nonlinear effects and contain some noise component. The frequency response of this system.J as small as possible. c h. N "\'(Y(kT) . We will describe these in tum. for example. We define the estimate of the output as .J with respect to B. To do this.11\1 l ' 1 = ..v(kT) = B sin(wokT 12.B . and W is the unmeasured noise (which might or might not be random). Y is the plant output.B k=(l <Po = L G(eJw. (12.2 Identification of Nonparametric Models One of the important reasons that design by frequencyresponse methods is '0 widelv used is that it is so often feasible to obtain the frequency response from experimental data. first fJ. B (12." a topic that will be considered in Chapter 13. where B = B sin(<p ) and B = B COS(<Po)' Once \ve have computed B. as wa.\1 aB = .y(kT) = B sin(wukT + r/Jo)' (12. especially in ib computationally optimized fonn. as and the output samples.J = 1  'I NL. and B. is the evaluation of C(~) for ~ on the unit circle. U is the known plant control input. Here we will introduce and illustrate experimental measurement of the frequency response in the case oflinear. (12.2 Identification of Nonparametric Models 485 The System Identification Toolbox includes the multivariable case. We \vish to compute B.15) and that the input is a sinusoid of the fonn ofEq. C is thus the plant transfer function and H is the unknown but stable transfer function from the noise to the system output. including the possibility of unmeasured noise inputs to the system. discussed in Chapter 2. Consider B.484 Chapter 12 System Identificatlon 12..e then u(k) is given by l/(kT) = A sin(wokT). The input and the output are recorded for N samples.'·(k T) is the computed estimate of the output. sin(wokT))(cos(w. We will describe the calculations in an ideal cnvironment and discuss briefly the consequences of other situations. reliable experimental estimates of the frequency response can be obtained when noise is present and when the system is weakly nonlinear. Consider an output of the form of Eq. equal to zero. We then increment the frequency to (V. can be described by .l). The Method of One Frequency at a Time We assume that we have a system as described in Eq. the methods of Bode.
into the left side ofEq.. Consider the following identity (which also played an important role in the development of the OFf in Chapter I) = Ly(kTi[COs(2]r/w/N) . the DFT of the sinusoidal input of the same frequency is given by DFTllllkTiI = . (12. ( 12.\'1 (=() I _I I = zs " 11 11 = t _ 1 • N(l .. with the use of the FFf.. . we find that 4'1 = ~ L[e):.~ ) "I' t Tfwe select integers £ and N and let ~ = e J2H then I corresponding to w = 2rrtjN.19) gives us the formulas for the gain and phase that which is the result found in Section 4.5. the result is very accurate and."'~':\' .\ N I~" .VI to be w" = 2iTij NT. e (2"7ik.22) and Eq. (12.rtkjN) N I~O DFT\ld = DFT\r) .vA/2) O. using the OFT or the FFf on r(kT) and lI(kT) just for one point on the transfer function is unnecessarilv complicated."~.. In fact.25) B . It is possible to take ad\'antage of Eq.rikj N) ~ j sin(2rr tkj HI.21 LA sin(2:Ttk/Nle)2I' \ i.f N 1=(1 B. if we assume that y(k Ti is a sinusoid of frequency uJ.20) reduces to I . They will be eX{lcth zero if we select the test frequencies carefully. =. the ratio of the OFf of Y to that of II is I .rkn/N)] k=() . L N "} N1 v(kT)cos(htk/N).5.r tk j N) = {1£=rN 0 elsewhere = t. we would expect the last two terms in Eq.18). To illustrate this technique.23) give us formulas for computing the values of B" and B. but because the OFT automatically computes the best fit of a sinu'soid to the output in the leastsquares seme.vI " 1 .=11 '\' 1 Generally. (12. The transfer function from which the output was m"a.'. it is fast. for this choice of input frequency. Thus.{ 1 _ ej:?'cn. Equation (12.25) Lo evaluate the tran.=') .24) 1"1 N h" and also L cos(2. "=N L v(kT) sin(2iTtk/N). \1 sin(2w"kT) = O.fcr function at several frequencies at once by u. we will use an input known as a chi/po which is a modulated sinusoidal function with a frequency that grows from an initial value .486 Chapter 12 System ldentificanon 12. and Eq. for II elsewhere. (12.7II~ 2j ~=(\ SA. A = IG1e iQ. e}2~1(' = cos(2.'s I.23) Thus Eq. L=rN .221 I=r)' In similar fashion.ing an input that is nonzero over a band of frequencies and computing the ratio of output to input at each nonzero value.21) and equate real and imaginary parts.e/2. (12. (12.20) to be small becathe the sinusoids alternate in sign and have zero average value.e .L~ N .22) is clos"ly relat"d to the OFT of Y derived in S"'etion 1. one can show that B = .71~. B.VI . +.\ \1 j If we substitute Euler's formula.j sin(2. (\ 2. and collect terms of the sum.:. then 112.r t/ NT and consider the OFT of Y '\' 1 L DFT/\'(kT)] = LY(kTie'27'" .LY(kTlcos(wokTl.201 B\I describe the output data Y(k Ti. If we now select ourtest frequencies Eq. (II = tl I' ~J = O.'VleI~. for integer t. this expression is equivalent to 1'1 B .{ 0 elsewhere (12. Of Course.L.iB.. (12. = 2.ured is then given by Eq. Likewise. I~O .2 Idenldk'1110n of :\onparametlic \!"ckb 487 If we use elementary trigonometric identities for the product of sine and cosine.Lsin(2. 2N (~"  ~ Lcos(2wokT) _N k~" (12. (12. (12.
An example of a chirp is gi\\'n by the formulas I/lkT) = Ao+/dk)sinlw. t 12. 12.75 rad.~. This observation is a particular case of an extremely important principle in system identification: Use all al'ailable prior knowledge to reduce the uncertainty in the estimate. nonnegliglhk energy owr the wider range between 0.75.m.2'. u:tk) = A.5 to design a chirp signal that would provide energy in that range only. Tw". = 0.es the input to start at zero. (c) the transfer function and its magnitude estimate... ramp up to amplitude A. after which the estimate de\.in~ Eq.e is plotted a. ~~  . Kutice that the actual spectrum is vcry flat between n. badly from the true magnitude and phase cunes.. data are plotted in Fig.I ::: w T ::: 1. • Data Conditioning As illustrated by Example 12.I for arguments less than I and at +.5 rad. computed l"ing fft.\ + 11 with T = 0. a solid line and the cxperimenlal tran..IN).. (12. where one knows that the transfer function has two poles at the origin in the splane and thus two poles at : = 1 in the :plane.imum amplillide 1.j. . the estimatc i:. because zeros at infinity in the splane do not map to any fixed point in the ~plane. II' (k I is a weighting or window function that cau.h The l"On~tanl AI' wa"ll'omputed as the negative of the an:rage of the basic signal. robot mechanisms or space structures. 10. added to make the input have zero average value.!. Figure 12.. <It .5. x'.ll~ to conclude that one s.1.. a very accurate measure for frequencies lip to 1.1.1 and 1.1 Estimation of transfer function using a chirp signal: (a) the chirp.I Chi'p Stei''''! 300 10" (d) .:.". when part of the tramfer function is already known. in almost all cases. where the input has little . = n. O:::k:::N1.. As can be .aill:: UTrull. a signal can be constructed to have energy only in a certain band. U'e 256 points. 1 10° wT(rad) 10 ' 'oT Plot a chirp ofma.I for arguments greater than + I. Solution.energy and lead:.':'JC'_~ 0 (a) . we ".ulb are ploned in Fig. . The true frequency respon. of the transfer function at : = I 10 correspond to these.1 . using ~L\TL\H The transform IVa. = 0.25 ) unle~':> the input ha~ ':>ignifil'ant energ)' at the computed frequency. The constant A" i. and ramp down to zero at the end. and with its use the transfer function can be accurately estimated in this band. which is linear from I to + I and saturate. however. (d) the true and estimated phase lOl ~ lOa lO·1 10. ia(~.' 103 10.8. which was developed by Clary (1984 J. k (0).kJ/O. .75 rad " the re~ult of the fact that the chirp i~ rcnlly a frequency modulated signal and muny sidC'halh:i" are pre~ent.m + N{(UcI1J W qart ' · (12..1 rad and ending frequcnc'\ = 0. \Ve may also know how fast the transfer function goes to zero for high frequencies and from this knowledge assign zero.2 Ccllll!'.hould not trust the res.ere able to use the fact that the importam features of the unknown transfer function are in the digital frequency range (J. The re. The results of the application of Eq. = Ct).1.CL"l.t. It • Example 12.] and 1. qaning frequency IJJ T = 0.fer function estimate is plotted a. This assumption is not exact. From Eq. (12. 2 (c) "1 1 L 'LLL''':l. pans III I and I h. 12. tI2. In the case of Example 12. fW1C11(111 Apply the chirp signal of Example 12. to· 1 lOG 10 wT(rad) ' :::! to" 1O~'':'2:'~''"":lO~''~~""''10:':O~~''''''tOI Ib) wT(rad) 0 ''""'\' " 100 ·200 • Example 12.2 Identtficallon of I\onparamctnc \1c)clels 489 to a tinal value so as to cover the desired range. This is common in the control of mechanical devices..ult pt Eq.1 panl Ie I and Id).2(] I In this expression.488 Chapter 12 S>'stem Identification 12. (b) the chirp's spectrum.1. I to thi. T w"".INJsat(tN . on the same graphs.kT).l:. such a. The "'saC is the saturation function. This deviation coincides with the frequenclc.25.0 rad and ha.1 to a \v\tem obtained as the zero order hold equivalent of ]/(\..0. sllt(k/O. The energy above Lv. Compute the estimate of the transfer function ".een. Another situation.26) we haw A = 1. fft Solution. Also plot the magnltude of the transform ofthc Signal.rad. they result in :plane zeros that are often well outside the unit circle so that they have almost no influence on the frequency response over the imponant band and are very difficult to idemify accurately. occur. and N = 2'.0.25).
Such noise is almost always present in experimental data and typically includes both noise from physical sources and noise that can be attributed to the quantization of ND conversion. (.) and model the known zeros as the roots of b..3 L'sl11g hllO\\l1 COIHI'OI1CIl[S '~k'· .' 10.u~tc~ 10.J' • • 10 1 ~.98.U. we observe that the identificalion of G(:) is the same as the identification of F(.. Clearlv the estimates.~".271 10" L_~WL.1.•.1 10° wTCrad) 10' Consider the system formed by multiplYing the plant of Example 12. identifv this transfer function from its input and output. Fy = GFIi + FL'. . The equations that illustrate this effect are y=GII+v. furthermore. . Identify the corresponding discrete system by Clary's method..1 100 101 (e) wT(rad) In blockdiagram form_ the situation can be arranged as shown in Fig.3 Transfer function estimates for a fourthorder system without filtering (a) and (b) and with filtering of the data. Ho:ever.I' '!!. 12.I and used to reduce the uncertaintv in the discrete transferfunction estimation. if II is filtered bY'(] +. .490 Chapler 12 Syslem IdennfIcalion 12.s according to Eq. Afterward. Although this has no influence on the relation between tI and Y. the resulls are shown in Fig..~ wT(rad) 10.')' and " is filtered by (I .2 by 1/5'. 12.) can be reconstructed from Eq.w. (12. are wry poor in both magnitLl(k and phase. 2 10. (12. Now an excellent estimate of the transfer function results. ( 12..(~) Gl(~)' (12..) G(~) F(~) I because the filter transfer function F cancels. suppose that we filter both /I and " through F. and ~ = 0. = .i. = 0. and ". (c) and (d) Identification of t\onparamemc \lode!s 491 Clary's method is for this reason that known splane zeros at infinity can be assigned to .n I.2 Figure 12.. 12. the estimated freqllenL) _.. Solution.1 IlJ<l (b) The resulting fourthorder discrete system has two poles at : = I and leros at = 9. ~. _the overall transfer function G(. once the simpler unknown G . suppose we model the known poles as the roots of the polynomial {/. + :~ Example 12. it can suppress the noise significantly.1 l'. we have succeeded in replacing the noise input v with the filtered noise Fl' while keeping the same relation between the signal input and the .2 is used to responses are multiplied by the known frequency response. . that significant sensor noise appears in the plant output outside this range.. To illustrate Clary's proced~re.'1"1 and 1bJ. I. In this case._  + Figure 12._.271 and the total frequency response is plotted in Fig.=:"~'1101 10.. However.2 Block diagram of identification of a partially known transfer y function Our final example of the use of prior infonllation in identification occurs when it is known what the important frequency range is and.28) y! = Gtl r + Fl'. " 102 ~ to b. If the same ehirp signal used in Example 12. (.(~) 10 4 t E '._.r's on the plots.1(el and (dl. 111 this case. Therefore. Then the overall transfer function can be factored into known and unknown parh in the form G(.5.) = (/. thcll the transfer function G. can bc estimated from these signals. (~) is estimated from the filtered data /I. shown bv .2.'. ~ '5()()1:.
29) on both side's by u(n ....k) is the autocorrelation of the If process..k) (12. The engineer must use ~ The MATL. If this is not available.I. and we will indicate only some of the important results relevant to the identification problem here... (12. The resulting estimate is a complicated function of the exact number of points used.. where we might take L = N IlL for example. it is clear. to the estimation of the spectra 5. when we come to parametric estimation. (12.. in identification..Ii ) = Nil.(t) = N L 11=0 I Y r(ll)lI(n n. another window is normally introduced that has better spectral smoothing properties. or 6. and a shorter window would have a wider spectral lobe and consequently more averaging of the spectrum in computing the estimate by Eq.4. To illustrate some of the properties of windows. we must consider that the data are finite.. Suppose we describe the plant dynamics with the convolution 1'(n) = In order to use Eq. and the rectangular window obtained by simply truncating the series is particularly poor for this purpose.\B funclion xcorr computes R 1 :. It should be recalled that convolution of a function with an impulse returns exactly the same function. ( 12. Suppose we have N points of input and . (12. A longer window would have a more narrow pass band.y· ' L 1'(11)11(111'). the effect of the lowpass filter can be achIeved simply by ignoring the estimates outside the desired range. (t) in Eq. as frequently occurs.k )u(n .. is the ~transform of R. ({ I. Clearly.t). as f gets near to N. (12. and 5"" from th~'data re~'~rds of y(k) and lI(k). If we multiply Eq. Then we can write R. 12.. In the first place. Most commonly.t. the number to be used is determined by experience and experimentation. 12. and we normally stop the sum for 1£1 > L /2.(t) and S".£) and take expected values. However.32) with experimental data.33) is N . that and thus that G()'jf(1 ' 5.):) .492 Chapter 12 System Identification 122 Identlfication of 'oJonparamelric ~\'lodds 493 output as before. This topic. The transform reflection of such a product is to convolve the true spectrum (transform) with the transfonn of the window.. is covered by a vast literature going back to the 1930's at least.. R. (12. the ~transform of R".. 12. equivalently. Convolution with a bandpass filter of finite width has the effect of averaging the function over the width of the pass band. by a window of finite duration. In the. If we take the ~transtoml of Eq. a Hamming window of length 64 and its magnitude spectrum are plotted in Fig. our estimation of the correlation functions depends upon the ergodic assumption that the stochastic expectations can be computed as time averages according to ' R (/)= lim . LUll (='X ( 12. We conclude that the estimate of R from Eq. and typically.5 (:).. (~). (12. . Rather. called the crosspower spectrum between the v and the u processes."( 12.. such as the Hamming or the Kaiser window. . The number of data values used to compose R. as could be seen trom Fig.33) can be expected to be very poor for II' i near N. because this is a convolution.301 where R.(:).33)./I (£) = " g(k)R (f . With these equations.k). If the noise includes significant energy at frequencies that are not important to the signal response. Another feature of Eq. spectral estimation.30). g(k)u(n . for any given f. Fig.25'7< of the Nyquist frequency. the use of such filters will be found to be essential.32) Stochastic Spectral Estimation The deterministic methods just described require a high signaltonoise ratio in the important band of the transfer function to be estimated.33) is the fact that in raking a finite number of points in the sum. it is as if we had multiplied the result.\If I :Vv"__ 2/\/ +1 Ii=. The necessary equations are easily derived from the results on stochastK processes given in Appendix D. IS called the power spectrum of the il process.V points of output data.:=. where it is understood that y(k) and lI(k) are zero outside the range 0:'2 k :'2 N .1.33) L '" f. the estimation of the transfer function G(~) has been converted to the estimation of the correlation functions R . then F can be shaped to remove these components and greatly improve the transferfunction estimates.4 shows that the Hamming window of length 64 has a spectrum with a main lobe of width about 8/128. and R or.(t).£) = £ L k=~ " g(k)u(n .. (12. F is a lowpass filter such as a Butterworth characteristic with a cutoff frequenc~ just above the range of important frequencies for the plant model. this number gets small and very little averaging is involved.cess and R (I' . ( 12. an alternative based on averaging or statistical estimation is available. case of nonparametric estimation. we obtain £y(n )u(n .3 1\ where 5".29) and assume that u and therefore v are zero mean stochastic processes."l t) is the crosscorrelation between the I' process and the If pro.
) = + As can be seen from parts (a) and (b) of Fig. the input to the system had a rootmean· squar~ value of one. and (bi spectrum Hamming Window o tal W 40 ffi W 100 with no noise and for the system with output noise.5. especially at the higher frequencies. for which a long window' is wanted.2 and estimate the transfer function using Eq. (12. judgement to select a window function length that will balance noise reduction. derived as 5. and the output had a noise added whose rootmeansquare value '"'' 0. (\2.4 Stochastic Estimate c1 a Trans(o flll!U10n Apply a random input signal to th~ secondorder system of Example 12. Solution. As the window is shortened.)t). However. :' L:' w(I')R.5.494 Chapter 12 System IdentIfication Figure 12. Repeat. This is particularly important for adaptive control where the design must be implemented online and either the plant parameters .311 with the estimates according to Eq. serioU' consideration would be given to using a shorter window. computed according to Eq. against average spectrum accuracy. The resulting transfer function. 12. L t=L ... with 20'k random noise added to the outpU1. the details of the resonant peak.(. (c) and (d) 20% noise 120 140 123 \1l1dds and Criteria [Dr Parametric Identihcanon 495 Figure 12. as seen in parts (c) and (d). as discussed. 12. a practical formula for spectrum estimation i. and the autocorrelation and the crosscorrelation were computed for all 512 poims for the output with no noise and for the output with 20'7< noise.4 Hamming window (a) weighting function. The engineer's judgement and knowledge of the system under investigation must be used to balance the random fJuctuations against the systematic errors.34).5 Estimation of transfer function with random input uSing spectral estimation: (a) and (b) no noise. for 'Nhich a short window is wanted. From these considerations.3 Models and Criteria for Parametric Identification Because several design techniques including design by root locus and design by pole placement require a parametric model. perhaps as short as 100 or even less. That is. A Hamming window of width 256 was used and the spectra computed for the system 12. The system was excited with a 256point random input of zero mean. however. the estimate when there is no noise is excellent. In a real situation. (12. with the noise.31) are plotted in Fig. it is important to understand hO\\ such models can be constructed.'.311 + Example 12.2. wi II be smeared out. (12. there is serious deviation of the estimate from the true transfer function.
496 Chapter 12 System IdennfJcallon 123 \Iodds and Cmma f. and 17.~ will ha\"t mOTi. to say aboUl thb after the dt'menl of Tandomne~. h)! . A block diagram of the ARMA realization of G(:) is shown in Fig. The standard.37 J: we should select these in a way that makes our task as easy as possible.'r ParamClrlc IdcmifiLatilln 497 or the controller parameters are to be estimated. where six were enough in Eg. r. is to compute from these [u(k)] and ly(k II an estimate II that is a "good" approximation to 1:1'.361 We imagine that we observe a set of input sample values [u(kl] and a set of corresponding output sample values Iy(k)]. we would have the same transfer function G(:).timati011 y of 11 \\ ill b~ l AR~·IA. Clmll>. it i. (12.38).. r. that the statevariable description has~ nine parameters that are in some sense redundant and can be chosen rather arbitrarily. in observer canonical form we would have ([I <II = [ II. ( 12. To repeat the formulations from a different point of view. For example. H are in ::. For the thirdorder modeL there are nine clements in $ and three elements each in rand H. )u(k). ( 12. and the equivalence of e. But now let us repeal. even obvious. generated b~ white noi~t' tilteft"d through the transfer funltiol1 Gl::) of E4. an 3cronym for AutoRt'f.:2 + b. le~gths. ( I ~. Our task. the parametric identification problem.'T(''' . we have already seen in Chapter + that the definition of the state is not unique and that if we were to change the state in Eg. We can select the coefficients of these polynomials as the parameters. cOTl".. so. (12. 0 1 0. Although the physical nature of the problem can be best described and understood in tenns of these numbers.. This means. spring constants.361 and the fifteenelement 1:1] in Eq. suppose we have a transfer function that is the ratio of two polynomials in :. For the thirdorder case G(:. ( P _.35) for some "true" value of the parameters. and that these come from a plant that can be described by the transfer function Eg. (12. accordance with one of the canonical fonns of Chapler 2 for transfer functions." j" introdll("~d.rr \. to 1:1 is obvious. thaI best serve our purpose of control. Any set of u (k) and y(k) generated bv one can be generated bv the other. as far as control of y based on input II. To fonnulate a problem for parametric identification.is concerned~there is no' difference between 1:1 and 1:1] even though they have ver\. ' .37). In fact. I 0] H=[I () 0]. from 'iIud} (}f ranuol1l PW('('""t:.351 for an equivalent description. necessary to select the parameters that are to be estimated and a criterion by which they are to be evaluated. then we say they are eqllimlent parameters." +iI]:+(I. Then we have x(k and we see immediately that these matrices are just functions of the I) of Eq. ._)1 r and the parameter vector II is taken as II = Iii] (1. H. and so on. (12. the comments made earlier about the difference between identification for control and modelling for science.. Elementarv calculations left to the reader will show that the transfer function of this block Figure 12. 12. for a total of fifteen parameters in Eg..37 ) describe the same transfer function. 0 0 h. way to do this is to define our state so thaI $.37) by the substitution ~ = Tx. in digital signal processing.:+(I. ( 12. ( 12. and it is vvith these that we will be concerned here. we :lssum. b. For the ml)menl.\·(k) $(1:1] )x(k) + nl:l. :.6 Block diagram of the ARMA realization of G(z) + I) = .. different elements.idered later . (12.6. We assume J = O. it is appropriate at this point to m~roduce another fonn called.0. (12. (j2.1 Parameter Selection For example. E<.38) 12. it is the (I. he ~I(l\"ing A\:rage.ti) = .3. 1:1". of course.36).371 = HlI:I] )x(k).l:'i l_ \\. suppose we postulate a (discrete) statevariable description of the plant and take the parameters tn be the elements of the matrices $. the ARMA" model: thiS model has one feature especially appropriate for identification.: th. If the sixelement 1:1 in Eq. coeffiCIents ot fnctlon.: + b. ( 12. It is exactly the nine elements of T which represent the excess parameters in Eq. In takinil the canonical form represented by Eg. b. in this context.:e know the numher of stale" required to dcscrib~ thl: plant. Before leaving the matter of canonical forms. we have almost surclv scrambled into the a i and bi a jumble ofthe phYSical parameters of masses..
1(6) = j!eT(t.. We assume.Y(k . \\ hil.. and so we will have 6 = 6 .3) +b1u(k  I) + b.3 Models and Cntena for Paramerric Identification 499 parameters of the ARMA model diagram is given by Eq.498 Chapter 12 System IdentIficallOn 12. for example. I} is unknown. u: 6).a.35). 6)e(t. b. then only one parameter set will make eft. (\ 2. We must define the error in a way that can be computed from ruCk)] and [Y(k)]. the system described h:Eq.2) v(1: .2) Three definitions that have been proposed and studied extensively are equation error."IA model. by a statevariable description.' The assumption that we hm'e enough sensors to measure the total state and all state derivatives is a strong assumption and often not realistic in continuous model identification. we now tum to the techniques for selecting the particular estimate. at which time we will have a parameter set 6 that is an estimate of 6 .:tion and thus to be "nonminimal:' In fact. that we know the form of the vector functions f but not the particular parameters 6' that describe the plant. o (12.40) In other words. we have the state also. All the action. the 4l matrix can be shown to haw three poles at: = () that are /lot ohsen'llble for any values of (1.1 will be minimized at that point. by the very nature of the problem. The state equations are more interesting.t represents the given data. 0 0 () () 0 1 () 0 0 a]: 0 0 0 0 I 0 0 () 0 () ~. it is unrealistic to define a direct parameter error between 6 and 6 . that we are able to measure not only the controls u but also the state x and the state derivative We thus know everything about the equations but the particular paramctcr values. as it were. o 0 0 () 1 ] r~m .G. 6. and search over 6 until we find 6 such that .3) lI(k u(k .' We write x. we find six states and the matrices Her~ ~~ lf H = [ a l x(k) = [y{k  ~a. The reason for this is not hard to find: In an ARMA model the state is no more than recent values of 5 ~·lethod~ to ~earch for the minimizing 9are the ~ubj":'Cl of nonlinear programming. We will use the ARMA model in som~ of our later fOffimlations for identification. that be. (12. A model whose parameters are uniquely determined by the observed data is highly desirable: a model that will make subsequent control design simple is also often selected. If noise is present in the equations of motion. The idea is that we would form some nonnegative function of the error such as = a 1 Y(k . \ .1 b l b. and that is the case of an AR.u(k  3). since it is merely a listing of six members of the set.2 Error Definition Having selected the class of models described by our assumed plant description. The vector eft: 6) is defined as the equation error. second. suppose we have a nonlinear continuous time description with parameter vector 6.\·(k)].f(x". Equation Error For the equation error.:h i~ di~l. 6ldt.3. ilh maximum likditlOod . takes place in the output equation. 6') = O. .. and we assume that there is a vector of true parameters 6 such that e(t: 6) = O. first. it we have the set of lurk)] and [.'u""ed in \I.. We can.I) . therefore. \\'e give a brief discussion later in this chapter connected estImates. (!2Yh From the point of view of stalespace analysis.2) . To be just a bit general for the moment. Thus we conclude that within the class of discrete parametric models we wish to select a model that has the fewest number of parameters and yet will be equivalent to the assumed plant description. a. which is y(k) = Hx(k) equation error We assume. I) lI{k . then the error will not be zero at 6 = 6'. However.: 6) = eft: 6). ]. form an error comprised of the extent to which these equations of motion fail to be true for a specific value of 6 when used with the specific actual data x"' x"' and u. we need complete equations of motion as given. the system does have one remarkable property: The state is given by I) y(k . and prediction error. Because.42) 12. but . ( 12.41 I There is no need to carry any other equation along because the state equations an: trivially related to this output equation.1(6) is a minimum. which we can write as a. (l2.39) is seen to have six states to describe a thirdorder transfer fun.3)[' x= f(x. u.y(k .II(1:  2) + b. the state is exactly given by the past inputs and outputs so that. For this we require some idea of goodness of fit of a proposed value of 6 to the true 6' . b l b. output error. or b" However. Luenberger (1973). If we had an exact set of equations and selected a unique parameterization. in discrete linear models there is one case where it is immediate.
48) The performance measure Eq. from Eq.42) becomes J(9) = L e. ).h. 0 I 0 a 0 0 0 0 0 J h. k dk J  la. When we add random effects into our datacollection scheme.andinEq.2) .h.(k .(k) + 0.39).. a..(k: 9).(k) + a.. of 9 in the same way that the actual output .3).(k) . 'o(k) .b.b. (12. (12.45)andEq. Prediction Error The third approach to developing an error signal by which a parameter search can be structured is the prediction error.a. In order to avoid these assumption.(kl .(k: 9). let us write the linear. and the output error formulation uses past values of the model output.lI. Y". xo(k) = e l (k: 9) + Ii. for any 9 (which is to say. u)k  2) + bou. 0 0 0 b. (12.I) When we make the substitution from Eq.3) = Y. ) the elements of equation error are all ~(I!i except e I' and this element of error is given by x.Y".. Y".46) an error results because 9 differs from 9 .(kJ J.Y.~(k: 9) k=(J (12. (/. Instead of working with a simple model.x. v)k  I) + a..45) we see that the equation error formulation has past values of the actual output. Y". (12. In the scalar output case the output error eo will be a scalar and we can form the criterion function J(ll) = f..(k t. which is where II> and r are functions of the parameters 9. and b. the ARMA model +.I) .b.b.i l J o u(k) = Here we see that no attempt is made to measure the entire state of the plant.. lI)k . I 0 0 0 0 a.7 Block diagram shOWing the formulation of output error \lodels and Cntena for Parametric Identihcmion 501 input and output I To be explicit about it.(k + I) xo(k + I) xJk + I) XI (•.(k  3) and then the output error e.I) .(k: 9) =\'. as we are about to do.({..(k  2) +a J Y".2) +(/. therefore.500 Chapter 12 System Identification 12 3 Figure 12. 6 0 0 l 0 0 I 0 0 1 x.3) .b2 //)k .(k .40) we find that. This error is formulated in Fig.uatk .Y.461 Again. Now let us substitute the value.u. which is a function.dJ s (12. (12.(k .. with output Y". but we are not well situated to study the mailer at this point. for any values of II. (12.2) . we are led to consider an output Output Error As we have seen. b. but rather the estimated parameter 9 is used in a model to produce the model output v (k). 12..y)k . (12.(k .lk .I) .(kl+o. li~j .. Presumably the equation error is in some way beller because it takes more knowledge into account. When we discussed observers in Chapter 8 we made the point that a simple model is not a good basis for an observer because the equations of motion of the errors cannot be controlled.48) with Eq. x.47) o 1'6(kl and search for that 9 which makes J(9) as small as possible. consider again the ARMA model for which we have Y". (k).~"a function of the true parameter value O· .3) = e. discrete modd equation error.I) lI]x l (k)+a.(k) = a.].(k output error L e. .(k . "m(k . . (12. If we compare Eq. + /i.(k  I) + a.(k) or r.4~1 hi lI)k .(k+l) ..2) . a criterion based on output error can be used. much the same complaint can be raised about the generation of output errors. (12.(k) b. the general case of equation error requires measurement "f all elements of state and state derivatives.. To illustrate the difference between output error and equation error in one case."7.3) +  .. lI.) x. I) + I. we place the subscript a on the observed data to emphasize the fact that these are actual data that were produced via the plant with (we assume) parameter valuesll' = [0 1 hi h.
their calculation and their properties.. E(N: 9) = reIn) .. 12. The results would be y(nl = $T (11)9 Y(II + ern: 9)... .50) where we have used the fact that the state of the ARMA model is' $(k) = [y(k .y(k . for the ~tate here fmher [han x as in Eq_ \ 1.. (12.e \'. .. Suppose we define the I'ector of errors by writing Eq. Among the criteria most widely used are: 1. However.49) We assume that we observe the set of outputs and inputs 12. e(Nlf.timalt"s of the parametr. 0). To make the error even more compact..45) has the lea. lI(N)} and wish to compute values for 9 = [a. that is.. maximum likelihood estimate (MLE) The last two criteria require a stochastic element to be introduced into the model.8 Block diagram showing the generation of prediction error 9 = [a.. the first error we can form is e(l1: 9).I) + acy(k .2) + + (/"Y(k .. (12.1) . and for the purpose of displaying the output prediction error formulation. b"f. :'lote that ~(N) is a matrix with 211 columns and N these.aem.. and our understanding ofleast squares is enhanced by a stochastic perspective..+i I becilu.45). $(11 + 1) $(N)f. Following our development of the observer.52) () We use dJ. (k) + (/. 2. For the moment.4. which will best fit the observed data. We will see that in one special circumstance the AR~A model error as given by Eq. ( 12. (12. then introduce random noise and discuss the formulation of random errors. Eg. (/" b.y(k . 12.2. best linear unbiased estimate (BLUE).b"u(k 11) . leastsquares estimate (LS). and 3. Because .. The choice of a performance criterion is guided both by the computational difficulties it imposes in the effort to obtain 9 and by the properties of the estimate that results. but we must delay any results in that area until further developments. we can write the equation errors as Y = ~9 11 02. by how hard 9 is to find and how good it is when found.. /1 + 1.1'(0).. \(1 J. yeN) = $T (N)O 02. we can fomlUlate a performance criterion and search for that 9 which is the best estimate of 9 within the context of the defined performance. it is informatile to consider deterministic least squares. in each case a sum of square.. (12. anu Eq. Figure 12. To illustrate this use of error we have already defined a .. which leads us to Eq.~rs.502 Chapter 12 System Identification 12." ·a" b l /1 ·· ·b"f. 1.1) .42).. v.47)..1 Least Squares To begin our discussion of least squares..2)· ·u(k .46). .1(9) in Eg. we have the situation pictured in Fig. before we introduce random noise into the picture. y(N).. (12.·(k) depends on past data back 10 periods earlier.•• . lI(k /1) IT.51) +I rows.4 Deterministic Estimation Having defined an error that depends on 9. + 1) = $T (/1 + 1)9 + e(/1 + 1: + e(N: 9).1'(11) ~(NJ = [$(n) y(NJ]'. will do the best possible job of predicting v(kJ based on previous observations. N.8. we might suspect that a corrected model would be appropriate. within the confines of known structures. Thus we will discuss least squares liN.! prediction error..lI(O).blll(k ~ I)  /1) = elk: 9J.. In terms of + E(N: 6). we will take the ARMA model and equation error.u(I) . we introduce another level of matrix notation and define Y(NI = [. (12. . where the subscript a is understood but omitted .hich will be the ~tale of our identification dynamic sy. c will . repeated below for the 11thorder case.4 Determmistic Estimation 503 prediction error predictor that. and finally define and discuss the BLCE and the MLE. but this is not true in general.49) over and over for k = n.oon be dC"\ eloping equalion~ for the evolution of 8(k). (12. e:.
(i 2. we can say that an input is persistently exciting of order /I if the lower right (I! x /IImatrix component of $1 $ [which depends only on (u(k)f] is nonsingular. but that only six of these were needed to completely describe the inputDutput dependenc~ If we stayed with the fifteenelement Il. 3 x ~ C3.3) + hie + iJ. and the property of "persistently exciting" has been defined to describe a sequence (II (k 1) that fluctuates enough to a\'(Jid the possibility that only linear combinations of elements of Il will show up in the error and hence in the normal equations [Ljung(l987)j. that data taken later in the experiment were much more in error than data taken early OIl. a parameter II having the property that one 7 The reader \\ho ha". For the moment. ~=n and in terms of Eg. +.e + h. We can then write the explicit solution 112.504 C.) T < . (12. The errors are Least squares is a prescription that one should take that value of 6 which makes the sum of the squares of the e(kl as small as possible.'oC and \erify thai .$6) = VTy _ 6 T$T y _ Vi <PO + OT $T $0: and applying the mles developed above for derivatives of scalars with respect \() vectors . Numerical methods for solving for the leastsquares solution to Eq. and it would seem reasonable to weight the errors J" = [~. (12. (12. (12.$Il}T(y . then.57) without ever explicitly forming the product $T $ have been extensively sllldied [see Golub (1965) and Strang (1976)]. In tcrms uf Eg. This we do as follows J e = e Te = (V . Somehow the constant u fails to "excite" all the dynamics of the plant.::: (.52). We might know. Recall that earlier we saw that a general thirdorder stale model had fifteen parameters.50). This problem has been studied extensively.\lV . . and from calculus VI c' take the result that a necessary condition on 0LS is that the partial derivatiws uf J with respect to 0 at 6 = 0LS should be zero. J\ III a minimum is said to be "identifiable:' Two parameters having the property that J(a 1 ) = J(O.59) It should be especially noted thai although we are here mainly interested in identification of parameters to describe dynamic systems.G. Suppose u(k) =" c for all k .561 If we take the transpose of Eq.:: 6). We want to find the property 0IY the leastsquares estimate of a". ( 12. the solution Eq.571 These equations are called the normal eqrtiltio/lS of the problem. ( 12.54). for example.T.we obtain It is obvious that in Eq. The performance measure Eq.52) and the sum of squares criterion Eq. 02.r canonical form having a minimal number of parameters.let us consider an absurd case.59) derives entirely from the error equations Eq.not done t+aTQa .2) .58) (12.53) is essentially based on the yiew that all the errors are equally important.l are said to be "equivalent:' As to the selection of the inputs IIlk). such as the observer or ARMA forms. aa = 2a{Q :.56) and lei 0 = alSo we must get zero: thu. By way of definition. ( 12. we must select . this is Jlai = e' (N: OlEiN: 0). + b.(N . (12. and a very simple modification can take account of known differences in the errors. we define J((l) = I>c(/. we will assume that the /1( k) are persistently exciting and that the II arc identifiable and consequently that $T $ is nonsingular.c  dN). It can be shown that a signal is persistently exciting of order n if its discrete spectrum has at least I! nonzero points over the range 0 . and b. To obtain a unique parameter set. the resulting normal equations could not have a unique solution.a. (12.b! and that separation of them is not possible when a constant input is used. (12. which is thai a hav'ing r 12.a step function input.0 before ~houlJ write out a I Q~ for J. (12. Least squares is used for all manner of curve filling.5+1 y(Nl = a1y(N 1) .58) the parameters hi" iJ:.] = _2yT$+20'$T$.55 \ But J(9) is a quadratic function of the 2n parameters in a.50) again for the thirdorder case to be specific. always appear as the sum h. White noise and a pseudorandom binary signal are examples of frequently used persistently exciting input signals. Without being more specific at this point.hapter 12 System luenlLflcalLon and only one yalue of a make. Now suppose we look at Eq. This is not necessarily so. including nonlinear least squares when the error is a nonlinear function of the parameters. and their solution will provide us with Ihe leastsquares estimate 0LS' Do the equations have a unique solution? The answer depends mainly on how a was selected and what input signals (u(k)} were used.
There are times when the data are acquired sequentially rather than in a batch.y causes the gain of the equivalent filter tll be 1 for constant errors... the formula presumes that one has a batch of data of length N from which the matrices Y and If> are composed according to the definitions in E'j. the memory is short. The choice is a compromise between a short memory which permits tracking changing parameters and a long memory which incorporates a lot of averaging and reduces the noise variance which can be written in two terms as If>TWIf> = L <?(k)ayy·Vk<?T (k) + <?(N + l)a<?T (N + 1) ~=Jl = y<?T (N)W(N)If>(N 1+ <?(N + l)a<?T (N + 1). (12. we have and ( 12.506 Chapter 12 System Identification 12.65) to Eq. we will assume U' = ay'k.61) as solved for N data points and consIder the consequences of taking one more observation. ( 12. The equations of Eq. From Eq. a~. (12.y): so. (12. (12. We begin with Eq.63) Then we see that Eq.60) is ll'(kl =(l .. and a formula attributed to Householder (1964) known as the matrix imersio/1 [emma is (A + BCDj' = AI .61 ) is referred to as a "batch" calculation.51) we have.i"ilently . (12. and if a = I .y)y"k for y < 1. (12. " =L A. D=<?I(N+I)=<?T 8 \\il. (12. ( 12.61) reduces to ordinary least squares when W = I. that are per:.?a.. but a rough estimate of the memory length is given by I/O .' = <t>TWY.2 Recursive Least Squares The weighted Ieasts'juares calculation for OWLS given in Eq.60) we take the weighting function !l'(k) to be positive and. B=<?(N+I)=<? C=u'(N+l)=a. the identity matrix. (! 2.e effects are reduced.xistence of the inyerst" which ex.99 corresponds to a memory of about 100 samples. (12. a y = 0.62) WIll be reqUIred.62) can be written as (12. the filter memory becomes long.. (12. = (If> WIf>)Il1>'WY.62) F~om the solutio~ Eq.=li ldkle (k: 0) 2 = ETWE. Another common choice for w(k) in Eq. we have ordinary least squares. /"=11 k=n We note that Eq.601 In Eq. and from which. and for convenIence and by conventIOn we define the 2/1 x 2/1 matrix Pas 02. (12..65 ) To apply Eq.A IB(C. because by the definition of the several entries. to be small where the errors are expected to be large. and.60) follows at once and gi\e. Consider first ~ WIf>.cltmg and parameters that are iuenlifiablt:'.ion the e.64) 12. Such a scheme is referred to as weighted least squares and is based on the perfomlance criterion . and other times when one wishes to examine the nature of the solution as more data are included to see whether perhaps some improvement in the parameter estimates continues to be made or whether any surprises occur such as a sudden change in 0 or a persistent drift in one or more of the parameters. N increases. with the addition of the weighting matrix W. This choice weights the recent (k near lll) observatiom more than the past (k near n) ones and corresponds to a tirstorder filter operating on the squared error.I + DAIB)IDAI.61) can be put into a form for sequential processin o of the type described. (12. As y nears I. for example. whereas for smaller y. The factor 1 . l If>TWIf> =L v Srl <?(k)ll'(k )<?T (k) =L '\'+1 <?(k )ay NJk <?T (k).51 ). In any event. and vice versa. We need to consider th~ st:ucture of If>T\'\i1f> and If>T\VY as one more datum is added. we have exponentially weighted least squares. and the estimate' can track changes that can occur in (I if the computation is done over and over a. presumably. In short. (12. <?(N) <?(N lI> WIf>6"I. The past is weighted geometrically with weighting y. subject to the coefficient matrix being nonsingular.611 I + I)] 6\\1.62) we make the associations A = yPI(N). one wishes sometimes to do a visual or experimental examination of the new estimates as one or several more data points are included in the computed values of 6WLS ' and we need the inverse of a sum of two matrices. (12. are solved. the normal equation.y. and noi. (12. for data up to timeN+ I If>T = [<?(n) ...ssumt for lhi~ di~l·us.61) we see that the inverse of the matrix in Eg.. derivation of the normal equations from Eq.1(0. To be speCIfic about the weights.umes input. It a = 1 and y = I. Then. This is a wellknown problem.4.4 Determmlstic EstImatIon 507 accordingly.
721 y Equations (12.67) o which can be expressed in two terms as {/ . and the predicted output. and y(N + I) = .. . and Gustavsson (I 974)J I x a = (10). (12. . Note especially that in Eq.1'(0) . P(N) V P(N) .! \\lS Y y 8. we see that the term peI'T Wy (IV) = 9 WlS (N).I' for notational convenience) 9. . .66).. and the previous estimate. We still have the question of initial conditions to resolve. WIS V (12.~ 0WLs(N)). (12. P(N} = al.P(N) . we find [letting PU'. TP(N) "t' 1. P(k + I) +. . Ljung. L(N + I). we can combine the two terms which multiply . . but their study is beyond the scope of this text. )1 oJ>TWYtN + 1) = V oJ>TWY(N) + ~(N + I )or(N + I).. Two possibilities are commonly recommended: . 12. Form </I(k + 2).~I)' P (1 ~TP</I) +(1 (12. Select initial values for P(N) and 9(N).68l into Eq. Uk+l) +</I(k+l) +</I'(k+I)</I(k+1) y a y 7. so that Eq.L(k + 1)~T(k + 1)]P(k) y 10. where a is a large scalar.. 2.69) reduces to 0WLs(N + I) .69). .. Especially pleasing is the form of Step 8.'(i).9(k) + Uk + 1 )(Y(k + I) ~ d>T (k + l)9(k) I 9. P(k) P(k) 6. ( 12.71 l. Let k +. i12. "t' '" )1 .. y TP )1(1 TP) 1 +~d> ( +</1 ell (/ V 0 Y between the </I and the a in the second term on the right of Eq. (12.61). we proceed as follows: L .0WLs(N) + ~a. Comment: See discussion below. 9(k + 1) +.y and 0 < y < 1 is exponentially weighted least squares.') = P.(N + I) 3. Collect . and O(N).. (12.71) is without numerical difficulties.. Go to Step 6.. Thus the next estimate of 0 is given by the old estimate corrected bv a term linear ~n the error between the observed output. (12. </IrO(N). To collect these.I' to reduce Eq. II.72). ( 12.\' + I) = 0\Yls(N) + UN + I)(\'(N + I) . O(N).691 When we multiply the factors in Eq. _. The suggestion has been made that an estimate of a suitable a is ISoderstrom.71) and Eq.. 70) to 0WlS(. y(N + I). ...k I 1.. </I(N + I). 5. t 12. " (1271 J I. .71 ) no matrix inversion is required but only division by the scalar ~ (~+ </IT! Ij»I Ij>T!] [yoJ>JWY(N) + </Ial'] {/ V Y . V . one should not take the implication that Eq. (12. where we have defined L(N+l}=</I y However. ~! ~ (~ + Ij> T! ~ )1 Ij> '9.. v(Nl and u(O).!I(N) and form Ij>T(N + I).. (12. Comment: (/ = V = I is ordinary least squares: a = I ..66) 2.68) If we now substitute the expression for PIN + I) from Eq. (12. Collect y(k + I)and u(k + I}. ' .4 DetermlnJsllc Estimanon 509 and we find at once that P(N + I) = . and (12. .701 a ~ + </IT! </I.N. and N. is given by Eq. L(N + I). Let k +. 4. We see that the term </I T a(N) is the output to be expected at ~he time N + I based on the previous data. Collect a batch of N > 2n data v~lues and solve the batch formula Eq. N+ 1 . the "update" formula for the next value of the estimate.70). yay '" (I +  "".! a V _!Ij>(~+</IT!</I.508 Chapter 12 System Identification 12.) V (/ V If we now insert the identity 1</IT!Ij>OY. 02.72) can be combined into a set of steps that constitute an algorithm for computing 9 recursively. (12. Select (1 y. V In the solution we also need oJ>T WY .61) once for P(N). and enter these values at Step 3.66 ) and for eJ>WY(N + 1) from Eq. The gain of the correction. V (12. Seta(N) = O. which we write as ~(N + 1)1 [(/V'_I_n (/y C] [:'(/1) "(N) ] (12. .. (N + I) = [! . (I. (12. </IUV + I) =~.II .
Only minor changes are required.I U'.I'(t)=a"+b"t+n(t).5 Stochaslic Least Squares 511 The steps in the table update the leastsquares estimate of the parameters 6 when one more pair of data points !I and yare taken With only modest effon we can extend these formulas to include the case of vector or multivariable observations wherein the data y(k) are a vector of p simultaneous observations.i) 1=1 + LBiu(k i=l 0.62) with the new definitions. To compute the recursive estimate equations. (12.76) are assumed to be random variables with zero mean (one can always subtract a known mean) and known covariance. (12. and t: as in Eq. ' {O [ ['(k)/'(}) = ([8'J = . T ) A . 1c=1l ( 1280) '1 There i" no connection belween the a in ( 1..1(91 = (Y . we assume that the actual data are generated from Eq.. suppose we have a physics experiment in which observations are made of the positions of a mass that moves without forces but with unknown initial position and velocity. the Bare p x 111 matrices.. 12. statistics. (12. I.( to I 1 the unknown parameters are (e) 02.cu . The dk) in Eq. (12.1.761 and the (. becomes Y =A6"+V.66) we must replace lla by aI. ..741 where the a are scalars. reflecting the fact that t:(k) is now also a p x I vector and the w(kl are p x p nonsingular matrices.y(k . (12. so A is known. (k=J) (12.. We assume that the observations are without systematic biasthat is. the noise has zero average valueand that we can estimate the noise "intensity. (! 2. t. then t. it is essential that some account of such effects be included in our calculations. (12. in matrix notation. in Eq. the remainder of the batch formula development proceeds exactly as before.51).A6) = Le'(k: 9). We need to modify Eq. For example. Because such effects are very common and often are the best available vehicle for describing the differences between an ideal model and realplant signal observations.1 = Lt:IWt:.71) .510 Chapter 12 System IdenllftcatlOn 12. If we define «1>... y(k) =  La.j) . In panicular. (12.771 + t:(k: II 6). leading to Eq.5 Stochastic Least Squares Thus far we have presented the leastsquares method with no comment about the possibility that the data might in fact be subject to random effects. 6 is (11 + I1l11p) X I. (12. We consider the equations that generate the data to be 9 which. We assume zero error in the clock times. we consider the case of a deterministic model with random errors in the data.=!.78) or As an example of the type considered here. Y. which may be written as .A9)T(y . The (stochastic) leastsquares problem is to find 9 which will minimize .751 and the noise is v(k) = n(t. 17'. ( 12. (12731 One such set of parameters is defined by the multivariable ARMA model I. in the format of Eq. and stochastic processes. and the 4l(k) a~e now (11 + limp) ~ p matrices. The resulting equations are.6]) for the weighted leastsquares estimates with little more than a change in the definition of the elements in the equations. (12. part of lh~ weights in Section I :!A.79) If we take observations at times tl)' fl' I.77) wilh 9 = 6" and [v(kl = O. We assume then that the motion will be a line." or meansquare value.621 and the development following Eq. .). (12. 17 (k =I. (12.59) for the leastsquares estimates and Eq. We will begin Ivith an analysis of the most elementary of cases and add realism (and difficulties I as we go along.60) to . We assume that parameters 6 have been defined such that the system can be described by y(k I = 4l (k)6 T As a stan. Appendix D provides a brief catalog of results we will need from probability. we need to repeat Eq.
or tra. The expression in Eq. depend both on the random noise and on the choice of a.. consistent estimate a" . = a'IA T A)I. (11. on which it is based. in the long run..86) lim [(0(11') v~'"'" lim tr[(OU. l . however.87) If Eq. Eq. the + v(k). It can be informative to apply the recursivc algorithm of Eq.. we must generalize our concepts of what constitutes a "good" estimate. I.811 . Thus o~servatlOn of a constant. Perhaps we have the mass of the earlier problem. {=(J A'A=LI=. ( 12. ( 12. there are several formal ways by which one can define a negligible difference.a".0" and we conclude that this estimate Eq. We will use three features of a stocliastic estimate.c A = I~'= I (f The iteration in P is given by (because <l> PiN+ I) 'V P (I ) ~~=~ PiN)(I)(l)P(N) PIN) I +P(N) 1+ (I)PUVj(I) . C:=.81). for specific actual data.\ ~' 9 I. and P(l) all )(9 LS .(J (l1.85) and A = rI \. .:..83) we ha\c' used the facts that A is a known matrix (not random) and that EVV' = (T:J. say.O(N) .V +!) r L.811 Now. f.80).. (12. we consider the most simple of problems.' I trJ of a matrix. (12. 1 r.S (l2. . iIi + 1 112.~' + 1)1 = lim ~ = O.86) is a C()IlSiSl~11I estimate of a".. and elk: ali) = l'tk). we say that 9( 11') converges to 0" in the meansquare sen'e as iV approaches infinity.84).80) represents the same quadratic function of a we hale seen before: and the same form of the solution results.1(k).84l Illth zero velocity. Because of the random effects. we should not expect to find zero for the sum of the errors given by Eq. but .I. two observations.. i.88) In making the reductions shown in the development of Eq. (12. A with clement..( l). N. (l1.512 Chapl~r 12 System Identihcallon 125 Note that the error" elk: a). (12. An estimate 0 of a parameter is said to be col/sislenl if.82) is true. ( 11.86). (11.85) and caleulatin~ the sum according to Eq.a")' = [((A'AIIATVV TA(A T A)I} = (AI A) 'AT[VV'AlA'A)I <l> (N) (12. (12. k = O.. We have (A' ArIA'(AO" (A' A)IA'V and [(OlS  all + (A'A)IA'y .82) can be made more explicit in the case of the leastsquares estimate of Eg. by which we measure the difference between 0 and 01) by the sum of the squares of the parameter error. 10 The tract. the difference between 0 and a" becomes negligible.aO)' = which is the 'ample al'eraoe Now.. even if we should determine 0 = Oil exactly I which of course we won't). (12. For our purposes we will use the meansquare criterion. . the equalions wlll look.um of rh. we see that conSIstent if lim traC(A' A)I = O. if we apply Eq.If we keep taking observations according to Eq. is random. We make explicit the dependence of 0 on the lengtli of the data by writing OiN) and say that an estimate is consistent if III Stochastic Least Squares 513 lS Continuing then with consideration of the leastsquares e.. j  I.diagonal ckrn. In statistics and probability. r(OJ and . Suppm.') \'>""' a")'.. ali = a".831 9(1) W (A'A)I I..86) is a batch calculation. 0. i 11. We thus have (I = V = tor least squares. Now the solution will be a random variable because the data. == I) initial conditions ( 12..0") = a"HOt 11') . we will eventually have a value that differs t.\~. save only the substitution of A for lfl. The first of these is consistency.V+I. the . However. + v( I i). namely ( 12. we find lim traer/V O. then.om aU bl' a negligible amount in the meansquare sense.52) to this trivial case just to see ho\'.I·(k) = a" As an example of consistency. l=1) A'y = LY(k): then \' 9Ls tN) = (. Y.a" + Y) .:nb.. (' 12.e we agree to start the equations with one stane ?f "batch" on.timate. ' Thc estimate given by Eg. O. (/1. .\·(O)) = ~.
"(N 0°. We have (12.') PIN) 3.83) we find that or LA = I..94).0" = (A'A)IA'V.I + PU. or BLUE. First. which we do not know. this reduces to J(L) = trE(LV)(ny = trLRL J • ilLS . after all.L (0 =0. We can. A second property that can be evaluated is that of "bias:' If 0 is an estimate of 0°. = Oil.6°)(0 _ OO)T as small as possible. (12.93) in Eq. Csing Eq. 4. Let N = I. the bias in the estimate is the difference between the mean . PI N) = 1/ (N + I).93). The leastsquares estimate given by Eq.96) where we take the covariance for the noise to be {12.94) which makes Eq. we require £9 = I)(. (12. and the bias is EelS . If we return to the development of the meansquare en'or in 0LS given by Eg. (12.77) for Y J(L) = tr£(LA6° = (12.88) plus: I. (12. however. we \. The result is called a Beq Linear Unbiased Estimate. P ( N + I J = . subject to the constraint Eq. (12. makes the meansquare error J(L) = tr£(O . as a third property. (12. it is. of N and would. and Step 4 of the recursive equations gives the same (consistent) estimate as the batch formula Eq. Actually.OU without involving the value of 0' directly. (12.rite" e=L·Y. the estimate is said to be ullbiased. (]2. (12.83).911 (12. (12.94). else there is no point in estimating it. (12. H.. we would really like to have ihN) be "close" to D° for finite value. + L(N + be replaced by N + I.95). We solve the problem in an indirect way: We first find L when 0" is a scalar and there is no trace operation (L is a single row).it> no connection recursive e~timate equation (12. The development proceeds as follows.6 il )T}. find an estimate that is the best (in the sense of meansquare parameter error) estimate which is also linear in Y and unbiased. the gain m~trix u~ed in th~ .60). O(N + I) 5. Go to Step 2. (12. it is difficult to obtain an estimate that has a minimum for the square of 0.. Although consistency is the first property one should expect of an estimate. 0 . + LV  6(1HLAOo + LV _ o")J. an asymptotic property that describes a feature of 0 as N grow~ without bound. We also note that the matrix P is proportional to the variance in the error of the parameter estimate as expre.95) tr£/CLY . u value of 0 and the true value. Let N 6. which we can prove by direct calcl~lation as follows.93) 2. 7~. L(N + I) = .96) as small as possible.901 If b = 0 for all N. But from Eg.>sed in Eq. I+P(N) peN) (12. (12.OO)(LY . From this scalar solution we conjecture what the muhiparameter solution might be and demonstrate that it is in fact correct. Because the estimate is to be a linear function of the data. = eu") + I) .D° = £(ATA)'A'V = (12. We must introduce the constraint I] The matrix L used here for a linear d~pcndence h<.59) is unbiased.514 Chapter 12 System IdemifJGlllOn 12.5 StochaSlic Least Squares 515 Thus the entire iteration is given hy the initial conditions of Eq.eeN)) or ELY = £L(AOI! Thus + V. like to treat the meansquare parameter error for finite numbers of samples. Unfortunately. (12.891 Because the estimate is to be unbiased. we consider the case when L is a row.94) We wish to find L so that an estimate of the form Eq. The reader can verify that in this simple case.921 {ATAr'A' EV We now have the entirely deterministic problem of finding that L subject to Eq. we have J(L) and using Eq.
103) to Because the first tenn on the right is the sum of expected values of squares.101) is really and truly BLLE. (12. But we have jumped ahead of ourselves: we have yet to show that Eq. and we do this by a Lagrange multiplier as in calculus and are led to find L such that (12.94) to eliminate another to the effect that tenn2 = tr[(LV)(L\Y = trLRU.99) and substituting Eq. (12. LA LA + LA = I. we have.103) I'ATR" A (12. (12. If the data are described by Y =AOo+ V.100) and the BLUE is (12.01) = tr[(L(Aao a") V) . = 5. Because 0 is required to be unbiased. If. = 2LR + AA T = o. The i. we summarize our findings as follows.0")(0 _ OU)T. ( 12.102) we see that the term is zero. are the Lagrange multipliers. O.1A)'. \vhich can be written as aL T aJ I L~i.) We have where L is given by Eg.OO)T = tr[(LY .OO)T Thus the best value for L is given by 2LR = i. To conclude this section on stochastic least squares.A ' L = 2 T • = tr([(O . we immediately see that this is exactly weighted least squares with W = R. (12. (12.1 best linear unbiased estimate (BLUE) !\'ow we use Eq. We can write.97) is a minimum.103).98) We note that the trace of a sum is the sum of the traces of the components. but now from Eq.a''>'. (12.100). that L = (ATR1A)IATR.102) Now the meansquare error using 0 is J(O) = tr [(0 . then the ordinary leastsquares estimate is also the BLUE. (12. L must be such that tr[(D .9)t9 . namely • term 2 = Because the constraint Eg.101 ) If we look at Eg. J(O) = tr[(O  a+ a.516 Chapter 12 System Identification 12. Thus J(O) ?': J(O). (12.100) for L we have (12.94) must be satisfied. = tr[(LY + LY . (12. J(L).98). and we have proved that Eq.102) to eliminate one term and Eq. Eg. (12. bv definition. Suppose we have another linear unbiased estimate. it is zero or positive. term 2 = trLR{R'A(A TR'A)lj = trLA(A TR.100) or Eg. in effect. and using Eg. 101) is true for a matrix L.99) back again in Eq. + V))(L(Aa" + From this we conclude that (12. without loss of generality 0= LY = (L + L)Y. (12. which is a column. R = a"I. The necessary conditions on the elements of L are that JJ / JL" be zero. .94).9)(0 .a+ 6 ~ 0")7 + 2[(0 6)(9 . to retain notation that is consistent with our earlier discussion of vectormatrix derivatives. I (L + L)A = I. as we assumed earlier. + LA = I. (12. and the trace of the last tenn is.LY)(LY _ a")T LA or = I. (12. Let us consider the second term ofEq.0)/ + [10 ~ Oo)(!) _ OIl)T}.LY)(LY = tr[tLY)(LY .5 Stochastic Leas! Squares 517 Eg. (12. (12.61). Thus we reduce Eq. (12. is give a reasonablebest linear unbiasederiterion for selection of the weights. (12.94) requires that LA = I.1 • What we have done. (We use LT. finally.01))(0 .
518 Chapter 12 System Identificatlon 12. ..IJr(k ~=1 \ 11.75). the inverse of the covariance of the single time measurement noise veclur and.5 Stochastic Least Squares 519 and £v= O. the elements of ell will ~e random variables also. Thus. . while the properties of for finite .x iV ~ Ic=! k=l which is R.. ..\x I' ) .torder model with no control.110) and (in a suitable sense of convergence) \I~~ N ~ y(k)Y(k + j) 1 \" = R. (O)e = R. then the leastsquares estimate is also the BLUE. are taken be y(k i = (/'y(k . If R = IT'I. + v(k) + niCk . As another comment on the BLUE.. \ . (=1  9 ) 0 T and the normal equations tell us that (12. However.75) is L(N+ I) =P<I>(R.I)y(k). ·r(N .112) . (1). + j) (12.108) . . (1 A  0 ) () r . the coefficient of 0 is ell.1) e = lim . N ~ . and the best we Will be able to do is to quote results on consistency and bias before turning to the methoJ of maximum likelihood. The equation. (12. (12. We can. Thus the BLUE version ofEq.I)r(kJ.. \"(k . if we insist that the estimate be both a hnear functlUn of the data and unbiased.0 H9 B = (ATR1Al'. £vv T = R 10 Suppose we consider a fir.'I are difficult. the weight matrix (l becomes R. For the moment. the coefficient of the unknown parameter. given for vector measurements in Eq.(ll/R. (12.(O). e =0. . (j) = Ey(k)yCk (12.'(N)I T • <l> = [y(O) . we wish to consider the eHects of the noise on the leastsquares estimation of the constant aD Thus we take From this we showed that the leastsquares estimation of a constant in noise IS not only unbiased but also consistent. (12. . Thus far we have considered only the leastsquares estimation where A. we showed that the BLUE is a weighted least squares given by y = [y( I)· .63) !\iow we must quote a result from statistics (see Appendix D). and so the matrix P is the variance of the estimate Oe. k =! o (\2."y(k .1) Ev(k) = O. I' lim ( .1051 In general. [t I)]e tY(k R. ot course.1 I\) +ellTpell)I. e= R. then the variance of £(OL5 . = {IT: k=lJ.1091 Thus. ifR = IT'I.) = IT'(ATA)l." . we note that in a recursive formulation we take. " 0 _ A <Ill <l> = 2::>'(k . we can define the autocorrelation function P = (A[R'A)l.. as we have seen earlier.1). Furthermore. (12.. however.1061 The variance of 08 is var(g e ) = £(OB .1071 y2Ck 0 must satisfy = l)l(k). For signals such as Y(k) that are generated by white noise of zero mean having finite intensity passed through a stationary filter.104) Ev(k)v(j) which is unbiased. We will estimate them later. (12. in the true identification problem. (j). s <l>'V = LV(k .0 HO LI .. Then we ha\'e the simple sums (12. y = I.In the recursive equation. we can say that the asymptotic leastsquares estimate is given by the solution to e .1S var(OI.1)]'. we would not know either the constant c or the noise intensity 1]"'. 0 LS' which is defined a. according to Eq. Analysis in this case is complex. illustrate the major features and the major difficulty of leastsquares identification by analysis of a very simple case. the state of th~ plant modeL and if random noise is present. then the leastsquares estimate of 0° is given by 0LS = (AT A)'ATy. (12. is known.
6 !\Iaximum Likelihllod 521 If we now return to the model from which we assume r(k) to be generated..'alh.. then R = rr'I.I) 12. For the case of a veclOrvalued set of 11 random variables with a joint distribution that is normal. (§)d§ = l.6 Maximum likelihood The method of maximum likelihood requires that we introduce a probabilitv density function for the random variables involved.. (~) = [(2. and we ean say that the leastsquares estimate 1.(k .( ) The number (5' is called the variance of x.I 1.I) = a''y(k .2)t'(k . (12. discu. value. it. [. (!.. Here we consider anI v th~ normal or Gaussian distribution. least squares is not a good scheme for constructing parameter estimates of dvnamic models that include noise.(O). However.ol11e in~tanLe~ Jt 1":po~~ihle to constmc[ a krill !h31 a~~ mptotkall) I.I)rtk .Ii E(x ...I). I ' Primarilv because of the bias inlroduced when the ARMA model has noise terms corr~laled from one equation to the next.: + eEl'(/.118).IJ)(x . .IJ)J then ( 12.I) = Ea''''(1: . if we multiply Eq.112) to obtain • R (1) . that the data consist of a set of observations having a densitv given by Eq. and Eg. .O.1 mol) by yl k. A scalar random Yariable x is said to have a normal distribution if it has a density function given by +C£r(k . V27W 2 a I [I (12. In :.> term a:. f!lx) = R'O f. ( 12..exp [1" ] J'L(!. are not \ t'r~ pleasing hecause: the 1"~~enli.1151 IJ./1)' = We have.: 1: f: §jA)d§ = 1<. (12. for example."JX'ndcncie~. asymptotically unbiased.115) shows that even in thi s simple case the leastsquares estimate is asymptotically biased and cannot he consistent.and the (nonsingular) covariance matrix R as [x E(x .119) Because the normal distribution is completely determined by the vector of means IJ..2) (§Il)'] «§) = .~~J in ~lcndd (I l)::'1 ffthe elements of the vector x are mutuallv uncorrelated and have identical means ~ (rr')".1081 when c =I. and rr is the standard deviation..118) ff e = O. written var(x). (11=1 I (12. that + l'(1:  I) + e['(k I) 2) f: f. For this.1) = 0 because v(k . Suppose. term.1 as .IJ)] . we find that if we define the mean vector IJ. but having an ill/knOll'll mean value. (12. the method is not restricted to the form the density function in any way.O.1141 Now we can substitute these values into Eq. (12.:d" the bi.and the covariance matrix R... then. we find [yll. The parameter i's therefore en = /1. R. we write Eq.2)I'(k . The maximumlikelihood estimate is calculated on the basis of an assumed structure for the probability density function of the available observations. 12 Clearly.'To)  I .1). (12.11 I1j..1. for R (Q I and R (I) can be obtained.1..V(IJ.)" f.. (§ .I·tk . For example.of nni .e i:. as in Eq.113) . if e =I. among the most successful being those based on maximum likelihood.fJ. Many alternatives have becn studied.I)dk .llU["C. we still need to compute Ej'(k . However.. Eq.ubtraet out the bia...[dk)r(k ...)d§ = a". R) to designate the density Eg.. if Iht: ("uml'l. R.Id.119). which is in the future.1 and take expected values."(1: . (12.I) and'take the expected value. perhaps by use of a table of definite inlegrals.117) .108) for k .118) can be written as 11 and variances rr".1' 'Ve set [p(k Iylk . (12.: .I) is generated by v(j) occurring at or before tim~ k .I and y is indepe~dent of (uncorrelaled with) the noise dj I.. (12.116) ft can be readily verified.I iY(k) = Ea'\(k .(l)=a"R. 112. (12. (12. then H (x) = a".C£dkl)y(kI).r)" ~et RJ" exp [ ~ (~  IJ)TR' (~. we often use the notation . however.I )y(k . det R r(~)=(? _.I) =rr Ex =  + [v'(l. bu( 'oUch CnITedinn.1). and multiply by viI: .exp .520 Chapter 12 System IdenLtlkali"n 12. .llt c i~ knm\ n we (an . unknO\\ n til.
In fact. (J~ (J2. If the actual data come from a population with the density f. we define V(N) = [v(nj .I " 2 I:!)' L '. from Eq. .522 Chapter 12 System Identification 12."""' x . A~ a function of the parameter.126 ). :s: b is given by Pr{a I = .. as giving the density of a set of x.1231 Y(N) = [Y(Il) <fl(N) = [if»(/1)." Because the (natural) log of the normal density is a simpler function than the density itself. x = (x I' ' . Consider next the ARL\1A model with simple whitenoise disturbances for which we write r(k) = a.. that a sequence of the v(k) are observed and that we wish to estimate from them the G. II. ·the probability density of ~ given 1:1:' f to be zero in the neighborhood of its </J(N)JT.. (12. . then one might expect thc samples to reflect this fact and that a good estimate for 0° given the observation. However. Suppose. ( 12. the maximumlikelihood estimate is the sample mean..(~ 10) is called the likelihoodfilllction..{~j II:!)d~i' ai/aB = O.1221 We thus find that for an unknown mean of a normal distribution. we will call it the loglikelihood function and give it the functional designation log f. the negative of the log of f is used so much. (x II:!) with respect to e equal to zero.. (12." yeN)]'.nO } .l211 or "' B\IL . 0(1 = la]" .a"y(k 11) + blll(k  I) + + b"ll(k  n) + v(k). O. it is apparent that if we assume that Y.' hi' and a' by the method of maximum likelihood. now. . which is also least squares. Such an estimate is called the maximumlikelihood e~timate. Fonnally. we will often deal with the log of f. Because the probability that a particular Xi i~ in the range a :s: x. unbiased.124) :s: Xi :s: hI = [' f.6 \. and BLUE. We have studied fhis estimate before.120) and  at ilO =  I" 7 2a. 13 \\'~ read 14 It i~ not possible for it l.anb.]'.120) we can immediately compute 8\IL for the mean p. </J(k) = [. Itn a:. . 9\IL is such that (J2.. and the distribution of r is immediately determined by the distribution of v. We require the probabilitydensity function of the observed r(k) for known values of the parameters.\'(k .ro") + II and we assume that the distribution of V = [c'(n) . we have LX. 9\t1 . we have f(x I 0) = +log (2. where 9 is such that the likelihood function f (x 10) is as large as possible.I)".125) From Eq... . b: setting the derivative of f.laximum llkehhood 523 The function l ] ( 12.y(k  !)  .. v( N)l' is N(O.2 (x 1=1 t'(N)]'. ai' and b. a'l).127) maximum. nil 1=] n =0 the densitv function is seen to be a measure of the "likelihood" for a particular value. de f dl:! (12. b.. we would expect to find man: samples from the population with values near xu.(x 10) = [(x 10). x. for (111\' value of the population mean I:! . (~IOo).a' { " If we now set LXi .) T would be 6 = 9.I) . u(k /1)1'. (12. First. are all known. From a look at Eq. Using the earlier notation.126) so that the derivative of the log of f is zero when elf/dl:! is zero. then we can compute v(k) from these observed y and II and assumed (true) a i and b. we note that d . I n = . ML 02. Thus.120). for the scalar parameter ~L. Thus we are assuming that the v(k) are each normally distributed with zero mean and 2 variance a and furthermore that the covariance between v(k) and v(j) is zero for k =I j. I elf log} = . consistent. we can go on to apply the principle of maximum likelihood to the problem of dynamic system identification. (12.. !1~1 !=l (12.1'(k /1)u(k . .i~1 L 1=1 2(x i  0) can be presented as a fUllction of e. the density function f. wh'en f is large in a neighborhood xo.
136) (a) .133) <I>(N)Oo. + c. v( Nlf is again taken to be nonna\. The equations for decouple from those for O\tL' and solving Eq. IT~I).133). !i(k  l)) = 0 1))(1'(/) for all k. ( 12.~" If.~ exp .1) (k = j) o a'c t a'c t (k=jl) (k=j+l) elsewhere. as we saw in Eq. and V is distributed according to the N (0.<l>O"L ).132(b )). (12. (12. Furthennore. 6'tL and &~'I' are those values of 0 and a' which make £(Y 10) as small as possible.u(k .. we obtain (again using earliernotation) a. .::r. (J'I) density. we solve Eq.y(k . (12. we can write ZeN) = YIN) .. ( 12.i) (12. we can write instantly frY 10°) = (2rrarn. 11 (12.L{/. the number of samples in Y. .i) + p(k): (12. Now let the reduced parameter vector be 0 = [a .. Now let us consider the general model given by II I! 2 (Y _<I>OO)T(y _<1>0°)] a' . The likelihood function is by definition f (Y I 0).l/(k i=J . dk + C . (c) c:(k) [:(kUj) [(L'(k) [(1'(k) a'(I 15 \Ve deliberately formulated our problem w that thi" inverse \\'oulJ be trivial. 02. of course. The difference between Eq. is nonzero. the inyer~c requires a Kalman filter. (J" b . . we know that Z is also nonnally distributed.<l>0ML )T (Y . ( 12. v(j .1301 with the O(] dropped and replaced by a general O. that Y(N) = <l>0(] + VIN). ~ log a + ::. =  log {[ exp  I 2: (Y<I>O)T(Y<I>O)]} a' +J _ III log 2rr +J III.524 Chapter 12 System Idennfication 126 \laximum Likelihood 525 Then Eq.134) we find past values of the noise v(k) weighted by the ('i and. We find these estimates by setting to zero the partIal denvatlves of £ with respect to 0 and IT'.135 ) ao = a' [<I> iJ£ at I r <l>6 ML  <I> Y] T = O.1301 v(k) = . composed of the a and b parameters but not including the c i ' In a natural way.P(k  I) = . we can easily compute the mean and covariance of: Q = (Y . (12. + Laiy(k i=1 i)  L 1=1 b. the leastsquares estimate is biased if the c are nonzero. for an)' O.134) where III = N . elk) is the prediction error. . (12.O. Becau~c l!(kl i'i independent of all pastil and y.126).134) and Eq.128) is an expression of the input{)utput relation of our plant equations of motion. which in this case is so trivial as to be almost missed:'o namely. (12.J + ('.1321 where the quadratic tenn Q is defined as However.128) Equation (12.126).i) + LCiL. . Consider first the special case whe~e of the c's only ('.: O"L)' ( 12.'L Om IT"l " =  Q I = (V m 111 =  <1>0) (\ . which is to say.\/(0. .n + 1.<1>0) A  T • A NIl+ 1 . Eq.126) implies. we need only be able to compute the v(k) or in batch form.(k 1=1 .~ = ~ iJa' _a~tL JI1 :." bn]T. again for the true parameters.I(k) = :(k). from the v(k) or Y( N) because we are gIven the probability density of V. To obtain the probability~density function f (Y I 0°) as required for the method of maximum likelihood. each of which has a normal distribution. (12.132) i.1311 the distribution of V(N) = [v(Il). These derivatives are (following ourearher treatment of taking partial derivatives) LO(k) + ('.<1>6'. and write the terms in Eq.1291 Because we have assumed that the density function of V is . We thm know that is asymptotically unbiased and consistent. (12. (12. is that in Eq.hown that the method of maximum likelihood gives the same solution for 0 as the leastsquares method for the model of Eq. ' I (Y<I>O)T(Y<I>O) (J .i) i=J + Lb. (12. + ('.1) .tate\·ariahle description.134) that depend on noise dk) on one side and define dk) as follows !I II Our estimates.)'w.115). because :(k) is a sum of two random variables v(k) and u(k . To compute V from Y requires the illl'erse model of our plant. As in the elementary example discussed above. O"ML Q (b) (12. (12. L r(li. the identical "normal" equation of the leastsquares method so that 6"L = 6LS in this case. we will consider the negative of the log of f as follows f(Y " 10) = log (2rra. (12. If we add plant and independent sensor noi~e 10 a :. the V(N).128) for V to obtain V(N) = YIN)  We see immediately that Eq. [I Thus far we have no new solutions except the estimate for a' givcn in Eq. but we have .
(12.r)''' R:T1"exp [~ t v't'] . we proceed as follows: Let a(K + I) = arK) + 8a. Le'(kl.141) . As before. (12.i) .r)'" detRr" exp[.144) and using e(k. The essential concept is that given the Kth estimate of a.r + ::. we turn to an algorithm that can be used for the numerical search for 9'1 L' We first formulate the problem from the assumed ARMA model ofEq. k~" (12. /=) 1=1 c = E(E I a(K)). I.I". o C1 2 o o ([2. (12. (12. (12. Then E(E [a( K + I» = t(E I a(K) + 8a) .. .\. l~. By assumption. in Eq.138. .142) 16 See Luenberger (1973 J for a lucid account of minimizing u)gortthm:.i) . Formally./ogR. . (12.148) lI. N R. we need to construct a numerical algorithm that will be suitable for ~i~imizing f(E[9). but it depends on the c's (c 1 only in this special case) through both R and detR.526 Chapter 12 System Identification 12..136) this is the likelihood function if we substitute for Z and 9 as follows: I . An explicit formula for the maximumlikelihood estimate is thus not possible.lI(k .(V . c1 1+ c1 C1 c.<1>9).tudy of such algorithms is extensive: lb we will be content to present a frequently used one. 2R\ m.143) 0 1+ c. with the mean and covariance in hand.134) Vie can compute the estimate of Rc by calculation of L £(Y 19) = .146) a 12.9". Q.7 I'\umerical Search lor the \'laxlmumLikehhL)od Estimate 527 Thus the structure of the covariance of Z( N) is R= EZ(N)ZT(NJ I = This multivariable random vector also has a normal distribution with zero mean and covariance +c.134). c and.140) 222 The major point to be made about Eq.Lc. Nn +I Lc(k).Lb.144) where m = N . .i). = EVV I . . and we must retreat to a numerical algorithm to compute AIL in this case.• CJI as r . III I 1  at/aR.n + 1. (12. and c . (12.'(11) v(n + I) F(Nl]T.89 Q89 2 +. as the output ofEq.log(det R) + .y(k i=l where ([2. (12. which gives = 0.v(k .n + 1 is the number of elements in V.(Y . we wish to find a (K + l)stestimate that will make t(EI9(K + I)) smaller than £ (E [9( K». a dependence that is definitely not quadratic.<1>9)]. and 111 = N . .147) II 11 v(k) = y(k) + I>. But from (12.141) when 9 =I. I (scalar) variance R". !(Y [9) = [(2. 9.137) R= R. 1:. Thus we can immediately write the densitv function as a function .. where I". once again forming the inverse system as rI To compute the values for the a ." }(V[9) = «(2.140) is that the log likelihood function depends on the Q'S and b's through ij and is thus quadratic in these parameters.145) 2 The negative of the log of ! is again similar in form to previous results As with Eq. h \I ot t e true parameters 9 = [a.(Y ~ il'9)TR. ~ZTR' Z). I (]2. The method is to expand f about a( K) and choose a( K + 1) so that the quadratic termsthe first three terms in the expansion of tare minimized. then taking the log which gives the result III HE[9) = '2/og2. v(k) has a normal distribution with zero mean and unknown g = il9 e=o~ I at II (12.=11 (12. based on a method of Newton.log 2n + .. a" 17. we define the successive outputs of this inverse as V(N) = [1.7 Numerical Search for the MaximumLikelihood Estimate Being unable to give a closedform expression for the maximumlikelihood :stimate. is the III x III identity matrix. T ' = C + gI89 + . (12. h.1391 The (log) likelihood function is found by substituting arbitrary parameters. + . we can write the probability density of Z(N) as g(Z(N) 19°) = «2n)'" det R)L' exp(  r o o 0 0 . 17" c 1 •. (12. The .<l>9)TR' (Y .
I I j~l iJb.147) and set the derivative to zero with the result (ignoring the higherorder terms in 80) _ We tum to the difference equations for v(k) Eq. wc return to Eq. LJf(E 16) iJ . + R. In terms of f as given in Eq. the system step and frequency responses. If we take the :transform of this system and call ae I iJo = e " then we find ' " a(K) .146. but let us first construct the algorithm. (Je(k ..152) and the first term in Eq. L:" c .153).150) to compute (12.151) using three structures as shown in Fig.150) (}c 1 (12. is simply :1 times the partial derivative of e with respect to (I" and so on.iJf/ilO from Eq.154) a( K + I) as a( K + I) = a(K Ih'ie consider Eq. e(k)ae ilO ilO Y aet})) adk) ~ ~ (ae(k»)J R. To do this. (] 2.' can be constructed. If [R. Thus the derivative of e with respect to a. and because. .151( a») for the moment for fixed j.9. (12. we can realize all of these partial denvatlves Via the structure shown in Fig. substitute elk) for L'(kJ. 3. or = :' Y(:I  '" L. Compute 5. iJe(k . + Ill. iJ'£/iJ6 iJO from Eq. as follows. and. R.(k We note that Eq.. .152) and the first term of R.. ~ ~ I + E" )=1 • Y() C I )'" .145) and proceed formally. taking R..1531 1.r) aCt iJe(k) . crosscorrelation of input and output. we will simplify the algorithm to include only the firstterm in Eq. and c. We thus differentiate Eq. 4. (:) ". iJa {a) I iJt = gT +80TQ iJ80 =0. (K)J/ R.118).9: and simultaneously compute R. (12.e (k ) aelk) aa.S e k iJ'e(k). (12. stop. dynamic systems. (12.elk . + I) . + . (12. Select an initial parameter estimate.152. 02.umcrica) Search for the klaxlmumLikdihol1d Esllmale 529 We must return later to the computation of gT and Q. f::: ( ) iJO iJ(I (12. We would like to select 86 so that the quadratic approximation to £ is as small as possible. (12. based on analysis of the physical sttuatlOn. It is standard terminology to refer to these partial derivatives as the sensiririries of e with respect to (I.528 Chapter 12 System Identi ficatll'n 12..15. ~. (12. (/2. with . (b) Solving Eq. Else go back to Step 2.= . (12. Compute 6(K + I) = 6(K) Q 'g. (12. 12.. we have all the elements of an explicit algorithm that can be used to compute improvements III O. 12. With these then.. we see that this is a constantcoefficient difference equation in the variable ne(k) I iJII.139) with e substituted for t': compute the sensitivities from Eq. near the minimum. Construct (compute) elk) from Eq. .153) depend only on the derivative of e with respect to 6.151 l in terms of the observed signals Y and II. k~n = . f::: ~ "'.I :.(k . L C "J (c) 1=1 80 = Q 'g. ' {Ill i=11 ilO iJO l()~ 2' 2rr I ~. Thus we need only compute ae(kl/iJO. The steps can be summarized as follows: iJ't iJ (I iJO iJO = iJ(I R. (12.0:::1 Our final task is to express the partial derivatives in Eq.Q"g.e(k) } log R 2" 2R.1).=  E()". (12. we would expect the tirst derivative terms in Eq.153) to dominate.. 2.j. (12.149) for 80 we find . In exactly analogous fashion. " iJe(k) . (12..= Y{k ila' I  I)  . whose states are the sensitivities of e with respect to h.lor least squares.149) iJe(k) iJb. (l2.L.. to be a constant because R. E (:) Ii " .7 l'.c. = {.R.(K) < 10".=u(ki)Lc (12. (12. The analytic condition for t to be a minimum is that iJtliJ80 = O.116) and solve for g and Q. In fact.il 1=1 ... 6(C)).139). from Eq.151) E. the algorithm can be written as + I) = arK)  (a~':o)" G~f 02.R) I ~ L. and compute the sensitivities as follows: iJdk) . is given b) Eq.j) as a forcing function. (12. Because our algorithm is expected to produce an improvement only in 6. \Ve now use the 80 found in Eq.
=O.10 A four disk system. A discussion of such tests is beyond our scope here but can be found in Astrom and Eykhoff (197 I). 2. is suggested by a statistical test of the significance of the reduction. the assembly has a torque motor coupled to disk 3 and angle sensors at disk 3 and at disk 1 The sensor at disk 3 is therefore collocated with the torque source and the sensor at disk I is noncollocated with the torque. we should stop.5 5: I 1. .. as given by R.. Careful mcasurcmcnt of the transfer function by a onefrequencyatatime technique for each of the inenias of the disk was done and the magnitudes are planed in Fig. to permit parameter changes. we consider the four disk mechanical setup sketched in Fig 12.7 I\umerical Search for the tIaxlmumLikehhood Estimate 531 Figure 12.5 ' 3 fr~quen. fails to be reduced by more than a relative amount of 1O~. . Sidman (]986).y (rad'<Inl) .9 Block diagram of dynamic system whose states are the sensitivities of e with respect to a Figure 12.5 or 0. from Sidman (1986) !~:~!'"IO ~ 0001 ססoo1 o 5 I NonnalizM 1. from Sidman (1986) Changeable moment of inertia Colocated angular position sensor and torque motor Noncolocated angular position sensor !\'ole Bearing assemblies ilJound the tor~on rod at ellch disk constrain motion to rotational modes In Step 5 of this algorithm it ~s suggested that when the sum of squares of the prediction errors. and a test similar to that of Step 5 can be used to decide when further increases in 11 are not significant. ~ . The problem is to estimate the transfer function by stochastic least squares. provision is made to reduce the inenia of disk" by a factor of 0./!. 12.11 Frequency response for the four disk system measured With no nOise and noncollocated signals.OJ .5 l. 1O~.5 J Normalized frtquency (radums) .10 as studied by M..25. is not known. This number.~ !. Figure 12.lrlltlflCiitlO/1 . this entire process can be done for /! = 1...:y (radians) I:~!'=O' • Example 12. All disks have the same inertia but.1 I.2.j c:: OOO(lJ .001 0001 00001 o ." ! o 5 I 15 1 25 3 :'Oorma':zcd freqL:en:. and Kendal and Stuart (1967).~~r.530 Chapter 12 System Identification 12.'f Ih~ FOllr Dish SYStem To illustrate parameter identification with a nontrivial example. If the order of the system.5 ::: 2.3. This is a representation of a physical system constructed in the Aeronautic Robotics Laboratory at Stanford L'niwrsity as pan of a continuing study of the control of flexible mechanisms. In this case. D.
the results of Fig.) bU " {f2._ at the plant output is obvious in Fig. 12.12. This model is quite suitable fOf use in control or in adaptive control schemes. In the present ca~e.(:)\I:. 112. the estimates arc worthless for the purpose of designing a controller that actively dampens these modes. This frequency constraint prefilter further rcduces the effect of high and low frequency noise and disturbanc<s including broadband quantization noise.1 U I~) transfer function as a ratio of two eightdegree pol~ nomials. we obtain the curves shown in Fig. Suppose we write the transfer function n:)=uu+W (II.dl1i. from Sidman (1986) ::~I"'O J . a(:1. In this ex. With the suggestd preprocessing of the input and output data.b"I~)[b. The bandpass filter F(~) is sclected to have a passband that brackets the region where the reWnances ar< known to exist. I6 are obtained. The contribution to the system response due to the zeros of hi is very insensitive to changes in the inertia or torsional stiffness in the plant.. t'(2. and introduces a filtering of the noise that can be used to reduce the weighting due to (I tn the • ." 001 '' OOQ: B<cause (JI~) is typically large at high frequencies. This has the effect of corrupting the frequency response e"timates a~ shown in Fig. of the unknown plant.156) by the filter transfer function.O.5 3 f'Oorr. as well as excited unmod<kd dynamics above the frequency band of interest. one estimates the transfer function polvnomials a and b. the parameter estimates will be greatly distorted by the least squares identification. 12. F. consists of real zeros located on the negative real axis. this eliminates the coloration of the equation error due to the known a. b.) ( 12.532 Chapter 12 System 1denllhcatlOn 12. 00001 o ai I.uljleclfrequenc~(J1I. Sidman ( 19K6) modified Clary's method and introduced the known parts and filtered the data with the structure shown in Fig.155) Then the equation error i:.adl. Thus.12. DC bias in the sensor and actuator. If we write the II. 12. This leads to a stable. a(z). we obtaio the excellent results shown in Fig. The poor fit obtai oed by using least squares in the presence of . Because the flexibk modes arc not successfully identified. (12. this polynomial is not known and cannot be used to reduce the high frequency distortion.ery small data con. excite the system with a random signal..13. To reduce this effect. In this example.m) Y. and the new variables defined as Ut(~) = 0. estimates.1561. (~J UI. ! 2.5 3 ~o!'malJzerl freq·J~nC) {f2156) O~~\I'. the identification need only estimate one compI<x zero pair and thr<e complex pole pairs of the four disk system. (12. o 5 1 is (.7 0Jumerical Search for the \!axlmumlikehhood Estimate 533 Figure 12. 11215Ki Then the filtered leastsquares fonnularion a)~)[II«:)Y(~IJ . ( 12159) Solution.erler quantization noise. simple combined prefilter that lacks undesirable low frequency behavior." parameter>. and plot the rcsulting experimental frequency response. 11'. lowfrequency torque disturbances. o( is a very significant cause of coloration at high frequenci~s &ince From these equations.14. 12.ans) 2.'ided into known and unknown parts. from Sidman (1986) 100 10 . However.5 2 25 1 Normalized frequency (radians) it includes the action of two roots at ~ = I corresponding to the plant's rigid hody poles. 12. If we filter the data with al:1 as suggested by Eq. The plant is di. a plot of the true a(~) is shown in Fig.12 Frequency response of the four disk system found by least squares. It is colored b)' the characteristic polynomial of the plant. The poor perfonnance of least squares in reduces to the modified formulation (12. However.12.~:: 00001 this situation is caused by the fact that the equation error is not white. i:).mple. and amplifies the noise.1601. 12.15. compute the least squares estimates of the.le) = Y(:)F(~).157) 5 1 15 :: 2.13 Frequency weighting caused by the system denominator.I~)UI:)] = a((~)a.)'F(~l.5 1.1601 Figure 12.159) and Eq. The high pass portion of the bandpass filter may be chosen 10 have its zeros at ~ = I. as can be seen by comparing the righthand sides ~fEq. multiplied on both sides of Eq.
16 Frequency response of four disk system using least squares with lowpass filters and known factors. 2. from Sidman (1986) ~~~I'.534 Chapter 12 System ldentificatlon 12..aliuo freQuenc~ (radians) 3 00001 0 OOOI~5 .) 1. perhaps most important.I The identification methods described thus far have been based on transfer function models. 1. The approach is to express the data in an expanded space guaranteed to contain the state description and to extract the subspace consistent with the state equations using reliable and robust methods of numencal linear algebra. is introduced as well.5 1 25 fn:queI10' (radiam) ~~" QOOOl ! 1 ~'~L' .~ ).1ethods 535 Figure 12. x(k). H.:. In addition to these matrices. and J.5'""".5 Norm. r.) a 5 ! !. from Sidman (1986) Subspace Identification '.5 Normalized frequenl.5 2.15 Structure of modified filtered least squares with frequency constraint prefiltering.14 Frequency response using filtered least squares.ll5) 12. it would seem that this structure greatly complicates the problem as there are many more parameters to be considered as compared to the transfer function model..5 :' 2. from Sidman (1986) y rI I I I I I 1 I I .0001 00001 1.':"iormiliz.'.dians.01 001 0001 0Cl001 OClOOIO~:5''. A unification of the field has been given .5 ~1~M ~.y (r3diam) 3 I o 5 I Sorma:iloo J.·025 o 5 L 1.. Normalized fr<:quen. to be directly applicable to multivariable systems with vector inputs and outputs. the (unknown) state sequence.8 Figure 12.5 (radia. 0001 ~ 0000] o 5 ! :S:onna~:zed (ndlam. The subspacebased methods have their origins in the early work toward finding a state realization from a detenninistic impulse response as described in Ho (\ 966). The nonparamellic methods estimate the transfer function directly as a function of frequency and the parametric methods are based on representing the inputoutput relation as a rational function with unknown coefficients for the numerator and denominator polynomials.~1"05 ))0' r. At first blush. The methods have been to shown to have very desirable statistical properties and.8 Subspace Identification Methods Figure 12.'L5':'2:. An alternative formulation of the identification problem is to express the inputstateoutput relationships in state space fonn with unknown description matrices lIl.IO 001 0001 1:~f"IO .ed fre(luenl'y 1ra.5 ~ 2..5 fn'qut:n~~' 2.
Thus if we multiply Eq. the matrix U ha.c and uncertaint~ in real CJ. U. the matrix H is the first row.171 ) H<lJr J ~<lJ1I 'r H«I>'/[[ n where (12. (12. T and PI = O_T...165). . These can be identified by again taking an SVD. To thc. I' We next solve for «I> using the properties of 0. and Q so that ( 12. <IJ from which we can solve for .tate than x via a transfonnation T according to x = Tz we would haw 0_=0. (12. full rank = M.S\.I .1651 J 0 0 0 The number of independent columns in this product are the columns of P.16+1 Finally._[ ] We assume that the input signals are "exciting" in the sense that u(k) contains many frequencies and. If we wish to consider another .equence..1661 IT represents the pseudo inverse and computes a least squares solution. In order to express the constraints imposed on the input and output sequences by Eq. The method begins with a collection of input and output data u(k) and ylkl that we assume are scalars but could just as well be vectors for this method.167) on the right by Q". Y and II of . (12. \~c'd take H a~ the fir"t n rem's 18 Some author.' ° «I> = [0 r ] (') . With the. With 0. To motivate the development of the algorithm. Y= and ·1 ~:u "... u= [..' \1 ] [ (12... known to be larger than the state dimension but much smaller than the data length. which can be found by computing the singularnlue decomposition (SVD) of U panitioned as follows (12.168) 11 is a property of the SVD that the matrices P" and Q" are orthogonal matrices and consequently that the product Q. it is reduced to (/2. 11 u. = 0.. the inputstateoutput relations can be compactly expressed as (12.a:. rather thun ordinary ka~t "'quare... given by Eq..uggest u~illg totallc'asl ~quarc:. The next step is to remove the term in 'H by multiplying on the right by a matrix that is perpendicular to U. here the method described here (based on Cho ( 1993)) is called a prediction method.1671 and the unknown model is contained in the matrices 0 and H.:) ""here the (unknown) dimension of the state is n.165). this time of YQ"c by computing matrices P. ( 12. M..\11 11. a<.161).:~ . a number.>e data matrices we add the n x N matrix of . is the observability matrix with n independent columns and the M x M matrix H is an impulse response matrix. hmh ~re suhject to noi .169) + I) = <lJx(k) + [u(kl + lu(k) (121611 v(k) = Hxil.1. we define composite matrices made from the description matrices as C\ and = 'H = l Hr 0 J H[ l~:" 0 0 1 (12. :.. ( 12. If we drop the last row of 0. .tates 1 (12.II_' x. and equals the number of nonzero singular values in S which is the size of 1 which is therefore by definition 11 x n. I" (12. (12. U'~.169) is a combination of the columns of the observability matrix in the space of the state x ami has 11 independent columns.170) x = [X[I .1/[ "II . in con.~~.162) \'11. given by Eq. 0 . S.\.and call that reduced matrix 0 and drop the first row and call that then it i's clear that Q. Comparing this result with Eq.536 Chapter 12 System IdenufJcation 128 Suhspace ldentiflcaticm \1elhllds 537 in Overshee (1995) ".C'.I Q" = O.e constructions of the data and definitions of matrices.ize M x i"i as follow.163) The matrix on the right side of Eq. is selected and the data are organized into the matrice.. from which we can solve for Hand «1>. . it is assumed that this data comes from a noisefree underlying state system given by equations of the form x(k The M x 11 matrix 0. (12. and O.. l > l 17 In [he mulri\'ariabk .169) means that we can take p[ = 0.\_l .
625 7. to make. Clearly there are a substantial number of choices the engineer need. o o (12.I = O. 0.~. (12. 02.441 3.") without force are gi"en as 1. 0426 0.368 5..736 6.016 5. The main points were . We partition the matrices in this equation consistent with 1( and write it as o Either batch or recursive least squares gives a good model when the equation error is an independent white noise process... (\2.171 ) for <IJ and Eq. How clearly this choice is depends on the particular case and the other choices made in the algorithm and can be quite difficult. Figure 12.501 [ :~~ ] K'J (12. . As given.. we now tum to computing rand J by operating on Eq. Thus in practice the dimension of '1 in Eg. In important cases.167) on the right by the pseudo inverse U (which is readily found from Eq..1741 From this equation. Prediction error methods based on the maximum likelihood are among the best general methods for identification.188 8. = P.P.538 Chapter 12 System IdentificatIon 12. one frequency at a time. we have ignored the possibility of noise which is always present in any practical case. o [K t K.10 Problems 539 Having Hand <IJ..170). (\ 2. one can solve for J and I' by. we can solve for them by rean'anging the terms in the equation.'I' o J • State subspacebased methods estimate state realizations directlv and are especially effective for muhiinputmultioutput systems.172) Because I' and J appear on the right in 1( in a linear fashion. least squares again.233 Plot the points and use least squares to estimate the initial value of x.168)) and on the left by P. . 12.2 12.. including the selection of M and the selection of least squares or total least squares to solve Eg.270 5. Draw the CUf\'e (line I that corresponds to your estImates.KK4 2.167) to isolate 1(.174) for I' and J. A good frequency response model can be computed using sinusoidal inputs.414 2. and the velocity of the mass in x and in r'.762 4328 4.964 3. for example. these operations reduce the equation to C o Data to be used for identification should be filtered to reduce noise and to remove known components of the transfer function. 12. ( 12.170) is not obvious but must be selected as that value such that the sigl1ifical1l singular values an:: kept and the negligible singular values are dropped. This completes one variation of the prediction subspace identification algorithm.17 A mechanical system used in Problem 12..129 9225 10.530 3. To do this \ve multiply Eq. (12.1 Data from a mass mOVing in a plane 0 I 2 3 4 6 7 8 9 10 (x . models based on the prediction error method as well as one based on subspace methods are frequently computed and tested against new data and physical knowledge to guide final model selection. Perhaps more important than these decisions is the choice of 11 from Eq..17.388 1777 2. . Kit] = [PI P: .173f To isolate the unknowns J and I' these equations can be reorganized and written as 12.9 Summary In this chapter we have introduced some of the concepts of identification of dynamic systems for the purposes of control design. Since by definition UU' = I and P. (12.2 A simple mechanical system without friction is sketched in Fig. (12. PI(] r :1' H<IJ '1.10 Problems 12. the initial value of r. A chirp signal input coupled with the FIT pemlits one to obtain a frequency response model in one pass.550 5.499 6.
where lir.. c. However.\1 = K 1 and k~/:H = K?" Gi\'e an intuitive argument to the effect that. 1= lJ. . 10(1.' + II. = 0.All) (m .: + b.. = 0. Compare variance and bias to the theory in each case. If the .4)' and.:' t. Show that we eannot identify a and I. are functions of K...•'.tem for sampling at 0. and eompare th'e sample variance of II 10 the theoretical value based on P. and 500 samples.'ariances and a l = 0.lIl. (g) for each sample period as a measure of total estimatc accuracy.1 steps and compute where ". where Ee' (T'. What estimate of . and M from measuremenh of x.x. i..5. (c) Compute a discrete equivalent sy.1.9 Simulate the system [described in Amom and Eykhoff (l971)] b. 1'. Set up the problem so that it is possible 10 ignore the "" (e) (b) Compute the least· squares estimate of ". = ay~+hur.540 Chapter 12 System Identificatlon 1210 Problems 541 la) Show that this system is described by the equations + k.:' + b. imulation is done on a digital computer. from x I It).. 12. (12. K. II. (:1 = :.:' + b. ewn if K is known.I.6.'.. Compare the same criterion used in pan (g) and give an explanation of the results. (12.10 Suppose we wish to identify a plant that is opeTating in a closed loop as Y~~l I'.30.x.5 sec with an input that can set an initial condition on x.It.1(8). we showed that the variance of the BLUE is (A T R' A)I Use the development of the proof of the BLliE following Eq. 112. .lt.(kT)..2rhl.50. and compute IJ = [ii.1(3) to devise an expression for the excess "ariance of least squares over BLUE. and 300 samples. but compute the estimate for varying numbers of samples. if XIII = x.8 Write a computer program to implement the search for the maximum likelihood estimate following the method of Section 12.' + II.5 In Eq.l Show that if x '0> = I and X = O.. = lJA and K. X.. recompute 650 times from'different runs of noisy data. it should be possible to estimate both K.(OI = XII" x.) Show that the leastsquares estimate 6 = (AT A)'ATy results in the error squared [IY . Compute the predicted variance in the estimate of iI. (12.8~) we showed that the variance in the leastsquares estimate is T (A T A)' A T RA(A . (I) Deliberatel\' add additional noise of known variance to YOur data.')' it is impossible to estimate both K. b.1 = O. 10. = lJ.jlfl. (d) Formulate the leastsquares problem to estimate the 01 from noisy measurements ofx. Compute the transform of X. sample x. and K. 12. if x Ii' = 1 12. and 6 has 11 components.. AB )T(y  Ae }!m. Keep the number of samples fixed at 30 but vary the sample rate from 0. If available.50.' does thiS tesult r AI'A r . white noise. thenM' suggest" Hint: [fM = I . + k. and rr. ( 12.: are independent sequences of unit . .5 sec for 30 samples.13~) we showed that the maximum likelihood estimate of a' is (Y Show that this estimate is biased. in Eq. = OA and K. (a.7 In Eq..L where the parameters a.r.e come~ from an AID COIwertcr operating at 10 bits including sign. and l'....6 (Contributed by X Gupta. M. and sampling period T.'. 12.A(A ~1 "'IT (bl We wish to estimate the parameters k.(01 x.73 ] for no weighting. 12./ + b. + k.: ~ "" .1 sec to I sec in 0... add the appropriate noise according to the noise model of quantization diseu"ed in Chapter 10. Select K. Consider at least 5.3 Program the recursive leastsquares algorithm of Eq. Y~"'I = aIY~ +bjllJ: + l:krl +c[l'J. Use the algorithm to estimate the parameters of the system of Problem 12. and K::> fromJ. c. .n)rr'. (Hint: Rewrite the equations using y = XI x::.A6)1 rY .. = 1. note from (a I that if we divide by M in each equation the only identifiahle parameters arc k]/>. from observation of 5. Assume all the noi.y. \Vhat do you conclude makes a "good" initial condition? = = = = "I 12.0.6. Use IJt)1 = 0 and PiS) = I for your initial conditions. b. use the Identification Toolhm to repeat the exercise. and 500 samples.. or if 1"0> = x. and b..: <'"J 1 . ". from observation of" and 1/. (c) Compute the maximumlikelihood estimates of ".. and: = XI 0:1: 2 a" the position \·ariables.4 Give the transfer function Hi:1 of the filter that corresponds to exponentially weighted least squares as a function of" and y. What do you conclude respecting selection of sample period for identification" ih) Keep the sample period fixed at 0. + k. Prow that H (I) = 1 if" = I . Simulate the equations of pan Ia I for K.: from 5. (/. and compare the estimates to the known true values.x.8. k. at a rate of 0. 12.+ek· Ky. Y has III components.5 sec. 12..
Because the variety of nonlinear systems is so vast it is only possible here to give an introduction to the most important issues and concepts. and the frequencyresponsebased circle criterion are also important teclmiljues. for most nonlinear systems. Furthermore. Another widely used approach is to use feedback to reduce the equations to a linear form and continue as in 1 In this lext \\e 3:ioSUme that the. 19871. .  _. design a linear controller.Nonlinear Control __ . heuristic methods such as the describing function. stability of the small signal linear approximation implies a region of stability of the nonlinear system. 543 . In an approach known as Lyapuno\' redesign the engineer constructs a tentative Lyapunov function and deliberately designs the controller to force the system to realize the function which automatically pro\ides a proof that the system is stable._ Perspective on Nonlinear Control Every physical system is nonlinear for large signals.\hing behavior of Chao> IGleic'k. L'nfortunately. It is this theory that justifies the enormous attention paid to the linear case by providing the proof that. and the most important stability theory is that of Lyapunov. Alternative approaches. Beyond this result. The most primitive method is to obtain a linear approximation. I The first concern is stability. __ .model equations ha\'e unique solutions and do nOl exhibjt the astoni':. and many systems have important nonlinearities such as friction that cannot be ignored even for small signals. Lyapunov theory gives us a tool that can be used to determine further regions of stability and also can guide the design of purposely nonlinear controllers in a process called Lyapunov redesign. application of Lyapunov theory is often difficult and can be very frustrating. Design of controls for nonlinear systems may be placed in several categories. optimal control of many systems requires a nonlinear controller. including computer simulation. and use computer simulation and perhaps a stability theory such as Lyapunov's to explore nonlinear behavior.
Of course simulation finds onl~ particular solutions.1 . the solution to which represents the response of the system to spccific environmental conditions and inputs. In the last section of the chapter. the n. In thc case of a ~onlinear system. (13. sometimes we must rely on extensivc simulation alone to decide that the complete system is sallstactory. These were followed by combined digitalanalog machines and then by completely digital simulations starting in the 1960s. Finally. It is for that reason that simulation does not supplant other fonns of analysis. the circle theorem. The techniques available for analysis of nonlinear systems include computer simulation. Aithough completely digital simulation is the most common technique used today.544 Chapter 13 'innlmear Control 13..nd the second is the self~unin~ regulator approach to adaptive control. simulation can £ive us confidence that under the operating conditions expected the system is al~ost surely stable. the modelreference adaptive control (MRAC). software packages have been developed with userfriendly interfaces that have greatly enhanced the effectiveness of digital simulation. A practical approximation to minimal time control has been developed as proximate time optimal systems (PTOS J. The first i. Subcategories ~f adaptive control are gain scheduling. along with the initial conditions xU. The performance analysis phase includes examination of a particular fixed structure to determine such properties as stability. As we will see. In control engineering. Another approach to nonlinear design is to apply the concepts of optimal control to obtain a controller that minimizes a performance measure. and dynamic response to see if the performance specifications are met. the models are most often a collection of integrodifferential equations. we first consider computer simulation and the heuristic analysis methods of equivalent gain and the describing function. study of a linear approximation.re are still some applications for digitalanalog simulations.1 } A simple example will demonstrate the value of simulation. and Lyapunov\ second method. More recently. PTOS control is especially appropriate for motion control and adaptive control is widely used in chemical process control. A combination of Lyapuno\ redesign and computed torgue that extends both has recently been developed as backstepping. several important approaches to computeraided design of nonlinear systems are introduced. 13. that is. For such systems simulation is essential to study the possible responses. Electronic analog computers based on operational amplifiers were used in the 1940s and 1950s. the proximate time optimal system (PTOS) desi£n for linear systems ha\in u onh saturation of the actuator as the nonlinearity. a widely used concept is that of adaptive controL The fundamental idea of adaptive control is that the controller is redesigned online to maintain good performance in the face of a changin" environment that includes major changes in the plant dynamics. This method is known in the field of robotics as the method of computed torque. Many general purpose computer simulation tools have been developed in the last 50 years.. . solutions to the equations with specific inputs. 13.2 we consider two approaches to design by nonlinear feedback.. f). For stability. this approach is known as Lyapunm's first method. especially when one wishes to test a physical component imbedded in an otherwise cOl~puter simulation. An important design technique uses linear design methods based on a linear approximation to the plant model. Important properties such as stability or conditional stability cannot be prol'en with simulations. th.2. ChapteT Overview In this chapter. The design improvement phase consists of finding a structure and parameter set which achieve an improved tradeon among the goals and the constraints that define a satisfactory system.1. 03. In Section 13.. A wellknown case is that of minimal time control of a linear system subject to bounded controls. but also discussed are the circle criterion and the small gain theorem. equivalent gains.naIY'ls Techniqut's 545 the first case. U. inttial conditions. Although a proof of stability is always desirable. Given the description of a system by differential equations such as Eq. and the selftuning regulator (STR). even if we havc no proof or guarantee of stability.1). a simulation program will find the time histories of all the system variables xU) = f(x. and parameters.1 Analysis Techniques Final design of a controller contains two phases: performance analysis and design improvement.ain analysis technique presented is the second method ofLyapunov. Computer models vary in complexity from a few firstorder differential equations to systems vdlh thousands of state variables such as a model of the space shuttlc. describing functions. Simulation is one of thc most valuable assets to the field of control engineering and is the only general method of analysis able to find solutions to arbitrary nonlinear differential and difference equations. . control models of sophisticated systems are hybrids of differential equations interacting with dynamic digital logic. Approache' to obtaining design improvements will be covered in Section 13.) and the external inputs to the system uUj.Increasingly.1 Simulation Simulation is the process of constructing a mathematical model of a proposed or actual system and using a numerical solution of the model equations to estimate the behavior of the system. signal siLc.
4 illustrates the response with a complex input torque J.O) "'..n representing a random wind force aCling on the pendulum.' 1 1.. L the equations of motion are numencally Integrated.0 5 0.8 2 (a) 2 3 j.. common system. Also plot the response to a piecewise constant input of sampled white noise.5 5 Time (sec) Time (sec) Figure 133 Simulation~k diagram for solving the pendulum equations e Autoscall: graph 1 Gain theta • Bandlimited \!w'hite n(lj~t"" Autoscale graph + r+t+. ]\ \ 4 =w.1 Gain~ Figure 13. For a system described in Eq. Simulation allows us to lind this response. Find and plot the tesponse of thIS system for initial conditioos corresponding to e(Ol '" 0 and e.[. As a matter of facL the SIMULINK block diagram is essentially the same as would have been used years ago to set up an analog simulation where the 115 factors would ha\ e been opamp integrators.ABISIMULl:\K block dlagram drawn in Fig.5 (b) 3 3. One can see from this example how the computer software ha~ been constructed to altO'\" one to setup the simulation in a very intuitive \yay from the equations.2) ( 13 . v7!77 o 0.5 4 4. It is clear however that for an inverted pendulum (II '" .4 16 1.1 are gIven by . To perform a simulation of the forced pendulum in Example 13.1). whereas a closedform solution would be impossible. The time histories for the angular position and velocity of the pendulum are shown in Fig. the system appears to be linear. (13..C0~n1_. .1 51\ 0. .8 o 0. Cse the parameters I> = 0. while closedfoan solutions to arbitrary inputs are impo"ible... 1 \ I \ / \ 1/ \ v "\ : / !/ \ r I .25.00.. It is a fact that for even such a simple.I \ I 1\ \ I 1\ I \ V v a 0.6 0.. Q' = 100...+ lis Integrator Intcgratorl I/s MATL.1 A simple pendulum (a) schematic (b) block diagram ot pendulum dynamiCs Gainl m (a) (b) .1 The equations of motion for the simple forced pendulum shown in Figure 13. A reasonable intuition is that if this simple secondorder system is difficuli tll sol ve analytically. The homogeneous solution r7"" = 0) is a complicated Bessel series. 1\ !I\ \ '/ 3 2 1 1\ I i I '\ 1 7 I o 1 0..15 0.4 0.[) the system is anything but linear as it hangs up near the initial at the stan. 1\ where b is the coefficient of drag (or viscous friclionf and Q = is the oscillation frequency for "small" initial conditions I near H = 0 I._l'f~un'::c:'. 13.2 as obtained by the MATt. 13.2 1.2 0.3.2 Analysis Techniques 547 • Example 13. IV 11 I 2 r 1/\ I \ ..inlthel<J.J. K.tl'. Many general integration schemes have been developed to perform the task. Solution. the closedform solution is very difficult to obtain. 2 0..0 5 O. Csing simulation we can find the response ofthe system to arbitrary inputs easily. For "small" motions where sin Ii '" Ii and with 110 input torque. and mt" = 1.'vB l. then closed solutiOn> for higherorder systems with elen one nonlineaoll will be very difficult if not impo"iblc to find.l' 8 O.es