Baixe o app para aproveitar ainda mais
Prévia do material em texto
INCIp PRACTICE OF A PR PROCESSCONT --- CARL& A. SMIT / ARMAND~ B. Co SELECTED TABLES AND FIGURES TYPICAL RESPONSES Common input s ignals 1 3 Stable and unstable responses 3 4 First-order step response 42 First-order ramp response 44 First-order sinusoidal response 4 5 Lead-lag step response 41 Lead-lag ramp response 48 Second-order step response 55,56 TRANSFORMS Laplace transforms 15 z-transforms and modified z-transforms 607 TUNING FORMULAS On-line quarter decay ratio 306 Open-loop quarter decay ratio 320 Minimum error integral for disturbance 324 Minimum error integral for set point 325 Controller synthesis (IMC) rules 345 Computer PID control algorithms 666 Dead t ime compensation algorithms 675 INSTRUMENTATION ISA standard instrumentation symbols and labels Control valve inherent characteristics Control valve installed characteristics Flow sensors and their characteristics Temperature sensors and their characteristics Classification of filled-system thermometers Thermocouple voltage versus temperature Valve capacity (Cv) coefficients 699-706 211 217 724-725 736-737 739 740 754-755 BLOCK DIAGRAMS Rules 98 Feedback loop 254 Unity feedback loop 257 Temperature control loop 261 Flow control loop 268 Pressure control loop 281 Level control loop 333 Multivariable (2 X 2) control loop 565 Decoupled multivariable (2 X 2) system 566 Sampled data control loop 630 Smith predictor 679 Internal Model Control (IMC) 680 Dynamic Matrix Control (DMC) 689 Principles and Practice of Automatic Process Control Second Edition Carlos A. Smith, Ph.D., P.E. University of South Florida Armando B. Corripio, Ph.D., P.E. Louisiana State University John Wiley & Sons, Inc. New York l Chichester l Weinheim l Brisbane l Singapore l Toronto This work is dedicated with all our love to The Lord our God, for all his daily blessings made this book possible The Smiths: Cristina, Carlos A. Jr., Tim, Cristina M., and Sophia C. Livingston, and Mrs. Rene M. Smith, my four grandsons: Nicholas, Robert, Garrett and David and to our dearest homeland, Cuba Preface This edition is a major revision and expansion to the first edition. Several new subjects have been added, notably the z-transform analysis and discrete controllers, and several other subjects have been reorganized and expanded. The objective of the book, however, remains the same as in the first edition, “to present the practice of automatic process control along with the fundamental principles of control theory.” A significant number of applications resulting from our practice as part-time consultants have also been added to this edition. Twelve years have passed since the first edition was published, and even though the principles are still very much the same, the “tools” to implement the controls strategies have certainly advanced. The use of computer-based instrumentation and control sys- tems is the norm. Chapters 1 and 2 present the definitions of terms and mathematical tools used in process control. In this edition Chapter 2 stresses the determination of the quantitative characteristics of the dynamic response, settling time, frequency of oscillation, and damping ratio, and de-emphasizes the exact determination of the analytical response. In this way the students can analyze the response of a dynamic system without having to carry out the time-consuming evaluation of the coefficients in the partial fraction expansion. Typical responses of first-, second-, and higher-order systems are now pre- sented in Chapter 2. The derivation of process dynamic models from basic principles is the subject of Chapters 3 and 4. As compared to the first edition, the discussion of process modelling has been expanded. The discussion, meaning, and significance of process nonlinearities has been expanded as well. Several numerical examples are presented to aid in the understanding of this important process characteristic. Chapter 4 concludes with a pre- sentation of integrating, inverse-response, and open-loop unstable processes. Chapter 5 presents the design and characteristics of the basic components of a control system: sensors and transmitters, control valves, and feedback controllers. The presen- tation of control valves and feedback controllers has been expanded. Chapter 5 should be studied together with Appendix C where practical operating principles of some common sensors, transmitters, and control valves are presented. The design and tuning of feedback controllers are the subjects of Chapters 6 and 7. Chapter 6 presents the analysis of the stability of feedback control loops. In this edition we stress the direct substitution method for determining both the ultimate gain and period of the loop. Routh’s test is deemphasized, but still presented in a separate section. In keeping with the spirit of Chapter 2, the examples and problems deal with the de- termination of the characteristics of the response of the closed loop, not with the exact analytical response of the loop. Chapter 7 keeps the same tried-and-true tuning methods from the first edition. A new section on tuning controllers for integrating processes, and a discussion of the Internal Model Control (IMC) tuning rules, have been added. Chapter 8 presents the root locus technique, and Chapter 9 presents the frequency response techniques. These techniques are principally used to study the stability of control systems. V vi Preface The additional control techniques that supplement and enhance feedback control have been distributed among Chapters 10 through 13 to facilitate the selection of their cov- erage in university courses. Cascade control is presented first, in Chapter 10, because it is so commonly a part of the other schemes. Several examples are presented to help understanding of this important and common control technique. Chapter 11 presents different computing algorithms sometimes used to implement control schemes. A method to scale these algorithms, when necessary, is presented. The chapter also presents the techniques of override, or constraint, control, and selective control. Examples are used to explain the meaning and justification of them. Chapter 12 presents and discusses in detail the techniques of ratio and feedforward control. Industrial examples are also presented. A significant number of new problems have been added. Multivariable control and loop interaction are the subjects of Chapter 13. The cal- culation and interpretation of the relative gain matrix (RGM) and the design of de- couplers, are kept from the first edition. Several examples have been added, and the material has been reorganized to keep all the dynamic topics in one section. Finally Chapters 14 and 15 present the tools for the design and analysis of sampled- data (computer) control systems. Chapter 14 presents the z-transform and its use to analyze sampled-data control systems, while Chapter 15 presents the design of basic algorithms for computer control and the tuning of sampled-data feedback controllers. The chapter includes sections on the design and tuning of dead-time compensation algorithms and model-reference control algorithms. Two examples of Dynamic Matrix Control (DMC) are also included. As in the first edition, Appendix A presents some symbols, labels, and other notations commonly used in instrumentation and control diagrams. We have adopted throughout the book the ISA symbols for conceptual diagrams which eliminate the need to differ- entiate between pneumatic, electronic, or computer implementation of the various con- trol schemes. In keeping with this spirit, we express all instrument signals in percent of range rather than in mA or psig. Appendix B presents several processes to provide the student/reader an opportunity to design control systems from scratch.During this edition we have been very fortunate to have received the help and en- couragement of several wonderful individuals. The encouragement of our students, especially Daniel Palomares, Denise Farmer, Carl Thomas, Gene Daniel, Samuel Pee- bles, Dan Logue, and Steve Hunter, will never be forgotten. Thanks are also due to Dr. Russell Rhinehart of Texas Tech University who read several chapters when they were in the initial stages. His comments were very helpful and resulted in a better book. Professors Ray Wagonner, of Missouri Rolla, and G. David Shilling, of Rhode Island, gave us invaluable suggestions on how to improve the first edition. To both of them we are grateful. We are also grateful to Michael R. Benning of Exxon Chemical Amer- icas who volunteered to review the manuscript and offered many useful suggestions from his industrial background. In the preface to the first edition we said that “To serve as agents in the training and development of young minds is certainly a most rewarding profession.” This is still our conviction and we feel blessed to be able to do so. It is with this desire that we have written this edition. CARLOSA.SMITH Tampa, Florida, 1997 ARMANDOB.CORRIPIO Baton Rouge, Louisiana, 1997 Contents Chapter 1 Introduction l - l 1-2 1-3 1-4 1-5 1-6 1-7 A Process Control System 1 Important Terms and the Objective of Automatic Process Control Regulatory and Servo Control 4 Transmission Signals, Control Systems, and Other Terms 5 Control Strategies 6 1-5.1 Feedback Control 6 1-5.2 Feedforward Control 7 Background Needed for Process Control 9 S u m m a r y 9 P r o b l e m s 9 3 1 Chapter 2 Mathematical Tools for Control Systems Analysis 2-1 The Laplace Transform 11 2- 1.1 Definition of the Laplace Transform 12 2-1.2 Properties of the Laplace Transform 14 2-2 Solution of Differential Equations Using the Laplace Transform 21 2-2.1 Laplace Transform Solution Procedure 21 2-2.2 Inversion by Partial Fractions Expansion 23 2-2.3 Handling Time Delays 27 2-3 Characterization of Process Response 30 2-3.1 Deviation Variables 3 1 2-3.2 Output Response 32 2 -3 .3 S t ab i l i t y 39 2-4 Response of First-Order Systems 39 2-4.1 Step Response 41 2-4.2 Ramp Response 43 2-4.3 Sinusoidal Response 43 2-4.4 Response with Time Delay 45 2-4.5 Response of a Lead-Lag Unit 46 2-5 Response of Second-Order Systems 48 2-5.1 Overdamped Responses 50 2-5.2 Underdamped Responses 53 2-5.3 Higher-Order Responses 57 2-6 Linearization 59 2-6.1 Linearization of Functions of One Variable 60 2-6.2 Linearization of Functions of Two or More Variables 62 2-6.3 Linearization of Differential Equations 65 2-7 Review of Complex-Number Algebra 68 2-7.1 Complex Numbers 68 2-7.2 Operations with Complex Numbers 70 11 vi i viii Contents 2-8 S u m m a r y 7 4 Prob lems 74 Chapter 3 First-Order Dynamic Systems 80 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 Processes and the Importance of Process Characteristics Thermal Process Example 82 Dead Time 92 Transfer Functions and Block Diagrams 95 3-4.1 Transfer Functions 95 3-4.2 Block Diagrams 96 Gas Process Example 104 Chemical Reactors 109 3-6.1 Introductory Remarks 109 3-6.2 Chemical Reactor Example 111 Effects of Process Nonlinearities 114 Additional Comments 117 Summary 119 Problems 120 81 Chapter 4 Higher-Order Dynamic Systems 4-1 Noninteracting Systems 135 4- 1.1 Noninteracting Level Process 135 4- 1.2 Thermal Tanks in Series 142 4-2 Interacting Systems 145 4-2.1 Interacting Level Process 145 4-2.2 Thermal Tanks with Recycle 151 4-2.3 Nonisothermal Chemical Reactor 154 4-3 Response of Higher-Order Systems 164 4-4 Other Types of Process Responses 167 4-4.1 Integrating Processes: Level Process 168 4-4.2 Open-Loop Unstable Process: Chemical Reactor 172 4-4.3 Inverse Response Processes: Chemical Reactor 179 4-5 Summary 181 4-6 Overview of Chapters 3 and 4 182 Prob lems 183 Chapter 5 Basic Components of Control Systems 5-1 Sensors and Transmitters 197 5-2 Control Valves 200 5-2.1 The Control Valve Actuator 200 5-2.2 Control Valve Capacity and Sizing 202 5-2.3 Control Valve Characteristics 210 5-2.4 Control Valve Gain and Transfer Function 216 5-2.5 Control Valve Summary 222 5-3 Feedback Controllers 222 5-3.1 Actions of Controllers 223 1 3 5 1 9 7 Contents ix 5-4 5-3.2 Types of Feedback Controllers 225 5-3.3 Modifications to the PID Controller and Additional Comments 5-3.4 Reset Windup and Its Prevention 241 5-3.5 Feedback Controller Summary 244 Summary 244 Prob lems 245 238 Chapter 6 Design of Single-Loop Feedback Control Systems 252 6-1 The Feedback Control Loop 252 6- 1.1 Closed-Loop Transfer Function 255 6-1.2 Characteristic Equation of the Loop 263 6-1.3 Steady-State Closed-Loop Gains 270 6-2 Stability of the Control Loop 274 6-2.1 Criterion of Stability 274 6-2.2 Direct Substitution Method 275 6-2.3 Effect of Loop Parameters on the Ultimate Gain and Period 283 6-2.4 Effect of Dead Time 285 6-2.5 Routh’s Test 287 6-3 Summary 290 Prob lems 290 Chapter 7 Tuning of Feedback Controllers 303 7-1 7-2 7-3 7-4 7-5 7-6 Quarter Decay Ratio Response by Ultimate Gain 304 Open-Loop Process Characterization 308 7-2.1 Process Step Testing 310 7-2.2 Tuning for Quarter Decay Ratio Response 319 7-2.3 Tuning for Minimum Error Integral Criteria 321 7-2.4 Tuning Sampled-Data Controllers 329 7-2.5 Summary of Controller Tuning 330 Tuning Controllers for Integrating Processes 331 7-3.1 Model of Liquid Level Control System 331 7-3.2 Proportional Level Controller 334 7-3.3 Averaging Level Control 336 7-3.4 Summary 337 Synthesis of Feedback Controllers 337 7-4.1 Development of the Controller Synthesis Formula 337 7-4.2 Specification of the Closed-Loop Response 338 7-4.3 Controller Modes and Tuning Parameters 339 7-4.4 Summary of Controller Synthesis Results 344 7-4.5 Tuning Rules by Internal Model Control (IMC) 350 Tips for Feedback Controller Tuning 351 7-5.1 Estimating the Integral and Derivative Times 352 7-5.2 Adjusting the Proportional Gain 354 Summary 354 Problems 355 x Contents Chapter 8 Root Locus 368 8-1 8-2 8-3 8-4 Some Definitions 368 Analysis of Feedback Control Systems by Root Locus Rules for Plotting Root Locus Diagrams 375 Summary 385 Prob lems 386 370 Chapter 9 Frequency Response Techniques 9-1 Frequency Response 389 9- 1.1 Experimental Determination of Frequency Response 389 9-1 .2 Bode P lo t s 398 9-2 Frequency Response Stability Criterion 407 9-3 Polar Plots 419 9-4 Nichols Plots 427 9-5 Pulse Testing 427 9-5.1 Performing the Pulse Test 428 9-5.2 Derivation of the Working Equation 429 9-5.3 Numerical Evaluation of the Fourier Transform Integral 431 9-6 Summary 434 Prob lems 434 Chapter 10 Cascade Control 10-1 A Process Example 439 10-2 Stability Considerations 442 10-3 Implementation and Tuning of Controllers 445 10-3.1 Two-Level Cascade Systems 446 10-3.2 Three-Level Cascade Systems 449 10-4 Other Process Examples 450 10-5 Further Comments 452 10-6 Summary 453 Prob lems 454 Chapter 11 Override and Selective Control 11-1 Computing Algorithms 460 1 1 - 1.1 Scaling Computing Algorithms 464 1 l-l.2 Physical Significance of Signals 469 11-2 Override, or Constraint, Control 470 11-3 Selective Control 475 11-4 Summary 479 Prob lems 479 Chapter 12 Ratio and Feedforward Control 12-1 Ratio Control 487 12-2 Feedforward Control 494 389 4 3 9 460 4 8 7 Chapter 13 Multivariable Process Control 5 4 5 13-1 Loop Interaction 545 13-2 Pairing Controlled and Manipulated Variables 550 13-2.1 Calculating the Relative Gains for a 2 X 2 System 554 13-2.2 Calculating the Relative Gains for an n X n System 561 13-3 Decoupling of Interacting Loops 564 13-3.1 Decoupler Design from BlockDiagrams 565 13-3.2 Decoupler Design for n X IZ Systems 573 13-3.3 Decoupler Design from Basic Principles 577 13-4 Multivariable Control vs. Optimization 579 13-5 Dynamic Analysis of Multivariable Systems 580 13-5.1 Signal Flow Graphs (SFG) 580 13-5.2 Dynamic Analysis of a 2 X 2 System 585 13-5.3 Controller Tuning for Interacting Systems 590 13-6 Summary 592 Prob lems 592 Contents xi 12-2.1 The Feedforward Concept 494 12-2.2 Block Diagram Design of Linear Feedforward Controllers 496 12-2.3 Lead/Lag Term 505 12-2.4 Back to the Previous Example 507 12-2.5 Design of Nonlinear Feedforward Controllers from Basic Process Pr inc ip l e s 511 12-2.6 Some Closing Comments and Outline of Feedforward Controller D e s i g n 5 1 5 12-2.7 Three Other Examples 518 12-3 Summary 526 Prob lems 527 Chapter 14 Mathematical Tools for Computer Control Systems 5 9 9 14-1 14-2 14-3 14-4 14-5 Computer Process Control 600 The z-Transform 601 14-2.1 Definition of the z-Transform 601 14-2.2 Relationship to the Laplace Transform 605 14-2.3 Properties of the z-Transform 609 14-2.4 Calculation of the Inverse z-Transform 613 Pulse Transfer Functions 616 14-3.1 Development of the Pulse Transfer Function 616 14-3.2 Steady-State Gain of a Pulse Transfer Function 620 14-3.3 Pulse Transfer Functions of Continuous Systems 621 14-3.4 Transfer Functions of Discrete Blocks 625 14-3.5 Simulation of Continuous Systems with Discrete Blocks 627 Sampled-Data Feedback Control Systems 629 14-4.1 Closed-Loop Transfer Function 630 14-4.2 Stability of Sampled-Data Control Systems 632 Modified z-Transform 638 14-5.1 Definition and Properties of the Modified z-Transform 639 xii Contents 14-6 14-5.2 Inverse of the Modified z-Transform 642 14-5.3 Transfer Functions for Systems with Transportation Lag Summary 645 Prob lems 645 643 Chapter 15 Design of Computer Control Systems 15-1 Development of Control Algorithms 650 15- 1.1 Exponential Filter 651 15- 1.2 Lead-Lag Algorithm 653 15- 1.3 Feedback (PID) Control Algorithms 655 15-2 Tuning of Feedback Control Algorithms 662 15-2.1 Development of the Tuning Formulas 662 15-2.2 Selection of the Sample Time 672 15-3 Feedback Algorithms with Dead-Time Compensation 674 15-3.1 The Dahlin Algorithm 674 15-3.2 The Smith Predictor 677 15-3.3 Algorithm Design by Internal Model Control 680 15-3.4 Selection of the Adjustable Parameter 685 15-4 Automatic Controller Tuning 687 15-5 Model-Reference Control 688 15-6 Summary 695 Prob lems 696 Appendix A Instrumentation Symbols and Labels Appendix B Case Studies 7 0 7 Case 1: Ammonium Nitrate Prilling Plant Control System 707 Case 2: Natural Gas Dehydration Control System 709 Case 3: Sodium Hypochlorite Bleach Preparation Control System 710 Case 4: Control Systems in the Sugar Refining Process 711 Case 5: CO, Removal from Synthesis Gas 712 Case 6: Sulfuric Acid Process 716 Case 7: Fatty Acid Process 717 Appendix C Sensors, Transmitters, and Control Valves C-l Pressure Sensors 721 c-2 Flow Sensors 723 c-3 Level Sensors 733 c-4 Temperature Sensors 734 c-5 Composition Sensors 742 C-6 Transmitters 743 C-6.1 Pneumatic Transmitter 743 C-6.2 Electronic Transmitter 745 C-7 Types of Control Valves 745 C-7.1 Reciprocating Stem 745 C-7.2 Rotating Stem 750 650 699 721 Contents xiii c-8 c-9 C-l0 C-l1 Control Valve Actuators 750 C-g.1 Pneumatically Operated Diaphragm Actuators 750 C-8.2 Piston Actuators 750 C-8.3 Electrohydraulic and Electromechanical Actuators 751 C-8.4 Manual-Handwheel Actuators 751 Control Valve Accessories 752 C-9.1 Positioners 752 C-9.2 Boosters 753 C-9.3 Limit Switches 753 Control Valves-Additional Considerations 753 C- 10.1 Viscosity Corrections 753 C-lo.2 Flashing and Cavitation 756 Summary 760 Index 7 6 3 Chapter 1 Introduction The purpose of this chapter is to present the need for automatic process control and to motivate you, the reader, to study it. Automatic process control is concerned with maintaining process variables, temperatures, pressures, flows, compositions, and the like at some desired operating value. As we shall see, processes are dynamic in nature. Changes are always occurring, and if appropriate actions are not taken in response, then the important process variables-those related to safety, product quality, and produc- tion rates-will not achieve design conditions. This chapter also introduces two control systems, takes a look at some of their com- ponents, and defines some terms used in the field of process control. Finally, the back- ground needed for the study of process control is discussed. In writing this book, we have been constantly aware that to be successful, the engineer must be able to apply the principles learned. Consequently, the book covers the prin- ciples that underlie the successful practice of automatic process control. The book is full of actual cases drawn from our years of industrial experience as full-time practi- tioners or part-time consultants. We sincerely hope that you get excited about studying automatic process control. It is a very dynamic, challenging, and rewarding area of process engineering. l-l A PROCESS CONTROL SYSTEM To illustrate process control, let us consider a heat exchanger in which a process stream is heated by condensing steam; the process is sketched in Fig. 1-1.1. The purpose of this unit is to heat the process fluid from some inlet temperature T,(t) up to a certain desired outlet temperature T(t). The energy gained by the process fluid is provided by the latent heat of condensation of the steam. In this process there are many variables that can change, causing the outlet temper- ature to deviate from its desired value. If this happens, then some action must be taken to correct the deviation. The objective is to maintain the outlet process temperature at its desired value. One way to accomplish this objective is by measuring the temperature T(t), compar- ing it to the desired value, and, on the basis of this comparison, deciding what to do to correct any deviation. The steam valve can be manipulated to correct the deviation. That is, if the temperature is above its desired value, then the steam valve can be 1 . 2 Chapter 1 Introduction C o n d e n s a t e return Figure 1-1.1 Heat exchanger. throttled back to cut the steam flow (energy) to the heat exchanger. If the temperature is below the desired value, then the steam valve can be opened more to increase the steam flow to the exchanger. All of this can be done manually by the operator, and the procedure is fairly straightforward. However, there are several problems with such manual control. First, the job requires that the operator look at the temperature fre- quently to take corrective action whenever it deviates from the desired value. Second, different operators make different decisions about how to move the steam valve, and this results in a less than perfectly consistent operation. Third, because in most process plants there are hundreds of variables that must be maintained at some desired value, manual correction requires a large number of operators. As a result of these problems, we would like to accomplish this control automatically. That is, we would like to have systems that control the variables without requiring intervention from the operator. This is what is meant by automatic process control. To achieve automatic process control, a control system must be designed and imple- mented. A possible control system for our heat exchanger is shown in Fig. 1-1.2. (Ap- Steam return Figure l-l.2 Heat exchanger control system. 1-2 Important Terms and the Objective of Automatic Process Control 3 pendix A presents the symbols and identifications for different devices.) The first thing to do is measure the outlet temperatureof the process stream. This is done by a sensor (thermocouple, resistance temperature device, filled system thermometer, thermistor, or the like). Usually this sensor is physically connected to a transmitter, which takes the output from the sensor and converts it to a signal strong enough to be transmitted to a controller. The controller then receives the signal, which is related to the temperature, and compares it with the desired value. Depending on the result of this comparison, the controller decides what to do to maintain the temperature at the desired value. On the basis of this decision, the controller sends a signal to the final control element, which in turn manipulates the steam flow. This type of control strategy is known as feedback control. Thus the three basic components of all control systems are 1. Sensor/transmitter Also often called the primary and secondary elements. 2. Controller The “brain” of the control system. 3. Final control element Often a control valve but not always. Other common final control elements are variable-speed pumps, conveyors, and electric motors. These components perform the three basic operations that must be present in every control system. These operations are 1. Measurement(M) Measuring the variable to be controlled is usually done by the combination of sensor and transmitter. In some systems, the signal from the sensor can be fed directly to the controller, so there is no need for the transmitter. 2. Decision (0) On the basis of the measurement, the controller decides what to do to maintain the variable at its desired value. 3. Action (A) As a result of the controller’s decision, the system must then take an action. This is usually accomplished by the final control element. These three operations, M, D, and A, are always present in every type of control system, and it is imperative that they be in a loop. That is, on the basis of the mea- surement a decision is made, and on the basis of this decision an action is taken. The action taken must come back and affect the measurement; otherwise, it is a major Jaw in the design, and control will not be achieved. When the action taken does not affect the measurement, an open-loop condition exists and control will not be achieved. The decision making in some systems is rather simple, whereas in others it is more complex; we will look at many systems in this book. 1-2 IMPORTANT TERMS AND THE OBJECTIVE OF AUTOMATIC PROCESS CONTROL At this time it is necessary to define some terms used in the field of automatic process control. The controlled variable is the variable that must be maintained, or controlled, at some desired value. In our example of the heat exchanger, the process outlet tem- perature, T(t), is the controlled variable. Sometimes the term process variable is also used to refer to the controlled variable. The set point (SP) is the desired value of the controlled variable. Thus the job of a control system is to maintain the controlled variable at its set point. The manipulated variable is the variable used to maintain the controlled variable at its set point. In the example, the steam valve position is the 4 Chapter 1 Introduction manipulated variable. Finally, any variable that causes the controlled variable to deviate from the set point is known as a disturbance or upset. In most processes there are a number of different disturbances. In the heat exchanger shown in Fig. 1-1.2, possible disturbances include the inlet process temperature, T,(t), the process flow, f(t), the en- ergy content of the steam, ambient conditions, process fluid composition, and fouling. It is important to understand that disturbances are always occurring in processes. Steady state is not the rule, and transient conditions are very common. It is because of these disturbances that automatic process control is needed. If there were no disturbances, then design operating conditions would prevail and there would be no need to “monitor” the process continuously. The following additional terms are also important. Manual control is the condition in which the controller is disconnected from the process. That is, the controller is not deciding how to maintain the controlled variable at set point. It is up to the operator to manipulate the signal to the final control element to maintain the controlled variable at set point. Closed-loop control is the condition in which the controller is connected to the process, comparing the set point to the controlled variable and determining and taking corrective action. Now that we have defined these terms, we can express the objective of an automatic process control system meaningfully: The objective of an automatic process control system is to adjust the manipulated variable to maintain the controlled variable at its set point in spite of disturbances. Control is important for many reasons. Those that follow are not the only ones, but we feel they are the most important. They are based on our industrial experience, and we would like to pass them on. Control is important to 1. Prevent injury to plant personnel, protect the environment by preventing emissions and minimizing waste, and prevent damage to the process equipment. SAFETY must always be in everyone’s mind; it is the single most important consider- ation. 2. Maintain product quality (composition, purity, color, and the like) on a continuous basis and with minimum cost. 3. Maintain plant production rate at minimum cost. Thus process plants are automated to provide a safe environment and at the same &me maintain desired product quality, high plant throughput, and reduced demand on human labor. 1-3 REGULATORY AND SERVO CONTROL In some processes, the controlled variable deviates from set point because of distur- bances. Systems designed to compensate for these disturbances exert regulatory control. In some other instances, the most important disturbance is the set point itself. That is, the set point may be changed as a function of time (typical of this is a batch reactor where the temperature must follow a desired profile), and therefore the con- trolled variable must follow the set point. Systems designed for this purpose exert servo control. Regulatory control is much more common than servo control in the process indus- 1-4 Transmission Signals, Control Systems, and Other Terms 5 tries. However, the same basic approach is used in designing both. Thus the principles in this book apply to both cases. 1-4 TRANSMISSION SIGNALS, CONTROL SYSTEMS, AND OTHER TERMS Three principal types of signals are used in the process industries. The pneumatic signal, or air pressure, normally ranges between 3 and 15 psig. The usual representation for pneumatic signals in process and instrumentation diagrams (P&IDS) is v. The electrical signal normally ranges between 4 and 20 mA. Less often, a range of 10 to 50 mA, 1 to 5 V, or 0 to 10 V is used. The usual representation for this signal in P&IDS is a series of dashed lines such as - - - - -. The third type of signal is the digital, or discrete, signal (zeros and ones). In this book we will show such signals as N (see Fig. l-1.2), which is the representation proposed by the Instrument Society of America (ISA) when a control concept is shown without concern for specific hardware. The reader is encouraged to review Appendix A, where different symbols and labels are presented. Most times we will refer to signals as percentages instead of using psig or mA. That is, 0%- 100% is equivalent to 3 to 15 psig or 4 to 20 mA. It will help in understanding control systems to realize that signals are used by de- vices-transmitters, controllers, final control elements, and the like-to communicate. That is, signals are used to convey information. The signal from the transmitter to the controller is used by the transmitter to inform the controller of thevalue of the controlled variable. This signal is not the measurement in engineering units but rather is a mA, psig, volt, or any other signal that is proportional to the measurement. The relationship to the measurement depends on the calibration of the sensor/transmitter. The controller uses its output signal to tell the final control element what to do: how much to open if it is a valve, how fast to run if it is a variable-speed pump, and so on. It is often necessary to change one type of signal into another. This is done by a transducer, or converter. For example, there may be a need to change from an electrical signal in milliamperes (mA) to a pneumatic signal in pounds per square inch, gauge (psig). This is done by the use of a current (I) to pneumatic (P) transducer (I/P); see Fig. 1-4.1. The input signal may be 4 to 20 mA and the output 3 to 15 psig. An analog- to-digital converter (A to D) changes from a mA, or a volt signal to a digital signal. There are many other types of transducers: digital-to-analog (D to A), pneumatic-to- current (P/I), voltage-to-pneumatic (E/P), pneumatic-to-voltage (P/E), and so on. The term analog refers to a controller, or any other instrument, that is either pneu- matic or electrical. Most controllers, however, are computer-based, or digital. By com- puter-based we don’t necessarily mean a main-frame computer but anything starting from a microprocessor. In fact, most controllers are microprocessor-based. Chapter 5 presents different types of controllers and defines some terms related to controllers and control systems. I/P //____------------ /,I/ I, // ) /I Figure 1-4.1 I/P transducer. 6 Chapter 1 Introduction 1-5 CONTROL STRATEGIES 1-5.1 Feedback Control The control scheme shown in Fig. l-l.2 is referred to as feedback control and is also called afeedback control loop. One must understand the working principles of feedback control to recognize its advantages and disadvantages; the heat exchanger control loop shown in Fig. l-l.2 is presented to foster this understanding. If the inlet process temperature increases, thus creating a disturbance, its effect must propagate through the heat exchanger before the outlet temperature increases. Once this temperature changes, the signal from the transmitter to the controller also changes. It is then that the controller becomes aware that a deviation from set point has occurred and that it must compensate for the disturbance by manipulating the steam valve. The controller signals the valve to close and thus to decrease the steam flow. Fig. 1-5.1 shows graphically the effect of the disturbance and the action of the controller. It is instructive to note that the outlet temperature first increases, because of the increase in inlet temperature, but it then decreases even below set point and continues to oscillate around set point until the temperature finally stabilizes. This oscillatory response is typical of feedback control and shows that it is essentially a trial-and-error operation. That is, when the controller “notices” that the outlet temperature has in- creased above the set point, it signals the valve to close, but the closure is more than required. Therefore, the outlet temperature decreases below the set point. Noticing this, Ti(t) L Fraction of valve opening Figure 1-5.1 Response of a heat exchanger to a disturbance: feedback control. 1-5 Control Strategies 7 the controller signals the valve to open again somewhat to bring the temperature back up. This trial-and-error operation continues until the temperature reaches and remains at set point. The advantage of feedback control is that it is a very simple technique that compen- sates for all disturbances. Any disturbance affects the controlled variable, and once this variable deviates from set point, the controller changes its output in such a way as to return the temperature to set point. The feedback control loop does not know, nor does it care, which disturbance enters the process. It tries only to maintain the controlled variable at set point and in so doing compensates for all disturbances. The feedback controller works with minimum knowledge of the process. In fact, the only information it needs is in which direction to move. How much to move is usually adjusted by trial and error. The disadvantage of feedback control is that it can compensate for a distur- bance only after the controlled variable has deviated from set point. That is, the dis- turbance must propagate through the entire process before the feedback control scheme can initiate action to compensate for it. The job of the engineer is to design a control scheme that will maintain the controlled variable at its set point. Once this is done, the engineer must adjust, or tune, the con- troller so that it minimizes the amount of trial and error required. Most controllers have up to three terms (also known as parameters) used to tune them. To do a creditable job, the engineer must first know the characteristics of the process to be controlled. Once these characteristics are known, the control system can be designed and the controller tuned. Process characteristics are explained in Chapters 3 and 4, Chapter 5 presents the meaning of the three terms in the controllers, and Chapter 7 explains how to tune them. 14.2 Feedforward Control Feedback control is the most common control strategy in the process industries. Its simplicity accounts for its popularity. In some processes, however, feedback control may not provide the required control performance. For these processes, other types of control strategies may have to be designed. Chapters 10, 11, 12, 13, and 15 present additional control strategies that have proved profitable. One such strategy is feedfor- ward control. The objective of feedforward control is to measure disturbances and compensate for them before the controlled variable deviates from set point. When feed- forward control is applied correctly, deviation of the controlled variable is minimized. A concrete example of feedforward control is the heat exchanger shown in Fig. 1-1.2. Suppose that “major” disturbances are the inlet temperature, T,(t), and the process flow,f(t). To implement feedforward control, these two disturbances must first be mea- sured, and then a decision must be made about how to manipulate the steam valve to compensate for them. Fig. 1-5.2 shows this control strategy. The feedforward controller makes the decision about how to manipulate the steam valve to maintain the controlled variable at set point, depending on the inlet temperature and process flow. In Section 1-2 we learned that there are a number of different disturbances. The feedforward control system shown in Fig. 1-5.2 compensates for only two of them. If any of the others enter the process, this strategy will not compensate for it, and the result will be a permanent deviation of the controlled variable from set point. To avoid this deviation, some feedback compensation must be added to feedforward control; this is shown in Fig. 1-5.3. Feedforward control now compensates for the “major” distur- 8 Chapter 1 Introduction S P Steam r--h I Feedforward controller TTP1 0 T(t) Tis stream T c;] Y Condensate return Figure l-S.2 Heat exchanger feedforward control system. bances, while feedback control compensates for all other disturbances. Chapter 12 pre- sents the development of the feedforward controller. Actual industrial cases are used to discuss this important strategy in detail. It is important to note that the three basic operations, M, D, A, are still present in this more “advanced” control strategy. Measurement is performed by the sensors and transmitters. Decision is made by both the feedforward and the feedback controllers. Action is taken by the steam valve. The advanced control strategies are usually morecostly than feedback control in Conde’nsate return Figure 1-5.3 Heat exchanger feedforward control with feedback compensation. Problems 9 hardware, computing power, and the effort involved in designing, implementing, and maintaining them. Therefore, the expense must be justified before they can be imple- mented. The best procedure is first to design and implement a simple control strategy, keeping in mind that if it does not prove satisfactory, then a more advanced strategy may be justifiable. It is important, however, to recognize that these advanced strategies still require some feedback compensation. 1-6 BACKGROUND NEEDED FOR PROCESS CONTROL To be successful in the practice of automatic process control, the engineer must first understand the principles of process engineering. Therefore, this book assumes that the reader is familiar with the basic principles of thermodynamics, fluid flow, heat transfer, separation processes, reaction processes, and the like. For the study of process control, it is also fundamental to understand how processes behave dynamically. Thus it is necessary to develop the set of equations that describes different processes. This is called modeling. To do this requires knowledge of the basic principles mentioned in the previous paragraph and of mathematics through differential equations. Laplace transforms are used heavily in process control. This greatly simpli- fies the solution of differential equations and the dynamic analysis of processes and their control systems. Chapter 2 of this book is devoted to the development and use of the Laplace transforms, along with a review of complex-number algebra. Chapters 3 and 4 offer an introduction to the modeling of some processes. 1-7 SUMMARY In this chapter, we discussed the need for automatic process control. Industrial pro- cesses are not static but rather very dynamic; they are continuously changing as a result of many types of disturbances. It is principally because of this dynamic nature that control systems are needed to continuously and automatically watch over the var- iables that must be controlled. The working principles of a control system can be summarized with the three letters M, D, and A. M refers to the measurement of process variables. D refers to the decision made on the basis of the measurement of those process variables. Finally, A refers to the action taken on the basis of that decision. The fundamental components of a process control system were also presented: sensor/ transmitter, controller, and final control element. The most common types of signals- pneumatic, electrical, and digital-were introduced, along with the purpose of trans- ducers. Two control strategies were presented: feedback and feedforward control. The ad- vantages and disadvantages of both strategies were briefly discussed. Chapters 6 and 7 present the design and analysis of feedback control loops. PROBLEMS l-l. For the following automatic control systems commonly encountered in daily life, identify the devices that perform the measurement (M), decision (D), and action 10 Chapter 1 Introduction (A) functions, and classify the action function as “On/Off’ or “Regulating.” Also draw a process and instrumentation diagram (P&ID), using the standard ISA sym- bols given in Appendix A, and determine whether the control is feedback or feed- forward. (a) House air conditioning/heating (b) Cooking oven (c) Toaster (d) Automatic sprinkler system for fires (e) Automobile cruise speed control (f) Refrigerator 1-2. Instrumentation Diagram: Automatic Shower Temperature Control. Sketch the process and instrumentation diagram for an automatic control system to control the temperature of the water from a common shower-that is, a system that will automatically do what you do when you adjust the temperature of the water when you take a shower. Use the standard ISA instrumentation symbols given in Ap- pendix A. Identify the measurement (M), decision (D), and action (A) devices of your control system. Chapter 2 M,athematical Tools for Control Systems Analysis This chapter presents two mathematical tools that are particularly useful for analyzing process dynamics and designing automatic control systems: Laplace transforms and linearization. Combined, these two techniques allow us to gain insight into the dynamic responses of a wide variety of processes and instruments. In contrast, the technique of computer simulation provides us with a more accurate and detailed analysis of the dynamic behavior of specific systems but seldom allows us to generalize our findings to other processes. Laplace transforms are used to convert the differential equations that represent the dynamic behavior of process output variables into algebraic equations. It is then possible to isolate in the resulting algebraic equations what is characteristic of the process, the trunsjierfinction, from what is characteristic of the input forcing functions. Because the differential equations that represent most processes are nonlinear, linearization is required to approximate nonlinear differential equations with linear ones that can then be treated by the method of Laplace transforms. The material in this chapter is not just a simple review of Laplace transforms but is a presentation of the tool in the way it is used to analyze process dynamics and to design control systems. Also presented are the responses of some common process transfer functions to some common input functions. These responses are related to the parameters of the process transfer functions so that the important characteristics of the responses can be inferred directly from the transfer functions without having to re- invert them each time. Because a familiarity with complex numbers is required to work with Laplace transforms, we have included a brief review of complex-number algebra as a separate section. We firmly believe that a knowledge of Laplace transforms is essential for understanding the fundamentals of process dynamics and control systems design. 2-1 THE LAPLACE TRANSFORM This section reviews the definition of the Laplace transform and its properties. 11 12 Chapter 2 Mathematical Tools for Control Systems Analysis 2-1.1 Definition of the Laplace Transform In the analysis of process dynamics, the process variables and control signals are func- tions of time, t. The Laplace transform of a function of time, f(t), is defined by the formula F(s) = W(Ql = (2-1.1) where F(s) = the Laplace transform off(t) s = the Laplace transform variable, time-’ The Laplace transform changes the function of time, f(t), into a function in the Laplace transform variable, F(s). The limits of integration show that the Laplace transform contains information on the function f(t) for positive time only. This is perfectly ac- ceptable, because in process control, as in life, nothing can be done about the past (negative time); control action can affect the process only in the future. The following example uses the definition of the Laplace transform to develop the transforms of a few common forcing functions. The four signals shown in Fig. 2-1.1 are commonly applied as inputs to processes and instruments to study their dynamic responses. We now use the definition of the Laplace transform to derive their transforms. (a) UNIT STEP FUNCTION This is a sudden change of unit magnitude as sketched in Fig. 2-l.la. Its algebraic representation is u(t) = -I 0 t-co1 tro Substituting into Eq. 2-1.1 yields -.z[u(t)] = I u(t)e-sf dt = - 1 e-"' m 0 s 0 2-1 The Laplace Transform 13 1 .0 H O- I t=o (cd O- -1.0 , I t t=o t = T t (b) 0 I I I I I I I t=o t t=o t=T t (cl Cd) Figure 2-1.1 Common input signals for the study of control system response. (a) Unit step function, u(t). (b) Pulse.(c) Unit impulse function, s(t). (d) Sine wave, sin cot (w = 27~/T). (b) A PULSE OF MAGNITUDE HAND DURATION T The pulse sketched in Fig. 2-1.1 b is represented by f(O = t < 0, t 2 TOst<T Substituting into Eq. 2-1.1 yields xf(01 = I omf(t)e-st dt = I = He-“’ dt 0 H T = -s e-sr 0 = - y (e-sT - 1) H = s (l - e-sT) (c) A UNIT IMPULSE FUNCTION This function, also known as the Dirac delta function and represented by t?(t), is 14 Chapter 2 Mathematical Tools for Control Systems Analysis sketched in Fig. 2-1.1~. It is an ideal pulse with zero duration and unit area. All of its area is concentrated at time zero. Because the function is zero at all times except at zero, and because the term e-“’ in Eq. 2- 1.1 is equal to unity at t = 0, the Laplace transform is Y[8(t)] = S(t)emsf dt = 1 Note that the result of the integration, 1, is the area of the impulse. The same result can be obtained by substituting H = l/T in the result of part (b), so that HT = 1, and then taking limits as T goes to zero. (d) A SINE WAVE OF UNITY AMPLITUDE AND FREQUENCY o The sine wave is sketched in Fig. 2-1. Id and is represented in exponential form by sin wt = eiWt - e-iti 2 i where i = ,/? is the unit of imaginary numbers. Substituting into Eq. 2- 1.1 yields 1 [ e-(s-iw)t =- - - + e- (s+ioJ)t m 2 i s - iw 1s+iw 0 1 [ O - l=- - - + o - 1- 2 i s - iw s + iw1 1 2iw=-- 2i s2 + 69 w=- s2 + cl? The preceding example illustrates some algebraic manipulations required to derive the Laplace transform of various functions using its definition. Table 2- 1.1 contains a short list of the Laplace transforms of some common functions. 2-1.2 Properties of the Laplace Transform This section presents the properties of Laplace transforms in order of their usefulness in analyzing process dynamics and designing control systems. Linearity and the real differentiation and integration theorems are essential for transforming differential equa- tions into algebraic equations. The final value theorem is useful for predicting the final 2-1 The Laplace Transform 15 Table 2-1.1 Laplace Transforms of Common Functions f(t) F(s) = Km1 s(t) u(t) t t" e-"' te-“’ tne-at sin wt cos ot e-a’ sin ot e-a’ cos wt 1 1 s 1 2 n! p+l 1 S+U 1 (s + a>* n.I (s + a)“+1 w s* + w2 S s* + 6.2 (s + u; + wz s+a (s + a>* + a? steady-state value of a time function from its Laplace transform, and the real translation theorem is useful for dealing with functions delayed in time. Other properties are useful for deriving the transforms of complex functions from the transforms of simpler func- tions such as those listed in Table 2-1.1. Linearity It is very important to realize that the Laplace transform is a linear operation. This means that if a is a constant, then a$(01 = 4m1 = am (2-1.2) The distributive property of addition also follows from the linearity property: .Z[uf(t) + bg(t)] = uF(s) + bG(s) (2-1.3) where a and b are constants. You can easily derive both formulas by application of Eq. 2- 1.1, the definition of the Laplace transform. 16 Chapter 2 Mathematical Tools for Control Systems Analysis Real Differentiation Theorem This theorem, which establishes a relationship between the Laplace transform of a function and that of its derivatives, is most important in transforming differential equa- tions into algebraic equations. It states that 2 df(O[ 1- = SF(S) -f(O)d t Proof From the definition of the Laplace transform, Eq. 2-1.1, Integrate by parts. & = dfo dt d t du = - semS’ dt v = f(t) 2 y = [f(t)emSf]; -[ 1 = SF(S) -f(O) q.e.d. The extension to higher derivatives is straightforward. = s[sF(s) - f(O)1 - 5 f 0= = s2F(s) - s,(O) - $ In general, (2-1.4) z d”f(t)[ 1 d”-‘f-dt” = s”F(s) - s”-‘f(O) - . . . - dt”-’ .(2-1.5)t=o 2-1 The Laplace Transform 17 In process control, it is normally assumed that the initial conditions are at steady state (time derivatives are zero) and that the variables are deviations from initial conditions (initial value is zero). For this very important case, the preceding expression reduces to (2-1.6) This means that for the case of zero initial conditions at steady state, the Laplace transform of the derivative of a function is obtained by simply substituting variable s for the “dldt” operator, and F(s) forf(t). Real Integration Theorem This theorem establishes the relationship between the Laplace transform of a function and that of its integral. It states that (2-1.7) The proof of this theorem is carried out by integrating the definition of the Laplace transform by parts. This proof is similar to that of the real differentiation theorem and is left as an exercise. The Laplace transform of the nth integral of a function is the transform of the function divided by P. Real Translation Theorem This theorem deals with the translation of a function in the time axis, as shown in Fig. 2-1.2. The translated function is the original function delayed in time. As we shall see in Chapter 3, time delays are caused by transportation lag, a phenomenon also known as dead time. The theorem states that 1 T[f(t - to)] = e-T(s) 1 (2-1.8) Because the Laplace transform does not contain information about the original func- tion for negative time, the delayed function must be zero for all times less than the time delay (see Fig. 2- 1.2). This condition is satisfied if the process variables are expressed as deviations from initial steady-state conditions. Proof. From the definition of the Laplace transform, Eq. 2- 1.1, W(t - 4Jl = 18 Chapter 2 Mathematical Tools for Control Systems Analysis t=o t=to t Figure 2-1.2 Function delayed in time is zero for all times less than the time delay to Let r = t - to (or t = to + T) and substitute. = eesfOF(s) q.e.d. Note that in this proof, we made use of the fact thatf(r) = 0 for r < 0 (t < to). Final Value Theorem This theorem allows us to figure out the final, or steady-state, value of a function from its transform. It is also useful in checking the validity of derived transforms. If the limit of f(t) as t - w exists, then it can be found from its Laplace transform as follows: pjzG$q (2-1.9) The proof of this theorem adds little to our understanding of it. The last three properties of the Laplace transform, to be presented next without proof, are not used as often in the analysis of process dynamics as are the ones already pre- sented. 2-1 The Laplace Transform 19 Complex Differentiation Theorem This theorem is useful for evaluating the transforms of functions that involve powers of the independent variable, t. It states that .mml = - 2 F(s) (2-1.10) Complex Translation Theorem This theorem is useful for evaluating transforms of functions that involve exponential functions of time. It states that Z[eatf(t)] = F(s - a) (2-1.11) Initial Value Theorem This theorem enables us to calculate the initial value of a function from its transform. It would provide another check of the validity of derived transforms were it not for the fact that in process dynamic analysis, the initial conditions of the variables are usually zero. The theorem states that limf(t) = lim SF(S) (2-1.12) t+0 s-+m The following examples illustrate the use of the properties of Laplace transforms we have just discussed. Derive the Laplace transform of the differential equation 9 d2Y@) + 6 dY(O dt2 - + y(t) = 2x(t) d t with initial conditions of zero at steady state-that is, y(O) = 0 and dy/dtl,=, = 0. SOLUTION By application of the linearity property, Eq. 2-1.3, take the Laplace transform of each term. 93 [fg + 6% [y] + T[y(t)] = 2.Y[x(t)J 20 Chapter 2 Mathematical Tools for ControlSystems Analysis Then apply the real differentiation theorem, Eq. 2-1.6. 9s2Y(s) + 6sY(s) + Y(s) = 2X(s) Finally, solve for Y(s). 2 Y(s) = 9s2 + 6s + 1 X(s) The preceding example shows how the Laplace transform converts the original dif- ferential equation into an algebraic equation that can then be rearranged to solve for the dependent variable Y(s). Herein lies the great usefulness of the Laplace transform, because algebraic equations are a lot easier to manipulate than differential equations. Obtain the Laplace transform of the following function: c(t) = u(t - 3)[1 - e-(r-3)‘4] Note: The term u(t - 3) in this expression shows that the function is zero for t < 3. We recall, from Example 2-l.l(a), that u(t - 3) is a change from zero to one at t = 3, which means that the expression in brackets is multiplied by zero until t = 3 and is multiplied by unity after that. Thus the presence of the unit step function does not alter the rest of the function for t 2 3. SOLUTION Let c(t) = f(t - 3) = u(t - 3)[1 - e-(1-3)‘4] Then f(t) = u(t)[l - e-1’41 = u(t) - u(t)e-‘14 Apply Eq. 2-1.3, the linearity property, and use entries from Table 2-1.1 with a = 114. 1 F(s) = ; - - = 1 s + 1 s(4s + 1) 4 2-2 Solution of Differential Equations Using the Laplace Transform 21 Next apply the real translation theorem, Eq. 2-1.8. C(s) = .Lqf(t - 3)] = C3”F(S) C(s) = e-3s s(4s + 1) We can check the validity of this answer by using the final value theorem, Eq. 2-1.9. lim c(t) = lim u(t - 3) [l - e-(‘-3)‘4] = I f-m t-+m lim SC(S) = lim s e-3s 1 Check! s+O 3-0 s(4s + 1 ) = 2-2 SOLUTION OF DIFFERENTIAL EQUATIONS USING THE LAPLACE TRANSFORM This section presents the use of the Laplace transform to solve the differential equations that represent the dynamics of processes and their control systems. Because our objec- tive is to find out how the output signals respond to input forcing functions, we will always assume that the initial conditions are at steady state (zero time derivatives). We will also define all variables as deviations from their initial values. This forces the initial values of the deviation variables also to be zero. 2-2.1 Laplace Transform Solution Procedure The procedure for solving a differential equation by Laplace transforms consists of three steps: 1. Transform the differential equation into an algebraic equation in the Laplace trans- form variable s. 2. Solve for the transform of the output (or dependent) variable. 3. Invert the transform to obtain the response of the output variable with time, t. Consider the following second-order differential equation: d2Y(d + a dY(t) a2 dt2 - + a&t) = bx(t) ’ dt (2-2.1) The problem of solving this equation can be stated as follows: Given the constant coefficients a,, a,, a2, and b, the initial conditions y(O) and dy/dt I l=. , and the function x(t), find the function y(t) that satisfies the differential equation. We call the function x(t) the “forcing function” or input variable, and we call y(t) the “output” or dependent variable. In process control systems, a differential equation such as Eq. 2-2.1 usually represents how a particular process or instrument relates its output signal, y(t), to its input signal, x(t). Our approach is that of British inventor James 22 Chapter 2 Mathematical Tools for Control Systems Analysis Watt (1736- 1819), who considered process variables as signals and processes as signal processors. The first step is to take the Laplace transform of Eq. 2-2.1. We do this by applying the linearity property of Laplace transforms, Eq. 2-1.3, which allows us to take the Laplace transform of each term separately: u,%[~] + @[fy] + a,~ely(t)] = b%w (2-2.2) Assuming for the moment that the initial conditions are not zero, the indicated Laplace transforms are obtained by using the real differentiation theorem, Eq. 2-1.5. 2 d2Y(4[-Idt2 = s2Y(s) - sy(0) - 5 f 0= z dy(O [ 1 - = sY(s) - y(O) d t Next we substitute these terms into Eq. 2-2.2 and rearrange it to obtain 4(u2s2 + a,s + a,)Y(s) - (u2s + a,)y(O) - u2 z = = bX(s) f 0 The second step is to manipulate this algebraic equation to solve for the transform of the output variable, Y(s). MS) + @2s + ~,>Y(O) + a2 2 f 0 = (2-2.3) Y(s) = u*s* + u,s + a, This equation shows the effect of the input variable, X(s), and of the initial conditions on the output variable. Our objective is to study how the output variable responds to the input variabIe, so the presence of the initial conditions complicates our analysis. To avoid this unnecessary complication, we assume that the initial conditions are at steady state, dy/dt I t=O = 0, and define the output variable as the deviation from its initial value, thus forcing y(O) = 0. We will show in the next section how this can be done without loss of generality. With zero initial conditions, the equation is reduced to Y(s) = bu*s2 + u,s + a,1 X(s) (2-2.4) The form of Eq. 2-2.4 allows us to break the transform of the output variable into the product of two terms: the term in brackets, known as the trunsfirfunction, and the transform of the input variable, X(s). The transfer function and its parameters charac- 2-2 Solution of Differential Equations Using the Laplace Transform 23 terize the process or device and determine how the output variable responds to the input variable. The concept of transfer function is described in more detail in Chap- ter 3. The third and final step is to invert the transform of the output to obtain the time function y(t), which is the response of the output. Inversion is the opposite operation to taking the Laplace transform. Before we can invert, we must select a specific input function for x(t). A common function, because of its simplicity, is the unit step function, u(t), which was introduced in Example 2- 1.1. From that example, or from Table 2- 1.1, we learn that for x(t) = u(t), X(S) = l/s. We substitute into Eq. 2-2.4 and invert to obtain y(t) = 3-1 b 1 u*s2 + a’s + a, s 1 (2-2.5) where the symbol 2-i stands for the inverse Laplace transform. The response to a step input is called the step response for short. The inversion could easily be carried out if we could find the expression within the brackets in Table 2-1.1 or in a more extensive table of Laplace transforms. Obviously, we will not be able to find complex expressions in such a table. The mathematical technique of partial fractions expansion, to be introduced next, is designed to expand the transform of the output into a sum of simpler terms. We can then invert these simpler terms separately by matching entries in Table 2-1.1. 2-2.2 Inversion by Partial Fractions Expansion The mathematical technique of partial fractions expansion was introduced by the British physicist Oliver Heaviside (1850- 1925) as part of his revolutionary “operational cal- culus.” The first step in expanding the transform, Eq. 2-2.5, into a sum of fractions is to factor its denominator, as follows: (a22 + a,s + ~2,)s = u2(s - r,)(s - rJs (2-2.6) where r, and r2 are the roots of the quadratic term-that is, the values of s that satisfy the equation a$ + a,s + a, = 0 For a quadratic, or second-degree, polynomial, the roots can be calculated by the stan- dard quadratic formula: -a, 2 a: - 4a,a, r1,2 = 2a2 (2-2.7) For higher-degree polynomials, the reader is referred to any numerical methods text for a root-finding procedure. Most electronic calculators are now able to find the roots of 24 Chapter 2 Mathematical Tools for Control Systems Analysis third- and higher-degree polynomials. Computer programs such as Mathcad’ and MATLAB provide functions for finding the roots of polynomials of any degree. Once the denominator is factored into first-degree terms,the transform is expanded into partial fractions as follows: A2Y(s) = * + - +A3 1 s-r2 s (2-2.8) provided that the roots, r, , r2, and r3 = 0, are not equal to each other. For this case of unrepeated roots, the constant coefficients are found by the formula A, = lim (s - rJY(s) s+q We can now carry out the inversion of Eq. 2-2.8 by matching each term to entries in Table 2-1 .l; in this case the first two terms match the exponential function with a = - r,, and the third term matches the unit step function. The resulting inverse func- tion is y(t) = A,erlr + A2erzf + A+(t) Repeated Roots For the case of repeated roots, say rl = r2, the expansion is carried out as follows: A A2L+- y(s) = (s - r,)2 +A3 s-r, s (2-2.10) Coefficient A, is calculated as before, but coefficients A, and A, must be calculated by the following formulas: A, = lim (s - rJ2Y(s) s-f?? A, = !i; i $ [(s - rl)2Y(s)] Again, we carry out the inversion of Eq. 2-2.10 by matching terms in Table 2-1.1. The first term matches the sixth term in the table with a = - rl, to give the inverse. y(t) = A,terlf + Azerlr + A+(t) (2-2.11) ’ Mathcad User’s Guide, by MathSoft, Inc., 201 Broadway, Cambridge, MA, 02139, 1992. ZMATLAB User’s Guide, The MathWorks, Inc., 24 Prime Park Way, Natick, MA, 01760, 1992. 2-2 Solution of Differential Equations Using the Laplace Transform 25 In general, if root Y, is repeated m times, the expansion is carried out as follows: The coefficients are calculated by (2-2.12) (2-2.13) for k = 2, . . . , m. The inverse function is then: y(t) = A$‘-’ (m - l)! + A,r2 (m _ 2)! + . . . + A, e”’ + . . .1 (2-2.14) The following example is designed to illustrate numerically the partial fractions expansion procedure and the entire inversion process. Three cases are considered: un- repeated real roots, repeated roots, and complex conjugate roots. Given the quadratic differential equation considered in the preceding discussion, Eq. 2-2.1, with zero steady-state initial conditions, we will obtain the unit step response of the output variable y(t) for three different sets of parameters. (a) UNREPEATED REAL ROOTS Let a2 = 9, a, = 10, a, = 1, and b = 2, in Eq. (2-2.1). Then the unit step re- sponse is, from Eq. 2-2.5, 2 1 y(t) = 2-1 [ 9s2 + 10s + 1 s 1 The roots, from the quadratic equation, are r, = - 1/9, r, = - 1. The denominator is factored as follows: 2 1 Y(s) = 9 s+j (s+$ ( > A=‘+-A2 +A’ 1 s+1 s S+- 9 26 Chapter 2 Mathematical Tools for Control Systems Analysis The coefficients are calculated using Eq. 2-2.9. 2 A , = l im = -2 .25 H-l/9 9(s + 1)s 2 = 0.25 2 = 2 Invert by matching entries in Table 2-1.1 to obtain the step response. y(t) = - 2.25edg + 0.2.W’ + 2u(t) (b) REPEATED ROOTS Let a, = 6, and let the other parameters be as before. The roots, from the quadratic formula, are Y, = r2 = - 1/3, and the Laplace transform of the output response is = 4 +A’ 1 s s+- 3 The coefficients are, from Eq. 2-2.13, A, = li-n; = -; A = lim 1 d 2 2 s---u3 l! d s i%[I = lim ---&E-Z s--l13 and A, = 2, as before. The step response is then obtained by matching entries in Table 2-1.1. y(t) = (-gi- 2)e-“‘+ 2u(t) 2-2 Solution of Differential Equations Using the Laplace Transform 27 (c) PAIR OF COMPLEX CONJUGATE ROOTS Let a, = 3, and let the other parameters be as before. The roots, from the quadratic formula, are r,,* = - 0.167 k i0.289, where i = a is the unit of the imaginary numbers. The transform of the output is then 2 Y(s) = 9(s + 0.167 - iO.289)(s + 0.167 + iO.289)~ A, A2 A- I 42- s + 0.167 - i0.289 ’ s + 0.167 Once more we calculate the coefficients by Eq. 2-2.9. 2 A, = s1-o.kio.m 9(s + 0.167 + iO.289)~ 2 A, = s--o.~~i~.289 S(,S + 0.167 - iO.289)~ t i0.289 s zz - 1 + i0.577 = - 1 - i0.577 and A, = 2, as before. The inverse response is again obtained by matching entries in Table 2- 1.1. Note that the fact that the numbers are complex does not affect this part of the procedure. y(t) = (- 1 + j0.577)e(-0.167+i0.289)r + (- 1 - j0.577)e(-O.l67-iO.289)t + ‘&4t) It is evident from the preceding example that calculating the coefficients of the partial fractions expansion can be difficult, especially when the factors of the transform are complex numbers. As we shall see in the next section, the roots of the denominator of the transfer function contain most of the significant information about the response. Consequently, in analyzing the response of process control systems, it is seldom nec- essary to calculate the coefficients of the partial fractions expansion. This is indeed fortunate. 2-2.3 Handling Time Delays The technique of partial fractions expansion is restricted to use with Laplace transforms that can be expressed as the ratio of two polynomials. When the response contains time delays, by the real translation theorem, Eq. 2-1.8, an exponential function of s appears in the transform. Because the exponential is a transcendental function, we must appro- priately modify the inversion procedure. If the denominator of the transform contains exponential functions of s, it cannot be factored because the exponential function introduces an infinite number of factors. On the other hand, we can handle exponential terms in the numerator of the transform, as we shall now see. 28 Chapter 2 Mathematical Tools for Control Systems Analysis Consider the case in which there is a single exponential term that can be factored as follows: Y(s) = Y,(S)C”‘O (2-2.15) The correct procedure is to expand in partial fractions the portion of the transform that does not contain the exponential term. Y,(s) = A l+ A2 A- . ..+L+ (2-2.16) s - rl s - r2 s - r, Then invert this expression. y,(t) = A,erlt + A2er@ + . . . + A,e’n’ (2-2.17) Now invert Eq. 2-2.15, making use of the real translation theorem, Eq. 2-1.8. y(t) = .2e-‘[e-~roY,(s)] = y,(t - to) = Aled-fo) + AzerzWo) + . . . + A ern(t-h)n (2-2.18) It is important to realize that the exponential term must be excluded from the partial fractions expansion procedure. Although inclusion of the exponential term in the partial fractions expansion may give the correct result in some special cases, doing so is fun- damentally incorrect. Next let us consider the case of multiple delays. When there are more delay terms than one in the numerator of the transform, proper algebraic manipulation will convert the transform into a sum of terms, each having a single exponential function: Y(s) = Y,(s)e-stol + Y2(s)e-sfo2 + . . . (2-2.19) Expand each of the sub-transforms-Y,(s), Y2(s), and so on-in partial fractions and invert them separately, leaving out the exponential terms. Finally, apply Eq. 2-2.18 to each term to produce the result Y(O = y,(t - to’) + y*(t - to*) + . . . The following example illustrates this procedure. Given the differential equation de(t) 7 + 2c(O = f(t) with c(O) = 0, find the response of the output for 2-2 Solution of Differential Equations Using the Laplace Transform 29 * 0 0 1 t (a) 1 2 3 4 5 6 7 t (b) Figure 2-2.1 Input functions for Example 2-2.2. (a) Delayed unit step, u(t - 1). (b) Staircase of unit steps. (a) A unit step change at t = l:f(t) = u(t - 1) (b) A staircase function of unit steps at every unit of time f(t) = u(t - 1) + u(t - 2) + u(t - 3) + * . . The functions are sketched in Fig. 2-2.1 SOLUTION (a) Transform the differential equation, solve for C(s), and substitute F(s) = (l/s)e-“. C(s) = -+& F(s) = & f e-3 Let C(s) = C,(s)e-“, and then invert C,(s). 11 A A C,(s) = - - = 1 + 2 s+2s s+2 s 1 1 A, = J’, (s + 2) (s = - 2 1 1 A,=lzs(~=2)s 30 Chapter 2 Mathematical Tools for Control Systems Analysis Invert by matchingentries in Table 2-1.1. c,(t) = -i emzt + i u(f) = i u(t)[l - e-2t] Apply Eq. 2-2.18. c(t) = 2P’[C,(s)e-s] = c,(t - 1) = i u(t - l)[l - e-*+i)] Note that the unit step u(t - 1) must multiply the exponential term to show that c(t) = Ofort< 1. (b) For the staircase function, as> = -& [ I( e-s I e-*S I ec3S I . . . s s s > 1= [ 1(s + 2)s (e-s + e-*S + e-3s + . . .) = C,(s)e-” + C,(s)e-2s + C,(s)e-3s + . . . We note that C,(s) is the same as for part (a), and therefore c,(t) is the same. Applying Eq. 2-2.18 to each term results in c(t) = c,(t - 1) + c,(t - 2) + c,(t - 3) + . . . 1=- 2 u(t - l)[l - e-2(r-1)] + i u(t - 2)[1 - em*@-*)] + i u(f - ~3)[1 - e-X-3)] + . . . The preceding example illustrates how to handle time delays in the input function. The same procedure can be applied when the time delay appears in the transfer function of the system. This situation arises in Chapter 3 in the models of processes with trans- portation lag. 2-3 CHARACTERIZATION OF PROCESS RESPONSE In the preceding section, we learned that we can express the Laplace of the process output variable as the product of two terms: a transfer function, which is characteristic of the process, and the transform of the input signal. A major objective of this section is to relate the characteristics of the response of the output variable to the parameters of the process transfer function and, in particular, to the roots of the denominator of 2-3 Characterization of Process Response 31 the transfer function. We will see that most of the important information about the process response can be obtained from these roots, and it is not in general necessary to obtain the exact solution to each problem. The relevant questions about the output response are the following: l Is the response stable? That is, will it remain bound when forced by a bound input? l If stable, what will be its final steady-state value? l Is the response monotonic or oscillatory? l If monotonic and stable, how long will it take for the transients to die out? l If oscillatory, what is the period of oscillation and how long will it take for the oscillations to die out? We will see that we can obtain the answers to all these questions from the parameters of the transfer function of the system. But first, let us formally define deviation variables and see how their use, combined with the assumption of steady-state initial conditions, allows us to eliminate the effect of the initial conditions on the response. 2-3.1 Deviation Variables In Section 2-2 we saw that the response of the output variable is affected not only by the input variables but also by its initial conditions. Because we are interested in study- ing the response of processes and their control systems to the input variables (distur- bances and manipulated variables, defined in Chapter l), we want to eliminate the effect of the initial conditions on the response. To do this, we assume that the initial conditions are at steady state. This makes the initial values of the time derivatives equal to zero, but not the initial value of the output itself. To eliminate the initial value of the output, we replace the output variable with its deviation from the initial value. This gives rise to deviation variables, which we defined as Y(t) = YW - Y(O) (2-3.1) Y(t) = deviation variable y(t) = total value of the variable In the balance of this book, deviation variables will be represented by capital letters and absolute variables by lower-case letters, whenever possible. From the definition of a deviation variable, its initial value is always zero: Y(O) = y(O) - y(O) = 0. To illustrate the simplifications that result from the use of deviation variables, con- sider the nth-order linear differential equation: a m+am ’ dt” d”-‘y(t) + n 1 &n-l . . . + a&t) = b d”W) m dt”’ + b _ d”-‘x(t) -+m ’ &-I . . . + b+(t) + c (2-3.2) 32 Chapter 2 Mathematical Tools for Control Systems Analysis where n > m, y(t) is the output variable, x(t) is the input variable, and c is a constant. At the initial steady state, all the time derivatives are zero, and we can write q&O) = b&O) + c (2-3.3) Subtracting Eq. 2-3.3 from Eq. 2-3.2 results in u d”yo+u- d*-‘Y(t) n dt” -+n ’ &n-l . * * + a,Y(t) = b d’W) + b m dtm _ d”- ‘X(t) +-m 1 &r-l . . . + b,,X(t) (2-3.4) where Y(t) = y(t) - y(O), X(t) = x(t) - x(O), and the deviation variables can be di- rectly substituted for the respective variables in the derivative terms because they differ only by a constant bias. dkyo = dkbW - u(O)1 dky(t) dky(O> dky(t)=--- =- dtk dtk dtk dtk dtk Note that Eq. 2-3.4 in the deviation variables is essentially the same as Eq. 2-3.2 in the original variables except for constant c, which cancels out. This result is general. 2-3.2 Output Response To show the relationship between the output response and the roots of the denominator of the transfer function, let us Laplace transform the nth-order differential equation in the deviation variables, Eq. 2-3.4, and solve for the transform of the output. P + bmelsm-l + . . . + b O X(s)u,P + a,-,F’ + . * * + a, 1 (2-3.5) where we have made use of the fact that all the initial conditions are zero. The expres- sion in brackets is the transfer function; its denominator can be factored into II first- degree terms, one for each of its roots. Y(s) = bmsm + bm-lsm-’ + . . . + b,a,@ - rJs - T-J . * * (s - rn)1 X(s) (2-3.6) where r,, r,, . . . , r,,, are the roots of the denominator polynomial. Besides the y1 factors shown in Eq. 2-3.6, there are additional factors introduced by the input variable X(s) that depend on the type of input (step, pulse, ramp, and so on). Next we expand the transform in partial fractions. Y(s) = A A1+2+...+ An + [terms of X(s)] (2-3.7) s - t-1 s - r2 s - rn 2-3 Characterization of Process Response 33 Finally, we invert the transform by matching entries in Table 2-1.1 to obtain the re- sponse as a function of time. If there are no repeated roots, the inverse is Y(t) = Alerlt + Apt + + . . + A&a’ + (terms of X) (2-3.8) The first II terms on the right-hand side come from the transfer function, and the rest of the terms differ depending on the input function X(t). If any of the roots is repeated m times, then its coefficient is replaced by a polynomial in t of degree m - 1, as shown in the preceding section. The total number of terms will of course be IZ, counting the terms in the polynomial of t. Let us next answer the questions posed at the beginning of this section by analyzing Eq. 2-3.8. We consider first the case in which all the roots are real and then the pos- sibility of complex conjugate pairs of roots. All Real Roots If all the roots are real, then the terms of Eq. 2-3.8 are simple exponential functions of time that can only grow with time if the root is positive or decay to zero if the root is negative. Therefore, real roots cannot cause the response to oscillate. Furthermore, if any of the roots is positive, the response will grow exponentially without bound, so it will be unstable. You might ask, what if the coefficient of the term with the positive root is zero? The system is just as unstable; a zero coefficient merely means that for a particular input it may not run away (like a pencil standing on its sharpened point), but the slightest deviation from equilibrium will cause it to run away from that position. Thus, in answer to our initial questions, if all the roots of the denominator of the transfer function are real, then l The response is monotonic (nonoscillatory). l It is stable only if all the roots are negative. Figures 2-3.1~ and b are, respectively, examples of stable and unstable monotonic responses. Regarding the time it takes for the transients to die out, we can see that each expo-
Compartilhar