INTRODUCTIONTO CONTROL SYSTEM DESIGN EDITIO HARRYKWATNY& BOR-CHINCHANG Introduction to Control System Design FirstEdition HarryKwatny andBor-Chin Chang DrexelUniversity SAN DIEG ii Bassim Hamadeh, CEO and Publisher John Remington, Executive Editor Gem Rabanera, Senior Project Christian Berk, Production Editor Editor Emely Villavicencio, Senior Graphic Designer Trey Soto, Licensing Coordinator Natalie Piccotti, Director of Kassie Graves, Vice President Marketing of Editorial Jamie Giganti, Director of Academic Publishing Copyright 2021 by Cognella,Inc. All rights reserved. No part of this publication maybereprinted, reproduced, transmitted, or utilized in any form or by any electronic, mechanical, or other means,now known or hereafter invented, including photocopying, microfilming, and recording, orin any information retrieval system without the written permission of Cognella, Inc. For inquiries regarding permissions, translations, foreign rights, audio rights, and any other forms of reproduction, pleasecontact the Cognella Licensing Department at rights@cognella.com. Trademark Notice: Product identification Cover image: Printed in the or corporate and explanation Copyright names without intent 2019 iStockphoto United States of America may be trademarks to infringe. LP/akinbostanci. or registered trademarks and are used only for Preface A S an introduction to the design of automatic control systems, the books primary objective is to provide students with the basic concepts and tools that are usedin present-day practice. Wenot only want our students to know how to design a control system, but also to understand why we dothings the way we do. In this way,the students will be prepared to innovate and expand current methodsto address new automation technology challenges in the coming years. Part of this processis to give students a sense of the evolution of control theory and practice. Control system engineering in todays technology environment requires a much broader set of con-cepts and tools than even a decade agoand the field continues to evolve. Classtime is fixed, the scope of the material is extensive, and rigor is essential. Consequently, subjects having lesser importance to-day haveless emphasis herein. Of course, such judgments are personal and not always easyto make.In makingthese choices, we have been guided by two central objectives. First, the content mustbe aligned with the needs of present-day applications and make use of modern computational tools. Second, the narrative must reflect a respect and acknowledgement of the historical evolution of control analysis and design theory. This book is intended for a two quarter/semester course. Correspondingly, the book is structured with two main parts. Thelevel of complexity of Part I is somewhat mitigated by the fact that atypical student will have had some prior exposure to some of the information, albeit in a different context. Part I also contains preliminary hints of materialto come in PartII, withthe idea of smoothing the exposure to complex new ideas. Part I introduces basic linear system analysis and model-assembly concepts. It begins, in Chapter 1, with a short history its evolution, along with the contributions of control system of control theory design, highlighting the applications driving pioneers from late 19th century to the current era. Although practical systems can be complex and of high order, their building blocks arefirst-order and second-order dynamic systems. Understanding the fundamental concepts of the first-order and second-order systems is essential to the analysis and design of high-order systems. Chapter 2 is focused on systems with typical speed dynamics. first-order dynamics These systems, although such as massfriction physically different, systems, are RC circuits, mathematically and DC motor equivalent sharing the same form of differential equation characterized by just two parameters: the time constant andthe steady-state variables step response value. and Laplace transforms This enables us to systematically with the learning integrate of the fundamental the essentials of complex system concepts in both time and frequency domains including transfer functions, characteristic equations, poles, time constants, step responses, sinusoidal steady-state responses, frequency responses, frequency filtering, Bode plot, and so on, while maintaining a connection with applications and mathematical modeling iv Preface Chapter 3 expands the applications to the typical second-order dynamics such as massspringdamper systems, RLC circuits, and position control of a DC motor. Similar to the group of first-order systems mentioned in the previous paragraph, these second-order systems are mathematically equivalent sharing the same form of differential equation characterized byjust three parameters: the damping ratio, the natural frequency, and the steady-state step response value. The fundamental system concepts we learn in Chapter 2 are largely applicable to the second-order systems. One of the main differences is that second-order are interpreted systems enable the appearance in the time and partial fraction domain of complex and the frequency expansion introduced. poles in a physical domain. The ability context. Transfer functions to change pole location Their dynamics concepts are expanded by using feedback is illus-trated. Bothtime response and frequency response perspectives andinterpretations are developed in the context of easily understood An essential requirement physical physical of control systems. system design is that the engineer behavior in order to be successful. model of the system to be controlled. Control design in todays has a full grasp of the systems world begins It is essential that the control with a mathematical design team understands its formu-lation and the assumptions on which it is based even if they do not assemble the model. Withthis in mind, the next two chapters Mechanical systems Both approaches deal, respectively, modeling, eventually with the modeling of Chapter 4, addresses and compares will lead to exactly the same dynamic mechanical and electrical Newtonian systems. and Lagrange techniques. model equations. However, they have completely different road mapsto reach the same destination. The Newtonian approach involves the geometry and vector relationship of each component in the mechanical system. Onthe other hand,the Lagrange approach only needsthe information of the kinetic energy, the potential energy, the power dissipation, and the external forces, but it requires differential calculus computations. Both have advantages and disadvantages, but they complement each other perfectlythe disadvan-tage of one is the advantage of the other, and vice versa. The Newtonian approach is moreintuitive, providing clear picture of the interactions among components inside the system, but the modeling pro-cess can be tedious, especially for large multi-body systems. Conversely,the Lagrange approach is more elegant without the needto worry aboutthe directions of vectors and detailed interconnection of compo-nents, but it allows virtually no insight of the interactions among components within the system. Students are urged to employ both approaches, especially for complicated systems, to minimize modeling errors. Sinceit is rare to commit same modeling errors using the two fundamentally different approaches, the modeling result is moretrustworthy if it is confirmed by both approaches. Shortly after obtaining the nonlinear dynamics model of the inverted pendulum system in Chapter 4, wefelt obligated to digress a little bit to explain how the unstable nonlinear system is relevant to the linear control theory. The discussion articulates the process of determining a local linear design model from the nonlinear model as well as the integration of the linear controller with the actual nonlinear system. Working with this relatively simple nonlinear system provides the opportunity to introduce an intuitive state-space analysis and design approach that stabilizes the originally unstable system using a basic pole placement concept the students havejust learned in Chapter 3. Computer tools also are in-troduced as the examples progress, for instance, Simulink is usedto provide a computer simulation of the stabilized space analysis inverted pendulum. Formal and design approaches definition of stability, controllability, and more advanced state will be given in later chapters. Forthe electrical system model building in Chapter 5, wefirst review Kirchhoffs voltage and cur-rent laws (KVL and KCL), and the characteristics of fundamental two-terminal electrical elements, which includes resistor, capacitor, inductor, voltage source, and current source. Then we demonstrate how to employ the NTD (node-to-datum) voltages approach, the meshcurrents approach, and the direct state-space approach to assemble approaches have two versions: electric system one in time domain, models. The NTD voltages and the and the other is in frequency mesh cur-rents domain. Th Preface frequency-domain time-domain version, also called the impedance version, is basically v a Laplace transform of the version; thus, all KVL and KCL equations have become algebraic andthe characteristics of capacitors and inductors are now governed by the generalized Z(s) is the impedance. through In the direct state-space the inductors Ohms law: approach, the voltages are selected as state variables, V(s) = Z(s)I(s), across the capacitors and then the KCL and the where and the cur-rents KVL, respectively, are employed to obtain a KCL equation at a node connecting to the capacitor, and a KVL equation around a mesh containing form the inductor. These KCL and KVL equations can be easily rewritten in the of state equations. The Lagrange approach can also be applied to electrical systems modeling, in which the electric charge q and its derivative ?q (the electric current) are considered as configuration variables. The con-structions of the Lagrangian function and the Lagrange equation are similar to those for the mechanical systems except that for electrical inductors and the capacitors, using the virtual systems the kinetic respectively, while the generalized work, which is contributed In Section 5.6, weintroduce energy and the potential energy are stored in the external force vector can be obtained by the voltage source and the dissipation the operational amplifier, usually called op amp, in the resistors. which is an almost ideal electronic amplifier dueto its three special properties: extremely large voltage gain, extremely high input impedance, and almost zero output impedance. a perfect building block in interconnected to the development of the virtual-short These three systems properties not only due to its extremely makethe op amp circuit low loading effect, but also lead concept approach for the op amp circuit analysis and design. The virtual-short concept approach has madeit possible to greatly simplify the analysis and design of op amp circuits, which otherwise would be extremely complicated. Opamp circuits can be easily built to perform filtering, a variety of functions PID controller like signal addition, implementation, substraction, binarytodecimal integration, conversion, detection, amplification, decimaltobinary conversion, common-mode disturbance cancelation, and so on. In the beginning of Chapter 2, the DC motor system, together circuit and the impossible massfriction for its dynamics consisting system, was considered model to be so simple of an electric circuit, a gear train, a typical since the with the simple RClow-pass filter first-order and a rotational latter which describes how the mechanical torque is dictated gives the back EMF (electromagnetic force) equation, system. It seems to be is a complicated sys-tem, mechanical system. In Section 5.7, we first briefly review Amperes force law and Faradays law of induction. equation, dynamic DC motor physically Theformer provides the torque by the armature electric which explains current, and the how the back EMF voltage is related to the motor rotor speed. Applying Kirchhoffs voltage law to the armature electric circuit will give afirst-order KVL differential equation that relates the armature current to the applied control input voltage. Meanwhile, the Newtonian or the Lagrange approach can be applied to the rotational me-chanical system with gear train to obtain the mechanical rotational motion equation, which is another first-order differential equation that describes how the armature current will affect the motorrotor speed. The four equationsthe torque equation, the back EMF equation, the KVL equation, and the me-chanical motion equationcan be combined and simplified to a second-order differential equation that describes how the applied input voltage will control the motorrotor speed. Sincethe inductor impedance of the armature coil is negligible compared to the resistor resistance, the order of the differential equation is reduced to one. Hence,the DC motor system dynamics can be represented by atypical first-order dif-ferential equation characterized by two parameters: the time constant and the steady-state step response value. Thesetwo parameters are functions of the torque constant Km,the back EMF constant Kb, and the resistor resistance Ra of the armature coil, which can be found from the manufacturers data sheet. Thesetwo parameters also can be obtained from a simple step response experiment in the lab. At the end of Chapter 5, we conduct an open-loop simulation to observe the open-loop step re-sponse of a DC motor. Then we design a simple integral feedback controller Ki/s to achieve perfec vi Preface steady-state speed tracking, and a desired transient response with small maximum overshoot by select-ing the integration constant Ki so that the desiredclosed-loopsystem dampingratio is ? = 0.9. Since there is only one design parameter the damping ratio problem or the Ki in the controller, natural frequency. using a dual-loop controller Later in structure we can only choose a desired value for either Chapter 6, we will revisit this speed tracking with two design parameters, con-trol which can be chosen to achieve the desired damping ratio as well asthe desired natural frequency for the closed-loop system. Forinstance, if the natural frequency is double while keeping the damping ratio unchanged at ? = 0.9, then the step response will rise up approximately two times faster while keeping the maximum overshoot unchanged. Thefinal chapter of Part I discussesthe assembly of modelsfor interconnected systems. Block di-agrams and signal flow assemble graphs as well as Masons gain formula are introduced. more complex models composed in either a state-space the solution of interconnected model or a transfer function of the state equation and to introduce elements is achieved. Thus, the ability to This construction model. This provides the opportunity the concept of the state transition re-sults to discuss matrix. In addition, the construction of the transfer function from a state-space model and its reverse, the construction of a state-space model from the transfer Part II is focused are included, (MIMO) on linear function, control are both discussed. system design. and both single-input/single-output systems are discussed. The first Both frequency-domain (SISO) chapter in and time-domain meth-ods systems and multiple-input/multiple-output Part II, Chapter 7, is focused on the fundamentals of feedback systems. It begins with a discussion of how feedback affects the system dynamics and de-scribes the benefits and limitations of feedback. System representations in time and frequency domain are again discussed, discussed, but at a somewhat deeper level than in Part I. Stability both bounded-input/bounded-output (BIBO) stability of linear systems is formally and internal stability are defined the differences articulated. Again, this is to set the stage for deeper consideration later in the Similarity transformation of state-space models are addressed, and both diagonal and companion are highlighted. Naturally, this leads to another discussion of pole placement via state feedback. is again devoted to the cart-inverted pendulum system as a meansto summarize the control methodsintroduced at this point. Chapter 8 provides a complete discussion of compensator design via the root locus achieve stability, regulation, and a best possible transient response implied and book. forms A sec-tion design method to by pole locations. It be-gins with a study of steady-state error andintroduces the concept of system type andits role in achieving zero steady-state error. Theinternal model principle is also briefly introduced. A cruise control exam-ple is usedto provide an overview of the design process, including performance objectives, the role of feedback and feed-forward in achieving those goals, as well asthe notion of performance robustness with respect to model uncertainty. The root locus methodis presented in some detail, including the ba-sic construction rules, whythey are useful in design, and how to dothe computations using MATLAB. Simple examples illustrate key points throughout this discussion. More expansive examples are given in the last three sections. First, a DC motorsinusoidal position tracking controller is usedto illustrate the application of the internal model principle along with root locus design. The next section examines the longitudinal illustrate flight path control the difficulty level A sophisticated of the F/A18 of controlling root locus aircraft. the extremely design with integral is employed to achieve stability and flight pathtracking. can be accomplished One of the using the flight In this example, low-damping, regulation manual control long-period is simulated (phugoid-mode) and state-feedback to os-cillations. pole placement Thelast section illustrates how altitude regula-tion path angle tracking controller. mostimportant requirements in the design of feedback control systems is robust sta-bility, since an unstable system is The robust stability issue caused not only by time useless but can be harmful delay and plant uncertainties or potentially cause a disas-ter. is considered in Chapter 9 Preface Chapter 9 focuses on robust stability beginning with a discussion delay, and how it can degrade closed-loop stability. Cauchys emphasis principle precedes a discussion on Nyquists world that is theorem more easily of the accomplished including A discussion of complex contour Nyquist plot and the is not as a tool for gain and phase margins. The relationship of plant uncertainty, determining by direct computationbut systems time mapping and Nyquist stability closed-loop vii criterion. The stabilityin to-days to establish the concepts of between Nyquist and Bode plots as a meansto obtain these margins is also discussed. Gain and phase no meaningful margins do not extend to definition multiple-input/multiple-output for the phase of a matrix loop transfer considers the generalized stability magnitude (or the function. allowable maximum of the marginfor singular The frequency-dependent variation function. The final because there is section of this chap-ter margin, an approach conceived to address this deficiency. This new approach of defining a generalized stability based on the systems magnitude (or the MIMO systems wasdiscovered in the 1980s value for MIMO case) of the complementary generalized stability maximum singular margin function value for gives the MIMO systems) sen-sitivity maximum of the plant for every frequency so that the closed-loop system can still remain stable. State-feedback design, introduced briefly in previous chapters, is the focus of Chapters 10 and 11. The state-space approach became popular in the early 1960s beginning with the publications of Rudolf Kalman. Instead to earlier of frequency-domain methods (i.e., Laplace transform methods of analysis and design using differential approaches) equations initiated attention by James returned Clerk Maxwell. The main reasons for this paradigm shift are listed in the following: the state-space approach resolved basic theoretical frequency-domain tools to MIMO systems; the nonlinear identify system state-space representation the equilibria problems that had impeded the extension of is elegant and versatile, of the system, and to find a local (linear allowing or nonlinear) systematic ways to model at each equilib-rium of interest that can be employed in analysis and controller design; the state-space framework makesit easier to formulate the control problems as constrained optimiza-tion problems like the LQR (linear quadratic regulation), the LQG (linear quadratic Gaussian),the H2 optimization, and the H8 optimization control problems; the computing capability and the miniaturization of the digital computer have facilitated the appli-cations of the state-space control approaches in almost every product usedto achieve automation, precision, reliability, and performance enhancement. The emergence of the state-space approach did not meanthe end of the frequency-domain approach. Instead, the state-space modelframework has madeit possible to incorporate frequency-domain perfor-mance requirements into and the time-domain design of large-scale properties MIMO control systems. both remain important The frequency-domain aspects of any system. properties They are inseparable. In fact, the time-domain responses, stability, and robustness are dictated by the pole locations the frequency response of the system, as will be witnessed throughout the book. and Ourtreatment of state-space control system design consists of two parts: the state-feedback control part in Chapter 10, which assumes that all state variables part in Chapter 11 that is capable of providing of the physical system model, the input, other in a perfect fashion. The state-feedback an amazingly flawless duality an estimate and the are available for feedback, of all state variables measured output. control theory These two based on the information parts complement and the observer theory or the linear each are related by relationship. Chapter 10 focuses on the state-feedback control theory and implementation placement and the observer quadratic regulator 10.1 of the previous state-feedback (LQR) design approaches. content in earlier chapters, either via the pole After a short overview Section 10.2 considers a lightly in Section dampe viii Preface pendulum position control example, illustrating to state-feedback stabilization is introduced zeros into in Section 10.3. input-decoupling, the entire linearizing via pole placement and tracking. MIMO system and transmission the nonlinear dy-namics The concept of controllability poles and zeros are defined output-decoupling Linear quadratic regulator process, from zeros is and the classification discussed in Section of 10.4. design is the subject of Section 10.5. It is an optimal control problem to design a state-feedback controller that stabilizes the closed-loop system and minimizes a weighted quadratic performance index. and role of the performance State-space and observer Stabilization weighting design fundamentals design are introduced. properties that result from this approach and the structure matrices are discussed. are completed in Chapter 11 It provides a thorough where the concept investigation of observability of observer theory and imple-mentation by either pole placement orthe linear quadratic Gaussianestimation (LQG) approaches. The duality of controllability highlighting and observability the significance is noted, and the notion of controllability of a minimal realization and observability. output feedback design (i.e., the LQG problem). Section is discussed 11.5 is devoted to observer-based As a result of the separation principle, the state feedback controller and the observer can be designed separately and then combined to form an output feedback control solution as an H2 problem, thereby for the standard generalizing H2 control its control design problem. The final section of the book contains five appendices intended concepts necessary to the numbers, including includes of Laplace transforms model linearization models and linear LQG of the book. primarily Appendix to review A contains prerequisite a review math-ematical of complex alternative representations, Eulers formula, and algebraic operations. Appendix B a discussion system main topics Section 11.6 reformulates design capabilities. controllers and examples process is provided in fit in real (e.g., nonlinear) of their application. Appendix A summary C. An understanding applications is a theme of the dy-namic of how linear of the book. Appendix D provides a discussion of Masons gain formula andits application to the reduction of multi-loop feed-back block diagrams and/or signal flow graphs. Finally, Appendix E provides a review of matrices and vectors including a discussion of the geometry of vector spaces. We want to emphasize the importance throughout the book computation of modern computational is an essential devices part of the control system and methods. design and analysis As noted process. Not only do moderntools allow usto easily execute required control design computations, but they also provide essential mechanisms for learning assemble computer simulations and validation of physical systems of controller along with their design concepts. controllers The ability provides to an important virtual laboratory. Herestudents can gain insight into the physical processes and complete a preliminary evaluation of the effectiveness of the control design. Throughout the book we use MATLAB/Simulink for performing the required computations and simulations. Preliminary versions of the book were used and updated through years 2018 and 2019 as well as the first two quarters of 2020. Professor Ajmal Yousuff, Dr. Mark Ilg, Dr. Mishah Salman, all four quarters Multiple colleagues Dr. Christine of the calendar and friends, Belcastro, including Professor Sorin Siegler, Professor Baki Farouk, and Dr. Hossein Rastgoftar taught multiple classes and provided impor-tant feedback. Wegratefully acknowledge their contributions. Wealso acknowledge the valuable con-tributions of our teaching assistants and graduate students, including Nilan Jayasuriya, Po-Chun Chan, Mevlut Bayram, Fatih Catpinar, Brian Amin, Joseph Masgai, and David Hartman. Student response, both solicited and unsolicited, was critically important to us. Special thanks go to Ms. Gem Rabanera and Ms. Abbey Hastings, the editors of Cognella Inc., for their editorial guidance and assistance. Fi-nally, we are profoundly appreciative of the support and patience of our wives Miriam Kwatny and Janet Chang Contents Part I 1 Basic Introduction 3 1.1 Control Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 A Little 4 Impact 1.4 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . of the Digital A First Example: Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Linear Systems Analysis I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Typical 2.1.1 2.2 2.5 Mathematical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Equivalency Among First-Order 9 v -1.............................. 11 2.2.1 Significance of the Imaginary 2.2.2 Polar Form, Rectangular Formula . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.3 Geometrical Aspects of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 A Brief Review of the Laplace Number Dynamic 9 11 11 Form, and Eulers Transform ... .. ... . . ... .. ... . . ... .. .. .. . ... .. . ... 2.3.1 Laplace Transform Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Laplace Transform Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time-Domain Response of Typical First-Order Dynamic Systems . . . . . . . . . . . . . . . 2.4.1 The Response of the Typical First-Order System Dueto Initial Condition . . 2.4.2 The Response of the Typical First-Order Systems Dueto Unit Step Input . . Frequency-Domain Properties of Typical First-Order Systems . . . . . . . . . . . . . . . . . . 2.5.1 Transfer Functions and Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 Characteristic Equation and System Poles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.3 The Responsesof the Typical First-Order Systems Dueto Sinusoidal Inputs 17 20 23 23 25 27 27 28 29 Bode Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Linear Frequency Systems Responses and the II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Typical Second-Order Dynamic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.1.1 Systems . . . 40 Systems . . . . . . . . . . . . . . . . . 41 Transfer Function, Characteristic Equation, and System Poles . . . . . . . . . . . . . . . . . . . . . . Time-Domain Response of Typical Second-Order Dynamic Systems. . . . . . . . . . . . . . . . . 42 4 3.1.2 Analysis . . . . . . . . . 17 . .. . .. . .. . .. . .. . .. . .. . .. . .. 2.5.4 3.2 3.3 Dynamic 2.1.2 Characterization of Typical First-Order Dynamic Systems . . . . . . . . . . . . . . . . . . . A Brief Review of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 3.1 First-Order Systems . . . . . . . . . . . . . 2.3 2.4 Cruise 5 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 3 Systems . .. . ... . .. .. .. ... . .. .. .. ... . . ... .. ... . . ... .. ... . . ... .. .. .. . ... .. . ... 1.3 2 Concepts of Linear Mathematical Characterization Equivalency of Typical Among Typical Second-Order Second-Order Dynamic Dynamic x Contents 3.4 3.5 3.6 4 3.3.1 The Response of the Typical 3.3.2 The Response of the Typical Second-Order Systems Dueto Unit Step Input . . . . Characterization Underdamped Systems Second-Order Conditions .. Complex Plane . . . . . . . . . . . . . . . . . 57 System . . . . . . . . . . . . . . . . . . . 57 3.4.2 Step Response of the 3.4.3 Graphical Interpretation of the Underdamped Second-Order Step Response . . . . Second-Order Design of a MassDamperSpring Analysis and Design of a Simple Sinusoidal System DC Motor Position 50 57 Geometry of Conjugate Underdamped 44 Systems . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Analysis and System Poles on the Due to Initial .. ... . . ... .. .. .. . ... .. . ... Control Response and Bode Plot of Typical System . . . . . . . . . . . . . . . . 64 Steady-State Systems . . . . 66 3.8 Exercise Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Modeling of Mechanical Systems . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Translational Mechanical Systems . . . . . . . . . . . . . . . . . . . 4.1.1 dAlemberts Principle . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 A Brief Introduction of the Lagrange Approach . . 4.1.3 A Quarter-Car Suspension System . . . . . . . . . . . . . 4.2 Rotational Mechanical Systems. . . . . . . . . . . . . . . . . . . . . . 4.2.1 dAlemberts Principle in Rotational Systems. . . . 4.2.2 The Lagrange Approach for Rotational Systems . 4.2.3 A Two-Rotor/One-Shaft Rotational System . . . . . 4.3 A Rotational System with a Gear Train . . . . . . . . . . . . . . . A Simple Inverted 4.4.1 4.5 4.6 5.4 5.5 5.6 5.7 . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . 73 73 74 77 78 80 81 83 84 86 Pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.4.2 Equilibriums and Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.4.3 State Feedback Cart-Inverted Controller Pendulum Pendulum . . . . . 93 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Approach Design to Stabilize Modeling of the a Simple Inverted 4.5.1 The Newtonian 4.5.2 Lagranges Approach Modeling of the Cart-Inverted Pendulum System . . . . . . . . 99 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Cart-Inverted Pendulum System . . . . 97 Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Basic Electrical Circuit Elements and Circuit Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 106 Basic Time-Domain Circuit Modeling Approaches and Kirchhoffs Laws . . . . . . . . . . . . 107 Circuit Modeling Using the 2k Equations Approach . . . . . . . . . . . . . . . . . . . . . . . . 108 5.2.2 The NodeToDatum (NTD) Voltages Approach 5.2.3 The Mesh Currents Approach . . . . . . . . . . . . . . . . BasicImpedance Circuit Modeling Approaches . . . . . . . . 5.3.1 The Impedance NTD Voltages Approach . . . . . . . 5.3.2 The Impedance Mesh Currents Approach . . . . . . The Lagrange Approach for Circuit Modeling. . . . . . . . . . Circuit Modeling Usingthe State-Space Approach. . . . . . Operational Amplifier Circuits. . . . . . . . . . . . . . . . . . . . . . . DC Motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.1 5.8 . . . . . . . . . . 88 5.2.1 5.3 . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. Pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modeling of Electrical 5.1 5.2 . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. Modeling the Simple Inverted .. .. .. .. .. .. .. .. .. .. Second-Order 59 61 3.7 4.4 5 of the Second-Order Amperes Force Law and Faradays Equations for the DC .. .. .. .. .. .. .. .. .. Law of Induction . .. . .. . .. . .. . .. . .. . .. . .. . .. . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. 109 110 110 112 113 113 118 122 128 . . . . . . . . . . . . . . . . . . . . . . . 129 5.7.2 Assembling 5.7.3 Torque-Speed Relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Motor System . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.7.4 A DC Micromotor Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Contents 6 Systems Representations Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 6.1 Block Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 6.2 Signal Flow 6.2.1 6.2.2 Graphs and Signal Flow Masons Masons Gain Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Gain Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.3 State-Space Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 6.4 State Transition Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 6.4.1 Theorems 6.4.2 Computing the State Transition and Properties of the State Transition Matrix . . . . . . . . . . . . . . . . . . . . . 152 Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 6.5 Solution of the State Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 6.6 State-Space 6.6.1 6.7 Part II 7 and Interconnected xi Models and Transfer Find Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Function from State-Space Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 6.6.2 Construct a State-Space Modelin Companion Form Using Direct Realization . . 164 6.6.3 Construct a State-Space Modelfrom Interconnected Systems . . . . . . . . . . . . . . . . 166 Exercise Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Linear Control System Design Fundamentals of Feedback Control Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 7.1 Features of Feedback Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 7.2 7.1.1 A Demonstrative 7.1.2 Performance 7.1.3 Advantages and Limitations of Feedback Control . . . . . . . . . . . . . . . . . . . . . . . . . . 180 System 7.2.1 7.2.2 7.3 7.4 7.5 7.6 7.7 7.8 Feedback Verification Representations Transfer Impulse Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 by Time-Domain Simulation . . . . . . . . . . . . . . . . . . . . . . 178 and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Function and Differential Response and Transfer Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 7.2.3 State-Space Model and Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 7.2.4 Characteristic Equation, Poles, and Zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Stability of Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Zero-State Response and Zero-Input Response. . . . . . . . . . . . . . . . . . . . . . . 7.3.2 BIBO Stability and Internal Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Similarity Transformation in State Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Diagonalization of A Matrix Using Similarity Transformation . . . . . . . . . . 7.4.2 Obtaining a State-Space Modelin Companion Form Using Similarity Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pole Placement Control in State Space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.1 State-Feedback Pole Placement: Direct Approach . . . . . . . . . . . . . . . . . . . . Pole Placement: . . . . . . .. . .. . .. . .. . .. 188 188 191 194 195 . . . . . . 197 . . . . . . 200 . . . . . . 201 7.5.2 State-Feedback Revisit Cart-Inverted 7.6.1 State-Space 7.6.2 Equilibriums of the Cart-Inverted Pendulum System . . . . . . . . . . . . . . . . . . . . . . . . 207 7.6.3 Linearized 7.6.4 Design of a Stabilizing Pendulum Transform .. .. .. .. .. Model of the Cart-Inverted State-Space Approach . . . . . . . . . . . . . . . . . . . . . . 202 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Pendulum Models at the Equilibriums Controller for the Upright System . . . . . . . . . . . . . . . . . . . 206 . . . . . . . . . . . . . . . . . . . . . . . . . 209 Equilibrium . . . . . . . . . . . . . . . 211 Routh-Hurwitz Stability Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Exercise Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 xii 8 Contents Stability, 8.1 8.2 8.3 Regulation, 8.5 8.6 Root Locus Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Type of Feedback Systems and Internal 8.1.1 Steady-State 8.1.2 Type of Feedback An Automobile Model Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Systems and Internal Cruise Control Model Principle . . . . . . . . . . . . . . . . . . . . 227 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 8.2.1 Assembling a Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 8.2.2 Design of the Controller K(s) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 8.2.3 Simulation 8.2.4 Robustness to 8.2.5 Disturbance Feed-Forward Compensation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Results with Ideal Engine Model GE(s) = 1. . . . . . . . . . . . . . . . . . . . . 241 Model Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Root Locus Preliminaries 8.3.1 8.4 and . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Root Loci Construction Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 8.3.2 Root Loci Construction Using MATLAB . . . . Root Locus Analysis and Design. . . . . . . . . . . . . . . . . . 8.4.1 The Root Locus Method . . . . . . . . . . . . . . . . . . 8.4.2 Explaining the Root Loci Construction Rules. A Sinusoidal Position Tracking Control System . . . . . Controller Designfor F/A18 Flight Path Control . . . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. . .. . .. . .. . .. . .. . .. . . . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. . . . . . . . .. . .. . .. . .. . .. . .. 258 261 262 263 266 271 8.6.1 Open-Loop ManualLongitudinal Flight Controlof F/A18 by de. . . . . . . . . . . . . 273 8.6.2 PI Controller Designfor F/A18 8.6.3 State-Space 8.6.4 Comparison of the PI Controller and the Integral Controller with State-Feedback Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 Pole Placement Flight Path Control . . . . . . . . . . . . . . . . . . . . . . . . 277 and Root Locus Design for F/A18 Flight Path Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 9 8.7 Aircraft 8.8 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Altitude Regulation via Flight Path Angle Tracking Control . . . . . . . . . . . . . . . . . 289 Time Delay, Plant Uncertainty, and Robust Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 9.1 9.2 9.3 9.4 9.5 Stability Issues Caused by Time Delay and Plant Uncertainty . . . . . . . . . . . . . . . . . . . . . . . 297 9.1.1 Time Delay and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 9.1.2 Plant Uncertainty and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Contour Mapping and Cauchys Principle of the Argument. . . . . . . . . . . . . . . . . . . . . . . . . 299 9.2.1 Complex Contour Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.2.2 Cauchys Principle of the Argument. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 Nyquist Path, Nyquist Plot, and Nyquist Stability Criterion . . . . . . . . . . . . . . . . . . . . . 9.3.1 Nyquist Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3.2 Nyquist Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3.3 Nyquist Stability Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3.4 Stability Issue Arising from Feedback Control System with Time Delay . . . Robust Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.1 Gain and Phase Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.2 Effect of the Gain of Loop Transfer Function on Gain and Phase Margins. . Generalized 9.5.1 9.5.2 9.5.3 Small Stability . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. 306 306 308 310 315 322 322 325 Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Gain Theorem and Robust Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Interpretation of the Generalized Stability Margins. . . . . . . . . . . . . . . . . . . . . . . . . 331 Relationship Between Gain/Phase Margins andthe Generalized Stability Margins333 9.6 Essential 9.7 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Closed-Loop Transfer Functions and Loop Shaping . . . . . . . . . . . . . . . . . . . . . . 337 Contents 10 State Feedback and Linear Quadratic Optimization xiii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 10.1 Brief Review of the State-Space Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 10.2 Control of a Lightly Damped Positioning 10.2.1 A Simple Pendulum 10.2.2 State-Feedback Stabilization 10.2.3 Stabilization of the 10.2.4 Tracking Placement 10.2.5 Tracking System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Positioning System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 of the Pendulum Motor/Propeller-Driven Control of the Pendulum Positioning System . . . . . . . . . . . . 351 Pendulum Positioning System . . . . . 353 Positioning System Using State-Space Pole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Control of the Pendulum Positioning System Using PID Control . . . . . 362 10.3 Controllability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 10.3.1 Controllability Rank Test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 10.3.2 The Controllability Decomposition Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 10.4 Poles and Zeros of MIMO Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4.1 Revisit Poles and Zeros of SISO Systems . . . . . . . . . . . . . . . . . . . 10.4.2 Physical Meaning of System Zeros . . . . . . . . . . . . . . . . . . . . . . . . 10.5 State-Feedback Control via Linear Quadratic Regulator Design . . . . . . 10.5.1 Performance Index and LQR State Feedback . . . . . . . . . . . . . . . . 10.5.2 Stabilizing Solution of the Algebraic Riccati Equation . . . . . . . . 10.5.3 Weighting Matrices Qand Rin the Performance Index Integral . 10.6 Exercise Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Observer 11.1 11.2 Theory and Observability Output Feedback Control .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. 373 374 375 380 381 382 384 390 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 11.1.1 Observability Rank Test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 11.1.2 The Observability Decomposition Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Duality in State Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 11.2.1 Duality of Controllability and Observability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 11.2.2 State-Space Modelsin Controller Form and Observer Form. . . . . . . . . . . . . . . . . . 401 11.3 11.4 Minimal State-Space 11.4.1 11.5 Realization and Controllability Models and Minimal Direct Realization and Observability Realizations Approach to of . . . . . . . . . . . . . . . . . . . . . . . . . 403 MIMO Systems . . . . . . . . . . . . . . . . . . . 406 Assemble a MIMO State-Space MIMO State-Space Modelsin Block Controller and Block Observer Forms . . . . 409 11.4.3 MIMO State-Space Full-Order Observer and Models in Gilbert Output Feedback Diagonal Form . . . . . . . . . . . . . . . . . . . . . . . 415 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 11.5.1 Brief Review of State-Feedback Control . . . . . . . . . . . . . 11.5.2 Observer-Based Controller . . . . . . . . . . . . . . . . . . . . . . . . 11.5.3 Design of Observer-Based Output Feedback Controller 11.6 LQG Control Problem and the H2 Control Theory . . . . . . . . . . . 11.6.1 The LQG Control Problem . . . . . . . . . . . . . . . . . . . . . . . . 11.6.2 The Standard H2 Control Problem . . . . . . . . . . . . . . . . . . 11.6.3 Solutions to the Standard H2 Control Problem . . . . . . . . 11.6.4 Application of the Standard H2 Control Formula . . . . . 11.7 A Model . . . . . . . . 406 11.4.2 . . . . . . . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. . . . . . . . . . .. . .. . .. . .. . .. . .. . .. . .. 419 420 421 425 425 425 428 429 Exercise Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 A.1 Definition and Significance of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 A.2 Complex A.3 Eulers A.4 Algebraic A.5 MATLAB Commands for Complex Number Computations . . . . . . . . . . . . . . . . . . . . . . . . 43 Number Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 xiv B Contents Laplace Definition of Laplace Transform and Laplace Transform Pairs. . . . . . . . . . . . . . . . . . . . . . 441 B.2 Laplace Transform B.4 D E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 B.1 B.3 C Transforms Inverse Laplace MATLAB Equilibriums Properties and Transform in the Commands for and Linearized Laplace More Laplace Transform DC Motor Position Transform Pairs . . . . . . . . . . . . . . . . . . . 442 Control System . . . . . . . . . . . . . . . 444 Computations . . . . . . . . . . . . . . . . . . . . . . . . 449 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 Masons Gain Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 Vectors and E.1 E.2 E.3 E.4 E.5 E.6 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Vectors and Vector Space. . . . . . . . . . . . . . . . . Matricesand Linear Operators. . . . . . . . . . . . . Linear Algebraic Equations . . . . . . . . . . . . . . . Eigenvalues and Eigenvectors . . . . . . . . . . . . . Singular Value Decomposition. . . . . . . . . . . . . Positive Definite and Positive Semi-Definite .. . .. . . .. . .. . .. . . .. . .. . .. . . .. . .. . .. . . .. . .. . .. . . .. . Matrices . . . .. .. .. .. .. .. . .. . .. . .. . .. . .. . .. . . . . . . . . . . . . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . . . . .. . .. . .. . .. . .. . .. . .. .. .. .. .. .. . . . . . . . .. . .. . .. . .. . .. . .. 463 467 470 475 477 478 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Part I Basic Concepts of Linear System 1 Introduction F EEDBACK control is a centuries-old tool applied to quite primitive machinery in its earliest days. The last century saw an explosion of applications as mankind conceived of new machines and devices for manufacturing, communication, land and air travel, space exploration, and more. These applications provoked new functionalities of control that required a deeper understanding of how control systems worked. Hence, control systems emerged as a true engineering science. In this chapter, the basic structure of control systems will be discussed, along with a brief history of the evolution of the control discipline to where it is today. 1.1 Control Engineering Control engineering is a discipline dealing withthe design of devices, called controllers, that managethe performance of a system through based solely on the anticipated manipulation response of control of the system inputs. The control-input commands or they can adjust in accordance can be with observations of system behavior. Theformer is called open-loop control and the latter is feedback control. Feedback control is important environmental centuries, whenthere is imprecise knowledge of how the system will respond or there are uncertainties but today they that can affect are truly behavior. ubiquitous. Mechanisms of this sort have been employed Control systems are an essential part of chemical for and manufacturing processes, communication systems, electric power plants and systems, ground vehicles, ships, aircraft and spacecraft, robots and manipulators, computers, and so on. In the last century engineering wastransformed from a craft into a science. Thoseinterested in profit-ing from societys error to develop thirst for new technology new products or resolve have found it impossible problems in existing ones. to rely on time-consuming Modern technologies like trial and automo-biles, aircraft, telecommunications, and computers aretoo complex to thrive solely on vast compilations of empirical data and decades of experience. Some intellectual constructs that organize and explain es-sential facts and principles are required. So, engineering in general and control engineering in particular have come to adopt the style and methodsof the natural sciences. At the core of this point of view is the distinction between two thought processes: the physical, and the mathematical. While engineers conceive of problems in the physical world and construct solutions intended for application in the physical world,the solution is almost always developed in the mathemat-ical world. Todays domain we work engineers must be comfortable with abstractions of the physical. with translating Abstraction between them. In the is essential because mathematical most systems or devices involve so manyirrelevant attributes that their complete characterization would only obscure practical solutions. Onthe other hand, abstraction can be dangerous becauseit is often easy to overloo 4 1 Introduction important features and, consequently, to develop designs that fail to perform adequately in the physical world. Hereinlies the challenge and the art of engineering. Because of its interdisciplinary nature and the breadth of its applications, control engineering is es-pecially reliant on a scientific perspective. Unifying principles that bring together seemingly diverse subjects within a single inclusive as the ultimate unifying concept principle are of great significance. in science and technology, Mathematics, is very project 1.2 begins with a problem A Little definition engineering there is may be re-garded much at the heart of control engineering. In some circles control theory is considered a branch of applied mathematics is a necessary part of control which much moreto it. and ends with a solution implemented mathematics. But while A control system design in the physical world. History It is almost certain that feedback controllers in primitive form existed manycenturies ago. Butthe ear-liest to receive incorporated prominence in many systems in the Boulton-Watt written history is James steam engine of 1788. of the late 18th and 19th centuries Watts fly-ball Governors, during governor, or speed regulators, a device that was were important in which time several alternatives were developed to meetincreasingly stringent performance requirements. An article bythe noted physicist James Clerk Maxwell, On Governors, published in [Maxwell, 1868], is considered the first paper dealing directly with the theory of automatic control. In that paper Maxwell considers Watts governor and contempo-rary governing mechanisms developed by J. Thompson, L. Foucault, H. C.Jenkin, and C. W.Siemens [Siemens, 1866]. Heemphasizes the distinction between moderatorsand regulatorswhat we now refer to as proportional control and proportional plus integral control. In addition, Maxwell posedthe prob-lem of stabilization of alinear feedback system and solved it for athird-order system. Asolution method for higher order systems was developed independently by [Routh, 1877] and [Hurwitz, 1895]. Atthat time period, the Russian engineer Vyshnegradskiy worked on similar control problems, publishing his results in Russian [Vyshnegradskiy, 1877]. A discussion in English can be found in [Pontryagin, 1962]. Subsequent advances through the mid-1930s dealt with turbine speed control and other applications such as ship steering and stabilization published in [Minorsky, 1922], electric power systems static sta-bility in [Clarke, 1926, Clarke and Lorraine, 1933], navigation and aircraft autopilots in [McRuer and Graham, 2003]. Thesetechnology contributions also stimulated a formal definition of the basic feedback control problem called the servomechanism design problem as described in [Hazen, 1934]. The 1930s also saw the development of frequency response methodsfor dealing with stability issues in feedback systems. Whilethese techniques systems systems per se, the analysis. The were developed in the context methods of [Nyquist, 1932] and [Bode, WWII years produced of feedback amplifier design and not con-trol 1940] have become basic tools many new results. Radar, artillery fire control, of control navigation, and communications problems pushed control system technology to its limits and beyond. For the first time optimal control most prominent design problems were posed and solved (using example is the formulation problem, now known asthe and solution WeinerHopfKolmogorov The 1950s saw dissemination of the war years locus method[Evans, 1948]. Forthe first time Frequency (transform) of affairs turned more appropriate upside down for domain frequency-domain of the single-input/single-output efforts and also new results, including multiple-input/multiple-output control. con-trol Evans root control problems werefor-mulated. methods were by now well entrenched. and nonlinear The optimal problem [Wiener, 1949]. when R. E. Kalman argued that time-domain multivariable methods). The 1960s saw this state or state-space Kalman and Bucy solved the methods were multivariable ver-sion of the WeinerHopfKolmogorov optimal control problem in the time domain [Kalman, 1960a,b, Kalman and Bucy, 1961]. New,important concepts of controllability and observability wereintroduced [Kalman, 1960a, Kalman et al., 1963]. Indeed, state-space and optimal control methods seemed tailor 1.3 Impact madefor the race to the of the Digital Computer 5 moon in this decade. Through the 1970s and 1980s the theory attempted to reconcile the frequency-domain and time-domain perspectives. State-space methods merged and enriched the classical frequency-domain point of view. The notions of controllability and observability contributed to resolving the definition of multiple-input/multiple-output 1976]. (MIMO) system Concerns about robustness to zeros [Rosenbrock, model uncertainty 1973, came, 1974, MacFarlane and once again, into Kar-canias, focus. While Kalmans optimal control design provided many advantages in terms of stabilization, it wasrecognized that some applications The tracking 1972, required improved or regulator Davison, 1972, output tracking problem was formulated Wonham and Pearson, 1974]. and robustness with respect to in early 1970s [Johnson, Afeedback regulator model uncer-tainty. 1968, 1970, is a controller that Kwatny, both stabi-lizes the system and ensuresthat the error of selected performance variables goto zero whenthe system is subjected to a specified stability class of disturbances. and error zeroing The robust regulator is preserved even if selected problem plant parameters adds the requirement vary [Francis and that Wonham, 1976]. A new control design method for linear multivariable systems became a focus in the 1980s. Known as robust control or H8 control, this approach wasintended to reduce performance sensitivity to distur-bances as well as plant uncertainty for many decades, but a renewed and Krener, 1977, Brockett, [Zames, making. very little theory sometimes Doyle et al., 1989]. 1978] and new technology electric power systems. Another important decision 1981, focus emerged, spurred While it requirements, has been a concern in control theory including [Hermann aerospace, robotics, and aspect of control systems was modeswitching based on log-ical was a long-standing until the late 1980s. Nonlinearity by developments element Modern technologies based onlarge amounts of incoming of control implementation require increasingly data and often involving there more complex dynamics had been decisions, as well aslogic. Early theoretical work involved discrete event decision making (e.g., without considering system dynamics) [Ramadge and Wonham, 1989]. Morerecently, a hybrid system theory has emerged that integrates logic and dynamics [Branicky et al., 1998, Bemporad and Morari, 1999]. The articles starting cited are noted because of their foundational point because they are forward-looking significance. research papers. They may represent A more expansive a chal-lenging and accessi-ble account of the history of control system design can befound in numerous morerecent publications that look backward from elucidates the foundational a broader context. contributions of Notable articles include Maxwell. the paper [Kang, The papers [Bernstein, 2016], 2002] and [Bissel, which 2009] articulate the emerging technologies that drovethe evolution of control theory. And,finally, the papers of [Sussman and Willems, 1997] and [Pesch and Plail, 2009] deal with the development of optimal control. 1.3 Impact of the Digital Computer Not only hasthe theory of control engineering evolved quite substantially over the last several decadesdriven largely by a dramatically expanding domain of applicationsbut the tools of the discipline have also changed radically. and, particularly, In fact, one could argue that it is the availability implementation that underlies the pervasive inclusion of new tools for analysis, of feedback control in all design, manner of present-day systems and devices. Digital computers only became widely available in the 1960s and workstations and personal computers have become so powerful control not conceived Many systems of in earlier really came of age in the 1980s. and inexpensive that they During the past decade micro-processors have opened the door for applications of years. and products require feedback control in order to function. Examples include com-puter disk drives, robots, spacecraft, aircraft, and electric power systems, to name a few. It would b 6 1 Introduction impractical and often impossible to operate modern manufacturing systems or power plants efficiently and safely without automatic control. But even consumer products, from washing machinesto CD play-ers to automobiles, control require are integrated used in engines for improved traction or benefit in terms in their of cost and performance design. In automobiles, efficiency and emission for and climate control. when actuation, control control, in airbags, control and in suspension systems for improving mention cruise control example, both ridability So pervasive is the design of systems anti-lock sensing, and are increasingly brakes, and skid and and handling quality, not to mechanical systems integrated with sensing, actuation, and control that the name mechatronics has been coined to identify this branch of engineering. What makes this possible is the advent of compact and powerful microprocessors. The early feedback controllers werelarge mechanical devices. These, overthe years, weresuperseded by more compact hy-draulic, pneumatic, could perform and electronic only limited has dramatically devices. computations. reduced the cost and But, the improved The advancement miniaturized controllers of computer were still physically and semiconductor large and technology the hardware required in control system implemen-tations. The ability to rapidly execute complex algorithms in small, low power devices wastruly a game changer. 1.4 A First Example: Cruise Control Automotive cruise control systems present a convincing example of introducing moderncontrol concepts for several reasons. To begin with, mostautomobile drivers are familiar with them. Moreimportantly, cruise control systems have evolved from extremely simple devices with a single goal of manipulating the throttle to maintain a specified speed to highly complex systems with multiple inputs (manipulators) and outputs (sensors) and several distinct objectives. In addition, vehicles are becoming increasingly equipped with additional driver assist controllers such as dynamic stability control, active lane keeping, distance control, active braking, coordinated to avoid interference and controlled collision avoidance. All of these controllers need to be with each other. In classical cruise control, speed is measuredandthe throttle is adjusted in response to speed error. Design of the controller requires an understanding of how the vehicle speed responds to a change in engine torque as well as disturbances, the key disturbance being road slope. Wegenerally organize the design process by first constructing a block diagram consisting of the major elements to be considered, asillustrated in Figure 1.1. Fig. 1.1: Feedback configuration of a simple cruise control system. To design the controller, weneedto know how the engine torque responds to throttle change. Thus, we begin by assembling models of the plant (i.e., the vehicle andits engine). The modelsare built with 1.4 combination of physical principles and empirical A First Example: data. Finally, the model consists Cruise Control 7 of a set of differential and algebraic equations. The process of model building also involves a set of assumptions concerning the vehicle need to and its environment. make assumptions the vehicle aerodynamic Some are simple, about how it is loaded. resistance. and we just need to know the vehicle Others may be more complex, In designing the controller, mass, so such as how we are concerned we we model with, of course, how well speed is regulated. Is the closed-loop system, composed of the plant with controller, stable? How does the system respond to a change in speed command long does that take? Is there too performance acceptable if the much overshoot? mass is different (i.e., does the speed error go to zero)? We also need to test our assumptions. from what was assumed for controller How Is closed-loop design? Orif aerodynamic coefficients or engine parameters differ from assumptions? The cruise control orthe speed tracking control design will be discussed in Example 5.26 of Section 5.7.4, Example 6.1 of Section 6.1, and a mid-size SUV cruise control example in Section 8.2. In contemporary versions of cruise control there are additional have as many as nine gears. Gear shifting at the wheels. How should we coordinate gears and throttle? vehicle model from throttle decisions to speed changes significantly. with logic. Another factor of significance For example, some au-tomobiles factor in the change of torque Notethat eachtime a gear is changed, the Ordinarily, based on vehicle speed, engine speed, and possibly dynamics complexities. becomes an important gear change is based on logical other factors. is that Now it is necessary to inte-grate performance criteria has become more complex. Today, we are not only concerned about speed regulation, but fuel economy has become an equally important factor, especially in long-haul trucks. Another new element in cruise control. switching from control is the ability Here, again, there are logical one decisions mode of operation to another. to switch from speed control to distance fol-lowing based on data from multiple sensors that trigger How does this affect performance? dynamics and logic is a key component of control design in our current world The integration of 2 Linear Systems AnalysisI T HE goal of the following two chapters is to makeit easier for beginning students of control to associate mathematical terms and abstract concepts with real practical systems. Webegin with a few rather simple mechanical, electrical, and electromechanical systems that can be described by typical first-order and second-order differential equations in this chapter andthe following chapter, respectively. Thefirst-order systems will be characterized by a time constant t, andthe second-order systems will bespecifiedin terms of dampingratio ? and naturalfrequency ?n. Althoughthese char-acterization parameters are related to physical component values, they have the advantage of directly revealing essential properties of the system dynamics. Moreover,they underscore the notion that differ-ent physical domains can be understood and examined within a common framework of abstraction. Throughout this chapter, the simple yettypical first-order system will be employed to demonstrate fundamental terminology, concepts, and analysis tools including the transfer functions, characteristic equations, system poles, and the time-domain analysis that consists of the step responses andthe steady-state sinusoidal responses. The frequency-domain plot, will also be introduced. tangible analysis, including responses and Bode Readers will find these fundamental concepts and basic approaches quite since they are all applied to simple but real practical will be very helpful in the study of more complicated 2.1 Typical First-Order the frequency systems. Fully high-order understanding these funda-mentals systems in later chapters. Dynamic Systems Although not all physical systems fall into the categories of the typical first-order systems or second-order systems, the fundamental concepts and problem-solving skills welearn from these two typical systems provide a necessary knowledge basethat can be easily extended to more complicated high-order systems. In this chapter we will begin with the three simple physical systems shown in Figure 2.1: The mass-friction system in (a) is a mechanical system, the RC low-pass filter system in (b) is an electrical 2.1.1 circuit, and the DC motor system in (c) is an electromechanical Mathematical Equivalency Among First-Order system. Dynamic Systems The governing dynamic differential equation for the mass-friction system in Figure 2.1(a) can be easily derivedfrom Newtonslaw of motionthe effectiveforce fef f(t) applyingto the massMwillcausethe massto move with acceleration?v(t) = fef f(t) ?M, where v(t) is the velocity variable of the system. The friction force ffri(t)=-Bv(t) isproportional tothemagnitude ofthevelocity while itisalways against themotion ofthemass. Hence, we have feff(t) =fa(t)-Bv(t), which leads tothefollowing 10 2 Linear Systems Analysis I ?v(t)+Bv(t) M = fa(t) (2.1) Notethat v(t), the velocity of the massM,is the output orthe variable of interest in the system, and fa(t), the applied force, is the control input by which the Fig. 2.1: Mathematically equivalent systems: (a) (c) DC motorsystem. motion of the system can be changed or controlled. Mass-friction system, (b) RClow-pass filter circuit, and The RClow-pass filter system in Figure 2.1(b) consists of a voltage amplifier source ea(t) = Aes(t), a resistor R, and a capacitor with gain A, a voltage C. According to the characteristics of the capacitor, the currentflowing (downward)throughthe capacitorisiC(t) =C ?e(t), wheree(t)is the voltagevariable across the capacitor with the polarity specified on the diagram. Similarly, according to Ohms law, the current flowing (rightward) through theresistor isiR(t)=(1/R) (ea(t)-e(t)). Based onKirchhoffs current law (KCL), the current iR(t) flowing from the resistor into the junction of R and C should be equal to the current iC(t) flowing from the junction into the capacitor. The current equivalence leads to ?e(t)=(1/R)(ea(t)-e(t)), C andwith ea(t)=Aes(t) we have thefollowing: RC ?e(t)+e(t) = Aes(t) (2.2) Notethat e(t), the voltage across the capacitor, C,is the output or the variable of interest in the system, and es(t), the voltage signal at the input of the amplifier, is the control input by whichthe behavior of the electrical system can be changed or controlled. A schematic diagram of a DC motor system is given in Figure 2.1(c). Thesystem consists of a DC motor driven by an electric voltage source em(t), a gear reduction box with gear ratio N1/N2, and the load with moment of inertia JL and rotational friction coefficient BL. The mathematical modeling of the electromechanical system will be given later in Chapter 5. Although the modeling process will not be trivial, under some fair practical assumptions the behavior of the system can be described by a rather simple first-order linear ordinary differential equation ??L(t)+a?L(t) as follows: = bem(t) (2.3) where ?L(t) and em(t) arethe output angular velocity of JL andthe control-input voltage,respectively. The coefficients a and b are constants determined by the given motor system component values. Note that ?L(t), the angular velocity of the load JL,is the output orthe variable of interestin the system, and em(t), the voltage signal at the input of the DC motor,is the control input by which the behavior of the electromechanical system can be changed or controlled 2.2 2.1.2 Characterization of Typical First-Order Dynamic A Brief share some common and the third is electromechanical. properties. represents of interest equations constant and the steady-state step response of the three systems, typical first-order in the system, which the behavior of the system can be changed or controlled. time 11 However, these three systems intrinsically In fact, all of the governing the output or the variable Numbers first one is a mechanical system, the 2.1, 2.2, and 2.3, can be rewritten into the same form asthe following equation: t?x(t)+x(t) = xssu(t) where x(t) of Complex Systems Thesethree systems obviously are different in appearancethe second one is electrical, Review Equations differential (2.4) u(t) is the control input by The parameters t and xssstand for the of the system, respectively. Their physical meaning will be clearly described later in this section. After rewriting the mass-friction system governing equation, Equation 2.1, in the form of the typical first-order differential equation, Equation 2.4, we obtain (M/B)?v(t)+v(t) =(1/B)fa(t) wherethe output variable is x(t) = v(t), the control input is u(t) and the steady-state step response is xss =1/B. (2.5) = fa(t), the time constant is t = M/B, The RClow-pass filter system equation in Equation 2.2is already in the form of Equation 2.4, RC?e(t)+e(t) wherethe output variable is x(t) = Aes(t) (2.6) = e(t), the control input is u(t) = es(t), the time constant is t = RC, and the steady-state step response is xss = A. Rewriting the DC motor system governing equation, Equation 2.3, into the form of Equation 2.4 will give (1/a)??L(t)+?L(t) wherethe output variable is x(t) = (b/a)em(t) =?L(t), the control input is u(t) (2.7) = em(t), the time constant is t = 1/a, andthe steady-state stepresponseis xss= b/a. From these discussions, it is clear to see the mathematical equivalency among these three systems. The mathematical equivalency and the characterization of the typical first-order systems have boiled down the dynamic behavior study of a group of typical first-order systems to the investiga-tion of the two parameters t and xssin the first-order differential equation, Equation 2.4. 2.2 A Brief Reviewof Complex Numbers 2.2.1 Significance of the Imaginary Number v -1 It is well known that a complex number X = a+ib consists of two parts: the real part a and the imag-inary part ib, where a and b are real numbers and i is the imaginary number i = v v -1.Although the imaginary number -1has eventually become one ofthemost important inventions inhuman history, originally it was created by mathematicians merely for a simple mathematical completeness purpose so that an n-th order algebraic equation would always have n solutions. Theterm imaginary number seemed to reflect the reality that it was created out of imagination, but this derogatory term might have misledstudents to wrongly believe that the complex numbers are not real andthus not practical or useful 12 2 Linear Systems It is quite the opposite: Analysis I The complex physical science, computer world we enjoy today or discovered; reliable the control mostlikely Another obstacle that important in the study It is fair to say that the not be possible if the imaginary number would have no radio communication, system for aircraft flight, Fig. 2.2: is extremely science, and engineering. would probably world number space exploration, Geometry of complex or industrial of mathemat-ics, moderntechnical had never been invented no TV, no satellite, and no automation. numbers and Eulers formula. might prevent students from learning the complex number subject well is the discouraging word complex, which seemsto imply the subject is complex and complicated. As a matter of fact, the fundamental concept of the complex number is rather simple and straightforward if the geometrical aspect of the complex number shown in Figure 2.2 is well understood. Inaddition tothei = v-1notation, thealternative notation j = v-1isalsowell adopted, especially in the engineering community. The reason for choosing i seemed to be related to the term imaginary number, yet the rationale of the engineering communitys choice for j probably wasto avoid using the vsame notation astheelectrical current i.Inthe rest ofthebook, j will represent the imaginary number -1unless otherwise specified. In Figure 2.2, the complex number X in which the horizontal =s+ j? is represented by a point X onthe complex plane (s-plane) axis Re[s] is the real axis and the vertical axis Im[s] Notethat the complex number X = s+ j? is the imaginary geometrically is a point or a vector (s,?) axis. onthe Cartesian coordinate plane. Itcanbeseen from thegeometry thatthemagnitude |X|and thephase angle ?ofthe vector can be computed in terms of s and ? asfollows: ?s2 ?=tan-1 ? (2.8) s Onthe other hand,the projections ofthe vector X onthe real axis andthe imaginary axis are s and ?, |X| = +?2, respectively. Hence, sand?can bewritten asfunctions of|X|and?, s =|X|cos?,? =|X|sin? (2.9) Therefore, a complex number can be either represented in rectangular form, X =s+ j? or in polar form, (2.10 2.2 A Brief Review of Complex Numbers X=|X|??=|X|e j? 13 (2.11) Although both ?? and ej? in Equation 2.11 reveal that the phase angle of the complex number is ?, the latter is required in algebraic manipulations especially when differentiation and integra-tion are involved. The polar form of a complex number is at least as important although the latter is better known to the general and subtraction, yet the polar form is public. more efficient in as its rectangular The rectangular multiplication form counterpart, form is suitable for addition and division computations. The conversion from rectangular form to polar form and vice versa can be carried out easily using Equation 2.8 and Equation 2.9, respectively. 2.2.2 Polar Form, Rectangular Theorem 2.1 (Eulers Form, and Eulers Formula Formula) Showthat the following Euler?sformula is valid for all ?: ej? =cos?+ j sin? (2.12) Proof: The complex number X can be represented in both polar form and rectangular form: X=|X|ej? = s+j? (2.13) Since sand?canbeexpressed interms of|X|and?,asgiven in Equation 2.9:s =|X|cos? and ?=|X|sin?,Equation 2.13 becomes (2.14 X=|X|e j? =s+j? =|X|cos?+ j |X|sin? whichleads to Equation 2.12. Corollary 2.2 (Eulers Formula and Sinusoidal Functions) Showthat cos? and sin? can be expressedin terms ofthe complex variables ej? and e-j? asthe following: cos? = ej? + e-j? 2 , sin? = ej? - e-j? (2.15) 2j Proof: Left as an exercise. Remark 2.3 (Complex Number and Geometry) Euler summarized the relationship between the complex numbers and the trigonometric functions into an elegantsimple Eulers formula: ej? =cos? +j sin?. Thecomplex numbergeometry approach, together with Eulers formula, two-dimensional space. Remark 2.4 (Computation has madeit much easier to study trigonometry Rules of Complex Numbers) and vector analysis on 14 2 Addition Linear Systems Analysis I and subtraction (a1+jb1)(a2+jb2)=(a1a2)+j (b1b2) (cos?1 +j sin?1)M2 (cos?2 +jsin?2) M2e j?2=M1 M1ej?1 =(M1 cos?1 M2cos?2)+ j (M1 sin?1 M2sin?2) (2.16a) (2.16b) Multiplication M1e j?1 M2e j?2=M1M2e j(?1+?2) ? ? 1ejtan-1(b1/a1) ? ? (a1+jb1)(a2+jb2)= a2 2 ejtan-1(b2/a2) 2 +b2 a2 1 +b2 a2 1 +b2 1 = (2.17a) (2.17b) 2 ej(tan-1(b1/a1)+tan-1(b2/a2)) a2 2 +b2 (a1+jb1)(a2+jb2)=(a1a2 -b1b2)+ j (a1b2 a2b1) (2.17c) Division M1e j?1 M1 = M2ej?2 ? =? ? 1 ejtan-1(b1/a1) a2 1 +b2 a1 +jb1 a2 + jb2 a2 +jb2 Example 2.5 (Practicing Compute X1 = 2ejp/6 = Compute X2 =( v 1 ej(tan-1(b1/a1)-tan-1(b2/a2)) a2 2 +b2 2 +b1b2)+ j (a2b1 -a1b2) (a1+jb1)(a2-jb2)= (a1a2 a2 2 +b2 (a2+jb2)(a2-jb2) (2.18b) (2.18c) 2 Computation of Complex Numbers) +2ej3p/4 X1 = 2cos(p/6)+ = (2.18a) a2 1 +b2 = a2 2 ejtan-1(b2/a2) 2 +b2 a1 + jb1 ej(?1-?2) M2 v j2sin(p/6)+2cos(3p/4)+ 3+j - 2+j v 3+j)(-1+j) v2 =( v j2sin(3p/4) v v (2.19 3- 2)+j(1+ 2)=0.3178+ j2.4142 v v3+1e jtan-1(1/ 3) v1+1ej tan-1(1/-1) v2ej135? = 2 v2ej165? = 2ej30? X2 = (2.20) =-2.732+ j0.732 Compute X3 = ( v 3+j) ?(-1+j) v?v =2e j30??v X3 = v3+1e j tan-1(1/ 2ej135? = 3) 1+1ejtan-1(1/-1) v2e-j105? =-0.366-j1.366 (2.21) 2.2 2.2.3 Geometrical Since a complex Aspects of Complex by a point on the complex axis as its imaginary is an equivalent vector on the two-dimensional on the complex The complex plane can be easily number addition of Complex Numbers 15 plane, axis, a complex which has the horizontal number on the complex plane real space. The position change of a complex number accomplished is similar Review Numbers number can be represented axis as its real axis and the vertical A Brief using complex to vector addition, number addition but the complex or number multiplication. multiplication is unique in a waythat a vector rotation and translation motion can be carried out by simply multiplying the complex number vector by another complex number. The multiplication capability has madethe complex number a powerful tool in geometry, trigonometry, and broad applications in engineering and science. Example 2.6 (Using Eulers Formula to Derive Trigonometrical Equations) Show that (a)cos2? =cos2 ?-sin2?, and (b)sin2? =2sin? cos? using Eulers formula. Proof: ej2? = cos2? +j sin2? =ej?ej? = (cos? +j sin?) (cos? +j sin?) (2.22) cos2 ?-sin2 ?? +j (2sin? cos?) =? Exercise 2.7 (Make Trigonometry Easy) Use Eulers formula to prove the following two fundamental trigonometric identity equations: (a) sin(a) =sinacossin cosa (b) cos(a) =cosacossinasin (2.23) Note that these two essential trigonometric identities wereemployed in the high school trigonometry course to derive manyother trigonometric identity equations like the onein Equation 2.22. Remark 2.8 (Using Complex Number Multiplication to Perform a Vector Rotation) It is rather a simple task to rotate a vector in a two-dimensional space using complex number mul-tiplication. The rotation of a vector X1 = M1e j?1 by an angle a can be accomplished by multiplying a complex number ejatoX1 sothat theresultant vector willbeM1e j?1eja =M1e j(?1+a). Asshown in Figure 2.3, the multiplication of ej45 to X1 = 2ej30? will rotate the vector CCW (counter clockwise) by 45?to X3 = 2ej30?ej45? = 2ej75? (2.24) The complex number employed to accomplish the rotation can befurther modifiedto a more general form as Aeja. In addition to rotation, this more general linear operator can also change the magnitude of resultant from vector. In other X1to anywhere words, by complex in the two-dimensional number multiplication the vector The samerotation process can also be achieved using the conventional rotation but the computation is more complicated: X3 = The complex position can be moved space. matrix multiplication, ?cos45?-sin45???v ? ?1 -1??v ?? ? 3 sin45? cos45? number representation 1 1 = v2 3 1 1 of the vector X3 is 0.5176+ 1 j1.9318, 0.5176 = 1.9318 (2.25) which is equal to 2ej75?. 16 2 Linear Systems Analysis I Fig. 2.3: Usingcomplex number multiplicationto rotatethe vector X1 CCWby 45?to X3. Fig. 2.4: Using complex number addition to change the vector position from X1to X3. Remark 2.9 (Using Complex Number Addition to Change Vector Position) The rotation or position change of vectors also can be accomplished using complex number addi-tion. If the initial vector position X1and the end vector position X3 are all given, the difference can be computed asX2=X3-X1, and then obviously wehave X3=X1+X2. Asdemonstrated inFigure 2.4, byadding X2= -1.2144+ j0.9318 toX1=1.732+ j,theresultant vector willbe0.5176+ j1.9318, whichis the sameasthe result obtainedbyrotating X1 CCWby 45?. Remark 2.10 (Quaternionsa Generalization of Complex Numbers) Inspired by the success of the complex numbers in two-dimensional space geometry applications, William Rowan Hamilton determined to find a generalization of complex numbers that can be applied to mechanicsin three-dimensional space. Since a complex number consists of only two numbers, onereal and one imaginary, it is quite natural to believe that one more number is needed to add one moredimen-sion. Initially, Hamilton spent most of his effort in looking was made,but he never found a meaningful wayto As one of the greatest out that four numbers, instead mathematicians of three, solution. Some progress multiply triples like the complex number multipli-cation. of all time, are required for a triple-number Hamilton still to solve this important needed about 16 years to find problem. The quaternion 2.3 a generalization of complex numbers to 3D space, on October 16, 1843. The quaternions aerospace engineering, In addition variables robotics, to their impact numbers of the by Laplace William Transform Rowan 17 Hamilton have been widely applied to 3D mechanics, 3D graphics, 3D animation enriched the video, and so on. and mathematical tools mechanics, the complex and methodologies numbers and used in almost all The concepts, tools, and methodologies sprouted from the theory of complex and variables include the stability Review was discovered on geometry, trigonometry, have fundamentally engineering disciplines. A Brief the Laplace transform, theory, the frequency the transfer response, and anything function, the poles and zeros of sys-tems, related to the frequency-domain analysis and design, which are almost the entire contents of a typical systems and control book. In the following subsection, we will briefly review the fundamentals a short list of Laplace transform partial fractional equations expansion, and understanding pairs that are frequently and inverse Laplace transforms, the frequency-domain of Laplace transform, used, basic Laplace transform theorems, which are essential in solving properties includ-ing differential of systems. 2.3 A Brief Reviewof the Laplace Transform Oncea renowned mathematician said, Mathematics is atransformation that transforms a difficult prob-lem into an easy one. Although some students may not agree on the remark in general, most of the engineering students do realize that the Laplace transform indeed transforms a differential equation problem into an algebraic equation problem, which is much easier to solve. In fact, the Laplace trans-form performs two transformations in the same act: one is from differential to algebraic and the other is the transformation from the time domain to the frequency domain. The transformation to the frequency domain is a big step forward C. Maxwells 1868 historical from the time-domain not fully developed paper, On in the development Governors, of systems theory. James was believed the first to address the stability perspective. However, the frequency-domain until the Laplace transform and control became issue analysis and design approach was widely known in engineering community after 1940. 2.3.1 Laplace Transform Pairs The Laplace transform is an indispensable tool in the design and analysis of almost every engineering problem. In addition to the capability of transforming a differential equation into an algebraic one, the Laplace transform serves as a bridge connecting the two worlds: the time-domain and the frequency-domain worlds. In the time domain, the signals and systems are represented asfunctions and differential equations in terms of time t, whichis an understandable real variable. Onthe other hand,the signals and systems in the frequency seems to be a mystery. the tremendous Although domain this benefits brought forth are described in terms complex variable of s, which is a complex s appears intangible, by the frequency-domain functions variable that we soon will witness and equations. Although the time-domain and frequency-domain attributes of signals and systems are closely re-lated, they provide quite different aspects that are both essential in system analysis and design. To achieve the both time-domain Laplace transform and frequency-domain bridge back and forth performance, it is necessary between the time and frequency to be able to cross domains. In the fol-lowing, we will derive the Laplace transform pairs of the unit step function, the unit impulse function, the ramp function, and the exponential function based on the defined Laplace transform integral. Then the Laplace transform pair of the exponential function, together to derive more Laplace transform transform pairs will be employed in the study of time-domain this and the next chapters with Eulers formula, pairs for damped and undamped sinusoidal functions. can be employed These Laplace and frequency-domain responses later in 18 2 Definition Linear Systems Analysis I 2.11 (Laplace Transform) The Laplace transform of f(t) is defined as F(s) =L[ f(t)] = ?8 e-st f(t)dt (2.26) 0- where s =s+j?isacomplex variable, 0- =lim(0-e) isthe instant right before t =0,andf(t)is e?0 piecewise continuous when t =0.The lower integration limitissetatt =0-toresolve theissue caused by some f(t) with discontinuity at t = 0. Thus,the initial condition of f(t) and its derivatives are meant tobetheir values att =0-. Example 2.12 (Laplace Transform of the Unit Step Function us(t)) Recallthat the unit step function is defined as f(t) = us(t) ? = 0 t <0 1 t >0 (2.27) The Laplace transform of us(t) is ?8 ?8 ?-1 ?8-1 e-8-e-0e-stdt = L[1] = e-stdt = 0Example 2.13 (Laplace 0- Transform e-st s of the Impulse = 0- Function s ? ? = 1 (2.28) s d(t)) Recallthat the unit impulse function is defined as f(t) = d(t) = ? 0 t <0 0 t >0 ?8 d(t)dt = 1 and (2.29) -8 The Laplacetransform of d(t) is L[d(t)] ?8 e-std(t)dt = = Example 2.14 (Laplace Transform =1 (2.30) is defined as f(t) of t is d(t)dt of the Ramp Function t) Recall that the unit ramp function The Laplace transform ?8 0- 0- =t, t >0 (2.31) ?8 ?8 te-stdt := ?8 0- 000wherethe formula ofintegrationby partsis employed withu and dv, chosenasu =t, dv = e-stdt; L[t] = u dv = [uv]8 v du hence, v=-e-st? ? ?8?8 ? ?8 s, du (2.32 = dt. Therefore, L[t] = t -e-st s 0- - -e-stdt 0- s = -e-st s2 0- 1 = s2 (2.33) 2.3 A Brief Review of the Laplace Transform 19 Example 2.15(Laplace Transform ofthe Exponential Function e-at) The Laplacetransform of e-at is ?8 ?8 ?-(s+a)?8 Le-at? ? e-ste-atdt = = 0- e-(s+a)tdt e-(s+a)t = 1 = 0- s+a 0- (2.34) Remark 2.16(Laplace Transform of the Complex Exponential Function e-(a-j?)t ) Notethat Laplacetransform fore we have the following ? s+ais 1 also valid whenais a complex number, andthere-(2.35) pair e-at Laplace transform pair: e-(a-j?)t ? 1 s+a- j? Remark 2.17(Laplace Transform of DampedSinusoidal Functions e-at (cos?t The complex Laplace transform e-ate j?t pair in Equation WithEulers formula ej?t j? = s+a-j? (s+a-j?)(s+a+j?) (2.36) =cos?t +j sin?t, this Laplacetransform pair becomes e-at (cos?t +j sin?t) Separating the real and the imaginary e-at cos?t as follows: s+a+ 1 ? = e-(a-j?)t 2.35 can be rewritten +j sin?t)) (s+a)+ j? (s+a)2 +?2 partsto obtain two Laplacetransform (s+a) ? ? (s+a)2 +?2, e-at sin?t (2.37) pairs, ? ? (s+a)2 +?2 (2.38) Remark 2.18(Laplace Transform of Undamped Sinusoidal Functions cos?t and sin?t) In casethat a = 0, wehavethe following cos?t ? Laplacetransform pairs for undamped sinusoidal functions: ? s s2 +?2, sin?t ? s2 (2.39) +?2 Exercise2.19(Laplace Transform of Undamped Sinusoidal Functions with Phase Angle ?) Provethe complex Laplacetransform pair:ej(?t+?) sinusoidal Laplace transform pairs: cos(?t +?) ? cos?s-?sin? , sin(?t s2 +?2 ? ej? s-j? anduse it to derive thefollowing +?) ? sin?s+?cos? s2 +?2 (2.40 20 2 2.3.2 Linear Systems Laplace Analysis I Transform Properties So far in this section we have learned how to compute the Laplace transform functions and have built a list of common function f(t) Laplace transform pairs together Laplace transform general engineering. pairs, by which we can transform a time-domain onthe list to its counterpart F(s) in frequency domain, and vice versa. Thislist of with the next section to solve linear time-invariant the Laplace transform of basic time-domain properties that partial fractional expansion method will be employed in the differential equations. In the rest of the section, we will review are essential The proofs of the theorems and relevant to our study in systems, are also given except the trivial controls, ones, which are left and as exercises. Theorem 2.20 (Linearity) L[a1f1(t)+a2 f2(t)] = a1L[ f1(t)]+a2L[ f2(t)] (2.41) Proof: Left as an exercise. Theorem 2.21 (Frequency If Proof: Since f(t) ? F(s) e-at f(t) Shift Theorem) f(t) ? F(s), then e-at f(t) e-ste-at f(t)dt = 2.22 (Time (2.42) ?8 e-st f(t)dt, the Laplace transform pair for e-at f(t) should be ?8 ?8 = 0- ? 0- Theorem ? F(s+a) e-(s+a)tf(t)dt = F(s+a) Delay Theorem) If f(t) ? F(s), then f(t -T)us(t-T) ?e-sT F(s) Proof: (2.43) 0- (2.44) ?8 e-st f(t)dt, the Laplace transform pair for f(t-T) us(t -T) should be f(t -T)us(t-T) ? ?8 e-st f(t -T)us(t-T)dt= ?8 e-st f(t -T)dt Sincef(t) ? F(s) = 0- (2.45) 0- T Let t -T =t and change theintegration variable fromdttodt,thenwehave f(t -T)us(t-T) ? Theorem 2.23 (Scaling ?8 e-s(T+t) f(t) dt = e-sT 0 ?8 e-st f(t) dt = e-sTF(s) (2.46) 0 Theorem) If f(t) Proof: Left as an exercise. ? F(s), then f ?t/a ?aF(as) ? (2.47 2.3 Theorem 2.24 (Convolution A Brief Review of the Laplace Transform 21 Theorem) I f f1(t) ? F1(s) and f2(t) ? F2(s), then ?t (2.48) f1(t)* f2(t) = 0-f1(t)f2(t-t)dt ? F1(s)F2(s) Proof: Since both f1(t)and f2(t)are zero fort <0,f2(t-t) =0when t >t,and thus their convolution is 0-f1(t)f2(t-t)dt=0?t ?8 f1(t) f2(t -t)dt. According tothe definition ofthe Laplace transform, L[f1(t)*f2(t)]= ?8 ??8 f1(t)f2(t-t)dt? e-stdt 0- (2.49) 0- Let t -t =?and change theintegration variable fromdttod?,then we have ??8 ? ?8 ??8 ? ?8 L[f1(t)*f2(t)]= 0= Theorem 2.25 (Differentiation 0- f1(t) f2(?)dt f2(?)e-s?d? 0- f1(t)e-stdt 0- e-ste-s?d? (2.50) = F1(s)F2(s) Formula) df(t)? dt ?sF(s)-f(0-) I f f(t) d2f(t)?dt2 ?s2F(s)-s f(0-)-?f(0-) d3 f(t) ? dt3 ?s3F(s)-s2 f(0-)-s?f(0-)-f(0-) ? F(s), then (2.51) ... Proof: L?f?(t)? = ?8 d f(t) ?8 e-stdt := u dv =[uv]8 - ?8 v du (2.52) 00- dt 00wheretheformula ofintegrationby partsis employedwithu and dv,chosenas dv = df(t), u = e-st; hence, v =f(t),du=-se-stdt. Therefore, we have ?8 f(t)e-stdt =-f(0-)+sF(s) L?f?(t) ? =[e-st f(t)]8 0- +s0- ? d =s[sF(s)-f(0-)]-?f(0-)=s2F(s)-s f(0-)-?f(0-) L?... f(t) =Ldt =sLf(t) -f(0-) =ss2F(s)-s f(0-)-?f(0-)-f(0-) ?df(t)=s3F(s)-s2 f(0-)-s?f(0-)-f(0-) ? =Ldt ? ? ? ? Lf(t) f?(t)= sLf?(t)-?f(0-) ? Theorem 2.26 (Integration ? ? ? ? ? Formula) If f(t) ? F(s), then ?t f(t)dt 0Proof: (2.53) ? F(s) s (2.54 22 2 Linear Systems Analysis I ??t ? ?8?t ?8 ?8 ?t e-stdt; hence, v=-e-st? -e-st ??t ??-e-st?t ?8?8 f(t)dt L f(t)dt = 0- e-stdt := u dv =[uv]8 0- 0- 0- 0- - v du wherethe formula ofintegration by partsis employed with u and dv, chosenas u = 0- f(t)dt, s, du = f(t)dt. f(t)dt L = Theorem 2.27 (Final-Value If f(t) f(t) dv = Therefore, wehave f(t)dt s 0- (2.55) 0- 0- 0- - 0- s f(t) dt = F(s) s (2.56) Theorem) ? F(s) andthe real part of all poles ofsF(s) are strictly negative,then thefinal value of can be computed in the frequency domain asfollows: lim f(t) =limsF(s) t?8 This theorem is important since mostofcontrol where f(t) is not available Proof: Recall that L (2.57) s?0 system designs are carried out in the frequency domain before the design is completed. ? ??8e-stdt=sF(s)-f(0-)fromTheorem 2.25. Assapproaches to d f(t) = 0- dt d f(t) dt zero, the equation becomes ?8 sF(s)-f(0-)= 0s?0 lim Therefore, d f(t) dt =[ f(t)]8 dt (2.58) we have f(8) =lim f(t) = limsF(s) t?8 Theorem 2.28 (Initial-Value If f(t) 0- =f(8)- f(0-) Theorem) ? F(s) and lim sF(s) exists, then the initial frequency-domain (2.59) s?0 s?8 as follows: f(0+) value of f(t) at t = 0 can be computed i = lim sF(s) (2.60) s?8 Proof: From Theorem 2.25, L ? ??8e-stdt=sF(s)-f(0-).Assapproaches toinfinity, the d f(t) = 0- dt term e-st become zero; hence, lim d f(t) dt sF(s)=f(0-) =f(0+)if f(t) hasnodiscontinuity att =0.Inthe s?8 case thatf(t)hasadiscontinuity jumpat =0fromf(0-)tof(0+),df(t)? dtcontains animpulse [f(0+)-f(0-)]d(t). Now we have ?8 d f(t) dt sF(s)-f(0-) =lim 0s?8 s?8 lim ?0+ ?0+ e-stdt = 0- d f(t) dt dt =0-[f(0+)-f(0-)]d(t) dt=f(0+)-f(0-) (2.61) 2.4 2.4 Time-Domain Time-Domain Response of Typical Response of Typical First-Order First-Order Dynamic Systems 23 Dynamic Systems As discussed in Section 2.1, alarge group of first-order systems share mathematical equivalency and can be characterized by the typical first-order differential equation described by Equation 2.4. The equation, for ease of reference, is repeated asfollows: t?x(t)+x(t) In the equation, the x(t) is the system output = xssu(t) or the variable mechanical system in Figure 2.1(a), the voltage e(t) (2.62) of interest, which on the capacitor may be the velocity of the electric v(t) of circuit in Figure 2.1(b), or the angular velocity ?L(t) of the electromechanical system in Figure 2.1(c). The variable u(t) is the control input by which the behavior of the system can be altered or controlled. Thetime constant t and the step response steady-state value xssare determined by system component values. Given theinitial state x(0)=x0and theinput u(t)fort =0,we can solve thedifferential equation to findx(t)fort =0.After taking theLaplace transform, Equation 2.62 becomes thefollowing algebraic equation, (2.63) t[sX(s)-x0]+X(s) =xssU(s) where X(s)= L[x(t)], U(s)= L[u(t)], and sX(s)-x0= L[ ?x(t)]. The algebraic equation canbe rearranged to give a solution for X(s) asfollows: t X(s) = xss x0 + ts+1 ts+1 U(s):= Xi(s)+Xu(s) (2.64) Notethat X(s) consists of two parts: Xi(s), the response dueto the initial state x0, and Xu(s), the response due to the control input U(s). Therefore, the complete response of the typical first-order system is x(t) = xi(t)+xu(t) (2.65) =L-1[Xi(s)]+L-1[Xu(s)] 2.4.1 The Response of the Typical First-Order System Dueto Initial Condition The initial state response xi(t), which is the response of the first-order dynamic system due to x0, can be computed using the exponential Laplace transform pair of Equation 2.34 andthe Laplace transform linearity property of Theorem 2.20. xi(t) =L-1 ? ? ? ? t ts+1 The initial state responses of the first-order t = 0.5s,1s,2s are shown in Figure 2.5(a). x0 =L-1 1 s+1/t system with initial x0 = x0e-t/t (2.66) state x0 = 1 and the time constant Notethat the initial andfinal values of xi(t) are xi(0) = x0e0 = x0 and xi(8) = x0e-8 = 0,respec-tively, and xi(t) = x0e-1 = 0.368x0, which means the time constantt is the time whenthe exponential term e-t/t equals to e-1. In other words, the initial state response graph is an exponential curve line connectingthe following three points: x(0) = x0,x(t) = 0.368x0,andlim xi(t) = 0. t?8 Example 2.29 (The For the mass-friction and the initial equation Response of the System Dueto Initial Velocity v0 = 1 m/s) system in Figure 2.1(a), if there is no external force other than the friction velocity of the of the system Mass-Friction will b mass Mis assumed v(0) force = v0 = 1 m/s,then the governing differential 24 2 Linear Systems Analysis I t?v(t)+v(t) = 0, v(0) =v0 = 1 m/s, t = M/B and the solution v(t) can be found using the Laplacetransform as follows: 1 t(sV(s)-1)+V(s) =0 ? V(s) =s+(1/t) ? v(t)=e-t/t,t =0 Then we have B=1Ns/m,M=1kg ? t =1s ? v(t)=e-t,t =0 t =0 B=1Ns/m, M=0.5 kg ? t =0.5 s ? v(t)=e-2t, t =0 B=1Ns/m, M=2kg ? t =2s ? v(t)=e-0.5t, Themass velocity v(t)willgodown exponentially from v0tozero ast ?8with time constant t =M/B. Assuming the friction coefficient is constant, the velocity Note that the response curve due to the initial will go down faster if the velocity v(0) mass Mis smaller. = v0 = 1 m/sis the exponential passingthrough the following three points: v(0) =v0 = 1 m/s,v(t) = e-1 = 0.368 m/s,and v(8) 0. Fig. 2.5: Theresponses of the first-order system dueto initial condition or unit step input. The time response plots in Figure 2.5 are generated using the following % CSD clear, x0=1, Fig2.5a first-order t=linspace(0,6,61); tau1=0.5, initial state tau2=1, CSD x_ss=2, Fig2.5b tau1=0.5, x3=x0*exp(-(1/tau3)*t); grid first-order t=linspace(0,6,61); x1=x_ss*(1-exp(-(1/tau1)*t)); plots tau3=2, x2=x0*exp(-(1/tau2)*t); plot(t,x1,'b-',t,x2,'m-.',t,x3,'r--'), clear step response on, grid minor, on, grid mino plots figure(12) tau2=1, tau3=2, x2=x_ss*(1-exp(-(1/tau2)*t)); x3=x_ss*(1-exp(-(1/tau3)*t)); plot(t,x1,'b-',t,x2,'m-.',t,x3,'r--'), MATLAB code: figure(11), x1=x0*exp(-(1/tau1)*t); % response grid curve = 2.4.2 2.4 Time-Domain The Response of the Typical First-Order Response of Typical Systems Due to First-Order Dynamic 25 Systems Unit Step Input The step response xu(t) is the response of the first-order dynamic system dueto the input u(t) = us(t), where us(t) is the unit step function defined by Equation 2.27. According to Equation 2.64 and the Laplace transform of the unit step function, L[us(t)] = 1/s, we have Xu(s) = To find xu(t), partial fraction follows: which is the inverse expansion xss ts+1 1 s = Laplace transform xss/t s(s+1/t) (2.67) of Xu(s), a common practice is to employ the methodto break down the right-hand side of Equation 2.67 into two parts as Xu(s) = xss/t s(s+1/t) A1 = s A2 + (2.68) s+1/t There are three common ways to compute the residue constants A1 and A2. The first is the residue approach by which the constant Ai is evaluated asthe residue at its corresponding pole asfol-lows: 0A2 sXu(s)|s=0 ? (0+1/t) xss/t= A1+0+1/t ? A1=xss (s+1/t)Xu(s)|s=-1/t ? xss/t -1/t =0A1 s (2.69) ? A2=-xss +A2 The second is the polynomial substitution approach, which also uses pole value substitution like the residue approach but it is carried out on a polynomial equation. The first step is to multiply both sides of Equation 2.68 by the least common denominator to obtain the corresponding polynomial equation as follows: xss/t = A1(s+1/t)+A2s (2.70) Then, by the substitution of pole values, we have the following: s =0 ? xss/t=A1(0+1/t)? A1=xss (2.71) s =-1/t ? xss/t=A2(-1/t)? A2=-xss The third approach is the coefficient comparison approach that sets up equations to of each term of the polynomial. Equation 2.70 can be rearranged matchthe coeffi-cients asthe following: xss/t = (A1 +A2)s+(1/t)A1 By comparing the coefficients (2.72) of the s terms and the constant terms, we have the following: A1+A2 =0 and(1/t)A1 =xss/t? A1=xss =-A2 (2.73) Now, with A1and A2 obtained, Equation 2.68 becomes, Xu(s) = xss/t s(s+1/t) xss = s Using two basic Laplace transform pairs, L[1] = 1/s and the first-order system xu(t) is found as follows: + -xss s+1/t L[e-at] = 1/(s+a), xu(t)=L-1[Xu(s)] =xss(1-e-t/t), when t =0 (2.74) the step response of (2.75 26 2 Linear Systems Analysis I The step responses of the first-order system with the final steady-state value xss = 2 and the time constant t = 0.5s,1s,2s are shownin Figure 2.5(b). Notethat the initial andfinal values of xu(t) are xu(0) =xss(1e0)=0and xu(8)=xss(1e-8)=xss, respectively, and xu(t)=xss(1e-1)= 0.632xss, whichmeans thetimeconstantt is thetime when the exponential terme-t/t equalse-1.In other words, the step response graph is an exponential points: x(0) = 0, x(t) = 0.632xss,and lim xu(t) t?8 curve line connecting the following = xss. Forthe mass-friction system in Figure 2.1(a), if the initial unit step force is applied to the system at t three = 0, then the velocity of the mass Mis assumed 0 and a mass velocity would go up exponentially from 0to0.632xss when t =t =M/B and continue torise tothesteady state xss as t ?8,where BandM are the friction coefficient and the mass of the system, respectively. Note that when the time constant is smaller, the velocity of the system rises faster. In case that the system is subjected to both of nonzero initial condition and unit step input, the complete response of the system will be the sum of the initial state response and the step response, as shown in the following equation: x(t)=xi(t)+xu(t)=x0e-t/t +xss(1-e-t/t) (2.76) =x0+(xss -x0)(1-e-t/t) Fig. 2.6: The responses of the first-order system dueto both of initial condition and unit step input. The complete responses of the first-order system with initial with the final state value xss = 2 and the time constant t is clear that the complete response graph is the superposition Figure 2.5(b) since x(t) = xi(t)+xu(t). state x0 = 1 and the unit step input, = 0.5s,1s,2s, are shown in Figure 2.6. It of the two graphs in Figure 2.5(a) and It also can be seen that the complete response can be rewritten asx(t)=x0+(xss -x0)(1-e-t/t) fromEquation 2.76. Hence, theinitialand finalvalues ofx(t)are x(0)=x0and x(8)=xss, respectively, and x(t) =x0+(xss-x0)(1-e-1) =x0+0.632(xss -x0), which means the time constantt is the time whenthe exponentialterm e-t/t equalse-1. In other words, the step response graph is an exponential curve line connecting the following three points : x(0) x(t) = xss. = x0, x(t)=x0+0.632(xss -x0), and lim t?8 Example 2.30 (The Response of the Mass-Friction System Dueto Unit Step Input) For the mass-friction system in Figure 2.1(a), if the applied force input is fa(t) = us(t)N and the initial velocity is assumed v(0) = 0, then the governing differential equation of the system will b 2.5 t?v(t)+v(t) Frequency-Domain =xssus(t), Properties v(0) = 0, of Typical First-Order 27 Systems t = M/B, xss =1/B and the solution v(t) can be found using the Laplacetransform as follows. s + -xss s ? V(s) =s(s+1/t) =xss t =0 ? v(t)=xss(1-e-t/t), tsV(s)+V(s) xss/t = xss s+1/ Then we have B=1Ns/m,M=1kg ? t =1s ? v(t)=1-e-t,t =0 t =0 B=1Ns/m,M= 0.5 kg ? t =0.5 s ? v(t)=1-e-2t, t =0 B=1Ns/m,M= 2kg ? t =2s ? v(t)=1-e-0.5t, Themass velocity v(t)willgoupexponentially from v(0)=0m/s tov(t)=1m/s ast ?8with time constant t = M/B. Assumingthe friction coefficient is constant,the velocity will go up faster if the mass Mis smaller. Note that the step response curve is the exponential curve passing through the following three points: v(0)=0m/s, v(t)=1-e-1=0.632 m/s, and v(8)=1m/s. 2.5 Frequency-Domain Properties of Typical First-Order Systems In the study of the typical first-order dynamic systems, up to now our focus has beenin time-domain properties and analysis. In this section, we will study the frequency-domain properties of the system in-cluding the transfer functions, the poles and zeros, the characteristic equations, the frequency responses, and the Bode plot. 2.5.1 Transfer Functions and Differential Equations As described in Section 2.4, the Laplace transform of the system output, X(s) =L[x(t)] is related to the initial state x(0) = x0 and the control input U(s) =L[u(t)] according to Equation 2.64, which is rewritten in terms of G0(s) and X(s) = It is noted that the initial G(s) as follows: t ts+1 x0 + xss U(s) := ts+1 state x0 and the control input U(s) affect the output X(s) via the two chan-nels G0(s)and G(s),respectively. Thefunction G(s) = xss/(ts+1), relationship described between U(s) and by the differential X(s) in frequency equation Equation the early development whichspecifiesthe input-output domain, is called the transfer 2.62. In addition representing systems, the transfer function allows the investigation and facilitates of the classical (2.77) G0(s)x0 +G(s)U(s) to function of the system being another convenient of the frequency-domain way of properties control theory. Since the transfer function G(s) only specifies the relationship between the control input U(s) and the output X(s), it has nothing to do with the initial condition x0. But the assumption of the initial condition being zero in the definition of the transfer G(s) = X(s) function xss ? ? U(s) = ? ? x0=0 ts+1 (2.78) maycause some confusion. In fact, this zero initial condition assumption is madeonly for the computa-tion of the transfer function. Asfor the computation ofX(s) or in the process of solving a differential 28 2 equation, Linear Systems the effect Analysis I of the initial condition should not be discounted. From this discussion, we know how to obtain the transfer function from a given differential equation by using the Laplace transform. Conversely, the same procedure can beimplemented reversely to find the corresponding differential equation. Considerthe system described bythe following transfer function representation: b1s+b0 X(s) = s2 +a1s+a0 This equation can be rewritten asthe following (2.79) algebraic equation: s2X(s)+a1sX(s)+a0X(s) Fig. 2.7: The frequency-domain U(s) = b1sU(s)+b0U(s) and time-domain representations (2.80) of differentiators and integrators. According the Laplace transform theory regarding the frequency-domain andtime-domain represen-tations of the differentiation and integration operators as shown in Figure 2.7, the complex variable s here actually represents a differentiation operator, with which sX(s) and s2X(s) mean?x(t) and x(t) in time domain, respectively. Therefore, the differential equation corresponding to Equation 2.80 can be easily obtained as x(t)+a1 2.5.2 Characteristic Observing the initial Equation ?x(t)+a0x(t) and System state response in (2.81) = b1 ?u(t)+b0u(t) Poles Equation 2.66 or the step response in Equation 2.75, we can see that the transient responseis mainly determined by the exponentialterm e-t/t. This exponentialterm clearly is associated with the denominator polynomial ts+1 of the transfer function in Equation 2.77. This polynomial is named the characteristic polynomial of the system, and its associated polynomial equation, ts + 1 = 0, is called the characteristic equation of the system. In general, if the transfer function of a system is represented by G(s) = N(s) (2.82) D(s) then the characteristic equation of the system will be D(s) = 0 and the roots of the characteristic equation are defined (2.83) as the poles of the system. Similarly the roots of the equation, N(s) = 0, are defined asthe zerosof the system. Forthe system withtransfer function shown inEquation 2.77, there isnozero, but there isone pole ats =-1/t,where tisthetim 2.5 constant and the pole is located s = 1/t, Frequency-Domain on the left-hand Properties of Typical side of the complex First-Order plane. If this pole Systems 29 were located at whichis on the right-hand side of the complex plane,the corresponding exponential term would be et/t and would increase without bound as time increases. In this case, the system is said to be unstable. Theformal definition and more detailed discussion of system stability will be given in later chapters. For thesystem with transfer function defined in Equation 2.79, there isone zero ats =-b0/b1, which is the root of the equation b1s +b0 = 0. The characteristic equation is s2 +a1s +a0 = 0, and the system complex poles are the two numbers by the location roots of the quadratic or both real numbers. equation. The two roots can be a pair of conjugate We will seethat the behavior of the system poles on the complex plane. of the system is Detailed discussion mainly determined will be given in the next chapter regarding the typical second-order systems. 2.5.3 The Responses of the Typical First-Order Systems Dueto Sinusoidal Inputs In Section 2.4, weinvestigated the time-domain response of the typical first-order system using the step function as the input testing signal and observed that the transient responses dueto the initial state x0 and the unit step input are related to the time constant t. Later,the discussions of the transfer functions, the characteristic equations, and the system poles in Section 2.5.1 and 2.5.2 confirmed that the transient response of the system is mainly determined by the location of the system poles. In this section, we will investigate how the typical first-order system will respond to sinusoidal input signals with different frequencies. Before considering the more general problem posted on Figure 2.8 at which the sinusoidal ?is a variable, we will consider a special case of the problem ? = 1rad/s in the following Example 2.31 (Response of a First-Order frequency example. System Dueto Sinusoidal Input) Consider the system described in Figure 2.8. Assume the initial condition of the system is zero, the parametersin the transfer function G(s) are xss = 2 and t = 2s, andthe control input is u(t) = cost, which means the frequency ofthe signalis ? = 1rad/s. Findthe outputresponsey(t) that includes both transient response ytr(t) and steady-state response yss(t). Thetransient response will die out asthe time increases, and the steady-state response is the output response after the system reaches the steady state. Fig. 2.8: Output response dueto sinusoidal input. The output Y(s) is obtained asfollows: Y(s) = G(s)U(s) The output response y(t) is the inverse first = 2 2s+1 s s2 +1 Laplace transform s = (s+0.5)(sj)(s+j) ofY(s). To find the inverse (2.84) Laplace transform, weshould decompose the rational function into the sum of several simpler parts using the partial fractional decomposition i 30 2 Linear Systems Analysis I Y(s) = s A1 (s+0.5)(s-j)(s+j) = s+0.5 c* c + + s- j (2.85) s+ j whereA1is areal numberandcis a complexnumberto bedetermined.Thereis no needto computec* since it is the complex conjugate of c. These partial fraction expansion residue constants can be evaluated using the residue approach asfollows: A1 = lim -0.5 = (-0.5)2+1 = -0.5 1.25=-0.4 (s+0.5)Y(s) s?-0.5 c =lim s?j (2.86) j 1 (s- j)Y(s)=(j+0.5)(2 j) =1+j2= 1 j163.4?=1v5e-j63.4? j arctan2 = v5e v1+22e ?v? ?v? y(t) =-0.4e-0.5t +?v? 1/ ? =-0.4e-0.5t +?v?? 1/ =-0.4e-0.5t +?v? 2/ 5 cos(t-63.4?) Sincec* is the complex conjugate of c, we havec* = 1/ . Now, 5 ej63.4? and c* into Equation2.85, and usethe Laplacetransform pair 1/(s+a) response in 5 e-j63.4?ejt 5 + 1/ plug the values of A1, c, ? e-at; wehavethe output 5 ej63.4? e-jt ej(t-63.4?) +e-j(t-63.4?) (2.87) =-0.4e-0.5t +0.8944cos(t -63.4?) =ytr(t)+yss(t) where thefirsttermofthesolution, ytr(t)= -0.4e-0.5t, isthetransient response part thatwilldecay quickly. After a few seconds, the output response sinusoidal function will reach the following with the same oscillation frequency, steady state, ? = 1 rad/s, which is a sus-tained but the amplitude has changed from1to0.8944 and thephase dropped from0?to -63.4?. Thatmeans thesteady-state re-sponse part of the response is yss(t)=0.8944cos(t -63.4?) (2.88) Fig. 2.9: Efficient way of computing the sinusoidal steady-state response yss(t). Since only the steady-state response term, yss(t), is of interest in almost all the applications of the sinusoidal analysis and design and there exists a much easier way to compute yss(t), usually it is not required to gothrough the inverse Laplace transform procedure to compute the complete response. A much more efficient way of computing Theorem 2.32 (Steady-State ej(?t+f) yss(t) is given in the following theorem. Complex Response) Assumethe system G(s) shown in Figure 2.9is stable, which meansit has no poles on the imaginary axis or in the right half of the complex plane. If the input is u(t) response ofthe system will be yss(t) = A(?)Bej(?t+f+?(?)) = Bej(?t+f), then the steady-state (2.89 2.5 Frequency-Domain Properties of Typical First-Order Systems 3 whereA(?) and ?(?) arethe magnitudeandthe phaseofG( j?), respectively. Proof: (s-j?),theoutput Y(s)= L[y(t)] consists ofthetransient re-sponse Since U(s) =L[u(t)] =Bejf? part Ytr(s) and the steady-state response part, Yss(s), we have Y(s) = G(s)U(s) Bejf = G(s) =Ytr(s)+Yss(s) s-j? Based on the assumption that G(s) has no poles on the imaginary (2.90) axis or in the right halfofthe complex plane,the only polethat wouldcontributeto the steady-state responseis s =j?, and,hence, Then usethe Laplace transform Yss(s) asfollows: A(?)e j?(?)Bejf Bejf Yss(s) = G(j?) s-j? pair ej?t = A(?)Bej(f+?(?)) = s-j? (2.91) s-j? ? ?1(s-j?)toobtain the inverse Laplace transform of yss(t) =L-1 [Yss(s)] = A(?)Bej(f+?(?))e j?t = A(?)Bej(?t+f+?(?)) Corollary 2.33 (Steady-State Sinusoidal (2.92) Response) Assumethe system G(s) shown in Figure 2.9is stable, which meansit has no poles on the imaginary axis orin the right halfofthe complexplane(RHP) . Ifthe input is Bcos(?t +f) or Bsin(?t +f), then the steady-state yss(t) response ofthe system = A(?)Bcos(?t +f will be +?(?)) or yss(t) = A(?)Bsin(?t +f +?(?)) (2.93) whereA(?) and ?(?) arethe magnitudeandthe phaseofG( j?), respectively. Proof: UseEulers formula ej(?t+f) Now the efficient approach considered in Example = cos(?t +f)+ j sin(?t will be employed +f) to solve the steady-state sinusoidal response problem 2.31. Example 2.34 (Use Corollary 2.33 to Compute the Steady-State Sinusoidal Response) Giventhe transfer function, G(s) = xss ts+1 2 = (2.94) 2s+1 Find the steady-state sinusoidal response of the system driven bythe control-input signal u(t) =cost. Solution: Sincethe frequency of the input signalis ? = 1 rad/s, the magnitudeand phaseof G(j?) = G(j1) are computed as follows: G(j?) = G(j1) = 2 1+ j2 2 = Aej? = ve-j tan-1 2=0.8944e-j63.4? 5 (2.95) Hence, yss(t) =Acos(?t +?)=0.8944cos(t -63.4?) which is exactly the same as Equation 2.88, the result of Example 2.31. (2.96) 32 2 2.5.4 Linear Systems Frequency Analysis I Responses and the Bode Plot Forthe samesystem G(s)in Figure 2.9,if the frequency ? ofthe control-input signal u(t) = cos?t is a variable,then the magnitudeA(?) andthe phase ?(?) of G(j?) will also befunctions of?. Therefore, the amplitudeandphaseof yss(t) will changewith ? accordingly.Theresponseof yss(t,?), dueto the change of the frequency ?, is called the frequency response of the system. Thefrequency response of a systemincludes the magnitudefrequency response A(?) and the phasefrequency response ?(?). Thefrequency response of the system G(s) = ts+1 xss = 2s+1 2 =s+0.5is 1 computedasfollows: G(j?) where = 1 =|G(j?)|?G( j?) =A(?)e j?(?) j?+0.5 (2.97) 20log102 =6.02 dB when??0.5 ? ??? |G(j?)|dB=20log10v 1 ?=?G( j?)=-tan-1 ?? ??? = 20log10 v2 = 3.01 dB when ? = 0.5 ?2+0.52 0.5 (2.98) -20log10? dB when?? 0.5 ? Fig. 2.10: The Bode plot of G(s) = 2/(2s+1). Thefollowing % CSD num=1; Fig2.10 den=[1 magb=20*log10(mag); MATLAB program is employed to obtain the Bode plot shown in Figure 2.10: Bode 0.5]; plot of the w=logspace(-2,1); figure(1) system G(s)=1/(s+0.5) [mag,phase]=bode(num,den,w); 2.5 Frequency-Domain semilogx(w,magb),title('Magnitude figure(2), response semilogx(w,phase),title('Phase Properties in of Typical dB'), First-Order Systems 33 grid, response in deg'), grid The frequency response plots shown in Figure 2.10 are called the Bode plot, which consist of the magnitude response plotand thephase response plot.Themagnitude response plot is a|G(j?)|dB versus ?plot,where |G(j?)|dB isin dBscale asdefined in Equation 2.98 and thefrequency ? (rad/s) is in log scale. The actual magnitude response is plotted in blue, which can be approxi-mated by its two asymptote lines (in red) when ? is either very small or very large compared to the corner frequency ?c. The corner frequency ?c, also called the 3 dB frequency, is the ?c that sat-isfies |G(j?c)|=20log10 |G(j0)|-3dB.The asymptote forthefrequency ? <?cisahorizontal linewith |G(j?)|dB=20log10 |G(j0)|.The other asymptote for?>?c isthestraight linewith slope -20dB/decade thatintersects thehorizontal asymptote atthecorner frequency ?c.Note thattheasymp-tote approximation deviates the actual response by 3 dB at the corner frequency. Example 2.35 (Use the Bode Plot to Compute the Steady-State Sinusoidal From the Bode plot in Figure 2.10, at the corner frequency ?c = 0.5 rad/s Responses) weobserve that 20log10 |G(j0.5)|=|G(j0.5)|dB =6dB-3dB=3dB so that |G(j0.5)|=103/20 =1.414 and ? =?G( j0.5)=-45? Hencethe steady-state response dueto u(t) = cos0.5t is yss(t) =|G(j0.5)|cos(0.5t +?)=1.414cos(0.5t -45?) Fig. 2.11: Outputresponsey(t) of G(s) = 1/(s+0.5) dueto u(t) = cos0.5t. The sinusoidal response in Figure 2.11 is obtained using the following MATLAB code (2.99) 34 2 % CSD Linear Systems Fig2.11 clear, Analysis I Sinusoidal response t=linspace(0,30,301); u=cos(0.5*t) u=cos(0.5*t); y=-exp(-0.5*t)+1.414*cos(0.5*t-45*pi/180); figure(11), plot(t,u,'b--',t,y,'r-'), grid on, xlabel('t,sec'), grid ylabel('y'), minor, grid figure(12), on, grid The graphs of the input u(t) ylabel('u(t) plot(u,y,'b-'), and y(t)'), xlabel('u'), minor, = cos0.5t and its corresponding output response are shown in Figure 2.11. Note that thetransient response part ofy(t),ytr(t)=-e-0.5t, has decayed to0.0027 byt =10s and thereafter y(t)=yss(t) =1.414cos(0.5t -45?). The steady-state response yss(t) has exactly thesame frequency ? = 0.5rad/s or period T = 2p/0.5 = 12.57sasthe input u(t) =cos0.5t, but with different amplitude and different phase. The amplitude is1.414 instead of1,and thephase is -45? instead of0?. It also can be seenthat the lag time of the output with respect to the input is 1.57s. Thelag time 1.57s is equivalent tothephase shift ? =-360?(1.57/12.57) =-45?, which isexactly thesame as that shown in Equation 2.99. When ???c, say?=10rad/s, we observe |G(j10)|dB =-20 dBsothat |G(j10)|=10-20/20 =0.1and? =?G( j10)=-87? Therefore, the steady-state response dueto u(t) = cos10t is yss(t)=Acos(10t +?)=0.1cos(10t -87?) Fig. 2.12: Output response y(t) of G(s) = 1/(s+0.5) The graphs of the input u(t) dueto u(t) (2.100) = cos10t. =cos10t andits corresponding output response y(t) are shown in Figure 2.12. The transient response part ofy(t),ytr(t)=-0.0052e-0.5t, has decayed toless than 0.002 by t =2s and thereafter theoutput response isalmost atthesteady state asyss(t) =Acos(10t+?) =0.1cos(10t87?). Thesteady-stateresponse yss(t) has exactly the samefrequency ? = 10 rad/s or period T = 2p/10 = 0.628s, but with different amplitude and different phase. The amplitudeis 0.1 instead of 1, and thephase is -87? instead of0?. Italso can beseen that thelagtimeoftheoutput with respect tothe input is0.152s. The lagtime0.152s isequivalent tothephase shift? =-360?(0.152/0.628) =-87?, which is exactly the same as that shown in Equation 2.100 2.6 Remark 2.36 (Low-Pass From the Exercise Problems 35 Filter) Bode plot in Figure 2.10, and the sinusoidal time responses to the input signals with low and high frequenciesshownin Figure 2.11and Figure 2.12, weobservethat the system G(s) = 1/(s+0.5), or the typical first-order system G(s) = xss/(ts +1) in general, allows the low-frequency signals to pass while rejecting the high-frequency signals. The ability of selectively rejecting signals in certain frequency ranges is called frequency filtering. Thosethat are particularly designed to reject the high-frequency noises, like some RC circuits, are called low-pass filters. The low-pass filtering is widely used in practice to filter out unwanted high frequency noises; however, not all low-pass filtering properties are desirable. Since ?c = 1/t, as shown in the Bode plot of Figure 2.10, if the corner frequency ?c decreases,the bandwidth of the system will shrink and the time constant willincrease to slow down the step response, as demonstrated in Figure 2.5 and Figure 2.6. 2.6 Exercise Problems P2.1: Convert X = a+ jb to polar form X = ?ej?. P2.2: Convert X = ?ej? to rectangular form X = a+ jb. P2.3: Convert X = v3+ j to polar form. P2.4: Convert X = 2ej3p/4 to rectangular form. P2.5: Compute X1 = 2ejp/6 + 2ej3p/4. P2.6: Compute X2=2e jp/6-2e j3p/4. P2.7: Compute X3 = ( v3+j)(-1+j). v3+j P2.8: Compute X4=-1+j . P2.9: Showthat sin(a+) = sinacos +sin cosa using Eulersformula. P2.10: Show thatcos(a+)=cosacos -sinasinusing Eulers formula. P2.11: Express cos2? and sin2? in terms of cos? and sin? using Eulers formula. P2.12: Express cos3? and sin3? in terms of cos? and sin? using Eulers formula. P2.13: Computecos18? basedonthe fact of ej90? = cos90? +j sin90? = j andthe formulas in P2.11 and P2.12. (Hint:Use ej5?=ej3?e j2?=(cos3? +j sin3?) (cos2? +jsin2?)= =j) P2.14: Consider a vector in atwo-dimensional wiseby 90? wewillobtaina newvectorX2 = P2.15: As described in Section (2.2.3), number, and vector rotation ?v ?T 3 -1?T Find a22 rotation matrix Rso thatX2=RX1. ?v space X1 = 1 3 a vector in a two-dimensional can be accomplished X1in P2.14 can berepresented as X1 = 1+ j by complex . After arotation of the vector clock-. space can be represented number multiplication. v on a complex plane. v3= 2e j60? . Find the clockwise by90? toobtain thevector X2= 3-j =2e-j30? complex by a com-plex The vector Wecan rotate the vector number X3 so that th 36 2 new vector Linear Systems Analysis I X2 is the product of X3 and X1(i.e., X2 = X3X1). Comment complex number multiplication approach andthe rotation P2.16a: Solve the following differential equation on the relationship matrix approach in P2.14. using Laplace transforms. x?(t)+2x(t) between the Assume zero initial condi-tions. = 4us(t) P2.16b: Plot the solution x(t) as a function of t. Specifythe time constant t andthe steady-statestep response value xss on the graph. P2.16c: Repeat Problem P2.16a with initial condition x(0)=-1. P2.16d: Repeat Problem P2.16b with initial condition x(0)=-1. P2.17: Solvethe differential equation x?(t)+2x(t) =4cos2t us(t) using the Laplace transform/complex number approach (see Example 2.31). Assume zero initial condi-tions. Specify the steady-state response part and the transient response partin your solution x(t). P2.18a: Find the transfer function G(s) = X(s)/U(s) of the system described bythe differential equa-tion, x?(t)+2x(t) = u(t) where X(s) and U(s) are the Laplacetransforms of the output x(t) and the input u(t), respectively. P2.18b: Let u(t)=4cos2t us(t). Find thesteady-state response ofthesystem xss(t) using thesteady-state sinusoidal response approach (as shown in Corollary 2.33 and Example 2.34). P2.18c: Nowyou havethe sinusoidalsteady-stateresponseofthis form xss(t) =Acos(?t+?). Thetran-sient response of the system should be xtr(t) = Be-t/t, wheret is the time constant of the system and B is a constant to be determined. Assumethe initial condition is zero, then we have x(0) = 0 =B+Acos? by whichthe constant B can be computed. P2.18d: Comparethe solution x(t) from Problem P2.17. = xtr(t)+xss(t) from P2.18b and P2.18c with the solution x(t) ob-tained P2.18e: Plot the transient response xtr(t) in a red, dashline andthe steady-state response xss(t) in a blue solid line on the same graph. P2.18f: Plot the complete solution x(t) = xtr(t)+xss(t) on a separate graph. Fig. 2.13: Cascadeconnection of two subsystems G1(s) and G2(s) 2.6 Exercise Problems 37 P2.19: The differential equations of the subsystems G1(s) and G2(s) shown in Figure 2.13 are given as 2 ?w(t) +3w(t) = 4u(t) and 5 ?y(t) +y(t) = w(t), respectively. Find the differential equation of the overall system that relates the output y(t) andthe input u(t). P2.20a: Consider a first-order linear time-invariant system with the differential equation x?(t)+2x(t) where x(t) and u(t) are the output and the input pole of the system, and explain the physical = u(t) of the system. Find the transfer function G(s) and the meaning of the pole. P2.20b: Consider the same system. Drawthe Bode plot of the system with asymptotes onthe magnitude response graph and the corner frequency ?c on both of the magnituderesponse andthe phase response graphs. P2.20c: Findthe magnitudeand phaseof the systemat the following frequencies: ? = 0.1?c, ? = ?c, and ? = 10?c, respectively. P2.20d: Find and plot the steady-state response xss(t) of the system dueto each of the following inputs: (i) u(t) =sin(0.1?ct), (ii) u(t) =sin(?ct), and(iii) u(t) =sin(10?ct), respectively. P2.20e: Comment on the frequency-domain behavior obtained in P2.20a, P2.20b, P2.20c, and P2.20d of the simple first-order system based on the results 3 Linear Systems AnalysisII M ANY practical systems are stand-alone second-order systems, whose behavior is governed by second-order differential equations. Furthermore, complicated higher-order systems are fundamentally composed of several second-order and first-order systems as building blocks. For example, in the study of the aircraft flight dynamics and control, the aircraft usually is considered a rigid body with six degrees of freedom including three rotational motions andthree transla-tional motions. The mathematical modeling of the motion of each degree of freedom requires a second-order differential equation; hence the flight dynamics model would include differential equations. Therefore, the study of the second-order and design of dynamic systems and control. six coupled second-order system is essential in the analysis Many of the fundamental concepts welearned from Chapter 2 like the mathematical equivalency, typical equation characterization, time-domain analysis and frequency-domain properties, will be ex-tended to the study of the typical second-order dynamic systems in this chapter. Mostof the extensions are quite straightforward, although the computations involved may be slightly more complicated. The basic difference betweenthese two typical systems is that the behavior of the first-order system is mainly determined by the time constant while that of the second-order system is characterized by both the damp-ing ratio and the natural frequency. From the study in Chapter 2, we have a pretty clear idea on how the time constant would affect the time-domain and frequency-domain responses of the typical first-order systems. Similarly, we will learn how to select the damping ratio and the natural frequency to achieve desired performances for the typical second-order be employed systems. to simplify For the cases that involve the computations just sinusoidal manipulations, as we did for the sinusoidal Eulers formula response computations will in Chapter 2. 3.1 Typical Second-Order As discussed in of the Dynamic Systems Chapter 2 regarding mathematical equivalency the typical first-order among systems systems, and the typical we will continue to take advantage equation characterization to enhance our learning experience. Thethree typical second-order physical systems to be considered in this section are shown in Figure 3.1: the massdamperspring system in (a) is a mechanical system, the RLC circuit system in (b) is an electrical feedback control system, system and the DC motor position control system in (c) is an electrome-chanical 40 3 Linear Systems Analysis II Fig. 3.1: Mathematically equivalent systems: (a) massdamperspring and (c) 3.1.1 DC motor position Mathematical The governing Equivalency dynamic (MBK) system, (b) RLC circuit, control system. Among differential Typical equation Second-Order for the Dynamic massdamperspring Systems (MBK) system in Figure 3.1(a) can be derived from Newtons law of motion. The effective force fef f(t) applying to the mass will causethe mass Mto move with accelerationy(t) = fe f f(t)/M, where y(t) is the displacement variable ofthesystem. The friction force ffri(t)=-B ?y(t) isproportional tothemagnitude ofthevelocity, but itsdirection isalways against themotion ofthemass. The spring force fspr(t)=-Ky(t) isproportional to the magnitude of the displacement, but its direction is in the opposite direction of the displacement. Hence, wehave feff(t) =fa(t)-B ?y(t)-Ky(t), which leads tothefollowing equation: y(t)+B M ?y(t)+Ky(t) = fa(t) (3.1) Notethat y(t), the displacement of the mass M,is the output or the variable of interest in the system, and fa(t), the applied force, is the control input by which the motion of the system can be altered or controlled. The RLC circuit in Figure 3.1(b) consists of a voltage source ea(t), a resistor and a capacitor C. Let i(t) be the current flowing of the voltage source, ea(t), through clockwise R, L, C, and back to the negative terminal of ea(t). the characteristicsof the resistor, eR(t) = RiR(t),the inductor, eL(t) = LdiL(t)/dt, iC(t) = ? CeC(t), and based on Kirchhoffs around the loop should be zero: di(t) =?q(t), or q(t) = ? i(t)dt, L According to andthe capacitor, voltage law (KVL), the algebraic sum of the voltage drops -ea(t)+Ri(t)+L dt Sincei(t) R, an inductor around the loop from the positive terminal +(1/C) ? i(t)dt =0 (3.2) this equation can be rewritten asfollows, Lq(t)+R ?q(t)+(1/C)q(t) = ea(t) (3.3 3.1 The DC motor position control Typical Second-Order Dynamic Systems 41 system in Figure 3.1(c) consists of a DC motor with transfer func-tion G(s) = b/(s2 +as) that relates the control input U(s) andthe angular displacement output T(s), a proportional controller K with E(s) and U(s) asits input and output, respectively. The error signal E(s) is E(s)= TR(s)-T(s), where TR(s) isthereference orcommand input. The objective ofthecontrol systemis to designthe controller Kso that the output ?(t) can follow ?R(t) as closely as possible. We will seethat the choice of K will affect the performance of the control system. To find the differential equationthat relatesthe referenceinput ?R(t) andthe output ?(t), it wouldbeeasierto firstly determine the transferfunction between TR(s)and T(s) andthen covertit into the correspondingdifferential equation. Since T(s)= KG(s)E(s) andE(s)= TR(s)-T(s), we have T(s)=KG(s) [TR(s)-T(s)] =KG(s)TR(s)-KG(s)T(s) (3.4) which yields the following transfer function: T(s) KG(s) TR(s) = bK = 1+KG(s) (3.5) s2 +as+bK Hence, we havethe differential equation for the DC motor position control system: s2T(s)+asT(s)+bKT(s) =bKTR(s) ? ?(t)+a 3.1.2 Characterization of Typical Second-Order Now we have derived the mathematical ??(t)+bK?(t) = bK?R(t) (3.6 Dynamic Systems models for the three systems in Figure 3.1, which are the three differential equations given in Equation 3.1, Equation 3.3, and Equation 3.6, respectively. Thesethree systems are very different physically: one mechanical, one electrical, andthe last an electromechanical position control system. However, these three systems are mathematically equivalent, and indeed they all can berepresented in the same form of the typical second-order system differential equation: x(t)+2??n ?x(t)+?2 nx(t) = xss?2 nr(t) (3.7) where x(t) represents the output or the variable of interest in the system and r(t) is the input, which can be the control input for an open-loop system or a reference input for a feedback control system. Thetypical second-order system is characterized by three parameters: the damping ratio ?, the natural frequency ?n, and the steady-state step response xss. Thephysical meaningof these three parameters will be clearly described later in this section. After rewriting the massdamperspring (MBK) system governing equation Equation 3.1 in terms of the typical second-order differential equation in Equation 3.7, we obtain the new MBK equation y(t)+(B/M) ?y(t)+(K/M)y(t) wherethe output variableis x(t) = y(t), theinput is r(t) the damping ratio is ? = 0.5B/ The RLC circuit system v MK, andthe fa(t) (3.8) =fa(t), the naturalfrequencyis ?n = vK/M, steady-state step response is xss = 1/K. equation in Equation q(t)+(R/L) = (1/K)(K/M) 3.3 can be rewritten ?q(t)+(1/LC)q(t) in the form =C(1/LC)ea(t) of Equation 3.7, (3.9) v where the output variable isx(vt) =q(t), the input isr(t)=ea(t), the natural frequency is?n=1/LC, the damping ratio is ? = 0.5R C/L, andthe steady-state step response is xss =C. 42 3 Linear Systems Analysis II The DC motor position feedback control system governing equation, Equation 3.6, is already in the form of Equation 3.7. ?(t)+a ??(t)+bK?(t) = bK?R(t) (3.10) wherethe outputvariableis x(t) = ?(t),theinputis r(t) =?R(t),the naturalfrequencyis ?n = vbK, the dampingratio is ? = 0.5a/ vbK, andthe steady-statestepresponseis xss = 1. These discussions have clearly revealed the mathematical equivalency among the above three sys-tems. For this reason, the study of the large group of all typical second-order systems is boiled downto simply investigating the three parameters ?, ?n,and xssin Equation (3.7). 3.2 Transfer Function, As discussed in Section Characteristic 2.5.1, the transfer Equation, and System Poles function of a given system can be derived from the corre-sponding differential equation using the Laplace transform. associated with the differential equation, Equation The frequency-domain 3.7, of the typical second-order algebraic equation system can be found as s2X(s)+2??nsX(s)+?2 nX(s) = xss?2 nR(s) (3.11) which yields the following transfer function between the input R(s) and the output X(s): xss?2 X(s) = R(s) n (3.12 s2 +2??ns+?2=G(s) n The behavior ofthe first-order system is mainly determined bythe root of its characteristic equation, as described in Section 2.5.2. It is also true for the typical second-order system, with the exception that the second-order system hastwo roots instead of one. The characteristic polynomial of the system in Equation3.12 is s2 +2??ns +?2 n, which is the denominator polynomial of the transfer function. Therefore, the characteristic equation is s2 +2??ns+?2 n = 0 (3.13) and its roots are the systems poles. Since the natural frequency ?n and the damping ratio ? are non-negative real numbers, the roots of the second-order algebraic equation will either betwo real numbers or one pair of conjugate complex numbers, and no roots would be on the right half of the complex plane. We will learn in this chapter. more about the physical By comparing Equation meaning of the damping ratio and the natural frequency 3.8, the governing equation of the massdamperspring later (MBK) system, to the typical second-order equation, Equation 3.7, we can easily see that the damping ratio ? is proportional to the friction coefficient B. That means morefriction will cause a higher damping ratio. Similarly for the RLC electric circuit, the damping ratio will go up if the resistance R of the resistor increases. Accordingto the values of the dampingratio ?,the system behaviorsare classified into four cases: Case A: ? > 1. The system is overdamped, and Equation 3.13 hastwo distinct negative real roots. s1 s2 Example A: s2 + 2??ns ? =-??n?n ?2-1= -a1 -a2 +?2n=s2 + 5s + 4=(s + 1)(s + 4)=0. This characteristic (3.14) equation has twodistinct roots at -1and-4,and thedamping ratioandnatural frequency are? =1.25 and ?n = 2rad/s, respectively. 3.3 Time-Domain Response of Typical Second-Order Dynamic Systems 4 Case B: ? = 1. Thesystem is critically damped,and Equation3.13 hasdoublereal roots at s1 = s2 Example B: s2 +2??ns+?2 n = s2 +4s+4 -?n (3.15) -?n = (s+2)2 = 0. This characteristic equation has two identical roots at-2,and thedamping ratioand thenatural frequency are? =1and?n=2rad/s, respectively. Case C: 0 < ? < 1. The system is underdamped, and Equation 3.13 has a pair of complex conjugate ? roots at s1 s2 Example C: s2 +2??ns+?2 := -a j? =-??n j?n 1-?2 v v3) (3.16) = 0. This characteristic n=s2+2s+4 =(s+1-jv3)(s+1+ j 3, and the damping ratio and the natural equation has apair ofcomplex conjugate roots at-1 j frequency are ? = 0.5 and ?n = 2rad/s, respectively. Case D: ? = 0. Thesystem is undamped,and Equation3.13hasa pair of complex conjugateroots on the imaginary axis at s1 s2 Example D: s2 +2??ns+?2 = j?n (3.17) n =s2+4=(s-j2)(s+j2) =0.This characteristic equation has a pair ofcomplex conjugate roots atj2,and thedamping ratio and thenatural frequency are ? =0 and ?n = 2rad/s, respectively. 3.3 Time-Domain Responseof Typical Second-Order Dynamic Systems As discussedin Section 3.1, alarge group of second-order systems share mathematical equivalency and can be characterized by the typical second-order differential equation described by Equation 3.7, which is repeated in the following for ease of reference: x(t)+2??n ?x(t)+?2 nx(t) = xss?2 nr(t) (3.18) In the equation, x(t) is the system output orthe variable of interest, which may be the displacement y(t) of the mechanical system in Figure 3.1(a), the electric charge q(t) on the capacitor of the electric circuit in Figure3.1(b),orthe angulardisplacement?(t) ofthe electromechanical systemin Figure3.1(c).The variable r(t) is the control input or the command by which the behavior of the system can be altered or controlled. The damping ratio ?, the natural frequency ?n, and the steady-state step response xss are determined by system component values. Given initial conditions x(0)and ?x(0) and input r(t)fort =0,we can solve thedifferential equation tofindx(t)fort =0.After taking theLaplace transform ofEquation 3.18 and some straightforward algebraic manipulations, we havethe solution X(s) =[G0(s)x(0)+G1(s) X(s) =L[x(t)] as follows: ?x(0)]+G(s)R(s) := XI(s)+XR(s) where G0(s) = s+2??n D(s) , G1(s) = 1 D(s) , G(s) = xss?2 n, D(s) D(s) =s2 +2??ns+?2n (3.19) 44 3 Linear Systems Analysis II IntheLaplace transform manipulations, theLaplace transform pairs ?x(t)?sX(s)-x(0) and x(t) ? s2X(s)-sx(0)?x(0) fromTheorem 2.25 were employed. Note thatX(s) consists oftwoparts: XI(s), the response due to the initial conditions x(0) and?x(0), and XR(s), the response due to the control or command input R(s). Therefore, the complete response x(t) of the typical second-order system, de-scribed by Equation 3.18, is the inverse Laplace transform of X(s): x(t) =L-1 [X(s)] =L-1 [XI(s)]+L-1 3.3.1 The Response of the Typical Second-Order [XR(s)] =xI(t)+xR(t) Systems Dueto Initial (3.20) Conditions The initial state response xI(t) is the response of the second-order dynamic system due to the initial conditions x(0) and?x(0). It can be computed using the inverse Laplacetransform in the following: xI(t) =L-1 [XI(s)] ? x(0)s+2??nx(0)+ ?x(0) s2 +2??ns+?2 n =L-1 ? (3.21) Notethat the two poles of the function X(s) are the roots of the characteristic equation s2 +2??ns+ ?2 n = 0. As discussedin Section 3.2, the behaviors of the typical second-order system can be classified into the following four cases according to the values of the damping ratio ?. ? Case A: ? > 1. Thesystem is overdamped,andthe characteristic equation hastwo distinct negative XI(s) can bedecomposed intotwo terms real roots: -??n?n ?2-1or-a1and-a2.Hence, asfollows using the partial fraction expansion: XI(s) = x(0)s+2??nx(0)+ ?x(0) A1 = (s+a1)(s+a2) A2 + (s+a1) (3.22) (s+a2) Then the initial state response xI(t) for Case Ais xI(t) =L-1 [XI(s)] Case B: ? = 1. The system is critically = A1e-a1t +A2e-a2t (3.23) damped, andthe characteristic equation hastwo identical neg-ative real roots at-?n.Hence, XI(s) can bedecomposed intotwo terms asfollows using thepartial fraction expansion: XI(s) Then the initial = x(0)s+2?nx(0)+ state response xI(t) xI(t) ?x(0) for A3 = (s+?n)2 (s+?n) A4 + (3.24) (s+?n)2 Case Bis =L-1 [XI(s)] = A3e-?nt +A4te-?nt (3.25) ? Case C: 0 < ? < 1. The system is underdamped, and the characteristic equation has two complex conjugate roots at-??nj?n 1-?2or-a j?. Hence, XI(s) canbedecomposed intotwo terms as follows using the partial fraction expansion: XI(s) = x(0)s+2??nx(0)+ ?x(0) Aej? = (s+a-j?)(s+a+j?) (s+a-j?) + Ae-j? (s+a+ j?) (3.26 3.3 Time-Domain Response of Typical Second-Order Dynamic Systems 45 Then the initial state response xI(t) for Case Cis xI(t) =L-1 [XI(s)] = Aej?e-(a-j?)t ? = Ae-at ej(?t+?) +e-j(?t+?) +Ae-j?e-(a+j?)t ? (3.27) = 2Ae-at cos(?t +?) Case D: ? = 0. Thesystem is undamped, andthe characteristic equation hastwo complex conjugate roots atj?n.Hence, XI(s) can bedecomposed intotwoterms asfollows using thepartial fraction expansion: XI(s) = A5e-jf A5ejf x(0)s+ ?x(0) = (s-j?n)(s+j?n) (s-j?n) + (3.28) (s+ j?n) Then the initial state response xI(t) for Case Dis xI(t) =L-1 [XI(s)] = A5e jfe j?nt +A5e-jfe-j?nt ? = A5 ej(?nt+f) +e-j(?nt+f) ? (3.29) = 2A5cos(?nt +f) In the following example, the massdamperspring (MBK) system as shown in Figure 3.1(a) will be employed to demonstrate the behavior of the system in four cases. Example 3.1 (The Responses of an MBK System Dueto Initial Conditions) Consider a massdamperspring (MBK) system as shown in Figure 3.1(a), wherethe massandthe spring constant are chosen to be M = 1 kg and K = 4 N/m, respectively. The friction coefficient B of the damper is kept as afree design parameter at this moment. Assumethere is neither applied force nor initial velocity (both fa(t) and?y(0) are zero), but the initial massdisplacement is a little bit away from the equilibrium, say, y(0) = y0 = 0.1m. The objective is to find the trajectory of the massdisplacement, y(t), after it is released at t = 0. Withthese assumptions, the governing differential equation now is y(t)+B Take the Laplace transform ?y(t)+4y(t) = 0, y(0) = y0, y?(0) =0 to obtain y0(s+B) s2Y(s)-sy0 +B[sY(s)-y0]+4Y(s) =0 ? Y(s)=s2 +Bs+4 and then the solution y(t) can be found by computing the inverse Laplace transform of Y(s). Before doing that, we will see how to classify the behavior of the system into four classes according to the value of the friction with that coefficient of the typical B of the damper. second-order Comparing the characteristic polynomial of the MBK system system, s2 +Bs+4 ? s2 +2??ns+?2n we have ?n = 2 rad/s and ? = B/4. Therefore,if M = 1 kg and K = 4 N/mare chosenfor the MBK system, the behavior of the MBK system can be classified into the following four cases according to the values of the friction coefficient B: Case A: B>4Ns/m,?>1, ?n=2rad/s,s1, s2=-a1,-a2,overdamped Case B: B=4Ns/m,? =1, ?n=2rad/s,s1,s2=-2,-2, critically damped Case C: 0<B<4Ns/m, 0<?<1, ?n=2rad/s,s1, s2=-a j?, underdamped Case D: B=0Ns/m,?=0, ?n=2rad/s,s1, s2=j2, undampe 46 3 Linear Systems Analysis II Based on this investigation and analysis, we should be able to envision the trajectory of the motion even before solving for y(t). Example 3.2 (Case A Overdamped Response of the MBK System Dueto Initial Conditions) For the MBK system considered in Example 3.1, with the assumptions M = 1 kg, K = 4 N/m, fa(t) = 0,?y(0) = 0, and y(0) = y0 = 0.1 m, we have the solution in s-domain as a function of the friction coefficient B as follows: L[y(t)] To investigate Case A overdamped initial =Y(s) = 0.1(s+B) s2 +Bs+4 state response, let B = 5 Ns/m so that the damping ratio and natural frequency are? =1.25 and?n=2rad/s, respectively, and the tworealpoles are s1=-1 and s2=-4.Now, tofindtheinverse Laplace transform ofY(s), we decompose Y(s) intotwoparts using the partial fraction expansion: 0.1(s+5) s2 +5s+4 A1 = s+1 A2 + ? 0.1s+0.5 =A1(s+4)+A2(s+1) s+4 This polynomial equation isvalid forany realorcomplex value ofs;thus, thesubstitutions ofsby-1 and-4are thebest choices, leading toeasy solutions forA1andA2. s =-1 ? -0.1+0.5 =A1(-1+4)? A1=0.4/3 =0.1333 s =-4 ? -0.4+0.5 =A2(-4+1)? A2=0.1/-3=-0.0333 Taking the inverse Laplace transform, we have the following initial state response of the MBK sys-y(t) tem: =0.1333e-t -0.0333e-4t, t =0 Notethat the initial stateresponsey(t) hastwo exponentialterms, y1(t) = 0.1333e-t and y2(t) = -0.0333e-4t, which are associated with thesystem poles s =-1and s =-4,respectively. Asshown from Figure 3.2, y2(t) decays much morequickly than y1(t), and therefore the pole closerto the imaginary axis plays a more dominant role than the other pole. Fig. 3.2: Case Ainitial Example 3.3 (Case B Critically state response Damped Initial of the overdamped State Response of the MBK system. MBK System) The MBK system considered in the following is identical to the onein Example 3.2, except the value of the friction coefficient Bin the following s-domain trajectory solution 3.3 Time-Domain Response of Typical L[y(t)] To investigate Case B critically =Y(s) damped initial = Second-Order Dynamic Systems 47 0.1(s+B) s2 +Bs+4 state response, let B = 4 Ns/m so that the damping ratio and naturalfrequency are ? = 1.0and ?n =2rad/s,respectively,andthe two real poles areidentical s1=s2= -2.Now, tofindtheinverse Laplace transform ofY(s), we decompose Y(s) intotwoparts using the partial fraction expansion: 0.1(s+4) B1 = s2 +4s+4 As mentioned previously, we can substitute s+2 B2 + (s+2)2? 0.1s+0.4 =B1(s+2)+B2 this polynomial equation is valid for any real or complex s by any two values to obtain two linearly independent algebraic value of s; thus, equations from which the two unknowns B1and B2 can be solved. As alternative, the coefficient comparison approach can be employed to set up two linearly Taking the inverse MBK system: independent equations to solve for ? B1=0.1 ?B2=0.4-0.2 =0.2 s1term : 0.1 = B1 s0term : 0.4 = 2B1 +B2 Laplace transform B1 and B2 as follows: of Y(s), we have the following initial state response of the y(t)=0.1e-2t +0.2te-2t , t =0 Fig. 3.3: Case B critically The Case B critically MATLAB code: % CSD clear, Fig3.3 Case t=linspace(0,6,61); y=y1+y2; grid damped initial figure(31), minor, xlabel('Time, B damped initial state response of the MBK system. state response in Figure 3.3 is obtained critically damped y1=0.1*exp(-2*t); initial state ylabel('Init response y2=0.2*t.*exp(-2*t); plot(t,y,'k-',t,y1,'b--',t,y2,'r--'), sec'), using the following grid, Response'), legend('y','y1','y2') Notethat the initial stateresponsey(t) hastwo terms, y1(t) = 0.1e-2t and y2(t) = 0.2te-2t, which are theresults ofthedouble system poles ats =-2.The system considered inExample 3.2 and theon 48 3 Linear Systems Analysis II in this example are basicallythe sameexceptthe value ofthe dampingratiothe former with ? = 1.25, overdamped,andthe latter with ? = 1, critically damped. By comparingthe initial stateresponsesin Figure 3.2 and Figure 3.3, equilibrium we can observe that the critically state response. The critically overshoot and oscillations. Example The damped step response faster and reaches the steady state at the equilibrium 3.4 (Case MBK system considered Response of the in the following MBK System is almost identical Due to Initial to the s-domain trajectory in coefficient B, which is solution: L[y(t)] Case C underdamped Conditions) previous two examples Example 3.2 and Example 3.3. The only difference is in the value of the friction To investigate the initial damped step response is the least damped one that still can avoid an C Underdamped smaller in the following moves towards earlier than the overdamped =Y(s) initial = 0.1(s+B) s2 +Bs+4 state response, let B = 2 Ns/m so that the damping ratio and naturalfrequency are ? = 0.5 and ?n = 2rad/s, respectively,andthe two complex conjugate poles are s1,s2=-1 j v3. Now,to find the inverse Laplacetransform ofY(s), parts using the partial fraction 0.1(s+2) s2 c = +2s+4 we decompose Y(s) into two expansion: s+1-j v3 +s+1+ v c* j v j 3) v3 ? 0.1(s+2) =c(s+1+ j 3)+c*(s+1- Notethat the two complex numbers c and c* are conjugate, which meansif either oneis known we will have the other one immediately. -1+ v3, the polynomial equation Thus, only one needs to be computed. v v3+1+ 0.1(-1+ j 3+2)=c(-1+j . Taking hence,c* = 0.1v 3ej30? the By substituting s by becomes the inverse j v 0.1(1+ j 3) ? c= Laplace transform ofY(s), j2 v3 v3) 0.1 = we have the initial v3 e-j30? state response of MBK system: y(t) = v 0.1 v3 e-j30? e(-1+j 3)t which can be rewritten in terms y(t) = + 0.1 v3 ej30? e(-1-j v 3)t = 0.1 v3 e-t ? ej( v v ? 3t-30?) +e-j( 3t-30?) of cosine or sine functions: 0.2 v3e-t cos( v 0.2 3t-30?) = v3 e-t sin( v3t +60?) v3rad/s v3 rad/s is the imagi-nary It canbeseenthattheinitial stateresponsey(t) is asinusoidalfunction withfrequency ?= and exponentially decaying amplitude. Notethat oscillation frequency ? = part of the system pole, and the decaying rate in e-t is determined by the real part of the pole. Furthermore, the phase of the sine function is 60?, which revealsthat the damping ratio is ? =cos60? =0.5. Asshownin Figure3.4,theunderdamped initial stateresponse has much fasterrise time thanthe overdampedor critically dampedcases. Butthe 18% overshootdueto the choice of ? = 0.5 is not a good design. A new selection of Bto increasethe dampingratio to about ? = 0.9 will greatly improve the performance. The Case C underdamped initial code: state response in Figure 3.4 is obtained using the following MAT-LAB 3.3 % CSD clear; Fig3.4 Case C Time-Domain underdamped t=linspace(0,6,61); figure(32), initial state Second-Order grid, sec'), Redesign the 49 Systems response grid ylabel('Init minor, Response') Fig. 3.4: Case Cunderdamped initial state response of the Exercise 3.5 (Redo Dynamic y=0.1155*exp(-t).*sin(sqrt(3)*t+pi/3); plot(t,y,'k-'), xlabel('Time, Response of Typical Example MBK system of this particular 3.4 by Selecting by selecting underdamped B = 3.6 B = 3.6 design MBK system. Ns/m) Ns/m and repeat with the critically Example damped 3.4 to compare the per-formance design in Example 3.3 and give your comments. Example 3.6 (Case D Undamped Response of the MBK System Dueto Initial Conditions) The MBK system considered in the following is almost identical to the previous three examples in Example 3.2, Example 3.3, and Example which is now zero, in the following 3.4. The difference is in the value of the friction s-domain L[y(t)] coefficient B, solution: =Y(s) = 0.1(s+B) s2 +Bs+4 With B = 0 Ns/m,the damping ratio and natural frequency are ? = 0 and ?n = 2 rad/s, respectively, and thetwocomplex conjugate poles are s1,s2=j2. Now, Y(s) has become Y(s) = 0.1s s2 +22 Theinitial state response y(t) is the inverse Laplace transform ofY(s), y(t) = 0.1cos2t whichis a sinusoidalfunction withfrequency ? = 2rad/s and undampedamplitude asshownin Figure 3.5. Notethat the imaginary part of the system pole, ? = 2 rad/s, is the oscillation frequency, and the zero real part of the pole meansthat the decaying rate in e0tis zero 50 3 Linear Systems Analysis II Fig. 3.5: Case D undamped initial 3.3.2 The Response of the Typical state response Second-Order Systems of the Due to MBK system. Unit Step Input As shown in Equations 3.19 and 3.20, the output response x(t) of the typical second-order system con-sists of two parts: xI(t), the response due to the initial conditions, and xR(t), the response dueto the reference input or control input rR(t). The response due to the initial conditions has been discussed in the previous subsection, responses Section 3.3.1. due to initial The initial conditions state responses will decay exponentially are basically transient and eventually responsesall die out unless the system has poles on the imaginary axis or in the right half of the complex plane. Onthe other hand, the responses due to the input r(t) will include both transient and steady-state responses. The type of input signals can be an impulse or anirregular function, piecewise a step function, continuous function. a sinusoidal function However, the of a wide range of fre-quencies, most common testing signals in practice are the unit step function us(t) andthe sinusoidal function cos?t or sin?t used with a widerange of frequencies. The sinusoidal response of the second-order system will be discussed in the next subsection. subsection, we will investigate the effect of the damping ratio ? and the natural frequency transient behavior of the typical second-order Recall that in Section 2.4.2 welearned In this ?n on the system. how to find the step response of the typical first-order Asshownin Figure 2.6,the procedureoffinding the stepresponseof the system t?x(t)+x(t) system. = xssu(t) isfairly straightforward since thesystem has only one pole, s =-1/t,inwhich t isthetime constant of the system. The step response graph can be easily sketched equation since the equation hasrevealed the information without the need of solving the differential ofthe time constant t andthe steady-state step response xss, which provide enough information to construct the step response. Although the step response of the typical second-order system is not as simple asthat of the typical first-order system,it still can beeffectively characterizedby onlythree parameters:the dampingratio ?, the naturalfrequency ?n,andthe steady-statestepresponsexss.ThestepresponsexR(t) is the response of the second-order dynamic system dueto the unit step input us(t), and can be computed asthe inverse Laplace transform of XR(s): xR(t) =L-1 [XR(s)] =L-1 ? xss?2 n s2 +2??ns+?2 1 n s where XR(s) was given in Equation 3.19. In the following, typical second-order response study system for each case of Cases Ato ? ? =L-1 xss?2 n s(s2 +2??ns+?2 n) ? (3.30) we will investigate the step response of the D as we did in Section 3.3.1 for the initial state 3.3 Time-Domain ? Response of Typical Second-Order Dynamic Systems 51 Case A: ? > 1. Thesystem is overdamped,andthe characteristic equation hastwo distinct negative XR(s) can bedecomposed into three terms real roots: -??n?n ?2-1or-a1and-a2.Hence, as follows using the partial fraction XR(s) = expansion: xss?2 n A1 xss = s(s+a1)(s+a2) + s A2 + (s+a1) (s+a2) (3.31) Then the step response xR(t) for Case Ais xR(t) =L-1 [XR(s)] = xss +A1e-a1t +A2e-a2t Example 3.7 (Case A Step Response Example (3.32) with ? = 1.25, ?n = 2 rad/s and xss = 1) Considerthe following system with ? = 1.25, ?n = 2rad/s, xss = 1, andthe roots ofthe character-istic equation are at-1and-4: XR(s) R(s) = G(s) = xss?2 n 4 s2 +2??ns+?2 = n 4 = s2 +5s+4 (s+1)(s+4) (3.33) Withthe unit stepinput R(s) = 1/s, we havethe step response XR(s) with its partial fraction expan-sion, 4 XR(s) where A0, A1, and = A2 are the real These constants can be evaluated A0 = s(s+1)(s+4) partial fraction using the residue A0 =lim sXR(s) = (1)(4) 4 = 1, s?-4 A1 + s+1 expansion approach A2 + s+4 residue 4 = (-4)(-3) (3.34) constants to be determined. as follows: A1 = lim (s+1)XR(s) s?0 A2 = lim (s+4)XR(s) s s?-1 4 = (-1)(3)= 3, -4 (3.35) =1 3 Fig. 3.6: Case A: Overdamped step response. Now, plug the values of A0, A1, and A2into 1/(s+a) Equation 3.34, and use the Laplace transform pair ? e-at, and wehavethe stepresponsein the following: := 1+x1(t)+x2(t) xR(t)=L-1 [XR(s)] =1-(4/3)e-t +(1/3)e-4t (3.36 52 3 Linear Systems Analysis II Note thatthestep response xR(t) has twoexponential terms, x1(t)=-1.33e-t andx2(t)= 0.33e-4t, which areassociated with thesystem poles s =-1and s =-4,respectively. Asshown from Figure 3.6, x2(t) decays much more quickly than x1(t), and therefore the pole closer to the imaginary axis plays more dominant role than the other pole. Case B: ? = 1. Thesystemis critically damped,andthe characteristicequationhastwo identical nega-tive real roots at-?n.Hence, XR(s) can bedecomposed intothree terms asfollows using thepartial fraction expansion: XR(s) = xss xss?2 n s(s+?n)2 A3 + = s A4 + (s+?n) (3.37) (s+?n)2 Then the step response xR(t) for Case Bis xR(t) =L-1 [XR(s)] = xss +A3e-?nt +A4te-?nt (3.38) Example 3.8(Case B Step ResponseExample with ? = 1, ?n = 2rad/s and xss = 1) Consider the following system with ? = 1, ?n = 2rad/s, xss = 1, andthe two roots of the charac-teristic equation areboth-2: XR(s) = G(s) = R(s) xss?2 n 4 s2 +2??ns+?2 4 = s2 n (3.39) = +4s+4 (s+2)2 Withthe unit stepinput R(s) = 1/s, wehavethe output XR(s) andits partialfraction expansion, XR(s) = 4 A0 s(s+2)2 = s A3 + A4 + s+2 (3.40) (s+2)2 where A0, A3, and A4 are the real partial fraction expansion residue constants to be determined. These constants can be evaluated using the residue approach as follows: A0 = lim sXR(s) = 4 s?0 d A3 = lim s?-2 ds 22 = 1, -2 =-2, A4 = lim (s+2)2XR(s) = 4 s?-2 ? (s+2)2XR(s) ? = lim s?-2 d?4 ds s ? = lim -4 s?-2 s2 = (3.41) -4 (-2)2=-1 The partial fraction expansion residue constants can also be found using the polynomial substitution approach and the coefficient comparison approach as described in Remark 3.9. Now, plug the values of A0, A3, and A4into Equation 3.40, and use the Laplace transform pairs 1/(s+a) ? e-at and 1/(s+a)2 ? te-at,and wehave thestepresponse in thefollowing: := 1+x1(t)+x2(t) xR(t)=L-1[XR(s)] =1-e-2t-2te-2t The Case B critically code: % CSD Fig3.7 clear, ylabel('Step Case B critically t=linspace(0,6,61); xR=1+x1+x2; grid, damped step response in Figure 3.7 is obtained using the following grid figure(33), minor, damped x1=-exp(-2*t); plot(t,xR,'k-',t,x1,'b--',t,x2,'r--'), xlabel('Time, Response'), sec'), legend('xR','x1','x2' step response x2=-2*t.*exp(-2*t); (3.42) MAT-LAB 3.3 Time-Domain Response of Typical Second-Order Dynamic Systems 53 Fig. 3.7: Case B: Critically damped step response. Note that in addition to the steady-state response xss = 1, the step response xR(t) has two transient response terms, x1(t)=-e-2t and x2(t)=-2te-2t, which are theresults ofthedouble poles ats =-2.Ashown s from Figure 3.7, ifthere were nox2(t)=-2te-2t term, thestep response would be the same as that of the typical first-order system, with time constant equal to 0.5 second, orequivalently with thesingle pole ats =-2.The additional pole atthesame location s = -2 leads tothecreation ofthetermx2(t)=-2te-2t thatapparently slows down thestep response. The systems considered in Figure 3.6 and Figure 3.7 are both typical second-order systems with identical ?n and xss. The only differenceis in the value of the dampingratioone with ? = 1.25, overdamped,andthe other with ? = 1, critically damped. Bycomparingthe stepresponsesin Figure 3.6 and Figure 3.7, wecan observe that the critically the steady state earlier than the overdamped the least damped one that Remark 3.9 (Alternative can still Ways to damped step response rises faster and reaches step response. avoid an overshoot Evaluate the The critically damped step response is and oscillations. Partial Fraction Expansion Residue Con-stants.) As discussed in Section 2.4.2, the partial fraction expansion residue constants A0, A3, and A4 in Equation 3.40 can also be evaluated using the polynomial substitution approach and the coefficient comparison approach. Multiply both sides of Equation 3.40 by s(s +2)2 to obtain the following polynomial equation: 4 = A0(s+2)2 +A3s(s+2)+A4s (3.43) Sincethis polynomial equation is valid for any value of s, any set of three distinct numbers can be selected to substitute s to obtain three linearly independent equations so that the three constants can be uniquely determined. However, some particular numbers may be chosen to makethe equations easierto solve. For this example, if s is selected as 0 then Equation 3.43 will become 4 =A0(2)2, which leads toA0=1.Similarly, substituting sby-2in Equation 3.43 willgive thesolution A4=-2.After plugging these twoknown residue constants intoEquation 3.43, there isonly one unknown residue constant A3left in the equation: 4 =(s+2)2+A3s(s+2)-2s Then there are several ways to determine the value of A3in Equation (3.44) 3.44: (1) By comparing thes2term,we have 0=s2+A3s2, which gives A3=-1;(2)Bysubstituting sby1,Equation 3.44 becomes 4=32+3A3 -2and then A3=-1;or(3)Bymoving -2sfrom theright-hand sid 54 3 Linear Systems Analysis II to the left-hand side, Equation 3.44 becomes 2(s+2) = (s+2)2 +A3s(s+2), whichis simplified to0 =s+A3s; hence, A3=-1. ? Case C: 0 < ? < 1. The system is underdamped, and the characteristic equation has two complex conjugate roots at-??nj?n 1-?2or-a j?. Hence, XR(s) can bedecomposed intothree terms as follows using the partial fraction expansion: XR(s) = xss?2 n xss = s(s+a-j?)(s+a+j?) Usingthe Laplacetransform pair 1/(s+a) Ae-jf Aejf + s + s+a-j? s+a+ (3.45) j? ? e-at, wehavethe stepresponsexR(t) for CaseCas follows: xR(t) =L-1 [XR(s)] = xss +Aejfe-(a-j?)t +Aejfe-(a+j?)t (3.46) = xss +Ae-at(ej(?t+f) The residue constant Aejf in Equation +e-j(?t+f)) = xss +2Ae-at cos(?t 3.45 can be found (See Equation +f) 3.64) in terms of the damp-ing ratio ? and the steady-state step response xss as Aejf = ? ?? 1-?2? ej(?+p/2), 0.5xss where ?= cos-1? (3.47) Hence, Equation 3.46 can be rewritten as ??? 1-?2? ?1- ??? ? =xss 1 1-?2? xR(t) =xss +2Ae-at cos(?t +f) =xss + e-at cos(?t xss e-at sin(?t +? +p/2) (3.48) +?) Example 3.10(Case C Step ResponseExample with ? = 0.5, ?n = 2 rad/s and xss = 1) Considerthe following equation are-1 j XR(s) R(s) system with ? = 0.5, ?n =2rad/s, xss = 1,and the roots of the characteristic v3: = G(s) = xss?2 n s2 +2??ns+?2 Withthe unit step input R(s) = 1/s, XR(s) = = n 4 s2 +2s+4 = 4 (s+1-j v3)(s+1+ j v3) (3.49) we havethe step response XR(s) andits partial fraction expan-sion, 4 s(s2 +2s+4) A0 = s c + s+1-j v3 +s+1+ c* j v3 (3.50) where A0is areal constant and cis a complex constant to be determined. Thereis no needto compute c* since it is the conjugate of c. Theseconstantscan be evaluated usingthe residue approachas follows: v? lim v =3+j-2v3 =1v 3ej150? v ? s+1-j 3 XR(s) = (-1+j v4 3)( j2 3) s?-1+j 3 , A0 =lim sXR(s) = 4/4 = 1 c* = 1/ 3 e-j150? s?0 c = ?v? (3.51 Now,plugthe values of A0,c, and c*into Equation 3.50,and usethe Laplacetransform pair 1/(s+ a) ?e-at,then wehavethe stepresponse in thefollowing: 3.3 Time-Domain Response of Typical Second-Order ?v ? ?v ? ? ?v? ? 3t +150?)=1- 2/ 3e-t sin( ?v? ?v? The twocomplex poles are-??nj?n? 1-?2=-1 j v v = 1+ 1/ 3 ej150?e-(1-j 3)t + 1/ v v +e-j( 3t+150?) 3 e-t ej( 3t+150?) xR(t) =L-1[XR(s)] = 1+ 1/ = 1+ 2/ 3 e-t cos( Dynamic Systems 3 e-j150?e-(1+j v v3t 55 v3)t (3.52) +60?) 3in rectangularform, or ?nej(p-?) thattheunderdamped stepresponse in = 2ej120?in polarform, where? =cos-1? =60?.Note Figure 3.8 rises more quickly than the critically damped step response in Figure 3.7, but it has over-shoot and oscillations. The oscillation frequency is determined by ?, the imaginary part of the complex pole, and the amplitude of the oscillation is decreasing exponentially with decreasing rate determined by-a,therealpart ofthecomplex pole. Fig. 3.8: Case C: Underdamped step response. The Case C underdamped step response in Figure 3.8is obtained using the followingMATLAB code: % CSD clear, xR=1+x1; xlabel('Time, Fig3.8 Case C underdamped t=linspace(0,6,61); step response x1=-1.16*exp(-t).*sin(sqrt(3)*t+pi/3); figure(34), plot(t,xR,'k-',t,x1,'b--'), sec'), ylabel('Step grid, Response'), grid minor, legend('xR','x1') CaseD: ? =0. Thesystemis undamped,andhasa pairof complexconjugaterootsontheimaginary axis ofthecomplex plane at j?n.Hence, XR(s) canbedecomposed intothree terms asfollows using the partial fraction expansion: XR(s) = xss?2 n xss s(s-j?n)(s+ j?n) Usingthe Laplacetransformpair 1/(s+a) = s Aejf + s-j?n + Ae-jf s+ j?n (3.53) ? e-at, wehavethe stepresponsexR(t)for CaseDas follows: xR(t) =L-1 [XR(s)] = xss +Aejfej?nt +Aejfe-j?nt (3.54) = xss +A(ej(?nt+f) +e-j(?nt+f)) = xss +2Acos(?nt +f) The residue Aejf in Equation 3.53 can be found as 0.5xssejp, and therefore the step response xR(t) for Case D can be rewritten a 56 3 Linear Systems Analysis II xR(t) =xss+2Acos(?nt +f)=xss (1-cos?nt) (3.55) Example 3.11(Case D Example with ? = 0, ?n = 2rad/s and xss = 1) Considerthe following system with ? = 0, ?n = 2rad/s, xss = 1, andthe roots of the characteristic equation j2: XR(s) R(s) = G(s) = xss?2 n 4 s2 +2??ns+?2 = n 4 s2 +4 = (s-j2)(s+j2) (3.56) Withthe unit stepinput R(s) = 1/s, wehavethe stepresponse XR(s)andits partial fraction expan-sion, 4 XR(s) = A0 s(s2 +4) = s c + s-j2 + c* (3.57) s+ j2 where A0is areal constant and cis a complex constant to be determined. Thereis no needto compute c* sinceit is the conjugateof c. Theseconstantscanbeevaluatedusingthe residueapproachas follows: 4 =-0.5=0.5e (s-j2)XR(s) =j2(j2+j2) = -8 jp sXR(s) = 4/4 = 1 c* =-0.5=0.5e-jp, A0=lim s?0 4 c = lim s?j2 (3.58) Fig. 3.9: Case D: Undamped step response. Now,plugthe values of A0,c, and c* into Equation 3.57. Thenby taking its inverse Laplacetrans-form, we have the step response in the following: xR(t)=L-1[XR(s)] =1-0.5e j2t-0.5e-j2t =1-cos2t (3.59) ? The twocomplex poles inthisexample are-??nj?n 1-?2= j2 inrectangular form, or ?nej(p-?) in polarform, where? = cos-1? = 90?. Notethat the undampedstepresponsexR(t) in Figure 3.9 rises more quickly than the underdamped step response in Figure 3.8, but it has 100% overshoot and undamped oscillations. The oscillation frequency is ? = ?n, which is the imaginary part of the complex pole, and the amplitude of the oscillation is sustained without damping since the real part of the complex pole is zero 3.4 3.4 Characterization Characterization of the Underdamped of the Underdamped Second-Order Second-Order Systems 5 Systems For atypical first-order system described byEquation 2.62, itsstep response isx(t)=xss(1-e-t/t), which can be easily characterized by the initial value x(0) and plotted, as in Figure 2.5(b). = 0, the steady-state value x(8) The step response is basically = xss, and the value of x(t) deter-mined at the time constant x(t) =xss(1-e-1) =0.632xss. It has neither overshoot noroscillations; itjustsimply rises exponentially with a decreasingslope?x(t) = (xss/t)e-t/t x(8) to approachto the steady-statefinal value =xss. Although the typical second-order system can be characterized by the damping ratio ?, the natural frequency ?n, and the step response steady-state value xss,the plotting of the second-order system step response according to the three characterization system. As discussed in the previous two parameters is not astrivial sections, Sections as that of the typical first-order 3.2 and 3.3, according to the pole locations of the system, the system can be categorized into four cases:the overdamped case with ? > 1, the critically damped case with ? = 1, the underdamped case with 0 < ? < 1, and the undamped case with ? = 0. Among these four cases, the most common and interesting case that occurs in practice is the underdamped case with 0 < ? < 1. For this reason, in this section we will focus on the study of the underdamped case to gain much more clear understanding about the geometry of the poles on the complex plane and the relationship between the geometry and the time-domain response. 3.4.1 Geometry of Conjugate System Poles on the Complex Plane When0 < ? < 1, the system poles, which arethe roots of the characteristic equation, Equation 3.13, are a pair of complex conjugate roots at ? p where a=??n, ?=?n 1-?2,? =cos-1 ? p* =-a j? =?nej(p-?) The pair ofcomplex numbers are either represented inrectangular form as-a j? orinpolar form ?nej(p-?). (3.60) Bothrepresentationsareimportant in revealing the physical meaningof the mathematical results and in serving as efficient computation tools in the analysis and design of dynamic systems. ? The realpartofthecomplex number, -a =-??n, determines how fastthesystem response part, j? = j?n 1-?2,manifests theos-cillation would converge to the steady state, and the imaginary frequency of the system response. In polar form, the complex numbers are represented in terms of their magnitude and phase angle. It can be seen that the magnitude and phase angle of the complex numbers are esting to note that algebraically the relationship between the angle ? and the damping ratio ? can be v a2+?2=?nand(p-?),respectively, where ? =cos-1?. Itisinter-? represented in manydifferent =tan-1 ways by trigonometric functions as follows: ?1-?2 ?1-?2=cos-1? ? =sin-1 p and 2 ? ? -? =tan-1 (3.61) 1-?2 The algebraic relationship between a, ?, ? and ?, ?nseems complicated; however, it is rather straight-forward graphically, 3.4.2 Step as shown in Figure 3.10. Response of the The step response Underdamped of the system, represented Second-Order System by Equation 3.7, is the solution due to the unit step input assuming zero initial conditions: x(0) briefly described a procedure of the differential = 0 and?x(0) to obtain the step response for the underdamped equation = 0. In Section 3.3.2, we case in Equation 3.48. 58 3 Linear Systems Analysis II Fig. 3.10: Geometrical relationship between a, ?, ?, and ?, ?n. In the following, the second-order system poles geometry shown in Figure 3.10 will be employed to derive and explain the physical Laplace transform of Equation XR(s) meaning of the step response solution in 3.7, the transfer function = G(s) = Equation 3.48. After taking the of the system can be found as follows: xss?2 xss?2 n n = (3.62) (s+a-j?)(s+a+j?) n = 0. Withthe Note that-a j? are thesolutions ofthecharacteristic equation, s2+2??ns+?2 R(s) s2 +2??ns+?2 n unit step input R(s) = 1/s, we havethe step response XR(s) andits partial fraction expansion, XR(s) = xss?2 n A0 s(s2 +2??ns+?2 = n) s c* c + s+a-j? + s+a+ (3.63) j? where A0is a real number and c is a complex number to be determined. Since c* is the conjugate of c, only the two residue c = constants A0 and c need to be evaluated: xss?2n xss?2n (s+a- j?)XR(s) =(-a+j?)( j2?)=?nej(p-?)2?n v1-?2ejp/2 s?-a+j? lim v n/?2n A0 =lim sXR(s) = xss?2 c* = 0.5xsse-j(?+p/2), 1-?2 ej(?+p/2 v1-?2 = 0.5xss = xss s?0 (3.64) ? Intheabove complex number manipulations, weused thegeometrical facts that-a j? = 1-?2, j =ejp/2,and j =e-j3p/2 =ejp/2.Now, plug thevalues ofA0, c,and ?nej(p-?), ? =?n c*into Equation 3.63, and withthe Laplacetransform pair 1/(s+a)?e-at, wehavethe following: x(t) =L-1 [XR(s)] =xss+ 0.5xss e-j(p/2+?)e(-a-j?)t v1-?2 v ej(p/2+?)e(-a+j?)t + 0.5xss ?v ? 1-?2 = xss 1+ 0.5e-at ej(p/2+?t+?) +e-j(p/2+?t+?) 1-?2 ??? v = xss 1+ e-at 1-?2cos(p/2+?t ? +?) (3.65) Notethat the Eulers formula (Theorem 2.1) and Corollary 2.2 have been employed to convert the sum of two complex functions into one real cosine function. Furthermore, with the basic trigonometric formula cos(p/2+?) =-sin?, Equation 3.65 can besimplified tothe following: x(t) = xss ?1-? 1-?2 e-at sin(?t ? +?) , where a=??n, ? = ?n ?1-?2,? =cos-1? (3.66) 3.4.3 Graphical Interpretation In the following, 3.4 Characterization of the Underdamped of the Underdamped Second-Order Second-Order Step Systems 5 Response we will plot the step response according to Equation 3.66, and characterize the step ?1e-at?? 1-?2? response in terms of the final steady-state value xss,the rise time tr, the peak time tp, the envelope functions xss , the maximumovershoot OS,the oscillation frequency ? and period T, and the settling time ts. All of these characterizations are determined by the damping ratio ?, the natural frequency ?n, and the step response steady-state value xss. The numerical example to be used for demonstration is based on ? = 0.2, ?n = 3 rad/s, and xss = 5. 1-?2and t =0,we have theinitial value 1. Initial and Final Steady-State Values: With ? = sin-1? ? 1-sin(?)?? 1-?2 =0.Italso can beseen that thefinalsteady-? x(t)=xss (1-0)=xss if a>0. ?? 1-?2,which ? ?? ?1-e-at?? 1-?2? 1-?2? from Equation 3.66, x(0) = xss state value is lim t?8 2. A Pair of Envelope Functions: Sincethe amplitude of the sinusoidalterm is e-at is decreasing with time, the step response xss waveform is confined 1+e-at and between a pair of envelope func-tions: (3.67) xss As shown in Figure 3.11, these two envelopes (in blue dotted lines) are symmetrical the x(t) = xss horizontal line. with respect to 3. Sinusoidal Oscillation Frequency and Period: The step response curve will start from x(0) = 0, and reaches x(8) = xss = 5 at steady state. The curve will swing up and down with decreasing oscillationamplitudeatfrequency ? = ?n theoscillation period is ?1-?2=2.939rad/s;hence, T = 2p/? 4. Valleys and Peaks of the Decaying Sinusoidal = 2.138s (3.68) Curve: The valleys and peaks (local minimums and maximums) ofthestep response willoccur att =0.5kT, k=0,2,4,and t =0.5kT, k=1,3,5,, respectively. The valley values arex(0.5kT) =xss(1 -e-0.5kaT) while thepeak values are x(0.5kT) =xss(1 +e-0.5kaT). Hence, thevalleys att =0,T,2T,3T, arex(0)=0,x(T)= x(2.138) =3.61, x(2T)=x(4.276) =4.62, x(3T)=x(6.414) =4.89,, respectively and the peaks att =0.5T, 1.5T, 2.5T, 3.5T,are x(0.5T) =x(1.069) =7.63, x(1.5T) =x(3.207) =5.73, x(2.5T) =x(5.345) =5.2, x(3.5T) =x(7.483) =5.06,, respectively. These valleys and peaks are marked as pink dots onthe graph. Notethat the valleys and peaksin general are not on the pair of envelopes defined by Equation 3.67. 5. Peak Timetp: Peaktime is the time whenthe maximumovershootoccurs. Althoughthe amplitude of the sinusoidal term is decreasing, the local period T = 2p/?. global maximum, Since the first maximums minimums still = 0, the first occur according to the maximum, which is also the will occur at tp = T/2 = p/? The peak time and minimum occurs at t can also be found by searching = 1.069s the time at (3.69) which the first derivative of x(t) with respect to t is zero. By setting?x(t) equal to zero, wehave ? ?? ?? x?(t)= -xss 1-?2 d dt e-at sin(?t +?) ? =0 (3.70) which will lead to ?cos(?t +?)-asin(?t +?)=0,and therefore we have thefollowing: 60 3 Linear Systems Analysis II tan(?t +?) = ?1-?2 ? = a ? =tan? (3.71) This equations holds only at?t=kp,k =0,1,2,. The firstpeak occurs atk =1;hence, thepeak time is tp = p/?, whichis exactlythe sameas Equation 3.69. Fig. 3.11: Graphical interpretation The typical following % CSD second-order system of the typical second-order system step response. step response shown in Figure 3.11 is obtained using the MATLAB code: Fig3.11 Typical x_ss=5, ze=0.2, den=[1 2*ze*wn wn=3, wn2], 2nd-order system alpha=ze*wn, step response w=wn*sqrt(1-ze2), t=linspace(0,8,800+1); num=x_ss*wn2, x=step(num,den,t); x_envelope_down=5*(1-(1/sqrt(1-ze2))*exp(-ze*wn.*t)); x_envelope_up=5*(1+(1/sqrt(1-ze2))*exp(-ze*wn.*t)); figure(1), plot(t,x,'r',t,x_envelope_down,'b--',t,x_envelope_up,'b--'), grid minor, xlabel('Time, grid, sec'), ylabel('Step Response'), legend('x(t)','Envelope') ? 6. Maximum Overshoot OS:Since sin(p+?)=-sin?=- 1-?2, thevalue ofx(t)atpwillbe x(tp) = xss ?1-? 1-?2 e-atp That meansthe step response overshoots sin(p+?) ? =xss? 1+e-??ntp ? = 7.633 over the steady-state (3.72) value xss = 5 by 2.633. The maximum overshoot usually is measuredas percentage of its steady-state value, xss;therefore, the maximum overshoot can be computed from either one of the following two formulas 3.5 OS =e-?p/ Analysis and v1-?2 = 0.5266 Design of a MassDamperSpring System 61 = 52.66% (3.73) ?xss ?5 =0.5266 OS=(xR(tp)-xss) =(7.633-5) =52.66% It can be seen from this equation that the maximum overshoot is solely determined by the damping ratio ?. In many applications like system identification or control system design, we may need to compute the damping ratio ? based on a given information of the maximum overshoot. It can be obtained as follows: ? ? 1-?2 ? tan?= -ln(OS) ? ?=cos -ln(OS) ln(OS) =? ?1-?2? ? -ln(0.5266) ? p -p? tan-1 Notethat the geometrical relationships between ? and ?, tan? = p ?, and cos? (3.74) = ?, were employed in the proof of Equation 3.74. For verification, the damping ratio corresponding to OS = 0.5266 is computed as follows: p ? =cos tan-1 =cos78.46? = 0.2 (3.75) 7. Rise Time tr: Therise time usually is defined asthe time a step response needsto rise from 10% to 90% of its desired steady-state value, xss. However,for the underdamped case,it is more meaningful to define the rise time asthe time required to rise from 0to xss(i.e., the smallest t so that x(t) = xss). leads to?n? 1-?2tr+?=p. ?1-?2tr+?)=0,which p-cos-1 ? 1-?2=0.603 tr= ? s Basedonthis definition, wehavesin(?n Hence,the rise time is (3.76) ?n 8.Settling Time ts:The settling time tsisdefined asthetime atwhich thestep response is within 2% ?? 1-?2=0.02, which leads to ? ?1-?2? of the steady-state value xss.It can be computed via the amplitude of the sinusoidal term in Equation 3.66, e-??nts ts = -ln 0.02 = 6.55 s ??n (3.77) Ifapproximation isallowed, this can be ts-ln0.02 (??n) 4(??n) =6.52 s?. In cthat ase the ? ? 2%error isrelaxed to 5%,thesettling timewould bets -ln0.05? (??n) 3 (??n)=5.0s. 3.5 Analysis and Designof a MassDamperSpring System In this section, we will analyze how the mass, damper, and spring affect the behavior of the massdamperspring (MBK) system in Figure 3.1(a) and then consider how to choose appropriate values of mass,friction coefficient, and spring constant, so that the system has a desired performance. For ease of reference, the schematic diagram of the massdamperspring system is repeated in Figure 3.12. The transfer function corresponding to the governing differential equation of the massdamperspring system in Equation 3.8 is (1/K)(K/M) Y(s) Fa(s) = s2 +(B/M)s+(K/M) (3.78 62 3 Linear Systems Analysis II Fig. 3.12: Comparing this transfer function A massdamperspring system. with the typical second-order system transfer function in Equation 3.12, we havethe dampingratio ?,the natural frequency ?n, andthe steady-statestep responseyssas follows: ? = 0.5B/ v MK, ? ?n = K/M, (3.79) yss = 1/K In the following, we would like to know how the friction coefficient B,the spring constant K, and the mass M,individually affect the step response of the system. First, we would let M = 1 kg and K = 1 N/m and observe how the step response of the system varies with the change of the damper friction coefficient B = 3, 2, 1.414, 1, 0.5 Ns/m. As it can be seen from Equation 3.79 and Fig-ure 3.13,the variation of the friction coefficient B does not affect the natural frequency ?n, whichis ?n = K/M= 1rad/s. However,the dampingratio ? will change with B = 3, 2, 1.414, 1, 0.5 Ns/m, v to ? =1.5,1, 0.707,0.5, 0.25,respectively.WhenB =3 Ns/m,the polesare onthe negativereal axis of thecomplex plane ats =-2.618 and s =-0.382, and thecorresponding step response isoverdamped with ? = 1.5 and ?n = 1rad/s. As B decreases,the two poles will movetoward each other and coincide together ats =-1onthecomplex plane when B=2Ns/m and thecorresponding step response is critically damped with ? = 1 and ?n = 1rad/s. The following MATLAB program damping shown in Figure 3.13: % CSD ratio Fig3.13 clear, Effect t=0:.1:20; of is employed varying to plot the damping M=1, B=0.5, G1=tf(num1,den1), M=1, B=1, G2=tf(num2,den2), M=1, B=1.414, G3=tf(num3,den3), M=1, B=2, K=1,num4=K/M, G4=tf(num4,den4), M=1, B=3, K=1, G5=tf(num5,den5), x1=step(G1,t); x4=step(G4,t); x5=step(G5,t); K=1, K=1, MBK system step responses ratio on num1=K/M, num2=K/M, K=1, MBK num3=K/M, B/M den5=[1 x2=step(G2,t); K/M], K/M], den3=[1 den4=[1 responses B/M den2=[1 num5=K/M, step den1=[1 B/M B/M with varying K/M], K/M], B/M K/M], x3=step(G3,t); figure(35), plot(t,x1,'b.',t,x2,'m-',t,x3,'g-',t,x4,'k-',t,x5,'r--'), grid, legend grid minor, xlabel('Time, sec'), ylabel('Step Response'), ('B=0.5','B=1','B=1.414','B=2','B=3') Asthe friction coefficient Bfurther decreases, the two identical poles will split to become a pair of complex conjugate poles moving along the circle with radius equal to ?n = 1 centering at the , andthe corresponding origin. When B=1.414 Ns/m, thepoles are ats =-0.707 j0.707 =1ej135? step responseis underdamped with ? = 0.707 and ?n = 1rad/s. Asthe friction coefficient drops to which is B=1Ns/m, thepoles areats =-0.5j0.866 =1ej120? closer to the imaginary and the corresponding step responseis moreunderdamped with ? = 0.5 and ?n = 1 rad/s. , and the corresponding B=0.5Ns/m, thepoles are ast =-0.25j0.968 =1ej104.5? axis, When step response is oscillation frequenc ?1-?2rad/s,thestepresponse even moreunderdamped with ? = 0.25 and ?n = 1rad/s, which hasoscillations with high overshoot. Sincethe oscillation frequency is ? = ?n 3.5 Analysis and Design of a MassDamperSpring System 63 Fig. 3.13: Theeffect ofthe dampingratio ? onthe stepresponseand polelocations ofthe massdamperspring system whilethe naturalfrequencyremainsthe sameat ?n = 1rad/s. will increase as the damping ratio decreases and, therefore, asshown in Figure 3.13, the oscillation frequency of the step responses becomes higher as the damping ratio decreases. Now wehaveobservedhowthe stepresponseand polelocations vary withthe dampingratio ? while the natural frequency remains at ?n = 1 rad/s, as shown in Figure 3.13. Next, we would like to observe how the natural frequency ?n affects the pole locations andthe step response while keeping the damping ratio at ? = 0.707. As discussed, for the case with M = 1 kg, K = 1 N/m and B = 1.414 Ns/m, the , andthe step response is underdamped with ? = 0.707 and ?n = 1 rad/s, as shown in both Figure 3.13 and Figure 3.14. If the massand the friction coefficient poles areast =-0.707 j0.707 =1ej135? are changedto M = 4 kg and B = 2.828 Ns/m, respectively,then the naturalfrequency will reduceto while keeping the ?n=0.5 rad/s and thepole location willchange to -0.354j0.354 =0.5ej135? damping ratio at ? = 0.707. Notethat the step response with the smaller natural frequency is shown in Figure 3.14in blue, which has a much slower rise time ?n = 1 rad/s. and a slower oscillation frequency than the step response in Onthe other hand, the massand the friction coefficient can be changed to black with M = 0.25 kg and B = 0.707 Ns/m, respectively,to increasethe natural frequencyto ?n = 2 rad/s and changethe pole location to -1.414j1.414 =2ej135? while keeping the damping ratio at ? = 0.707. The step response corresponding to the increased natural frequency ?n = 2 rad/s is shown in Figure 3.14in red, which has afaster rise time and a higher oscillation frequency than the step response in black with ?n = 1 rad/s. The following MATLAB program is employed to plot the typical with varying natural frequency shown in Figure 3.14: % CSD_Fig3.14 clear, Effect of varying natural ze=0.707, wn=0.5, G1=tf(num1,den1), ze=0.707, wn=1, G2=tf(num2,den2), ze=0.707, wn=2, G3=tf(num3,den3), x1=step(G1,t); figure(36), xlabel('Time, legend t=0:.1:20; frequency num1=wn2, ylabel('Step ('\omega_n=0.5','\omega_n=1','\omega_n=2' step den1=[1 system step re-sponses response 2*ze*wn wn2], num2=wn2, den2=[1 2*ze*wn wn2], num3=wn2, den3=[1 2*ze*wn wn2], x2=step(G2,t); plot(t,x1,'b-',t,x2,'k-',t,x3,'r-'), sec'), on second-order x3=step(G3,t); grid, Response'), grid minor, 64 3 Fig. 3.14: Linear Systems The effect Analysis II of the natural frequency on the step response and pole locations of the massdamperspring system while the damping ratio remains the same at ? = 0.707. 3.6 Analysis and Designof a Simple DC Motor Position Control System As described in the beginning (MBK) of Section 3.1, there is a mathematical system, the resistorinductorcapacitor (RLC) equivalence among the system, and the massdamperspring DC motor posi-tion control system. Like the MBK mechanical system and the RLC electrical system, the DC motor electromechanical position control system is also governed bythe typical second-order system differen-tial equation. In this section, we will design a simple proportional controller to achieve a desired position control for a DC motor system. Considerthe block diagram of the DC motor position control system shown in Figure 3.1(c), which for ease of reference is repeated here in Figure 3.15. Fig. 3.15: Design of a proportional controller Kfor the DC motor position control system. As given in Equation 3.5, the transfer function of the closed-loop system is T(s) TR(s) and therefore the characteristic KG(s) = 1+KG(s) bK = s2 +as+bK (3.80 equation is s2 +as+bK =0 (3.81) The behavior of the closed-loop system is mainly determined bythe closed-loop system poles, which are the roots of this characteristic equationor, more specifically, bythe corresponding damping ratio and natural frequency. By comparing this characteristic equation to the typical second-order charac-teristic equation, s2 +2??ns +?2 n = 0, it can be easily seenthat the damping ratio ? and natural frequency ?n arefunctions ofthe proportional controller parameter K asfollows: ? = 0.5a ?v bK 3.6 and ?n = Analysis and Design of a Simple DC Motor Position Control System 65 bK. Increasing K will enlarge the natural frequency ?n and reduce the damping ra-v tio at the same time, as shown in Table 3.1. As explained and demonstrated in Sections 3.4 and 3.5, the increase of ?n will bump upthe step response by increasing the oscillation frequency according to ? = ?n damping ratio ? may also lead toafaster step response, but itcertainly will ?1-?2.Asmaller cause larger overshoot and oscillations. Table 3.1: The effect of K on ?, ?n, andthe closed-loop system performance K ? ?n,rad/s 0.5 1.414 1 -0.293, -1.707 0.707 1 Overshoot ? = ?n Poles 1 -1, -1 2 0.7071.414 -1 j = v2e j135? v3 = 2ej120? 4 0.5 2 -1 j 16 The following responses % CSD clear, a=2, ?1-?2 overdamped 0 critically damped 5% 1 rad/s 16% 1.732 rad/s 45% -1 j3.87=4e j104.5? 3.75 MATLAB program is employed to plot the DC motor position control system step with varying Fig3.16 4 0.25 0 control Effect b=1, of parameter varying t=0:.05:10; Kshown K on K=0.5, in DC Figure motor num1=b*K, 3.16: position den1=[1 control a b*K], G1=tf(num1,den1), x1=step(G1,t); K=1, num2=b*K, den2=[1 a b*K], G2=tf(num2,den2), x2=step(G2,t); K=2, num3=b*K, den3=[1 a b*K], G3=tf(num3,den3), x3=step(G3,t); K=4, num4=b*K, den4=[1 a G4=tf(num4,den4), x4=step(G4,t); K=16, G5=tf(num5,den5), x5=step(G5,t); figure(37), num5=b*K, den5=[1 plot(t,x5,'b.',t,x4,'m-',t,x3,'g-',t,x2,'k-',t,x1,'r--'), grid minor, xlabel('Time, b*K], a b*K], grid, sec'), ylabel('Step Response'), legend('K=16','K=4','K=2','K=1','K=0.5') Fig. 3.16: Stepresponses and polelocations of the DC motor position control system withfive different proportional controllers 66 3 Linear Systems Without loss Analysis II of generality we assume a = 2 and b = 1 in the following for ease of demonstration. Then the characteristic equation of the closed-loop system becomes s2 +2s+K = 0, and the damping ratio and natural frequency would be ? = 1/ K and ?n = K. When K = 0.5, in Figure 3.16, wecan v see how the variations the pole locations, of the controller gain and the step response. v K would affect the damping ratio, the natural frequency, Note that the results in Figure 3.16, associated with K = 0.5, arecfrequency olored inred. Itisclear that thetwopoles are at-1.707 and-0.293. The damping ratio and nat-ural are ? = 1.414 and ?n = 0.707 rad/s, respectively, and the step response is overdamped. Similarly the results associated with K = 1,2,4,16 are in black, green, purple, and blue, respectively. When K = 1, ? = 1, the system is critically damped. The K = 2,4,16 cases are underdamped 0.707, 0.5, and 0.25 damping ratios, respectively. with The performance results associated withthe five simple controller designs are also tabulated in Table 3.1. It is clear that overshoot. both extremes The better choice are either too of Kis between overdamped K = 1 and or underdamped with large oscillation and K = 2 where the overshoot is less than 5% and the rise time is acceptable. 3.7 Steady-State Sinusoidal Responseand Bode Plot of Typical Second-Order Systems As discussed in Section 2.5.3, particularly in Theorem 2.32 and Corollary 2.33, the steady-state sinu-soidal response can be obtained simply rather than solving for the complete by computing solution the magnitude and the phase of a complex of a differential equation. Although presented in number Chapter 2 wherethe mainemphasis wasin the first-order systems, Theorem 2.32 and Corollary 2.33 are also valid for higher-order systems as long as the system transfer function has no poles on the imagi-nary axis or in the right half of the complex plane. To recap, Figure 2.9 withthe essence of Corollary 2.33 is shown in Figure 3.17. Now,let G(s) bethe transfer function of the typical second-order system, G(s) = and the input be u(t) =sin?t. xss?2 n s2 +2??ns+?2 (3.82) n Thenthe steady-state output response will be yss(t) = A(?) sin (?t +?(?)) where A(?)=|G(j?)|and ?(?)=?G( j?)are themagnitude and thephase ofG( j?),respectively. Notethat G(j?) is ajust a constantcomplex numberif the frequency ?is aconstantreal number. How-ever, if the sinusoidal input frequency ? is changing, the amplitude and the phase of the steady-state output response will change accordingly. Withs replaced by j? in Equation 3.82, wehave G(j?) asfollows: G(j?) Let ? = xss j?) =A(?)e j?(?) 1-(?/?n)2 +j2?(?/?n)=|G(j?)|?G( (3.83) = ?/?n bethe normalized frequency, then Equation 3.83 becomes G(j?) = xss j?) =A( ?)ej?( ?) 1-?2 +j2? ? =|G(j?)|?G( The magnitudeandthe phaseof G(j?) will be (3.84 3.7 Steady-State Sinusoidal Response and Bode Plot of Typical Second-Order Systems 67 Fig. 3.17: Efficient way of computing the sinusoidal steady-state response yss(t). when ??1 ? ?? A( ?) =|G(j?)| =xss (1-?2)2+4?2 ?2 =???xss when ??1 ??? ?( ?)=?G( j?)=-tan-1 ?2??/(1-?2) xss/2? when ? =1 (3.85 xss/?2 ? The Bode plot of G(j?) with xss = 1 and six damping ratio values ? = 0.05, 0.1, 0.5, 0.7, 1, 1.5, are shown in Figure 3.18. It can be seen that these plots are very different from the Bode plot of the first-order systems.The maindifference occurs when ? = ?/?n = 1 orthe sinusoidalinput frequency ? equalsthe naturalfrequency ofthe system, ?n. The magnitudeof G(j?n) can becomevery large if the damping ratio is approaching to zero. This phenomenon is called resonance. Example 3.12 (Sinusoidal Response Example with ? = 0.05, ?n = 4 rad/s and xss = 1) Given the transfer function G(s) = xss?2 n s2 +2??ns+?2 = n 16 s2 (3.86) +0.4s+16 Find the three steady-state sinusoidal responses of the system respectively driven bythe following control-input signals: u(t) = sin0.4t, u(t) = sin4t, u(t) = sin40t. three Solution: Thesystem shown in Equation 3.86is atypical second-order system withthe damping ratio ? = 0.05, natural frequency ?n = 4rad/s, and steady-state step response gain xss = 1. The normalized magnitude and phase response graphs (i.e., the Bode plot) of the system, A( ?) and ?(?), are shown in Figure 3.18. These graphs reveal that the magnitude A( ?) and the phase ?(?) at the normalized frequencies ? = 0.1, ? = 1, and? = 10 are: A?0dB=1, ??0? when ? = 0.1 or ? = 0.4rad/s A=20dB =10,? =-90? when ? = 1 or ? = 4 rad/s A?-40dB =0.01, ? ?-180? when ? = 10 or ? = 40rad/s Therefore, the steady-state u(t) = sin0.4t, u(t) responses of the system =sin4t, and u(t) yss(t) = sin0.4t given in Equation 3.86 due to the sinusoidal (3.87) inputs: = sin40t, are found respectively in the following: when ? = 0.4rad/s yss(t) =10sin(4t -90?) when ? yss(t) =0.01sin(40t -180?) when = 4rad/s ? = 40 rad/s (3.88) 68 3 Linear Systems Analysis II Fig. 3.18: The Bodeplot of the typical second-ordersystems with varying ?. The following MATLAB program is employed to plot the Bode plot of the typical systems with varying ? shown in Figure 3.18: % CSD_Fig3.18 % typical Effect of 2nd-order varying damping ratio on Bode plot second-order of systems w=logspace(-1,1,300); num=1; ze=0.05, den=[1 2*ze 1]; [mag,p1]=bode(num,den,w); m1=20*log10(mag); ze=0.1, den=[1 2*ze 1]; [mag,p2]=bode(num,den,w); m2=20*log10(mag); ze=0.5, den=[1 2*ze 1]; [mag,p3]=bode(num,den,w); m3=20*log10(mag); ze=0.7, den=[1 2*ze [mag,p4]=bode(num,den,w); m4=20*log10(mag); ze=1, [mag,p5]=bode(num,den,w); m5=20*log10(mag); ze=1.5, [mag,p6]=bode(num,den,w); m6=20*log10(mag); figure(1) den=[1 den=[1 2*ze 2*ze 1]; 1]; 1]; semilogx(w,m1,'b-',w,m2,'b.',w,m3,'m-',w,m4,'r-',w,m5,'k-',w,m6,'g.'), grid, grid minor, legend('\varsigma=0.05','\varsigma=0.1','\varsigma=0.5',... '\varsigma=0.7','\varsigma=1','\varsigma=1.5'), title('Magnitude response in dB'), figure(2) semilogx(w,p1,'b-',w,p2,'b.',w,p3,'m-',w,p4,'r-',w,p5,'k-',w,p6,'g.'), grid, grid minor, legend('\varsigma=0.05','\varsigma=0.1','\varsigma=0.5',... '\varsigma=0.7', title('Phase '\varsigma=1','\varsigma=1.5'), response in deg') Remark 3.13 (Resonance) For a system with a small damping ratio like the onein the previous example, ? = 0.05, the vibration amplitude of the system due to a disturbance input with frequency at the natural frequency ?n will be 10 times of the input amplitude. The vibrations near the natural frequency of a system with small damping ratio can be very damaging; the collapse of the Tacoma Narrows Bridge in 1940 is a notorious example 3.8 Exercise Problems 6 3.8 Exercise Problems P3.1a: Consider Equation 3.1, whichis the governing differential equation of the massdamperspring system (the MBK system) shown in Figure 3.12 (or Figure 3.1(a)). spring constant is K = 1.6 N/m, and the damper friction coefficient Assume the massis M= 0.1 kg, the B = 0.4 Ns/m. Then the governing equation of the system is given by y(t)+4 where y(t) and fa(t) ?y(t)+16y(t) = 10 fa(t) (3.89) are the displacement (m) of the massand the external force (N) applied to the mass, respectively. Findthe transfer function Y(s)/Fa(s), the poles,the dampingratio ?,andthe natural frequency ?n of the system. P3.1b: Assumezero initial conditions (y(0) 0.1us(t) = 0 m,?y(0) = 0 m/s) and let the input be fa(t) N, where us(t) is the unit step function. P3.1c: Use MATLAB command Solve and plot y(t), the solution of Equation = 3.89. step to plot the step response of the system and verify your result in P3.1b. P3.1d: Explain how the poles,the damping ratio ?, and the natural frequency ?n affect the step response you obtained in P3.1b. P3.2a: Considerthe same massdamperspring system (MBK system) shown in Problem P3.1a. Assume the external applied force is zero, fa(t) = 0. Thenthe differential equation becomes, y(t)+4 ?y(t)+16y(t) =0 Let the initial conditions bey(0)=0.01 m?y(0) , =0 m/s. Solve and plot y(t)fort =0. P3.2b: If the damper friction equation will become coefficient Bis increased from 0.4 Ns/mto 1 Ns/m, then the differential y(t)+10 ?y(t)+16y(t) =0 Findthe poles,the dampingratio ?, andthe naturalfrequency ?n ofthe system. Lettheinitial conditions bey(0)=0.01 m?y(0) , =0 m/s. Solve and plot y(t)fort =0. P3.2c: Consider a special case with no damping, B = 0. In this case,the differential equation becomes, y(t)+16y(t) =0 Let the initial conditions bethesame: y(0)=0.01 m ?y(0) , =0 m/s. Solve and plot y(t)fort =0. P3.3a: Consider a massdamperspring system with the same mass Mandidentical spring constant K as those in P3.1a whilethe damper friction coefficient is changed to B = 0.08 Ns/m. Thenthe differential equation of the system is, y(t)+0.8 ?y(t)+16y(t) = 10 fa(t) Findthe transfer function Y(s)/Fa(s), the poles,the dampingratio ?, andthe naturalfrequency ?n of the system. P3.3b: Consider the same system asthe onein P3.3a. Drawthe Bode plot of the system with asymptotes on the magnitude response graph and the corner frequency ?c on both of the magnitude response and 70 3 Linear Systems the phase response Analysis II graphs. P3.3c: Findthe magnitudeand phaseofthe systemY(s)/Fa(s), atthe following frequencies: ?= 0.1?c, ? = ?c, and ? = 10?c, respectively. P3.3d: Find and plot the steady-stateresponseyss(t) of the system dueto eachof the following inputs: (i) fa(t) =sin(0.1?ct), (ii) fa(t) =sin(?ct), and(iii) fa(t) =sin(10?ct), respectively. P3.3e: Comment on the frequency-domain behavior of the typical second-order system based on the results obtained in P3.3d. P3.4a: Consider a system with transfer function, ?2 n Y(s) G(s) = U(s) = s2 +2??ns+?2n where Y(s) and U(s) are the Laplace transforms of the output y(t) andthe input u(t), respectively. Let the damping ratio and the natural frequency be ? = 0.6 and ?n = 1rad/s, respectively, and assumethe input u(t) = us(t), the unit step function. Then Y(s) can be expressed as Y(s) = Find y(t), the inverse Laplacetransform 1 s(s2 +1.2s+1) ofY(s), and plot it using the MATLAB command plot. P3.4b: Repeat Problem P3.4a for (i) ? = 1, (ii) ? = 1.4, and(iii) ? = 0.2, respectively, and compare the rise time, overshoot, and settling time of the four time responses including the one from P3.4a. P3.4c: Repeat Problem P3.4a for ?n = 2 rad/s, and compare the rise time, overshoot, and settling time of the two time responses. P3.5a: Consider a system with transfer function G1(s) = Y(s) U(s) = ?2 n s2 +2??ns+?2n Let ? = 0.6, ?n = 1rad/s. Usethe MATLAB command step to plot the stepresponseofthe system. P3.5b: Repeat P3.5a forthesystem modified byadding aLHP zero ats =-1: G2(s) = Comment on how the adding Y(s) U(s) = ?2 n(s+1 s2 +2??ns+?2 LHP zero affects the rise time, n overshoot, and settling time. P3.5c: Repeat P3.5afor the system modified by adding a RHP zero at s = 1: G3(s) = Y(s) U(s) = -?2 n(s-1) s2 +2??ns+?2n Comment on how the adding RHP zero affects the rise time, overshoot, and settling time. 3.8 P3.6a: Consider a system with transfer Exercise Problems 7 function X(s) R(s) 4 = G(s) = s2 +3s+2 and let r(t) and x(t) bethe inverse Laplace transforms of R(s) and X(s), respectively. Find the differen-tial equation corresponding to the transfer function G(s). P3.6b: Find the characteristic equation and the poles of the system. P3.6c: Find the damping ratio ?, the natural frequency ?n, andthe steady-state step response xssof the system. P3.6d: Is the system overdamped? critically damped? underdamped? or undamped? P3.6e: Assumethe initial conditions x(0) = 0 and?x(0) Find the output response x(t). = 0, and let the input r(t) be a unit step function. P3.6f: Plot the constant term, the two exponential terms of x(t) and the sum of these three terms versus t on the same graph. Discuss how these two exponential terms relate to the system poles, and how the constant term relates to xss. P3.7a: Consider a system with transfer function X(s) R(s) = G(s) = 20 s2 +2s+10 and let r(t) and x(t) bethe inverse Laplacetransform of R(s) and X(s), respectively. Find the differen-tial equation corresponding to the transfer function G(s). P3.7b: Find the characteristic equation and the poles of the system. P3.7c: Find the damping ratio ?, the natural frequency ?n, andthe steady-state step response xssof the system. P3.7d: Is the system overdamped? critically damped? underdamped? or undamped? P3.7e: Assumetheinitial conditions x(0) = 0 and?x(0) = 0,andlet theinput r(t) bea unit stepfunction. Find the output response x(t). P3.7f: Plot the constant term, the decaying sinusoidal term of x(t) andthe sum of these two terms versus t onthe same graph. Discuss how the decaying sinusoidal term relates to the system poles, and how the constant term relates to xss. P3.8a: Consider a system with transfer function X(s) R(s) = G(s) = xss?2 n s2 +2??ns+?2n where0 < ? < 1. Letr(t) and x(t) bethe inverse Laplacetransforms of R(s) and X(s),respectively. Assume r(t) is a unit step function, and the step response of the system can be found as, 72 3 x(t) Linear Systems = xss Analysis II ? 1-?2 1-? e-at sin(?t +?) ? , where a=??n, ? = ?n ?1-?2,? =cos-1? (3.90) Let ? = 0.4, ?n = 1rad/s, xss = 1. Findthe differential equation correspondingto the transfer function G(s). P3.8b: Find the characteristic equation and the poles of the system. P3.8c: Assumethe initial conditions x(0) = 0 and?x(0) Find the output response x(t) using Equation 3.90. = 0, and let the input r(t) be a unit step function. P3.8d: Verifythe value x(0) = 0 and?x(0) = 0 usingthe result of P3.8c,lim x(t) and limx ?(t). t?0 P3.8e: Verify the steady-state step response lim x(t), which should be xss. t?8 P3.8f: Computethe sinusoidal oscillation frequency t? ? = ?n step response x(t). ?1-?2andtheperiodT=2p/?ofthe P3.8g: Computethe peaktime tp = p/? at whichthe maximumovershootoccurs. Notethat tp is half of the period T. ) for P3.8h: Compute the valuesof x(ktp) =xss(1+e-aktp)fork =1,3,5 andx(ktp)=xss(1-e-aktp k = 2,4,6. These values provide the information step response x(t). P3.8i: Usethe above information graph x(t) versus t. regarding the locations of the peaks and valleys of the obtained from the results of P3.8d, e, f, g, hto construct the step re-sponse P3.8j: Verify the step response graph using P3.8c. MATLAB command plot to plot the x(t) obtained in P3.8k: Usethe above step response graph x(t) to compute the maximum overshoot according to the following formula: OS=(x(tp)-xss)/xss. P3.8l: Usethe formula OS = e-?p/ result of P3.8k. v1-?2 to compute the maximum overshoot, and verify it with the 4 Modelingof MechanicalSystems I Nthe previous two chapters wehave employed some simple physical systems: mass-friction system, RClow-pass filter, DC motor, massdamperspring system, resisterinductorcapacitor circuit, and motor position control system, to demonstrate fundamental systems and control concept, analy-sis, and design. It is clear that a meaningful control system design begins with a trustworthy dynamics model of the physical system to be controlled. In this chapter, we will focus on the dynamics model-ing of fundamental translational and rotational mechanical systems using the Newtonian approach and the Lagrange approach. Both approaches eventually will lead to exactly the same dynamic model equa-tions. However,they have completely different road mapsto reach the same destination. The Newtonian approach involves the geometry and vector relationship of each component in the mechanical sys-tem. On the other the potential hand, the energy, the Lagrange power approach dissipation, only needs the information and the external forces, of the but it requires kinetic energy, differential cal-culus computations. Both have advantages and disadvantages, but interestingly they complement each other perfectly: the disadvantage of one is the advantage of the other, and vice versa. The Newtonian approach is moreintu-itive, providing clear picture process can be tedious, of the interactions especially for larger among components multi-body systems. inside the system, but the modeling Conversely, the Lagrange approach is moreelegant without the needto worry about the directions of vectors and detailed interconnection of components, but it allows virtually no insight of the interactions among components within the system. The Lagrange approach is not included in mostof the undergraduate control and dynamics textbooks. Part of the reasons approach together more learning may be due to its lack with the hours. Newtonian We will apply of intuitiveness approach and insight. Actually, learning will be more effective, both approaches to almost all the Lagrange and will not necessarily require mechanical systems in this chapter so that the students can learn both approaches together and compare their results. It is easy, especially for the beginners, to miss hidden reaction It is also very possible to forces or commit misssome energy and power sign errors using the dissipation terms Newtonian or commit differential approach. calculus computation errors using the Lagrange approach. However, it is rare for these two approaches to have same errors in their end results. Hence, employing both approaches for system modeling not only enables the students to understand the system better from two different prospectives, but also provides additional assurance on modeling correctness. 4.1 Translational MechanicalSystems To analyze the behavior or to obtain a mathematical model of a translational first step is to understand the force-velocity or the force-displacement mechanical system, the relationship of the three fun 74 4 damental Modeling of Mechanical translational Systems mechanical elementsdamper, spring, and mass. As shown in Figure 4.1, the force-velocity relationship ofthedamper isffri =-Bv=-B ?x, in which thenegative signmeans that the viscous friction f, velocity and force is always in the opposite v, displacement Ns/m, respectively. x, and friction direction coefficient The force-displacement of the velocity. B are Newton (N), relationship The units for the force meter/sec (m/s), of the spring is described meter (m), by Hookes law, fspr=-Kx,where thespring force isproportional tothemagnitude ofthedisplacement but itsdirection is in the opposite direction The force-velocity of the displacement. The unit of the spring or the force-displacement relationship of the constant Kis massis described N/m. by Newtons sec-ond lawof motion, fnet= M ?v=M x = -fine, where fnet and fine are thephysical net force and the Mis kilogram (kg). Notethat the physical net inertial force, respectively. The unit of the massor inertia force needsto havethe same magnitude of the inertial force to keep the mass M moving with acceler-ation x. The magnitude of the inertial force is proportional to the acceleration. Strictly speaking, the inertial force is not a physical force. It is even called asfictitious force in some dynamics books, yet it plays an essential role leading to the key concept of the famous dAlemberts principle, which will be addressed in the next subsection. The characteristics of these three translational elements are summarized in Figure 4.1. Fig. 4.1: Basictranslational 4.1.1 dAlemberts mechanical system mechanical system elements. Principle Recall that in the beginning of Chapter 3, we considered a simple massdamperspring mechanical system, which is shown again here on the left-hand side of Figure 4.2. The mathematical model of this simple mechanical system can be derived based on Newtons second law of motion, fnet = x, M where fnetis the net physical force, Mis the massorinertia, andx is the acceleration, which welearned from physics courses in high school. For the simple MBK system shown in Figure 4.2, fnet is the physical net force applied to the mass M, whichis the algebraic sum of the applied force fa(t), the spring force -Kx(t),and thedamper friction force-B ?x(t),andtherefore wehave thefollowing: fnet=fa +(-B ?x)+(-Kx)=xM This is exactly the same governing dynamics equation of the MBK system (4.1) we had in Equation 3.1 4.1 Fig. 4.2: Asimple The direct simple massdamperspring Newtons systems, but f = (MBK) Ma method will become Translational Mechanical Systems system and the associated free-body of assembling more confusing and the equation difficult to of motion manage for 75 diagram. works well for complicated multi-body systems. In a multi-body system, its subsystems may be interconnected each other to con-strain relative motions in a complicated way. This disadvantage can be eliminated by employing dAlemberts principle that allows the system to be systematically partitioned into several isolated free bodies to make it easier to assemble the equations times acceleration, of acceleration. of motion. x, M as simply another force called the inertial Theorem 4.1 (dAlemberts Assume all the inertial The central idea is to consider the mass force that acts opposite to the direction Principle) forces and physical forces in the system are considered. Then the algebraic sum ofall forces acting at any point in the system is zero. fsum =? fi =0 (4.2) i Notethat this principle can be applied in each admissible direction of motion. The significance of dAlemberts principle is far greater than a simple depth by Lanczos [Lanczos, For example, the algebraic Min the sum of the forces MBK system shown in directions restatement of Newtons second law, as explained Figure acting onto a point between the spring 4.2 is zero since the two forces on this with equal magnitude of Kx. For another example, if the term from the right-hand in 1970]. side of the equation to the left-hand point K and the xM in Equation 4.1 is side, the equation mass are in opposite moved will become the following: fa +(-B ?x)+(-Kx)+(-M x) =0 (4.3) This equation fulfills dAlemberts principle iftheterm-M x isconsidered asaforce. Equation 4.3 is mathematically equivalent to Equation 4.1, which was derived from the well-known Newtons second law of motion, but the significance of dAlemberts principle is more than just a restatement of Newtons laws of motion. It provides an important dynamic equilibrium concept that allows complicated multi-body system dynamics to be broken down into several free-body diagrams and makeit much easier to construct the dynamics modelfor mechanical systems. Remark 4.2 (Dynamic For any zero there will remain Equilibrium) mechanical system, if the algebraic would be no acceleration at rest if the initial sum of all the physical forces acting on the system is for the system, and the system is said to be at equilibrium condition of the system is at rest. Now, for the since it MBK system, the algebrai 76 4 Modeling of sum of all the three nonzero net force equilibrium Mechanical Systems physical forces, which is the net force, will keep the massin acting on the system is usually motion with the acceleration x(t); nonzero. The hence,the system is not at in the general sense of static equilibrium. However, according to Equation 4.3 or dAlemberts principle, the algebraic sum of all the four forces acting onthesystem iszero iftheinertial force term,-M x(t),isconsidered asaforce. Then the system is at an equilibrium, a special kind of equilibrium called dynamic equilibrium, for time t =0.Although x(t)may change, thealgebraic sum ofthese fourforces remains zero allthetime. The dynamic equilibrium complicated multi-body concept has madeit easier to construct the equations of motion, especially for systems. Example 4.3 (Newtonian Approach Modeling of the Simple MBK System) Considerthe massdamperspring (MBK) system in Figure 4.2, wherefa(t) is the applied force and the variable of interest is the displacement of massx(t). The origin reference (the position of x = 0) is chosen at the equilibrium condition when the spring is neither stretched nor compressed, reference of direction of motion is assumed positive if it points to the right. and the For example, a positive displacement x(t) meansthe massis at the right-hand side of the equilibrium position and a negative ve-locity ?x(t) indicates that the massis movingtowards the left. Now,the objective is to find the dynamics model of the system, which is a differential equation describing the relationship and the output x(t), using the Newtonian approach and dAlemberts between the input fa(t) principle. Solution: In general, for a complicated system, it of motion for the system. The free-body diagram is drawn mayrequire several free-body diagrams to assemble the equa-tions But for the simple MBK system, based on the schematic diagram only one free-body of the diagram is needed. MBK system shown on the left of Figure 4.2. It can be seenthat there are three physical forces acting onthe mass M. Sincethe applied force fa(t) is assumed to point to the right should be drawn on the free-body when it is positive, diagram. Note that a right directional arrow both the arrow direction with label fa(t) and the label sign arerelevant. Aleftdirectional arrow together with anegative sign label-fa(t)can also represent the applied forceonthefree-body diagram. Since both thefriction force-B ?x(t)andthespring force -Kx(t)have negative signs, theyshould berepresented byleftdirectional arrows with labels B ?x(t) and Kx(t), respectively, on the free-body diagram. Since theinertial force-M x(t)isnotaphysical force, itisrepresented byadashed-line arrow instead of a solid-line arrow on the free-body therefore, its representation on the free-body diagram. Theinertial force also has a negative sign; diagram should be a left directional dashed-line ar-row withlabel x(t). M Now, with the completed free-body diagram in Figure 4.2 and dAlemberts sum of the four forces on M should be zero, and we have the following principle, the algebraic dynamics model of the massdamperspring system: x(t)+B M ?x(t)+Kx(t) Remark 4.4 (Tips to Avoid Errors in Free-Body The key step in the make mistakes on the Newtonian =fa(t) Diagrams) approach is to draw a correct free-body magnitude of the forces, (4.4) but it takes only one force diagram. direction Students seldom or sign error in the free-body diagram to void the effort of constructing the dynamics model of the system. The first tip to avoid confusion and mistakesis to follow conventional rules if they are available. For example, th 4.1 Cartesian coordinate system with the origin located Translational at an equilibrium Mechanical position Systems can be employed 77 to serve as a reference for all vectors in the system sothat a positive horizontal vector is pointing to the right and a positive vertical vector is in the up direction. The second tip is not to have negative sign on any label so that the direction of each vector on the free-body diagram is purely 4.2, the positive determined motion direction by its arrow direction. For the is assumed to point to the right MBK system shown in and all labels Figure of the four force vectors, fa(t), B ?x(t), Kx(t), and x(t) M are with no negative sign attached to them. Therefore, the vector arrow of fa(t) points to the right, but the vector arrows of the other three forces arein the left direction. This mechanical system dynamics model construction approach is a Newtonian approach, which is mainly based on detailed geometry and interactions among the component vectors. The Lagrange ap-proach, on the other hand, is basically a scalar function approach involving energy and power functions without the need of knowing the detailed system configuration and interactions among the components. As mentionedin the beginning of this chapter, these two approaches actually complement each other very well. Learning these two approaches at the same time certainly will enhance students learn-ing experience. Both Newtonian and Lagrange approaches will be employed to derive the equations of motionfor almost every mechanical systems discussed in this chapter. 4.1.2 A Brief Introduction of the Lagrange Approach Unlike the Newtonian approach, the Lagrange approach is a scalar-and energy-based approach requiring the kinetic energy function, the potential energy functions, and the dissipated power functions. It does not need free-body diagrams, but it requires differential calculus computations in-volving the following Lagrange equation: ?? ?L d ??q dt ?D ?L - + ?q ?q = Q (4.5) In the equation, qand?q are generalizedcoordinate vector and generalizedvelocity vector,respectively. L(?q,q) representsthe Lagrangian function, whichis defined as L( ?q,q)=T( ?q,q)-U(q) (4.6) where T(?q,q) is the kinetic energy function of the system, and U(q) is the potential energy function. D( ?q) is the dissipated power function of the system, and Q is the generalized external force vector acting on the system. Example 4.5 (Lagranges Approach Modeling of the Simple MBK System) Consider the same simple MBK dynamics modeling problem shown in Example 4.3 but find the dynamics model of the system using the Lagrange approach. Solution: For the simple MBK system shown on the left-hand side of Figure 4.2, the generalized coordinate and velocity are simply x and?x. The kinetic energy of the system is stored in the massas T = 0.5M?x2, the potential energy of the system is stored in the spring as U = 0.5Kx2, and the power dissipated in the damper is D=0.5B ?x2. Hence, theLagrangian function is L=T-U=0.5M ?x2-0.5Kx2. Then the key differentials in the Lagrange equation can be found ?L ?x = ?L ?x = ) ?(0.5M ?x2-0.5Kx2 =M?x, ?x ) ?(0.5M ?x2-0.5Kx2 ?x as, ?D ?x = ?(0.5B?x2 ) ??x =-Kx, Q=fa =B ?x (4.7 78 4 Modeling of Now, from Equation d dt which is exactly Remark Mechanical 4.5, the Lagrange equation, ?? ?L ??x ?L - working ?x we have the dynamics model equation: =Q ? M x(t)+Kx(t)+B ?x(t) =fa(t) obtained using the Newtonian approach shown in (4.8) Equation 4.4. Between the Two Approaches) on the same Lagrange approaches, ?D + ?x the same as that 4.6 (Differences After Systems modeling problem of the simple we have observed some differences MBK system between the two using the Newtonian approaches. and The Newtonian approach relies onthe free-body diagram that depicts the force interactions among the components and the applied force. Onthe other hand, the of the system interact Lagrange approach with each other. Instead, does not need to know how the components it only requires the information of the kinetic energy function, the potential energy function, the power dissipation function, and the external force. These two approaches are very different, but amazingly the end results are identical. 4.1.3 A Quarter-Car A simplified of the Suspension System quarter-car suspension system is shown in Figure mass of the car body, B2is the friction coefficient 4.3. In the figure, M2represents of the shock absorber (damper), quarter K2is the spring constant of the strut, M1represents the massof the wheel, and K1is the spring constant of the tire. The displacements, x2(t), x1(t), and d(t) of the masses, M2, M1,and the tire, respectively, are measured from their equilibrium conditions. The equilibrium conditions are assumed not affected by gravity, and both springs K2 and K1 are neither stretched nor compressed. Thus,the gravity forces will be in-corporated in the free-body diagram and appear on the dynamics model.In case that the equilibrium positions are chosento offset according to the gravity effect, then the two gravity forces M1gand M2g should not appear on the free-body diagram or the dynamics model. The car is assumed moving to the right, and it may encounter uneven road conditions with dis-turbance d(t). The objective of the study here is to find the dynamics model of the system that describes how the disturbance input d(t) would affect the output variables x1(t) and x2(t). The dynamics model also can be employed to choose the desired values of the strut spring constant K2 and the damper friction coefficient B2so that the suspension system has a desired performance. Example 4.7 (Newtonian Consider the we follow the quarter-car Approach Modeling of the Quarter-Car suspension Cartesian coordinate system shown convention Suspension System) on the right-hand to choose the up direction side of Figure 4.3. as the positive Note that direction for all vectors in the system and that the displacements x1(t), x2(t), and d(t) are measuredfrom their respective equilibrium positions. Find the dynamics model of the system, describing the relationship between the input Newtonian approach and dAlemberts principle. which is a set of differential equa-tions fa(t) and the outputs x1(t) and x2(t), using the Solution: Since there free-body are two diagram masses, M1 and on the top and the M2,the free-body M1free-body Figure 4.3. There are four forces acting on the diagram is broken diagram at bottom, down into two as shown parts: the on the left-hand M2 side of mass M2and five forces acting on the mass M1. Thetwo gravitational forces ofM2 and M1always point down to the center of the Earth; hence,they are represented by the two downward arrows with labels M2g and M1g, respectively, on the top and th 4.1 bottom free-body diagrams. The inertia forces up direction, so they are represented for M2 and A quarter-car Based on dAlemberts spring K2 should suspension principle have the same M1 are opposite by the two downward M2 x2 and M1 x1 on the top and the bottom free-body Fig. 4.3: Translational Mechanical 79 to the conventional arrows, respectively, pos-itive with labels diagrams. system and the associated free-body or Newtons third Systems law of magnitude but in opposite diagram. motion, the two forces directions. at both ends of the If x2 = x1, the spring is neither stretched nor compressed, and the forces at both ends are zero. If x2 > x1, the spring will be stretched but the recoil spring force will resist the elongation of the spring. In other words, the same spring forceK2(x2 -x1)willpullM2 down andat hesame timepullupM1. Similarly, thesame friction force B2( ?x2-?x1) isresisting themotions ofM1 andM2 from increasing thegap between them. For the spring force on K1,if x1 > d, the spring will stretch and the recoil spring force at the lower end of M1 willgodownward with the labelK1(x1 -d). Now, with the completed free-body diagrams onthe left-hand side of Figure 4.3, we will obtain two differential equations by summing up the four forces on M2and the five forces on M1, M1 x-B2( ?x2-?x1)-K2(x2 -x1)+K1(x1 -d)+M1g =0 M2 x+B2( ?x2 -?x1)+K2(x2 -x1)+M2g =0 which can be rewritten in the following (4.9) matrix form: ? ????B2-B2????K1+K2-K2????? ? ? M1 0 x1 0 M2 x2 + Example 4.8 (Lagranges Consider the same -B2 B2 Approach quarter-car 4.7, but find the dynamics x?1 x?2 + -K2 K2 x1 x2 = Modeling of the Quarter-Car suspension system model of the system dynamics using the K1 0 d+ -M1 g -M2 (4.10) Suspension System) modeling Lagrange problem shown in Ex-ample approach. Solution: Forthe quarter-car suspension system shown onthe right-hand side of Figure 4.3, the generalized coor-dinate and velocity are ? x1 x2 ?T ?T and ?x?1x?2 , respectively. The kinetic energy of the system is store 80 4 in the two Modeling of Mechanical Systems 1 +M2 ?x2 2), the potential energy of the system is stored in masses M1and M2as T = 0.5(M1?x2 thesprings K1,K2and inthegravity fieldasU=0.5[K2(x2 -x1)2 +K1(x1 -d)2]+M1gx1 +M2gx2, and thepower dissipated inthedamper B2 is D=0.5B2 (?x1-?x2)2. Hence, theLagrangian function is 1 +M2 ?x2 L= T-U =0.5(M1 ?x2 2)-0.5[K2(x2 -x1)2+K1(x1 -d)2]-M1gx1 -M2gx2 (4.11) Then the key differentials in the Lagrange equation can be found as, ??B2(?x1-?x2)? ?? ? ??D?? ??L?? ?x1 ?x1 -x1)-K1(x1 -d)-M1g ? ??K2(x2-K2(x2 ??L??x1 -x1)-M2g B2( ?x1-?x2)??? -x1)-K1(x1 -d)-M1g ? ??K2(x2-K2(x2 ??-B2( ?x1-?x2) -x1)-M2g B2-B2?? ? ????-B2B2 ??K1-K2+K2-K2K2????? ?-M2? ? ?L ?x = ?L ?L ?x = ?L ? x2 ? ?x2 M1 ?x1 , M2 ?x2 = ? ?D ??x = ?D ??x2 = -B2( ?x1-?x2) , = (4.12 Q =0 Then from the Lagrange equation Equation 4.5 we have the dynamics model equation: M1 x1 M2 x2 0 - which can be rewritten in the following x1 M2 x2 + (4.13) 0 matrix form: x?1 x?2 M1 0 0 = + x1 + x2 K1 = 0 -M1 g d+ (4.14) This is exactly the same asthat obtained using the Newtonian approach shown in Equation 4.10. Remark 4.9 (Equilibrium Offset Dueto Gravity) The differential equations in Equation 4.10 or Equation 4.14 can be considered as a special case of the generalized a constant MBK system matrix equation of this form, gravitational force vector and Fd is a disturbance x+B M ?x+Kx input vector. = Fd +Fg, where Fg is Note that the equilibrium occurs atxe=K-1Fg. Define x =x-K-1Fg, then thegeneralized MBK matrix equation willbecome x+B ?x+Kx = Fdandthe equilibrium occursatxe = 0. M 4.2 Rotational MechanicalSystems As engineers, we mayencounter morerotational systems than translational systems since almost all of the translational motions are driven by rotational systems like wheels, pulleys, motors, and engines. Just like the translational mechanical system, the rotational mechanical system also has three fundamental rotational mechanical elements: rotational damper, torsional spring, and moment of inertia. Asshown in Figure 4.4, the torque-angular velocity relationship oftherotational damper istfri=-B?=-B ??,in which the negative sign angular velocity coefficient meansthat the viscous friction torque is always in the opposite direction of the ??. The unitsfor the torque t, angular velocity ?, angular displacement ?, andfriction B are Newton (N-m), radian/sec (rad/s), radian (rad), and Nms/rad,respectively. Thetorque-angular displacement relationship ofthe torsional spring isdescribed byHookes lawtspr=-K?,where the spring torque is proportional to the magnitude of the angular displacement ? but its direction is in the opposite rotation direction The unit of the torsional of the angular spring displacement relationship displacement. coefficient of the Kis Nm/rad. The torque-angular velocity or the torque-angular moment of inertia is described by Newtons second law of motion, tnet=J??=J? =-tine, where tnet and tine are thenet torque and the inertial torque, respec-tively. Note that the net torque needs to have the same magnitude of the inertial torque to move the ? . The magnitude of the inertial torque is proportional to the angular acceleration ? . The unit of the moment of inertia J is kgm2 or Nms2/rad. The characteristics moment of inertia J with angular acceleration of these three rotational mechanical system elements are summarized in Figure 4.4. 4.2 Fig. 4.4: Basic rotational 4.2.1 dAlemberts Principle in Rotational Rotational Mechanical Systems 81 mechanical system elements. Systems It can be easily seen that there exists an analogy between the rotational system and the translational system. That meansthe concept and the dynamics can be applied to rotational pendulum system in systems Figure 4.5 is modeling approaches with little mathematically modifications. equivalent welearned in the previous sec-tion We will see that the single torsional to the simple MBK system in Figure 4.2. In addition, these two systems are analogous to each other. Fig. 4.5: Asingle torsional pendulum. Recallthat the rotational version of Newtons Second Law of Motionis described by the equation, tnet = Ja = J?, wheretnetis the net physical torque, J is the momentof inertia, and a =? is the angularacceleration.Forthe singletorsional pendulumsystem shownin Figure 4.5, tnetis the physical nettorque appliedto the momentofinertia J, whichis the algebraicsum ofthe appliedtorque ta(t), the spring torque -K?(t), and thefriction torque -B ??(t), and therefore we have thefollowing: (4.15) tnet=ta +(-B ??)+(-K?)=J? This equation is analogous to the governing dynamics equation of the MBK system we had in Equation 3.1. The direct (Newtons t = Ja) method of assembling the equation of motion works well for simple systems, but will become more complicated and difficult to managefor large multi-bod 82 4 systems. Modeling of Mechanical This disadvantage Systems can be eliminated it easier to assemble the equations of if the dAlemberts motion. The rotational principle is employed version of dAlemberts to make principle is described in the following. Theorem 4.10 (dAlemberts Assume all the inertial sum ofall torques Principle for torques acting Rotational Systems) and physical torques in the system are considered. at any point in a multi-body Then, the algebraic system is zero. tsum =? ti = 0 (4.16) i Forthe singletorsional pendulumsystem,if theterm J? in Equation4.15is moved fromthe right-hand side of the equation to the left-hand side, the equation will become the following: ta+(-B ??)+(-K?)+(-J ?) =0 (4.17) This equation fulfills dAlemberts principle iftheterm-J ? isconsidered asatorque. As in the translational dynamic equilibrium down into that several systems, allows dAlemberts complicated free-body diagrams principle multi-body and provides rotational makes it an important system concept dynamics much easier to construct to the of be bro-ken dynamics model. Example 4.11 (Modeling of the Single Torsional Pendulum System by Newtonian Approach) The rotational mechanical system shown in Figure 4.5 is a single torsional pendulum. Thelink be-tween the disk, which has moment of inertia J, and the fixture at top is a flexible shaft with torsional spring constant K. Whenthe system is in motion, there is a viscous friction torque with friction coeffi-cient B. The positive rotation direction is chosen according to the right-hand rule with the thumb pointing down at the center of the disk, or it is in the clockwise direction viewing from the top. The angular displacement ? of the disk J is measuredfrom the equilibrium position at which the torsional spring torque is zero. In this example, will be employed to find the dynamics the Newtonian approach with dAlemberts model of the system, which is a differential prin-ciple equation describing the relationship betweenthe input ta(t) and the output ?(t). Solution: The free-body diagram is shown on the right-hand view of the disk. The positive rotation side of Figure 4.5. This diagram direction is in the clockwise direction. shows the same top This free-body diagram should consist offour torques: theapplied torque ta,thefriction torque tfri=-B ??, thespring torque tspr = -K?, and the inertial torque tine =-J ? . The applied torque taobviously isinthe clockwise direction, butthe otherthree torques are all withnegativesigns, asshown in Figure 4.4. Therefore, B ??, K?, and J? should all be in the counterclockwise Weutilize the signs in the torque The torque direction direction. equations to determine the torque determination can also be validated directions in the free-body dia-gram. by some simple virtual experiment, for example,if ? is positive, which meansthe disk has beenrotated clockwise away from equilibrium. Just imagine torque from your hand is holding the torsional spring the disk at this attempting displaced position; you to go back to the equilibrium, spring torque is indeed in the opposite direction would feel the recoiled which verifies the tor-sional of ?. Similarly, the friction torque is always in the oppositedirectionofthe angularvelocity;hence,B ??shouldbein the counterclockwise direction 4.2 Rotational Mechanical Systems 83 The negative inertial torque, -tine =J? and itsdirection onthefree-body diagram may beconfusing. The confusionis understandablesince J? actually is equalto the nettorque required to perform the motion to move J with acceleration ? toward the same direction of ? according to Newtons second law of motion. Then why,in the free-body diagram, is ? shown in the opposite direction of ?? rotational This confusion can beresolved using the following see that the following equations explanation of dAlemberts principle. It is easy to are correct: tnet(t) = J?(t) ??(t)-K?(t)-J ?(t)=0 tnet (t) =ta(t)-B ??(t)-K?(t) ? ta(t)-B The above equation equation on the right on the left is obviously verifies dAlemberts the result Principle of Newtons second law that the algebraic of (4.18) motion, and the sum of all torques acting on J is zero.Thisequationclearlyshowsthat J? is in the samedirectionwith B ?? and K?. Therefore, onthe free-body diagram, J? is alwaysin the oppositedirection of the assumedpositiverotation direction. Forthis example,J? shouldbein the counterclockwise direction. Once the free-body diagram is completed, to see that the sum of the torques as shown on the right-hand in the counterclockwise direction side of Figure 4.5, it is easy should be equal to the sum of the torques in the clockwise direction: J?(t)+B ??(t)+K?(t) =ta(t) (4.19) which is the dynamics model equation for the single torsional pendulum system shown on the left-hand side of Figure 4.5. Notethat the equation is mathematically equivalent and analogous to that of the simple massdamperspring system shown in Figure 4.2. 4.2.2 The Lagrange Approach for Rotational As discussed in the previous section, the Systems Newtonian and the Lagrange approaches have their advantages and disadvantages, but they complement each other very well. Students are urged to apply these two ap-proaches to every mechanical system dynamics modeling problem. experience, but also greatly reduces the probability approaches are very differentone relies of obtaining The application Lagrange approach system that involves may be less complicated geometrical modeling results. relationship These two and the other Therefore, it is rare for these two approaches to of the Lagrange approach to the rotational For a more complicated incorrect on the vectors and their is based on the scalar energy and power functions. lead to same errors. Doing so not only enhances learning system is similar to the translational both translational than the Newtonian and rotational approach since the approach requires separate free-body diagrams for translational and rotational for the Lagrange approach the rotational energy functions and the translational can be simply combined together. sys-tem. subsystems, the Newtonian subsystems while energy functions The Lagrange equation is basically the same as follows: d dt ?? ?L ??q - ?L ?q The only difference is that the generalized coordinate will be rotational system variables ?D + ?q = Q (4.20) q vector and the generalized velocity ?q vector 84 4 Example Modeling of Mechanical 4.12 (Modeling In this example, Systems of the Single Torsional we will employ the Pendulum Lagrange approach by the Lagrange Approach) to find the dynamics model for the same single torsional pendulum system considered in Example 4.11. Solution: For the single torsional pendulum system shown on the left-hand side of Figure 4.5, the generalized coordinate and velocity are ? and ??, respectively. The kinetic energy of the system is stored in the mo-ment ofinertia J as T =0.5J ??2,the potentialenergyofthe systemis storedin thetorsionalspring Kas U = 0.5K?2, and the power dissipated with friction coefficient Bis D= 0.5B ??2. Hence,the Lagrangian function is L =T-U=0.5J ??2-0.5K?2. The key differentials in Lagranges equation can befound as, ? = ? ? J ?, ?D ? = ? ? 0.5B ??2?? ?L?=??0.5J ??2 -0.5K?2?? ??=-K?, Q=ta ?L?=??0.5J ??2 -0.5K?2?? ? ? =Q ? J?(t)+B??(t)+K?(t) =ta(t) ? ? ? ? ? ??? = B ?? ? (4.21) Then from Lagranges equation we havethe dynamics d dt ?L ?L - ?? ?? model equation in the following, ?D + (4.22) ??? which is exactly the same asthat obtained using the Newtonian approach shown in Equation 4.19. 4.2.3 A Two-Rotor/One-Shaft Atwo-rotor/one-shaft Rotational System rotational system is shown in Figure 4.6. In the figure, J1 and J2 represent the two rotors with moment of inertia J1 and J2, respectively. B1and B2 arethe rotational friction coefficients of the two rotors, respectively. (the torsional These two rotors are connected with a shaft whose stiffness spring constant) is K. The positive rotation direction is chosen according to the with the thumb pointing from the left side of the figure at the center of the two clockwise direction viewing from the left of the figure. The angular displacements two rotors are measured respectively from the equilibrium positions at which the torque is zero. Fig. 4.6: Atwo-rotor/one-shaft rotational system right-hand rule rotors, or in the ?1 and ?2 of the torsional spring 4.2 Example 4.13 (The Two-Rotor/One-Shaft Consider the two-rotor/one-shaft Rotational rotational System system shown Rotational by Mechanical Newtonian Systems Approach 85 ) on the left side of Figure 4.6. In this exam-ple, the Newtonian approach with dAlemberts principle will be employed to find the dynamics model of the system, whichis a set of differential equations that govern the relationship betweenthe input ta(t) and the two outputs ?1(t) and ?2(t). Solution: The free-body diagram is shown on the right-hand side of Figure 4.6. This diagram shows the same left side view of the two rotors. The positive rotation direction for all vectors in the system is in the clockwise direction viewed from the left side. Sincethere are two rotors, J1 and J2,the free-body diagram is broken down into two free-body on the right, diagram parts side by side: the as shown J1 free-body on the right-hand diagram on the left and the J2 side of Figure 4.6. There are four torques acting on the rotor J1, and three torques on the rotor J2. Since the ap-plied torque ta is in the chosen positive rotation direction when it is positive, it is represented by a clockwise (CW) arrow withlabel ta(t) onthe J1 free-body diagram. Thefriction torques B1 ??1 and B2 ??2are alwaysagainsttheir respectiverotor motion;hence,they arerepresentedby counterclock-wise (CCW) arrows, respectively, on the J1 and the J2 free-body diagrams. For the same reason, the inertial torquesJ1 ?1 andJ2 ?2 are drawnas CCWdashedarrowsonthe J1 andthe J2free-body diagrams, respectively. According to dAlemberts principle or Newtons third law of motion, the spring torques at both ends of the torsional spring Kshould have the same magnitude but in opposite rotation directions. These twoare labeled thesame with K(?1 -?2), buttheir rotation direction areoppositethe onewith the J1 free-body diagram is CCW and the other with J2 free-body diagram is in CW. The reason that K(?1 -?2) is CCW ontheJ1rotor isexplained asfollows: IfthelabelK(?1 -?2) ispositive, (i.e., ?1 > ?2), the torsional spring Kis twisted clockwise, which will cause the spring to recoil. Hence, the recoiled spring torque is CCW, in the opposite rotation direction. Notethat if the spring torques are labeled differently asK(?2 -?1), then their rotation directions onthefree-body diagrams need tobe reversed! Now the free-body diagrams are completed, as shown on the right-hand side of Figure 4.6, and we can obtain two the three torques differential equations by summing on the J2 free-body up the four torques on the J1 free-body diagram J1 ?1+B1 ??1 +K(?1 -?2)=ta (4.23) J2 ?2+B2 ??2 -K(?1 -?2)=0 which can be rewritten in the following matrix form: ? ???? ????K -K????? J1 0 0 J2 Example 4.14 (The In this example, two-rotor/one-shaft ?1 ?2 B1 0 + 0 Two-Rotor/One-Shaft we will employ rotational and diagram, respectively. the B2 ??1 ??2 + Rotational -K K System ?1 ?2 by the 1 = 0 ta Lagrange Lagrange approach to find the dynamics system considered in Example (4.24) Approach) model of the same 4.13. Solution: Forthe two-rotor/one-shaft rotational system shown in the left-hand side of Figure 4.6, the generalize 86 4 coordinate Modeling of Mechanical Systems are ? ?1 ?2 and velocity ?T ?T and ???1??2 , respectively. The kinetic energy of the system is storedin the moments ofinertia, J1andJ2,as T = 0.5(J1 ??2 1 +J2 ??2 2 ), the potential energy of the system isstored inthe torsional spring KasU=0.5K(?1 -?2)2, and thepower dissipated infrictions, B1and B2, is 1 +B2 ??2 2 ). D = 0.5(B1 ?? 2 Hence,the Lagrangian function is 1 +J2 ??2 L=T-U =0.5(J1 ??2 2)-0.5K(?1 -?2)2 Then the key differentials in Lagranges equation J1 ??1 ??? = ?L/? ??2 ?L ?? = as, ? ?? ? ? ?? ? ? ??K(?1-?2)? ?? ?L/? ??1 ?L can be found (4.25) = ?L/??1 ?L/??2 J2 ??2 , ?? = ?D/? ??2 -K(?1-?2), = B1 ??1 ?D/? ??1 ?D = B2 ??2 (4.26) ta 0 Q = Now, from Lagranges equation Equation 4.20 we havethe dynamics model equation -?2)?? ??? ? ??-K(?1 K(?1 -?2) J1 ?1 J2 ?2 which can be rewritten - in the following B1 ??1 B2 ??2 + general = ta (4.27) 0 matrix form: ? ???? ????K -K????? J1 0 0 J2 ?1 ?2 B1 0 + 0 B2 ??1 ??2 + -K K ?1 ?2 1 = 0 ta (4.28) This equation is exactly the same as that obtained using the Newtonian approach shown in Equa-tion 4.24. Fig. 4.7: Arotational system with a gear train. 4.3 A Rotational System with a Gear Train A gear train is an important the best power mechanical device matching between a widely used in almost any power driving motor or an engine and the system to system to pro-vide be driven. A simple rotational system with a geartrain is shown in Figure 4.7. Anideal caseis considered at this moment, assuming the inertia J1, J2 and friction B1, B2 of the gears are negligible and the power transferred from the input gear to the output gear is lossless 4.3 A Rotational System with a Gear Train 87 Forthe lossless special case,the work done by the input gear,t1?1, is equalto that by the outpu gear,t2?2. t1?1 = t2?2 (4.29) wheret1 and?1arethetorqueandthe angulardisplacement associatedwiththeinput gear,andt2 and ?2 are associated withthe output gear.Sincethe arclength traveled bythe input gearshould bethe same asthat traveled by the output gear, we have r1?1 = r2?2 (4.30) where r1 and r2 are the radii of the input gear and output gear, respectively. With Equation 4.29, Equation 4.30, and the fact that gear ratio should be equal to the radius ratio, the relationships between the input and output gear variables are summarized asfollows: ?2 The dynamics easily obtained model equation using the = r2 = N2 of the rotational Newtonian t1 N1 r1 ?1 = ??2 = t2 (4.31) ??1 system in Figure 4.7 without the gear train or the Lagrange approach as follows, JL ?2(t)+BL ??2(t)+KL?2(t) =t2(t) which is mathematically equivalent between the input JL Due to the angular N1 ??1, ?2 ?1, ??2 = N2 N2 = velocity and torque relation-ships 4.31, we have N1 ?1, N2 t2 = N2 t1 N1 (4.33) ? ?2 ??2 ??2 N1 ?1(t)+BL N2 This equation can be further friction 4.19. (4.32) model equation of the rotational system in Figure 4.7 with the gear train can be found as rotational Equation N1 ?2 = Then the dynamics to and output gears shown in Equation can be coefficient rewritten N1 N2 ??1(t)+KL in terms Be, and the equivalent N1 ?1(t) =t1(t) N2 of the equivalent torsional spring (4.34) moment of inertia constant Je, the equivalent Keas follows: Je ?1(t)+Be ??1(t)+Ke?1(t) =t1(t) where Je = (4.35) ??2 ??2 ??2 N1 N2 JL, Be = N1 N2 BL, Ke = N1 N2 KL (4.36) If the gears are chosen so that the gear ratio N2/N1 = 4, the torque required to drive the system from the input gear side will be four times smaller. Furthermore, the moment of inertia, the friction coefficient, all become sixteen times Remark 4.15 (A and the spring Realistic Gear with Consider the same rotational B1, B2are not negligible. In this can still constant of the load observed from the input gear side will smaller. system Moment of Inertia with a gear train and Friction) whose moments of inertia J1, J2, and frictions more general case,the dynamics modelequation of the rotational system be described in the same form of Equation 4.35, 88 4 Modeling of Mechanical Systems Je ?1(t)+Be ??1(t)+Ke?1(t) =t1(t) but with modified equivalent Je = J1 + moment of inertia ??2 N1 N2 (J2 +JL), Be = B1 + (4.37) Je and equivalent friction ??2 N1 N2 (B2 +BL) , Ke = coefficient Beasfollows: ??2 N1 N2 KL (4.38) 4.4 A Simple Inverted Pendulum In this section, the Newtonian and Lagrange approaches will be employed to derive the nonlinear dy-namics model of a simple inverted pendulum system in the form of nonlinear differential equation. By defining the angular displacement and angular velocity of the pendulum as state variables, the nonlinear differential equation can be converted into a state space modelthat consists of two first-order differential equations, which can be packaged into a matrix form called the state equation. Then the nonlinear state equation can be utilized to determine the equilibriums and the local linear state-space model of the pendulum system at each equilibrium. We will investigate the behavior of the system at the vicinity of the equilibrium of interest and use the linear state-space models to design a feedback controller to stabilize the system orto improve the performance of the closed-loop system. Fig. 4.8: 4.4.1 Modeling the Simple Inverted Newtonian A simple inverted pendulum system. Pendulum Approach Asshown in Figure 4.8,the angular displacement ?is assumed zero whenthe pendulum is atthe upright position. The length of the stick is ?(m), but the weight of the stick is assumed negligible compared with the mass m(kg) of the black ball, which is attached to one end of the stick. The other end of the stick is connected to the pivot. The rotational friction coefficient is assumed b(Nms/rad) and the moment of inertia of the black ball is m?2. The black ball is subjected to the gravitational force mg and the applied control force fa(N), which is perpendicular to the gravity. Since the angular displacemen 4.4 A Simple Inverted Pendulum 89 ? is a variable, the torque dueto the gravity is mg?sin? and the torque generated by the control force is fa?cos?. The dynamics model of the simple inverted pendulum system can be obtained using the Newtonian approach with the free-body diagram in Figure 4.8 asfollows: m?2 ? +b ??-mg?sin? =fa?cos? Lagranges (4.39) Approach Notethat the system is a nonlinear system. The dynamics model can also be derived using the Lagrange approach. The kinetic energy, the potential energy, and the power dissipated in the system are T = 0.5m?2 ??2, U=-mg?(1-cos?), and D=0.5b ??2, respectively. Hence, theLagrangian is L=T-U =0.5m?2 ??2+mg?(1-cos?) and the differentials in Lagranges ?L ?? = ?L ?? = equation can be found as ?(0.5m?2 ??2+mg?(1-cos?)) = m?2 ??, ?? ?D ??? = ?(0.5m?2 ??2+mg?(1-cos?)) = mg?sin?, ?? Now, from Lagranges equation, d dt ?? ?L - ?? ?L ?? ?(0.5b ??2) =b ?? ??? Q = fa?cos ?D + ?? = Q we havethe dynamics model m?2 ? +b ??-mg?sin? =fa?cos? which is exactly the same as Equation 4.39, obtained by Newtonian approach. 4.4.2 Equilibriums The dynamics and Linearization modelequation of the simple inverted pendulum can be slightly rearranged asfollows: ? + b g 1 m?2 ?? - sin?= m?cos? fa (4.40) ? Nonlinear State-Space In order to identify of interest, are infinite Model the equilibriums of the system and to find a linearized model for each equilibrium we will first convert the nonlinear differential equation into a state equation. Although there many choices in defining the state variables, usually the state variables are selected based on two considerations. Oneis to associate the state variables with physical variables in reality like displacements, velocities, voltages, and currents. The other is to choose state variables so that the state-space modelis in a special form for the purpose of analysis or design. In the following, the angular state variables. Let displacement ? and the angular velocity ?? are chosen to be the 90 4 Modeling of Mechanical Systems x1 = ?, where u is used to represent equation in x2 =??, fa since u is a common and u = fa notation for control input. Then we have the state matrix form: ????sinx1-b x?1 x?2 = g x2 m? cosx1 u m?2 x2 + 1 Assumeg = 9.8 m/s2,? = 1.089 m, m = 0.918 kg, and b = 0.551 Ns, g b = 9, ? Therefore, we havethe following system: x? = Finding 1 m?2=0.6, nonlinear state-space m? =1 modelto represent the simple inverted pendu-lum ???9sinx1-0.6x2+cosx1u? x?1 x?2 x2 = f(x,u) = = ? ? f1(x1,x2,u) (4.41) f2(x1,x2,u) Equilibriums Let the control input u be zero, and then the equilibriums of the system can be found by solving the state equations with the derivative of the state variables set to zero. Now, we have u = 0, ??=0 x?1 x?2 ? ???? ?? x2 = 0 x* 1 x* 2 ? ?sinx1 - m?2 bx2 =0 Thesystem hastwo equilibriums: g = 0 or 0 p 0 ?T ?T Oneis x*U = ? 0 0 , which represents the upright stick position ? = 0, and the other is x*D = ? p 0 , which represents the downward stick position ? = p. Linearized State-Space Model at the Unstable Equilibrium Next, we will find alinearized state-space modelfor each of the two equilibriums. ?T At the upright equi-librium x*U = ? 0 0 , wehave the state-space model x?(t) where the matrices AU and BU are computed (see appendix (4.42) = AUx(t)+BUu(t) via Jacobian matrices Jx and Ju, respectively, as follows C): AU = Jx = BU = Ju = ???=?9cosx1-0.6???=?9 -0.6? ?? ? ?? ? ???=? ???=?? ?f ?x = x* ?f ?u = x* ?f1/?x1 ?f2/?x1 ?f1/?x2 ?f2/?x2 ?f1/?u ?f2/?u 0 x*= x*= 0 0 x*= 0 0 1 0 0 1 0 0 0 0 cosx1 x*= 1 0 Note thattheeigenvalues ofAU are2.715 and-3.315, which shows thattheequilibrium isunstable. 4.4 Linearized State-Space Model at the Stable A Simple Inverted Pendulum 91 Equilibrium , letx(t) =x(t)-x* ?T Onthe other hand,at the downward equilibrium x*D = ? p 0 state-space model x?(t) D, and we havethe = AD x(t)+BDu(t) (4.43) wherethe matrices AD and BD are computed via Jacobian matricesJx and Ju,respectively, asfollows: AD = Jx = BD = Ju = ???=?9cosx1-0.6???=? ? ?? ? ?? ? ???=? ???=? ? ?f ?x ?f ?u ?f1/?x1 ?f2/?x1 = x* ?f1/?x2 ?f2/?x2 0 x*= ?f1/?u ?f2/?u = x* p x*= 0 1 p p x*= 0 0 cosx1 0 0 1 -9 -0.6 0 p x*= -1 0 Note thattheeigenvalues ofADare-0.3j2.985, which verifies thattheequilibrium isstable. These eigenvalues also reveal that the damping ratio andthe natural frequency of the system around the downward equilibrium are ? = 0.1 and ?n = 3 rad/s, respectively. Open-Loop Simulation Using Nonlinear Simulink Model A Simulink computer simulation program built based on the nonlinear state-space model Equa-tion 4.41 will be employed to conduct simulations for the simple inverted pendulum. This Simulink file name is SIPmodel.mdl, which will be called by either CSD fig4p10 SIPmainOL.m for open-loop simulation or CSD fig4p11 SIPmainCL.m for closed-loop simulation. The block diagram of the Simulink model is shown in Figure 4.9. Since the system has two state variables, there are two integrator s-1 blocks. The output of the integrator blocks are: x1, the angular displacement, and x2, the angular velocity, respectively. The initial conditions x1(0) and x2(0) can be set by clicking Integrator2, the integrator respectively. Fig. 4.9: The nonlinear be employed to conduct block to type x10 and x20 in the Initial The values of x10 and x20 Simulink model, SIPmodel.mdl, both open-loop condition will be given in the and closed-loop boxes for Integrator1 of the simple inverted simulations and main m-file program. pendulum system will 92 4 Modeling of Mechanical Systems Click the ToWorkplace blocks: x1, x2, time, and cntrl, type x1, x2, t, and cntrl as Variable names, and select Array in Save Format box. The simulation results are recorded simultaneously on these arrays x1, x2, t, and cntrl, and can be plotted after the simulation is completed. Click the Gain block, F*u, and type F as the gain and select nonlinear function, Matrix(K*u) in Multiplication box. In the Fcn block, you need to type the 9*sin(u(1))-0.6*u(2)+cos(u(1))*u(3) where u(1), u(2), and u(3) represent the state variables x1, x2, and the control input u, respectively. We will run the following MATLAB program: CSD fig4p10 SIPmainOL.m, which will auto-matically call the Simulink model program SIPmodel.mdl, to conduct the open-loop simulation. The MATLAB code is listed asfollows: % CSD_Fig_4.10_SIPmainOL.m, % BC % MATLAB % Run % x1_dot=x2, % Initial Chang, R2015a or later Inverted on = Use this 1; Part which 15, x10=x10_deg*pi/180, for open-loop -9 2 -0.6], will automatically call SIPmodel.mdl x20=0, response. B=[0; At 1], = Part3 the eig(A), down F=[0 XD equilibrium: 0]; Simulation 20 % for open('SIPmodel'), open-loop simulation 'current', sim('SIPmodel', Plot the figure(41), simulation [0, sec'), figure(42), grid rad and plot(t,cntrl,'r-'), on, grid ylabel('cntrl'), grid minor, Fig. 4.10: Time responses of the inverted the pendulum at x*D = ? p 0 with initial on, grid grid legend minor, ('x1','x2'), minor, plot(x1,x2), of the uncompensated pendulum system simulation =0), the pendulum despite condition x(0) nonlinear simple pendulum equilibrium. ?T ? expected, without control action (i.e., u(t) stable equilibrium rad/s'), ylabel('x2') and phase plane trajectory open-loop on, x2 figure(43), xlabel('x1'), which converge into the stable downward The result 'current'); sim_options); results ylabel('x1 xlabel('t,sec'), 'DstWorkspace', sim_time], plot(t,x1,'b-',t,x2,'r-'), xlabel('t, system, Simulation versions sim_options=simset('SrcWorkspace', grid Open-loop x2_dot=9*sinx1-0.6*x2+cosx1*u sim_time % Pendulum 3/11/2020 Conditions A=[0 % University, CSD_fig4p10_SIPmainOL.m, x10_deg % Simple Drexel where the initial = ? 0.26 0 is shown in Figure 4.10. As will always spiral into the downward condition is. Figure 4.10 shows that would depart from the nearby unstable upward 4.4 A Simple Inverted 93 Pendulum ?T equilibrium x*U = ? 0 0 , movetoward and overshoot passingthe downwardequilibrium x*D, oscillate around several times, and eventually settle at the equilibrium after about 15 seconds. The high overshoot oscillation is caused by the low damping property of the system with ? = 0.1 and ?n = 3 rad/s. 4.4.3 State Feedback In the following, Controller Design to Stabilize a Simple Inverted a simple state-feedback controller Pendulum will be designed to stabilize the simple inverted pendulum atthe upright position(i.e., to convertthe originally unstableequilibrium x*U = ? 0 0 stable one). Moreover, the closed-loop plane to obtain a desired closed-loop at the upright equilibrium performance. obtained in x?(t) Since the controllability system poles can be placed at desired locations Equation = AUx(t)+BUu(t) For ease of reference, 4.42 is repeated = the linearized ?T to a on the complex state-space model here: ?9 -0.6? ?? 0 1 x(t)+ 0 1 u(t matrix [BU AUBU] = ?1 -0.6? 0 1 is nonsingular, there exists a state-feedback control strategy, u(t) = Fx(t), so that the closed-loop sys-tem poles orthe eigenvalues of AU +BUF can be placed anywhere in the complex plane as long asthe control-input constraints are satisfied. The definition of controllability matrix and controllability theory will be discussed in Chapter 10. Let the state-feedback matrix be F = ? F1 F2 ?. Then the closed-loop system characteristic equation will be det [sI-(AU+BUF)] =s2+(0.6-F2)s-9-F1 =0 The desired closed-loop characteristic equation (4.44) can be chosen as s2 +2??ns+?2n = 0 with damping ratio ? = 0.8 and ?n = 5rad/s, which is s2 +8s+25 =0 (4.45) Comparing thecoefficients ofEquations 4.44 and 4.45, we have F1=-34and F2=-7.4.Hence, the state-feedback controller is designed as u(t)=F1x1(t)+F2x2(t) =-34x1(t)-7.4x2(t) Now, withthe state-feedback controller, the closed-loop system state equation at the upright equilib-? rium becomes x?(t) = (AU +BUF)x(t) = ? 0 1 -25-8 x(t) (4.46) Note thattheeigenvalues ofAU+BUF are-4 j3,which verifies thattheoriginally unstable up-right equilibrium is now stable and has a desired transient ratio ? = 0.8 and natural frequency ?n = 5rad/s. response characterized by its damping 94 4 Modeling of Mechanical Systems Fig. 4.11: Withcontrol compensation, the originally unstable upright equilibrium is stabilized. Closed-Loop Simulation Using Nonlinear Simulink Model The same Simulink simulation program, SIPmodel.mdl, will be employed to work together with the closed-loop stabilization program, CSD fig4p11 SIPmainCL.m, to conduct the closed-loop control simulation. Figure 4.11shows that the pendulum withinitial condition x(0) = ? 0.26 0 ?T would movetoward and settle at the upright equilibrium after just about one second without much overshoot and oscillation. This desired transient response is the direct result of the choice of damp-ing ratio and natural frequency as ? = 0.8 and ?n = 5 rad/s, respectively. The simulation results showed in CSD fig4p11 SIPmodel.mdl, SIPmainCL.m shown in 4.9. The filename: CSD_fig4p11_SIPmainCL.m, % BC Drexel % MATLAB % Run % SIPmodel.mdl % x1_dot=x2, % Initial R2015a Use A=[0 on later = 1; which 9 x10=x10_deg*pi/180, for closed-loop -0.6], will model, asfollows: Inverted Pendulum aoutomatically call 1], 0.6-2*ze*wn], 2 x20=0, stabiliztion. B=[0; At eig(A), ze=0.8, Acl=A+B*F, % Part3 up XU equilibrium: wn=5, eig(Acl), for closed-loop simulation 'current', sim('SIPmodel', Plot the figure(41), simulation [0, xlabel('t, sec'), figure(42), grid rad plot(t,cntrl,'r-'), minor, Although the controller state-feedback on, x2 rad/s'), on, grid figure(43), xlabel('x1'), was designed controller ?T and grid ylabel('cntrl'), grid 'current'); sim_options); results ylabel('x1 xlabel('t,sec'), 'DstWorkspace', sim_time], plot(t,x1,'b-',t,x2,'r-'), on, the Simulation open('SIPmodel'), is capable pendulum pro-gram versions 15, sim_time=3 linear inverted MATLAB 8/11/2018 sim_options=simset('SrcWorkspace', grid nonlinear code of is listed the x2_dot=9*sinx1-0.6*x2+cosx1*u this Part % running Conditions F=[-9-wn2 % or Simulink MATLAB Simple University, CSD_fig4p11_SIPmainCL.m, x10_deg % with the Figure % Chang, Figure 4.11 are obtained from from legend minor, ('x1','x2'), minor, plot(x1,x2), ylabel('x2') based on the linearized not only performs satisfactorily of bringing the pendulum grid a wide range of initial model at the upright within the linearized equilibrium, region, positions to the upright this it actually equilibrium x*U = ? 0 0 , as shown in Figure 4.12. The graph at the right shows the 14 phasetrajectories at of th 4.4 A Simple Inverted Pendulum 95 closed-loop system with theinitial pendulum positions from-10? to -70? and from10? to70?. Within therange of-70? and70?, thecontroller only requires asmall amount ofeffort toquickly bring the pendulum to the upright equilibrium. Fig. 4.12: Phase portraits of the simple inverted pendulum with feedback control. Since the control-input force u(t) can only work in the horizontal direction, the effective control-input torque is u?cos?, which getssmaller as ? movescloserto 90?. When? becomesgreaterthan 90?,the effectivecontrol-inputtorque u?cos? will changesign andjoin the gravityforceto pushthe pendulum ball down and swing it to the other side. The pendulum will continue to swing up and may change swing direction several times before reaching the top to swing back through almost one full ?T revolutionto the uprightequilibriumx*U = ? 0 0 . Therefore, for the phase trajectories with the initial position beyond 80?the controller wouldneedto make moreeffort andtravel alonger distanceto bring the pendulum to the upright equilibrium as shown on the left graph of the figure. Now, thestate-feedback controller u(t)=F1x1(t)+F2x2(t) =-34x1(t)-7.4x2(t) has successfully ?T ? ? ?? converted the originally unstable upright equilibrium to a stable one.We may wantto know how the same controller affect the downward equilibrium state-space model at this equilibrium x?(t) at x*D = ? p 0 . Recallthat state equation of the linearized is = AD x(t)+BDu(t) = 0 1 x(t)+ -9 -0.6 0 -1 u(t) Hence,the closed-loop system state equation at the downward equilibrium is x?(t) = (AD+BDF) x(t) = ?? 0 1 x(t) 25 6.8 (4.47) Note that theeigenvalues ofAD+BDF are9.4465 and-2.6465, which verifies that theoriginally stable downward equilibrium is now unstable. Remark 4.16 (Radian is and Degree) The common units for angles and angular displacements areradian and degree. It seems that degree moreintuitive to humans, but in engineering analysis and design we haveto use radian instead o 96 4 Modeling of Mechanical Systems degree. It is not only because radian reasons has become a standard why we should use radian instead One of the practical of degree in engineering reasons is relevant to the linearization model at the upward pendulum equilibrium. convention; process For instance, sin? there are several and scientific we employed practical computations. to obtain the linearized = 0.2571 is approximately equal to ? for ? = 0.26rad whenthe unit usedis radian. Butit is notthe casefor ? = 15? whenthe unit usedis degree. 4.5 Cart-Inverted Pendulum System The cart-inverted pendulum control system is one of the most well-known benchmark control problems that has been extensively studied for decades. The problem is so intriguingit is inherently unstable, nonlinear, and under actuatedthat almost all available control design approaches have been employed to solve the problem. The main objective of this section is to derive the nonlinear dynamics model of the cart-inverted pendulum system using both the Newtonian and the Lagrange approaches. Oncethe nonlinear dy-namics modelis derived, it can be employed to analyze the nonlinear system behavior around the unstable equilibrium, to obtain a linearized dynamics model at the unstable equilibrium, and to utilize the information of the linearized model to design a controller so that the unstable equilib-rium can be converted to a stable one. Fig. 4.13: A cart-inverted pendulum system. A schematic diagram of atypical linear-rail inverted pendulum system is shown in Figure 4.13. The cart has mass Mkilograms and is driven by a force fa Newtons, which can be generated by a DC motor inside the cart. The displacement of the cart is represented by s meters measuringfrom the center of the rail to the right. A positive s meansthe cart is at the right side of the rail. Onthe other hand, a negative s indicates a position onthe other side of the rail. The direction of the force is defined accordingly so that a positive force fa left. The friction would coefficient move the cart forward of the translational to the right, and a negative fa motion is assumed a constant would go reverse to the Bs. The stick with mass mkilograms andlength 2? metersis hinged to the cart with a pivot so that the stick can rotate freely and make a whole 360-degree swing in either clockwise or counter clockwise direction. The friction coefficient of the rotational motionis assumed as a constant B?. The angula 4.5 Cart-Inverted Pendulum System 97 displacement is represented by ? radians, measuringfrom the upward reference in the clockwise direction. A positive ? meansthe stick is tilted to the right side of the pivot. Fig. 4.14: Free-body diagrams of the cart-inverted pendulum system. Fig. 4.15: More detailed free-body diagrams for the stick subsystem: (a) horizontal translational of the stick, (b) vertical translational motion of the stick, (c) rotational motion of the stick. 4.5.1 The Newtonian Translational Approach Modeling of the Cart-Inverted motion Pendulum System Motion Equation of the Cart: The cart-inverted pendulum system consists of the cart subsystem and the stick subsystem. Thefree-body diagrams of the stick and the cart are shown in Figure 4.14. V and H are the vertical and horizontal reaction forces at the pivot, respectively. There are four forces acting on the cart, and the algebraic sum of these forces is zero according to dAlemberts principle, M s+Bs ?s+H-fa =0 Horizontal Translational Unlike the cart subsystem, (4.48 Motion Equation of the Stick CG: the stick subsystem involves two translational motionshorizontal and vertical, and one rotational motion. To makeit easier to establish the three equations of motion for the stick subsystem, the stick free-body diagram needsto befurther decomposed into three more 98 4 detailed Modeling of free-body Mechanical diagrams, Systems shown in Figure 4.15. Figure 4.15(a) shows the free-body diagram for the horizontal translational motion of the cen-ter of gravity (CG) of the stick. Notethat the massof the stick is m,and the horizontal displacement of the CGis s+?h, where?h = ?sin?. Atthe CG,there aretwo forces:the horizontalreaction force H pointing to the right and the negative inertia force, of s. According to dAlemberts principle, ? obtained as H = m s+ Vertical Translational m( s+ ?h), the horizontal which is always in the opposite direction translational equation of motion for the ?=m s+?cos? ?-?sin? ??2? d2(?sin?) ? dt2 CG is (4.49 Motion Equation of the Stick CG: Figure 4.15(b) shows the free-body diagram for the vertical translational motion of the center of gravity of the stick. Notethat the vertical displacement ofthe CGis ?v, where?v = ?cos?, and there are three forces acting on the CG. Apparently the vertical reaction force V is in the up direction, while the gravitational force mgis always pointing down. Since the up direction is assumed positive, the inertia force, m ?v, shouldpoint downonthe free-bodydiagramsinceit is alwaysin the oppositedirectionof the positive reference direction. According to dAlemberts principle, the vertical translational equation of motionfor the CGis obtained as =-m? sin? ?+cos? ??2? d2(?cos?) V-mg=m Rotational ? dt2 (4.50) Motion Equation of the Stick: Figure 4.15(c) shows the free-body diagram for the rotational motion of the stick about the CG of the stick. Notethat the torques about the CG dueto the vertical reaction force V and the horizontal reaction force Hare ?Vsin? and ?Hcos?, respectively. Thetorque ?Vsin? is in the clockwise direction while?Hcos?is in the opposite, the CCWdirection.Thefrictiontorque B? ?? andtheinertialtorqueJ? are also in the CCW direction. Hence,the rotational equation of motionfor the CGis obtained as ?Vsin? -?Hcos? -B? ??-J ? =0 (4.51) where B?is the rotational friction coefficient of the stick, which usually is very small or negligible and J is the moment of inertia of the stick about the CG, which is (4.52) J = m?2/3 and ?is half of the length of the stick. Nonlinear Equation of Motion of the Cart-Inverted After eliminating have the following the internal reaction forces V and Pendulum: H from Equations 4.48, 4.49, 4.50, and 4.51, we nonlinear governing differential equations for the cart-inverted pendulum system: (M+m) s+Bs ?s-m?sin? ??2+m?cos? ? =fa (4.53) (J+m?2) ? +B? ??-mg?sin? +m?cos? s =0 Note that the translational dynamics of the cart and the rotational/translational dynamics of the stick are coupled in a nonlinear fashion. In the next subsection, the Lagrange approach will be employed to derive the equation of motion for the same cart-inverted pendulum system. 4.6 4.5.2 Lagranges Approach Modeling of the Cart-Inverted Pendulum Exercise Problems 99 System For the cart-inverted pendulum system shown in Figure 4.13, the generalized coordinate and velocity are q = ? s ? ?T ?T and ?q = ?s??? M and mand in the , respectively. moment of inertia The kinetic energy masses J as T = 0.5M?s2 +0.5m ?? ?2 +?sin? ??2? s?+??? cos? where the first, the second, and the third terms of the cart, the translational of the system is stored in the +0.5J ??2 ? of the kinetic (4.54) energy are due to the translational motion of the stick, and the rotational motion motion of the stick, respectively. In thesecond term, ?s+? ??cos? isthehorizontal translational velocity oftheCG ofthestick and-? ??sin? is the vertical translational velocity of the CG of the stick. The potential energy of the system is stored in the gravitational field as U = mg?cos? (4.55) where ?cos? is the vertical displacement of the CG of the stick. The power dissipated in the frictions ??2. Hence, the Lagrangian functionis are D = 0.5Bss?2 +0.5B? ?? ?2 +0.5J ??2-mg?cos? +?sin? ??2? L=T-U=0.5M ?s2+0.5m s?+? ??cos? Then the key differentials ?L ??q = ?L equation can be found as, ? ??D?? ??L?? ?? ?? ? ?s ?s ? ?? ??L??s ??-m??s??sin?+mg?sin? ?L ?q = ?L Now, from in Lagranges (4.56) ? Lagranges ? ??? ?s+m( M ?s+??? cos?) , m?cos? ?s+m?2?? +J?? = 0 ? ?? ?D ??q = , = Q= ? ?D ? ? Bs ?s = B? ?? (4.57 fa 0 equation, d dt ?? ?L ??q ?L - ?q ?D + ?q = Q (4.58) we havethe dynamics model equation (M+m) s+Bs ?s-m?sin? ??2+m?cos? ? ??? ?(J+m?2) ? +B? ??-mg?sin? +m?cos? s fa = which is identical to the dynamics in Equation 4.53. model equation (4.59) 0 derived using the Newtonian approach shown This nonlinear dynamics model described by the two coupled second-order differential equa-tions will be employed in Section 7.6 for further investigation of the cart-inverted pendulum system regarding nonlinear state-space model construction, equilibriums, linear state-space models, and stabilization controller design and analysis. 4.6 Exercise Problems P4.1a: Consider the double MBK (massdamperspring) system shown in Figure 4.16, where M1 = M2 =1 kg, K1 =K2 =2 N/m, B1 =B2 =0 Ns/m, and the initial conditions of the system are x1(0) =x10, 100 4 Modeling of Mechanical Systems x?1(0) = 0, x2(0) = x20, and?x2(0) Newtonian approach. = 0. Verify the following governing equations of the system by x1(t)+4x1(t)-2x2(t) =0 -2x1(t)+ x2(t)+2x2(t)=0 And show that the Laplace transform of these equations are: s2X1(s)-sx10 +4X1(s)-2X2(s) =0 -2X1(s)+s2X2(s)-sx20 +2X2(s) =0 P4.1b: Repeat P4.1a using the Lagrange approach. Fig. 4.16: A double MBK system. P4.1c: Solvefor X1(s) and X2(s) as A1s A3 C1s C3s X1(s) = s2+0.76393 +s2+5.23607 X2(s) = s2+0.76393+s2+5.23607 and find A1, A3, C1, and C3 as functions of the initial conditions x10 and x20. P4.1d: Chooseinitial conditions x10 and x20so that A3 = 0 and C3 = 0, and show that the two M1and M2 will exhibit in-phase harmonic motions at the frequency ?L = 0.76393rad/s. v masses P4.1e: Underthe initial conditions given in P4.1d, find the inverse Laplacetransform of X1(s) and X2(s) to obtain x1(t) and x2(t). Plot x1(t) and x2(t) and usethe graphs to verify the in-phase harmonic motions and the oscillation frequency obtained in P4.1d. P4.1f: Chooseinitial conditions x10 and x20sothat A1 = 0 andC1 = 0, and show that the two masses M1 5.23607rad/s. and M2 will exhibit 180-degreeout-of-phaseharmonic motionsatthe frequency ?H = v P4.1g: Underthe initial conditions given in P4.1f, find the inverse Laplace transform of X1(s) and X2(s) to obtain x1(t) and x2(t). Plot x1(t) and x2(t), and usethe graphs to verify the 180-degree out-of-phase harmonic motions and the oscillation frequency obtained in P4.1f. P4.1h: Randomly choose a set of the initial conditions, x10 and x20, and then find the inverse Laplace transform of X1(s) and X2(s) to obtain x1(t) and x2(t). Plot x1(t) and x2(t), and comment on the motion of the system. 4.6 P4.2: Consider the simple pendulum positioning system shown in Exercise Figure 4.17. Problems 101 Unlike the simple in-verted pendulum control problem, the objective of this project is not to stabilize the pendulum at the upright lightly unstable equilibrium. damped pendulum Instead, it is an angular position tracking/regulation control problem for a system. As shown in the figure, one end of the and the other end attaching to a black ball pendulum with stick is connected to the pivot under the ceiling, mass m kg. The pendulum sticks length is ? m, and its massis assumed negligible. The gravity g = 9.81 m/s2, andthe control force is u N, whose direction is assumed always perpendicular to the angular velocity to the pendulum with friction stick. The friction torque of the system is proportional coefficient b Nm/rad/s. Fig. 4.17: A simple pendulum positioning system. P4.2a: Showthat the governing differential equation for the pendulum system is m?2 ?(t)+b ??(t)+mg?sin? = u? using the Newtonian approach. P4.2b: Verify the result of P4.2a using the Lagrange approach. P4.2c: Definethe state variables x1 = ?, x2 =?? and then find the nonlinear state equation of the system. P4.2d: Assume ?g = 16, numerical values. b m?2= 0.6, m? 1 = 2, and then rewrite the nonlinear state equation with these P4.2e: Showthat x*D = ? 0 0 pendulum positions. ?T is the static equilibrium A static equilibrium P4.2f: Find the linearized is an equilibrium of the system associated with the downward of the system u(t) is zero. state equation associated with the downward equilibrium in the form of x?(t) = ADx(t) +BDu(t) and show that the equilibrium x*D = ? 0 0 ues of AD. when the input ?T is stable based on the eigenval 102 4 Modeling of Mechanical P4.2g: Find the characteristic Systems equation associated with this equilibrium, and useit to determine the pole locations -a j?,thedamping ratio ?,and thenatural frequency ?n.Discuss how a,?,?,and?nwill affect the time response of the system around this equilibrium. oscillation frequency based onthe information P4.2h: Build a Simulink/MATLAB and useit to conduct an initial Measurethe maximum overshoot x*D = ? 0 0 ?T with x1(0) is stable, = 0.26 rad and x2(0) = 0 rad/s. but the response is oscillatory maximum overshoot and the oscillation frequency from the initial graph obtained from the simulation and the program based on the nonlinear state equation obtained in P4.2d, state response simulation You will see that the downward equilibrium large overshoot. P4.2i: Predict the of a, ?, ?, and ?n. in P4.2h, and compare the simulation results with state response with your predictions in P4.2g. P4.3: As welearnedfrom ProblemP4.2a Problem4.2i,the system nearx*D,the downward equilibrium, is stable; however, the time response is oscillatory with large overshoot. The performance of the system can be improved using feedback control. Consider the state equation, x?(t) Withthe state-feedback control, u(t) = ADx(t)+BDu(t) = Fx(t), the state equation of the closed-loop system will become x?(t) = (AD+BDF)x(t) and the poles of the closed-loop system will bethe eigenvalues of AD+BDF. P4.3a: Designa state-feedback controller u(t) = Fx(t) = F1x1(t)+F2x2(t) sothat the closed-loop sys-tem has damping ratio ? = 0.7 and natural frequency at ?n = 4 rad/s. After closing the loop, determine the pole locations, and discuss how the polelocations, the damping ratio and the natural frequency affect the time response oscillation frequency of the system around this equilibrium. based on the information of the closed-loop Predict the maximum overshoot poles and their corresponding will and the damping ratio and natural frequency. P4.3b: controller Modify the Simulink/MATLAB program you usedin P4.2h to incorporate the state-feedback you designed in P4.3a. Conduct simulations to verify that the time response performance has been greatly improved. P4.3c: Measurethe maximum overshoot and the oscillation frequency from the initial state response graph obtained from the simulation in P4.3b, and compare the simulation results with your predictions in P4.3a. P4.4: As mentionedin P4.2e, a static equilibrium is an equilibrium whenthe input u(t) is zero. In con-trast, a dynamic equilibrium is an equilibrium whenthe input u(t) is a nonzero constant. Manypractical systems are required to For example, an aircraft P4.4a: In this problem, work at a dynamic cruise level equilibrium, straight flight or to switch from one equilibrium maintains a constant speed to another. with a constant thrust. we areinterested in investigating the behavior of the pendulum system at the dynamic equilibrium x* =[0.26 0]T, which means the angular displacementis ? = 15 degreeandthe angular velocity ?? is zero. Usethe nonlinear state-space model obtained in P4.2d to determine the inpu u* atthis equilibrium. 4.6 P4.4b: Find a linearized state-space model of the pendulum Exercise system at the dynamic in P4.4a. The linearized state-space modelshould be of the following Problems equilibrium 103 chosen form: x?(t)=A x(t)+B u(t), where x(t) =x(t)-x* andu(t) =u(t)-u* Notethat x(t) and u(t) arethe actualstate vectorandthe actualcontrol input, respectively; x* and u* are the values of the state vector and the control input at the equilibrium; andx(t) of the state vector and the control input, respectively, from the equilibrium andu(t) arethe deviations values. P4.4c: Find the characteristic equation associated with this equilibrium, and useit to determine the pole locations -a j?,thedamping ratio ?,and thenatural frequency ?n.Discuss how a,?,?,and?nwill affect the time response of the system in the vicinity of this equilibrium. Predict the maximum overshoot and the oscillation frequency. P4.4d: Build a Simulink/MATLAB state equation obtained in program, similar to what you did in P4.2h, based on the nonlin-ear P4.2a, and use it to conduct an initial state response simulation with x1(0) = 0 rad, x2(0) = 0rad/s, and u(t) = u*. Observeif the time responseconvergesto the new dy-namic equilibrium chosen in P4.4a. P4.4e: Measurethe maximum overshoot and the oscillation frequency from the initial state response graph obtained from the simulation in P4.4d, and compare the simulation results with your predictions based on the pole locations, damping ratio, and natural frequency obtained in P4.4c. P4.5: As welearned from Problem P4.4a Problem P4.4e,the system aroundthe (x*,u*), the dynamic equilibrium chosen in P4.4a, is stable; however, the time response is oscillatory with large overshoot. The performance of the system can beimproved using feedback control. Considerthe state equation, x?(t) Withthe state-feedback control, u(t) = Fx(t), x?(t) and the poles of the closed-loop system = x(t)+B A u(t) the state equation of the closed-loop system will be = (A+BF) x(t) at the dynamic equilibrium will become the eigenvalues of A+BF. P4.5a: Designa state-feedback controller u(t) = Fx(t) = F1 x1(t)+F2 x2(t) sothat the closed-loop sys-tem has damping ratio ? = 0.7 and natural frequency at ?n = 4rad/s. After closing the loop, determine the pole locations, and discuss how the polelocations, the damping ratio and the natural frequency will affect the time response of the system in the vicinity of this equilibrium. Predictthe maximum overshoot and the oscillation frequency. P4.5b: Modify the Simulink/MATLAB program you usedin P4.4d to incorporate the state-feedback controller youdesigned inP4.5a. Since x =x-x*and u =u-u*,thestate-feedback control law u(t) =F x needs tobereplaced byu =F(x-x*)+u* inthesimulation. Conduct simulation tover-ify if the time response performance is improved. P4.5c: Measure the maximum overshoot graph obtained from the simulation and the oscillation frequency in P4.5b, and compare the simulation from the initial results state response with your predictions based on the pole locations, damping ratio, and natural frequency of the closed-loop system 5 Modelingof Electrical Systems R ECALL that in Chapter 2 and Chapter 3, westarted with afew simple mechanical, electrical, and electromechanical systems and their associated mathematical model equations. These models wereemployed in the analysis to understand how systems work and in a few simple design ex-amples to achieve desired time-domain and frequency-domain performance. Since mathematical system modeling is essential in the analysis and design of control systems, two chapters are allocated in the book to address the fundamental modeling approaches for mechanical systems, electrical circuits, and electromechanical systems. In Chapter 4, we havelearned how to employ the Newtonian approach, dAlemberts principle, and the Lagrange approach to assemblethe governing dynamics equations as mathematical modelsfor me-chanical systems. Electrical circuits or systems are alittle bit different, but there are close relationships between the mechanical and electrical systems. For the MBK mechanical system andthe electrical RLC circuit we discussed in the beginning of Chapter 3, their governing dynamics equations shown in the following clearly reveal that the two systems are mathematically equivalent and their physical com-ponent properties are analogous to each other: y(t)+B M ?y(t)+Ky(t) = fa(t) (5.1) q(t)+R ?q(t)+(1/C)q(t) L = ea(t) The mechanical system is driven by the applied force fa(t), which is analogous to the voltage source ea(t). The voltage source was called electromotive force (emf) when the electricity era had just started. This term is still used on some occasions since the voltage source serves as a means to drive the electrical system. The resistance Rand the friction coefficient B are analogous to each other because their dissipated powers are of the same form, with 0.5R?q2 and 0.5B?y2, respectively. The inductor L and the inverse capacitance 1/C are analogous to M and K, respectively, since L and M have the same form of kinetic energy, 0.5L?q2 and 0.5M?y2,respectively, and 1/C and K have the form of potential energy (0.5/C)q2 and 0.5Ky2, respectively. In Chapter 2 and Chapter 3 we briefly reviewed the characteristics of the three basic passive electric elements, resistor, inductor, and capacitor, and usedthe component relations together with Kirchhoffs current law and voltage law to derive the governing dynamics equations for a simple first-order RC cir-cuit and atypical second-order RLC system. In this chapter, we will explain in detail how to assemble the governing dynamic equations for electric circuits using several different approaches. Although elec-tric circuits straightforward more limited seem less tangible than the than mechanical mechanical systems, the electrical system since the geometry system of the electric modeling is circuit more is, in a sense, 106 5 Modeling of Electrical Systems Fig. 5.1: Symbols and characteristics of fundamental two-terminal electrical elements. 5.1 Basic Electrical Circuit Elements and Circuit Conventions To analyze the behavior or to obtain a mathematical model of an electrical system, the first step is to understand the voltage-current relationships of the three fundamental passive electrical elements, resistor, capacitor, inductorjust like we did in Chapter 4 for mechanical systems about the force-velocity relationships of the three mechanical elements, damper, spring, mass. As shown in Figure 5.1, the e-i relationship of the resistor is e = Ri, which is the well-known Ohms law. The units for the voltage e, current i, charge q, and resistance R are volt, ampere, coulomb, and ohm, respectively. The e-i relationship ofthe capacitoris i = Cde/dt, wherethe unit of the capacitance Cis Farad. The e-i relationship of the inductor is e = Ldi/dt or dF = Ldi, wherethe units of the inductance L and the magneticflux F are Henry and Weber,respectively. Notethat the voltage polarity and the current flow direction need to be consistent: The current always flows into the positive terminal of every passive element. Although in reality, especially in a complicated circuit, is completed, interest we may not know the actual polarity of the elements before the circuit analysis it is a common in the circuit. practice to specify For the simple circuit in voltage Figure and current with polarity 5.2, the voltages for each element and currents with polarity of and flow direction are specified as shown. Sincethe specified current direction needs to be consistent with the specified voltage polarity, only either one of them, voltage or current, needs to bespecified. Th 5.2 polarity can be arbitrarily Basic Time-Domain Circuit Modeling chosen, but once the specified Approaches and voltage and current Kirchhoffs variables Laws 107 are selected they should stay unchanged during the whole circuit analysis process. Fig. 5.2: The convention of voltage polarity and current direction in an RLC circuit. Fig. 5.3: (a) Thevenin and (b) Norton equivalent circuits. The voltage of the voltage source and the current of the current source are prespecified, and the cur-rent always flows out of the positive terminal of the source element. Behold, this is different from the three passive electrical elements R, L, and C; with them the current always flows into the positive terminal. The voltage and current sources are classified into two categories: independent and depen-dent voltage/current sources. The independent ones represent the independent power sources whose supplied voltages or currents do not depend on any parameters of the circuit. Onthe other hand, the dependent sources represent some active devices like transistors or operational amplifiers whose sup-plied voltages or currents are dependent on some parameters in the circuit. The voltage/current sources listed in Figure 5.1 are ideal sources. Although there exists no ideal voltage/current source in the real world, mostof the real signals and power sources can be modeled as a combination of an ideal voltage/current source together with passive electrical components. For example, a signal source or a battery can be modeled as a Thevenin or a Norton equivalent circuit, as shown in Figure 5.3. 5.2 Basic Time-Domain As mentioned earlier, the it would be difficult Circuit mathematical or even impossible Modeling Approaches and Kirchhoffs modeling of to achieve Laws mechanical systems is essential, since optimal mechanical without it design and feedback control system design for performance enhancement, including precision, reliability, safety, and automation. The mathematical modeling of electrical systems is even moreimportant since electronic devices and electromechanical systems have been embedded in almost all systems that impact start from the basic time-domain circuit modeling approach. (1) the 2k equations approach, (2) the nodetodatum currents approach This approach (NTD) our daily life. includes three We will variations: voltages approach, and (3) the mesh 108 5 5.2.1 Modeling of Electrical Circuit Modeling Systems Using the 2k Equations For the electrical system or circuit voltage with k two-terminal or current source, the dynamic system relationship Approach and the interactions elements that include at least one independent model should have the capability among all the k elements. of exhibiting the cause-effect Since there is one pair of voltage and current variables associated with each element, in total there are 2k variables, and therefore 2k inde-pendent equations are required to solve these variables. Based on the e-i relationship of the passive elements and the voltage/current information for the voltage/current sources, as described in Figure 5.1, k equations can be easily set up. The other k equations must be obtained using Kirchhoffs voltage law (KVL) and current law (KCL) according to the interconnection of the elements in the circuit. Recall that voltage was defined as the energy required to bring a positive unit charge from one point to another in a conservative electric field. Based onthe conservation of energy law, the energy required for a charge to travel around a closed path back to the starting point is zero, and the algebraic sum of the voltages around any closed path is zero, whichis exactly the statement of Kirchhoffs voltage law (KVL), (5.2) ?ei = 0 i On the other hand, Kirchhoffs current law (KCL) is derived from Conservation of Charge law. At any junction of elements, called node, charge can neither be destroyed nor created, and therefore the algebraic sum of the currents entering any node is zero. Thus, ?i j (5.3) =0 j Example 5.1 (2k Equations Approach) Forthe electric circuit shown in Figure 5.2, there are k = 4 elements, including L, capacitor C,resistor R, and voltage source es. Apparently, we have the following one each of inductor k = 4 equations from the e-i relationship of the L, C,and Relements and the value of the voltage source es: e1 = L As specified on the circuit di1 , dt i2 =C de2 , dt e3 = R3i3, and e4 = es elements in Figure 5.2, there are 2k variables: (5.4) i1,e1, i2,e2, i3,e3, i4,e4. It is clear that k = 4 moreindependent equations are neededto determine the voltages and currents for all the k = 4 elements. interconnection These k = 4 equations of the k = 4 elements. is a loop in the circuit that obtained by applying must be obtained using It can be seen that the circuit does not contain any other loop, KVL around the two KVL and KCL according to the has m = 2 meshes, where a mesh and therefore m = 2 mesh equations can be meshes: (5.5) -e4+e1+e2=0, and -e2+e3=0 There are n =3nodes inthecircuit, but they can only provide n-1 =2independent node equations by applying KCL to any 2 nodes: i4 -i1=0 andi1 -i2-i3=0 The 2k equations approach described is conceptually As a matter of fact, the system straightforward; model equations example, in the circuit shown in Figure 5.2, if (5.6) however, it is tedious do not need to include computa-tionally. all the 2k variables. we know the voltage across the capacitor, e2,then For we have thevoltage across theresistor, e3=e2,and thevoltage across theinductor, e1=es-e2, simpl 5.2 by inspection. Basic Time-Domain With the knowledge Circuit Modeling of the voltages for the three i3 can be easily computed based on the simple e-i relationship again, employed we have i4 = i1 and e4 = es. Hence, the system Approaches Kirchhoffs Laws 109 L, C, R elements, the currents i1, i2, and of each element, and finally, by inspec-tion model needs only one equation that can be to solve for e2. From this discussion, certainly there exists at least one electric circuit moreefficient than the 2k equations approach. 5.2.2 The NodeToDatum (NTD) will serve as the common of a voltage or current modeling approach that is Voltages Approach The first step of the nodetodatum which and (NTD) reference voltages approach is to select one node as the datum, point. source is a good choice. The selection is arbitrary, but the negative terminal The next step is to assign a nodetodatum (NTD) voltage variable for each node of the circuit except the positive terminal of voltage sources. Then the final step is to apply KCL to all assigned nodes to set up equations with only the NTD voltages as variables. Fig. 5.4: (a) Example 5.2 (NTD The NTD voltages approach, (b) The mesh currents approach. Voltages Approach) The circuit in Figure 5.4(a) is exactly the same as the onein Figure 5.2, which was considered in Example 5.1. The difference here is that by using the NTD approach only one voltage variable, instead of 2k variables, needsto be assigned. The node connecting to the negative terminal of the voltage source is selected as the datum, and one NTD voltage variable eC is assigned at the node connecting to the three elements L, C, and R. Thethird node is connecting to the positive terminal of the voltage source, and its NTD voltage is obviously given as es. Therefore, only one NTD voltage variable is required to be assigned. Now we apply Kirchhoffs current law to the assigned node to obtain the following KCL equation: deC eC C (5.7) +(1/L) + dt ?(eC-es)dt=0 R Note that the first term, the second term, and the third term of the equation are the currents flow-ing out of the node through the capacitor, the resistor, and the inductor, respectively. This equation describes the unique relationship between the voltage source voltage node, eC. The voltage eC will be determined by solving es and the voltage at the assigned the equation if esis given, and once eCis known, all the voltages and currents in the circuit can be easily determined. Meanwhile, by taking sCEC + Laplace transform of Equation 5.7, we havethe following transfer function: EC R + EC-Es sL =0 ? EC(s) Es(s) R = RLCs2 +Ls+ 110 5 5.2.3 Modeling of Electrical The Mesh Currents Systems Approach The circuit in Figure 5.4(b) will be employed in the following dynamic equations of the circuit using the mesh current example to demonstrate how to assemble approach. This circuit is exactly the same as those of Figure 5.2 and Figure 5.4(a), considered in Example 5.1 and Example 5.2, respectively. Example 5.3 (Mesh Currents Approach) First we assign a meshcurrent variable to each mesh. There aretwo meshesin the circuit shown in Figure 5.4(b). Thefirst meshis the loop consisting of the voltage source es,the inductor L, andthe capacitor C,and the second meshis the loop composed of the capacitor Cand the resistor R. Thesetwo mesh current direction. variables are denoted as i1 and i2, respectively, Then we apply Kirchhoffs equations: di1 1 C The left side of the first + mesh currents are in the clockwise meshesto obtain the following ?(i1-i2)dt=0 1 -es+Ldt drops around and both voltage law to the two C KVL equation in Equation KVL (5.8a) ?(i2-i1)dt+Ri2=0 mesh 1 clockwise, starting two (5.8b) 5.8a is the algebraic from the negative terminal sum of the voltage of the voltage source. The first term-es, thesecond termLdi1/dt, and thethird term (1/C)? (i1-i2)dt are thevoltage drops of the voltage source, the inductor, and the capacitor, respectively. Similarly, the left side of the second KVL equation, Equation 5.8b,is the algebraic sum of the voltage drops around mesh2 clockwise, starting from the bottom terminal of the capacitor. The mesh current variables i1 and i2 can be determined by solving the two and currents in the circuit For this particular equations if es is given; and, once i1 and i2 are known, all the voltages can be easily determined. circuit, the mesh currents approach employs two mesh current variables requiring two equations while the NTD voltages approach needs only one NTD voltage variable that only requires one equation. It seems that the NTD voltages approach is simpler than the meshcurrents approach, but this is not always the case. For some circuits, than the the mesh currents approach may require less equations NTD voltages approach. 5.3 BasicImpedance Circuit Modeling Approaches Recall that the e-i relationships eR(t) of the resistor, inductor, = RiR(t), eL(t) =L and capacitor, diL(t) dt , iC(t) respectively =C are deC(t) dt After the Laplace transform, the voltage-current relationships of the resistor, inductor, respectively, will be described by the following algebraic equations: ER(s) = RIR(s), EL(s) = sLIL(s), and IC(s) =sCEC(s) (5.9) and capacitor, (5.10) These equations can be further rewritten in the form of E-I relationship, described by generalized Ohms law : ER(s) = ZR(s)IR(s), EL(s) = ZL(s)IL(s), EC(s) = ZC(s)IC(s) (5.11 where 5.3 Basic Impedance Fig. 5.5: E-I relationship of fundamental two-terminal ZR(s) = R, ZL(s) =sL, Circuit Modeling Approaches 111 electrical elements in frequency domain. ZC(s) = 1/sC (5.12) are called the impedance of the resistor, inductor, and capacitor. The frequency-domain E-I charac-teristics of the fundamental two-terminal electrical elements are summarized in Figure 5.5. The impedance NTD voltages circuit and the modeling approaches mesh currents that the impedance circuit following more versatile in the generalized described in the previous domain. which the inductors, of the The difference is The frequency-domain the capacitors, approach and the resistors with the impedance are treated the same Ohms law. Example 5.4 (Find the Transfer Function EC(s)/Es(s) Using Impedance Consider the circuit in Figure 5.6(a). It can be seen that if currents in the circuit counterparts section. modeling approaches are carried out in the frequency domain while those in the previous section are done in the time concept is are basically the frequency-domain approaches can be easily derived. In the Manipulations) EC(s) is known, all the voltages and next subsection, we will use the impedance NTD voltages approach to solve for EC(s). But, here, we would like to show that the same objective can be achieved by applying a couple of simple impedance Fig. 5.6: (a) Impedance manipulations. NTD voltages approach, (b) Impedance mesh currents approach 112 5 Modeling of Electrical Systems First combine the ZC and ZRinto one impedance as ZRC according to the parallel combination law of impedances: 1 1 = ZRC 1 1 + ZR = ZC R +sC = RCs+1 R ? ZRC =RCs+1 R (5.13 Then the voltage divider law can be applied to obtain the transfer function EC/Es asfollows: EC(s) Es(s) Note that = ZRC +ZL the transfer system R RCs+1 ZRC = function discussed in R RCs+1+sL of the circuit Chapter = R is R = sL(RCs+1)+R mathematically (5.14) RLCs2 +Ls+R equivalent to the typical second-order 3. A Quiz Problem: Find a set of values for the inductor, capacitor, and resistor so that the system has a damping ratio ? = 0.7 with natural frequency ?n = 100rad/s. 5.3.1 The Impedance The impedance NTD Voltages Approach NTD voltages approach basically is the same asthe time-domain NTD voltages approach welearned in Section 5.2.2. The only difference is that the impedance approach is mucheasier,requiring only algebraic computation considered in Example the impedance approach. Example 5.5 (NTD or differentiations. example to demonstrate The circuit the advantage of Voltages Approach) in NTD voltages identical, with integrations 5.2 will be employed in the following Consider the circuit time-domain without the need to deal Figure 5.6(a), approach in but all variables which is exactly Example 5.2. are in frequency the same as the The procedure domain one we studied of setting as functions using the up equations is of s and all equations al-most are algebraic. As shown in Figure 5.6(a), the circuit has three nodes, and one of the three nodes, the negative terminal of the voltage source Es, is chosen as the datum. as Es since the node is the positive terminal The voltage at the of the voltage source upper-left Es. Hence, the only node is known unknown NTD voltage is EC,the voltage at the node that connects to ZL, ZC and ZR. Applying Kirchhoffs current law to the assigned NTD node, the algebraic sum of the three currents leaving the node should be zero: EC EC + ZC Note that the currents ZR flowing + EC-Es =0 ? ZL out of the NTD ? sC+ node into 1 R 1 + sL ? 1 EC = the capacitor sL Es (5.15) C, the resistor R, and the inductor LareEC/ZC, EC/ZR and (EC-Es)/ZL, respectively, according tothegeneralized Ohms law. Plugging the impedances, ZC = 1/sC, ZR = R, and ZL = sL into the KCL equation and movingthe Esterm to the right-hand side of the equation, we obtain the new equation arrow sign. This new equation leads to the following This transfer function is exactly side of the R EC(s) Es(s) on the right-hand transfer function: = RLCs2 +Ls+R the same as the one obtained by taking Laplace transform of Equation 5.7in Example 5.2. It is alsoidentical to the result obtained in Equation 5.14 based on simple impedance manipulations. 5.4 5.3.2 The Impedance The impedance Mesh Currents meshcurrents welearned in Section 5.2.3. considered advantage in approach of the impedance Example 5.6 (Impedance Consider the circuit time-domain Circuit basically is the same as the time-domain The only difference Example Approach for Modeling 113 Approach only algebraic computation The circuit The Lagrange is that the impedance meshcurrents approach is without the need to deal with integrations 5.3 will be employed in the following approach much easier, re-quiring or differentiations. example to demonstrate the approach. Mesh Currents Approach) in mesh currents Figure 5.6(b), approach in which is exactly the same as the Example 5.3. The procedure one of setting we studied using the up equations is almost identical, but all variables arein frequency domain as functions of s and all equations are algebraic. Asshown in Figure 5.6(b), the circuit hastwo meshes;hence,two clockwise meshcurrents I1 and I2 are assigned. Thefirst meshis the loop consisting of the voltage source Es,the inductor impedance ZL, and the capacitor impedance impedance ZC and the meshesto obtain two ZC, and the second resistor impedance mesh is the loop ZR. Now we apply composed Kirchhoffs of the capacitor voltage law to the two KVL equations: ZLI1+ZC(I1 -I2)-Es=0 (5.16) ZC(I2 -I1)+ZRI2 =0 which can be rewritten in matrix form as ??? ? ? ?ZL+ZC-ZC?? -ZC ZC+ZR To solve this = sL+ Es 0 1 sC -1 sC -1 1 sC sC +R ??? ?? I1 I2 = Es 0 (5.17) matrix equation for I1 andI2, ??? I1 I2 It is easy to verify that 5.14 and I1 I2 Equation sL+ = -1 1 sC -1 sC +R sC EC = I2ZR = I2R. 5.15, obtained ?-1 ?? 1 Es sC 1 = 0 RLCs2 +Ls+R Hence, the result is consistent using the impedance ? ? RCs+1 1 Es (5.18) with those shown in manipulations Equation and the impedance NTD voltages approach, respectively. 5.4 The Lagrange Approachfor Circuit Modeling As discussed in dynamic Chapter 4,the equations in the Lagrange approach mechanical system provides an elegant and efficient modeling process. The Lagrange way of constructing approach can also be applied to electrical systems in whichthe electric charge q andits derivative?q (the electric current) are considered as configuration variables. Recallthat the Lagrangian L(?q,q) is defined as L( ?q,q)=T( ?q,q)-U(q) (5.19) where T(?q,q) and U(q) are the total kinetic energy andthe total potential energy in the system, respec-tively. For electrical systems, T(?q,q) is the total kinetic energy stored in inductors, and U(q) is the total potential energy stored in capacitors. In addition to the energy stored in the inductors and capac-itors, the energy delivered by the voltage/current sources and the dissipated power in resistors ar 114 5 Modeling of Electrical Systems represented by dW, whichis the total virtual work done by all forces action through dq,a variation of the generalized coordinate vector: ? ?(dq) dW=QTdqor Q=?(dW) where Qis the generalized force vector. Withthe Lagrangian Q defined, the Lagrange equation is given as d ?L( ?q,q) ??q dt ?L( ?q,q) - ?q (5.20) L(?q,q) andthe generalized force vector = Q (5.21) In the following, we will usethe same circuit in Figure 5.2 or Figure 5.4, whichis redrawn in Figure 5.7, to demonstrate how the Lagrange approach can be employed to derive dynamic equations in elec-trical system modeling. Fig. 5.7: Circuit modeling using the Lagrange approach. As shown in Figure 5.7, the electric respectively, and their corresponding charges traveling around mesh 1 and mesh 2 are q1 and q2, meshcurrents are denoted by?q1 and?q2. The generalized coor-dinate ?T ?T and velocity vectors are q = ? q1 q2 and?q = ?q?1q?2 , respectively. The total kinetic en-1 ergy T(?q,q) = 0.5L?q2 is the kinetic energy stored in the inductor L, and the total potential energy U(q)=(0.5/C)(q1 -q2)2 isthepotential energy stored inthecapacitor C.The totalvirtualwork through dq from the contribution ofthe voltagesourceandthe dissipationin the resistor will be dW=esdq1 -R ?q2dq2 The generalized force vector is computed according to Q = ?(dW) ?(dq) = (5.22) Equation 5.20 as ?? es -R ?q2 (5.23) Now the Lagrangian is L( ?q,q)=T( ?q,q)-U(q) =0.5L ?q2 1 -(0.5/C)(q1 -q2)2 (5.24) Then according to the Lagrange equation in Equation 5.21, wehavethe following: 1 +(1/C)(q1 -q2) ?Lq-(1/C)(q1 ??-R?q2? -q2) es = Since?q1 = i1 and?q2 =i2, Equation 5.25 can berewritten asthe following: (5.25 5.4 Approach for Circuit Modeling (i1-i2)dt=es (i1-i2)dt=Ri2 Ldi1/dt (1/C) The Lagrange +(1/C) ? ? 115 (5.26) which is exactly the same as Equation 5.8, the dynamic equation obtained using the meshcurrents approach for the same circuit. Remark 5.7 (An Alternative Note that the Lagrangian Way of Addressing the Dissipated Power in used in the Lagrange equation, Equation Lagranges 5.21, consists Equation) of only the total kinetic energy and the total potential energy of the system. The consideration of the dissipated energy is included in the virtual generalized force vector An alternative work described in Q on the right-hand way of addressing Equation 5.20 and appears in Equation 5.21 as part of the side of the equation. this issue is to add one dissipated power term the total power dissipated in the system. Then the Lagrange equation will be slightly d dt ?? ?L ?q ?L - ?D + ?q ??q D to represent modifiedto: = Qs where Qsis the generalized external force vector acting onthe system. Example 5.8 (Use of the Modified Lagrange Equation With the Dissipated Power Term D) Here we will employ the same circuit in Figure 5.7, to demonstrate how to utilize the modified La-grange equation, Equation The generalized tively. 5.27 to assemble the dynamics coordinate and velocity system vectors are still model for electric q = ? q1 q2 The Lagrangian is also the same: circuits. ?T ?T and?q = ?q?1q?2 , respec-(5.27 1 -(0.5/C)(q1 -q2)2 L( ?q,q)=T( ?q,q)-U(q) =0.5L ?q2 The difference is the term ?D ? ??q added to the left-hand side of the equation, and the Qsterm on the right-hand including side now only consists of the generalized the forces that cause the dissipated external force vector acting on the system without power. Thetotal dissipated power of the system is the power dissipated in the resistor R, D = 0.5R?q2 2. The ?T ? ?? ? ? ?? ? ? ??(1/C)(q1-q2)? ?? generalized external force vector is Qs = ? es 0 . Since the current?q1flows out of the positive terminal of the voltage source, the positive voltage esis located at the first entry of the vector Qscorresponding to q1,?q1. Now,with the following key Lagrange differentials, ?L ?q = ?L ?q = ?L/? ?q1 ?L/? ?q2 = ?L/?q1 ?L/?q2 = Lq1 ? , 0 ?D ?q = ?D/? ?q1 ?D/? ?q2 -(1/C)(q1-q2) , Qs = 0 = ?q2 R Then, from the Lagrange equation, Equation 5.27, we have the dynamics circuit as follows: 1 +(1/C)(q1 -q2)??? ?Lq-(1/C)(q1 -q2)+R ?q2 es = As expected, the result is identical to that shown in regular Lagranges equation, Equation 5.21. 0 (5.28) es 0 model equation for the (5.29) Equation 5.25, which was obtained based on the 116 5 Modeling of Electrical In the following, we will Systems work on two more circuit modeling examples Thefirst is the circuit on Figure 5.8a, which consists of four nodes, two resistor, one inductor, electrical system. If and two capacitors. we choose to use the to the negative terminal two meshes,one voltage source, one many ways to assemble a dynamics NTD voltages approach, by which the two are found, the voltage and current current law will be applied to these two NTD voltage variables can be solved. of each element in the circuit Fig. 5.8: More examples on circuit model for the we would select the node connecting of the voltage source as the datum, and assign the two capacitor NTD voltages. Then Kirchhoffs KCL equations There are using the Lagrange approach. voltages as the NTD nodes to yield two Once these two NTD voltages can be easily derived. modeling using the Lagranges equation approach. If the meshcurrents approach is selected, we would assign a meshcurrent variable for each mesh, and apply solving Kirchhoffs voltage law to assemble two these two equations to obtain the two KVL equations in terms mesh currents, of these two variables. all the voltages and currents After can be easily computed. Both of the NTD voltages approach and the meshcurrents approach are carried out based on the circuit geometry and the interactions among the components, like the Newtonian approach for mechanical systems does not require does require modeling. detailed differential The Lagrange information approach of the geometry calculus computations, is quite different. and interactions It is energy based that among the components. It but they are quite straightforward. Two versions of the Lagrange equations are included in this Chapter. Thesetwo versions are basically identical. The only difference is in how the dissipated power and the generalized force vector Q are included in the equation. The dissipated powerterm ?D ? ??q andthe generalizedforce vector Qare explicitly included in Equation 5.27, while in Equation 5.21 the information of power dissipation and the generalized force vector Qis included in the virtual work. Either version will do the job. Example 5.9 (Apply the Lagrange Approach to the Circuit on Figure 5.8a) There are two meshesin the circuit. Assume mesh1 is on the left and mesh2 is on the right. The electric charges traveling around mesh1 and mesh2 are q1 and q2,respectively, and their correspond-ing meshcurrents are denoted by?q1 and?q2. Both meshcurrents are assumed in clockwise direction. Although the meshcurrent direction can be assigned arbitrarily, it is better to follow the convention whenever possible to avoid confusions. Since the positive current direction is assumed flowing out of the positive terminal of voltage source according to the convention rules shown in Figure 5.1, the mesh 1 current should be in the clockwise direction. ?T ?T The generalized coordinate and velocity vectors are q = ? q1 q2 and?q = ?q?1q?2 , respectively. Thetotal kinetic energy is stored in the inductor L, which is T = 0.5L?q2 2. Total potential energy of the 2 in whichthe first term is contributed by the capacito system isU=0.5(1/C1)(q1 -q2)2+0.5(1/C2)q2 5.4 The Lagrange Approach for Circuit Modeling 117 C1 and the second term is by C2. Hence the Lagrangian is L= T-U =0.5L ?q2 2 -0.5(1/C1)(q1 -q2)2-0.5(1/C2)q2 (5.30) 2 The total power dissipation is from the resistor R, which is D = 0.5R ?q2 1. The differentials and the generalized force vector involved in the Lagrange equation can befound as ?L ?q = ?L ?q = ? ?? ? ? ?? ? ? ??(1/C1)(q1 ? ?? -q2)-(1/C2)q2 ?L/? ?q1 ?L/? ?q2 0 = ?L/?q1 ?L/?q2 ?q2 L ?D , ?q = ?q1 R ?D/? ?q1 ?D/? ?q2 = -(1/C1)(q1 -q2) = 0 , Qs = 0 Then, according to the Lagrange equation in Equation 5.27, we havethe following the electric circuit: dynamics modelfor -q2)+R ?q1 ?(1/C1)(q1 ??? q2-(1/C1)(q1 L -q2)+(1/C2)q2 (i1-i2)dt ??? ? (i1-i2)dt +Ldi2 es = (5.31) es (5.32) 0 This equation can be rewritten in terms of the meshcurrents i1 and i2 asfollows: Ri1 +(1/C1) es ? dt +(1/C2) -(1/C1)? ? i2dt = (5.33) 0 The next circuit to be considered is shown in Figure 5.8b, which consists of five nodes,two meshes, one voltage source, one resistor, two inductors, andtwo capacitors. Sincethere arefive nodes, if the NTD voltages approach werechosen to solve the circuit problem, then three NTD voltage variables needto be assigned and three KCL equations would haveto be set up and solved. Onthe other hand, the circuit has two meshesthat requires approach only two will be more efficient KVL equations. than the Hence, for this NTD voltages particular circuit, the mesh currents approach. Example 5.10 (Apply the Lagrange Approach to the Circuit on Figure 5.8b) There are two meshes in the circuit. electric charges traveling around Assume mesh 1 and mesh 1 is on the left and mesh 2 is on the right. mesh 2 are q1 and q2, respectively, and their The corresponding meshcurrents are denoted by?q1 and?q2. Mesh1 current direction is assigned to be in the clockwise direction to matchthe polarity of the voltage source. Mesh2s current direction is also assumed to be in the clockwise direction. The generalized coordinate and velocity vectors are q = ? q1 q2 ?T ?T and?q = ?q?1q?2 , respectively. 1 + 0.5L2?q2 2. The total The total kinetic energy stored in the two inductors L1 and L2 is T = 0.5L1?q2 potential energy of the system is U = 0.5(1/C1)q2 1 +0.5(1/C2)q2 2. Hence,the Lagrangian is 1 +0.5L2?q2 L=T-U=0.5L1 ?q2 2 -0.5(1/C1)q2 1 -0.5(1/C2)q2 2 (5.34) The total virtual work done by the generalized forces, including the applied power sources and the internal onesto cause power dissipation, are dW=esdq1 -R( ?q1 -?q2)(dq1 -dq2) The differentials and the generalized force vector involved in the Lagrange equation (5.35) can be found a 118 5 Modeling of Electrical ?L Systems ? ?? ? ? ?? ? ?q1 -?q2) ? ??es-R( ? R( ?q1 -?q2) ?L/? ?q1 ??q = ?L/? ?q2 = Lq1 ? , ?q2 L ?q = ?(dW)/?(dq1) ?(dW)/?(dq2) Q = ?(dW) ?(dq) = ?L/?q1 ?L -(1/C1)q1 = ?L/?q2 -(1/C2)q2 (5.36) = Then according to the Lagrange equation in Equation 5.21, we havethe following for the electric circuit. dynamics ?q1-?q2) ? ? ??esR(-R( ?q1 -?q2) ?L2di2/dt ??? L1di1/dt +R(i1 -i2)+(1/C1)? i1dt -R(i1 -i2)+(1/C2) L1 q1 L2 q2 This equation can be rewritten +(1/C1)q1 +(1/C2)q2 in terms of the (5.37) = mesh currents i1 and i2 as follows, es ? = i2dt 5.5 Circuit model (5.38) 0 Modeling Usingthe State-Space Approach Dynamic systems can be described by differential equations, transfer functions, or state-space represen-tations. Due to the recent rapid theory, more and advancement more sophisticated control of computing systems tools are required and the state-space to be analyzed control systems and designed using state-space approaches, and therefore the state-space representation of systems has become increasingly important. Although a state-space representation can be obtained from differential equations or transfer functions, it is morefavorable if a state-space representation can be directly constructed in the modeling process whenthe meaningful physical variables like displacements and velocities can be easily selected as state variables. Fig. 5.9: Circuit modeling using the state-space approach. For electrical systems, the order of the system or the number of state variables in the system is determined by the number of energy-storing elements in the circuit. As mentioned earlier, inductors store kinetic energy T = 0.5Li2L in magneticfields, and capacitors store potential energy U = 0.5Ce2 Cin electric field. Hence,it is natural to select the currents of inductors and the voltages of capacitors as state variables. NTD voltages The circuit approach, the shown in Figure 5.9 has been employed mesh currents approach, and the several times to demonstrate Lagrange approach. the We will also use this circuit to demonstrate how to assemble state-space modelsfor electrical systems by directly using the state-space modeling approach 5.5 Example 5.11 (State-Space Modeling of the The circuit in Figure 5.9 has three Circuit Circuit nodes, Modeling on Figure marked as red dots Using the State-Space Approach 119 5.9) with numbers 1, 2, and 3 for ease of reference. Thereis one inductor L between node 1 and node 2, a parallel combination of one capacitor C,and one resistor Rconnected between nodes 2 and 3, andfinally one voltage source between nodes 1 and 3 with node 1 asthe positive terminal. The current iL of the inductor L and the voltage eC of the capacitor C are chosen as the two state variables of the system. To construct the state equations associated with the inductor current iL, Kirchhoffs voltage law is employed to obtain a KVL equation around the loop 1-2-3-1, consisting of the inductor L. According to Kirchhoffs voltage law, the algebraic sum of the voltage drops around the loop 1-2-3-1 is zero. That meansthe voltage drop from node 1 to node 2, LdiL/dt, should be equal to the algebraic sum of the voltage drops along the other path 1-3-2, which ises-eC. Hence, we have theKVL equation inthefollowing, diL(t) L =-eC(t)+es(t) dt Meanwhile, Kirchhoffs current law is applied to give a KCL equation at node 2, whichis connected to the capacitorC. According to Kirchhoffs current law, the algebraic sum of the currents of all the three branchesleaving node 2is zero. That means the currentleaving node 2 via capacitorC, CdeC/dt, should be equal to the algebraic sum of the currents entering node 2 via the inductor L and via the resistor R, which isiL +(-eC)/R. Hence, we have theKCL equation inthefollowing: deC(t) C dt 1 =iL(t)- ReC(t) These KVL and KCL equations can be rewritten as follows in the standard equation, iL 1/L diL/dt es + = eC 0 deC/dt matrix form of state 0 -1/L ?? ?? ? ? ??1/C-1/(RC) In general, the state-space representation or state-space (5.39) model of a system is described x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) by (5.40) wherethe first equation is called the state equation, andthe second is the output equation. The vectors x(t) and u(t) are the state vector and the input vector of the system, respectively, and y(t) is the output vector consisting of the variables of interest. Forthe circuit example considered above, the state vector, input vector, the A and B matricesare x(t) = ?? iL(t) eC(t) , If eC(t) is the variable of interest u(t) = es(t), (i.e., y(t) A = approach we will work on two , B = 1/L 0 (5.41) = eC(t)) then the C and D matrices in the state-space model will be C = ? 0 1 ? and D = 0. The state-space casesis referred as (A,B,C,D) for convenience. In the following, 0 -1/L ? ? ? ?1/C-1/(RC) more circuit model described modeling examples in Equation 5.40 in using the state-space many model-ing 120 5 Modeling of Electrical Systems Fig. 5.10: Morestate-space modeling approach examples. Example 5.12 (State-Space Modeling of the Circuit on Figure 5.10a) The circuit in Figure 5.10(a) has four nodes, marked as red dots with numbers 1, 2, 3, and 4 for ease of reference. There is one inductor L between node 2 and node 3, and two capacitors with C1 between node 2 and node 4, and C2 between node 3 and node 4. There also exists one resistor R connected be-tween nodes 1 and 2, and one voltage source between nodes 1 and 4 with node 1 as the positive terminal. The current iL of the inductor L and the voltages eC1and eC2of the capacitorC1 andC2, respec-tively, are chosen asthe three state variables of the system. To construct the state equations associated with the inductor current iL, Kirchhoffs loop 2-3-4-2, Kirchhoffs consisting Voltagelaw is employed to obtain a KVL equation around the of the inductor Voltage law, the algebraic L, the capacitor C2, and another sum of the voltage capacitor drops around the loop C1. According to 2-3-4-2 is zero. That meansthe voltage drop from node 2to node 3, LdiL/dt, should be equal to the algebraic sum of the voltage drops along theother path 2-4-3, which iseC1-eC2. Hence, wehave theKVL equation inthe following: L Meanwhile, Kirchhoffs diL(t) =eC1(t)-eC2(t) dt current law is applied to give two KCL equations: one at node 2, which connects to C1,and another at node 3, whichis connected to the capacitor C2. According to Kirchhoffs current law, the algebraic meansthe current leaving sum of the currents of all the three branches leaving node 2 is zero. That node 2 via capacitor C1, C1deC1/dt, should be equal to the algebraic sum ofthecurrents entering node 2viatheinductor Land viatheresistor R,which is -iL +(es -eC1)/R. Hence, we havethe KCL equation in the following: C1 deC1(t) dt =-iL(t)+ es(t)-eC1(t) R Similarly, the algebraic sum of the currents of all the two branchesleaving node 3is zero. That means the current leaving node 3 via capacitor C2, C2deC2/dt, should be equal to the current entering node 3 via the inductor L, whichis simply iL. Hence, we have the KCL equation in the following: C2 deC2(t) dt The one KVL equation and two matrix form: = iL(t) KCL equations can now be combined into one state equation i 5.5 ? ?? ? ?=? diL/dt deC1/dt deC2/dt The next circuit Circuit Modeling -1/C1-1/(RC1)0 1/C2 to be considered 0 is shown 0 in Figure State-Space Approach 121 ?? ?? ? ?? ?+ ? ?es 1/L -1/L 0 Using the iL eC1 eC2 5.10(b), 0 1/(RC1) 0 (5.42) which consists of five nodes, two meshes,one voltage source, one resistor, two inductors, andtwo capacitors. Example 5.13 (State-Space Modeling of the The circuit in Figure 5.10(b) ease of reference. has five There are two inductors Circuit nodes, on Figure 5.10(b)) marked as red dots with L1 between with numbers 1, 2, 3, 4, and 5 for node 1 and node 2, and L2 between node 2 and node 3. Atthe bottom of the diagram, there are two capacitors with C1 between node 4 and node 5, and C2between node 5 and node 3. There also exist one resistor Rconnected between nodes 2 and 5, and one voltage source between nodes 1 and 4 with node 1 as the positive terminal. The two currents iL1 and iL2 of the inductors L1 and L2, respectively, and the two voltages eC1 and eC2 of the capacitor C1 and C2,respectively, are chosen asthe four state variables of the system. To construct the state equation associated with the inductor current iL1, Kirchhoffs voltage law is employed to obtain a KVL equation around the loop 1-2-5-4-1, consisting of the inductor the resistor algebraic R, the capacitor sum of the voltage C1, and the voltage source drops around the loop es. According 1-2-5-4-1 to is zero. That Kirchhoffs L1, voltage law, the meansthe voltage drop from node 1to node 2, L1diL1/dt, should be equalto the algebraic sum of the voltage drops alongthe other path 1-4-5-2, which ises-eC1 +(iL2-iL1)R. Hence, we have thefirstKVL equation inthefollowing: L1 diL1(t) =-RiL1(t)+RiL2(t)-eC1(t)+es(t) dt To construct the state equation associated with the inductor current iL2, Kirchhoffs voltage law is employed to obtain a KVL equation around the loop 2-3-5-2, consisting of the inductor L2,the capacitor C2, and the resistor R. According to Kirchhoffs voltage law, the algebraic sum of the voltage drops around the loop 2-3-5-2 is zero. That meansthe voltage drop from node 2to node 3, L2diL2/dt, should beequal tothealgebraic sum ofthevoltage drops along theother path 2-5-3, which isR(iL1-iL2)-eC2. Hence, we havethe second KVL equation in the following: L2 diL2(t) dt =RiL1(t)-RiL2(t)-eC2(t) Meanwhile, Kirchhoffs current law is applied to give two KCL equations: one at node 4, which connects to C1,and another at node 3, whichis connected to the capacitor C2. According to Kirchhoffs current law, the current entering node 4 via capacitor C1, C1deC1/dt, should be equal to the current leaving node 4 for the voltage source es, which is iL1. Similarly, the current flowing through the capacitor C2, C2deC2/dt, should be equal to the current through L2, which is iL2. Hence, we have the two equations KCL in the following: C1 Thetwo KVL and two deC1(t) dt = iL1(t), C2 deC2(t) dt =iL2(t) KCL equations can now be combined into onestate equation in matrix form 122 5 Modeling of Electrical Systems ? ??R/L2-R/L2 ?? ?? ? ? ?=?1/C10 0???+??es ? ? diL1/dt diL2/dt deC1/dt deC2/dt -R/L1 R/L1 -1/L1 0 0 ? ? ? ? 0 1/C2 0 Remark 5.14 (Significance of the State-Space As mentioned early in the beginning become increasingly important control regarding systems theory. the state-space 0 1/L1 ? ? ? ? 0 iL1 iL2 eC1 eC2 ? ? ? ? 1/L1 0 0 0 (5.43) ? ? Model) of this section, the state-space representation of systems has due to the recent rapid advancement of computing tools and the state-space Although concept, we have not yet officially state equation solutions, introduced and state-space the fundamental control theory system analysis and design, we did start to employ the state-space modelsto conduct stability analysis, stabilizing controller design, and computer simulations for the simple inverted pendulum system in the previous chapter, Chapter 4. It is clear that the state-space model control system analysis and design is important and will be one of the main emphases of the book. 5.6 Operational Amplifier Circuits The operational amplifier, usually called op amp, is an almost ideal electronic amplifier due to its large voltage gain, high input impedance, and low output impedance. Theseproperties are significant in two aspects. First, it virtually has noloading effect, which makesthe op amp circuit a perfect building block in an interconnected operating interconnected system. The op amp circuit system. Secondly, these three will preserve its performance properties in any normally are the foundation that lead to the development of the virtual short concept approach for the op amp circuit analysis and design. Fig. 5.11: Equivalent circuit of the op amp. The virtual-short concept of op amp circuits, approach which otherwise has made it possible to greatly would be extremely simplify complicated. the analysis and de-sign Dueto these two reasons, the op amp has become one of the most versatile and widely used electronic devices. The op amp cir-cuits can perform a variety of functions like signal addition, substraction, integration, detection, am-plification, filtering, disturbance cancelation, The symbol one output, binarytodecimal conversion, decimaltobinary conversion, and common-mode and so on. of the op amp in Figure 5.11 shows that the op amp has two inputs, eo. Note that the common reference terminal and the DC power supply eA and eB, and do not show on the symbol. Thereal circuit inside the op amp chip consists of numerous transistors and other components; however, it is not a concern for users. A muchsimpler equivalent circuit is shown on the right-hand sid 5.6 of the figure. The op amp is basically afour-terminal the ground. The voltages at the input terminals input impedance between the two input is assumed flowing at the terminal into terminal device. One terminal Amplifier Circuits is the common 123 reference, A and B are represented by eA and eB,respectively. terminals A. The output with respect to the ground. Operational is ri, and the terminal is positive input marked Between the output terminal current with eo as the ii or The direction output voltage and the ground there is a series combination ofadependent voltage source, K(eB -eA), and theoutput resistor, ro,where Kisthe voltage gain. If wefollow the traditional circuit analysis and design approach, in Figure 5.11 as a model of the op amp and set up KVL and mesh currents, or the state-space modeling approaches. we would use the equivalent KCL equations The equations using the circuit NTD voltages, would be complicated even for asimple circuit, butthey can begreatly simplified byletting K?8,ri ?8,and ro ?0.The virtual but the difference is that it will carry out short concept approach also utilizes the approximations, approximations before the equations are set up. Now, from theequivalent circuit inFigure 5.11, with theaccompanied approximations, K?8, ri ?8,and ro ?0,wewillsee thefollowing intriguing properties oftheopamp. Theorem 5.15 (Virtual Short Concept) From the equivalent circuit in Figure 5.11, it is easyto deduct the following statement: I f ri~= 8,ro~=0, K~= 8, then ii~=0 andeA ~=eB If the input impedance ri is virtually infinity, then the current flowing meansthe circuit between the two input terminals right side ofthe equivalent circuit, through A and Bis virtually the output impedance ro is virtually (5.44) ri is virtually open circuit. zero, which Meanwhile, on the zero; hence, the output voltage eo willbevirtually equal toK(eB-eA). Since thevoltage gainKisvirtually infinity and theoutput voltage eoisfiniteatthesame time, theonlypossibility isthat(eB-eA)has tobevirtually zero. That is,the circuit betweenthe two input terminals A and Bis virtually short circuit. Therefore, the circuit between the two input terminals A and Bis virtually open circuit and short circuit at the same time! The virtual short concept seems to be a paradox becauseit is impossible for a circuit to be open circuit and short circuit at the same time. However, it is true that the circuit between the two input terminals A and B of the op amp is virtually open circuit and virtually short circuit at the same time. Remark 5.16 (A Subtle but Big Difference It is easy to get confused Between with these two terms, Short virtual Circuit and short circuit Virtual Short and short circuit. Circuit) Short circuit meansthat the voltages of the two terminals A and B are equal and at the same time the resistance be-tween these two terminals is zero. Onthe other hand, virtual short circuit simply meansthat the electric potentials, or the voltages, eA and eB, are virtually identical, but the resistance between terminals A and Bis virtually infinite. The difference is big, although it seems subtle. In this section, we will employ a few op amp circuits to demonstrate how to utilize the virtual short concept to assemble equations for modeling op amp circuits. Thefirst example is the general inverting amplifier circuit shown in Figure 5.12. Example 5.17 (Virtual Short Concept Approach for the Inverting The op amp circuit in Figure 5.12 is a general inverting amplifier, Amplifier Circuit) wherethe two impedances blocks Z1(s) and Z2(s) can be any combination of capacitors, inductors, andresistors. Owingto the virtual shor 124 5 Modeling of Electrical concept, the current Kirchhoffs Systems iA flowing into terminal A of the op amp is virtually zero; hence, according current law, the algebraic sum of the two currents flowing into terminal to A should be zero. Hence I1(s)+I2(s) (5.45) =0 Fig. 5.12: General op amp inverting amplifier. Based onthe virtual short concept again, the two voltages eA and eB are virtually identical, which meansterminal Ais virtually connected to the ground as shown in the figure by a dotted ground sign. Hence,the current I2 is Eo/Z2 according to the generalized Ohms law. Similarly, I1 = Es/Z1. Therefore, we havethe following transfer function of the circuit: Es(s) Z1(s) Eo(s) + Z2(s) =0 ? Eo(s) Es(s) = -Z2(s) (5.46) Z1(s) Wehave just experienced the effectiveness of the virtual short concept approach and weresurprised by how ridiculously simple the problem had become. It seems that we had done something unlawful to connect terminal A to the ground and ignored the existence of the op amp. Of course, the virtual short concept has been proved and the procedure is legitimate. To be moresure about this, wecan employ another approach to the same circuit problem to double check the result. In the next example, we will employ the traditional equivalent circuit approach to assemble the equations and obtain the transfer function for the same circuit Example 5.18 (Traditional of Figure 5.12. Approach for the Inverting Amplifier Circuit) After replacing the op amp in the inverting amplifier circuit of Figure 5.12 by its equivalent circuit shown on the right-hand set up the equations The circuit side of Figure 5.11, without applying shown in Figure 5.13 has three assemble the equations for the circuit, three we have the circuit approximations diagram shown in Figure 5.13. We will until the last step. meshes. If the mesh current we would have to set up three KVL approach were selected to mesh equations to solve for meshcurrent variables. Onthe other hand, the circuit hasfive nodes: (1) The one at the bottom of the diagram is selected as the ground reference; (2) Two are the positive terminals of the input volt-age source Esand thedependent voltage source K(eB -eA); and (3)There areonly twoNTD voltage variables needed to be assigned, and only two KCL NTD equations are required to solve for these two unknown voltage variables. Thesetwo NTD voltages are Eo,the output, and EA,the voltage at terminal A. Applying Kirchhoffs current law at terminal A will yield the following KCL equation 5.6 Es-EA+ Eo-EA= Z1 Similarly, at the output terminal Amplifier Circuits 125 EA Z2 O we have another Operational ri KCL equation as Eo-EA Eo-K(0-EA)= 0 + Z2 ro Fig. 5.13: Equivalent circuit of the general op amp inverting amplifier. Note that the terminal Bis connected to the ground; hence, EB has been replaced by zero in the equation. After eliminating EA,the two equations will reduce to the following: Es Z1 Eo + Z2 ? 1 = Z1 1 + 1 Z2 + ri ?? ? ro-KZ2 ro +Z2 Eo Now, apply approximations letting K?8,ri ?8,and ro ?0.Then we have Es(s) Eo(s) Eo(s) = -Z2(s) + =0 ? Z1(s) Z2(s) Es(s) (5.47) Z1(s) As expected, the result matchesthe one obtained using the virtual short concept approach. only difference is that the traditional approach is more tedious and complicated. Example 5.19 (Inverting Amplifier and Integrator As mentioned earlier, the Z2 and Z1impedance in Figure 5.12 can be any combination of resistors, The Circuits) blocks of the general inverting capacitors, and inductors. amplifier circuit shown If the impedances blocks are chosen to be Z2 = R2and Z1 = R1,then the output voltage will be equal to Eo(s) = -R2Es(s)? eo(t)= -R2 es(t) R1 R1 (5.48) The circuit can serve as a voltage amplifier if R2is chosen to belarger than R1. If the impedances blocks are chosen to be Z2 = 1/(sC) relationship and Z1 = R,then the input-output voltage will be Eo(s) = It is clear that the circuit -(1/sC)Es(s) R = -1 sRC performs integration. Es(s)? eo(t) = -1 RC ? es(t)dt (5.49 126 5 Modeling of Electrical The general inverting Example 5.20 (PID Systems amplifier circuit Analog Controller can also be employed to implement a PID analog controller. Circuits) In Figure 5.12, assume the impedance block Z2 is a series combination capacitor C2. Meanwhile, Z1is a parallel combination of a resistor of a resistor R1 and a capacitor R2 and a C1. Thus, we have the impedances Z2 and Z1 as follows: Z2 = R2 + R2C2s+1 1 = Then combine the two equations together Es = -Z2 Z1 =- ? Z1 1 + R1C2 R1C2s ? Therefore, the circuit can be employed +R2C1s ? amplifier to implement ?:=- ?KP+KI +KDs? 1 s +KD des(t) the function dt (5.50) ? of proportional, integral, and control. Note that for those circuits change, R1C1s+1 R1 R1 es(t)dt eo(t)=- KPes(t)+KI derivative +sC1 = with Equation 5.46 and we have R1C1 +R2C2 That is, 1 = sC2 sC2 Eo 1 and which constructed may not be favorable. using the inverting This issue can be fixed amplifier structure, there always is a sign by cascading the circuit by another inverting with unit gain. It is also possible to design a noninverting amplifier based onthe op amp circuit configuration shown in Figure 5.14. Example 5.21 (General Non-Inverting Amplifier Circuit) The op amp circuit in Figure 5.14 is a general noninverting amplifier, where the two impedances blocks Z1(s) and Z2(s) can be any combination of capacitors, inductors, and resistors. Fig. 5.14: Owing to the virtual General op amp noninverting short concept, the current iA flowing amplifier. into terminal A of the op amp is virtually zero; hence, according to Kirchhoffs current law, the current flowing into terminal A via Z2 should be the same as the current leaving terminal A via Z1into the ground. Meanwhile, the virtual short concept implies that the voltage at terminal Ais virtually equal to Es, which is connecting to the terminal B. Thus, we hav 5.6 Eo-Es= Z2 and the transfer function from Es Eo ? Z1 Z2 Es = Es + Z1 Operational Z2 Z1 +Z2 = Z1Z2 1+ Z2(s) Fig. 5.15: Amplifier op amp summing (5.51) Z1(s) The next op amp circuit to be considered is a summing amplifier, and substraction of signals. Consider the 127 Es ? ? = Es(s) 5.22 (Summing Circuits Es(s) to Eo(s) is Eo(s) Example Amplifier Op amp summing which can perform the addition amplifier. Circuit) amplifier circuit in Figure 5.15. The terminal A of the op amp is connected to four resistors, R2, R1a, R1b,and R1c.In addition, it is also virtually connected to the ground according to the virtual short concept condition. Since the current flowing into the terminal A of the op amp is virtually zero, the algebraic sum of the four currents from the four resistors entering into the terminal A node (the ground) is zero according to Kirchhoffs current law. eo R2 e1a + R1a e1b + R1b e1c + R1c =0 Therefore, the output eo(t) is the algebraic sum of the three incoming ? e1b(t) e1a(t) eo(t)=-R2 R1a + R1b e1c(t) + R1c ? weighted signals, (5.52) Thefollowing op amp circuit is a differential amplifier, which can be employed to eliminate the common-mode disturbances during signal transmission. There are two input signals, but only the difference of the two signals will affect the output. Example 5.23 (Differential Amplifier Circuit) Consider the op amp differential amplifier circuit in Figure 5.16. Onthe upper half of the circuit diagram, the terminal A of the op amp is connected to the first input e1 and the output eo via resistors R1 and R2,respectively. Onthe bottom half of the circuit diagram, the terminal B of the op amp i 128 5 Modeling of Electrical Systems Fig. 5.16: Opamp differential amplifier. connected to the second input e2 and the ground via another set of resistors According to the virtual short concept, the current flowing into terminal op amp is virtually the terminal zero. Hence, the algebraic sum R2, respectively. from e1 and from B of the eo entering A node is zero, e1-eA+ eo-eA=0 ? R1 R2 Similarly, of the two currents R1 and A or out of terminal the algebraic sum of the two currents ? ? e1 1 R1 - from R1 e2 R1 - eA + R2 e2 and from B node is zero, e2-eB+ -eB R2 =0 ? R1 1 + eo R2 the ground =0 entering ? ? 1 R1 1 + R2 eB = 0 From the two equations and the fact that the two voltages eA and eB are virtually following differential amplifier input-output relationship: eo(t) = R2 R1 the terminal equal, we have the (e2(t)-e1(t)) (5.53) 5.7 DC Motor Recall that in dynamic Figure 2.1, the system examples. DC motor system Some students was considered as one of the three typical might have been wondering first-order how it can be possible since the DC motorseemsto be a complicated system, consisting of an electric circuit and arotational mechanical system. Indeed, the internal structure andthe detailed theory explaining how it works may be alittle bit complicated, input but in control most of the applications voltage can be described the relationship by a first-order between the differential angular velocity and the equation. A schematic diagram of a DC motor system is shown in Figure 5.17. Onthe right-hand side of the diagram is a rotational mechanical system including the gear train and the load that consists of the moment of inertia J? and the rotational damper B?. Onthe left-hand side of the diagram is the DC motor, whose dynamic behavior will be determined by a circuit equation involving ea, La, Ra, and eb, and a mechanicalequation of motioninvolving tm, Jm, and Bm. Before westartto assemblethe equations, we will digress a little bit to refresh our memory on some relevant fundamental electromagnetism learned from high school physics courses we 5.7 Fig. 5.17: 5.7.1 Amperes Force Law and Faradays DC Motor 129 DC motor system. Law of Induction Thefirst relevant electromagnetism law is Amperes force law regarding the interaction between two electric wires with currents. Should this sound familiar with the name Ampere? Yes,it is the unit of electric current named after Andre-Marie Ampere, one of the greatest pioneers in electromagnetism. Amperes force law was discovered in 1825, which revealed that the two parallel electric wires would experience forces after being energized with electric currents. The forces would either attract the two wiresto each other or do the opposite, expel each other, depending on the relative current directions. It was a great discovery that manifested the possibility of converting electrical energy into mechani-cal energy. The DC motoris equipped with two wound-up electric coils. Thefirst coil is called the field coil that is fixed in the structure andis driven by a constantcurrent If to generatea constant magneticflux Ff= kfIf. Thesecondcoil, calledthe armature coil, is woundaroundthe motorrotor, whichis designed to be ableto rotate inside the magneticfield provided by Ff. Therotor will rotate whenthe armature coil is energized. Therotor torque is proportional to both the magneticflux Ff and the armature current ia(t), tm(t) =c1Ffia(t) := Kmia(t) ? Tm(s) = KmIa(s) (5.54) where Tm(s)andIa(s) arethe Laplacetransforms of tm(t) andia(t), respectively. This constant Kmis called the torque constant, which usually is available on the data sheet of the DC motor. The second relevant electromagnetism law we need to review is Michael Faradays law of elec-tromagnetic induction, which in the year of 1831 revealed how the variation of magnetic flux will produce an electromotive force (EMF). This discovery is as significant as Amperes force law, if not greater. Thelaw of induction is the underlying principle of the AC electric generators that convert mechanical power like steam, hydraulic, or even nuclear power into electric power. In addition, many other important the inductors, inventions like the induction the AC voltage transformers, motors, the solenoids, the and radio AC electric power trans-missions, wireless communications, would not be possible without the knowledge of electromagnetic induction. Now, back to the DC motor schematic diagram in Figure 5.17, there is a back EMF (electromotive force) voltage eb developed across the two terminals of the DC motor. This back EMF is caused by the variation of the magneticflux the armature coil has received. Although the field magneticflux Ff is constant, the magnetic flux received by the armature is moving. Theback EMF voltageebis proportionalto eb(t) = c2Ff?m(t) := Kb?m(t) coil is a function of time since the motor rotor Ff andthe angularvelocity of the rotor, ?m(t), ? Eb(s) = KbOm(s) (5.55 130 5 Modeling of Electrical Systems whereEb(s)and Om(s)arethe Laplacetransforms of eb(t) and ?m(t), respectively. This constant Kbis called the back EMF constant, 5.7.2 Assembling In the schematic whichis usually available on the data sheet of the DC motor. Equations for the DC Motor System diagram of the motor system in Figure 5.17, there is an electric circuit loop on the left-hand side of the diagram. Thisloop includes the control-input voltage source ea(t), the inductor La,the resistor Ra,and the back EMF voltage eb(t). Applying Kirchhoffs voltage law, we havethe following KVL equation: La Taking Laplace transform, dia(t) +Raia(t)+eb(t) dt this equation = ea(t) becomes sLaIa(s)+RaIa(s)+Eb(s) Now, on the right-hand by the side of the diagram in DC motor is employed = Ea(s) Figure to drive a rotational 5.17, we can see that the torque mechanical system discussion of gear train in Section 4.3, we havethe equivalent (5.56) via the gear train. generated Based on the moment of inertia Je andthe equivalent rotational friction coefficient Befrom the perspectiveof tm asfollows: Je = Jm+ Then the equation for the rotational ??2 N1 J?, N2 Be = Bm+ ??2 N1 B? N2 (5.57) motion is given by (Jes+Be)Om(s) (5.58) = Tm(s) where Om(s)and Tm(s)arethe Laplacetransforms of ?m(t) andtm(t), respectively. The electrical circuit equation, Equation 5.56, and the mechanical rotational motion equation, Equation 5.58, are coupled to each other via the torque equation, Equation 5.54 and the back EMF equation, Equation 5.55. Thesefour equations are combined to yield the following: sLaIa(s)+RaIa(s)+KbOm(s) = Ea(s) (5.59) (Jes+Be)Om(s) In many applications, to the impedance the impedance of the resistor, = KmIa(s) of the inductor R; hence, the first Ia(s) = sLa is negligible equation since it is very small compared of Equation 5.59 can be rewritten Ea(s)-KbOm(s) as (5.60) Ra Substitute this expression for Ia(s) in the second equation of Equation 5.59to yield the following trans-fer function between the control-input voltage source Ea(s) and the angular velocity of the DC motor system, Om(s). Om(s) Km b ?ss (5.61) = = = RaJes+BeRa +KmKb s+a ts+1 Ea(s) wherethe parameters a, b, time constant t, and the steady-state step response ?ss,are given asfollows: a = BeRa +KmKb RaJe Be = Je + KmKb , RaJe b = Km , RaJe t = 1 a , ?ss = b a (5.62 5.7 5.7.3 Torque-Speed DC Motor 131 Relationship Some DC motor manufactures mayinclude the torque-speed relationships or graphs onthe datasheet of the DC motor. The torque-speed graph will look like the one shown in Figure 5.18. Fig. 5.18: Torque-angular velocity graph for the DC motor. From the torque equation, Equation 5.54, we have Ia(s) = Tm(s) ? Km. Substituting it into Equation 5.60 will yield the following torque-speed equation: Tm(s)+ KmKb Ra Om(s) = Km Ra Ea(s) KmKb ? tm(t)+ Ra ?m(t) = At the steady state with a constant voltage input, we have the following among the torque tm, angular velocity ?m, and the input voltage ea: -KmKb ?m+ tm = Km ea(t) (5.63) Ra algebraic relationship Km Ra Ra ea (5.64 When ?m = 0, we have tstall = Km ea Ra ? tstall Km Ra = (5.65) ea Onthe other hand, when tm = 0, we have 1 ea ?no-load =Kbea ? Kb=?no-load From the torque-speed relationship, Equations 5.61 and 5.62. 5.7.4 A DC Micromotor we can compute the parameters (5.66) Km/Ra and Kb required in Example The DC micromotor to be considered is a Faulhaber 2230.012S micromotor with 1:14 gear head. First, we will read the data sheet and associate the data sheet values in Equations 5.61 and 5.62. A partial data sheet with the with values of the DC motor model equations micromotor shown is given in Figure 5.19. The data values shown here are fundamentally identical to those on the manufacturers data sheet. We only slightly revise the no-load speed from 9,500 rpm to 9,550 rpm and the stall torque from 13.2 mNm 132 5 Modeling of Electrical to 13.3 mNm in order to exactly Systems match the values of the torque constant Kb. The small discrepancies among the data sheet values mostlikely Km and the back EMF constant werecaused by rounding errors. The manufacturers data sheet only shows rpm (revolutions per minute) asthe unit for rota-tional speed. The unit rpm is moreintuitive for humans than the rad/s unit. However,in dynamics system analysis, and errors. design, In and computation, Remark 4.16, we have to use the we had a brief discussion unit rad/s to avoid on a similar unit inconsisten-cies issue regarding degrees and radians. On many occasions, we have no choice but to use both units, one for display to humans and another for computation angular velocity in machine. Hence, in Figure 5.19, we showed both units, rpm and rad/s, for the ?. Fig. 5.19: Partial data sheet values of Faulhaber micromotor 2230.012S. Intheanalysis, computation, and design, wewilluse, forthefollowing data values of?no-load and ?maxin rad/s, and Kbin mV/rad/s: ?no-load =1,000 rad/s,?max =1,152 rad/s,andKb=12mV/rad/s instead of those in rpm or in mV/rpm on the manufacturers data sheet: ?no-load =9,550 rpm,?max =11,000 rpm,andKb=1.25mV/rpm The back EMF constant Kb was 1.25 in old mV/rpm unit, and now Kb equals to 12 in the new mV/rad/s unit. Notethat now the back EMF constant, Kb = 12 mV/rad/s, and the torque constant, Km = 12 mNm/A have the same value, 12. It is not a coincidence. Thereis a significant physical mean-ing behind the equivalency of these two constants. Kb =Km meansthat the electric power ebiainto the DC motor equals to the mechanical power tm?m out of the DC motor. That meansthe power transfer is lossless. In mostcases, the loss of this electric power to mechanical power conversion is negligible. Therefore, these two constants should be very close, if not equal. If the units used were not consistent, the equivalency of these two constants would not berevealed. Theinductance of the armature inductor, La = 430 H, andthe rotation frequency of the rotor is less than ?max = 1,152 rad/s; hence, the magnitude of the impedance of the inductor will beless than |j?maxLa| =0.495O,which is negligible compared tothearmature resistance Ra=10.8O.This verifies the underlying assumption in the previous subsection that the impedance of the inductor sLa i 5.7 DC Motor 133 negligible. The manufacturers data sheet not only provides the values of torque constant Km,the back EMF constant Kb, and the armature resistance Ra, but also gives the information of the no-load speed ?no-load and stall torque tstall shown in Figure 5.20. We willverify thatallthese data values are consistent. Asit can be seen from the graph, when the input voltage is kept at 12 V, the relationship betweenthe torque tm andthe angular velocity ?mis describedbythe straightline connectingthesetwo points (1000,0) and (0,13.3). From Equations 5.65 and 5.66, we can compute the values of Kmand Kb based on the information Km = tstall ea of the stall torque 13.3 Ra = 12 and no-load speed as follows: 10.8 = 12 mNm/A, ea Kb = 12 = ?no-load 1000 = 12 mV/rad/s Fig. 5.20: Atorque-speed graph of Faulhaber micromotor 2230.012S. Now, we have all the parameters inertia Jm and rotor friction relevant to the DC motor dynamics coefficient Bm. The rotor friction except the rotor is negligible, but the rotor moment of moment of inertia isJm=2.710-7 kgm2. In the following, we will consider the dynamics of the DC motor, only without the geartrain andthe external load. Example 5.24 (Analysis of the DC Motor Without Load) Thetransfer function of the DC motor system without the external load can be obtained from Equa-tions 5.61 and 5.62, Om(s) b ?s Ea(s) = s+a = ts+1 wherethe parameters a and b are a = KmKb RaJe = 121210-6 Km 10.8 2.710-7 =49.38, b= RaJe = 1210-3 10.8 2.7 10-7 =4115 andthe time constant t andthe steady-statestepresponsevalue ?ssare t = 1 49.38 = 0.0203s, ?ss = b a = 83.33rad/s That is, Om(s) Ea(s) 4115 = s+49.38 83.33 = 0.0203s+1 (5.67) 134 5 Modeling of Electrical Systems Fig. 5.21: Stepresponse of the DC micromotor without gear train or external load. Rememberwhat welearnedin Chapter2?If the input ea(t)is a unitstepfunction (i.e., Ea(s) = 1/s), we can solve for ?(t) by using the Laplace transform approach. Wecan even draw the response graph and write down the solution without any computation just by inspection and reasoning. Thefirst-order system step response graph is determined by only three points: the initial condition at t = 0, the final steady-state response ast ?8,and thetime response att =t.For thisproblem, theinitial condition is zero when t =0and thefinal steady-state response is?ss, which is83.33 rad/s, as t ?8.The response curve inbetween isanexponentially rising curve, which has tobeintheformA(1-e-t/t), where tis the time constant, and Ais the steady-state value. Therefore, the step response of the system is ?m(t) =?ss(1-e-t/t) and itsassociated step response graph isshown inFigure 5.21. Note that?m(t) =?ss(1-e-1) = 0.632?ss. Thetime constant is t = 20.3 ms. Theresponseis very fast. If the input is a step function with amplitude 12 (i.e., Ea(s) = 12/s), then the waveform shape will bethe same but the steady-state value will be 12times aslarge; ?ss will be 1,000 rad/s. Example 5.25 (Analysis of the DC Motor with Gear Train and Load) Consider the same DC micromotor, The moment of inertia and the rotational but the motor friction will drive an external coefficient load via a 1:14 gear train. of the external load are J?=5.410-5 kgm2, andB?=2mNm/rad/s respectively. Then the equivalent Be are Je = Jm+ moment of inertial Je and the equivalent rotational friction coefficient ??2 J?=5.45510-7, Be=??2 B?=1.0210-5 1 1 14 14 Thetransfer function of the DC motorsystem with gear train and the external load can be obtained from Equations 5.61 and 5.6 Om(s) Ea(s) wherethe parameters a and b are ?ss b = s+a = ts+1 5.7 a = Be Je KmKb + RaJe = 18.7+24.44 = 43.14, b = Km RaJe = DC Motor 135 1210-3 10.8 5.455 10-7 =2037 and the time constant t and the steady-state step response value ?ss are t = 1 43.14 = 0.0232s, ?ss = b a = 47.22rad/s Thatis, Om(s) Ea(s) = 2037 s+43.14 = 47.22 or 0.0232s+1 O?(s) Ea(s) = 145.5 s+43.14 = 3.373 (5.68) 0.0232s+1 Thestepresponseofthe systemfor ??(t), the angular velocity of the load can befound as ??(t)=3.373(1-e-t/0.0232) rad/s=32.21(1-e-t/0.0232) rpm (5.69) The time constant is t = 0.0232s, which is not much different from the no-load dynamics time constant, t = 0.0203s. However, the steady-state angular speed has dropped tremendously, from 83.3rad/s to 3.373rad/s, which is about only 4% of its no-load angular speed. Thereduction of speed mainly comes from the 1:14 gear ratio. The heavy load, whose moment of inertia is about 200 times of that of the motorrotor, also contributes to slow down the rotation speed of the motor. Theloss of 96% of the no-load speed seems terrible, but it is certainly worthwhile for the gain in 14 times more torque and ability to handle a heavy load with 200 times more moment of inertia than the motor itself. Even at 4% of the no-load speed, the motor system still can movethe load up to the speed of 380 rpm, which is enough in many applications. Fig. 5.22: Feedback speed control of the DC motor system using integral control. In the following, we will design a feedback speed control system based on the dynamics obtained from Example 5.25. Example 5.26 (Speed Control of the DC Motor System Using Integral model Controller) The block diagram of the feedback control system is shown in Figure 5.22. Onthe left-hand side of thediagram, the reference input signal ?r(t) isfed intoalittlecircle with +and-signs, which iscalled the summer, a devicethat can add or subtract signals. The output signal ??(t), whichis the angular velocity to be controlled, is fed back into the same summer with a negative sign sothat the output signal ofthesummer isthedifference ofthetwoincoming signals ?r(t)-??(t). This difference signal in turn becomesthe input signal to the controller K(s). The controller will process the information, make decisions, and send out a control signal ea(t) to either increase or decreasethe speed of the motor until ??(t) is equalto ?r(t) 136 5 Modeling of Electrical Systems In general, the controller K(s) is to be designed so that the closed-loop system is stable, the steady-state error is zero if possible, and the transient error is as small as possible. Detailed dis-cussion on stability will be given in later chapters. Roughly speaking, stability means that no signals withinthe system will grow without bound,and zerosteady-stateerrorimplies ??(t) will beequal to ?r(t) at a steady state. A minimization of the tracking error representsa requirement to reachthe goal as quickly as possible without much overshoot or oscillations. tracking controller like this one. In this example, There are many ways to design a we will use a very simple design approach without much mathematics. The first step is to find the overall transfer function of the closed-loop system between the reference input Or(s) and the output O?(s). Therelationships among signals in frequency domain are all algebraic and can be easily manipulated. Just by inspection of the diagram, we have following two equations: O?(s) =G(s)Ea(s) andEa(s) =K(s) [Or(s)-O?(s)] These two equations can be combined into one by eliminating the internal variable Ea(s). Then, with a few moving around terms within the equation, we havethe following transfer function: O?(s) Or(s) G(s)K(s) = (5.70) 1+G(s)K(s) Plugging the expressions of K(s) = Ki/s and G(s) into the closed-loop transfer function, 145.5Ki O?(s) Or(s) = s(s+43.14) 145.5Ki 1+ s(s+43.14) 145.5Ki = = s2 +43.14s+145.5Ki we have ?2 n s2 +2??ns+?2n (5.71) Notethat this closed-loop transfer function belongs to the category of the typical second-order system westudied in Chapter 3. Recallthat the dynamic behavior of the typical second-order system is charac-terized bythe dampingratio ? andthe naturalfrequency ?n.From Equation5.71, wehavethe following two equationsthat relatethe dampingratio ? andthe naturalfrequency ?nto the integral constant Ki: ?2 n = 145.5Ki and Fig. 5.23: Simulation results Dueto the restriction to be determined, of the feedback of the integral speed control 2??n = 43.14 of the DC motor system using integral control. control structure that there is only one design parameter Ki we only have one degree of freedom in choosing the damping ratio and the natura 5.8 Exercise Problems 137 frequency. If wechoosethe damping ratio to be 0.9, ? = 0.9, then the natural frequency will be ?n = 43.14/1.8 = 23.97rad/s and the integral gain should be Ki = 3.95. Withthe integral control constant determined, the block diagram in Figure 5.22 can be employed to build a simulation program and conduct simulations of the feedback speed control of the DC motor system using the integral control approach. The simulation results are shown in Figure 5.23. With the damping ratio chosento be ? = 0.9,there will be, as expected,an almost undetectableovershootand virtually t no oscillations. The step response reaches steady state with no steady-state error shortly after = 0.2 s. The rise time frequency can be faster if there is another in the design process. control structure with two We will revisit design this degree of freedom problems parameters later in will be employed to select a higher Chapter in natural 6. A dual-loop Example feed-back 6.1 to achieve a better performance. The control-input plots are also shown in Figure 5.23. It can be seenthat whenthe angular speed of the load, ??(t) reaches20 rad/s,the control input ea(t) is around 6 volts voltage. Similarly, when??(t) follows anotherreferenceinput ?r(t) = 40 rad/sto get upto 40rad/s,it requires about 12 voltsfrom the voltage source. The control inputs always have their The system needs to work within the capability perform poorly or become unstable. limitations in magnitude of the control inputs; or in rate of change. otherwise, the system may 5.8 Exercise Problems P5.1a: Findthe transfer function G1(s) = Eo(s)/Es(s) ofthe op amp circuit shown in Figure 5.24(a) and explain the function and application of this circuit. Fig. 5.24: Op amp circuits. P5.1b: Findthe transfer function G2(s) = Eo(s)/Es(s) ofthe op amp circuit shown in Figure 5.24(b). Then compute the magnitude and phase of G2(j?) system. and explain the frequency-domain behavior of the P5.2: Assumethe DC motoris Faulhaber micromotor 2230.012S. You can find the data sheet values of this DC motorfrom Figure 5.19. The DC motor system under consideration is shown in Figure 5.17. Let thegear ratio beN1/N2 =1/10, and J?=210-5kgm2, B?=1mNm/rad/s. Find thetransfer function G(s) = O?(s)/Ea(s). P5.3: Usethe transfer function G(s) = O?(s)/Ea(s) you obtained in Problem P5.2. Design an integral controller K(s) = sK so that the closed-loopsystemshown in Figure 5.25 hasits characteristic equatio 138 5 Modeling of Electrical Systems with damping ratio ? = 0.8. Thenevaluatethe performanceof the closed-loopsystem by conducting computer simulations withthe referenceinput ?r(t) = 40us(t) rad/s. Plotthe output response ??(t) and the control input ea(t), and give your comments based on the simulation results. Fig. 5.25: A DC motor speed control system. P5.4: Consider the circuit shown in Figure 5.26, where eo(t) and es(t) are the output and the input, respectively. Assign eC and iL as state variables, then find the state-space model of the electrical system. Fig. 5.26: Find a state-space model of the RLC circuit. P5.5: Consider the circuit shown in Figure 5.26, where eo(t) and es(t) are the output and the input, respectively. Let Eo(s) and Es(s) be the Laplace transforms of eo(t) and es(t), respectively. Find the transfer function Eo(s)/Es(s) Usingthe NTD voltagesapproach. P5.6: Repeat Problem P5.5 using the meshcurrents approach. P5.7: Repeat Problem P5.5 using the Lagrange approach. P5.8: For the circuit shown in Figure 5.26, which hasjust been considered in Problems P5.5, P5.6, and P5.7, assumethe component values of the resistors, the capacitor, and the inductor are: R1 = 1kO, R2 = 10O, L = 2H, and C = 100F. Findthe transfer function Eo(s)/Es(s), andthe dampingratio ? andthe naturalfrequency?nofthe system 6 Systems Representationsand Interconnected Systems T HEREis no question that mathematical dynamics models are essential in the study of dynamic systems analysis, design, and control. Without a clear and truthful description of a dynamic system it would be very difficult or even impossible to understand how the system works, how to fix problems if some engineering issues arise, or how to design and build a better system. For this reason, we have to understand how physical dynamic systems are described by their mathe-matical dynamic model equations. Onthe other hand, for every equation, engineering law, or scientific theory we learn, we should associate them with some technical reasoning, experience, lab works, or virtual experiment for verification. As welearn from the previous chapters, although the dynamic system modelequations can be derived using different approaches, the end results are essentially identical. However, dynamic system represen-tations are not unique. For example, the simple RC circuit discussed in Chapter 2 can be represented by afirst-order differential equation in the time domain or byits corresponding frequency-domain descrip-tion as a transfer function. These two representations the time domain, the differential system, different equation reveals the charging while the frequency-domain property provide transfer function aspects of the same system. In and discharging helps us understand activities of the the low-pass filtering of the system. It seems that the time-domain behavior and properties are moreintuitive than their counterparts in the frequency domain; one would think the time-domain approaches would dominate the development of the control system theory and technology in earlier years. But history showed the opposite: Mostof the classical control period theory, of almost a hundred analysis, and design tools years since James published in 1868 until late 1950s Clerk when the optimal were developed in frequency Maxwells historic flyball control theory domain stability during the analysis and the state-space approach paper started to emerge. Due to the advancement and the evolving computer representation complicated of the state-space control theory, the technology, has become multivariable control the time-domain more significant, systems. state-space especially matrix computing approach in its ability The frequency-domain algorithms, based on the state-space of handling multivariable the control more approach also madetremendous progress in 1970s and 1980s in addressing the robust stability and robust per-formance issues function based on the transfer matrices requires matrix computations The polynomial function polynomial matrix representation. matrix computations, which is The manipulation more tedious of the transfer than the constant in the state-space approach. matrix computation transfer function issue was eliminated in the late 1980s by converting the un-derlying matrix representation into the state-space representation and re-deriving th 140 6 Systems optimal robust Representations control solution and Interconnected in state space. is not a purely time-domain approach on the state-space the frequency-domain Systems Hence, the state-space control approach. It is a merged time-domain framework for efficient and time-domain components and reliable systems to-day and frequency-domain computation, to be considered approach in the yet allows analysis both of and design process. In this chapter, we will present an overview of the common systems representations, including differential equations, the transfer functions, the state-space representations, the simulation the block diagrams, representations, interconnected and the signal flow and explain graphs. We will discuss the relationship how to find the transfer system of interest function or the state-space that are usually required in analysis the diagrams, among the system representation of an or design. Fig. 6.1: A simple block diagram with feedback structure. 6.1 Block Diagrams Even before we officially define the term block diagram wehad usedit on two occasions: onein Figure 3.15 for DC motor position control, and another in Figure 5.22 for DC motorspeed control. Thesetwo block diagrams look similar to the one shown in Figure 6.1. Assumethe plant, which meansthe system to be controlled, is a typical first-order system G(s) representing the transfer function of a DC motor whose output is the angular integral) controller velocity, the input is a control voltage signal, and the PI (proportional plus K(s) are given in G(s) = b s+a and K(s) = Kp + Ki s respectively, whereb and a are given constants, and Kpand Ki arethe proportional andintegral constants in the controller to be designed. A block diagram is an effective interconnection relationship graphical representation of an interconnected system that shows the among the subsystems and components in the system. The block diagram in Figure 6.1 shows that the output y(t) of the plant G(s)is the variable (the motorspeedin this case) to be controlled. Thereference input r(t) represents the desired motor speed fed into the summer, which isrepresented byalittlecircle with+and-signs around it foraddition orsubstraction. The actual speed variable y(t) is fed back into the negative terminal of the summer so that the difference signal e(t)=r(t)-y(t) willbesent tothecontroller K(s). The controller K(s)willfollow thecontroller law (the PI control law in this case) based on the difference input to make decisions and send out the control-input signal to either increase or decreasethe speed of the motor system until the actual speed equals the desired speed commanded by the reference input. In the design and analysis of the feedback control system, we mayneedto find the closed-loop trans-fer function Y(s)/R(s), or any other representationdescribingthe relationship betweenthe reference input r(t) and the output y(t). If the transfer function of each block is available, the computation of th 6.1 overall transfer function will be fairly straightforward since it only involves this example, from the block diagram in Figure 6.1, we havethe following Block algebraic Diagrams 141 manipulations. For two algebraic equations, Y(s)= G(s)U(s) and U(s)=K(s) [R(s)-Y(s)] Then these two equations can be combined into the following transfer function by eliminating the inter-nal variable U(s): Y(s) R(s) 1+G(s)K(s) Kps+Ki b G(s)K(s) = s+a = 1+ s b s+a Kps+Ki s bKps+bKi = s2 +(a+bKp)s+bKi Fig. 6.2: Common basic block diagram connections: (a) cascade connection, (b) parallel connection, (c) feedback connection. Block diagram connections are pretty self-explanatory. They consist of several blocks that represent subsystems or components. Each block is assumed to have an input terminal to receive an incoming signal and an output terminal to send an outgoing signal. Signals are represented by arrows with ar-rowheads on their tips showing the signal flow directions. Signals can be added or subtracted to form anew signal using asummer, which isrepresented byalittlecircle with+and- signs around itto determine whether the sign of the incoming signal also can be tapped to create a new or summer. Unlike the split of water flow informationthe signal magnitude wont Three common basic block diagram signal needs to be changed before entering the summer. A branch to send exactly the same signal to another block or electric current, the tapping here is just a sharing of be affected. connections are shown in Figure 6.2. The block diagram in (a) is a cascade connection in which U is the input signal for the G2 block, whose output will be G2U. Similarly, the output of the G1block is G1 multiplied by its input signal, G2U. Therefore, the output of the G1block is G1G2U. The block diagram (b) is a parallel connection of G1and G2. The output Yis the sum of the two incoming signals of the summer, which are G1U and G2U, respectively. Therefore, Y = G1U+G2U = (G1 +G2)U. The block diagram (c) is a feedback connection with its forward path gain Ga1nd theloop gain-G1G2. The output ofthesummer isR-G2Y, which yieldsY =G1(R-G2Y). Bymoving theterm-G1G2Y totheother side, we have thefollowing: G1 Y+G1G2Y =G1R? Y=1+G1G2 142 6 Systems Representations and Interconnected Fig. 6.3: A dual-loop Systems feedback tracking control design. In the following example, we will revisit the DC motorspeed control problem using a new controller with dual-loop feedback structure. First, we will usethis opportunity to practice how to find the transfer function is a little of the closed-loop bit system block diagram in a speed control more complicated than the previous integral the new control system structure control design problem. The block diagram case considered in provides two degrees of freedom in the controller Example 5.26, but design that allows us to choose the damping ratio and the natural frequency of the closed-loop dynamics independently. Example 6.1 (Revisit the DC Motor Speed Control System Using Dual-Loop Feedback) The block diagram of the dual-loop feedback control system is shown in Figure 6.3. Onthe left-hand side ofthe diagram, the reference input signal r(t) is fed into the summer. The output signal y(t), which is the angular speed of the motor to be controlled, is fed back into the same summer with a negative sign sothat theoutput signal ofthesummer isthedifference, r(t)-y(t),ofthetwoincoming signals. This difference signal in turn becomes the input signal to the integrator 1/s. There are two controller parameters to be determinedone is K2, whichis the integrator gain, andthe other is K1in the second feedback loop. Thefirst step is to find the overall transfer function of the closed-loop system between the reference input R(s), whichis the Laplace transform of r(t), andthe output Y(s), the Laplace transform of y(t). By inspection of the diagram, we have following equation: Y=GK1Y+GK2(1/s)(R-Y) Then move all the Y terms to the left-hand ?1-GK1+ ? GK2 Y = s which can be simplified GK2 s side and substitute Gby b/(s+a) ? bK1 R ? 1- s+a1 bK2 + s(s+a) into the equation ? Y = bK2 s(s+a) to ? Y=bK2R s2+(a1 -bK1)s+bK2 ? and we have the closed-loop transfer function Y R Using the DC micromotor Then the closed-loop will be dynamics transfer function as follows: bK2 = (6.1) s2+(a-bK1)s+bK2 data obtained in Equation of the dual-loop feedback 5.68, we have b = 145.5 and a = 43.14. DC micromotor speed control system 6.1 Y(s) R(s) Diagrams 143 ?2 n 145.5K2 = Block = s2 +2??ns+?2 s2+(43.14-145.5K1)s+145.5K2 (6.2) n Notethat this closed-loop transfer function belongs to the category of the typical second order system we studied in Chapter 3. Since the dynamic behavior of the typical second-order system is character-ized by the damping ratio ? and the natural frequency ?n, from Equation 6.2, we have the following two equations that relate the damping ratio ? = 0.9 and the natural frequency ?n = 50 rad/s to the controller parameters K1and K2: n =145.5K2 =502and2??n =2(0.9)?n =43.14-145.5K1 ?2 Hence, K1=-0.322 andK2=17.18. Fig. 6.4: Simulation result of the tracking control design using dual-loop feedback. After the dual-loop feedback controller constants K1 and K2 are determined, the block diagram in Figure 6.3 can be employed to build a simulation program to conduct simulations of the DC motorspeed control system. The simulation results are shown on Figure 6.4. Withthe damping ratio chosen to be ? = 0.9,there are no oscillationsandthe overshootis almostinvisible. Thestepresponsereaches steady state with zero steady-state one with integral error shortly after t = 0.1s, which is two times faster than the control shown in Figure 5.23. The faster response is due to the dual-loop feed-backs ability to choosea higher natural frequency, ?n = 50 rad/s, compared to ?n = 23.97rad/s in the integral control case. The control-input plots are also shown in Figure 6.4. It can be seen that whenthe angular speed of the load, y(t) reaches 20 rad/s, the control input u(t) is around 6 volts voltage. Similarly, when y(t) follows the reference input r(t) = 40 rad/s to get up to 40 rad/s, it requires about 12.5 volts from the voltage source, only a slight increase than the integral In this section, function would be if we have experienced approach in obtaining the effectiveness the overall we had to find the differential control system equation case. of the frequency-domain model. Just imagine how of the overall system in time block diagram/trans-fer much harder the work domain by combining a group of differential equations. However,for a morecomplicated interconnected system, solving a set of algebraic equations can still be time-consuming. Some block diagram reduction but the graphic reduction procedure can still betedious. One of the mostefficient overall transfer function (or gains) of a large system is Masons gain formula. Although Masons gain formula can be applied to the block diagram, it is techniques may help, waysto compute the moreintuitive for it to work together with the signal flow graph. The signal flow graph is virtually equivalent to the block diagram, but it looks neater and shows the signal flow path more clearly than its counterpart 144 6 Systems Representations and Interconnected Systems 6.2 Signal Flow Graphs and Masons Gain Formula 6.2.1 Signal Flow Graphs In signal flow graphs, signals are represented by circular dots, called nodes, and the transfer func-tions or gains of systems between signals are represented by directional branches, with the ar-rowhead in the middle of the branch showing the signal flow direction. Each node mayconnect with several incoming and outgoing branches, butthe value of the signal at each node (except the input nodes) is only determined by the signals via the incoming branches. Thatis, the signal at each node equals the algebraic sum of all incoming outgoing branches. Notethat the nodes with no incoming the nodes general may still signals without outgoing have outgoing via the incoming branches are considered branches, and it has nothing to do with the branches are regarded asinput nodes. Simi-larly, output nodes, although some output nodes in branches. Four basic signal flow graph connections are shown in Figure 6.5. The signal flow graph (a) is triv-ial in which the node Y(s) has only one incoming branch, and the signal coming from node U(s) via branch G(s) is the product, G(s)U(s). Forthe cascade connection in (b), it is easy to see that Y = G1E and E = G2U; hence, we have Y = G1G2U. Unlike the parallel connection in the block diagram, we do not need a summer in the signal flow feeding signals via two or moreincoming graph (c). To perform branches into an addition operation, it a node. For the parallel only requires connection in (c), the output node Y hastwo incoming branches, G1and G2,andthese two branches are connected to the same signal source, U(s). Hence, Y = G1U+G2U, Fig. 6.5: (c) parallel Basic signal flow connection, The feedback which is Y =(G1 graph connections: (d) feedback connection. connection consists of three (a) two nodes nodes, the input +G2)U. one branch, (b) cascade connection, node R on the left, the output node Y on the right, and the error signal node Ein the middle. The input node Rhas one outgoing branch to node E, buthas noincoming branch. The error signal node Ehas twoincoming branches, 1and-G2connected to R and Y, respectively. Hence, the signal at node Eis E=1 R-G2Y = R-G2Y The output node has one incoming node i signal from node E via branch G1; hence, the signal at the output 6.2 Signal Flow Graphs and Masons Gain Formula 145 Y = G1E Combine the two equations by eliminating the intermediate function from Rto variable E to yield the following Y Y=G1(R-G2Y) ? Y+G1G2Y =G1R? 6.2.2 transfer Y: R G1 = 1+G1G2 Masons Gain Formula As mentioned a while ago, Masons gain formula is one of the most efficient waysto compute the overall transfer function (or overall gain) of alarge system. Theformula will be given in the following. The general description of the formula mayseemlong and complicated. However, almost all the students will find the formula is straightforward and easy after working on a few examples. Theorem 6.2 (Masons Gain Formula) Consider a system represented by a signal flow graph, in which the relationships among signals and systems are all algebraic. Thenthe transfer function from the input Uto the output Yis Y U N = ? n=1 Fn?n (6.3) ? where N =total number offorward Fn =the n-th forward paths path gain M= total number ofloops ?i = the i-th loop gain ? =1- M i,j ?i? j -?NT i,j,k?i? j?k+ ? ?i +?NT i The superscript NT means nontouching. ?NT i,j ?i?j isthesumoftheproducts oftwonontouching loopgains. ?NT i, j,k ?i?j?k is the sum ofthe products ofthree nontouching loop gains. ?n: same asthe ?, but only the loops that do NOTtouch the n-th forward path are considered. Example 6.3 (Masons Consider the feedback Gain Formula for the Basic Feedback System) connection signal flow graph in Figure 6.5(d). The transfer function of the closed-loopsystem Y/R can be obtainedjust by inspection using Masonsgainformula. The signal flow graph has one forward path and the forward path gain is F1 = G1. There is oneloop with loopgain ?1=-G1G2, which istouching theforward path. Hence, we have ?=1-?1=1+G1G2, ?1=1, F1=G1 ? F1?1 Y R = ? G = 1+G1G2 146 6 Example Systems Representations 6.4 (Masons The signal flow and Interconnected Gain Formula for the Systems Dual-Loop graph shown in Figure 6.6 is equivalent Feedback Control System) to the block diagram shown in Figure 6.3, where a dual-loop feedback controller wasemployed to achieve a desirable DC motor speed control. In Example 6.1, algebraic equations werefirst set up according to the interrelationships among the subsys-tems and signals within the system, and then some algebraic manipulations were performed to obtain the overall transfer function of the system. Now, we will apply Masons gain formula to this signal flow graph to determine the transfer function from Rto Y. The signal flow graph from R to Y has one forward path and two loops. The forward path gain and the two loop gains are F1=1(1/s)K2G =K2G/s and ?1=GK1,?2=-1(1/s)K2G =-K2G/s Hence,the ? and ?1 will be ?=1-(?1+?2) =1-GK1 +K2G/s, ?1=1 since both loops are touching the forward path. Therefore, the transfer function is bK2 Y R F1?1 = ? K2G/s = bK2 s(s+a) = = s+a + bK2 1-GK1 +K2G/s1-bK1 s(s+a) s2+(a-bK1)s+bK2 Fig. 6.6: Signal flow graph for the DC motor dual-loop feedback speed control system. Fig. 6.7: Signal flow Example 6.5 (Masons The signal flow Gain Formula graph shown in for graph of a four-loop a System with Four Figure 6.7 has one forward system. Loops) path and four loops. This example is employedto demonstratehow to computethe ? terms whenthere are multiple nontouching pairs of loops. Theforward path gain and the four loop gains are F1 = b0b1b2b3b4b 6.2 Signal Flow Graphs and Masons Gain Formula 147 and ?1 = b1a1, ?2 = b2a2, ?3 = b3a3, ?4 = b4a4 Hence,the ? and ?1 are ? =1-(?1+?2 +?3+?4)+(?1?3 +?1?4 +?2?4), ?1=1 Notethat there arethree nontouching pairs of loops for the third term in the ? equation andthere exists no nontouchingtrio ofloops in the signalflow graph. ?1is 1 becauseall the four loopstouch the forward path. Therefore,the transfer function Y/R is Y R b0b1b2b3b4b5 F1?1 = = ? 1-b1a1 -b2a2 -b3a3 -b4a4 +b1a1b3a3 +b1a1b4a4 +b2a2b4a4 If the conventional algebraic approach wereemployed to solve the problem, six equations would have to be set up, and the five intermediate the transfer function variables E1, E2, E3, E4, and E5 would need to be eliminated before can be found. Fig. 6.8: Signal flow graph of a state diagram. Example 6.6 (Masons The signal flow Gain Formula for a State Diagram) graph shown in Figure 6.8 will serve for two purposes. One is to demonstrate the construction of ?n whenthere exists aloop that does not touch the n-th forward path. In this example, if X2is considered asthe output, we will seethat the signal flow graph hastwo forward paths: F1=1 (1/s)1(1/s)=1/s2,F2=2/s and two loops: ?1=-a1(1/s)=-a1/s,?2=-a2(1/s)1(1/s)=-a2/s2 Notethat the two loops aretouching eachother;i.e., there is no nontouchingpair ofloops. Hence,the ? is a1 ? =1-(?1+?2) =1+s a2 + s2 +a1s+a2 s2 = s2 Sincethese two loops are also touching the forward path F1,they are not counted in the construction of ?1. However,the loop ?1should be countedin the construction of ?2 becauseit is nottouching the forward path F2. Thus, ?1, ?2are: s+a1 ?1=1, ?2=1-?1= 148 6 Systems Representations Therefore, the transfer function X2 R and Interconnected from Rto X2 is F1?1 +F2?2 = ? 1 s2 = ? Systems s2 +a1s+a2 The second purpose of this signal flow 2 s2 + s+a1 s s ? 2s+a12 = s2 graph is to show that signal flow +1 +a1s+a2 graph can also be employed to represent a graphical representation of a state-space representation, called the state diagram. We can see that two of the nodes are labeled as x1 and x2, which are the state variables of the system. Furthermore, we can obtain the state equation from this diagram asfollows: ??? ????? x?1 x?2 -a1-a2 = 1 0 1 x1 x2 + 2 6.3 State-Space Model In Section 4.4.2, we informally introduced the state-space approach to convert the nonlinear coupled second-order differential equation of the simple inverted pendulum system into a state equation that consists of two first-order differential equations. This conversion has madeit much easier to con-duct analysis, linearization, controller design, and simulations. Astate-space representation, called a state-space model, can always be obtained by converting an existing dynamic system differential equa-tion or transfer function. It also can be constructed directly from the dynamic system modeling process as described in Section 5.5, where weusually assign inductor current and capacitor voltage as state vari-ables for electrical systems. Similarly, displacement and velocity are usually assigned as state variables for mechanical systems. Thetransfer function frequency-domain approach played an essential role in early control systems theory development due to its ability to simplify systems manipulations and to conduct frequency-domain analysis and design. However,its application is restricted to linear time-invariant systems with single input and single output. Onthe other hand, the state-space approach can handle multi-input/multi-output systems that are nonlinear and time-varying. In fact, the state-space modelis a more complete description of dynamic systems, since it not only reveals the information of the internal in state space involve those involve only constant complicated polynomial states. describes the input-output Furthermore, the analysis, relationship, design, but also and simulation matrices, which are more efficient on digital computers than manipulations. The state-space model usually is represented in the compact matrix form x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) (6.4) where thevectors x ?Rn, u?Rm, and y ?Rp are then1 state vector, them1input vector, and thep1 output vector, respectively. Thematrices A?Rnn, B?Rnm, C?Rpn, andD?Rpm are thenn Amatrix, thenm Bmatrix, thepn Cmatrix, and thepm Dmatrix, respectively. The state-space modelin expanded matrix form will look like the following: a12 a1n b11 b12 b1m ???a11 ? ? ? ? ??? a21 a22 a2n b21 b22 b2m ?...??an1an2 ann????bn1bn2 bnm??? x?1 x?2 x1 x2 ? ? ? ? ? ? x?n u1 ? = ? ? ... ... ... ... ? ? ? ? ? ? u2 ? ... xn ? ? ? + ? ? ... ... ... ... ? ? ? ? ? ? ? ... um ? ? (6.5a) 6.3 State-Space Model d12 d1m c12 c1n ??? ????d11 ???c11 d21 d22 d2m c21 c22 c2n ???cp1cp2 cpn????dp1dp2 dpm??? ? ? ? ? ? u1 u2 x1 x2 y1 y2 ... ? ? = ? ? ... ... ... ... ? ? ? ? ? ? ? ? ... ? + ? ? ? ... ... ... ... ? ? ? ? ? ? ? (6.5b) ? ... ? um xn yp 149 The number of the state variables or the dimension of the A matrixis the order of the state-space model.In general, the order of the state-space modelis the same asthat of its associated differential equation or transfer function. For example, the equation of motion for the simple inverted pendulum system discussed in Section 4.4.2 is a second-order differential equation; hence, the order of its state-space modelis n = 2. Example 6.7 (Find a State-Space Model for the Simple MBK System) Assume we have a simple massdamperspring mechanical system, shown in Figure 6.9; whatin-formation do we need at any time instant, t =t0, in order to predict the motion of the system for t >t0? We would need to know both of the displacement and velocity values at t =t0 and the applied external force fa(t)fort =t0.Hence, thedisplacement xand velocity ?xareperfect candidates toserve asstate variables. Letthe state variables be x1(t) = x(t) and x2(t) =?x(t) Fig. 6.9: Find a state-space modelfor the simple massdamperspring From the definition of the state variables, weimmediately x?1(t) (MBK) system. havethe first state equation as = x2(t) Then from the free-body diagram in Figure 6.9, we have -Bx2(t)+ x1(t)+ M ?x2(t)+Bx2(t)+Kx1(t) =fa(t) ??x2(t) =-K M M 1 fa(t) M Combine the two state equations into one state equation in matrix form and choose the displacement variable asthe output; then wehavethe following state-space modelfor the massdamperspring system: ? ?? ???? ? ?? x?1(t) x?2(t) y(t) 0 = =? 1 1 -K/M -B/M x1(t) 0? x2(t) x1(t) x2(t) + 0 1/M fa(t) (6.6 150 6 Systems Representations The state diagram associated and Interconnected Systems with the state-space model of the simple MBK system given by Equa-tion 6.6 is shown in Figure 6.10, which is a graphical representation of the state-space model. The graphicaltool can be either a signal flow graph or a block diagram.In the diagram,s-1 represents an integrator, and the constants of the system, respectively. M, B, and The signal K are the mass,the friction at each node (blue coefficient, and the spring dot) can be represented constant by a time-domain variable in lower-case blue or by a frequency-domain variable in capital-case red. That meansthe same state diagram can be employed for analysis in both time domain and frequency domain. But caution needs to betaken to not mix up the time-domain and the frequency-domain signals. For example, the initial state for the state variable x1(t) to be usedin a simulation (time-domain) should be just the constant x10instead of x10/s,the integral of x10. Onthe other hand,to find the transfer function from x10to X1(s), we would need to compute the transfer function from we have 1 X1(s) = G(s)X10(s) = G(s) x10 X10(s) to X1(s) first. Then s Fig. 6.10: The state diagram associated withthe state-space model of the simple (MBK) system. Example 6.8 (Simulation of the Simple massdamperspring MBK System Using the State Diagram) In this example we will conduct a simulation using a simulation diagram based onthe state diagram shown in Figure 6.10. In this simulation, the applied force input fa(t) is assumed zero. The initial veloc-ity ofthe system?x1(0) = x2(0) = x20is also assumedzero. Butthe initial displacement of the system x1(0) = x10is assumedto be x10 = 0.5 m. Thisinitial condition can beimplemented in the lab. Assume the left end of the spring and damper are fixed to a wall asthe schematic suggested in Figure 6.9. Imag-ine you are holding the massand gradually moving it away from its equilibrium toward the right. You will feel that both of the friction and spring reaction forces are against the motion. The spring reaction force, especially, will get stronger as you movethe massfurther away from the equilibrium. Asthe mass reaches the 50 cm mark, you will stop moving but continue to hold the massat position. Then you may wantto know how the mass will moveafter the massis released. We will conduct the simulation two times using different sets of mass,spring, and damper. In the first run, the mass,spring, and damper are chosen so that M = 0.1 kg, K = 0.1 N/m, and B = 0.05 Ns/m. Since this simple MBK system is a typical second-order system, the following two characteristic equations should be equivalent, as discussed in Section 3.5: s2 +(B/M) s+(K/M) =0 ? s2 +2??ns+?2 n = 0 Hence,the damping ratio and natural frequency of the system corresponding to the chosen MBK values will b 6.3 v MK ? = 0.5B/ = (0.5)(0.05)/0.1 = 0.25, ?n = with high overshoot and oscillations ? = ?n which is equivalent to oscillation Fig. 6.11: Simulation Model 151 ? ? K/M= Withthis low damping ratio ? = 0.25 and slow natural frequency will be underdamped State-Space 0.1/0.1 = 1rad/s ?n = 1rad/s, weexpect the response with frequency, ?1-?2=0.968rad/s period = 6.49 sec. using the state-space model of the simple massdamperspring (MBK) system. Thesimulationresultsareshownin Figure6.11. Thefirst roundsimulationresults(? = 0.25)are shown in blue lines, and the second round responses are in red (? = 1.5). The left graph records both of the blue and the red displacements x1(t), and the middle graph shows the velocities x2(t) for both blue and red cases. For the blue (lightly damped with ? = 0.25) case,the mass movesfrom the initial 0.5 m position to the left overshooting by more than 50%, then oscillates several times before converging to the equilibrium shortly after 15 seconds. Both the displacement curve x1(t) and the velocity curve x2(t) show the same oscillation period approximately equals 6.5 sec. Onthe right-hand side of the figure is the phase plane trajectory coordinates to eventually on the x2 versus x1 plot spiraling converge to the equilibrium from the initial (0.5,0) point on the (x1,x2) (0,0). In the second round of the simulation, the values of the mass M and the spring constant K remain the same, but the friction coefficient Bis changed from B = 0.05 Ns/m to B = 0.3 Ns/m. This increase of the friction coefficient does not affect the natural frequency, but it changes the damping ratio from ? = 0.25 to ? = 1.5. Hence,the initial state response will become overdamped with no overshoot or oscillation. The x2 versus x1 plot on the right-hand side of the figure showed that the phaseplane trajectory just The simulation % CSD Fig6.11 monotonically MBK A=[0 x1=X(:,1); initial response X0=[0.5 1; -K/M -B/M], x2=X(:,2); subplot(1,3,2), 0]' K=0.1, c=[1 0], plot(t,x1,'b-'), grid, on, x1=X(:,1); grid, subplot(1,3,3), x=[0.5 MATLAB code: b=[0;1/M],d=0, G=ss(A,b,c,d),[y,t,X]=initial(G,X0,t); hold plot(t,x1,'r-'), to M=0.1, subplot(1,3,1), [y,t,X]=initial(G,X0,t); on, due 0]', plot(t,x2,'b-'), plot(x1,x2,'b-'),grid, hold without muchspiral results in Figure 6.11 are generated using the following t=linspace(0,20,201); B=0.05, movestoward the equilibrium hold on, plot(x1,x2,'r-'), B=0.3, grid, hold on, A=[0 1; x2=X(:,2); hold on, subplot(1,3,3), -K/M -B/M], G=ss(A,b,c,d), subplot(1,3,1), subplot(1,3,2), plot(t,x2,'r-'), gri grid, motion. 152 6 Systems Representations 6.4 State Transition and Interconnected Systems Matrix The state-space modelinclude a state equation and an output equation as shown in Equation 6.4. For ease of reference, these equations arerepeated: x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) Recallthat x(t), u(t), and y(t) are the state vector, the input vector, andthe output vector, respectively, and A, B, C, and Din general are all real constant matrices. The output equation is just an algebraic equation. If the state vector x(t) is known, the output vector will become known accordingly. Hence,to investigate the behavior of the system described by the state-space modelthe maintask is solving the state equation. The state equation is a first-order differential equation. The procedures required to solve a first-order differential equation are less complicated than those involved in high-order differential equations. However, the state equations in general require matrix manipulations and computations. Owing to the advancement of matrix computing algorithms and computer technology in the last six decades,the digi-tal tools for matrix computations and manipulations are now efficient andreliable. Just like other differential equations, the solution to the state equation includes two parts: the homogeneous solution and the particular solution. We will find the homogeneous solution first and consider the particular solution later. The homogeneous solution does not depend on the input vector u(t). Hence, only the following state equation with initial conditions is considered for now: x?(t) = Ax(t), x(0) To get a clue on how to solve this equation in general = x0 matrix form, (6.7) we will first consider the scalar case of this equation x?(t) which we already = ax(t), x(0) = x0 have a solution, x(t) = eatx0 Then, let us try to extend the scalar solution to the general matrix case and assumethe solution can be written as follows: x(t) = eAtx0 (6.8) Note that this notation eAtis created by just replacing the ain eat with A. At this moment, westill donotknow what thisnotation eAtwould represent except thatitisannn matrix and x(t)=eAtx0 must satisfy Equation 6.7. Now, by substituting x(t) = eAtx0into Equation 6.7, we have the following equation in question: deAtx0 x?(t) = ? =? AeAtx0 = Ax(t) dt 6.4.1 Theorems and Properties of the State Transition Matrix Intheprevious discussion thenotation eAt canbereplaced byannn matrix F(t),and x(t)=F(t)x0 is a solution of Equation 6.7if and only if dF(t) dt = AF(t). Thisfact is summarizedin the following theorem and this Equation 6.7. matrix F(t) or eAt is called the state transition matrix of the system described by 6.4 Definition 6.9 (State Transition State Transition Matrix 153 Matrix) Thenn matrix F(t)thatsatisfies thefollowing differential equation iscalled thestate transition matrix associated with the A matrix. dF(t) = AF(t) dt Theorem IfF(t) 6.10 (State Equation Homogeneous (6.9) Solution) is the statetransition matrixfor the systemdescribedby Equation6.7,then x(t) = F(t)x0 is a solution ofEquation 6.7. Proof: IfF(t) satisfies Equation6.9,then wehave x?(t) = dF(t)x0 dt = AF(t)x0 = Ax(t) which completes the proof. Theorem 6.11 (State Transition Matrix Expression) Thestatetransition matrix F(t) can beexpressedasfollows, F(t) =eAt = I+At + A2t2 2! A3t3 + 3! A4t4 + 4! A5t5 + + 5! (6.10) Proof: It is straightforward to show that deAt dt Theorem A3t2 = 0+A+A2t 6.12 (Properties + 2! A4t3 + 3! of State Transition ? A2t2 + =A I+At+ 2! A3t3 + 3! + ?=AeAt Matrix) Someproperties ofthe statetransition matrix F(t) are summarizedin the following: F(0) =I F-1(t)= F(-t) F(t1)F(t2) = F(t1 +t2) = F(t2)F(t1) F(t2-t1)F(t1 -t0)=F(t2-t0) Proof: Use F(t) = eAt 154 6 Remark Systems Representations 6.13 (Significance and Interconnected Systems of the State Transition Matrix) Forx(t) = F(t)x0 to be asolution ofthe stateequation x?(t) = Ax(t), the matrix F(t) hasto be the state transition be rewritten in the general form x(0) = x0 matrixthat satisfies Equation 6.9. Notethat the solution can x(t2)=F(t2-t1)x(t1) which depicts the transition of the state of the system from x(t1) to x(t2), wheret1 andt2 can be any time instant. Theorem 6.14 (State Transition Thestate transition Matrix Expression in Frequency Domain) matrix F(t) is the inverse Laplace transform of F(s)=(sI-A)-1 (6.11) Proof: Let X(s) be the Laplace transform yield the following, of x(t), then taking the Laplace transform of Equation 6.7 will sX(s)-x0 =AX(s)? (sI-A)X(s) =x0 ? ? Then we have X(s)=(sI-A)-1x0 ? x(t)=L-1(sI-A)-1x0 6.4.2 Computing the State Transition To compute the state transition matrix, wecan use either one of the following 8 F(t) Matrix ? =eAt = k=0 1 k! Aktk= I+At + or F(t) The first analytic formula, Equation work due to its infinite this infinite-series work. solutions formula The second formula, via matrix inversion 6.12, works 2! well for can be converted A3t3 + 3! A4t4 + 4! (6.12 + 5! (6.13) machine computing, but it is not suitable However, based on the Cayley-Hamilton into a closed-form Equation 6.13, is a Laplace transform and inverse A5t5 + ?(sI-A)-1? series expression. will first introduce the Cayley-Hamilton the procedure. =L-1 A2t2 two formulas: Laplace transform expression convenient approach that manipulations. provides for theo-rem, for an-alytic closed-form In the following, we approach and then use second-order examples to demonstrate Shortly after that, the same examples will be employed to illustrate the Laplace transform approach. Theorem 6.15 (The Cayley-Hamilton Theorem) Consider annn matrix A.Assume ?1,?2, , ?nare theeigenvalues ofthe Amatrix, which means they are the roots ofthe following characteristic equation: 6.4 State Transition Matrix 155 f(?):=det(?I-A) =0 Then f(?i) = 0, i = 1, 2,..., n i f and onlyi f Based onthe Cayley-Hamilton theorem, the statetransition asfollows: f(A) =0 matrix of Equation 6.12 can be rewritten n-1 eAt= ?ai(t)Ai=a0(t)I+a1(t)A+a2(t)A2 + +an-1(t)An-1 (6.14 i=0 Notethat the state transition matrix now has only nterms, but the coefficients, i =0,1,2,...,n-1 ai(t), are required to be determined. These time-dependent e??t = coefficients can be solved from n-1 ? ai(t)?i?, (6.15) ? = 1, 2, ..., n i=0 where ??, ? = 1, 2,..., n arethe eigenvalues of the A matrix. To makeit moreclear regarding the coefficient equations of Equation 6.15, without loss of generality we will usean n = 3 caseto illustrate how to solve for the coefficients in these sets of equations. Assume the A matrix has three distinct eigenvalues ?1, ?2, and ?3. The case of multiple eigenvalues will be addressed shortly after this. Thenthe third-order version of Equation 6.15 will be e?1t = a0(t)+a1(t)?1 +a2(t)?2 1 e?2t = a0(t)+a1(t)?2 +a2(t)?2 2 (6.16) e?3t = a0(t)+a1(t)?3 +a2(t)?2 3 Since these three eigenvalues are distinct, the three equations are linearly independent; hence, the three coefficients a0(t), a1(t), and a2(t) can be uniquely determined. Therefore, the state tran-sition matrix of the 3rd-order system will be 3-1 eAt= ? ai(t)Ai = a0(t)I+a1(t)A+a2(t)A2 (6.17) i=0 Now,let usconsiderthe case with multiple eigenvalues. Assume?2 = ?1;thenthe secondandthe first equations of Equation 6.16 are identical. Wehave to remove the second equation and replace it by a new equation obtained by taking derivative of a copy of the first equation with respect to ?1.In other words, Equation 6.16 is replaced by the following new coefficient e?1t = a0(t)+a1(t)?1 +a2(t)?21 te?1t = a1(t)+2a2(t)?1 e?3t = a0(t)+a1(t)?3 equations: (6.18) +a2(t)?2 3 which are nowlinearly independent; hence, the three coefficients a0(t), a1(t), and a2(t) can be uniquely determined. 156 6 Example Systems Representations 6.16 (Find and Interconnected a State Transition Considerthe matrix A = Matrix Systems Using the Cayley-Hamilton Approach) ?-2-3? , whose eigenvalues can befound, ?1=-1and ?2=-2.Based 0 1 on the Cayley-Hamilton theorem, the state transition as matrix associated with this A matrix can be written eAt = a0(t)I+a1(t)A From Equation 6.15 or Equation 6.16 we have the coefficient equations: e?1t = a0(t)+a1(t)?1 e?2t = a0(t)+a1(t)?2 Substitute ?1=-1and ?2=-2into these twoequations toget e-t=a0(t)-a1(t) e-2t=a0(t)-2a1(t) and solve these two equations to yield the two coefficients a0(t) =2e-t-e-2t a1(t)=e-t-e-2t Then we have the state transition matrix as follows: ? ? 2e-t-e-2t e-t-e-2t eAt=(2e-t-e-2t )I+(e-t-e-2t )A= -2e-t+2e-2t -e-t +2e-2t Example 6.17 (Cayley-Hamilton Consider the matrix A = Approach for the Case with Multiple Eigenvalues) ? ?, whose twoeigenvalues are identical as?1=-1and ?2=-1. 0 1 -1 -2 Basedon the Cayley-Hamilton theorem, the statetransition matrix associated with this A matrix can be written a eAt = a0(t)I+a1(t)A Sincethe two eigenvalues are identical, equation in the following: Equation 6.15 or Equation 6.16 can provide only one coefficient e?1t = a0(t)+a1(t)?1 One more coefficient equation is required to solve for the two coefficient variables. Following the same procedure as we did to obtain Equation 6.18, we can obtain the supplemental coefficient equation by taking derivative ofthe aboveequation withrespectiveto ?1. Now wehavethe supplementalcoefficient equation te-t = a1(t) Together with the regular coefficient equation e-t=a0(t)-a1(t) we obtain the two coefficients a0(t) = e-t +te-t a1(t) =te-t Then we have the state transition matrix as follows: eAt = (e-t In the following transform approach +te-t )I+te-tA e-t +te-t State Transition te-t ? Matrix 157 e-t-te-t -te-t we will employ the same example matrices to illustrate the procedure of the Laplace using the formula F(t) Example 6.18 (Find a State Transition Consider the ? = 6.4 matrix =L-1 ?(sI-A)-1? Matrix Using the Laplace Transform Approach) ? ?, whose eigenvalues can befound, ?1=-1and ?2=-2.In 0 A = 1 -2 -3 order toapply theformula shown, thefirststep istocompute theinverse ofthematrix sI -Aand perform partial fraction expansion of each entry of the ? ?-1 ? ? ?? ? -1 (sI-A)-1= s2 s+3 Example 6.19 (Laplace Consider the matrix 1 s+1 + s+2 -1 s+1 + s+2-1 -2 + s+2 -1 + 2 s+1 2 s+1 s+2 ? matrix as 2e-t-e-2t e-t-e-2t? ?(sI-A)-1??-2e-t+2e-2t -e-t +2e-2t =L-1 = Transform A = = s (s+1)(s+2) (s+1)(s+2) Then we have the state transition 2 (s+1)(s+2) -2 1 -2 s s2+3s+2 1 (s+1)(s+2) = s+3 1 = s+3 F(t) matrix in the following: Approach for the Case with Multiple Eigenvalues) ?-1 -2?, whose twoeigenvalues are identical as?1=-1and ?2= 0 1 -1.Thesame Laplace transform approach shown in Example 6.18 canbeemployed forthecasewith multiple eigenvalues tocompute theinverse ofthematrix sI-Aand perform partial fraction expansion of each entry of the matrix before conducting the inverse Laplace transform. ? ?-1 ? ? ? ?? ? ? ?=? ?(sI-A)-1??-te-t e-t-te-t? -1 (sI-A)-1= s1 s+2 s+2 = (s+1)2 -1 (s+1)2 Then we have the state transition 1 (s+1)2 = s+2 1 1 -1 s s2+2s+1 1 s+1 + 1 1 (s+1)2 s -1 (s+1)2 (s+1)2 (s+1)2 1 s+1 + matrix as F(t) =L-1 = e-t +te-t te-t -1 (s+1)2 158 6 Systems Representations and Interconnected Systems 6.5 Solution of the State Equation Considerthe state equation, x?(t) (6.19) = Ax(t)+Bu(t) where A,Bx, (0)=x0,and u(t), t =0aregiven. The problem istofindx(t)fort =0. Let X(s) and U(s) be the Laplace transforms respectively. Taking the Laplace transform of the state vector x(t) and the input vector u(t), on the state equation yields the following frequency-domain equation: sX(s)-x0=AX(s)+BU(s) Since the objective is to find the state response, the state vector terms are moved to the left-hand side of the equation while keeping or moving the input andthe initial state vector to the right-hand side: (sI-A)X(s) =x0+BU(s) Multiplying (sI-A)-1 toboth sides oftheequation from theleft,weobtain thesolution ofthestate equation in the frequency domain: X(s)=(sI-A)-1x0 +(sI-A)-1BU(s) Then we havethe state response x(t), which is the inverse Laplace transform of X(s), ? ?(sI-A)-1? ?(sI-A)-1BU(s) Recall that theinverse Laplace transform of(sI-A)-1isthestate transition matrix F(t): ?(sI-A)-1? x(t) x0 +L-1 =L-1 6.21 can be rewritten in terms x(t) = F(t)x0 + (6.21) = F(t) L-1 Thus, Equation (6.20) of the state transition matrix as follows: ?tF(t-t)Bu(t)dt:=xh(t)+xp(t) (6.22) 0 Fig. 6.12: State diagram for the simple MBK system time response simulation. The convolution theorem (Theorem 2.24) was employed in the inverse Laplace transform manipula-tions, and the second term of the above state response is a convolution integral. Also note that the firs 6.5 Solution of the State Equation 159 term of the response xh(t) is the homogeneous solution due to the initial state vector x0 and the second term of the response xp(t) is the particular solution due to the input u(t). In the following, we will employ the simple MBKsystem again to illustrate how to compute the time responsesin both time and frequency domains and verify the computational results with the simulation results. The Simulink 6.13 is constructed simulation diagram, CSD fig6p13 response shown based on the state diagram in Figure 6.12. This simulation shown in Figure 6.10. The difference is that this time due to the initial StateModel.mdl, condition and the input due to the initial B = 0.3 Ns/m, and condition. The diagram is similar to that we will consider overall time responses of all states while in the previous simulation mass, damper, K = 0.2 N/m. This change on the top of Figure and spring causes the we only considered the output are are chosen damping ratio as and natural M = 0.1 kg, frequency of the system to become ? = 1.06 and ?n = 1.414 rad/s, respectively. The response will be faster and less damped than the previous overdamped case simulation in Example 6.8. The simulation will be conducted three times, one for the homogeneous solution xh(t), the response due to the initial state x0; the second one for the particular solution xp(t), the response dueto the input u(t); and finally the complete solution x(t), the total response dueto the combined effort of x0 and u(t). Theinitial conditions for the displacement state and the velocity state are assumed x1(0) = 0.5 m and x2(0) =0m/s, respectively. The applied force input isassumed u(t)=0.05 Nfort =0. Wewill run the following Simulink is listed Run CSD_fig6p13.m this % Nominal to conduct which will automatically the simulation. The call the MATLAB code program and 4, 2020 to automatically plot_1Blue.m, initial & step call plot_2Red.m, response the Simulink file: plot_3Black.m, plant M=0.1, K=0.2, B=0.3, Simulation u=0, May CSD_fig6p13.m % CSDfig6p13SM.mdl %% CSD fig6p13.m, CSDfig6p13SM.mdl, as follows: % Filename: % MATLAB program: model program 1 x10=0.5, sim_time=10, sim_options=simset('SrcWorkspace', open('CSDfig6p13SM'), 'current', 'DstWorkspace sim('CSDfig6p13SM', [0, ', sim_time], 'current'); sim_options); run('plot_1Blue') %% Simulation u=0.05, 2 x10=0, sim_time=10, sim_options=simset('SrcWorkspace', open('CSDfig6p13SM'), 'current', 'DstWorkspace', sim('CSDfig6p13SM', [0, 'current'); sim_time], sim_options); run('plot_2Red') %% Simulation u=0.05, 3 x10=0.5, sim_time=10, sim_options=simset('SrcWorkspace', open('CSDfig6p13SM'), 'current', 'DstWorkspace', sim('CSDfig6p13SM', [0, 'current'); sim_time], sim_options); run('plot_3Black') Before running this program, make sure to include the Simulink file CSDfig6p13SM.mdl, and the three plotting files: plot 1Blue.m, plot 2Red.m, and plot 3black.m in the same folder. Only one of the plot files is given. The other two are the same except the color. % filename: plot_1Blue.m plot after running simulink file: figure(1) subplot(1,3,1), plot(t,x1,'b-'), grid on, grid minor, title('x1'), hold on, subplot(1,3,2), plot(t,x2,'b-'), grid on, grid minor, title('x2'), hold on, subplot(1,3,3), plot(x1,x2,'b-'), hold on grid on, grid minor, title('x2 vs x1'), 160 6 Systems Representations The simulation results and Interconnected are shown in Figure Systems 6.13. The response graph for x1 on the left shows three displacement response curves: (1) x1h:the displacement response dueto the initial state x0 only, (2) x1p: the displacement response due to the input u(t) only, and (3) x1: the displacement response dueto both x0 and u(t) acting at the same time. It is observed that x1(t) = x1h(t)+x1p(t). Fig. 6.13: Simple MBK system time response simulation results. Similarly, the response graph for x2 in the middle shows three velocity response curves: (1) x2h: the velocity response due to the initial state x0 only, (2) x2p: the velocity response due to the input u(t) only, and (3) x2: the response due to both x0 and u(t) acting at the same time. It is observed that x2(t) = x2h(t)+x2p(t). three The response graph responses displayed on the right on the left of Figure and the 6.13 exhibits middle graphs. the phase blue) would movethe state from (0.5,0) towards the origin (0,0) if there hand, the particular solution motion (in red) would plane trajectories The homogeneous move the state from solution was no input. of the motion (in Onthe other the origin (0,0) towards its intended destination (0.25,0) if the state conditions were zero. Actually the real motion (in black) is the combination of both actions that together movethe state from (0.5,0) to (0.25,0). Example 6.20 (Computation in Time Domain) of the Homogeneous and Particular Solutions of the State Equation In the state diagram of the simple MBK(massdamperspring) system shown in Figure 6.12, there is oneintegrator betweenthe x1 node andthe x2 node,implying ?x1 =x2. By summing upthe three incoming signals atthe ?x2 node, we have another first-order differential equation ?x2=-2x1-3x2+10u. Hence, we havethe state equation of the system: ? ?? ????? x?1(t) x?2(t) wherethe initial input with 0 = 1 -2 -3 x1(t) x2(t) 0 + 10 u(t), x(0) = x0 = ?? x10 0 displacement state is assumed x10 = 0.5 m,and the applied force input u(t) is a step magnitude 0.05N. The objective of this example is to find the homogeneous solution particular solution of the state equation. Thesesolutions can befound using the time-domain via Equation 6.22, which are and the approach 6.5 xh(t) = F(t)x0, and xp(t) = Solution of the State Equation 161 ?tF(t-t)Bu(t)d 0 The state transition matrix F(t) in the above two equations can be obtained using the Cayley-Hamilton approach or the Laplacetransform approach described in Section 6.4.2. In Example state transition 6.16 we had applied the Cayley-Hamilton approach to the same A matrix to obtain its matrix, which is F(t) = Thus, we have the homogeneous xh(t) = F(t)x0 = 2e-t-e-2t e-t-e-2t? ?-2e-t +2e-2t -e-t+2e-2t solution as follows: 2e-t-e-2t e-t-e-2t?? e-t-0.5e-2t ?-2e-t+2e-2t ? ? ? -e-t +2e-2t -e-t +e-2t 0.5 0 The computation of the particular solution xp(t) is a little convolution = bit more complicated since it involves integral. xp(t) = ?tF(t-t)Bu(t)dt= ?tF(t-t) ?? 0 0 0.05us(t)dt 10 0 Notethat the variable t, instead of t, is the integration variable. Whencarrying out the integration, t should betemporarily treated as a constant parameter. According to the convolution theorem, the convolution integral can be rewritten asthe following: xp(t) = ?t ??us(t-t)dt F(t) 0 0 0.5 Since us(t-t)is1when t <t and0elsewhere, thevalue ofus(t-t)is1inside theintegration range; hence,the above integral can further be simplified asfollows: xp(t) = ?t ?? ?t ?e-t-e-2t? ?-e-te-t+0.5e-2t ?t -e-2t 0 -e-t +2e-2t 0 dt = 0.5 0.5 F(t) 0 0 Then we have the particular xp(t) = 0.5 dt = 0.5 solution of the state equation as -(-1+0.5) -0.5e-t +0.25e-2t +0.25 ?-e-t+0.5e-2t ? ? ? e-t-e-2t-(1-1) 0.5e-t -0.5e-2t = Next, we will apply the Laplace transform approach to compute the homogeneous and particular solutions of the same state equation. Example 6.21 (Computation of the Homogeneous and Particular Using the Laplace Transform Approach) Solutions of the State Equation The state equation to be considered is repeated here for convenience. ? ?? ????? x?1(t) x?2(t) 0 = 1 -2 -3 x1(t) x2(t) 0 + 10 u(t), x(0) = x0 = ?? x10 0 162 6 Systems Representations and Interconnected Systems wherethe initial displacement state is assumed x10 = 0.5 m,and the applied force input u(t) is a step input with magnitude 0.05 N. The state transition matrix associated with the A matrix had been computed in Example 6.18 using the Laplace transform asthe following: F(t) 2e-t-e-2t e-t-e-2t? ?(sI-A)-1??-2e-t+2e-2t -e-t +2e-2t 2e-t-e-2t e-t-e-2t?? e-t-0.5e-2t ?-2e-t+2e-2t ? ? ? -e-t +e-2t -e-t +2e-2t =L-1 = Thus,the homogeneous solution is xh(t) = F(t)x0 = 0.5 = 0 Since theLaplace transform oftheparticular solution is(sI-A)-1BU(s), we have Xp(s) =(sI-A)-1BU(s) =? s+3 (s+1)(s+2) -2 solution of the state equation 0 10 s (s+1)(s+2) Then the particular ??? ? ? 1 (s+1)(s+2) 0.5 s(s+1)(s+2) 0.05 (s+1)(s+2) = s 0.5s s(s+1)(s+2) can be obtained by finding the inverse Laplace trans-form of the previous matrix, xp(t) =L-1 [Xp(s)] 6.6 State-Space ?0.25 ??0.25-0.5e-t +0.25e-2t ? 0.5e-t -0.5e-2t s =L-1 + s+1 -0.5 +0.25 s+2 0.5 s+1 +s+2-0.5 = Models and Transfer Functions Systems can be represented by differential equations, transfer functions, state-space models, or state diagrams. In manyanalysis and design cases, we mayneed to convert from onerepresentation to another. In this section, we will discuss how to do it correctly and efficiently. Since we have just utilized the Laplace transform approach to solve a state equation in the previous section, we will first discuss how to find 6.6.1 the transfer Find Transfer Considerthe following function Function of a system from from State-Space a given state-space model of the system. Model state-space model: x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) Let X(s), U(s), and Y(s) be the Laplace transforms of the state vector x(t), the input vector u(t), and the output vector y(t), respectively. Recallthat the solution X(s) of the transformed state equation was given by Equation 6.20 as X(s)=(sI-A)-1x0 +(sI-A)-1BU(s) Plugging this solution into the transformed output equation Y(s) =CX(s)+DU(s of the state-space model, 6.6 we will have the following State-Space Models and Transfer Functions output response: ? ? U(s) Y(s)=C(sI-A)-1x0 + C(sI-A)-1B+D Note that the first term is the output response response due to the input Y(s) is 163 due to the initial U(s). Therefore, the transfer Y(s) U(s) (6.23) state x0, and the second term is the output function from the input U(s) to the output := G(s)=C(sI-A)-1B+D (6.24) Example 6.22 (State-Space Model ?Transfer Function) For the simple MBK system considered in Example 6.7, if the system parameters are chosen to be M= 0.1 kg, B = 0.3 Ns/m, and K = 0.2 N/m, the system dynamics can be described by the state-space model. x?(t) = Ax(t)+Bu(t) y(t) where A = The transfer function =Cx(t)+Du(t) ? ? ?? 0 1 -2 -3 0 , B = 10 , C = ? 1 0 ?, of the system can be obtained using Equation D =0 6.24 as follows: ? ?-1 ?? -1 G(s)=C(sI-A)-1B+D =? 1 0 ? s 2 s+3 Since ?s -1?-1? ? 1 = 2 s+3 we have the transfer function G(s) = ? asfollows: 1 ? ? 1 0? s+3 1 -2 s where ? = s(s+3)+2 ? ?? ? s+3 1 -2 s 0 10 = 0 10 10 ? = 10 s2 +3s+2 Fig. 6.14: Usingthe state diagram of a state-space modelto find the transfer function 164 6 Systems Representations and Interconnected Systems Example 6.23 (State-Space Model ?State Diagram ?Transfer Function) In this example, we will demonstrate how to use the state diagram to find the transfer function. The state diagram associated with the state-space model considered in Example 6.22 can be constructed as shown in Figure 6.14. Since the state diagram is a signal flow graph, Masons gain formula can be employed to find the transfer function from Uto Y. By inspection, we can see there are two loops and one forward pathin the diagram. Thetwo loop gains and oneforward path gain are ?1=-3s-1,?2=-2s-2,andF1=10s-2 so that ? and ?1 are ?=1-(?1+?2) =1+3s-1 +2s-2,?1=1 Therefore, the transfer function G(s) is Y(s) G(s):= U(s) 10s-2 F1?1 = = ? Given a state-space model (A,B,C,D), 10 1+3s-1 +2s-2 =s2 +3s+2 we can find the transfer function using the direct formula C(sI-A)-1B+D orutilizing thestate diagram together withMasons gain formula. Itseems that the state diagram approach requires system is higher, the computation direct formula more steps. But in involved many cases, especially in the state diagram approach when the order of the is easier than that in the approach. 6.6.2 Construct a State-Space Modelin Companion Form Using Direct Realization As weknow, wecannot havetwo different transfer functions for a given system, butthere exist infinitely many state-space models for the same system since state variables can be defined in infinitely many differently ways. For this despite using different transfer function. reason, approaches. give a state-space Conversely model, we will obtain the same transfer we may not get the same state-space model from function a given Thetransfer function of a system is unique, but the state-space modelis not. There are many waysto assign state variables. Sometimes we would like the state variables to asso-ciate with the physical variables in the real world, like the displacements, the velocities in mechanical systems and the inductor currents, the capacitor voltages in electric analysis and design cases we may need a state-space circuits. Onthe other hand, in model in some special form. used forms of state-space modelsis called companion form, form, orthe phase variable canonical form. many One of the commonly whichis also named the controller canoni-cal Withoutloss of generality, we assume the transfer function is a third-order strictly proper rational function as shown: Y(s) U(s) := G(s) = b2s2 +b1s+b0 (6.25) s3 +a2s2 +a1s+a0 Here,strictly proper meansthat the degree of the numerator polynomial is less than that of the denomi-nator polynomial. If both degrees are equal, a division needs to be performed to convert the transfer function into two terms: one strictly proper rational function and the other a constant. Recallthat the corresponding differential equation of the transfer ... y(t)+a2 y(t)+a1 ?y(t)+a0y(t) function is = b2 u(t)+b1 ?u(t)+b0u(t) ... In the equation, y andy represents the third and second derivatives of y, respectively. Laplace transform s variable can be regarded as a differentiation Note that the operator in the conversion betwee 6.6 transfer function and differential State-Space Models and Transfer Functions 165 equation. Thefirst step toward the construction new variable X(s) to both the numerator 6.25 asfollows: Y(s) U(s) of the companion form state-space modelis to multiply a and the denominator of the transfer function in Equation b2s2 = +b1s+b0 X(s) s3 +a2s2 +a1s+a0 X(s) Split the numerator and denominator to get the following two equations: Y(s) = b2s2X(s)+b1sX(s)+b0X(s) ? y = b2 x+b1 ?x+b0x U(s) =s3X(s)+a2s2X(s)+a1sX(s)+a0X(s) (6.26) ... ? u = x +a2 x+a1 ?x+a0x The second equation can be rearranged to the following, ... x =-a2 x-a1?x-a0x+u (6.27) Including the input u,the output y, the variable x andits three derivative variables, six nodes are required ... ... in the state diagram. They are labeled as u, x, x, ?x, x, and y. Based on Equation 6.27, the node x shall receive the four incoming branches from nodes u,x, ?x, and x. Similarly according to the first equation of Equation 6.26, three incoming branches from nodesx, ?x, and x will feed to the output node y. Thus, we havethe state diagram shown in Figure 6.15. Now, weare ready to assign state variables. Therule is to assign a state variables at eachintegrators output. Although no specific order of the state variables is required, we would follow the companion form convention to assign node x as x1, node?x as x2, and nodex as x3, as shown in the state diagram. Then, according to the state diagram, wecan easily write down the state equation andthe output equation in the following: ? ?? ?? ??? ??u(t), ? ?=?-a0-a1-a2?? ?+ x?1(t) x?2(t) x?3(t) This state-space three features: (1) 0 1 0 0 0 1 0 x1(t) x2(t) x3(t) 0 y(t) 1 modelis said to bein the companion form. The entries right above the main diagonal row arethe denominator coefficients of the transfer function matrix entries are all 0s. The column vector = ? b0 b1 b2 ? ?? ?? x1(t) x2(t) x3(t) (6.28) Notethat the A matrix hasthe following are all 1s; (2) the entries at the bottom with sign change; and (3) the rest of the A B has all 0s except the bottom entry, which is 1. The row Direct Realization) vector Cis constructed using the numerator coefficients. Example 6.24 (Construct a Companion-Form State-Space Model Using In this example, we will simply follow the companion form construction procedure to draw a state diagram like Figure 6.15, and then form as shown in Equation Consider the transfer usethis state diagram to find the state-space 6.28. function G(s) = Thefirst step is to multiply a new variable transfer function as follows: Y(s) U(s) Split the numerator model in the companion and denominator s+3 s2 +3s+2 X(s) to both the numerator = s+3 s2 +3s+2 to get the following X(s) X(s) two equations and the denominator of the 166 6 Systems Representations Fig. 6.15: Construction and Interconnected of a state-space Y(s) = sX(s)+3X(s) ? Systems model in companion form via a state diagram. y =?x+3x U(s)=s2X(s)+3sX(s)+2X(s) ? u=x+3?x+2x?x =-3 ?x-2x+u Including the input u, the output y, the variable x, and its two derivative variables, five nodes are required in the state diagram. They are labeled as u,x, ?x, x, and y, asshown in Figure 6.16. According tothesecond ofthetwoequations, x =-3 ?x-2x+u, thenode x shall receive thethree incoming branches fromnodes u, ?x,and x with gains 1,-3,and-2,respectively. Similarly, based on the other equation, y =?x+3x, the two incoming branches from nodes?x, and x with gains 1 and 3 feed to the output node y. Thus, we havethe state diagram shown in Figure 6.16. Fig. 6.16: Construct a companion Now, we are ready to assign state of each integrator. form state-space variables. model from a transfer function. The rule is to assign state variables Although no specific order of the state variables is required, at the output we would follow the companion form convention to assign node x asx1, and node?x as x2, as shown in the state diagram. Then we havethe state equation and the output equation asfollows: ? ?? ????? x?1(t) x?2(t) 6.6.3 Construct In the following, state-space = a State-Space 0 1 -2 -3 x1(t) x2(t) Model from + 0 1 u(t), Interconnected we will usethree examples to illustrate models, respectively, from y(t) =?3 1? ? x1(t) x2(t) Systems how to construct state diagrams, and conse-quently a cascade connection of two transfer functions, a parallel 6.6 connection of two transfer functions, and a feedback State-Space connection Models and Transfer Functions with plant and controller transfer 167 func-tions. In the following example, we will consider the construction of a state-space modelfrom a cascade connection of two transfer functions. Thatis, the input-output relationship of the system is described by Y(s)/U(s) = G1(s)G2(s) where G1(s) and G2(s) can be from a decomposition of a given transfer function or they can be from two different subsystems. Example 6.25 (Construct a State-Space Model from Cascaded Subsystems) Consider a system, whichis composed of two subsystems G1(s) and G2(s) withthe following trans-2 fer functions: Y1(s) U1(s) = G1(s) = s+3 s+1 = 1+ , s+1 Y2(s) = G2(s) = U2(s) 1 s+2 The relationship of the overall system G(s) and its subsystems is described by G(s) = G1(s)G2(s). Of course, we could combine the two rational functions into one, and then construct a state-space model based onthe combined system. However, for practical reasons, weshould keep the state variables of the subsystems if possible. Fig. 6.17: Construct a state-space model from a cascade connection of two subsystems. Hence, we will construct state-space models separately for all subsystems and then combine them together to form a state-space modelfor the overall system. The state-space models of the two subsystems can be constructed Y1 U1 2 = 1+ s+1 X1 X1 as follows: ? x?1=-x1+u1 , and y1 = 2x1 +u1 Y2 U2 = 1 X2 s+2 X2 ? x?2=-2x2 +u2 y2 = x2 where x1 and x2 arethe state variables of the subsystems G1and G2,respectively. Let y(t) and u(t) be the output and input of the combined cascade system, respectively. Accord-ing to the cascade connection, we have y(t) = y1(t), y2(t) = u1(t), and u(t) = u2(t). Based on the state-space models of subsystems and the above connection information, the state diagram for the overall system can be completed as shown in Figure 6.17. ?T The subsystems state variables x1(t) and x2(t) are of course the state variable of the combined system. The state vector of the overall system is defined as x = ? x1 x2 . Then according to the stat diagram in Figure 6.17, we have the following state-space modelfor the overall system: 168 6 Systems Representations and Interconnected Systems ? ??0 -2????? x?1(t) x?2(t) x1(t) x2(t) -1 1 = 0 1 + u(t), y(t) = ?2 1 ? ?? x1(t) x2(t) In the following example, we will consider the construction of a state-space modelfrom a parallel connection of two subsystems. Thatis, the input-output relationship of the system is described by Y(s)/U(s) where G1(s) and G2(s) can be obtained from = G1(s)+G2(s) a decomposition of a given transfer function, or they can come from two different systems. Example 6.26 (Construct a State-Space Model from a Parallel Connection of Two Subsystems) Assumethe relationship of the overall system G(s) andits subsystems G1(s) and G2(s)is described by Y(s) U(s) = Y1(s) U1(s) + Y2(s) U2(s) Fig. 6.18: Construct a state-space = G1(s)+G2(s) model from a parallel = 2 + s+1 connection -1 s+2 of two subsystems. Withthe inputs and outputs of the subsystems G1and G2being denoted by U1, U2, and Y1, Y2,re-spectively, and the given transfer functions of the subsystems, wecan construct the state-space models for each of the two subsystems as follows: Y1 U1 2 = s+1 X1 ? X1 x?1=-x1+u1 , and y1 = 2x1 Y2 U2 = -1 s+2 X2 X2 ? x?2=-2x2 +u2 y2=-x2 Based on the above state-space models of the two subsystems, and the fact of u1 = u2 = u and y = y1 +y2 due to the parallel connection, the combined state diagram can be completed as shown in Figure 6.18. Notethat the G1subsystem state diagram is drawn onthe top side andthe G2subsystem state diagram is at the bottom side. Both subsystems the overall system is the sum of the two subsystems are driven by the same input ?T ? ??0 -2????? Now, assign the outputs of the integrators u(t), and the output of outputs. as state variables x1 and x2 as shown in the state diagram. Let x = ? x1 x2 bethe state vector of the overall system, where x1 and x2 arethe state variables of the subsystems G1and G2,respectively. Then according to the state diagram in Figure 6.18, we havethe following state-space modelfor the overall system: x?1(t) x?2(t) = -1 0 x1(t) x2(t) + 1 u(t), 1 y(t)=? 2 -1? ? x1(t) x2(t) 6.6 In the following example, State-Space we will consider the construction Models and Transfer of a state-space Functions model from 169 a feedback connection with both the plant andthe controller transfer functions. Thatis, the input-output relationship of the system is described by Y(s) R(s) G(s)K(s) = 1+G(s)K(s) where G(s) is the plant, whichis the system to be controlled, and K(s) is the controller. Fig. 6.19: Construct a state-space Example 6.27 (Construct a State-Space model from a feedback connection. Model from a Feedback Connection) Assumethe feedback connection is depicted bythe block diagram shown on the top of Figure 6.19, which meansthe feedback control system is described by the following three equations: Y(s)=G(s)U(s), U(s)=K(s)E(s), andE(s)=R(s)-Y(s) Here, G(s) represents the transfer function of the DC motor westudied in Example 5.25, and K(s) is an integral controller to be designed. We will first build an individual state diagram for each of the plant and the controller transfer functions asfollows: Y U 145.5 = X1 s+43.14 ? X1 x?1=-43.14x1 +u , and y1 = 145.5x1 U E = KI X2 s X2 ? x?2 = 0x2 +e u = KIx2 The G(s) and K(s) subsystem state diagrams are built and shown on the right-hand and the left-hand sides, respectively, in Figure 6.19, and then are connected together based on the feedback connection e =r -ytocomplete thefeedback system state diagram. Now, after assigning theoutputs ofthe integrators as state variables x1 and x2, we have the state equation ? ?? ????? x?1(t) x?2(t) Once the state-space = -43.14 KI -145.40 x1(t) x2(t) 0 1 + u(t), and the output equation as follows: y(t) = ? 145.4 0 ? model or the state diagram is obtained for the feedback ?? x1(t) x2(t) control system, we can use them for simulation, for analysis, and for design. The characteristic equation of the closed-loop system can be computed from the A matrix of the state-space model as follows: ? |sI-A| = ? ? ? s+43.14 -KI ?=s2 +43.14s+145.4 = ? ? 145.4 s ? 170 6 Systems Representations and Interconnected Systems Recallthat the second-order characteristic equationcan be writtenin terms ofthe dampingratio ? and the naturalfrequency ?nasfollows: s2 +2??ns+?2 n = 0 Hence, we can relate the integral following constant KI to the damping ratio and the natural frequency by the equations: 2??n = 43.14, and ?2 n = 145.4KI If the damping ratio is chosen to be ? = 0.9, the system response is underdamped with a very small overshoot and almost undetectable oscillations. Then the natural frequency and the integral constant will be ?n = 23.97 rad/s and KI = 3.95, respectively. Wecan conduct a computer simulation diagram or state-space closed-loop transfer function the state diagram together of the DC motor speed control system based on this state model, and the results will be the same as those can be computed with either using the Masons gain formula. shown in Laplace transform The Laplace transform ? formula approach ? s 3.95 ? ?? 0 1 = -145.4 s+43.14 The or by using will give ?-1 ?? -3.95 Gclosedloop(s) =C(sI-A)-1B =? 145.4 0? s+43.14 145.4 s = 1 ? 145.4 0 ? ? Figure 5.23. 0 1 574.7 s2+43.14s+574.7 If the state diagram is employed together with Masons gain formula to compute the closed-loop transfer function, we will find two loops and oneforward path in the state diagram. The loop gains and the forward path gains are ?1=-43.14s-1, ?2=-574.7s-2, andF1=574.7s-2 which leads to ?=1-(?1+?2) =1+43.14s-1 +574.7s-2 and?1=1 Therefore, the closed-loop transfer function is Gclosedloop(s) = F?1 ? = 574.7s-2 1+43.14s-1 +574.7s-2 = s2 574.7 +43.14s+574.7 6.7 Exercise Problems P6.1a: Consider the PI (proportional and integral) Kp = 0 (i.e., the controller is an integral controller closed-loop system has damping ratio ? = 0.707. feedback control K(s) = Ki/s). system shown in Figure 6.20. Let Determine the value of Ki so that the Fig. 6.20: PIfeedback control system 6.7 Exercise Problems 171 P6.1b: Withthe controller K(s) chosenin P6.1a,find the naturalfrequency ?nandthe transfer functions Y(s)/R(s) and U(s)/R(s) of the closed-loop system. P6.1c: Plotthe output response y(t) and control input u(t) dueto the reference input r(t) = 20us(t) on separate graphs using the two transfer functions obtained in P6.1b and the MATLAB step command. P6.2a: Consider the PI (proportional andintegral) feedback control system shown in Figure 6.20. Let Ki = 0(i.e., the controller is a proportional controller closed-loop P6.2b: system has steady-state Withthe controller K(s) error smaller than =Kp). Determine the value of Kpsothat the 10%. K(s) chosen in P6.2a, find the time constant t and the transfer functions Y(s)/R(s) and U(s)/R(s) of the closed-loopsystem. P6.2c: Plotthe output response y(t) and control input u(t) dueto the reference input r(t) = 20us(t) on separate graphs using the two transfer functions obtained in P6.2b and the MATLAB step command. Comment onthe limitation of the proportional control system. P6.3a: Consider the feedback control system shown in Figure 6.20, wherethe controller is a PI con-troller (proportional and integral controller) K(s) = Kp +(Ki/s). Determinethe values of Kpand Ki so that the closed-loopsystem has dampingratio ? = 0.707 and naturalfrequency ?n = 50rad/s. P6.3b: Withthe controller K(s) chosen in P6.3a,find the transfer functions of the closed-loop system. Y(s)/R(s) and U(s)/R(s) P6.3c: Plotthe output response y(t) and control input u(t) dueto the reference input r(t) separate graphs using the two transfer functions obtained in P6.3b and the MATLAB step = 20us(t) on command. P6.4a: Considerthe dual-loop feedback control system shown in Figure 6.21. Determinethe values ofK1 and K2so that the closed-loop system has damping ratio ? = 0.707 and natural frequency ?n =50 rad/s. Fig. 6.21: A dual-loop feedback control system. P6.4b: Withthe values of K1 and K2 chosenin P6.4a,find the transfer functions Y(s)/R(s) and U(s)/R(s) ofthe closed-loop system. P6.4c: Plot the output response y(t) and control input u(t) due to the reference input r(t) = 20us(t) on separategraphsusingthe MATLAB step command andthetwo transfer functions Y(s)/R(s) and U(s)/R(s) obtainedin P6.4b 172 P6.5: 6 Systems Representations Compare the closed-loop and Interconnected system Systems performances of the above four controllers obtained in P6.1, P6.2, P6.3, and P6.4, respectively, and give your comments. Remember that the objective of the feed-back control is to find reference input a controller so that the closed-loop and the output is as small as possible, P6.6a: Consider a system described by the following system is stable and the difference subject to the control-input between the magnitude constrains. state equation: ? ?? ???? ? x?1(t) x?2(t) Is the system = stable? Explain the reasoning -2 -2 2 3 x1(t) x2(t) + -1 1 u(t) behind your answer. P6.6b: Design a state-feedback controller u(t) = ? F1 F2 ? ?? x1(t) x2(t) so that the closed-loop ble, andthe characteristic equation ofthe closed-loopsystemis s2+2??ns+?2 system is sta-n = 0 with damping ratio ? = 0.866 and natural frequency ?n = 4 rad/s. P6.6c: Build a Simulink programto conductthe closed-loopsystemsimulation withinitial statex1(0) = 2, x2(0) = 0. Plot x1(t), x2(t) on the same graph and u(t) on a separate graph using command. MATLAB plot P6.7a: Consider the three state diagrams shown in Figure 6.22(a), Figure 6.22(b), and Figure 6.22(c), respectively. Find the state-space model associated with each of the three state diagrams. P6.7b: Use Masonsgainformula to find the transfer function Y(s)/U(s) associated with each of the three state diagrams shown in Figure 6.22(a), Figure 6.22(b), and Figure 6.22(c), respectively. Fig. 6.22: State diagrams PartII Linear Control System Desig 7 Fundamentalsof Feedback Control Systems I N Chapters 2 and 3, welearned that the frequency-domain approach not only transforms the differ-ential equations into the algebraic onesto makethem easier to solve, but also reveals the valuable frequency-domain properties and provides convenient, easy-to-use tools for the analysis and design of control systems. Notethat the frequency-domain and the time-domain properties are closely related via an easily crossed bilateral bridge: the Laplace transform. Asshown in the typical second-order sys-tem step response graph in Figure 3.11, the time-domain attributes, like the maximum overshoot, the oscillation frequency, the frequency-domain the rise time, and settling time of the step response, are mainly characterized by poles. Despite the success of the frequency-domain approach based on transformed transfer functions, it only applies to linear, time-invariant SISO (single-input/single-output) systems. Recallthat in Chapter 4, we obtained a dynamics model of the simple inverted pendulum system, which was described by a nonlinear differential equation. In order to investigate the properties of the system, we would have to introduce the concept of interest. of equilibriums, and explain how to find alinear local model for each equilibrium Although there exists other ad hoc ways of locating the equilibriums andfinding local linear models, the most systematic and efficient approach is to carry out the linearization process in state space. Forthis purpose, in Section 4.4.2, weintroduced the state-space analysis approach the first time in the book. First, the original nonlinear differential equation wasconverted into a nonlinear state equation, in which the state variables were chosen to bethe angular displacement and the angular velocity of the pendulum. The nonlinear state equation wasthen employed to systematically determine the equilibrium points, and to assemble state-space plane, a linearized model associated state-space with the upright which verifies the instability local model at the equilibrium equilibrium has a pole in the right of interest. The linear half of the complex of the upright equilibrium. Furthermore, in Section 4.4.3, students were guided to utilize the local linear state-space modelto design a state-feedback controller based on a simple pole placement concept sothat the closed-loop sys-tems poles are in the left half of the complex plane. A computer simulation was conducted to validate that the linear state-feedback the originally unstable controller, nonlinear system. designed based on the linear This state-feedback controller model, was capable design turned of stabilizing out to be the first feedback control system design project the students would learn from the book. In addition to this state-feedback controller design experience, students had also learned how to de-sign anintegral feedback controller and a dual-loop feedback controller in Section 5.7.4 and Section 6.1, respectively. In both of these design examples, the frequency-domain approach based on transformed transfer functions was employed to place the closed-loop system damping ratio and natural frequencies system poles according to the desired closed-loop 176 7 Fundamentals of Feedback Feedback controllers example, past three Systems can be designed in state space or in frequency its strength and limitations. in the Control domain. Either approach Fortunately, the advancement of control theory and digital computing tech-nology decades has the frequency-domain blended into the cost function made it possible to integrate MIMO (multi-input/multi-output) (or performance index) these two approaches system robustness of the state-space together. H2 and H8 optimization formu-lation with the design approach to achieve a best possible performance. The main objective control For measure can be process. Onthe other hand, the state-space LQR or LQG approaches can work together root locus has of this chapter systems in later which include chapters. the advantages is to provide We will first the fundamentals address and the limitations. basic features Then, after for the discussion of feedback a brief review of feedback control of system systems, represen-tations and commonly used terminologies, we will introduce stability, similarity transformations, Routh-Hurwitz stability criterion, and basic pole-placement control systems designs. 7.1 Features of Feedback Control The discovery of feedback control seems not as well recognized as the great inventions of the steam engine and aircraft. The steam engine wasthe main power force behind the Industrial Revolution at the turn of the 19th century. About a hundred years later, the invention of aircraft by the Wright Brothers created the aerospaceindustry and opened up a new era of aviation transportation that shrinks the world and makesthe people all over the world more connected than before. However, it was James Watts flyball governor control system that transformed the inefficient, unsafe, sometimes even explosive steam engines into controllable, reliable, and efficient ones sothat the steam engine could be widely employed and become the main power source for the Industrial Revolution. Forthe flight control of aircraft, Wilber Wrightenvisioned that the age of flying will have arrived when this one feature (the ability to balance and steer) had been worked out, for all other difficul-ties are of minorimportance. The age of flying certainly has arrived, andthe implementation of feedback control theory has greatly improved the ability to balance and steer and has enhanced the safety, qual-ity, and performance of the flight. Feedback control technology have been embedded in almost all aerospace vehicles, ships, manufacturing processes, power grids systems, automobiles, and a vari-ety of machines/devices that require automation, optimization, precision, stability, safety, reliabil-ity, and performance enhancement. In the following, we will briefly discussthe features of feedback control and its limitations. 7.1.1 A Demonstrative Feedback Control System Instead of just listing the features of the feedback control, we would associate these features with some tangible feedback control system that we can experience in the lab or in computer simulations. The simple features motor speed control system of feedback control. we designed in The block diagram Example of the 6.1 will be employed motor speed control to demonstrate system of Figure some 6.3 is redrawn in Figure 7.1. Weadd the disturbance input d(t) to the block diagram in order to study the system response due to the disturbance. The plant G(s) will be altered so that the effect of the plant perturbations on the system can be observed and analyzed. In Figure 7.1, G(s) is the mathematical model of the plant, including the Faulhaber 2230.012S the function 1:14 gear head, and the external load J? and B?, described in Example mi-cromotor, 5.25. The transfer G(s) is G(s) = xss ts+1 (7.1 7.1 Features of Feedback Control 177 wheret = 0.02318sec and xss = 3.3727rad/s as givenin Equation 5.68. Recallthat the objective of the speed control system is to design a controller stable and the steady-state tracking K(s) or K1 and K2 sothat the closed-loop system is e(t) = 0), andthe transient error response is error is zero (i.e., lim t?8 as small as possible. Fig. 7.1: A speed tracking feedback control system. The controller was designed in Example 6.1,K1=-0.322 andK2=17.18. With theadded distur-bance input, the closed-loopsystem now hastwo inputs: the referenceinput r(t) =L-1 [R(s)], together withthe disturbanceinput d(t) =L-1 [D(s)], and oneoutput y(t) =L-1 [Y(s)], whichrepresentsthe angular speed of the load moment of inertia, J?. Applying Figure 7.1, we can find the transfer functions respectively, GR(s) = Masons gain formula to the block diagram GR(s) from R(s) to Y(s), and GD(s) from K2xss , D(s) to Y(s), ts2 +s GD(s) = of (7.2) ts2+(1-K1xss)s+K2xssts2+(1-K1xss)s+K2xss and therefore, the output Y(s) hastwo parts: one dueto the reference input R(s) andthe other dueto the disturbance input D(s). Y(s) = GR(s)R(s)+GD(s)D(s) (7.3) :=YR(s)+YD(s) Assume the reference input r(t) and the disturbance input d(t) are step functions with arbitrary magnitude. Thatis, R(s) = R/s and D(s) = D/s, where R and Dare arbitrary constants. According to Theorem 2.27, which is the final-value lim yR(t) t?8 theorem, = lim sYR(s) =limGR(s)R s?0 s?0 = R, and Equations lim yD(t) t?8 7.2 and 7.3, we have =lim sYD(s) =limGD(s)D s?0 =0 (7.4) s?0 Thesefinal values of yD(t) and yR(t) reveal that at steady state the effect of the disturbance d(t) on the output y(t) will be zero, and the output y(t) will perfectly follow the reference input r(t). Notethat the steady-state response analysis is conducted completely in frequency domain. Similarly, the transient response of the system also can be characterized without an explicit time-domain expression of y(t). It can be seen from Equation 7.2 that the characteristic equation of the closed-loop ts2+(1-K1xss)s+K2xss =0 system is (7.5) Withthe plant parameters t, xssand the controller constants K1, K2,the characteristic equation become 178 7 Fundamentals of Feedback Control Systems s2 +90s+2500 =s2 +2??ns+?2n = 0 (7.6) Hence,the damping ratio, the natural frequency, andthe pole locations of the closed-loop system are ? = 0.9, p1 ?n = 50 rad/s, =-a j? =-45 j21.795 p2 (7.7) Thetransfer function GR(s)in Equation7.2 andthe dampingratio ? = 0.9revealthat the closed-loop system is an underdamped typical second-order system. Thus, the formulas listed in Section 3.4.3 can be employed here to compute the rise time, the settling time, the peak time, the maximum over-shoot, and other local peak and valley points of the step response. Since the oscillation frequency is ? = 21.795rad/s,the period of the decayingsinusoidal step responseis T = 2p/? = 0.288s. Hence, the peaktime tp =T/2 = 0.144s, andy(tp) = R(1+e-45tp) = R(1+0.0015) imply that the maximum overshoot is OS = 0.15%. Notethat the maximum overshoot is so small that the maximum peak point is ? already within 2%ofthesteady-state value, which implies thesettling time isless than thepeak time tp.Itisverified bythesettling time formula, ts =-ln(0.02 1-?2)/?=0.105 s. Therefore, the feedback control not only achieves perfect disturbance rejection and reference track-ing at steady state, it also provides excellent transient response, allowing fast, smooth convergence to the steady state. 7.1.2 Performance Verification by Time-Domain Simulation The ability to envision the time-domain response based onthe frequency-domain attributes like transfer function, pole-zero pattern, damping ratio, and natural frequency, is essential, especially in the phase of feedback control design since the explicit expression of the time-domain response is not available until the design is completed. However, after a controller is designed on the drafting board, it is a necessity for the controller to undergo athorough time-domain simulation verification to determine if the control system has fulfilled all the required closed-loop system performance. Fig. 7.2: Effect of the disturbance d(t) on y(t) and u(t). A Simulink simulation based onthe speed tracking feedback control system block diagram shown in Figure 7.1 tracking was conducted performance to verify the of the system. disturbance The simulation response results reduction capability and the reference are shown in Figure 7.2. The reference input r(t) = 20us(t) (in green color) is a step function intending to command the motorto increase its angular velocity y(t) from 0 to 20 rad/s. The output y(t) (in blue color), following the command, would ris 7.1 Features of Feedback Control 179 quickly and smoothly to2098%=19.6 rad/s in0.105 s(thesettling time), topass thedesired speed 20 rad/s at t = 0.123 s, and reach its maximum speed 20.03 rad/s (0.15% maximum overshoot) at the peak time tp = 0.144 s. The continued sinusoidal fluctuations of y(t) around the reference speed 20 rad/s will decay quickly to negligible shortly after the peak time. To demonstrate how the feedback control system reacts to a disturbance, a disturbance pulse d(t) (in red color) is assumed to occur between t = 0.2 s and t = 0.3 s. It can be observed that the feedback control system takes immediate action to quickly reduce the influence of the disturbance d(t) on y(t) to about zero in 0.06 s. Onthe right-hand side of Figure 7.2 is the graph of the control input u(t) versustime t. It can be seen from the motortransfer function G(s) that to sustain the desired motor speed 20 rad/s at steady state, the control-input voltage u(t) needsto be u(t) = 5.93 V at steady state. The graph in Figure 7.2 shows exactly what weexpect after the system reaches the steady state shortly after t = 0.144 s. The graph also shows that upon the sudden step change of the reference input r(t) from 0 to 20 rad/s at t = 0 s, the control input u(t) immediately shoots up from 0 Vto about 6 Vin 0.05 s, then a little overshoot, and converges to the new equilibrium at u(t) = 5.93 V. Whenthe disturbance d(t) jumps from 0to 2rad/s at t = 0.2 s,the control input responds right away to drop about 0.7 V and continues to adjust its value to counter the effect of the disturbance and bring the motor speed back to the equilibrium 20 rad/s. Att = 0.3 s whenthe disturbance recedes to 0, the control input u(t) again reacts accordingly to reduce the effect of the disturbance to zero in about 0.05 s, and brings the system back to the equilibrium, y(t) = 20 rad/s and u(t) = 5.93 V, at the steady state. The next simulation examines the robustness of the motor speed tracking feedback control system against the uncertainties in the plant G(s). The mathematical model we employ in the design process usually is not exactly the same asthe real physical system it represents. The discrepancy may be caused by the modeling inaccuracies conditions and the variations like temperature, capable of accommodating of the system pressure, and gravity. the unmodeled dynamics parameters that are functions Hence, it is important or the perturbations of envi-ronmental for a system to be of the system parameters. The graphs in Figure 7.3 record the results of three motorspeed tracking simulations. Thereference input is assumedto be r(t) = 20us(t) rad/s (in green color), and the objective of the feedback control system is to makethe output y(t), the motor speed,to follow the reference input r(t) as closely as pos-sible, subject to the control-input constraints. The first simulation is for the nominal case whenthe plant parameters t and xss are the same as the nominal values t = 0.02318 s and xss = 3.3727rad/s, respectively. Thetracking responsey(t) is shown in red onthe left graph of Figure 7.3. The corresponding control-input response u(t), also in red, is shown on the right graph of the figure. These nominal responses y(t) and u(t) are the same asthose shown in Figure 7.2. In the second simulation, the plant parameter t remains the same but the parameter xssis reduced 20% to xss = (0.8)(3.3727) rad. The characteristic equation of the perturbed closed-loop system will become s2 +80.6216s+1999.76 = 0, and the damping ratio andthe natural frequency will change to ? = 0.901 and ?n = 44.72rad/s, respectively. Thetracking response y(t) is shown in black onthe left graph of Figure 7.3, slightly below the red nominal response. Thetransient response is a little bit slower than the nominal one, but the steady-state response is identical to the nominal one, still at the desired 20 rad/s. The corresponding control-input response u(t), also in black, is shown on the right graph of the figure. Notethat the control input u(t) is very different from the nominal one: it has to increase by 25% (since parameter xss 1/0.8=1.25) to 7.41 V at steady state to accommodate the 20% decrease of the plant 180 7 Fundamentals of Feedback Control Systems Fig. 7.3: Effect ofthe perturbationsof t and xsson y(t) and u(t). In the third simulation, the plant parameterxssremainsthe same, butthe parameter t is increased 20% to t = (1.2)(0.02318) s. The characteristic equationof the perturbedclosed-loopsystem will be-come s2 +75s+2083.33 = 0, andthe dampingratio andthe naturalfrequency will changeto ? = 0.822 and ?n = 45.64rad/s,respectively. Thetracking responsey(t) is shownin blue ontheleft graphof Fig-ure 7.3, slightly abovethe red nominal response. The transient response has a little bit more overshoot than the nominal one, but the steady-state response is identical to the nominal one, at the desired 20 rad/s. The corresponding control-input response u(t), also in blue color, is shown on the right graph of the figure. Note that u(t) is different from the nominal one since it hasto adjust to minimize the effect on y(t) due to the change of the plant parameter t. In summary, the feedback control mechanism in the motor speed tracking feedback control system shown in Figure 7.1 provides excellent robustness against the parameter variations in the plant G(s). The steady-state tracking the transient tracking performance is perfectly performance robust, and the effect of the plant parameter is very smallalmost negligible. The feedback variations control on mechanism is also capable of performing perfect steady-state step command tracking and arbitrary constant distur-bance rejection to achieve fast convergent transient response. 7.1.3 Advantages and Limitations From the analysis and simulation of Feedback Control verification of the motor speed tracking control system discussed in Sections 7.1.1 and 7.1.2, we have witnessedthe advantages brought forth by the feedback control theory in dealing withthe important systems and control issues including disturbance rejection, precision command tracking, robust stability, and performance against plant uncertainties. We will first summarize the advantages of feedback control, andthen briefly discussthe limitations and caution items in feedback control applications. Figure 7.1 will continue to be employed The basic feedback in interpreting the functions G(s) is not restricted to be the DC motor, andthe controller strategy. control block diagram shown in of feedback K(s) mayrepresent control, but the plant more general control Advantages of Feedback Control 1. Automatic Control Feedback control is a naturally perfect mechanism for automatic control. better way to achieve automatic control than using feedback control. block diagram shown in Figure 7.1 has been employed There probably exists no The basic feedback control to achieve automatic speed control of a D 7.1 motor. The same feedback control principle Features of Feedback can be applied to design the automobile Control 181 cruise control system or can be extended to address the 3D trajectory tracking issues relevant to aircraft guid-ance/navigation, missile defense and satellite positioning systems. In a feedback control system, the control input u(t) is not obtained by any complicated micro management process. Instead, it is au-tomatically generated in real time by the controller according to the control strategy K(s) and the real-time values of the reference input r(t) and the output y(t). The control strategy is predesigned to achieve perfect reference tracking to control-input 2. Ability to at steady state, and optimize the closed-loop performance sub-ject constraints. Modify the Dynamic Characteristics via Pole Placement The dynamics behavior of a system is mainly determined byits pole locations; therefore, through feedback control the closed-loop system poles can be placed at desired locations to improve the performance of the system. Recall that the poles of the unstable uncompensated simple inverted pendulum system inSection 4.4.2 were at2.715 and-3.315, which are theeigenvalues oftheAU matrix. With astate-feedback controller, thecompensated systems poles areplaced at-4 j3, which are the eigenvalues of AU +BUF, as shown in Equation 4.46. The new poles are all in the left half of the complex planeto ensure the stability ofthe compensated cart-inverted pendulum. For another example, the motor speed tracking control system in Figure 7.1, the damping ratio and the natural frequency of the closed-loop system were purposely selected as ? = 0.9 and ?n = 50 rad/s, respectively, 3. Steady-State to achieve a desired performance Disturbance with small maximum overshoot and fast rise time. Response Rejection A feedback controller can be designed to achieve steady-state disturbance response rejection for certain types of disturbances, including step disturbances with arbitrary magnitude, ramp distur-bances with arbitrary slope, and sinusoidal disturbances with arbitrary amplitude and phase. Forthe motor speed tracking control system example, the controller was designed to achieve steady-state disturbance response rejection for the step disturbances with arbitrary magnitude. It wasshown in Equation 7.4that the steady-state disturbance response is zero, lim yD(t) = 0. The steady-state dis-turbance response rejection 4. Steady-State Reference Input t?8 wasalso verified in the simulation shown in Figure 7.2. Tracking Steady-state reference input tracking and steady-state disturbance response rejection are mathemat-ically the same problem. A feedback controller can be designed to achieve steady-state reference input tracking for certain types of reference inputs, including step references with arbitrary magni-tude, ramp references with arbitrary slope, and sinusoidal references with arbitrary amplitude and phase. For the motor speedtracking control system example, the controller was designedto achieve steady-state reference input tracking for the step reference inputs with arbitrary magnitude. It was shown in Equation 7.4 that the steady-state output response is the same asthe reference input at steady state, lim yR(t) = R. The steady-state reference input tracking wasalso verified in the simu-lations t?8 shown in Figure 7.2 and Figure 7.3. 5. Robust Performance Against Plant Uncertainties For an uncompensated system, whatever variations occurs in the plant dynamics directly affect the output response. Feedback control provides an effective will pass on to mechanism to tremen-dously reduce the effect of the plant uncertainties and variations on the output. For the motor speed tracking control system example, it can be seen from the simulation results on Figure 7.3 that the 20% variations of the plant parameters t and xss have no effect on the output y(t) at steady stat 182 7 Fundamentals of Feedback except a slight influence Control Systems on the transient response. It also can be seen from the right-hand side of the figure that the control input u(t) responds to the plant variations to adjust accordingly to their effect on the output y(t). Limitations minimize of Feedback Control Despitethe overwhelmingly may do convincing advantages, feedback control hasits limitations more harm than help if caution is not taken to address the issues delay, actuator saturation, and dramatic andit occasion-ally of sensor accuracy, time change of plant dynamics. 1. Sensing Errors For a speed tracking or position tracking control problem, the accuracy of tracking control accuracy can only be as good as that of the sensor measurement. The sensor error will directly passto the tracking error. wrongly For example, if in an automobile cruise control system a speed of 70 measured as the set speed 65 miles/hours, then the feedback miles/hour tracking error without knowing it. filtering can be addressed system miles/hour is will have a 5 More serious measurement mistakeslike an orienta-tion sensing error can cause a positive feedback error and inaccuracy control and destabilize by employing diversified the system. redundant The issues of sensing sensor suits and fault-tolerant algorithms. 2. Time Delay For a feedback control system to work, it requires continuous repetitive cycles of operations in-cluding detection, information processing, decision, actuation, and control. Since it needs time to perform tasks in each cycle of operation, more or less there is atime latency ortime delay for each control cycle. If the time delay is too long, bythe time the information is received bythe controller it is already out of date, not reflecting the current status of the system any more. Using out-of-date information for decision and control maylead to poor performance or even cause the system to become unstable. To alleviate the detrimental effect of time delay, the detailed dynamics model,in-cluding dynamics in the control 3. Actuator Actuators of the plant, actuators, sensors, and data transport delays, need to be incorporated system design. Saturation are designated to implement may not be able to execute all faithfully the control due to actions physical determined constraints. by the controller, but they For example, the range and capabilities of the power supplies, the engines, and the control surfaces of the airplane are all physi-cally constrained. Normally the control-input signals are within the control-input constrained limits, but under some emergencies the controller may haveto issue stronger control signals in attempting to mitigatethe crisis. If the control signal exceeds the actuator limits, the actuator will saturate at its extreme value, and the actual control input delivered to the plant will be the saturated oneinstead of the intended one by the controller. Unless a special contingency control strategy is in place to address the actuator saturation issue, the saturation may cause a miscommunication between the plant and the controller and drive the controller output even higher that would continue keeping the input of the plant at the sustained saturation value. This wind-up phenomena and sustained actuator saturation may cause the feedback control system to depart from its intended and become unstable. 4. Dramatic Change of Plant Dynamic operating equilibrium 7.2 Afeedback control system is usually System Representations designed based on the dynamics and Properties model representing (the system to be controlled) in an operating region around a desired equilibrium. controller thus designed is supposed to become inadequate a violent work well in this particular if the plant dynamics disturbance. suffers A remedy for this failure a dramatic condition and replace it by a contingency controller specifically operating region; 183 the plant The nominal however, it change due to a component is to disengage the inadequate will failure or controller designedto address the failure condition. 7.2 System Representations and Properties A system is an operator that specifies the cause/effect relationship between the input u(t) andthe output y(t): y(t) = G[u(t)], as shown in Figure 7.4. Definition 7.1 (Linear A system superposition Systems) or an operator principle G, as shown in Figure 7.4, is said to be linear if and only if the following is satisfied: G[c1u1(t)+c2u2(t)] where c1 and c2 are arbitrary real or complex = c1G[u1(t)]+c2G [u2(t)] (7.8) numbers. Fig. 7.4: An operator that specifies the relationship between the input u(t) and the output y(t). Definition 7.2 (Time-Invariant Systems) A system Gis said to betime-invariant ifand only if G [u(t-t)] =y(t -t) (7.9) for any u(t) and any delay time t. Definition 7.3 (Dynamic A system Systems) Gis said to be dynamic if its output depends on past and present values ofthe input. Example 7.4 (Linear All the systems Time-Invariant described Dynamic Systems) by differential equations are dynamic systems since the variables of the differential equation at every instant always keeptheir results, dueto the past input, before updating to the new values. The system described by the algebraic equation 184 7 Fundamentals of Feedback Control Systems y(t) = au(t)+b is not a dynamic system. The system has no memory; its output y(t) only depends on the current value of input u(t). This algebraic equation looks simple, but it is not alinear system since the output due to an input c1u(t) is not equal to c1y(t) unless b = 0. The dynamic system described by the differential dy(t) equation +ty(t) dt = u(t) apparently is not time-invariant since one coefficient in the equation is function of time. time-varying system is linear since dy1 dt +ty1 = u1 dy2 dt +ty2 ? d (c1y1 +c2y2) dt = u2 For another example, the simple pendulum system However,this +t (c1y1 +c2y2) = c1u1 +c2u described by the differential equation J?(t)+B ??(t)+mg?sin?(t) =t(t) is a nonlinear system because of the sin?(t) term. Butit can be considered alinear system if the operating range of ?(t) is small so that sin?(t) is approximately equal to ?(t). Alinear time-invariant function, an impulse a signal flow system (or subsystem) can be represented by a differential equation, atransfer response, a state-space graph. For some particular model, or a graphical representation objective of analysis or design, like a block diagram or we may choose one representa-tion of the system over the others, but it is quite easy to convert from one representation to another, as described in Section 6.6. 7.2.1 Transfer Function and Differential Equation As shown in Figure 7.5, alinear time-invariant time system can be represented by a differential equation in domain: y(n)(t)+an-1y(n-1)(t)+ +a1?y(t)+a0y(t) =bmu(m)(t)+bm-1 u(m-1)(t)++b1 ?u(t)+b0 u(t) (7.10 or by a corresponding transfer function in frequency domain: Y(s) U(s) = G(s) = bmsm+bm-1sm-1 +bm-2sm-2 + +b1s+b0:= sn+an-1sn-1 +an-2sn-2 + +a1s+a0 N(s) D(s) (7.11) where mand nare positive integers. The system issaid tobeproper orstrictly proper if m=norm<n, respectively. All the practical systems to be considered are proper or strictly proper, and the controller to be designedis required to be proper or strictly proper since a non-proper controller is not implementable. Note that the differential equation in Equation 7.10 is the time-domain description of the system, while the transfer function in Equation 7.11 is the frequency-domain description of the same system. The bridge between the differential The Laplace transform equation of the differential and the transfer equation function of Equation 7.10 in Equation 7.11. Onthe other hand, the inverse Laplace transform D(s)Y(s) = N(s)U(s) will yield the same differential equation. is simply the Laplace transform. will lead to the transfer function of the transfer function equation 7.2 Fig. 7.5: Representations of linear time-invariant Although the initial conditions should System Representations and Properties 185 system: differential equation and transfer function. be considered in the process of solving for the output response y(t), they are irrelevant to system representations, andtherefore they should beignored in the represen-tation conversion process. To facilitate the conversion process, the variable s in the transfer be considered as the Laplace transform of the differentiation following differentiation operator conversions: d/dt Example 7.5 (Conversion ? s, d2/dt2 ? s2, Between the Differential Considerthe system withthe following =L[y(t)] and U(s) Solution: Using the differentiation =L[u(t)], can , dn/dtn ? sn (7.12) Equation and the Transfer Function) differential equation, y(t)+3 ?y(t)+2y(t) Let Y(s) function operator d/dt. In summary, we havethe =4 ?u(t)+12u(t) (7.13 find the transfer function of the system. operator conversion shown in Equation 7.12, by inspection we have the conversion, y(t)+3 ?y(t)+2y(t) =4 ?u(t)+12u(t) ? (s2 +3s+2)Y(s) = (4s+12)U(s) (7.14) which leads to the transfer function G(s) = Y(s) U(s) Note that the conversion procedure is bidirectional. transfer function as easily asthe other way around. 7.2.2 Impulse 4s+12 = (7.15) s2 +3s+2 A differential equation can be obtained from the Response and Transfer Function Asillustrated in Figure 7.6, let the input to the system output will be Y(s) = G(s)L[d(t)] = G(s) ? G(s) be a unit impulse function y(t) = g(t) d(t), then the =L-1 [G(s)] which meansthe impulse response g(t) is the time-domain counterpart of the transfer function G(s)the inverse Laplacetransform ofG(s). Hence,the impulse response can be considered asa representation of the system, and the output y(t) can be computed via the following convolution integral: y(t) = ?tg(t-t)u(t)dt -8 (7.16) 186 7 Fundamentals of Feedback Control Systems Fig. 7.6: Impulse Example 7.6 (Impulse response and transfer Response and Convolution Integral) Consider the system with transfer function the impulse response function. G(s) = b/(s +a), where a and b are constants. Find of the system and compute the step response of the system using the convolution integral. Solution: Theimpulse response is g(t) =L-1 [G(s)] = be-at, t =0 Then the step response (i.e., the output of the system due to the unit step input, us(t)) is y(t) -8g(t-t)us(t)dt=?t -8be-a(t-t)us(t)dt =0be-a(t-t)dt ?t ?t =be-at ?t ae-ateat ? ae-at(eat-e0)=ba(1-e-at) ?tg(t)us(t-t)d = 0eatdt = b ?t0 = b Notethat the other form of the convolutional integral y(t) = -8 will yield the same result. 7.2.3 State-Space Model and Transfer As mentioned in previous has become increasingly state-space control Function chapters, the state-space important systems theory. representation due to the recent rapid The state-space or the state-space advancement model of systems of computing model usually is represented tools in the compact and the matrix form: x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) (7.17) where thevectors x?Rn, u?Rm, and y ?Rpare then1 state vector, them1input vector, and the p1 output vector, respectively. Thematrices A?Rnn,B?Rnm, C?Rpn, andD?Rpm are the nn Amatrix, thenm Bmatrix, thepn Cmatrix, and thepm Dmatrix, respectively. As discussed in the previous chapters, particularly of a system is not unique since the state variables in Section 6.6, the state-space can be chosen arbitrarily. model representa-tion However, the transfer function, the characteristic equation, and the poles and zeros of all the state-space modelsrepresenting the same system are invariant. A state-space model can be obtained directly in the system modeling process, as demonstrated in Chapters 4 and 5, where the physical flowing through inductors, variables of interest, like the displacements, and the voltages across capacitors, are usually the velocities, the cur-rents chosen as state variables. It also can be assembled from a transfer function, a differential equation, or an interconnected system, which is composed of several subsystems and components, as described in Chapter 6. 7.2 System Representations and Properties 187 Onthe other hand,the transfer function of the system represented by a state-space model (A,B,C,D) can be computed using the following formula: Y(s) U(s) := G(s)=C(sI-A)-1B+D Thetransfer function also can be obtained by applying with the state-space 7.2.4 Characteristic U(s) Equation, Poles, and Zeros = G(s) = transfer function (Equation 7.11), bmsm+bm-1sm-1 +bm-2sm-2 + +b1s+b0 := sn +an-1sn-1 +an-2sn-2 + +a1s+a0 Under the assumption that the numerical polynomial no common Masons gain formula to a state diagram associ-ated model, as shown in Section 6.6.1. Considerthe system represented by the following Y(s) (7.18) factor, the denominator polynomial N(s) D(s) N(s) and the denominator polynomial D(s) is defined as the characteristic system, and the equation D(s) = 0is the characteristic D(s) have polynomial of the equation: D(s)=sn+an-1sn-1 +an-2sn-2 + +a1s+a0=0 (7.19) The poles of the system are defined as the roots of the characteristic equation, and the zeros of the system are defined asthe roots of the equation N(s) = 0: (7.20) N(s)=bmsm+bm-1sm-1 +bm-2sm-2 + +b1s+b0=0 Note that the dynamic system in the complex behavior of the system is plane, as welearned from mainly determined have an effect onthe system response, asillustrated in the following Example 7.7 (Characteristic Equation, 12 s2 +3s+2 , of the poles of the The location of the zeros also example. Poles, Zeros, and Their Effect on Dynamic Behavior) Considerthe following three systems withtransfer functions Ga(s) = by the location Sections 3.2 and 3.3. Gb(s) = 4s+12 s2 +3s+2 , Ga(s), Gb(s), and Gc(s), respectively: Gc(s) = -4s+12 The three transfer functions have exactly the same characteristic equation, s2 +3s+2 v2 has tworealpoles ats =-1and s = -2.Their damping ratio is? =3/2 overdamped. However, these three systems have different zero structure. (7.21) s2 +3s+2 = 0, which = 1.06, and they Ga(s) has no zero, are all Gb(s) has a zero inthelefthalfofcomplex plane ats = -3,but thesystem Gc(s) has one zero intherighthalfof the complex plane at s = 3. The step responses of these three systems are plotted on Figure 7.7. The step response of the sys-tem Ga(s), which has nozero, isya(t)=6-12e-t+6e-2t. The derivative ofya(t)canbefound as y?a(t)=12e-t-12e-2t, which yields ?ya(0) =0,azero slope att =0.Hence, ya(t)rises upslowly in the beginning. t The step response ofthesystem Gb(s), which has one zero ats =-3,isyb(t)= 6-8e-t+2e-2t. The derivative ofyb(t)can befound as ?yb(t) =8e-t-4e-2t, which yields ?yb(0) =4,aslope of4at = 0. Hence, yb(t) rises more quickly in the beginning and has afaster response than ya(t) 188 7 Fundamentals of Feedback Control Systems Fig. 7.7: Effect of zeros on dynamic behavior of the system. The step response ofthesystem Gc(s), which has one zero ats =3,isyc(t)=6-16e-t +10e-2t. The derivative ofyc(t) can befound as ?yc(t) =16e-t -20e-2t, which yields ?yc(0) =-4,aslope of-4att =0. Hence, yc(t) atfirstwas going down toward theopposite direction until t =0.223s atyc(0.223) =-0.4, where it reverses its course back to the correct upward direction. Hence, yc(t) has a slower response than ya(t). Thisinitial opposite direction movementis atypical property of the systems with zerosin the right half of the complex plane. The systems with this property are called nonminimum phase systems. 7.3 Stability of Linear Systems Although the definition of stability has not yet been defined, weroughly grasped a little physical sense of it from the step response of the first-order system as discussed in Section 2.4.2. In Equation 2.75, the exponential term e-t/tofthestep response would become unbounded if -1/t >0,which means the characteristic equation, ts+1=0,otfhe first-order system would have apole s =-1/t>0 inthe right half of the complex plane. Wealso learned from Section 4.4.3 that the simple inverted pendulum system is unstable because some of its poles are in the right half of the complex plane. We were even more convinced by the fact that the simple inverted pendulum system was stabilized after a state feedback placed all the closed-loop system poles in the left half of the complex plane. Basically there are two stability definitions for linear time-invariant systems. Oneis called BIBO (bounded-input/bounded-output) stability, and the other is internal stability. Since these two defi-nitions are relevant to how the input and the internal initial conditions, respectively, affect the output response. Before giving the two definitions, we will review the zero-state and zero-input responses in the following subsection. 7.3.1 Zero-State Response and Zero-Input Response The total response of a linear system can be decomposed into two parts, as shown in Figure 7.8: the zero-state response yU(t), whichis the response dueto the input u(t) only, and the zero-input respons 7.3 Stability of Linear Systems 189 yI(t), which is the response due to the initial conditions only. In the following, a simple second-order linear system is employed to illustrate how the zero-state response andthe zero-input response relate to the characteristic equation or the pole locations Fig. 7.8: Total response y(t) of the system. = zero-state response yU(t)+ zero-input response yI(t). Example 7.8 (Effects of System Poles on Zero-State Response and Zero-Input Considerthe system withthe following y(t)+3 Assume Y(s) respectively, =L[y(t)], U(s) of the system. differential equation, ?y(t)+2y(t) =L[u(t)], Response) =4 ?u(t)+12u(t) (7.22) andlet y(0) and?y(0) bethe initial The Laplace transform of the differential equation values of y(t) and?y(t), yields the following alge-braic equation: s2Y(s)-sy(0)?y(0)+3 [sY(s)-y(0)]+2Y(s) =4sU(s)+12U(s) which can be rearranged (7.23) as follows, 5 Y(s) = s2+3s+2U(s)+ s2+3s+2 1 ?y(0)+ s2+3s+2y(0) s+3 := G(s)U(s)+ ? G1(s) G0(s) ? ?? (7.24) y?(0) y(0) and therefore the total response of the system is the sum of the zero-state response and the zero-input response is as follows: y(t) =L-1 [G(s)U(s)]+L-1 ? ? G1(s) G0(s) ? ? ?? y?(0) y(0) := yU(t)+yI(t) (7.25) Notethat the denominators ofG(s), G1(s),and G0(s)are all equal to the characteristic polynomial of the system. The result of Example 7.8 can be extended to a more general linear time-invariant by the differential equation, system described y(n)(t)+an-1y(n-1)(t)+ +a1 ?y(t)+a0y(t) (7.26) =bmu(m)(t)+bm-1u(m-1)(t)+ +b1 ?u(t)+b0u(t) and the generalized result y(t) of Equation 7.25 will be =L-1 [Y(s)] =L-1 [GU(s)U(s)]+L-1 [GI(s)y0] := yU(t)+yI(t) (7.27 190 7 Fundamentals where y0 = ? of Feedback Control Systems ?T y(n-1)(0) ?y(0) y(0) andthe polynomial of the system, denominators of GU(s) and GI(s) are equal to the char-acteristic sn+an-1sn-1 +an-2sn-2 + +a1s+a0 (7.28) Remark 7.9 (Conditions fortheZero-Input Response tobeZero ast ?8and theZero-State Re-sponse to be Bounded) Since the rational function GI(s) is strictly proper, it can be seenfrom Equation 7.27 that lim yI(t) = limsGI(s)y0 t?8 =0 s?0 if all the roots of the characteristic equation are in the strictly left half of the complex plane. That means, thezero-input response ortheresponse due totheinitial conditions willonly decay tozero ats ?8 if the real part of the roots of the characteristic equation are strictly negative. On the other hand, yU(t), thezero-state response, ortheresponse due totheinput only, ingeneral may benonzero as t ?8. However, for the system to be meaningful, yU(t) needsto be bounded if the input u(t) is bounded. Since the transfer function GU(s) is proper and its poles are assumed all in the strictly left half of the complexplane,yU(t) =L-1 [GU(s)U(s)] will be boundedif u(t) is bounded. The remark can also be recapitulated system represented by the following in the state-space setting. Consider a linear time-invariant state-space model: x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) Let X(s) and U(s) be the Laplace transform of x(t) and u(t), respectively, and x0represent the initial state vector x(0). Then the Laplace transform of the state equation will lead to the following solution of the state equation: x(t) =L-1 ?(sI-A)-1? ?(sI-A)-1BU(s) ? x0 +L-1 (7.29) Since the inverse Laplace transform of(sI-A)-1 isthestate transition matrix F(t), L-1 ?(sI-A)-1? = F(t) Equation 7.29 can be rewritten in terms of the state transition x(t) = F(t)x0 + matrix asfollows: ?tF(t-t)Bu(t)dt:=xI(t)+xU(t) (7.30 0 Combining this state equation solution following: y(t) =CF(t)x0 + with the output equation of the state-space model, we havethe ??tF(t-t)Bu(t)dt+Du(t) ? C := yI(t)+yU(t) (7.31) of the state-space model consists of 0 As its counterpart, shown in Equation 7.27, the output response two parts: Oneis yI(t), which is the output response dueto the initial state only, and the other part is yU(t), which is the output response due to the input u(t) only. It is easy to seethat the response due to the initial state, 7.3 limCF(t)x0 Stability of Linear Systems 191 =0 t?8 which means thatyI(t)willapproach tozero ats ?8,if theeigenvalues oftheAmatrix (i.e., the poles of the system), are all in the strictly left half of the complex plane. Meanwhile, with the same condition of system poles being all in the strictly left half of the complex plane, the output response due to the input only, yU(t) =C ?tF(t-t)Bu(t)dt+Du(t 0 will be bounded for every bounded input following u(t). For ease of reference, the result is summarized in the Lemma. Lemma 7.10 (Sufficient Condition for BIBO Stability and Internal Assume the system poles (i.e., the eigenvalues plane, then (1) ofthe Stability) A matrix) are all in the strictly left ofthe complex we have the following: The response due to the initial state x0, lim t?8 t ?8),and F(t)x0 = 0 (i.e., xI(t) will approach to zero as ?t (2)The response due tothe input u(t), yU(t)=C0F(t-t)Bu(t)dt+Du(t), isbounded for every bounded input u(t). 7.3.2 BIBO Stability and Internal Stability From the discussion regarding how a system would respond to any initial state x0 or any bounded input u(t), it is meaningful to define system stability based on the output response of the system due to input u(t) only or based onthe state response dueto the initial state x0 only. Definition 7.11 (BIBO Stability) A system is BIBO (bounded-input/bounded-output) in a bounded output. stable ifand BIBO stability is defined based on the input-output relationship. only if every bounded input results Forthe cart-inverted pendulum sys-tem consideredin Section4.5,the outputis the angular displacement? of the pendulum(the stick) and the objectiveis to keepthe pendulum at or aroundthe equilibrium, ? = 0.If the systemis uncompen-sated, the pendulum will departfrom the equilibrium (i.e., ? will increase without bound) underthe influence of a tiny disturbance input. The uncompensated cart-inverted pendulum system is obviously an unstable system. But some sys-tems mayonly produce unbounded output for a special kind of bounded input. For example, the notorious collapse of the Tacoma Narrows Bridge was caused by the oscillation resonance that occurs whenthe input frequency matchesthe natural frequency of the system. Hence,the key wordin the definition of BIBO stability is every. For a system to be BIBO stable, every bounded input hasto result in bounded output. But, how canit possible to examine every bounded input? A practically doable approach is using the impulse response integral as described in the following theorem. Theorem 7.12 (Impulse Alinear time-invariant Response Integral Check for BIBO Stability) system with impulse response g(t) is BIBO stable ifand only if 192 7 Fundamentals of Feedback Control Systems ?8 |g(t)|dt=M<8 (7.32) 0 Example 7.13 (Check BIBO Stability Using the Impulse Response Integral) Consider thesystem ofExample 7.6,whose impulse response isg(t)=be-at, t =0,where aand b ?8 be-atdt =-bae-at ?8? are constants. Since ba if 0 = 8 0 a >0 if a < 0 the system is BIBO stable if and only if a > 0. This impulse response integral approach is doable; however, the computation of impulse response integral is tedious whenthe system becomes complicated. Now, we will revisit Lemma 7.10 to investi-gate if the sufficient condition for BIBO stability is also a necessary condition. This sufficient condition is indeed also a necessary condition since a system with a pole or poles on the imaginary axis of the complex plane is not BIBO stable. Example 7.14 (A System That Has Poles on the Imaginary Axis Is Not BIBO Stable) Considerasystem G(s) = 1/(s2 +?2 n ) that has poles on the imaginary axis of the complex plane at s =j?n.The output ofthesystem isbounded foralmost allofthepossible bounded inputs. However, if theinputis a sinusoidalfunction u(t) =cos?t or u(t) =sin?t, withits oscillationfrequency ? equal to the natural frequency ?n of the system, then the output will be an unbounded function of time t; hence, the system in not BIBO stable. Thesinusoidalfunction, u(t) = cos?t and u(t) = sin?t arethe real partandthe imaginary part,re-spectively, of the complex function ej?t. Forcomputationalsimplicity, u(t) = ej?t = cos?t +jcos?t is chosen asthe input, then the output y(t) =yRe(t)+ jyIm(t) is also a complex function of time consisting of yRe(t) and yIm(t) asits real and imaginary parts, respectively. Withthe input U(s) U(s) and the system G(s) given as: ej?t? s-j? 1 =L ? and = G(s) = 1 1 s2 +?2 = (s+j?)(s-j?) Then the output Y(s) can be written as Y(s) = G(s)U(s) = 1 c1 (s+j?)(s-j?)2=s+ j? c2 + c3 + s-j? (s-j?)2 wherethe partial fractional expansion coefficients are c1 = Recall that the parameter ain the following L-1 1 1 -1 4?2 , c2=-c1=4?2 , ?? 1 s+a = e-at, c3 = 2? Laplace transform L-1 e-jp/2 pairs can be a complex number: ?(s+a)2= ?te-at 1 Hence, we have the output of the system y(t) dueto the input u(t) = ej?t in the following 7.3 y(t) =c2 ej?t -e-j?t? ?sin?t-?tcos?t? +c3tej?t ? The equation is rearranged y(t) j2sin?t = t + 4?2 2? ej(?t-p/2) Stability of Linear sin?t =j 2?2 + Systems 193 t (sin?t-j cos?t) 2? as = t sin?t +j 2? = yRe(t)+ j yIm(t) 2?2 where yRe(t) =(1/2?)t sin?tand yIm(t) =(1/2?2) (sin?t-?tcos?t) are theoutput responses due to the inputs u(t) = cos?t and u(t) = sin?t, respectively. Note that both are unbounded, growing with time. Therefore, the system is not BIBO stable if it has poles on the imaginary axis. Since the sufficient condition for BIBO stability described in Lemma 7.10 is also a necessary condi-tion, the lemma now can be modified asthe following Theorem 7.15 (Necessary and Sufficient A linear time-invariant theorem. Condition for BIBO Stability) system is BIBO stable ifand only if all its poles are in the strictly left halfof the complex plane. This theorem provides an easily verifiable necessary and sufficient condition for BIBO stability. It also makesit clear that all the closed-loop system poles are required to be placed in the strictly left half of the complex plane to achieve stability. In addition to BIBO stability, which is defined based on the external input-output relationship, there is another meaningful stability definition called internal stability. Definition 7.16 (Internal Stability) Thelinear time-invariant system x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) is internally stable ifthe solution x(t) of x?(t) = Ax(t) withinitial state x(0) =x0 tends toward zero ast ?8forarbitrary x0. As described in Lemma 7.10, the condition that all the eigenvalues of the A matrix are in the strictly left half of the complex plane is sufficient for the system to be internally stable. Similar to the case of BIBO stability, with eigenvalues Example this condition is also a necessary condition on the imaginary 7.17 (A System axis would be internally with Eigenvalues for internal stability. If it is not, then a system stable. on the Imaginary Axis Is Not Internally Stable) Consider the system x?(t) = Ax(t) where x10 and x20 are arbitrary. = ?0 -? ? ? 0 x(t) with initial state x(0) = x0 = Notethat the eigenvalues of the system, ?? x10 x20 which are the roots of the characteristic equation det(?I-A) =?2+?2=0,areonthe imaginary axis atj?. Sinc 194 7 Fundamentals of Feedback Control Systems ? ?-1 ?? ?s -???? ?x10s-x20? s ? 1 x10 x20 (sI-A)-1x0 = -? s = x10 x20 ? s s2 +?2 1 = s2 +?2 x10?+x20s we havethe solution of the state equation as x(t) ?(sI-A)-1x0 ?=?x10cos?t-x20sin?t? =L-1 x10sin?t +x20cos?t which obviously willcontinue tooscillate instead ofapproaching tozero ast ?8.Therefore, the system is not internally Since the sufficient stable if it has eigenvalues on the imaginary condition for internal stability condition, the lemma now is modified asthe following Theorem 7.18 (Necessary and Sufficient Thelinear time-invariant is internally complex described in axis. Lemma 7.10 is also a necessary theorem. Condition for Internal Stability) system x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) stable if and only if the eigenvalues of the A matrix are all in the strictly left half of the plane. Remark 7.19 (Internal Stability Is a Stronger Condition Than BIBO Stability) Internal stability is a stronger stability condition than BIBO stability since BIBO stability only re-flects the attributes of the system that are observable from the output and controllable from the input. There mayexist an unstable hidden-mode statethat leads to internal instability while the BIBO stability measureis unable to detect it. However, if all the states of the system are controllable and observable, then BIBO stability is equivalent to internal stability. Detailed discussion regarding controllability and observability will be given in Chapters 10 and 11. Theorem 7.18 provides an easy wayto check the internal stability of an existing system. It also can be employed to design a stabilizing controller to guarantee the internal stability of the closed-loop system. In the following section we will discuss how to employ this theorem and a simple state-feedback control to stabilize an originally unstable system. 7.4 Similarity Transformation As discussed in the previous of a system is not unique chapters, in State Space particularly since the state variables in Section 6.6, the state-space theoretically can be chosen model representation arbitrarily. However, in practice the state variables are not chosen randomly. They usually are selected based on two considerations. Oneis to associate the state variables with the physical variables of interest, and the other is to choose state variables so that the state-space modelis in a special form for the purpose of analysis or control system design. Onsome occasions, we may need to transform a given state-space modelto a special form. Thistransformation is called similarity transformation. Under similarity transformations, the characteristic the A, B, and C matrices in the state-space equation, and the poles and the zeros model may change, but the transfer will remain invariant. function, 7.4 Assume a linear time-invariant system is described Similarity Transformation by the following x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) state-space in State Space 195 model: (7.33) Letx(t) bea newstatevector,definedasx(t) compatible =T-1x(t), whereTis a nonsingular matrix withdimension with the state vector. Then wehavethe newtransformed state-space modelin the following: x?(t) = T-1?x(t) = T-1Ax(t)+T-1Bu(t) = T-1ATx(t)+T-1Bu(t) (7.34) y(t) =Cx(t)+Du(t) =CTx(t)+Du(t) Thatis, the similarity transformationx(t) = T-1x(t) hastransformed the original state-space modelin Equation7.33to the new state-space model withthe newstatevectorx(t), x?(t) =Ax(t)+ Bu(t) (7.35) y(t) =Cx(t)+Du(t) where A = T-1AT, B = T-1B, C =CT Theorem 7.20 (Invariance Under Similarity (7.36) Transformation) Thetransfer function, the characteristic equation, and poles and zeros are invariant under the simi-larity transformation that transform the state-space model(A,B,C) to (T-1AT,T-1B,CT). Proof: G(s)= C(sI-A)-1 B =CT(sI-T-1AT)-1T-1B =CT(TsI-TT-1AT)-1B =C(TsIT-1 -TT-1ATT-1)-1B =C(sI-A)-1B =G(s) The ability to use the similarity transformation to transform a state-space representation from one form to another is a great advantage in the analysis and design of control systems. The special forms of state-space representations include diagonal form, companion form, controller form, observ-ability form, noncontrollable 10 and 11, the similarity canonical form, transformation and nonobservable canonical will be employed to achieve the form. Later on in Chapters Kalman decomposition, which breaks down the state spaceinto four parts according to controllability and observability. Moreover,the similarity transformation also can be utilized to identify the stable subspace in the state space. In the following, we will introduce the diagonal form and the companion form and their advantages in control system analysis and design. 7.4.1 Diagonalization of A Matrix Using Similarity Transformation Considerthe state-space modelgiven by Equation7.33. Find a similarity transformationx(t) =T-1x(t) that transforms the state-space model of Equation 7.33to the new state-space modelshown in Equation 7.35 so that the A = T-1AT is diagonal. ? ? ? ?1 T-1AT = ? = ? ? ? ?2 ??AT =T? ? ... ? ? ?n (7.37 196 7 Let ei, i Fundamentals = 1,2, ...,n, of Feedback be column Control Systems vectors of T. Then, ? Ae1e2 en = e1e2 en ? ? ?1 ? ? ? ? ?2 ? ? ??Aei =?iei ? ... ? i ? = 1,2, ...,n (7.38) ? ?n where?i must be an eigenvalue of A and ei a corresponding eigenvector. A nonsingular T can be found if and only if A has n linearly independent eigenvectors. Example 7.21 (Diagonalization of a State-Space Model) Considerthe system withthe following state-space model, x?(t) = Ax(t)+Bu(t) y(t) To find a similarity =Cx(t) transformation = = ? 12 ?-2 -2? ?-1? 2 3 x(t)+ u(t) 1 (7.39 16 ? x(t) that transforms a state-space model to a diagonal form, the first step is to obtainthe eigenvalues?1,?2andtheir associatedeigenvectors e1,e2. ? ? ? ? ? ???=0 ? e1=? ? ?-2 2-3? ?-2 -1?? ? ?? -2 =0 ?e2= -2 ? +2 2 det(?I-A) =det -2 ? -3 =?2-?-2=0 ? ?1=-1, ?2=2 and -1+2 2 -2 -1-3 2+2 2 e2 = Let the similarity transformation 1 e1 = 2 4 2 -2 -2 1 1 -2 -4 1 1 matrix be T =[e1 e2]. Then the diagonalized state-space modelis obtained as follows: x?(t) = T-1ATx(t)+T-1Bu(t) = ?? ? ? 1/3 -10 x(t)+ 0 2 -1/3 u(t) (7.40) y(t) =CT x(t) =? -8 -20?x(t) Wehave learned that a given state-space model can be transformed to a diagonal form if and only ifthenn Amatrix ofthemodel has nlinearly independent eigenvectors. The diagonal form has several advantages. The poles of the system appear conspicuously A, and all the off-diagonal on the diagonal line of the elements of the A matrix are zero. The diagonal form matrix not only saves data stor-age size, it also tremendously reduces computational complexities, especially for high-order systems. The corresponding diagonal state diagram on Figure 7.9 shows even more clearly that the system has been decomposed intotwosubsystems: onewith itspole ats =-1and theother with apole at s = 2. Another important form of state-space model is the companion form, implement a pole-placement control system design later in this chapter. which will be employed to 7.4 Fig. 7.9: Similarity 7.4.2 Obtaining a State-Space To reduce the notational to Consider the state-space y(t) without loss demonstrate =Ax(t)+ State Space 197 Transformation state-space model is em-ployed model to a companion form. model given by where det(?I-A) =?3+a2?2 +a1? +a0 =Cx(t) (7.41) = T-1x(t) that transforms the state-space companion form: Bu(t) whereA = T-1AT = y(t) =Cx(t) Let the similarity follows a third-order a state-space The objective is to find a similarity transformation x(t) x?(t) in state diagram. Using Similarity of generality, how to transform = Ax(t)+Bu(t) modelto the following Transformation to diagonal form Modelin Companion Form complexity, in the following x?(t) transformation Similarity ? ? 0 0 1 0 0 1 ? ?, ?? ?? 0 B = T-1B = 0 -a0-a1-a2 transformation (7.42) 1 matrix be T =[t3 t2 t1]. Then the equations can be rearranged as A[t3 t2 t1] =[t3 t2 t1] ? ? 0 1 0 0 0 1 ? ? ? ?,B=[t3 t2t1] ?? 0 0 -a0-a1-a2 1 which lead to t1 = B, t2 = At1 +a2t1, t3 = At2 +a1t1 or T = ? A2B+a2AB+a1B Notethat the similarity matrix C(A,B) matrix (7.43) The definition and physical will be introduced later in Chapter meaning of controllabil-ity 10. A state-space model can be to a companion form if and only if the system is controllable. The companion form similarity models, and by induction formula B? matrix T is nonsingular if and only if the controllability = ? B AB A2B? is nonsingular. and controllability transformed transformation AB+a2B is obtained transformation procedure can be repeated for higher-order a more general n-th order companion form similarity and summarized in the following theorem. state-space transformation 198 7 Theorem Fundamentals of Feedback 7.22 (Companion Form For the n-th order state-space x?(t) y(t) Control Similarity Transformation) model given by = Ax(t)+Bu(t) where det(?I-A) =?n+an-1?n-1 + +a1?+a0 =Cx(t) The similarity transformation x(t) companion Systems = T-1x(t) that transforms the state-space model to the following form, ? 0 x?(t) (7.44) =Ax(t)+ where A = y(t) =Cx(t) =CT x(t) ... 0 ? Bu(t) ? ?? ? ?? 1 0 0 ? ? ? ? ? ... ? ? ? 1 , B = ? ? ? ? ... ? (7.45) ? ?tn ??????? =An-1 +an-1An-2 +++a2A+a1I BB tn-1= An-2 +an-1An-3 +a3A+a2I ? ? ? 0 ? -a0 -a1 ? 1 ? ? 0 ? 1 -an-2-an-1 can be obtained using the following formula: ? ? ? ? T =[tntn-1 t2t1], where... t2=(A+an-1I)B (7.46) ??????? t1 = B Example 7.23 (Companion Form Transformation of a State-Space Model) Considerthe system withthe following state-space model: x?(t) y(t) The characteristic polynomial = Ax(t)+Bu(t) =Cx(t) = = [12 ? ? ?? -2 -2 2 3 -1 x(t)+ 1 u(t) (7.47) 16] x(t) of the system is ? ? +2 2 ? det(?I-A) =det -2 ? -3 =?2-? -2=?2+a1? +a0 Thesimilarity transformationx(t) =T-1x(t) that transformsthe state-spacemodelto the companion form: x?(t) =Ax(t)+ Bu(t) y(t) =Cx(t) can be obtained = T-1ATx(t)+T-1Bu(t) =CT x(t) using Equation 7.46 from T =[t2 t1] where A = ? ? ?? 0 1 , B = -a0-a1 0 1 Theorem 7.22 as follows: =[(A+a1I)B B] = ?1 -1? 0 1 (7.48 7.4 Then the companion form state-space x?(t) Example Equation =CTx(t) 7.21, a state-space 7.40 using a diagonal state-space =[12 model of Equation form form, similarity respectively, these state-space representations x?d = in State Space 199 ? ? ?? 0 1 2 1 0 x(t)+ u(t) 1 (7.49 14]x(t) 7.39 was transformed transformation. was transformed companion form similarity transformation. and the companion = model of Equation 7.39 Transformation as follows: = T-1ATx(t)+T-1Bu(t) y(t) In model is found Similarity Similarly, to the companion to the in diagonal Example form in form in 7.23, the same Equation 7.49 using a Thetwo state diagrams associated with the diagonal form are shown in Figure 7.9 and Figure 7.10. For ease of reference, are also shown in the following: ?? ?? -1 0 0 2 1/3 xd(t)+ -1/3 u(t) = Adxd(t)+Bdu(t) (7.50) y(t)=[-8 -20] xd(t)=Cdxd(t) and x?c = y(t) These two state-space There must be some ? ? ?? 0 1 xc(t)+ 2 1 =[12 0 1 14] xc(t) u(t) relationship (7.51) =Ccxc(t) models appear quite different, mathematical = Acxc(t)+Bcu(t) and yet they actually represent the same system. between them. Indeed, the following theorem provides a wayto find the similarity transformation connecting them. In the following, a minimal state-space model meansthat the number of state variables or the dimension of the A matrix is minimal. A minimal state-space modelis also controllable and observable. The definition and physical mean-ing of controllability, observability, and minimal realization will be discussed in Chapters 10 and 11. Theorem 7.24 (Minimal Assume (A1,B1,C1) State-Space Models Related by a Unique Similarity and (A2,B2,C2) are two minimal state-space Transformation) models of a system. Then there exists a uniquesimilarity transformation T sothat A2 = T-1A1T, B2 = T-1B1, andC2 =C1T, andthis similarity transformation matrix is T =C(A1,B1) C-1(A2,B2) where C(A,B) =? B AB where C(A,B) is the controllability In the following employed transfer function Example are connected and characteristic 7.25 (Similarity (7.52) matrix ofthe state-space model(A,B,C). example, the diagonal-form and the companion-form to verify that they ? An-1B by a similarity transformation state-space models will be and they share the same equation. Transform Between the Diagonal and the Companion Forms) The controllability matrices C(Ad,Bd) and C(Ac,Bc) of the diagonal andthe companion state-space models,respectively, are computed in the following: C(Ad,Bd) =[Bd AdBd] = ?1/3 -1/3? -1/3 -2/3 , C(Ac,Bc) =[Bc AcBc] = ?? 0 1 1 1 (7.53) 200 7 Fundamentals of Feedback Control Systems Fig. 7.10: Similarity transformation to companion form state diagram. Hence, the similarity transformation matrix is ? ???-1 ? 1/3 -1/3 T =C(Ad,Bd) C-1(Ac,Bc) = -1/3 -2/3 0 1 1 1 = ? -2/3 1/3 -1/3 -1/3 which transforms the diagonal state-space model (Ad,Bd,Cd) to the companion (7.54) model (Ac,Bc,Cc) as verified in the following: ? ?-1 ? ?? ?? ? -2/3 1/3?-1 ?-1/3 ? ??? -1/3 -1/3 ? CdT=[-8 -20]? T-1AdT = -2/3 1/3 -1/3 -1/3 -1 0 0 = -2/3 1/3 -1/3 -1/3 The transfer functions of both state-space -1/3 -1/3 0 1/3 T-1Bd = -2/3 1/3 2 =[12 1 14] = 0 2 1 1 = Ac = Bc =Cc models can be obtained using matrix computation, 4s+12 Cd(sI-Ad)-1Bd =Cc(sI-Ac)-1Bc =s2-s-2 or by applying Masons gain formula to the state diagrams shown in Figure 7.9 and Figure 7.10, respectively. The characteristic equations of both models are alsoinvariant under similarity trans-formation. They are det(?I-Ad) =det(?I-Ac) =?2-? -2=0 7.5 Pole Placement Control in State Space The basic principle of pole placement control in state space is rather simple. Suppose we are given an n-th order system with a state-space model x?(t) = Ax(t)+Bu(t) y(t) =Cx(t) (7.55 7.5 and we have learned that the behavior of the system is Pole Placement Control in mainly determined by the State Space 201 poles of the system, which arethe roots of the characteristic equation, det(sI-A) =sn+an-1sn-1 + +a1s+a0 (7.56) =(s-s1)(s-s2)(s-sn)=0 If all the state variables in the state vector x(t) are available for feedback, then the control input can be set as u(t) = Fx(t) (7.57) so that the state equation of the closed-loop system will be det [sI-(A+BF)]=sn+an-1sn-1 + +a1s+a0 (7.58) =(s-?1)(s-?2)(s-?n)=0 Theorem 7.26 (Necessary and Sufficient Condition for State-Feedback Pole Placement) For the system described by Equation 7.55, there exists a state-feedback control u(t) =Fx(t) so that theroots oftheclosed-loop system characteristic equation det [sI-(A+BF)]=0canbearbitrarily placed in the complex plane ifand only ifthe controllability ? B AB rank 7.5.1 State-Feedback There are two straightforward the order of the transformation, Pole Placement: Direct matrix ofthe system is offull rank, or ? =n An-1B (7.59 Approach ways to apply the pole placement theorem. Oneis a direct approach, which is and conceptually simple, but computationally can become very complicated when system is high. The other is a transform approach, which requires a similarity but the computation will not become much more complicated, even when the or-der of the system becomes very high. Example 7.27 (State-Feedback Pole Placement Control Using Direct Approach) Considerthe system x?(t) = Ax(t)+Bu(t) = ? ? ?? -2 -2 x(t)+ 2 -1 3 1 u(t) Findastatefeedbacku(t) =Fx(t) sothatthe closed-loopsystemhasdampingratio ? = 0.8andnatural frequency ?n = 5rad/s. Thatis, the desired closed-loopsystem characteristic equation should be s2 +2??ns+?2n =s2 +8s+25 =0 (7.60) or,equivalently, thedesired closed-loop poles are-4 j3.The characteristic equation oftheuncom-pensate system is ? s+2 2 |sI-A| = -2 s-3 ?=s2 -s-2 =(s+1)(s-2) =0 ? ? ? ? ? ? which shows that the system is unstable. It also can be seen that the controllability matrix 202 7 Fundamentals of Feedback Control Systems [B AB] = ?? -1 0 1 1 is nonsingular so there exists a state-feedback controller u(t) = Fx(t) so that the closed-loop system poles can be placed at any desired location of the complex plane. Let F =[ f1 f2], then A+BF = ? ?? ? ? -2 -2 2 and the closed-loop characteristic ? s+2+ -1 [ f1 + 3 1 equation f1 ? -2- f1 -2- f2 f2] = 2+ f1 3+ f2 will be 2+ f2 ?=s2 +( f1-f2-1)s+(-f1 -2) =0 ? (7.61) |sI-(A+BF)| = -2- f1 s-3- f2 ? ? ? ? ? By comparing the coefficients of the two characteristic f1-f2-1 =8 equations, Equations 7.60 and 7.61, we hav ? f1 =-27,f2 =-36 -f1-2 =25 The state-feedback control u(t)=Fx(t), where F= -27-36?, has successfully placed theclosed-? loop system poles atthedesired location, s =-4 j3,inthecomplex plane. The direct approach works well for low-order systems, but the complexity of the computation involved will grow exponentially as the order of the system or the dimension of the A matrix in-creases. Whenthe matrix dimension is morethan 4, the symbolic computation of the determinant of thesI-(A+BF)matrix willbecome very complicated, even with thehelp ofasymbolic computing software. Fortunately, the high-order computation issue can beresolved using similarity transformations. Since the characteristic equation and the system poles are invariant under similarity transformations, a given state-space model can betransformed to a special form like a diagonal form or a companion form, where each pole or each coefficient of the characteristic equation can be easily altered independently. 7.5.2 State-Feedback Pole Placement: Transform Approach The state-feedback pole placement problem is briefly recited as follows: the following Given a system represented by state equation, x?(t) (7.62) = Ax(t)+Bu(t) with the characteristic equation |sI-A|=sn+an-1sn-1 + +a1s+a0 =0 the objective is to find a state-feedback control u(t) F =? so that the closed-loop system has the following = Fx(t), where f1f2 fn? desired characteristic (7.64) equation |sI-(A+BF)|=sn+an-1sn-1 + +a1s+a0=0 Withthe similaritytransformation, x(t) be transformed to the following. (7.63) (7.65) = T-1x(t), the state-feedback poleplacementproblemcan Consider the same system represented by a transformed state equation 7.5 x?(t) =Ax(t)+ Bu(t) Pole Placement Control in State Space = T-1ATx(t)+T-1Bu(t) 203 (7.66) with the same characteristic equation, ?sIA?=|sI-A| =sn +an-1sn-1 ++a1s+a0 =0 ? (7.67) ? Theobjective istofind astate-feedback controlu(t) =Fx(t), where f1f2 fn? F =? so that the closed-loop system hasthe following (7.68) desired characteristic equation ?sI-( A+ B F) ?=sn +an-1sn-1 ++a1s+a0 =0 ? Transform ? (7.69) Approach Procedure Step1: UseTheorem7.22to find asimilarity transformation x(t) = T-1x(t) sothat the newstateequa-tion is in companion form as follows: x?(t) =Ax(t)+ Bu(t) ? where 0 1 0 ? A = = T-1AT x(t)+T-1Bu(t) ? ?? ? ?? 0 ... 0 ? ? ? ? ... ? ? ? 1 0 ? ? ? -a0 -a1 and the similarity transformation (7.70) ? ? ? ? ? ? ? 1 ? , B = ... ? ? ? -an-2-an-1 0 (7.71) ? 1 matrix T is ?tn ??????? =An-1 +an-1An-2 +++a2A+a1I BB tn-1= An-2 +an-1An-3 +a3A+a2I ? ? ? ? T =[tntn-1 t2t1], where... t2 =(A+an-1I)B (7.72) ??????? t1 Step 2: Let the state-feedback control = B be f1f2 fn?x(t) u(t) =Fx(t) =? (7.73) Then the closed-loop system state equation becomes x?(t) ? where ? A +BF = 0 1 ... 0 = ?A +BF ?x(t) 0 ... (7.74 0 0 ... ... ? ... ... ?-a0+f1 -a1+f2 ... ? 1 0 0 0 ? ? ? ? ? ? ? ? ? ? 0 0 1 -an-2+fn-1-an-1+fn ? (7.75) 204 7 Fundamentals of Feedback Note that this companion-form Control Systems state equation reveals that the closed-loop system characteristic equa-tion is sn+?an-1 -fn? sn-1 + + ?a1-f2? s+?a0-f1? =0 (7.76) Step 3: Forthe closed-loop system to have a desired characteristic equation as Equation 7.65, the state-feedback controller parameters fi, i = 1,2,...,n needto be chosen sothat the two characteristic equa-tions, Equations 7.76 and 7.65, are equivalent. Hence, we have f1=a0-a0 a0-f1 =a0 a1-f2 =a1 f2=a1-a1 ? ... (7.77 ... fn=an-1 -an-1 an-1-fn =an-1 ? f2 fn? is Step 4:Note that the state-feedback gain matrix F =f1 designed based on the trans-formed state equation. Tofind the state-feedback gain matrix F for u(t) = Fx(t), recall that u(t) =F x(t) =FT-1x(t) = Fx(t) Hence, ? T-1 F=FT-1=? a0-a0a1-a1 an-1 -an-1 wherethe similarity transformation In the following example, Example 7.28 (State-Feedback matrix Tis given by Equation 7.72. we will employ the same system considered how to utilize the transformed (7.78) approach to implement by Example the state-feedback Pole Placement Control Using Transform 7.27 to demon-strate pole placement. Approach) Considerthe system x?(t) = Ax(t)+Bu(t) = ? ? ?? -2 -2 2 3 x(t)+ -1 1 u(t) (7.79) Use a transform approach to design a state feedback u(t) = Fx(t) so that the closed-loop system has damping ratio ? = 0.8 and natural frequency ?n = 5rad/s. That is, the desired closed-loop system characteristic equation should be s2 +2??ns+?2n =s2 +8s+25 =s2 +a1s+a0 =0 (7.80) orequivalently, thedesired closed-loop system poles are-4 j3. The characteristic equation of the uncompensated ? s+2 2 system is ?=s2 -s-2 =s2 +a1s+a0 =0 ? |sI-A| = -2 s-3 ? ? ? ? ? (7.81) which shows that the system is unstable. It also has been shown that the controllability is nonsingular, so there exists a state-feedback controller u(t) poles can be placed at any desired location of the complex plane. matrix ? B AB ? = Fx(t) so that the closed-loop system 7.6 Recallthat in Example 7.23 the state-space model in companion x?(t)/dt Revisit Cart-Inverted Pendulum System model of Equation 7.47 wastransformed 205 to the state-space form, = T-1ATx(t)+T-1Bu(t) via the similarity transformation x(t) =Ax(t)+ Bu(t) = ? ? ?? 01 x(t)+ 21 0 1 u(t) = T-1x(t), wherethe similarity transformation matrix wasob-tained from Equation 7.48 as T =[t2 t1] =[(A+a1I)B B] = ?1 -1? 0 1 LetF = ?f1 f2 ?, then the closed-loop system state equation becomes x?(t) where A +BF = +BF ?x(t) ? ??? ? 0 1 0 + 2 1 Note that this companion-form = ?A 1 0 ? f1 f2 ? = 1 2+f1 1+f2 state equation reveals that the closed-loop ? system characteristic equation is s2+? -1-f2? s+? -2-f1? =0 By comparing the coefficients of the two characteristic -1-f2 =8 -2-f1 =25 equations (7.82) Equations 7.80 and 7.82, we have ? f1 =-27,f2 =-9 Hence,the state-feedback gain matrixis F =FT-1 =? ? ?-1 = -27-9 ? ? = -27-36 -1 -27-9? 1 0 1 ? ? 1 1 ? 01 ?, has The state-feedback control u(t)=Fx(t), where F= -27-36 successfully placed theclosed-? loop system poles atthedesired location, s =-4 j3,onthecomplex plane. As expected, theresult obtained here using the transform approach is the same asthat obtained in Example 7.27 using the direct approach. 7.6 Revisit Cart-Inverted Pendulum System In the following, the cart-inverted pendulum system westudied in Section 4.5 will be briefly reviewed before it is employed for the design and analysis of a stabilizing control system that would convert the originally unstable equilibrium to a stable one. Figure 7.11 shows the schematic and the nonlinear coupled equations of motion of the cart-inverted pendulum system. The physical data of the system are also shown in the figure. These data do not show the units, but they are all in MKS units, like the massin kilograms, length in meters,and so on. 206 7 Fundamentals of Feedback Fig. 7.11: Schematic 7.6.1 State-Space For ease of Control Systems and equations Model of the of Cart-Inverted managing the nonlinearities motion of a cart-inverted Pendulum pendulum system. System of the system, the nonlinear coupled differential equations of the system are converted into a state-space model. Let the state variables be x1 = ?, Then the equations x2 =??, x3 =s, shown in Figure 7.11 can be rewritten ? 1.288 x4 =?s in the following (7.83) matrix form: -2x2?? ? ??31.07sinx1 ?? 2 -25x4 ?T x?2 x?4 3.17cosx1 3.17cosx1 189.4 Solving Equation 7.84 for ?x?2x?4 = + 3.17sinx1x2 0 100 u (7.84) yields -378.8x2 -10sinx1 cosx1x2 2 +79.25x4 cosx1 -317cosx1u ?? ?5885sinx1 ? x?2 x?4 1 = ? (7.85) 4.083sinx1x2 2 -32.2x4 -98.5sinx1 cosx1+6.34x2 cosx1 +128.8u where ?=244-10cos2x1 (7.86) Then we have a state-space representation for the nonlinear cart-inverted system: x?(t) := ? ?? ? ?x ?3(t) ?=? ?:=f(x,u) x?1(t) x?2(t) ? ? ? ? ? ? x?4(t) f1(x,u) f2(x,u) f3(x,u) f4(x,u) (7.87) ? ? where f1(x,u) = x2 2 +79.25x4 cosx1 -317cosx1u) f2(x,u) =(1/?)(5885sinx1 -378.8x2 -10sinx1 cosx1x2 (7.88) f3(x,u) = x4 f4(x,u) = (1/?)(4.083sinx1x2 2 -32.2x4 -98.5sinx1 cosx1 +6.34x2 cosx1 +128.8u) ?=244-10cos2x1 This state-space dynamics First, we will utilize this system model can be employed to conduct analysis, design, and simulations. modelto find the feasible operation points or the equilibrium points of the 7.6 7.6.2 Equilibriums of the Cart-Inverted Pendulum Revisit Cart-Inverted Pendulum System 207 System An equilibrium of the systemis a point or a vector (x*,u*) that satisfiesthe equation f(x*,u*) Note that = 0. ? ??? =0or p,x= 20,xis3 arbitrary, x4 =0 (7.89) ? ?=???x1 ? ? f1(x,0) f2(x,0) f3(x,0) f4(x,0) ? ? ? ? 0 0 0 0 ? ? At equilibriums the angular velocity of the stick, x2, and the velocity of the cart, x4, should be both zero and the angular displacement of the stick should be either 2kp or (2k+1)p, where k is any integer. Hence, physically there are two groups of equilibriums: Oneis the upright equilibriums, x*up =[0 at which the stick is at the upright 3 0 x* 0]T (7.90) position, ? = 0, and the other is the downward x*down=[p 0 x* 3 equilibriums, 0]T (7.91) at whichthe stick is at the downward position, ? = p. Forthe stick, there are only two equilibriums: Oneis the up position, which is unstable, and the other is the down position, cart, it can be at anywhere on the rail. which is stable. For the A system can only be stabilized at the equilibriums. For the upright stick position equilibrium, al-though it is unstable the stick can still rest on the upright position if ? can be kept at zero by feed-back control or other means. Onthe other hand, it is impossible to stabilize the pendulum at any non-equilibrium position.Forexample,to keepthestickat ? =10?, the cart wouldhaveto movecontinuously with a constant acceleration, which is impossible to sustain. A common practice in control system design is to first identify an operating equilibrium of interest, and find a linearized dynamics model at the equilibrium. The linearized model can then be employed in the design of control system to achieve stabilization, regulation, tracking, and so on. For the cart-inverted pendulum system, the objective is to stabilize the pendulum at the originally unstable upright equilibrium. The two equilibriums of interest are x*U =[0 representing the upright equilibrium, 0 0 0]T (7.92) and x*D =[p 0 0 0]T representing the downward equilibrium. At these two equilibriums, (7.93) the cart position is assumed x3 = 0, which usually is considered the center of the rail. Example 7.29 (Phase Plane Trajectory of the Uncompensated Pendulum Subsystem) Considerthe pendulum subsystem of the cart-inverted pendulum system described bythe state-space model equations in Equations 7.87 and 7.88. Withthe assumption that the cart is at rest (x4 = 0), the dynamics equation for the pendulum subsystem will be ???(5885sinx1 ? -378.8x2 -10sinx1 cosx1x2 2)/(244-10cos2x1) x?1 x?2 x2 = (7.94 208 7 Fundamentals of Feedback Control Systems Fig. 7.12: Simulation diagram for the uncompensated nonlinear pendulum subsystem. Based on Equation 7.94, a Simulink model program, CinvPx1x2.mdl, shown in Figure 7.12, is constructed to conduct simulations for the uncompensated nonlinear pendulum subsystem. The time responsesof the two statevariables,x1(t) = ?(t) and x2(t) =??(t), dueto the initial condition: x1(0) = 0.001 rad and x2(0) = 0 rad/s are shown in the left-hand side of Figure 7.13. Theinitial is very close to the equilibrium point [0 0]T with the upward pendulum, state but since this equilibrium is unstablethe pendulum beforelong starts to moveaway toward the stable equilibrium [p 0]T. The simulation results are obtained by running the will automatically The MATLAB % Filename: % Run %% d2r call the Simulink code is listed model program May CSD_fig7p13.m program 6, 2020 to automatically to conduct which the simulation. response call CinvPx1x2.mdl Simulation = pi/180, x10=0.06*d2r, x20=0, sim_options=simset('SrcWorkspace', open('CinvPx1x2'), %% CinvPx1x2.mdl, CSD fig7p13.m, asfollows: CSD_fig7p13.m this MATLAB program: Plot x1(t), sim_time=10, 'current', sim('CinvPx1x2', x2(t), x2 vs subplot(1,2,1), plot(t,x1,'b-',t,x2,'r-'), subplot(1,2,2), plot(x1,x2,'b-'), [0, 'DstWorkspace', sim_time], 'current'); sim_options); x1 grid on, grid on, grid minor grid minor, During the transition, both x1(t) and x2(t) exhibit decaying oscillations before they reach a steady state at the new equilibrium point. This decaying oscillation phenomenon is relevant to the under-damped case study of the second-order systems in Chapter 3. Thesimulation results can also be seen from the phase plane trajectory shown on the right-hand side of Figure 7.13. The phase plane trajectory exhibits the relationship of the angular velocity ?? andthe angulardisplacement?, andclearlyshows how the trajectory spirals from the initial state into the final state. Theinitial state (0.001,0) is very close to the origin (0,0), the unstableequilibrium, andthe final state(p,0) is a stableequilibrium. Example 7.30 (Phase Portrait The simulation of the Uncompensated Pendulum Subsystem) process described can be employed the system due to a variety of initial to repeatedly states on the phase plane. generate phase plane trajectories A collection of of the phase plane trajectories like those shown on Figure 7.14is called a phase portrait. This phase portrait reveals that the origin (0,0) is a saddle point, without any tiny any infinitesimal which is an unstable error, ideally the perfect deviation in reality equilibrium point. If the initial upward pendulum would stay state is situated exactly without falling. at (0,0) But, of course, will cause the pendulum to drift away from the unstable equilibrium. The phase portrait shows two stable equilibrium points: one on the right at (p,0) and another onthe lef 7.6 Revisit Cart-Inverted Pendulum System 209 Fig. 7.13: Time responses and phase planetrajectory of the uncompensated pendulum subsystem. at(-p,0).The pendulum at(0,0) can either falltotheright, spiraling intothestable equilibrium (p,0), ortotheleftinto(-p,0).These twoequilibrium points seem different onthegraph, butactually they represent the same physical angular position of the pendulum. Fig. 7.14: Phase portrait of the uncompensated nonlinear pendulum system. 7.6.3 Linearized State-Space The Linearized State-Space Models at the Equilibriums Model at the Upright Equilibrium Forthe upright equilibrium at (x*U,0),the linearized state-space modelis x?(t) where AU and BU are obtained using the following ? ? ? AU = ? df1 df1 df1 dx1 dx2 dx3 df1 dx4 d f2 dx1 d f2 dx2 df2 dx3 d f2 dx4 d f3 dx1 d f3 dx2 df3 dx3 d f3 dx4 d f4 dx1 d f4 dx2 df4 dx3 d f4 dx4 ? ? ? (7.95) = AUx(t)+BUu(t) Jacobian matrices,(see Appendix C) ? ? ? 25.15-1.6188 00.33868 ? ? ? 0 1 0 0 0 0 0 1 ? ? ? = ? ? ? ? ? ? ? ? -0.42094 0.027094 0 -0.1376 (x*U,0) (7.96 210 7 Fundamentals of Feedback Control Systems ?? ? ? ?? ? ? and df1 0 du d f2 -1.3547 ? ? BU = du ? d f3 du ? ? ? = ? ? ? ? ? ? 0.5504 d f4 du (7.97) ? 0 ? (x*U,0) The poles ofthe linearized state-space modelatthe equilibrium x*Uare the eigenvalues of AU: ?[AU]={0,4.2682, -5.8926, -0.13193} (7.98) which implies that the system is unstable at the upright equilibrium since there is a pole in the right half of the complex plane. The Linearized State-Space Model at the Downward Equilibrium Forthe other equilibrium (x* D,0), the linearized state-space modelis x?(t) = ADx(t)+BDu(t) where AD and BD are obtained using the following ? ? ? AD = ? ? ? ? df1 d f1 d f1 d f1 dx1 dx2 dx3 dx4 df2 df2 df2 df2 Jacobian matrices, ? ? ? -25.15-1.6188 0 -0.33868 ? ? ? ?? ? ? ?? ? ? 0 dx1 dx2 dx3 dx4 df3 df3 df3 df3 dx1 dx2 dx3 dx4 df4 dx1 d f4 dx2 d f4 dx3 d f4 dx4 and (7.99) 1 0 0 ? ? ? = ? ? ? ? ? 0 ? 0 0 1 (7.100 ? ? -0.42094 -0.027094 0 -0.1376 (x*D,0) df1 ? BD = ? ? ? du d f2 du d f3 du 0 ? ? = ? ? ? ? 0 ? ? (7.101) ? 0.5504 df4 du 1.3547 ? (x*D,0) The poles of the linearized state-space model at the equilibrium x*Dare the eigenvalues of AD: ?[AD]={0,-0.13194, -0.81223 j4.9487} Initial State Response It is clear that the upright Analysis (7.102) and Simulation equilibrium is unstable since the linearized state-space model at this equilib-rium has a pole s = 4.2682 in the right half of the complex plane. The pendulum system can stay at this equilibrium only if the pendulum are all perfectly kept at zero, angular displacement, which is practically pendulum impossible to angular velocity, and the cart velocity maintain. Onthe other hand,thelinearized state-space modelatthe downward equilibrium x*D =[p 0 0 0]T has three poles: -0.13194, -0.81223 j4.9487 inthestrictly lefthalfofthecomplex plane, but there is one at the origin s = 0. Strictly speaking, this equilibrium is not stable since there is a pole on the imaginary axis. This s = 0 pole is caused by the lack of a natural mechanism to bring the cart 7.6 to the x3 = 0 position. However, if x3 is excluded in the stability can be regarded as a stable equilibrium converge to the equilibrium at steady Revisit Cart-Inverted Pendulum consideration, the System downward since the other three state variables 211 equi-librium will naturally state. A Simulink computer simulation program built based on the nonlinear state-space model shown in Equation 7.87 is employed to conduct simulations simulation results of the pendulum with initial for the cart-inverted pendulum. Figure 7.15 shows the condition x(0)=[-0.5240 0.50]T The initial pendulum displacement x(0)=-0.524 rad=-30?, which isnotanequilibrium, has to move toward a stable equilibrium. If there is no external intervention a shortest path to reach a nearby stable equilibrium. other than the gravity, it The pendulum would choose moves counterclockwise towards 1 =-p,overshoots it,turns around, and thenoscillates several times for =-p. the nearbystable equilibrium x* about6seconds,it settlesatthestableequilibriumx* 1 Fig.7.15: Response due totheinitial state x0=[-0.5240 0.50]Tofthecart-inverted pendulum system. Theinitial the cart cart position is at x3(0) only fluctuates a tiny = 0.5m. Since the gravity bit due to a very small reaction has no direct influence force from the swinging on the cart, pendulum. Therefore, atsteady state, x2=0, x4=0,and x1=-p,but thecartposition isstillatx3=0.50019m, whichis very closeto its initial position. The overshoot and oscillation of x1(t) and x2(t) are mainly caused bytare hecomplex poles -0.81223 j4.9487 whose corresponding damping ratio and natural ? = 0.162 and ?n = 5.015rad/s, respectively. frequency 7.6.4 Design of a Stabilizing Controller Objective of the Feedback Control The objective of the cart-inverted at the upright position, Upright Equilibrium Design pendulum x1 = 0, x2 for the control system = 0, and x4 = 0. It position, x3 = 0. Therefore, the operating design is not only to stabilize will also stabilize equilibrium x = x*U = [0 0 0 0]T the pendulum the cart at the center of the rail is when u =0 (7.103) Analysis of the Uncompensated System Recallthat the linearizedstate-spacemodelof the cart-invertedpendulumsystematthe upright x* equilibrium is 212 7 x?(t) Fundamentals of Feedback = Ax(t)+Bu(t) = Control Systems ? ? ? ?25.15-1.6188 00.33868 ?x(t)+? ?u(t) ? 0 1 0 0 0 0 0 1 0 ? ? ? ? ? ? -0.42094 0.027094 0 -0.1376 -1.3547 (7.104) ? 0 0.5504 ? The poles ofthe linearized state-space modelatthe equilibrium x*Uare the eigenvalues of A, ?[A]={0,4.2682, -5.8926, -0.13193} (7.105) The corresponding open-loop characteristic equation is |sI-A| =(s-0)(s-4.2682)(s+5.8926)(s+0.13193) =s4+1.7564s3 -24.936s2 -3.3181s =s4+a3s3 +a2s2 +a1s+a0 =0 Obviously, the uncompensated system is unstable. However,the controllability (7.106) matrix ? B AB A2B A3B? (7.107) is nonsingular; hence,there exists a state-feedback controller u(t) = Fx(t) (7.108 so that the closed-loop system poles can be placed at any desired location of the complex plane. Selection of the Desired Closed-Loop System Poles The desired closed-loop system poles are tentatively complex conjugate poles as follows: chosen to include two real poles and a pair of s1=-2,s2=-8,s3=-4+j3,s4=-4-j3 That is, the desired closed-loop system characteristic equation is given as: |sI-(A+BF)| =(s+2)(s+8)(s+4-j3)(s+4+j3) = s4 +18s3 +121s2 +378s+400 Design of a Pole-Placement State-Feedback Although the direct approach, introduced is conceptually simple, the complexities the system increases. For this fourth-order = s4 +a3s3 +a2s2 +a1s+a0 (7.109) =0 Controller in Section 7.5.1, for the state-feedback involved in the computation system, it is still pole placement grow exponentially design as the order of manageable using the direct approach, but the transform approach, discussed in Section 7.5.2, is much more efficient in computation, espe-cially if we need to repeat the design process for different sets of desired closed-loop system poles. In order to take advantage of the transform approach, wefirst needto find a similarity x(t) following = T-1x(t), to transform the state-spacemodelof the plantin Equation(7.104)to the state-space modelin companion form: x?(t) =Ax(t)+ Bu(t) where transfor-mation, = T-1AT x(t)+T-1Bu(t) (7.110) 7.6 ? 0 0 0 A=? ? ? 1 0 0 0 1 0 Revisit Cart-Inverted Pendulum System ? ?? 0 0 1 0 0 0 1 ?, B=?? ? ? ? ? -a0-a1-a2-a3 213 (7.111) ? ? Since the controllability condition, Equation 7.107 is satisfied, the similarity transformation T can be constructed using Equation 7.46in Theorem 7.22 asfollows: ? ????t4 =A3 +a3A2 +a2A+a1I B? T=t4t3t2t1 ???? -1.3547 ? 0 2.75210-62.75210-6 ? -1.3547 T=?-13.272 0.85428 ? ? and matrix ? t3 = ? A2 +a3A+a2I ? B t2 = (A+a3I)B t1 =B ? ? (7.112) 0 0 0 ? ? 0.5504 ? 0 0 (7.113) ? -13.272 0.85428 0.5504 Let u(t) =Fx(t) =?f1 f2 f3 f4 ?x(t) (7.114) Then the closed-loop system state equation becomes x?(t) ? 0 1 0 0 0 0 1 0 0 0 0 1 A+ B Fx(t) =? =? ? ? ? ? (7.115) ? -a0+f1 -a1+f2 -a2+f3 -a3+f4 Notethat this companion-form is ? x(t) ? state equation reveals that the closed-loop system characteristic equation ?? ?sIA+ B F? =s4 +(a3 -f4)s3 +(a2 -f3)s2 +(a1 -f2)s+(a0 -f1) =0 1.7564f4 =18 1.7564-18 =f4 ?a3a2-f4-f3 =a3 ? ? -24.936f3 =121 ???? -24.936-121 =f3 =a2 ???? ???? ? ? a1-f2 =a1 -3.3181f2 =378 -3.3181-378 =f2 a0-f1 =a0 ???? 0-f1 =400 0-400=f1 ???? ???? ? By comparing (7.116) ? the coefficients of the two characteristic equations Equations 7.109 and 7.116, we have (7.117 Hence, F =?f1 f2 f3 f4? =[-400-381.32 -145.94 -16.244] (7.118) Since u(t)=Fx(t)=FT-1x(t) =Fx(t)? F=FT-1 (7.119) we havethe state-feedback gain matrix F =FT-1 =[139.31 24.45230.13830.67] The state-feedback control u(t) = Fx(t), with F given, has successfully (7.120) placed the closed-loop system poles atthedesired location, s =-2,-8,and-4 j3onthecomplex plane. 214 7 Fundamentals Nonlinear of Feedback Closed-Loop The nonlinear dynamics of state-feedback simulation Systems Simulations model shown in Equations 7.87 and 7.88 will be employed in the simu-lation stabilizing control of the cart-inverted diagram shown in Figure 7.16, four integrators are employed to implement Thefunction information function System Control the state-space dynamics model equations system. In the Simulink blocks f2, f4, g2u, and g4u given in Equations 7.87 and 7.88. of f2(x), f4(x), g2(x)u, and g4(x)u in Equation 7.88 needto be typed into the blocks f2, f4, g2u, and g4u in the Simulink the function pendulum and four function block f2 and f4 should be shown program, respectively. The function expressions for as the following: (5885* sin(u[1])-10* sin(u[1]) *cos(u[1]) *u[2]2-378.8*u[2]+79.25*u[3] *cos(u[1])) /(244-10*cos(u[1])2) and (4.083* sin(u[1]) *u[2]2-32.2*u[3]-98.5* sin(u[1]) *cos(u[1])+6.34*u[2] *cos(u[1])) /(244-10*cos(u[1])2) respectively. Notethat u[1], u[2], and u[3] represent x1, x2, and x4respectively. Thereis no x3 or u[4] in the expressions. Fig. 7.16: Closed-loop simulation diagram for the cart-inverted Similarly, the function expressions for the function lowing: pendulum control system. block g2u and g4u should be shown asthe fol-(-317*cos(u[1]) *u[2])/(244-10*cos(u[1])2 and 7.6 Revisit Cart-Inverted Pendulum System 215 (128.8*u[2])/(244-10*cos(u[1])2) respectively. Notethat u[1] still represents x1, but u[2] here represents the control input uinstead of x2. The state-feedback you can either controller is implemented type the following by the sf gain block and the Saturation block; F matrix F = ? 139.31 24.452 30.138 30.67 ? into the sf gain block or just type Fin the block and define the m-file or in the CommandWindow before running matrix values elsewhere like in a MAT-LAB the Simulink simulation. The Saturation block is to mimic thereal control-input constraint assuming the input applied force isrestricted to 80Newtons. In the simulation simulation program trajectory diagram, five ToWorkspace data in arrays of compatible can be written blocks: x1, x2, x3, x4, and t are there to record dimension sothat after the simulation to plot the state variables as function of t (time) a simple or draw the MATLAB a phase plane of x2 versus x1. Figure 7.17 shows that thependulum with initial state x0=[-0.524 0 0.50]would move towards ?T andsettle atthe upright equilibrium x*U = ? 0 0 0 0 , now is a stable equilibrium, shortly after one sec-ond without much overshoot and oscillation. This desired transient response is the direct result of the choice oftheclosed-loop system poles atthedesired location, s =-2,-8,and-4 j3onthecomplex plane. Notethat the cart position x3 is also brought to zero from its initial position x3(0) Fig. 7.17: A desired stabilizing performance of a cart-inverted pendulum system = 0.5m. achieved by a state-feedback control. The graph of the control input u(t) is also shown in Figure 7.17. Initially the pendulum position is atx1=?=-30?. Apparently, thependulum would falltothe leftif nocontrol action istaken intime. The controller hasto apply a negative control-input (i.e., actuator) force to quickly movethe cart to the left in order to reverse the motion of the pendulum. The pendulum did swing back moving towards th 216 7 Fundamentals upright equilibrium. of Feedback Control The controller, Systems the actuator, the cart, and the pendulum and the sensor have to work together continuously to readjust the control-input force according to the control law (i.e., the F matrix) in order to bring the pendulum system to the desired equilibrium. The closed-loop system simulation MATLAB program: results shown in Figure 7.17 are obtained by running the follow-ing CSDfig7p17.m, CInvP4sNL.slx, to conduct results Part 2B block % BC Program % 1. Chang, Drexel Part 1: 7.15 can also be obtained by Part 2A, =-30, %% 2A: Part [0 %% Part r1 = %% Desired 0 r2 2. For 0 initial % CSD PlotCInvP.m The open-loop system the same program with code F=[0 0 0 0]. two 3, ze simulation real = wn = eq: a2h 0;25.15 a0h]; -r1, 0 0] and one pair of complex poles 0; =roots(ChEqh), system 0 0.5504]; with 0 B to 0 C=eye(4); D=[0 1;-0.42094 0 0 0.027094 0]'; ChEq=[1 a3 a2 a1 a0]; Poles_OL=roots(ChEq), form t4=(A3+a3*A2+a2*A+a1*eye(4))*B; T=[t4 feedback -0.1376]; co=ctrb(A,B);Controllability_sv=svd(co), companion t2=(A+a3*eye(4))*B; 0 G=ss(A,B,C,D); a2=Ev(2)*Ev(3)+Ev(2)*Ev(4)+Ev(3)*Ev(4); a0=0; A, frictions 0.33868;0 controllability'); t3 t2 t1]; t1=B; Ah=inv(T)*A*T, Bh=inv(T)*B Fh f2h=a1-a1h, Acl_h=Ah+Bh*Fh, 3 -r2, Poles_desired t3=(A2+a3*A+a2*eye(4))*B; Part 0 s4+a3h*s3+a2h*s2+a1h*s*a0h=0 pendulum -1.6188 disp('checking % Using F=[0 1 a3=-(Ev(2)+Ev(3)+Ev(4)); f1h=a0-a0h, control a0h=r1*r2*wn2; a1h a1=-Ev(2)*Ev(3)*Ev(4); % State no a2h=wn2+(r1+r2)*2*ze*wn+r1*r2; -1.3547; % Convert versions u_sat=100 with poles 0.95, inverted Ev=eig(A); later CSD_PlotCInvP.m x30=0.5, Open-loop Select a3h 0 or 3. 0] = % Linearized %% model pro-gram conditions a1h=(r1+r2)*wn2+r1*r2*2*ze*wn; 1 R2015a CInvP4sNL.slx characteristic ChEqh=[1 B=[0; Simulink 5/07/2020 MATLAB x10=x10_deg*pi/180, 2B: 2, % a3h=2*ze*wn+r1+r2; A=[0 program, by running which is the single line on sequence: Choose x10_deg = The plotting The MATLAB code is listed asfollows. University, running CSDfig7p17.m F Figure call the CSDfig7p17.m % % in codes replaced % filename: %% shown will automatically the simulation. will also be called to plot the figures. simulation which f3h=a2-a2h, eig(Acl_h), f4h=a3-a3h, Fh=[f1h F=Fh*inv(T), Acl=A+B*F, the and f2h f3h f4h], eig(Acl) Simulation the following to run simulink plot the simulation results sim_time=10, sim_options=simset('SrcWorkspace', open('CInvP4sNL'), 'current', sim('CInvP4sNL', 'DstWorkspace', [0,sim_time], 'current'); sim_options); run('CSD_PlotCInvP') The stabilizing controllers for the cart-inverted pendulum system are not unique. As long as a con-troller is able to place all the closed-loop system poles strictly in the left half of the complex plane, the closed-loop system will be stable. However, the performance may be different from controller to controller. In common practice, a control system designer will usually consider the following fac-tors: response time, overshoot and oscillation, steady-state response, robustness, and control-input constraint. These factors mayconflict with each other; for example, a faster response mayinvite larger overshoot and oscillations or require more control-input power. Hence,the designer may need to consider all factors and find a best trade-off design 7.7 Routh-Hurwitz Stability Criterion 217 Fig. 7.18: Response of the compensated cart-inverted pendulum system with a moreconservative design consuming less control resources. Figure 7.18 shows the response graphs of the cart-inverted pendulum system with a more con-servative controller design. It can be seen that the response time is slower. It takes morethan seven seconds to reach the steady state, but it requires muchless control-input force to complete the task. The conservative controller employed in the Figure 7.18 simulation was designed to have its closed-loop system poles toinclude tworealpoles ats =-2and s =-3,and apairofcomplex poles that associate with the damping ratio ? = 0.95 and natural frequency gain matrix of this controller is F =[31.726 4.4123 0.45207 ?n = 1rad/s. The state-feedback 1.5148] The control-input constraint or the actuator limit can be a great concern if the control-input signal issued by the controller is beyond the range of the actuator. Underthis situation, the actuator will saturate. A saturation of the actuator maycause the control system to become unstable. Hence, a control system should be designed so that its control inputs are always inside the working range of the actuators. 7.7 Routh-Hurwitz Stability Criterion The Routh-Hurwitz criterion provides an easy wayto determine the number of roots of a polynomial equation in the right half of the complex of the linear time-invariant root in the right plane without the need of computing system is determined half of the complex plane, the a system is stable. Although the root-finding polynomial control equations in a split of second, the systems by whether the systems Routh-Hurwitz the roots. characteristic criterion Since the stability equation has any is a perfect tool to check if computer programs nowadays can solve for the roots of Routh-Hurwitz criterion is still important in the design of 218 7 Fundamentals of Feedback Control Systems Fig. 7.19: Construction of the Routh array for a polynomial equation. Theorem 7.31 (Necessary Condition for Consider a system with the following Stability) characteristic equation ansn +an-1sn-1 +an-2sn-2 +an-3sn-3 + +a1s+a0=0 (7.121) Withoutloss ofgenerality, the coefficient ofthe snterm, an,is assumedto be positive. Then for the system to be stable, the characteristic equation must have no missingterms and all its coefficients are strictly positive. This theorem provides an easy-to-check necessary condition for stability. Just by inspection, wecan tell if the necessary condition is satisfied. If there is a missingterm or some of the coefficient is negative, then the system is unstable. On the other hand, even if the necessary conditions are all satisfied, the system can still be unstable becausethese conditions are not sufficient. The Routh-Hurwitz criterion provides a necessary and sufficient condition for stability, but a Routh array, as shown in Figure 7.19 needsto be constructed before the criterion can be employed to determine the stability of the system. To construct the Routh array, the first step is to build the label column on the left side of the array. The label column starts from snonthetop,and then isfollowed bysn-1, sn-2, sn-3, , alltheway to s0. Step 2 is to populate the first two rows directly from the coefficients of the polynomial equation in Equation 7.121: an,an-2, an-4, , onthesnrow, andan-1, an-3, an-5, , onthesn-1 row,as shown in the figure. The elements of the third row (the sn-2 row) are generatedby the elements of the first two rows as follows. an-1an-2 -anan-3 -anan-5 -anan-7 , b2 = an-1an-4 , b3 = an-1an-6 , (7.122) an-1 an-1 an-1 Note thatthethird-row elements share thesame denominator, an-1, which isthefirstelement onthe b1 = left of the second-row. We circled this element, as shown in the figure, and would like to call it as 7.7 cornerstone element since it not only serves as the denominator Routh-Hurwitz Stability Criterion 219 of the entire row it also plays an impor-tant role in the numerator computation of the row. The numerator of b1is the cross-product difference an-1an-2 -anan-3 ofthefourelements connected bythetwoblue lines. Similarly, thenumerator of b2isthecross-product difference an-1an-4 -anan-5 ofthefourelements connected bythetwored lines, and thenumerator ofb3isthecross-product difference an-1an-6 -anan-7 ofthefourelements connected by the two purple lines. It is noted that all the numerator cross product differences begin with thecornerstone element, an-1. Thefourth row (the sn-3 row) can be constructedin the same mannerusingthe data of the second and the third rows and regarding row. c1 = the b1 element as the cornerstone b1an-3 -an-1b2 , c2 b1 = element in the construction b1an-5 -an-1b3 , (7.123) b1 The same process is repeated until the last row, which is the s0 row, is completed. array constructed as above, the Routh-Hurwitz criterion is given in the following. Theorem 7.32 (Routh-Hurwitz Criterion: Necessary and Sufficient Atypical feedback control system Withthe Routh Condition for Stability) For the system associated withthe Routh array shown in Figure 7.19,it is stable ifand elements onthe first column ofRouth array are strictly positive. Fig. 7.20: of this only ifall the block diagram. The block diagram in Figure 7.20 shows a typical feedback control system structure. G(s) repre-sents the system to be controlled and K(s) is the controller to be designed to achieve some desired performance. One of the important properties of the closed-loop system is stability; since the closed-loop system is not only useless,it can be harmful if it is unstable. In the following, the Routh-Hurwitz criterion will be employed to assessthe stability of a control system or to determine the range of the design parameters for the closed-loop Example 7.33 (Determine system to be stable. the Stability Range of a Proportional Control System) Consider the feedback control system shown in Figure 7.20. Assumethe plant G(s), the system to be controlled, is given as 1 G(s) = s(s+1)(s+2) and the controller is a proportional controller, K(s), where Kis a constant to be determined so that the closed-loop By the time the design is finalized, system has a desired performance. to know the range of Kin The closed-loop which the closed-loop system characteristic system is stable. equation i the designer may want 220 7 Fundamentals of Feedback Control Systems K 1+G(s)K =0 ? 1+s(s+1)(s+2) =0 ? s3+3s2 +2s+K =0 The Routh array for this characteristic equation is constructed as follows: s3 1 s2 3 s1 b1 s0 K 2 3 2-1K K where b1 = 3 = 6-K 3 According to the Routh-Hurwitz criterion, the system is stable if and only if the first-column of the Routh array are all strictly positive. Hence,the system is stable if and only if elements K>0 and6-K>0 which is 0 The Routh equation line. array to compute <K< not only shows the stability the pole locations 6 range, on the imaginary When K = 6, b1 will be zero and the auxiliary 0 < K < 6, it axis equation also provides an auxiliary when the value of Kis on the border right above this zero element will be 3s2+6=0,which has tworootsj1.414 ontheimaginary axis. Example 7.34 (Determine a Two-Parameter Stability Region of a Control System) Consider the feedback control system shown in Figure 7.20. Assumethe plant G(s), the system to be controlled, is given as s+2 G(s) and the controller = s(2s+1) is K(s) = K1 K2s+1 The objective is to determine the stability region of the closed-loop system on the K2-K1 plane. The closed-loop system characteristic equation is 1+ s+2 K1 s(2s+1) K2s+1 =0 ? 2K2s3 +(K2 +2)s2 +(K1 +1)s+2K1 =0 The Routh array for this characteristic According to the the s3 2K2 K1 +1 s2 K2 +2 2K1 s1 b1 s0 2K1 Routh-Hurwitz Routh array are all strictly criterion, positive. equation is constructed where b1 = as follows: (K2+2)(K1 +1)-4K1K2 K2 + the system is stable if and only if the first-column Hence, the system is stable if elements of and only if all the following inequalities are satisfied. K1>0, K2>0, and(K2+2)(K1 +1)-4K1K2 >0 three 7.8 Exercise Problems 221 Fig. 7.21: Stability region on K1-K2 plane for Example 7.34. As shown in Figure 7.21, the stability region is in the first quadrant (K1 > 0 and K2 > 0) under the red curve of(K2+2)(K1 +1)-4K1K2 =0.The twoblue dash lines, which are theasymptotes ofthered curve, are inside the stable region. Any point inside the region will guarantee the stability of the closed-loop system. Forinstance, if K1 = K2 = 1 are chosen then b1 = 2/3 > 0, andthe first column elements of the Routh array are all strictly of the region, is chosen, then greater than zero. If b1 = 0 and the auxiliary K1 = 2, K2 = 1.2, which is a point on the border equation (K2+2)s2 +2K1 =3.2s2 +4=0 ? roots=j1.118 reveals thattheclosed-loop system has twopoles j1.118 ontheimaginary axis. 7.8 Exercise Problems 1 P7.1a: Consider the typical feedback control system shown in Figure 7.22. G(s) = s+1represents the system to be controlled, and K(s) = Kp + Ki is the PI controller to be designed to improve the perfor-mance s of the system. Notethat there are two external inputs: the reference input r(t) andthe disturbance input d(t). The objective of the control system is to design a controller K(s) so that the closed-loop system is stable and the output y(t) will follow r(t) as closely as possible despite the variation of the disturbance d(t). Let the transfer function from R(s)to Y(s) andthe transfer function from D(s) to Y(s) of the closed-loop system be denoted by Gyr(s) and Gyd(s),respectively. Thenthe output response Y(s) will be (7.124) Y(s) = Gyr(s)R(s)+Gyd(s)D(s) Find the transfer functions Gyr(s) and Gyd(s)in terms of the parameters Kp and Ki by using Masons gain formula. P7.1b: Letr(t) =10us(t) andd(t)=us(t-5),where us(t) istheunitstep function. Show that the steady-state tracking error is zero or the final value of y(t) is 10, lim e(t) t?8 =0 or lim y(t) = 10 t?8 by using Equation 7.124 and Theorem 2.27, the final-value theorem 222 7 Fundamentals of Feedback Control Systems Fig. 7.22: Atypical feedback control system. P7.1c: Construct a Simulink program according to the closed-loop system block diagram shown in Fig-ure 7.22, where r(t)=10us(t), d(t)=us(t-5),G(s) =s+1, and K(s) = Kp + sKi with 1 Kp and Ki as free design parameters. P7.1d: Find the closed-loop characteristic equationin terms of Kpand Ki, and useit to determinethe values of Kpand Kisothat the dampingratio ? = 1 andthe naturalfrequency ?n = 1rad/s. Thenrun the Simulink program constructed in P7.1c and plot the output y(t) andthe control input u(t) in separate graphs versus time from t = 0 s to t = 10 s. P7.1e: Varythe value of the dampingratio ? while keepingthe naturalfrequency ?nat a constant. Then run the Simulink program and plot the output response y(t) andthe control input u(t) in separate graphs versustime from t = 0 sto t = 10 s. Observehowthe dampingratio ? affectsthe values of Kpand Ki, the output response y(t), and the control input u(t). P7.1f: Varythe value of the naturalfrequency ?n while keepingthe dampingratio ? at aconstant. Then run the Simulink program and plot the output response y(t) andthe control input u(t) in separate graphs versustime from t = 0 s to t = 10s. Observehowthe naturalfrequency ?naffectsthe values of Kpand Ki,the output response y(t), and the control input u(t). P7.1g: Basedonthe experienceyou gainfrom P7.1eand P7.1f,find a bestdesign of Kpand Kisothat y(t)has anoptimal performance while satisfying thecontrol-input constraint, u(t)<20,fort =0.Plot the optimal output response y(t) and the control input u(t) in separate graphs versus time from t to t =0s = 10 s. P7.2a: Consider the dual-loop feedback control system shown in Figure 7.23. G(s) = s+1is 1 the system to be controlled, and the two parameters K1 and K2in the dual-loop controller are to be designed to improve the performance of the system. Notethat there aretwo external inputs: the reference input r(t) and the disturbance input d(t). The objective of the control system is to design a controller K(s) so that the closed-loop system is stable and the output y(t) will follow r(t) as closely as possible despite the variation of the disturbance d(t). Let the transfer function from R(s) to Y(s) and the transfer function from D(s)to Y(s) of the closed-loopsystem be denoted by Gyr(s)and Gyd(s),respectively. Thenthe output response Y(s) will be Y(s) = Gyr(s)R(s)+Gyd(s)D(s) (7.125) Findthe transfer functions Gyr(s) and Gyd(s)in terms of the parametersK1and K2by using Masons gain formula. P7.2b: Letr(t) =10us(t) andd(t)=us(t-5),where us(t) istheunitstep function. Show that the steady-state tracking error is zero or the final value of y(t) is 10 7.8 Exercise Problems 223 Fig. 7.23: A dual-loop feedback control system. lim t?8 e(t) =0 or lim y(t) t?8 = 10 by using Equation 7.125 and Theorem 2.27, the final-value theorem. P7.2c: Construct a Simulink program according to the closed-loop system block diagram shown in Fig-ure 7.22, where r(t)=10us(t), d(t)=us(t-5),G(s)=s+1, andthetwo constantsK1andK2ofthe 1 dual-loop controller are free design parameters. P7.2d: Find the closed-loop characteristic equation in terms of K1 and K2, and useit to determine the values of K1and K2sothat the dampingratio ? = 1 andthe naturalfrequency ?n = 1rad/s. Thenrun the Simulink program constructed in P7.2c and plot the output y(t) andthe control input u(t) in separate graphs versus time from t = 0 s to t = 10 s. P7.2e: Varythe value of the dampingratio ? while keepingthe naturalfrequency ?nat a constant. Then run the Simulink program and plot the output response y(t) andthe control input u(t) in separate graphs versus time from t = 0 s to t = 10 s. Observehow the damping ratio ? affects the values of K1and K2, the output response y(t), and the control input u(t). P7.2f: Varythe value of the natural frequency run the Simulink program versus time from t ?n while keeping the damping ratio ? at a constant. Then and plot the output response = 0 s to t K2, the output response y(t), y(t) and the control input u(t) in separate graphs = 10 s. Observe how the natural frequency ?n affects the values of K1and and the control input u(t). P7.2g: Based onthe experience you gain from P7.2e and P7.2f, find a best design of K1and K2so that y(t)has anoptimal performance while satisfying thecontrol-input constraint, u(t)<20,fort =0.Plot the optimal output response y(t) and the control input u(t) in separate graphs versus time from t to t = 10 s. =0s P7.3: Problems P7.1 and P7.2 consider exactly the same problem withthe same objective, but have dif-ferent controller structures; one is the PI controller and the other is the dual-loop controller. Comment on the pros and cons of these two approaches based on the results of Problems P7.1g and P7.2g. P7.4: Consider the following system: Y(s) = G(s)U(s) = 1 s(s+1) U(s) It is easy to seethat the system is not BIBO stable since there is a pole atthe origin, whichis onthe imag-inary axis, according to Theorem 7.15. But according to the definition of BIBO stability, there shoul 224 7 Fundamentals exist a bounded input of Feedback Control Systems so that the output is unbounded. response of the system driven by this input P7.5: Explain the difference P7.6a: Consider the following between Find this bounded input will be unbounded. BIBO stability and internal stability. system: ?4-30? ?? ? ?x(t)+ ??u(t) 0 1 1 x?(t) and show that the output = Ax(t)+Bu(t) := 0 0 2 The objective is to find a state-feedback controller u(t) 0 0 1 = Fx(t) so that the closed-loop (7.126) system poles, or theeigenvalues ofA+BF, are placed ats =-1,-2,-3.Here wewillemploy thetransform approach instead of the direct approach since the transform approach is easier in computation. Thefirst stepis to transform the state equation into a companion form. Find a similarity transformation matrix T and define a newstate vectorx(t) = T-1x(t) sothat the newstate equation x?(t) =Ax(t)+ Bu(t) is in companion form. P7.6b: Designastate-feedback controlleru(t) =Fx(t) sothatthe eigenvaluesofA+ BF are placedat s =-1,-2,-3. P7.6c: Use F and Tto determinethe state-feedbackgain matrix Ffor the original stateequationsothat the eigenvaluesof A+BF arethe same asthose ofA+ BF. Verify yourresults. P7.7a: Considerthetypical feedback control systemshownin Figure 7.22. Let G(s) = tive is to design a controller s2-s . The objec-1 K(s) so that the closed-loop system is stable. Can a proportional controller K(s) = Kpstabilize the closed-loopsystem?If yes, verify yourresults.If not, explain why. P7.7b: RepeatProblem P7.7a withthe PI controller K(s) =(Kps+Ki)/s. P7.7c: Repeat Problem P7.7a with the following first-order controller, K(s) = b1s+b0 s+a0 where a0, b1, b0 arereal parameters. Hint: Use Routh-Hurwitz stability criterion theorem 8 Stability, Regulation,and Root Locus Design I N Section 7.6.4, we witnessedthat an originally unstable cart-inverted pendulum system wasstabi-lized by a state-feedback controller that utilizes a pole placement approach to place all the closed-loop system poles at desired locations in the strictly left half of the complex plane. The controller not only keeps the pendulum at the upright position, but also movesthe cart to the desired center of the rail. In Section 7.1.1, a dual-loop feedback control structure with aregulation integrator and two de-sign parameters were employed to regulate the speed of a DC motorsystem. Theintegrator guarantees zero steady-state error in step speed tracking, and the two parameters K1 and K2 are chosen to achieve a desired transient response by placing the closed-loop system poles at a best possible location in the complex plane. This chapter will provide a complete discussion of compensator design via the root locus methodto achieve stability, regulation, and a best possible transient response implied by pole locations. It begins with a study of steady-state error and introduces the internal model principle andthe concept of system type. The concept of system type and internal model principle explains how to select a feedback con-troller structure to achieve zero steady-state error response for certain group of references/disturbances. A cruise control objectives, example is used to provide an overview of the design process, including the role of feedback in achieving those goals, as well asthe notion performance of performance robustness with respect to model uncertainty. The root locus methodis presented in some detail, including the basic construction rules, whythey are useful in design, and how to do the computations using MATLAB. Simple examples illustrate key points throughout this discussion. a DC motor sinusoidal model principle along More expansive position tracking with root locus controller examples are given in the last three sections. is used to illustrate the application First, of the internal design. The next section examines the longitudinal flight path control of the F/A18 aircraft. In this ex-ample, manual control is simulated to illustrate the difficulty level of controlling the extremely low-damping, long-period (phugoid-mode) oscillations. Asophisticated root locus design with integral reg-ulation and state-feedback last section illustrates pole placement is employed how altitude regulation to achieve stability can be accomplished and flight using the flight path tracking. The path angle tracking controller. 8.1 Type of Feedback Systemsand Internal Model Principle In the design of a feedback control system, the designer would usually consider the following: the stabil-ity of the closed-loop system, the transient response, the steady-state error, and the robust performanc 226 8 Stability, Regulation, against plant uncertainties. and Root Locus In the previous Design chapter, welearned how the pole locations stability and the transient behavior of the system. In this section, controller so that the closed-loop system would affect the we will discuss how to design a will have a least steady-state error. 8.1.1 Steady-State Error Before the discussion control problem of a more general steady-state considered in Example response issue, we will revisit the DC motor speed 5.26. The DC motor speed control system block diagram shown in Figure 8.1 is almost identical to that shown in Figure 5.22. The only difference is the controller; now the controller is a proportional controller K(s) = KPinstead of anintegral controller KI/s. Example 8.1 (Speed Control of the DC Motor System Using a Proportional Controller) Let the Laplace transforms of ?r(t) and ??(t) be Or(s) and O?(s), respectively. Then we havethe closed-loop transferfunctionfrom Or(s)to O?(s)in the following: O?(s) G(s)K(s) = Or(s) (8.1) 1+G(s)K(s) Plugging the expressions of K(s) = KPand G(s) into the closed-loop transfer function, 145.5KP O?(s) Or(s) = 145.5KP (s+43.14) 1+ 145.5KP = b = s+43.14+145.5KP we have xss = s+a (8.2) ts+1 (s+43.14) Notethat this closed-loop transfer function belongs to the category of the typical first-order system we studied in Chapter 2. Recall that the dynamic behavior of the typical first-order system is characterized bythetime constantt andthe steady-state stepresponsexss.FromEquation8.2, wehavethe following two equationsthat relatethetime constantt andthe steady-stateresponseconstantxssto the proportional constant KP: t = 1 43.14+145.5KP , xss = 145.5KP 43.14+145.5KP Dueto the restriction of the proportional control structure, there is only one design parameter KPto be determined, we only have one degree of freedom: choosing either the time constant t or the steady-state step response constant xss. Fig. 8.1: A DC motor speed control system with a proportional controller. If wechoose KP = 0.5the time constant will be t = 0.0086s, andthe steady-statestep response constant will be xss = 0.628. The time constant is faster than is 37.2% away from the desired steady-state response. The steady-state be t error can be reduced by increasing we need, but the steady-state step re-sponse That meansthe steady-state the value of KP. If error is 37.2%. KP = 1, the time constant will = 0.0053 s, and the steady-state step response constant will be xss = 0.771, which improves the steady-state error to 22.9%. Theoretically, the steady-state error could be reduced to zero if KPincrease 8.1 Type of Feedback Systems and Internal Model Principle to infinity. However, by increasing the proportional control constant KP,the control input increase accordingly and up to some point it may saturate the actuator. The simulation results are shown in Figure 8.2. Onthe left-hand-side 227 u(t) will graph of the figure, the red horizontalline onthe top representsthe desired motorspeed ?r(t) = 20us(t) rad/s. WhenKP = 0.5,the step responsereachesthe steadystate ??(t) = 12.56rad/s, shortly after t = 0.04 s. Therise time and settling time are fast, but the steady-state error is large. The steady-state error is 7.44 rad/s away from thedesired 20rad/s, which is(20-7.44)/20 =37.2%. If KP=1ischosen, thestep response willrise to the steadystate ??(t) = 15.42rad/s, aroundt = 0.03s. Therise time andsettling time arefaster, but the steady-state error is still large. The steady-state error is 4.58 rad/s away from the desired 20 rad/s, which is(20-15.42)/20 =22.9%. Fig. 8.2: Simulation results of the proportional feedback speed control of the DC motorsystem. The control-input u(t) plots are shown in the right-hand-side of Figure 8.2. It can be seen that the maximum control input occurs almost right after t = 0 s with u(t) = 10 V when KP = 0.5. When KP increases to KP = 1,the required inputs always the capability control input increases have their limitations of the control inputs; in accordingly to about 20 V. Note that the control magnitude or in rate of change. otherwise, the system may perform The system poorly needs to work within or become unstable. For this particular DC motorspeed control problem, the proportional control design structure is not a good one since the steady-state error is not acceptable, even whenthe control input is allowed to increase to 20 V. For comparison, both the integral control design in Example 5.26 and the dual-loop control design in Example 6.1 are much better designs since zero steady-state error is guaranteed for step responses while their transient performances are satisfactory and their control inputs are well within reasonable range. 8.1.2 Type of Feedback Systems and Internal Model Principle From the DC motor speed control example, we observe, for the same plant G(s), and assume the ref-erence input is a step function; both of the integral control design in Example 5.26 and the dual-loop control design in Example 6.1 achieve zero steady-state error response, but the proportional control de-sign in Example 8.1 is unable to reduce the steady-state control-input constraint. In the following, steady-state error. error to an acceptable level we will investigate within a reasonable what are the deciding factors for the The block diagram shown in Figure 8.3 is a typical feedback control system. The plant G(s) repre-sents a system to be controlled, which can be atransfer function or a state-space model. The objective of the feedback control system is to design a realizable controller K(s), which can be also represented as 228 8 Stability, Regulation, and Root Locus Design transfer function or a state-space model,so that the closed-loop system is stable, and the error e(t) is as small as possible, subject to the control-input u(t) constraints. In this section, we will only focus on the steady-state error, which is (8.3) ess =lim e(t) t?8 If possible, we would like to design a controller Fig. 8.3: Atypical so that the steady-state feedback error essis zero. control system structure. The feedback control system shown in Figure 8.3 hastwo inputs: Oneis the disturbance input d(t) and the other is the reference input r(t). Since our interest is in e(t) or its Laplace transform E(s), we would like to know how these two inputs, R(s) and D(s), affect E(s). Thetransfer function E(s)/R(s) and E(s)/D(s) can be obtained using Masons gain formula or the algebraic equations approach as follows: 1 E(s) E(s) R(s) = and 1+G(s)K(s) D(s) = -1 1+G(s)K(s) Hence, E(s) can be written asthe sum of the two responses dueto R(s) and D(s), respectively. E(s) = 1 1 1+G(s)K(s) R(s)-1+G(s)K(s) D(s) (8.4) According to the Laplace transform final-value theorem, if the real part of all the poles sE(s) are strictly negative, then the final value of e(t) can be computed in the frequency domain as follows: -sD(s):= essR+essD ess:= lim e(t) =limsE(s) =lim +lim t?8 s?0 1+G(s)K(s) s?0 1+G(s)K(s) s?0 sR(s) (8.5) The disturbance input d(t) and the reference input r(t) in general are different, but the ways they affect the steady-state error are fundamentally identical. Without loss of generality, we will just addressthe steady-state error essRdue to the reference input R(s). sR(s) essR = lim (8.6) s?0 1+G(s)K(s) The reference or disturbance inputs of interest are those with poles at the origin of the complex plane and those with conjugate poles on the imaginary axis. In this subsection, we will consider the reference input described by the following m-degree polynomial time-function and its Laplace transform, r(t) = R0 +R1t + R2 2 t2 + + where mis the degree of the reference input Rm tm m! ? polynomial. R(s) = R0 s R1 + R2 s2 + s3 + + Rm sm+1 (8.7 8.1 In general, the loop transfer function G(s)K(s) Type of Feedback Systems and Internal Model Principle 229 G(s)K(s) can be written as = k(tas+1)(tbs+1) (tps+1) si(t1s+1)(t2s+1) (tns+1) (8.8) wherethe superscript i is an integer greater or equal to 0, andthe system is called type i system. Combining the above three equations, essR =lim s?0 we have s2+ + Rm R0 + R1 s + R2 sR(s) =lim 1+G(s)K(s) sm (8.9) s?0 1+ k(tas+1)(tbs+1)(tps+1) si(t1s+1)(t2s+1)(tns+1) According to Equation 8.9, the steady-state error essRis mainly determined by two index numbers m and i, where mis the degree of the reference input polynomial time function and i is the type of the feedback system. In the following, we will investigate the steady-state error of the typical feedback control system for each reference input case, starting from m = 0, the step input case, then m = 1, the ramp input case, and thenm=2,theparabolic input case,, etc.Foreach case, the typeoffeedback system will be determined to guarantee zero steady-state error. Case 0: Steady-State Error Dueto a Step Reference Input Case 0: Thereference input is r(t) = R0us(t) with its Laplace transform R(s) = R0/s, where R0is an arbitrary constant. Based on Equation 8.9, the steady-state error for eachtype of feedback system can be obtained asfollows. R0 essR = lim Type 0 system : 1+k/si = s?0 Type 1 or highersystem: R0 = R0 1+k 1+k/s0 (8.10) R0 essR = lim 1+k/si s?0 Example 8.2 (Case The loop transfer 0 Examples function =0 with Type 0 and Type 1 Systems) G(s)K(s) of the DC motor proportional speed control system in Exam-ple 8.1 can be rewritten in the form of Equation 8.8 as G(s)K(s) = 145.5KP s+43.14 = k s0(t1s+1) whichis a Type 0 system with k = 145.5KP/43.14 = 3.373KP. Hencethe steady-state error will be essR = R0 1+k R = 1+3.373KP If KP = 1 and R0 = 20 rad/s, then the steady-stateerror is essR= 20/(1+ 3.373) = 4.57rad/s, which is 22.9% of error. Onthe other hand, the loop transfer function system in G(s)K(s) of the DC motorintegral speed control Example 5.26 is G(s)K(s) = 145.5KI s(s+43.14) k = s1(t1s+1) whichis a Type1 system with k = 145.5KI/43.14 = 3.373KI. Hence,the steady-state error is essR = 0. 230 8 Stability, Regulation, and Root Locus Fig. 8.4: Case 0: Comparison Design of Proportional and Integral Controls of DC motor speed. This example and Equation 8.10 explain why the integral control is able to accomplish zero steady-state error for step reference input while the proportional control cant. Asrevealed in Figure 8.4, the proportional KP = 1 controller provides fast response, but it renders a large 22.9% steady-state error even with a high control input, u(t) = 20 V. Onthe other hand,the integral Ki = 3.95 controller reaches the steady state shortly after 0.2s and only requires about 6V of control input. The next caseto be considered is Case1, whenthe reference input is a ramp function. Case 1: Steady-State Error Dueto a Ramp Reference Input Case1: Thereferenceinput is r(t) =(R0 +R1t)us(t) withits Laplacetransform R(s) =R0/s+R1/s2, where R0 and R1 are arbitrary constants. Based on Equation 8.9, the steady-state error for each type of feedback system can be obtained as follows: Type 0 system : essR =lim Type 1 system : essR =lim R0+R1/s s?0 s?0 R0+R1/s s?0 Type 2 or higher system : =lim R1/s 1+k = 8 1+k/s0 = R1 (8.11 k 1+k/s1 R0+R1/s essR = lim s?0 =lim 1+k/s2 R1/s s?0k/s2 =0 Example 8.3 (Case 1 Examples with Type 1 and Type 2 Systems) The loop transfer function 5.26 is G(s)K(s) of the DC motor integral speed control system in Example G(s)K(s) = 145.5KI k = s(s+43.14) which is a Type 1 system with k = 145.5KI/43.14 s1(t1s+1) = 3.373KI. Hence,the steady-state error will be R1 essR = k R1 = 3.373KI If KI = 3.95 and R1 = 1 rad/s2, then the steady-state error is essR = 1/(3.373)(3.95) = 0.075 rad/s2, which is 7.5% of error. In contrast, a new controller KR(s) = (s+3)/s2 can be designedto achieve Type 2 requirement for the loop transfer function G(s)KR(s) as follows: G(s)KR(s) = k(tas+1) 145.5(s+3) s2(s+43.14) = s2(t1s+1) 8.1 Type of Feedback which is a Type 2 system with k = (145.5)(3)/43.14 ramp reference input will be essR = 0. Fig. 8.5: Case 1: Comparison of integral Systems and Internal Model Principle 231 = 10.12. Hence, the steady-state error for and double integral controls of DC motor speed for ramp tracking. The simulation results comparison of the integral control and the double integral control are shown in Figure 8.5. Theintegral controller K(s) = Ki/s only makesthe loop transfer function G(s)K(s) a Type 1 system. It can be seen from the graph on the left that the vertical gap between the green and the red lines is 0.075 rad/s, which exhibits the steady-state error essR = 0.075 rad/sa 7.5% of error. With the new double integral controller KR(s) = (s+3)/s2, the loop transfer func-tion G(s)KR(s) is of Type 2; hence, the steady-state error is zero. It can be verified from the simulation that the green and the blue lines coincide together shortly after t = 1 s. Case 2: Steady-State Case 2: R1 s2 Error Due to a Parabolic Reference Input = R0 +R1t + R2 2 t2us(t), The reference input is r(t) withits Laplacetransform R(s) = R0 s + + s3, R2 whereR0, R1and R2arearbitrary constants. Basedon Equation8.9,the steady-stateerro for each type of feedback system can be obtained as follows: R0+R1/s+R2/s2 essR =lim Type 0 system : s?0 1+k/s1 s?0 Type 2 system: 1+k/s2 s?0 Type3 or highersystem: essR =lim s?0 R2/s2 1+k = 8 = 8 (8.12) R0+R1/s+R2/s2 essR = lim =lim s?0 R0+R1/s+R2/s2 essR = lim Type 1 system : 1+k/s0 = R2 k R0+R1/s+R2/s2 1+k/s3 =lim s?0 R2/s2 k/s3 =0 ... Case m: Steady-State Error Dueto a Polynomial Time Function Case m: Thereference input is r(t) with its Laplace transform = R0 +R1t + R2 2 t2 + + Rm tm m! Reference Input 232 8 Stability, Regulation, and Root Locus Design R0 R(s) = R1 + s R2 Rm s2 + s3 + + sm where R0, R1, R2,, and Rm are arbitrary constants. Based onEquation 8.9, thesteady-state error for each type of feedback system can be obtained asfollows: R0+R1/s++Rm/sm =lim essR =lim Type 0 system : s?0 essR = lim Type 1 system : s?0 1+k/s0 Rm/sm s?0 1+k = R0+R1/s++Rm/sm = 8 1+k/s1 ... (8.13) ... Type m-1system : R0+R1/s++Rm/sm = 8 essR = lim R0+R1/s++Rm/sm = Rm essR = lim Type msystem : 1+k/sm-1 s?0 1+k/sm s?0 Type m+1 or highersystem: k R0+R1/s++Rm/sm =0 essR = lim 1+k/sm+1 s?0 Remark 8.4 (Internal Model Principle) From these discussions, it can be observed that to achieve zero steady-state error against a step ref-erence or step disturbance inputs, whosefrequency-domain representation is c/s with c an arbitrary constant, the loop transfer function needsto be at least of Type 1 (i.e., G(s)K(s) needsto include the internal model 1/sin it). Similarly, for a ramp reference or ramp disturbance inputs, whosefrequency-domain representationis c/s2 withc an arbitrary constant,theloop transfer function G(s)K(s) needsto includetheinternal model1/s2in it in orderto guaranteezerosteady-stateerror. Thisperfectsteady-state tracking concept is called the internal model principle, which has been widely employed in the design of feedback control systems. Theinternal model principle [Francis and Wonham, 1976, Huang, 2004] also can be applied to regulate sinusoidal disturbances or to track sinusoidal refer-ence input. Example 8.5 (Sinusoidal Tracking Using the Internal Model Principle) Consider the same DC motor speed feedback control block diagram shown in Figure 8.1. The plant G(s) = 145.5/(s+43.14) is still the same, but the reference input has changed to the following: ?r(t) = Asin(?0t +f) (8.14) wherethe frequencyis assumedto be ?0 = 2rad/s, butthe amplitude Aandthe phasef arearbitrary. To achieve steady-state sinusoidal tracking, the loop transfer function G(s)K(s) needsto have the internal model1/(s2 +22)in it to match the referencesinusoidalfunctionfrequency ?0 = 2rad/s. Therefore, the controller K(s) should be of the form K(s) = where k is the design parameter to be determined s+k s2 so that the closed-loop response is optimized subject to the control-input Theloop transfer function (8.15) +22 system is stable and the tran-sient constraints. G(s)K(s) of the DC motorsinusoidal speed control system now is G(s)K(s) = 145.5(s+k) (s+43.14)(s2 +22) 8.2 which consists of the internal modelfunction 1/(s2+22) The closed-loop characteristic equation now is (s+43.14)(s2 An Automobile Cruise Control Example 233 to guarantee zero tracking error at steady state. +22)+145.5(s+k) =0 which can be rearranged into 1+k 145.5 s3 +43.14s2 +149.5s+172.56 =0 and an optimal k = 0.616 is obtained using the root locus design approach, which will beintroduced in the next section. Fig. 8.6: Comparison of integral and sinusoidal controls of DC motor speed for sinusoidal tracking. The simulation reference input results ?r(t) are shown in Figure 8.6. The graph on the left shows three functions, the = sin2t in green,the output response ??(t) in blue associated with the sinusoidal controller KS(s) = (s + 0.616)/(s2 + 22), and the output response ??(t) in red associated withthe integral controller KI(s) = 3.95/s. It can beseenthat the sinusoidal controller KSis ableto achieve perfect steady-state tracking within 2 seconds while the integral control response has a time-delay steady-state error. The graph on the right shows that both controllers use about the same amount of control input. 8.2 An Automobile Cruise Control Example Recallthat in Section 7.1 we briefly introduced the features of feedback control that include: (1) it is a naturally perfect characteristics disturbance mechanism for automatic control; (2) it provides of the system to achieve better performance; response rejection; (4) it has the ability an easy wayto modify the dynamics (3) it has the ability to achieve steady-state to achieve steady-state reference input tracking or regulation; and (5) it achieves robust stability and robust performance against plant uncertainties. Later,in Section 8.1, westudied the steady-state error issues of feedback control systems andlearned that steady-state reference input tracking and steady-state disturbance response rejection are mathemati-cally the same. types A feedback of reference and/or controller disturbance can be designed to achieve zero steady-state inputs, including step disturbances error for certain with arbitrary magni-tude, ramp disturbances with arbitrary slope, and sinusoidal disturbances with arbitrary am-plitude and phase. This perfect steady-state design approach is based on the celebrated interna 234 8 Stability, model principle the dynamics Regulation, with and Root Locus which the loop Design transfer function of the closed-loop system is embedded with model of the reference and/or disturbance inputs. In Example 8.2, we compared the performances of the integral controller versus the proportional controller in a DC motorspeed control system, and witnessedthat the integral control is able to accom-plish zero steady-state that the loop transfer error for step reference input function of the closed-loop G(s)K(s) = while the proportional system with integral control controller cant. The reason is is 145.5KI s(s+43.14) = s(t1s+1) whichis equipped withthe internal model1/s, andthe referenceinput r(t) is astepfunction witharbi-trary magnitudeR0, whoseLaplacetransform is R(s) = R0/s. The basic idea of the DC motor speed control system and the internal and applied to the automobile control design problem cruise control model principle can be ex-tended system. In the following, based on the brief discussion in Section 1.4. we consider a basic cruise The goal is to introduce the pri-mary goals and basic methods of feedback control design in a context familiar to most readers. The objective of basic cruise control is to regulate the vehicle speed to match a commanded speed. In this discussion, bounce, pitch, sideslip, roll, and yaw are ignored. Our focus is on speed (i.e., velocity, v,in the body x direction). Relativelysmall deviationsof v from the nominal speed,v*, are of concern. The control input is the engine throttle u, whose manipulation alters the force f ultimately imposed on the vehicle by the engine through the gear train and tires. Wedo not consider gear shifting in view of the small deviation of speed assumption. Wind gusts are not considered, although aerodynamic drag is. Roadslope, ?,is the only disturbanceconsidered. Roadslopeinduces a gravitationalforce component that contributes to vehicle acceleration. The block diagram of Figure 1.1 illustrates the typical configuration of a basic cruise control system. Our goalis to design the control block. The cruise control system responds to a change in speed com-mand or a disturbance (a change in road slope) by adjusting the throttle position to maintainthe desired speed. The criteria for design includes the following: 1. Steady-state error: Speed error in steady statein response to command or disturbance 2. Transient response time including rise time, peaktime, and settling time 3. Transient overshoot or undershoot 4. Robustness: performance tolerance to unmodeled dynamics or parameter variation 8.2.1 Assembling a Model Webegin by establishing a mathematical model for each element described by the following nonlinear first-order representing the velocity of the vehicle, m dv(t) dt of the system. The vehicle dynamics is differential equation with one single state variable v(t) =f(t)-mgsin? (t)-cv2(t) (8.16) where mis the massof the vehicle, f is the force generated by the engine to movethe vehicle, c is the viscosity coefficient of the vehicle traveling in the air, and ?(t) is the slope angle of the road. Notethat sin? ? i f |?|=0.262 rad The disturbance termmgsin? can bereplaced bymg? if|?|=0.262 rad, orequivalently theslope of the road is less than 15 degrees. Thus, Equation 8.16 can be rewritten as 8.2 v?(t) -cv2(t)+ = 1 m m An Automobile Cruise Control f(t)-g?(t) Example 235 (8.17 Assme(v*, f*) is a nominal operating equilibrium of the vehicle sothat f* =c(v*)2 and let v(t) and f(t), respectively, bethe perturbed velocity and force variables from the equilibrium. Thus,the relationship between the real physical variables (v, f), the equilibrium (v*, f*), andthe per-turbed variables (v, f) are v(t) =v(t)+v* and f(t) =f(t)+ f* (8.18) ThenEquation8.17 can belinearized aboutthe equilibrium(v*, f*) usingthe Jacobianapproach shown in Equation C.5 from v?(t) = Appendix ? ?v ? -cv2 m C as follows: + 1 f m ?? ? ? + ? ? ? v*, f* -cv2 ?f m + 1 f m ?? ? ? ? v*, f* -g? which is v?(t) where c =(2c/m)v*. = -2cv*v(t)+ m 1 1 f(t)-g?(t):=-cv(t)+mf(t)-g?(t) m (8.19) Takingthe Laplacetransform of Equation8.19 weobtain 1 sV(s)=-cV(s)+F(s)-gT(s) m (8.20) and therefore the velocity of the vehicle is V (s) = 1/m g s+ c F(s)- s+c T(s) (8.21) Turning now to the engine dynamics, assumethe engine thrust response to throttle input is very fast compared to the vehicle dynamics. Then we mightignore any dynamics and take the ideal engine transfer function to be GE(s) = 1. We will design the controller using this assumption andthen evaluate the impact of engine dynamics by testing the resultant controller with an alternative transfer function that reflects engine delay. Thus, we will usethree different engine models, all of the form GE(s) = ? ?2 1 ts+1 (8.22) with 1. ideal model (used for design), t 2. fast model, t = 0.3 3. slow model, t = 0.6 =0 This engine modelis a typical second-order system with damping ratio ? = 1 and natural frequency ?n = 1/t. It also can be considered as a cascade connection of two identical typical first-order system with time constant t. The block diagram for the control system with the component modelsis shown in Figure 8.7. Note that Equation 8.21describes howtheengineoutput forcef(t) andtheslopeoftheroad?(t) wouldaffect the vehicle speedv(t), and Equation 8.22is the transfer function of the engine between the throttle u(t) sothat the closed-loopsystemhasa desired and the force f(t). Thecontroller K(s)is to be designed performance. 236 8 Stability, Regulation, Fig. 8.7: and Root Locus Cruise control Vehicle Data and a Nominal block Design diagram with component transfer functions. Operating Equilibrium The vehicle considered is a typical mid-size SUV (sport utility vehicle) with mass m= 1,929 kg and a dimensionless drag coefficient Cd = 0.35. The drag force is Fd = cv2 = 1 2 ?CdAv2 (8.23) where ? = 1.225 kg/m3 is the air density, Cd = 0.35 is the drag coefficient, and Ais the front surface area, whichis approximately computed as A= 3 m2from the height 1.67 mandthe width 1.8 m. Hence, the viscosity coefficient of the vehicle is c = 1 2 ?CdA = 1 (1.225)(0.35)(3) 2 = 0.643 kg/m The nominal operating velocity is chosento be v* = 30 m/s, which is about 108 km/hr or 64.8 mile/hr,andthus the nominal operatingforce for v*is f* = c(v*)2 = (0.643)(302) = 578.7 N Notice that the linearized model of the system shown in Equation 8.19 or in Figure 8.7 was obtained from linearizing the nonlinear system of Equation 8.17 at the nominal operating equilibrium, (v*, f*) = (30 m/s,578.7 N) and the linearized modelis expressed in terms of the perturbed variablesv(t) andf (t), whoserelation-ship with the real physical velocity and force is given by Equation 8.18. Thereference input r(t) shown in Figure 8.7 is also a perturbed velocity variable with respect to the equilibrium velocity v* = 30 m/s. Thatis,r(t) =5 m/s means thatthe desiredperturbedsteady-state velocityisv(t) = 5 m/sorthereal physical velocityis v(t) = 35 m/s. The parameters g, m, andc in the linearized model described by Equation 8.19 or Equation 8.21 are the gravity g = 9.8 m/s2, the mass of the vehicle m = 1,929 kg, and the characteristic value is c- =-2 mv* =-0.02. It is obvious that the MKS system of units is adopted in the computation of the cruise control prob-lem in this section. Forthe slope angle of the road, ?(t), although we maydisplayit in degrees,it is imperative to adopt the unit radian in computations is approximately huge error! as commented in Remark 4.16. Recall that 57.3 degrees. Mistakenly regarding 1 degree as 1 radian in computation 1 radian will lead to a 8.2 8.2.2 Design of the Controller An Automobile Cruise Control Example 237 K(s) The classical control design processis to choose a structure for the controller andthen determine the con-troller parameters to meetthe performance criteria. In this case wechoose a PI controller (proportional plus integral controller): ?t u(t) =kpr( (t)-v(t))+ki r( (t)-v(t))dt (8.24) 0 Note that there are twoterms, thefirstproportional tothespeed error, e(t)=r (t)-v(t),and the second proportional to the time integral of error. The design parameters are the two constants kp and ki. In terms of e(t), Equation 8.24 is u (t) = kpe(t)+ki ?t e(t)dt 0 Differentiating with respect to t this becomes u?(t) Taking the Laplace transform (8.25) = kp ?e(t)+kie(t) yields U (s) = kps+ki s E(s) := (8.26 K(s)E(s) Closed-Loop Transfer Functions In the closed-loop system shown in Figure 8.7, the output variable of interest isv(t), by whichthe veloc-ity of the vehicle, v(t) =v(t)+v* can beeasily obtained. Meanwhile,there aretwo input variablesr(t) and ?(t). Theformer is the referenceinput (or called commandinput), andthe latter is the road slope disturbance input. The objective is to design a controller K(s) so that the output v(t) will follow the reference input r(t) as closely as possible under possible influence of the road slope disturbance ?(t).Since e(t)=r(t) -v(t),thecontrol problem canberephrased asto make e(t)as mall as possible subject to control-input constraints. Hence, we will need to investigate how the controller design will affect the following four closed-loop transfer functions: GE R(s), GET(s), G FR(s), and G FT(s) that satisfy the following two equations: E(s) = GE R(s)R(s)+GET(s)T(s) F (s) = G FR(s)R(s)+G FT(s)T(s) Thesetransfer functions can be obtained by applying Masons gain formula (see Section 6.2.2, or Ap-pendix D)to the closed-loop system block diagram shown in Figure 8.7. According to Masons gain formula, we have GE R(s) where = 1 , ? GET(s) = gGp(s) ? , FR(s) G = K(s) ? , FT(s) G = gGp(s)K(s) ? 238 8 Stability, Regulation, and Root Locus Design 1 ? =1-?1=1+m Gp(s)K(s) and therefore ms2 +(m c+kp)s+ki = ms(s+c we have E(s) = GE R(s)R(s)+GET(s)T(s) = (8.27) mgs ms(s+c) R (s)+ ms2+(m c+kp)s+kiT(s) ms2+(m c+kp)s+ki and F (s) = G F R(s)R(s)+G FT(s)T(s) = m(s+ c)(kps+ki) R(s)+ ms2+(m c+kp)s+ki (8.28) mg(kps+ki)T(s) ms2+(m c+kp)s+ki Notice that all of the four transfer functions havethe same denominators (the same poles), but differ-ent numerators (different zeros). Thestability, damping, and oscillation frequency are mainly determined by the poles while the steady-state response andthe phase of the transient response are affected by the zeros. Analysis oftheSecond-Order System fortheCase With ki?=0 It can be seen from Equations (8.27) and (8.28) that the closed-loop ki?=0,and itscharacteristic equation is ms2 +(mc+kp) Recall that the roots s+ki of the characteristic =0 or equation system is a second-order ?? kp s2 + c + m s+ ki m system if (8.29) =0 are the poles of the system. In most of the practical control system applications, the dominant poles are chosento be a pair of complex numbers as ? -a j? =-??n j?n 1-?2 The damping factor a and the frequency ? can be chosen to determine the decay rate and the oscillation frequency of the transient response, respectively. Alternatively, the damping ratio ? and the natural frequency ?n can be selected to specify the maximum overshoot and the reaction time ofthe transient response.Therelationshipofthe PIcontrollerparameters (kp,ki) to (a,?) orto (?,?n) can beeasily establishedviathe connectionsofthe following characteristicpolynomials: s2 +2??ns+?2 n ? ? ? kp s2 + c+ m s+ ki ? s2 +2as+a2 +?2 (8.30) m Forexample,if ki =100andkp = 500arechosen,thenthe dampingratio andthe naturalfrequencyfor the closed-loop system will be ?2 n =ki/m 2??n =c+kp/m ? ?n = vki/m = v100/1929 ? =(c+kp/m)/2?n = 0.2277rad/s =(0.02+500/1929)0.4554 = 0.6131 Onthe other hand, if the damping ratio ? = 0.707 and the natural frequency ?n = 1 rad/s are chosen for the PI cruise control closed-loop system, then the PI controller should satisfy the following ki/m = ?2 n c+kp/m = 2??n parameters kp an ki equations: ki = m?2 n = 1929 ? kp=m(c+2??n)=1929(-0.02+1.414) =2689.03 8.2 An Automobile Cruise Control Example The closed-loop system poles or their associated damping ratio and natural frequency the stability, they damping, oscillation, and transient alone do not determine the steady-state reaction time response of the closed-loop of the closed-loop system. 239 mainly deter-mine system; however, As discussed in Sec-tions 8.1.1 and 8.1.2, the steady-state tracking/regulation error is determined by the type of refer-ence/disturbance inputs, and by the internal model embedded in the loop transfer function of the feedback systems. r(t) The reference input r(t) is assumed to be a step function with arbitrary magnitude. That is, = Rvus(t), where us(t) is a unit step function and Rvis an arbitrary real number representing a differential change of the desired vehicle velocity from the nominal v* = 30 m/s. For example,if the desired vehicle speedis v(t) v(t) operating equilibrium velocity, = 33 m/s, which meansthe desired is 3 m/s; hence, Rvshould be chosen as 3 m/s. Onthe other hand,if the desired vehicle speed is v(t)=25m/s,which means thedesired v(t)is -5m/s; therefore, Rv should bechosen as-5 m/s. Similarly,the road slope disturbanceinput ?(t) is assumedto be astepfunction with arbitrary mag-nitude. Thatis, ?(t) = ?dus(t), whereus(t) is a unit step function and ?dis an arbitrary real number representing the roadslopeanglein radian. Forexampleif the vehicleencountersan uphill 5?ramp, then ?d should be chosen as 0.0873 rad. Now,assume thereference inputis R(s) = Rv/s,andtheroadslopedisturbance inputis T(s) = ?d/s, and both Rvand ?d are arbitrary real numbers. Thenthe closed-loop error response E(s) can be expressed as follows: 1 E(s) = ? ?d Rv ?(s) s +gGp(s) s ? where ?(s) = 1+ 1 m Gp(s)K(s) According to the final-value theorem, if the closed-loop system is stable, we have the steady-state error, ess =lim e(t) t?8 1 (Rv +g?dGp(0)) s?0 ?(s) =limsE(s) =lim s?0 Notethat the loop transfer function in ?(s) is embedded withthe internal model1/s, whichis coming from the integrator in the controller. lim ?(s) = 1+ s?0 1 m Hence, we have Gp(0)limK(s) = 1+ s?0 Therefore, the steady-state tracking/regulation ess = 1 lim ?(s) 1 m Gp(0)lim kps+ki s?0 s =8 if ki?=0 (8.31) error is (Rv+g?dGp(0)) =0 if ki?=0 s?0 Analysis of the First-Order If ki = 0 in Equation System for the Case with ki = 0 8.26, the transfer function of the controller will become K(s) = kp which is a proportional controller, and the closed-loop transfer functions in Equations 8.27 and 8.28 will reduce to the following 240 8 Stability, Regulation, and Root Locus Design m(s+c) E(s) = GE R(s)R(s)+GET(s)T(s) = R(s)+ ms+(mc+kp) mg ms+(mc+kp) T(s) (8.32 T(s) (8.33) and F (s) = G FR(s)R(s)+G FT(s)T(s) m(s+c)kp = R (s)+ ms+(mc+kp) mgkp ms+(m c+kp) It can be seen from Equations 8.32 and 8.33 that the closed-loop system now is afirst-order system, and its characteristic equation is m ms+(m c+kp) =0 or s+1 c+kp m = 0 (8.34) which is characterized by the time constant t = m c+kp m Thetransient response is governed by an exponential function with time constant specified by the previ-ous equation. Thetime responseis faster if the time constantis smaller or if kpis larger. To investigate the steady-state response of the first-order proportional controller, we will follow the same procedure closed-loop cruise control system with we did a while ago for the system controller. Thereferenceinput andthe road slope disturbanceinput are assumedto ber(t) with PI = Rvus(t) and ?(t) = ?dus(t), respectively, and both Rv and ?d are arbitrary real numbers. Thenthe closed-loop error response E(s) can be expressed as follows: E(s) = ? Rv 1 ?(s) s +gGp(s) ?d s ? where ?(s) = 1+ 1 m Gp(s)kp According to the final-value theorem, if the closed-loop system is stable, we havethe steady-state error asfollows: ess = lim t?8 e(t) = limsE(s) s?0 = 1 lim ?(s) (Rv +gGp(0)?d) = gGp(0)?d Rv ?(0) + ?(0) := essR +ess? (8.35) s?0 Since the loop transfer function Gp(s)kp/m in ?(s) does not have the internal model 1/s in it, the steady-state error essis not zero. The steady-state tracking/regulation error is contributed from two sources: essR due to the reference input and ess? due to the road slope disturbance. For example, if ?d = 0 and Rv = 3 m/s,then we havethe steady-state error ess = essR = Rv ?(0) 3 = 3 1+Gp(0)kp/m = 1+50kp/1929 3 = 1+0.02592kp The error can be madearbitrarily small if kp can be madearbitrarily large. However, kp cannot be madearbitrarily large becausethere is a physical constraint onthe engine force f. If kp is chosen to be kp = 500, then ess = ess R = The referenceinput r(t) 3 1+0.02592kp 3 = 1+(0.02592)(500) = 0.215 m/s (8.36) = 3us(t) meansthat the desired vehicle speedis v(t) = 33 m/s. Sincethe steady-stateerror is ess= 0.215 m/s,the real steady-statevehiclespeedis 32.785 m/s. 8.2 An Automobile Cruise Control Example 241 For another example, assume ?d = 0.0873rad and Rv = 0 m/s, then we havethe steady-state error: ess = ess? = gGp(0)?d (9.8)(50)(0.0873) = ?(0) 1+50kp/1929 The error can be madearbitrarily small if kp can be madearbitrarily large. However,kp cannot be madearbitrarily large becausethere is a physical constraint onthe engineforce f. If kpis chosento be kp = 500,then ess = ess? = (9.8)(50)(0.0873) 42.777 = 1+50kp/1929 (8.37) = 3.064 m/s 1+(50)(500)/1929 The reference input r(t) = 0us(t) meansthat the desired vehicle speed is v(t) = 30 m/s. Since the steady state error is ess = 3.064 m/s, the real steady-state vehicle speed is 26.936 m/s. 8.2.3 Simulation Results with Ideal Engine In Section 8.2.2, a simple PI (proportional ki wasintroduced Model GE(s) = 1 plus integral) controller structure with two parameters kp and to achieve cruise speed control under the influence of road slope disturbances. We also discussed at great length on how the control design would affect the steady-state andthe transient responses of the closed-loop and by utilizing In this the internal subsection, system by selecting pole locations, damping ratio, and natural frequency model theory. we will present the results of four simulations in which the engine model is assumed ideal with transfer function GE(s) = 1. Then in the next subsection, Section 8.2.4, two simulations are employed to show how the unmodelled engine dynamics 1 GE(s) = (ts+1)2 maydestabilize the system. We will alsolearn that a moreaggressive controller for the ideal not be robust against unmodelled dynamics. Furthermore, in Section 8.2.5, a feed-forward compensation is employed to reduce the model may disturbance response if the disturbance information is available. The Simulink program CruisePI.mdl shown in Figure 8.8 will be employed to conduct sim-ulations in this and the next subsections. This Simulink program is constructed based on the closed-loop system block diagram shown in Figure 8.7, wherethe transfer function of the PI con-troller is K(s) =(kps+ki) is Gp(s) = 1 ?(s+ c). same assumption ?s, the engine dynamics is GE(s) = 1 ? (ts+1)2, andthe vehicle dynamic Forthe four simulationsin this section,the time constant t is setto zerothe on which the PI controller was designed. The step input block labeled by Rrepresents the reference input r(t) = Rvus(t). The other step input blocklabeledby Slope servesastheroadslopedisturbance input, ?dus(t).Theoutputblocklabeledas v arecordsthe actualvehicle velocity v(t) =v(t)+v*, the block errlabeled as er recordsthe tracking error,e(t), andthe blocklabeled as f a recordstheforce f(t) =f(t) +f*. Theconstantblocksv n and f nrepresentthe nominal operatingequilibrium velocity andforce, v* and f*, respectively. Example 8.6 (Speed Rv = 3 m/s Step Tracking 0,100,500) Responses with kp = 500 and Three Values of ki = In this simulation, the vehicle initially is assumed operating at the equilibrium, v(0) = 0 m/s, or v(0) = v* = 30 m/s. Letr(t) = Rvus(t), where Rv = 3 m/s, and ?(t) remains at 0 rad all the time 242 8 Stability, Regulation, and Root Locus Fig. 8.8: Simulink during the simulation. from v(t) diagram Design CruisePI.mdl There is no road slope = 0 m/sto v(t) for cruise control disturbance, simulations. and the car is commanded = 3 m/s,or, equivalently, from v(t) = 30 m/s to v(t) to change speed = 33 m/s. The three speed tracking responses corresponding to the three PI controllers with kp = 500 and three values of ki = 0,100,500 are shown in Figure 8.9. Theleft graph is the velocity graph v(t), the middle oneis the error graph e(t), andthe one onthe right is the control force graph f(t). The ki = 0 responseis shown in pink;it risesfrom v(0) = 30 m/sexponentially withtime constant t computed based on Equation 8.34, t to the steady state v(t) 8.36. 1929 m = = cm+kp = 3.58 s (1929)(0.02)+500 = 32.785 m/s with a steady-state error, ess = 0.215 m/s,as calculated in Equation The ki = 100 and ki = 500 responses are shown in blue and black, respectivelythey all converge to the steady state v(t) = 33 m/s with zero steady-state error as expected. The damping ratio and natural frequency pair (?,?n) associated with the ki = 100 and ki = 500 designs are (0.613,0.228 rad/s) and (0.274,0.509 rad/s), respectively; hence, the ki = 500 response has larger maximum overshoot and shorter oscillation period than the ki = 100 response. It also can be seenthat the ki = 500 design requires alarger swing of control force -220N < f(t) <3000N than the ki = 100 design. The closed-loop system simulation results shown in Figure 8.9 are obtained by running the follow-ing MATLAB program: CSDfig8p9.m, which will automatically call the Simulink model pro-gram CruisePI.mdl, to conduct the simulation. The plotting program, Plot3C.m will also be called to plot the figures. The MATLAB code is listed asfollows. % CSDfig8p9.m % MATLAB Cruise R2015a % simulation and % Gravity: Data: % Drag coefficient: % Front surface % Drag force cntrl, BC Chang, CSDfig8p9.m Plot3C.m to Drexel will plot call University, 8/10/2019 CruisePI.mdl to Fig8.9 m/s2 (A m=1929 PI later. use g=9.8 % Vehicle % Mass: or typical mid-size SUV like Lexus R350) Kg Cd area: Fd = = 0.35 A=(width)*(height)=(1.8)*(1.67)=3 0.5*rho*Cd*A*v2 := c*v2 m2 conduct 8.2 An Automobile Cruise Control Example 243 Fig. 8.9: Speed Rv = 3 m/stracking responses with kp = 500andthree values of ki = 0,100,500. % where v % Thus, % c is c = the = 0.5*rho*Cd*A % Choose the = 30 % f_n = c*(v_n)2 % Hence, = = m/s, c_bar 1929, c which = viscosity rho = is = 108 Km/Hr, 0.643*(302) 0.02 = = , air g 0.643 9.8, or 64.8 578.7 v_n = 1.225 Kg/m3 Kg/m at miles/hr N 2*0.643*30/1929 = coefficient density equilibrium =(2c/m)*v_n c_bar the 0.5*1.225*0.35*3 operating = is where nominal % v_n m velocity, 0.5*rho*Cd*A, = = 30, 0.02 f_n = 594.2, kp=500 %Initialization tau=0, R0=v_n*0.1, %% 1st ki = Run 0, Slope_deg=0, Slope_rad=Slope_deg*pi/180, Simulation sim_time=50, sim_options=simset('SrcWorkspace', open('CruisePI'); 'current','DstWorkspace', sim('CruisePI', [0,sim_time], sim('CruisePI', [0,sim_time], sim('CruisePI', [0,sim_time], 'current'); sim_options); run('Plot3C') %% 2nd Run ki=100, Simulation sim_time=50, sim_options=simset('SrcWorkspace', open('CruisePI'); 'current', 'DstWorkspace', 'current'); sim_options); run('Plot3A'), %% 3rd ki = Run 500, Simulation sim_time=50, sim_options=simset('SrcWorkspace', open('CruisePI'); 'current', 'DstWorkspace', 'current'); sim_options); run('Plot3B') Example 8.7 (Road Slope?d = 0.0873rad Disturbance Responseswith kp = 500 and Three Values of ki = 0,100,500) The same PI controllers of Example 8.6 will be employed in the following simulation to maintain the vehicle speed atthe equilibrium speed v* = 30 m/sunderthe influence of road slope disturbance ?(t) = ?dus(t), where?d = 0.0873rad. The three road slope disturbance responses corresponding to the three PI controllers with kp = 500 and three values of ki = 0,100,500 are shown in Figure 8.10. Theki = 0 responseis shown in pink; it drops from v(0) = 30 m/sexponentially, with the sametime constant t = 3.58 s, as computed in Example 8.6, to the steady state v(t) = 26.936 m/s with a steady-state error, ess = 3.064 m/s,as calculated in Equation 8.37. It also can be seen from the graph that the steady-state force required to achieve this steady-state velocity is approximately 2100 N, which can be verified by the followin 244 8 Stability, Regulation, and Root Locus Design Fig. 8.10: Roadslope ?d = 0.0873rad disturbanceresponse with kp = 500 and three values of ki = 0,100,500. computations.From Equation8.33 withr(t) = 0and ?d = 0.0873rad = 5?, wehavethe force at steady state as f(t) = f* +f(t) = f* + mgkp(0.0832) cm+kp = 578.7+ (1929)(9.8)(500)(0.0832) = 2111 N (1929)(0.02)+500 The ki = 100 and ki = 500 responses are shown in black and blue, respectivelythey back to steady state v(t) all converge =30 m/s with zero steady-state error as expected. The damping ratio and natural frequencypair(?,?n) associatedwiththe ki =100andki = 500designsarethe sameasthoseshownin Example 8.6; hence, the ki = 500 response haslarger maximum overshoot and shorter oscillation period than the ki = 100 response. It also can be seenthat the ki = 500 design requires alarger swing of control force 578.7 N < f(t) < 3000 N than the ki = 100 design. The closed-loop system MATLAB simulation program: results shown CSDfig8p10.m, in Figure which 8.10 are obtained will automatically by running call the the fol-lowing Simulink model program CruisePI.mdl, to conduct the simulation. The plotting program, Plot3C.m will also be called to plot the figures. The MATLAB code is listed asfollows. Note that this program is the same as CSDfig8p9.m, except the Initialization line where R0 and Slope deg are changed to 0 and 5, respectively. % CSDfig8p10.m % MATLAB % simulation Cruise R2015a or and PI cntrl, later. use Plot3C.m BC CSDfig8p10.m to Chang, Drexel will plot call University, CruisePI.mdl 8/10/2019 to conduct Fig8.10 : : %Initialization tau=0, R0=v_n*0, Slope_deg=5, Slope_rad=Slope_deg*pi/180 : : Example 8.8 (Speed Rv = 3 m/s Step Tracking Responses with ? = 0.707 and Three Values of ?n = 0.25,0.5,1 rad/s.) The speed tracking control simulation to be considered here is the same as that conducted in Exam-ple 8.6, except that the PI controller parameters kp and ki are chosen based on the desired damping rati 8.2 An Automobile Cruise Control Example 245 ? and naturalfrequency ?nfor the closed-loopsystem. Recall that from Equation 8.30, we havethe following relationship equation between (kp,ki) and (?,?n): ?2 n = ki/m ki = m?2 n ? kp=m(2??n -c) 2??n =c+kp/m Basedon Equation8.38 andthe vehicle data, m= 1929 kg andc pairsassociated withthe three (?,?n) pairsasfollows: ? = 0.707, ?n = 0.25rad/s ? ? = 0.707, ?n = 0.5rad/s ? = 0.707, ?n = 1 rad/s ? ? (8.38) = 0.02s-1, weobtainthe three (kp,ki) kp = 643.3, ki = 120.6 kp = 1325, ki = 482.3 kp = 2689, ki = 1929 Fig. 8.11: Speed Rv = 3 m/s tracking responses with ? = 0.707 and three values of ?n = 0.25,0.5,1 rad/s. The three speed tracking responses ? = 0.707 and three values of?n speed tracking all the three corresponding to the three PI controllers associated with = 0.25,0.5,1 are shown in Figure 8.11. All three have perfect steady-state with zero steady-state error. They also havethe same maximum overshoots since closed-loop systems have the same damping ratio. However, they differ in rise time and settling time. The system with larger ?n will have faster transient response. The speed track response associated with ?n = 1 rad/s is shown in pink, which is the mostaggressive one with quickest time response. However,the pink one requires designs (4500 much more control force (above 8000 N)than the other two Nand 2500 N). The closed-loop system simulation results shown in Figure 8.11 are obtained by running the fol-lowing MATLAB program: CSDfig8p11.m, which will automatically call the Simulink model program CruisePI.mdl, to conduct the simulation. The plotting program, Plot3A.m will also be called to plot the figures. The MATLAB code is listed asfollows. Note that this program is the same as CSDfig8p9.m, except the six lines shown in the following list. % CSDfig8p11.m % MATLAB % simulation Cruise R2015a or and PI cntrl, later. use BC CSDfig8p11.m PlotA.m to Chang, Drexel will plot Fig8.11 : %% 1st ze=0.707, Run Simulation wn=0.25, ki = m*wn2, kp=m*(2*ze*wn-c_bar), call University, CruisePI.mdl 8/10/2019 to conduct 246 8 Stability, Regulation, and Root Locus Design run('Plot3A'), %% 2nd Run Simulation ze=0.707, wn=0.5, ki = m*wn2, kp=m*(2*ze*wn-c_bar), : run('Plot3B'), %% 3rd Run Simulation ze=0.707, wn=1, ki = m*wn2, kp=m*(2*ze*wn-c_bar), : run('Plot3C') Example 8.9 (Road Slope?d = 0.0873rad Disturbance Responsewith ? = 0.707 and Three Values of ?n = 0.25,0.5,1 rad/s) The same PI controllers will be employed of Example in the following 8.8, designed simulation to based on the damping ratio maintain the vehicle and natural frequency, speed at the equilibrium speed v* = 30 m/sunderthe influence of road slope disturbance ?(t) = ?dus(t), where?d = 0.0873rad. The three road slope disturbance responses corresponding to the three PI controllers designed based on ? = 0.707 and three values of ?n = 0.25,0.5,1 rad/s are shown in Figure 8.12. All three responses dip right after the disturbance occurs, then reverse and recover to the nominal speed with no steady-state error. However, the ?n = 1 rad/s response (in pink) recovers faster than the other two designs. All three requires the same maximum control force f(t), 2,600 N, but the pink one demands f(t) to act faster. Fig. 8.12: Road slope ?d = 0.0873 rad disturbance response with ? = 0.707 and three values of ?n = 0.25,0.5,1 rad/s. 8.2.4 Robustness to Model Uncertainty In general, the dynamics practical system. model employed in the design of control system is not exactly the same asthe The discrepancy may come from the unmodeled dynamics, uncertainties, and pertur-bations due to the change of environment. Therefore, a well-designed control system is required to be robust against the foreseeable uncertainties and perturbations in the plant dynamics. Recallthat in the cruise control system design subsection, Section 8.2.2, we employed GE(s) = 1 asthe ideal dynamics model of the engine, which is a good approximation of the second-order engine dynamics model, GE(s) = 1 (ts+1)2 (8.39 8.2 An Automobile Cruise Control Example 247 if the time constant t is close to zero. However,the time constant will not be zeroin reality, and so it is important to know howrobustthe system will be againstthe variation of t. In the following two examples, we will evaluate Example 8.10 (Robustness 1 rad/s.) the robustness of two PI controller Evaluation of the PI Controller designs considered in Section 8.2.3. Design Based on ? = 0.707 and ?n = In this example, we will conduct simulations to evaluate the robustness of the more aggressive con-troller design considered in Example 8.8, which is the PI controller designed based on damping ratio ? = 0.707 and naturalfrequency ?n = 1rad/s. The simulations are similar to those conducted in Example 8.8, except that the unmodeled engine dynamics shown in Equation 8.39is employed to evaluate howthe variation of the time constant t in Equation 8.39 will affect the closed-loop system performance. in Figure 8.13. There are three speed tracking The simulation responses shown in the figure. results are shown The response curve in blue color with t = 0 is exactly the same asthe pink responsein Figure 8.11 wherethe engine dynamics model wasassumedideal, GE(s) = 1. Thet = 0.3sresponseshown in black coloris apparently worse than the blue one. It has larger overshoot and more oscillations. If the time constant is increased to t = 0.6 s, the response will deteriorate to the response curve in pink whose oscillation amplitude is growing with time; that is, the system becomes unstable! Fig. 8.13: Robustnessevaluation of the cruise control system with the PI controller designed based on ? = 0.707 and ?n = 1 rad/s. The closed-loop system simulation results shown in Figure 8.13 are obtained by running the fol-lowing MATLAB program: CSDfig8p13.m, which will automatically call the Simulink model program CruisePI.mdl, to conduct the simulation. The plotting program, Plot3A.m will also be called to plot the figures. The MATLAB code is listed asfollows. Note that this program is the same as CSDfig8p11.m, except the six lines shown in the following list. % CSDfig8p13.m % MATLAB % simulation Cruise R2015a or and PI cntrl, later. use BC CSDfig8p13.m Plot3A.m to Chang, Drexel will plot call Fig8.13 : %% 1st tau=0, % Simulation sim_time=8, Run Simulation ze=0.707, wn=1, ki = m*wn2, kp=m*(2*ze*wn-c_bar), University, CruisePI.mdl 8/10/2019 to conduct 248 8 %% Stability, 2nd Run tau=0.3, % Regulation, and Root Locus Design Simulation ze=0.707, wn=1, ki = m*wn2, kp=m*(2*ze*wn-c_bar), wn=1, ki = m*wn2, kp=m*(2*ze*wn-c_bar), Simulation sim_time=8, : %% 3rd Run tau=0.6, % Simulation ze=0.707, Simulation sim_time=8 : Fig. 8.14: Robustnessevaluation of the cruise control system with the PI controller designed based on ? = 0.707 and ?n = 0.25rad/s. In the aggressive next example, we will evaluate PI controller. Usually may not have an optimal a less the robustness aggressive of the cruise controller control has a better system robustness with a less although it performance for the nominal system. Example 8.11(Robustness Evaluation of the PI Controller Design Basedon ? = 0.707 and ?n = 0.25 rad/s.) In this example, we will conduct simulations to evaluate the robustness of the less aggressive con-troller design considered in Example 8.8, which is the PI controller designed based on damping ? = 0.707 and natural frequency ?n = 0.25 rad/s. Note that the natural frequency example is only 25% of that chosen by the aggressive controller in Example 8.10. ratio chosen in this The simulations are similar to those conducted in Example 8.10, except that the PI controller is designed based on damping ratio ? = 0.707 and natural frequency ?n = 0.25 rad/s. The simulation results are shown in Figure 8.14. response curve in blue color with t There are three speed tracking responses shown in the figure. The = 0 is exactly the same as the blue response in Figure 8.11 where the engine dynamics model wasassumedideal, GE(s) = 1. The t = 0.3s and t = 0.6sresponsesin Figure 8.14 are in black and pink, respectively. Both are worsethan the blue one. However,they remain stable. This less aggressive (or more conservative) controller design has better robustness against unmodeled dynamics than the aggressive one. Remark 8.12 (Trade-Off Between Performance and Robustness) The essential lesson learned from Examples 8.10 and 8.11 is that pushing for high performance often leads to a non-robust result. If we choose to go with the robust design, that is the least aggressiv 8.2 controller, we have relatively poor performance, An Automobile as can be seen in Cruise Control Example Figures 8.11 and 8.12. 249 However, the controller is morerobust. Performance degrades with the perturbed engine dynamics, but still workable. In general, context the trade-off between of the controller If system parameters performance and robustness design. If high performance will change with environment 8.2.5 Disturbance Feed-Forward needs to be evaluated is desired, then accurate or age, then robustness becomes essential. Compensation One approach to performance enhancement is to add disturbance feedforward control. Disturbance slope, and taking feed-forward is based on the notion action immediately to provide a control in the overall models are required. rather than while using the robust of sensing the disturbance, in this case road waiting to respond to error. The sensed signal is used command that is added directly to the control input. Such a configuration is shown in Figure 8.15. Including the engine dynamics (GE) andthe feed-forward compensator (Gf), the system error response is given by E(s) = 1 V (s)+ 1+(1/m)K(s)GE(s)Gp(s) ((1/m)Gf(s)GE(s)-g)Gp(s) T(s) (8.40) 1+(1/m)K(s)GE(s)Gp(s) Fig. 8.15: Cruise control block diagram with disturbance feed-forward compensation. Notethat the feed-forward transfer function Gf can include control enhancement and/or filter ele-ments as well as sensor dynamics. Gf will alter the zeros of the disturbance to error transfer function but will not affect the poles. Consequently, it has no effect on system stability. Figure 8.16 illustrates the effect of feed-forward. The error response due to a road slope step disturbance (? = 0.707,?n = 0.25rad/s) controller withslow (t is illustrated using the less aggressive = 0.6s) engine dynamics withfeed-forward com-pensation Gf = 0.5mg (the purple response, notethat mand g arethe massand the gravity, respectively) and without feed-forward Gf = 0 (the black response). The blue color response, which assumes ideal engine(t = 0)andnofeed-forwardcompensationGf =0,is includedto showthattheresponsewill de-teriorate, as shown in black for the slow engine t = 0.6 s. Whereasfeedback allows the control designer to alter the system poles that determine the damping ratio and natural frequency, feed-forward does not. However, feed-forward does alter the zeros of the transfer function GET(s) from disturbance to error. The effect of that, in this case, is to reduce the effect on peak overshoot and undershoot. If Gfis chosen as Gf = mg,the disturbance response would have perfect cancellation for the case of ideal (t = 0 s) engine. However, it would cause more oscillation in disturbance response for the case of a slow engine with t = 0.6 s. Forthis reason, a compromise choice Gf = 0.5mg was adopted in the simulation of Figure 8.16 250 8 Stability, Regulation, and Root Locus Fig. 8.16: Comparison Design of the three step responses due to a road slope disturbance. 8.3 Root Locus Preliminaries The classical approach to feedback controller of a particular of commonly structure, used compensator (i.e., design involves two basic steps. First, choose a com-pensator select a compensator transfer functions, four of transfer which function). There are a number we have already seen: the integral compensator in Example 5.26, the proportional compensator in Example 8.1, the dual-loop feedback controller in Example 6.1, and the PI controller in Section 8.2. Each compensator or controller has a number of free design parameters that need to be determined to meetthe demands of the system performance goals. The root locus method is an approach to selecting those parameters to achieve desired transient performance of the closed-loop system. The root locus approach usually in Figure 8.17, where G(s) is a fixed dynamics, begins with a typical feedback control system structure, as shown dynamics model consisting of both the plant and the controller and Kis a design parameter to be determined to locate a desired feasible pole locations in the complex plane. The root locus approach shows a portrait of how the closed-loop system poles move through the complex plane as the parameter K varies from 0 to 8. The closed-loop characteristic equation of the following form is called atypical root locus equation. 1+KG(s) = 1+K N(s) D(s) (8.41a) =0 where N(s) D(s) = sm+bm-1sm-1 + +b1s+b0 (s-z1)(s-z2)(s-zm) = sn+an-1sn-1 + +a1s+a0(s- p1)(sp2) (s-pm) (8.41b) Fig. 8.17: Atypical feedback control system block diagram for root locus analysis and design. Note that the design parameter usually represents the transfer function Kin Equation 8.41 is a scalar parameter instead of K(s), which of a controller. In some applications, the control system structur 8.3 may not match the structure shown in Figure 8.17 and the closed-loop Root Locus Preliminaries characteristic equation is not in the form of typical root locus equation. In this case, if the closed-loop characteristic linear into function the form of the parameter of typical K, then the closed-loop root locus equation as shown characteristic in Example 251 equation polynomial is a can be converted 8.13. Fig. 8.18: A controller design candidate suitable for the root locus approach. Example Locus 8.13 (Convert a Closed-Loop Characteristic Equation Into the Form of the Typical Root Equation) Consider the feedback control system shown in Figure 8.18. Recall that this problem originating from the ramp input tracking control problem of Example 8.3. In order to achieve steady-state ramp function tracking, the loop transfer function needs to include the internal model 1/s2. Butjust setting the controller to K(s) = 1/s2 is not good enough since the closed-loop system will not be stable. Hence, the controller is chosen to be K(s) = (s +K)/s2, as shown in Figure 8.18, where Kis a free design parameter to be determined so that closed-loop system is stable and the transient response is optimized, subject to control-input constraints. The closed-loop characteristic equation is 1+ 145.5 (s+K) s2 s+43.14 =0 which is not atypical root locus equation. Butthe characteristic polynomial equation s3 +43.14s2 +145.5s+145.5K =0 can be rearranged into 1+K 145.5 s3 +43.14s2 +145.5s = 1+KG(s) =0 (8.42) which now is atypical root locus equation. Notethat the closed-loop system in Figure 8.18 andthe closed-loop system in Figure 8.17 with G(s) defined Equation by Equation 8.42 are not identical, 8.42 can be employed Definition 8.14 (Loop Transfer but they share the same closed-loop to place the closed-loop system system poles for the system poles. Hence, of Figure 8.18. Function and LTF Poles and Zeros) In the root locus equation, Equation 8.41, 1+KG(s) = 0, KG(s) is referred as the loop transfer function (LTF), and the poles and zeros ofKG(s) as LTF poles and LTF zeros, respectively. Remark 8.15 (Loop Transfer Function and LTF Poles and Zeros) The KG(s) of the root locus equation, Equation 8.41, 1+KG(s) = 0, is also referred asthe open-loop transfer function, and consequently, the poles and zeros of KG(s) are regarded as the open-loo 252 8 Stability, Regulation, and Root Locus poles and zeros in the literature. Design These terminologies make sense for simple cases like the one shown in Figure 8.17. Butfor more general caseslike the onein Figure 8.18, and another onein Figure 8.38, which will be introduced later in this chapter, these terminologies will become misleading and confusing since the open-loop poles and zeros in general are not the same asthe LTF poles and zeros of KG(s). A Trivial Root Locus Analysis and Design Problem Before we start to learn how to draw root loci diagrams using the root loci construction rules, we will consider atrivial second-order system by whichits root loci diagram can be easily constructed andthen be employed to demonstrate the basic concept of root locus analysis and design. Furthermore, this sim-ple system can also serve as the first example to verify the root loci construction rules, which will be introduced shortly. Considerthe feedback control system in Figure 8.17 with G(s) = 1/(s2+4s+3). equation is 1 1+K s2 +4s+3 whosetwo roots are 1 s1 = s2 2 =0 ? s2 +4s+3+K ?-4 ?42-4(3+K)?=-2 Table 8.1: The roots of the characteristic equation s2 +4s+3+K The characteristic =0 v 1-K (8.43) = 0 as K varies from 0 to 8. KK=0 K=0.75K=1 K=1.25K=5 K?8 s1 -1 s2 -3 -1.5 -2 -2+j0.5 -2+j2 -2+j8 -3.5 -2 -2-j0.5-2-j2 -2-j8 The trajectories oftheroots for0 =K<8are called theroot lociofthesystem. Based onEquation 8.43 wecan construct Table 8.1 that lists how the values of the two roots vary as K changesfrom 0to 8, which in turn can be usedto draw the root loci of the system, as shown in Figure 8.19. From either therootlociotrhetable, it can beseen thatwhen K=0thetworoots are s =-1and s =-3,which are thetwopoles ofG(s) =1/(s+1)(s+3). AsKincreases, the tworoots move onthe real axis towards each other until theymeet ats =-2when K=1. When Kischanging fromK=1to K>1,thedouble roots split intotwocomplex conjugate roots -2 j?. The point s =-1iscalled a break-out point, and after the roots break away from the real axis, the two roots will continue to stay on thetwovertical straight lines, one going upand theother down alltheway toinfinity when K?8. This simple root loci diagram can be employed to place the closed-loop system poles at desired feasible locations. For example, if we would like the closed-loop system to have a damping ratio ? = 0.707, wecan draw a ? = cos45? blue dashline, as shownin Figure 8.19. Thenthe intersection point willgive theclosed-loop system pole locations ats =-2 j2,and reveal thedamping ratio, natural frequency, and the value of K. 8.3.1 Root Loci Construction Rules Forthe previous example, which is a second-order system with a design parameter K,it is easyto solve for the two roots as functions of K and then the trajectories of the roots (i.e., the root loci) can be draw 8.3 Root Locus Preliminaries 253 Fig. 8.19: Rootloci of the simple system. accordingly onthe complex plane. Butthis trivial approach is not viable for high-order systems. Theroot locus approach is one of the main classical control tools in the analysis and design of control systems. It provides a set of root loci construction rules that makethe sketch of root loci possible for high order systems without computing the roots. Moreimportantly, it sheds light on how the pole-zero pattern of G(s) affects the root loci of 1+KG(s) = 0, which is very helpful in determining the structure of the controller. In this subsection we will demonstrate how to apply the root loci construction rules without explaining the detailed theory. Consider the feedback control system as shown in Figure 8.20. Theloop transfer function system is s+3 K s(s+1)(s+2)(s+4) which is the product of the transfer functions of the plant, the controller, design parameter K is a part of the controller. and the sensor. of the Note that the Hence,the characteristic equation of the closed-loop system is s+3 1+K = 1+KG(s) s(s+1)(s+2)(s+4) which is equivalent to the following characteristic equation in polynomial s(s+1)(s+2)(s+4)+K(s+3) The objective is to find from characteristic function K = 0 to out how the closed-loop Equations (8.44) form, =0 system K = 8. Note that the closed-loop equation shown in = 0 (8.45) poles vary on the complex system poles are the roots 8.44 and 8.45. They are NOT the plane as K in-creases of the closed-loop poles of the loop transfer KG(s) unless K = 0. From Equation 8.45, it can be seenthat at K = 0 the closed-loop system poles are the poles of the loop transfer function, s =0,-1,-2,-4.Notice that in Figure 8.21 each looptransfer function pole is indicated byacrossand thesingle zero oftheloop transfer function isrepresented byacircle ?at s =-3 254 8 Stability, Regulation, and Root Locus Design Fig. 8.20: Anintroductory root loci construction example. Fig. 8.21: Rootloci sketch of the introductory Now, we will sketch the root loci rules. The detailed of the system of Equation explanation and theorem example. 8.44 following related to these rules the basic root loci con-struction will be given later in the chapter. Root Loci Construction Rules Rule 1: Number of Branches. The number of branches of the root loci is equal to the number of the loop transfer function poles. For the introductory poles. example, there are four branches since the loop transfer function Rule 2: Symmetry. Theroot loci are symmetric The root loci are symmetrical or conjugate complex numbers hasfour about the real axis. with respect to the real axis since the roots are either real numbers 8.3 Root Locus Preliminaries 255 Rule 3:Starting andEnding Points. Each branch begins (K=0)atanLTFpole and ends (K?8) at an LTF zero or at infinity. Here,the LTF poles stand for the poles of the loop transfer function KG(s) in the root locus equation 1+KG(s). The LTF zeros are defined similarly. The start pointK=0points areatheLTFpoles s =0,-1,-2,-4.One oftheK=8end point isattheLTF zero s = -3,and theother threeK =8endpoints willbeattheinfinity, defined by the asymptotes given by Rule 5. Rule 4: Real Axis Segments. For point K> 0, if the total number of real poles and zeros to the right of a on the real axis is odd, this As seen from a very right point lies on the root loci. Figure 8.21, assume a man is end with no pole or zero behind walking him. on the real axis line toward the left from There would be no root loci until he encounters the first pole or zero to begin with the first root loci segment on the real axis. Thefirst segment will end when the person successively meets the second until the negative infinity pole or zero. Hence, the root loci will alternate on and off end of the real axis. For this example, there are three real axis segments: between s =0and s =-1,between s =-2and s =-3,and from s =-4alltheway to s =-8. Rule 5: Behavior at Infinity. The root loci branches that tend to infinity do so along asymptotes with angles ?, and these asymptotes all intersect at a common point s, on the real axis as defined by: ?? = ? (2?+1)p n-m , ?=0,1,2,,n-m-1; s pj -?z -an-1= = bm-1 n-m n-m j i Forthis introductory example, there will be three asymptotes. The angles of these three asymp-4-1 totes and the intersection of these asymptotes with the real axis are ?0 = p 3 =60?, 4-1=p s = 0+(-1)+(-2)+(-4)-(-3) 4-1 The three asymptotes =p =180?, ?2=5p 4-1=5p 3 =-60? ?1 = 3p = -4 3 =-1.33 are shown in dashed yellow lines in the graph. Rule 6: Real Axis BreakOut and BreakIn Points. The root locus breaks out from the real axis where the gain Kis a (local) maximum on the real axis, and breaks in to the real axis where K is a (local) minimum. Tolocate candidate break points simply solve d ds ?? 1 G(s) =0 or N(s) dD(s) ds - dN(s) ds D(s) = 0 where G(s) = N(s)/D(s), andthen find the value of K atthe break point by K = In Figure 8.21, the root loci segments 1 |G(s)| on the second and the third real axis segments for all values of K. The only break-out point will stay on their respec-tive will occur at the first real axis segment between s =0and s =-1.Since N(s)=s+3andD(s) =s4+7s3 +14s2 +8s, we have N(s) dD(s) ds - dN(s) ds D(s) =0 ? 3s4 +26s3 +77s2 +84s+24 =0 and itsroots at-3.311 j0.68124, -1.6097, and-0.43492. Hence, thebreak-out point occurs at 256 8 Stability, Regulation, and Root Locus Design s =-0.43492. The value of K at the break-out point can be computed from the following. 1 ? K =? ? ? ? ?=0.53459 ? G(-0.43492) ? Rule 7: Imaginary Axis Crossings. Usethe Routh stability test to determine values of Kfor loci cross the imaginary axis. The characteristic equation of Equation 8.45 can be rewritten s4 +7s3 +14s2 +(8+K)s+3K as the following polynomial which equa-tion: (8.46 =0 The Routh array for this characteristic equation is constructed asfollows: s4 1 14 s3 7 8+K s2 b1 3K s1 c1 s0 3K 3K 7(90-K) ? 90-K K2+65K-720 b1 = 1 where c1 = -1 ? ? According to the Routh-Hurwitz criterion, the system is stable if and only if the first-column ele-ments of the Routh array are all strictly positive. Hence,the system is stable if and only if all the following three inequalities are satisfied: K>0, 90-K>0, and K2+65K-720 <0 which is equivalent to 0 Hence, when K = 9.6456, two <K< of the root loci 9.6456 branches cross the imaginary axis. The intersection points can be computed from the auxiliary equation, b1s2 +3K=11.4792s2 +28.9368 =0 ? s =j1.588 Therefore, when K=9.6456 theroot lociintersect theimaginary axis ast = j1.588. Up tonow, withthe information obtained from Rule 1to Rule 7, weare able to complete the root loci diagram sketch in Figure 8.21 for the introductory Rule 8: root loci example without the need of Rule 8. Angle of Departure from Poles or Angle of Arrival to Zeros. Assumes is at the vicinity of anyLTFpole orzero, pz, then theangle ofdeparture fromortheangle ofarrival topz,?s( pz), can be computed from the following m equation: n G( s) = ??( s-zi)-??( s- pj) =(2?+1)p 0 =K<8 i=1 j=1 Example 8.16 (Angle of Departure from a Complex Pole on a Root Loci) Assume the LTF poles and zero shown on the root loci diagram of Figure 8.22 are p1 = 0, p2 = j1, p3=-j1,p4=-3,and z1=-1,and acomplex number s isatthevicinity ofp2.Then theangle ofdeparture fromp2,?( s- p2)can becomputed from 8.3 Root Locus Preliminaries 257 Fig. 8.22: An example demonstrating angle of departure. ?( s-z1)-?(s- p1)-?( s- p2)-?( s- p3)-?( s- p4)=(2?+1)p which can be rewritten as follows: ?( s- p2)= ?(p2 -z1)-?(p2 - p1)-?(p2 - p3)-?(p2 - p4)-(2?+1)p Noticethat thes on the right-hand side of the equationhas beenreplaced by p2sinces and p2 are virtually the same point observed from far away. Therefore, the angle of departure from p2 is ?( s- p2)=45?-90?-90?-18.4? +180? =26.6? With this LTF pole-zero pattern, there are four root loci branches. One started from p1 = 0 moving totheleftand ended atthezero z1=-1.The second branch begins atp4=-3,heading tothe left on the negative real axis all the wayto the 180? asymptote. The other two of the four branches willdepart frompoles p2=j1andp3= -j1with theangles ofdeparture, 26.6? and-26.6?, respectively, into the right half plane. Since the other two of the three asymptotes are heading into therighthalfofthecomplex plane with60?angles, thetwobranches leaving fromp2=j1 and p3=-j1 willmerge tothetwoasymptotes, and have nochance toturnaround going back totheleft half of the complex plane. Hence, there exists no value of K > 0 so that the closed-loop system can be stable. We will address this issue later in Section 8.5 regarding a sinusoidal position tracking problem. One remedy is to add LTF zeros on the negative real axis to change the departure angle and the asymptotes. For the introductory example, all the LTF poles and zero are on the three real axis segments. It is easyto see onthe first segmentthe angle of departurefrom the pole at s = 0 will be 180?since the root trajectory of this branch hasto go to the left to cover this part of root loci according to Rule 4.For thesame reason, theangle ofdeparture forthepole ats =-1 willbe0?. Inthefollowing example, we will verify the departure angles of these two poles. Example 8.17 (Angle of Departure from the Real Poles on the Introductory The LTF pole-zero pattern of the introductory root loci example is shown Root Loci) again in Figure 8.23, where p1=0,p2=-1,p3=-2,p4=-4,and z1=-3,and acomplex number sisatthevicinity ofp2. Then theangle ofdeparture fromp2,?s( p2) can becomputed from thefollowing equation 258 8 Stability, Regulation, and Root Locus Design ?( s-z1)-?(s- p1)-?( s- p2)-?( s- p3)-?( s- p4)=(2?+1)p which can be rewritten as follows, ?( s- p2)= ?(p2-z1)-?(p2- p1)-?(p2 - p3)-?(p2-p4)-(2?+1)p Fig. 8.23: Angle of departure for the introductory example. Noticethat thes on the right-hand side of the equation has been replaced by p2 sinces and p2 are virtually the same point seen from far away. Therefore the angle of departure from p2 is ?( s- p2)=0-p-0-0+p =0 which means the root loci departs from the pole p2to the right. Ifs is chosen to be at the vicinity of z1,then the angle of arrival to z1 will be ?( s-z1) =?(z1 - p1)+?(z1 -p2)+?(z1 -p3)+?(z1 -p4)-(2?+1)p and ?( s-z1)=p+p+p+0-3p=0 Hence, the angleof arrivalto the zeroz1is 0?, which means the root loci comesfrom theright to arrive at z1. 8.3.2 Root Loci Construction Using MATLAB In applications, the root locus plot can be generated by computation using established functions like MATLABs rlocus. The two graphs in Figure 8.24 show the same root locus plot generated using the following code: % CSD Fig8.24 Use rlocus(G,K) for the intro MAT-LAB example s=tf('s'); G=(s+3)/((s)*(s+1)*(s+2)*(s+4)); figure(7) K=logspace(-3,2,1000); rlocus(G,K) The graph on the left shows the root loci the sgrid command on the Command with the grid on. The grid can be turned Window or simply by a right click of the on by executing mouse over the root loci graph to pop up a small window manual wherethe grid can be turned on or off. The grid shows the constant damping ratio (?) lines and the constant natural frequency (?n) circles. The black squar 8.3 Fig. 8.24: The root loci of the introductory Root Locus Preliminaries 259 example plotted using MATLAB rlocus. cursor that appeared on the root loci was obtained by aleft click on the root loci. The black square cursor can befurther dragged along the root loci to a position of interest. Whilethe black cursor is moving, a small display panel also moves with it, showing the associated pole location, value of K, damping ratio, and natural frequency. Onthe left graph, the black cursor is positioned at the intersection oftheroot lociand theimaginary axis, atwhich thecomplex conjugate poles arej1.59 and the gain K = 9.65, and the damping ratio and the natural frequency are ? = 0 and ?n = 1.59 rad/s, respectively. If the black cursor is movedto the break-out point, the display panel will show that the double poles ats =-0.435, thegainK=0.534, thedamping ratio ? =1,and thenatural frequency ?n = 0.435rad/s. The graph on the right shows the same root loci but with the grid off. The black cursor is moved totheposition where thecomplex conjugate poles are at-0.398j0.398, and thegainK=0.923. At these pole locations, the corresponding damping ratio and the natural frequency are ? = 0.707 and ?n = 0.563 rad/s. By executing the MATLABs command [K,Poles]=rlofind(G), a new cursor consisting of a long horizontal line and a long vertical line appears to hover over the entire Root Locus window. Bypositioning thecursor, the intersection ofthese twolong lines, atthepoint -0.398+ j0.398 on the loci marked by the previous black square cursor, the value of the gain Kand all associated closed-loop poles are identified, as shown in the following: % >> CSD Fig8.24 Use rlofind [K,Poles]=rlocfind(G) point in -3.9777e-01 K the graphics + to all a window selected_point 3.9790e-01i = 9.2300e-01 Poles locate Select = -4.0383e+00 + 0.0000e+00i -2.1661e+00 + 0.0000e+00i -3.9777e-01 + 3.9790e-01i -3.9777e-01 - 3.9790e-01 poles = 260 8 Stability, Regulation, It also can be seen that and Root Locus Design a red cross appears on each branch of the loci at all of the identified poles. If thevalue ofK=0.923 ischosen inthecontroller design, thetwopoles -0.398j0.398 willbethe dominant ones to determine the ratio and natural frequency A Simulink simulation behavior of the closed-loop system, and the associated damping will be ? = 0.707 and ?n = 0.563 rad/s, respectively. program is built based on the block of the feedback system shown in Figure 8.20. The step response simulation When Kis chosen to be K = 0.923, the step response is underdamped with about 5% system feedback which occurs at t with the same damping ratio damped. If step response function K = 0.534 are shown with the step response and natural frequency, control system has only about 1% higher in faster in the peaktime. critically = 6.5 s. Comparing with K = 0.923 and control in Figure 8.25. maximum overshoot, results diagram of the typical the step response maximum overshoot second-order of this fourth-order and is only about 1.5 seconds Onthe other hand, when Kis chosen to be K = 0.534, the step response will be Kis chosen between these two values, the step response waveforms. If Kis chosen to be K = 9.65, the step response will be between these two will be undamped sinusoidal with oscillation frequency equal to ?n = 1.59 rad/s. Fig. 8.25: The step response simulation results with K = 0.923 and K = 0.534. The two step response graphs in Figure 8.25 are obtained from running the generated using the following MATLAB program: % CSDfig8p25.m % Design A: K=0.923, damping ratio 0.707 % Design B: K=0.534, damping ratio 1, %% 5/08/2020 Intro Loci Example critically damped System s=tf('s'); %% G1=(s+3)/s; Design K=0.923, A step G2=1/((s+2)*(s+4)); t=linspace(0,20,201); GR=(K*G1*G2)/(1+K*G1*G2*G3); R=tf(1,1); [y,t]=step(GR,t); %% Design K=0.534, [r,t]=step(R,t); [u,t]=step(GU,t); B step run('plot2a') response t=linspace(0,20,201); GR=(K*G1*G2)/(1+K*G1*G2*G3); GU=(K*G1)/(1+K*G1*G2*G3); [y,t]=step(GR,t); where plot2a.m G3=1/(s+1); response GU=(K*G1)/(1+K*G1*G2*G3); % Root R=tf(1,1); [r,t]=step(R,t); [u,t]=step(GU,t); run('plot2b') is given in the following, and plot2b.m is the same except replacing plot2a.m figure(5), grid subplot(1,2,1), minor, plot(t,u,'b-'), title('r plot(t,r,'r-', & grid on, y'), hold grid t,y,'b-'), on, minor, grid subplot(1,2,2), title('u'), hold o on, b-by k--. 8.4 Root Locus Analysis and Design 261 8.4 Root Locus Analysis and Design Notwithstanding the ease of creating a root locus plot using a computer, intelligent use of root locus as a design tool requires understanding the underlying nature of the root loci behavior. Only with this un-derstanding can we manipulate the loci by selecting the right compensator and adjusting its parameters. Recall,in the example of the previous section, weconsidered a system with a PI compensator and exam-ined the root loci with respect to the gain parameter K. In fact, the PI compensator hastwo parameters, the gain and the zero location. The root locus is defined in terms could choose the zero location rather than the gain. of a single parameter. It is true that we Or we could develop two separate plots, one for each parameter. Butthen we would haveto sort outthe coupling between the two. It is generally bestto focus on the gain K asthe root locus parameter and use our underlying knowledge of root locus behavior to choose the correct compensator it would affect the loci. and manipulate its other parameters according To this end, in this section Our ultimate goal is to usethe root locus locations. So, what are acceptable we explore the basic theory to our knowledge of the root locus of how process. method as a way to achieve acceptable closed-loop pole pole locations? With the root locus method we do not specify specific desired pole locations. Instead weidentify an acceptable region in the complex plane within which, with some exceptions, region we wish all poles to reside. may be specified. Figure 8.26 shows Note that any pole residing ratio ? and damping factor one simple within the shaded region and effective way such a will have a better damping a. Considerthe feedback loop of Figure 8.27, wherethe loop transfer function is KG(s) = K N(s) D(s) sm+bm-1sm-1 + +b0 = K(s-z1) (s-zm) sn+an-1sn-1 + +a0 (s-p1) (s-pn) = K (8.47) Here, weassumethat N(s) and D(s) are completely known but Kis a parameter wecan adjust. Thus, we know the poles and zeros of the loop transfer function. Ourintent is to determine how the closed-loop poles vary as we manipulate Definition 8.18 (The K. For this purpose, we define the root locus problem as follows. Root Locus Problem) Generate a sketch in the complex plane ofthe closed-loop pole trajectories parameter K. Thesetrajectories are referred to asthe root loci. as a function ofthe gain Fig. 8.26: The goal is to design a compensator such that the closed-loop system poles lie in the shaded region. Notethat the region is characterized by two parameters:the damping ratio ? (or ?) andthe dampingfactor a 262 8 Stability, Regulation, and Root Locus Design Fig. 8.27: Atypical feedback control system block diagram for root locus analysis and design. 8.4.1 The Root Locus The closed-loop Method system poles are the roots (or zeros) of 1+KG(s) Equation 8.48 can be expressed (8.48) =0 as D(s)+KN(s) =0 (8.49) or KG(s) = K N(s) D(s) (8.50) =-1 Moreover, -1=ej(2?+1)p forallintegers ?.This establishes thefollowing result. Theorem 8.19 (Magnitude and Angle Equations) Due toEquation 8.50 and-1=ej(2?+1)p, forallintegers ?,theclosed-loop poles satisfy KG(s) = K which can be decomposed N(s) D(s) into two equations: =ej(2?+1)p, ?=0,1,2, the magnitude (8.51) equation, m 1 |G(s)|= K ? ?|s-zi| n i=1 ? 1 = K, 0 =K<8 ?spj ? (8.52) ? ? j=1 and the angle equation, m ?G(s) = (2?+1)p n ??(s-zi)- ? ?(s-pj) =(2?+1)p,0 =K<8 ? i=1 (8.53) j=1 According to Theorem 8.19, if a point s is on the root loci it has to satisfy the angle equation, Equation 8.53 and its associated gain Kshould satisfy the magnitude equation, Equation 8.52. Example 8.20 (Application The introductory root loci of the Angle Formula) example discussed in Section 8.3.1 is employed here to illustrate formula of Theorem 8.19. Recallthat the loop transfer function of the system i the angle 8.4 Root Locus Analysis and Design 263 Fig. 8.28: A graphical view of the application of the angle formula. s+3 KG(s) = K s(s+1)(s+2)(s+4) and its associated root loci diagram wasgiven in Figure 8.24. Thegraphontheleft of Figure8.28illustratesthetest points =j1.588satisfiesthe angleequation and therefore is on the root loci. The magnitude equation will also be used to compute the associ-ated gain K,which issupposed tobeK=9.65. For thegraph ontheright, thetestpoint iss =-2+j2, which is not on the root loci, Fors should not satisfy the angle equation. =j1.588, the algebraic sum of the angles is ?( s-z1)-(?(s- p1)+?( s- p2)+?( s- p3)+?( s- p4)) tan-1(1.588/0)+tan-1(1.588/1)+tan-1(1.588/2)+tan-1(1.588/4) ? =tan-1(1.588/3)=27.894? -(90? +57.800? +38.450? +21.653?) =27.894? -207.903? =180.009? whichsatisfiesthe angleequation,Equation8.53.Therefore, the points =j1.588indeedis onthe root loci. Furthermore, from the magnitude equation, Equation 8.52, we have K =|s||s+1||s+2||s+4| |s+3| =|j1.588||j1.588+1|| j1.588+2|| j1.588+4| |j1.588+3| = (1.588)(1.8766)(2.5538)(4.3037) = 9.649 3.3944 which matchesthe gain value K = 9.65 obtained in Section 8.3.1. For s =-2+j2,thealgebraic sum oftheangles is ?( s-z1)-(?(s- p1)+?( s- p2)+?( s- p3)+?( s- p4)) ?tan-1(2/-2)+tan-1(2/-1)+tan-1(2/0)+tan-1(2/2) ? =tan-1(2/1)=63.435? -(135? +116.565? +90? +45?) =-323.13? =36.87? ?=(2?+1)180? which does notsatisfy theangle equation Equation 8.53, and therefore thispoint s =-2+j2isnoton the root loci. 8.4.2 Explaining the Root Loci Construction In Section 8.3.1, welisted the root loci construction Rules rules and employed them to construct the root loci a system with four poles and one zero in Figure 8.21. In the following, behind these rules. of we will investigate the reasoning 264 8 Rule 1: Stability, Regulation, Number of and Root Locus Branches. Design The number of branches of the root locus is n, which is the number of LTF poles (the poles of the loop transfer function KG(s)). This follows from the fact that the order of the polynomial N(s)+KD(s) is the order of D(s). Rule 2: Symmetry. The root locus is symmetric complex poles occur in conjugate pairs. about the real axis.This follows from the fact that Rule 3:Starting andEnding Points. Each locibegins (K =0)atanLTF pole and ends (K?8)atan LTF zero or atinfinity. This is easily established by noting the following two facts: D(s)+KN(s) =0 ? D(s) =0 as K?0 KD(s)+N(s) =0 ? N(s) =0 as K?8 ifsisbounded 1 Rule 4: Real Axis Segments. For K > 0, real axis segments to the left of an odd number of poles and zeros are part of the root locus. Proof: According to the angle equation, Equation8.53, assume s is a point onthe real axis;then theangles ?( s-zi) or?( s-p j)from theconjugate poles orzeros willcancel each other outand the anglesfromthe polesor zerosontheleft ofs will bezero. Hence,onlythe real polesandzeroson the right-hand side ofs needto becountedin usingthe angle equation.If the number of the poles and zeros on the right-hand side ofs is odd, then the algebraic sum of the angles is (2?+1)p, and therefore the points is part of the root loci. Otherwise, it is not on the root loci. Rule 5: Behavior at Infinity. The root locus branches that tend to infinity do so along asymptotes with angles ?, andthese asymptotesall intersect at a common point s onthe real axis as definedby ?? = (2?+1)p n-m , ? =0,1,2,,n-m-1; s zi -? -an-1= = bm-1 i +? pj j n-m n-m (8.54 where bm-1, an-1, n,m, zi,andpj aregiven in Equation 8.47. Proof: Recallthe closed-loop characteristic equation: D(s)+KN(s) = 0 ? D(s) N(s) =-K Weare interested in the situation wheresis a very large complex number. It is easier to consider the very small complex number e = 1/s, so rewriting in terms of e, we obtain the approximations 1? 1 ? D(s)=sn+an-1sn-1 + +a0 =en(1+an-1e + +a0en)=en 1+an-1e+O(e2) where an-1=-(p1 + + pn) Similarly N(s) = 1? ? em 1+bm-1e+O(e2) where bm-1=-(z1+ +zm) Now, transforming back to s, D(s) N(s) sn-m an-1 +s bm-1 +s =-K 8.4 Root Locus Analysis and Design 265 -an-1 ??? ? bm-1 =(-K)1/(n-m) (m-n)s so we can write s 1+ 1 +O or s+ s2 bm-1 -an-1=(-K)1/(n-m) (m-n) Now, write sass ?s+?e j?and substitute s+?e j? + bm-1 -an-1= K1/(n-m)ej(p+?2p)/(n-m) (m-n) which leads to s = bm-1 -an-1 , ? =K1/(n-m) ??=(2?+1)p/(n-m) (n-m) This meansthat each asymptote is a straight line, which may be viewed as a linear function of the parameter ?. As ? varies from 0to 8, each asymptote evolves from the point s along a line at one of the possible angles ??. Rule 6: Real Axis Break-Out the gain Kis a (local) and Break-In Points. The root locus breaks out from the real axis where maximum on the real axis and breaks in to the real axis where Kis a (local) minimum. Tolocate candidate break points simply solve ?? d 1 G(s) ds where G(s) = N(s)/D(s), =0 or N(s) cross the imaginary Rule 8: ds - ds (8.55) D(s) = 0 and then find the value of K at the break point by K = Rule 7: Imaginary-Axis dN(s) dD(s) 1 |G(s)| Crossings. Usethe Routh stability test to determine values of Kfor whichloci axis. Angle of Departure from Poles or Angle of Arrival to Zeros. Assumes is at the vicinity of any LTF pole orzero, pz; then theangle ofdeparture fromortheangle ofarrival topz,?s( pz), can be computed from the following m equation: n G( s) = ??( s-zi)-??( s- pj) =(2?+1)p 0 =K<8 i=1 Remark 8.21 (Angle (8.56) j=1 of Departure and Arrival) The equation, Equation 8.56, employed to compute the angle of departure or arrival from the poles or to the zeros, is basically the same as the angle equation angle of departure (or arrival) in root locus analysis of Equation 8.53. In fact, the computation and design is one of the two important of the applications of the angle equation. Thetest points is assumedin the vicinity of pz, whichis a pole or zero of interest, but itsorientation ?( s- pz) isunknown. Since s and pizssoclose, they can beconsidere 266 8 virtually Stability, Regulation, the same point, and Root Locus as observed Design from the rest of the poles and zeros. Therefore in Equation 8.56, every s except theone in ?( s- pz)willbereplaced bypztosimplify thecomputation. Acouple of angle of departure (arrival) important application computations were illustrated of the angle equation in Example was demonstrated in 8.16 and Example Example 8.17. Another 8.20 to determine whether a given test points is on the root loci. 8.5 A Sinusoidal Position Tracking Control System In this section, steady-state a feedback sinusoidal controller position will be designed tracking for and a desired a DC transient motor system response. to achieve a perfect The dynamics model of the plant, whichis a DC motorsystem with geartrain and load, is given by 145.5 T(s) U(s) = (8.57) s(s+43.14) from Equation 5.68in Chapter 5. The reference input is ?R(t) = Asin(?0t +f) (8.58) wherethe frequency is ?0 = 10 rad/s, but the amplitude A and the phase f are arbitrary. The objective is to design a controller so that the closed-loopsystemis stable and the plant output ?(t), the angular displacement, willfollow the sinusoidal referenceinput ?R(t) as closely as possible. According to the internal model principle (Remark 8.4), the loop transfer function needsto havethe internal model1/(s2 +102)in it to matchthe reference sinusoidal function frequency ?0 = 10rad/s. Thus, the structure of the controller is chosen to be of the form, (s+c1)(s+c2) K s2 (8.59) +102 Notice thattwozeros, s = -c1ands = -c2,areadded tothecontroller in Figure 8.29,where c1 and c2 are positive real numbers to be determined in the design process. Thereis a practical reason for adding these two zeros to the loop transfer function. It can be explained from the root locus diagrams in Figure 8.30. Without adding the two zeros, the loop transfer function of the system would be 145.5 KG(s) = K s(s+43.14)(s2 +102) which gives fourpoles atp1=0,p2=j10,p3=-j10, andp4=-43.14, butnozeros. The root loci of the closed-loop characteristic equation 1+KG(s) = 0 are shown on the left graph of Figure 8.30. The fourbranches ofroot locibegin atthefourpole locations when K=0,and eventually, asK?8, they will approach the infinity locations defined by the four asymptotes, respectively. The angles of the four asymptotes and their common intersection ?0 = 4 p, point are ?1 = 3p 4, 4 , ?2 = 5p 4 = -3p ?3 =7p 4 = -p 4 s = 0+(j10)+(-j10)+(-43.14) 4 =-10.79 There is only one real root loci segment, which is between the two LTF poles p1 = 0 and p4 = -43.14. The twobranches starting fromp1=0andp4=-43.14 willmove toward each other andmeet atthebreak-out point s =-31.85, which isone otfheroots oftheequation, Equation 8.55 8.5 dD(s)/ds A Sinusoidal Position = 4s3 +129.42s2 +200s+4314 Tracking Control System 267 =0 After breakout, the two branches will become complex and movetowards the two asymptotes with angles 135? and-135?. The other two root loci branches will start at the two LTF poles on the imaginary axis, p2 = j10, p3= -j10,when K=0.AsKincreases, theroot lociwilldepart from these twopoles. The angle of departure computed based on Rule 8 or Equation 8.56 will reveal which direction the root loci move. The angle of departure from the pole p2 can be obtained from the following would equation: -(?(s- p1)+?( s- p2)+?( s- p3)+?( s- p4))=(2?+1)p ? -(?(p2 -p1)+?( s- p2)+?(p2 -p3)+?(p2 - p4))=(2?+1)p ? =(2?+1)p s- p2)+(p/2)+tan-1(10/43.14) ? -?(p/2)+?( ? -(?( s- p2)+13?) =0? ? ?( s- p2)=-13? Fig. 8.29: Fig. 8.30: Root locus Hence, the root loci diagrams A sinusoidal explaining will depart from position tracking control system. why the two zeros are added to the controller p2into the right half of the complex plane structure. with the departure angle ?( s - p2)= -13?. Then thisbranch ofroot lociwillcontinue to move intherighthalfplane towardsthe asymptote withangle ?0 = 45?. The branchoriginating from p3 will also moveinto the right halfplane with departure angle ?( s-p3)=13? and then approach theasymptote with angle ?3=-45? 268 8 Stability, These two value. branches Regulation, and Root Locus Design will never come to the left Therefore, the controller half of the complex plane by changing the K > 0 gain structure 1 K s2 +102 does not work since the closed-loop system is not stable for any value of K> 0. Next, wewill investigate if adding azero s =-10 tothecontroller would help. Byadding thiszero, function will become the loop transfer 145.5(s+10) KG(s) = K s(s+43.14)(s2 +102) which stillkeeps thesame fourpoles atp1=0,p2=j10,p3=-j10,p4= -43.14. The root loci of the closed-loop characteristic equation 1+KG(s) = 0 are shown on the right graph of Figure 8.30. The fourbranches ofroot locibegin atthefourLTF pole locations when K=0,and asK?8, thebranch originating fromp1=0 willarrive attheLTF zero, z1=-10,while theother three branches will movetowards the infinity locations defined by the three asymptotes, respectively. The angles of the three asymptotes and their common intersection point are ?0 = 3, p ?1 = p, ?2 = 5p 3 = -p 3 s = -(-10)+0+(j10)+(-j10)+(-43.14) 3 There are two real root loci segments; one starts from =-11.05 p1 = 0 moving toward the left and ends up at z1=-10when K=8,and theother starts fromp4=-43.14 moving totheleftonthenegative real axis, whichis the asymptote withangle ?1 = p. The other two root loci branches will start at the two LTF poles on the imaginary axis, p2 = j10, p3= -j10,when K=0.AsKincreases, theroot lociwilldepart from these twopoles. The angle of departure computed based on Rule 8 or Equation 8.56 will reveal which direction the root loci move. The angle of departure from the pole p2 can be obtained from the following equation: would ?( s-z1)-(?(s- p1)+?( s- p2)+?( s- p3)+?( s- p4))=(2?+1)p ? ?(p2 -z1)-(?(p2 -p1)+?( s- p2)+?(p2 - p3)+?(p2 -p4))=(2?+1)p ? =(2?+1)p s- p2)+(p/2)+tan-1(10/43.14) ? (p/4)-?(p/2)+?( ? 45? -(?( s- p2)+13?) =0? ? ?( s- p2)=32? Hence,the root loci will depart from p2into the right half of the complex plane with the departure angle ?( s-p2)=32?. Then thisbranch ofroot lociwillcontinue to move intheright halfplane towards the asymptotewithangle?0 = 60?.Thebranchoriginatingfrom p3 will also moveinto the right half plane with departure angle ?( s- p3)=-32? and then approach theasymptote with angle ?2=-60?. These two value or by branches will never come to the left half of the complex moving the added zero z1to anywhere Therefore, the controller plane by changing the K > 0 gain on the real axis. structure K s+c s2 +102 still does not work since the closed-loop system is not stable for any value of K > 0 and any value ofc. Nevertheless, byadding thetwozeros, s =-c1and s =-c2, tothecontroller, asshown in Equation 8.59, and with the zero locations carefully selected, the angles of departure from th 8.5 poles on the imaginary axis can be the complex plane. Furthermore, the basic root locus consideration managed so that Position the root loci Tracking Control will depart into System 269 the left half of the asymptotes can also be confined in the left half plane. and the sinusoidal is selected so that the loop transfer A Sinusoidal function tracking objective in mind, the controller With structure is 145.5(s+1)(s+2) KG(s) = K s(s+43.14)(s2 +102) (8.60) which stillhas fourLTFpoles atp1=0,p2=j10,p3= -j10,andp4=-43.14, butwith two added LTFzeros atz1=-1andz1= -2.The rootlocioftheclosed-loop characteristic equa-tion 1+KG(s) = 0 are shown on Figure 8.31. The graph on the left of the figure shows the entire root loci diagram, but around the origin area two zeros and one pole are crowded together. The graph on the right provides an expansion Fig. 8.31: view of the area close to the imaginary Root locus There are two real root loci design for sinusoidal segments axis and the origin. position tracking on the real axis. One starts from control system. p1 = 0, moving to the left, and ends atz1= -1,andanother starts fromp4= -43.14, moving toward theright,and terminates atz2=-2.Theother twobranches ofrootlocibegin attheimaginary pole locations p2=j10and p3= -j10when K=0,andasK ? 8,theywillapproach theinfinity locations defined bythetwo asymptotes, respectively. The angles of the two asymptotes andtheir common intersection point are ?0 = p 2, ?1 = -p 2 (8.61) s = -[(-1)+(-2)]+[0+( j10)+(-j10)+(-43.14)] 4-2 Notice that the two asymptotes completely reside in the left =-20.07 half of the complex plane. It is mainly theresult ofadding thetwoLTF zeros, z =-1and z =-2,tothecontroller structure. The addition of the two zeros also affects the angle of departure in a big wayfrom the following of the angle of departure from p2 = j10: computation ?( s-z1)+?( s-z2)-(?(s- p1)+?( s- p2)+?( s- p3)+?( s- p4))=(2?+1)p ? ?(p2 -z1)+?(p2 -z2)-(?(p2 -p1)+?( s- p2)+?(p2 -p3)+?(p2 -p4))=(2?+1)p ?(p/2)+?( ? =(2?+1)p s- p2)+(p/2)+tan-1(10/43.14) ? tan-1(10/1)+tan-1(10/2)- ? 84.29? +78.69? -(?( s- p2)+13?) =0? ? ?( s- p2)=150? (8.62 270 8 Stability, Regulation, Hence, the root loci and Root Locus will depart from Design p2 into the left half of the complex plane with the departure angle ?( s-p2)=150?. This branch ofroot lociwillcontinue to move inthe lefthalfplane toward theasymp-tote withangle?0 =90?.Similarly,the branchoriginatingfrom p3 willalso move intothe left half plane with departure angle ?( s- p3)=-150? and then approach totheasymptote with angle ?1=-90?. Notice thatfromEquation 8.62, adding thetwozeros, s =-1and s =-2,totheloop transfer function has changed theangle ofdeparture ?( s- p2) from-13? to150? due totheirrespective 84.29?and 78.69?angleshift contributions. The two graphs in Figure 8.31 are obtained from the same root locus plot generated following MATLAB code: % CSD Fig8.31 Use s=tf('s'); rlocus(G,K) for sinusoidal Gp=145.5/(s*(s+43.14)); G=Gp*Gr, figure (6), tracking using the control Gr=(s+1)*(s+2)/(s2+100), K=logspace(-3,1.5,500); rlocus(G,K) Onthe root loci diagram, the black square cursor is movedto the position where the complex conjugate poles areat -13.5j14.7with thegainK=5.06. Atthese pole locations, thecorre-sponding damping ratio and the natural frequency are ? = 0.676 and ?n = 19.9 rad/s. By executing the MATLABs command [K,Poles]=rlofind(G), a new cursor consisting ofa long horizontal line and along vertical line appear to hover over the entire Root Locus window. Bypositioning thecursor, theintersection ofthese twolong lines, atthepoint-13.5+ j14.7ontheloci marked by the previous black square cursor, the value of the gain K and all associated closed-loop poles are identified, as shown in the following: % >> CSD Fig8.31 Use rlocfind to locate all poles [K,Poles]=rlocfind(G) Select a point selected_point K = in the = -1.3438e+01 graphics window + 1.4709e+01i 5.0642e+00 Poles = -1.3475e+01 + 1.4671e+01i -1.3475e+01 - 1.4671e+01i -1.5958e+01 + 0.0000e+00i -2.3273e-01 + 0.0000e+00i It also can be seenthat a red cross sign appears on each branch of the loci at the identified pole location. TheMATLAB simulation program, CSDfig8p32sinu.m, is built based on the block diagram of the feedback control system shown in Figure 8.29. This simulation demonstrates the effective-ness of the the sinusoidal position tracking controller 5.06(s+1)(s+2) s2 +102 as shown in Figure 8.32. The MATLAB program is shown in the following. % CSDfig8p32sinu.m 5/08/2020 Sinu Tracking Example Gm=145.5/(s*(s+43.14)) % Design A: Gk=5.06*(s+1)*(s+2)/(s2+100) % Design B: Gk=3.95*tf(1,1) %% System s=tf('s'); r=sin(10*t) Gm = 145.5/(s*(s+43.14)); t=linspace(0,2,201); 8.6 %% Design A step Controller Design for F/A18 Flight Path Control 271 response Gk=5.06*(s+1)*(s+2)/(s2+100); GY=(Gk*Gm)/(1+Gk*Gm); GU=Gk/(1+Gk*Gm); [y,t]=lsim(GY,r,t); [u,t]=lsim(GU,r,t); run('plot2a') %% Design B step response Gk=3.95*tf(1,1); GY=(Gk*Gm)/(1+Gk*Gm); [y,t]=lsim(GY,r,t); where the plotting GU=Gk/(1+Gk*Gm); [u,t]=lsim(GU,r,t); programs plot2a.m run('plot2b') and plot2b.m are the same as those given at the end of Sec-tion 8.3.2. It can be seenthat the blue ?(t) catches up and coincides with the sinusoidal reference input, the green ?R(t), within 0.25seconds. In contrast,the proportional controller with gain K = 3.95is unable to track the sinusoidal reference input, although it is a Type 1 controller capable of perfect step referencetracking.Thered ?(t) continuesto lag behindatsteadystate. Fig. 8.32: Simulation results 8.6 Controller Design for F/A18 The F/A18 flight aircraft dynamics of the sinusoidal position tracking control system. Flight Path Control model [Buttrill et al., 1992, Chakraborty et al., 2011, Chang et al., 2016] will be employed as a test bed in the following flight path control system designs. The lateral subsystem is setto fly straight without any roll or yaw motion; hence, we will only focus onthe control of the longitudinal subsystem. Thelongitudinal state vector is x= [V a q ?]T, whereV, a, q, and ? arethe air speed, the angle of attack, the pitch rate, andthe pitch angle, respectively. Thelongitudinal control-input vectoris u =[de dT]T,wheredeand dTarethe elevatorcontrolandthrustcontrol,respectively. Assumethe nominal flight trim; here, atrim is a desired equilibrium, chosen to be x*=[436 ft/s 10?0?/s10?]T, u*=[-1.26? 5470.5 lbf]T whichis a level flight (8.63) with 10?angle of attack. Atthis trim, alocal linearized model[Chan et al., Dec. 2019] can be obtained as follows 272 8 Stability, Regulation, and Root Locus x?(t) = x(t)+B A u(t), Design where ? ?-0.051450 ? A=? 0 -2.212-0.25320 ?,B=?-2.8791 0 ? ?-0.00033-0.362 1 -0.02389 -28.32 0 0 ? ? ? ? ? ? ? 0 Notethat x =x+x* -3.8114 0.000952 -32.2 ? 0 and u =u+u* 1 0 0 (8.64 0 since(x,u) arethe differentialvalues,orthe perturbedvaluesof (x,u) from the trim (x*,u*). In other words,the origin of the (x, u) coordinate is (x*,u*) while the origin of the (x,u) coordinate is (0,0). For example, the differential air speedV = 44ft/s meansthat the real air speedis V =V+436ft/s For the flight = 480ft/s. path control problem to be considered in this section, the variable to be regulated is the flight path angle ?=? -aand thecontrol input isde,while thethrust dTisfixed atthe trimmed value 5,470.5 lbf all the time. Therefore, the local linear state-space model with input de and output? x?(t)=A x(t)+Be de(t)=A x(t)+[-3.8114 -0.05145 -2.8791 0]T de(t) ?(t) =C x(t) =[0 -10 1] x(t) will be (8.65) wherethe A matrix remains the same asthat in Equation 8.64, Beis the first column vector of the matrix de BinEquation 8.64, andC=[0 -101].Italso can beseen that trim givenby Equation 8.63,d* e =de +1.26?and?= ?sinceatthe = -1.26? and ?*iszero. The plant transfer function from theelevator aircraft at the nominal trim, given by control input de to the flight path angle output ? of the F/A18 Equation 8.63is Gp(s) = G(s) ? e(s) = 0.051453(s+4.3935) (s-4.1059) (s-0.03491) (s2 +0.6189s+2.286)(s2 +0.02027s+0.01026) (8.66) The plant hastwo pairs of complex conjugate poles, p1 p2 p3 =-0.010133 j0.10077 :=-aL j?L and p4 =-0.30945 j1.4799 :=-aS j?S (8.67) Notice that the first pair of poles, p1 and p2, has a small damping factor aL = 0.010133 and a low frequency ?L =0.10077 rad/s, and the other p3 and p4 pair has arelatively larger damping factor, 0.3095, and a higher frequency, ?S = 1.48 rad/s. In traditional aircraft parlance, this lower frequency behavior is referred to asthe long-period modeor phugoid mode,since the period is TL = 2p/?L = 2p/0.1008 = 62.4 s. Onthe other hand, the higher frequency behavior is referred to asthe short-period modesince the short period is TS = 2p/?S = 2p/1.48 = 4.25 s. The subscripts L and Sstand for long period and short period, respectively. The damping ratio ? andthe natural frequency ?n, associated with the long-period and short-period modes, can be obtained using Equation 3.60, respectively long-period mode: ? = 0.1, short-period mode: ? = 0.205, as follows: ?n = 0.101rad/s ?n = 1.51rad/s (8.68) The performance of the uncompensated system is very poor since the damping ratio ? = 0.1 and the natural frequency ?n = 0.101 rad/s of the dominant Phugoid modeare so small that it would cause un-acceptably long and large up and down oscillations The plant also has three real zeros, and two in longitudinal of them motion. are in the right half of the s-plane, z1=-4.3935, z2=0.034907, andz3=4.1059 so the system is a nonminimum phase system. (8.69) 8.6 Controller Design for F/A18 Flight Path Control 273 The computational results relevant to the F/A18 subsystem from the elevator control input deto the flight path angle output ?=a-?areobtained byrunning thefollowing MATLAB program: % CSD_eq8p66 A =[ F/A-18 Ele -2.3893e-02 to Gamma -3.2923e-04 -3.6208e-01 4.0491e-11 =[ -3.8114e+00 0; 0; 1.0000e+00 0]; 0; B(:,1); = Zeros -3.8506e-07; 0 G_ge Poles -3.2200e+01; 9.5196e-04; -2.8791e+00 = tf 0 -2.5319e-01 0 -5.1453e-02 b model 1.0000e+00 -2.2115e+00 0 B ss -2.8317e+01 c = 0]; [0 -1 ss(A,b,c,d), 0 1]; d zpk(G_ge), = 0; eig(A), damp(A) [Z,Kz]=zero(G_ge), P=pole(G_ge) In the following, two controller structures will be considered to work together with the root lo-cus design approach in designing a feedback controller to achieve closed-loop stability, steady-state tracking, and desired transient performance feedback controller are the controller structures for the F/A18 PI (proportional aircraft flight and integral path control controller, problem. The two and the state-feedback withintegrator. Before getting into the controller design, we will first analyze the open-loop system and observe how the elevator control input de will affect the longitudinal state variables V, a, ?, andthe flight path angle ?=? -a. 8.6.1 Open-Loop ManualLongitudinal Flight Controlof F/A18 by de As described in Equations 8.67 and 8.68, the longitudinal flight dynamics have two pair of complex con-jugate polesone associated with the long-period (phugoid) modeandthe other with the short-period mode. The damping ratios and damping factors of both modes are poor, which implies large over-shoot and long oscillation periods, especially for the long-period mode dynamics. Furthermore, the nonminimum-phase zerosthe zeros in the RHP, as shown in Equation will causethe system response to go to the opposite direction, initially, direction. controlling The analysis and simulation an uncompensated An open-loop aircraft manual control flight simulation to be conducted 8.69are can be implemented since they before reversing back to the in-tended in the following system is quite a challenging not helpful will reveal that manually job. based on the block diagram shown in Figure 8.33. The relationship among the real control input u,the control input trim u*, andthe differential control input u is described by the following: ?d?e ?? ?? u =u-u*, where u = dT , d* e u* = d* T , de dT u = (8.70) Similarly, the real state vector x, the state vector trim x*, and the differential state vectorx arerelated by the following equation, x =x+x*, where x = ?? ?? ?? *?? ??,x=??,x= V V a ? ? q ? V* a ? ? ? ? q ? a* ? ? ? ? ? q* ?* ? (8.71 274 8 Stability, Regulation, Fig. 8.33: and Root Locus Design Open-loop longitudinal In this simulation, the initial manual control block diagram for F/A18. condition is at the trim x(0)=x*=[436 ft/s 10?0?/s10?]T, u(0)=u*=[-1.26? 5470.5 lbf]T and theelevator input de(t) isassumed tohave a2?jump from-1.26? to0.74? att =0(i.e., d e(t) = 2?us(t), whilethe thrust input continues to stay at de(t)=2?us(t) -1.26?) orequivalently dT(t) = 5470.5lbf throughout the simulation. The main objective of the 2?jump of the elevator input is to increase the flight path angle ?=? -aviathechanges ofthepitch angle ?and theangle ofattack a.However, theaction of the elevator will affect all the longitudinal transfer function state variables including the air speed V. In addition to the ? e(s)to theflight pathangleG(s), whichhasbeengivenin Equation from the elevator 8.66,the transfer functions from the elevator? e(s) to the pitch angleT (s), the angleof attackA (s), and the air speedV (s), respectively,canalsobe derivedfrom the state-spacemodelof Equations8.64and 8.65 as follows. T (s) ? e(s) = A (s) ? e(s) = -2.8791(s-0.001872)(s+0.34832) (s2 +0.6189s+2.286)(s2 -0.051453(s+56.185)(s2 +0.02361s+0.01056) (s2 V (s) ? e(s) = +0.6189s+2.286)(s2 +0.02027s+0.01026) (8.72b) -3.8114(s+6.6232)(s+0.18029)(s-6.5705)(8.72c) (s2 +0.6189s+2.286)(s2 The poles of the four transfer They are the two (8.72a) +0.02027s+0.01026) pairs of complex functions in conjugate Equations +0.02027s+0.01026) 8.72a, 8.72b, poles shown in Equation 8.72c, and 8.66 are identical. 8.67one pair associates with the long-period dynamics modeand the other with the short-period mode. However, the zeros of these four transfer functions are quite different. We will seethat the time-domain responses of the longitudinal flight dynamics systems The open-loop are mainly determined manual elevator control by the poles and zeros of these transfer step response simulation results functions. are shown in Figure 8.34. The upper-right graph shows that the real elevator control input applied to the aircraft is de(t) = de(t) = 2?us(t) to the input of the linearized state-? -1.26? +2?us(t), which isequivalent toapplying space modelshown in Figure 8.33. The output of the linearized x(t) = V (t) a (t) q(t) ? (t) modelis ?T Note thattherealangleofattackresponse,a(t) =a(t)+10?, andtherealpitchangleresponse, ?(t) = ? (t) + 10?,respectively, are recorded on the upper-right and the bottom-left graphs. The upper-lef 8.6 Controller Design for F/A18 Flight Path Control 275 graph shows thestep response ofthe flight path angle ?(t)=?(t)-a(t)=?(t)-a(t),while the real airspeedV(t) =V(t)+436 Steady-State Response ft/s is recordedonthe bottomright graph. Analysis The simulation shows that the values ofV, a , ? , and ? at t = 1000 s are ? (1000) V(1000) =480.5 ft/s,a(1000) =-2.60?, = 0.16?, ?(1000) = 2.76? (8.73) At the end of the 1,000-second simulation, all the state variable values seem to have reached their steady state. The steady-state the final-value theorem values or the final (Theorem 2.27). values can also be obtained in frequency The theorem and the transfer functions in domain Equations using 8.72a, 8.72b,8.72c, and 8.66are employedto obtainthe steady-statevaluesofV, a , ? , and? in the following. 2? p -3.8114(s+6.6232)(s+0.18029)(s-6.5705) 180?= 44.5ft/s V (8) =lim V(s) s =lims s?0 (s2 +0.619s+2.286)(s2 s?0 a (8) ? (8) =lim sA(s) =lim sT(s) =lim s s?0 (8.74a) -0.051453(s+56.19)(s2 +0.02361s+0.01056) s?0 (s2 +0.619s+2.286)(s2 =lim sG(s) +0.02027s+0.01026) s =-2.60?(8.74b) 2? -2.8791(s-0.001872)(s+0.34832) = 0.16? (8.74c) 2? 0.051453(s+4.3935) (s-4.1059) (s-0.03491) = 2.76? (8.74d s?0 (s2 +0.619s+2.286)(s2 =lim s s 2? s?0 s?0 ?(8) =lim s +0.02027s+0.01026) +0.02027s+0.01026) s?0 (s2 +0.619s+2.286)(s2 +0.02027s+0.01026) s s Notethat the steady-state real air speed is V(8) =V(8)+436 Hence, the simulation values in Equation Remark steady-state ft/s responses 8.74 obtained by final-value 8.22 (Control of the The control of the flight Flight Path = (44.5+436) ft/s shown in Equation = 480.5ft/s 8.73 match perfectly with the final theorem. Angle) path angle ? is achieved via the changes of the pitch angle ? and the angle of attack a. Fromthe simulation resultsin Figure 8.34,it is observedthat a 2?increase of the elevator control input de has causedthe angle of attack to go downfrom a = 0?to a =-2.60? at steady state, but it has very little effect on the steady-state response of the pitch angle with final theflight pathanglewill goupto value, which slightly moves up from ? = 0?to ? = 0.16?.Thus, ?= ?- a =0.16?-(2.60?) =2.76?. On theother hand, you can conduct asimilar simulation using the thrust control dT asthe input and you will observethat the increase of the thrust will causethe pitch angle ? andtheflight pathangle?to goupatsteadystate withoutmuch effectonthesteady-state value of the angle of attack. Transient Response Analysis Recall that longitudinal dynamics has two pairs of complex conjugate poles as shown in Equation 8.67. The pair-aL j?L isassociated with the long-period dynamics mode, and theother, -aSj?S,with mode. Since the damping factor aSis about 30 times large than aL, the short-period the short-period 276 8 Stability, Regulation, mode will decay and Root Locus much faster Design than the long-period mode. Therefore, under normal circumstances the long-period modewill bethe dominant one. Asshown in Figure 8.34,the step responsesof ?(t), ? (t), and V(t) oscillate with the samelong period TL = 2p/?L = 62.4 s. Theoscillation period of ?(t) can bemeasured from theduration between thefirstand thesecond peaks asT?=105-42=63s,which agrees with TL. The amplitude of oscillation is large dueto the small damping ratio ? = 0.1. Theselong-period step responses take morethan 500 seconds to converge to their steady-state values. Fig. 8.34: Open-loop longitudinal manual control step responses of F/A18 due to the elevator input de(t)=-1.26? +2?us(t). The open-loop longitudinal manual control step responses of F/A18 due to the elevator input de(t)=-1.26? +2?us(t) areobtained byrunning thefollowing MATLAB program: %% CSDfig8p34.m 5/09/2020 d2r=pi/180; A =[ Intro -2.3893e-02 -2.8317e+01 -3.2923e-04 -3.6208e-01 4.0491e-11 =[ -3.8114e+00 0 0] 0; -1 0]; 0 1]; G_te=ss(A,b,c_theta,d); [1 0; 1.0000e+00 -3.8506e-07; c=[0 display('G_ge'), 0; 9.5196e-04; 0 b=B(:,1); -3.2200e+01; -2.5319e-01 0 -2.8791e+00 = Example 1.0000e+00 -2.2115e+00 -5.1453e-02 c_V Loci 0 0 B Root r2d=180/pi; d=0; G_ge=ss(A,b,c,d); c_alpha=[0 0 0]; G_Ve = zpk(G_ge), 1 0 0]; c_theta=[0 G_ae=ss(A,b,c_alpha,d); ss(A,b,c_V,d); display('G_te'), zpk(G_te), 0 0 1]; 8.6 display('G_ae'), %% Step zpk(G_ae), Controller Design for display('G_Ve'), F/A18 Flight Path Control 277 zpk(G_Ve), responses t=linspace(0,500,5001); [gamma,t]=step(G_ge,t); [theta,t]=step(G_te,t); [alpha,t]=step(G_ae,t); [v,t]=step(G_Ve,t); [u,t]=step(tf(1,1),t); Alpha=alpha*2+10; Gamma=gamma*2; Ele=u*2-1.26; V=v*2*d2r+436; Theta=theta*2+10; run('plot22A') where plot22A.m %filename: is given in the following: plot22A.m ts=t(1:501); grid figure(4), minor, subplot(2,2,1), title('Gamma'), plot(t,Gamma,'b-'), plot(ts,Ele(1:501),'r-',ts,Alpha(1:501),'b-'), grid title('Elevator,AoA'), subplot(2,2,3), grid minor, title('Pitch') grid minor, title('Speed grid on, subplot(2,2,2), on, grid minor, plot(t,Theta,'b-'), subplot(2,2,4), plot(t,V,'b-'), grid on, grid on, V') One maywonder whythe angleof attack step responsea (t) is not dominatedby the long-period mode.It is becausethe angleof attacktransfer function A (s)/?e(s) hasone pair of com-plex conjugate zeros that are almost identical to the long-period poles. The effect of the long-period mode poles is greatly reduced by these nearby zeros. Hence,the a (t) step responseis dominated bythe short-period mode,with muchhigher oscillationfrequency. Theoscillationperiodofa (t) can be roughly measured by the time duration between the second and the third which agrees with the oscillation period computed based on ?S, TS = 2p/?S peaks as Ta = 4.5 s, = 4.25 s. It is also observed that the initial movementsof ?(t) and?(t) werein the opposite direction of the intended motion. Both?(t) and? (t) movedownin the first 10 secondsbeforereversing up to slowly converge toward the steady-state values. These phenomena are caused by the RHP zeros of their respectivetransferfunctionsG(s)/ ?e(s) andT (s)/ ?e(s). Theangleof attacktransferfunctionA (s)/?e(s) hasno RHPzeros;hence, it doesnothavethe initial opposite movement issue. The air speed transfer function However, not all V (s)/ ?e(s) RHP zero, will lead to an initial opposite hasa RHPzero ats = 6.5705, butits initial movement. movementis in the intended up direction; apparently it has no initial opposite movement. This RHP zero does not cause any initial opposite movement issue due to its large distance from the imaginary axis. Remark 8.23 (Poor Transient Performance The uncompensated longitudinal of the Uncompensated dynamics is sensitive Longitudinal and susceptible to Dynamics) disturbances and control actions. Dueto the extremely small damping factor, poor damping ratio, long oscillation period, and the initial very difficult, opposite if movement caused by the not impossible, 8.6.2 PI Controller Designfor to manually F/A18 RHP zeros that control the aircraft are close to the imaginary without a feedback axis, it is compensator. Flight Path Control The block diagram of the feedback PI control system is shown in Figure 8.35, wherethe state-space model (A,Be,C)was given in Equations 8.64and8.65,andthetransfer function from deto ?, Gp(s) =G(s)/ ?e(s)=C(sI-A)-1Be was given in Equation 8.66 278 8 Stability, Regulation, The loop transfer and Root Locus function KG(s) = K Design of the PI feedback control system shown in Figure 8.35 is 0.051453(s+4.3935) (s-4.1059) (s-0.03491) (s+1) s(s2 +0.6189s+2.286)(s2 +0.02027s+0.01026) (8.75) Note thatthePIcontroller has added one pole, p5=0,and one zero, z4=-1,totheloop transfer function KG(s). Hence,the closed-loop characteristic equation is 1+KG(s) = 0 and the root loci diagram of the closed-loop system is shown in Figure 8.36. The upper-left graph of the figure shows a morecomplete root loci diagram, but the part of root loci involving p1, p2, p5, and z2 are crowded together around the origin area and only can be seen in the upper-right graph with expanded view. Fig. 8.35: PI controller for F/A18 flight path angle control problem. The objective is to find a best gain value of Kto achieve closed-loop system stability, zero or small steady-state error, and an optimal transient response subject to the control-input constraints. When K = 0, all the roots (poles) are at p1, p2, p3, p4, and p5. As K increases from K = 0, the root loci branch originating fromp5=0willmove ontherealaxis toward theleftand reach atz4=-1when K ?8.Meanwhile, thetwobranches originating from theshort-period poles p3=-0.3095+ j1.48 and p4=-0.3095j1.48willmove totheleftand bend toward therealaxis andmeet atthebreak-in point s =-8.08 when K=251, then split intotwobranches, both ontherealaxisone toward theright tothezero z1=-4.3935 and theother toward theinfinity onthenegative realaxis, which istheonly one asymptote of this root loci diagram. The lasttwobranches start from thelong-period poles p1=-0.010133 +j0.10077 andp2= -0.010133j0.10077. AsKincreases, thetwobranches willmove totherightand intersect theimag-inary axis at j0.0828, when K=0.00856. After crossing totheright halfplane, thetwobranches will continue to bend toward the real axis and meet at s = 0.0811 when K = 0.0758. Then, as K continues to increase, the two branches now are both on the real axisone moving toward the right to the zero z3 = 4.1059, and another toward the left to the zero z2 = 0.034907. The four graphs on Figure 8.36 are obtained from the same root locus plot generated using the following MATLAB % CSDfig8p36 Ki=1, code: Use s=tf('s'); rlocus(G,K) for F/A-18 PI Np=0.051453*(s+4.3935)*(s-4.1059)*(s-0.03491); Dp=(s2+0.6189*s+2.286)*(s2+0.02027*s+0.01026); Gp=Np/Dp; figure(10), Gc=(s+Ki)/s; K=logspace(-3,3,1000); G=Gc*Gp; rlocus(G,K control 8.6 Controller Design for F/A18 Flight Path Control 279 Fig. 8.36: Rootlocus design of the PI controller for F/A18 flight path control problem. From the root loci diagram, we can observe how the gain K will affect the root locations onthe five branches, and the closed-loop system We will see some of the root locations behavior are will be determined more dominant system poles that are closer to the imaginary mainly by these five root locations. than the others. In general, the closed-loop axis are the dominant ones. To choose the right value of the gain K,the first step is to find the range of Kthat will guarantee the stability of the closed-loop system. The stability range of Kis 0 < K < 0.00856 since the two branches originating from p1 and p2 will cross the imaginary axis entering into the right half s-plane if K > 0.00856 and the root before entering the real branch between p5 and z4 wasin the right half of s-plane when K< 0. In the following, we will choose two K= 0.004 in the lower-right pole locations and time-domain K values, K = 0.002 as shown in the lower-left graph, and graph of Figure 8.36, and compare their corresponding closed-loop system performances. Root Locus Design with K = 0.002 If Kis selected as K = 0.002, the five closed-loop system poles are s1 s3 s5=-0.003 =-a5,s2 =-0.00833 j0.0967 :=-a1 j?1, s4 =-0.31j1.48 :=-a3 j?3 (8.76) and their associated time constant and damping ratio, natural frequency are obtained as follows 280 8 Stability, s5: Regulation, t5 = 1/a5 and Root Locus Design = 333s s1, s2: t1 = 1/a1 = 120s, ? = 0.086, ?n = 0.097ad/s, s3, s4: t3 = 1/a3 = 3.23s, ?n = 1.51rad/s, ? = 0.205, o.s. = 76.3% o.s. = 51.8% Notethatthe dampingfactor a3is 103times and37times,respectively, largerthan a5and a1;there-fore, the effect of the poles at s3 and s4 will decay much earlier and become irrelevant. Comparably, since the damping factor a1is only 2.8 times larger than a5,it has slight influence at the early time to cause some oscillations on, the dominant that will die out exponentially with time pole s5 will be the only one left to dictate the time constant response. 120 s. From then The dominant pole s5=-0.003 isreal,with large timeconstant 333 s;hence, it causes slow response butcontributes no oscillations, as shown in the graphs of Figure 8.37. Fig. 8.37: Simulation results of F/A18 A MATLAB simulation program aircraft using PI controller and root locus design. is created based on the PI feedback control system shown in Figure 8.35, andthe flight path angle commandis assumedto be a 2? step function. The graphsof Figure 8.37 show two simulation results: one with K = 0.002 in blue, and the other with K = 0.004 in red. Thegraph onthe upperleft shows the two flight pathangle responses?(t) dueto the reference input?R(t) =2?us(t)for bothK =0.002and K =0.004,respectively. Theupper-right graphreveals the control-input efforts de(t) dictated by the feedback controller. The angle of attackresponses a(t) are also shown in this graph. The pitch angle ?(t) andthe air speed V(t) responsesareshown in the lower-left and the lower-right graphs, respectively. Fromthe bluestepresponses?(t) and ?(t), shown onthe upper-left andlower-left graphsof Figure 8.37, it is observed that the step response rises extremely slowly as an exponential-like curve with time constant close to t5 = 333 s. It also can be seenthat the small oscillations in the first 300 s are contributed by the pair of complex conjugate poles at s1 and s2. The period of the oscillations can be approximately measured from thepeak-to-peak time otfhe?(t)plot asTpp =192s-127s =65s, whic 8.6 Controller Design for F/A18 Flight Path Control 281 closely matches the periodcomputed basedonthe frequency ?1 =0.0967rad/s: T1 =2p/0.0967=65 s. The pair of complex conjugate poles at s3 and s4 virtually The design with the PI feedback control open-loop manual control. have no visible effect on the step re-sponse. with K = 0.002 has shown great improvement However, the flight path angle rises very slowly, and over the only reaches 95% of its target value 2? after 1000s oftime. The responsetime can beimproved if the pole s5 on the lower-left graph of Figure 8.36 can be movedto the left. pole s5 to the left, the should poles s1 and s2 will not be moved too s2 become dominant The four graphs of the simulation CSDfig8p37Step.m results 5/09/2020 d2r=pi/180; A =[ of the -2.3893e-02 -2.8317e+01 -3.2923e-04 -3.6208e-01 PI flight Root Loci Example b=B(:,1); c=[0 [1 0 K=0.002, 0; 0; 1.0000e+00 0] 0]; -1 0 1]; G_te=ss(A,b,c_theta,d); Design -3.2200e+01; 0; 0 d=0; G_ge=ss(A,b,c,d); c_alpha=[0 0 0]; A G_Ve with = 1 0 ss(A,b,c_V,d); c_theta=[0 0]; Gc=tf([1 1],[1 Del=1+K*Gc*(G_ge); G_gR=K*Gc*G_ge/Del; G_VR=K*Gc*G_Ve/Del; G_eR=K*Gc/Del; zpk(G_gR), display('G_tR'), zpk(G_tR), zpk(G_aR), display('G_VR'), zpk(G_VR), display('G_eR'), zpk(G_eR), responses t=linspace(0,1000,10001); [gamma,t]=step(G_gR,t); [theta,t]=step(G_tR,t); [alpha,t]=step(G_aR,t); [u,t]=step(G_eR,t); Gamma=gamma*2; V=v*2*d2r+436; Design Theta=theta*2+10; B K=0.004, with [v,t]=step(G_VR,t); Alpha=alpha*2+10; Ele=u*2-1.26; run('plot22a') K=0.004 Del=1+K*Gc*(G_ge); G_tR=K*Gc*G_te/Del; G_gR=K*Gc*G_ge/Del; G_VR=K*Gc*G_Ve/Del; G_eR=K*Gc/Del; G_aR=K*Gc*G_ae/Del display('G_gR'), zpk(G_gR), display('G_tR'), zpk(G_tR), display('G_aR'), zpk(G_aR), display('G_VR'), zpk(G_VR), display('G_eR'), zpk(G_eR), responses t=linspace(0,1000,10001); [gamma,t]=step(G_gR,t); [theta,t]=step(G_tR,t); [alpha,t]=step(G_aR,t); [u,t]=step(G_eR,t); Gamma=gamma*2; V=v*2*d2r+436; Theta=theta*2+10; where plot22a.m %filename: figure(4), 1]; G_aR=K*Gc*G_ae/Del display('G_aR'), % Step 0 0]); display('G_gR'), %% 0 G_ae=ss(A,b,c_alpha,d); K=0.002 G_tR=K*Gc*G_te/Del; % Step of F/A18 -3.8506e-07; -2.8791e+00 = poles. If s1 and 9.5196e-04; -5.1453e-02 %% path angle control -2.5319e-01 0 -3.8114e+00 c_V dominant MATLAB program: 0 -2.2115e+00 [v,t]=step(G_VR,t); Alpha=alpha*2+10; Ele=u*2-1.26; run('plot22b') is given below, and plot22b.m is a copy of it with b replaced by r. plot22a.m subplot(2,2,1), plot(t,Gamma,'b-'), movethe will be oscillatory. 1.0000e+00 0 =[ Intro becoming K to Hence, the pole s5 r2d=180/pi; 4.0491e-11 B at the same time. much to the left to prevent s1 and s2 from poles, the associated time response Figure 8.37 are obtained from using the following %% However, as weincrease move to the right grid on, title('Gamma'), ahown on 282 8 Stability, Regulation, and Root Locus Design hold on, subplot(2,2,2), plot(t,Ele,'b-'), hold on, subplot(2,2,3), plot(t,Theta,'b-',t,Alpha,'b--'), title('Pitch,AoA'), hold title('Speed V'), Root Locus If Design on, hold grid on, title('Elevator,AoA'), grid subplot(2,2,4), plot(t,V,'b-'), on, grid on, on with K = 0.004 Kis selected to be K = 0.004, the five closed-loop system poles are s1 s3 s5=-0.00661 =-a5,s2 =-0.00623 j0.0925 :=-a1 j?1, s4 =-0.31j1.48 :=-a3 j?3 (8.77) and their associated time s5: constant and damping ratio, natural frequency are obtained as follows: t5 = 1/a5 = 151s s1, s2: t1 = 1/a1 = 160s, ? = 0.0672, ?n = 0.0927rad/s, s3, s4: t3 = 1/a3 = 3.23s, ?n = 1.51rad/s, By increasing Kfrom ? = 0.205, 0.002 to 0.004, the real branch pole s5 has slightly o.s. = 80.9% o.s. = 51.8% moved to the left to change the dampingfactor a5from 0.003to 0.00661, whichleadsto the reduction of the time constantt from 333 s to 151 s. Meanwhile, the complex poles s1 and s2 have moved closer to the imaginary axis to changethe dampingfactor a1from 0.00833to 0.00623, or equivalently,to reducethe dampingratio ? from 0.086 to 0.0672. The real pole s5 and the complex Onthe upper-left and lower-left faster rise than the poles s1 and s2 are both dominant. graphs of Figure 8.37, the red step response waveform shows its blue one, but at the expense of more oscillations and s2. The period of the oscillations can be approximately the due to the complex poles s1 measuredfrom the peak-to-peak time of ?(t)plot asTpp =(200-132) s=68s,which closely matches theperiod computed based onthe frequency?1 = 0.0925rad/s:T1 = 2p/0.0925 = 68s. Thepairof complexconjugatepolesats3ands4 do not have perceivable effect on the step response. A close-up view of these two graphs at the first seconds, both red and blue step responses all went to the opposite direction before reversing to the intended positive direction, which is the nonminimum-phase effect caused 20 back by the right-half plane zeros. Remark 8.24 (PI Controller Design for From the root locus analysis are three groups of root loci F/A18 of the PI flight branches. The two Flight Path Control) path control for the F/A18 aircraft, it is clear that there branches originating p3 and p4 can only from move to the left to increase their already large damping factor a3 = aS = 0.309; hence, the poles s3 and s4 on these two branches will not have much noticeable seconds no matter what value ofK is chosen. effect on the closed-loop response Meanwhile, the real pole s5 is leaving except in the first from 3 p5 at the origin toward theleftforz4=-1and thetwocomplex poles s1and s2originating fromp1andp2areheading to the right toward the imaginary very small (e.g. axis. Thesetwo groups are moving in opposite directions. K = 0.002) s5 is the dominant pole that leads to a terribly On the other hand, s1 and s2 will increase their influence When Kis slow response. or even become dominant, which leads to large up and down oscillations when Kincreases. Apparently there is no acceptable compromise; the response at K = 0.004, which is approximately a better compromise, is still slow and oscillatory. This issue still remains even the zero z4is placed elsewhere. Adding zeros and/or poles to the PI controller, as we did in Section 8.5, or augmenting an inner feedback loop to the controller structure may be helpful in providing a more friendly pole-zero patter 8.6 in the root locus diagram; Controller however, the procedure is tedious Design for and it still F/A18 Flight employs Path Control only the flight 283 path angle information, instead of utilizing the full available information, in the feedback control system design. 8.6.3 State-Space Pole Placement and Root Locus Design for F/A18 Flight Path Control The root locus design approach with the PI controller structure discussed in the previous subsection, Section 8.6.2, does not provide an acceptable solution for the F/A18 flight path tracking control prob-lem. The response is either too slow or too oscillatory. In this subsection, we will employ the state feedback structure with tracking integrator, shown in Figure 8.38, in the root locus design to im-prove the flight path tracking control performance. In the block diagram shown in Figure 8.38, the state-space model (A,Be,C) was given in Equations 8.64 and 8.65. The state-feedback gain matrix F is chosen to place the closed-loop system poles at some favorable pole locations for the loop s-1 is employed to serve asthe internal and the integral closed-loop parameter system transfer function in root locus design. The integrator modelto achieve zero-error step response at steady state, Kis to be determined poles are at desired locations using the root locus to provide design approach desired transient so that the response. The state-space pole placement approach discussed in Section 7.5 can be employed to find the state-F feedback gain matrix (8.78) =[ -0.19318 0.9557 3.2363 6.2859 ] sothat theeigenvalues ofA+BeF are at-0.17, -5.9, and-1.6j1.8. Fig. 8.38: The state-feedback controller with integrator tracking for F/A18 flight path control. Recallthat the root locus diagram is constructed based on the root locus equation 1+KG(s) = 0 as defined in Equation 8.41, in which KG(s) is called the loop transfer function of the closed-loop system shown in Figure 8.17. Hence, the loop transfer function of the closed-loop system in Figure 8.38 i 284 8 Stability, Regulation, and Root Locus Design KG(s), where -G(s) isthetransfer function fromuKtoxiassuming theblock Kisremoved from the loop. This G(s) can be found as a rational function in s, (s-4.1059) (s-0.034907) (8.79) G(s) =s-1C(sI-(A+BeF))-1Be =0.051453(s+4.3935) (s+1.6)2 +1.82 s(s+0.17) (s+5.9) ? ? ??? ?? ??? ?? ?? ?? or in the form of a state-space model, x? x?i G(s): A+BeF = xi =[ 0 x xi 0 C 0 x :=CG xi 1] Be + 0 uk:= AG x xi +BGuk (8.80) x xi Notethat these two expressions represent exactly the same system: the former in frequency domain and the latter in time domain. It also can be seen that the numerator 8.79 is the same as that of the plant transfer function polynomial of G(s) in Equation from the elevator control input de to the flight path angle output?, Gp(s) =G(s)/ ?e(s), in Equation 8.66. Butthe polesofG(s) are nowthe eigenvalues of A+BeF instead of the poles of Gp(s)in Equation 8.66. Thesetwo facts verify that the state-feedback control may alter the pole locations, but it is unable to Now we are ready to draw the root locus diagram move the zeros. using the following MATLAB code according to the state-feedbackmatrix F of Equation8.78andthe G(s)state-spacemodelof Equation8.80. % CSD % Fig8.39 Draw A_x the =[ State-feedback root rlocus(G,K) locus diagram -2.3893e-02 (8.64) -3.2200e+01; 0; 0; 1.0000e+00 0] 9.5196e-04; -5.1453e-02 -3.8506e-07; -2.8791e+00 0; 0 0]; Be=B_x(:,1); % Find % at Eq. -2.5319e-01 0 -3.8114e+00 \gamma-tracking in 1.0000e+00 -2.2115e+00 0 A=A_x; F/A-18 G(s) 0 -3.6208e-01 4.0491e-11 =[ to -2.8317e+01 -3.2923e-04 B_x for according a state -0.17, feedback -5.9, P=[-0.17 -5.9 D_G=0; that C=[0 the and -1.6+1.8i damp(A+Be*F); A_G=[A+Be*F so -1.6+j1.8, eigenvalues -1.6-1.8i]; -1 zeros(4,1); 0 % track 0]; flight B_G=[Be; G=ss(A_G,B_G,C_G,D_G); [zero_G,gain_G]=zero(G); A+BF F=place(A,Be,P); 1]; C of are -1.6-j1.8 0]; pole_G = figure(12); F=-F; path angle; C_G=[zeros(1,4) pole(G); 1]; zpk(G), K=logspace(-1,6,1000); rlocus(G,K) Theroot locus diagram associated withthe closed-loop system in Figure 8.38 with the state-feedback gain matrix F of Equation 8.78is shown in Figure 8.39. Theleft graph of Figure 8.39 shows a morecom-plete overview details. of the root loci The enlarged diagram, one on the right but the root loci around the origin area is too small to show the graph gives a better view of the root loci near the imaginary axis. The poles of the G(s) in Equation 8.79 or Equation 8.80 include the eigenvalues of A+BeF together with the integrator pole at the origin: p3 p1=-0.17, p2=0, p4 =-1.6 j1.8,p5 =-5.9 8.6 Controller Design for F/A18 Flight Path Control 285 and the zeros of G(s) are the same asthose of Gp(s) in Equation 8.66: z1=-4.3935, z2=0.034907, z3=4.1059 When K=0,alltheroots (closed-loop system poles) areatp1,p2,p3,p4,andp5.AsK?8,the roots will either moveto the three zeros, z1, z2, and z3, or approach to the two asymptote straight lines intersecting the real axis at s = -(z1+z2+z3)+(p1 +p2+p3+p4+p5) 5-3 with angles ?0=p/2and ?1=-p/2,respectively. Fig. 8.39: Rootlocus design of the integral tracking controller F/A18 flight path control problem. =-4.5087 with state-feedback compensation for the When Kisincreased fromK=0,therootlocibranch originating fromp5= -5.9willmove on therealaxis toward therightand arrive atz1= -4.3935 asK?8.The tworootlocibranches started fromp3andp4,-1.6 j1.8,willmove totheleftbending upanddown, respectively, and approach tothetwoasymptotes asK?8.The other twobranches originating fromp1=-0.17 andp2=0 will movetoward each other on the negative real axis. When K = 2.52, they meetat the break-out point s = -0.0475 andsplit intotwobranchesone up,and theother downfollowing thecir-cular trajectory with radius approximately equal to 0.07825. When K = 6.12 the two branches will intersect theimaginary axis at j0.718 andmove intotheRHP. AsKincreases to K=16.4, thetwo branches will meetthe positive real axis at the break-in point s = 0.109 and split into two on the posi-tive real axisone movesto the left toward z2 = 0.034907 andthe other to the right toward z3 = 4.1059. From the root loci branches shown in Figure 8.39, it is obvious that the roots on the two branches originating from p1 and p2 are the dominant poles since the other three branches are much further away from the imaginary axis. We will choose three values ofK: K= 3, K= 3.5, and K = 2.5 as shown on the right graph of Figure 8.39, and compare their corresponding closed-loop system pole locations and time-domain performances. Root Locus Design with K = 3 If Kis selected to be K = 3, the five closed-loop system poles ar 286 8 s1 s2 Stability, Regulation, and Root Locus Design s3 =-0.0407j0.032 :=-a1 j?1, s4 =-1.65j1.86 :=-a3 j?3,s5 =-5.88=-a5 and their associated time constant and damping ratio, natural frequency are obtained asfollows. s1, s2: t1 = 1/a1 = 24.6s, ? = 0.79, ?n = 0.052rad/s, o.s. = 1.76% s3, s4: t3 = 1/a3 = 0.61s, ? = 0.665, ?n = 2.49rad/s, o.s. = 6.09% s5: t5 = 1/a5 = 0.17s Notethat the dampingfactor a1is 41times and 144times, respectively, smallerthan a3 and a5; therefore, Fig. 8.40: the effect of the poles at s3, s4, and s5 will decay Simulation results of F/A18 aircraft much earlier and become irrelevant. using integral tracking controller with state-feedback compensation and root locus design. The Simulink simulation program, Stepfig8p40.slx, based on the state feedback and integral tracking control shown on Figure 8.38(b), is created block diagram shown in Figure 8.38(a). Theflight path anglecommand is assumedto be a 2?step function. The graphsof Figure 8.40show three simulation results: K= 3in blue, K= 3.5in red, and K= 2.5 in black. The graph onthe upper left showsthethreeflight pathangleresponses ?(t) duetothereference input?R(t) = 2?us(t)for K =3, K= 3.5,and K= 2.5,respectively. The upper-right graphrevealsthe control-input efforts de(t) dictated bythe feedbackcontroller.Theangleof attackresponsesa(t) andthe pitchangleresponse?(t) are shown in the lower-left graph. The air speed V(t) responses are shown in the lower-right graph 8.6 Controller Design for F/A18 Flight Path Control 287 From the blue step response ?(t) shown on the upper-left graph of Figure 8.40,it is observed thatthestep response initially goes down intheopposite direction from0?to -0.8? att =13sto reverse the moving direction the peak at t to rise to 90% of the desired = 113 s with less than 2% of overshoot. value at t The initial = 73 s, and continue wrong direction motion to reach was caused by the nonminimum-phase effect due to the RHP zero at s = 0.034907. However, this half-period swing is the only visible oscillation and the step response reaches the steady state shortly after t = 113 s. It also can be seen that the half period of the half-period swing can be measured from the valley to peak times inthe?(t)plot: Tvp =113-13 =100 s,which matches thehalf period computed based on the frequency ?1 = 0.032rad/s (i.e., Tvp = p/0.032 = 98.2s). Root Locus Design with K = 3.5 If the integral parameter Kis slightly changed from K = 3 to K = 3.5, the s1 and s2 closed-loop system poles willmove from-0.0407 j0.032 to -0.0339 j0.044, asshown intherightgraph ofFigure 8.39. This slight change of K hasincreased the oscillation frequency ?1from 0.032 rad/s to 0.044 rad/s, which would decrease the half-period of the half-period swing from 98.2 s to p/0.044 = 71.4 s, so that the step response will rise more quickly. However, the damping ratio will reduce from 0.79 to 0.61, and the maximum overshoot will increase from 1.7% to 8.9%. Root Locus Design with K = 2.5 Onthe other hand,if the integral parameter Kis slightly changed from K = 3 to K = 2.5, the two dominant closed-loop system poles s1and s2willmove from-0.0407 j0.032 back tothenegative realaxis sothatthetwopoles are-0.0423 and-0.0528. Hence, theresponse willbeoverdamped, which has no overshoot but is slower than the K = 3.0 response. The four graphs of the simulation results of the PI flight path angle control Figure 8.37 are obtained from using the following MATLAB program: % CSDfig8p40.m % Run % call % Run 5/09/2020 CSDfig8p39.m simulink file: A: Design K=3, obtain A K=3, B_x, D=[0 0 and 0 ... F 0]', C_ga=[0 -1 Design C: K=2.5 [0, sim_time], 0 1] % Design B: K=3.5, % Simulation sim_time=500, 'current', sim('Stepfig8p40', 'DstWorkspace', 'current'); sim_options); Plot Ele=-1.26+u*r2d; V=x(:,1)+436; Gamma=yout(:,1)*r2d; Design K=3.5, B R=yout(:,2)*r2d; 'current', sim('Stepfig8p40', Ele=-1.26+u*r2d; V=x(:,1)+436; Gamma=yout(:,1)*r2d; Design Theta=x(:,4)*r2d+10; run('plot2x2a'); Simulation open('Stepfig8p40'), K=2.5, Alpha=x(:,2)*r2d+10; sim_time=500, sim_options=simset('SrcWorkspace', %% Tracking R_gamma=2*d2r open('Stepfig8p40'), %% Intgrl program plot_regA.m sim_options=simset('SrcWorkspace', %% rLocus this A_x, C=eye(4); r2d=1/d2r; % Design %% to B=B_x(:,1); d2r=pi/180; SF running Stepfig8p40.slx, CSDfig8p39.m A=A_x; F/A-18 before of F/A18 C R=yout(:,2)*r2d; Simulation sim_time=500 'DstWorkspace', [0, sim_time], Alpha=x(:,2)*r2d+10; run('plot2x2b'); 'current'); sim_options); Theta=x(:,4)*r2d+10; ahown on 288 8 Stability, Regulation, and Root Locus Design sim_options=simset('SrcWorkspace', 'current', open('Stepfig8p40'), sim('Stepfig8p40', Ele=-1.26+u*r2d; V=x(:,1)+436; Gamma=yout(:,1)*r2d; 'DstWorkspace', [0, sim_time], Alpha=x(:,2)*r2d+10; R=yout(:,2)*r2d; 'current'); sim_options); Theta=x(:,4)*r2d+10; run('plot2x2c'); where plot2x2a.m is given below. The other two copies, plot2x2b.m print in red and black colors, respectively. %filename: will plot2x2a.m figure(4), subplot(2,2,1), plot(t,Gamma,'b-'), grid hold on, subplot(2,2,2), plot(t,Ele,'b-'), hold on, subplot(2,2,3), plot(t,Theta,'b-',t,Alpha,'b--'), title('Pitch,AoA'), hold title('Speed 8.6.4 and plot2x2c.m, V'), Comparison on, hold of the grid on, on, title('Gamma'), title('Elevator,AoA'), grid subplot(2,2,4), plot(t,V,'b-'), on, grid on, on PI Controller and the Integral Controller with State-Feedback Compensation It seems to variables PI controller usually be an unfair comparison of the longitudinal only the flight availableeither since in the state-feedback compensation path angle is utilized by direct measurement in the design. However, these state or state reconstruction state while in the variables using the observer theory, which will be covered in Chapter 11. Moreinformation design will certainly makethe control system perform better. By comparing all the four dynamics system are assumed available for feedback, are and es-timation utilized in the controller the root locus diagrams in Figures 8.36 and 8.39, it can be seen that the state-feedback has replaced a more favorable the LTF poles and greatly set of closed-loop system changed the shape of the root loci graph so that poles can be obtained. In Figure 8.36, the best possible range of the K values is between K = 0.002 and 0.004. With K=0.002, thedamping factor ofthedominant pole s5=-0.003 is0.003, which implies a333 stime constant and morethan 1,000 seconds of settling time in step response. It is an unacceptable slow step response. Furthermore, thenearby complex conjugate poles s1and s2at-0.00833 j0.0967 willadd some long-period lightly damped oscillation the left to decrease the time sametime constant and to the response. make the response By increasing a little K, the s5 pole bit faster. will move to But doing so will at the movethe complex conjugate poles s1 and s2to the right to makethe response more oscillatory. AtK=0.004, thepair ofcomplex poles s1and s2areat-0.00623 j0.0925, which are asdominant as thereal s5=-0.00661. Itis much more oscillatory and itisstillslow. There isnogood choice available out of this root locus diagram. On the other hand, the root locus diagram in Figure 8.39 provides much better options to find a set of closed-loop system poles for an acceptable closed-loop system performance. In Figure 8.39, only theroot locibranches originating fromp1=-0.17 andp2=0are relevant since thedamping factors associated decay with the other three root loci much earlier. With the choices of branches are much larger K = 3.0, K = 3.5, and and their associated response K = 2.5, and their corresponding will root locations on the right graph of the figure, the damping factors are about 10times larger than those of the dominant poles in Figure 8.36. The damping ratios are also about 10 times larger than those of the PI control design. Therefore, the performance of the closed-loop system performance designed by the state feedback, together with the integral tracking, is about 10 times faster in step response with muchless oscillation. The time-domain responses foretold bythese observations of the root-locus diagrams are veri-fied by the simulation results shown in Figures 8.37, 8.40, and 8.41, and in Table 8.2 8.7 Aircraft Altitude Regulation via Flight Path Angle Tracking Control 289 Table 8.2: Performance comparison of the four closed-loop systems withtheir respective controllers K= 3.0, K = 3.5, K = 2.5 in the state-feedback with integral tracking structure and K = 0.002, K = 0.004 in PI controller structure. K SfI K = 3.0 SfI K = 3.5 SfI K = 2.5 PI K = 0.002 PI K = 0.004 Rise time 74s 58s 100s 790s 380s Settle time 80s 110s 110s 1000s 460s Max overshoot 2% 14% 0% 0% 0% 40% 50% 30% 9% 17s Osc amplitude 0% 0% 0% 18% 35s Osc period N.A. N.A. N.A. 65s 68s 0 0 0 0 0 Initial NMP dip S.S. tracking error de deflection Fig. 8.41: Comparison (-1.26?, 0.2?) (-1.26?, 0.2?) (-1.26?, 0.2?) (-1.26?, 0.29?) (-1.26?, 0.2?) of F/A18 integral tracking controller 8.7 Aircraft In the previous flight Altitude section, flight path tracking responses using the PI controller Regulation via Flight Path Angle Tracking Section 8.6, path angle of the aircraft angle tracking aircraft and the with state-feedback compensation. we discussed can follow control is often employed how to design a feedback the flight path angle command. to regulate the flight altitude Control control system so that the In practice, the flight path of aircraft. Although a six degree-of-freedom aircraft dynamics has 12 state variables, total air speed V, angle of attack a, side slip , roll rate p, pitch rate q, yaw rate r, roll angle f, pitch angle ?, yaw angle ?, latitude position pN,longitude position pE, andthe altitude h,only eight ofthem,V, a, , p, q, r, f, and ?, are directly controlled bythe four controlinputs: aileron da,rudder dr, elevator de,andthrust dT. The other four state variables,including pN, pE, h, and ?, arefunctions ofthe 8trim (directly controlled) state variables. The relationship between the derivative of the altitude h? andthe trim state variablesi described by h?(t) =Vsin? cosacos -Vsinf cos? sin -Vcosf cos? cossina (8.81) 290 8 Stability, Regulation, and Root Locus Design If thelateral systemis controlledto keepthe aircraft fly straight(i.e., f = 0and = 0),thenthe altitude equation can be simplified to the following, Fig. 8.42: Flight path angle tracking control is employed to achieve F/A18 altitude regulation. h?(t) =Vsin? cosa-Vcos? sin :=f(x) (8.82) The altitude regulation via the flight path angle tracking control can be achieved based on either one of the two schematic block diagrams shown in Figure 8.42. These two block diagrams are similar. The only difference is in the flight path angle tracking controller. Figure 8.42(a) employs the state feedback with integral tracking control structure, asshown in Figure 8.38 while Figure 8.42(b) adopts the PI controller, asin Figure 8.35. Note thatin the altitudeequationof Equation 8.82,the derivative ofthe altitude h? is afunctionof the actual-valuestate variablesx(t) instead of the perturbed-valuestate variablesx(t) in the linearized state-space model.Sincethe nominal flight trim is chosento bethe straight-levelflight with 10?angle attack,as shownin Equation 8.63,the relationship betweenx(t) andx(t) is shown as x(t) =[V(t) a(t) q(t) ?(t)]T =x(t)+x* =[V(t) a (t) q(t) ? (t)]T +[43610p/180 0 10p/180]T (8.83) where10?and 0?/s arereplaced by 10p/180 rad and 0 rad/s,respectively, becausein computations we should only use radians instead of degrees as the unit of angles. Theintegration of?his h = ?h+h0, whereh0is the initial value of h. The altitudereferenceinput is hR = ?hR +h0, where ?hRis the desired increment of altitude. The objective of the outer-loop control istocontinuously adjust thedesired flight path ?Raccording tothedifference ?hR -?huntil thedif-ference reaches zero. Theinner-loop flight path integral gains K1and K2 were obtained in the previous section using the root locus diagram as K1 = 3.5 and K2 = 0.004, respectively, for the state-feedback with integral tracking and thePIcontrol design approaches. The outer looph-?gain Kh?1 andKh?2 can also bechosen using root locus design orsimply byafewiterative simulations. These h-?gains arechosen asKh?1 =210-5andKh?2 =610-6inthealtitude tracking control simulations result 8.8 Exercise Problems 291 shown in Figure 8.43. Note that in these flight path and altitude control examples, only the elevator is employed to control the flight path with the thrust fixed at the trim. If both the elevator and the thrust are utilized, the performance would have been better. Fig. 8.43: Simulations of altitude regulation of F/A18 using flight path angle tracking control. 8.8 Exercise Problems P8.1a: Considerthe typical feedback control system shown in Figure 8.44. Letthe plant be G(s) = s+1 1 , andthe controllerbea proportionalcontroller K(s) = Kp. Notethat therearetwo externalinputs:the reference input r(t) and the disturbance input d(t). Let the transfer function from R(s) to E(s) and the transfer function from D(s) to E(s) of the closed-loop system be denoted by Ger(s) and Ged(s), respectively. Then the error response E(s) will be E(s) = Ger(s)R(s)+Ged(s)D(s) Find the transfer functions (8.84 Ger(s) and Ged(s)in terms of the parameter Kp. P8.1b: Let r(t) =10us(t) and d(t)=-2us(t), where us(t) istheunit step function. Find thesteady-state tracking error lim e(t) t?8 =limsE(s) s?0 in terms of the parameter Kpby using Equation8.84 and Theorem2.27,the final-value theorem. 292 8 Stability, Regulation, and Root Locus Design P8.1c: Repeat Problem P8.1a with the controller replaced by the PI controller transfer functions Ger(s) and Ged(s)in terms of the parameters Kpand Ki. K(s) =Kp + s. Ki Findthe P8.1d: Repeat Problem P8.1b with the controller replaced bythe PI controller K(s) =Kp + s Ki. Findthe steady-state tracking error lim e(t) t?8 =limsE(s) s?0 in terms of the parameters Kpand Ki by using Equation 8.84 and Theorem 2.27, the final-value theorem. Fig. 8.44: P8.1e: Comment Atypical on the steady-state feedback tracking control error results system structure. of Problems P8.1b and P8.1d, and explain what causes the difference. P8.2a: Consider a simplified version of Equation 8.16 as x?(t) = -cx2(t)+ M 1 u(t) := M f(x(t),u(t)) (8.85) where the single state variable x(t) represents the velocity of the vehicle, u(t) is the force generated by the engine to movethe vehicle, M = 1,929 kg is the mass of the vehicle, c = 0.643 kg/m is the viscosity coefficient of the vehicle traveling in the air. The nonlinear function f(x(t),u(t)) is included for notational consistency with the Jacobian linearization process of Appendix C. The equilibriums can be obtained by setting?x(t) = 0, or by setting the right-hand side of Equation 8.85 to be zero, -c(x*)2 +u*=0 ? u*=0.643(x*)2 (8.86) This equilibrium equationspecifiesthe relationship betweenthe velocity x* andtheinput force u*. Un-like the simple inverted pendulum example in Section 4.4.2, which has only two equilibrium points, there areinfinite manyequilibrium points on the equilibrium curve line specified by Equation 8.86. Re-call that in Section8.2.1, weselected x* = 30 m/s, whichleads to u* = 0.643(30)2 = 578.7 N, and the linearized state-space modelatthis equilibrium (x*,u*) = (30 m/s,578.7 N) wasfound as Equa-tion 8.19. Now, assume we wantto investigate the system behavior whenthe vehicle velocity is around 20 m/s, whatequilibrium point (x*,u*) shall weselect? P8.2b: Atthe equilibriumpoint(x*,u*) =(20 m/s,u*), whichyouhavejust chosenatthe endof Prob-lem P8.2a,find the linearized state equation of the vehicle x?(t) C.5 of Appendix = x(t)+B A u(t) according to Equation C. P8.3a: Considerthe proportional feedback control system on Figure 8.45. The objective is to draw the root loci diagram for the system according to the root loci construction rules in Section 8.3.1 and the 8.8 Fig. 8.45: Review the root loci construction Exercise Problems 293 rules. determine a value ofK based onthe diagram so that the closed-loop system poles are at optimal locations to deliver a desired performance. function (LTF) The first step is to follow of the system, the number Rules 1, 2, and 3to identify of LTF poles as n, the the loop transfer number of LTF zeros as m, and then mark thenLTF poles andmLTF zeros onthecomplex plane as and ?r,espectively. P8.3b: to The second step is to draw the root loci segments on the real axis of the complex Rule 4. Although this step is quite straightforward, it is the most important plane accord-ing step in the root loci construction. Notethat all root loci are originating from LTF polelocations andterminated either at LTF zero locations or at infinity on the asymptotes, which will be given by Rule 5. P8.3c: Follow Rule 5 or Equation 8.54 to compute the angles and the intersection of the asymptotes with therealaxis. Then draw these n-masymptotes onthecomplex plane indashed lines. P8.3d: Oneach root loci segment on the real axis, if both ends of the segment are poles, then there will be a break-out point on this segment. If both ends are zeros, then there will be a break-in point on the segment. The break-out or break-in points can be obtained by Rule 6 or Equation 8.55in Section 8.4.2. P8.3e: Rule 7is about the imaginary axis crossing. The root loci of the system only intersects with the imaginary at the origin when K = 0. Rule 8 provides a formula to compute the angle of departure or arrival. Since all the LTF poles and zeros of the system are onthe real axis, the angles of departure or arrival are trivialeither 0 or 180 degree. Now, based on the information above, a sketch of the root loci diagram can be roughly drawn. Meanwhile, a more precise root loci diagram can be obtained using the MATLAB command rlocus as demonstrated in Section 8.3.2. Compare your root loci diagram sketch with the graph generated by the MATLAB program, andfind a best choice ofK based onthe closed-loop pole locations and their corresponding damping ratios, natural frequencies, and time constants. P8.3f: Build a Simulink or MATLAB simulation program according to the feedback control system block diagram in Figure 8.45. Then conduct simulations by applying a step input to r(t), and observe the steady-state and transient step responses at y(t) and u(t). You may need to determine a trade-off between the performance on y(t) and the control effort constraint on u(t) by iterating the value of K several times. Finally, comment on your design and the simulation results. P8.4a: Consider another proportional feedback control system similar to that shown in Figure 8.45 but with the plant transfer function replaced by the following: G(s) = s+6 s(s+2)2 Find the angles of the asymptotes and the intersection of the asymptotes with the real axis 294 8 Stability, Regulation, and Root Locus P8.4b: Compute the break-out/break-in Design point (or points) on the root loci, and compute the value of K at these points using the magnitude equation, Equation 8.52. P8.4c: Find the intersections of the root loci with the imaginary axis and compute the value ofK at these intersections. P8.4d: Drawthe root loci diagram by hand based on the information obtained from P8.4ato P8.4c. P8.4e: Draw the root loci diagram using MATLAB command rlocus to verify your hand-drawn dia-gram from P8.4d. P8.4f: Usethe root loci diagram to locate the dominant roots that would render damping ratio ? = 0.707. P8.4g: Compute the value of K at the dominant root locations. P8.4h: Find the closed-loop system transfer functions, P8.4g. Y(s)/R(s) and U(s)/R(s), with the Kfound in P8.4i: Plot the step responses, y(t) and u(t), of the closed-loop system using the transfer functions in P8.4h. Fig. 8.46: Rootlocus design with phase-lead compensation. P8.5a: Consider the feedback control system with phase-lead compensation on Figure 8.46. Before us-ing the root locus design with phase-lead compensation, we would like to confirm that the proportional controller Kandthe PI controller (Kps+Ki)/s are unableto stabilizethe system. Verifythe confirma-tion using the root locus design theory. P8.5b: Root locus design is not just about choosing the right value of the parameter K. The controller structure that determines the LTF (loop transfer function) pole-zero pattern is at least asimportant. Adding thephase-lead compensator (s+b)/(s+a) with b<aisequivalent toadding azero ats =-b and apole s =-atotheLTF pole-zero pattern thatcanchange thelocation oftheasymptotes, the break-out/break-in (s+b)/(s+a) not points, the moving direction of the roots trajectories, etc. If b > a then the compen-sator will become a phase-lag compensator. Showthat the phase-lag compensation will work based on the root locus design theory. P8.5c: Vary the values of b and a, one at atime, to observe how they will change the shape of the root loci diagram. Then find a best choice of K based on the closed-loop damping ratios, natural frequencies, and time constants pole locations and their correspond-ing 8.8 P8.5d: Build a Simulink or MATLAB simulation program according Exercise Problems to the feedback control 295 system block diagram in Figure 8.46. Then conduct simulations by applying a step input to r(t), and observe the steady-state and transient step responses at y(t) and u(t). You may need to determine a trade-off between the performance of y(t) and the control effort constraint on u(t) by modifying the value of K a few times. Finally, comment on your design and the simulation results. P8.6a: For the feedback position control system shown in Figure 8.47,the plant, which is the system to be controlled, is an extremely lightly damped system with damping ratio ? = 0.0125. In order to achieve zero steady-state tracking error, the controller needs to include an integrator. If there is no compensation, therewould benoLTF zeros, only three LTF poles attheorigin, and-0.05j4.The twobranches of the root loci originating from the complex away and have no way of coming pair will jump into the right half of the complex back. In order to bend the angle of departure of the two poles toward the left half of the complex plane and movethe asymptotes to intersect plane right complex plant with the negative real axis, twozeros, s =-band s =-c,and one pole, s =-awith b <aand c <a,need tobeadded to the controller. Show that the controller K(s+b)/(s(s+a)), compensator, is still not ableto stabilize the system. anintegral controller Fig. 8.47: Rootlocus design with double zeros compensation for an extremely lightly control system. P8.6b: they Vary the values of the three compensator will change the shape of the root loci parameters diagram. with phase-lead damped tracking b, c, and a, one at a time, to observe how Then find a best choice ofK based on the closed-loop pole locations and their corresponding damping ratios, natural frequencies, and time constants. P8.6c: Build a Simulink or block diagram in Figure MATLAB simulation 8.47. Then conduct program according to the feedback control system simulations by applying the steady-state and transient step responses at y(t) and u(t). between the performance few times. comment Or you of y(t) and the control effort constraint a step input and observe You may need to determine a trade-off on u(t) may even need to go back to readjust the compensator on your design and the simulation to r(t), by modifying the value of K a parameters b, c, and a. Finally, results. P8.7a: The plantto be controlled in the feedback position control systemshown in Figure 8.48(a) is exactly the same as that considered in Problem P8.6, where an integral controller structure with two zeros/one pole compensation was employed in the root locus design. This P8.6 solution resolves sta-bility and the lightly second since the damped issue; however, the response is slow dominant real pole is too close to the imaginary with time axis. constant larger than one This issue can be resolved if the plant complex poles -0.05j4canberelocated. The new approach willemploy astate feedback to movethis complex pair of poles to the new locations with damping ratio ? = 0.9 and natural frequency ?n = 10 rad/s. Find the state-feedback gain matrix F 296 8 Stability, Regulation, and Root Locus Design P8.7b: Notethat the two block diagrams in Figure 8.48(a) and (b) are equivalent. Show that the loop transfer function (LTF) ofthesystem iss-1C[sI-(A+BF)]-1B. P8.7c: Drawthe root loci diagram associated withthis LTF. Vary the damping ratio andthe natural fre-quency to obtain a few corresponding F matrices,and then observe how F will affect the shape of the root loci diagram. P8.7d: Build a Simulink or MATLAB simulation program according to the feedback control system block diagram shown in Figure 8.48(a). Then conduct simulations by applying a step input to r(t), and observe the steady-state and transient step responses at y(t) and u(t). You may need to determine atrade-off between the performance of y(t) and the control effort constraint on u(t) by modifying the value of K a few times. Finally, comment Fig. 8.48: Root locus control system Or you may even need to go back to readjust on your design and the simulation design with state-feedback the state feedback gain matrix results. compensation for an extremely lightly damped tracking F. 9 Time Delay,Plant Uncertainty, and RobustStability I N Chapter 8, welearned how to select a feedback control system structure to achieve steady-state disturbance response rejection and steady-state reference input tracking using the concept of the type of a system and the internal modelprinciple. Wehave also studied, to a great extent, using root locus design technique to fine-tune the transient response of the closed-loop system. In this chapter, we will consider the stability issues caused by time delay and plant uncertainties. The Nyquist stabil-ity criterion, and plant developed by Nyquist in 1932, uncertainties affect the closed-loop will be employed system to characterize stability. how the time The Nyquist approach delay also provides two robust stability measures(i.e., gain and phase margins)to specify the allowable perturbations of the gain and the phase of the loop transfer function at two specific frequencies for the closed-loop system to remain stable. frequencies These two stability instead of the margin whole frequency measures only reveal robust stability spectrum. Furthermore, these two information at the two measures only work for SISO (single-input/single-output) systems. The attempt of extending the concept of gain/phase margins to MIMO (multi-input/multi-output) systems was not successful since there is no meaningful definition for the phase of a matrix loop transfer The success all frequencies of finding arrived function. a more general robust stability shortly after the small measure that gain theorema works for generalization MIMO systems of the Nyquist at crite-rion to MIMO systemswas proved by George Zames in 1966 [Desoer and Vidyasagar, 1975]. The generalized stability margin is defined in terms of the maximum singular value (or the magnitudefor SISOsystems)of complementary sensitivityfunction matrix T(j?) = L(j?)[I+L( j?)]-1, L(j?) is the loop transfer function matrixofthe closed-loop system. Thegeneralized stability works for frequency where margin both SISO and MIMO systems and provides robust stability information for the entire spectrum. The frequency-dependent generalized stability margin function gives the maxi-mum allowable variation of the maximum singular value (or the magnitude for SISO systems) of the plant for every frequency so that the closed-loop system can still remain stable. 9.1 Stability Issues Caused by Time Delay and Plant Uncertainty The first and the most important requirement in the design of feedback control system is stability, since an unstable system is not only useless, it can be harmful or even potentially can cause a disaster. As discussed in Section 7.3, a linear time-invariant system is stable if and only if all the roots of its charac-teristic equation are in the strictly left half of the complex plane. Thus, in the design of feedback control systems as described in Chapter 8, the characteristic equation of the closed-loop system 1+L(s) = 0, where L(s) is the loop transfer function of the closed-loop system, should have all its roots in the strictly left half of the complex plane 298 9 Time Delay, Plant Uncertainty, and Robust Stability The stability of feedback control systems can be affected bytime delay and plant uncertainty; hence, it is imperative to incorporate the considerations the design process to ensure the system criterion and the stability of all possible time will remain margins concept stable under all derived from the delays and plant uncertainties worst-case scenarios. Nyquist approach in Nyquist sta-bility were the first tools developed to address the two important stability issues. 9.1.1 Time Delay and Stability In feedback control systems, time delay occurs in almost every sensing and actuation process. Hence, its effect on stability is an important practical issue. However,this issue was not resolved until 1932 when Nyquist published one of the known as Nyquist stability is that a feedback infinite mostimportant criterion. control system control systems theories in [Nyquist, The obstacle that prevented the problem from with time delay is an infinite dimensional 1932], which is now being resolved system, which earlier has an number of closed-loop system poles. If the system is finite dimensional, or, equivalently, the number of the roots of the characteristic equa-tion is finite, then the stability ofthe closed-loop system can be determined based onif the characteristic equation has a root in the RHP, which stands for the right half of the complex plane. One wayto know if there exist closed-loop system poles in the RHP is to compute all these poles by solving for the roots of the associated characteristic equation, or to compute the eigenvalues of the corresponding state-space model. Alternatively, the Routh-Hurwitz stability criterion approach of Sec-tion 7.7 can be employed to check the number of poles in the RHP without the need of solving for the roots or the eigenvalues. ways of choosing Furthermore, controller the root locus parameters design approach so that the closed-loop described in Section 8.4 provides system will not have poles in the RHP. However, these approaches do not work for the infinite-dimensional systems; therefore, they will not work for the systems with time delay either since the feedback control systems with time delays are infinite-dimensional systems. Fig. 9.1: Afeedback control system with aloop transfer function L(s) that includes atime delay. Example 9.1 (A Closed-Loop System with Time Delay Is an Infinite-Dimensional System) Considerthe feedback control system shown in Figure 9.1. If the loop transfer function L(s) is given a L(s) = 2 s+1 then the closed-loop characteristic equation will be 1+L(s) = 1+ 2 s+1 =0 ? s+3=0 and therootoftheequation can befound ats =-3toassert that theclosed-loop system isstable. 9.2 Recall that the loop transfer function controlled, the sensor, the actuator, or actuating process. Contour Mapping and Cauchys Principle of the Argument 299 L(s) usually consists of the plant, which is the system to be and the controller. Now, assume the delay time is L(s) = In practice, a time delay T. Then the loop transfer 2 may occur in the sensing function will become e-sT s+1 (9.1) wherethe term e-sT is the transfer function of atime delay element with delaytime T as describedin Theorem 2.22. Thusthe closed-loop characteristic equation will turn out to be F(s) = 1+L(s) all the infinite number 1 3 s+1 which apparently is a polynomial compute ?3+(1-2T)s+T2s2 - T3s3 + ? =0 1 = equation with infinite of roots, the stability numbers of roots. Sinceit is impossible to analysis time delay was an unresolved issue before Nyquist stability 9.1.2 Plant Uncertainty A feedback control (9.2) of feedback criterion control system involving was discovered. and Stability system usually is designed based on a mathematical model of the system to be controlled, which is called the plant. In practice, the real system to be controlled is not identical to the ideal model due to unmodelled plant plant dynamics, specification tolerance of components, and plant parameter perturbations influenced by the environment conditions. Hence, a feedback control system not only needs to be stable for the nominal system with the ideal plant model,it should be designed to achieve robust stability against all possible plant uncertainties. The Nyquist stability criterion complex integral 1997]. theorem was developed by Nyquist in 1932 [Nyquist, presented by a French The Nyquist approach mathematician not only resolves the stability control systems, it also provides important 1932] based on Cauchy Augustin-Louis Cauchy in 1831 [Smithies, analysis issue of infinite-dimensional feed-back concepts and tools for achieving robust stability of feedback control systems, which will be elaborated in later sections of this chapter. 9.2 Contour Mappingand Cauchys Principle of the Argument Nyquist stability analysis theory was developed based on Cauchys principle of the argument, and the complex contour mapping wasthe underlying framework of Cauchys complex variable theory, includ-ing the principle of the argument. Hence, we will briefly review the complex function and complex contour mapping in the following subsection before discussing Cauchys principle of the argument. 9.2.1 Complex Contour Complex contour complex function Mapping mapping is a special complex function, such as F(s), in is a simple directional closed path on the complex which the domain of the plane. Here, simple means the closed path does not crossitself. The complex variable s is supposed to travel along the closed contour for exactly one revolution. For each value of s (e.g., s1) on the contour, a corresponding complex function value F(s1) can be computed and plotted on the complex image of the contour on the s-plane is mapped onto the F-plane. F-plane. That meansthe As s traverses the simple closed contour once, the image orthe trajectory of F(s) onthe F-plane will also be a closed path, butit maycross itself and may encircle a particular point N times, where N can be any integer, in the same (positive N) or i 300 9 Time Delay, Plant the opposite (negative Uncertainty, and Robust Stability N) encirclement direction with the contour on the s-plane. To avoid confusion, the closed contour travel direction onthe s-plane can be fixed to be either clock-wise or counterclockwise. Counterclockwise contour direction has been considered the positive direction in almost all mathematics books. Onthe contrary, for some practical reasons, the majority of the control and systems community as the positive the right Nyquist has decided to go the other direction. half complex path. the contour mapping compelling plane is consistent Therefore, chosen for the contour One of the we will follow encirclement reasons the systems and control Note that counting. the real function learning experience Fig. 9.2: contour rotation encirclement Counterclockwise similarities of direction in the convention direction angle direc-tion regarding convention measurements in is only degrees direction is positive unless two examples, we will briefly re-view and differences, which may enhance our mapping. A simple real function Example 9.2 (A Simple Real Function communitys mapping,in the following mapping, and study their of the complex the clockwise this clockwise For other or radians, westill follow the universal convention: otherwise specified. To better understand complex contour is that encirclement with the positive frequency increasing direction. encirclement way to adopt the clockwise to demonstrate the mapping of a real variable. Mapping) Considerthe simple real function y =f(x) =-x+2 which specifies how the variable x will affect the value of y. Asthe independent variable x varies, the dependent variable y will change accordingly. The mapping relationship between x and y can be represented by the tabulated chart, x -1 0 y 3 2 1 2 3 1 0 -1 (9.3) or by the graphs shown in Figure 9.2. A graphical representation of a function like the one shown in Figure 9.2(a) is an effective real variable y. But this two-dimensional complex function function way to illustrate the mapping relationship from graph or even a three-dimensional mapping since a generalization mapping would need a four-dimensional of Figure 9.2(a)s a real variable x to another graph cannot be applied to graphical representation to complex space. The graph in Figure 9.2(b) looks awkward for real function mapping. However, the concept can be easily generalized to complex function mapping. Thetwo real number lines for the independen 9.2 real variable x and the dependent real Contour variables Mapping and Cauchys y can be generalized Principle of the Argument 301 to the complex s-plane and the complex F(s)-plane. Fig. 9.3: A simple complex function Example 9.3 (An Illustration to demonstrate the of Complex Function Contour mapping of a complex contour. Mapping) Considerthe simple complex function s-0.5 F(s) = s+0.5 which specifies how the complex variable s will affect the value of the complex function independent complex variable s varies on the complex s-plane, the dependent complex F(s). Asthe function variable F(s) will change accordingly on the complex F-plane. The domain of the complex function in general can be any set of complex variables onthe complex s-plane. The domain of the complex function weare interested, is a simple closed contour, similar to the one shown in Figure 9.3(a). For ease of explanation, this simple closed contour (or path) Gsis decomposed into two segments. Segment (1), in blue, is on thej? axis (the imaginary axis) with s =j?, where ? =-1 ?0 ?1.Segment (2),inred, isa semicircle s =ejf, where f =p/2?0?-p/2. The F(s) F(j?) mappings of segments (1) and (2), respectively, = j?-0.5 = ej(p-?) j?+0.5 = ej(p-2?), will be where ? =tan-1 ? ej? , ? =-1 ?0 ?1 0.5 and F(ejf) = ejf -0.5= ejf The mapping relationship s +0.5 0.75+ j sinf (cosf +0.5)2 +sin2f , where f = p 2 ?0 ? between s and F(s) can be represented bythe following -j F(s) e-j53? -p 2 tabulated chart: ? -j0.5? 0 ? j0.5 ? j ? ej0 ?e-jp/2? -1 ?ejp/2 ?ej53?? 1/3 (9.4 302 9 Time Delay, Plant Uncertainty, and Robust Stability Now we have completed the F(s) mapping GF of the closed contour Gsshown in Figure 9.3(b). After obtaining the complex contour mapping GF, we are particularly interested in the number and direction of the encirclements of the origin by GF on the F-plane. It can be seenthat GF encircles the origin once clockwise, whichis in the same direction of the Gscontour in the s-plane. Therefore, the number of encirclement is N= 1. In the case that the encirclement direction were counterclockwise, the number would have been N=-1. 9.2.2 Cauchys Principle of the Argument One version of the Cauchy complex integral theorem is called Cauchys principle of the argument or Cauchys complex contour mappingtheorem, which is given next. Theorem 9.4 (Cauchys Principle of the Argument) Let Gsbe a simple closed curve in the (complex) s-plane, as shown in the left graph ofFigure 9.4. F(s) is a rational function having no poles or zeros on Gs. Let GF be the image of Gs under the map F(s). Then, N=Z-P where Nis the number ofclockwise encirclements ofthe origin by GF ass traverses Gsoncein the clockwise direction; Zis the number ofzeros ofF(s) enclosed by Gs,counting multiplicities; and Pis the numberofpoles ofF(s) enclosedby Gs,counting multiplicities. Proof: Notethat the rational function F (s) = K (s-z1)(s-z2) (s-zm) (s-p1) (s-p2) (s-pn) (9.5) can be expressed as: F(s) = K ?z1ej?z1?z2ej?z2 ?p1e j?p1?p2e j?p2 K?z1?z2 ?zm ?zme j?zm ej[(?z1+?z2++?zm) - (?p1+?p2++?pn)] = ?pn ?pne j?pn ?p1?p2 (9.6 where j =1, ,n ?sp j are themagnitudes ofthephasors s-ziands- pj,respectively, and ?zi=|s-zi|, i =1, ,m and ?pj = ? ?, ? ?zi=?(s-zi),i =1, ,m and ?p j =?(s-pj), j =1, ,n are theangles (arguments) ofthephasors s-ziand s- pj,respectively. In view of Equation9.6, asstraverses Gsonce,its image GFencirclesthe origin only if atleast oneof the angles ?j undergoesa changeof 2p radians. Any pole or zero outside of Gsdoesnot produce any angle change through a circuit of Gs. Onthe other hand, a pole or zeroinside of Gsdoes produce a 2p angle change. This is easily visualized in Figure 9.4. Equation 9.6 implies that for a complete clockwise transverse of Gs,each zero inside of Gs produces a clockwise 2p angle change and each pole inside of Gs produces a counterclockwise 2p angle change. Hence,the net number of clockwise encirclements oftheorigin byGF is Z-P. 9.2 Example 9.5 (Illustrate The complex contour the Principle Contour of the mapping example Mapping and Cauchys Principle of the Argument 303 Argument) shown in Figure 9.4 is employed to illustrate the theorem on principle of the argument. Assumethe complex rational function is F(s) = s-z1 s-1 s-1 = = (s-p1)(sp2)(sp3) (s+1-j)(s+1-j)(s-3) s3-s2-4s-6 (9.7) and the simple closed path Gsis a circle centered at the origin of the s-plane with radius equals to 2. For clarity, Gsis partitioned into two segments: Segment (1) is in red, which starts from s = 2, clockwise and ends ats =-2.Immediately, segment (2),which isinblue, begins from s =-2,moving along theupper semicircle togoback tos =2tocomplete one revolution alongthe semicircle to s = 2e-j135? of the circle. Fig. 9.4: Complex contour mapping and the principle of the argument. Theimage of segment(1) of Gsis shown in the right graph of Figure 9.4 as segment (1) of GF, to also inred. It canbeseen thatthestarting point s =2is mapped to F(2)= -0.1, s =2e-j135? F(2e-j135?) = -0.16212j0.38819, ands = -2findsitsimage atF(-2) =0.3onGF.Similarly, thethree points onsegment (2)ofGs: s =-2,s =2e j135? , and s =2aremapped to F(-2)=0.3, F(2e j135? ) = -0.16212+ j0.38819, andF(2)= -0.1,respectively, onGF.Note thatGF issymmet-rical with respect to the real axis, and it encircles the origin of the F-plane once counterclockwise. Hence, thenumber ofclockwise encirclements oftheorigin byGF is N=-1.Recall that thenumber of poles of F(s) enclosed by Gsis P = 2, and the number of zeros of F(s) enclosed by Gsis Z = 1. Therefore, N =-1=Z-P=1-2,which isconsistent with theresult ofTheorem 9.4. Now wewillemploy thisexample toillustrate whyN=Z-P.Following thenotations ofEquation 9.6, Equation 9.7 can be rewritten asthe following: F(s) = ?z1 s-z1 ej[?z1-(?p1+?p2+?p3)] =|F(s)|?F(s)= ?p1?p2?p3 (s-p1)(sp2)(sp3) (9.8) Asthe complex variable s traverses around Gs,both the magnitude and the phase (also called angle or argument) of F(s) will change accordingly. However, the number Nof clockwise encirclements of th 304 9 Time Delay, Plant Uncertainty, and Robust Stability origin by GFin Theorem 9.4 is independent of the magnitudes ?z1, ?p1, ?p2, and ?p3. Furthermore, the poles and zeros of F(s) that are not enclosed by Gsalso do not contribute to the number Nof clockwise encirclements of the origin by GF. Asshown in the left graph of Figure 9.4, the pole p3is not enclosed byGs. Assstarts froms =2,moving around Gs once through thepoints s = -j2,s =-2,s =j2, and back tos=2,thephase of?(s-p3) will change frompoint topoint, but theoverall net change of the phase is zero, asit can be clearly seen from 2 s ? -j2 Equation 9.9. ? -2 ? j2 ? 2 (9.9) ?p3 =?(s-p3)-180?? -146.3? ? -180?? -213.7? ? -180? Onthe other hand, each zero or pole of F(s) enclosed by Gs will contribute to increasing or decreas-ing the number of encirclements of the origin by GF. The zero z1 = 1is enclosed by Gs. After s traverses around Gs once, thenet change ofthephase ?z1 =?(s-z1) willbe-360?, asshown inEquation 9.10. 2 ? -j2 ? -2 ? j2 s ? 2 ?z1 =?(s-z1)0? ? -90?? -180?? -270?? -360? (9.10) Similarly, thenet changes ofthephases ?p1 = ?(s- p1)and?p2 =?(s-p2)willbealso-360?, respectively, since these two poles are also enclosed by Gs. Hence,the net change of the phase of F(s) and the number of encirclements Nof the origin by GF can be summarized asfollows: ?z1 - (?p1+?p2 +?p3) =(-360?)-[(-360?)+(-360?)+0?] ? N=Z-P=1-2 =-1 Note thata -360? phase change isequivalent toone clockwise encirclement oftheorigin byGF. In this example, wehave witnessedthat the polesand zeros of F(s) that are not enclosedby Gs will not affectthe numberof encirclements of the origin by GF. However,they do affect the magnitudeof F(s), and consequently will change the shape of GF. In the following example, we will see how the removal of the pole p3from the F(s) of the previous example will affect the contour mapping. Example 9.6 (A Pole or Zero Outside Gs Does Not Affect the Encirclement Change the Shape of Contour Mapping GF) The complex rational function Number N, but Will F(s) under consideration hereis almost the same asthat considered in the previous example, except that the pole p3 outside Gsis removed. Thatis, F(s) = s-z1 = s-1 (s-p1)(sp2) (s+1-j)(s+1-j) = s-1 s2 +2s+2 (9.11) The simple closed path Gsis still the same, whichis a circle centeredatthe origin of the s-plane with radius equal to 2. For the sake of clarity, Gsis partitioned into two segments: Segment (1) is in red, which isthelower halfcircle, starting from s =2and ending ats =-2,and segment (2)isinblue, which is theupper half circle, starting from s =-2and ending ats =2. Theimage of segment(1) of Gsis shownin the right graphof Figure 9.5 assegment(1) of GF,alsoin ) = 0.5, red. It can beseen thatthestarting point s =2is mapped to F(2)=0.1, s = -j2to F(2e-j90? ) =j1.978, and s =-2finds itsimage atF(-2)= -1.5onGF. , s = j2, and s = 2 are mapped Similarly, thefourpoints onsegment (2)ofGs: s =-2,s =2e j136.4? and s = 2e-j136.4?to F(2e-j136.4? ) = 0.5 and to F(-2)=-1.5,F(2e j136.4? ) = -j1.978, F(j2) =F(2e-j90? F(2) = 0.1, respectively, on GF. Notethat GFis symmetrical with respect to the real axis, and it encircles the origin of the F-plane once, counterclockwise. Hence,the number of clockwise encirclements of the origin by G 9.2 Contour Fig. 9.5: Complex contour Mapping and Cauchys Principle mapping for Example of the Argument 305 9.6 . is N=-1.Recall that thenumber ofpoles ofF(s) enclosed byGs isP=2,and thenumber ofzeros ofF(s) enclosed byGs, isZ=1.Therefore, N=-1 =Z-P=1-2,which isconsistent with the result of Theorem 9.4. Notethat the N, Z, and P numbers are the same asthose in Example 9.5, but the shape of contour mappingGFis very different from that in Example9.5. In the next example, we will observe how the contour mapping GF and its clockwise encirclement number around the origin will be affected if the zero, z1,inside Gsis removed. Fig. 9.6: Complex contour mapping for Example Example 9.7 (A Change of the Number of Poles or Zeros Inside Number N of GF Around the Origin) The complex rational function F(s) under consideration 9.7. Gs Will Affect the Encirclement here is almost the same as that considered in the previous example, except that the zero, z1,inside Gsis removed. Thatis, F(s) = 1 1 = (s-p1)(sp2) (s+1-j)(s+1-j) 1 = s2 +2s+2 (9.12 306 9 Time Delay, Plant Uncertainty, and Robust Stability The simple closed path Gsis still the same, which is a circle centered at the origin of the s-plane with radius equal to 2. Forthe sake of clarity, Gsis partitioned into two segments: segment (1) is in red, which isthelower halfcircle, starting from s =2and ending ats =-2,and segment (2)isinblue, which is theupper half circle, starting from s =-2and ending ats =2. Theimage of segment (1) of Gsis shown in the right graph of Figure 9.6 assegment (1) of GF, also ) = inred. It can beseen that thestarting point s =2is mapped to F(2)=0.1, s = -j2to F(2e-j90? 0.1+ j0.2, s =2e-j120? to F(2e-j120? to F(2e-j144? ) =-0.5, and s =2e-j144? ) =-j0.688, and s =-2 finds itsimage atF(-2)=0.5onGF. Similarly, theimage ofsegment (2)ofGs canbefound asthe conjugate of the image of segment (1), as shown in the right Notethat GFis symmetrical graph of Figure 9.6. with respect to the real axis, and it encircles the origin of the F-plane twice, counterclockwise. Hence, thenumber ofclockwise encirclements oftheorigin byGF is N=-2. Recall that the number of poles of F(s) enclosed by Gsis P = 2, and the number of zeros of F(s) enclosed byGs is Z=0.Therefore, N=-2=Z-P=0-2,which isconsistent with theresult of Theorem 9.4. 9.3 Nyquist Path, Nyquist Plot, and Nyquist Stability Criterion As mentionedin the beginning of the chapter, for the typical feedback control system shown in Figure 9.7, the closed-loop system stability is determined by the closed-loop 1+L(s) where L(s) =G(s)K(s) is the loop transfer function, system characteristic equation, = 0 (9.13) and G(s) and K(s) are the system to be controlled (called the plant) and the controller, respectively. The closed-loop system is stable if and only if all the roots of the characteristic equation are in the strictly left half of the complex plane. One wayto check the stability of the closed-loop system is to solve the equation for all the roots. This approach may become tedious or evenimpossible if the equation is of high order or hasinfinite number of roots. As described in Example 9.1, a system with time delay is an infinite-dimensional system whose characteristic equation has an infinite number of roots. Fig. 9.7: Atypical feedback control system block diagram for Nyquist stability analysis. 9.3.1 Nyquist Path The Nyquist stability stability analysis approach without the need of finding provides an alternative the roots of the characteristic way to check the closed-loop equation. The tool system Nyquist employed to solve the very important engineering problem wasthe Cauchy complex integral theorem or Cauchys principle of the argument, which was briefly reviewed in Section 9.2. In order to find if there is any closed-loop system pole (the characteristic equation roots) in the right half of the complex plane 9.3 Nyquist Path, Nyquist Plot, and Nyquist Stability Criterion 307 Nyquist took two brilliant steps: (1) Create a special simple closed path Gs,now called Nyquist path or Nyquist contour, to enclose the entire right half of the complex plane; (2) Define the mapping function (9.14) F(s) = 1+L(s) so that the zeros of F(s) are the closed-loop system poles. The Nyquist pathis a simple closed path Gsthat encloses the entire right half of the complex s-plane, as shown in Figure 9.8. The mappingfunction F(s), which is the closed-loop characteristic function, is assumedto have no poles or zeros on Gs.If F(s) has a pole onthe imaginary axis of the s-plane, atiny semicircle contour withradius e will be employedto go aroundit, asshownin Figure 9.8b. If F(s) has no poles onthe imaginary axis, the Nyquist path Gs will look like the one shown in Figure 9.8a. For clarity, the Nyquist pathis divided into the following three segments: 1: Segment (1) starts from the origin of the s-plane, moving up on the imaginary axis with s = j?, ?=0?8. 2: Segment (2)isahuge semicircle with s =limRejf and f =90??0??-90?. R?8 3: Segment (3)isthecomplex conjugate ofSegment (1),which starts from s = -j8,moving upon the imaginary axis back totheorigin ofthes-plane (i.e., s=j?, ? =-8?0). In the casethat F(s) has a pole at the origin, asshown in Figure 9.8b, the Nyquist path Gs will have four segments with a tiny semicircle segment (4) inserted between segments (3) and (1): 1: Segment (1)starts from s =je,moving upontheimaginary axiswith s =j?, ?=e ?8. 2: Segment (2) is a huge semicircle with s = lim R?8 Rejf and f =90??0??-90?. 3: Segment (3)isthecomplex conjugate ofsegment (1),which starts from s =-j8,moving uponthe imaginary axiswith s =j?, ? =-8?-e. 4: Segment (4)isatinysemicircle with s =limee jf and f =-90??0??90?. e?0 Fig. 9.8: The Nyquist path is a simple closed paththat encloses the right half of the s-plane 308 9 9.3.2 Time Nyquist Delay, Plant Uncertainty, and Robust Stability Plot Similar to the complex contour mapping we did in Section 9.2, an F(s) mapping of the Nyquist path Gscan be produced as GF on another complex plane, the F(s)-plane. This GF plot is called the Nyquistplot of F(s). Then,accordingto Cauchysprincipleofthe argumentin Theorem9.4, wehave N= Z-P,where Nisthenumber ofclockwise encirclements oftheorigin byGF, andZandPare the numbersof zerosand poles of F(s) enclosed by Gsin the s-plane. Since F(s) andthe loop transfer function L(s) share the same poles, P is the number of the poles of L(s) in the right half of the s-plane, whichis usually given or can beeasily computed. The encirclementnumber Ncan becountedfrom GF, the Nyquist plot of F(s). Therefore, we will have Z = N+P, which is the number of zeros of F(s) enclosed by Gs,or, equivalently, the number of the closed-loop system poles in the right half of s-plane. The closed-loop system is stable if and only if Z = 0. In the following example, we will construct the and use it to determine the stability Example 9.8 (Construction Consider the feedback the characteristic Nyquist plot for a simple feedback control system, of the system. of Nyquist Plot of F(s) for a Simple Feedback Control System) control system shown in Figure 9.7, where the loop transfer function function F(s) of the closed-loop L(s) = 2 s-1 s+1 L(s) and system are given as ? F(s) =1+L(s) =3s-1 s+1 (9.15) respectively. It is easy to seethat F(s) has one zero, s = 1/3, in the right half of s-plane and,therefore the closed-loop system is unstable. However, we will employ this simple example to demonstrate how to usethe Nyquistapproachto determinethe number of zeros of F(s) enclosedbythe Nyquistpath Gs. Since F(s) = 1+L(s), we will construct GL,the Nyquist plot of L(s) first, and then shift the graph of GLto the right by one unit to obtain the Nyquist plot of F(s). The procedure for constructing GL,the Nyquist plot of L(s), is given asfollows: 1: On segment (1)oftheNyquist path Gs, we have s =j?,and? =0?1?8.Then thetrajectory of L(j?) =2 j?-1 j?+1 =2 v ?2 +1ej(p-?) v?2 +1ej? = 2ej(p-2?) will be a red upper semicircle, shown in Figure 9.9(b), L(j0) = 2ejp to L(j1) = 2ejp/2 and ending at L(j8) where ? =tan-1? with radius equal to 2, starting (9.16) from = 2. 2: Segment (2)isahuge semicircle with s =limRejf andf =90??0? ?-90?. With s =Rejf, R?8 wehave lim L(Rejf) R?8 hence, the entire segment (2) semicircle = lim 2 R?8 is Rejf-1 = 2 Rejf (9.17) +1 mapped to the single point (2, j0) on L-plane indi-cated by a green dot in Figure 9.9(b). 3: The image of segment (3) is the blue lower semicircle with radius equal to 2, starting from L(-j8)=2toL(-j1)=2e-jp/2 andending atL(j0) =-2,which isthecomplex conjugate of the image of segment (1). Now we havethe Nyquist plot of L(s), GL, on the L-plane, as shown in Figure 9.9b. Since F(s) = 1+L(s), the Nyquist plot of F(s), GF can be obtained by simply moving GLto the right by one unit, as shown in Figure 9.9c. It can be observed that the Nyquist plot of F(s) on the F-plane, GF, encircle 9.3 the origin (0, j0) clockwise one time, Nyquist Path, which indicates Nyquist Plot, and Nyquist that the encirclement Stability Criterion number is 309 N= 1. Recall thatF(s) andL(s) share thesame poles, and theonlypole ofL(s) iss =-1,which isnotenclosed by Gs;hence, the number of poles ofF(s) enclosed by Gsis P= 0. Therefore, according to Theorem 9.4, principle of the argument, we have the number of zeros of F(s) enclosed by Gsis Z = N+P = 1+0 = 1, which implies that the closed-loop system is unstable because it has one pole in the right half of the complex s-plane. Fig. 9.9: Construction of Nyquist plots of L(s) and F(s) for the simple feedback control system in Example 9.8. The Nyquist plot graph on Figure 9.9(b) is obtained using the following % CSD Fig9.9b Nyquist plot based on MATLAB code: mapping figure(5) theta=linspace(0,pi/2,500); re_L=2*cos(pi-2.*theta); im_L=2*sin(pi-2.*theta); plot(re_L,im_L,'r-'), axis([-2.5,2.5,-2.5,2.5]), hold re_L=2*cos(pi-2.*theta); on, theta=linspace(pi/2,pi,500); im_L=2*sin(pi-2.*theta); plot(re_L,im_L,'b-'); axis([-2.5,2.5,-2.5,2.5]); grid, The same Nyquist plot can also be obtained using the following % CSD s=tf('s'); Fig9.9b Nyquist plot L=2*(s-1)/(s+1); using MATLAB commands: nyquist(L) figure(21), nyquist(L) Remark 9.9(The Number of Encirclements of the Origin(0, j0) by GF Equalsto That of the Crit-ical Point (-1,j0)byGL) From Figures 9.9c and 9.9b, it can be easily observed that the number of clockwise encirclements of the origin (0, j0) by GFis exactly the same asthe number of clockwise encirclements of the critical point (-1,j0)byGL. For thisreason, itisnotnecessary toconstruct theNyquist plotofF(s). From now on,wewilljustemploy theNyquist plotofL(s), GL, together with thecritical point (-1,j0)to determine the stability of the closed-loop system 310 9 9.3.3 Time Nyquist Delay, Plant Stability Uncertainty, and Robust Stability Criterion From these discussions, the Nyquist stability analysis can be summarized in the following Theorem 9.10 (Nyquist Stability Criterion theorem. Theorem) Supposethe s-plane Nyquist contour Gshas an image in the L-plane that encircles the critical point -1+j0clockwise Ntimes.Moreover, suppose therearePpoles ofL(s) intherighthalfs-plane. Then thenumber ofunstable closed-loop system poles isZ= N+Psince N=Z-P,asshown inTheorem 9.4, Cauchys principle ofthe argument. Remark 9.11 (Comment Nyquists theorem on Proof of the Theorem) simply restates Cauchys principle of the argument in Theorem 9.4 as the number ofclosed-loop system poles intheRHP equals thenumber ofclockwise encirclements ofthe-1+j0 point in the L-plane plus the number of the loop transfer function polesin the RHP. Example 9.12(Nyquist Plot of L(s) with a Pole at the Origin and a Parameter K) Considerthe feedback control system shown in Figure 9.7, wherethe loop transfer function the characteristic function F(s) of the closed-loop system are given as L(s) = K(s-1) and s(s+1) F(s) = 1+L(s) = 1+ K(s-1)= s2+(K+1)s-K s(s+1) s(s+1) L(s) and (9.18) respectively. It is easy to seethat the closed-loop characteristic equation is s2+(K+1)s-K =0 and according to Routh-Hurwitz stability criterion, the closed-loop system is stable if and only if the parameter Ksatisfies the following inequality: K+1>0 and -K>0, Fig. 9.10: Construction of Nyquist plot of L(s) control system in Example 9.12 orequivalently, -1 <K<0 with a pole at origin and a parameter Kfor the feedback 9.3 However, this example is here transfer function will then Nyquist Path, mainly to demonstrate Nyquist Plot, and Nyquist Stability how to construct the Criterion Nyquist 311 plot of the loop L(s) that has a pole at the origin and a design parameter K. The Nyquist plot of L(s) be used together with Theorem 9.10, the Nyquist stability criterion, to determine the number of closed-loop system poles in the RHP. Notethat the Nyquist path Gsshown in Figure 9.10(a) consists of four segments. Segment (4), atiny semicircle with radius e around the pole at the origin, is added to fulfill the assumption that Gsshould not have poles on it. The procedure to constructing 1: GL,the Nyquist plot of L(s) with K> 0, is given asfollows: Onsegment(1) of the Nyquist path Gs,the variable s = j?, is assumedto be movingalong the imaginary axis following ? =e ?1?8.The corresponding image onL-plane, GL, willbe K j?-1) = K vv?2 +1 ej(p-?) ej(p/2-2?) where ? =tan-1? (9.19) L(j?) = K( ? j?( j?+1) which is in red ?2 +1 ejp/2e j? with label (1) passing through K ejp/2 L(je) =lim = 8ejp/2 e?0e Notethat L(j1) = ? the following three points: K )e-jp/2 ?L(j1)=K ?L(jR)=lim R?8( R = 0e-jp/2 (9.20) = K > 0 meansthat when ? = 1 rad/s, segment (1) of the Nyquistimage GL intersects the real axis of the L-plane at (K, j0), as shown in Figure 9.10(b). 2: Segment (2)isahuge semicircle, with s =limRejf and f =p/2?0?-p/2. With s =Rejf, we R?8 have lim L(Rejf) K(Rejf -1) = lim R?8Rejf(Rejf+1) R?8 p -p e-jf =0e-jf, where -f= ?0? 2 2 R?8 R = lim K (9.21) hence, the entire segment (2) semicircle is mapped to the single point (0, j0) on the L-plane, indicated by a green dot in Figure 9.10(b). 3: Theimage of segment (3) is in blue with label (3) passing through the following three points: K ejp/2 L(-jR)=lim R?8 R =0ejp/2 K ?L(-j1)=K?L(-je)=e?0 lime e-jp/2 =8e-jp/2 (9.22) 4: Segment (4)isatinysemicircle with s =e?0 limee j?and?=-p/2?0 ?p/2.With s =ee j? and?=-p/2?0?p/2,we have lim K j?-1) L(eej?) =lim eejK(ee ?(ee j?+1) =lim eej(p-?) = 8ej(p-?) e?0 e?0 e?0 (9.23 where p-?=3p 2 ?p ?p hence, thetinysemicircle, segment (4),is mapped tothehuge semicircle with radius R ?8 passing through the following three points on the L-plane: 2 L(ee-jp/2) = 8ej3p/2 ?L(ee j0)=8e jp ?L(ee jp/2)=8e jp/2 (9.24) Now we havethe Nyquist plot of L(s), GL, on the L-plane, as shown in Figure 9.10(b) for the case withK>0.The number ofclockwise encirclements ofthecritical point (-1,j0)bytheNyquist plot GLis N= 1. Meanwhile,the numberof the poles of L(s) enclosedby Gsis P= 0. Hence,according 312 to 9 Time Delay, Plant Nyquist stability Uncertainty, criterion, and Robust Stability Z =N+P= 1+0 = 1, which implies that the closed-loop system has one pole in the RHP;therefore, the closed-loop system is unstable. For the case with K < 0, this procedure can be usedto obtain the Nyquist plot of L(s), GL, which isshown inFigure 9.10(c). Notice that thenumber Nofclockwise encirclements of(-1,j0)bythe Nyquist plot GLis dependent onthe intersection of GL with the real axis. If the intersection point is be-tween (-1,j0)and (0,j0),or,equivalently, -1 <K<0,theencirclement number is N=0.Hence, according to Nyquist stability criterion, Z = N+P = 0+0 = 0, which implies that the closed-loop system has nopole intheRHP; therefore, theclosed-loop system isstable when -1 <K<0. If K<-1,theintersection point oftheNyquist plotGLwith therealaxiswillbeontheleft side ofthecritical point (-1,j0).Under thiscondition, thenumber ofclockwise encirclements of (-1,j0) bythe Nyquist plotGLwillbeN =2,which leads to Z = N+P=2+0 =2.Therefore, the closed-loop system is unstable since it hastwo poles in the RHP. Segments (1) and (3) of the Nyquist plot graph on Figures 9.10(b) are obtained using the following MATLAB % CSD code: Fig9.10b Nyquist plot Ex9.12 hold on, figure(6), theta=linspace(pi/8,(pi+0.01)./2,500); re_L=(1./tan(theta)).*cos(pi/2-2.*theta); im_L=(1./tan(theta)).*sin(pi/2-2.*theta); plot(re_L,im_L,'r-'), theta=linspace(-(pi-0.01)/2,-pi./8,500); re_L=(1./tan(theta)).*cos(pi/2-2.*theta); im_L=(1./tan(theta)).*sin(pi/2-2.*theta); plot(re_L,im_L,'b-'), grid, The same Nyquist plot graph also can be obtained using the following % CSD Fig9.10b K=1, s=tf('s'); Nyquist plot Ex9.12 use L=K*(s-1)/(s*(s+1)); MATLAB commands: nyquist(L) figure(22), nyquist(L) Example 9.13(Construction of Nyquist Plot of L(s) with a Polein RHP and a Parameter K) Forthe feedback control system shown in Figure 9.7, assumethe loop transfer function L(s) is given as L(s) Then we havethe characteristic function = 0.6K F(s) of the closed-loop system as follows, 0.6K F(s) = 1+L(s) = 1+ (9.25 (s-0.5)(s2 +s+1) = (s-0.5)(s2 +s+1) s3+0.5s2 +0.5s+0.6K-0.5 (s-0.5)(s2 +s+1) Note that the loop transfer function L(s) has a pole in the RHP and a design parameter K, which is to be determined so that the closed-loop system is stable. The Nyquist stability analysis approach will be employed to achieve the objective. As wedid in the previous examples, the first step is to construct the Nyquist plot of L(s) andthen use it together with Theorem 9.10, the Nyquist stability criterion, to determine the number of closed-loop system poles in the RHP. Sincethe loop transfer function L(s) has no poles on the j?-axis, the Nyquist path Gsconsists of onlythree segments,as shownin Figure 9.11(a). The procedureto constructing GL,the Nyquist plot of L(s) with K = 1.3,is given asfollows: 9.3 1: Nyquist Path, Nyquist Plot, and Nyquist Stability Onsegment (1) of the Nyquist path Gs,the variable s = j?, is assumed to Criterion 313 movealong the imaginary axis following ?=0?0.707 ?8.Then, the trajectory of L(j?) = 0.6K (j?-0.5)(-?2 +j?+1) = 0.6K -0.5(?2+1)+j?(?2-0.5) (9.26) (0.52 +?2)((?2 -1)2+?2) willbeasolid green curve labeled as(1),shown inFigure 9.11(b), starting fromL(j0) =-1.2K= -1.56 to L(j0.707) = -0.8K= -1.04 andending atL(j8) =0.Note thatsegment (1)ofthe Nyquist plot GL with K = 1.3, the solid green curve, intersects the negative real axis of the L-plane at these three points. 2: Segment (2)isahuge semicircle ofGs, with s =limRejf and f =p/2?0?-p/2.With s =Rejf, R?8 wehave lim L(Rejf) R?8 0.6K = lim R?8 (Rejf-0.5)(R2e j2f +Rejf+1) = lim R?8 K R3e-j3f =0e-j3f 2 ; hence,the entire segment (2) semicircle is where -3f =p 2 ?0? -p point (0, j0) on the L-plane, as shown in Figure 9.11(b). 3: The image three of segment (3) with K= 1.3 is in dashed green (9.27) mappedto the single with label (3) passing through the follow-ing points: K Re-jp/2 L(-jR)=lim R?8 = 0e-jp/2 ?L(-j0.707) =-0.8K =-1.04 ?L(-j0)=-1.2K =-1.56 (9.28) Fig. 9.11: Construction of Nyquist plot of L(s) with an RHP pole and a parameter Kfor the feedback control system in Example 9.13. Withthree K values, we havethree corresponding double-crossing Nyquist plots of L(s), GL, on the L-plane, as shown in Figure 9.11(b). Notethat each Nyquist plot intersects with the negative axis twice. The Nyquist plot in green is for the case with K= 1.3. The number of clockwise encirclements of the critical point (-1,j0),marked astheblack dot,bytheNyquist image GL, is N=1.Meanwhile, the number of the poles of L(s) enclosed by Gsis P = 1. Hence,according to Nyquist stability crite-rion, Z = N+P = 1+1 = 2, which implies that the closed-loop system has two poles in the RHP 314 9 therefore, Time Delay, Plant the closed-loop Uncertainty, and Robust Stability system is unstable when K = 1.3. Forthe case with K = 1, this procedure can be repeated to obtain the Nyquist image of L(s), GL,as shown in Figure 9.11(b) in red labeled with K = 1. The red mapping contour intersects the real axis at the following three points: (9.29) L(j0) =-1.2K=-1.2 , L(j0.707)=-0.8K=-0.8 , L(j8) =0 It also encircles thecritical point (-1,j0)once, counterclockwise; hence, thenumber ofclockwise encirclement of(-1,j0)bytheredGL is N= -1.With P=1,wehave thenumber ofunstable closed-loop system poles Z= N+P =(-1) +1=0.Therefore, the closed-loop system isstable when K = 1. The Nyquist plot of L(s), GL,associated with K = 0.8 is in blue, labeled with K = 0.8, asshown in Figure 9.11(b). The blue mapping contour intersects the real axis at the following three points: L(j0) =-1.2K=-0.96,L(j0.707)=-0.8K=-0.64,L(j8) =0 (9.30) It does notencircle thecritical point (-1,j0),which implies N=0.Thus, thenumber ofunstable closed-loop system poles is one since Z = N+P = 0+1 = 1. Therefore the closed-loop system is unstable when K = 0.8. Next, we would like to find the range of the design parameter K so that the closed-loop system is stable. It is observed that the Nyquist plot GLconsists of two loops attaching together on the negative real axis atheL =-0.8K intersection point. The rightend oftheright loop isalways connected tothe origin oftheL-plane, but theleftend oftheleftloop isL =-1.2K. The encirclement direction ofthe left loop is counterclockwise, but the right loop is circling in the opposite direction. For the closed-loop system tobestable, thecritical point (-1,j0)has tobeinside theleftloop. Therefore, theclosed-loop system is stable if and only if the following two inequalities are satisfied: -1.2K<-1 and -1 <-0.8K (9.31 which is equivalent to 5 6 The intersection imaginary <K< 5 4 points of the Nyquist plot GL with the real axis can be obtained from setting the part of Equation 9.26 to zero. That is, v ?(?2 -0.5) =0 ? ?=0 or ? = 0.5=0.707rad/s Then we havethe two intersection L( j0) points onthe real axis at = 0.6K -0.5(0+1) (0.52+0)((0-1)2+0) =-1.2K -0.5(0.5+1) L(j0.707) =0.6K (0.52+0.5)((0.5-1)2+0.5) =-0.8K Furthermore, as??8,theNyquist plotGLwillalso intersect thereal axis atheorigin oftheL-plane, since L(j8) =0. The Nyquist plot graph on Figure 9.11(b) is obtained using the following MATLAB code: 9.3 % CSD Fig9.11b Double-crossing Nyquist Path, Nyquist Nyquist plot Plot, and Nyquist Stability Criterion 315 Ex9.13 figure(8) K=1, num=0.6*K; den=[1 0.5 0.5 [re,im]=nyquist(num,den,w); axis([-1.7,0.1,-0.4,0.4]), hold [re,im]=nyquist(num,den,w); Fig9.11b K=1, s=tf('s'); on, w=-w; grid Nyquist % CSD w=logspace(-3,2,500); plot(re,im,'r--'), axis([-1.7,0.1,-0.4,0.4]), The same -0.5]; plot(re,im,'r-'), plot graph can also be obtained Double-crossing Nyquist using the following plot Ex9.13 L=0.6*K/((s-0.5)*(s2+s+1)); use MATLAB commands: nyquist(L) figure(22), nyquist(L) or s=tf('s'); L=0.6/((s-0.5)*(s2+s+1)); figure(23), nyquist(L,1.3*L,0.8*L) 9.3.4 Stability Issue Arising from As briefly described in Feedback Control System with Time Delay Section 9.1.1, time the delay time is over some limit. delay in a feedback Since feedback control control heavily system may lead to instability depends on the if measured or estimated information of reality to perform continuous control corrections to achieve stability and desired perfor-mances, the control system maynot be able to perform correct control action in time if the sensor is too slow to provide accurate timely delay can transform information. an originally Since an infinite-dimensional From the analysis in simple first-order system Example system to a complicated has infinite 9.1, infinite welearned that a time dimensional poles, there is no way to compute system. all of them and check if they are all in the left half of the complex plane. As we have studied in the previous sections, the Nyquist stability criterion is capable of effectively counting the number of infinite-dimensional closed-loop system poles in the RHP without the need to compute all the poles. In the following, the Nyquist stability analysis approach will be employed to investigate how the delay time T will affect the stability of the closed-loop system. Example 9.14 (Construction of Nyquist Plot of L(s) with a Time Delay Parameter T) Considerthe feedback control system shown in Figure 9.7, wherethe loop transfer function the characteristic function F(s) of the closed-loop system are given as L(s) = 2e-sT s+1 1 , F(s) = 1+L(s) = s+1 L(s) and ?3+(1-2T)s+T2s2 - T3s3 + ? 1 3 (9.32) respectively. Theloop transfer function L(s) has a pole, butit is not in the RHP. Thus,the integer number Pis zero in the Nyquist stability criterion equation Z =N+P. Therefore, the closed-loop system is sta-ble if andonly ifthenumber ofclockwise encirclements Nofthecritical point (-1,j0)byGL, the Nyquist plot of L(s), is zero. Notethat if the delay time T is nonzero, the characteristic function will haveinfinite numbers of zeros, which meansthat the closed-loop system has aninfinite F(s) number of poles. The construction of the Nyquist plot for an infinite-dimensional system is basically the same as that forfinite-dimensionalsystems.SinceL(s) hasno polesonthe j?-axis ofthe s-plane,the Nyquistpath will include the same three segments, as shown in Figure 9.12(a). The procedure to constructing GL,the Nyquist plot of L(s) with delay time T = 1.0 s, is given as follows. We will see how the variation of T affects the performance of the closed-loop system after the Nyquist plot is completed 316 1: 9 Time Delay, Plant Uncertainty, and Robust Stability Onsegment(1) ofthe Nyquistpath Gs,the variables = j? is assumedto movealongthe imaginary axis following ?=0 ?2.029 ?8.Then the trajectory ofthemapped contour willbedetermined by the following L(j?) = equation: 2e-j?T 1+ j? 2 2 where ? =tan-1?(9.33) = v1+?2ej?e-j?T= v1+?2e-j(?T+?) This polar form complex function can also be written in the following L(j?) = 2 2 v1+?2 cos(?T+?)- jv 1+?2 sin(?T+?) rectangular form: where ? =tan-1? When?increasesfrom 0to 4.913,the valuesofthe complexfunction L(j?) to Equation 9.33 to generatethe following ? (9.34) will changeaccording tabulated chart: 0 ? 0.861?2.029? 3.426? 4.913 ?L( j?) 0 ? -p/2 ? -p ? -3p/2? -2p (9.35) |L(j?)| 2 ? 1.516?0.884? 0.56 ? 0.399 It starts from L( j0) = 2 and will spiral around the origin clockwise, with decreasing radius via thepoints L(j0.861) =1.516e-jp/2, L(j2.029) =-0.884, L(j3.426) =0.56e-j3p/2, toarrive at L(j4.913) = 0.399e-j2p to complete the first spiraling cycle. As ? continues to increase, the Nyquist plotGL will spiral around theorigin infinite times and approach theorigin as??8. The trajectory Fig. 9.12: is shown in red, labeled as(1), shown in Figure 9.12(b). Construction of Nyquist plot of L(s) for a feedback control system with a time delay T in Example 9.14. 2:Segment (2)isahuge semicircle ofGs, with s=limRejf and f =p/2?0?-p/2.With s =Rejf, R?8 wehave lim R?8 L(Rejf) = 2 lim ? eRT(cosf+jsinf)(Re jf R?8 +1) ?=0 (9.36 9.3 Nyquist hence, the entire segment (2) semicircle is shown in Figure 9.12(b). 3: Path, Nyquist Plot, and Nyquist Stability Criterion 317 mapped to the single point (0, j0) on the L-plane, as Theimage of segment (3) is in blue with label (3), whichis the conjugate of the image of segment (1). Thered andthe blue GLtrajectories aresymmetrical withrespectto the real axis. Now we havethe complete Nyquist plot of L(s), GL,for the system with delay time T = 1s. Sincethe leftmost intersection point of GL with the negative real axisis on the right-hand side of thecritical point (-1+j0),thenumber ofclockwise encirclements of(-1,j0),marked asthered dot, by the Nyquistimage GL,is N = 0. Meanwhile,the number ofthe poles of L(s) in the RHPis P = 0. Hence, according to Nyquist stability criterion, Z = N+P = 0+0 = 0, whichimplies that the closed-loop system has no poles in the RHP; therefore, the closed-loop system is stable when the delay time is T = 1s or less. The Nyquist plot graph on Figure 9.12(b) is obtained using the following % CSD Fig9.12b K=1, T=1, Nyquist plot Ex9.14 Effect of time MATLAB code: delay w=linspace(0,50,1000); re=K*2./sqrt(1+w.2).*cos(w.*T+atan(w)); im=-K*2./sqrt(1+w.2).*sin(w.*T+atan(w)); figure(30), plot(re,im,'r-'),title('Nyquist plot'), w=linspace(-50,0,1000); hold on, re=K*2./sqrt(1+w.2).*cos(w.*T+atan(w)); im=-K*2./sqrt(1+w.2).*sin(w.*T+atan(w)); figure(30), plot(re,im,'b-'),title('Nyquist plot'), grid, The same Nyquist plot graph also can be obtained using the following % CSD Fig9.12b T=1, num=2; Nyquist plot den=[1 Ex9.14 Time delay Use MATLAB commands: Nyquist(L) 1]; L=tf(num,den,'InputDelay',T), figure(25) nyquist(L) Critical Delay Time From the Nyquist plot graph GLin Figure 9.12(b), it is observed that the leftmost intersection point of GL will moveto the left if the delay time Tincreases. Based on Equations 9.33 and 9.34, we will have L(j?) =-1,which means GL intersects thereal axis at(-1,j0),ifthere exists adelay time Tcand a frequency ?cso that the following two equationsaresatisfied: 2 ? 1+?2 The solution of the equations =1 and provides the smallest ?c = ?cTc +tan-1?c = p (9.37) c delay time that v would destabilize the system: 2p 3 =1.732 rad/sandTc=3 v3 =1.209s (9.38) As shown in Figure 9.13(a), if the delay time is T = Tc = 1.209s, the Nyquist plot GLtrajectory will intersect thenegative realaxis at(-1,j0)when ? =?c=1.732 rad/s (i.e.,L(j1.732) =-1). If the delay time of the system is greater than the critical delay time, T > Tc = 1.209s, the leftmost intersection point ofGL ontherealaxiswillbeontheleft-hand side of(-1,j0),asshown in Figure 9.13(b), and then thenumber ofclockwise encirclements of(-1,j0)byGLwillbecome N=1.Hence, the number of closed-loop system poles in the RHP will be one since Z =N+P = 1+0 = 1 according to the Nyquist stability criterion. Therefore, the closed-loop system is unstable if the delay time Tis greater than the critical delay time Tc = 1.209s 318 9 Time Delay, Plant Uncertainty, Fig. 9.13: and Robust Stability Critical delay time that will destabilize the system. Bode Plot Perspective In Example 9.14, the Nyquist plot of the loop transfer function L(s) and the Nyquist stability criterion were employed to investigate the stability issue caused by time delay in a feedback control system. In the following example we will consider the same system regarding the same stability issue, but the main tool is the Bode plot instead of the Nyquist plot. Recall that the Bode plot and the second-order were introduced in Section 2.5.4 and Section 3.7, respectively, systems in the study of steady-state sinusoidal response. for the first-order For a quick review, consider a typical closed-loop system, as shown in the block diagram of Figure 9.7, where the loop transfer function is L(s), and the overall closed-loop transfer function between the input R(s) and the output Y(s) is M(s) as described in the following: Y(s) = L(s) 1+L(s) R(s) :=M(s)R(s) (9.39) Forthe output response y(t) of a stable closed-loop system M(s), dueto aninput r(t), we usually are interested in both of its steady-state response yss(t) and the transient response ytr(t). However,for many applications we may only be interested function (e.g., r(t) = cos?(t)). in the steady-state response if the input r(t) is a sinusoidal Then the steady-state output response can be easily obtained as yss(t) =Acos(?t +?) where A=|M(j?)| and?=?M( j?) (9.40) Note thatboth themagnitude |M(j?)|and thephase ?M( j?) are functions ofthefrequency ?. Whenthe frequency of the sinusoidal input signal varies, the amplitude andthe phase of the steady-state sinusoidal response will change accordingly. The Bode plot consist of the magnitude and phase plots to explicitly exhibit their values at eachfrequency of interest. Example 9.15 (Bode Plot Perspective of the Stability Issues Caused by Time Delay) In addition to being an effective are important tools for feedback graphical display control systems of the frequency design. response However, in almost of a system, all feedback Bode plot control sys-tems design and analysis, weemploy the loop transfer function L(s) instead of the closed-loop transfer function M(s)in the design/analysis process. For the same reason, the Bode plot of th 9.3 Nyquist Path, Nyquist Plot, and Nyquist loop transfer function L(s) (not the closed-loop transfer function the stability margins of the closed-loop system. Stability Criterion 319 M(s)) will be constructed to de-termine Forthe loop transfer function of a system with time delay T, L(s) = 2e-sT (9.41 s+1 L(j?) can beexpressedin polarform as: L( j?) = 2e-j?T 2 2 e-j(?T+?), where ? =tan-1? (9.42) = v1+?2ej?e-j?T= v1+?2 1+ j? Then we have the magnitude and the phase of L( j?) in dB and degree, respectively, asfunctions of frequency in rad/s in the following: |L(j?)|dB=20log10 |L(j?)| =20log102-10log10(1+?2) ?L( j?) =-180(?T+tan-1?)/p (9.43) The Bode plot of the loop transfer function L(s) for three delay times, T = 1s, T = 1.209s, and T = 2s, are shown in Figures 9.14(a), 9.14(b), and 9.14(c), respectively. Thesethree Bode plot are associated with the three Nyquist plots shown in Figure 9.12(b), Figure 9.13(a), and Figure 9.13(b), re-spectively. Note thatthemagnitude plots |L(j?)|dB versus ?areallidentical, since thetimedelay only affects the phase. Larger delay time causes more phase shift. The Bode plot for the case with delay time T = 1.209s is shown in Figures 9.14(b). It can be seen thatatthefrequency ? =1.732 rad/s, thephase is ?L( j1.732) =-180? and themagnitude is |L(j1.732)|dB =0dB, which means thattheNyquist plotoftheL(s)withdelay timeT =1.209s in-tersects , since 0dB therealaxis oftheL-plane atthecritical point L(j1.732) =1 e-j180? delay time is the critical than Tc = 1.209s. delay time Tc,for the system to be stable, the delay time The Bode plot for the case with delay time T = 1s are shown in Figures 9.14(a). = 1. This must be smaller Whenthe phaseis -180?, thefrequency is ?=2.029 rad/s,and themagnitude is|L(j2.029)|dB =-1.07dB, which means thatL(j2.029) =0.884 e-j180? , since-1.07dB =0.884. This 1.07dB =1.131 gainmargin means that the magnitude is allowed to increase by 1.131 times before the system become unstable. The defini-tion of the stability gain margin will be officially defined in the next section. The Bode plot for the case with delay time T = 2s are shown in Figure 9.14(c). Whenthe phaseis -180?, thefrequency is ? =1.145 rad/s,and themagnitude is|L(j1.145)|dB =2.385dB, which means ,since 2.385dB =1.316. This -2.385dB =0.76 gainmargin means that thatL(j1.145) =1.316e-j180? the magnitude needs to decrease to 76% for the system to become stable. The Bode plot graphs in Figure 9.14(a)(b)(c) are obtained using the following % CSD K=1, Fig9.14 T=1, Bode plot Ex9.15 Time w=logspace(-1,0.36,500); phase=-(w.*T+atan(w))*180/pi; subplot(2,1,1), title('Magnitude semilogx(w,phase,'r-'),title('Phase delay and stability mag=K*2./sqrt(1+w.2); magb=20*log10(mag); figure(31), semilogx(w,magb,'r-'), response in dB'), grid, response subplot(2,1,2), in deg'), grid, MATLAB code: 320 9 Time Delay, Plant Uncertainty, and Robust Stability Fig. 9.14: Bodeplot of the loop transfer function L(s) = 2e-sT/(s+1) 1.209s, The same Bode plot can be obtained using the following % CSD K=1, with delaytime T = 1s, T = and T = 2s, respectively. Fig9.14 T=1, Bode num=2; plot Ex9.15 den=[1 1]; Time 9.16 (Bode figure(25), Plot and The Bode plot and the systems other very Use Nyquist bode(L,w), grid Plot) Nyquist plot are both important design and analysis. bode(L,w) w=logspace(-1,0.36,500); L=tf(num,den,'InputDelay',T), Remark delay MATLAB commands: frequency-domain graphical tools for con-trol Either one alone has its pros and cons, but they compensate well. The Nyquist plot, together with the Nyquist stability criterion, successfully for each address the stability issue of the infinite-dimensional systems and provide a meaningful measureof robust stability for control systems. However,the Nyquist plot does not explicitly display the magnitude, the phase, and the frequency as clearly as the Bode plot. Onthe other hand, the information provided by the Bode plot alone is not enough for stability analysis because it only considers s = j?, the positive imaginary axis of the s-plane, not the whole Nyquist contour. In some cases,the Bode plot can be a more precise and effective tool in control systems design. For a feedback control negligible. Then it is clear that the increase system with time delay, usually the system is assumed stable of the delay time can only when the delay time is make the system less stable. In this case, the Bode plot can be very effective in the design of a compensator to offset the influence of the time delay on the closed-loop system. A Simple Compensation to Improve the Stability of a System with Time Delay Example 9.17 (A Simple Stability Compensator to Offset the Time Delay Influence on the Closed-loop Sys-tem 9.3 From the stability analysis Nyquist of the system Path, Nyquist considered in Plot, and Nyquist Examples Stability 9.14 and 9.15, Criterion 321 we have learned that the closed-loop system will become unstable if the delay time is greater than the critical delay time Tc = 1.209s. For the case with delay time shown in the Nyquist plot in Figure 9.13(b) and the By comparing the Bode plots in T = 2s, the closed-loop Figures system is apparently unstable, as Bode plot in Figure 9.14(c). 9.14(a) and 9.14(c), we can see that the difference is in thesign o|fL(j?)|dB athephase-crossover frequency. When thesign isnegative, asinFigure 9.14(a), |L(j?)|dB= -1.07dB, theclosed-loop system isstable. On theother hand, when thesign ispositive, asinFigure 9.14(c), |L(j?)|dB=2.39 dB, theclosed-loop system isunstable. Thus, itis possible to findacompensator toreduce the|L(j?)|dB toanegative value sothattheclosed-loop system will become stable. Fig. 9.15: Bodeplot of the loop transfer function L(s) = 2Ke-sT/(s+1) the proportional control with delaytime T = 2s and K = 1 and K = 0.631, respectively. Later in Section 9.6, the concept of frequency loop-shaping will beintroduced in control system design, which can be employed to target some specific frequency range. For now, we will just insert a simple constant proportional controller Kto the loop transfer function so that L(s) will be L(s) = 2Ke-sT (9.44) s+1 Thenthe magnitudein dB andthe phasein degreeof L(j?) will become |L(j?)|dB=20log10 |L(j?)| =20log102+20log10K-10log10(1+?2) (9.45) ?L( j?) =-180(?T+tan-1?)/p Notethat adding the proportional controller K only changesthe magnitude while the phaseremains unchanged. If 20log10K ischosen tobe-4dB,which isequivalent to K=0.631, then the|L(j?)|d 322 9 Time magnitude Delay, Plant plot curve Uncertainty, will and Robust Stability move down by 4dB, as shown in Figure 9.15(b). Since the phase plot ?L( j?) remains the same, and the phase-crossoverfrequency is still at ? = 1.145rad/s, the value of|L(j?)|dB at hephase-crossover frequency willbe|L(j1.145)|dB =-1.61dB. Therefore, thein-sertion oftheproportional control compensation with 20log10K = -4dB has transformed anunstable system to a stable system The Nyquist with a 1.61dB stability plot associated with the gain Bode plot margin. of the compensated system is shown in Figure 9.15(c). The intersection ofGLwith thenegative realaxis isnow atL(j1.145) =-0.831, which is on the right-hand side of the critical point (marked as a red dot). Thus, the number of the clockwise encirclements of(-1,j0)byGLhas changed fromN=1to N=0,and therefore the closed-loop system has become stable since the Z = N+P = 0+0 = 0. number of unstable closed-loop system poles is now 9.4 Robust Stability Now let us consider the essential value of Nyquists stability robustness with respect to not so much with intentional variations variations, theorem; it allows in the loop transfer such as compensator us a direct function method of evaluating variation. Our concern is gain or pole and zero locations, but with unintended and uncertain deviations of the plant parameters from the design model. Webegin with the assumption that the system is stable (i.e., it satisfies the Nyquist criterion). The Nyquist criterion ustwo direct and useful measuresof robustness. Thefirst, as noted, is the admissible variation gain without the loss of closed-loop stability. Thisis called the gain margin. Recall that the gain margin concept derives from the fact that multiplication of the loop transfer gives of loop func-tion L(s) by the positive number K expands or contracts the Nyquist image to a point whereit crosses over the(-1,j0)point intheL-plane. Alternatively, we can consider rotating theimage until theim-age crosses the(-1,j0)point, thereby changing thenumber ofencirclements and violating thestability criterion. Note that because of symmetry of the Nyquist image with respect to the real axis, the rotation can be clockwise or counterclockwise. The admissible rotation angle is called the phase margin. The phase margin indicates the additional phase lag of the loop transfer function that can betolerated without destabilizing the closed-loop system. The gain and phase margins can be determined from either the Nyquist or Bode plot, as indi-cated in Figure 9.16(a) and (b). 9.4.1 Gain and Phase Margins The gain and phase margins can be obtained Nyquist clear physical plot exhibits either from the Nyquist meaning of the gain and phase plot, or from the Bode plot. margins, but its visual The presentation does not provide precise readings of the margins and the frequencies at which these margins are mea-sured. Onthe other hand, the Bode plot alone do not provide enough information to determine if the system is stable. However, if the system has been known stable, the Bode plot can be employed to provide precise readings of the gain and phase margins and the frequencies at which these margins are measured. Reading Gain Margin from Nyquist Plot In the partial Nyquist plot of L(s) shown in Figure 9.16(a), the gain marginis determined by the position of the intersection (the blue dot) of the Nyquist image GL(the blue curve) andthe negativereal axis. The intersection position is represented by the complex number on the L-plan 9.4 Robust Stability ?L( j?p) ??180? ? 323 (9.46) ? where ?pis called the phase-crossoverfrequency at which the phase of L(j?p) is 180?. The gain margin is defined by the following equation: j?p) ?L( j?p) ?L( GM=? ? ? dB =-20log10 ? (9.47) ? ? Fig. 9.16: Positive gain and phase margins defined on Nyquist plot in (a), and the corresponding gain and phase margins shown on Bode plot in (b). Ifthisintersection point isbetween theorigin (0,j0)and thecritical point (-1,j0)(the reddot), which means theintersection is ontheright-hand side of(-1,j0),then themagnitude ?L( j?p) ?will ? be less than 1 and the gain margin (GM) margin does not mean it is stable. ? will be positive. A closed-loop system with a positive gain However, if the system is stable when the intersection point is between (-1,j0)and (0,j0),then thesame system willcontinue tobestable as longastheinter-section point remains inside the interval. The gain marginis a good indication on how much gain variation is allowed for the system to stay stable. For example, iftheintersection isat(-0.1,j0)or0.1?180?, thegain margin willbe GM=-20log100.1 =20dB and the system will remain stable if the system gain will notincrease to ten times of its original gain. On theother hand, if theintersection point isat(-0.8,j0)or0.8?180?, thegainmargin willbe GM=-20log100.8 =1.94 dB and the system gain will only need to increase by 25% (or become 1.25 times of its original value) to move the intersection point totheother side otfhecritical point (-1,j0)todestabilize thesystem. Ifthe intersection point moves totheother side otfhecritical point (-1,j0),thenumber ofencirclements o 324 9 Time Delay, Plant Uncertainty, and Robust Stability (-1,j0)bytheNyquist image contour willchange; hence, thestability status oftheclosed-loop system will change according to the Nyquist stability criterion. Therefore, the system will be more stable if the absolute value of gain margin is larger, or if the intersection point ?L( j?p) ??180? isfurther away from the critical point (-1, j0). ? ? Reading Gain Margin From Bode Plot Although the Nyquist plot clearly shows the intersection point of the Nyquist image GL with the negative real axis, it does not reveal the phase-crossover frequency. Since the Bode plot explicitly show both the magnitudeandthe phaseof L(j?) asfunctions ofthe frequency,they provide moredetailedinformation. As defined in Equation 9.47, the gain margin is determined by the magnitude of ?L( j?p) ??180?. The ? ? phase-crossover frequency, ?p, isthefrequency atwhich thephase ofL(j?)is180? or-180?. From the Bode plot shownin Figure 9.16(b),it is easyto seethat the ?L(j?) phasecurve intersects the -180?horizontal line when thefrequency ?is thephase-crossover frequency ?p.Draw avertical straightline atthe phase-crossoverfrequency, ?p = 15.8rad/s, and extendthis line upto intersectthe |L(j?)|dBmagnitude curve. Then, thevalue of|L(j?)|dBat?p=15.8 rad/scanberead from thegraph as dB=-8.8dB.Therefore, thegainmargin is ?L( j?p) ? ? ? ?L( j?p) GM=? Reading Phase Margin From Nyquist ? dB = 8.8 d ? Plot In the partial Nyquist plot of L(s), shown in Figure 9.16(a), the phase margin is determined by the intersection (the purple dot) of the Nyquist image GLand the unit circle centered at the origin. The intersection position is represented by the complex number onthe L-plane 1 ?L( j?g) (9.48) where ?g is called the gain-crossoverfrequency at which the ?L( j?g) ? ? ? magnitude of L(j?g) is one, or dB = 0 dB. Thephasemargin is definedbythe following equation: P.M. =?L( j?g)-180? (9.49) Just like the perturbation of the gain, the variation of the phase of the loop transfer function L(s) can also destabilize a system. Recallthat in Section 9.3.4, a time delay will cause a phaselag in the Nyquist plot of L(s). A system with larger absolute value of phase margin will be more robust against the phase variations of the system. Reading Phase Margin From Bode Plot Asdefinedin Equation9.49,the phase marginis determinedbythe phaseof L(j?) atthe gain-crossover frequency ?g,the frequency at whichthe magnitude dB = 0 dB. Thefirst step is to find the gain-crossoverfrequency ?g. Fromthe Bode plot shown in Figure 9.16(b), it is easyto ?L( j?g) ? is 1, or ?L( j?g) see that theintersection ofthe|L(j?)|dB curve with the0dBhorizontal lineonthemagnitude plot ? ? ? ? ? occurs when the frequency ? is the gain-crossover frequency ?g. Draw a vertical straight line at the gain-crossoverfrequency, ?g = 9.2rad/s, and extendthis line downto the phaseplot to intersect the ?L( j?) curve. The value of ?L(j?g) at ?g = 9.2rad/s can bereadfrom the phaseplot that ?L(j?g) is -162?. Therefore, thephase margin isP.M.=-162? -(180?) =18?. 9.4 9.4.2 Effect of the In this section, Gain of Loop Transfer we will consider Function two examples on Gain and that exhibit Phase Robust Stability 325 Margins how the gain of the loop transfer function L(s) will affect the stability of the closed-loop system. Example 9.18 (Stabilize an Consider a closed-loop Originally system Unstable with the following L(s) = From the partial Nyquist found the gain and phase System to a Desired plot and the Gain Margin) loop transfer function: 20000 (9.50) s3 +55s2 +250s Bode plot in Figures 9.17(a) and 9.17(b), respectively, we have margins of the system as follows: dB=-3.4dB where?p=15.8 rad/s ?L( j?p) P.M. =?L( j?g)-180? =-6?where ?g=19rad/s GM=? ? ? (9.51) Notethat the system has negative gain and phase margins,since the Nyquistimage GLintersects the negative real axis atheleft-hand side otfhecritical point (-1,j0).Ingeneral, asystem with negative gain or phase the partial margin Nyquist does not plot and the mean the closed-loop system is unstable. Bode plot is not enough to determine The information if the closed-loop given by system is stable. However,it is quite straightforward to check the closed-loop stability by solving the three roots of the characteristic equation or using the Routh-Hurwitz criterion, or the Nyquist stability criterion based on the complete Nyquist plot. The system is indeed unstable, but both the gain and phase margins are small. Againmargin of-3.4dBmeans thatit onlyrequires asmall gain reduction ofL(s) to67% of its original gain to stabilize the closed-loop system. Fig. 9.17: The gain and phase margins of the unstable closed-loop Assumethe loop transfer function L(s) structure is slightly system in modified t Example 9.18 326 9 Time Delay, Plant Uncertainty, and Robust Stability L(s) = where Kis a constant gain to be designed. 20000K (9.52) s3 +55s2 +250s The system is the same as the original one if K = 1. In gen-eral, this Kcan be afunction of s, or K(j?) is afunction of frequency ?, sothat the systemcan be designed to satisfy multiple design objectives like robust stability, disturbance reduction, and control-input constraints. Here, we will assume Kis just a constant parameterto be determined so that a robust stability objective can be achieved. Now theclosed-loop system isunstable with gain margin -3.4 dBand phase margin -6?.Ww e ould like to design a simple improved constant controller Kso that the closed-loop system is stable with gain mar-gin to 14.6 dB. Since the change of K will not affect the phase, the phase plot will remain the same. From the Bode plot inFigure 9.18(b), itcan beseen that thegain and phase margins will improve ifthe |L(j?)|dB curve is moved down on the magnitude plot while the phase plot remains unchanged. Fig. 9.18: Illustration ofreducing Kto move down the|L(j?)|dB curve toimprove thegain and phase margins of an originally unstable closed-loop system in Example 9.18. The graphs in Figures 9.18(a) and (b) show the differences between the original system (with K= 1) and the modified system (with K = 1/8) in the Nyquist plot and in the Bode plot. The Nyquist plot shows that the Nyquist image GL has movedits intersection point with the negative real axis from the black dotposition, crossing over thereddotcritical point (-1,j0),tobecome stable toward theblue dot position. The Nyquist plot shows clearly that an obvious robust stability improvement has been achieved, but it does not reveal the details quantitatively. The Bode plot shows clearly that if the objective is to achieve a gain margin of 14.6 dB, then K needs tobereduced toalevel sothat the |L(j?)|dB curve canmove down by18dBonthemagnitude plot. The 18 dB reduction of gain is approximately equivalent to reducing Kfrom 1to 1/8 9.4 Robust Stability 327 With K = 1/8, the Nyquist plot and the Bode plot have been modified to those shown in Figures 9.19(a) and (b), respectively. It can be seen that the phase-crossover frequency is still at ?L( j?p) -3.4dBto14.6 dB.Although thephase plotremains unchanged, thegain-crossover frequency has changed from?g=19rad/s to?g=6.2 rad/s, and thephase margin has improved from-6?to ?p = 15.8 rad/s, but dueto the 18 dB reduction of ? ? ? dB,the gain margin hasimproved from 31?. Fig. 9.19: Illustration of reducing margin by 37? in Example 9.18. Kfrom 1 to 1/8 to improve the gain margin by 18 dB and the phase The Nyquist plot graph in Figure 9.19(a) is produced using the following % CSD Fig9.19a K=1/8; Nyquist num=20000*K; plot den=[1 Ex9.18 Gain 55 0]; [re,im]=nyquist(num,den,w); plot'), [x,y]=meshgrid(t); Fig9.19b phase hold on, Bode num=20000*K; Figure 9.19(b) plot Ex9.18 den=[1 [mag,phase]=bode(num,den,w); 55 margins plot(re,im,'-r'), t=2.9:pi/20:4.8; plot(cos(t),sin(t),'k--'); The Bode plot graphs in K=1/8; & w=linspace(5,100); figure(103), title('Nyquist % CSD 250 MATLAB code: axis are obtained Gain 250 & 0]; equal; using the following phase grid MATLAB code: margins w=linspace(4,20); magb=20*log10(mag); figure(104), subplot(2,1,1), plot(w,magb,'-r'), title('Magnitude subplot(2,1,2), plot(w,phase,'-r'), title('Phase in in deg'), dB'), grid, grid In the following example, we will revisit the system considered in Example 9.13. The system has a double-crossing Nyquist image that intersects the negative real axis twice. Recallthat, according to the Nyquist stability criterion, the closed-loop system will be stable when these two intersections are attheopposite sides ofthecritical point (-1,j0).Furthermore, thegain margins aredetermined bythe The gain margin for the intersection on the right is positive while the two intersection positions. other has a negative gain margin 328 9 Example Time Delay, Plant 9.19 (A System Uncertainty, with and Robust Stability Double-crossing Nyquist Image Has Positive and Negative Gain Margins at the Same Time) Fig. 9.20: Revisitthe double-crossing Nyquist image of Example 9.13that has positive and negative gain margins at the same time in Example 9.19. The system considered in Example 9.13 has a double-crossing 9.11. Its loop transfer function is L(s) = Nyquist image, as shown in Figure 0.6K (s-0.5)(s2 +s+1) A partial Nyquist plot and the Bode plot of L(s) with K = 1 are shown in Figures 9.20(a) and (b), respectively. Note that the Nyquist image GLintersects the negative real axis of the L-plane at the following two points: v L(j0) =-1.2andL(j 0.5)=-0.8 It has been shown in Example 9.13that the system is stable. According to the definition of gain and phase margins,the system has phase margin PM = 13? but hastwo gain margins GM1 =-20log100.8 =1.9382 dB andGM2 =-20log101.2 =-1.5836 dB The positive gain margin on the right is GM1 = 1.9382 dB. It meansthat the gain of the loop transfer function Kis allowed to increase to K= 1.25 without destabilizing the closed-loop system. On theother hand, thenegative gainmargin GM2 =-1.5836 dBindicates thattheclosed-loop system can stay stable aslong as Kis not reduced to below K= 5/6. In other words,the closed-loop system is stable if and only if 5/6 <K< 1.25 Notethat the stability range ofK derived in terms of the two gain marginsis consistent withthe inequality in Equation 9.31, which wasfound based on the Nyquist stability criterion 9.5 The Nyquist % CSD plot graph in Fig9.20a Figure Nyquist 9.20(a) is produced plot Ex9.19 Generalized Stability using the following Double-crossing Two MATLAB gain Margins 329 code: margins figure(105), K=1, num=0.6*K; den=[1 0.5 0.5 -0.5]; w=linspace(0,10,500); [re,im]=nyquist(num,den,w); plot(re,im,'r-'), axis([-1.7,0.1,-0.4,0.4]), grid The Bode plot graphs on Figure 9.20(b) are obtained using the following % CSD K=1, Fig9.20b Bode num=0.6*K; plot den=[1 Ex9.19 0.5 [mag,phase]=bode(num,den,w); subplot(2,1,1), -0.5]; Two gain margins w=linspace(0,0.8,100); magb=20*log10(mag); figure(106), plot(w,magb,'-r'), title('Magnitude grid, Double-crossing 0.5 MATLAB code: response subplot(2,1,2), in dB'), plot(w,phase,'-r'), 9.5 Generalized Stability grid Margins As described in the previous section, the gain and phase perturbation is allowed at the phase-crossover frequency margins are good indications and how of how much gain much phase variation is permitted at the gain-crossover frequency, respectively. However, these two stability margin measuresonly reveal the robust stability information at two frequencies, not the whole frequency spectrum. Further-more, these two measures only work for SISO (single-input/single-output) systems. The attempt of extending the concept of robust stability marginsto MIMO (multi-input, multi-output) systems was not successful until 1966 whenthe small gain theorem was discovered. Fig. 9.21: Atypical feedback control system with unstructured norm-bounded plant uncertainties. 9.5.1 Small Gain Theorem and Robust Stability Consider the feedback control system with plant uncertainties shown in Figure 9.21. The nominal plant modelis represented by G,and the set of uncertain plants is described by G = ? G ~: G ~=(I+?)G,where ?(s) ?RH8 and s[?(j?)]=?(?) ? Here, RH8 represents the set of rational function (9.53) matrices with real coefficients that are analytic (have no poles)in the closedright half complex plane,ands [X] standsfor the maximumsingular value of X, or, equivalently,the squareroot ofthe maximumeigenvalue of X*X, where X*is the conjugatetransposeof the complex matrix X. The positive real scalar function ?(?) prescribes the maximum magnitude variation of the uncertain plant dynamics at all frequencies according to the practical system an 330 its 9 Time Delay, Plant working environment. Uncertainty, In reality, and Robust Stability the discrepancy between the nominal model and the real system is larger at higher frequencies, and, thus, extra care needsto be given for high-frequency dealing with robust stability uncertainties in issues. The unstructured plant uncertainties include unmodeled dynamics and any variation caused by envi-ronmental parameters, whichare unknownexceptthe boundednorminformation in ?(?). To determine a necessary and sufficient condition so that the uncertain closed-loop system is stable seems to be a very difficult problem. Surprisingly, this challenging robust stability design problem wassolved in an effec-tive and elegant fashion, as shown below in the Small Gain Theorem. First, let usintroduce the concept of sensitivity function and complementary sensitivity function. Remark 9.20 (The Sensitivity and Complementary Sensitivity Functions) Consider the feedback control system shown in Figure 9.21, where Gand G ~ arethe nominaland the perturbed modelsof the systemto becontrolled, respectively,and ? representsa set of plant uncer-tainties. In general, the controller Kis designed sothat the closed-loop system has desired performance. There aretwo closed-loop transfer functions that are central to understanding the performance of feed-back systems. These are the sensitivity function, S(s), and the complementary sensitivity function, T(s). Let the loop transfer function (LTF) be denoted by L(s) = G(s)K(s) (9.54 and define S(s) =[I+L(s)]-1 and T(s) = L(s)[I+L(s)]-1 For the feedback control system of Figure 9.21, if input, then the relationship between the reference input (9.55) ? = 0 and d = 0, where d is the disturbance R(s) =L[r(t)] and the tracking error E(s) = L[e(t)] is E(s) =[I+L(s)]-1R(s) = S(s)R(s) Thus, a smaller S(s) will lead to a smaller tracking/regulation 0, then the relationship between the disturbance input D(s) = error. Similarly, if ? = 0 and r = L[d(t)] and the output disturbance response Y(s) =L[y(t)] is Y(s) =[I+L(s)]-1D(s) Hence, a smaller S(s) will also imply = S(s)D(s) a smaller disturbance response. Onthe other hand, as will beseenin the Small Gain Theorem below that a smaller complementary sensitivity function T(s) will produce better robust stability. That is, to achieve smaller tracking/reg-ulation error, less disturbance so that the sensitivity response, function However, it is impossible and better robust stability, and the complementary to reduce sensitivity both at the same time we would like to design a controller function are both small, if possible. and at the same frequency since the sum of S(s) and T(s) is a constant: S(s)+T(s) Nevertheless, plant while the =[I+L(s)]-1 uncertainties disturbances +L(s)[I+L(s)]-1 are more significant and the reference inputs =[I+L(s)] in [I+L(s)]-1 high frequency usually range =I than occur in low frequency low fre-quencies range. Therefore, thecontroller can bedesigned tominimize |S(j?)|inlow frequency range while reduc-ing |T(j?)|athigh frequencies. 9.5 Theorem 9.21 (Small Gain Theorem for Consider the feedback control system Generalized Stability Margins 331 Robust Stability) with plant uncertainty described by the block diagram shown in Figure 9.21 and by the set of uncertain plants satisfying the bounded norm condition described in Equation 9.53. Theloop transfer function matrix L(s) andthe complementary sensitivity function matrix T(s) ofthe nominal closed-loop system are defined in Equations 9.54 and 9.55, respectively. If the nominal closed-loop system C(G,K), which is the closed-loop system with ? = 0 or G ~ =G,is stable,thentheuncertainclosed-loop systemCG ? ~,K? isstableif andonlyif thefollowing inequality is satisfied: s [T( j?)] Note that the small gain theorem < 1 for all ?(?) for robust stability ? (9.56) works for both MIMO and SISO systems, and the plant G(s) is not restricted to be a square matrix. The theorem also covers the whole spectrum of frequencies. Therefore, it provides margins. The physical sense of the may not be very clear to much more general applications maximum singular most of the undergraduate value, than the classical gain and phase which is the norm employed in the theorem, students at this moment. However, for the application of the theorem to SISO systems, the maximum singular valuess [T( j?)] ands [?( j?)] are simply the magnitudes |T(j?)|and |?(j?)|,respectively, asshown inthefollowing corollary. Corollary 9.22 (Special Case of the Small Gain Theorem for SISO Systems) Consider the same feedback control system with plant uncertainties described by Figure 9.21 and Equation 9.53 except that all matrix functions are replaced by their scalar function counterparts and s [?(j?)] =?(?)isregarded as |?(j?)| =?(?) Thenthe uncertainclosed-loopsystemC?G~,K? is stableifand onlyifthe followinginequalityis satis-fied: 1 |T(j?)| < ?(?) 9.5.2 Interpretation of the Generalized Stability for all ? (9.57 Margins In the previous subsection, Section 9.5.1, welearned that a generalized frequency-dependent stabil-ity margin function can be obtained from the small gain theorem. The uncertain closed-loop system C ?G~,K ? is stable if and only if 1 where |?(j?)| =?(?) forall ? |T(j?)| < ?(?) For example, if|T(j?1)|=0.5, then themaximum allowable variation of|?(j?1)|has tobeless than 2. Otherwise, the system will become unstable. To guarantee the closed-loop system to be robustly stable, themaximum allowable variation of|?(j?)|has tobeless than 1?|T(j?)|forall?. Hence, naturally, a generalized stability margin function M(?) M(?) can be defined asfollows: ? s[T(j?)] =1|T( j?)| = 1? (9.58) 332 9 Time Delay, Plant Uncertainty, and Robust Stability Fig. 9.22: The generalized stability margin function M(?) isthe inverse of|T(j?)|. Example 9.23 (Generalized Stability Margin FunctionM(?) and |T(j?)|) Considerthe feedback control system with plant uncertainties shown in Figure 9.21. The loop trans-fer function of the system is given as L(s) = G(s)K(s) = 5000 s(s2 +55s+250) (9.59 The complementary sensitivity function of the system is T(s) = L(s)[I+L(s)]-1 and themagnitude plotofT(j?),|T(j?)|dB, can beobtained, asshown inFigure 9.22. ForMIMO systems,this plot wouldhavebeenthe maximum singularvalueplot ofs [T( j?)]. Onthis complementarysensitivity plot, it can beseenthat at ? = 9.36rad/s, wehave |T(j9.36)|dB =10.28 dB ? |T(j9.36)| =3.27? M(9.36) =1/3.27 =0.306 which means that themaximum allowable magnitude variation of|?(j9.36)|, toavoid destabilizing the system, is0.306. Ifthevariation of|?(j9.36)| is more than 0.306, thesystem willbecome unstable. Similarly, thevalues of|T(j?)|at?=13.4 rad/s,?=15.8 rad/s, and?=19.3 rad/s are computed respectively as follows: |T(j13.4)|dB =0dB ? |T(j13.4)| =1 ? M(13.4) =1/1=1 |T(j15.8|dB =-4.84 dB ? |T(j15.8)| =0.573? M(15.8) =1/0.573 =1.745 |T(j19.3)|dB =-10 dB ? |T(j19.3)| =0.316? M(19.3) =1/0.316 =3.165 Therefore, themaximum allowable magnitude variations of|?(j?)|atthese three frequencies so that the system willremain stable are |?(j13.4)| =1,|?(j15.8)| =1.745, and |?(j19.3)| =3.165, respectively. Note thatasmaller |T(j?)| allows more magnitude perturbation atthatfrequency, and the generalized stability margin function is the reciprocal of the magnitude of the complementary sensitivity function. Itisalso observed that |T(j?)|isdecreasing atthehigh frequency region, which meansthe high frequency components of the system are allowed larger uncertainties. 9.5 Generalized Stability Margins 333 The |T(j?)| plotgraph onFigure 9.22 isobtained using thefollowing MATLAB code: % CSD Fig9.22 |T(jw)| num=5000; den=[1 % Complementary T = plot 55 function feedback(L,1); Ex9.23 0]; Generalized stability margin L=tf(num,den); T=L*inv(1+L); w1=linspace(1,35); svTb=20*log10(svT); grid 250 figure(100), plot(w1,svTb), svT=sigma(T,w1); title('sigma of T'), grid on, minor From these discussions, welearn that the maximum singular value of the complementary sensitivity function,s [T( j?)] for MIMOsystems,orthe magnitudeofthe complementarysensitivityfunction, |T(j?)|for SISO systems, provides important stabilitymargin information forthewhole frequency spectrum. This information is critical in the loop-shaping control system design to ensure robust stabil-ity. In the next subsection, we will discuss the differences between the complementary sensitivity function T( j?) and the loop transfer function L( j?) in terms of their ability to provide robust stability information. We will show that the gain and phase margins can also be obtained from the magnitude of the complementary sensitivity function. 9.5.3 Relationship Between Gain/Phase Margins and the Generalized Stability Margins In the following we will show that the gain and phase margins can be computed based onthe magnitude of the complementary sensitivity function. Theorem 9.24 (Use ?T( j?p) ?and ?T( j?g) ?toCompute the Gain and Phase Margins) ? Consider the feedback ? ? ? control system in Figure 9.21 with the loop transfer function L(s) =G(s)K(s) andthe complementary sensitivityfunction T(s) = L(s)[I+L(s)]-1. Assume?pand ?garethe phase-crossover frequency and the gain-crossover frequency, respectively. (a) If Then the gain ? ? ? ? ? and the ? ? ? ? (b) If margin (GM) ?T( j?p) ?and ?T( j?g) ?L( j?p) ?<1, the gain margin is ?? GM= 20log10 1+1 ?T( j?p) ?L( j?p) ?>1, the gain margin is ?? GM= 20log10 1-1 ?T( j?p) PM =2sin-1 ?0.5 ?? ?T( j?g) PM =-2sin-1 ?0.5 ?? ?T( j?g) phase margin (PM) ofthe system can be computed using ? ? ? (9.60) ? (9.61) ? ? ? ? (c) If?L( j?g) > p,the phasemarginis ? ? ? (9.62) (d) If?L( j?g) < p,the phasemarginis ? ? Proof: ? (9.63) 334 9 Time Delay, Plant Uncertainty, and Robust Stability ?L( j?p) ?e jpand GM = ?L( j?p) ?. Since ?L( j?p) ?<1, the equation relating the complementa sensitivity func-? 1?L( j?p) ?-1??L( ?=1+ ?T( j?p) ?= ?=?L( j?p) j?p)?L( j?p) ?T( j?p) ? ? GM=-20log10 ?L( j?p) ?=20log10 ?T( j?p) (a) According to the definition of the gain margin, we have L(j?p) -20log10 ? ? ? = ? ? tion to the loop transfer function at ? = ?p will become 1 ? 1+L( j?p) ? ? L(j?p) ? ? ? 1 1 ? ? ? ? ? ? ? 1 = ? ? ? ? ? ? ? ? Therefore, the gain margin is ? 1 1+ ? ? ? ? (b) The proof is similar to part (a) exceptthat nowthe intersection ofthe Nyquistplot of L(j?) the real axis is at the left of(-1, j0). with Thus, ?L( j?p) ?-1 ? = ???L( ?=1?= ?T( j?p) j?p) ?T( j?p) ?L( j?p) ?L( j?p) ? ? GM=-20log10 1?L( j?p) ?=20log10 ?T( j?p) ?L( j?g) ?=1,?L( j?g) =p+f, and the phase margin isPM =f. ?1+L( j?g) j?g) ?T( j?g) ?= ?=?L( j?g)?1+L( ?1+L( j?g) ?.Points A, O, and Bare on the same straight line whose ?1+L( j?g) ?T( j?g) ? ? ?T( j?g) 1 ? 1+L( j?p) ? ? ? ? ? ? L(j?p) ? ? ? ? 1 -1 = 1+ ? ? ? 1 ? ? ? ? Therefore, the gain ? ? ? margin is 1 ? ? ? ? ? (c) Since ?L( j?g) > p, we have Theequationrelatingthe complementarysensitivityfunction to the loop transfer function at ?=?g ? ? becomes 1 1+L( j?g) ? ? ? ? L(j?g) ? From the Nyquist plot graph in points A and Cis ? ? ? ? ? ? ? ? ? = ? ? ? ? Figure ? 9.23, it can be seen that the length of the straight line con-necting ? length is the diameter of the circle, whichis 2. Thetriangle ?ABC is a right triangle ?ABC is 2f, wherethe angle f is the phase margin. Hence, sin f 2 ? = andthe angle 0.5 ? ? = 2 ? ? ? and therefore the phase margin is 0.5 PM = f = 2sin-1 ? ? ? (d) The proofis similar to Part (c) and is left as an exercise. Example 9.25 (The Magnitude Plot of the Complementary with the Gain and Phase Margins) Sensitivity Function and Its Relation-ship The system considered in Example 9.23 with the loop transfer function: L(s) = G(s)K(s) = 5000 s(s2 +55s+250) (9.64) 9.5 will be employed of T(j?), gain in the following to compare the Nyquist plot, Generalized Stability Margins Bode plot, and the 335 magnitude plot whichis the complementarysensitivity function, andidentify the relationship among the margin GM, the phase margin PM, the magnitude of the complementary sensitivity function |T(j?)|,and thegeneralized stability margin functionM(?). The Nyquist plot and Bode plot of the feedback control system with loop transfer function given by Equation 9.64, are shown in Figure 9.23. These plots L(s), were shown in Figure 9.16 earlier in Sec-tion 9.4.1 to introduce how to read gain and phase marginsin the Nyquist plot and Bode plot. The plots in Figure 9.23 show more detailed geometric information that are essential for the proof in Theorem 9.24. Now,from Figure 9.23, wehavethe gain-crossoverfrequency ?g = 9.36rad/s at which L(j?g) and the phase marginis PM = f which = 1ej(p+f) = 17.5?. The phase-crossoverfrequency is ?p = 15.8rad/s at we have ?L( j?p) ?e jp ?L( j?p) ?=8.77 dB. The |T(j?)|plot, themagnitude ofthecomplementary sensitivity function, isshown inFigure 9.24. L(j?p) = ? ? and thegainmargin canbefound asGM=-20log10 ? ? Asdiscussed in Example 9.23, thismagnitude function |T(j?)|isthereciprocal ofthegeneralized sta-bility marginfunction M(?), whichspecifiesthe maximumallowable variations of ?(j?) for each ? so that the system can remain In stable. Figure 9.24, when the frequency ?T( j?g) ? is at ? = ?g, the gain-crossover frequency, we have ?T( j?g) ?=3.27 and its reciprocal, the generalize stability ?T( j?g) ??T( =3.27 value can j?g) ?=3.27 ? ? ?? ?T( j?g) ?T( j?p) ?T( j?p) ?=0.573. The reciprocal of this,M(?p) =1/0.573 = 1.745, isthe generalize stabil-it ?T( j?p) ?=0.573 value can be employed tocompute the gai ?? 1+1 ?T( j?p) =20log10 (1+1.745) =8.77 dB ? dB = 10.28 dB, which gives ? ? ? margin function M(?g) = 1/3.27 = 0.306. This 0.306 stability margin at the frequency ?g means that the variation of ?( j?g) < 0.306 will not causethe system to become unstable. In addition to this ? robust stability information regarding the maximal variation of ?(j?g), the ? be employed into to compute the phase margin, as promised by Theorem 9.24. Plugging ? ? Equation 9.62, we have the phase margin 0.5 PM = f = 2sin-1 = 2sin-1 ? ? 0.5 3.27 = 17.6? ? which is consistent withthe result obtained from the Bode plot. Atthe frequency ?p,the phase-crossoverfrequency, we have ? gives ? ? dB= -4.84dB,which ? margin. This 1.745 stability margin at the frequency will not destabilize the system. The ? margin ? using Equation ?p meansthat the variation of ?(j?p) ? 9.60, GM= 20log10 ? ? ? ? which is consistent withthe result obtained from the Bode plot. The Nyquist plot graph on Figure 9.23(a) is produced using the following % CSD Fig9.23a num=5000; w2=logspace(0.85,2); Nyquist den=[1 55 plot 250 Ex9.25 0]; |T(jw)| & Gain/phase margins L=tf(num,den); [re,im]=nyquist(num,den,w2); MATLAB code: figure(103), < 1.745 336 9 Time Delay, Plant Uncertainty, and Robust Stability Fig. 9.23: Gain and phase margins on Nyquist and Bode plots. Fig. 9.24: Gain and phase margins onthe|T(j?)|plot. plot(re,im,'r-'), [x,y] = grid on, title('Nyquist meshgrid(t); grid Fig9.23b num=5000; on Figure Bode den=[1 plot 55 w3=linspace(7,20); figure(104), hold on, t = axis 0:pi/80:6.28; equal; minor The Bode plot graphs % CSD plot'), plot(cos(t),sin(t),'m--'); 9.23(b) Ex9.25 250 are obtained |T(jw)| using the following & Gain/phase MATLAB margins 0]; [mag,phase]=bode(num,den,w3); magb=20*log10(mag); subplot(2,1,1), title('Magnitude response in dB'), plot(w3,magb), title('Magnitude response in dB'), grid on, grid minor, subplot(2,1,2), title('Phase response in deg'), plot(w3,phase), title('Phase response in deg'), grid on, grid mino code: 9.6 Essential Closed-Loop Transfer Functions and Loop Shaping 337 9.6 Essential Closed-Loop Transfer Functions and Loop Shaping In the previous section, Section 9.5, welearned that the robust stability of a closed-loop system is closely related with the complementary sensitivity function T(s) = L(s)[1+L(s)]-1 where L(s) = G(s)K(s) is the loop transfer function (LTF) (9.65) of the closed-loop system, as shown in Fig-ure 9.25. Onthe other hand, as discussed in Section 8.1.2, the tracking error response E(s), dueto the refer-ence input R(s) and the disturbance input D(s) of the same closed-loop system, shown in Figure 9.25, is given by Equation 8.4: E(s) =[1+L(s)]-1R(s)-[1+L(s)]-1D(s) Note that the tracking performance is mainly determined by the sensitivity function, S(s) =[1+L(s)]-1 (9.66) where L(s) = G(s)K(s), again, is the loop transfer function (LTF) of the closed-loop system. It can be seen that the tracking error and the disturbance response will be better if the sensitivity function S(s) can be madesmaller. Wealso learned that the robust stability margin will be larger if the complementary sensitivity function T(s) can be reduced. However,the two functions S and T can not be reduced at the same time since S+T = 1. Fortunately, the tracking reference input signal r(t) and the disturbance input d(t) usually occur in the low frequency range while the plant uncertainties only become issues at high frequencies. Forthis reason, it has been a common practice to design a controller K(s)sothat the sensitivityfunction S(j?) is smallin the low frequency range, whilekeepingthe complementary sensitivity function T(j?) small atthe high frequency end. This control system de-sign is called aloop shaping approach. Fig. 9.25: Atypical feedback control system structure. Atlowfrequencies, themagnitude oftheloop transfer function, |L|,usually is much greater than 1 so that the sensitivity function S = (1+L)-1 1 |L(j?)| |S(j?)| is approximately equal to L-1; hence, wehave atlowfrequencies when |L| ?1 (9.67) On theother hand, atthehigh frequency region, themagnitude oftheloop transfer function, |L|,is much lessthan 1 sothatthe complementary sensitivityfunction T = L(1+L)-1 is approximatelyequalto L; hence, we hav 338 9 Time Delay, Plant Uncertainty, and Robust Stability athigh frequencies when |L| ?1 |L(j?)| |T(j?)| (9.68) Therefore, the loop shaping design can be accomplished by choosing a controller K(s) so that the mag-nitude of the loop transfer function L(s) = G(s)K(s) is large in the low frequency range, but small at high frequencies. Recall that in Examples 9.23 and 9.25, weselected a controller Kto manipulate the loop trans-fer function L=KG, andthus the complementary sensitivity function T =L(1+L)-1, to achieve an acceptable robust stability requirement. In the following, we will evaluate the tracking error and disturbance response performance of the systemin terms of the sensitivity function S = (1+L)-1. Example 9.26 (Loop Shaping for Tracking Performance and Robust Stability) The system considered in Example 9.23 with loop transfer function 5000 L(s) is revisited in the following same loop shaping = G(s)K(s) to reveal the tracking = (9.69) s(s2 +55s+250) performance and the robust stability margin on the diagram. Fig. 9.26: Aloop shaping diagram showing |T(j?)|dB, |1/S( j?)|dB, and |L(j?)|dB . Three graphs|1/S( j?)|dB in blue, |T(j?)|dB ingreen, and |L(j?)|dB inredareshown on theloopshaping diagram in Figure 9.26. These graphs verify that|1/S( j?)|dB|L(j?)|dBwhen ? <4rad/s and |T(j?)|dB|L(j?)|dB when ? >20rad/s. The controller designer would liketo make |L(j?)|dB large (i.e., todecrease |S(j?)|)inthelowfrequency range andathesame time make |L(j?)|dB small (i.e., todecrease |T(j?)|)inthehigh frequency range. The high frequency portion (? >6rad/s) ofthe |T(j?)|dB graph was employed inExamples 9.23 and 9.25to respectively obtainthe generalizedstability marginfunctionM(?) andthe gain/phase mar-gins. Inthelowfrequency portion ofthe|L(j?)|dB or|1/S( j?)|dB graph, forinstance, when ?=1rad/s, we hav 9.7 Exercise Problems 339 |L(j1)|dB =|1/S( j1)|dB =26dB ? |S(j1)|=0.05 which meansthe tracking error of the reference input signal at the frequency 5%. Similarly, when ? = 0.1 rad/s, we have ? = 1 rad/s will be only |L(j0.1)|dB =|1/S( j0.1)|dB =46dB ? |S(j0.1)|=0.005 which meansthe tracking error ofthe reference input signal at the frequency ? = 0.1 rad/s will be only 0.5%. Theloop shaping graphs on Figure 9.26 are obtained using the following % Fig9.26 MATLAB code: CSD_LoopShaping_Ex9.26 num=5000; den=[1 % Complementary T = % Sensitivity 55 250 0]; function L=tf(num,den); T feedback(L,1); function S S=1-T; figure(34), sigma(inv(S),'b',T,'g',L,'r',{.1,100}), grid on Fig. 9.27: The loop transfer function (LTF) L(s) of a typical feedback control system. 9.7 Exercise Problems In the typical feedback control system shown in Figure 9.27, G(s) is the plantthe system to be controlledand K(s) is the controller to be designed to improve the performance androbust stability of the closed-loop system subject to control-input constraints. particularly focus on the robust stability requirement. function (LTF), which has been playing In the following exercise problems we will Noticethat L(s) = G(s)K(s) is the loop transfer a key role in the root locus design and Nyquist stability analysis. P9.1a: In this exercise problem, we will revisit the dual-loop motor speed tracking control system con-sidered in Example 6.1. The block diagram plant is a DC motor with transfer of the feedback control system is shown in Figure 9.28. The function G(s) = b s+a where the output y(t) and the control input u(t) represent the motor speed and the electric voltage, respectively. The controller is composed of one integrator s-1 and two constant parameters K1 and K2 340 9 Time The integrator Delay, Plant is included Uncertainty, and Robust Stability to guarantee zero steady-state error due to step tracking input, and K1 and K2 are to be determined based on the desired transient performance and robust stability subject to control-input constraints. First of all, show that the loop transfer L(s) = function is bK2 s(s+a-bK1) Fig. 9.28: A dual-loop motor speed tracking control system. P9.1b: Let b = 145.5 and a = 43.14. Find the characteristic equation of the closed-loop determine the values of K1 and K2 so that the damping ratio and the natural frequency system, and of the closed-loop system are ? = 0.9 and ?n = 50rad/s,respectively. P9.1c: With the K1 and K2 designed in P9.1b, we are ready to evaluate the performance of the closed-loop system. Assumethe control input u(t) is required to be less than 15V to avoid actuator saturation, and the reference input is expected to be below 40 rad/s. Letthe reference input be r(t) = 40us(t) rad/s. Plot the closed-loop responses y(t) and u(t). Inspect the performance of y(t) in terms of steady-state error, rise time, maximum overshoot, and settling time. Also check if the control-input constraint is sat-isfied for u(t). P9.1d: Drawthe Nyquist plot and the Bode plot of the loop transfer function L(s), andfind the phase-crossover frequency ?p,the gain margin GM,the gain-crossoverfrequency ?g, andthe phase margin PM of the system. P9.1e: Find the complementary sensitivity function T(s) = L(s)[1+L(s)]-1 Plot themaximum singular value ofT(j?),which isequal tothemagnitude |T(j?)|inthisSISO case, s[T(j?)] =|T(j?)| and comment onthe physical meaning of this plot. P9.1f: Usethe gain-crossover frequency ?g from the solution of P9.1d, and the value of ?T( j?g) ?from ? ? the|T(j?)|plotobtained inP9.1e tocompute thephase margin ofthesystem based onEquation 9.62 or Equation 9.63. Verify this result P9.1g: In almost all practical control with the PM value obtained from P9.1d. systems, time delay may occur in the process of measurement, de-cision , making,andactuatoractuation,andthelooptransferfunction needsto be modifiedas L(s)e-sTd where Tdsis the delay time. Let Td = 0.01s, draw the Nyquist plot andthe Bode plot of L(s)e-sTd, an 9.7 Exercise Problems 341 find the phase-crossoverfrequency ?p,the gain margin GM,the gain-crossoverfrequency ?g, andthe phase margin PM of the delayed system. Is the system stable? P9.1h: Find the critical delay time Tc at which the system will become unstable. Draw the and the Bode plot of L(s)e-sTc, and use these plots to verify that Tc is indeed the critical Nyquist plot delay time. P9.1i: Comment onthe controller designed in P9.1b especially based on its ability to address the robust stability issue caused by time delay. P9.2a: In this exercise problem, we will still consider the same dual-loop integral control system struc-ture shown in Figure 9.28, the same plant G(s) = but the controller parameters a better robust stability b 145. s+a = s+43.14 K1 and K2 will be designed differently against time delay. The loop transfer function so that the closed-loop will have the same form, system has as shown in P9.1a. Find the characteristic equation of the closed-loop system in terms of the parameters K1 and K2, and then determine the values ofK1 and K2 so that the damping ratio and the natural frequency closed-loop system are ? = 0.9 and ?n = 10 rad/s, respectively. ratio, but reduce the natural frequency P9.2b: by a factor of the Notice that we keepthe same damping of 5 in order to slow down the tracking response. Withthe new K1and K2 designed in P9.2a, weareready to evaluate the performance of the new closed-loop system. Let the reference input and u(t). Inspect the performance be r(t) of y(t) in terms = 40us(t) rad/s. of steady-state Plot the closed-loop error, rise time, responses y(t) maximum overshoot, and settling time. Also check if the control-input constraint is satisfied for u(t). Comparethe simulation results with those obtained in P9.1c. P9.2c: Drawthe Nyquist plot and the Bode plot of the loop transfer function L(s) and find the phase-crossover frequency?p,the gain marginGM,the gain-crossover frequency?g,andthe phasemargin PM of the system. P9.2d: Find the complementary sensitivity function T(s) = L(s)[1+L(s)]-1 Plotthe maximumsingular value of T(j?), s[T(j?)] =|T(j?)| and comment onthe physical meaning of this plot. Comparethis plot with that in P9.1e. P9.2e: Usethe gain-crossover frequency ?gfrom the solution of P9.2c, andthe value of ?T( j?g) ?from ? ? the|T(j?)|plotobtained inP9.2d tocompute thephase margin ofthesystem based onEquation 9.62 or Equation 9.63. Verify this result with the PM value obtained from P9.2c. P9.2f: Assumethere exists atime delay in the system and the loop transfer function needsto be modified , where Tds is the delay time. Let Td = 0.01s, draw the Nyquist plot and the Bode plot of to L(s)e-sTd , andfind the phase-crossoverfrequency ?p,the gain margin GM,the gain-crossoverfrequency L(s)e-sTd ?g,andthe phase marginPM ofthe delayedsystem.Is the systemstable? Compare the results withthose obtained in P9.1g. 342 9 Time Delay, Plant P9.2g: Find the critical Uncertainty, delay time and Robust Stability Tc at which the system will become unstable. Draw the Nyquist plot , and usethese plots to verify that Tcis indeed the critical delay time. andthe Bode plot of L(s)e-sTc Compare the critical delay time with that obtained in P9.1h, and give your comment. P9.2h: Comment onthe advantages andthe deficiencies of the gain and phase margins as measuresof robust stability. Fig. 9.29: P9.3a: In this exercise problem, with the same plant A PI motor speed tracking we will consider the same DC motor speed tracking G(s) = as in P9.1, but the controller control system. structure b 145. = s+a is different. s+43.14 It is the controller Kp + well-known PI (proportional plus integral) Ki s as shown in Figure 9.29. First of all, show that the loop transfer L(s) = control problem function is bKps+bKi s(s+a) Note that thisloop transfer function has azero at-Ki/Kpwhile theloop transfer functions in P9.1 and P9.2 have no zeros. P9.3b: Let b = 145.5 and a = 43.14. Find the characteristic equation of the closed-loop system, and determinethe valuesof Kpand Kisothat the dampingratio andthe naturalfrequency ofthe closed-loop system are ? = 0.9 and ?n = 50 rad/s, respectively. Noticethat the poles of this PI control system are placed at the same locations asthe poles of the system in P9.1. P9.3c: Now weare ready to evaluate the performance of the closed-loop system with the Kpand Ki ob-tained in P9.3b. Assumethe control input u(t) is required to beless than 15V to avoid actuator saturation, and the reference input is expected to be below 40 rad/s. Letthe reference input be r(t) = 40us(t) rad/s. Plot the closed-loop responses y(t) and u(t). Inspect the performance of y(t) in terms of steady-state error, rise time, maximum overshoot, and settling time, and check if the control-input constraint is satis-fied for u(t). Comparethe simulation results with those obtained in P9.1c, and give your comments. P9.3d: Drawthe Nyquist plot and the Bode plot of the loop transfer function L(s), andfind the phase-crossover frequency ?p,the gain margin GM,the gain-crossoverfrequency ?g, andthe phase margin PM of the system. 9.7 P9.3e: Find the complementary sensitivity Exercise Problems 343 function T(s) = L(s)[1+L(s)]-1 Plotthe maximumsingular value of T(j?), s[T(j?)] =|T(j?)| and comment on the physical meaning of this plot. P9.3f: Usethe gain-crossoverfrequency ?gfrom the solution of P9.1d,andthe value of ?T( j?g) ?from ? ? the|T(j?)|plotobtained in P9.3e tocompute thephase margin ofthesystem based onEquation 9.62 or Equation 9.63. Verify this result with the PM value obtained from P9.3d. P9.3g: Assumethere exists atime delay in the system and the loop transfer function needsto be modi-fied , where Tdsis the delay time. Let Td = 0.01s, draw the Nyquist plot andthe Bode plot of to L(s)e-sTd , andfind the phase-crossoverfrequency ?p,the gain margin GM,the gain-crossoverfrequency L(s)e-sTd ?g,andthe phasemarginPMofthe delayedsystem.Is the systemstable? P9.3h: Find the critical delay time Tc at whichthe system will become unstable. Drawthe Nyquist plot andthe Bodeplot of L(s)e-sTcand usethese plots to verify that Tcis indeed the critical delay time. P9.3i: Comment on the PI controller designed in P9.3b, especially on its differences from the dual-loop controller designed in P9.1b. P9.4a: In this exercise delay in problem, we will revisit the first-order Example 9.14. The loop transfer function L(s) = where T is the delay time. closed-loop control system with a time T = 0). Draw the Nyquist plot of the system is 2 s+1 e-sT First of all, assume there is no time delay (i.e., andthe Bodeplot of L(s) with T = 0, anddeterminethe gain-crossover frequency]?g rad/s,andthe phase margin PM in degrees. P9.4b: Recallthat we computed the critical delay time Tc based on Equations 9.37 and 9.38. The delay time also can be obtained using the information of the phase margin and the gain-crossover frequency. Usethe phase marginPM andthe gain-crossoverfrequency ?gin P9.4ato verify that the critical delay time is Tc = 1.209s. P9.5a: Consider the feedback control system shown in Figure 9.27 whoseloop transfer function L(s) is described by the following first-order linear system with time delay, L(s) = where b and a are real constant can be computed b s+a e-s parameters and T is the delay time. using the following formula Show that the critical if b > a: b2-a2?? ? ?v p-tan-1 b2-a2 Tc= v 1 a delay time Tc 344 P9.5b: 9 Time Delay, Plant What does it Uncertainty, and Robust Stability mean when the condition b > ais not satisfied? P9.5c: Vary the parameters b and a, one at a time, and observe how they would affect the value of the critical delay time Tc 10 State Feedbackand Linear Quadratic Optimization I Nthis chapter and the next we will focus on feedback control analysis and design based on the state-space models. The state-space approach became popular in the early 1960s beginning with the publications of Rudolf Kalman, [Kalman, 1960a,b, Kalman and Bertram, 1960, Kalman and Bucy, 1961]. Instead of frequency-domain methods(i.e., Laplace transform approaches), attention re-turned to the earlier methods of analysis and design using differential equations (e.g., [Maxwell, 1868]). The main reasons of this revolutionary paradigm shift are the following: (1) The state-space approach resolved basic theoretical problems that hadimpeded the extension of frequency-domain tools to MIMO systems; (2) The nonlinear system state-space representation is elegant and versatile, allowing systematic waysto identify the equilibriums of the system, to find alocal (linear or nonlinear) model at each equilibrium of interest that can be employed in analysis and controller design; (3) The state-space framework makesit easier to formulate the control problems as constrained optimization problems like the LQR (linear quadratic regulation), the LQG (linear quadratic Gaussian),the H2optimization, andthe H8 optimization control problems; (4) The computing capability and the miniaturization of the digital computer hasfacilitated the applications of the state-space control approaches in almost every product and every manufacturing process to achieve automation, However, the rise of the state-space approach. frequency-domain Instead, The frequency-domain any system. properties They are inseparable. by the pole locations approach the state-space performance precision, reliability, does not model framework requirement into properties In fact, the time-domain response enhance-ment. mean the end of the frequency-domain has made it design of large-scale and the time-domain and the frequency and performance possible to incorporate MIMO control systems. are still the two important responses, stability, aspects of and robustness of the system, as we have are dic-tated witnessed in Sections 2.5, 3.3, 3.4, 8.4, 8.6, 9.3, and 9.4. In the following section, we will have a brief review of what wehavelearned in the previous chapters regarding the control systems fundamentals related to the state-space approach. We will reinforce these key concepts performance formulation theory quadratic and employ them in new control system optimization with control-input design applications. constraints and discuss the solution to the optimization will be introduced optimization and employed approach to optimally can be extended in the we will incorporate control problem problem. In the next chapter, the observer estimate to the Then state-feedback the state variables more general output so that the linear feedback case 346 10 State Feedback and Linear Quadratic Optimization 10.1 Brief Review of the State-Space Approach The nonlinear state-space model was employed system in Section 4.4 because it provides to describe the dynamics the of the simple inverted best possible framework to compute pendu-lum the equilib-riums and to obtain the linearized state-space model at the equilibriums of interest via Jacobian matrices approach, as shown in Equations 4.41 and 4.42. Thelinear state-space model at each equilib-rium is described in the form: x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) where x(t)isthe21 state vector consisting theangular displacement and theangular velocity ofthe pendulum, u(t) is the control input representing the applied force, y(t) is the output representing the angular displacement of the pendulum, and the dimensions of the matrices A, B, C, and D are assumed comparable. The poles of the inverted pendulum system at the equilibrium associated with the upright pendulum position wereshown to be the eigenvalues of the A matrix, which verifies the equilibrium is unstable since one of the two poles is in the right half of the complex plane, as shown in Equation 4.42. Thelin-ear state-space modelcan befurther employed to design a state-feedback controller u(t) = Fx(t) to place the closed-loop system poles, which are the eigenvalues of the matrix A+BF, at desired locations in the left half of the complex plane to stabilize the closed-loop system and achieve de-sired performances. Although the state variables assignments are not unique, usually for variables like electrical displacements and velocities systems, the currents through mechanical systems the physi-cal are chosen to be state variables, if possible. the inductors Similarly, and the voltages across the capacitors for are practi-cal candidates to serve as state variables. In the control system design or analysis, for computational reasons, a state-space similarity transformation may be employed to change the state variables so that the state-space modelis in some special form, like the company form or the diagonal form. On most occasions, state variables are chosen after a differential equation model is obtained. However, it is possible to assign state variables before constructing the dynamics model.In Section 5.5, a direct state-space modeling approach was presented to obtain a state-space model for electrical circuits, as demonstrated in Examples 5.12 and 5.13. Chapter 6 covers systems representations flow graphs, transfer functions, state-space of interconnected systems including models, state diagrams, block diagrams, signal and the relationships among them. Masons gain formula, the state transition matrix,the Cayely-Hamilton theorem, andthe solution of the state equation are also the maintopics of the chapter. Astate diagram is a graphical representation of a state-space model in the form of signal flow graph or block diagram. Hence, it is trivial model given a state diagram and vice versa. Furthermore, the transfer function to find the state-space can be computed directly fromthestate-space model using theformula G(s)=C(sI-A)-1B+D in Equation 6.24 or obtained indirectly from the state diagram using Masons gain formula, as demonstrated in Ex-ample 6.23. Conversely, given atransfer function there areinfinitely manycorresponding state diagrams or state-space models. Depending on the need or preference, the corresponding state diagram can be in the companion form via direction realization, or in the diagonal form via parallel connection, or in any other form associated with cascade connection or feedback connection, as demonstrated in Examples 6.24, 6.25, 6.26, and 6.27. In Chapter 7, morefundamental concepts and tools of feedback control systems are provided to pre-pare for the more advanced control systems design and analysis, especially in the state space. These include advantages and limitations of feedback control, characteristic equations, poles and zeros 10.1 BIBO stability, internal and their defined stability, similarity Brief transforms State-Space Approach in state space, state-feedback 347 pole place-ment applications to control systems design and analysis. Notethat the internal stability is based on the status of every state in the state-space only in terms Review of the of the input-output stronger than the BIBO stability. after controllability relationship model while the of the system; We will discuss more about the difference and observability are officially BIBO stability hence, the internal stability was defined in general is of these two stability defini-tions defined later in this chapter. Since the performance and behavior of the system are mainly determined by its pole locations and the pole locations to improve can be altered via feedback the characteristics of the proportional controller control, of the closed-loop K will it is a common system. move the closed-loop practice to utilize As demonstrated in Section system pole locations, pole placement 3.6, the variation as shown in the right graph of Figure 3.16. Dueto the movement of the poles, the damping ratio ?, the natural frequency and the corresponding time responses will change accordingly, as shown in left graph of Figure 3.16. ?n, A similar idea wasapplied to the state-space modelsin Section 7.5 using state feedback. The state-space pole placement can be achieved by the direct approach or the transform approach. The direct ap-proach is conceptually simple, but computationally can become very complicated when the order of the system is higher than three. The transform approach requires a similarity transformation to transform the state-space model to a special companion form initially, but after that the com-putation becomes extremely simple, even the order of the system is as high as 100. The transform approach was employed in Section 7.6.4 to place the poles of the closed-loop cart-inverted pendulum system inthe lefthalfofthecomplex plane ats =-2,-8,and-4 j3toconvert anoriginally unstable system to become stable. In Section 8.6, an aircraft attempt longitudinal wasto use the classical control flight path tracking approach control with a PI controller problem was considered. together with root locus The ini-tial design (Figure 8.35) to achieve the closed-loop system stability, zero steady-state tracking error, and acceptable transient response. Dueto the RHP zeros and the phugoid (long-period) mode poles,the associated root locus diagram (Figure 8.36) does not allow much option to choose an acceptable set of closed-loop sys-tem poles to deliver an acceptable performance. The response was either extremely slow or too much oscillation, as shown in Figure 8.37. To address the issue, a state-feedback integral tracking control structure (Figure 8.38) together with root locus design was employed to achieve the objective. Since all the four state variables are assumed available for feedback to provide moreinformation than the PI controller case where only the flight path angle is assumed available for feedback, the state-feedback controller is expected to do better. Like any other viable feedback control scheme, the state feedback could not change the RHP zero po-sitions; however, it didreplace thepoles oftheloop transfer function tothenew locations, -1.7,-5.9, -1.6 j1.8,ands =0,which provides a much more favorable rootlocusdiagram, asshown in Fig-ure 8.39. Consequently, an optimal tracking integrator constant K wasselected to lead to a much better tracking performance, as shown in Figures 8.40 and 8.41. Although westill have moreto learn about the state-space approaches later in this chapter andthe following one, wehave already experienced the benefit of employing state feedback, internal model principle, and the root locus technique to design a stabilizing, tracking/regulating closed-loop con-trol system. In the following section, we will employ a rather simple second-order lightly damped position control system to demonstrate the state space/root locus pole placement approach and compare it with the traditional PID (proportional integral and derivative) control approach 348 10 State Feedback and Linear 10.2 Control of a Lightly The poor performance and oscillate Quadratic Optimization Damped Positioning System of a lightly with large amplitude, damped system, which can easily drift from its operating is common in practice; for example, the aircraft flight equilibrium dynamics like the phugoid (long-period) modeof F/A-18 has a very small damping ratio, ? = 0.1, and a quite long (62.3 seconds) oscillation period, as described in Equation 8.68. If the system is not adequately com-pensated, moderate turbulence would cause unacceptably long and large up and down oscillations in longitudinal motion and makethe aircraft very difficult, if not impossible, to maneuver. 10.2.1 A Simple Pendulum Positioning System In the following, a rather simple nonlinear lightly damped pendulum positioning system, as shown in Figure 10.1, will be employed to demonstrate how to stabilize and improve the performance of the system to a pivot using the state space/root locus pole placement with bearing so that the rod can perform approach. friction. The other end of the rod is attached with a motor/propeller, produce the torque, T, required in the control system. Fig. 10.1: A nonlinear, lightly One end of the rod is connected one degree-of-freedom swing motion without much which serves as an actuator to damped pendulum positioning system. Equations of Motion The procedure of deriving the discussed in Section dynamics 4.4 and Section 4.5. model of the pendulum By either the Newtonian positioning or the system is similar Lagrange equation to those approach, the equation of motion for the pendulum can be found as follows: J?(t)+b ??(t)+0.5mg?sin?(t)+Mg?sin?(t) = T(t) (10.1) Thetotal moment of inertia is J = J? +JM = m?2/3+M?2, where ? = 0.5 mis length of the rod and m = 0.1 kg and M= 0.1 kg are the massof the rod and the motor,respectively. Thefriction coefficient ofthepivot isassumed b=4.510-3Nm/rad/s and thegravity isg=9.81m/s2. The output ?(rad) is the angular displacementof the rod, the control input is the appliedtorque T = ?Fp(?) (Nm), and the propeller force Fp(?) is determined by the motorspeed ? (rad/s). The DC motor dynamics is described by the following equation 10.2 Control 0.0232??(t)+?(t) where E(V) is the DC motor input of a Lightly Damped Positioning System = 47.22E(t) 349 (10.2 voltage. Nonlinear State Equations and Equilibriums Withthe physical data given, the pendulum equation, Equation 10.1 becomes ? (t)+a1 ??(t)+a0 sin?(t) = b0T(t) (10.3) where a1 = 0.135, a0 = 22.073, and b0 = 30. Letthe state variables be x1(t) then the nonlinear state equation x? = Assume the associated with Equation x2 operating = f(x,T) = equilibrium is chosen to =??(t), 10.3 can be written as ???-a0sinx1-a1x2+b0T? x?1 x?2 = ?(t) and x2(t) keep the = angular ? f1(x1,x2,T) f2(x1,x2,T) displacement ? (10.4) of the pendulum at ?(t) = ?* = 15? = p/12 rad. Thenthe equilibrium ofthe systemcanbefound by solvingthe state equations with the derivative of the state variables set to zero. Now, we have ??=0 ? x2 =sin15? 0 -a1x2 -a0 +b0T =0 ? ? x*?? ? x* x?1 x?2 1 15? = 0 2 Linearized State-Space , T* = 0.19043Nm Model Next, we will find a linearized state-space modelfor the ?* = 15? equilibrium. Atthis equilibrium (x*1,x*2,T*) = (15?,0?/s,0.19043 Nm), wehavethe linearized state-space model x?(t) = x(t)+B A T(t) (10.5) wherethe matrices A and B are computed via Jacobian matricesJx and JT, respectively, asfollows: A = Jx = ?? ? ?f ?x and = x*,T* ?f1/?x1 ?f2/?x1 x?(t) = ?? p/12 x*= 0 ? = ,T* ?-a0cos(p/12)-a1? 0 ?? ? ? ?? ? ?? ????? B = JT = That is, ?f1/?x2 ?f2/?x2 x?1(t) x?2(t) 0 = ?f ?T = x*,T* 1 -21.32-0.135 ?f1/?T ?f2/?T x1(t) x2(t) 1 0 = x*,T* 0 + 30 T (t) b0 = x(t)+B A T(t) (10.6) Notethat the relationship amongthe real valuesx(t), T(t), the equilibrium valuesx*, T*, andthe differ-ential (perturbed) valuesx(t), T areshownin thefollowing: x(t) =x(t)+x*, T(t) =T(t)+T* Forinstance,xT = ? 20? 0?/s ? meansthat the real state vector is xT = ? 35? 0?/s ?, and aT revealsthat the real torque is T = T* = 0.19043 Nm. (10.7) = 0 Nm 350 10 Analysis State Feedback of the and Linear Open-Loop Quadratic Optimization System Recall that the eigenvalues of the A matrix, or the poles of the system are the roots of the following characteristic equation: ? |sI-A| = ? ? s -1 21.32 s+0.135 ?=s2 +0.135s+21.32 :=s+2??ns+?2 2 ? The roots of this characteristic n =0 ? (10.8 ? ? equation are -a j? =-0.0675j4.6169 and the corresponding damping ratio and the natural ? = 0.0146 respectively. and frequency are ?n = 4.6174 rad/s Wehavelearned from the previous chapters, especially Section 3.4.3, that the time-domain behavior of the systemis closelyrelatedto the dampingfactor a,the frequency ?,the dampingratio ?, andthe naturalfrequency ?n, which are derivedfrom the roots of the characteristic equation. Hence,it is possible to get a general idea of how the system will behave based on the information poles, or, equivalently, the roots of the characteristic equation. of the system Before conducting a computer simulation using the mathematical model, we can perform a simple virtual experiment. Imagine that a pendulum positioning system, as shown in Figure 10.1 is operating atthe ? = ?* =15?equilibrium.Thatis, the motorpropeller is providingaconstant torque T* =0.19043 Nmto keep? atthe 15?equilibrium. Now,lets perturbthe systemalittle bit by moving the pendulum upto the 35? position whilethe appliedtorque remainsthe same at T* = 0.19043 Nm. Thenreleasethe pendulumatt = 0 s and observethe pendulum angular displacement ?(t) as a func-tion of time. What will you see? The system is stable, so eventually the pendulum will go back to the equilibrium. Butsincethe dampingfactor a andthe dampingratio ? are very small, the pendulum will go down toward the equilibrium, equilibrium manytimes pass it with a large overshoot, until it is stabilized and then swing back and forth about the at the equilibrium. The oscillationfrequencyis ?=4.6169 rad/s, andthusthe oscillation periodis P=2p/?=1.361 s. The dampingfactor a = 0.0675revealsthat the oscillation amplitude will decreaseexponentially with time constantt = 1/a = 14.81s. Thatis, the oscillation amplitude will reduceto 36.8% ofits original value after t = t = 14.81 s, or, equivalently,reduce to 1.83% ofits original value after 4t = 59.2 s of time. The oscillation amplitude decreasing ? = 0.0146.The maximumovershoot is rate can also be computed v OS= e-?p/ 1-?2 using the damping ratio = 0.95516, which meansthat the oscil-lation amplitude reduces to 95.516% of its value after a half period P/2 = 0.68 s of time. Hence, after 87 half periods, which is 59.16s, the oscillation amplitude will reduce to 1.84% of its original value. A Simulink simulation of the pendulum positioning system of Equation 10.3 or Equation 10.4 withinitial angular displacementat ?(0) = 35?, whichis 20?awayfrom the equilibrium position ?* =15?,canbeconducted to obtain theoscillatory timeresponse, asshownontheleft graphof Figure 10.2, whilethe control-inputtorque is kept atthe equilibrium torque T* = 0.19043 Nm,asshown onthe right graph. The oscillation period P can be measuredfrom the peak-to-peak time onthe left graph. The time at the seventh peak is approximately overshoot OS can be computed 9.55s, which implies based on the 10.5?, or, equivalently 10.5/20 = 52.5% of the initial have OS14 = 0.525, whichimplies that OS = 0.955. The simulation results are fairly P = 9.55/7 measure of the amplitude consistent = 1.364 s. The maximum at the seventh peak, which is amplitude after 14 half periods. Therefore, we with the virtual experiment and the prediction based onthepole location -a j?,thedamping ratio ?,and thenatural frequency ?n. 10.2 Fig. 10.2: An oscillatory initial time response Control of the nonlinear of a Lightly lightly Damped Positioning damped pendulum System system 351 due to a per-turbed condition. 10.2.2 State-Feedback Stabilization of the Pendulum Positioning System From this analysis and the simulation results of the pendulum positioning system, the open-loop sys-tem can drift out of its equilibrium easily dueto a small disturbance, and it also requires along period of time to recover difficult back to the equilibrium. or even impossible miscommunication to makeit for commands. the lightly due to the damping oscillations and time delay. One maysuggest to fundamentally more heavily damped. Well, it is like the system less sensitive to disturbances control Furthermore, manual control One effective a double-edged will at the same time way to resolve this Recallthat atthe equilibrium (x*1,x*2,T*) and feature may man-machine make it interface change the mechanical design sword. Increasing the friction to make cause the system to be less responsive dilemma is to employ feedback to control. =(15?,0?/s,0.19043 Nm), wehavethe linearized state-x space model ?(t) = x(t)+BT(t) A wherethe matrices A and B are given by Equation 10.6: A = Now, we will close the loop ? 0 ? ?? 1 , B = -21.32-0.135 0 30 using the state feedback T (t) = F x(t) (10.9) sothat theclosed-loop system poles are ats =-10,-11. The characteristic equation of the closed-loop system will be (s+10)(s+11) =s2 +21s+110 =s2 +2??ns+?2 n ? ?=1.0011, ?n=10.49 rad/s which implies the closed-loop system response will be slightly overdamped with no overshoot and no oscillations. The closed-loop control system thus designed will yield the state-feedback gain matrix as ? F=? -2.956 -0.6955 and the state equation of the closed-loop x?(t) system (10.10) will become =(A+BF) x(t) = ? ? 0 1 x(t) -110-21 (10.11 352 10 State Feedback Assume the initial and Linear Quadratic condition x(0)T The solution Optimization of the closed-loop = ? 20? 0?/s ? =? 0.349 0 ? system state equation, Equation 10.11 can be found as 11e-10t -10e-11t e-10t -e-11t??? ? ? ? ??-110e-10t +110e-11t -10e-10t +10e-11t x1(t) x2(t) = e(A+BF)t 0.349 0 where e(A+BF)t is the state transition inverse Laplace transform, 0.349 = 0 matrix of the closed-loop system that can be computed using the ?(sI-(A+BF))-1? e(A+BF)t =L-1 or utilizing the Cayley-Hamilton approachin Section6.4.2. Hence,the pendulumangular position ?(t) and the applied torque T(t) will be ?(t) =x*1+ x1(t)=15?+220?e-10t -200?e-11t and T(t)=T*+ T(t) =T*+F x =0.19043+15.3522e-10t -16.3838e-11t Nm respectively. Notethat to deg and wealways use rad, rad/s as units in the computation, deg/s in display for ease of human and convert them back reading. Fig. 10.3: The nonlinear, linearized, and simulation models of the pendulum positioning system. The Simulink simulation diagram in Figure 10.3(c) with the nonlinear plant is employed to conduct the closed-loop initial state response simulation. In the Simulink simulation diagram, you will see a function block named Fcn1. Double click the function block to open the pop-up window, called Function Block Parameters: Fcn1, andtype -a0*sin(u(1))-a1*u(2)+b0*u(3) into the Parameters function of the three inputs: Expression box. Note that this function u(1), u(2), and u(3) that represent f(u)=-a0*sin(u(1))-a1*u(2)+b0*u(3) is a x1, x2, and T, respectively. The value of the function then serves asthe input to the Intg2 integrator; that is,?x2=f(u). The initial statex1(0) = 35?=0.6109 rad, whichis equivalent tox1(0) =20? =0.349rad,is chosenby double clicking the Intg1 integrator to open the pop-up window, called Function Block Parameters 10.2 Intg1, and type the radian number Control of a Lightly 0.6109 onto to Initial Damped Positioning Condition System box. The input 353 constant boxes named xe and Te should beassignedas 0.2618,the radian numberof the equilibrium position x* 1 = 15?, and 0.19043, the equilibrium Equation torque, respectively. Of course, F is the state-feedback gain, as shown in 10.10. The simulation the analysis results are shown in Figure 10.4. It can be seen that the results and computations. The state-feedback control has brought the are consistent pendulum with from the perturbed 35?positionbackto the 15?equilibrium within 2%vicinityin just 0.6seconds,whichis 100 times faster than the slowly decayed oscillatory response without feedback, as shown in Figure 10.2. Therequired torque T(t) to complete the control action shown on the right graph of Figure 10.4 is between -0.8Nm and 0.5Nm, which is within apractical range. Fig. 10.4: 10.2.3 Animpressive Stabilization of the disturbance response Motor/Propeller-Driven reduction accomplished Pendulum by state feedback. Positioning System In Section 10.2.2, a state-feedback control wasemployed to greatly improve the stability of the originally lightly damped system. For simplicity, the torque can be provided positioning the torque was considered as the control input. In by a motor control subsystem. In the motor/propeller-driven system shown in Figure 10.1, the torque T(t) = ?Fp(t) applied to the pendulum practice, pendulum is and Fp(t) is proportionalto ?2(t) (10.12) where ? (m) is the length of the pendulum and ?(t) (rad/s) is the rotational speed of the motor/propeller. The motor dynamics and the torque applied to the pendulum are described by the equation, ??(t) =-am?(t)+bmE(t) := f(?,E) T(t) = (1/k2)?2(t) (10.13) := h(?,E) where am = 43.1 (1/s), bm = 2034.5 (1/Vs2), and k2 = 26345 (1/Nms2). Notethat the state equation of the motoris linear, but the relationship between the torque T and the motor speed ? is nonlinear. When the systemis operating atthe 15? pendulumequilibrium, [x* T*]T =[x*1 x*2 T*]T =[0.2618 rad 0rad/s 0.19043Nm]T the corresponding motorspeedequilibrium ?* andthe motorinput voltageequilibrium E* can be com-puted based on Equation 10.13 as follows 354 10 State Feedback and Linear Quadratic Optimization ? ?*= v0.19043k2 =70.83rad/s T* = 0.19043 =(1/k2)(?*)2 0 =-am?* +bmE* ? E*=(am/bm)?* =1.5V Thelinearized model of the nonlinear motor/propeller dynamics shown in Equation 10.13 can be obtained using the Jacobian matrices approach in Section 4.4.2 as follows: ??(t) =-am ?(t)+bm E(t) (10.14) T (t) = (1/k2) ??2 ?? ?*?(t) =(2/k2)?*?(t) ? ? ? Fig. 10.5: The nonlinear, system linearized, with motor/propeller and simulation models of the closed-loop pendulum positioning as the actuator. Withthe motor/propeller as the actuator, the model diagrams of the closed-loop pendulum position-ing system shown in Figure 10.3 are now redrawn asthose shown in Figure 10.5. Figure 10.5(a) shows the closed-loop block diagram of the nonlinear pendulum system with the linear controller including F, K,andthetransferfunctionofthe motor/propeller (2?*bm/k2)/(s+am). Notethatthe outputofthe nonlinear plant is the real state vector x while the input to the linear controller is the differential (orperturbed) state vector x =x-x*,where x*istheequilibrium state vector. Similarly, theoutput of the linear controller is the differential (or perturbed) torque T whilethe input to the nonlinear plant is the real torque T =T+T*, Figure Figure 10.5(c) is a Simulink simulation 10.5(a). In fact, this simulation for the insertion The insertion torque. of the of the But the feedback motor/propeller motor/propeller action intended diagram diagram motor/propeller constructed dynamics based on the is almost the same as that in transfer function transfer by the original is inserted for compensation locus where T*is the equilibrium torque. function and the additional is for the practical is a low-pass filter, F state-feedback which design. block Figure 10.3(c) will slow of generating down the reason, the purposes. An optimal value ofK can be determined of except design parameter reason For this diagram K. the desired K parame-ter using the root design approach. Figure 10.5(b) is the closed-loop block diagram of the linearized controller closed-loop including F, K, and the transfer function block diagram is almost the same as that in motor/propeller transfer function and the K parameter of the pendulum system with the lin-ear motor/propeller. Figure 10.3(b) Note that this linear except for the insertion of the 10.2 Recall that the root locus Control of a Lightly Damped Positioning design approach starts from the pole-zero diagram System of the loop transfer of the closed-loop system shown in Figure 8.17 and Definition 8.14. The loop transfer (LTF) of the closed-loop system in 355 func-tion function Figure 10.5(b) is KG(s), where G(s)is 2?*bm/k2 G(s)=-F(sI-A)-1Bs+am The root locus diagram based onthethree poles, p1,p2=-0.0675 j4.62, p3=-43.1 and one zero z1=-4.25 ofG(s), can beconstructed asshown inFigure 10.6. Fig. 10.6: The closed-loop pole locations for K = 2 and K = 3 on the root loci diagrams of the system shown in Figure 10.5(b). As shown in Figure 10.6, if the controller parameter is chosen to be K = 2, the closed-loop system poles will be -6.38j7.28 and -30.4 wherethe two complexconjugatepolesarethe dominantpoleswith dampingratio ? =0.66, which implies the system response will be slightly underdamped with about 6% overshoot. Onthe other hand, if the controller parameter is chosen to be K = 3, the three closed-loop system poles will be -10.2and -16.5j10.1 where the real pole with damping factor response will be slightly overdamped. a = 10.2 is the dominant pole, which implies the system The disturbance recovery simulation results based on the Simulink diagram of Figure 10.5(c) are shown in Figure 10.7. The K = 2 design The simulation results will lead to a slightly are fairly underdamped consistent with the root locus response that brings the design analysis. pendulum down from ? = 35?toward the desired equilibrium position ? = 15? morequickly than the K = 3 response,but it overshotto ? = 13? before returning to the ? = 15?later, aroundt = 0.7 s. Onthe other hand,the K= 3responseis slightly overdampedthat comesdownfrom ? = 35?rather slowly to reachthe desired equilibriumposition? = 15?aroundt =0.65s withoutovershootor oscillations.It turns outthatthe K= 2.5 designis anapproximately optimal choice.It reaches ? = 15?att = 0.4s withan unnoticeable overshoot. When K = 2.5, the three closed-loop system poles locations are at -9.49j6.92and -24. 356 10 State Feedback and Linear Quadratic Optimization wherethe complex conjugatepolesarethe dominant poles with dampingratio ?= 0.808, whichimplies the overshoot is just 1.35%. Fig. 10.7: The disturbance recovery responses accomplished by the motor driven state-feedback control system shown in Figure 10.5(c). Remark 10.1 (The Insertion Compensation) of Motor/Propeller Dynamics Into the Feedback Loop and the K It is noted that the K = 3 disturbance recovery response in Figure 10.7(a) is about the same asthat shown in Figure 10.4(a). The K = 2.5 response in Figure 10.7(a) is better than that shown in Figure 10.4(a). Butif the value of the controller parameter reduces to K= 1, the disturbance recovery response will be oscillatory performance with 26% overshoot actually is foretold and wont reach the steady state until t by the root locus = 2 s. This K = 1 poor analysis that the three closed-loop system poles are at -2.72 j6.53 and -37.8 andthe complex conjugate poles arethe dominant poles with dampingratio ?= 0.385that implies the overshoot is about 27%. Theinsertion of the motor/propeller dynamics into the feedback loop without the K compen-sation will slow down the feedback correction and degrade the performance due to the inherent low-pass filter property of the motor. However, the performance can be recovered or even made better with an adequate K compensation at K = 2.5. The two graphs MATLAB % CSD Fig10.5b % Construction % shown am=43.1, % 10.6 of in Fig. State 1; Motor -21.32 Root on Figure State-feedback locus 10.6 are generated Pendulum diagram for the xe=[0.2618 at -0.135], this 0]', Te=0.19043, equilibrium, B=[0; 30], xe, damp(A), feedback -0.6955], speed k2=26345, % plot shown we=sqrt(k2*Te), s=tf('s'); Ee=(am/bm)*we, Design sysG_F=ss(A,B,F,0); G_M=(2*we*bm/k2)/(s+am), K=logspace(-3,2,1000); damp(A+B*F), equilibrium Locus systems 10.5(b) model F=[-2.956 % rlocus(GK) root bm=2035, Linearized A=[0 % of the same root locus using the following code: G_F=tf(sysG_F), G=-G_M*G_F, rlocus(G,K figure(12) Te positioning system 10.2 10.2.4 Tracking Control of the Pendulum Control Positioning of a Lightly System Damped Positioning Using State-Space System 357 Pole Placement In the previous two subsections, Sections 10.2.2 and 10.2.3, a state feedback/root locus design approach was employed practical to improve applications, which is usually the stability the operating unknown and performance equilibrium a priori, at a specified operating equilibrium. may depend on an external command and the controller In many or reference input, is required to be designed to achieve closed-loop system stability, zero steady-state tracking error, and an optimal transient performance subject to control-input constraints. The regulation/tracking issues arise in almost every engineering problem involved with precision, automation, guidance, navigation, and control. In fact, we have addressed these is-sues in Sections 8.1, 8.5, 8.6, and 8.7 regarding the internal model principle, type of systems, and their applications in DC motor speed control, sinusoidal position tracking control, F/A-18 flight path control, and aircraft altitude regulation. In the following, we will consider the tracking control of the pendulum positioning system using the internal model principle, the state-feedback pole placement, and the root locus design approaches. The system to be controlled is still the pendulum positioning system with the same dynamics scribed by Equation10.4andthe same operatingequilibrium at (x*1,x* The difference is in the structure of the tracking/regulation block and capability controller diagram in Figure 10.8(b), of the tracking/regulation is shown in control Figure 10.8. The controller where the controller as de-2,T*) = (15?,0?/s,0.19043Nm). system. The structure is designed is connected to the linearized based on the model x?(t) = x(t)+B A T(t) wherethe matrices A and Bare given in Equation 10.6. After the design of the controller is completed, the controller will be connected with the nonlinear model or the real system, as shown in Figure 10.8(a), for simulation or real-time testing. Fig. 10.8: The state feedback The integrator steady state; internal hence, the and integral model structure design of F and tracking control for the pendulum will guarantee K will focus the step tracking on the stability positioning error system. to and the transient be zero at response. There are several ways of designing F and Kto enhance the performance of the closed-loop system. Onesimple, effective way is to first find a state-feedback gain matrix F so that the eigenvalue 358 of 10 State Feedback A+BF are placed and Linear at favorable Quadratic Optimization locations on the complex design approach to find a value of the integrator are at desired locations to achieve The root locus can provide. constant a best possible LTF Pole-Zero Pattern and Construction plane and then employ the root locus Kso that the closed-loop system poles performance. of Root Locus Diagram design of K can only do as good as the We will see that the eigenvalues of LTF (loop transfer A+BF function) pole-zero pattern will be main part of the LTF pole-zero pattern; therefore, the choice of Fis critical to the success of the overall design. Recallthat we placed the eigen-values ofA+BF ast 1=-10 and s2=-11 toobtain F= -2.956 -0.6955 . We willcontinue touse ? ? it and call this design as Design b. For comparison, we will have another design, called Design a, which ?. places theeigenvalues ofA+BF ats1, s2=-10j5.Design agives F =? -3.456-0.6622 To apply the root locus design to a simple closed-loop system structure, as shown in Figure 10.9(b), the LTF pole-zero pattern required is just the pole-zero pattern of the open-loop system G(s). However, for a more complicated pattern required open-loop for root locus closed-loop system like design in general Figure 10.9(a), the LTF pole-zero is not the same as the pole-zero pattern of the system. Recall that the loop transfer function of the closed-loop system in Figure 10.9(b), before the Kis cut off the loop, is KG(s), where G(s) can be seen as the transfer function from u to e multiplied by a negative sign. Similarly, for the closed-loop system in Figure 10.9(a), the loop transfer function should be KG(s), where G(s) is the transfer function from uK to xi multiplied by a negative sign. Hence, G(s) can berepresented bythefollowing state-space model with uKand-xiastheinput and the output, respectively. ??? ?? ??? ?? ?? ?? x? x?i G(s): A+BF = x 0 -C 0 -xi =? 0 -1? x xi xi :=CG + B 0 uK:= AG x xi +BGuK (10.15) x xi Fig. 10.9: Derivation of the loop transfer function for the closed-loop state feedback andintegral tracking control system shown in Figure 10.8. Based on Equation as shown in 10.15, the root locus Figure 10.10(a) and Figure diagrams for 10.10(b), Design a and respectively. Design b can be constructed, From Equation 10.15, the state-spac 10.2 Control of a Lightly Damped Positioning System 359 Fig. 10.10: Root locus diagrams associated with the integral tracking control system shown in Figure 10.8. representation of the loop transfer function, it can be seenthat the LTF poles are the eigenvalues of AG, which are the eigenvalues of A+BF together with the integrator pole at s = 0. Thus,for Design a, the loop transfer function will have three poles and no zeros. The three poles are p1 p2 =-10 j5, p3=0 wherethe pair of complex poles are the eigenvalues of A+BF, the integrator. andthe pole at the origin is the pole of When K = 0, the closed-loop system poles (the roots of the closed-loop characteristic equation) willbeatthethree LTF pole locations, asK?8thethree roots willbeonthethree asymptotes: the three straight lines with angles p/3,pa , nd-p/3intersecting the real axis ats=(p1+p2+p3)/3= -6.667. The tworootlocibranches originated fromthecomplex conjugates, p1andp2,willmove toward therealaxiswith departure angles -63.6? and63.6?, respectively. These twobranches will break intotherealaxis ats =-8.34 when K=7.71 and split intotwobranches ontherealaxis, one toward the left all the way to the negative infinity of the real axis, and the other moving to the right to meet thethirdbranch coming fromp3attheorigin. These twobranches meet ats = -5 when K=8.33 and break away immediately intothecomplex plane toward thep/3and the-p/3 asymptotes, respectively. These twobranches willcross the imaginary axis atj11.2 intotheright half of the complex On the plane when K = 83.3. other hand, for Design b, the loop transfer function will have three poles and no zeros. The three poles are p1=-11,p2=-10,p3=0, allontherealaxis. There are three asymptotes: thethree straight lineswith angles p/3,p,and-p/3 intersecting the real axis ats =(p1+p2+p3)/3 =-7.The root locibranch originated from p1=-11 willmove lefttoward thenegative infinity oftherealaxis. The twobranches started fromp2= -10 andp3=0willmove toward each other ontherealaxis until theymeet ats =-3.48 when K=5.67 andbreak away immediately intothecomplex plane toward thep/3and the-p/3asymptotes, respectively. These twobranches willcross the imaginary axis atj10.5 intotherighthalf ofthe complex plane when K = 77.1 360 10 State Feedback and Linear Quadratic Optimization Fig. 10.11: Simulation diagram associated with the state feedback andintegral tracking control system shown in Figure 10.8. Determination of Kin Root Locus Design In Figure 10.10(a), the root locus diagram for see how the K value affects the closed-loop and natural frequencies. Design a, by moving the little system poles trajectories When K = 10, the three closed-loop s1 s2 and their black square cursor we can associated damping ratios system poles are at =-4.36 j2.77, s3 =-11.3 wherethe pair of complex poles are the dominant poles andtheir corresponding damping ratio and nat-ural frequency are ? = 0.843 and ?n = 5.16rad/s, respectively. There will be alittle bit overshoot at the peaktimetap = p/2.77 = 1.13s, butthis less-than-1%overshoot is a worthwhiletradeofffor afaster response, as will be seenin the simulation results graphs of Figure 10.12. Fig. 10.12: Simulation results of the state feedback and integral tracking control system. In the root locus diagram of Figure 10.10(b) for Design b, when K= 6,the three closed-loop system poles are at s1 s2 =-3.45j0.938,s3=-14.1 wherethe pair of complex poles are the dominant poles andtheir corresponding damping ratio and nat-ural frequency are ? = 0.965 and ?n = 3.57rad/s, respectively. There is an unnoticeable overshoot a 10.2 Control of a Lightly Damped Positioning System 361 the peaktime tap = p/2.77 = 1.13s andtbp = p/0.938 = 3.35 s, respectively, whichis slower than Design a, as will be verified in the simulation results graphs of Figure 10.12. The Simulink simulation shown in diagram of Figure 10.11 is constructed based on the block diagram Figure 10.8. The only difference is that in the Simulink program the real pendulum angle ?,instead of? , is fed backto compare withthe desiredreal angle position ?Rinstead of?R. This dis-The crepancy does not affect the simulation results since the required correction error sent to the tracking integrator is essentially the same simulation results of both Design a and Design b are shown in Figure 10.12. Figure 10.12(a) shows that Design a response is faster than Design b since the peak times of Design a and Design b are tap = p/2.77 = 1.13s and tbp = p/0.938 = 3.35s respectively. Recallthat the peaktime is computed based on Equation 3.69, tp = p/?, where ? is the imaginary part ofthe dominantcomplex poles.Increasing ? maynot always help sinceit maycausethe damping ratio to decreaseto enlarge the overshoot and oscillations. The control-input torques required to complete the tracking/regulation for Design a and Design b are shown in Figure 10.12(b), and the required real torques for both cases are between 0.19 Nm and 0.42 Nm, which are in a reasonable applicable range. The Design a root locus diagram on Figure 10.10(a) is generated using the following MATLAB code. The Design b root locus diagram on Figure 10.10(b) can be generated by simply replacing F=[-3.456 -0.6622] with F=[-2.956 -0.6966]: % CSD Fig10.10 % Root loci A=[0 Root for 1;-21.32 F=[-3.456 loci the C=[1 a in -0.135]; -0.6622]; s=tf('s'); Design system Design b with F=[-3.456 -0.6622] B=[0;30]; %F=[-2.956 0]; A_G=[A+B*F C_G=[zeros(1,2) -1], D_G=0, pole_G=pole(G), [zero_G,gain_G]=zero(G), K=logspace(-1,2,1000); & Fig10.9(b) -0.6966]; zeros(2,1);-C 0], B_G=[B;0], sysG=ss(A_G,B_G,C_G,D_G); G=tf(sysG), figure(13), rlocus(G,K) In the root locus diagram construction, the main MATLAB command is rlocus(G,K) in which Kis the root locus gain parameter to be determined, and Gis the state-space representation of the loop transfer function given by Equation designer is still required of the LTF pole-zero 10.15. This tool is versatile to be proficient pattern in the and helpful. materials covered in will affect the trajectories However, a control system Chapter 8. Knowing of the root locus diagram is even how a change more important than constructing the root loci diagram. The root locus design actually starts from finding LTF pole-zero pattern rather than starting from a given LTF pole-zero pattern. If a SISO (single-input/single-output) system is described by a rational function G(s) afavorable =N(s)/D(s), where bothN(s) andD(s) are polynomial functions with real coefficients and deg(D(s)) =deg(N(s)), then the poles and zeros of the system are the roots ofD(s) = 0 andthe roots ofN(s) = 0, respectively. If a system is given by a state-space representation G(s) = (A,B,C,D), the poles and zeros can be directly computed in the state space without the need of converting eigenvalues of the A matrix, and the zeros can be computed eigenvalue problem as described in Remark 10.2. Remark 10.2 (Zeros of State-Space to polynomial functions. The poles are the based on the solution of the generalized Model (A, B, C, D)) The zeros ofthe state-space model(A,B,C,D) arethe generalizedeigenvalues?i so that 362 10 State Feedback and Linear Quadratic Optimization ??iI-A B? ?? ??AC -D-B?? vi =[?iE-Z]vi -C D vi = ?i I 0 0 0 (10.16) - where vi are the corresponding generalized eigenvectors. The MATLAB command >>[Vz,Dz]=eig(Z,E) can be employed to obtain the generalized eigenvalues in Dz and the generalized eigenvectors in Vz. Example 10.3 (Find the Zeros of a System in State-Space Representation) s+1 , which obviously has azero ats =-2.A state-space model ofthesystem can befound, G(s)=C(sI-A)-1B+D with A=-1,B=1,C=1, Consider the system with transfer function, G(s) = s+2 D = 1. Now, we would like to employ this state-space of a system in state space using Equation model to demonstrate how to compute the zeros 10.16. ? ? ? ?vi=0, ? ?i =-2 ? ? ?vi=0 ? vi=?? B drops The zeros ofC(sI-A)-1B+D are thecomplex numbers ?isothat therank of ?iI-A -C D below its normal rank. It can be solved as a generalized eigenvalue problem: ?i +1 1 1 1 -2+11 -1 1 -1 1 This generalized eigenvalue problem can also be solved using the following >> A=-1; B=1; C=1; D=1; E=[1 0; 0 0]; Z=[A -B; C (10.17) MATLAB code: -D]; [Vz,Dz]=eig(Z,E) Vz = 1 1 Dz 0 -1 = -2 0 0 Inf This generalized eigenvalue/eigenvector problem has aneigenvalue at?i=-2and itscorresponding eigenvector vi =[1 10.2.5 Tracking In the previous 1]T. Control subsection, of the Pendulum Section 10.2.4, Positioning we employed System Using PID the state-feedback Control pole placement together with integral tracking compensation to address the tracking/regulation control problem for the pendulum positioning system. The state-feedback pole placement is employed to replace the poles of the plant so that the pole-zero pattern of the loop transfer function will become more favorable for root locus design. In this subsection, we will try to design the best possible PID controller for the lightly damped pendulum position tracking control problem. Before getting into the PID control system design, we will explore if the PI controller Can PI Controller can do the job. Work for the Pendulum Positioning System? The PI controller shown in Figure 10.13(a) and 10.13(b) is expressed as s+c0 s K = KP +KI 1 s ? KP =K, KI=c0 10.2 Fig. 10.13: Block diagram and root locus where KP and KI are the proportional is, inserting a PI controller Control of a Lightly diagram for the PI control and the integral to the feedback coefficients, loop is equivalent Damped Positioning of the pendulum respectively, to adding System positioning 363 system. of the PI controller. a pole at the origin That and a zero ats =-c0tothepole-zero pattern oftheroot locus diagram, and hoping achoice ofKvalue in the root locus design will lead to a desirable closed-loop system performance. From Figure 10.13(b), it can beseen that thetransfer function ofthelinearized plant is C(sI-A)-1B. Thus, theloop transfer function for the root locus design will be s+c0 G(s) = KC(sI-A)-1 s which hasthree poles and one zero. They are p1 p2 =-0.0675 j4.6, p3=0, z1=-c0 where the pair of complex poles p1, p2 are the poles of the lightly damped pendulum system. The pole atheorigin, p3=0,isthepole oftheintegrator and thezero, z1=-c0, isassociated with the integrator gain. If c0 > 0.135 is chosen, the root locus diagram will look like the one shown in Figure 10.13(c), in whichthe two asymptotes will bein the RHP andthe real part of the complex roots can only bebetween -0.0675 and 0fortheclosed-loop system tostay stable. But thedamping ratioforany of these complex roots is extremely small, so these complex roots cannot serve as dominant poles. On theother hand, fortherealrootsitting between 0and-c0tobethedominant pole, it needs to moveto a position extremely close to the imaginary slow to pendulum be practical. position PID Controller Therefore, control there exists axis that PI control will makethe control solution for the lightly action too damped system. Structure The PID controller KDs+KP +KI/s, together KDs2 +KPs+KI s and, therefore, no viable the nonlinear and the linearized with the low-pass filter (s+c0)(s+c1) w s+w = closed-loop s(s+w) pendulum w/(s+w), can be expressed as K position (10.18) systems with PID con-troller are depicted in Figure 10.14(a) and 10.14(b), respectively. Notethat the insertion of the PID controller and the low-pass filter to the feedback loop is equivalent to adding two poles, s = 0 and s =-w,and twozeros, s =-c0and s =-c1tothepole-zero pattern oftheroot locus diagram. 364 10 State Feedback Fig. 10.14: Construction and Linear Quadratic Optimization Block diagram for the PID control of the pendulum of Root Locus Diagram for PID Controller positioning system. Design From Figure 10.14(b), it can beseen that thetransfer function ofthelinearized plant is C(sI-A)-1B, and thus the loop transfer function for the root locus G(s) = (s+c0)(s+c1) s(s+w) design will be KC(sI-A)-1B (10.19 which hasfour poles and two zeros, p1 p2 =-0.0675j4.6, p3=0, p4 =-w, z1 =-c0, z2 =-c1 wherethe pair of complex poles p1, p2 are the poles of the lightly (10.20) damped pendulum system. The pole attheorigin, p3=0,isthepole otfheintegrator. The pole p4=-wisdetermined bythebandwidth of the low-path filter, which is usually chosen to be larger than the actuator bandwidth. The zeros z1=-c0and z2=-c1are freedesign parameters tobeselected toobtain afavorable root locus diagram ready for the design of the K parameter. The parameters w,c0, and c1are chosen sothatp4=-50, z1=-1.5, and z2=-2lead totheroot locus diagram shown in Figure 10.15. Since the loop transfer function has four poles and two zeros, there are four root loci branches and two of them will approach to the two asymptotes with angles p/2 and-p/2that intersect therealaxis ats =-23.32 when K?8.The twobranches originating from p1andp2willleave thetwopoles with140? departure angles moving totheleftand then bending toward therealaxis. These twobranches willmeet ats =-10.3 when K=23.5 and split immediately ontherealaxis, onemoving totheright toward z2=-2,and theother totheleft,which willmeet the branch thatcame fromp4ats =-21.2 when K=25.2, and then break away intothecomplex plane, one going uptoward the asymptote with angle p/2, andthe other going downtoward the asymptote with angle -p/2.The branch outofp3=0is moving tothelefttoward z1=-1.5. Determination of Kin Root Locus Design Now we havethe four complete root trajectories onthe root locus diagram, asshown in Figure 10.15. If K = 30 is selected, the four closed-loop system poles will be at 10.2 Control of a Lightly Damped Positioning System 365 Fig. 10.15: Root Locus diagram for the PID control of the pendulum positioning system. s4 s3=-0.754, s1=-5.52,s2 =-21.9j13 (10.21) where s3=-0.754 isthedominant pole. If K = 23is selected, the four closed-loop system poles will be at s1 s3=-0.687,s2 =-9.74j2.38,s4 =-30 (10.22) where s3=-0.687 isthedominant pole. Fig. 10.16: Simulation diagram for the PID control of the pendulum positioning system. The Simulink simulation diagram shown in Figure 10.16 is similar to that in Figure 10.11 ex-cept the controller part is replaced by the PID controller. Two simulations wereconducted: Oneis for the PID controller The step tracking associated responses with K = 30, and the other is for the PID controller for both cases K = 30 and with K = 23. K = 23 are shown in Figure 10.17(a). responses exhibit resemblance in waveform, although the K = 23 is alittle Both bit slower. For the K = 30 case, therealpole ats3=-0.754 iscalled thedominant pole because theresponses due totheothe 366 10 State Feedback three poles will decay and Linear Quadratic much more quickly. Optimization But it does not mean the In fact, the response associated with a pole with larger of the real they part) or smaller will also decay faster. time constant will respond As shown in Figure non-dominant responses damping factor (the absolute value to command/disturbance 10.17(a), the are neg-ligible. faster K = 30 step tracking although response (in blue) shoots up from ? = 15?to ? = 35? within 0.1 s. Thisfast responseto the step commandin the first 0.15 sis mainly contributed bythepair ofcomplex poles at-21.9j13.But it also decays fast todip the response down to 31? before the dominant response catches up at around 0.6 s. Then the response thereafter isdue tothedominant pole s3=-0.754 with timeconstant t3 =1/0.754 =1.33 s,which will take another 3 s to reach the steady state. Fig. 10.17: Simulation results of the PID control of the pendulum positioning system. For theK=23case, therealpole ats3= -0.687 isthedominant pole. Itisalittlebitcloser tothe imaginary axis than the K = 30 case; hence, it the K = 30 case, the K = 23 step tracking will take longer time to reach the steady state. Similar to response (in red, asshown in Figure 10.17(a)) shoots up from ? = 15?to ? = 35? within 0.12 s. Thisfast responseto the step command in the first 0.2 s is mainly contributed bythepairofcomplex poles at-9.74j2.38. But it also decays fasttodipthe response down to 30? before the dominant response catches up at around 0.7 s. Thenthe response thereafter isdue tothedominant pole s3=-0.687 with time constant t3 =1/0.687 =1.46 s,which will take another 3.4 s to reach the steady state. Control-Input Constraint The limitation of control input system requires always a control-input needs to be considered in all control magnitude beyond the capability and the input to the plant (the system to be controlled) the saturation value. That value of the actuator for all controller means the controller loses its ability systems designs. If a control of the actuator, the controller outputs to control with the magnitude greater than the saturation plant, and the system unstable. For this reason, a good control system design should avoid control-input The required control-input torque output will be different. Theinput to the plant will be T(t) to provide the tracking may become saturation. performance in Figure 10.17(a) is shown inFigure 10.17(b). The range ofthecontrol-input torque fortheK=30case isbetween -1.5Nm and 10.5 Nm. The range fortheK=23case isalittlebitbetter, but stillbetween -1Nm and 8.2Nm. For comparison, the required control-input torque T(t) to provide the tracking performance of the state feedback/integral tracking control system in Figure 10.12(a) is shown in Figure 10.12(b). range of the control-input torque is between 0.19 Nm and 0.42 Nm, which is than that of the PID control system Note that the morethan 25 times less 10.3 The surge of torque at t Controllability 367 = 0 from T = 0.19 Nmto T = 10.5 Nmin Figure 10.17(b) is to provide the shoot-upfrom ? =15?to ? = 35? within0.1s in Figure10.17(a).This quick responseat the early time is unnecessary Remark 10.4 (An Control) since the dominant employs up. Unfair Comparison of the PID Control with the State Feedback/Inetgral The state feedback/integral former pole response is too slow to catch tracking more information control is supposed to do better than the (all the states information) than the latter, PID control Track-ing since the which only utilizes the output feedback. By using the state feedback, the original plant poles can be replaced by favorable ones. Onthe other hand, by using the PID controller, the original plant poles remain part of the pole-zero pattern for root locus design. The only modification the PID control can do is to choose the locations of the two added zeros andthe low-pass filter pole. The presence of the original lightly damped plant poles prevents the PID control from obtaining a root locus pole-zero pattern as favorable asthat of the state feedback/integral tracking control approach. 10.3 Controllability Recall that in Section 7.6 welearned that the cart-inverted can be stabilized. A sufficient condition is given in the pendulum paragraph system is unstable, but the system right after Equation 7.108: If the system is controllable, then the closed-loop system poles can be placed anywhere onthe complex plane. The definition of controllability and relevant issues will be discussed in later chapters. The concept of controllability is discussed in the following. Consider a system with state equation x?(t)=Ax(t)+Bu(t), x?Rn, u?Rm (10.23) Definition 10.5 (Controllability) The system is (completely) controllable if there exists a control input u(t) defined on a finite time interval [0,t f] for somet f > 0that steersthe systemfrom anyinitial state x0to anyfinal state xf. Equivalently, there exists t f > 0 and u(t) for any x0 and xf, such that xf = eAtf x0 + ?t f eA(t f-t)Bu(t)dt (10.24) 0 Equation 10.24 will be employed to prove the controllability 10.3.1 Controllability rank theorem. Rank Test Theorem 10.6 (Controllability Rank Condition) Consider thefollowing nnmcontrollability matrix: C=[BABA2B An-1B] The system(10.23), or the matrix pair (A,B), is (completely) controllable ifand rank C = n (10.25 only if 368 10 Proof: State Feedback First, and Linear Quadratic Optimization we will show that (A,B) iscontrollable ? rank C=n. In many cases, it is easier to statement. If(A,B) prove by contradiction for a false statement than directly prove a true is controllable but rank C < n, then there exists a nonzero vector v such that vTC=vT[B ABA2B An-1B] =0 or vTB=0,vTAB =0,vTA2B =0, , vTAn-1B =0 Recall that by Theorem 6.15 (Cayley-Hamilton eAt = theorem) and Equation 6.14, n-1 ?ai(t)Ai=a0(t)I+a1(t)A+a2(t)A2 + +an-1(t)An-1 i=0 +an-1(t)An-1B =0 vTeAtB =vT ?a0(t)B+a1(t)AB+a2(t)A2B+ Hence, ? Now,from Equation 10.24, ifx0 = 0, the final state xf will be xf = ?t f ?t f eA(tf-t)Bu(t)d 0 and vTxf = vT eA(tf-t)Bu(t)dt =0 0 forallu(t),t =0.Thismeans thatthecontrollable subspace isorthogonal tothevector v,which contra-dicts the assumption that (A,B) is controllable. Therefore, the rank ofthe controllability matrix C has to be n. Next, conversely we will show that (A,B) iscontrollable ? rank C=n Again, we will prove it based on the contradiction controllable; approach. Assume rank C = n but (A,B) is not then there exists a nonzero vector v such that vT ?t f eA(t f-t)Bu(t)dt =0 0 whichimplies that vTeA(t f-t)B=0, 0=t =tf Differentiate this equation to obtain the following derivatives, vTeA(t f-t)AB=0, vTeA(t f-t)A2B =0, , vTeA(t f-t)An-1B =0, 0=t =tf Let t =t f, and wehave vTB=0,vTAB =0,vTA2B =0, , vTAn-1B =0 This contradicts the assumption that rank C = n. Therefore, (A,B) hasto be controllable. 10.3 Example 10.7 (Controllability Consider a three-state of a two-input MIMO linear Controllability 369 System) system described by the following state equation: ??? ???? ??? ??=? ???+ ?? ? ???1 0 -1?? ??=Cx -9 3 7 -5 1 5 -5 3 3 x1 d x2 dt x3 = y2 1 1 1 x3 1 1 u1 u2 = Ax+B x2 -11 1 matrix can be found C = ?B Weeasily recognize 2 x2 x1 y1 The controllability x1 AB that the rank of x3 as A2B? = ?21 11 ?1 1 ? ? -8 1 32 1 -4 1 16 1 -4 1 16 1 Cis 2. Thus, the system is not controllable. If a system fails to be controllable it is imperative to identify the uncontrollable physical modes.For example, an uncontrollable mode may be stable and does not interfere with achieving the performance we desire for this system. Onthe other hand, if the uncontrollable modeis unstable or has a harmful effect on the system performance, identifying it may provide clues to modifying the system actuation structure to resolve the problem. One wayto easily makesuch anidentification is to transform the system to diagonal form (or, more generally into Jordan form). In the following, the system considered in the previous example will be employed to illustrate which part of the system is uncontrollable. Example 10.8 (Controllable Modes) Consider the system of Example 10.7. We will compute the eigenvalues ?1,?2,?3 and correspond-ing eigenvectors v1,v2,v3. From the latter define the similarity transformation matrix T = [v1,v2,v3] and implement the transformation from the original state x to the new statex, x = T-1x to obtain the transformed system x? = ? T-1AT ?x+ ? T-1B ? u (10.26) The eigenvalue-eigenvector pairs of A are: ?? ?? ?? ?1=-4,v1= ??,?= 2-2, v2 =??,?=31, v3 =?? 2 1 1 1 0 1 1 1 1 Notethat there are three real eigenvalues and two of the modes are stable. The third is unstable. Using the three eigenvectors weset upthe transformation matrix T and obtain the transformed state equations x? = ?0 -2 0? ? ? ? ? x+? ?u -4 0 0 0 Webegin withthe knowledge (from 0 1 1 0 0 0 0 1 Example 10.7) that there is one uncontrollable states,x1,x2, x3 denotethe motion associated with modes1, 2, and 3, respectively. equations are decoupled. They can be solved one at a time, each independent mode. The new Observethat the state of the others. Inspection of the transformed B matrix shows that neither of the control inputs affectsx2, indicating that x2 is the uncontrollable mode. 370 10 State Feedback 10.3.2 The Controllability and Linear Quadratic Decomposition The ability to identify the controllable interpretive mode implications. 10.9 (Controllability Given a linear Form part of a system has control design implications Here, we discuss the 1963] that separates the controllable Theorem Optimization decomposition and the uncontrollable Decomposition introduced beyond the by Kalman [Kalman, parts of a linear system. Form) system in the form x?(t) = Ax(t)+Bu(t) y(t) =Cx(t) with x?Rn,u ?Rm,y ?Rp, ifthesystem isnotcontrollable and rank C =r <n then there exists a nonsingular similarity transformation the newstatex, x matrix Tthat transforms the original state x to = T-1x suchthat the transformed system x? = ? T-1AT ?x+ ? T-1B u =Ax+ Bu y =[CT]x has the form A = =Cx ? ? ?? A11A12 0 A22 B = , B1 0 C =? C1C2? , ?A11, where A11 ?Rrr, B1?Rrm, C1?Rprand thesubsystem B1, C1?is Proof: Hint: Choose T =[T1 (10.27) controllable. T2] with T1 = ? f1 f2 ... fr ? where f1, f2, ... fr are linearly independent and span the r-dimensional columns ofT2 are chosen so that together Example 10.10 (Controllability with the columns Decomposition ofT1 span the range space ofC(A,B). whole n-dimensional Form) Recallthat the system considered in Example 10.7 is ??? ???? ??? ??=? ???+ ?? ? ???1 0 -1?? ??=Cx -9 3 7 -5 1 5 x1 d x2 dt x3 -5 3 3 The controllability 2 1 x2 1 1 x3 1 1 u1 u2 x1 y1 y2 x1 = x2 -11 1 x3 matrix of the system is C = -81321? ?21 -41161 ?11 11 -41161? = Ax+Bu The space. 10.3 Since rank C= 2 < 3, any two linearly range space of C. Let independent column vectors ofC Controllability 371 will span the two-dimensional ?? ?? ? ? ? ? -4 0 3? ? ? ? ? ?? ? ?0 0 -2? x+ ?? ? ? T1 = [ f1 The choice of T2is arbitrary aslong asit f2] 2 1 1 = makes T =[T1 T =[T1 T2] = 1 1 1 T2] nonsingular. Let T2 be chosen so that 2 1 0 1 1 0 1 1 1 0 1 Then the transformed state-space model will be x? = A11A12 0 A22 x+ y =?C1C2?x = B1 u 0 1 0 0 1 = 3 1 0 0 1 0 0 -1 x 1 Note thatneither u1oru2has effect on A22=-2.Hence, thedynamics associated with A22 are notcontrollable, whilethe dynamicsassociatedwithA11 can be modifiedviastatefeedback. Remark 10.11 (Controllable and Uncontrollable Subspaces) The controllable subspace is the range space of the controllability matrix C, while the uncon-trollable subspace is the null space of CT. The null space of CTis the orthogonal complement of the range space of C. For the system in Example 10.10, the controllable subspace is a two-dimensional by any two linearly independent vectors that are the linear combinations controllability matrix C. Hence, the two vectors, [1 0 0]T and [0 vectors of the range space of C, which is the controllable subspace: of the column space spanned vectors of the 1 1]T can serve asthe basis ?? Range(C) ~ ?? The uncontrollable subspace istheone-dimensional null space ofCT spanned bythevector [0 -11]T: ?-1? CT? ?? 1 0 0 1 0 1 0 Null ? ~ 1 which is orthogonal to the range space of C. Notethat the spacespannedbythe vectorT2 =[0 0 1]T of Example10.10is notthe uncontrol-lable subspace although its associated similarity If the similarity range space of transformation transform T still achieves controllability decom-position. matrix T =[T1 T2] is chosen according to the basis vectors of the C and the null space of CT as 372 10 State Feedback and Linear Quadratic Optimization ?0 1 -1? ? ? ?? ? ? ? ?? ? ?0 0 -2 ? x+? ?u ?1 -1 ? T = [T1 then the transformed state-space x? = 0 A22 B1 x+ the numbers are slightly u 0 y = ?C1C2 ?x = Although 0 0 0 1 1 model will be A11A12 remains the same and the 1 T2] = = different, of 2 1 1 1 0 0 -1 x -1 2 eigenvalues -9 10 4 -5 6 2 0 the structure of the controllability decomposition form A11 andA22, respectively, areidentical to those obtainedin Example 10.10. Example 10.12 (Controllable Subspace and Stabilizability) Consider a system described by the following ??? ????? d x1 x2 dt The controllability = 0 1 x1 1 0 x2 1 + u = Ax+Bu 1 matrix of the system is C =[B Since rank state equation: C = 1 < 2, the range space of AB] = C is the ?? 1 1 1 1 one-dimensional subspace spanned by the vector [1 1]T, and thenull space ofCT istheother one-dimensional subspace spanned bythevector [-1 1]T: ??and ?? Null CT? 1 Range(C) ~1 These vectors can be employed xto new coordinatesx, x to form a similarity Then the transformed state-space x? = transformation = T-1x. T =[T1 equations ~ -1 1 ? T2] = matrix to transform old coordi-nates ?1 -1? 1 1 are ? ? ?? ?0 -1??? A11A12 x+ 0 A22 B1 0 u = 1 1 x+ 1 0 u Note that thecontrol input uhas noeffect on A22=-1.Hence, thedynamics associated with A22 arenotcontrollable,whilethe dynamics associated withA11 =1 canbe modified viastatefeedback as follows. Withthe state feedback, u =F x the closed-loop system state equation will be =?f1 f2 ? ? x1 x2 10.4 ???0 x?1 x?2 Poles and Zeros of MIMO Systems 373 ??? -1 1+f1 1+f2 = x1 x2 Note that theuncontrollable yet stable eigenvalue A22=-1isunchanged, while thecontrollable unsta-ble eigenvalueA11 = 1 has beenchangedtoA11 = 1+f1. Thesystem will becomestableif f1 is chosen tobeless than-1.Therefore, asystem canbestabilized if theuncontrollable partofthesystem is stable. Fig. 10.18: Controllable and uncontrollable subspaces. The controllable Assume the initial and uncontrollable subspaces state isxinitial at [2 of the system are illustrated in Figure 10.18. 1]T position. Since the eigenvalue associated with the un-controllable subspace spanned byx2 is stable, the position of the state on thex2 axis will move from 1 to 0, although it is not controllable. Onthe other hand, the eigenvalue associated with the controllable subspace spanned byx1 is unstable; hence,the position ofthe state onthex1 axis will grow without bound if no control action is taken. However, a control action can be taken to convert the unstablestatex1 to becomestable. 10.4 Poles and Zeros of MIMO Systems We have learned that the behavior of a system is mainly determined by its pole locations plane, and if the system is controllable and observable (the definition of observability the next chapter) afeedback improve in the stability controller and performance. Chapter 8 on how they can be designed to move the poles to The zeros also have effect on system would influence the root locus on the complex will be given in more favorable performance, locations to as revealed diagram to shape up the closed-loop system performance. It is notedthat the zerosin the right half of the complex plane are notorious in limiting the performance of the closed-loop system, as described in Remark 8.23. For SISO systems, the poles and zeros can be easily found if their transfer functions are available. For MIMO systems with state-space model (A,B,C,D), the poles of the system can be evaluated as the eignevalues of the matrix Aif (A,B,C,D) is controllable and observable. However,the computa-tion of the zeros of MIMO systems is more complicated. In the following, we will explain the physical meaning of system zeros, give a precise definition of MIMO system zeros accordingly, and conver 374 10 State Feedback the computation and Linear Quadratic of zeros to a generalized The poles and zeros of Optimization eigen problem that can be solved efficiently. MIMO systems can also be computed based on their transfer function ma-trices intheformofG(s) =N(s)/d(s), where G(s) isapmrational function matrix with poutputs and minputs. The denominator d(s) is the least common denominator of all entries of G(s) and N(s) is apm polynomial matrix. However, thepolynomial approach isinvolved and beyond thescope ofthe book. The book by Kailath [Kailath, 1980] provides more detailed discussion on MIMO system poles and zeros. The general linear state-space modelis described by x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) (10.28) where x?Rn,u ?Rm,y ?Rp.Recall that thetransfer function ofthestate-space model was derived in Section 6.6.1 a G(s)=C(sI-A)-1B+D For SISO cases, the transfer function is a rational function G(s) = N(s)/D(s), where both N(s) and D(s) are polynomial function of s. The poles of the system are the roots of D(s) = 0, andthe zeros of the system are the roots of N(s) = 0. 10.4.1 Revisit Poles and Zeros of SISO Systems Consider thestate-space model (A,B,C,D) with one input and one output sothatx?Rn,u ?R1,y ?R1. Then Bis a column vector of length n, denoted b; Cis a row vector of length n, denoted c; and Dis a scalar, denoted d. Thetransfer function can be written [sI-A]b+d |sI-A| = k n(s) G(s) =c[sI-A]-1b+d =cAdj d(s) (10.29) |sI-A| where n(s) is a polynomial of degreeless than or equal to n and d(s) is a polynomial of degree n. The gain parameter k is a normalizing parameter such that the highest order coefficients of both n(s) and d(s) are both equal to one. The poles of the transfer function are the roots of d(s) = 0 and its zeros are the roots of n(s) = 0. Thisis a simple and conventional definition of single-input/single-output(SISO) poles and zeros. Example 10.13 (F/A-18 Revisited, Poles and Zeros of a SISO System) Recallthe F/A-18 longitudinal flight dynamics model of Equation 8.64 from which if only the el-evator control deisconsidered astheinput and theflight path angle ?=?-aastheoutput wewill have ? ? ? ? A=? 0 -2.212-0.25320 ?,b=? ? -0.02389 -28.32 0 ? -0.00033 -0.362 1 -32.2 ? 0 0 1 -3.8114 0 ? ? ? ? 0 -0.05145 -2.8791 ? ? 0 ? c =? 0 -101, d =0 With thisdata wecan evaluate thetransfer function G(s) =c[sI-A]-1b+d using Mathematica or use the MATLAB command: equation of the system is ss2tf (state space to transfer function). Now the characteristic 10.4 Poles and Zeros of MIMO Systems 375 |sI-A|=s4+0.63916s3 +2.3086s2 +0.052669s+0.023445 =0 whoseroots are the poles of the system. Equation 10.29 yields the transfer function, shown in factored form: G(s) = 0.051453 (s+4.393) (s-4.106) (s-0.03491) (s2 +0.02027s+0.01026) (s2 +0.6189s+2.286) We clearly see thefourth-order denominator and itsroots, thesystem poles -0.0101 j0.101 and -0.309j1.48,aswellasthethird-order numerator anditsroots, thesystem zeros-4.393, 4.106, and 0.03491. The computational % CSD A results in Example 10.13 are generated using the following Ex10.13 =[ Eq8.64 -2.3893e-02 State model -3.2923e-04 c = [0 -1 [NUM,DEN] 0] 0; 0 B(:,1); 0; 1.0000e+00 -3.8506e-07; -2.8791e+00 = 0; 9.5196e-04; -5.1453e-02 b Zeros -3.2200e+01; -2.5319e-01 0 -3.8114e+00 Poles 1.0000e+00 -2.2115e+00 0 =[ F/A-18 0 -3.6208e-01 4.0491e-11 B of -2.8317e+01 MATLAB code: 0 = 0]; 1]; d = 0; ss2tf(A,b,c,d) eig(A) damp(A) sys = ss(A,b,c,d) zpk(sys) 10.4.2 Physical Meaning of System Zeros For MIMO case,the transfer function G(s)=C[sI-A]-1B+D can be rewritten as G(s) =C Adj [sI-A] B+D |sI-A| = CAdj [sI-A]B+|sI-A|D= |sI-A| N(s) (10.30) d(s) Notice that thatN(s) isapm matrix. The elements ofN(s) arepolynomials insofdegree atmost n. G(s) isapm matrix whose elements are rational functions with least common denominator d(s). Thus, weseethat the poles of the system are easily identified asthe roots of the polynomial d(s), which is also the characteristic polynomial of the matrix A.Identifying the zeros of the transfer matrix G(s) is more complicated. During the 1970s an extension of the concept of zeros to MIMO systems wasa substantive topic of discussion (e.g., [Rosenbrock, 1973, 1974, Davison and Wang,1974, Kouvaritakis and MacFarlane, 1976a,b, Kalnitsky definition and Kwatny, 1977]). of SISO system Wecan establish zeros that does two things. an alternative, First, it provides but equivalent a new physical interpretation of a system zero, and second it can be extended to multiple-input/multiple-output basic idea is the following theorem. view to our ear-lier (MIMO) systems. The 376 10 Theorem State Feedback 10.14 (Physical and Linear Quadratic Optimization Meaning of SISO System Zeros) Consider a linear SISO state-space system defined by Equation 10.28. Ifthe complex number ? is a system zero then there exists aninput u(t)=e?tand aninitial state x(t0)=x0such thaty(t)=0forall t =t0. Proof: Recall that in Equation 6.23 of Section 6.6.1, we have ? ? Y(s)=C[sI-A]-1x0 + C[sI-A]-1B+D U(s) In the SISO case, Cis a row vector, Bis a column vector and Dis a scalar. Consequently, G(s) := ?C[sI-A]-1B+D ?=k n(s) d(s where d(s)=|sI-A| Suppose u(t) = e?t, equivalently, 1 U(s) = Thus, Y(s) = s-? CAdj [sI-A]x0+k n(s) d(s) d(s) 1 . s-? Because G(s) is realizable, the second term is a proper rational function. perform an (incomplete) partial fraction expansion: k n(s) 1 Take the second term and b a(s) = + s-? d (s) s-? From thebasic results ofthepartial fraction expansion, a(s) isapolynomial ofdegree n-1and bis d(s) a constant. Our goal is to determine the constant bin the usual way: lim s?? ?(s-?) kn(s) d(s) ? s-? 1 (s-?)a(s)+lim (s-?)b =lim d(s) s?? s?? s-? From this we determine b as n(?) b = k Hence, Y(s) = ?CAdj[sI-A]x0 ?s-? s-? ?CAdj[sI-A]x0 ? CAdj [sI-A]x0+k n(s) d(s) = G(?) d(?) = d(s) G(?) a(s) 1 d(s) + d(s) + It is always possible to determine x0 so that a(s) d(s) + d(s) =0 This follows from thefact thatCAdj [sI-A]x0isapolynomial oforder n-1and thencomponents of x0 can be used to matchits n coefficients to those of a(s). As a result, we have G(?) Y(s) = If ? is a zero of G(s), then Y(s) = 0 and y(t) = 0. s-? 10.4 Remark 10.15 (Another Interpretation of SISO System Poles and Zeros of MIMO Systems 377 Zeros) Theorem 10.14 assertsthat if a SISO system has a zero at s = ? (or a pair complex conjugate zeros) there exists a control input and aninitial state such that the resultant statetrajectory maintains the output at zero. Another interpretation is that regardless of the initial state, the system output contains only the homogeneous response (i.e., the specific input is blocked from having any affect on the output). The importance of this theorem is that it can be extended to to the question, What are the zeros of a MIMO system? MIMO systems and gives us the answer Consider once again Equation 10.28, but this timex ?Rn,u ?Rm,y ?Rp. This timewe ask ifthere isa?,ag?Rm foracontrol u(t)=ge?t andan initialstate x0?Rn such thatx(t)=x0e?t and y(t)=0,t =t0.Such asolution must satisfy ?x0e?t = Ax0e?t +Bge?t and 0 =Cx0e?t +Dge?t Putting these together ??I-AB??? we get -C D Definition 10.16 (MIMO -x0 = 0. g (10.31 System Zeros) The complex number ? is a zero ofthe system x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) with x?Rn,u ?Rm,y ?Rp ifEquation 10.31 has anontrivial solution forx0and g. The matrix equation, Equation 10.31 represents elements of the vectors x0 and g. A nontrivial value ? so that n+ p linear equations in the n+m unknowns, the solution exists if and only if there exists a complex ??I-A B? -C D drops belowits normal rank, andthis ?is a zero of the system (A,B,C,D). The matrix S(?) = ??I-AB? (10.32) -C D is called the system matrix or Rosenbrock system matrix [Rosenbrock, 1969]. It is the degeneracy of the system matrixthat leads to system zeros. If Rank(B) =m and Rank(C) = pthen the generic rank of S(?) (i.e., for generic values of ?)is n+min(m, p). Rank(B) =m meansthat the mcontrols are independent. Rank(C) = p meansthat the p outputs are independent. If all controls and outputs are independent, then all zeros are associated with specific values of ? that reduce the rank of S from n+min(m, p). In the following discussion we assumeindependent controls and outputs. Wecan identify different leads to categorization conditions of system under zeros into which nontrivial several types. solutions of Equation This is accomplished 10.31 exist, by examining which various conditions that lead to degeneracy of the system matrix S(?). Thoseparticular values of ? for whichthe rank ofthe Rosenbrocksystem matrix S(?) drops below its normal rank are called invariant zeros. Invariant zeros can be of three different types: 378 10 State Feedback and Linear Quadratic Optimization 1. Input decoupling zeros: The eigenvaluesassociated with uncontrollable modes.The values of ? that satisfy ? <n ? ?I-AB rank 2. Output decoupling zeros: The eigenvalues associated with unobservable that satisfy rank 3. Transmission zeros: ??I-A? <n C All other invariant zeros. The problem of finding the values ? that rank is a special modes. The values of ? case of the generalized model (A,B,C,D) theorem. makethe system matrix of Equation 10.32 lose its normal eigenvalue problem. The computation of the zeros of a state-space based on the Rosenbrock system matrix S(?) is summarized in the following Theorem 10.17 (Computation of the Zeros of State-Space Thezeros ofthe state-space model(A,B,C,D) Model (A, B, C, D)) are the generalized eigenvalues ?i so that ??iI-A B? ?? ??AC -D-B?? vi=[?iE-Z] vi vi = ?i -C D I 0 0 0 - (10.33 where vi are the corresponding generalized eigenvectors. The MATLAB command Dz=eig(Z,E) or [Vz,Dz]=eig(Z,E) can be employed to obtain the generalized eigenvalues and the generalized eigenvectors in Vz, respectively. system in Example This state-space approach wasemployed to find the zero of a simple first-order 10.3. In Example 10.13, we obtained the poles and zeros of a fourth-order Dz and SISO F/A18 SISO system by converting the state-space modelto a transfer function. We will verify the zeros of the fourth-order F/A18 SISO system in the next example bythe Theorem 10.17 approach. Example 10.18 (F/A18 State Space) SISO Longitudinal Revisited, Computation of Zeros of a SISO System in Recallthat the F/A18 longitudinal flight dynamics A = ? ?0 ? ? ? ? -2.212 -0.2532 0 ?, b=? ? -0.02389 -28.32 0 -0.00033 -0.362 1 ? 0 model considered in Example 10.13 is given by 0 1 -32.2 0 0 ? ? ? ? -3.8114 -0.05145 -2.8791 ? ? 0 ? c =? 0 -101, d =0 With the data (A,b,c,d) obtained from running the Example 10.13 program, zeros of the system using the following MATLAB command: % CSD Ex10.18 Z=[A -b; Eq8.64 c E=blkdiag(eye(4),zeros(1)) Dz=eig(Z,E) -d]; Compute F/A-18 SISO zeros we can compute the 10.4 And the results E Poles and Zeros of MIMO Systems 379 will be: = Dz 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 = 3.4907e-02 -4.3935e+00 4.1059e+00 -Inf Inf Asexpected, wehave obtained thesame three zeros, 0.034907, -4.3935, and4.1059, fortheSISO system by either the direct computation eigenvalues of the system matrix. Example 10.19 (F/A18 in State Space) Recall the F/A18 of the transfer MIMO Longitudinal longitudinal flight function or computing the generalized Revisited, Computation of Zeros of a MIMO System dynamics model of Equation 8.64, from which both of the elevator andthrust controls, deand dT, are consideredasthe inputs and boththe flight path angle ?= ?-aand theairspeed Vare theoutputs, and wewill have -3.8114 9.5196*10-4 -28.320 -32.2 ?-0.02389 ? ?-0.05145 ? -0.00033 -0.362 1 -3.8506*10-7 A=? 0 -2.212-0.25320 ?,B=? ?0 -101? ? ? 0 ? ? ? ? ? ? 0 C = 1 0 , 0 0 0 1 0 ? -2.8791 0 0 ? 0 00 D = 00 Run the Example 10.13 program to obtain the data A, B, then we can find the 2-input/2-output transfer function matrix using the following MATLAB command: % CSD C=[0 Ex10.19 -1 0 Eq8.64 1; 1 0 F/A-18 0 0]; Then we have the transfer From input 1 to zpk(sys) functions from the two inputs to the two outputs: (s+4.393) 0.02027s -3.8114 (s-4.106) (s-0.03491) + 0.01026) (s-6.57) (s2 + (s+6.623) 0.6189s + 2.286) + 2.286) (s+0.1803) --------------------------------------------------(s2 + From sys=ss(A,B,C,D), --------------------------------------------------(s2 + 2: Zeros output... 0.051453 1: Poles D=zeros(2); input 0.02027s 2 3.8506e-07 to + 0.01026) (s2 + 0.6189s output... (s+0.8378) (s2 + 0.2532s + 2.212) 380 10 1: State Feedback and Linear Quadratic Optimization --------------------------------------------------(s2 + 0.02027s 0.00095196 2: + 0.01026) (s2 (s-0.01245) (s2 + + 0.6189s 0.6392s + + 2.286) 2.314) --------------------------------------------------(s2 + 0.02027s + 0.01026) (s2 + 0.6189s + 2.286) Notice that thefourelements thatmake upthe22 transfer function matrix are rational functions with a common denominator that provides a clear identification of the poles. However, the zeros of each individual numerators are not the zeros of the system. Although the zeros can be obtained as the complex values of s that makethe numerator matrix N(s) lose its normal rank, the computation complicated and numerically unreliable. Weobtain the zeros by determining of the system matrix. Withthe MATLAB command: Z=[A -B; C is the generalized eigen-values -D]; E=blkdiag(eye(4),zeros(2)) Dz=eig(Z,E) we will havethe following results: E = Dz 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = -Inf -4.4631e+00 4.2099e+00 Inf Inf Inf We have thetwozeros: -4.4631 and 4.2099. We can gofurther and confirm thatthesystem isboth controllable and observable. Thus, the two system zeros are transmission zeros. 10.5 State-Feedback Control via Linear Quadratic Regulator Design Consider a system described by the following state equation x?(t) = Ax(t)+Bu(t) (10.34) where x?Rn,u ?Rm, and allthestate variables inx(t)are available forfeedback. Recall that thebe-havior and performance of the system are mainly determined by the poles of the system, which are the eigenvalues of the A matrix. Using the state-feedback u(t) the state equation of the closed-loop system x?(t) control to close the loop, = Fx(t) (10.35) will become = (A+BF)x(t) (10.36 10.5 State-Feedback and then the behavior and performance Control of the closed-loop via Linear system Quadratic Regulator will be dictated Design 381 by the eigenvalues of A+BF. If the system is controllable, orthe rank of the controllability matrix C=[B ABA2B An-1B] is n, then the eigenvalues state feedback wasfirst of of the complex plane. The concept of the unstable simple in-verted More detailed discussions of the state-feedback pole placement approach were Sections 7.5.1 and 7.5.2, respectively, The direct approach simple can be placed anywhere applied in Section 4.4.3 of the book to stabilize the originally pendulum system. given later in A+BF is implemented but computationally according for the direct approach to Equations can become very complicated and the transform 10.35 and 10.36, for high-order approach. which are conceptually systems. Onthe other hand, the transform approach requires the state equation be transformed into the companion form, but the effort of the transformation certainly is worthwhile as easy as that for the low-order In addition to stabilizing a system Section 7.6.4, the state-space since it has madethe computation for high-order compu-tations systems. at an originally pole placement approach unstable can equilibrium, work together as demonstrated in with tracking/regulation theory and root locus design, as shown in Section 8.6.3 and Section 8.7, respectively, to achieve aircraft flight path angle tracking control and aircraft altitude regulation. The reasoning behind the pole placement approach is that the performance of the system is quite related to the pole locations on the complex plane. For example, the typical second-order system under-damped step response isdetermined bythetwocomplex poles -a? ortheir associated damping ratio ? and natural frequency ?n, as shown in Section 3.4, particularly demonstrated in Figures 3.10 and 3.11. However, in general, especially desired time-domain for high order systems, the pole locations performance. in the pole placement Furthermore, design process. control-input Hence, substantial constraints simulations may not precisely are not explicitly usually are required reflect the considered to verify the design. Thelinear quadratic regulator (LQR) design is a time-domain performance index optimization ap-proach in which the performance index consists of two parts: one accounting for the performance and the other representing the control-input solution by solving can be found effort. With a chosen the optimization weighting function, an optimal trade-off problem. 10.5.1 Performance Index and LQR State Feedback Consider the system described by the state equation Equation 10.34. Assumethe system is stabilizable; then the LQR control the closed-loop design problem is to determine system is stable and the performance PI = a state-feedback control law u(t) = Fx(t) so that index, ?8 ?xT(t)Qx(t)+uT(t)Ru(t) ? dt (10.37) 0 is minimized, where Q?Rnn ispositive semi-definite andR?Rmm ispositive definite. The definitions of positive definite and positive semi-definite Theorem 10.20 (Linear Assume the system Quadratic matrices are given in Appendix E.6. Regulator State Feedback) with the state equation Equation 10.34 is stabilizable, then the optimal state-feedback control that stabilizes the closed-loop system and minimizesthe performance index PI ofEqua-tion 10.37 for any initial state x(0) = x0i 382 10 State Feedback and Linear Quadratic Optimization (10.38) u=Fx withF =-R-1BTX where X =XT=0istheunique positive semi-definite stabilizing solution ofthe algebraic Riccati equa-tion [Zhou et al., 1995, Kailath, 1980], ATX+XA-XBR-1BTX+Q =0 and the optimal performance 10.5.2 Stabilizing (10.39 0 Xx0. index is PIopt = xT Solution of the Algebraic Riccati Equation One wayto solving for the stabilizing solution of the algebraic Riccati equation, Equation 10.39, is to use its corresponding Hamiltonian matrix [Zhou H = et al., 1995, Kailath, 1980], ?-QA -BR-1BT ? -AT (10.40) The eigenvalue structure of the Hamiltonian matrix hasthe following interesting property. Theorem 10.21 (Eigenvalues of the Hamiltonian Matrix) The set ofthe 2n eigenvalues ofthe Hamiltonian matrix H are symmetric with respect to the imagi-nary axis. That is,?isaneigenvalue ofHifandonly if-? is. Assumethe Hamiltonian matrix H has no eigenvalues on the imaginary axis; then H has n stable eigenvalues in the left half of the complex plane and another n unstable eigenvalues in the right half of the complex plane. The n eigenvectors associated with the stable eigenvalues can be stacked to form a 2nncomplex matrix T?C2nn with partition asfollows: T = ?? T1 (10.41) T2 where T1and T2areboth nn complex matrices. IfT1 isinvertible, then thestabilizing solution ofthe Riccati equation is X = T2T1-1 (10.42) The stabilizing solution Xis real, symmetric, positive semi-definite, and unique. Notice that the stabilizing solution exists only if the two conditions are satisfied: (1) The Hamil-tonian matrix has no eigenvalues on the imaginary axis, and (2) the matrix T1is invertible. These two conditions are satisfied under the two assumptions of the LQR problem formulation, which are: (1) (A,B) is stabilizable, and (2) the weighting matrices Qand Rare positive semi-definite and positive definite, respectively. Example 10.22 (The Stabilizing Solution of an Algebraic Riccati Equation) Considerthe system x?(t) which was employed in = Ax(t)+Bu(t) Examples = ? ? ?? -2 -2 x(t)+ 2 3 7.27 and 7.28 to demonstrate -1 1 u(t) the pole-placement state-feedback Here, we will usethe LQR Riccati equation approach to find a state feedback u(t) that the closed-loop system is stable and the performance index ap-proaches. = Fx(t) so 10.5 State-Feedback PI = Control via Linear ?8 Quadratic Regulator Design 383 ? dt ?xT(t)Qx(t)+uT(t)Ru(t) 0 is minimized, wherethe weighting matricesare chosen as Q = ?? 10 , 01 R =1 Note that theopen-loop system has poles at-1and 2;hence, itisunstable. (A,B) isstabilizable since it is controllable. The Hamiltonian matrix corresponding Riccati -2 -2 -1 1 ? ? ?-Q -AT ?=?-1 0 2 -2 0 -1 2 -3 10.39, is A -BR-1BT 2 3 1 -1 H = whose eigenvalues to the algebraic ? ? ? ? are -2.4885,-0.89856, 2.4885, 0.89856 and the eigenvectors associated withthe stable eigenvalues are ? ?? =? ? 0.28724 T = T1 T2 ? ? ? ? ? 0.41001 -0.2049 -0.19405 -0.3267 0.59762 ? ? -0.87680.66112 hence, the stabilizing Riccati solution is X = T2T-1 1 = 6.5737 10.81 10.81 19.433 The state-feedback gain is thus ? F =-R-1BTX =? -4.2361 -8.6231 and the closed-loop system poles are now the eigenvalues of A+BF, which are -2.4885,-0.89856 exactly the same as the stable eigenvalues These numerical % CSD Hamiltonian matrix. results are obtained by running the following Ex10.22 State A=[-2 -2;2 H=[A -B*inv(R)*B'; T2=V(3:4,1:2), of the 3]; feedback B=[-1;1]; Riccati eig_A=eig(A), -Q -A'], MATLAB code: Hamiltonian Q=eye(2); [V,D]=eig(H), R=1; T1=V(1:2,1:2), X=T2*inv(T1), Riccati_Eq_Check=A'*X+X*A-X*B*inv(R)*B'*X+Q, F=-inv(R)*B'*X, eig_ABF=eig(A+B*F) A MATLAB command: lqr can also be employed to find an LQR solution: equation, Equation 384 >> 10 State Feedback and Linear Quadratic Optimization [K,S,E]=lqr(A,B,Q,R) K = S = 4.2361e+00 E 8.6231e+00 6.5737e+00 1.0810e+01 1.0810e+01 1.9433e+01 = -2.4885e+00 -8.9856e-01 Note thatK=-F,S=X,andEgives theeigenvalues ofA-BKorA+BF. If only thesolution of the algebraic follows: >> Riccati equation is of interest, the MATLAB command: are can be applied as X=are(A,B*inv(R)*B',Q) X = 6.5737e+00 1.0810e+01 1.0810e+01 1.9433e+01 10.5.3 Weighting To employ the a nonlinear Matrices Q and Rin the Performance control design approach, LQR state-feedback dynamics Index model of the system to be controlled, Integral usually the we start with the knowledge desired operating equilibrium, and measurement noises, system model uncertainties, and actuator limitations. the design process, demonstrate we will use the simple how to formulate inverted a state-feedback pendulum control system problem discussed in of distur-bances To demonstrate Section as an LQR optimization 4.4 to problem. The schematic of the simple inverted pendulum system is depicted in Figure 4.8, wherethe two state variables x1 = ? and x2 =?? arethe angular displacement andthe angular velocity of the pendulum, respectively, and the control input u = fa is the external control force perpendicular to the gravity. The nonlinear dynamics model of the system is represented ????sinx1-b x?1 x?2 = by the following nonlinear state equation: ? x2 (10.43) m?2 x2 + m? 1 cosx1 u g Theequilibrium ofinterestis at x* =[0 0]T, whichrepresentsthe stick atthe upright position ? = 0 with zero angular velocity?? = 0. Assumeg = 9.8 m/s2,? = 1.089 m, m = 0.918 kg, b = 0.551 Nss that g b = 9, ? 1 m?2=0.6, m? = 1 hence,the state equation of the linearized modelatthe upright stick equilibrium x* =[0 found as x?(t) = Ax(t)+Bu(t) Note that the uncompensated = ?9 -0.6? ?? 0 system is not stable 1 x(t)+ 0 1 at this equilibrium 0]T can be u(t) (10.44) since the eigenvalues of the Amatrix are2.715 and-3.315. Recall thatin Section 4.4.3, astate-feedback controller u =Fx= [-34 -7.4] x was designed based onthepole placement approach toplace theclosed-loop system poles at-4 j3sothatthedamping ratio and thenatural frequency are? =0.8and?n=5rad/s, respectively. Asimulation that demonstrates the performance was shown in Figure 4.11. of this pole-placement state-feedback con-troller 10.5 In the following, State-Feedback we will employ the Control via Linear Quadratic Regulator LQR approach to design a state-feedback Design controller 385 to stabilize the system and minimize the performance index PI, PI = ?8 ? dt ?xT(t)Qx(t)+uT(t)Ru(t) 0 where Q and Rare positive semi-definite and positive definite, respectively. Aslong as (A,B) is sta-bilizable and the Q and Rrequirements are satisfied, any state-feedback controller designed based on the LQR approach theorem, Theorem 10.20, will stabilize the system. However, to achieve a desired closed-loop system performance the weighting matrices Qand Rneed to be chosen carefully according to the performance requirement and the control-input constraint. In the following examples, we will not only design an LQR state-feedback controller to stabilize the system atthe originally unstableequilibrium, x* =[0 0]T. Wewouldlike the controller to be able to bring the system from a perturbed state, say x(0) =x0 =[0.2618 0]T, back to the equilib-rium x* =[0 0]T as quickly and smoothlyas possiblewithin control-input constraint. Notethat x1 = ? = 0.2618radis 15?. Since the controllability matrix [B AB] = ?1 -0.6? 0 1 is of full rank, the system is controllable and thus stabilizable. strategy, u(t) complex There exists a state-feedback control = Fx(t), so that the closed-loop system poles orthe eigenvalues of A+BF, plane as well as the control-input we will consider three sets of Q and constraints R weighting are satisfied. In the following matrices, respectively. are in the left three examples, For each set, there a unique stabilizing optimal controller. By evaluating the performance of each controller, see how the choice of Q and R would affect the performance of the system. exists we may Fig. 10.19: Simulation diagram to evaluate LQR controller performance. Although the controller is designed based on the linearized model, Equation 10.44, the nonlinear model Equation 10.43 is employed in the simulation, as shown in Figure 10.19. The function Fcn is defined by block f(u)=9*sin(u(1))-0.6 *u(2)+cos(u(1)) *u(3) where u(1), u(2), and u(3), respectively, represent the state variables x1, x2, and the control-input u of Equation 10.43. Theinitial condition of the state variables are assigned as x20=0 an 386 10 State Feedback x10=0.2618, and Linear respectively, inside Quadratic Optimization the integrator stick has deviated from the equilibrium blocks. This initial condition meansthat the pendu-lum by 15 degreesto the right with zero angular velocity. Example 10.23 (Case 1 LQR State Feedback Controller for the Simple Inverted Pendulum) Considerthe state equation, Equation 10.44, whichis the linearized state-space model of the nonlin-ear simpleinverted pendulum dynamics of Equation10.43atthe unstableequilibrium x* =[0 the weighting matrices Qand R be Q = ?? q1 0 , 0 q2 0]T.Let R = r1 then xTQx = q1x2 1 +q2x22, and the performance index (also called cost function) PI = uTRu = r1u2 will be ?8 2+r1u2? ?8 ?8 ?8 ? q1x21 +q2x2 dt x2 1 dt = q1 0 +q2 0 x2 2 dt 0 +r1 u2 dt 0 The three terms on the right-hand side of the equation are the weighted total energies of the angular displacement(x1 = ?),the angular velocity (x2 =??), andthe control-input force (u = fa), respectively. For Qto be positive semi-definite and R positive definite, q1 and q2 haveto be greater or equal to zero and r1 is required to be greater than zero. The control-input weight r1 cannot be zero since r1 = 0 meansthat infinity feedback is allowed, which of course is not practically possible. Making r1 larger will put more constraint to be made larger on the control-input if the reduction energy consumption. of the energy Similarly, of x1 would improve the weight q1 may need the performance. We will begin with the selection of the weights q1 = q2 = 1 and r1 = 1, find the unique stabilizing controller that minimizes the performance index associated with this particular weight selection, eval-uate the performance of the closed-loop system, and then revise the weight selection according to the performance evaluation. Withthis Q, Rselection, ?? ? Q = 1 0 0 1 , R =1 the unique stabilizing solution for the algebraic Riccati equation can be found as X = 60.831 18.055 18.055 5.5213 The state-feedback gain is thus ? F =-R-1BTX =? -18.055 -5.5213 and theclosed-loop system poles areat-2.5018 and-3.6195. Since theinitial state isx(0)=x0= [0.2618 0]T,the minimal performance index is 0 Xx0 = 4.1693 PIopt =xT Based on Equation 10.43 and the simulation diagram in Figure 10.19, a Simulink program is assem-bled to conduct simulations to observe the time-domain responses dueto the initial conditions of x1 and x2. Thetime-domain responsesof the two state variablesx1(t) = ?(t) and x2(t) =??(t) dueto the initial 10.5 State-Feedback Control via Linear Quadratic Regulator Design 387 conditions x1(0) = 0.2618 rad and x2(0) = 0 rad/s, are shown on the left-hand side of Figure 10.20. Meanwhile, the control-input action is recorded on the right graph of the figure. The pendulum initially is tilted to the right by 15?(0.2618 rad). The deviation of the pendulum position from the equilibrium x*=[0 0]Tprompted thecontrol-input u(t) toreact immediately, changing from0Nto-4.7Nand then gradually reducing to zero so that the angular velocity x2 and the angular displacement x1 can change accordingly to bring the pendulum back to the equilibrium. It takes about 2.8 seconds to bring the pendulum back to the equilibrium. Comparing the simulation results of Case 1 LQR state-feedback controller with those of the pole placement state-feedback controller shown in Figure 4.11, we observe that the latter only takes about 1.7seconds toconverge totheequilibrium while using more control-input, -8.8N. Inthenext ex-ample, we will reduce the control-input weight r1 to allow using more control-input energy and then observe if this change will improve the performance. Fig. 10.20: Simulation results of the Case1 LQR controller performance. Before getting into the next example, it is interesting to see if multiplying Q and R by the same constant would change the outcome of the LQR state-feedback controller design. Let the Q and Rin Case 1 design be multiplied by 10 to become Q = ?? 10 0 0 10 , R = 10 and repeat the LQR controller design in Example 10.23. We will see the stabilizing solution Xto the algebraic Riccati equation becomes 10 times of the solution obtained in Example 10.23, and thus, the minimal performance index PIopt will increase 10 times accordingly to 0 Xx0 = 41.693 Jopt = xT However,the stabilizing state-feedback gain matrix F remains the same as ? F =-R-1BTX =? -18.055 -5.5213 since the same variation in Rand X cancels each other. Therefore, only the relative weights areimpor-tant, and the value of the minimal performance index PIoptdoes not reflect the performance ofthe closed-loop system. Example 10.24 (Case 2 LQR State Feedback Controller for the Simple Inverted Pendulum 388 10 State Feedback In this example, and Linear we consider Quadratic Optimization the same simple inverted pendulum control problem with the same LQR state-feedback control design as in Example 10.23. The only difference is in the selection of the weighting matrices Q and R. Let the weighting matrices Qand Rbe Q = in which the ? ?? ? q1 0 1 0 = 0 q2 Q matrix is the same as that in usage of control-input energy that 0 1 , R =r1 = 0.001 Case 1, only the may improve weight r1 is reduced to 0.001 to allow the closed-loop system performance by shortening more the convergence time to the equilibrium. Withthe Q, Rthus selected, the unique stabilizing solution for the algebraic Riccati equation can be found as 1.088 0.041879 X = 0.041879 0.032326 ? The state-feedback ? gain is now ? F =-R-1BTX =? -41.879 -32.326 and theclosed-loop system poles areat-1.0308 and-31.895. Since theinitial state isx(0)=x0= [0.2618 0]T,the minimal performance index is 0 Xx0 = 0.074568 PIopt =xT Thetime-domainresponsesofthe two statevariablesx1(t) = ?(t), x2(t) =??(t), andthe control input u(t) due to the initial condition: x1(0) = 0.2618 rad and x2(0) = 0 rad/s, are shown in Figure 10.21. It does utilize more control-input magnitude with-11Nofforce compared with-4.7N in Case 1. However, the converges performance to the equilibrium within Fig. 10.21: Simulation is not improved. Actually it gets worseneither x1 nor x2 3 seconds. results of the Case 2 LQR controller performance. The choice of q1 (the weightfor x1 = ?) and q2(the weightfor x2 =??) to beidentical in Cases 1 and 2 may not be a good one. Although the energy of x2 (angular For this reason, q2 should velocity) be chosen eventually both x1 and x2 shall converge will slow down the convergence of x1 (angular much smaller than q1. Withthe to zero, limiting displacement). weights being chosen as q1 = 1000 10.5 q2 = 0, and r1 State-Feedback = 1, we saw a great improvement Control via Linear in performance. Quadratic After a few Regulator Design minor revisions, 389 it seems that the weight selection of q1 = 1,000, q2 = 20, and r1 = 1.2 will give an optimal performance. The LQR controller design associated with this Q = and the performance Example evaluation 10.25 (Case In this example, q1 0 103 0 0 20 = 0 q2 of the closed-loop 3 LQR matrices ? ?? ? State Feedback , system R = r1 = 1.2 will be given in the following Controller for the Simple Inverted example. Pendulum) we consider the same simple inverted pendulum control problem LQR state-feedback control weighting Q and R. Let the matrices Case 3 weighting design as in Q= Example weighting 10.23. matrices The only difference 103 0 , 0 20 = of the Q and R be ? ?? ? q1 0 0 q2 with the same is in the selection R = r1 = 1.2, in which the weight q1is muchlarger than the weight q2to emphasize the minimization of the x1 energy while allowing selected to enough energy for x2 to speed up the convergence make sure the control-input constraint condition is to the equilibrium. The weight r1 is met. Fig. 10.22: Simulation results of the Case3 LQR controller performance. Withthe Q, Rthus selected, the unique stabilizing solution for the algebraic Riccati equation can be found as 361.08 47.086 X = The state-feedback ? 47.086 11.007 gain is now ? F =-R-1BTX =? -39.238 -9.1725 and theclosed-loop system poles areat -4.8863 j2.5224. Since theinitial state isx(0)=x0= [0.2618 0]T,the minimal performance index is PIopt =xT 0 Xx0 = 24.748 Thetime-domain responsesof the two state variables,x1(t) = ?(t), x2(t) =??(t), andthe control input u(t) due to the initial condition, x1(0) = 0.2618 rad and x2(0) = 0 rad/s, are shown in Figure 390 10 State Feedback 10.22. Withthis and Linear Quadratic LQR state-feedback Optimization controller, it only takes 1.15 seconds by using less than control input to bring the perturbed pendulum state at the 15-degree tilted to the equilibrium pendulum statethe upright 10.3N of angular position back position. Withthis state-feedback control law u = Fx, the closed-loop system poles are the eigenvalues of A+BF, which are-4.8863 j2.5224. The damping ratio and thenatural frequency associated with the closed-loopsystem polesare ? = 0.889and ?n = 5.499rad/s. 10.6 Exercise Problems P10.1: In this exercise problem, we will review how to find equilibriums of a nonlinear system, and how to obtain a linearized state-space study the system characteristics lightly model of the nonlinear system at a chosen equilibrium. at and around the equilibrium. Assume the nonlinear Then we will state equation of a damped pendulum system, whichis similar to the onein Equation 10.4, is given below, x? = ??? x?1 x?2 = ? x2 = f(x,u) -a0sinx1-a1x2+b0u where a1 = 0.1, a0 = 20, and b0 = 40. The state variables = ? ? f1(x1,x2,u) f2(x1,x2,u) x1 and x2 represent the angular (10.45) displacement and the angular velocity of the pendulum system, respectively. The control input uis the applied torque to drive the system. Fig. 10.23: Identify equilibriums andfind the linearized P10.1a: As a brief recap of the linearization the equilibriums. model at a chosen equilibrium. process, Figure 10.23 shows that the first step is to find Assumethe operating equilibrium is chosen to keep the angular displacement of the pendulum at 18? = 0.1p rad, whichis x1 = x*1 = 0.1prad andx2 =x* 2 = 0 rad/s. Find the corresponding control input u = u* Nm at the equilibrium. P10.1b: Find the linearized state equation x?(t) = x(t)+B A u(t) (10.46 atthe equilibrium (x*1,x*2,u*) chosenin P10.1a. P10.1c: Find the characteristic equation of the linearized model and the poles of the system, and com-ment onthe system characteristics based on the damping ratio, natural frequency, andthe location of the poles on the complex plane. P10.1d: Build a simulation program according to the linearized state-space modelin Equation 10.46. Conduct the simulation withthefollowing conditions: u(t) = 0,x1(0) = 9? =0.05prad,andx2(0) = 10.6 Exercise Problems model in Equation 391 0rad/s. Plot thesimulation results x1(t)and x2(t)fort =0. P10.1e: Build a simulation program according to the nonlinear state-space 10.45. Applythe equilibrium control input u(t) = u* Nmto the system, and observethe values of the state variables x1(t) and x2(t) after the system reaches the steady state. Whatarethe values of x1(t) and x2(t) at the equilibrium state? P10.1f: Withthe nonlinearsimulationprogramatthe equilibrium(18?,0,u*), manuallymovex1from 18? to the 27? position, and release at t = 0. Plot the state variables x1(t), x2(t), and the control input u(t). Comparethe nonlinearsimulationresponsesx1(t), x2(t) withthe linear simulation responses x1(t) andx2(t) obtainedin P10.1d. P10.2a: This exercise problem is a continuation of Problem P10.1. As revealed from the solutions of P10.1, the time response of the uncompensated pendulum system is oscillatory with large overshoot. In the following we would design a controller, also called a compensator, to improve the performance of the system. First of all, let us check the controllability of the system. Show that the system represented by Equation 10.46 is controllable. P10.2b: Find a state feedback u(t) = F x(t) so that n = s2 +18s+100 |sI-(A+BF)|=s2+2??ns+?2 That is,theclosed-loop system poles willbeplaced at-9 j4.359, or,equivalently, thedamping ratio andthe naturalfrequency are ? = 0.9 and ?n = 10rad/s, respectively. Fig. 10.24: Closed-loop system with state feedback. P10.2c: Build a simulation program according to Figure 10.24(a), which includes the linearized state-space model and the state-feedback controller obtained in P10.2b. Conduct the simulation with the initial condition x1(0)=9?=0.05prad, and x2(0)=0rad/s. Plot thestate response x1(t)and x2(t)fort =0. P10.2d: Build a simulation program according to Figure 10.24(b), which includes the nonlinear model and the state-feedback controller obtained in P10.2b. Conductthe simulation state-space withthe initial condition: x1(0)=27? =0.15prad, and x2(0) =0rad/s. Plot thestate response x1(t) and x2(t) fort =0. P10.2e: Comparethe nonlinearsimulation results x1(t) and x2(t) in P10.2d withthe linear simulation resultsx1(t) andx2(t) obtained in P10.2c, and give your comments. P10.3: Consider a set of linear algebraic equations, whichis represented in the following matrixform 392 10 State Feedback and Linear Quadratic Optimization ?2 1 -1? Ax =b,where A=?34-10 -3-5? 1 2 A systematic way of investigating the null space of the the solution existence 1 ? ? ? ? and uniqueness is to find the range space and matrix. P10.3a: Findthe range spaceof the matrix A, Range(A). P10.3b: Findthe null space ofthe matrix A, Null (A). P10.3c: Find the condition on the vector b such that the equation has solutions. P10.3d: Assume bT = ? 5 4 3 2 . Doesthe equation have a solution? Is the solution unique? If the equa-? tion has morethan one solution, find the full set of solutions. P10.4: Recallthat the controllable subspace is the range space of the controllability matrix C, while the uncontrollable subspace is the null space of CT. The null space of CTis the orthogonal complement of the range space of C. Consider a system represented by the following state equation: x?(t) = Ax(t)+Bu(t) = ? ? ? ?? ?x(t)+ ? ?u(t) -14 -19-23 19 27 33 -1 0 1 -6 -9 -11 P10.4a: Find the controllability matrix C, and determine if the system is controllable. P10.4b: Find the controllable subspace of the system, which is the range space of the controllability matrix, Range(C). CT? P10.4c: Find the uncontrollable subspace of the system, which is the null space of the transpose of the controllability matrix, Null ? . P10.4d: Usethe basis vectors of the range space of Candthe null space of CTto construct a similarity transformation matrix T = ? T1 T2 ? to transform the state equation into the controllability decomposition form, as shown in Theorem 10.9. P10.4e: Is the system stabilizable? Explain. P10.4f: Design a state-feedback controller sothat the closed-loop system is internally stable. P10.4g: Find the closed-loop system poles. P10.4h: Assumethe initial state of the system is x(0) closed-loop =? system. ?T 1-13 . Plot the state response x(t) of th P10.5: For a SISO system, the zeros can befound easily from its transfer function. the case for MIMO systems. In this exercise, model to find the zeros of the system. the system. you will apply However,that is not Theorem 10.17 to a simple SISO state-space Then verify the result using the zeros of the transfer function of 10.6 P10.5a: Consider a SISO system described by the following x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) state-space Exercise Problems 393 model where A =-1,B=1,C=-3,andD=1.Determine thepole and zero otfhesystem directly using the state-space model. That is, use Theorem 10.17to determine the zero, and compute the eigenvalue of the A matrixto obtain the pole. P10.5b: Find the transfer function of the system and use it to determine the zero and the pole of the system. P10.5c: Comment onthe relationship of the poles and zeros obtained in P10.5b and P10.5c. P10.6: Consider a MIMO system described by the following state-space model where x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) ? ? ?? ?100 -10 00 -248 ? ? ?? 04 0 00 1 0 A = 0 10 0 0 0 0 ? ? ? ? ? ? ? ? ? ? 0 0 1 0 0 ? , B = ? 00 0 10 ? 0 1 , ? C = 0 1 0 1 3 ? 0 0 ? 00 P10.6a: Find the poles of the system by computing the eigenvalues of the A matrix, and determine the zeros of the system by using Theorem 10.17. P10.6b: Find the transfer function matrix of the system, and useit to determine the poles and zeros for each entry of the transfer function matrix. P10.6c: Comment onthe relationship of the poles and zeros obtained in P10.6b and P10.6c. P10.7: In this exercise problem, considered in Section 10.2.2. wewould like to revisit the lightly damped pendulum positioning system Recall that at the equilibrium (x*1,x*2,T*) = (15?,0?/s,0.19043Nm) we havethe linearized state-space model x?(t) = x(t)+BT(t) A wherethe matrices A and B are given by Equation 10.6, A = ?-21.32-0.135? ?? 0 1 , B = 0 30 A pole placementapproach wasemployedto improve the dampingratio from ? = 0.0146to ? = 1.0011. In the following, we will utilize the index is optimized. LQR approach to design a state-feedback controller so that a perfor-mance 394 10 State Feedback and Linear Quadratic Optimization P10.7a: For notational simplicity, the state vectorx(t) and the control input T (t) will bereplacedby x(t) and u(t), respectively. Thatis, the linearized state-space model of the system to be controlled is x?(t) = Ax(t)+Bu(t) = ?-21.32-0.135? ?? 0 1 The objective is to design a state-feedback controller u(t) stable and the following performance index PI = 0 x(t)+ 30 (10.47) u(t) = Fx(t) so that the closed-loop system is ?8 ?xT(t)Qx(t)+uT(t)Ru(t) ? dt 0 is minimized. The solution of this optimization problem is u(t)=Fx(t) withF =-R-1BTX where Xis the positive semi-definite stabilizing solution of the following algebraic Riccati equation: ATX+XA-XBR-1BTX+Q =0 Let the weighting matricesin the performance index integral be Q = Find X, which is the positive semi-definite ?? 1 0 0 1 , stabilizing R =1 solution of the above algebraic Riccati equation, and then use ittodetermine theoptimal state-feedback gain matrix F =-R-1BTX. P10.7b: Find the closed-loop damping ratio system poles, which are the eigenvalues of A+BF, and the corresponding and natural frequency. P10.7c: Letthe initial state be x(0)T = ? 20? 0?/s ? = ? 0.349rad 0rad/s ? Plot the state response x(t) and the control input u(t). P10.7d: Comment onthe pole location andthe simulation results of the closed-loop system. P10.7e: Changethe weight matrices Q and R,repeat the above design and simulations, and comment on how the weighting matrices affect the performance 11 ObserverTheory and Output Feedback Control U P to now, we have learned how to employ the state-space model and state-feedback control with pole placement, linear quadratic optimization, and internal model principle to achieve sta-bilization, tracking, regulation, and performance enhancement. The state-space approach can also work together withthe classical root locus design approach to achieve precise pole placement per-formance. However,the state-feedback approach requires direct accessto all the system state variables, which maynot be possible in manyapplications. Consequently, we needto generate suitable estimates of the states based on the available observer structure to efficiently the state-space model. The main computation gain matrix, information. The observer theory provides estimate the states using the inputs, the a brilliant involved in the design of the observer is the determination which in fact is a dual problem of finding full-state measurable outputs, and the state-feedback of the ob-server gain matrix. In other words, the algorithm for computing the state-feedback gain matrix can be employed to find the observer gain matrix. Furthermore, the observer can be integrated seamlessly together with the state-feedback gain matrix to construct the output feedback controller, and the overall closed-loop system poles will be the observer we obtained poles together using state feedback. with the regulator poles, which are the eigenvalues Therefore, the observer and the state feedback of A+BF can be designed sep-arately. Similar to the state-feedback design, the observer can be designed using the pole placement approach or the quadratic performance index minimization approach. The output feedback controller consisting of the observer performance index and the state-feedback minimization gain is referred approach is involved as the H2 controller if the quadratic in the design process. 11.1 Observability Duality is aninteresting property of nature. For example, humans left and right hands are dual to each other. We will soon find out that observability and controllability are a duality pair, and the observer gain and the state-feedback gain are also a dual. Understanding either one of the dual will makethe learning of its counterpart very easy. Withthe concept of controllability and the design of the state-feedback gain we have covered the previous chapter, it will be a breezein learning their counterparts in this chapter. Although our daily life. observability, controllability, and stability For example, assume a person has a tumor are technical terms, they actually but it is not observable. are related to Without knowing what the problem is, there is no wayto fix it. If the tumor is growing, the system will become unstable and eventually cease working. Onthe other hand,if it is observable, it is still required to be controllable fo 396 11 Observer the problem Theory and to be fixed. Output The doctors Feedback Control need to have means, either by surgical procedure or by injecting medicine or through some other treatment to remove or contain the tumor. For a control system to work,the system to be controlled is required to be stabilizable and detectable. As defined in the previous chapter, a system is stabilizable if the uncontrollable part of the system is stable. Similarly, a system is detectable if the unobservable tumor example, if the tumor is benign (stable) it is considered 11.1.1 Observability Consider a system part of the system is stable. In the as detectable even it is unobservable. Rank Test with the linear state-space model x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) (11.1) with x?Rn,u ?Rm,y ?Rp. The basic concept ofobservability istoidentify thestate xgiven observation of the output y over some time interval [0,t f] , t f > 0. Definition 11.1 (Observability) The linear time-invariant system described by Equation 11.1 is said to be (completely) observable iftheinitialstate x(0-)canbeuniquely determined using themeasurements oftheoutput y(t)and the knowledge ofthe inputu(t),which canbezero, over afinite interval oftime 0- =t =tf. Note thatonce x(0-)isknown, x(t)can bedetermined. Similar tothecontrollability rank testof Theorem 10.6, observability can be determined using the following theorem. Theorem 11.2 (Observability Rank Condition) Consider thefollowing npnobservability matrix: ? ? ? ? C CA ? O= ? ? (11.2) ? ... ? ? CAn-1 The system described by Equation 11.1 or the matrix pair (A,C) is (completely) observable ifand if rank only O = n Notice that the matrices B and D play no role in determining observability, thereby implying that the control input u(t) is not relevant. Example 11.3 (Observe the Initial Considerthe following State) simple two-state one-output linear system: x?(t) = Ax(t)+Bu(t) = ?? ?? 01 10 y(t)=Cx(t) =? 1-1? x(t) x(t)+ 1 1 u(t 11.1 The observability matrix of the system is O = Since rank O =1 397 ? ??1 -1? C = CA -1 1 < 2,the system is not observable based on Theorem 11.2. The unobservability response and the initial initial stateis Observability of the system can also be verified state according to the definition based on the relationship of observability. between the output The output response due to the ? ?x(0) =e-t -e-t ? -e-t e-t ? ? ??e-t -e-t? ?e-t -e-t? et-e-t ? -1 ? et+e-t y(t)=CeAtx(0) =0.51 et-e-tet+e-t x(0 ? Taking a derivative of the equation, we obtain y?(t) =? x(0) Combine the two equations into a matrix form: y(t) = y?(t) Since the matrix from the information -e-t e-t -e-t x(0) e-t is singular, the initial state x(0) cannot be uniquely determined of y(t) and its derivatives. Therefore, according to the definition of observability the system is not observable. If a system is not observable way to easily it is necessary make such an identification to identify is to transform the unobservable physical the system to diagonal form (or, modes. One more generally into Jordan form). In the following, the system considered in the previous example will be employed to illustrate which part of the system is unobservable. Example 11.4 (Observable Modes) Consider the system of Example 11.3. We will compute the eigenvalues ?1,?2 and corresponding eigenvectors v1,v2. Fromthe latter define the similarity transformation matrix T =[v1,v2] and implement thetransformation from the original statexto the newstatex, x =T-1x to obtainthe transformed system x? =? T-1AT ?x+ ? T-1B ? u (11.3) y =[CT] x The eigenvalue-eigenvector pairs of A are: 1 ?1=-1,v1= v2 ? ?, ?2=1,v2= v ?? 1 -1 1 2 Notethat there aretwo real eigenvalues and the first the two eigenvectors weset up the transformation x? = y = Webegin with the knowledge (from 1 1 modeis stable. The second oneis unstable. Using matrix T and obtain the transformed ? ?x+?v0? ?v -10 0 1 2 u 2 0 ?x Example 11.3) that there is one unobservable states,x1,x2 denote the motion associated with modes1 and 2, respectively. are decoupled. They can be solved state equations one at atime, each independent mode. The new Observethat the state equa-tions of the other. Inspection of the transformed CT matrixshowsthat the output is not affected byx2, indicating thatx2 is the unobserv-able mode. 398 11 Observer Theory and 11.1.2 The Observability Output Feedback Decomposition Control Form The ability to identify the observable part of a system has control design implications mode implications. Here, we discuss the decomposition that separates the observable and the unobservable Theorem 11.5 (Observability introduced by beyond the inter-pretive Kalman [Kalman, 1963] parts of a linear system. Decomposition Form) Given a linear system in the form x?(t) = Ax(t)+Bu(t) y(t) =Cx(t) with x ?Rn,u ?Rm,andy ?Rp. Ifthesystem isnotobservable and rank then there exists a nonsingular new statex, x similarity O =r <n transform matrix T that transforms the original state x to the = T-1x such that the transformed system x? = ? T-1AT ?x+ ? T-1B? u =Ax+ Bu y =[CT] x hasthe form A = =Cx ? ? ?? A11 0 A21A22 B = , B1 B2 (11.4) C = ?C1 0 ? ?A11, ? is where A11 ?Rrr, B1?Rrm, C1?Rpr, and thesubsystem B1, C1 Proof: Hint: Choose T such that T-1 = observable. ?? U1 U2 (11.5) wherethe rows ofU1 are any r linearly independent row vectors of the observability Therows ofU2 together withthose ofU1 span the whole n-dimensional space. Example 11.6 (Observability Recall that the system Decomposition Form) considered in Example x?(t) matrix O(C,A). = Ax(t)+Bu(t) 11.3 is = ?? ?? 01 10 x(t)+ 1 1 u(t y(t) =Cx(t)=? 1-1? x(t) The observability matrix of the system is O = ? ??1 -1? C CA = -1 1 Since rank O = 1 < 2,there is only onelinearly independent row vector in O; U1is chosen as 11.1 Observability 399 U1=? 1-1? and U2should be chosen so that the similarity transformation T-1 = is nonsingular. matrix ?? U1 U2 Hence, wechoose U2 = ? 0 1 ? so that we have T-1 = ???1 -1? U1 = U2 0 1 ?? ? T= 1 1 0 1 Then the transformed state-space model will be x? = ? ? ?? ? ? ?? A11 0 A21A22 B1 x+ -10 x+ u = B2 1 1 0 1 y = ?C1 0?x =? 1 0?x Notethatx2 has no effect onthe output y; hence,the dynamics associated withA22 = 1 are not observable, while thedynamics associated with A11=-1are observable. Remark 11.7 (Observable and Unobservable Subspaces) The observable subspace is the range space of the transpose of the observability matrix OT, while the unobservable subspace is the null space of O. The null space of Ois the orthogonal complement of the range space of OT. Forthe system in Example 11.6, the observable subspace is a one-dimensional the linearly independent column vectors of space spanned by OT, which is ?? OT? Null(O)~ ?? 1 Range? The unobservable subspace is ~ -1 1 1 which is orthogonal to the range space of OT. Note that the space spanned by the vector subspace although its associated If the similarity transformation similarity UT 2 =[0 1]T of Example 11.6 is not the unobservable transform achieves observability decomposition. matrix T-1 = is chosen according T still to the basis vectors ?? U1 U2 of the range space of T-1 = OT and the null space of ???1 -1? then the transformed state-space model will be U1 U2 = 1 1 O as 400 11 Observer Theory and x? = Output Feedback Control ? ??? ?-10? ?? B1 A11 0 A21A22 x+ B2 u = 0 1 x+ 0 2 u y = ?C1 0 ?x = ? 1 0?x Although the numbers are slightly different, the structure of the observability decomposition form remains the sameandthe eigenvalues ofA11andA22,respectively, areidenticalto thoseobtained in Example 11.6. Fig. 11.1: Observable and unobservable subspaces. The observable and unobservable subspaces of the system are illustrated in Figure 11.1. Assume the initial stateisxinitial is at [2 1]T position. Sincethe eigenvalue associated with the observable subspace spanned byx1 is stable, the position of the state on the x1 axis will movefrom 2 to 0. Onthe other hand,the eigenvalueassociated withthe unobservablesubspace spanned byx2 is unstable;hence,the position of the state onthex2 axis will grow without bound. Furthermore, no control action can betaken to convert the unstable statex2 to become stable becauseit is unobservable. 11.2 Dualityin State Space For a feedback control system to work, it needs to observe and gather the relevant information for decision making, and once a decision is made,it requires control actions to accomplish the objective. The observation and control processes seem to be completely different; yet surprisingly they are dual to each other, just like left and right hands! We will see that observability and controllability are a duality pair, and the observer design and the state-feedback control design are also a dual. Understanding either one will makeit easy to learn the counterpart. 11.2.1 Duality of Controllability and Observability Recallthat for the linear system represented bythe state-space modelin Equation 11.1 11.2 x?(t) = Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) Duality in State Space 401 with x?Rn,u ?Rm,y ?Rp. The controllability and observability ofthesystem are, respectively, deter-mined by the rank of the controllability matrix C=[BABA2B An-1B] and by the rank of the observability (11.6 matrix ? ? ? ? C CA O = ? ? ? (11.7) ? ... ? ? CAn-1 Since a matrix and its transpose rank which has the same form OT have exactly the same rank, = rank [CT we have (AT)n-1CT] ATCT (AT)2CT as the controllability matrix C. Therefore, observability (11.8) and controllability is a duality pair. The basic concept and theory developed based on controllability can be easily ex-tended for observability, and the computing resources available for analysis and design relevant to controllability can also be applied to those relevant to observability. As we have learned from matrix Example C and the uncontrollable Controllable subspace = subspace is the range space of the control-lability subspace is the null space of Range (C) , Owing to duality, it is not surprising Observable subspace 10.12, the controllable Uncontrollable subspace to have the following = Range ? CT,or Null ? CT? (11.9) deductions, OT? , = Unobservable subspace = Null (O) (11.10) as described in Remark 11.7. 11.2.2 State-Space Models in Controller Form and Observer Form Recallthat a given system can have manystate-space models depending on how the state variables are defined. Usually physical variables like displacements, velocities, voltages, and currents are chosen as state variables so that the state-space model can directly reflect the status of the physical variables of interest. However, for computational reasons in the design process,the state-space model may need to be transformed to a special form like a companion form or a diagonal form, discussed in Sections 6.6.2, 7.4.1, and 7.4.2. The signal flow graph shown in Figure 11.2(a) is a state diagram of the following ???-a0-a1????? ?? x?1 x?2 = 0 x1 y = ? b0 b1? x2 Note that this state-space state-space 1 x1 x2 0 1 u = Ax+Bu (11.11) =Cx model is in companion form, modelin this form is always controllable. model can be found + state-space model: which is also called controller form since Thetransfer function associated with the state-space using either the state-space to transfer function formula, 402 11 Observer Theory and Output Feedback Control ? b0 b1 ? G(s)=C(sI-A)-1B = ? ?? ? s+a1 1 -a0s 0 1 s2 +a1s+a0 = b1s+b0 s2 +a1s+a0 or Masons gain formula, G(s) = M1?1 +M2?2 b1s-1 +b0s-2 = ? b1s+b0 = 1-(-a1s-1 -a0s-2)s2 +a1s+a0 Fig. 11.2: Duality between the controller form and observer form realizations. Now let us take a look at the signal flow graph shown in Figure 11.2(b). Its shape is identical to the one shown in Figure 11.2(a), but the signal flow directions are all reversed and the input u and output y have exchanged positions. For ease of distinction, the state variables in Figure 11.2(b) are marked with~x1 and~x2. These two signal flow graphs are dual to each other from a graphical point of view. We would like to investigate the mathematical relationship between the two systems. The state-space model associated with the state diagram in Figure 11.2(b) can befound in terms of the state variables~x1 and~x2: ???01 -a0 ????? -a1 ?? x?1 ~ x~?2 x~1 x~2 = x~1 y~ = ? 0 1 ? x~2 Notice that the two state-space b0 + b1 u =~A ~x+~B ~u (11.12) =~~ Cx models have the following relationship: A~ = AT, B~ =CT, C~ = BT Hence, the two state-space models, Equations 11.11 and 11.12, (11.13) or the two state diagrams in Figure 11.2(a) and Figure 11.2(b), are dual to each other. Sincethe state-space modelin controller form is con-trollable, its dualthe referred state-space model in Equation 11.12 or the state diagram in Figure 11.2(b)is asthe observer form. The relationship between the two state-space models can be found in the following: ?T CT=? C(sI-A)-1B ?~B -1 =BT? sI-AT?-1 G~(s) =~C?sI-~A = GT(s) (11.14 11.3 For the SISO case, these two transfer Minimal functions Realization and Controllability are identical, but for and Observability 403 MIMO case, they in general are different. 11.3 Minimal Realization and Controllability A minimal state-space model, also referred or the dimension of the A matrix is observable. Theorem 11.8 (Minimal and Observability as minimal realization, meansthat the number of state vari-ables minimal. A minimal state-space Realization and Controllability modelis controllable and and Observability) Giventhe state-space model (A,B,C), x?(t) = Ax(t)+Bu(t) y(t) =Cx(t) the following three statements are equivalent: (a) The state-space model (A,B,C) is controllable and observable. (b) The state-space model (A,B,C) is a minimal realization. (c) Thetransfer function N(s)D-1(s) or D-1(s)N(s) associated with(A,B,C) is irreducible. Remark 11.9 (The Computation Involved in Obtaining an Irreducible Transfer and Numerically Unreliable for High-Order Large MIMO Systems) Function Is Com-plicated For SISOcases,the two fractional descriptions, N(s)D-1(s) and D-1(s)N(s), areidentical and can be written as N(s)/D(s), whichis irreducible if and only if N(s) and D(s) have no common polynomial factors, or, equivalently, there is no possible pole-zero cancellation in N(s)/D(s). However, for MIMO cases, N(s)D-1(s) and D-1(s)N(s) are in general different, and they are called right MFD (matrix fractional description) and left MFD, respectively. Anirreducible left or right MFD can be obtained by removing the greatest common left or right divisor from N(s) and D(s), but the computation involved is complicated and maybe numerically untrustworthy, especially for high-order, large MIMO systems. For this reason, we will only employ the first two statements of Theorem 11.8 to determine if a given MIMO state-space model is a minimal realizationin other words, based on the controllability and observability of the modelinstead of the irreducibility of the MFD. Example 11.10 (How Controllability and Observability Consider a system that is represented bythe following Affect Minimal Realization) state-space modelin diagonal form: ??? ????? ?? ??=? ???+ ??u =Ax+Bu, y= ??=Cx x?1 x?2 x?3 ?1 0 0 0 ?2 0 0 0 ?3 x1 b1 x2 b2 x3 b3 According to Theorem 11.8, the state-space and observable. The controllability x1 ? c1 c2 c3 ? x2 x3 model is a minimal realization matrix of the system i if and only if it is con-trollable 404 11 Observer Theory and Output Feedback Control ? ? ? 2b2 ? b1 ?1b1 ?2 1 b1 C = ? B AB A2B? = ? b2 ?2b2 ?2 ? b3 ?3b3 ?2 3 b3 The determinant of the controllability matrix is detC=b1b2b3 (?1-?2) (?2-?3) (?3-?1) Hence, thesystem iscontrollable if andonly if detC ?=0,or,equivalently, ?1,?2,and?3are distinct and b1, b2, and b3 are nonzero. Similarly, we have detO=c1c2c3 (?1-?2) (?2-?3) (?3-?1) and so the system is observable if and only if ?1, ?2, and ?3 are distinct, and c1, c2, and c3 are nonzero. Therefore, the state-space modelis a minimal realization if and only if ?1, ?2, and ?3 are distinct, and b1, b2, b3, c1, c2, and c3 are nonzero. These facts regarding the controllability, observability, and minimal realization graphically in the following example using the state diagram. Example 11.11 (Graphical Interpretation of Controllability, Observability, can also be inter-preted Minimal Realization) The diagonal state-space model considered in the previous example can be graphically represented by the state diagram shown in Figure 11.3. Fig. 11.3: The state-space model is a minimal realization if and only if it is controllable and observable. It is clear that the system is composed of three subsystems in parallel connection, and the three subsystems are decoupled. Thetransfer function of the system can be found as Y(s) U(s) b1c1 = G(s) = b2c2 + b3c3 + s-?1 s-?2 s-?3 (11.15 11.3 If one of the input branches, Minimal Realization and Controllability b1, b2, b3, is zero, say b1 = 0, then and Observability the branch associated 405 with b1 in the state diagram will disappear and the control input u will have no effect on the dynamics of the subsystem with eigenvalue ?1; hence, the system becomes uncontrollable. Meanwhile, the transfer function of Equation 11.15 will become G(s) = b2c2 b3c3 + s-?2 s-?3 which is a second-order system now, and therefore the third-order state-space modelis not a minimal realization anymore. If one of the output in the state diagram branches, c1, c2, c3, is zero, say c2 = 0, then the branch associated with c2 will disappear and the state x2 will have no influence on the output y, which means the state of the subsystem with eigenvalue ?2 becomes unobservable; hence,the system is unobservable. Meanwhile, the transfer function of Equation 11.15 will become G(s) = b1c1 b3c3 + s-?1 s-?3 which is a second-order system now, and sothe third-order state-space modelis not a minimal realiza-tion any longer. If the eigenvalues ?1, ?2, and ?3, are not distinct, say ?2 = ?1,then the top two subsystems in the state diagram will collapse into one subsystem becausetheir eigenvalues are identical. Consequently, the disappeared subsystem will become uncontrollable and unobservable. Meanwhile, the transfer function will become b1c1 b2c2 b3c3 b1c1 +b2c2 b3c3 G(s) = + + = + s-?1 s-?1 s-?3 s-?1 s-?3 which is a second-order system now; hence, the third-order state-space modelis not a minimal realiza-tion. Therefore,the state-space modelis a minimalrealization if and only if ?1,?2,and ?3 are distinct and b1, b2, b3, c1, c2, and c3 are nonzero. Remark 11.12 (Minimal Realization and Pole-Zero Cancellation) Considerthe state-space model with the transfer function, Equation 11.15, shown in Example 11.11. Let ?1=-1, ?2=-2, ?3=-3, b2=b3=c1=c2=c3=1 while keeping b1 as afree parameter so that the transfer Y(s) U(s) = G(s) = b1 s+1 1 + s+2 1 + s+3 function can be rewritten: (b1 +2)s2 +(5b1 +7s)+(6b1 = +5) (s+1)(s+2)(s+3) Then the system is controllable and observable and the associated state-space modelis a minimal realization if and only if b1 ?=0orthe transfer function G(s) isirreducible, which means that there isno pole-zero cancellation in G(s). In casethat b1 = 0,the transfer function 2s2 +7s+5 G(s) = Notice that the denominator (s+1)(s+2)(s+3) and numerator function will become (s+1)(2s+5 (s+1)(s+2)(s+3) have a common function has a pole and a zero at the same location the transfer = will become factor s + 1. In other words, the transfer of complex plane. After the pole-zero cancellation, 406 11 Observer Theory and Output Feedback Control G(s) = which meansthat the transfer function 2s+5 (s+2)(s+3) before the pole-zero cancellation was reducible. Similarly, there will be a pole-zero cancellation at s = ?2 if c2 is zero. For another case that has double eigenvalues at ?1 and the third eigenvalue at ?2,the pole-zero cancellation will occur at s = ?1. ForSISO systems,theirreducibility ofthe transfer function N(s)D-1(s) can beeasily determinedby inspecting if the denominator and numerator polynomials have common factors. However, for systems, the denominator and numerator of the transfer function are matrices, and it MIMO usually requires a moreinvolved procedure to determine if N(s)D-1(s) is irreducible. 11.4 State-Space Modelsand Minimal Realizations of MIMO Systems One of the advantages of the state-space control system classical control is that they can be applied to state-space models are available. knowledge of assembling regarding Our emphasis state-space SISO systems and design approaches up to now has been on SISO systems; models, concept certainly analysis over the MIMO systems as easily as SISO systems if the of controllability, can be extended to observability, MIMO systems, however, the and minimal re-alization although there are some differences. In this section, we will discuss how to assemble state-space or interconnected subsystems with multiple inputs models based on transfer and outputs. The signal flow function ma-trices graph shown in Figure 11.4 represents a MIMO system with two inputs and two outputs consisting of four SISO sub-systems G11(s), The G12(s), G21(s), and G22(s). MIMO system in Figure 11.4 can also be represented ? ?? y1(s) y2(s) 11.4.1 Assume Direct Realization by the following G11(s) G12(s) = G21(s) G22(s) ??? model for each subsystem function matrix: u1(s) (11.16 u2(s) Approach to Assemble a MIMO State-Space we have a state-space transfer of the Model MIMO system in Figure 11.4. Then by stacking the state vectors of all the subsystems into one weintegrate the four subsystems into one state-space model. The order of the overall model should be the sum of the orders of the four subsys-tems. However, we will see that even though the subsystem models are all minimal realizations, the overall modelis not necessarily a minimal realization. Example 11.13 (Direct Consider the subsystems Realization of a MIMO System) MIMO system shown in Figure 11.4, where the transfer functions of the four SISO are given as G11(s) = -1 , s+3 G12(s) = 1 s+3 , G21(s) = 1 s , G22(s) = 1 s(s+3) Following the state-space model construction procedure in Section 6.6.2, each state-space modelof the four SISO subsystems can be assembled as follows: 11.4 State-Space Models and Minimal Realizations of MIMO Systems 407 -u1 s+3 ? (s+3)y11(s) =-u1(s)? x?1=-3x1 y11 = x1 (i) G11(s) = -1 (ii) G12(s) = s+3 1 G21(s) = s 1 (iii) ? (s+3)y12(s)= u2(s) ? ? sy21(s) = u1(s) y12 = x2 x?3 = u1 ? y21 = x3 ???0 -3?? ??? ?? x?4 x?5 1 (iv) x?2=-3x2 +u2 G22(s) = s(s+3) ? (s2 +3s)y22(s)= u2(s) ? 0 1 x4 = 0 + x5 1 u2 x4 y22 = ? 1 0 ? x5 Fig. 11.4: A MIMO system can be an interconnected system of several subsystems with multiple inputs and outputs. Withthese state-space 11.4, models of the four we have the following state-space SISO subsystems model for the overall and the interconnected ???0 -300 0 ???? ? ?? ???0 0 00-3???? ? ?? ??? ? ?? ? ? ? ? x?1 x?2 x?3 x?4 x?5 x1 -3 0 00 0 ? ? = ? ? ? ? y1 y2 0 ? 0 0 0 0 0 0 -10 x2 ? 0 0 1 ? ? ? ? ? ? ? ? 0 1 ? x3 x4 ? ? + ? ? ? ? 11000 00110 = ? ? ? ? u1 ? 1 ? 0 ? u2 ? 0 x5 x1 x2 x3 x4 x5 graph in Figure MIMO system: 0 := Ax+Bu ? 0 1 (11.17 ? ? ? :=Cx ? The poles of the MIMO model are simply the eigenvalues of the A matrix, while the zeros can be computed based on the algorithm in Theorem 10.17. By the MATLAB codes: % CSD Ex11.13 A11=-3; B=[-1 MIMO A22=-3; 0;0 1;1 poles A33=0; 0;0 0;0 zeros A44=[0 1]; C=[1 1;0 1 -3]; 0 0 A=blkdiag(A11,A22,A33,A44); 0;0 0 1 1 0]; D=[0 0;0 0]; 408 11 Z=[A Observer -B;C Theory and -D]; Output Feedback E=blkdiag(eye(5),zeros(2,2)); poles_G=eig(A); disp('Poles poles_G', Control of the MIMO state-space model are:'), zeros_G=eig(Z,E); disp('Zeros of the MIMO we will have the following state-space model (ignore Inf) are:'), zeros_G' results, >> Poles of -3 the MIMO -3 Zeros of state-space 0 the MIMO -Inf 0 state-space -4.0000 model are: model (ignore -3 -0.0000 Inf) Inf are: Inf Inf -3.0000 Therefore, theMIMO state-space model has fivepoles ats =-3,-3,-3,0,0, and three zeros at s =-4,-3,0. Next, we will determine if the state-space MIMO state-space model is a minimal realization model is a minimal realization. if and only if it is controllable and observable This MIMO according to Theorem 11.8. In the casethat the modelis not minimal, the Kalman decomposition approach of Sec-tions 10.3.2 and 11.1.2 uncontrollable will be employed and unobservable The controllability to find a minimal realization of the system by removing the modes. matrix is ?0 10 -3 0 9 0 -270 81? 1 0 -30 9 0 -27 ?00 00 10 -3 0 9 0 -270 81 -1 0 3 0 -9 0 27 0 -81 0 ? C = ? B AB A2B A3B A4B? = ? 1 ? 0 0 0 0 0 0 0 0 0 ? ? ? ? ? and rank C=4 <5 ? system isuncontrollable The observability matrix is ?? ?? ? O = ? C CA CA2 ? ? CA3 CA4 ? 1 0 0 0 0 0 1 1 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 0 0 0 1 9 9 0 0 0 ? ? ? ? ? ? ? 0 0 00 -3 -27 -2700 0 0 81 ?0 ? ? ? -3 -3 00 0 ? ? = 1 0 00 81 0 0 9 0 ? ? ? ? ? ? ? ? 0 00-27 and rankO=3 <5 ? system isunobservable There are two unobservable modes and one uncontrollable mode. We will first perform observ-ability decomposition to remove the two unobservable modesso that the observable model will be of third order. The uncontrollable mode may be overlapped with the unobservable ones. If that is the case, the observable model will be also controllable, and, therefore the observable modelis a minimal realization. Otherwise, controllability decomposition is neededto remove the uncontrollable mode. 11.4 Let U1 and U2 be State-Space Models and Minimal Realizations of MIMO Systems 409 ? ? ?10 -10 0 0? 0 1 -10 ? ?,U=2 1 1 0 0 0 U1 = 0 0 1 1 0 00001 where the three row vectors of the U1 matrix are any three linearly independent row vectors of the observability matrix O, or, in other words,the three column vectors of UT 1 span the three-dimensional observable subspace or the range space of OT. Onthe other hand, the two row vectors ofU2 are chosen so that the similarity transformation matrix T-1 = ?? U1 U2 is nonsingular and U1UT 2 = 0.In other words,the column vectors of UT 2 form a basis of the null space of O, which is the orthogonal complement ofthe observable subspace. This similarity transformation x = T-1x transforms the state-space x? = modelinto the following observability decomposition form: -30 0 0 0? ? -1 1 ? ? ? ? ?? 00 00 -30 -30 00 ?0 0 -1 0 0? ? ? ? ? A11 0 0 B1 A21A22 x+ u = B2 0 1 0 0 ? ? ? ? ? ? ? ? 1 0 0 1 ? x+ ? ? ? ? -1 -1 1 y =?C1 0?x = ? ? ? 0 10000 x 01000 After deletingthe unobservablemodes,wehavethe third-order model(A11,B1,C1)for the system, which is observable. minimal realization Since this third-order of the system. observable model is also controllable, it is a ? ? ?? ?0 0 -3? xmin +? ?u ?? x?min =A11xmin +B1u = -30 0 0 0 -11 1 1 0 0 1 y =C1xmin = 100 0 1 0 xmin which has three poles ats =-3,0,-3 and one zero ats =-4.These three poles are theeigenvalues A11, and thezero s =-4iscomputed based onthealgorithm in Theorem 10.17. of the matrix In summary, the fifth-order MIMO state-space model obtained by this direct realization ap-proach is not a minimal realization even though the four individual subsystems state-space models were all minimal individually. Apparently, one of the two Hence, after removing the unobservable for the MIMO system. 11.4.2 MIMO State-Space In addition Modelsin Block Controller to the direct realization MIMO state-space approach unobservable modes is also uncontrol-lable. modes we obtained a third-order and Block Observer Forms discussed in Section models. Recall that in Section 11.2.2, 11.4.1, there are welearned construction procedures can be extended to many ways to con-struct how to construct modelin controller form or in observer form for a given SISOtransfer function. and observer form minimal realiza-tion MIMO cases. a state-space These controller form 410 11 Block Observer Controller Theory and Output Feedback Control Form Consider a MIMO system represented bythep mtransfer function matrix G(s) shown in Figure 11.5. Thetransfer function description) as matrix G(s) can be rewritten in the form of right G(s) = N(s) d(s) R (s) =N(s) D-1 where MFD(matrix fractional DR(s) = d(s)Im (11.18) Let ?(s) = DR(s)-1u(s). Then wehavethe following two equations: DR(s)?(s) = u(s) (11.19a) y(s)=N(s) DR(s)-1u(s) =N(s)?(s) (11.19b) Assume d(s) = s2 +a1s+a0 and N(s) = N1s+N0 Then Equations 11.19a and 11.19b will lead to the following: DR(s)? (s)=u(s) ? (s2+a1s+a0)? (s)=u(s)?? =-a1 ??-a0? +u y(s)=N(s) ?(s) ? y(s)=(N1s+N0)? (s) ? y=N1 ??+N0? Fig. 11.5: A MIMO transfer function Fig. 11.6: A block controller form realization Based on Equations function in right 11.20a and 11.20b, in right a block MFD for block controller in right controller of the realization (11.20b) form realization. of a MIMO transfer function form (11.20a) MFD. MIMO transfer MFDis constructed and shown in Figure 11.6. Withthe state vectors x1 and x2 assigned at the outputs of the integrators s-1Im, we havethe following state-space model equations 11.4 State-Space Models and Minimal Realizations of MIMO Systems ??? ????? ?? x?1 x?2 0 = x1 x2 -a0Im-a1Im y = ? N0 N1 ? Example 11.14 (Block Im Controller x1 0 Im + 411 u:= Ax+Bu (11.21 :=Cx x2 Form Realization of a MIMO System) In this example, we will employ the same MIMO system considered in Example 11.13 to demon-strate the block controller form realization approach. Thetransfer function matrix ofthe MIMO system is rewritten in the following in the form of right MFD: G(s) = That is, ?-1/(s+3) 1/(s+3)??-s s ?? ?-1 := N(s) D-1 ? ? ?-11? 1/s a0 = 0, Then according to Equation s+3 a1 = 3, 11.21, 0 s(s+3) = 1/(s(s+3)) 1 0 0 0 N0 = 31 we have a state-space , R (s) s(s+3) N1 = 1 0 model in block controller form for the MIMO ? ? ?? 0 x?=?00-3 ?u :=Ax+Bu 00 0 -3?x+? ?00 -11? system: 00 1 00 0 y = 0 1 ? ? ? ? ? ? 31 1 0 x 0 0 1 0 0 0 0 1 ? ? =Cx The poles oftheMIMO model are theeigenvalues oftheAmatrix, which are s =-3,-3,0,0. The zeros can becomputed based onthealgorithm in Theorem 10.17, which are-4,0. Next, we will determine if the MIMO state-space modelis a minimal realization. This MIMO state-space modelis a minimal realization if and only if it is controllable and observable according to Theorem 11.8. Since the state-space modelis in block controller form, whichis always controllable, only the ob-servability of the model needsto be examined. The observability matrix is ?00 -1 1 ? ?? -9 9 O=? ?=00000027-27 0 -3 ? ? 31 1 ? C ? ? CA ? ? CA2 ? 0 00 3 -3 0 0 0 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CA3 0 0 0 9 and rankO=3 <4 ? system isunobservable There is one unobservable mode. The Kalman decomposition approach of Section 11.1.2 will be em-ployed to find a minimal realization of the system by removing the unobservable mode. 412 11 Observer Theory and Output Feedback Control ?00 -11? -1300 = ? ?,U2 Let U1 and U2 be 3 1 U1 = 1 0 ? ? 00 0 1 where the three row observability observable vectors matrix of the U1 matrix are any three linearly O, or, in other words, the three column subspace or the range space of the similarity transformation vectors independent of row vectors of the UT 1 span the three-dimensional OT. On the other hand, the row vector ofU2 is chosen so that ?? matrix U1 T-1 = U2 2 = 0. In other words, the column vectors of UT 2 form a basis of the null space is nonsingular and U1UT of O, which is the orthogonal complement of the observable subspace. This similarity transform x = T-1x transforms the state-space modelinto the following observability decomposition form: -30 0 0? ? -11? ? ? ? ?? 0 0-30? u=? x+?? ? ? A11 0 x? = x+ A21A22 B1 B2 0 0 1 0 ? ? ? ? ? ? 1 0 2 0 1 0 0 0 y =?C1 0?x = 0 1 0 0 1 0 0 1 ? ? 0 0 x wherethethird-ordersubsystem(A11,B1,C1)is observable.Notethat thisthird-orderobservablemodel is also controllable. After removing the unobservable system of the ? ? ?? ?0 0 -3? xmin +? ?u ?? x?min =A11xmin +B1u y =C1xmin = mode, we have a minimal realization 1 0 0 0 1 0 -30 0 = -11 0 0 1 1 0 0 1 xmin which has three poles ats =-3,0,-3 and one zero ats =-4.These three poles are theeigenvalues of the matrix A11, and the zero s =-4 iscomputed based on the algorithm inTheorem 10.17. In summary, form although the fourth-order realization approach. approach After removing is still the not MIMO state-space model obtained minimal, it has less order unobservable than that mode, we have obtained by the block con-troller of the direct real-ization a third-order minimal realization. Block Observer Form Consider a MIMO system represented bythepmtransfer function matrix G(s) shown inFigure 11.7. The transfer function matrix G(s) can be rewritten in the form of left MFD (matrix fractional description) as G(s) = N(s) d(s) L (s)N(s) where DL(s) =d(s)Ip = D-1 (11.22) Recallthat the state-space modelin block controller form shown in Equation 11.21 was derived from a MIMO transfer function in right MFD following a procedure similar to that of the SISO controller form. 11.4 Now, to find the counterpart left State-Space of the block Models and controller form Minimal Realizations associated with a of MIMO Systems MIMO transfer 413 function in MFD, we wantto take advantage of the duality property instead of deriving it from scratch. In the following, we will use the short-hand notation ?? ??? ? 0 G(s) =N(s) (d(s)Im)-1? Im , -a0Im -a1Im 0 , ? N0 N1? Im (11.23) torepresent therelationship between therightMFD, N(s)(d(s)Im)-1, and thestate-space model in block controller form shown in Equation 11.21. Fig. 11.7: A MIMO transfer function in left MFDfor block observer form realization. Now, thetranspose ofG(s) =(d(s)Ip)-1 N(s)is GT(s) =NT(s) (d(s)Ip)-1, which isintheform of right MFD. Hence, by using the relationship in Equation 11.23 we havethe following: ?? ??? ? 0 GT(s) =NT(s) (d(s)Ip)-1? Then, taking transpose on both sides Ip 0 , -a0Ip-a1Ip of the relationship with theleftMFD G(s) =(d(s)Ip)-1 N(s): G(s) =(d(s)Ip)-1 N(s) ? Ip , ? NT 0 NT ? 1 will give the block observer form 0 -a0Ip ?? ??? ? Ip -a1Ip , N0 , ? 0 Ip ? N1 (11.24) associated (11.25) Therefore, theMIMO transfer function inleftMFD (d(s)Ip)-1 N(s)has astate-space model inblock observer form asthe following: ???Ip0 -a0Ip ????? -a1Ip ?? x?1 x?2 x1 = y = ? 0 Ip ? x2 x1 x2 N0 + N1 u = Ax+Bu (11.26 =Cx The state diagram associated with the state-space modelin block observer form is shown in Figure 11.8. Notice that the shape of the graphs in Figure 11.8 is the same as that of Figure 11.6, but the directions of the signal flow are reversed and the positions of the input and the output have exchanged. Thesetwo state diagrams are dual to each other. Example 11.15 (Block Observer Form Realization of a MIMO System) 414 11 Observer Theory and In this example, Output Feedback we will employ the same Control MIMO system considered in Example 11.13 and Example 11.14 to demonstrate the block observer form realization approach. Thetransfer function MIMO system is rewritten G(s) = in the following in the form ?-1/(s+3) 1/(s+3)?? 1/s a0 = 0, ?-1 ?-s s? L(s)N(s) ?? ? ? 0 That is, a1 = 3, N0 = matrix of the MFD: 0 s(s+3) = 1/(s(s+3)) of left s+3 s(s+3) 00 , 31 -11 N1 = Then according to Equation 11.26, we have a state-space MIMO system: := D-1 1 1 0 model in block observer form for the ? ?? ? 0 0 0 0 0 0 0 0 0 0 3 1 x?=? ?x+? ?u :=Ax+Bu ? ? y = ? ? 10 -3 0 01 0 -3 ? ? -11 ? ? 1 0 ? ? 0010 0001 x =Cx The poles oftheMIMO model are theeigenvalues oftheAmatrix, which are s =-3,-3,0,0. The zeros can becomputed based onthealgorithm in Theorem 10.17, which are-4,0. Fig. 11.8: A block observer form realization of a MIMO transfer function in left Next, we will determine if the model is a minimal realization MIMO state-space model is a minimal realization. if and only if it is controllable 11.8. Since the state-space modelis in block observer form, of the model needsto be examined. The controllability matrixis C =? ? 0 00 0 3 10 0 MIMO state-space which is always observable, only the con-trollability 0 0 0 0 0 0 0 0 ? ? This and observable according to Theorem BAB A2B A3B =?1 00 1 0 -30 0 ? MFD. ? ? -113 -3 -9 9 27-27 ? and rank C=3<4 ? system isuncontrollable There is one uncontrollable mode. The Kalman decomposition approach of Section 10.3.2 will be em-ployed to find a minimal realization of the system by removing the uncontrollable mode. 11.4 State-Space Models and Minimal 0 0 0 MIMO Systems 415 1 10 0 ? ? ? ? ? ? 0 0 where the three column controllable of ? ? ?? T1 =?13-3?,T2 =?? Let T1 and T2 be controllability Realizations 0 0 1 ? ? 0 vectors of the T1 matrix are any three linearly independent column vectors of the matrix C, or, in other words,the three column vectors of T1 span the three-dimensional subspace or the range space of C. Onthe other hand, the column vector of T2is chosen so that the similarity transformation matrix T = ? T1 T2 ? isnonsingular andTTT2=0.Inother words, thecolumn vectors ofT2 form abasis ofthenull space 1 of CT, whichis the orthogonal complement of the controllable subspace. This similarity transformation x = T-1x transforms the state-space model into the controllability decomposition form ?? ? 0 1/3 ? ? ?? ?0-3 x+? ?u u=?1 0 -3 0 ? 0 0 A11A12 x? = x+ 0 A22 0 0 3 ? ? ? ? ? ? 0 0 y = ?C1 C2 ?x = 0 B1 0 ?13 -30? 0 0 1 0 0 1 -1/30 1 0 0 0 ? ? x where thethird-ordersubsystem (A11,B1,C1)is controllable.Notethatthis third-ordercontrollable model is also observable. After removing the uncontrollable mode, we have a minimal realization ?0 -3 0 ? ? ? ?1 0 -3? xmin +? ? ?13 -3? 0 0 0 3 x?min =A11xmin +B1u = 0 0 1 1 -1/3 0 1 y =C1xmin = of the system, 0 xmin which has three poles ats =-3,0,-3 andone zero ats =-4.These three poles are theeigenvalues A11, and thezero s =-4iscomputed based on thealgorithm inTheorem 10.17. of the matrix In summary, although the fourth-order MIMO state-space model obtained by this block ob-server form realization approach is still not minimal, it has less order than that of the direct realization approach. After removing the uncontrollable mode, we have obtained a third-order minimal realization. 11.4.3 MIMO State-Space Gilbert diagonal realization Modelsin Gilbert is a natural Diagonal Form generalization of the SISO diagonal realization. apm MIMO system with atransfer function matrix Consider 416 11 Observer Theory and Output Feedback Control G(s) = N(s) (11.27) d(s) where d(s)=(s-?1)(s-?2)(s-??),??=?j, i degN(s) <?.LetG(s) bewritten as R2 R1 G(s) = + s-?1 R? s-?2+ + where s-?? Ri =lim (s-?i)G(s) (11.28) s??i and assume Rican be decomposed as Ri=CiBiwhere Ci?Rpri , Bi?Rrimandri=rank Ri Then it is easy to verify that the state-space model (A,B,C) (11.29 with ? ? ?? , C= C1C2 C? ?00 0? ?? 0 0 ??Ir? ?1Ir1 0 . . . 0 ?2Ir2 0 0 ? A = ... ? ? B1 B2 ? ? , ? B = ? ? ? ? ? ? ... B? (11.30) ? ? ? is a state-space model of G(s), and the dimension of the state spaceis n = ? ri. i=1 Example 11.16 (Gilbert In this example, we will employ the same 11.14, and Example matrix of the Diagonal Realization of a MIMO System) 11.15 to demonstrate the MIMO system considered Gilbert diagonal in realization Example approach. 11.13, Example The transfer func-tion MIMO system is rewritten G(s) = ? ? ? ? ? ??? ?0 -1/3? 1/s R1 = lim sG(s) = s?0 0 s?-3 model (A,B,C) 0 1 1/3 R2 = lim (s+3)G(s) A = = 1/(s(s+3)) where Hence, the state-space 1 -1/(s+3) 1/(s+3) = -s s s+3 s(s+3) = 0 1 R1 = 1 s R2 + s+3 ? 1 1/3 ?:=C1B1 -1 1 I2 :=C2B2 with ? ??? ? ?0 -3I2?? 0 -3 0 ?0 0 -3?,B= ? ? 0 0 0 0 0 B1 B2 = C = ? C1 C2? = = 1 ? ?01 -10 -1/3 1 1/3 1 0 0 1 isaGilbert diagonal realization, which has three poles ats =-3,-3, and 0a , nd one zero ats =-4. The controllability matrix is ?1 0 -3 0 90? ?0 1 0 -309? 1 1/3 C = ? B AB A2B? = 0 0 00 11.4 State-Space Models and Minimal Realizations of MIMO Systems 417 and rank C=3 ? system iscontrollable The observability matrix is O = 1 ? ?01 -10 -1/3 ? ? 0 3 -3 ? ?=0 -9 9 ?0 0 -3 C CA CA2 ? ? ? ? ? ? 0 0 ? 1 ? ? ? ? ? and rank O=3 ? system isobservable Therefore, the Gilbert diagonal realization is Theorem 11.17 (Gilbert Realization is Gilbert realization is controllable Proof: Based on the controllability minimal. Minimal) and observable and therefore is a minimal realization. Gilbert diagonal realization defined by Equations 11.28, 11.29, and 11.30, the matrix can be written as ?1B1?n-1? ?B1 B2 ?2B2?n-1 C= BAB An-1B = ?... B???B??n-1? Im?1Im?n-1? 0 0? ?B1 ? 0 B2 0 Im?2Im ?n-1 :=BU ?00 ...??Im?n-1? 0 0...0 B??? Im B1 1 ? ? B2 2 ? ? ? ? ... ? ... ? B? ? which can be decomposed into a product oftwo matrices as Im 1 C = ? ? ? ? ? ? ? ? ? Im 2 ? ? ... ... ? Im ? ? Note thatthedimensions ofBandUaren?mand ?m?m, respectively, where n= ?ri.Itiseasy i=1 to see that the rank ofU is ?m; hence, U is nonsingular. By Sylvesters inequality, rank(B)+rank(U)-?m= rank(C) =min{rank(B),rank(U)} we haverank(C) = rank(B). Bythe Gilbert construction, ? rank(B) 1 Therefore, the realization is controllable. ? ?rank(Bi) = =?ri =n 1 The observability can be proved similarly. 418 11 Remark Observer Theory and 11.18 (Comparison So far in this chapter, Output of Feedback MIMO Control State-Space we have learned a few Model Construction MIMO state-space Approaches) model construction approaches to obtain state-space modelsin direct realization, block controller form, block observer form, and Gilbert diagonal form. The Gilbert diagonal realization is controllable and observable andtherefore is a minimal realization. The restriction of this approach is that the least common denominator of all the entries of the MIMO transfer function matrix, like d(s) in Equation 11.27, is required to have no repeated zeros (i.e.,?i ?=?j). The other approaches do not have this restriction; however, they usually lead to nonminimal realiza-tions. The block controller form is always controllable, but usually unobservable with order equal to ?m, where mis the number usually uncontrollable of inputs and ? = degd(s). The block observer form is always with order equal to ?p, where p is the number observable of outputs and ? = degd(s). but The direct realization is usually uncontrollable and unobservable with order equal to the sum of the orders of all SISO subsystems. For nonminimal realizations, the Kalman decomposition approach of Sec-tions 10.3.2 and 11.1.2 can be employed to find a minimal realization of the system by removing the uncontrollable and unobservable modes. There exist other approaches to construct Kalman decomposition. For example, a minimal realizations MIMO transfer function directly without the need of using the can be represented by a general right MFD asG(s) =N(s) D-1(s).Agreatest common right divisor R(s) can befound and extracted from 1 (s), D(s)=D1(s)R(s) andN(s)=N1(s)R(s) toreduce G(s) toan irreducible MFD, G(s)=N1(s) D-1 then a state-space modelconstructed based onthe irreducible MFD will be a minimal realization. Details regarding the irreducible MFDand greatest common right divisors can be found in the book by [Kailath, 1980]. 11.5 Full-Order Observerand Output Feedback Control Recall that we witnessedthe power of the state-space controller state-feedback employed whenthe four magic numbers in the gain matrix F = ? 139.31 24.452 30.138 30.67 ? of Equation 7.120 in Section 7.6.4 were to successfully stabilize a highly unstable cart-inverted pendulum system. Later, in Sections 8.6.3, and 8.7, welearned more about the state-feedback control and utilized it to work together with the pole placement approach, the root locus design, and the regulation/tracking theory to solve the lightly damped system control problem, and achieve aircraft altitude regulation and flight path precision tracking. In Chapter 10, the linear quadratic performance optimization with control-input constraint wasincorporated in the state-feedback control system design process to achieve an optimal control. However,it is rare that all state variables are available and not contaminated in the measurementpro-cess. The state feedback concept would be impractical if not for the invention of the ingenious full-order observer. The brilliant observer theory wasinvented to utilize not only the measured output but also the actuation input, the noise model, and the system modelto determine an optimal estimate of all state variables. As mentioned earlier, there is a duality relationship control applied to the they theory. The knowledge design and implementation work together perfectly: and tools between the observer theory for of observers. state-feedback Furthermore, the observer is responsible control as two to provide and the state-feedback can immediately subsystems timely be of the con-troller, accurate assess-ment of the system states for the state-feedback controller to makethe right decision and achieve the desired performance. In addition, we will see that the observer and the state-feedback controlle 11.5 can be designed separately without interfering Full-Order Observer and Output each other; this important Feedback Control property is referred 419 as the separation principle. 11.5.1 Brief Review of State-Feedback Control Fig. 11.9: A basic state-feedback control system. In the following, we will briefly review the structure of the state-feedback control system. Then we will see the extension of it to the output feedback control system is fairly straightforward: Simply add a full-order observer. The block diagram shown in Figure 11.9 representing the basic state-feedback control system is simple and can be easily implemented, yetit is effective if the state equation of the state-space model, x? = Ax+Bu, is given and all the state variables are available for feedback. The control law is, u = Fx, where Fis a constant gain matrix to be determined so that the closed-loop system is stable and has a desired performance. By desired performance, it usually meansthat the specifications regarding the following are satisfied: robust stability, steady-state error, transient response, control-input constraints, and so on. There are two main approaches available in designing the state-feedback gain matrix F. Oneis the pole placement approach and the other is the linear quadratic optimization approach. The pole placement approach can be effective if we know wherethe desired pole locations should be for the closed-loop system. Although the system behavior and performance are mainly determined bythe pole locations of the system, it is by no meansan easytask to find an optimal set of pole locations, especially for high-order systems. Onthe other hand, for the linear quadratic optimization approach, the issue is in the choice of the weighting matricesin the performance index integral. The guideline is to assign more weight on the state variable of interest, but it may not work if this state variable is implicitly another state variable, which we wrongfully ignore. matrix need to system be properly selected according affected by Therefore, the pole placement or the weighting to the system dynamics to achieve desired closed-loop performance. Notethat the basic state-feedback control system structure shown in Figure 11.9 works for any fixed operating condition control problem, like the cart-inverted pendulum control problem in Section 7.6 or the simple inverted pendulum control problem considered in Section 10.5.3. Onthe other hand, if the operating condition is required to follow a time-varying command or a tracking signal, then the basic state-feedback control system structure needs to be modified to include a tracking regulator like the one shown in Figure 10.8 of Section 10.2.4 for the pendulum positioning system 420 11 Observer Theory and 11.5.2 Observer-Based Fig. 11.10: Output Feedback Control Controller A basic output feedback control system with full-order observer. Forthe state-feedback control problem, all the state variables in x are assumed available for feedback. However, in some practical applications, not all state variables are available for feedback. Instead, the measuredoutput is given together withthe state equation asfollows: x? = Ax+Bu y (11.31) =Cx+Du where x?Rn,u ?Rm,y ?Rp. Since only the measured output y(t), instead of the state vector, is available for feedback, a full-order observer is constructed to generatex, which is an estimate of x, to serve as a substitute of x for state-feedback control. That is, (11.32) u = F x Then, from Figure 11.10, it can be seen that the output feedback controller, also referred asthe observer-based controller, includes the full-order observer and the state-feedback gain F matrix inside the dash-line enclosure. Structure of the Full-Order Observer Fig. 11.11: Structure of the full-order observer 11.5 The structure full-order observer of the full-order Full-Order observer is shown in Observer and Figure Output 11.11. Feedback The dynamics Control 421 equation of the observer, with u and y as the inputs andx asthe state vector of the observer, is given by the equation: x?=Ax+Bu+L(Cx+Du-y) which can be rewritten as x? =(A+LC) x+ ? B+LD-L? ?? u y (11.33) Notethat the state-space model,(A,B,C,D), the input u, andthe output y of the plant (i.e., the system to be controlled), are employed to construct the observer. The only parameter matrix to be determined in the design process is L, which is referred as the observer gain matrix. The observer itself is an n-th order dynamic system represented by a state equation with state vectorx and input vector stability of the observer is determined observer stable (i.e., the eigenvalues of by A+LC. A+LC ?? u y The observer gain L can be chosen to are on the left-hand side of the complex . The makethe plane) if and only if (C,A) is detectable. The observer has to be stable since the steady-state reconstruction error e(t)=x(t)-x(t)can only bezero iftheobserver isstable, asshown inthefollowing theorem. Theorem 11.19 (Reconstruction Error of the Full-Order Observer) Consider the plant of Equation 11.31 and its associated full-order observer described by Equation 11.33. Let the reconstruction error bee(t)=x(t)-x(t).Show that e(t)?0ast ?8forallinitial error e(0) ifand only ifthe observer is stable, or the eigenvalues ofA+LC are on the left-hand side ofthe complex plane. Proof: Since e?(t) =?x(t)?x(t) =Ax+Bu-Ax-LCx-Bu-LDu+Ly =Ax-Ax-LCx-LDu+L(Cx+Du) we have the differential equation, e? (t) =(A+LC)e(t) whichyieldsthe solution e(t) = e(A+LC)te(0). 11.5.3 Now, in Design of Observer-Based we can combine the three Equation Output Feedback parts of the 11.31, the state-space Controller closed-loop model of the full-order system: the state-space observer in Equation model of the plant 11.33, and the state-feedback controller in Equation 11.32 together and show them onthe same graph in Figure 11.12. The plant model is in red, to generatex, whose input u and output y are fed into the full-order observer, which is in black, which is an estimate of the state x. Then the state vector of the observer,x is fed back to the state-feedback gain matrix block F, which is in blue, to generate the control-input vector u to close the loop. Notice that the observer-based output feedback controller is the combination of the full-order observer and the state-feedback controller; hence,the state-space model of the observer-based output feedback controller can be derived from the block diagram Obviously, the output of the controller observer also serves as the state vector of Figure 11.12. is u and the input to the controller of the output feedback controller. is y. The state vector of the From the block diagram of the closed-loop system in Figure 11.12, we havethe state equation of the observer andthe state-feedback equation in the following 422 11 Observer Theory and Output Feedback Control x?=Ax+Bu+L(Cx+Du-y) u = F x Replacing the control input uin the state equation by Fx so that the state equation only has y asits input, then these two equations become x?=(A+BF+LC+LDF) x-Ly:= Ak x+Bky (11.34) u = F x :=Ck x This is the state-space model of the observer-based output feedback controller, (Ak,Bk,Ck), where Ak=A+BF+LC+LDF, Bk=-L, Ck=F Fig. 11.12: State-space Theorem 11.20 (Regulator model of the observer-based output feedback controller. Poles and Observer Poles) For the closed-loop system with the observer-based controller shown in Figure 11.12, the closed-loop system poles are the regulator poles (the eigenvalues ofA+BF) together withthe observer poles (the eigenvalues ofA+LC). Proof: Fromthe state-space model ofthe plant in Equation 11.31 andthe state-space model ofthe observer-based controller in Equation 11.34, we havethe state equation ofthe closed-loop system as x? = Ax+Bu = Ax+BF x x? =(A+BF+LC+LDF) x-Ly =(A+BF+LC+LDF) x-L(Cx+DF x) whichis rewritten in matrix form as ??? x? x? A = BF ?? ? x x -LCA+BF+LC 11.5 Hence, the closed-loop Observer and Output Feedback Control 423 system poles are the roots of det Since Full-Order ? ?sI-A LCsI-(A+BF+LC) -BF = sI-A -BF ? ????sI-(A+BF)sI-(A+LC) ? ?? LCsI-(A+BF+LC) I -BF 0 -I I we have det I 0 = I I 0 ? (sI-(A+BF))det(sI-(A+LC)) ?sI-A LCsI-(A+BF+LC)=det -BF Therefore, the closed-loop system poles are the eigenvalues of A+BF together of A+LC. with the eigenvalues Remark 11.21 (Design of the Output Feedback Controller) Owing to Theorem 11.20 and the separation principle, the regulator poles can be independently chosen to meetthe closed-loop performance requirement. in designing a state-space output feedback controller are to find the regulator observer gain matrix L so that the regulator poles (the eigenvalues of A+BF) (the eigenvalues of A+LC) matrices can be obtained are at the using the desired locations pole placement on the left approach and the observer poles Therefore, the key steps gain matrix F and the and the observer poles half complex given in plane. Sections These two gain 7.5 and 7.6.4 or the performance index optimization approach discussed in Sections 10.5.1 and 10.5.2. Example 11.22 (An Observer-Based Controller Design Using Pole Placement) Considerthe system x?(t) y(t) To find the regulator weshould have = Ax(t)+Bu(t) =Cx(t) that gives ? |?I-(A+BF)| = ? ? ? ?? ?? 00 10 x(t)+ 1 0 u(t) (11.35) = ? 1 1 ? x(t) gain matrix F = ? f1 f2 ? sothattheeigenvalues ofA+BF areat-1 j, ? ??? ? ? ??-f1 -f2?? ?=?2 -f1? -f2=?2 +2? +2 =(?+1)2 +1 A+BF Hence, = = 00 1 0 + 1 0 ? f1 f2 ? = f1 f2 1 0 ? -1 ? ? f1 =-2 andf2 =-2 vNext, wewould liketofindtheobserver gainmatrix Lsothattheeigenvalues ofA+LC areat - 3 j. LetL=[?1?2]T, then 424 11 Observer Theory and Output Control ? ??? ? ? ?-?1 -?1?? |?I-(A+CL)|= ? ?=?2 -(?1 +?2)? +?1(2?2 -1) =?2 +2 A+LC Thus, Feedback 00 10 = + ?1 ?1 ?1 1 ? = ?2 ?1 1+?2 ?2 v3? ? ? ? -1-?2? -?2 ? +4 ? ? which gives ?1=-4 and?2=0.5359 Now, according to Equation 11.34 the observer-based output feedback controller is x? = Ak x+Bky (11.36 u =Ck x where Ak = A+BF+LC = ? ? ?, Ck=F= -2 -2 ? -6 4 -6 1.5359 0.5359 , Bk=-L= ? -0.5359 Now the plant model, Equation 11.35, andthe observer-based controller, construct a closed-loop system with the following state equation: ? Equation 11.36, together ? ??? ?? ?? ?? ??? ?? ? -6-6? =? x? Ax+Bu x? = Ax+BCk x Ak x+BkCx = Ak x+Bky 0 0 4 0 1 4 ? ? A = -2 -2 0 BCk x BkC Ak 0 ? ? x x := x ACL x x -0.5359 -0.5359 1.5359 0.5359 v The eigenvalues ofACL, the closed-loop system poles, can be f ound as-1 j and 3 j, which are the eigenvalues of A+BF together with the eigenvalues of A+LC, asshown in Theorem 11.20. The numerical % CSD % Ex11.22 Find A=[0 results F 0;1 can be verified Observer-based to 0]; place the B=[1;0]; F=place(A,B,P); by running control regulator C=[1 the following Pole poles, 1]; MATLAB placement eigenvalues of A+BF P=[-1+i,-1-i]; F=-F, eig_ABF=eig(A+B*F), % Find At=A'; L to Bt=C'; place Ct=B'; Ft=place(At,Bt,Pt); the observer poles, eigenvalues of Pt=[-sqrt(3)+i,-sqrt(3)-i]; Ft=-Ft; L=Ft', eig_ALC=eig(A+L*C), % Find the Ak=A+B*F+L*C, eig_cl=eig(A_cl) closed-loop Bk=-L, system Ck=F, poles A_cl=[A B*Ck;Bk*C Ak], A+LC code: 11.6 LQG Control Problem and the H2 Control Theory 425 11.6 LQG Control Problem and the H2 Control Theory The H2 control problem formulation considers a more general set of the H2 norm optimization problems than the LQG (linear quadratic Gaussian) control problem. We will start from a brief description of the LQG control problem, of whichthe solution requires an observer to provide an optimal estimate of all state variables and an optimal state-feedback control to minimize a performance index. Then we will describe the standard H2control problem formulation and solutions according to the celebrated Doyle, Glover, Khargonekar, and Francis paper [Doyle et al., 1989]. 11.6.1 The LQG Control Problem Considerthe state-space model of the system P, x?(t) = Ax(t)+Bu(t)+Wdd(t) (11.37) P: y(t) =Cx(t)+Wnn(t) where A,Wd ? Rnn,B?Rnm, C?Rpn,Wn ?Rpp,and thevariables x(t),y(t),u(t),d(t),and n(t) are the state vector, respectively. measured output, The pairs (A,B) input d(t) and the and (C,A) control input, disturbance input, and measurement are stabilizable and the detectable, respectively. measurement noise n(t) are assumed white noises noise, The dis-turbance with the covariances E[d(t)dT(t +t)] =Ind(t) and E[n(t)nT(t +t)] =Ipd(t), respectively. The objective of the LQG (Linear Quadratic Gaussian) control problem is to design an output feed-back controller (Ak,Bk,Ck), x?K(t) = AKxK(t)+BKy(t) K: (11.38) u(t) =CKxK(t) so that the closed-loop system is stable and the performance index PI = E ??8 ? u Wuu(t) ? dt ? xT(t)WT x Wxx(t)+uT(t)WT 0 ? ? (11.39) is minimized, where E[] stands fortheexpected value. Next, we will describe the standard H2 control problem formulation and solutions. Then we will rephrase the LQG control problem in the standard H2 control problem format so that the standard H2 control solution formula can be applied to the LQG control problem. 11.6.2 The Standard H2 Control Problem The standard H2control problem formulation starts from a generalized plant G with state-space model given by the equation, x?(t) = Ax(t)+B1w(t)+B2u(t) G: z(t) =C1x(t)+ y(t) =C2x(t)+D21w(t) which can be rewritten in matrix form as follows: ? ?? ? ?=? x?(t) G: ? z(t) y(t) A B1 B2 ? ? C1 0 (11.40) +D12u(t) D12 C2 D21 0 ?? ? ??? x(t) ? ? w(t) u(t) ? (11.41 426 11 Observer Theory and Output Feedback Control This state-space model hastwo output vectors: the measuredoutput vector y(t), which consists of all the measurable signals available for feedback, and the controlled output vector z(t), which is com-posed of tracking error, disturbance response and control-input costs. The generalized input vectors: the control-input vector u(t) as usual andthe exogenous input disturbance input, measurement noise, and reference input/command. plant also has two w(t) that mayinclude the Thematrices A?Rnn, B1?Rnm1 , B2?Rnm2 , C1?Rp1n, C2?Rp2n, D12 ?Rp1m2 , D21 ? Rp2m1are assumed to satisfy the following (i) (ii) Fig. 11.13: conditions: (A, B2) is stabilizable and (C2, A) is detectable. DT C1 D12? = ? 0 I ? 12 ? Closed-loop system and ? ? ?? B1 DT 21 = D21 with generalized plant (11.42) 0 I G and controller K. The objective of the H2control problem is to find a controller x?K(t) = AKxK(t)+BKy(t) K: (11.43) u(t) =CKxK(t) so that the closed-loop system shown in Figure 11.13is internally stable and the H2 norm of the closed-loop system transfer function fromwtoz,?Tzw?2, is minimized. Now, before weget into the solution of the problem we need to digress a little bit to review some background materials,like how to find a state-space modelfor the closed-loop system transfer function Tzw,the physical meaning of the H2 norm, and the relevant computation algorithms. We will organize these review materialsin the form of exercises, definitions, theorems, and remarks. Exercise 11.23 (The Closed-Loop Since the generalized plant Transfer G has two input be broken down into four subsystems, Function vectors, Tzwin the w and u, and two y = G w u Shown in = G11 G12 w G21 G22 u Figure 11.13) output vectors, z and y, it can G11, G12, G21, and G22. Thus, ?? ??? ?? ? z System z = G11w+G12u ? y = G21w+G22 11.6 With the feedback z(s) Proof: = control, u LQG =Ky, the closed-loop Control transfer Problem and the function from H2 Control Theory 427 wto z can be found as follows: ?G11(s)+G12(s)K(s)(I-G22(s)K(s))-1G21(s) ?w(s):=Tzw(s)w(s) (11.44 Left as an exercise. Exercise 11.24 (The State-Space Model of Tzwin the System Shown in Figure 11.13) For ease of computation, we will usea state-space model ofTzwinstead of the s-domain transfer func-tion obtained in Exercise 11.23. The state-space model ofTzw can be found by combining the generalized plant modelin Equation 11.40 and the controller modelin Equation 11.43 asfollows: ??? x? x?K = B2CK x AK xK z = ? C1 D12CK? Proof: ???? ? ?? A BKC2 B1 + BKD21 w (11.45) x xK Left as an exercise. Remark 11.25 (H2 Norm of a SISO System P(s)) Assume Z(s) = P(s)V(s), where the output z(t), input v(t), and the impulse response p(t) are the inverse Laplace transforms of Z(s), V(s), and P(s), respectively. The definition of the square ofthe H2 norm of P(s) is defined as 1 ?8 2:= ?P?2 |P(j?)|2d? 2p (11.46) -8 which by Parsevals theorem, wehave ?8 2:= |p(t)|2dt ?P?2 2 =?p?2 (11.47) 0 2 = Assume theinput isaunit impulse function v(t)=d(t);then, Z(s)=P(s), which implies ?P?2 2. Therefore, the H2 norm of the system is the square root of the total energy of the ?p?2 2 =?z?2 impulse response of the system, or is the square root of the output energy of the system driven by a unit impulse total input. For MIMO systems, the square of the output energies at the outputs Definition 11.26 (Controllability of the system and Observability For a stable system G(s) =(A,B,C), Lc = ?8 respectively. function at all inputs. Grammians) the controllability eAtBBTeATtdt and 0 H2 norm of the system is the sum of the driven by unit impulse and observability grammians are defined as Lo = ?8 eATtCTCeAtdt 0 428 11 Theorem Observer Theory and 11.27 (Computation The controllability Output Feedback Control of Controllability and Observability Grammians) ?8 grammian Lc = eAtBBTeATtdt satisfies the Lyapunov equation 0 ALc +LcAT +BBT = 0 ?8 The observability grammian Lo = eATtCTCeAtdt satisfies the Lyapunov equation 0 ATLo +LoA+CTC Theorem 11.28 (Computation For a stable system =0 of H2 Norm) G(s) = (A,B,C), the H2 norm ofthe system is ? ? ?G?2 = trace(CLcCT) = trace(BTLoB). 11.6.3 Solutions to the Standard H2 Control Problem The key steps to obtain the solution gain for the standard matrix F and the optimal The optimal state-feedback H2 control observer gain problem are to find the optimal gain matrix Fis 2X F =-BT where Xis the stabilizing solution of the algebraic (11.48) Riccati equation [Zhou et al., 1995, 2 X+CT1 C1 = 0 ATX+XA-XB2BT with the corresponding observer gain matrix -B2BT ?-CTA1C1-AT ? 2 solution (11.50) (11.51) 2 of the algebraic Riccati equation 2 C2Y+B1BT1 AY+YAT -YCT with the corresponding (11.49) L is L =-YCT where Y is the stabilizing Kailath, 1980], Hamiltonian matrix [Zhou et al., 1995, Kailath, 1980], H = The optimal state-feedback matrix L. =0 (11.52) Hamiltonian matrix J = ?-B1BT-CT-A ? AT 2 C2 1 (11.53 11.6 Then the optimal H2 controller LQG Control Problem and the H2 Control Theory 429 is x?K(t)=(A+B2F+LC2)xK(t)-Ly(t) Kopt(s) : u(t) (11.54) = FxK(t) and the minimum H2 norm is ?FGf ?2 ?C1Gf ?2 2 + 2 + min?Tzw?2 2 =?GcB1?2 2 =?GcL?2 ? where ? ? Gc = (A+B2F, I, C1 +D12F) Gf = (A+LC2, B1 +L2D21,I) (11.55) ? 2 (11.56) 11.6.4 Application In the following, the of the Standard H2 Control Formula H2 control solution formulas shown in the previous subsection, Section 11.6.3, will be employed to solve the LQG control problem described in Section 11.6.1. Recallthat the LQG control problem is to minimize the performance index of Equation 11.39 and one ofthemain objectives oftheH2 control problem isto minimize ?Tzw?2, theH2 norm otfheclosed-loop system transfer function Tzw. To equalize these two output of the ? ?? ? plant has to be defined as z(t) measures, the controlled Wxx(t) = := Wuu(t) e(t) generalized (11.57) v(t) where e(t) =Wxx(t) and v(t) =Wuu(t) represent the weighted error and the weighted control input constraint. The weighting matrices here play the same roles as Q =WT x Wxand R =WT u Wuin the LQR control problem westudied in Chapter 10. Meanwhile, the disturbance input d(t) and the measurement noise n(t) are grouped together asthe exogenous input vector: w(t) := ?? d(t) (11.58) n(t) Now, with the definition of z and w, and together with the LQG plant model P given in Equation 11.37, we havethe following generalized plant modelfor the LQG problem: ?? ????? ????? ?? Wu ?? ? ? ?? x?(t) GLQG : ? ? ? e(t) v(t) ? ? ? = ? ? ? y(t) A ? Wd 0 ? B Wx 0 00 00 0 C ? 0 Wn? 0 x(t) ? ? ? ? ? ? d(t) n(t) ? ? (11.59) ? u(t) To satisfy the generalized plant assumptions in Equation 11.42, werescale the control input u(t) and the noiseinput n(t), u(t)?u(t) =Wuu(t), n(t)?n(t) =Wnn(t) (11.60) so that the generalized plant becomes ?? ????? ????? ?? ? ?? ?? n(t) ? x?(t) GLQG : ? ? ? e(t) v(t) y(t) A ? ? ? ? = ? ? ? Wd0 ? BW-1 u Wx 0 00 00 0 I C ?0 I ? 0 x(t) d(t) ? ? ? ? ? ? ? ? u(t) ? (11.61 430 11 Observer Theory and Output Feedback Control According to the standard H2control notations, we havethe following matricesfor the generalized plant: A = A, B1 =? Wd0?, C1 = ?? ?? Wx , 0 C2 =C, 0 I D12 = (11.62) D21 = ? 0 I ? Now, weare ready to work on the following Example 11.29(LQG/H2 B2 = BW-1 u demonstration example. Output Feedback Controller for the Simple Inverted Pendulum) InSection 4.4.3, astate-feedback controller u =Fx=[-34 -7.4] x was designed based onthe pole placement approach toplace theclosed-loop system poles at-4 j3sothat thedamping ratio and the natural frequency are ? = 0.8 and ?n = 5rad/s, respectively. The same simple inverted pendulum system wasemployed again in Section 10.5.3 to demonstrate how to formulate a state-feedback control problem as an LQR optimization problem, especially on the selection of the Qand R weighting matrices in the performance index. In this LQG/H2 control problemformulation, the selection ofWx(part ofC1in the generalizedplant) andWu (part of D12before changing u(t) to u(t)) is equivalent to that of Q and Rsince Q =WT x Wxand R = WT u Wu. For ease of comparison, we will employ the same simple inverted pendulum dynamics modellinearized model for design and nonlinear modelfor simulationto validate the output feed-back LQG/H2 control system design. The linearized state-space model of the nonlinear 10.43 atthe unstableequilibrium x* =[0 x?(t) = Ax(t)+Bu(t)+Wdd(t) y(t) =Cx(t)+Wnn(t) simple inverted = dynamics ?9 -0.6? ?? 0 1 x(t)+ of Equation 0 1 u(t)+Wdd(t) (11.63 = ? 1 0 ? x(t)+Wnn(t) Noticethat the output y(t) consists of only one state variable, x1(t) the pendulum stick, contaminated pendulum 0]Tis = ?(t), the angular displacement of with the measurement noise n(t). Owing to the separation principle, the designs of the state feedback andthe observer do not interfere with each other. Sincein Example 10.25 wehad already designedthe state-feedback part using the LQR approach, whichis actually half ofthe LQG/H2 control design, we willselectthe equivalent weighting matrices in the performance index as Wx = Notice that the For the WxandWu weighting 1000 0 are equivalent matrices Wd and very similar to that betweenWx the trade-off ?v ? andWn. to the 0 v20 and Wu = Q and R selected in Wnin the observer v1.2 Example 10.25. design, the trade-off Recall that only the relative between weights are important Wd and Wnis in determining of the weighting matrices,so we will fixWn atWn = 1 and havethree cases of design based on the selection of the Case A: weighting Wd = matrixWd: ?? 100 , 0 Case B: Wd = ?? 10 , 0 Case C: Wd = ?? 1 0 (11.64) 11.6 Now, with these A = matrices in the generalized ?9 -0.6? v ? ??? C1 = 0 1 Wx 0 , = 0 0 v20 0 0 we can solve the two algebraic Control Problem and the H2 Control Theory 431 plant, ??v? ???? ? ?? =C = ?,D12 =??,C2 B1 = ? Wd 0 ? = 1000 LQG 100 0 0 0 , B2 = BW-1 u 0 0 1 = ? 1 0 ?, 0 1 1.2 D21 = ? 0 1 ? Riccati equations, compute the state-feedback the observer gain matrix L, and complete the LQG/H2 controller (11.65) gain matrix F and design. The stabilizing solution of the state-feedback Riccati equation 2 X+CT1 C1 = ATX+XA-XB2BT is X = ? 361.08 47.086 47.086 11.007 ? and the state-feedback gain is ? F =-BT 2X=? -42.983 -10.048 Notethat this F matrix hereis a factorWu different from the F obtained in Example 10.25. Actually the design is exactly identical; regulator the difference poles (i.e., the eigenvalues is the of A+B2F), mathematical scaling defined by Equation 11.60. The are -4.8863j2.5224 which are exactly the same asthose obtained in Example 10.25. For the observer design in Case A,the stabilizing solution of the observer Riccati equation 2 C2Y+B1BT1 AY+YAT -YCT =0 ? L =-YCT? ? is Y = and the observer gain is ? 100.10 9.6136 9.6136 67.186 2 = -100.10 -9.6136 The observer poles (i.e., the eigenvalues of A+LC2) are -100.09and -0.60617 The Simulink simulation diagram is shown in Figure 11.14, in Figure 10.19 except the controller now is an output feedback which is almost the same as that shown controller instead of the state feedback one. Three LQG/H2 controllers are designed according to different selections of the weighting matrices Wdand Wn. The simulation results of Case A with Wd = [100 0]T, Wn = 1 are shown in blue on Figure 11.15. The blue initial state responses, x1(t), x2(t), and u(t), are almost as good as their 432 11 counterparts Observer shown Case A LQG/H2 Theory and in Figure controller Output Feedback 10.22, Control which used the same state-feedback places the two regulator gain matrix poles, eigenvalues of A+B2F, F. Thus, the at exactly the same locations: -4.8863 j2.5224. The onlydifference isthattheLQG/H2 controller adds two observer poles, -100.09 and-0.60617, tothesystem astheresult ofselecting weighting matrix Wd =[100 0]T, Wn = 1in Case A observer design. For Case A design, the addition of the observer poles has only slightly reduced the performance compared with the perfect state feedback case. Fig. 11.14: The diagram of the Simulink program, SIP SSNLmodel.mdl, usedin the simulation. Fig. 11.15: Simulationresults ofthe three casesLQG/H2 controller performance. For Case B design, the design of the state-feedback part remains the same, still placing the A+B2F eigenvalues atthesame -4.8863 j2.5224. Buttheobserver weighting matrices are changed to Wd = [1 0]T, Wn = 1, which leads the observer poles (i.e., the eigenvalues of A+LC2), to -10.833 and0.99845. The initialstate response associated withCase Bsdesign isalso shown bit worse than that of Case A in Figure 11.15, but in red. The response of Case B design is alittle design 11.6 In Case C design, the weighting LQG Control matrixWd is further Problem and the reduced toWd H2 Control =[1 Theory 433 0]T, Wn = 1. The reg-ulator parts are stillunchanged, but thetwoobserver poles have moved tonew locations: -3.6322 and-2.4833. The initial state response associated with Case Cdesign isalso shown in Figure 11.15, but in brown. It is obvious that From the simulation larger than results, Wn,the control effect reduction. the brown response is not as good as the other two. we can see that design when the disturbance will emphasize disturbance weight Wdis chosen to be much response recovery Onthe other hand,if the noise reduction is more than the noise more urgent, the designer would increase Wnor reduceWd. The MATLAB codes usedto conduct the computation % CSD_ex11p29.m % This May program, % automatically % and 10, 2020 to to plot 1; 9 0; 0 -0.6], SIP_SSNLmodel.mdl SIP_plot3A.m, x10=x10_deg*d2r, B=[0; 1], x20=0, eig(A), C=[1 Wn=1, D12=[zeros(2,1);1], F=-B2'*X, SIP_plot3B.m, results. 0], B2=B*inv(Wu), D21=[0 1], eig_ABF=eig(A+B2*F), A Wd=[100; 0], B1=[Wd Ak=A+B2*F+L*C2, zeros(2,1)], Bk=-L, Bcl=[B1;Bk*D21], Ck=F, Ccl=[C1 Y=are(A',C2'*C2,B1*B1'), L=-Y*C2', eig_ALC=eig(A+L*C2), D12*Ck], sys_cl=ss(Acl,Bcl,Ccl,Dcl), % file: call Wu=sqrt(1.2), C2=C, X=are(A,B2*B2',C1'*C1), Design simulation sqrt(20)], C1=[Wx;zeros(1,2)], Simulink and x10_deg=15, A=[0 Wx=[sqrt(1000) the are given in the following: Cntrl Call simulations r2d=1/d2r; x0=[x10;x20], H2 will conduct SIP_plot3C.m, d2r=pi/180; %% SIP CSD_ex11p29.m, and simulation Acl=[A B2*Ck;Bk*C2 Ak], Dcl=zeros(3,2), damp(sys_cl), eig_Acl=eig(Acl), Simulation sim_time=2, sim_options=simset('SrcWorkspace', 'current', open('SIP_SSNLmodel'), 'DstWorkspace', sim('SIP_SSNLmodel', [0, 'current'); sim_time], sim_options); run('SIP_plot3A') %% Design B Wd=[10; 0], B1=[Wd Ak=A+B2*F+L*C2, zeros(2,1)], Bk=-L, Bcl=[B1;Bk*D21], Y=are(A',C2'*C2,B1*B1'), Ck=F, Ccl=[C1 D12*Ck], sys_cl=ss(Acl,Bcl,Ccl,Dcl), L=-Y*C2', eig_ALC=eig(A+L*C2), Acl=[A B2*Ck;Bk*C2 Ak], Dcl=zeros(3,2), damp(sys_cl), eig_Acl=eig(Acl), % Simulation sim_time=2, sim_options=simset('SrcWorkspace', 'current', open('SIP_SSNLmodel'), 'DstWorkspace', sim('SIP_SSNLmodel', [0, 'current'); sim_time], sim_options); run('SIP_plot3B') %% Design Wd=[1; C 0], B1=[Wd Ak=A+B2*F+L*C2, zeros(2,1)], Bk=-L, Bcl=[B1;Bk*D21], Ccl=[C1 sys_cl=ss(Acl,Bcl,Ccl,Dcl), Y=are(A',C2'*C2,B1*B1'), Ck=F, L=-Y*C2', eig_ALC=eig(A+L*C2), D12*Ck], Acl=[A B2*Ck;Bk*C2 Ak], Dcl=zeros(3,2), damp(sys_cl), eig_Acl=eig(Acl), % Simulation sim_time=2, sim_options=simset('SrcWorkspace', open('SIP_SSNLmodel'), 'current', sim('SIP_SSNLmodel', 'DstWorkspace', [0, 'current'); sim_time], sim_options); run('SIP_plot3C') where SIP plot3A.m different colors. %Filename: SIP_plot3A is given below, andits copies SIP plot3B.m, SIP plot3C.m will print in 434 11 Observer figure(10), grid Theory and Output Feedback subplot(1,2,1), minor, plot(t,x1,'b-',t,x2,'b--'), title('x1 and plot(t,cntrl,'b-'), Control grid x2'), on, hold grid grid on, on, subplot(1,2,2), minor, title('cntrl'), hold on 11.7 Exercise Problems P11.1: Recallthat the observable subspace is the range space of OT,the transpose of the observability matrix, while the unobservable Ois the orthogonal complement subspace is the null space ofO, the observability of the range space ofOT. In this exercise, matrix. The null space of we will identify the observable and the unobservable subspaces of a state-space model, and usethe basis vectors of these subspaces to construct a similarity transformation to transform the modelinto an observability decomposition form. The state-space model of the system to be considered is given as, ?-8 -9 -12? ?? ?-1 -1 -3 ?x(t)+ ??u(t 1 x?(t) = Ax(t)+Bu(t) = 6 7 12 0 0 y(t) =Cx(t)+Du(t) P11.1a: Find the observability = ? 4 6 8 ? x(t)+u(t) matrix O,and determine if the system is observable. P11.1b: Find the observable subspace of the system, which is the range space of OT,the transpose of the observability matrix. P11.1c: Find the unobservable subspace of the system, which is the null space of O,the observability matrix. P11.1d: Usethe procedure shown in Theorem 11.5 to transform the state-space modelinto the observ-ability decomposition form. P11.1e: Is the system detectable? Explain. P11.1f: Deletethe unobservable modeof the state-space modelin observability decomposition form to obtainanobservable second-order subsystem (A11,B1,C1,D).Isthesubsystem controllable? P11.1g:Showthatthe observable second-order subsystem(A11,B1,C1,D)is controllable. P11.1h: Isthesystem(A11,B1,C1,D) in P11.1g a minimal realization? Explain. P11.1i:Findthe polesofthe system(A11,B1,C1,D). P11.1j:Compute thezerosofthesystem(A11,B1,C1,D)usingTheorem 10.17. P11.1k: Find the transfer function Gmin(s) =C1(sIA11) B1+D, and verify the zeros ofthe system obtained in P11.1j. P11.2: Consider a MIMO system described by the following transfer function matrix: 11.7 G(s) = ? ? Problems 435 ? ? s -s Exercise (s-1)(s+3)2 (s-1)(s+3)2 s+2 1 (s-1)(s+3)2 (s-1)(s+3)2 P11.2a: Find a state-space modelin block observer form for the MIMO system. P11.2b: Find the poles and zeros of the system using the state-space modelobtained in P11.2a. P11.2c: Is the state-space model controllable? If it is not controllable, find a similarity transformation to transform it into the controllability decomposition form, andthen check if the system is stabilizable. P11.2d: If the transformed state-space modelis stabilizable, delete the uncontrollable the controllable subsystem. modesto obtain P11.2e: Show that the controllable subsystem is observable, and, therefore, the controllable subsystem obtained in P11.2dis a minimal realization. P11.2f: Find the poles and zeros of the minimal realization. P11.2g: Comment on the difference between the results obtained in P11.2b and P11.2f. P11.3: Consider a third-order SISO system described by the following state-space model, 0 -1 0 ? ? ? ??? ????? ? ? ? ?101 -2? ? ?u ?? ?? x?1 x?2 = A11 A12 x1 A21 A22 x2 x1 y = ? C1 C2? B1 + = ? 1 0 0? x2 u = B2 -3 -2 0 x1 x2 + 1 1 -2 (11.66 x1 x2 where x1isa21 vector. Note that thestate-space model isinobservability decomposition form. P11.3a: Show that the system is not observable, P11.3b: Show that the subsystem but it is detectable. x?1 = A11x1 +B1u = y =C1x1 ?0 -1? ?? -3 -2 x1 + 1 u 1 (11.67) = ? 1 0 ? x1 is a minimal realization of the system. P11.3c: Find a state-feedback gain matrix F1 so that the eigenvalues of A11 +B1F1(i.e., the regulator poles) are-1 j. P11.3d: Find an observer gain matrix L1 so that the eigenvalues of A11 +L1C1 (i.e., the observer poles) are-1.414 j. P11.3e: Construct the observer-based output feedback controller, as shown in Figure 11.12. P11.3f: Show that the observer-based output feedback controller can be represented by the following state-space model: 436 11 Observer Theory and Output Feedback Control x?K(t)=AKxK(t)+BKy(t) =(A11 +B1F1 +L1C1)xK(t)-L1y(y)(11.68) u(t) =CKxK(t) = F1xK(t) P11.3g: Combine Equation 11.66, the state-space model of the plant, together with Equation 11.68, the state-space model of the observer-based output feedback controller, to form the state-space model of the closed-loop system. Then compute the eigenvalues of the closed-loop system, which should in-clude the regulator poles(i.e., the eigenvalues of A11 +B1F1),the observer poles (i.e., the eigenvalues of A11 +L1C1), and the unobservable pole of the plant (i.e., the eigenvalues of the matrix A22). P11.4: In this exercise problem, we will revisit the lightly damped pendulum positioning system consid-ered in Section 10.2.2. The LQR approach wasemployed to design a state-feedback controller in P10.7, an exercise problem in Chapter 10, to minimize a performance index. Since not all the state variables can be measured without contamination in practice, the more versatile LQG/H2 approach is employed here to address the issue. The linearized state-space output feedback design model of the lightly damped pendulum positioning system is described by x?(t) = Ax(t)+Bu(t)+Wdd(t) y(t) =Cx(t)+Wnn(t) ? 0 = 1 ? ?? x(t)+ -21.32-0.135 0 u(t)+Wdd(t) 30 (11.69 = ? 1 0 ? x(t)+Wnn(t) Notice that the output y(t) consists of only one state variable x1(t) = ?(t), the angular displacement of the pendulum, contaminated with the measurement noise n(t). As discussed in Section 11.6.4, the generalized plant can be set up as shown in Equations 11