You are on page 1of 382
THIRD EDITION + Digital Control - of Dynamic Systems Gene F. Franklin Stanford University J. David Powell Stanford University Michael L. Workman TBM Corporation {| ‘AV ADDISONWESLEY An imprint of Adelson Wesley Longman, nc. Eeitrial Asst, Ryden Tamora Proje tlly McLean. Als Senior Pracow Editor Terie Campus, Eigentype Composter ‘Arc and Design Superson. Kevin Bey Cover Desir. Wo Ricsbon Manicrng Supervisor. lant Weaver Htratons sien Mts Conor Seve Fest ‘race Salman cor Aris reseed, No pat of his publication may be tered or tnt in a dase o ‘evel systemor anit, ety Tor ory ay mean tron, mechani. phocopsing coring or other, tht the prio rien erent publi Printed i tbe United States of Areca. Prted sian sh Cann, jah © 19HR. Addon Wesky Longman, ne Many ofthe designations eed by mantictnes and sellers to dng cept ne claimed as remarks Where hoe designations spear inthis ok, nd. Adon Wesley ‘ers avate of remarkclam, the designation hae bee rine in inal ap ein al ep Mar. is repre rademark of The Mth Werks Ins 2 Pre Park Way, Nath, MA 01760 152. Pune (50) 653415 Fan (508 6522997 Emi nfo@mahworks com Cover Pho: Telegraph Colour Libra/FPG Intraioal LL. Library of Congress Cataloging-n-Publcation Data Dial onto of dymamic systems / Gone F Franklin, 3. Dad Powell Miche! Workman add incl nie Dipl sm seme. 2, Dynamics Powel 3. Dani 938-1 Waki, Michel Tie TEMS 997 si9s'9- de mses cP nstructional Material Disclaimer: “Te programs reentedinhis hook ve been included fort itn ale Tey thn Boe toned with a ur ae ot guarsmse or any pasta pps efnerthe fublnnerer the author fer any marae orerescoaons. Go ey wep wy Fsis with respect tothe ropa. 1$0N0-201- 331525 23456789 10-MA-01 00999897 Addison Wes Longman. te. ‘Mento Park. CA 94025 Additional Addison Wesley Longman Control Engincering titles: Feedback Control of Dynamic Stems. ‘Third Editon, O-201-52787-2 Gene F Franklin and J David Powell Modern Contr Sestems Fighth Edition, 0-201-30861-9 Richard C. Dorf and Robert H. Bishop The Ar of Control Engineering 0.201-17545-2 ‘Ken Dutton. Sieve Thompson, snd Bill Barraclough Introduction to Robots. Secon! Edition, 0-201-09529-9 Joh J.Cra Fussy Cone 0201-1807. Kevin M. Passino and Stephen Yurkovich Adaptive Control. Second Edition, 0-201-5S866-1 Karl J, Aston and Bjoen Witenmark Control Ssstem Engineering. Second Edition, (-8083-5424-7 ‘Noman §. Nise Computer Comtol of Machines and Processes, (0201-10645-0 John G, Bollinger and Neil A. Dutle Multivariable Feedback Design (0-201-18283.2 Jan Macigjowski + Contents - Preface xix Introduction 1 12 13 14 Le Rev Problem Definition — i Overview of Design Approach 3 Computer-Aided Design Suggestions for Further Reading Summary 8 few of Continuous Control 11 Dynamic Response 11 2.141 Dilferential Equavions 12 2.1.3 Ouput Time Histories 1 2.1.4 The Final Value Theorem 15 2.1.5 Block Diagrams 15 2.1.0 Response versus Pole Locations 2.17 Time-Domain Specific Basie Propeties of Feedback place Transforms and Transfer Functions Conenss 2.2.1 Stability 22 2.2.2 Steady-State Erors 23 22.3 PIDConwwol 28 23 Root Locus 24 23.1 Problem Definition 25 23.2 Root Locus Drawing Rules 26 233 Computeraiced Loci 28 24 Frequency Response Design 31 241 Specifications 32 24.2 Bode Pio Techniques 34 243 Steady-State Erors 95 24-4 Stability Margins 35, 245 Bode’ Gain-Phase Re'ationship 246 Design 38 Compensation 39 26 State Space Design 4 26.1 Control Law 42 2.62 Estimator Design 46 2.6.3 Compensation: Corbin Contral and Estimation, 264 Reference Input 48 265 Integral Control 59 27 Summary 50 28 Problems 52 Introductory Digital Control 57 3 Digitization 58 3.2 Fflectof Sampling 63, 33 PIDContral 66 34 Summary — 68 35 Problems 69 Discrete Systems Analysis 73 4.1 Linear Dillerence Equations 73, 4.2 The Discrete Transfer Function 78 w CContens xt 42.1 TheeTransform 79 The Transfer Function 80 2.3 Block Diagrams and State-Variable Descriptions 24 Relat of Transfer Function to Pulse Response 9% 5 External Subillty 93 43 Discrete Models of Sampled-Data Systems 96 43.1 Using he ecTransform 96 43.2 ‘Continous Time Delay 99 4.3.3 Siate-Space Form 101 43.4 “State Space Models for Systems with Delay 110 43.5 ‘Numerical Considerations in Computing ® and 114 36 ‘Nonlinear Models 117 4444 Signal Analysis and Dynamic Response 119 S41 The Unit Pulse 120 44.2 The Unitstep 120 443 Exponential — 121 $44 General Sinusoid 122 4.4.5 Correspondence with Continuous Signals 0 Step Response 128 43 Frequency Response 131 45.1 “The Discrete Fourier Transform (DPT) 134 4.6 Properties of the z-Transform 137 46.1 Essential Properties 137 ransform 142 46.2 *Convergence of z 403 inother Dersation of the Tansler Function 146 47 Summary 148 48 Problems 149 Sampled-Data Systems 155 5.1 Analysis ofthe Sample and Hold 158 5.2 Spectrum of a Sampled Signal 160 5.3 Data Extrapolation 164 + Bloc tagram Analysis of Sampled-Data Systems 170 5.5 Calculating the System Output Between Samples: The Ripple 180 a xi Concent 5.6 Summary 182 57 Problems 183 5.8 Appendis 186 Discrete Equivalents 187 6.1 Design of Discrete Equivalents via Numeral integration 189 62 Zero-Pole Matching Equivalents 200 63 Hold Equivalents 202 63.1 Zeto-Order Hold Equivalent 203 63.2 A Non-Causal Firs-Order-Hold Equivalent The Triangle-Hold Equivalent 204 64 Summary 208, 65 Problems 209 Design Using Transform Techniques 211 7.1 System Specifications 212 7.2 Design by Emulation 214 7.2.1 Discrete Equivalent Controllers 215, 7.2.2 Evaluation of the Design 218 7.3 Direct Design by Root Locus in the z-Plane 222 73.1 gPlane Specifications 222 73.2 The Discrete Root Locus 227 7.4 Frequency Response Methods 234 74.1 Nyquist Subibiy Crterion 238 74.2 Design Specifications inthe Frequency Domain 243 7.43 Low Frequency Gains and Ereor Coefficients 259, 744 Compensator Design 260 7.5 Direct Design Method of Ragaezini 264 7.6 Summary 269 17 Problems 270 Design Using State-Space Methods 279 8.1 Control Law Design 280 Contents xii BL Pole Placement 282 8.12 Controllability 285 8.1.3 Pole Placement Using CACSD 286 82 Estimator Design 288 82.1 Prediction Estimators 290 82.2 Obseradilty 295 82.3 Pole Placement Using CACSD 294 824 Curent Estimators 293, 825 Reduced Order Estimators 299) 83 Regulator Design: Combined Control Law and Estimator 302 83.1 The Separation Principle 302 183.2 Guidelines for Pole Placemem 308 844 Iniroduction ofthe Reference Input 310 BA.L Reletence Inputs for Full-State Feedback 310 84.2 Reference Inputs with Estimators: The Stae-Command Structure 314 843 Output Enor Command 317 B44 A Comparison of the Estimator Structure ‘and Classical Methods 319 85 Integral Comtol and Disturbance Estimation 322 85.1 lavegral Control by State Augmentation 323 852 Disturbance Estimation 328 86 Effect of Delays 337 86.1 Sensor Delays 338 862 Aciator Delays 41 87 *Conttolabilty and Observal 88 Summary 331 89 Problems 352 Multivariable and Optimal Control 359 9.1 Decoupling 360 9.2 Time-Varying Optimal Control 364 9.3 LQR Steady-State Optimal Control 371 93.1 Reciprocal Root Propenies 372 9.3.2 Symmetric Root Locus 373 a xy Contests 10 11 9.33 Figenvector Decomposition — 374 9.3.4 Cost Equivalents 379 9.3.5 Emulation by Equivalent Cost 380 9.4 Optimal Estimation 382 94.1 LeastSquares Estimation 383, 94.2 The Kalman Filer 369 94.3 Steady 944 Noise Matrices and Discrete Equivalents ate Optimal Estimation 364 Multivariable Control Design 400 9.5.1 Sélection of Weighting Matrices Q and Q, 95.2 Pincer Procedure 4K 915.3 PaperMachine Design Example 403 396 9.54 MagnetieTape-Drive Design Example 407 96 Summary 419 9.7 Problems 420 Quantization Effects 425 10.1 Analysis of Round-Off Error 426, 102 Elects of Parameter Round-O 45 103 Limit yelesand Dither 440 104 Summary 445 10.5 Problems 445 Sample Rate Selection 449 11.1 The Sampling Theorem’ Limit TL2 Time Response and Smoothness 451 11.3 Errors Due to Random Plant Disturbances 454 11.4 Sensitivity co Parameter Variations 461 11.5 Measurement Noise and Antiiasing Fiters 465 11.6 Multizte Sampling 459 L7 Summary aT LLB Problems 476 12 system Identification 479 12.1 Delining the Model Set for Linear Systems 481 2.2 Kdenifcation of Nonparametric Models 2.3 Models and Criera for Parareiric Wenufication 495 1231 Parameter Selection 496 1232 Error Definition 498, 124 Deterministic Estimation DAL Least Squares 503 1242 Recursive Least Squares 508 12.5 Stochastic Least Squares 510 126 Maximum Likelihood 521 127 Numerical Seach for the Maximumn-Likeibood Estimate 12.8 Subspace Identification Metbods 305 129 Summary 538 12.10 Problems 339 13> Nontinear Control 543 5.1 Analysis Techniques 544 13. Simulation 545 15.1.2 Linearization 990 13.13 Deseribing Functions 13.14 Equivalent Gains 3.1.5 Circle Criterion 9 13.16 Lyapunov’ Second Method 379 3.2 Nonlinear Control Structures. Design 382 152 15.2.2 Time-Optimal Servomechanisms 399 15.23 Extended PTOS for Flewible Structures 611 13.2.4 Imroduction to Adaptive Corerol 613 ation: Inverse Nonlinearities 582 ho 63 33 Design with Nonlinear Cost Funeti 3.3.1 Random Neighborhood Sea 134 Summary 62 135 Problems 683 xvi Contents 14 Design ofa Disk Drive Servo: A Case Study 649 141 Oreniewof Disk Daves 650 Performance Disk Dive Servo Profile Drive Seva 64 14.2. Components and Models 1421 Voice Coil Motors 655 14.22 Shoned Tum 658 1623 Power Ampliler Saturation 659 424 Actuator and HDA Dynamics 660 14.2.5 Position Measurement Sensor 663 142.6 Runout 66+ +3 Design Specifications 666 1 Plant Parameters for Case St 1432 Goalsand Objectives 660 4 Disk Servo Design 670 Design 667 14.4.1 Design of the Linear Response 671 14.42 Design by Random Numerical Search 674 1443 Time-Domain Response of XPTOS Structure 678, 14.444 implementation Considerations 683 145 Summary 686 146 Problems 68 Appendix A Examples 689 A Single-Anis Satelite Atitude Control of A2 A Servomechanism lor Antenna uth Control 691 A3 Temperature Conttol of Fluid in a Tank 694 A4 Control ough a Flexible Structure 697 ed Flow Box 699 A5 Control ofa Press Appendix B Tables 701 BLL Properties of -Tran B.2 Table zeTransforms 702 Appendix C A Few Results from Matrix Analysis 705 CAL Determinants and dhe Matrix Inverse 705 2 Eigenvalues and Eigenvectors 707 a Appendix D Appendis E Appendix F C3 Similarty Transformations C44 The Cayley-Hamilton Theorem TIL ‘Summary of Facts from the Theory of Probability and Stochastic Processes 713 D1 Random Variables 713 D2 Expeetanion 715 D3 More Than One Random Variable 717 D4 Stochastic Processes 719 ‘Marian Functions 725 Differences Between MATLAB v5and v4 727 F.1 System Specification F.2 Continuous to Discrete Conversion 729 F3 Optimal Estimation 720 References 731 Index 737 xii + Preface + “This book is abou the use of digital computers inthe real-time con of dynamic systems such as servomechanisms, chemical processes. and vehicles that move lover water, land. aif, oF space. The material requires some understanding of the Laplace transform and assumes thatthe reader as studied linear feedback controls. The special topics of discrete and sampled-data system analysis are {nroduce. and considerable emphasis s given tothe <-ransform andthe lose connections between the =-transform and the Laplace transform “The book's emphasis ison designing digital controls to achieve good dy baie response and small ertors while using signals that are sampled in time land quantied in amplitude, Both transform (classical contr) and state-space {anodem control) methods are described and applied 10 ilustative examples. The transform methods emphasized are the root-locus method of Evans and frequency response, The root-locus meth can be used vitually unchanged forthe disee fase: however, Bd's frequency response methods require modifieation for use ‘wth discrete systems. The state-space methods developed are the technique of pole assignment augmented by an estimator (observer) and optimal quadratic= {oss control The optimal contol problems use the steady-state constantgain solution; the rests of the separation theorem in the presence of noise are stated but not proved Each of these design methods —classcal and modem alihe—has advantages and disadvantages, sengths and limitations tis our philosop rust understand al of them to develop a sasfactry design withthe leas effr. ‘Closely related tothe mainstream of ideas for designing linear systems that, result in satisfactory dynamic response are the issues of sample-rate selection. model identiation, and consideration of nonlinear phenomena. Sample-rate Selection is discussed i the context of evaluating the increase n least-squares performance measure asthe sample ai reduced. The topic of model making is treated as measaremest of frequeney response, aswell a east-squaes parameter tstimation. Finally, every designer should be aware that all models ae nonlinear vex Prete sdb amir withthe concep of te desribing function nonlinear tems metho of staying stability of nonlinear sem. andthe hase concep of taline deen Materia tat may be cw othe stdem is threaten of signal wich re sot in ine ad pti an ish mst eo ih hse tht con tna in both dimensions. The pilosophy of peesematon shat ae ae shouldbe ciel teltedto mater ead amie and ye by heed. nde 8 ieton toward wider hoes. This apo ad for example the cannsfom tothe Lpice wansform anodescnbe he mpleaton ples tnd eo nh pe he own reas ached ple sd the pane, Also. in developing the design methods, we rele te dial comet design mets thos of onic tens For ore sophicaed methods we psn the elerenary pre of quadratic os Gaussian design with inal Proust give some ea of how hs perl mead is sed and 1 ote furthest of ts theo These ofeompucraie design (CAD) snes or practi in ths eld. asin mow oer elds We have recognized tk fet and prove fuidance to the reader so tht leaming the contolsanalis mtrial Can Be Inept wih eight comput the anes ith Mat Ath widely used CAD sottnaze poche nies. In mang cass epeally ‘he cate chapters, cal MATA sr acide nthe eto explain how to cary ot acaleuition Io cnet MATLAB ote imply tamed or reference Al th ratte given ae tule in Append ores) tere thet: is Wk canbe sed aac amo os Ma in con calculations as wells fo conta systems als In show, we hate ted deserbe he ene roe fom lean the concep fo computing he Ses ress. ut wehasten oath manor tha i ade ea he shy compe ipl ss yh oars esses Gan be judged. The Fst Law of Computer for engineers rerun “Carbe ‘Garbage Out.” " " “arses Mos of the graphical gues inthis thi eon were generat using Marat® supplied by The Mahserk, In, The es that reared the are are valle rom Aton Wesley Longa pa com ram The Mathworks Ine. tpmathnorkscon/pubBooksantin The easer encouraged Use the MTA gr ks an nal oe naming how a pet he To review the chapter brily: Chapter Icons incodutory comment Chapt 2 and 3 are new to he hit enon. Chapter 2s a evew of he pe equi continous coal: Chapter todos he ey effec fai order to elcidate many ofthe tps that follow. Methods near anal presented in Chaps hgh 6 Chap pesens the stato. Chapter insodces combined dsete and continuous systems he sapling these and the phenomenon of aliasing, Chapter 6 shows methods by sich t0 gen trate discrete equations tht wil approximate coninuous dynamies. The base ‘dterminisue design medhods are presented in Chapters T and 8—the root-tocus lind feaquency cesponse methods in Chapter 7 and pole placement and estimators in Chapter 8 The sate space material assumes no previous acquaintance with the phase plane or state space, and the necessary analysis is developed from the round up Some faniiary with simoltaneous linear equations and matix noi Fon s expected and few unusual or more advanced topics such as eigenvalues tigenvectos. andthe Cayley-Fumion theorem are presented in Appendix C. ‘Chapter 9 inaduces optimal quadatic-oss control: First the contol by sate feedback is presented and then the estimation of the state inthe presence of System and measurement tse is developed. based ona recursive least-squares estimation derivation Tn Chapter 10 the nonlinear phenomenos of amplitude quantization and its effets on system ertor and sfstem dynamic response are studied, Chap- ris and design guidelines forthe election of the sampling period in a digital control system. Tublizes the design methods Uiscuseed in Chapters 7. 8. and 9 in examples ilutrating the elfects of sample rate, Chapter 12 intrdoces both nonparametic and parametric identification Nonparametric methods are based on spectal estimation. Parametric methods tre introduced by starting With deterministic leas squares. inwoducing random trots and completing the solution with ap algoritim for maximum likelihood Sub-space methods are also introduced fr estimating the sate matrices directly. Nonlinear control i the subject of Chapter 13. including examples of plant non Tineartes and methods forthe analysis and design of controllers for nonlinear models, Simulation. stability analysis, and performance enhancement By non Tinear controllers and by adaptive designs are also included in Chapter £3. The chapter ends with a nonfinear design optimization alternative to the techniques presented in Chapter 9. The fnal chapter, 14, isa detailed design example of @ Lista servo fora disk drive Bead, Table P shows the differences between the second and third eitions ofthe Book. For purposes of erganizing a course. Fig. Pl shows the dependence of materia in each chapter on previous chapers. By following the solid fines he fader will have all the Background required (0 understand the material in & pparicular chapter. even ifthe path omits some chapters. Furthermore, sections Iria star(®)are optional and may be skipped with 0 los of continuity. Chapters Thuy al be shipped, as suggested by the dashed line. ithe reader s willing 0 take some details on faith: however. the basi ideas of de later chapters will be ‘understood along these paths The frst seven chapters (skipping or quickly reviewing Chaps a comfortable one-quarter course that would follow a course in continuous ear ‘Control using a text such as Franklin, Powell and Emami-Naeini (1994), For a fnesementer course, the frst eight chapters representa comfortable load. The ter IT presenss methods of ana soxil Preface Preface xl ‘able P1 Comparison ofthe Table of Contents — this third edition i thatthe optimal como! material no longer depends on the Sd Eden snd eden least-squares development nthe system identification chape, thus llsing for tere Somer cane tne fen intheceqence of eaching ee Tvhcs been found at Sanford tht is sry wef supplement he eres oe : wid brary vk to cahance len A sey stlsatory complement of treecur gl es Hi : Toratry equipments aia computer having en AD apd a DIA comer Dla anosenstestamtom > So analog cempue or equate) oth fen operons! amplies. a aal Serie eer : 3 Storage ssp anda CAD package capable of prong th basic computations Seca ‘ i Sniping apt, deseupuon of the abort eipment and expen pears mister : 1 Stor deseribedin Fain and Powell Conta Suton Mine (198). Mattvanable and Optimal Conte! : é There are many important topics in conrol that we have not been able 0 Stacia hese 3 : inte nth book Teves fr example, 0 dscansion of tu anal} of Spel ian eo ‘ig, incar mats ina or convex optimization Ts our expectation, Sprem ecicaon 2 : Power ht carl stody of is book wl posi he stent engineer with ee soe fSund bas for design of samped-Jata conto ands foundation forthe sty paneer 2 Af nese and many ther advanced rps this most exiting fel - + aninadot wc won. we wish acoder of conn on tone werk ou Ovn pesto st Te In of erences Srna ian ot se heme ae eb On oe pralee EAS gent ape o Pras Soya, A gon R. Cannon Tc He an Shock oe i alate suggestion fo te bok a S GIST str ongtne coue Pra Dan Debi ohn acl ein cee santas Wet wa ocrpresourapeciton fo ay AIM econ caret nd fre eens OF 207 an E28. for hom his st was waite Tyas we not an he fling people thie eviews oc te mann: Fed Buy. Cnr of Mest bn Fleming. Tees Maks Uanontg. 8 Para Rice Unversy. Wil Peis, Unverty ac ates Con Cts User Waler Higgins sons Sa Uc: San lotmon Lehigh Uns: Tomas Kafe, Georgi Fa of Tehnngy Septen Py. ase West Reserve Unersty. Cans Cesuotiveuiy T Stahasan, Wiles Unersy; Hal Tap ein at Atrot: Ross akan Une of New ean td Gat) Sn, Okabona Sie Unves. Ticks expres or spreciaon to Laura Cs. Eile Bar. nd ey ane asm oe ee quy poduton ote Dok ee Sno, Calfonia corr iD ww Figure ra content of a second cure h 8s many possibilities. Oe possi sto combine hates 8 ad 9 wih Chap 0, 12. Aa ca be sen fom he Bre peopel ‘exist for including the material in the last five chapters. For a full. ear corse al ourzen chaps a be covred. One of the ange dein a -l- Introduction A Perspective on Digital Control “The contro of physica systems with a digital computer or microcontolier is ‘becoming more and more common. Examples of electromechanieal servemech- nisms exist im airrat, automobiles, mass-transit vehicles, oil refineries, and piper making machines. Furthermore, many new digital contol applications are Femng simulated by microprocessor technology including control of various as pects of automobiles and household appliances. Among the advantages of digital [proaches forconiro are te increased lexility of the contol programs and the decision-making or opi capability of digital systems. which can be combined ‘vith the dynamic conto function to meet other system requirements. In addition, ‘one hardware design can be wsed with many different software variations on a road range of products, thos simplifying and reducing the design time. Chapter Overview In Section 1.1. you will learn about what a digital contol system is, what the ‘Spica sracture is. nd what the basic elements are. The key isues are discussed fd aneverview of where those isues are discussed inthe book is piven, Section 12 discusses the design appreacis used fr distal control ystems and provides an overview of where tbe different design approaches appear inthe book. Con puter Aided Control System Design (CACSD) issues and how the book's authors Fave chosen to handle those issves are discussed in Section 1.3. 1.1. Problem Definition “The digital controls studied in this book ate for closed-loop (feedback) systems Jr the dyramis reponse of the proces being conta @ mar com sideration in the design. A typical structure of the elementary type of system 1 Se 2° Chapter) troduction Figure 1.1 Black agian of abasic digtal convo yter that will Py most of ovr attention is sketched schematically in Fig. 11, This figure will belp to define our basic notation and to introduce several features that istingush digital consols fom those implemented with analog devices, The process to be controlled (sometimes refered to asthe plant) may be any of the Physical processes mentioned above whose satisfactory response requires contr By “satisfactory response” we mean thatthe plant output, y(t). is abe forced to follow or tack the reference inp. r(F), despite the presence of disturbance inputs to the plant an() in Fig. 1-1} and despite eros inthe sensor {v(¢) in Fig. 1.1. Ii also essential chat the tracking succeed even i the dynamics of the plant should change somewhat during the operation. The process of holding 10) close to rt), including the ease where r= 0, is referred to generally 35 ihe process of regulation, A system that has good regulation in the presence of disturbance signals is suid to have good disturbance rejection. A system that has good regulation in he face of changes in te plant parameters is sad 10 have Tow sensitivity to these parameters. A gystem that has both good disturbance rejection and low sensitivity we call robust “o 1 on Lt] tare 20 ea {Sao oracatr opt up eee 2S a npeteontc Soa anen eharataats ore sample plod 11. Problem Definition 3 "The means by which robust repulation isto be accomplishes is through the ‘control inputs to the plan [u(?) in Fig. 1.1). It was discovered long ago! that {scheme of feedback wherein the plant output is measured (or sensed) and Compared directly wit the reference inpat has many advantages inthe effort Gesign robust controls over systems that do not use such feedback. Much of our teffor in Tater parts ofthis book will be devoted to illustrating this discovery and ‘Semonstrating how to exploit the edvantages of feedback. However, the problem ‘of contol as discussed thus fri n no way restricted to digital control For that ‘we must consider the uniguefestures of Fig. I. introduced by the wse of digital device to generate the contol scion "We consider fist the action of the analog to-igital (A/D) converter on a signal This device aets on a physical variable, most commonly an eletrical ‘Voltage, and conver it into a stream of numbers. In Fig. I. the A/D converter fet on the sensor output and supplies numbers to the digital computer It is ‘Common for the sensor outp,¥, tobe sampled and to have the error formed in the computer. We need to know the times at which these numbers ative if we are to analyze the dynamics ofthis system, Tn this book we will make the assumption tha all he number arsve with the same fixed period T, called the sample period. In pracic. digital contol sys- {ems sometimes have varying sample periods and/or dierent periods in different feedback paths. Usually there is clock as pa of the computer logic which sop- plies pube or interruptevery T seconds. and te A/D converter sends a number fo the computer each time the inerrup arrives. An alternative implementation is ‘imply to access the A/D upon completion of each eycle ofthe code execution. {scheme often refered to as free running, A further alternative isto use some ‘ther deviee to determine a sample, uch as an encoder on an engine crankshaft that supplies a pase to triggee a computer eyele. This scheme is refered 10 as fevent-based sempling, Inthe frst case the cumple period is precisely fixed: in fhe second case the sample perio is essentially fixed by the length of the code providing no logic branches are present that could vary he amount of code e cute: i the third case, the sample period varies with the engine speed. Thus in Fig .1 we identify the sequence of numbers into the computer as (47). We Conclude from the periodic sumpling action ofthe A/D converter that some of the signals inthe digital contro system like (47), are variable only at discrete times. We all these variables digrete signals to distinguish them fom variables ike w and y, which change continaously in time. A system having both discrete and continuous signals is called a sampled-data system, Tn addition to generating @ discret signal. however. the A/D converter also provides a quantized signal. By this we mean that the output of the A/D Eomerter must be stored in digital logic composed of a finite numberof digits. ‘Most commonly, of cours, the logics based on binary digit (i. bits) eomposed Rippon by Boe 95). 4 Chapter | tivo Figure 12 Pot of output versus the WD convener ‘of0"sand 1s butte essential festure is thatthe representation has nite muraer (of digits. A commen situation i thatthe comsersion of y 40 3s done so that § «can be thought of asa number with fixed number of places of accuracy. If we plot the values of versus the resulting values of # we ean obsain a plot like that shown in Fig. 1.2, We would say that § has been iruncated to one decimal place, or tha § is quantized with a q of 0.1. since § changes only in fixed quanta of in ts ease. 0.1 units. (We will use q for quantum size. in general.) Note that «quantization i @ nonlinear funtion. A signal that is both diseete and quantized is called a dighal signa Not surprisingly, digital computers ia this book process digital signals In areal sense the problems of analysis and design of digital controls are ‘concerned with taking account of the effects of the sampling peiod T and the {quantization size q. If both T and g are extremely small (sampling fequency $0 or moe times the system bandwidth with 96-bit Word size), digital signals ‘ate nearly continuous, and continuous methods of analysis and design can be wed. The resulting design could then be converted to the digital format for implementation ins computerby using the simple methods deseribed in Chaper 3 forthe emulation method described in Chapter 7, We wll be interest inthis tex in gaining an understanding ofthe effects of all ample rats, fast nd slaw and the effects of quantization for large and small word sizes, Many systems are originally ‘conceived with fst sample rates. and the computor is specified and frozen early inthe design cycle; however. as the designs evose, more demands are placed om the system, and the only way to accommodate the increased computer load i 0 ‘iow down the sample rte. Furthermore, for cos-sensitive dig systems, the best design isthe one withthe lowest cost computer that will do the requized job That canslats into being the computer with the slowest speed and the smallest word size, We will, however teat the problem of varying T and q separately We first consider q to be zezo and study discrete and sampled-dats (combined discrete and continuous) systems that ae linear. In Chapter 1D we will analyze siasing 12 12. Overview of Design Approach 5 in more detail the source and the efests of quantization, and we will discuss in ‘Chapters 7 and 11 specific effects of sample-rate selection. ‘Our approach to the design of digital coniols is t assume a background {in continuous systems and t relate the comparable digital problem co its con tinwous counterpart. We will develop the essential results. from the begining, inthe domain of discrete systems, but we Will call upon previous experience in continuous-system analysis and in design 10 give altemative viewpoints and deeper understanding ofthe ress. order wo make meaningful hese references toa background in continuows-system design, we will review the concepts and ‘efine our notation in Chapter 2 Overview of Design Approach A overview ofthe path we plan 0 take toward the design of dita contol ‘il be usc before me ben the speci dull. mentioned above, we ce stems of nret in hee cateorcs according tthe nate ofthe sigaals Pesce These are drt systems sompled-Jata stems. and iil sens inarete system al sinas vary a actete nes ol. We wil analyze area in Chap an develop the canoe of discrete signal nd “pus {Taner unetons fr ier constant dsret sytem We aso develop derek ofr forcuonsefcntinuou sytrs tht rsp sens tha ne called ‘Ripe dre sysens, We develop the equations an give examples sing bah anor methods and ste space scons. Having the dsrete tanfe oct we consider he suc ofthe dynamic response of asrete systems ‘taped ssem has bath eee andeonnaos sal, an fen ‘camp toe ble compat he cing tine esponse. Fo example {Litas sampling te thes canbe sgifcant ipl tween apenas Station resid in cher ee ne acne ithe ston of da exrapolason o comer cree signal thy might emerge fom Shot competr ine the comnts signal necessary Zor proving the input sae ot ate plants deseried ove, Ths action Spel) ccus in connection Sih the DIA comesson ln aon to data exeapolain. we conser the “aaa of amped sas fom vice comin as Fr is ipo we moc imple nodulation sod of sampling nd we we Faunce anavniso sve lear picture forthe ambigiy tat an arse between Eontnuas sad ares sgnal also kro aliasing The ps ot that frre an oe continous ial ca elt inexact the sae ample ale. sal gral sya requency 7, haste same samples 5 asus yo dijeren eqeney fsa woe anal fA cca of aasing the Snptng theorem sich species the condtons necessary this ambit is Toren nd only ne Continuo signalled 0 corespond 10 gen seco samples 6 Chapeer dial ters AS a special ue of de systems and as he bass fer he emlaion design method we consider dre equaens fo ceniavns see, hh icone apc fhe el fg ters Dia eae ocr systemy Sesged prices dr sgn sch fehion ate igi ee Sigal cmpter for example canbe edo eae comin er Oa taunt in Chapter weoncentt onthe ea cc trig eto fda cons oa ompeer tar ain bth tasfon mets nd tat space mols ae developed understanding and computation of particular cases of interest, ae ° Once we Ave developed the ol sass fer dee and sampled sys we can begin eno feedback ont He we dive or es ges no to estegors transorm and tate space’ mass In Chapter? Sau) the aa mods ofthe san he eqn rage ts ey canbe ned 0 design gal contol ses. Te eof tte ape tengue or dese since Chap For purposes of unlersanng the dig mtd we ly ain pak placement chen rfc Clset-op pesto hein stable loos, We discus he leon of the Ses pl tat nd pt ut te avenge of xing the epee ontel metals covered Chaper Chap ids ote Seg ng eock Ofal he ase varies well thas or estating esa rat that oratve sensors day on thm: In hae 9th peo optima trols inrcewitcmpbsso th stead tae sito fora constant Siete sen with quae tne foes, The els ea abe pa ofthe descr pert dae nly tcc preset a forhaing malariae dng Asay oqunieaton cet in Chapter 0 ino tesa nd nal modo describ a meted for esig the"ierge” eects fh mp onc ‘The lestfor chapter cove ae aaned pics that reset foros compte design. Te rst ofthese topes bse ae selec, enn! in Cape I ureter soap ne develop etn for exaning he tec ferent supe res, burn ts chap ne ae etme the usin af sap et design paste In Che 12 we inves Sytem neato. Hehe mater of model maka eed te OF experiment dato Seniy and comet tert tel O 1 PY ‘yam desciption aed ony on apap daa One most slneatay ofthe oneps mths erm fed cin be cover of cou epee meth es gure an some of he concep of atin elo tn Chaps 13, oduct oth mst pan ses apd ectiges foc the mls abd design of alos mle sem ge Te he Lge a Farr anor eee systems, ‘sca mide snl bor es See een espace Me ce ‘eprscetaon Chapada etn seen pelo Chae 8 a 13 Dials onto Tootbox 4 14 Suggestions for Further Reading 7 in, and analysis methods treated are the describing function. equivalent tineatiza Lyapunov’ second method of stability analysis. Design techniques described are the use of inverse nonlinearity, optimal contel (especially time- optimal conto, and adaptive control. Chapter 14 includes acase study of adisk-rive desig. and treatment ofboth implementation and manufacturing issues is discussed Computer-Aided Design AAs with any engineering design method, desig of contol systenis requires many ‘computations that ate greatly Facilitated by a good library of welldocumented ‘computer programs, In designing practical digital contrel systems, and especialy in iterating throu The metxts many ties to meet essential specifications, an ineractive computer-aided control system design (CACSD) package with simple access to plotting graphics is crucial. Many commercial contol system CACSD packages are available which satisfy that need, MATLAB™ and Matrix, being two very popular ones, Much of the diseussion in the book assumes tht a de signer has access to one of the CACSD products. Specific MATL routines that can be used for performing calculations are indicated throughout the text and in some cases the full MATLAB command sequence is show, All the graphi cal figures were developed using MATLAB and the files that ereaed them are Contained in the Digital Control Toolbox which is evailale on the Web at no ‘charge. Files based on MATLAB ¥4 with Conirol System Toolbox v3, a8 well {files based on MATLAB v5 with Control System Toofbox vs ae available at ‘tp methworks com/pubybaoks tranklin/igital. These figure files should be beipful in understanding the specifies on how 10 do a calculation and are an important augmentation to the book's examples. The MATLAB statements inthe text ae valid for MATLAB v5 and the Control System Toolbox v4. For those with ‘older versions of MATLAB, Appendix F describes the adjustments that need 0 be made ‘CACSD support fora designer is univers: however it is essential that the esigner sable to work out very’ simple problems by hand in onder to have some idea about the reasonableness ofthe computers answers. Having the knowledge ‘of doing te esleulations by hand is also eral fr idenutying tends that pide Sesigner; the computer can idemify problems but the designer must make intelligent choices in guiding the refinement of the computer design. Suggestions for Further Reading Several histories of feedback conto ae readily available. including a Seienific ‘American Book (1955), and the study of Mayr (1970). A good discussion of the historical developments of conto is given by Doxf (1980) and by Fortmann and Hitz (197), and many other relerences are cited by these authors forthe 8 Chapert Inne 1s 1.6 interested reader: One of he east published studies of control systems operat- ing on discrete time data (sampled-data systems in our terminology) is given by Hurewicz in Chaptcr 5 of the book by James, Nichols and Philips (1947, ‘The ideasof tacking and robustness embody many elements of the objectives ‘of contol system design, The concept of tacking contains the requirements of system stability, good transient response, and good steady-state aceurac all «concepts fundamental every contol system, Robustness i. property essential {o good performance in practical designs because real parameters are subject 12 ‘hange and because external, unwanted signals invade every system. Discussion of performance specifications of control systems is given in most books on introductory conti, including Franklin. Powell, end Emami-Nacini (1994). We will study these matters in later ehapters with particular reference to digital conizol desig To obtain a firm understanding of dynamics. we suggest a comprehensive text by Cannon (1967), Iris concerned with writing the uations of motion of physical systems in a form suitable for contro studies, Summary + Ina digital control system, the analog electronics used for compensation in a continuous system is replaced witha digital computer or microcontroller, an analog-to-digtal (AD) converte, and digital-1o-analog (DIA) converter + Design of a digital contol system ean be accomplished by transforming a ‘continuous desin, called exnulation,o¢ designing the digital system directly Either method can be carried out using transform or state-space system description, +The design ofa digital contol system includes determining the fect of the Sample rate and selecting a rate that is Suficenly fast to meet all specific + Most designs td ate cartied out using computer-based methods: however th designer need to know the hand-based methods inorder 0 intellivently _Bude the computer design as well as to have a sanity caeck om its results, Problems [LL Suppose a radar seach antennae San Francisco ipo rest 6 revi, an ta ons corresponding oe poston of fight 101 ge ple on the contr een once per antenna elton Fight 108 wsveling rectly wad thesia 50 th fdas constr estan trough the controler who nes are omctons 4 the pl. He wishes odo so each 9m of travel of he aca and is inxrtons consis ofcourse heads in inter dere auc, 13 16 Problems (a) Whar isthe sampling rt, nssonds, of he range signal pote on he radar A) Whar isthe sampling ie. sconde, ofthe comma’ siastctions? (ey ew he following seal 45 continous dite, oda 1 teats range fom he sip. ithe range dt splot othe ral sren fi te orl insrcton tthe pt the ils ators on he raft cont sues (a) Isthis a coninons, spit tao gta cont syste? {eb Show tha its posible forte pilot of igh 1081 wo ya zigzag cone whi {ould show ups ast ine on te comer’ seen, What she est Frequency a soi grag coune ch vl beh fom he contol’ rater? Wa gna varies between ad 10 9 (alle the dynam ange anit is eid {tat dh signal unt be ees inthe itl coner othe eoet 5 rl hati ithe seiton mast he S metre how many its he analog Desc ive ig coo syste ht you are mir ith. State what you think the lsumage of he dig inpemenation ae overs atalog implement. Asoo eee se hemos ere le opt oul mae fr bveak the comact depending temperature. Tey. ost Dermot are ip Describe ow you ty wrk ase of the bee (Use Marta (obtain a copy ofthe Studtt Eton or wse what's vale 0 you ana plots vss fora = Tao lOwhace y= Label each aus and put tie oni Use Marta (stain x spy of the Saat Eko owe a's aa to you) an trate to los use Mama's suppiot) of sr fore = 110 10. Putapltof y= othe topo he page andy = Von Bston. Review of Continuous Control 24 A Perspective on the Review of Continuous Control The purpose ofthis chapers to provide a ready reference source ofthe material that you have already taken in prerequisite course. The presentation isnot material for the fst ime: rather. itis designed to state ‘concisely the key relationships for your reference as you mae tothe new material inthe ensuing chapters, Fora more in-depth treatment of any of the topics. see ‘an introductory contol text such as Feedbuck Control of Dynamic Sestems, by Franklin, Powel, and Exami-Nacin (1994), Chapter Overview “The chapter reviews the topics normally covered in an introductory controls course: dynamic response feedback properties, rot-locus design, frequency re- ‘sponse design, and state-space design Dynamic Response In conteot system design, its important tobe able to predict how well ail design matches the desired performance. We do this by analyzing the equations ‘ofthe system model. The equations can be solved using linear analysis appro mations or simulated via numerial methods. Linear analysis allows the to examine quickly many candidate soltions in the couse of design it and is, therefore. aluable tol, Numerical simulation allows the designer to ‘heck the final design more precisely including all kaawn characteristics and is ‘discussed in Section 132, The discussion belo focuses on linear analysis n 12 Chapter? Review of Continuous Conic! 2d statevalable oem Differential Equations Linear dynamic systems can be deseribed by heir differential equations. Many systems involve coupling beeen one port of a system and another. Any set of Aiferental equations of any order canbe transformed into coupled St of Bs order equations called he state-variable form, So a general way of expressing the dynamis ofa linear system is kare en where the column vector x is called the state of the system and contains n elements for an nth-order sytem, w isthe 2% 1 input vector tothe system, 5 the p x output vector, Pis an’n x 1 system matin. isan” x m input mi, His p xn output matrix. and Js p xm" Until Chapter 9. all systems wil have a Scalar input. u. anda scalar output vin this case. @ ism % Lis 1 x and J isa sealer Using this system description, we see tha the second-order differential equation He ea ‘canbe writen in the state-variable form as lle aii: = ral] where the state Laplace Transforms and Transfer Functions “The analysis of linear systems is failitated by use ofthe Laplace transform, The ‘most important property of the Laplace transform (with 2to initial condition) Js the transform of the derivative of «signal CUfW=sF Es) es) ain oa AH Din cea FG, HJ Mi des ough We fe ne fracinin pip 8mm Thee e 2.1 Dynamic Response 13 This elation enables us t find easily the wransfer function, Gls), of a linear continuous system, given the differential equation ofthat system. So we see that, Bg. (2.3) has the uansform ($20,640 FO) UO. ction, Gis), is Yes) K, Ue) "FF hesreh CACSD software typically accepts the specification ofa system in ether the state-varable form ofthe transfer function form, The quantities specifying the state-varable form (Eqs, 2.1 and 22) are B. G, H. and J. Ths is refered to as the "5° form in MATLAB, The transfer function is specified in polynomial form (1) or a factored zero-pole-gain foam ("2p"). The transfer function in polynomial form is bgt thst eb baat G4) = ns 06 ar tae ba, where the MATLAB quantity specifying the numerator isa 13 (a+ 1) matix of the coctiiens or example num = bb, aL x Or + D mattis, forexample I In Maran v5 with Control System Toolbox edhe numerator and denominator are combined into one sysem specification with te statement den fa, ayo Ayu 545 = tnum.den) Inde zr-pole gin forthe transfer factions writen the ti of 0 tered polyoma m@=s) T@= a) and the quits specifying the rane funtion ate an m1 ma of he oe en zeros, ann = | max of the poles, and asctar gain, for example a = p=| "|. kx > 1A Chapter 2 Review of Continous Conta 213: and can be combined into a system deverption by 95 = zpkl2,p4). For the equations of motion ofa system with second-order or higher equa tions the easiest way to find the transfer function i 1 use Bg. (25) and do the ‘math by hand. Ifthe equations of motion are in the state-vanable form and the transfer function is desired, the Laplace transform of Eqs. (2.1) and (22) yields us) ue) In Maras, given E.G. H. and J. one can find the polynomial transfer function form by the MATLAR seript Gu SMG 'G 4. 95 = tSEGH)) ‘or the zero-poe-gain form by SS = zpklssF GH.) Likewise, one can find a state-space realization of» transfer function by 595 = sstfum den), Output Time Histories Given the transfer function and the inp, w(t), withthe transform Us). the courput isthe product, Ms) = Gis, aa) ‘The transform of o time function can be found by use of a table (See Ap pendix B.2): however, typical inputs considered in contol system design are steps w= Rain, > Us) amps vila. = UU parabotas ar wn = "hun, > vey and sinusoids 1) = Bsinfonn), > Ut) = 8 See 214 21s Figure21 [Aneementaryfeecbick 2 Dynamic Response 15 Using Laplace transforms. the output ¥(6) from Fg. 2.8) is expanded int its clementary terms using patil fraction expansion, then the time funtion associ= fated with ach erm i found by looking itp in the table. The total time funtion Y(t), isthe sum of pail fraction expansion. itis necessary to factor the denominator. Typically, only the simplest cases are analyzed this way. Usually. sstem output ime histories ae vlved numerically tsing computer based methods such as MATLAR'S stepm for a step input or ‘simm for an arbitrary input ine history. However, useful information abou system behavior can be obtained by finding the individual factors without ever Solving forthe time history topic tobe discussed later. These willbe importa ‘because specifications fora contro system are frequently given in terms of these time responses ‘The Final Value Theorem | key theorem involving the Laplace teinsform that often used in control system analysis isthe final value theorem. I sates that, ifthe system is stable fd has a final constant valve Jim xtey im XC, ex The theorersallows uso solve for tha fina value without solving forthe system's entre response, Ths will be very useful when examining steady-state errors of ‘ont systems. Block Diagrams “Manipulating block diagrams is weful in the study of feedback contol systems The most common and useful rest is thatthe wansfe funtion of the fesabac: system shown in Fig. 21 reduces 10 rey Ge = 2.10) Ro) TP HG) A] om rey An 4 oi 16 Chapter 2 stability Review of ominous Conte} 2.1.6 Response versus Pole Locations Given the transfer function of ica tm 61 His) = = ais) the values os such that as) = 0 will be places where (6) i infinity, and these values of sare called poles of H(s). Oa the other hand, values of s such that (3) = 0 are places where 11(s) is zeroznd the corresponding » locations are called zeros, Since the Laplace transform ofan impulse is unity. the impulse ‘esponse i given by the time function corresponding tothe transfer function. Each pole location in the s-plane ean be identified with a particular type of sponse. In other words the poles identity the classes of signals contained in the impulse response, as may be seen by a paral Tretion expansion of Hts) For first order pole Table B.2. Entry 6 indicates tha the impulse response will be an exponential funeton; thats ha When o > 0, the pole is leated ats < 0, the exponential decays, andthe system is sui tbe stable. Likewise, if ¢ < 0, the pole i to the right ofthe origin, the exponential grows with time and is refered to as unstable Figure 22 shows 3 ‘ypical response andthe time constant nu, = aw sun we een ins ina ae ome pos an rd nn of a anna pat vastly aed 2 jay. ‘This means thata pole has «negative real part if i positive, Since complex poles always come in complex conjugate pairs for real polynomials, the denominator corresponding toa complex pai will be AS) = 640 ~ jaysto+ joy) er toy ‘When finding the transfer Function frem differential equations, we typically the result inthe polynomial form Figure22 Fist order sytem response damping rato Fiure23 lane plot rapa of Dynamic Response 17 { teetes By expanding the form given by Ea. (2.12) and comparing withthe coefficients fof the denominator of (2) in Ea (2.13). we find the correspondence between the parameters o be nye ey o=tu, amt oy ‘where the parameter & is called the damping ratio, and 2, is called the une damped natural frequency. The poles ofthis transfer function are located at ‘a radivs ©, inthe splane and at an angle 8 = sin". as show in Fig. 23. Therefore, the damping rato reflects the level of damping asa fraction of the critical damping value wher the poles become real In rectangular coordinates, the poles are at s = ~o + ja,, When ¢ =O we have no damping. 9 =O, and ‘ai, the damped natural Frequency. equals, the undamped natural frequency tour, [MO 18 Chapter? Rese of Cantinsous Conca For the purpose of finding the time response comesponding 1 a complex transfer function from Table B.2, its easiest to manipulate the H(s) so thatthe complex poles fit the form of Eg. (2.12). because then te time eesponse can be Found directly from the table. The Hs) from Eg. (2.13) can be written as GFtor +a therefore. from Entry 21 in Table B.2 and the definitions in Eq. (2.14), we see thatthe impulse response is Hs) = ht) 12 sino st For w, = 3 nadisce and ¢ = 0.2. the impulse response time history could be ‘oblained and ploted by the MArLaB statements ze=02 um = Wr, 2rZe"Wn Whi sys = tum, den) impulsesys) Its also interesting to examine the step response of H(s). that is, the esponse ofthe system /1(s) toa unit sep input u = 141) where U's) =. The step response transform given by ¥(s) = H{s)U(), comained in the tables in Bnicy 22.46 vin= 1c (cosa + © sine.) (215) where a, = o,y/T=E and o =u, This could also be obtsined by modifying the last line inthe MATLAB deseripion above forthe impulse response to steps) Figure 24 isa plot of x(r for several values of & plotted with time nor: malized tothe undamped natural Fequency ,. Not thatthe actual frequency fy. decreases slightly as the damping ratio ifereases, Also note that for very Tow damping the response is ascillatry. wile Yor large damping (© neat 1) the response shows no oscillation. few step responses are sketched in Fig. 2.510 show the effect of pote locations in the plane onthe step responses, Its very useful for contol designers to have the mental image of Fig. 2.5 committed t0 memory so tht there fs instant understanding of how changes in pole lations influence the time response. The negative ral part of the pole. determines the decay rate of an exponential envelope at multiplies the sinusoid, Note that i Figure 24 Step responses of second-order ste Figure25 stated sth points in the eslane Dynamic Response 19 is negative. the pol isin the right- hal plane. he responce wl grow wih time. fine stm sad be stable fear = he rages thr pos se Stsaynso sy oa mar defn, pst the ata response 20 Chapter 2 Review of Continuous Consol 2.17 Figure 26 Det ion o ete sering inet, ard ‘reshoot Mt, ‘decays and the system is sid tobe stable. Noe that, 2 Tong asthe damping i strictly positive, the system will eventually converge tothe commanded vale, All these notions about the correspondence between pole locations andthe ‘ime response pertained tothe case ofthe sep response ofthe system of E213) that ia second-ondr system with no zeros. IF there had been 2 zero the effect ‘would generally bean increased overshoot: the presence of an additional pole ‘would generally cause the response to be slower. If there had been a zero inthe Fight alf plane, the overshoot would be repressed and the response would likely £0 initially in the opposite direction to its final vale. Nevertheless, the second: ‘order system response is useful in guiding the designer during the ieraions toward the final desi, no matter how complex the sysem is Time-Domain Specifications Specifications for a contol system design often involve censin requirements sssocated with the time response of the system. The requirements for a step response are expressed in terms ofthe standard quantities illustrated in Fig. 2.6 Te rise timer, isthe time it takes the system to reach the Vicinity ofits new set point ‘The setling time , isthe time i takes the system transients to decay ‘The overshoot M, isthe maximum amount thatthe system overshoot its Fina value divided by its final value (and often expressed asa percentage) figure 2.7 Alt ofthe peak Cveshoot M, vers the arming rato ¢ forthe second-order system 2.1 Dynaimle Response 21 For a second-order system. te ime responses of Fig. 2.4 yield information about the specifications that is too complex to be remembered unless approx nated, The commonly used approximations forthe second-order case with no ik 216) (25s en feo Mserv osect as) The overshoot M, is plotted in Fig. 2.7. Two frequently used alues frm this curve ae M, = IBS for = 0.S and M, = 5% for g = 07. Equatiots (2.16)-(2.18) characterize the transient response of a system ha ing no finite zeros and twa complex poles with undumped natural frequency ‘damping ratio and negative teal part 0. ln analysis and design. they are used to obtain a rough estimate of rise ie, overshoot, and setting time for just about ‘any system. I is imporcant keep in mind. however, tht they are qualitative ules and not precise design formulas. They are meant ro provide a starting point forthe design iteration and the time response should always be checked [her the contol design is complete by an exact calculation. usually by numerical sinlation, overly whether the ime specifications are actually met. If they have hot been metather iteration ofthe design is required. For example, if the rise 22 Basic Properties of Feedback 23 22 Chapter2_ Review of Continuous Con y-State Errors ‘time ofthe system warns out to be longer than the specification, the target natural 2.2.2 Steady-St freqsency would be increased andthe design epee. ears ten ci ies we find that input (ce Fig. 28) andthe output» i i ne case where the desired output 2.2 Basic Properties of Feedback Eu 1 uh = = 50. e2n Rul Te DWGO oy he adda a eee by the transfer function Gs) can be improved ses refered 103 he sesiity, For the case where rt) sa tp input by the adton of feedback including the dynamic compensation D(a) sr ehown somtimes eed 10 8 he sent. For the case whew im Fig. 28, The feedback canbe used o improve the stabi. sped up te an, a! sient response. improve the sleady-sate ero charicterises, provide dsurbance ‘ejection. and decrease the sensitivity to parameter variations where 2.2.1. Stability K, = lim ines Te dynamic characteristics ofthe opea-loop system are determined by the poles fant, IP D(s)Gts) has a denominator that of Gis) and DCs). thats. the roos ofthe denominators of Gis} and Dis). Using Anica he postomeror constant. Dis} he devo hat Eq, (2.10), we can see thatthe transfer function ofthe closed. loop system fa doesnot have s asa facto. K, and a oe ARS eu cnn n iia beanie Fi 28 no Ts), 19) for y 10 be at som 7). the higher th P negra has the ‘DG tefined tobe K, the kser the vale ofthe eror. An integrator he Yi) __ DiNGisy Ris) ~ T+ DUG) ~ sometimes refered a8 the complementary snstity. In this case. the dy. poet yan rs ae tn so , tami characterise and saiity are Strib ty the poles ha close op a eno ! tants uncon ta sie roe Siltbe Se andthe enor wl be tr, Poet <0 a0 Continuing. we deine the velocity constants 2G 0 G20) K ims Dis)Gis) This cqution is ale he characteristic equation and i ey important in 3 cwmaceitceaision feedoack contol alyssa deaiph Ts tee of be ocean and he eclration constants represent the yes of mason tht wl be exited bye feck ste a i lear fhm Ey (220) tha they canbe altel at wil he deep ce ee =i sslecton of Dt, When A; is finite. we cal the system typeI ews, wen, i ite, we \ cal te jon type 2 Forte iy feds secon categorie Fi 28 he error characteristics for command inputs consisting of steps. ramps, anc . ones te gt states omen OH |G) ean : Comme [ ee ee able? rots versus system type for unity feedback 24 Chapter? Review of Continuous Consol 2.2.3 23 _ System type can also be defined with respect tothe disturbance inputs w The same ideas hold, hut in this ease the type is determined by the number of imeratrs in D(s) only. Thus, if a system hada disturbance as shown in Fig, 28 which wis const the steady-state enue, athe es iF Du) contained an imeprae paren wou only We PID Control Proportions. nega and deiave (PID) contol coms he ters, Tey ‘are proportional control Sms Tay wee Kea) > DE)=K. 22) integral contol wrt fant = ow Pilg and derivative conto! w= Kru) = a2 Tis clled the integral (ores time, Ty the derivative ine, and K feedback gin. Thus. the combined transfer funtion i HE Peston “9 dy = 2 = eG) Propotna etuck con can ied to rec emos to dures bt sill nasa smal steady-state err It can also inerese the speed af gon but ypiclly at the cow ofa lager tent overshot con ae includes oem proportional oth ital ofthe er the eet stepcae he liminas we ie previs seston However ts enta be, ey leriovation of the dynamic response, Final, edon of & tem opened 1 the eno deste canal damping tothe dynamic espe her hea, tems combine fom the la PID conti dc aed a te poe indies and commercial console hardware an be purchased whens only need “tune” the gains on the three terms. ee 1 Kat G+ Ton 2.25) Root Locus Trerotnes atch wich stows Charctessics intvence he cowed lop dynarniccharcance The ee eae a are tit ofan prance allows us to plot thes of th closed oo rots nt ose lop roan plane Prt ry i ping nt ne Commonly se ly ee ofthe thereto is gone ancane eds he 23. root locus definition 2.3, Root Locus 25. ov G(s) In act, the method can be used to study the roots of any polynomi ‘ersus parameters in that polynomial "A Key atibte ofthe technique fs that tallow you to study the closed-loop. roots while only Knowing the factors poles and 2er0s} ofthe open-loop system. Problem Definition “The fist step in ereating a root Toews is put te polynomials inthe root locus form 14 x2) <0, (226) Typells,Ko(s)a(s isthe open oo renter fneionDIs}Gs) feedback ‘Suton: bomevcr ths nee ot be te case, Toe ot lois the et of vals Poe whch 2:25) bos for some real ale of K- For the pea ese Ey 20 repens the characteristic equation of the close-lop ise. “Tue purse nero! ness to son rapa oa he ene ead corte roots oa closed leo sytem as neva some paraeter Beng aie odo ths by hand (1) ies he deste the ality to desig simple tes without omputerO) helps the designer sen and understand compar gene ok Incsand 3 gives insight the desan process Tustion 236) she ht Ks alan posit is)/s) most be rah ancnegatve Inter words. f ne arange Bs) /a) apolar form a agntode nd phos. ten the phase of (ats) mst he 180 We thus dine the rt Toc in teams ofthe phase sondion allows 190° focus definition: The toot Yoeus of B(s)/ats is the set of points inthe ‘plane where the phase of sy ats) i 180, Since the phases unchanged ifan integral muhiple of 360 isauded, we can express the definition as 222 180 4 B60 ais) ‘where /s any integer. The significance of the definition i that. while ts very Uifficult to solve high-order polynomial, computation of phase is relatively fuss. When K is positive, we call this the positive or 180 locus. When K is Feal and negative. b¢81/a(s) must be real and postive for s to be on the locus. Therefore. the phase of hs} as) mustbeO .Thiseasescalled he" oF negative Teena pane 26 Chapeer 2 Reviw of Continous Conttol 2.3.2 Root Locus Drawing Rules ‘The steps in drawing a 180° roo: locus follow from the basic phase definition They are STEP 1 On the sane, mark poles (oot of as) by an and zeros (rons of ‘a(3))by a2, There willbe a branch of the locus departing from every pole and a ‘ranch ariving at every zero. STEP 2 Draw the locus on the real axis 0 the left of an od number of real Poles plus zeros STEP Draw the asympioes. centred ata and leaving a angles ¢). where nm = numberof asympores n= onder of (5) mn = order of bs) Eps a+b, 4 Forn —m > 0 there will be a branch ofthe locus approaching each asymptote and departing (0 infinity. For n ~ m <0, there will be a branch of the focus arriving from infinity along each asyimpote STEP 4 Compute locus departure angles from the poles and arrival angles at theses here tu. = Dv 4, ~ 180 — 1360 a, = 6, ~ Dv, + 180° +260 where q isthe order ofthe pole or zero and takes on g integer values so that the angles are between +180. yi the angle ofthe line going from the f. pole {he poe orzero whose angle of departure or arval is being computed. Similars 6, the angle of the line rom thet, 2270 STEPS If farther refinements requited athe stability boundary. assumes, i and compute the points) where the loeus crosses the imaginary ans for postive &. STEP Forthe case of multiple rots, to loci come together at 180 and break ‘vay at 90°. Three loci segmens approach each other at angles of 120" aod ‘depart at angles rotated by 60 STEP 7 Complete the focus. using the facts developed in the previous steps and ‘making reference to the illasiraive loi for guidance. The lot ranches cart ot poles and end at zeres o intnty. © Fxample 2.1 Root Locus 27 ce he dad i ots at nee te sitio then ot the gn Condon fom Ea (226) fn tht the alte o oovacd wih a po 1 iat When K is negative, the definition ofthe root locus in tems ofthe phase relationship is (0a definition: The oot loons oF B(s)/as) the et of point in the splane ‘where the phase of b4s)/2(3} 180 For this case, the Steps above ate modified as follows SSTEP2 Drow the locus on the real axis to the left of an even number of real poles plus zeros STEP 3. The asymptotesdepar at = 1360 STEP4 The locus depute und aia en = LV ~ 8, — B60 0, = 8 - Dv, +860 Note thatthe 180" term hasbeen removed, angles are modified vo Brot Lass Sheth Shc the rot tous versus K postive and eg) forthease where the open Toap 3s Gus) = Fat Solon, Fst othe 180 fous STEP}, Thereis a serats =a ples ats = STEP2. Theis loom onthe cite nepatve wal avi se ous STEPS. eon Lotheefrs, thee some asymptote a i dears the gpa rela STEP; “The dance angie atthe upper pes caused as ¢,=90"—90 = 180 = 140 28 Chapter 2 Review of Continuous Conte Figure29 Baampie rot cus etch Wie know thar heres acu eee seus segment slong teenie negative rel ats: however we Forte 0 lot ees vito calm the pose eas ante nso de ae! he result is showin in the figure by the dotted tines. reese ae © Computer-Aided Loci Tre most ca mon apo o machine Zhe ne son mpi oh oes a the oem asa polomi nih oma T KOC cca ae ng tm nea eo ag ase, sohe ie popaend © Example 22 23° Root Locus 29) sts m roots by any of many avilable numerical methods. A disadvanage of this ‘method is that the resulting foot foations are very unevenly distributed inthe s-plane. For example, near a point of mpl rots, the sensitivity of the root Joations to the parameter vale is very grea and the roots just Ry through such points. the plot appear to be iregulz, and sometimes important Features are sted, As a result 138 usefl to have the root locus plotting rules in mind when Jnerpeting computer plots. The polynomial is generlly solved by tansforming the problem to stae-variahe form and using the QR algorithm which solves for the eigenvales ofthe closed-loop system mati, CACSD Rowe Lacs 1. ote root ous using MATLAB forthe open oop sen shown a Fg, 28 wit 0 3 and 0) = KES 60) 2 Fine gain K sssvited withthe point of asim damping ae plot te tp espns 1 Reso ot as plo withthe ha pling ues and compare the compute based Step sponse wth ne les of than in Es, 2 16)(2.18 Solon. 1. The MAIL script following wil peerate the dave lous plot wich show ia pumd=[1 3], den Te pum =10, dens sy8= lou den) iu denG) keoone ocusisy will pice rss ai onthe plo which us be moved wih he nouse othe ested poi ‘nthe locus node ind the asseined gain and pol astions Given hs aloe OES Spike sere Kap) stops produces te desis ep rexpome shown a Fig. 2 10). 30° Chapter2_ Review of Continuous Control Figure 2.10 ample of CACSD for (Gh reot os an) step response 2 Ther eas nF 210) at esse fs e cto ef oo aero pls ed 2er0s (Step 2); has two asymptotes departing at +90" and centered at m= 3-10 gs (Step 3) | ‘be determined from Step & by = aan 57 fee cer, 72s. otrtm esate The sep ene den FR) 1 Te ctony ao wih k= 3 eas Se 2 gst ‘ 53S )3 tha foribe 417 rasceand @ = 3, The els of thumb gen ih 10 18-038 e6 24 Frequency Response Design 31 The wks sles based on the ssonl order stem with no 240% peed Gnd that ge a ile low du othe presence of the eta pe. Te predicted Mf, SNsaatally to sal due othe presence fhe zo ats = 3. —— ° 2.4 Frequency Response Design The response of linear sytem tt sinusoidal inputs refered to asthe system's frequency response, A system described by 78 ~ Gis) vo the input u(t) isa sine wave with an amplitude of U, and frequency ut) = U, sine Which has a Laplace transform ue = + thas a response with the transform, Ms) = Gis) 2, en >= OOS |A pata fraction expansion of Ea, (2.27) wil result in terms that represent the natural behavior of Gs) and terms fepresening the sinusoidal input. Providing ‘hat al the natural behavior is stable, those terms will die out andthe ony terms Jeft inthe steady state are those due tothe sinusoidal excitation, that is 28) Tim, * Jo, where a, and a would be found by performing the pata! fraction expansion ‘Afr th natural transients have died out the time respons is y(t) = 2a,|sinvat +8) = UAsin(o,e +6) where 29) A= |G(je)1= 1601 Im{GUey) = cota, 2.30) Re(auoy) “ON? : 32 chapter? Review of Goniinaous Conti So, a stable linear system Gts) excited by a sinusoid will eventually exhibit a ‘sinusoidal output » with dhe same frequency a the input, The magnitude. Ao, ) fy with respect othe input = [Cj ad he phase, pay) in. G jay) Rat isthe magnitude and phase of G(s) is evaluated by lettings take on vale! le ‘the imaginary (jo) aus, In adlition co the response ta sinusoid the analysis oF the frequency response of system is very useful in the determination of stability of aclosed-lop system given is open-loop transfer function, ‘A Key reason that the frequency response isso valuable is that the designer «an determine the frequency response experimentally with no prior knowledge of the system's model or transfer function. The system is excited bya sinusoid with ‘arying frequency and the magnitude A(w) is obtained by a measurement ofthe ‘ato ofthe output sinsoi to input sinusoid in the steady-state at each Fequen. ‘The phase i) isthe measured difference in phase between input and ouipit signals. As an example, frequency responses ofthe second-order system are ploted for various values of ¢ in Fig. 2.11 which is done by Mara with bodeisy 241 A natural specification for system performance in terms of frequency response 's the bandwidth, defined to be the maximum frequency at whith the outpat of 4 system will tack an input sinusoid in a satisfactory manner. By convention, forthe system shown in Fig. 2.12 with a sinusoidal input r the bandwith i the frequency of at which the output y is attenuated to a factor of 0.707 ties the ‘aput (or down 3 6B), Figure 2.13 depicts the ida graphically fr the frequency response ofthe closed-loop transfer function (defined to be T(s) in Eq. (2.19)) Y08) 7g) KG Ro) i RGe) Tre plots typical of most closed-loop systems in that 1) the output follows the input, (7 = 1, at the lower excitation frequencies, and 2) the ouput ceases to fallow the input, [7| < 1, tthe higher excitation frequencies. The bandwidth «4. is & measure ofthe sped of response und is therefore similar 10 the time-domain measure of rise ime 1, or the s-plane measure of ‘tural frequency «In fact. it canbe Seen from Fig. 2.1! thatthe bandwidth ‘willbe equal tothe natural frequency when ¢ ~ 0.7. For other damping ration, the beandwid is approximately equal othe natural frequency with an ero typically less than a factor of 2 The resonant peak M, isa measure ofthe damping, as evidenced by Fig. 2.11 ‘here the peak is approximately the value a. = 0, which is for¢ 0. owe 2 ert pine canoe vn 24 Fraquency Response Design 33, & 34 Chapscr2 Review of Continuous Control Figure 2.12 Smoliiedsystern detinton Figure 2.13 Detintons of bandwith and resonant peok 24.2 3@hI ecco ps oad Bode Plot Techniques {tisuseful wo be able o plot the frequency response of a system by band in oder {0 (design simple systems without the aid of «computer (b) check computer based results, and (c) understand the effet of compensation changes in design iterations. H. W. Bode developed plating techniques inthe 1930s that enabled ‘quick hand plotting of the frequency response, His rales are: STEP 1 Manipulate the transfer function into the Bode form 1a) = K Gop UO DOr, + Pee (er elGen D STEP 2 Determine the value of» forthe K,(j«)" tem, Plt the low-frequency ‘magnitude asymprote through the point K, aw — I radsec with a slope of (or nx 20 0B per decade), STEP 3 Determine the break points where « = 1/,. Complete the composite ‘magnitude asympiotes by extending the low frequency asymptote uni the fist. frequency break point then stepping the slope by +1 or +2, depending on Whether the break point is from a first or second order erm in the mimerator or ‘denominator, and continuing through all break points in ascending order STEP Sketch in the approximate magnitude curve by increasing from the ‘Factor of 1.443 dB) at fist order aumerator breaks and decreasing itby a factor of 0.707 (~3 dB) a frst order denominator breaks, Atsecond order ‘break points, sketch in the resonant peak (or valley) according t0 Fig. 2.11(0) ‘sing the relation thet [Gi ja)| = 1/(22) atthe break 243 Figure 2.14 Phase plot for jor + aol 24 Frequency Response Design 35 STEPS Plot the low fequency asymptote ofthe phase curve. @ =n x 90 STEP6 As e guide, sketch in the approximate phase curve by changing the phase gradually over to decades by +490" or 180° at each break point in tscending onder. For fist order tems in the numerater, the gradual change of phase is +90"; in the denominator he change is ~90'. For second oner terms, the change is +180 STEP7 Locate the asymptotes for each individual pase curve so thatthe phase change coresponds fo the steps in the phase fiom the approximate curve Indieatedby tep6. Sketch ncach individual phase curveas indicated by Fig. 2.14 or Fig. 2.1106). STEPS Graphically add each phase curve. Use dividers ifan accuracy of about “45 is desired. If lessor accuracy i acceptable, the composite curve can be done by eye. Reeping in mind thatthe curve will sat atthe lowest frequency asymptote ad end on the highest frequency asymptote. and will approach the intermediate fsympotes (oan exten thats determined by the prosimity of te break points toeach other Steady-State Errors Section 2.2.2 showed thatthe steady-state eror ofa feedback system decreases a the gain ofthe open lop tansfe function increases In ploting a composite Ignite curve the low fequency asymptote is een by KG(jw) = Kor esp “Therefore, we see thatthe larger the value ofthe magnitude on the low-frequency asymptote he lower the steady-state errors il be for dhe closed loop system, This idea is very useful in designing compensation. 36 Chapter 2 Review of Continous Control 244 For a system with = 0, (a type O system) the low frequency’ asymptote is ‘constant and the gain K, ofthe open loop system is equal to the postion ero constant K,. Fora system where 0 = ~ I. (a type | system) the low lrequency asymptote as. slope of and K, = K, ‘The easiest way of determining the vue of K, ina type 1 system isto read ‘the magnitude ofthe low frequency asymptote a frequency low enough to be well below the any of the break points because “equals the magnitude at these frequencies. In some ease, the lowest frequency break pont will be below wo = | radsec therefore the asymplote canbe extended toa = | radsec inorder to read , deals, Stability Margins IF the closed-loop transfer function of a system is known, the stability of the system can be determined by simply inspecting the denominator in factored form to observe whether the real pars are postive oF negative. However, the closed-loop transfer function is not usually’ known; therefore, we would ike to determine closed-loop stability by evaluating the frequency response ofthe ‘open-loop transfer Sunetion K Gi ja) and then performing simpletest on that response. Thiscan be done without math model of he system by experimentally 1 at 2(KGGw) = -180 sain marin Phase margin 245 ossover frequen Frequcney Response Design 37 (One way tha wl frequently resolve the ambiguity sto perform arough sketch of the rot locus to resolve the question of whether increasing gan leads to stability ‘or instability. The rigorous way to resolve the ambiguity is to use the Nyquist Stablty criterion, which is reviewed in Section 7.5.1 For continaovs systems. Two quantities that measure the stability margin of a ssstem ae directly related to the stability criterion of Eq. (2.33) gain margin and phase margin, The gain margin (GM) is the factor by which the gain is less than the neil stability value when the phase = 180 The phase margin (PM) isthe amount by which the phase of Gs) exceeds ~180- when [K G{je)| = 1. Tae ewo margins ae aliemate ways of measuring the degree 10 which the Stability condiions of 9.2.33) are met The phase margin is generally related tothe damping of «system. For a second-order system. the approximation that PM io is commonly used. Therefore. it were Known that a system was tobe designed using frequency response methods, it Would make Sense to specify the spoed of response ofthe system in terms of a required bandwidth and te stability ofthe system in terms of required phase margin. Bode’s Gain-Phase Relationship ‘One of Bode’ important contibtions i his theorem hat tates For any minimum phase system tat sone with no ine delays. RHP zeros or poles. the phase of Gj uniquely elated to the integral ofthe magnitude SF Gijuh When the slope of |G{jw)] versus w on a log-log scale persists a constant ‘alue for nearly a decade offequeney, the relationship is particulary simple £Gtjo = 0 x 90 ean where 1 isthe slope of |G{jw)l in units of decade of amplitude per decade of frequency Equation (2.4) is used as a guide so infer stability from G{jo} alone ‘When /K Gio] = I. the erossover frequency. the phase £Gtjo) = 2G(j0) 90 ifm = 10 ifm wo want 2 GL) > —180° Fora PM > 0. Therefore we adjust he |A'G (ju) curve so thar thas a slope of —1 atthe crossover frequency. It the ‘lope is —1 fora decade above and below the crossover frequen the PM would be approximately 90°: however, to ensure a ressonabie PM, i usually only 24.6 Example 23 Review of Gomtinuous Contol necessary tosis on a —1 slope (~20 p. [Lead compensation approximates the addition of & derivative contol term and tends to inrease the bandwicth and the speed of response while deressing the overshoet. Lag compensation approximates integral control an tends to improve the steady-state ero De) = leat compensation Tap compensation a. 49° Chapter Revew of Continuous Cont Figure 2.16 Figure 2.17 Ped vers for Maxam phase increase ore sei compensation cl sin of ea ompenstion pial ental placing te 20 50 nls badeiin ogy Taine {Adan ner term o your cone oth ere so ay tte mon the Frstente of coat dertonce. 7, and mad he competsaton Sota he ‘Seviatoos are sil met ‘Consider arendlu with onl orgy 7 andre tora F, whose een +t, Assume ter is 2 poeaometer atte pin Ua sores he cup ane at (] Show: using site varie maha, ht the shri eatin of he del is Prin (2) Taking teat stor tobe Pick estimator gains [yy 1 place beth ons of the estimator Using sate feeder ofthe ems tte ribs # and derive 2 conta we (plac the close loop cool pols at = 22) (ey Draw a lok gram ofthe system, ha, stint plant. and conta a (6) Dement the perfomance ofthe syne by pltig the sep response 3 ‘erence comand on (8 a0 Ty 4 Chapter 2 Review of Continuous Coniol (e) Besa oar witha er em and demons i permanc te 2210 For the openlop sstem fa) the fil alo oa ui step npat 15) Answer (forthe ose where 2.11 Forte oper top system ow ‘sou here isa feedbck wth proportional gi, Kad sketch lcs fhe closed looproct +s. What isthe intan al of Kp seieve a stb sy 2LI2 Fo the ops lapse Feeae no tse sng la compensation inthe Fedak tacit eon pol seeping the damping ofthe resonant mode beter hang = 008. 2213 Sketch the laces of parameter bor St berbs ino. 2.14 Skis he oo sus With epee opens fen Guy +3 After completing the hand ketch, verify our esa sing MATL 2.8 Sketch he oot ews with espe K For te open oop system Gy) = S09 Aer completing the had skate, very your ea sing MATA 2216 Sheth hero cus with espe! Korte een Joop st Kasy, Gis Aer complesing she Rand hatch, verify sou est sing Mar. 2147 Sketch he 0 deus wih spelt K forthe open-loop system Guy = Rt TMD Afi completing the and sesh eyo essing MATLAR 28 Problems 55 218 Slotch a Bode pot forthe open onpsystem son Gy Sea Te +2 F100) Aftercomplang he nd sesh, rif our sang MATAR, With ni eedback ‘foul he system he abe? 2.19 Skteh a Base po fen oper too system FUT) Alter completing te ha shh, ei yours using MAL, Wil ity Feedback tld besten stable? What ste PNA? 2.20 Stech a Bode po forte opes-oop system scans +1 Aft competing the han sketch. vey you est ning MATLAB. With edbck ‘ald essere sable? Hat bow would you sabize 2 ow) Gu Introductory Digital Control A Perspective on Introductory Digital Control “The cooninuous controllers you have studied far are built using analog elec ironies such as resistors, capacitors, and operational amplifiers, However, most convo} systems today use digital computers (usually microprocessors of Imicrocontollers) with the necessary ipitlourput hardware 10 implement the conioles. The intent of this chapter sto show the very basi ideas of design ‘ng conto Ls that will be implemented in a ciital computer. Unlike analog lectronies digital computers cannot integrate. Therefore. in order to solve a di ferential equation in computer. the equation must be approximated by reducing {to an algebraic equation involving sums and products only, These approxi mation techniques are offen feferred to as numerical integration. Ths chapter Shows a simple way to make these approximations as an ineodvetion to digital ‘control. Later chapters expand on various improvements fo these approximations, Show how to analyze them and show tha digital compensation may also be ear- Fied out directly without resorting to these approximations nthe final analysis. i tee will se that direct digtl design provides the designer with the most accurate i tethod and the most flexibility in selection ofthe sample rte ‘From the material inthis chapter. you shouldbe able to design and imple~ ment a digital contol system. The system would be expected to give adequate performance i the sample rate is atleast 30 times faster dhan the bandwidth of the system, Chapter Overview In Section 3.1 you will earn how to approximate a continuous DU) with ase Of difference equations. a design anethod sometimes referred to as emulation. Section 21 is sliient to enable you to approximate a continuous feedback eontller in a digital contol system. Section 3.2 shows the hase effet of st _ 38 Chapter tnumdctory Pigeal Control sampling on the performance ofthe system and a simple way to analyze that effect. Section 3.3 shows how to convert a continuous : sft, Ss PID contol aw tothe samole period ‘Srl ate 3.1 Digitization Few 3.18) shows the copoogy ofthe ypcal continuous system. The com Putation of the error signal, cand the dynamic compensation. Dis), cam all be “complished a a digtal computer as shown in Fig. (0), The fandanenal ferences betwcen the two implementations are thal the digital system operes fn samples ofthe sensed plant outpt rather than onthe continuous sige ae that the dynamics presented by D(a) are implemented by nebo equations called difference equations We consider fst the action ofthe analog-1o-digital (A/D) converter on a Signal This device ats on a physical variable. most commonly an cleeteat 70H foling. and conven it into a binary number thal usualy consists of 10or 1 bits. binary number with 10 bits can take on 2" : an AID converter with 10 bis has a resolution of 0.1%, the analog signal »(f) occurs repetitively at instants of tn 4 values; theetore, The conversion from that are T seconds Euler atmos Figure 3.1 ee Base contrat costae sot Bock eaarams (a) contngaus sytem, [Dywith ada! oe ro FE 3) eed | —— wn a ala oe f at ‘par. is celled the sample petiod and 1/7 isthe sample rate in eycles per second or Hz (also sometimes given in radiaalsecond or 2/T). The sampled signal is y(C7) where k ean take on any integer value, Iis often writen simply 8 y(4), We call this type of variable a dlserete signal to distinguish it from a continuous varishe ike 941), which changes continuously in time. We mabe the sssumption here that the sample period is fixed: however. it may vary depending on the implementation as discussed in Section 1. “There also may bea sampler and A/D converte forthe input comand, rt) ‘producing the discrete r(A7) from which the sensed v(KT) would be subtracted to arvve at the discrete eror signal. e(K7). The differential equation ofthe continuous compensation is approximated by adiference equation which i the iserete approximation to the differential equation and ean be made od the dynamic behavior of a D(s) ifthe semple period is short enough. The result ofthe difference equation isa discrete u(k7) at each sample instant. This signal 's converted to a continuous u(r) by the DIA and hold. The DIA converts the binary number to an analog voltage. and a zero-order hold (ZOH) maintains that same voltage throughout the sample period. The resulting ue) is then applied to the actor in precisely the same manner as the continuous implementation ‘One panicularty simple way digital computer approximate the eal time solution of cifferential equations i 10 use Euler's method. I follows fom the definition ofa derivative that ay a here Sx isthe change in x ovr atin intra, Even i is not git gual to zo, his eanship wl be approximately tue and sth oath) sam an xa 2) where 11 ~4 Ue sample interval in seconds), 1, =F (for constam sample interval, is an integer, (40s the value of x att and 50k + 1) isthe value of x at. “This approximation! can be used in place ofall derivatives that appear in the controller differential equations to arrive ata set of equation that ean be solved by a digital computer. These equations are called difference equations and are solved repetitively with time step of length T. For systems having bandwidths 60 chapeer 3 Inteductry Digital Consol © Example 3.1 (f few Herz, sample rates are often om the onder of 10%) Hz. so that sample periods are on the order of 10 msce and errors from the approximation can be quite smal Dafiren Ba xt sing slersmetiad find thedifrence egutions oe prin inthe conro computes in Fg. 3.1) forthe case whee te Dishing. 3. 8 Solaon. First fine cern eget tat comespndsto Dis). Aer ros miplyng By. i0dbain Wis = K+ aE) ‘cn se by ington that he caresponding diferent equation fs Wn = Ke ba Ba sing oles mato approximate (3.4) scoring to 2) me tthe approximating bc = 2 + aet)] os a Rearanging Ey (.5) pts tbe dilerence equation in the deste form war er[ me (EBAY cow]. 0 7 Equation (6 shows howto compate he ne al ofthe coo, wh-+ 1) gen he past ‘alu ofthe conto. and he ne and pst rales ofthe sgl eft 1) ale) For compuitna fein. is comseiet orange Eq 3610 MRED SOT WY + K lat — Helk) + otk +2, on ae ° ‘In principle, the diference equation i evaluated initially with k = 0, then 1s usually no requirement that values forall times be saved in memory, Therefore. the computer need only have variables defined forthe current and past values fo tis frstorder difference equation The instructions to the computer to implement the feedback loop in Fi. 3.100) With the difference equation from Eq. (3.7) would call for continual looping Urouh the code in Table 3.1. Note inthe table thatthe calculations have fen arranged so as 10 minimize the computations required between the reading of the A/D and the writing tothe D/A. thus cing the computation delay to & © Example 32 3. Digtisaion 61 Real Time Controller implementation 7 0 Gntistzation of past vue fof oop through) EAD Ab to obtany andr cheese ee sample rate eqired depends. on he closed-loop bandwith of thes tem Cencrlly. samplers shouldbe ster than 30 times th bandwdhin onder toossue ta fhe dita conor can be mad to close mach he performance athe continsons controle, Disrete design methods described in ater chapters will show how To achieve tis perfomance an the consequences of sapling ‘Neo ower iftha: sruied forthe compte cing tsed However. she sing the tcbmgues preseed inthis chapter £008 match to the cmtinucs con tel obtained en the sample rats eater than approxiatly 30 times the bandit Lead Compensation Using Dial Co Find igh ones to implement the lead compensation on forthe plat ution ona epeneniat using Sanpete of 20 Hea 0H, plete coe tracy i heh depen Poth one thal nas ropecesfor the comet gusto 2 ZOH. ni analog stn or hepa. Cort th heorcal Sepreyame ate somtnoos sem and corpre ht with be expnetly tenn ond em opens fe i Solution. Comparing the compensation tamer fncton in (38) with Eq.) shows thatthe vues ofthe panier in 38) area =2. b= 10nd K, = 70. Foc a sample Suh) + Tork +14 = 08th ae 62 Chayter3 tmzadctory Digial Cont For asample ate of 40, TF = 0028 ean Ea (3.8) spies to ah +1) 0750) + 2h 1) —O5eAL he ements in ATLA compat the sorting umd =70%(1 2), dendelt 10) 1. dealt 1 a 5381 = Hleumd den) cn) | snc esbackisyt,1 stepigsct) vr 3.2 hows the stp response of et i onl compared wh ois seproprs Nett snp aa 9 ait ans ale econ whee be 2 Hea ra 1 iy ee increase overshoot signing ws degrade athe danping. The damping woud dene Aue sample twee aay sowee ee i Ihe Sa edocs F352 ) cpa eda apne wel ste continu espns. You wil Ear oc tps Sil ates rte te espns fi nn i —_— —— ° owe 32 otros re tase prs sg fu ‘sample rate, (b) 40 Hz sample rate o method fr escrevzation (a) 20 He Figure 33 3.2 Tre dely veto the hole exertion ect of Sampling 63 In Chapter 6, you will see that there ace several ways to approxima continuous transfer function, each with different merits, and most with bewer Guiltes than the Evler method presented here. Infact, MATLAB provides a function (€26.m) that computes these approximations. However, before those methods can be examined, i will be necessary fo understand dere transfer functions, atopic eovered in Chapter 4 Effect of Sampling Ics worthy to note thatthe single most important impat of implementing a onl system Gigially i the delay eswocated with the old. A delay in any feedhack system degrades the sabilty and damping ofthe sytem. Because each Nalue of w(A7) in Fig. 3.10) i held constant unt the next value i vale io she compute, the continous vale of) consists of eps see Fi. 2.3) thas om he verge lag (kT) by 7/2. a5 shown by the dasbed tne in he igure. By incorporating a continous proximation of is 7/2 dely ina continuous analysis ofthe system, an asesement can be made ofthe efect of the delay in the digitally controlled system. The delay cen he approximated by the method of Pa. The simplest fiscorder approximation is aT waar Gy = i) Figure 34 compares the responses from Fig. 3.2 with a continuous analysis that inclades a delay approximation according t0 Eq. 39) ‘Ths lear approximation of the sampling delay (Eq (3.9) could also be used to determine the effet of a panicular sample rate on the roots of a system via linear analysis, perhaps a locus of roots vs. T- Aleratvel. the effect of {olay can be analy 2d using frequency esponse techniques because a ime delay fof T/2 translates imo a phase decrease of a0) ot 50 =- 64 ch Figure 34 sample ae showing tesa vth a 72 ey aporoxion| © Fxample 33 > ImroducroryDigial Cnn ea Thus, we see that the loss of phase margin ch by invokin ome. ta to sampling can bee 9. (3.10) with «sequal ro the frequency where the magnitude equals the "gin crossover Frequency Apprcamate Sra of the Eft of Sampling Fo the ste in Esampte 32, determin the dstese in danping tit woul res fom “pling a 10 He. Use hat inca tals and the fagiens reponse metho. Conre the time vespease of the corns ssn wih he drt ple te the Of the ssf in Example 3.2 canbe bid rm the EATS amet ‘here ISL is tht computed in Example 22 The esis = 86 ‘The daning ofthe stem wih tbe simple dl spprovimaion ae a, 139) ie T=1n0 SumDl = 27, deeb att 27) S982 = thu, sedis CL = feedbacks camptysc ‘hee 9s sth compat in Example 42. The reuk of hiseakaion i = 33 The eqeney response feces sso ssn the sei ine nip 3. Sand thatthe rose frequen abo Grads nde PMs ou 0” The ol 1F-For mre precision. the ane of arg a Ear ah shows that the sno span has P91 o149.5 "ata rover ten of 6.17 rade. Euon (3 101th date tha the comston duc Sampling sould Be 17.1 hus he PM ofthe dita! system wl be Figures Frequency response lor sample 33 Figure3.6 Contniows nd dia rexponies or Cee Dat toe sarple 32 ellcof Sampling 65 ovis 10, hs amyss sams hal he eines om et ht the oat he tp response shld ness, Fore ake B1¥° Sine the PAs app creo My gong ra Jw $8 fora 2b oder tem ih no 70 Te al ep Feapmesin Fig Save abi 20% ero frthe continent an abot 3% Loe The pal eae. So we nee tha the aporoinute analysis was saewhat onsen the Stam of he ete ging esc nce net co The wend fa desg spl a cans Sseng dann ly il Be aed mee Sol tg hk + wy | | 3.3 PID Control | P66 chaper3 tno Dal con | ‘The notion of proportional, integra, and devvative (PLD) contro is reviewed in Section 2.2.3. Reviewing again briefly the thee tems sre proportional control nie) = Keto, aan inegtl contol w= fon, 6.2) nh and derivative control ic) = KT, E00. oa where &isealled the proportional gain, 7, the integral time, and 7, the derivative time. These three constants define the contro ‘The spproximations ofthese ingividual control terms tan algebraic equation ‘that canbe implemented in a digital computer are proportional control inno wien Brea, ans and derivative control ‘ 10) = of) et 16 [Equation (3.11) is aleady algebraic, therefore Eq (3.14 follows directly while Eqs. (3.15) and (3.16) result from an application of Euler's method (Eg, (3.2))10 Eqs. 8.12) and (3.13). However, normally these terms are used together and, in this eas. the combination needs tobe done carefully. The combined continous transfer function (Eq, 2.24 Dis) and the use of Fuler’s method (twice for 2) results in anneal(i te B)aa-(v42% ean. ain © Example 3.4 33 PID Consol 67 Transforming a Cotinuous PID to a Dial Computer A miro-servo motor hs aration fom he inp appli vokage othe xt peed (eae 08) = eins + oe Inbasbeen eerinedth PUD conrl with K = 5.1, = 0.000 sr.andT = 0003. ge ‘atntctory performace or the erin ese ian appropri ampere, deere the comeing ital cmt lam an inlet om dpi sytem. Corpare the dpa sep respoe wih he caked response of acotinaus sytem Ass Sepa) esgat| ‘he fot of higher sample rt and e-tuning the PID parameter on he tity ofthe sg Solution. Te sample rate needs be select fest But efre we cn do that. We eed ro ho fs the systems o what and, The soll ie in Fp 37 shows the step ‘espons of the continous sate snd inate tht he sa tine sao Lec Based on 1216 ths suger tht, = HOD rade, and 0 the bandwith would be on he order 312000 rasec or 120 He Tiere, the sample ate woul be aboot 32 AH 10 tides undid Sole’ pick 7 = 0.3 cc, Use of Ex (317) ress in te lerenc gtion ky = wk =) + 5.76670) — 6 3BRBeK — + 2oKECE hich wn implemeated in dhe digit compete eat ie the Line with stars ip 7 Ths mpementton sows considerably reed ovcrsoot ver the commun cae, The line wih ces the Reue stows the improved perfomance blaine by incest the ‘mpl [DHE sel te sbour Oeste wn the ome PD pence ren tt he il ermine nip seal Be Increasing the simple re. bowser. wll nee the cont of the computer and te AUD conver: thers, there il ea cont benefit hy improving the performance sie ‘inning the 32 kr sample rate. A look at Fig, 57 shows fat the digital sponse (r= (Sasa has asi ie ine and less damping tan he conto case, THs eget "ha the proportional gin, K.sboald be edie to skew the stem dwn ade dee the tine, Tp. shuld be acased 1 acess De damping. Soe ial and eto een these ides in wind roses the reali e Fg. 3.8 The revised PID parame tha peo (ced shee teu re K'= 32 and Ty — 001] se, Te gral rset ne ,. 38 change ° ‘This example once agein showed the characteristics of a digital eontral system. The damping was degraded an increasing amount 3s the sample rate ‘was reduced, Furthermore, it was posible to restore the damping with suitable adjustments tothe coat. Figure37 Step response ofa root Bape ‘same PD Figure 38 fect of AO wing on the dita respon, erarple 34 3.4 68 Chapter 3 Introductory Dial Control $s | CSSa Summary Digitization methods allow the designer to convert a continuous compease tion, D(s). imo ase of citference equations that ean be programmed directly imto'a contol compute. Euler's method can be used forthe digitization xt = hy aq = ED @2 i) + 32) As long as the sample rate is on the order of 30 x bandwidth o fast. the igitally contolied system will behave close ta its continaots counterpart sand the continuous analysis that has been the subject of your continous ‘ontrl systems study wil suce For sample rates onthe order of 10 1 30 times the bandwidth, a fis oder analysis canbe catiod out by introducing a delay of T/2 in te continuous analysis to see how well the digital implementation matches the continous analysis. A zero-pole approximation fr this delay is Yr G)= 69) mF 35 Problems 69 The delay can be analyzed more accurately using fequency response where ‘the phase from the continuous analysis shouldbe deereased by ae G10) can be implemented digitally using Eq. (3.17) rt) ato) oe 1) + Eek 2) ‘The digital contol system will behave reasonably close tothe continuous system providing the sample rae is faster than 30 times the bandwidth, inorder to analyze the system accutaely for any sample rate bat especially for sample rates below aboct 0 times bandwidth, you will have to proceed ‘on tothe next chapters to lear about 2tansfons and how to apply thers to the sudy of discrete systems, + For digital contol systems with sample rates les than 30 times bandwidth, design is often cari out directly in the discrete domain. eliminating ap proximation eros. 3.5. Problems 3A Doth feloning (a) Design x cominaos kad compensation forthe stele athe como! example {Gish = 17 descbod Append 8.130 tht the comple to area trpronimaey ot jae, (Assuming the compensation to be implemented gill appx ‘eh digi implementation to Be ea of T/2 a 008 and dtc the eva ot locations forsampl ats af a, = $ Ha 10 He and SOW she P= Huse [32 Repest Bene 3.1. but seh appeienation that A ackward rectangular version f Fas stad Compare he eating erence {Spumons with he formant ectigulr Eur method. Also compute the merase ‘ofthe coef forth caes sample eat foro, © 1 = 10D He Asame the Sotinvows vars foot Ey 28), Note that te cote of tere are een 8 15 7 or the forward rectanguacase as 8T)andvaT ~ D 70 chapter 3 Incroductory Digtal Con as as aa as Forth compensation Dis) = 2522 te lr foreard etangular method 0 deceine he difeenc equations fora digi lnplenenation with sapere oF 8D He Repent he clelaons sing the chad ‘angular mohed (ce Problem 32) and compare he diference equation cece Fo the compensation se Euler's forked angular math to determin he difeenceegiations fos ig Implementation witha sample rate oH Reps the cll sing the ack retangla stad (sce Poem 32 and compe the ference eget once Thee mn compu dk dive sth ane frcton 109 Design aia PD conti hat has handwith of 10 He phase marin of 0. and sno capt eno for cesta bss ore fom the dove me Use 4 sample rate of 6 Ka ‘The rea am on compte isk ria the tse ton ow ow Design a digital conmolr that hs a bandwith of 10 Hana phase marin of 50 ‘Uses sample ae of 6K. For io m, we can write this a a ato of polynomials in = 2s «sy “This transfer function is represented im MATLAR inthe ¢f form similarly 10 the continuous case as discussed after Eq (2.6). The numerator of Eq, (4.15) would be specified in MATLAB asa x n+ 1) mati ofthe coefficients for example, when m = rum = [by b, 2, > and when n > m, there would ben ~ m zeros after b,."The quantity specifying the denominator would be specified ava x (+1) arn, for example den 4 « Note that H(z) was assumed tobe in the positive powers of =. The disrete systems speci rm given by Eg. (4.15). thats, with bs sys = thinum, den, where 7 is the sample period “The general input-output relation berwven transforms with near, constant Aitference equations is UG) = HEE) 16) Although we have developed the tansfer function withthe z-transform ti also {rue thatthe transfer function isthe ratio of the optpu to the input when both ‘Because /H(c) isa rational function of a complex variable, we use the rinology of that subject. Suppose we call the numerator polynomial b=) the denomingtor function. andthe places in z where (2) = Oar the poles of #12). If= isa pole And (2 ~ s)° (a) has neither pole nor zero az, We say that 1(<) hata pole of forder p a's. Ip = 1, the poe is simple. The wanster function Eq, (4.14) has fa simple pole at: = 1 and a simple zero at x = ~]. When completely factored. the transfer function would be and ‘The places in: where () = Oare eros ofthe transfer HG) = K. aan wD 5 seme he of Ma AB and Cond Tots. Fe ves, se Ane 2 Chapie Pande delay Figure 43 Te unt day 423 Discrete Systems Anais and the quanites specifying the transfer function inthe MATLAB 2pk form ar nm L matrix of the zeros. an > Lmatix ofthe poles, and a sculargain for example fe », The sytem is then sys = zpkiz. pik. Dh We can now give a physical meaning to the variable :. Suppose we let al coefficients in Eg. (4.15) be zero except by and we take B, 0 be 1. Then HG) =<. But Hc) sepresents the transform of Eq. (4.2). 'and with these coefficient values the difference equation reduces 10 Gs) The present value of the output, equals the input delayed by one peri. Thus we se that atranster function of: "is a delay of one time unit. We ean picture the situation as in Fig. 4.3, whete both ime and transform relations are shown. Since the relations of Eqs. (4.7) 4.14), (4.15) ar all composed of delays they can be expressed in terms of Consider Eq 4.7) In Fig. 4.4 we illustrate the difference equation (4.7) using the transfer function =~ asthe symbol fora nit delay ‘We can follow the operations of the diseree integrator by tracing the signals through Fig. 4.4. For example. the present value of is passed othe issuer, ‘where it is added to the previous value e,, and the sum is multiplied by 7/210 ‘compute the area ofthe trapezoid between e,_, and e,. This isthe signal marked 4, i Fig. 4.4. After this, tere is smother suna. where the previous output, '8 added to the new area to form the next value of the integral estimate, a, The Aisrete integration oceurs inthe loop with one delay. :-', and nity gain, Block Diagrams and State-Variable Descriptions Because Fa. (6.16) i « Tnear algebraic relationship, a system of such relations| is deseribed by a system of incr equations. These canbe solved bythe methods of linear algebra or by the graphical methods of block diagrams inthe same ey corer _ Figure 44 Iablock cageam of tvaperold tegration 3s represent by Ea (8.7) 42. The Discrete Transfer Function 83 Figure 45 Bock dagiam of paral backs Figure a6 cascade blocks way a for continuous system transfer functions, To use Blok diagram analysis to manipulate these dserete-transer function relationships. there ae only four Primitive cases: 1. The transfer function of paths in paral! is the sum ofthe single path ansfer fonetions Fig. 45), 2, The transfer function of paths in series isthe product of the path transfer functions Fig. 46), 3. The transfer function ofa single loop of path isthe wansfer function ofthe forward path divided by one minus the loop transfer function (Fig. 47). 4. The wansfer funetion of an arbitrary multipath diagram is given by combi nations ofthese cases. Mason's rule can also be used For the general difference equation of (4.2), we already have the tansfer function in Ea, (4.15). Tis imerestng to connect this case with a block diagram bs bro} Heya Hts) ste Wad Hye 84 Chapter+ Discrete 5y Figure a7 Feedoack taster Te mye Rem using only simple delay forms for = in order to see several “canonical” block & may also come in. The general cases thus (again) oa, (432) External Stability yand we A very important qualitative property of a dynamic systom is stability ‘can consider interal oe external stability: Internat stability is concerned with the responses ata he intemal variables such as those that appear atthe delay 94 Chapters Discrete Systems Analysis clements in « canonical block diagram as in Fig. 4.8 or Fig. 4.9 (the state), Oierwise we canbe saistied to consider only the external stability a gveu by the study of the input-output relation described forthe liner staticnary eee {he convolution 4.32). These difer in that some internal modes might nthe ‘connected to both the input and the output ofa given system, For exiemal ability, the most common definition of appropriate response fs tha for every Bounded Input, we should have a Bounded Ouipa. this ae 3 sy the sistem fs BIBO sabe, test for BIBO sailiy canbe given dresiy jn terms ofthe unit pulse response, 4, First we consider a sulfciemcenhine, Suppose dhe inure, is bounded. that i, there is an M such thet © Example 43 lM <0 forall (433) It we consider the magnitude of the response given by Fg, (4.32) itis easy to see hat tai [Deal ich sll hte um of he ages hen by lel Mh Bur, because we assume Eq, (433) this result isin tum bounded by ‘Thos the output wil be bounded for every bounded input if © Example 4.4 434) <0 1435) This conditions also necessary, for if we consider the bounded by 1) input =o And apply i 0 Fg. (4.32), the output at & = 0 is 436) vunction 95 The Discrete Transl ‘Thus, unless the condition given by Fa. (4.35) is tue, the system 8 not BIBO stable, Insgrarion Stab sto (9.47) BIBO sable? Inthe discrete approximation to ingraton 4.7) BIBO: Sotto The test sve by £3438) can Re appli 1 the anit pase response wed to ‘compete colon in Table. The rests Yi = 172+ Fo = sounded ‘Thetfoe.is dete approximation to negraton ot BIBO Stable - - ° Gereral Dierense Equa iN cacicens excep a, a, equal to zr0 Comite he ierene quation (4.2) with alc 0, ad . i ae Solin. Te nips pone i csiy develope frm the ist ete =a Warm bat Applying ete weve Ewi-Be ried by ths equations BIBO sable ‘has we could thatthe sytem unstable theme . ———¢ 96 Chapser 4 Dierete Systems Analysis 43 43.1 Figure 4.12 The prototype sampled-data system is inside the unit circle. the comresponding pulse response decays with time geometrically andi stable. Ths, if all poes ate inside the unit cele the system With rational transfer function is table; i atleast one pole ison oF outside the Umit erce, the corresponding ystem isnot BIBO stable, With modetn computer programs avilable. finding the poles of a particular transfer function is no big eal, Sometimes, however, we wish 10 Lest for stability of an entire class of systems or a8 in an adaptive control system, the potential pols are constantly changing and we wish 10 have a quick test for stability in terms of the literal polynomial coefficients. In the continuous case, such a test was provided by Routh inthe discrete case, the most convenient such test was worked out by Jury and Blanchard(1961)” Discrete Models of Sampled-Data Systems The systems and signals we have studied thus far have ben defined in discrete ‘ime ony. Most ofthe dynamic systems to be controled, however, are continuous ‘ystems and, if linea, are described by continyous transfer functions inthe Laplace variable , The interface between the continuous and discrete domains tare the A/D and the DYA converters as shown in Fig. 1.1. In this section we develop the analysis needed to compute the discrete transfer function between ‘he samples that come ftom the digital computer tothe DIA converter and t samples that aze picked up by the A/D converter. The situation is drawn in Fig. 4.12. Using the z-Transform Wie wish to find the discrete transfer function from the input samples w(kT) shiek probably come from a computer of some kind) to the output samples SUK) picked up by the A/D converter. Although itis possibly confusing at frst, we follow convention and call the discrete transfer function G{2) when the continuous transfer function is Gis), Although Gc) and G(s) are entirely Aifferemt functions. they do deserbe the same plant, and the use of» forthe continuous tansform and : forthe discrete trinsform is always maintained. To 2 fon foo ef 10 fe cng scant fs eat ae 43 Discrete Models of Sampled-Data Systeme 97 find G(2) we ned only observe tha te (LT) ae saps ofthe plant ouput teste inpt is fom ioe BA corer As forthe DIA sme we soe Thats device, commonly called zet-onler bald or ZOHL accep asap {IGP ar AF and lds cup constant sve nl be nea sample issenat CET 1 T-The prcevse constant oper of the DIA is the il ‘chats applcd oe lane ur proble s no eal uit simple becawe we hae jot ee th he sists vase fron ste sar ote snes the up en he input samples ae be unt pukeath= 0 atk) = fork = Dard) —O fork 7 Ose ouput tke D/A convener put of wh T secon ad bight Uasstetchedint 413 Maternal hepuselsghenby 109 Tle T) Letvsea te partulr ouput respons tte ple sown ng. $.13 3,0) “he spon the eeonce pesca te sep rsp fT) 1a he tblayed Sep response to I~ T)The Laplace anton ofthe sep esponie is Glsy/acPnsin the eso ean th nit ue espns of he ian and te required transfer function is the = (of F,(), which can be expressed as Ge) = ZY KT, = ZICH MFZINo 1,94, =zl-€ and the second is ‘This isthe sum of two pans. The first partis 21% because «Tis exactly a delay of one period. Thus the transfer function is cor=a—e'2 [2] sn Figure 4.13 BrA output for writpube input a a CChapeer + Discrete Sytem alysis © Example 45. Dave Tense Fantom of Oder Sytem Whats te incre wansfer function af ou resede bya 208 Solution, We il apy he forma 441) 43. Pisce Models of Samples-Data Systems 99 ad theron Eq 1) shows tat =F : ° wa) ‘The Mar. ab function, c2d.m computes Eg (4-41) (the ZOH method i he default) a5 well as other diserete equivalents discussed in Chapter 6 tis able to ve forms, ele arer accept the system in any of nthe coespnding time farson {22h ay ern teample nt pane taniet PTO eu © Example 4.7. Discrete Transfer Function of fs Pane Using MATLAB Gin receded bya ZOH, assaming the ample peta s T= La, ‘We cold have gon tothe ein Append Boe hi ea ity as Ey 1. — a i Now we can comput the eid aston ss, ter mume=1, denc=[1 9 o) i SC hou den f amy sD = e256.) | - a _ : | : eh sot 208 . Hii, | 4.3.2. *Continuous Time Delay { is MSS GDiT ee tine dey the rpms of many de Process-contol plans exhibit pure time delay because there isa finite time of r z teanspor. of fluids or materials between the process and the comtols andlor the 100. Chapier+ Discrete Systems Analysis Sensor. Also, we must offen consider finite computation time in the digital controller, and this is exactly the seme asi the process had a pure time delay With the techniques we have developed here. itis possible to obtain the discrete ttansfer function of such processes exe as Example 48 lstrates, @ example 48 Diss HanferF Oner Sytem wth ela Find the discrete wafer futon ofthe mine in Appends A. with a 1. 7 Sotto, The Aid nse pro in appendix A. is ese by Gus) eH. “he erme”* represents the delay of eons, which iss ath he proves dla andthe computation del iFny. We sume dat (3 aration anf Fntion To prepare ths Function fr computation ofthe sano, we ist dete sn rg and pose ner ‘mes thn 10 sie tht} = LT oe. With hve defintons me can wee cats son neper ister redaces to: wher we ah the stuf esas m theeunsormathevther tenn squte dec Wesces 1 w/t ayant the par fraction expansion of Hs we ane To complete the tnser fan we need the ean of he ines te kerms in the Bas. The ft terms uit tp she el hy m7 seo, ad he scond em a ‘exponen shed et by tbe sane amour Because Ihe ste at es thao al. tid at a sample picked up in neaive tie, The sigrals ar steed ing 318 The sumpes are geo by WAT) and "147, Te comesponding-ansorms ame/ie= Danie 2 =e) Comsequnty the al anf fancon = thee the zero poston bat r= (09°F MF ye) =e), Notice tha hs zeros earthe oii fhe span when ml eu 1 and moe’ ous the wi ce to mea 2 then m approaches 0. For speci values of the miter. we ae a= IT = Ie and = 13 Then We can compat th ¢~ 2 and = 0, For te ales, we get ww igure 4.14 Sketch ofthe hited Signo owing samp = 43.3 3 Discrete Modelo Sample-Dat Systems 102 aa + aul Woe rae nM. esses forse we compiy d=15, r onc etal aine.T9 sn = eden. - —-+ State-Space Form CCompting the -tansform using the Laplace transform as in Eq. (4.41) is @ ‘ery tedious busines that s unnecessary withthe availability of computers. We will next develop a formula using state descriptions that moses the tedium to the computer. A continuous, linear, constan-cofisient system of eiferential ‘equations was expressed in Eq. (2.1) a8 8 se of firstorder matrix diferent ‘equations, Fora scalar input it becomes =F Gu+G, (43) where is the scalar control input wo the system and w is a scalar disturbance input. The output was expressed in Eq, 2.2) asa linea combination ofthe tate, andthe input, which becomes for selar output yo Het Ju (4.46) i 1O2 Chapter 4 Discete Systers Analysis 45 Drcrete Models of Sampled-DataSysters 103 (Often the sampled-data system being described isthe plant of a control problem where and the parameter J in Eq (4:46) is zero and will frequently be omite f Jin Ba, (446) 1 wil frequently be omited. ACT. B cot : © Example 4.9 ior Representation of 142 Pant : ‘Apply Has (4.45) an 446 th dvb integrator plan he stele contol ble in © Example $10 Sexe Harsfornaton jo 193 Foe Appendix A Find the stat representation forth ese with he ae dione ofthe previo example Solon, Let = sand, = 5 #9, HATi:on nme mation, he tsfeaton Solution. The site aude contol examples shown in blak diagram formin Fi 4.15, tnd the eitde() and ata te (6) re dtc 0 5, ad, epee. Therefore Ie eqution of motion can be writen [Galles] sua which ia this ase tas to be arate inaved way of writing — — ° ‘The representations given by Eqs. (4:45) and (4.46) are not unique. Given ‘one sate representation, any nonsingular linear transformation ofthat state stich 2 Bx = Tx isalso an allowable alternative realization ofthe same system, we let & = Tein Eqs. (4.45) and (4.46), we find g= e+ Gu + Gu) TRx+TGu +TG,u. = TPE + Tu + TG, yaT let su I we designate the system matrices forthe new state & as A, B, C, and D, then [te] wt oo. a oie ° Most often. change of sae is made o bring the description mates into useful canonical form. We saw earlier how asingle high-order difference equation could be represented by 2 sate daeription in contol or in observer canonical form, Also, there isa very useful state description comesponding to the patal- fraction expansion of aiansfr function, Sta tansformatons can take a general 1 For ¢ = 0, 2 = mT acconding 19 Ea, (4.67), which implies nat delay but prediction. Because m7 is restcted tobe less than T. however. the output will not show a sample before & = O, and the diserote system will be causal. The result is tha the discrete system computed with € = 0. m = 0 will show the response 811 = 0, which the same system with €= 0, m = 0 would show at ¢ = m7. In ‘other words. by taking & = Oand m3 Owe pick up the response values between ‘the normal Sampling instants. In transform theor, the tnsform of the system with = 0, m = 0's called the modified e-transform. The sat-variable form requires that we evaluate the integrals in Bq, (4.70). To do so we frst conver T, ‘oa form similar othe integral for Prom Ea. (4.70) we factor out the constant mate G 1 obtain n= [evan Unesa = mtn singe na [eens For notational purposes we wil define, for any postive nonzero scalar number 2, the two matrices da. aay %e Wo =* [ere (472) In terms ofthese matices, we have 1, = (7 = mtn, "TY an “The definitions in Eqs. (4.72) are also useful from a computational point of view [If we recall the series definition of the matrix exponential then we get 1s Sey 96 ee RT yr 43. Dscrete Models of Sampled-Data Systems 113 Fat -> a7 Laan But now we not that he eis for da can he writen as = Pa! ma) lee et = j +1 in the sam, then, asin a. 4.60), we hase Par ia) <1 4 ~y te 30+ aViok 475) “The point of Eg (4.7) is that ony the series for W(a) needs to be computed ad from this single sum we can compute # and F we return to the ease = 0. m0. the disrete state equations are Xk +1) = beiky + Tih) + Tl + DD, where F, and Tare given by Eg. (4.73). In order to put these equations in Sate-varable for, we must eliminate the term in wik +1), Todo this, we deine anew state, () = x(k) — Pyulk). Then the equations ae B+ xk +1) TG +) = ox(h) + Path) + Pak + 1) — Pu B41) = IE) + Pwhy) 4 Pky EL) + OF, FEW = EK) + Tait. 476) ‘The output equation is why = Hk HEE® + Puc) HE) + HT uiky = HEE + Jnl am Thus for { = 0. the state equations are given by Eqs (4.73). (4.76), and (4.77), [Note especially that if m= 0, then P= 0. and these equations reduce to the previous model with ao delay. (Our next case is = I, From Fy. 4.69), the equations are given by XE) = Oxi) HP uk = + PW, i i by defining anew state x,,,(k) = u(k — 1). Wehave thus an increased dimension Blok diagram of system with delay of mare than one pevad, Dove Bre indicates I ‘of the state. and the equations are vector valued variables ae _ _ nr i! [tt J=E8 0 JL Je [2 Jo . i warm orf | a7 i} Mk 1) = rd) + Pk) + Pak 64 eels and we must cininate tbe past cons up tw). To do this we ince & | es saris sh hat | pip wich has Bem fond effective by Moler and Van Loan (1978) The basic ie i “au (eF a (4.80) Fi) wath |=] +| 0 fant) ‘such that T/2' is not too large. We need a test for deciding on the value of k, We it e | e be ‘propose to approximate the series for W, which can be written nut] | 90 0007 " oy Seney iH Loo ooo olla) Li »(2) peer WOT ean | wih 3 sa yy (AD ‘We will select k, the factor that decides how much the sample period is divided fy a) [noo] am down. (0 yield 4 small remainder term R. Kills suggests that we estimate | the size of R by the size ofthe frst term ignored in W, namely | ‘This final solution is easily visualized in terms of a block diagram. as shown REET AW + 12". He bra habit [A simpler method is to select k such that the size of FT divided by 2 is less Ky than I Inthis case. the series for F7/2 wil surely converge. The rule sto sleet if 4.3.5 *Numerical Considerations in Computing ® HH and 2 > PTI = max DLE, IT. i ‘mation to the infinite sum for W given by Eq, (4,74) or for a = T, by Eq. (4.62) Taking the log of both sides. we Find i The problem is that if FT is large, then (FT)*/N! becomes extremely large be- > log, JF] Kills (1973) has analyzed a technique used by Kalman and Englar (1966), = maxt'log, [IFT]. 01. ab 116 Chopver+ Figure 420 Lege fr 3 program to compute ¥ using ‘uromatic me sealing Discrete Systems Analysis here the symbol [x means the smallest integer greater than x. The maximum (of this integer and zero is taken because itis possibe hat || FT| 8 aleady $0 somal that its log is negative, in which ease we want to select k = 0. Having selected k, we now have the problem of computing (7) from ‘W(T/2), Our original concept was based on the series for @, which stistied Eq. (480). To obtain the suitable formula for W. we use the relation between © and W given by Eq, (4.60) a follows to obtain the “doubling” formula for W GAT) = THOT), Ly 27PwaT) = 1+ TROD) IIL TFWT)) PUT) + PEW UT: therefore 2rFwor} This is equivalent to wn) win wor) = (1+ whic isthe form to be used. The program logic for computing W is shown in Fig. 4.20." This algorithm does ot inclue the dela discussed in Section 4.3 1. Seleot F and T. 2 Comment: Compute FFI 3 Veman(E,1F, xT ~ 4. ssmatlst nonnegative integer greater than log, V. 5. Comment: compute WiI/2), 8 nee 7 1'< identity & wor 8 jell 10. fF =1, gowstep 14 Uo Wes Haw Bh jajnd 13. Gotosep 10 14. Comment: Now double Wk times, 15 Ik =0. stop. 16 We Ww) 1, kek-t 18. Gorostep 15, 43.6 43. Discrete Models of Sampled-DataSpsterss 117 For that. we must implement the logic shown in Fg, 4.19. Inthe Control Toolbox, the function c2d.m executes the loge with a delay i one is specified. “Nonlinear Models Contrary tothe predominant developments inthis book. models of dynamic sy tems are generally nonlinear, However ts more dificult apply analysis to sonfinear models and. thus, less insight is gained if models are left in their monin- ear form throughout the entre design process. Contrls engincers commonly use ‘numerical simulation of nonlinear models 1o evaluate te performance of control ‘stems. a techie that should always bea part of any conto system design ‘Toaid in the design synthesis of controllers ard t gain insight into approximate ‘behavior. itis often advantageous to linearize the system so the methods inthis textcan be utilized ‘We begin with th seribed by a tof ordinary Je assumption that our plant dynamics are adequately de. State-arable form 3 beh a. yee atts 48) ‘escribed by aay ‘One proceeds as follows with the process of linearization and small-signal approximations. We sssume stationarity by he approximation that fan h donot change significantly from thei inital values at. Thus we can set fut ox simply foxu), y showy aso

You might also like