Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas

Modern Control Engineering OGATA 5th Ed, Manuais, Projetos, Pesquisas de Mecatrônica

Livro de Controle essencial para Controle e Automação

Tipologia: Manuais, Projetos, Pesquisas

2017
Em oferta
30 Pontos
Discount

Oferta por tempo limitado


Compartilhado em 12/10/2017

dylan-heleno-11
dylan-heleno-11 🇧🇷

4.8

(34)

4 documentos

Pré-visualização parcial do texto

Baixe Modern Control Engineering OGATA 5th Ed e outras Manuais, Projetos, Pesquisas em PDF para Mecatrônica, somente na Docsity! MODERN CONTROL ENGINEERING ala R SO] Katsuhiko Ogata Modern Control Engineering Fifth Edition Katsuhiko Ogata Prentice Hall Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo 2–7 Linearization of Nonlinear Mathematical Models 43 Example Problems and Solutions 46 Problems 60 Chapter 3 Mathematical Modeling of Mechanical Systems and Electrical Systems 63 3–1 Introduction 63 3–2 Mathematical Modeling of Mechanical Systems 63 3–3 Mathematical Modeling of Electrical Systems 72 Example Problems and Solutions 86 Problems 97 Chapter 4 Mathematical Modeling of Fluid Systems and Thermal Systems 100 4–1 Introduction 100 4–2 Liquid-Level Systems 101 4–3 Pneumatic Systems 106 4–4 Hydraulic Systems 123 4–5 Thermal Systems 136 Example Problems and Solutions 140 Problems 152 Chapter 5 Transient and Steady-State Response Analyses 159 5–1 Introduction 159 5–2 First-Order Systems 161 5–3 Second-Order Systems 164 5–4 Higher-Order Systems 179 5–5 Transient-Response Analysis with MATLAB 183 5–6 Routh’s Stability Criterion 212 5–7 Effects of Integral and Derivative Control Actions on System Performance 218 5–8 Steady-State Errors in Unity-Feedback Control Systems 225 Example Problems and Solutions 231 Problems 263 iv Contents Chapter 6 Control Systems Analysis and Design by the Root-Locus Method 269 6–1 Introduction 269 6–2 Root-Locus Plots 270 6–3 Plotting Root Loci with MATLAB 290 6–4 Root-Locus Plots of Positive Feedback Systems 303 6–5 Root-Locus Approach to Control-Systems Design 308 6–6 Lead Compensation 311 6–7 Lag Compensation 321 6–8 Lag–Lead Compensation 330 6–9 Parallel Compensation 342 Example Problems and Solutions 347 Problems 394 Chapter 7 Control Systems Analysis and Design by the Frequency-Response Method 398 7–1 Introduction 398 7–2 Bode Diagrams 403 7–3 Polar Plots 427 7–4 Log-Magnitude-versus-Phase Plots 443 7–5 Nyquist Stability Criterion 445 7–6 Stability Analysis 454 7–7 Relative Stability Analysis 462 7–8 Closed-Loop Frequency Response of Unity-Feedback Systems 477 7–9 Experimental Determination of Transfer Functions 486 7–10 Control Systems Design by Frequency-Response Approach 491 7–11 Lead Compensation 493 7–12 Lag Compensation 502 7–13 Lag–Lead Compensation 511 Example Problems and Solutions 521 Problems 561 Chapter 8 PID Controllers and Modified PID Controllers 567 8–1 Introduction 567 8–2 Ziegler–Nichols Rules for Tuning PID Controllers 568 Contents v 8–3 Design of PID Controllers with Frequency-Response Approach 577 8–4 Design of PID Controllers with Computational Optimization Approach 583 8–5 Modifications of PID Control Schemes 590 8–6 Two-Degrees-of-Freedom Control 592 8–7 Zero-Placement Approach to Improve Response Characteristics 595 Example Problems and Solutions 614 Problems 641 Chapter 9 Control Systems Analysis in State Space 648 9–1 Introduction 648 9–2 State-Space Representations of Transfer-Function Systems 649 9–3 Transformation of System Models with MATLAB 656 9–4 Solving the Time-Invariant State Equation 660 9–5 Some Useful Results in Vector-Matrix Analysis 668 9–6 Controllability 675 9–7 Observability 682 Example Problems and Solutions 688 Problems 720 Chapter 10 Control Systems Design in State Space 722 10–1 Introduction 722 10–2 Pole Placement 723 10–3 Solving Pole-Placement Problems with MATLAB 735 10–4 Design of Servo Systems 739 10–5 State Observers 751 10–6 Design of Regulator Systems with Observers 778 10–7 Design of Control Systems with Observers 786 10–8 Quadratic Optimal Regulator Systems 793 10–9 Robust Control Systems 806 Example Problems and Solutions 817 Problems 855 vi Contents P ix Preface This book introduces important concepts in the analysis and design of control systems. Readers will find it to be a clear and understandable textbook for control system courses at colleges and universities. It is written for senior electrical, mechanical, aerospace, or chemical engineering students. The reader is expected to have fulfilled the following prerequisites: introductory courses on differential equations, Laplace transforms, vector- matrix analysis, circuit analysis, mechanics, and introductory thermodynamics. The main revisions made in this edition are as follows: • The use of MATLAB for obtaining responses of control systems to various inputs has been increased. • The usefulness of the computational optimization approach with MATLAB has been demonstrated. • New example problems have been added throughout the book. • Materials in the previous edition that are of secondary importance have been deleted in order to provide space for more important subjects. Signal flow graphs were dropped from the book. A chapter on Laplace transform was deleted. Instead, Laplace transform tables, and partial-fraction expansion with MATLAB are pre- sented in Appendix A and Appendix B, respectively. • A short summary of vector-matrix analysis is presented in Appendix C; this will help the reader to find the inverses of n x n matrices that may be involved in the analy- sis and design of control systems. This edition of Modern Control Engineering is organized into ten chapters.The outline of this book is as follows: Chapter 1 presents an introduction to control systems. Chapter 2 deals with mathematical modeling of control systems.A linearization technique for non- linear mathematical models is presented in this chapter. Chapter 3 derives mathematical models of mechanical systems and electrical systems. Chapter 4 discusses mathematical modeling of fluid systems (such as liquid-level systems, pneumatic systems, and hydraulic systems) and thermal systems. Chapter 5 treats transient response and steady-state analyses of control systems. MATLAB is used extensively for obtaining transient response curves. Routh’s stability criterion is presented for stability analysis of control systems. Hurwitz stability criterion is also presented. Chapter 6 discusses the root-locus analysis and design of control systems, including positive feedback systems and conditionally stable systems Plotting root loci with MAT- LAB is discussed in detail. Design of lead, lag, and lag-lead compensators with the root- locus method is included. Chapter 7 treats the frequency-response analysis and design of control systems.The Nyquist stability criterion is presented in an easily understandable manner.The Bode di- agram approach to the design of lead, lag, and lag-lead compensators is discussed. Chapter 8 deals with basic and modified PID controllers. Computational approaches for obtaining optimal parameter values for PID controllers are discussed in detail, par- ticularly with respect to satisfying requirements for step-response characteristics. Chapter 9 treats basic analyses of control systems in state space. Concepts of con- trollability and observability are discussed in detail. Chapter 10 deals with control systems design in state space.The discussions include pole placement, state observers, and quadratic optimal control. An introductory dis- cussion of robust control systems is presented at the end of Chapter 10. The book has been arranged toward facilitating the student’s gradual understanding of control theory. Highly mathematical arguments are carefully avoided in the presen- tation of the materials. Statement proofs are provided whenever they contribute to the understanding of the subject matter presented. Special effort has been made to provide example problems at strategic points so that the reader will have a clear understanding of the subject matter discussed. In addition, a number of solved problems (A-problems) are provided at the end of each chapter, except Chapter 1. The reader is encouraged to study all such solved problems carefully; this will allow the reader to obtain a deeper understanding of the topics discussed. In addition, many problems (without solutions) are provided at the end of each chapter, except Chapter 1. The unsolved problems (B-problems) may be used as homework or quiz problems. If this book is used as a text for a semester course (with 56 or so lecture hours), a good portion of the material may be covered by skipping certain subjects. Because of the abundance of example problems and solved problems (A-problems) that might answer many possible questions that the reader might have, this book can also serve as a self- study book for practicing engineers who wish to study basic control theories. I would like to thank the following reviewers for this edition of the book: Mark Camp- bell, Cornell University; Henry Sodano, Arizona State University; and Atul G. Kelkar, Iowa State University. Finally, I wish to offer my deep appreciation to Ms.Alice Dworkin, Associate Editor, Mr. Scott Disanno, Senior Managing Editor, and all the people in- volved in this publishing project, for the speedy yet superb production of this book. Katsuhiko Ogata x Preface 1 Introduction to Control Systems 1–1 INTRODUCTION Control theories commonly used today are classical control theory (also called con- ventional control theory), modern control theory, and robust control theory. This book presents comprehensive treatments of the analysis and design of control systems based on the classical control theory and modern control theory.A brief introduction of robust control theory is included in Chapter 10. Automatic control is essential in any field of engineering and science. Automatic control is an important and integral part of space-vehicle systems, robotic systems, mod- ern manufacturing systems, and any industrial operations involving control of temper- ature, pressure, humidity, flow, etc. It is desirable that most engineers and scientists are familiar with theory and practice of automatic control. This book is intended to be a text book on control systems at the senior level at a col- lege or university. All necessary background materials are included in the book. Math- ematical background materials related to Laplace transforms and vector-matrix analysis are presented separately in appendixes. Brief Review of Historical Developments of Control Theories and Practices. The first significant work in automatic control was James Watt’s centrifugal gover- nor for the speed control of a steam engine in the eighteenth century. Other significant works in the early stages of development of control theory were due to 1 4 Chapter 1 / Introduction to Control Systems 1–2 EXAMPLES OF CONTROL SYSTEMS In this section we shall present a few examples of control systems. Speed Control System. The basic principle of a Watt’s speed governor for an en- gine is illustrated in the schematic diagram of Figure 1–1. The amount of fuel admitted to the engine is adjusted according to the difference between the desired and the actual engine speeds. The sequence of actions may be stated as follows: The speed governor is ad- justed such that, at the desired speed, no pressured oil will flow into either side of the power cylinder. If the actual speed drops below the desired value due to disturbance, then the decrease in the centrifugal force of the speed governor causes the control valve to move downward, supplying more fuel, and the speed of the engine increases until the desired value is reached. On the other hand, if the speed of the engine increases above the desired value, then the increase in the centrifu- gal force of the governor causes the control valve to move upward. This decreases the supply of fuel, and the speed of the engine decreases until the desired value is reached. In this speed control system, the plant (controlled system) is the engine and the controlled variable is the speed of the engine. The difference between the desired speed and the actual speed is the error signal. The control signal (the amount of fuel) to be applied to the plant (engine) is the actuating signal. The external input to dis- turb the controlled variable is the disturbance. An unexpected change in the load is a disturbance. Temperature Control System. Figure 1–2 shows a schematic diagram of tem- perature control of an electric furnace.The temperature in the electric furnace is meas- ured by a thermometer, which is an analog device.The analog temperature is converted Oil under pressure Power cylinder Close Open Pilot valve Control valve Fuel Engine Load Figure 1–1 Speed control system. Section 1–2 / Examples of Control Systems 5 Thermometer Heater Interface Controller InterfaceAmplifier A/D converter Programmed input Electric furnace Relay Figure 1–2 Temperature control system. to a digital temperature by an A/D converter. The digital temperature is fed to a con- troller through an interface.This digital temperature is compared with the programmed input temperature, and if there is any discrepancy (error), the controller sends out a sig- nal to the heater, through an interface, amplifier, and relay, to bring the furnace tem- perature to a desired value. Business Systems. A business system may consist of many groups. Each task assigned to a group will represent a dynamic element of the system. Feedback methods of reporting the accomplishments of each group must be established in such a system for proper operation. The cross-coupling between functional groups must be made a mini- mum in order to reduce undesirable delay times in the system. The smaller this cross- coupling, the smoother the flow of work signals and materials will be. A business system is a closed-loop system.A good design will reduce the manageri- al control required. Note that disturbances in this system are the lack of personnel or ma- terials, interruption of communication, human errors, and the like. The establishment of a well-founded estimating system based on statistics is manda- tory to proper management. It is a well-known fact that the performance of such a system can be improved by the use of lead time, or anticipation. To apply control theory to improve the performance of such a system, we must rep- resent the dynamic characteristic of the component groups of the system by a relative- ly simple set of equations. Although it is certainly a difficult problem to derive mathematical representations of the component groups, the application of optimization techniques to business sys- tems significantly improves the performance of the business system. Consider, as an example, an engineering organizational system that is composed of major groups such as management, research and development, preliminary design, ex- periments, product design and drafting, fabrication and assembling, and tesing. These groups are interconnected to make up the whole operation. Such a system may be analyzed by reducing it to the most elementary set of com- ponents necessary that can provide the analytical detail required and by representing the dynamic characteristics of each component by a set of simple equations. (The dynamic performance of such a system may be determined from the relation between progres- sive accomplishment and time.) 6 Chapter 1 / Introduction to Control Systems Required product Management Research and development Preliminary design Experiments Product design and drafting Fabrication and assembling Testing Product Figure 1–3 Block diagram of an engineering organizational system. A functional block diagram may be drawn by using blocks to represent the func- tional activities and interconnecting signal lines to represent the information or product output of the system operation. Figure 1–3 is a possible block diagram for this system. Robust Control System. The first step in the design of a control system is to obtain a mathematical model of the plant or control object. In reality, any model of a plant we want to control will include an error in the modeling process.That is, the actual plant differs from the model to be used in the design of the control system. To ensure the controller designed based on a model will work satisfactorily when this controller is used with the actual plant, one reasonable approach is to assume from the start that there is an uncertainty or error between the actual plant and its mathematical model and include such uncertainty or error in the design process of the control system. The control system designed based on this approach is called a robust control system. Suppose that the actual plant we want to control is (s) and the mathematical model of the actual plant is G(s), that is, (s)=actual plant model that has uncertainty ¢(s) G(s)=nominal plant model to be used for designing the control system (s) and G(s) may be related by a multiplicative factor such as or an additive factor or in other forms. Since the exact description of the uncertainty or error ¢(s) is unknown, we use an estimate of ¢(s) and use this estimate, W(s), in the design of the controller. W(s) is a scalar transfer function such that where is the maximum value of for and is called the H infinity norm of W(s). 0 ! v ! q!W(jv)!!!W(s)!!q !!¢(s)!!q 6 !!W(s)!!q = max 0!v!q !W(jv)! G ! (s) = G(s) + ¢(s) G ! (s) = G(s)[1 + ¢(s)] G ! G ! G ! desired. Therefore, it is worthwhile to summarize the advantages and disadvantages of using open-loop control systems. The major advantages of open-loop control systems are as follows: 1. Simple construction and ease of maintenance. 2. Less expensive than a corresponding closed-loop system. 3. There is no stability problem. 4. Convenient when output is hard to measure or measuring the output precisely is economically not feasible. (For example, in the washer system, it would be quite ex- pensive to provide a device to measure the quality of the washer’s output, clean- liness of the clothes.) The major disadvantages of open-loop control systems are as follows: 1. Disturbances and changes in calibration cause errors, and the output may be different from what is desired. 2. To maintain the required quality in the output, recalibration is necessary from time to time. 1–4 DESIGN AND COMPENSATION OF CONTROL SYSTEMS This book discusses basic aspects of the design and compensation of control systems. Compensation is the modification of the system dynamics to satisfy the given specifi- cations. The approaches to control system design and compensation used in this book are the root-locus approach, frequency-response approach, and the state-space ap- proach. Such control systems design and compensation will be presented in Chapters 6, 7, 9 and 10. The PID-based compensational approach to control systems design is given in Chapter 8. In the actual design of a control system, whether to use an electronic, pneumatic, or hydraulic compensator is a matter that must be decided partially based on the nature of the controlled plant. For example, if the controlled plant involves flammable fluid, then we have to choose pneumatic components (both a compensator and an actuator) to avoid the possibility of sparks. If, however, no fire hazard exists, then electronic com- pensators are most commonly used. (In fact, we often transform nonelectrical signals into electrical signals because of the simplicity of transmission, increased accuracy, increased reliability, ease of compensation, and the like.) Performance Specifications. Control systems are designed to perform specific tasks. The requirements imposed on the control system are usually spelled out as per- formance specifications. The specifications may be given in terms of transient response requirements (such as the maximum overshoot and settling time in step response) and of steady-state requirements (such as steady-state error in following ramp input) or may be given in frequency-response terms. The specifications of a control system must be given before the design process begins. For routine design problems, the performance specifications (which relate to accura- cy, relative stability, and speed of response) may be given in terms of precise numerical values. In other cases they may be given partially in terms of precise numerical values and Section 1–4 / Design and Compensation of Control Systems 9 partially in terms of qualitative statements. In the latter case the specifications may have to be modified during the course of design, since the given specifications may never be satisfied (because of conflicting requirements) or may lead to a very expensive system. Generally, the performance specifications should not be more stringent than neces- sary to perform the given task. If the accuracy at steady-state operation is of prime im- portance in a given control system, then we should not require unnecessarily rigid performance specifications on the transient response, since such specifications will require expensive components. Remember that the most important part of control system design is to state the performance specifications precisely so that they will yield an optimal control system for the given purpose. System Compensation. Setting the gain is the first step in adjusting the system for satisfactory performance. In many practical cases, however, the adjustment of the gain alone may not provide sufficient alteration of the system behavior to meet the given specifications. As is frequently the case, increasing the gain value will improve the steady-state behavior but will result in poor stability or even instability. It is then nec- essary to redesign the system (by modifying the structure or by incorporating addi- tional devices or components) to alter the overall behavior so that the system will behave as desired. Such a redesign or addition of a suitable device is called compensa- tion. A device inserted into the system for the purpose of satisfying the specifications is called a compensator. The compensator compensates for deficient performance of the original system. Design Procedures. In the process of designing a control system, we set up a mathematical model of the control system and adjust the parameters of a compensator. The most time-consuming part of the work is the checking of the system performance by analysis with each adjustment of the parameters.The designer should use MATLAB or other available computer package to avoid much of the numerical drudgery neces- sary for this checking. Once a satisfactory mathematical model has been obtained, the designer must con- struct a prototype and test the open-loop system. If absolute stability of the closed loop is assured, the designer closes the loop and tests the performance of the resulting closed- loop system. Because of the neglected loading effects among the components, nonlin- earities, distributed parameters, and so on, which were not taken into consideration in the original design work, the actual performance of the prototype system will probably differ from the theoretical predictions. Thus the first design may not satisfy all the re- quirements on performance. The designer must adjust system parameters and make changes in the prototype until the system meets the specificications. In doing this, he or she must analyze each trial, and the results of the analysis must be incorporated into the next trial. The designer must see that the final system meets the performance apec- ifications and, at the same time, is reliable and economical. 1–5 OUTLINE OF THE BOOK This text is organized into 10 chapters.The outline of each chapter may be summarized as follows: Chapter 1 presents an introduction to this book. 10 Chapter 1 / Introduction to Control Systems Chapter 2 deals with mathematical modeling of control systems that are described by linear differential equations. Specifically, transfer function expressions of differential equation systems are derived.Also, state-space expressions of differential equation sys- tems are derived. MATLAB is used to transform mathematical models from transfer functions to state-space equations and vice versa.This book treats linear systems in de- tail. If the mathematical model of any system is nonlinear, it needs to be linearized be- fore applying theories presented in this book. A technique to linearize nonlinear mathematical models is presented in this chapter. Chapter 3 derives mathematical models of various mechanical and electrical sys- tems that appear frequently in control systems. Chapter 4 discusses various fluid systems and thermal systems, that appear in control systems. Fluid systems here include liquid-level systems, pneumatic systems, and hydraulic systems. Thermal systems such as temperature control systems are also discussed here. Control engineers must be familiar with all of these systems discussed in this chapter. Chapter 5 presents transient and steady-state response analyses of control systems defined in terms of transfer functions. MATLAB approach to obtain transient and steady-state response analyses is presented in detail. MATLAB approach to obtain three-dimensional plots is also presented. Stability analysis based on Routh’s stability criterion is included in this chapter and the Hurwitz stability criterion is briefly discussed. Chapter 6 treats the root-locus method of analysis and design of control systems. It is a graphical method for determining the locations of all closed-loop poles from the knowledge of the locations of the open-loop poles and zeros of a closed-loop system as a parameter (usually the gain) is varied from zero to infinity. This method was de- veloped by W. R. Evans around 1950. These days MATLAB can produce root-locus plots easily and quickly.This chapter presents both a manual approach and a MATLAB approach to generate root-locus plots. Details of the design of control systems using lead compensators, lag compensators, are lag–lead compensators are presented in this chapter. Chapter 7 presents the frequency-response method of analysis and design of control systems. This is the oldest method of control systems analysis and design and was de- veloped during 1940–1950 by Nyquist, Bode, Nichols, Hazen, among others. This chap- ter presents details of the frequency-response approach to control systems design using lead compensation technique, lag compensation technique, and lag–lead compensation technique. The frequency-response method was the most frequently used analysis and design method until the state-space method became popular. However, since H-infini- ty control for designing robust control systems has become popular, frequency response is gaining popularity again. Chapter 8 discusses PID controllers and modified ones such as multidegrees-of- freedom PID controllers. The PID controller has three parameters; proportional gain, integral gain, and derivative gain. In industrial control systems more than half of the con- trollers used have been PID controllers. The performance of PID controllers depends on the relative magnitudes of those three parameters. Determination of the relative magnitudes of the three parameters is called tuning of PID controllers. Ziegler and Nichols proposed so-called “Ziegler–Nichols tuning rules” as early as 1942. Since then numerous tuning rules have been proposed.These days manufacturers of PID controllers have their own tuning rules. In this chapter we present a computer optimization approach using MATLAB to determine the three parameters to satisfy Section 1–5 / Outline of the Book 11 14 Chapter 2 / Mathematical Modeling of Control Systems transient-response or frequency-response analysis of single-input, single-output, linear, time-invariant systems, the transfer-function representation may be more convenient than any other. Once a mathematical model of a system is obtained, various analytical and computer tools can be used for analysis and synthesis purposes. Simplicity Versus Accuracy. In obtaining a mathematical model, we must make a compromise between the simplicity of the model and the accuracy of the results of the analysis. In deriving a reasonably simplified mathematical model, we frequently find it necessary to ignore certain inherent physical properties of the system. In particular, if a linear lumped-parameter mathematical model (that is, one employing ordinary dif- ferential equations) is desired, it is always necessary to ignore certain nonlinearities and distributed parameters that may be present in the physical system. If the effects that these ignored properties have on the response are small, good agreement will be obtained between the results of the analysis of a mathematical model and the results of the experimental study of the physical system. In general, in solving a new problem, it is desirable to build a simplified model so that we can get a general feeling for the solution.A more complete mathematical model may then be built and used for a more accurate analysis. We must be well aware that a linear lumped-parameter model, which may be valid in low-frequency operations, may not be valid at sufficiently high frequencies, since the neg- lected property of distributed parameters may become an important factor in the dynamic behavior of the system. For example, the mass of a spring may be neglected in low- frequency operations, but it becomes an important property of the system at high fre- quencies. (For the case where a mathematical model involves considerable errors, robust control theory may be applied. Robust control theory is presented in Chapter 10.) Linear Systems. A system is called linear if the principle of superposition applies. The principle of superposition states that the response produced by the simultaneous application of two different forcing functions is the sum of the two individual responses. Hence, for the linear system, the response to several inputs can be calculated by treating one input at a time and adding the results. It is this principle that allows one to build up complicated solutions to the linear differential equation from simple solutions. In an experimental investigation of a dynamic system, if cause and effect are pro- portional, thus implying that the principle of superposition holds, then the system can be considered linear. Linear Time-Invariant Systems and Linear Time-Varying Systems. A differ- ential equation is linear if the coefficients are constants or functions only of the in- dependent variable. Dynamic systems that are composed of linear time-invariant lumped-parameter components may be described by linear time-invariant differen- tial equations—that is, constant-coefficient differential equations. Such systems are called linear time-invariant (or linear constant-coefficient) systems. Systems that are represented by differential equations whose coefficients are functions of time are called linear time-varying systems. An example of a time-varying control sys- tem is a spacecraft control system. (The mass of a spacecraft changes due to fuel consumption.) Section 2–2 / Transfer Function and Impulse-Response Function 15 Outline of the Chapter. Section 2–1 has presented an introduction to the math- ematical modeling of dynamic systems. Section 2–2 presents the transfer function and impulse-response function. Section 2–3 introduces automatic control systems and Sec- tion 2–4 discusses concepts of modeling in state space. Section 2–5 presents state-space representation of dynamic systems. Section 2–6 discusses transformation of mathemat- ical models with MATLAB. Finally, Section 2–7 discusses linearization of nonlinear mathematical models. 2–2 TRANSFER FUNCTION AND IMPULSE- RESPONSE FUNCTION In control theory, functions called transfer functions are commonly used to character- ize the input-output relationships of components or systems that can be described by lin- ear, time-invariant, differential equations. We begin by defining the transfer function and follow with a derivation of the transfer function of a differential equation system. Then we discuss the impulse-response function. Transfer Function. The transfer function of a linear, time-invariant, differential equation system is defined as the ratio of the Laplace transform of the output (response function) to the Laplace transform of the input (driving function) under the assumption that all initial conditions are zero. Consider the linear time-invariant system defined by the following differential equation: where y is the output of the system and x is the input. The transfer function of this sys- tem is the ratio of the Laplace transformed output to the Laplace transformed input when all initial conditions are zero, or By using the concept of transfer function, it is possible to represent system dynam- ics by algebraic equations in s. If the highest power of s in the denominator of the trans- fer function is equal to n, the system is called an nth-order system. Comments on Transfer Function. The applicability of the concept of the trans- fer function is limited to linear, time-invariant, differential equation systems.The trans- fer function approach, however, is extensively used in the analysis and design of such systems. In what follows, we shall list important comments concerning the transfer func- tion. (Note that a system referred to in the list is one described by a linear, time-invariant, differential equation.) = Y(s) X(s) = b0 sm + b1 sm - 1 + p + bm - 1 s + bm a0 sn + a1 sn - 1 + p + an - 1 s + an Transfer function = G(s) = l[output] l[input] 2 zero initial conditions = b0 x (m) + b1x (m - 1) + p + bm - 1 x # + bm x (n ! m) a0 y (n) + a1y (n - 1) + p + an - 1 y # + an y 16 Chapter 2 / Mathematical Modeling of Control Systems 1. The transfer function of a system is a mathematical model in that it is an opera- tional method of expressing the differential equation that relates the output vari- able to the input variable. 2. The transfer function is a property of a system itself, independent of the magnitude and nature of the input or driving function. 3. The transfer function includes the units necessary to relate the input to the output; however, it does not provide any information concerning the physical structure of the system. (The transfer functions of many physically different systems can be identical.) 4. If the transfer function of a system is known, the output or response can be stud- ied for various forms of inputs with a view toward understanding the nature of the system. 5. If the transfer function of a system is unknown, it may be established experimen- tally by introducing known inputs and studying the output of the system. Once established, a transfer function gives a full description of the dynamic character- istics of the system, as distinct from its physical description. Convolution Integral. For a linear, time-invariant system the transfer function G(s) is where X(s) is the Laplace transform of the input to the system and Y(s) is the Laplace transform of the output of the system, where we assume that all initial conditions in- volved are zero. It follows that the output Y(s) can be written as the product of G(s) and X(s), or (2–1) Note that multiplication in the complex domain is equivalent to convolution in the time domain (see Appendix A), so the inverse Laplace transform of Equation (2–1) is given by the following convolution integral: where both g(t) and x(t) are 0 for t<0. Impulse-Response Function. Consider the output (response) of a linear time- invariant system to a unit-impulse input when the initial conditions are zero. Since the Laplace transform of the unit-impulse function is unity, the Laplace transform of the output of the system is (2–2)Y(s) = G(s) = 3 t 0 g(t)x(t - t) dt y(t) = 3 t 0 x(t)g(t - t) dt Y(s) = G(s)X(s) G(s) = Y(s) X(s) the output of the plant.The output of the sensor is compared with the system input, and the actuating error signal is generated.) In the present example, the feedback signal that is fed back to the summing point for comparison with the input is B(s) = H(s)C(s). Open-Loop Transfer Function and Feedforward Transfer Function. Refer- ring to Figure 2–4, the ratio of the feedback signal B(s) to the actuating error signal E(s) is called the open-loop transfer function. That is, The ratio of the output C(s) to the actuating error signal E(s) is called the feed- forward transfer function, so that If the feedback transfer function H(s) is unity, then the open-loop transfer function and the feedforward transfer function are the same. Closed-Loop Transfer Function. For the system shown in Figure 2–4, the output C(s) and input R(s) are related as follows: since eliminating E(s) from these equations gives or (2–3) The transfer function relating C(s) to R(s) is called the closed-loop transfer function. It relates the closed-loop system dynamics to the dynamics of the feedforward elements and feedback elements. From Equation (2–3), C(s) is given by C(s) = G(s) 1 + G(s)H(s) R(s) C(s) R(s) = G(s) 1 + G(s)H(s) C(s) = G(s) CR(s) - H(s)C(s) D = R(s) - H(s)C(s) E(s) = R(s) - B(s) C(s) = G(s)E(s) Feedforward transfer function = C(s) E(s) = G(s) Open-loop transfer function = B(s) E(s) = G(s)H(s) Section 2–3 / Automatic Control Systems 19 R(s) B(s) E(s) G(s) H(s) C(s) + – Figure 2–4 Closed-loop system. 20 Chapter 2 / Mathematical Modeling of Control Systems G1(s) G1(s) G2(s) G2(s) C(s)R(s) C(s) C(s) R(s) R(s) + + G1(s) G2(s) +– (a) (b) (c) Figure 2–5 (a) Cascaded system; (b) parallel system; (c) feedback (closed- loop) system. Thus the output of the closed-loop system clearly depends on both the closed-loop trans- fer function and the nature of the input. Obtaining Cascaded, Parallel, and Feedback (Closed-Loop) Transfer Functions with MATLAB. In control-systems analysis, we frequently need to calculate the cas- caded transfer functions, parallel-connected transfer functions, and feedback-connected (closed-loop) transfer functions. MATLAB has convenient commands to obtain the cas- caded, parallel, and feedback (closed-loop) transfer functions. Suppose that there are two components G1(s) and G2(s) connected differently as shown in Figure 2–5 (a), (b), and (c), where To obtain the transfer functions of the cascaded system, parallel system, or feedback (closed-loop) system, the following commands may be used: [num, den] = series(num1,den1,num2,den2) [num, den] = parallel(num1,den1,num2,den2) [num, den] = feedback(num1,den1,num2,den2) As an example, consider the case where MATLAB Program 2–1 gives C(s)/R(s)=num!den for each arrangement of G1(s) and G2(s). Note that the command printsys(num,den) displays the num!den Cthat is, the transfer function C(s)/R(s) D of the system considered. G1(s) = 10 s2 + 2s + 10 = num1 den1 , G2(s) = 5s + 5 = num2 den2 G1(s) = num1 den1 , G2(s) = num2den2 Section 2–3 / Automatic Control Systems 21 Automatic Controllers. An automatic controller compares the actual value of the plant output with the reference input (desired value), determines the deviation, and produces a control signal that will reduce the deviation to zero or to a small value. The manner in which the automatic controller produces the control signal is called the control action. Figure 2–6 is a block diagram of an industrial control system, which MATLAB Program 2–1 num1 = [10]; den1 = [1 2 10]; num2 = [5]; den2 = [1 5]; [num, den] = series(num1,den1,num2,den2); printsys(num,den) num/den = [num, den] = parallel(num1,den1,num2,den2); printsys(num,den) num/den = [num, den] = feedback(num1,den1,num2,den2); printsys(num,den) num/den = 10s + 50 s^3 + 7s^2 + 20s + 100 5s^2 + 20s + 100 s^3 + 7s^2 + 20s + 50 50 s^3 + 7s^2 + 20s + 50 Automatic controller Error detector Amplifier Actuator Plant Output Sensor Reference input Actuating error signal Set point" # + – Figure 2–6 Block diagram of an industrial control system, which consists of an automatic controller, an actuator, a plant, and a sensor (measuring element). 24 Chapter 2 / Mathematical Modeling of Control Systems From Figure 2–9, we notice that the amplitude of the output oscillation can be reduced by decreasing the differential gap. The decrease in the differential gap, however, increases the number of on–off switchings per minute and reduces the useful life of the component. The magnitude of the differential gap must be determined from such considerations as the accuracy required and the life of the component. Proportional Control Action. For a controller with proportional control action, the relationship between the output of the controller u(t) and the actuating error signal e(t) is or, in Laplace-transformed quantities, where Kp is termed the proportional gain. Whatever the actual mechanism may be and whatever the form of the operating power, the proportional controller is essentially an amplifier with an adjustable gain. Integral Control Action. In a controller with integral control action, the value of the controller output u(t) is changed at a rate proportional to the actuating error signal e(t). That is, or where Ki is an adjustable constant. The transfer function of the integral controller is Proportional-Plus-Integral Control Action. The control action of a proportional- plus-integral controller is defined by u(t) = Kp e(t) + Kp Ti 3 t 0 e(t) dt U(s) E(s) = Ki s u(t) = Ki3 t 0 e(t) dt du(t) dt = Ki e(t) U(s) E(s) = Kp u(t) = Kp e(t) Section 2–3 / Automatic Control Systems 25 or the transfer function of the controller is where is called the integral time. Proportional-Plus-Derivative Control Action. The control action of a proportional- plus-derivative controller is defined by and the transfer function is where is called the derivative time. Proportional-Plus-Integral-Plus-Derivative Control Action. The combination of proportional control action, integral control action, and derivative control action is termed proportional-plus-integral-plus-derivative control action. It has the advantages of each of the three individual control actions. The equation of a controller with this combined action is given by or the transfer function is where Kp is the proportional gain, is the integral time, and is the derivative time. The block diagram of a proportional-plus-integral-plus-derivative controller is shown in Figure 2–10. TdTi U(s) E(s) = Kp a1 + 1Ti s + Td s b u(t) = Kp e(t) + Kp Ti 3 t 0 e(t) dt + Kp Td de(t) dt Td U(s) E(s) = KpA1 + Td sB u(t) = Kp e(t) + Kp Td de(t) dt Ti U(s) E(s) = Kp a1 + 1Ti s b + – E(s) U(s)Kp(1 + Tis + Ti Tds2) Tis Figure 2–10 Block diagram of a proportional-plus- integral-plus- derivative controller. 26 Chapter 2 / Mathematical Modeling of Control Systems R(s) G1(s) G2(s) H(s) Disturbance D(s) C(s) + – + + Figure 2–11 Closed-loop system subjected to a disturbance. Closed-Loop System Subjected to a Disturbance. Figure 2–11 shows a closed- loop system subjected to a disturbance. When two inputs (the reference input and dis- turbance) are present in a linear time-invariant system, each input can be treated independently of the other; and the outputs corresponding to each input alone can be added to give the complete output. The way each input is introduced into the system is shown at the summing point by either a plus or minus sign. Consider the system shown in Figure 2–11. In examining the effect of the distur- bance D(s), we may assume that the reference input is zero; we may then calculate the response CD(s) to the disturbance only. This response can be found from On the other hand, in considering the response to the reference input R(s), we may assume that the disturbance is zero.Then the response CR(s) to the reference input R(s) can be obtained from The response to the simultaneous application of the reference input and disturbance can be obtained by adding the two individual responses. In other words, the response C(s) due to the simultaneous application of the reference input R(s) and disturbance D(s) is given by Consider now the case where |G1(s)H(s)| " 1 and |G1(s)G2(s)H(s)| " 1. In this case, the closed-loop transfer function CD(s)/D(s) becomes almost zero, and the effect of the disturbance is suppressed. This is an advantage of the closed-loop system. On the other hand, the closed-loop transfer function CR(s)/R(s) approaches 1/H(s) as the gain of G1(s)G2(s)H(s) increases.This means that if |G1(s)G2(s)H(s)| " 1, then the closed-loop transfer function CR(s)/R(s) becomes independent of G1(s) and G2(s) and inversely proportional to H(s), so that the variations of G1(s) and G2(s) do not affect the closed-loop transfer function CR(s)/R(s). This is another advantage of the closed-loop system. It can easily be seen that any closed-loop system with unity feedback, H(s)=1, tends to equalize the input and output. = G2(s) 1 + G1(s)G2(s)H(s) CG1(s)R(s) + D(s) D C(s) = CR(s) + CD(s) CR(s) R(s) = G1(s)G2(s) 1 + G1(s)G2(s)H(s) CD(s) D(s) = G2(s) 1 + G1(s)G2(s)H(s) Section 2–4 / Modeling in State Space 29 Notice that the numerator of the closed-loop transfer function C(s)/R(s) is the product of the transfer functions of the feedforward path. The denominator of C(s)/R(s) is equal to (The positive feedback loop yields a negative term in the denominator.) 2–4 MODELING IN STATE SPACE In this section we shall present introductory material on state-space analysis of control systems. Modern Control Theory. The modern trend in engineering systems is toward greater complexity, due mainly to the requirements of complex tasks and good accu- racy. Complex systems may have multiple inputs and multiple outputs and may be time varying. Because of the necessity of meeting increasingly stringent requirements on the performance of control systems, the increase in system complexity, and easy access to large scale computers, modern control theory, which is a new approach to the analy- sis and design of complex control systems, has been developed since around 1960.This new approach is based on the concept of state. The concept of state by itself is not new, since it has been in existence for a long time in the field of classical dynamics and other fields. Modern Control Theory Versus Conventional Control Theory. Modern con- trol theory is contrasted with conventional control theory in that the former is appli- cable to multiple-input, multiple-output systems, which may be linear or nonlinear, time invariant or time varying, while the latter is applicable only to linear time- invariant single-input, single-output systems. Also, modern control theory is essen- tially time-domain approach and frequency domain approach (in certain cases such as H-infinity control), while conventional control theory is a complex frequency-domain approach. Before we proceed further, we must define state, state variables, state vector, and state space. State. The state of a dynamic system is the smallest set of variables (called state variables) such that knowledge of these variables at t=t0, together with knowledge of the input for t ! t0 , completely determines the behavior of the system for any time t ! t0. Note that the concept of state is by no means limited to physical systems. It is appli- cable to biological systems, economic systems, social systems, and others. State Variables. The state variables of a dynamic system are the variables mak- ing up the smallest set of variables that determine the state of the dynamic system. If at = 1 - G1 G2 H1 + G2 G3 H2 + G1 G2 G3 = 1 + A-G1 G2 H1 + G2 G3 H2 + G1 G2 G3B 1 +a (product of the transfer functions around each loop) 30 Chapter 2 / Mathematical Modeling of Control Systems least n variables x1, x2, p , xn are needed to completely describe the behavior of a dy- namic system (so that once the input is given for t ! t0 and the initial state at t=t0 is specified, the future state of the system is completely determined), then such n variables are a set of state variables. Note that state variables need not be physically measurable or observable quantities. Variables that do not represent physical quantities and those that are neither measura- ble nor observable can be chosen as state variables. Such freedom in choosing state vari- ables is an advantage of the state-space methods. Practically, however, it is convenient to choose easily measurable quantities for the state variables, if this is possible at all, be- cause optimal control laws will require the feedback of all state variables with suitable weighting. State Vector. If n state variables are needed to completely describe the behavior of a given system, then these n state variables can be considered the n components of a vector x. Such a vector is called a state vector. A state vector is thus a vector that deter- mines uniquely the system state x(t) for any time t ! t0 , once the state at t=t0 is given and the input u(t) for t ! t0 is specified. State Space. The n-dimensional space whose coordinate axes consist of the x1 axis, x2 axis, p , xn axis, where x1, x2, p , xn are state variables, is called a state space.Any state can be represented by a point in the state space. State-Space Equations. In state-space analysis we are concerned with three types of variables that are involved in the modeling of dynamic systems: input variables, out- put variables, and state variables. As we shall see in Section 2–5, the state-space repre- sentation for a given system is not unique, except that the number of state variables is the same for any of the different state-space representations of the same system. The dynamic system must involve elements that memorize the values of the input for t ! t1 . Since integrators in a continuous-time control system serve as memory devices, the outputs of such integrators can be considered as the variables that define the inter- nal state of the dynamic system.Thus the outputs of integrators serve as state variables. The number of state variables to completely define the dynamics of the system is equal to the number of integrators involved in the system. Assume that a multiple-input, multiple-output system involves n integrators.Assume also that there are r inputs u1(t), u2(t), p , ur(t) and m outputs y1(t), y2(t), p , ym(t). Define n outputs of the integrators as state variables: x1(t), x2(t), p , xn(t) Then the system may be described by (2–8) x# n(t) = fnAx1 , x2 , p , xn ; u1 , u2 , p , ur ; tB # # # x# 2(t) = f2Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB x# 1(t) = f1Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB Section 2–4 / Modeling in State Space 31 The outputs y1(t), y2(t), p , ym(t) of the system may be given by (2–9) If we define ym(t) = gmAx1 , x2 , p , xn ; u1 , u2 , p , ur ; tB # # # y2(t) = g2Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB y1(t) = g1Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB u(t) = Fu1(t)u2(t)# # # ur(t) Vg(x, u, t) = F g1Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tBg2Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB# # # gmAx1 , x2 , p , xn ; u1 , u2 , p , ur ; tB V , y(t) = F y1(t)y2(t)# # # ym(t) V , f(x, u, t) = F f1Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tBf2Ax1 , x2 , p , xn ; u1 , u2 , p , ur ; tB# # # fnAx1 , x2 , p , xn ; u1 , u2 , p , ur ; tB V , x(t) = F x1(t)x2(t)# # # xn(t) V , then Equations (2–8) and (2–9) become (2–10) (2–11) where Equation (2–10) is the state equation and Equation (2–11) is the output equation. If vector functions f and/or g involve time t explicitly, then the system is called a time- varying system. If Equations (2–10) and (2–11) are linearized about the operating state, then we have the following linearized state equation and output equation: (2–12) (2–13) where A(t) is called the state matrix, B(t) the input matrix, C(t) the output matrix, and D(t) the direct transmission matrix. (Details of linearization of nonlinear systems about y(t) = C(t)x(t) + D(t)u(t) x# (t) = A(t)x(t) + B(t)u(t) y(t) = g(x, u, t) x# (t) = f(x, u, t) 34 Chapter 2 / Mathematical Modeling of Control Systems where x is the state vector, u is the input, and y is the output.The Laplace transforms of Equations (2–23) and (2–24) are given by (2–25) (2–26) Since the transfer function was previously defined as the ratio of the Laplace transform of the output to the Laplace transform of the input when the initial conditions were zero, we set x(0) in Equation (2–25) to be zero. Then we have or By premultiplying to both sides of this last equation, we obtain (2–27) By substituting Equation (2–27) into Equation (2–26), we get (2–28) Upon comparing Equation (2–28) with Equation (2–22), we see that (2–29) This is the transfer-function expression of the system in terms of A, B, C, and D. Note that the right-hand side of Equation (2–29) involves Hence G(s) can be written as where Q(s) is a polynomial in s. Notice that is equal to the characteristic poly- nomial of G(s). In other words, the eigenvalues of A are identical to the poles of G(s). EXAMPLE 2–3 Consider again the mechanical system shown in Figure 2–15. State-space equations for the system are given by Equations (2–20) and (2–21).We shall obtain the transfer function for the system from the state-space equations. By substituting A, B, C, and D into Equation (2–29), we obtain = [1 0]C sk m -1 s + b m S -1C 01 m S = [1 0] c B s 0 0 s R - C 0 - k m 1 - b m S s -1C 01 m S + 0 G(s) = C(s I - A)-1 B + D ∑s I - A∑ G(s) = Q(s) ∑s I - A∑ (s I - A)-1. G(s) = C(s I - A)-1 B + D Y(s) = CC(s I - A)-1 B + D DU(s) X(s) = (s I - A)-1 BU(s) (s I - A)-1 (s I - A)X(s) = BU(s) s X(s) - AX(s) = BU(s) Y(s) = CX(s) + DU(s) sX(s) - x(0) = AX(s) + BU(s) Section 2–5 / State-Space Representation of Scalar Differential Equation Systems 35 Note that (Refer to Appendix C for the inverse of the 2 $ 2 matrix.) Thus, we have which is the transfer function of the system. The same transfer function can be obtained from Equation (2–16). Transfer Matrix. Next, consider a multiple-input, multiple-output system.Assume that there are r inputs and m outputs Define The transfer matrix G(s) relates the output Y(s) to the input U(s), or where G(s) is given by [The derivation for this equation is the same as that for Equation (2–29).] Since the input vector u is r dimensional and the output vector y is m dimensional, the transfer ma- trix G(s) is an m*r matrix. 2–5 STATE-SPACE REPRESENTATION OF SCALAR DIFFERENTIAL EQUATION SYSTEMS A dynamic system consisting of a finite number of lumped elements may be described by ordinary differential equations in which time is the independent variable. By use of vector-matrix notation, an nth-order differential equation may be expressed by a first- order vector-matrix differential equation. If n elements of the vector are a set of state variables, then the vector-matrix differential equation is a state equation. In this section we shall present methods for obtaining state-space representations of continuous-time systems. G(s) = C(s I - A)-1 B + D Y(s) = G(s )U(s ) y = F y1y2# # # ym V , u = Fu1u2# # # ur Vy1 , y2 , p , ym .u1 , u2 , p , ur , = 1 ms2 + bs + k G(s) = [1 0] 1 s2 + b m s + k m D s + bm - k m 1 s T C 01 m S C sk m -1 s + b m S -1 = 1 s2 + b m s + k m D s + bm - k m 1 s T 36 Chapter 2 / Mathematical Modeling of Control Systems State-Space Representation of nth-Order Systems of Linear Differential Equa- tions in which the Forcing Function Does Not Involve Derivative Terms. Con- sider the following nth-order system: (2–30) Noting that the knowledge of together with the input u(t) for t ! 0, determines completely the future behavior of the system, we may take as a set of n state variables. (Mathematically, such a choice of state variables is quite convenient. Practically, however, because higher-order derivative terms are inaccurate, due to the noise effects inherent in any practical situations, such a choice of the state variables may not be desirable.) Let us define Then Equation (2–30) can be written as or (2–31) where B = G 00## # 0 1 WA = G 00## # 0 -an 1 0 # # # 0 -an - 1 0 1 # # # 0 -an - 2 p p p p 0 0 # # # 1 -a1 W ,x = F x1x2# # # xn V , x# = Ax + Bu x# n = -anx1 - p - a1xn + u x# n - 1 = xn # # # x # 2 = x3 x # 1 = x2 xn = y (n - 1) # # # x2 = y # x1 = y y(t), y# (t), p , y (n - 1) (t) y(0), y# (0), p , y (n - 1) (0), y (n) + a1y (n - 1) + p + an - 1 y # + an y = u Section 2–6 / Transformation of Mathematical Models with MATLAB 39 or (2–37) (2–38) where In this state-space representation, matrices A and C are exactly the same as those for the system of Equation (2–30).The derivatives on the right-hand side of Equation (2–33) affect only the elements of the B matrix. Note that the state-space representation for the transfer function is given also by Equations (2–37) and (2–38). There are many ways to obtain state-space representations of systems. Methods for obtaining canonical representations of systems in state space (such as controllable canon- ical form, observable canonical form, diagonal canonical form, and Jordan canonical form) are presented in Chapter 9. MATLAB can also be used to obtain state-space representations of systems from transfer-function representations, and vice versa.This subject is presented in Section 2–6. 2–6 TRANSFORMATION OF MATHEMATICAL MODELS WITH MATLAB MATLAB is quite useful to transform the system model from transfer function to state space, and vice versa. We shall begin our discussion with transformation from transfer function to state space. Y(s) U(s) = b0 sn + b1 sn - 1 + p + bn - 1 s + bn sn + a1 sn - 1 + p + an - 1 s + an B = G b1b2## # bn - 1 bn W , C = [1 0 p 0], D = b0 = b0 x = G x1x2## # xn - 1 xn W , A = G 00## # 0 -an 1 0 # # # 0 -an - 1 0 1 # # # 0 -an - 2 p p p p 0 0 # # # 1 -a1 W y = Cx + Du x# = Ax + Bu 40 Chapter 2 / Mathematical Modeling of Control Systems Let us write the closed-loop transfer function as Once we have this transfer-function expression, the MATLAB command [A,B,C,D] = tf2ss(num,den) will give a state-space representation. It is important to note that the state-space repre- sentation for any system is not unique. There are many (infinitely many) state-space representations for the same system. The MATLAB command gives one possible such state-space representation. Transformation from Transfer Function to State Space Representation. Consider the transfer-function system (2–39) There are many (infinitely many) possible state-space representations for this system. One possible state-space representation is Another possible state-space representation (among infinitely many alternatives) is (2–40) Cx# 1x# 2 x# 3 S = C-141 0 -56 0 1 -160 0 0 S Cx1x2 x3 S + C10 0 Su y = [1 0 0]Cx1x2 x3 S + [0]u Cx# 1x# 2 x# 3 S = C 00 -160 1 0 -56 0 1 -14 S Cx1x2 x3 S + C 01 -14 Su = s s3 + 14s2 + 56s + 160 Y(s) U(s) = s (s + 10)As2 + 4s + 16B Y(s) U(s) = numerator polynomial in s denominator polynomial in s = num den Section 2–6 / Transformation of Mathematical Models with MATLAB 41 (2–41) MATLAB transforms the transfer function given by Equation (2–39) into the state-space representation given by Equations (2–40) and (2–41). For the example system considered here, MATLAB Program 2–2 will produce matrices A, B, C, and D. y = [0 1 0]Cx1x2 x3 S + [0]u MATLAB Program 2–2 num = [1 0]; den = [1 14 56 160]; [A,B,C,D] = tf2ss(num,den) A = -14 -56 -160 1 0 0 0 1 0 B = 1 0 0 C = 0 1 0 D = 0 Transformation from State Space Representation to Transfer Function. To obtain the transfer function from state-space equations, use the following command: [num,den] = ss2tf(A,B,C,D,iu) iu must be specified for systems with more than one input. For example, if the system has three inputs (u1, u2, u3), then iu must be either 1, 2, or 3, where 1 implies u1, 2 implies u2, and 3 implies u3. If the system has only one input, then either [num,den] = ss2tf(A,B,C,D) 44 Chapter 2 / Mathematical Modeling of Control Systems where the derivatives are evaluated at If the variation is small, we may neglect the higher-order terms in Then Equation (2–43) may be written as (2–44) where Equation (2–44) may be rewritten as (2–45) which indicates that is proportional to Equation (2–45) gives a linear math- ematical model for the nonlinear system given by Equation (2–42) near the operating point Next, consider a nonlinear system whose output y is a function of two inputs x1 and x2, so that (2–46) To obtain a linear approximation to this nonlinear system, we may expand Equation (2–46) into a Taylor series about the normal operating point Then Equation (2–46) becomes where the partial derivatives are evaluated at Near the normal oper- ating point, the higher-order terms may be neglected.The linear mathematical model of this nonlinear system in the neighborhood of the normal operating condition is then given by y - y– = K1Ax1 - x–1B + K2Ax2 - x–2B x2 = x–2 .x1 = x–1 , + 02f 0x22 Ax2 - x–2B2 d + p + 1 2! c 02f 0x21 Ax1 - x–1B2 + 2 02f0x1 0x2 Ax1 - x–1B Ax2 - x–2B y = fAx–1 , x–2B + c 0f0x1 Ax1 - x–1B + 0f0x2 Ax2 - x–2B d x–1 , x–2 . y = fAx1 , x2B y = y–.x = x–, x - x–.y - y– y - y– = K(x - x–) K = df dx 2 x = x– y– = f(x–) y = y– + K(x - x–) x - x–. x - x–x = x–.d2f!dx2, pdf!dx, Section 2–7 / Linearization of Nonlinear Mathematical Models 45 where The linearization technique presented here is valid in the vicinity of the operating condition. If the operating conditions vary widely, however, such linearized equations are not adequate, and nonlinear equations must be dealt with. It is important to remember that a particular mathematical model used in analysis and design may accurately rep- resent the dynamics of an actual system for certain operating conditions, but may not be accurate for other operating conditions. EXAMPLE 2–5 Linearize the nonlinear equation z=xy in the region 5 % x % 7, 10 % y % 12. Find the error if the linearized equation is used to calcu- late the value of z when x=5, y=10. Since the region considered is given by 5 % x % 7, 10 % y % 12, choose Then Let us obtain a linearized equation for the nonlinear equation near a point Expanding the nonlinear equation into a Taylor series about point and neglecting the higher-order terms, we have where Hence the linearized equation is z-66=11(x-6)+6(y-11) or z=11x+6y-66 When x=5, y=10, the value of z given by the linearized equation is z=11x+6y-66=55+60-66=49 The exact value of z is z=xy=50. The error is thus 50-49=1. In terms of percentage, the error is 2%. b = 0(xy) 0y 2 x = x– , y = y– = x– = 6 a = 0(xy) 0x 2 x = x– , y = y– = y– = 11 z - z– = aAx - x– B + bAy - y– B y = y–x = x–, y– = 11. x– = 6,z– = x–y– = 66. y– = 11.x– = 6, K2 = 0f 0x2 2 x1 = x– 1 , x2 = x– 2 K1 = 0f 0x1 2 x1 = x– 1 , x2 = x– 2 y– = fAx–1 , x–2B 46 Chapter 2 / Mathematical Modeling of Control Systems EXAMPLE PROBLEMS AND SOLUTIONS A–2–1. Simplify the block diagram shown in Figure 2–17. Solution. First, move the branch point of the path involving H1 outside the loop involving H2 , as shown in Figure 2–18(a). Then eliminating two loops results in Figure 2–18(b). Combining two blocks into one gives Figure 2–18(c). A–2–2. Simplify the block diagram shown in Figure 2–19. Obtain the transfer function relating C(s) and R(s). R(s) C(s) G H1 H2 + – + + Figure 2–17 Block diagram of a system. R(s) C(s) R(s) C(s) C(s) G H2 (a) (b) (c) H1 G G 1 + GH2 R(s) 1 + H1 G G + H1 1 + GH2 + – + + Figure 2–18 Simplified block diagrams for the system shown in Figure 2–17. G1 G2 R(s) C(s)X(s) + + + + Figure 2–19 Block diagram of a system. Example Problems and Solutions 49 By substituting Equation (2–47) into Equation (2–48), we get (2–50) By substituting Equation (2–49) into Equation (2–50), we obtain Solving this last equation for C(s), we get Hence (2–51) Note that Equation (2–51) gives the response C(s) when both reference input R(s) and distur- bance input D(s) are present. To find transfer function C(s)/R(s), we let D(s)=0 in Equation (2–51). Then we obtain Similarly, to obtain transfer function C(s)/D(s), we let R(s)=0 in Equation (2–51). Then C(s)/D(s) can be given by A–2–5. Figure 2–24 shows a system with two inputs and two outputs. Derive C1(s)/R1(s), C1(s)/R2(s), C2(s)/R1(s), and C2(s)/R2(s). (In deriving outputs for R1(s), assume that R2(s) is zero, and vice versa.) C(s) D(s) = Gp 1 + G1 Gp Gc H C(s) R(s) = G1 GpAGf + GcB 1 + G1 Gp Gc H C(s) = Gp D(s) + G1 GpAGf + GcBR(s) 1 + G1 Gp Gc H C(s) + G1 Gp Gc HC(s) = Gp D(s) + G1 GpAGf + GcBR(s) C(s) = Gp D(s) + G1 GpEGf R(s) + Gc CR(s) - HC(s) D F C(s) = Gp D(s) + G1 Gp CGf R(s) + Gc E(s) D G1 C1 C2 R1 R2 G3 G4 + − + − G2 Figure 2–24 System with two inputs and two outputs. 50 Chapter 2 / Mathematical Modeling of Control Systems Solution. From the figure, we obtain (2–52) (2–53) By substituting Equation (2–53) into Equation (2–52), we obtain (2–54) By substituting Equation (2–52) into Equation (2–53), we get (2–55) Solving Equation (2–54) for C1, we obtain (2–56) Solving Equation (2–55) for C2 gives (2–57) Equations (2–56) and (2–57) can be combined in the form of the transfer matrix as follows: Then the transfer functions C1(s)/R1(s), C1(s)/R2(s), C2(s)/R1(s) and C2(s)/R2(s) can be obtained as follows: Note that Equations (2–56) and (2–57) give responses C1 and C2, respectively, when both inputs R1 and R2 are present. Notice that when R2(s)=0, the original block diagram can be simplified to those shown in Figures 2–25(a) and (b). Similarly, when R1(s)=0, the original block diagram can be simplified to those shown in Figures 2–25(c) and (d). From these simplified block diagrams we can also ob- tain C1(s)/R1(s), C2(s)/R1(s), C1(s)/R2(s), and C2(s)/R2(s), as shown to the right of each corre- sponding block diagram. C2(s) R1(s) = - G1 G2 G4 1 - G1 G2 G3 G4 , C2(s) R2(s) = G4 1 - G1 G2 G3 G4 C1(s) R1(s) = G1 1 - G1 G2 G3 G4 , C1(s) R2(s) = - G1 G3 G4 1 - G1 G2 G3 G4 BC1 C2 R = D G11 - G1 G2 G3 G4 - G1 G2 G4 1 - G1 G2 G3 G4 - G1 G3 G4 1 - G1 G2 G3 G4 G4 1 - G1 G2 G3 G4 T BR1 R2 R C2 = -G1 G2 G4 R1 + G4 R2 1 - G1 G2 G3 G4 C1 = G1 R1 - G1 G3 G4 R2 1 - G1 G2 G3 G4 C2 = G4 CR2 - G2 G1AR1 - G3 C2B D C1 = G1 CR1 - G3 G4AR2 - G2 C1B D C2 = G4AR2 - G2 C1B C1 = G1AR1 - G3 C2B Example Problems and Solutions 51 +– R1 C1 R1 C1 1 – G1 G2 G3 G4 G1 G1 G3 G4 –G2 +– R1 C2 G3 G1 –G2 G4 = +– R2 C2 R2 C2 1 – G1 G2G3 G4 G4 G4 G2 G1 –G3 = R1 C2 1 – G1 G2 G3 G4 – G1 G2 G4= +– R2 C1 G2 G4 –G3 G1 R2 C1 1 – G1 G2 G3 G4 – G1 G3 G4= (a) (b) (c) (d) Figure 2–25 Simplified block diagrams and corresponding closed-loop transfer functions. A–2–6. Show that for the differential equation system (2–58) state and output equations can be given, respectively, by (2–59) and (2–60) where state variables are defined by x3 = y $ - b0 u $ - b1 u # - b2 u = x # 2 - b2 u x2 = y # - b0 u # - b1 u = x # 1 - b1 u x1 = y - b0 u y = [1 0 0]Cx1x2 x3 S + b0 u Cx# 1x# 2 x# 3 S = C 00 -a3 1 0 -a2 0 1 -a1 S Cx1x2 x3 S + Cb1b2 b3 Su y% + a1 y $ + a2 y # + a3 y = b0 u % + b1 u $ + b2 u # + b3 u 54 Chapter 2 / Mathematical Modeling of Control Systems A–2–8. Obtain a state-space model of the system shown in Figure 2–26. Solution. The system involves one integrator and two delayed integrators. The output of each integrator or delayed integrator can be a state variable. Let us define the output of the plant as x1, the output of the controller as x2, and the output of the sensor as x3. Then we obtain Y(s) = X1(s) X3(s) X1(s) = 1 s + 1 X2(s) U(s) - X3(s) = 1 s X1(s) X2(s) = 10 s + 5 U(s) Y(s)1 s Controller Plant Sensor 10 s + 5 1 s + 1 + – Figure 2–26 Control system. MATLAB Program 2–4 num = [2 1 1 2]; den = [1 4 5 2]; [A,B,C,D] = tf2ss(num,den) A = -4 -5 -2 1 0 0 0 1 0 B = 1 0 0 C = -7 -9 -2 D = 2 Example Problems and Solutions 55 which can be rewritten as By taking the inverse Laplace transforms of the preceding four equations, we obtain Thus, a state-space model of the system in the standard form is given by It is important to note that this is not the only state-space representation of the system. Infinite- ly many other state-space representations are possible. However, the number of state variables is the same in any state-space representation of the same system. In the present system, the num- ber of state variables is three, regardless of what variables are chosen as state variables. A–2–9. Obtain a state-space model for the system shown in Figure 2–27(a). Solution. First, notice that (as+b)/s2 involves a derivative term. Such a derivative term may be avoided if we modify (as+b)/s2 as Using this modification, the block diagram of Figure 2–27(a) can be modified to that shown in Figure 2–27(b). Define the outputs of the integrators as state variables, as shown in Figure 2–27(b).Then from Figure 2–27(b) we obtain which may be modified to Y(s) = X1(s) sX2(s) = -bX1(s) + bU(s) sX1(s) = X2(s) + a CU(s) - X1(s) D Y(s) = X1(s) X2(s) U(s) - X1(s) = b s X1(s) X2(s) + a CU(s) - X1(s) D = 1s as + b s2 = aa + b s b 1 s Cx1x2 x3 S y = [1 0 0] C x# 1 x# 2 x# 3 S = C-50 1 10 0 0 0 -1 -1 S Cx1x2 x3 S + C01 0 Su y = x1 x# 3 = x1 - x3 x# 2 = -x3 + u x# 1 = -5x1 + 10x2 Y(s) = X1(s) sX3(s) = X1(s) - X3(s) sX2(s) = -X3(s) + U(s) sX1(s) = -5X1(s) + 10X2(s) 56 Chapter 2 / Mathematical Modeling of Control Systems Taking the inverse Laplace transforms of the preceding three equations, we obtain Rewriting the state and output equations in the standard vector-matrix form, we obtain A–2–10. Obtain a state-space representation of the system shown in Figure 2–28(a). Solution. In this problem, first expand (s+z)/(s+p) into partial fractions. Next, convert K/ Cs(s+a) D into the product of K/s and 1/(s+a). Then redraw the block diagram, as shown in Figure 2–28(b). Defining a set of state variables, as shown in Figure 2–28(b), we ob- tain the following equations: y = x1 x# 3 = -(z - p)x1 - px3 + (z - p)u x# 2 = -Kx1 + Kx3 + Ku x# 1 = -ax1 + x2 s + z s + p = 1 + z - p s + p y = [1 0]Bx1 x2 R Bx# 1x# 2R = B-a-b 10R Bx1x2R + B abRu y = x1 x# 2 = -bx1 + bu x# 1 = -ax1 + x2 + au U(s) Y(s) as + b 1 s2 (a) (b) a U(s) Y(s) b s 1 s X1(s)X2(s) + – + – + + Figure 2–27 (a) Control system; (b) modified block diagram. Example Problems and Solutions 59 A–2–13. Linearize the nonlinear equation in the region defined by 8 % x % 10, 2 % y % 4. Solution. Define Then where we choose Since the higher-order terms in the expanded equation are small, neglecting these higher- order terms, we obtain where z– = x–2 + 4x–y– + 6y–2 = 92 + 4 * 9 * 3 + 6 * 9 = 243 K2 = 0f 0y 2 x = x– , y = y– = 4x– + 12y– = 4 * 9 + 12 * 3 = 72 K1 = 0f 0x 2 x = x– , y = y– = 2x– + 4y– = 2 * 9 + 4 * 3 = 30 z - z– = K1(x - x–) + K2(y - y–) x– = 9, y– = 3. z = f(x, y) = f(x–, y–) + c 0f0x (x - x–) + 0f0y (y - y–) d x = x– , y = y– + p f(x, y) = z = x2 + 4xy + 6y2 z = x2 + 4xy + 6y2 MATLAB Program 2–5 A = [0 1;-25 -4]; B = [1 1;0 1]; C = [1 0;0 1]; D = [0 0;0 0]; [NUM,den] = ss2tf(A,B,C,D,1) NUM = 0 1 4 0 0 –25 den = 1 4 25 [NUM,den] = ss2tf(A,B,C,D,2) NUM = 0 1.0000 5.0000 0 1.0000 -25.0000 den = 1 4 25 60 Chapter 2 / Mathematical Modeling of Control Systems Thus Hence a linear approximation of the given nonlinear equation near the operating point is z - 30x - 72y + 243 = 0 z - 243 = 30(x - 9) + 72(y - 3) R(s) C(s) G1 G2 G3 H1 H2 H3 + – + – + – + + Figure 2–31 Block diagram of a system. B–2–1. Simplify the block diagram shown in Figure 2–29 and obtain the closed-loop transfer function C(s)/R(s). B–2–2. Simplify the block diagram shown in Figure 2–30 and obtain the closed-loop transfer function C(s)/R(s). B–2–3. Simplify the block diagram shown in Figure 2–31 and obtain the closed-loop transfer function C(s)/R(s). PROBLEMS R(s) C(s) G1 G2 G3 G4 + – + – + + Figure 2–29 Block diagram of a system. R(s) C(s) G1 G2 H1 H2 + – + + + – Figure 2–30 Block diagram of a system. Problems 61 C(s) D(s) R(s) Gc(s) Gp(s)+– + + Controller PlantFigure 2–32 Closed-loop system. B–2–4. Consider industrial automatic controllers whose control actions are proportional, integral, proportional-plus- integral, proportional-plus-derivative, and proportional-plus- integral-plus-derivative. The transfer functions of these controllers can be given, respectively, by where U(s) is the Laplace transform of u(t), the controller output, and E(s) the Laplace transform of e(t), the actuat- U(s) E(s) = Kp a1 + 1Ti s + Td s b U(s) E(s) = KpA1 + Td sB U(s) E(s) = Kp a1 + 1Ti s b U(s) E(s) = Ki s U(s) E(s) = Kp ing error signal. Sketch u(t)-versus-t curves for each of the five types of controllers when the actuating error signal is (a) e(t)=unit-step function (b) e(t)=unit-ramp function In sketching curves, assume that the numerical values of Kp, Ki , and are given as proportional gain=4 integral gain=2 integral time=2 sec derivative time=0.8 sec B–2–5. Figure 2–32 shows a closed-loop system with a ref- erence input and disturbance input. Obtain the expression for the output C(s) when both the reference input and dis- turbance input are present. B–2–6. Consider the system shown in Figure 2–33. Derive the expression for the steady-state error when both the ref- erence input R(s) and disturbance input D(s) are present. B–2–7. Obtain the transfer functions C(s)/R(s) and C(s)/D(s) of the system shown in Figure 2–34. Td = Ti = Ki = Kp = TdTi , C(s)R(s) E(s) D(s) +– + + G2(s)G1(s) G2 H1 G 3 G1Gc R(s) C(s) D(s) +– +– + + H2 Figure 2–33 Control system. Figure 2–34 Control system. 64 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems EXAMPLE 3–1 Let us obtain the equivalent spring constants for the systems shown in Figures 3–1(a) and (b), respectively. For the springs in parallel [Figure 3–1(a)] the equivalent spring constant keq is obtained from or For the springs in series [Figure–3–1(b)], the force in each spring is the same. Thus Elimination of y from these two equations results in or The equivalent spring constant keq for this case is then found as EXAMPLE 3–2 Let us obtain the equivalent viscous-friction coefficient for each of the damper systems shown in Figures 3–2(a) and (b).An oil-filled damper is often called a dashpot.A dashpot is a device that provides viscous friction, or damping. It consists of a piston and oil-filled cylinder.Any relative mo- tion between the piston rod and the cylinder is resisted by the oil because the oil must flow around the piston (or through orifices provided in the piston) from one side of the piston to the other.The dashpot essentially absorbs energy.This absorbed energy is dissipated as heat, and the dashpot does not store any kinetic or potential energy. beq keq = F x = k1 k2 k1 + k2 = 1 1 k1 + 1 k2 k2 x = F + k2 k1 F = k1 + k2 k1 F k2 ax - Fk1 b = F k1 y = F, k2(x - y) = F keq = k1 + k2 k1 x + k2 x = F = keq x k1 k2 y x F (a) (b) x F k1 k2 Figure 3–1 (a) System consisting of two springs in parallel; (b) system consisting of two springs in series. Section 3–2 / Mathematical Modeling of Mechanical Systems 65 (a) The force f due to the dampers is In terms of the equivalent viscous-friction coefficient beq, force f is given by Hence (b) The force f due to the dampers is (3–1) where z is the displacement of a point between damper b1 and damper b2. (Note that the same force is transmitted through the shaft.) From Equation (3–1), we have or (3–2) In terms of the equivalent viscous-friction coefficient beq , force f is given by By substituting Equation (3–2) into Equation (3–1), we have Thus, Hence, beq = b1 b2 b1 + b2 = 1 1 b1 + 1 b2 f = beq(y # - x# ) = b1 b2 b1 + b2 (y# - x# ) = b1 b2 b1 + b2 (y# - x# ) f = b2(y # - z# ) = b2 cy# - 1b1 + b2 Ab2y# + b1x# B d f = beqAy# - x# B z# = 1 b1 + b2 Ab2 y# + b1 x# B Ab1 + b2Bz# = b2 y# + b1 x# f = b1(z # - x# ) = b2 (y # - z# ) beq = b1 + b2 f = beq(y # - x# ) f = b1 (y # - x# ) + b2(y # - x# ) = Ab1 + b2B(y# - x# ) x y (a) b2 x yz (b) b1 b1 b2 Figure 3–2 (a) Two dampers connected in parallel; (b) two dampers connected in series. 66 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems EXAMPLE 3–3 Consider the spring-mass-dashpot system mounted on a massless cart as shown in Figure 3–3. Let us obtain mathematical models of this system by assuming that the cart is standing still for t<0 and the spring-mass-dashpot system on the cart is also standing still for t<0. In this system, u(t) is the displacement of the cart and is the input to the system.At t=0, the cart is moved at a constant speed, or constant. The displacement y(t) of the mass is the output. (The displacement is relative to the ground.) In this system, m denotes the mass, b denotes the viscous-friction coefficient, and k de- notes the spring constant.We assume that the friction force of the dashpot is proportional to and that the spring is a linear spring; that is, the spring force is proportional to y-u. For translational systems, Newton’s second law states that where m is a mass, a is the acceleration of the mass, and is the sum of the forces acting on the mass in the direction of the acceleration a. Applying Newton’s second law to the present system and noting that the cart is massless, we obtain or This equation represents a mathematical model of the system considered. Taking the Laplace transform of this last equation, assuming zero initial condition, gives Taking the ratio of Y(s) to U(s), we find the transfer function of the system to be Such a transfer-function representation of a mathematical model is used very frequently in control engineering. Transfer function = G(s) = Y(s) U(s) = bs + k ms2 + bs + k Ams2 + bs + kBY(s) = (bs + k)U(s) m d2y dt2 + b dy dt + ky = b du dt + ku m d2y dt2 = -b a dy dt - du dt b - k(y - u) gF ma = a F y# - u# u# = m u y k b Massless cart Figure 3–3 Spring-mass- dashpot system mounted on a cart. only a two-dimensional problem in which the pendulum moves only in the plane of the page.The control force u is applied to the cart. Assume that the center of gravity of the pendulum rod is at its geometric center. Obtain a mathematical model for the system. Define the angle of the rod from the vertical line as u. Define also the (x, y) coordinates of the center of gravity of the pendulum rod as AxG, yG B . Then yG = l cos u xG = x + l sin u Section 3–2 / Mathematical Modeling of Mechanical Systems 69 M P y x u O x (a) mg ! ! ! cos u u (b) u V V HH M y x u O x mg ! ! Figure 3–5 (a) Inverted pendulum system; (b) free-body diagram. 70 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems To derive the equations of motion for the system, consider the free-body diagram shown in Figure 3–5(b). The rotational motion of the pendulum rod about its center of gravity can be described by (3–9) where I is the moment of inertia of the rod about its center of gravity. The horizontal motion of center of gravity of pendulum rod is given by (3–10) The vertical motion of center of gravity of pendulum rod is (3–11) The horizontal motion of cart is described by (3–12) Since we must keep the inverted pendulum vertical, we can assume that u(t) and are small quantities such that sin u ! u, cos u=1, and Then, Equations (3–9) through (3–11) can be linearized. The linearized equations are (3–13) (3–14) (3–15) From Equations (3–12) and (3–14), we obtain (3–16) From Equations (3–13), (3–14), and (3–15), we have or (3–17) Equations (3–16) and (3–17) describe the motion of the inverted-pendulum-on-the-cart system. They constitute a mathematical model of the system. EXAMPLE 3–6 Consider the inverted-pendulum system shown in Figure 3–6. Since in this system the mass is con- centrated at the top of the rod, the center of gravity is the center of the pendulum ball. For this case, the moment of inertia of the pendulum about its center of gravity is small, and we assume I=0 in Equation (3–17). Then the mathematical model for this system becomes as follows: (3–18) (3–19) Equations (3–18) and (3–19) can be modified to (3–20) (3–21)Mx$ = u - mgu Mlu $ = (M + m)gu - u ml2u $ + mlx$ = mglu (M + m)x$ + mlu $ = u AI + ml2Bu$ + mlx$ = mglu = mglu - l(mx$ + mlu $ ) Iu $ = mglu - Hl (M + m)x$ + mlu $ = u 0 = V - mg m(x$ + lu $ ) = H Iu $ = Vlu - Hl uu # 2 = 0. u # (t) M d2x dt2 = u - H m d2 dt2 (l cos u) = V - mg m d2 dt2 (x + l sin u) = H Iu $ = Vl sin u - Hl cos u Section 3–2 / Mathematical Modeling of Mechanical Systems 71 Equation (3–20) was obtained by eliminating from Equations (3–18) and (3–19). Equation (3–21) was obtained by eliminating from Equations (3–18) and (3–19). From Equation (3–20) we obtain the plant transfer function to be The inverted-pendulum plant has one pole on the negative real axis and another on the positive real axis Hence, the plant is open-loop unstable. Define state variables x1, x2, x3, and x4 by Note that angle u indicates the rotation of the pendulum rod about point P, and x is the location of the cart. If we consider u and x as the outputs of the system, then (Notice that both u and x are easily measurable quantities.) Then, from the definition of the state variables and Equations (3–20) and (3–21), we obtain x# 4 = - m M gx1 + 1 M u x# 3 = x4 x# 2 = M + m Ml gx1 - 1 Ml u x# 1 = x2 y = By1 y2 R = B u x R = Bx1 x3 R x4 = x # x3 = x x2 = u # x1 = u Cs = A1M + m!1MlB1g D . Cs = - A1M + m!1MlB1g D = 1 Ml a s + AM + mMl g b a s - AM + mMl g b Q (s) -U(s) = 1 Mls2 - (M + m)g u $ x $ 0 M P z u mg m ! sin u x x ! cos u ! u Figure 3–6 Inverted-pendulum system. 74 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems It will be shown that the second stage of the circuit (R2C2 portion) produces a loading effect on the first stage (R1C1 portion). The equations for this system are (3–27) and (3–28) (3–29) Taking the Laplace transforms of Equations (3–27) through (3–29), respectively, using zero initial conditions, we obtain (3–30) (3–31) (3–32) Eliminating I1(s) from Equations (3–30) and (3–31) and writing Ei(s) in terms of I2(s), we find the transfer function between Eo(s) and Ei(s) to be (3–33) The term R1C2s in the denominator of the transfer function represents the interaction of two simple RC circuits. Since the two roots of the denominator of Equation (3–33) are real. The present analysis shows that, if two RC circuits are connected in cascade so that the output from the first circuit is the input to the second, the overall transfer function is not the product of and The reason for this is that, when we derive the transfer function for an isolated circuit, we implicitly as- sume that the output is unloaded. In other words, the load impedance is assumed to be infinite, which means that no power is being withdrawn at the output.When the sec- ond circuit is connected to the output of the first, however, a certain amount of power is withdrawn, and thus the assumption of no loading is violated.Therefore, if the trans- fer function of this system is obtained under the assumption of no loading, then it is not valid. The degree of the loading effect determines the amount of modification of the transfer function. 1!AR2 C2 s + 1B.1!AR1 C1 s + 1B AR1 C1 + R2 C2 + R1 C2B2 7 4R1 C1 R2 C2 , = 1 R1 C1 R2 C2 s2 + AR1 C1 + R2 C2 + R1 C2Bs + 1 Eo(s) Ei(s) = 1AR1 C1 s + 1B AR2 C2 s + 1B + R1 C2 s 1 C2 s I2(s) = Eo(s) 1 C1 s CI2(s) - I1(s) D + R2 I2(s) + 1C2 s I2(s) = 0 1 C1 s CI1(s) - I2(s) D + R1 I1(s) = Ei(s) 1 C2 3 i2 dt = eo 1 C1 3 Ai2 - i1B dt + R2 i2 + 1C2 3 i2 dt = 0 1 C1 3 Ai1 - i2B dt + R1 i1 = ei Section 3–3 / Mathematical Modeling of Electrical Systems 75 Complex Impedances. In deriving transfer functions for electrical circuits, we frequently find it convenient to write the Laplace-transformed equations directly, without writing the differential equations. Consider the system shown in Figure 3–9(a). In this system, Z1 and Z2 represent complex impedances. The complex impedance Z(s) of a two-terminal circuit is the ratio of E(s), the Laplace transform of the voltage across the terminals, to I(s), the Laplace transform of the current through the element, under the assumption that the initial conditions are zero, so that Z(s)=E(s)/I(s). If the two-terminal element is a resistance R, capacitance C, or inductance L, then the complex impedance is given by R, 1/Cs, or Ls, respectively. If complex impedances are connected in series, the total impedance is the sum of the individual complex impedances. Remember that the impedance approach is valid only if the initial conditions involved are all zeros. Since the transfer function requires zero initial conditions, the impedance approach can be applied to obtain the transfer function of the electrical circuit. This approach greatly simplifies the derivation of transfer functions of elec- trical circuits. Consider the circuit shown in Figure 3–9(b).Assume that the voltages ei and eo are the input and output of the circuit, respectively. Then the transfer function of this circuit is For the system shown in Figure 3–7, Hence the transfer function Eo(s)/Ei(s) can be found as follows: which is, of course, identical to Equation (3–26). Eo(s) Ei(s) = 1 Cs Ls + R + 1 Cs = 1 LCs2 + RCs + 1 Z1 = Ls + R, Z2 = 1Cs Eo(s) Ei(s) = Z2(s) Z1(s) + Z2(s) i i i e2 e e1 eoei Z1 Z1 Z2 Z2 (a) (b) Figure 3–9 Electrical circuits. 76 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems EXAMPLE 3–7 Consider again the system shown in Figure 3–8. Obtain the transfer function Eo(s)/Ei(s) by use of the complex impedance approach. (Capacitors C1 and C2 are not charged initially.) The circuit shown in Figure 3–8 can be redrawn as that shown in Figure 3–10(a), which can be further modified to Figure 3–10(b). In the system shown in Figure 3–10(b) the current I is divided into two currents I1 and I2. Noting that we obtain Noting that we obtain Substituting Z1=R1, Z2=1/ AC1s B , Z3=R2, and Z4=1/ AC2s B into this last equation, we get which is the same as that given by Equation (3–33). = 1 R1 C1 R2 C2 s2 + AR1 C1 + R2 C2 + R1 C2Bs + 1 Eo(s) Ei(s) = 1 C1 s 1 C2 s R1 a 1C1 s + R2 + 1C2 s b + 1C1 s aR2 + 1C2 s b Eo(s) Ei(s) = Z2 Z4 Z1AZ2 + Z3 + Z4B + Z2AZ3 + Z4B Eo(s) = Z4 I2 = Z2 Z4 Z2 + Z3 + Z4 I Ei(s) = Z1 I + Z2 I1 = cZ1 + Z2AZ3 + Z4BZ2 + Z3 + Z4 dI I1 = Z3 + Z4 Z2 + Z3 + Z4 I, I2 = Z2Z2 + Z3 + Z4 I Z2 I1 = AZ3 + Z4BI2 , I1 + I2 = I Z1 Z3 Z2 Z4 Z1 I2 I1 Z2 Z3 Z4 I Ei(s) Eo(s) Eo(s)Ei(s) (a) (b) Figure 3–10 (a) The circuit of Figure 3–8 shown in terms of impedances; (b) equivalent circuit diagram. Section 3–3 / Mathematical Modeling of Electrical Systems 79 The equation for this circuit can be obtained as follows: Define Since only a negligible current flows into the amplifier, the current i1 must be equal to current i2 . Thus Since and e¿ must be almost zero, or Hence we have or Thus the circuit shown is an inverting amplifier. If R1=R2 , then the op-amp circuit shown acts as a sign inverter. Noninverting Amplifier. Figure 3–15(a) shows a noninverting amplifier.A circuit equivalent to this one is shown in Figure 3–15(b). For the circuit of Figure 3–15(b), we have where K is the differential gain of the amplifier. From this last equation, we get Since if then This equation gives the output voltage eo. Since eo and ei have the same signs, the op-amp circuit shown in Figure 3–15(a) is noninverting. eo = a1 + R2R1 b ei R1!AR1 + R2B ! 1!K,K ! 1, ei = a R1R1 + R2 + 1K b eo eo = K a ei - R1R1 + R2 eo b eo = - R2 R1 ei ei R1 = -eo R2 e¿ ! 0.K ! 1,K(0 - e¿) = e0 ei - e¿ R1 = e¿ - eo R2 i1 = ei - e¿ R1 , i2 = e¿ - eoR2 eoei R2 R1 + – eo ei R2 R1 – + (b)(a) Figure 3–15 (a) Noninverting operational amplifier; (b) equivalent circuit. 80 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems EXAMPLE 3–8 Figure 3–16 shows an electrical circuit involving an operational amplifier. Obtain the output eo. Let us define Noting that the current flowing into the amplifier is negligible, we have Hence Since we have Taking the Laplace transform of this last equation, assuming the zero initial condition, we have which can be written as The op-amp circuit shown in Figure 3–16 is a first-order lag circuit. (Several other circuits involving op amps are shown in Table 3–1 together with their transfer functions. Table 3–1 is given on page 85.) Eo(s) Ei(s) = - R2 R1 1 R2 Cs + 1 Ei(s) R1 = - R2 Cs + 1 R2 Eo(s) ei R1 = -C deo dt - eo R2 e¿ ! 0, ei - e¿ R1 = C dAe¿ - eoB dt + e¿ - eo R2 i1 = i2 + i3 i1 = ei - e¿ R1 , i2 = C dAe¿ - eoBdt , i3 = e¿ - eoR2 ei eo R2 R1 C i1 i3 i2 + – e9 Figure 3–16 First-order lag circuit using operational amplifier. Section 3–3 / Mathematical Modeling of Electrical Systems 81 Impedance Approach to Obtaining Transfer Functions. Consider the op-amp circuit shown in Figure 3–17. Similar to the case of electrical circuits we discussed ear- lier, the impedance approach can be applied to op-amp circuits to obtain their transfer functions. For the circuit shown in Figure 3–17, we have Since we have (3–34) Eo(s) Ei(s) = - Z2(s) Z1(s) E¿(s) ! 0, Ei(s) - E¿(s) Z1 = E¿(s) - Eo(s) Z2 + – Eo(s) I (s) I (s) Ei(s) E9(s) Z1(s) Z2(s) Figure 3–17 Operational- amplifier circuit. EXAMPLE 3–9 Referring to the op-amp circuit shown in Figure 3–16, obtain the transfer function Eo(s)/Ei(s) by use of the impedance approach. The complex impedances Z1(s) and Z2(s) for this circuit are and The transfer function Eo(s)/Ei(s) is, therefore, obtained as which is, of course, the same as that obtained in Example 3-8. Eo(s) Ei(s) = - Z2(s) Z1(s) = - R2 R1 1 R2 Cs + 1 Z2(s) = 1 Cs + 1 R2 = R2 R2 Cs + 1 Z1(s) = R1 84 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems we have (3–37) Notice that the second operational-amplifier circuit acts as a sign inverter as well as a gain adjuster. When a PID controller is expressed as Kp is called the proportional gain, is called the integral time, and is called the derivative time. From Equation (3–37) we obtain the proportional gain Kp, integral time and derivative time to be When a PID controller is expressed as Kp is called the proportional gain, Ki is called the integral gain, and Kd is called the derivative gain. For this controller Table 3–1 shows a list of operational-amplifier circuits that may be used as con- trollers or compensators. Kd = R4 R2 C1 R3 Ki = R4 R3 R1 C2 Kp = R4AR1 C1 + R2 C2B R3 R1 C2 Eo(s) Ei(s) = Kp + Ki s + Kd s Td = R1 C1 R2 C2 R1 C1 + R2 C2 Ti = 1 R1 C1 + R2 C2 Kp = R4AR1 C1 + R2 C2B R3 R1 C2 TdTi , TdTi Eo(s) Ei(s) = Kp a1 + Tis + Td s b = R4AR1 C1 + R2 C2B R3 R1 C2 c1 + 1AR1 C1 + R2 C2Bs + R1 C1 R2 C2R1 C1 + R2 C2 s d = R4 R2 R3 R1 aR1 C1 + R2 C2 R2 C2 + 1 R2 C2 s + R1 C1 s b Eo(s) Ei(s) = Eo(s) E(s) E(s) Ei(s) = R4 R2 R3 R1 AR1 C1s + 1B AR2 C2s + 1B R2 C2s Section 3–3 / Mathematical Modeling of Electrical Systems 85 1 2 3 4 5 6 7 P I PD PI PID Lead or lag Lag–lead Control Action Operational-Amplifier CircuitsG(s) = Eo(s) Ei(s) R4 R3 R2 R1 1 R1C2s R4 R3 R4 R3 R2 R1 (R1C1s + 1) R4 R3 R2 R1 R2C2s + 1 R2C2s R4 R3 R2 R1 (R1C1s + 1) (R2C2s + 1) R2C2s R4 R3 R2 R1 R1C1s + 1 R2C2s + 1 R6 R5 R4 R3 [(R1 + R3) C1s + 1] (R2C2s + 1) (R1C1s + 1) [(R2 + R4) C2s + 1] eo eo ei ei + – + – + – + – R1 R2 R2 R3 R4 R1 R3 R4C2 eo ei + – + – R3 R4C1 R2 R1 R1 eo ei + – + – R3 R4C2 R2 R1 eo ei + – + – R3 R4C2C1 R2 R1 eo ei + – + – R3 R4 C2 C1 R4 R2 R1 R3 eo ei + – + – R5 R6 C2 C1 Table 3–1 Operational-Amplifier Circuits That May Be Used as Compensators 86 Chapter 3 / Mathematical Modeling of Mechanical Systems and Electrical Systems EXAMPLE PROBLEMS AND SOLUTIONS A–3–1. Figure 3–20(a) shows a schematic diagram of an automobile suspension system.As the car moves along the road, the vertical displacements at the tires act as the motion excitation to the auto- mobile suspension system.The motion of this system consists of a translational motion of the cen- ter of mass and a rotational motion about the center of mass. Mathematical modeling of the complete system is quite complicated. A very simplified version of the suspension system is shown in Figure 3–20(b).Assuming that the motion xi at point P is the input to the system and the vertical motion xo of the body is the output, obtain the transfer function (Consider the motion of the body only in the ver- tical direction.) Displacement xo is measured from the equilibrium position in the absence of input xi. Solution. The equation of motion for the system shown in Figure 3–20(b) is or Taking the Laplace transform of this last equation, assuming zero initial conditions, we obtain Hence the transfer function Xo(s)/Xi(s) is given by Xo(s) Xi(s) = bs + k ms2 + bs + k Ams2 + bs + kBXo(s) = (bs + k)Xi(s) mx$o + bx # o + kxo = bxi # + kxi mx$o + bAx# o - x# iB + kAxo - xiB = 0 Xo(s)!Xi(s). (a) k (b) xi Center of mass Auto body b P xo m Figure 3–20 (a) Automobile suspension system; (b) simplified suspension system.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved