THE DESIGN OF A DIRECT DIGITAL CONTROLLER FOR SAMPLED-DATA SYSTEMS by OGBONNA CHARLES OKORAFOR M.A.Sc, The University of British Columbia, Vancouver, Canada, 1980 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES (Chemical Engineering Department) We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA April 1982 © Ogbonna Charles Okorafor, 1982 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of Ctfem ICA L iroee/ii <QQ The University of British Columbia 1956 Main Mall Vancouver, Canada V6T 1Y3 Date p Sr 106 I &3-DE-6 (3/81) Leaf ii missed in numbering iii ABSTRACT This study is made up of three parts viz: 1. For a process which can adequately be modelled as second-order overdamped with pure delay, design techniques are presented for choosing the loop gain and sampling rate of the proportional, feedback, sampled-data controller. Control of an experimental higher-order system is used to verify these suggested designs. 2. Discrete control algorithms, suitable for programming in a direct digital control computer, are presented. Digital compensation algorithms are derived to yield theoretically a response with finite settling time, when the system is step forced in either set point or load. The utility of the proposed designs is experimentally verified by application to a higher order (heater-heat exchange) process whose dy namics can be described as fourth order overdamped with pure dead time. 3. Finally, this study is concerned with the problem of designing an adaptive controller for a class of single-input single-output time-invariant linear discrete systems modeled as second-order overdamped with pure delay. In each case the effect of using either a zero-order hold or half-order hold as the smoothing device was considered. In every case the system with half-order hold gave better transient responses than systems with zero-order hold and better stability conditions. iv TABLE OF CONTENTS page AUTHORIZATION ii ABSTRACT iiTABLE OF CONTENTS v LIST OF TABLES vii LIST OF FIGURES viiACKNOWLEDGEMENT xiv CHAPTER ^ 1. INTRODUCTION , . 1 2. LITERATURE REVIEW 8 2.1 Adaptive Direct Digital Control... ... 12 3. RESEARCH OBJECTIVES 14 4. SAMPLED-DATA PROPORTIONAL CONTROL OF A CLASS OF STABLE PROCESSES ................ 20 4.1 Analysis of System... 24.1.1 Overdamped Second-Order System with Zero-Order Hold . V.. 20 4.1.2 Second-Order Overdamped System with Half-Order Hold 34 4.1.3 Control System with Dead Time 40 4.1.3a Control System with Dead Time for Zero-Order Hold Circuit 41 4.1.3b Analysis of System with Dead Time for Half-Order Hold 46 4.2 Transient Response of System 49 4.2.1 Transient Response of Second-Order Over-damped with Zero-Order Hold 52 4.2.2 Transient Response of Second-Order Over-damped with Half-Order Hold 60 V Chapter page 4.2.3 Second-Order Overdamped Plus Dead Time 65 4.2.4 Control System with Zero-Order Hold 68 4.2.5 Control System with Half-Order Hold 73 4.3 Experimental Equipment 81 4.4 System Identification and Initialization 84 4.4.1 Identification by Graphical Method 84 4.4.2 Quasilinearization Method • 86 4.5 Experimental Result... 87 5. DIGITAL COMPENSATION DESIGN 95.1 Deadbeat (Minimal Prototype) Performance Design 97 5.1.1 Development of Algorithm 100 5.1.2 Compensator Design for System with Zero-Order Hold 101 5.1.3 Compensator Design for System with Half-Order Hold 113 5.2 Application of Combined Optimum Contol and Prediction Theory to Direct Digital Control 135 5.2.1 Analysis and Design of Control System with Zero-Order Hold 136 5.2.2 Analysis and Design of Control System with Half-Order Hold.......... . .. 140 5.3 Improved Proportional Controller 154 5.3.1 Improved Proportional Controller of System with . Zero-Order Hold 155 5.3.2 Improved Proportional Controller of System with Half-Order Hold 157 6. ADAPTIVE CONTROL 166 6.1 Parameter Estimation by a Modified Moments Method 170 6.2 Compensator Design 174 6.3 Implementation and Experimental Result 175 vi page 7. DISCUSSION AND CONCLUSION 181 7.1 Discussion 187.1.1 Analysis of Proportional Control 181 7.1.2 Compensator Design 183 7.1.3 Adaptive Control 4 7.2 Conclusion 185 7.3 Recommendation 186 NOMENCLATURE 188 BIBLIOGRAPHY 191 APPENDICES 7 1. HALF-ORDER HOLD TRANSFER FUNCTION DERIVATION 197 2. STATE VARIABLE DERIVATION AND PARAMETER DEFINITION FOR CONTROL SYSTEM WITH HALF-ORDER HOLD 201 3. RELATIONSHIP BETWEEN <j> AND DECAY RATIO INDEX . 212 4. PARAMETER DEFINITIONS FOR CONTROL SYSTEM WITH ZERO-ORDER HOLD . . 214 5. SYSTEM IDENTIFICATION AND INITIALIZATION IDENTIFICATION BY GRAPHICAL METHOD . 216 6. IDENTIFICATION BY QUASILINEARIZATION METHOD 229 7. , THEORY OF VARIABLE GAIN METHOD OF DESIGN 238 8. DEADBEAT COMPENSATOR DESIGN FOR CONTROL SYSTEM WITH ZERO ORDER HOLD 244 9. DEADBEAT COMPENSATOR DESIGN FOR CONTROL SYSTEM WITH WITH HALF—ORDER HOLD 258 10. OPTIMUM DESIGN OF CONTROL SYSTEM BY DYNAMIC PROGRAMMING .. 277 11. ZERO-ORDER HOLD PARAMETER DEFINITION 289 12. NOISE SENSITIVITY ANALYSIS 293 13. HEAT EXCHANGER DIAGRAM 9 vii LIST OF TABLES page 4.1 Output Response of Process with Dead Time Component 40 4.2 Loop Gain as a Function of Sampling Time for the Two Performance Indices: (Control System with Zero-Order Hold) 59 4.3 Loop Gain as a Function of Sampling Time for the Two Performance Indices: (Control System with Half-Order Hold) 66 4.4 Loop Gain as a Function of Sampling Intervals Used for Various Performance Index Values and Sampling Time (Zero-Order Hold) 69 4.5 Loop Gain as a Function of Sampling Intervals Used for Various Performance Index Values and Sampling Time (Half-Order Hold) 74 A5.1 Transient Response Data for Process Reaction Curve........ 218 A5.2 Table of Coefficients (V. Strejc) .222 viii LIST OF FIGURES page 4.1 Block Diagram of Sampled-Data Feedback Control System 21 4.2 Input and Output of Sample and Zero-Order Hold 22 4.3 Typical Signal Flow Graph 25 4.4 Signal Flow Diagram of Equation (4.8a) 25 4.5 Signal Flow Diagram of Equation (4.8b)4.6 Signal Flow Diagram of Equations (4.8a) and 4.8b) Combined 27 4.7 Control System Signal Flow Diagram 24.8 Stability Constraint of Sampled-Data Second Order System with no Dead Time as a Function of Sampling Rate for Various Ratios of the Time Constants 33 4.9 Input and Output of Sample and Hold of Half-Order... 36 4.10 Signal Flow Graph of Equation (4.33) 37 4.11 Stability Constraint of Sampled-Data Second Order System with no Dead Time as a Function of Sampling Rate for Various. Ratios of Time Constant>2 to Time Constant 1 ..... 39 4.12 The Stability Boundary of a Sampled-Data System with Zero-Order Hold as a Function of Dead Time 45 4.13 The Stability Boundary of a Sampled-Data System with Half-Order Hold as a Function of Dead Time 50 4.14 Signal Flow Graph of Equation (4.74) 55 4.15 Transient Response of Uncompensated Sampled-Data Second-Order Process with no Dead Time for a Unit Step Change for Different Sampling Rates 53 4.16 Control System with Proportional Controller 55 4.17 Closed Loop Transient Response of Compensated Sampled-Data Second-Order Process with Zero-Order Hold for a Unit Step Change for Different Sampling Rates 57 ix page 4.18 Closed Loop Transient Response of Compensated Sampled-Data Second-Order Over Damped Process with Zero-Order Hold and no Dead Time for a Unit Step Change for Dif ferent Sampling Rates 58 4.19 Open Loop Transient Response of Sampled-Data Second-Order Process with no Dead Time for Different Sampling Rates (Half-Order Hold) 61 4.20 Closed Loop Transient Response of Sampled-Data Second-Order Process with no Dead Time for Different Sampling Rates (Half-Order Hold) 63 4.21 Closed Loop Transient Response of Sampled-Data Second-Order Process with no Dead Time for Different Sampling Rates (Half-Order Hold) 67 4.22 Transient Response of Uncompensated Zero-Order Hold Control System 72 4.23 Transient Response of Compensated Zero-Order Hold Control System with Performance Index as Parameter 77 4.24 Transient Response of Uncompensated Half-Order Hold Control System 78 4.25 Transient Response of Compensated Half-Order Hold Control System with Performance Index as Parameter......... 79 4.26 Schematic Diagram of Equipment 82 4.27 Process Reaction Curve........................;....;......... 85 4.28a Experimental Closed-Loop Transient Response of Sampled-Data System for a 2% Step Change in Load (Half-Order Hold) 88 4.28b Manipulative Variable Response of Sampled-Data System for a 2% Step Change in Load (Half-Order Hold) 89 4.29a Experimental Closed-Loop Transient Response of Sampled-Data System for a 3°C Step Change in Set Point (Half-Order Hold). 90 4.29b Manipulative Variable Response of Closed-Loop Sampled-Data System for 3°C Step Change in Set Point (Half-Order Hold) 1 4.30a Experimental Closed-Loop Transient Response of Sampled-Data System for a 2% Step Change in Load (Zero-Order Hold) . 93 X page 4.30b Manipulative Variable Transient Response of Closed-Loop Sampled-Data System for a 2% Step Change in Load (Zero-Order) 94 4.31a Experimental Closed-Loop Transient Response of Sampled-Data System for a 3°C Step Change in Set Point (Zero-Order Hold) 95 4.31b Manipulative Variable Transient Response of Closed-Loop Sampled-Data System for a 3°C Step Change in Set Point (Zero-Order Hold) • 96 5.1 State-Variable Diagram of Control System with Zero-Order Hold) 102 5.2 Schematic Block Diagram of Control System with Digital Controller.... ... 110 5.3 Signal Flow Graph of Control System with Digital Controller (Zero-Order Hold) ' 110 5.4 Transient Response of Compensated Control System with Zero-Order Hold Ill 5.5 Transient Response df Compensated Control System with Zero-Order Hold.... 112 5.6 State-Variable Diagram by Cascade Programming Method...... 114 5.7 Schematic Block Diagram of System with Digital ' . Controller.......................... ..122 5.8 Signal Flow Graph of Control System with Digital Controller (Half-Order).... 122 5.9 Transient Response of Uncompensated Controlled System with Half-Order Hold.... 123 5.10 Transient Response of Compensated Controlled System with Half-Order Hold .. 124 5.11a Transient Response of Digital Controlled Sampled-Data System with Zero-Order Hold for a 2% Step Change In Load Variable (Steam Pressure) 127 5.11b Manipulated Variable Response of System (Zero-Order Hold) for a 2% Step Change in Load Variable (Steam Pressure) 128 xi page 5.12a Transient Response of a Digital Controller Sampled-Data System with Zero-Order Hold for 4% Step Change in Set Point . 129 5.12b Manipulated Variable Response of System (Zero-Order Hold) for a 4% Step Change in Set Point 130 5.13a, Transient Response of a Digital Controlled Sampled-Data System with Half-Order Hold for 2% Step Change in Load Variable (Steam Pressure) 131 5.13b Manipulated Variable Response of System for 2% Step Change in Load Variable (Steam Pressure).... 132 5.14a Transient Response of a Digital Controlled Sampled-Data System with Half-Order Hold for 4% Step Change in Set Point. . . 133 5.14b Manipulated Variable Response of System for a 4°C Step Change in Set Point 134 5.15 State-Variable Diagram of Control System by Iterative Programming Method 138 5.16 . State-Variable Diagram of Control System with Analytical Predictor 138 .5.17 State-Variable Diagram of Control System......... •. ........ 141 5.18 State-Variable Diagram of Control System with Analytical Predictor ." 144 5.19a Optimum Control of Sampled-Data System with Zero-Order Hold for, a 5°C Step Change in Set Point ... 146 5.19b Manipulated Variable Response of Sampled-Data System with Zero-Order Hold for a 5°C Step Change in Set Point 147 5.20a Optimum Contol of Sampled-Data System with Zero-Order Hold for a 2% Step Change in Load Variable (Steam Pressure) 148 5.20b Manipulated Variable Response of Sampled-Data System With Zero-Order Hold for a 2% Step Change in Load Variable (Steam Pressure); 149 5.21a Optimum Control of Sampled-Data System with Half-Order Hold for 5°C Step Change in Set Point 150 xii page 5.21b Manipulated variable response of sampled-data system with half-order hold for 5°C step change in set point 151 5.22a Optimum control of sampled-data system with half-order -hold for a 2% step change in load variable (steam pressure) 152 5.22b Manipulated Variable Response of Sampled-Data System with Half-Order Hold for a 2% Step Change in Load Variable (Steam Pressure) 153 5.23 State-Variable Diagram of Control System and Predictor.... 156 5.24 State-Variable Diagram of Control System with Analytical Predictor 159 5.25a Experimental.Closed-Loop Response of Improved Proportional Control of a Sampled-Data System with Zero-Order Hold for a 3°C Step Change in Set Point 162 5.25b Manipulated Variable Response of Closed-Loop Improved Proportional Control of Sampled-Data System with Zero-Order Hold for 3% Step Change in Set Point 163 5.26a Experimental Closed-Loop Response of Improved Proportional Controller of Sampled-Data System with Half-Order Hold for a 3°C Step Change in Set Point... .164 5.26b Manipulated Variable Response of Improved Proportional Control of Sampled-Data System with Half-Order Hold for a 3°C Step Change in Set Point. 165 6.1 Flowsheet of On-line Parameter Identification. 167 6.2 Noise Sensitivity as a Function of Laplace Transform Operator 173 6.3a Adaptive Control Response of a Sampled-Data System with Zero-Order Hold 176 6.3b Manipulated Variable Response of Sampled-Data System with Zero-Order Hold Adaptive Controller 177 6.4a Adaptive Controller Response of a Sampled-Data with Half-Order Hold 179 6.4b* Manipulated Variable Response of Sampled-Data Adaptive Controller 180 xiii page Al.l Impulse Response of Half-Order Hold 198 A2.1 Signal Flow Diagram...! 200 A5.1 Process Reaction Curve for a 10% Step Change in Steam Pressure , 219 A5.2 Approximate Estimation of Transfer Function Parameters Strejc Method 220 A5.3 Fitting Transient Response to a Second-Order with Dead Time Model by Oldensbourg an Sartorius Method...... 225 A5.4 Oldenbourg and Sartorius Diagram for Equivalent Time Constants from Process Reaction Curve for Second-Order Process • 226 A5'.5 Determination of Time Constants for the System Modelled as a Second-Order Plus Dead Time Process 228 A7.1 A Digital Control System........ . 239 A8.1 State-Variable Diagram by Iterative (Cascade) Programming Method . 245 A8.2 The State-Variable Diagram of the Digital Controller 256 A8.3 Control System with Digital Controller and State-Space ' , Representation....... 25A9.1 State-Variable Diagram by Iteration (Cascade) Programming Method 259 A9.2 Control System with Digital Controller and State-Space Representation... 268 xiv ACKNOWLEDGEMENTS I wish to place on record my sincere gratitude to Dr. K.L. Pinder, under whom this investigation was conducted, for his guidance in helping to carry out this project. I wish to thank Mrs. H. Pinder for her motherly love and care for me during the course of my stay in Canada. I would like to express my deep appreciation for the assistance of all those men in Chemical Engi neering Department workshop and stores during the equipment design and fabrication. My thanks to Marlene and Kathrine, secretaries to Chemical Engineering Department and also to Laurie and Elizabeth Truant for their concern during my course of study. My grateful acknowledgement is also due to my mother, Mrs. F.N. Okorafor for her love and also to my guardian, Mr. H. Skeokoro, who has been more of a father to me. I dedicate this, work to the memory of Chineme Onyekere (Nee Nkere) who unfortunately left this world a month before the completion of this work. Praises and adoration to God and my Saviour Jesus Christ for the guidance and protection I have received all through my life till now. CHAPTER 1 INTRODUCTION Control may be defined as the organisation of activity for a purpose. If one defines a system as an identifiable entity and auto matic as meaning self-acting, then an automatic control system is a self-acting indentifiable entity in which the activity is organised for some purpose. According to this definition, the first automatic control systems were living organisms, but today in addition to living things there are organisations of living things and systems devised by living things, all of which are automatic systems. Thus an amoeba is an auto matic control system and so is a modern political state or an industrial corporation. Regardless of their great diversity all control systems have five characteristics in common, viz: all control systems are time varying systems, and their temporal behaviour is a measure of their performance; they all ingest signals, digest signals, manipulate and generate signals; their design and analysis must involve a holistic or system approach; most control systems must involve signal feedback and finally any control system containing feedback circuits has the possibi lity of becoming unstable even though each of the elements comprising the system is itself quite stable and incapable of runaway. Control systems for the Chemical Engineer can be broken into many parts to simplify their presentation. The most common classifications are open loop, closed loop, set point, averaging, cascade, and optimising. In open loop control, there is no feedback from output to input. The ratioing of two flows is often accomplished by an open-loop system. The most common kind of closed-loop control is regulatory control, where one is primarily interested in holding a particular process variable within narrow limits. Most flow and'temperature control systems fall within this group, as do endpoint control systems, which make use of analyzers. Averaging level control is one of the most common types. In these control systems the level in a tank between process units is allowed to vary in order to make up for differences in flow between one unit and the next. In most cases, the control simply prevents the tanks from flowing over, or running dry. Cascade control systems are very popular in the industries. The primary purpose of control is to eliminate the effects of minor disturbances. Optimising (adaptive) control systems vary the set points, flow ratios, etc. as the conditions in the plant vary. The process to be controlled must supply one with a variable that is either directly or indirectly indicative of the quality of the process that one wishes to control. It must also supply a quantity that can be varied in order to effect the desired control. Both of these, the measurement of the measured variable, and the change of manipulated variable, have certain speed requirements. They must both be capable of being accomplished fast enough to effect the desired control. Without this, the controller will be incapable of doing its job regardless of how expensive, exotic and complex it may be. Essentially, automatic (process) control can be divided into two major classes, — the continuous (analog) system and the sampled-data 3 (discrete) system. A sampled-data control system is one in which the control signal in a certain portion of the system is supplied intermittently at a constant rate. In this control system the data signal at one or more points is a sequence of pulses which are modulated in accordance with the continuous function of the signal from which the samples are taken. It is assumed that these pulses convey adequately all the essential information contained in the continuous function. The design of a process control system generally involves three steps: identification of the process, stochastic analysis, and compen sator design. The identification requires a strict delimitation of that part of the physical universe which is under consideration, and the relevant concept is the thermodynamic principle of states, according to which all properties of a system are fixed when a certain few properties of the system are fixed. "In most processes accurate identification is rarely possible due to uncertainty of the process measurements. In addition, many feedback quantities are based on sampled data systems (analyzers, chromatographs, etc) and laboratory tests. The sampling systems have themselves inherent error. Moreover, identification through a deterministic model does not take into account disturbance inputs. These inputs are heuristic in nature and directly affect the accuracy of the control system." If for no other reason, these unpredictable load changes require some form of feedback action or model adaptation or both. To model these uncertainties, the use of stochastic estimation analysis is always suggested. The realm of the approach is based upon the theory of probability and statistics. It is assumed that the disturbance inputs as well as the sensor errors can be approximated A by the random process known as Gaussian white noise. This means that, mathematically the random processes have a mean value of zero, they are independent of each other, and they have known covariance matrices. In the wider concept of compensator design, six criteria must be 2 6 satisfied for effective control: (i) Ability to maintain the controlled variable at a given set point. This most essential requirement of process control is often the most difficult to fulfill as it creates mathematical difficulties for most of the optimization algorithms proposed thus far. (ii) Set-point changes should be fast and smooth. As the over all system may be slow and complex, it is' important for the operator to be able to perform individual set-point changes as fast as possible. However, minimum time res ponse often leads to large excursions in the system tran sient response, which is in contrast to a smooth response (or low overshoot) which has a significant advantage, (iii) Asymptotic stability and satisfactory performance for a wide range of frequencies: The total system (not neces sarily the controller) should obviously be asymptotically stable to be suitable for operator control. This condi tion should be achieved even though the process parameters may change within a range of system parameter values. Furthermore, the closed-loop transfer function frequency response should not have peaks indicating strong amplification of certain input signals. This means^that 5 the maximum amplification in the transfer function from disturbance input to process output should be low. (iv) The controller should be designable with a minimum of information with respect to the nature of the input and * the structure of the system. In many cases of process control, a rather imprecise knowledge of the nature of the disturbances and their variation with time is known. It is being suggested that care should be taken that the control action achieved in theory is not strongly depen dent on that part of the model which is inaccurate. Consider, for example, a distributed-parameter system (as for example, a heat exchanger), which features both mixing processes and transport delays. For mixing studies, it can be successfully modeled as a series of three stirred tanks. However, a design of an optimal controller for three stirred tanks might lead to a controller which combines derivative action with a very high gain. While this will function well in three stirred tanks, it will lead to instability in the real system due to the finite time lags involved, (v) The controller should be insensitive to change in system parameters: In a real control situation the parameters of the system and noise parameters are not accurately known and, in addition, often change with time. The controller must be able to handle reasonable changes, with a suffi cient stability margin. The reason for this requirement 6 is twofold. First, the throughput through process equip ment changes due to varying overall needs of the plants. That means in a process with a time lag the controller i must be able to perform while the actual time constants of the system change, and these changes are in no way negli gible. The second reason is due to the assumption made of linear system equations which are often a linearization around a steady state and when the steady state set-point is changed these linearized system parameters may change significantly. (vi) Excessive control action should be avoided: There are two main reasons for limiting the control effort. The first is mathematical. When dealing with a linear problem it is often common to neglect One important non-linearity, the finite limits on the magnitude of allowed control signals. To avoid errors, reasonable limits on magnitude of control must be placed or the nonlinearity should be accounted for in the design. During the past three decades, attention has been placed on the design of controllers that can operate at varying process conditions giving rise to an optimum result. This modern control theory (optimal control) has been mostly applied to adaptive control. Adaptive control implies the ability of a control system to change its own parameters in response to a measured change in operating conditions. These control systems are distinguished by their ability to compensate automatically 7 for either changes in the system input, such as a change in the signal-to-noise ratio, or changes in the system parameters, such as a change due to environmental variations. In recent years, a number of methods for adaptive control system design have been suggested. According to the way that adaptive behaviour is achieved, adaptive control systems may be divided into input-sensing adaptation, plant-sensing adaptation, and performance-criterion-sensing adaptation; alternately, they may be classified mainly as passive adaptation, system-parameter adaptation, and system characteristic adaptation. Control systems with passive adaptation achieve adaptive behaviour without system parameter changes, but rather through design for operation over wide variations in environ ment. Examples of control systems of this nature are the conventional feedback systems and the conditional feedback systems. Control systems with system-parameter adaptation adjust their parameters in accordance with input-signal characteristics or measurements of the system vari ables. Control systems with system-characteristic adaptation achieve adaptive behaviour through measurement of transfer characteristics. A useful approach to the design of adaptive control systems generally involve three basic principles: (i) provision of a means for continuous measurement of system dynamic performance; (ii) continuous evaluation of the dynamic performance on the basis of some predetermined criterion; and (iii) continuous re-adjustment of system parameters for optimum operation by using the measured and evaluated results. 8 CHAPTER 2 LITERATURE REVIEW In the evaluation of a control system, two questions have to be considered: whether the control system is stable, and whether or not the quality of control attained is good. Quality of control involves the ability of the control system to damp out quickly the effect of a disturbance on the plant. Unlike stability, quality is not a well defined concept and many different criteria have been suggested and used for' it by control system designers. The controller setting that causes deadbeat performance after stepforcing has been widely used in the 7 7 5 literature (Callander et_ al; Ziegler and Nichols; Oldenbourg and 52 72 Sartorius; and Wolfe .) as one criterion for optimum quality control. Deadbeat return (performance), sometimes known as critical damping, is the fastest possible response of the controlled variable which involves no undershoot and/or overshoot of the steady state value. Deadbeat performance is not restricted to stepforcing inputs but includes the response to parabolic inputs with minimum-squared error restrictions on ramp and step responses (Pokoski and Pierre).^S Yih-Shuh74 used time polynomial forcing inputs in his design. Chien et_ ad. considered this criterion along with one which requires 20% undershoot. Cohen and 9 5 8 Coon, and Ream found controller settings by specifying the subsidence ratio of the fundamental component in the closed-loop transient response. The minimization bf the integral square of the controlled variable from zero to infinity as a function of the controller para-22 6 9 meters was suggested by Hazebroek and van der Waerden, and Wescott. 9 Wills postulated that the integral of either the absolute value of the controlled variable or the absolute value of the controlled variable multiplied by time should be minimized as a function of the controller parameters. It is worth noting that all the integral criteria can only be used in cases where integral control is involved, otherwise the cri teria will give rise to divergent controller modes which may result in unstable control systems. In all of the above mentioned studies, with the exception of that of Wills, the plant step (transient) response was simulated by either a delayed ramp function or the response of a first-order transfer stage plus a deadtime. McAvoy and Johnson used an underdamped second-order stage plus deadtime, which according to them, is more realistic than the other two, since it accounts for the inertia present in physical systems and it allows a more flexible matching of the plant's characteristics. 3 3 Latour et al., used an overdamped second-order model plus deadtime. This model has been used to represent the dynamic response of liquid-liquid and gas-liquid extractors (Biery and Boylan; Gray and Prados ), mixing in agitated vessels (Marr and Johnson ), some heat exchangers 2 3 5 (Hougen) , distillation columns (Lupfer and Parsons; Moczeck et 4 2 6 2 3 2 al., Sproul and Gerster ), and some chemical reactors (Lapse, 3h 39 59 Lupfer and Oglesby; Mayer and Rippel; Roquemore and Eddey ). All the aforementioned models have been applied to continuous (analog) control systems. With the increase in the use of digital comp uters for controlling process systems, study of sarapled-data control systems and design of direct digital control — which means putting the computer and process together so that the process reports to the 10 computer and the computer issues commands to the process — algorithms have presented interesting and challenging problems. Several authors have presented direct digital algorithams for lumped-parameter systems (Mosler et al.,W Moore e_t al. ,hh Luyben.,36 Dahlin13). Most of these published control algorithms used a first-order plus deadtime transfer stage model and a sampler plus a zero-order hold as the smoothing device. A lot of papers have appeared on continuous feedback control of 27 distributed parameter systems. Koppel considered continuous nonlinear feedback control of tubular chemical reactors and heat exchangers. 28 Koppel et_ al_., reported theoretical and experimental results on two-point linear control of a flow-forced heat exchanger and extended the principle to other parametrically forced distributed parameter systems. 55 Paraskos: et al., reported on an algorithm which they considered su perior to conventional Ziegler-Nichols settings from experimental study of feed forward computer control of a flow-forced heat exchanger. In their paper Seinfeld et_ al.^ showed useful results on offset and stability of a flow-forced isothermal tubular reactor system under proportional feedback, feedforward, and optimal controls. They stated that the system is stable, irrespective of the value of the proportional gain. Oscillations in outlet concentration increased as the propor tional gain was increased; however, there was an upper limit on the gain because of the physical requirement that the velocity should be greater than zero. Very few researchers have worked on feedback sampled-data control of distributed-parameter systems (Palas;51+ Hasson et al. ,21 49 Mutharasan, et al. ). 11 The stability of sampled-data systems containing delay time has been verified by Tou,64 Truxal,67 Tsypkin.68 They showed that, "for a given system and sampling rate, the ultimate loop gain is observed to increase initially as delay time is added to the system. This ultimate gain passes through a maximum and then decreases as the amount of delay time in the system is further increased." These investigators examined systems containing no hold circuit after the sampler, but this unexpec ted phenomenon has been shown by Mosler et al.1*7 to exist in the presence of hold (zero-order). It has been proposed that, below the maximum gain, addition of delay time stabilizes the loop, since the 1 8 ultimate gain is increased. This proposal has been proved to be in 47 6 29 error by Mosler et_ al_. Buckley and Kou examined systems for which the delay time is equal to an integral number of sampling periods and then designed a digital compensator such that the settling time for the output sequence at the sampling instants is minimized for a given class of disturbances. Several alternative methods for tuning continuous controllers of processes characterized by a single time constant and delay have been 4 7 published by some authors (9, 10, 11, 39, 76). Mosler et_ al_. extended this work into the sampled-data domain by offering a systematic proce dure for choosing the gain and sampling rate of a sampled-data, propor tional controller, using a zero-order hold. Their method is limited to processes which may be adequately described as first-order with delay. They also showed that in the absence of load disturbances extremely "slow" sampling intervals can be used and a decay ratio of four to one can still be obtained. Allen, P.1 confirmed this finding. Soliman and 12 Al-ShaikhOA showed that by using a first-order with delay, that it is possible to estimate the bounds on the values of the controller con stants. It is worth mentioning that the frequency and duration of samp ling is no longer as critical as it used to be since the introduction of microcomputers and microprocessors in process control. Choosing a suitable sampling interval for direct digital control is an important additional variable. A simple rule to follow would be to sample sufficiently quickly to ensure that the sampled part of the 7 3 control loop behaves like a continuous system. Yetter and Saunders studied a number of systems and found that for the continuous case the closed loop cycled with a period between 10 seconds and 640 seconds for 95% of the types of loops generally found in chemical processes. They showed that to satisfy the requirement mentioned above the sampling period must be one eighth of the loop period. This means that the available sampling periods must be In the range of one second to 80 seconds. The application of this procedure for determining the required sampling rate, involves some information on the dynamics as well as off-line simulation tests. Eckraan, Bublitz and Holben,1^ carried out simulation studies on four different control loops which had time constants considered to be typical of flow, pressure, temperature, and composition loops. They recommended the following sampling rates: Flow loops: 0.1s; Pressure loops: 1.0s; Temperature: 10s; Composition: 60s. 2.1 Adaptive Direct Digital Control The control of an unknown linear, time-invariant plant has remained an open question for a long time and in recent years many 3 0 attempts have been made to resolve it by Landau, Astrom and 13 Wittenmark; Monopoli; Feuer and Morse; Narendra and Valavani. The methods used for the resolution of the adaptive control problem can be broadly classified as: (i) indirect control and (ii) direct control methods. In the first group, the parameters and/or state variables of the unknown process are estimated and in turn, used to adjust controller para meters. These control systems are sometimes referred to as self-tuning regulators in the literature. In the direct control there is no expli cit' identification of the plant but the control parameters are adjusted so that the error between the process output and that of a reference model (known as the desired output) tends to zero asymptotically. Di rect control systems have also been called model reference adaptive con trol. The algebraic and analytical difficulties associated with the control problem are common to both approaches and have been discussed by Narendra and Valavani.51 In the indirect control problem, the observer plays a central and important role. The process parameters are continu ously estimated and used to determine the control parameters of the sys tem. The rationale behind such an adjustment is that, when the identi fication parameters tend to their true values the control parameters will approach the desired values, for which the transfer function of the feedback loop will match that of a specified reference model. Narendra • and Valavani51 have shown that the above approach, in general, leads to non-linear stability problems which are intractable. The principal dif ficulty in such cases arises when attempting to relate estimates of the identification parameters to those of the control parameters. 14 CHAPTER 3 RESEARCH OBJECTIVES Modern control systems often include in the loop a digital compu ter for processing the output measurements of the process, and synthesi zing the optimal control law. Development of a mathematical model for the plant is often the first step undertaken in the design of the controller. The mathematical model is usually obtained after a careful study and thorough understanding of the underlying physical phenomena, and, in many cases, turns out to be high order, nonlinear and/or stochastic in nature. Many industrial control systems must effectively cope with systems whose operating characteristics change with operating level (they are nonlinear) and in most cases it is often very difficult to determine the actual nature of the non-linear function. Since usually the original mathematical model of the plant is complex, or of high order, the requirements on the memory size and the speed of the control computer can be very demanding. Consequently, attempts are often made to obtain a low order model which represents the plant with some accuracy. In particular it has been found that high order overdamped systems, as often encountered in chemical process control, can be represented to a fair accuracy by a second order model containing dead 11 12 19 time or transportation lag (Coughanour; Cox; Gallier ). The simple principle behind this structure, is that a portion of the phase lag in the system due to large numbers of poles can be lumped into a single pure time delay. It is worth noting that this time delay gives an extra 15 degree of freedom without increasing the order of the model. Conse quently, computation and synthesis of the optimal control law for this second order model is a relatively simple task. Furthermore, if such a model can be determined and updated on line as the process evolves, an adaptive controller can be easily synthesized and interfaced between the plant output and the control input. This model has been used with analog controllers. The desire of this study is to extend the use of the model into the sampled-data domain of digital adaptive control where the model parameters are digitally updated at extended time periods. Usually a smoothing device follows a digital computer in the control loop and the most popular of these devices is the zero-order 29 hold. According to Kuo, B.C. , the amplitude of a zero-order hold drops off rapidly at low frequencies and the amplitude characteristics of a first-order hold exhibits an overshoot which greatly enhances instability of the system. , In the work reported in this thesis a frac tional order hold (1/2 order) which has an amplitude characteristic that falls between the zero-order and the first-order characteristics and is believed to come close to approximating an Ideal filter response is used. A comparison of the response with zero-order hold and half-order hold will be carried out to illustrate the characteristic of each. This work is divided into three parts viz (i) Analysis of propor-tional control for sampled-data control of a class of stable processes. (Ii) Design of digital compensators for the control system and (iii) Adaptive control of the system. In all the three parts, the control systems with zero-order and half-order holds are considered. Also experimental verification of the theoretical results is carried out. 16 (i) Analysis of proportional control of the sampled-data system: The analysis of proportional control for sampled-data control of a class of stable processes using a second-order overdamped plus dead time stage function model requires the determination of the stability range of the proportional controller. Since no known work has been published on this area, the efficiency of using a half-order hold instead of a zero-order hold, — which is easier to apply — , as determined on the result of the performance criterion, is verified. The relative effects of the process time constants and dead time on the stability of the process are also determined. Criteria which are often used for judging good closed loop per formance are, maximum overshoot, decay ratio, settling time and the integral of some function of the error. Maximum allowable overshoot is not particularly useful criterion for automatic processes since it always involves exciting the system up to the threshold of stability. The decay ratio and the integral of some function of the error have been 4 5 11 used by some workers. , The sum of the modulus of the error or the sum squared can easily be determined, because the error is calculated during the normal control calculations. The error squared gives more weight to the larger deviations than the modulus of the error, though small deviations can more readily be tolerated. The decay ratio which is commonly used in control designs is not, at least theoretically suit able for second-order overdamped models since overdamped systems theoretically do not overshoot. A new performance index defined as the ratio of error first moment to error second moment is used to derive an effective control algorithm for a specified response. This criterion Is mathematically 17 less complex to apply than minimisation of an error integral. As is shown later on, there exists a relationship between this performance measure and the one-quarter decay ratio index. Also this new perfomance criterion is a generalised algorithm index for any second-order system. For an underdamped second-order system, the performance index N-1 Z e(iT) • -^ N-1 Z e (IT) 1=0 is negative, while it is positive for an overdamped system. At steady state oscillation the performance index <|> is equal to zero. The error is defined as the deviation between the desired setpoint and the actual value at any instant of sampling. This error summation is performed from zero time to N sampling times, where N is sufficiently large to allow the system to attain steady state conditions. The performance, index computed in this way is probably greater than the true deviation, — since the error is only evaluated at the sample interval —, if the system is stable. The use of this performance index, to estimate loop gain will be shown for proportional direct digital control of a heat exchange process. In this study the modern control theory method (state variable approach) is used and synchronous sampling is assumed. In the actual control loops this may only be an approximation because the output from the computer is delayed by the computing time, but as this is small compared to the smallest possible time used, the assumption is reasonable. 18 (ii) Digital Control Compensators: This deals with the development of discrete control algorithms, which are suitable for programming in a direct digital computer. In all, three algorithms are developed, two of them are optimum controls, — one is derived on the basis of dead beat performance, while the other is formulated from optimum state feedback control law with inaccessible states; the inaccessible states are deter mined from an analytical predictor algorithm and not calculated from estimates of measured output — , the last is an improved form of proportional control algorithm where the predicted state values are used instead of the actual measured values for the control. Each of these control algorithms was tested on a heat transfer process with zero-order and half-order holds as smoothing devices. (iii) Adaptive Control: Model reference adaptive control (MRAC) is chosen as the basis for the adaptive procedure, because the control system to be adapted is of high order while a second-order model is used in the algorithm formulation. This adaptive control scheme is consi dered to be an especially efficient method that has been widely noted in reviews (Donaldson, D.D. et_al. ;llt Landau, I.D.;31 Beck, M.S.3). There are many variations within the 'MRAC1 category which can be investiga ted. The model reference characterization is appealing with respect to the unit operations type of process involving flowing fluids, such as the heater-heat exchanger system. Detailed knowledge about the struc ture of signal flow and the time constants is usually lacking for these processes. Consequently, adaptive control methods could be useful in offsetting the effects of inaccurate process information. In addition, extensions of the model reference concept to the estimation of state variables for more advanced control schemes could also be possible. 19 Since in Chemical Engineering control of slow time-constant vary ing high order processes is common, an algorithm was sought which could have general application. To handle signal degradation caused by large sample times a half-order hold was tested. To match process of high order a model made of an overdamped second order lag element and trans port lag where the delay time is any multiple of sampling time— was used. As far as is known this model has not been tested for direct digital adaptive control. It is worth noting that some workers have used this model but restricted themselves to using a dead time value equal to an integral multiple of the sampling time. The final part of the study involved the experimental verifica tion of these techniques and algorithms on a heater-heat exchanger control system. The control effectiveness resulting from the loop gain and sampling rate of the proportional, feedback, sampled-data controller selected from the performance criterion of the transient response was investigated. For each of the remaining three controllers, operating conditions for the heater-heat exchanger control system were changed to simulate two different process dynamic changes. These cases included: (i) step change in outlet set point and (ii) step change in load variable (steam pressure). . The criteria to be used in the comparison of the two control sys tems, — zero-order hold and half-order — , for good control quality are: (i) the speed at which steady state is attained and (ii) the behaviour at steady state conditions. The control system that attains steady state condition faster and with less steady state oscillation will be deemed as the better control system. It should be noted that no attempt will be made to specially tune any of the control systems thereby eliminating any bias towards a specific control. 20 CHAPTER 4 SAMPLED ~ DATA PROPORTIONAL CONTROL OF A CLASS OF STABLE PROCESSES 4.1 Analysis of System Consider a simplified sampled-data feedback control system as shown in Fig. 4.1, where Gc(s) is the Laplace transform of the propor tional controller transfer function; Gp(s) is the process transfer func tion and H(s) is the hold (smoothing device) transfer function. Two conditions will be invesigated viz (i) when the process transfer function is second-order overdamped plus a hold (zero or half-order) and (ii) when it is second-order overdamped plus dead time plus a hold (either a zero-order or half-order). 4.1.1 Overdamped Second-Order System With Zero-Order Hold Consider a sampled-data feedback control system as shown in Fig. 4.1. It is assumed that the measured variable is sampled every T units of time, and that the resulting values appear at the output of a zero-order hold circuit, such that the input, C(t), and output, Cc(t), of the sample-and-hold device are related as shown in Fig 4.2. The transfer function of the hold circuit is generally given as Vs) =LT^TS (4'x) Note that the impulse-modulated sample and the hold circuit H (g), shown in Fig. 4.1, are merely a mathematically convenient repre sentation of the input-output relation of Fig. 4.2. T H<s> Gc<s> Fig. 4.1 - Block diagram of sampled-data feedback control system. It JL, » : 1—: 1 1— 0 T 2T 3T 4T Time Fig. 4.2 - Input and output of sample and zero-order hold. 23 It is assumed that the control system is synchronously sampled, and that the value of the calculated proportional gain is indicative of the degree of stability of the system. The overall transfer function is given as -TC „, . K (1 - e )6 ON G(s) = s (s+e^s+e^ <4'2> where 6^ = l/x^; 62 = 1/^25 8 = ^\^z an<* Tl> T2 are the first and second time constants of the controlled system respectively. As has been stated earlier on, state variable approach will be used in the calculations. The first step towards obtaining a set of first-order differential equations to describe the dynamics of the system and Hence the state variable formulation is drawing of a signal flow graph. This diagram (signal flow graph) is made up of nodes and directed lines signifying direction of information flow. An example is shown in Fig. 4.3. The relationship existing between an input node and an output node is derived by the application of Mason's gain formula. : "This formula gives directly the overall transmittance from an input node to an output node. That is, Y ET.A. in Where T^ is the gain (transmittance) of the i th forward path from the input node Y. to the output node Y , and A is the in out determinant of the graph, which is defined as A = 1 - (sum of all indi vidual loop gains) + (sum of gain products of all combinations of two 24 non touching loops) - (sum of gain products of all combinations of three non touching loops) + .... A^ = Determinant of graph in which all loops that touch the i th forward path are set equal to zero. A forward path is any path which goes from the input node to the output node along which no node is passed through more than once. A loop is any path which originates and terminates at the same node along which no node is passed through more than once. Touching loops are loops which have one or more nodes in common. Similarly, a loop which touches the i th forward path is one that has one or more nodes in common with the path. Transform the plant's transfer function into a second-order differential equation and from this point reduce the system to a set of first-order differential equations. That is, £.+ (e.+e.) — + e.e.c = KS (4.4) dt If the hold [h(t)] is introduced into equation (4.4), the second-order differential equation becomes + e 3 dC dt + 0C = K6h(t) (4.5) where 8.^ = 81 + Q^, where 8^^ = 1/^, &2 = 1/T2 and 8 = 9^ Let C = X1 and C = X = X, (4.6) Therefore equation (4.5) reduces to 63X2 - 6XX + K6h(t) (4.7) 25 Input Node Output Node Fig. 4.3 - Typical signal flow graph. .-I X2(S) <?X1(kT) Ys*' Fig. 4.4 - Signal flow diagram of Equation (4.8a) QX2CKT) H(s), X2Cs) ^PX^s) Fig. 4.5 - Signal flow diagram of Equation (4.8b) 26 Laplace transforming equations (A.6) and (4.7) gives sX1(s) - X1(tQ) = X2(s) (4.8a) sX2(s) - X2(tQ) = -e3X2(s) - 6X1(s) + K6H(s) (4.8b) where X^(tg) and X^tg) are the initial state values of state variables X1 and X2> The signal flow diagram for equation (4.8a) is given in Fig. 4.4 The signal flow diagram for equation (4.8b) is as shown in Fig. 4.5. Combining equations (4.8a) and (4.8b) hence their respective signal graphs gives the signal flow diagram of Fig. 4.6. The error signal at time t = kT is e(kT) = r(kT) - C(kT) r(kT) - X^(kT) (4.9) Combining equations (4.8a), (4.8b) and (4.9) gives the overall control system signal flow diagram as shown in fig. 4.7. Mason's gain formula is then applied to give the set of first order differential equations in Laplace transform form. There are two loops in the system and are given as : 2 Ll = ~Q3^S and L2 = ~Q^S Since there are no non touching loops, the determinant A of signal graph is A = 1 - (L1+L2) 27 QXJCKT) qxT(KT) x,(s) Fig. 4.6 - Signal flow diagram of equations (4.8a) and (4.8b) combined. f(KT) e(KT) H(S) X.CKT) X,(s) Fig. 4.7 - Control system signal flow diagram. 28 The transfer function relating the input X^(kT) to the output X^(s) is <|>^(s) and consists of two parts: (i) Tj = 1/g (ii) Tj1 = - £| (4.12) s The forward path T^ is touched by loop L^' The loop is then set equal to zero. 1 S + 93 Thus, A. = 1 + L_ ie. (4.13) lis The forward path T^\ is touched by loops and L^, thus = = 0 and =1-0. Hence, the transfer relating the input X^(kT) and the output X^(s) is TiAi (S+V K9 *UKS) A A (s+O^s+C^) 3(3+0^(3+62) The transfer function relating the input X2(kT) and the output Xi(s) is <J>12(S)* This is given as: the transmittance is T2 = 1/s and A2 = 1, since the path is touched by loops and L.2- The transfer function relating the input X2(kT) and the output X^(s) is then given by *12.Cs) =.__l-_ . (4.15) (s+e1)(s+e2) The transfer function relating the input Xi(kT) and the output T3A3 T3A3 X2(s) is 4,2^(s)> that is <p^(s) is made up of —^ 1 ^— , -K6 whei re T^ = —2" Dut the path is touched by and , hence A^ = 1; s T3 = - —2~ and A^' = 1 since the path is touched by and s 29 K6 9 Thus *21(.s; - (s+Q +e - (s+Q +Q (4.16) The transfer function relating the input X2(kT) to the output X2(s) is given as T4A4 s *22(s) A (s+01)(s+9.) (4.17) 2' where the transmittance T^ = 1/s and A4 = 1; since L^ = L2 = 0. The transfer function relating the input r(kT) to the output X^(s) is T A ... K6 55 Vs; 8(3+6^(3+62) A (4.18) K0 where the transmittance T^ = —j and A,. = 1; = = 0 s The transfer function relating the input r(kT) to the output X2(s) is K6 T6A6 *2(s) (s+e1)(s+e2) A (4.19) K6 where the transmittance T, — —=- and hr = 1. 6 2 6 s Therefore the set of first-order differential equations in Laplace transform is " X(s) = s + K6 (3+6^(3+82) 5(5+6^(5+62) (5+6^(5+62) - K6 (5+6^(3+62) (3+6^(3+62) (3+8^(3+62) X(kT)+ K0 5(5+6^(5+62) K6 . (5+6^(3+62) V(kT) Due to the time delay to = kT which exists in the control system because of the presence of the sample and hold, after obtaining the inverse Laplace transform of equation (4.20), the time t is replaced by t - kT. 30 Inverse Laplace transforming gives x(t) = r 1 * * * « * 2_ -et -et -elt -e2t +a e - K(l + a e + c^e )J a5(e -e * ^ * -B, t -e„t * * -8 t -6-t -a6(e 1 - e )(1+K) XX(KT) + X2(KT) * * -e t . -e t K[l+a3e + a4e 1 -6 t -6 t Ka,(e - e ) o r(KT) (4.21) ; 2 _ 1 • _ • • ... • where a, = .n a ; , a0 - ^—— \ - a-> ~ a /a _a \ > a/, _ ie^e~' a2 " 3 e1(91-o2)' "4 VVV 1 0 " 1 = _2_ J2 ul " 2 ul '. 2 • 1 " 1 2 t* = t - KT 31 Thus X(K+1T)= ~ -e1T -82T -Q^T -e4T -e1T -e2T~l [a^e +a2e -K(l+a3e +a4(e )] a,.(e -e ) -8..T -6„T -a6(e -e )(1+K) -Q^ -e2T a^e +a8e X(KT)+ -9 T -8 T K[l+cue + a,e ] -9 T -9 T' Ka6(e - e ) r(KT) (4.22) C(t) = [1 0] x (KT) The stability conditions are determined from the relation det[zI-Q] = 0 where where Q= •i-8 T -92T -91T -94T -8^ -8 T [a^e +a2e -K(l+a^e +a^e )] a5(e -e ) -9 T -9 T -a6(e - e )(1+K) ~91T ~92T a^e +a8e (4.23) That is ~~ -8 T -8 T -8 T -9 T -8 T -6 T Z-[aie +a2e - K(l+a3e +a^e ' )] - a5(e -e ) -8 T -8 T a6(e - e )(1+K) -8i -e2T Z - [a?e + age ] = 0 (4.24) -6 T -82T Let = e and P2 = e . The determinant and hence the character istic equation of the control system becomes 32 Z - [a1P1 + a2P2 - K(l+a3P1+a4P2)] - a^P^) a6(PrP2)(l+K) Z_[a7Pl+a8P2J = 0 (4.25) That is, applying Jury's stability criterion gives Condition I: a2 + al + a0 ^ 0 K > -[l-(a1+a7)P1-(a2+a8)P2+(a7P1+a8P2)(a1P1+a2P2)+a5a6(P1-P2) [(l+a3P1+a4P2)(l-a7P1-a8P2) + ^(P -P^l' (4.26) Condition II: ai - a\ + an > 0 K > [l+(Va7)P1+(a2+a8)P2+(a7P1-ra8P2)(a1P1+a2P2)+a5a6(P1-P2)^ [(l+a3P1+a4P2)(l+a7P1+a8P2) - «5«6(P]L-P2) ] (4.27) Condition III: a0 - a2 < 0-K < [l-(a7P1+a8P2)(aiP1+a2P2)-a5a6(PrP2)^ [a5a6(P1-P2) - (a7P1+a8P2)(l+a3P1+a4P2)] (4.28) Figure 4.8 is the stability constraint of the control system as a func tion of sampling time for four different time constant ratios, that is the ratio of second time constant to first time constant. The effective or limiting stability constraint shown in Figure 4.8 is equation (4.27). The stability range of the control system increases with increase in time constant ratio but decreases with increased sampling period, Fig. 4.8.. This trend has been suggested by other workers. Increase in sampling time introduces large instability to the system but with a smaller sampling time the sampled data system approaches that of 33 Sampling Time, Sec-Fig. 4.8 - Stability constraint of sampled-data second order system with no dead time as a function of sampling rate for various ratios of the time constants (zero-order hold). 34 continuous (analog) control system. Although it is a well known fact that all proportionally controlled first and second-order systems are stable in. the continuous time domain, regardless of loop, this is not true for second-order systems in the sampled data domain. 4.1.2 Second-Order Overdamped System With Half-Order Hold Consider now the process with a half-order hold as the smoothing device. From discussions given in the control literature, the amplitude characteristic of a zero-order hold drops off rapidly at low frequencies and amplitude characteristic of first-order hold exhibits an overshoot 2 9 before cutting off sharply. An amplitude characteristic which falls between the zero-order and the first-order characteristics is being suggested to come close to approximating an ideal filter response. This filter charateristic could be realized by use of a fractional-order hold, in this study a half-order hold is used. Fig. 4.9 is the input and output of sampler and holdV. for the half-order hold circuit. The transfer function of half-order hold is given (see Appendix 1 for derivation) as H./7(s) = (1 - l/2e iS)(- J ) + 1/2T(- - )Z (4.29) 1 /1 s s The impulse-modulated sampling and hold circuit H(s), shown in Fig. 4.1 is merely a mathematically convenient representation of the input-output response of Fig. 4.9. Almost all the digital computers used in industrial control systems have built-in zero-order hold circuits. A half-order hold may be expressed as a function of a zero-order hold. Equation (4.29) can be expressed as = [-Ts + (Ts-fl)(l-e-TS)] , (4>3()) 1 2Ts 35 1 - ~Ts where H0(s) = —^ (zero-order hold) Expanding the e Ts in the paranthesis up to T2s2 term, assuming T3s3 is negligible, reduces equation (4.30) to -Ts „ , . ,4 + 5Tswl - e . Hl/2(s) = ( )( > 4 + 4Ts s The overall transfer function of the control system is now given as -Ts (4.31) G(s) = H(s)G (s)G (s) = K(4+5TS) c p. e (— ) (4.32) (4+4Ts) (s+61)(s+62) s where Qi = l/rlt 62 = /T2 and 9 = 9^; also T1,T2 are as before. The signal flow diagram of equation (4.32) Is shown in Fig. 4.10. Application of Mason's gain formula gives X1(s) X2(s) *ii(s) <f)i2(s) *21(s) ^2(s) X:(KT) X2(KT) y (KT) (4.33) Derivation of equation (4.33) and parameter definitions are shown in Appendix 2. There exists a time delay to = kT due to the zero-order hold present in the control system. After the inverse Laplace transform is obtained, t is replaced by t-KT. r(KT) (4.34) where t* = t - KT. The value of the output at the sampling instants is obtained by letting t = (K+1)T, in which case t* = t - KT = (K+l) T-KT = T. Therefore equation (4.34) becomes Thus, xx(t) ^(t*) •i2<t*> XX(KT) + *{(t*) x2(t) •21<t*) •22<t*) X2(KT) ^(t*) TIME Fig. 4.9 - Input and output of sample and hold of half-order. -Fig. 4.10 - Signal flow graph of equation (4.33). 38 X1(K+1) *il<T> *{2(T) X1(KT) = + X2(K+1) •21<T> *22(T) X2(KT) ^(T) _____ ___ r(KT) (4.35) The characteristic equation of the control system is given as -«P{2(T) Z -*21<T> Z " <022(T) = 0 (4.36) Stability conditions are determined by applying Jury's stability test and are given as: K > K < d - Q3 - Q4> (Q5 " Q6 " Q7 ) (1 + Q3 + Q4) «5 + Q6 " Q7 > K < q - Q4> (Q6 - Q7) (4.37) (4.38) (4.39) Fig. 4.11 is the stability constraint of the control system as a func tion of sampling time for four different time constant ratios. The representation is that of equation (4.39) since it is the effective stability constraint on the system. Just as in the case of zero-hold, the stability of the control system increases with increase in time constant ratios while it decreases with increase in sampling time. In all conditions (increase in time constant ratio and increase sampling time) the value of the proportional gain for the system with half-order hold in the circuit is greater than that with zero-order hold in the circuit. 39 Sampling Time Fig. 4.11 - Stability constraint of sampled-data second order system with no dead time as a function of sampling rate for various ratios of time constant 2 to time constant 1 (Half-order hold). 40 4.1.3 Control System With Dead Time When a delay time is included in the system, the process transfer function becomes Time delay is a dynamic characteristic that can be represented, when it occurs in a path containing sampling and holding, by adding this time delay to the existing delay caused by the presence of a hold in the circuit. In other words, there will result a forward shift of x = AT, where T is the sampling time and A is any number, in the output response; that Is, at any instant of sampling, the output response will be equal to the, response at (i-A)T. Table 4.1 is a typical response condition. Sampling instants T 2T 3T . . . NT Response equivalent to sampling at (l-A)T (2-A)T (3-A)T • • • (N-A)T Table 4.1 - Output response of process with dead time component It is observable from Table 4.1, that many situations exist. If A is an integral multiple of the sampling time, the output response will be zero for all sampling instants less than or equal to A (if the initial system condition is zero), but if A is a fraction of the sampling time, the value at the first sampling time is equal to that of (l-A)T sampling instant. The third case is when A is both an integral and fractional multiple of the sampling rate; the output response is a combination of the above two conditions. For simplicity of analysis, the dead time is added to the delay due to the hold. The total delay 41 time in the control system is t = (K+A)T, where KT is the delay caused by the hold in the circuit. The process equations describing the control system will be same as those for the circuit with no dead time but the inverse Laplace transform will be different, since the delay time will be added in the overall time delay. 4.1.3a Control System with Dead Time for Zero-Order Hold Circuit The overall transfer function for the control system is given as G(s) = Kee~TS(i-e~Ts)/s(s+e1)(s+e2) (4.41) The state differential equations in Laplace transform is S+63 K6 1 X(s) = (s+el)(s+e2) 8(s+el)(s+e2) (s+el)(s+e2) -K6 e s (s+YXs+e^) " (s+ei)(s+e2) (s+ei)(s+82) x(t0) + K9 s(s+91)(s+62) K0 (s+e1)(s+e2) r(t0) (4.42) Taking the inverse Laplace transform of equation (4.42) gives X(t) = -e.t+ -6„t+ -e,t+ -e,t+ [a e 1 +c*2e 2 -K(l+a3e 1 +a^e 4 )] -9 t+ ~e?t+ -a6(e 1 - e 2 )(1 + K) «5(e -e ) -9 t+ -9 t+ 1 2 a?e +age \ 42 X(t0) + -9 t+ -6 t+ K[l+a3e 1 + a4e 2 ] Ka6(e - e ) r(t0) (4.43) where t+ = t - (K+A)T and T is the sampling time. The process dead time A can be broken down Into A = (j+6)T where j is the integral multiple of the sampling time part of the process dead time and <5 is the fractional part. Thus, for the condition t = (K+j+l)T, t+ = (1-6)T = V. Hence the sampled-data state equations in the transformed state space is x(K + j + 1) - X(i + 1) = [v 1 -8.V -9 V -9 V -9 V -9 V -9 V +a2e -K(l+a3e +c<4e )] o (e' -e ) -6 V -9 V -a6(e - e )(1 + K) --e1v -92v a^e +a8e X(KT)+ -0 V -8 7 K(l + a3e + a4e ) -0 V -0 V Kcx (e 1 - e 2 ) o r(KT) (4.44) 43 The characteristic equation is Det[Zj+1 I - <KV)] = 0 (4.45) where <K^) = *n<v> *n<'> *22<V> See Appendix 4 for parameter definitions. That is, z2a+l)_zj+l[(j)vi(v)+^(v)] + [^(V) ^(V)-^(V) ^(V)] = 0 (4.46) K22v 11 22v '12' Equation (4.46) shows that there are an infinite number of cases that can exist depending on the, value of the integer j. The constraints on. the loop gain of this control sampled system are determined analytically below for two.cases j = 0, 1-, i.e. 0 < T < 2T. Thus adding dead time to the system and/or increasing the sampling rate increases the order of the characteristic equation. The stability analysis becomes algebraically more involved as j increases. However, the sampled data stability limit approaches the continuous stability limit for systems with large amounts of delay time relative to the sampling period. Case 1: j = 0 (0 < T < T), equation (4.46) becomes 12 T21 = 0 (4.47) 44 Applying Jury's stability criterion on equation (4.47) (1 - A' + Al) K> (A3-A4)2 ^ (i + A: K < 1 ... (4.49) (^5 " Ap -(A: - i) K > 0 (4.51) (See Appendix 4 for parameter definitions) All the above four conditions must be satisfied to ensure the stability of the system. A typical case of these conditions is shown in Fig. 4.12, where the ultimate stability limit is plotted against delay time (0 < T < T) for constant sampling time. The amount of delay which maximizes the ultimate stability limit for constant sampling rate T is defined as t . For T < T , equation (4.49) places the severest max max constraint on the ultimate stability limit; for x > T , equation max (4.50) constrains. The correct value of x is determined by the max intersection of these two constraints. Case II: j = 1 (T < x < 2T) equation (4.46) becomes Z4 - Z2[^ + V22 ] + ^ 4>22 " *i2 *21 - ° <4'52) The stability constraints are 1 " A2 K < -= V (4.53) A* + A 6 4 45 Fig. 4.12 - The stability boundary of a sampled-data system with zero-order hold as a function of dead time. 46 K < A2 - 1 A6 + A4 (4.54) The other two constraints involve higher orders of K. 4.1.3b Analysis of System with Deadtime for Half-Order Hold Time delay is a dynamic characteristic that can be represented when it occurs in a path containing sampling and hold in the control circuit. For simplicity in analysis, the dead time is added to the delay due to the zero-order hold. The overall control system transfer function nr \ , Q/4 + 5Tswl - e G(S) = k6(4 4- 4Ts)( -Ts -TS (s + 81)(s + 62) (4.55) The signal flow graph of equation (4.55) is as shown in Fig. 4.10. The state differential equations in Laplace transform are: X(s) *il<S> •{2(8) • ' (s) 21 4>' (s) 22 X(t0) + 2 r(t0) (4.56) The inverse Laplace transform is X(t) *il<tV> *21(tV) 4»22(tv) x(t0) + *{(tv) r2(tv) r(t0) (4.57) 47 where tV = t - (K + A)T and T is the sampling time. Assuming that the process dead time A can be broken down into A = (j+6)T, where j is the integer multiple of sampling times of the process dead time and 6 is the fractional part. Since the output response at times less than or equal to jT is zero, the condition t = (K + 1 + j)T is used. Thus for this case t = (K+j+l)T, t = (1-6)T = VT (4.58) Hence the sampled-data state equations in the transformed state space are X(K+j+l) = ^(VT) <P{2(VT) ^2(VT) X(KT) + ^(VT) *2(VT) r(KT) (4.59) The characteristic equation is set to zero, i.e. Det[ZJ I - <KVT)] = 0 where (4.60) *(VT) = ,},ii(VT) *i2(VT) >21(VT) <P22(VT) Therefore, the characteristic equation is 2(i+l) i+1 Z - ZJ [4>n(VT)+<(,22(VT)] + •11(VT)<|)22(VT)-*21(VT)4)12(VT) = 0 (4.61) 48 As can be seen in Equation (4.61) there are an infinite number of cases that can exist depending on the value of integer j. The constraints on the loop gain of this sampled data control system are determined analy tically below for the two cases j = 0, 1, i.e. 0 < x < 2T. Thus adding dead time to the system and/or increasing the sampling rate increases the order of the characteristic equation. The stability analysis becomes algebraically more involved as j increases. However, the sampled data stability limit approaches the continuous stability limit for systems with large amounts of delay time relative to the sampling period. Case I; j = 0 (0 < x < T); Z2 - ZNf^VT) + <^2(VT)] + •{1(VT)^1(VT) - ^1(VT)r>'2(VT) = 0 Applying Jury's stability criterion to equation (4.62)'gives the stabi lity limits as: (i - Q; - % K><Q;-Q;-QP (4-63) -(1 + Q' + Q! (1 T %•> K < T5np (4-65) In addition, for stability K > 0 (4.66) All the above four conditions must be satisfied to ensure the stability of the system. A typical case of these conditions is shown in Fig. 4.13, where the proportional gain is plotted against delay time 49 (0 < T < T) for constant sampling time. The amount of delay which maxi mizes the limiting proportional gain for constant sampling rate T Is defined as x . For x < x , equation (4.64) places the severest max max constraints on the limiting proportional gain; for x > x , equation max (4.65) constraint. The correct value of x is determined by the max intersection of these two constraints. As with the case of zero-order hold, the limiting proportional gain increases with increase in dead time until the x is reached, after which the proportional gain max decreases, increase in sampling time also decreases the proportional gain. In all the conditions,, investigated, the control system with half-order hold gave higher values of the proportional gain than that of control system with zero-order hold. Case 2: j = 1 (T < x < 2T) The characteristic equation becomes Z4 - Z2[4.[1(VT)+**2(VT)] + •21(vT)4>'1(VT) - •21(VT)*[2(VT) - 0 (4.67) Using Jury's stability analysis, the constraints on K are K < (1 (R (4.68) K < (1 + Q9) (4.69) «6 " V 4.2 Transient Response of System The response of the second-order system to a step change in set point was investigated. Criteria which are often used for judging good 50 20! 1 0-3 x« 0;6 09 ~V2 T5 Dead Time Sec; "c Fig. 4.13 - The stability boundary of a sampled-data system with half-order hold as a function of dead time. 51 closed loop performance have been discussed in Chapter 3. A new performance index defined as N Z e(iT) • = (4-70) 2 E e (IT) i=0 is used to estimate an optimum loop gain value for the proportional controller. For a minimum steady state error response, the performance index <J>, should be greater than 1. The transient response of the control system is derived as a solution to the state difference equations in matrix form. For a system with a set of first-order difference equations in matrix-form which is given as X(n+1) = AX(n) + br(n) (4.71) y = CTX(n) X where the sampling time T has been dropped for convenience, and C is the coefficient of the output. The solution to the model, equation (4.71), is given in matrix form as N-1 . X(n) = AnX(0) + E A br(n) (4.72) i=0 where An = Z-1{Z(ZI-A)"1} The transient response is n-1 . y(n) = C [AnX(0) + E A b] (4.73) i=0 52 The error response is the difference between the desired response and the actual response and is given as e(n) = r(n) - y(n) (4.73a) The relationship between this performance index and the one-quarter decay ratio criterion is shown in Appendix 3. 4.2.1 Transient Response of Second-Order Overdamped with Zero-Order Hold Consider the process shown in Fig. 4.1, but with a process dynamics of a second-order overdamped transfer function and a zero-order hold in the circuit. The overall transfer function is rvo = 9(1 ~ e"Ts) 3(3+6^(3+62) Figure 4.14 is the signal flow graph of the control system. The set of first-order difference equations Is (4.74) X(K+1T)= -6 T- -6„T — 6 T — 6 T -0 T -e„T r 1 2 1 2 i 1 2 [c^e +a2e Z -(l+cy )] a.(e -e ) -6 T -8?T -2a,(e -e ) o -8 T -8 Tl l+a_e + a.e 3 4 -01T -02T a6(e - e ) r(KT) -6 T -02T a^e +a0e / o X(KT)+ (4.75) C(K+1T) = [1 0] x (KT) Parameters are as defined for equation (4.22). The general solution to the matrix difference equation (Equation 4.75) for step input change is 53 T=0-5s Sampling Interval, N Fig. 4.15 - Open loop transient response of uncompensated sampled-data second-order process with no dead time for a unit step change for different sampling rates (zero-order hold). 54 X(nT)'= 9llV612Y2 615^+616Y2 613Y1+814^2 917^1+618Y2 X(0) + N-1 Z 1=0 ll'l 12T2 13'l 14T2 9 yN-^i+g yN"1"1 9 y^1"1-^ y^1"1 15 1 16 2 17 1 18 2 1+0t3Pl+a4P2 a fp -p ) 6K 1 2} (4.76) See parameter definitions in Appendix 4. If the states are initially at rest, then Equation (4.76) reduces to X(nT) = (l-H,3P1+a4P2)(eilyf1-i+ei2Yr1"i) + (1l+a3P1+a4P2)(615yf1-1+816yf1-i) + /T, „ ... N-l-i^Q N-l-iN a6(P1-P2)(613y1 +9uy2 ) „ . , • N-l-i, . N-l-i. a (P -P )(8 y +9 y ) 6 12 17 1 18 2 (4.77) Therefore, the transient response is given as N-1 C(nT) = Z {([l+ajPj+a^] e11+a6e13[P1-P2I)Yl"1 1+ 1-0 ([l-ra3P1+ot4P2]912+a6014[P1-P2])yf1-1} (4.78) Fig. 4.16 - Control system with proportional controller. 56 Fig. 4.15 is the closed loop transient response of the control system as a function of sampling Interval for various sampling times. Introduc tion of a proportional controller in the feedback loop results in Fig. 4.16, and the error response is r(nT) - C(nT). The error response of the control system with the addition of the proportional controller for a unit step change in setpoint Is N-1 e(nT) - 1 - K S {( [l+a^+c^ ] 8n+a6 8^ [P^ ]) ] vj x+ ([l+a3P1+a4P2]ei2+a6ei4[P1-P2])Yf1-i} (4.79) The amount of loop gain K is estimated from the performance criterion. That is, N-1 Z e(jT) 3=0 N-1 S eZ(jT) 3=0 •I [1"Kc " V {C C1+<^Pl+0l4P2 1 ^l"^ 613 tPl"P2 1 J=l 1=0 ? [i-Kc V{([i+a3P1+a4P2]e11+a6e13tP1-P2])Yf1-i+ 3=1 i=0 ([i+a3P1+a4P2]e12+a6e14[P1-P2])Yf1-i}]2 Therefore, the optimum value of the proportional controller, should satisfy the condition 2 2 D2" ^D2 + 4D1D3 < Kc < D2 + /D2 + 4D1D3 2D^ ° 2DL (4/81) 57 Sampling Interval, N Fig. 4.17 Closed loop transient response of proportionally controlled sample-data second-order process with zero-order hold for a unit step change for different sampling. 58 Sampling Interval, N Fig. 4.18 - Closed-loop transient response of proportionally controlled sampled-data second-order overdamped process with zero-order hold and no dead time for a unit step change for different sampling rates. Table 4.2 - Loop gain as a function of sampling time for the two performance indices: (control system with zero-order hold) Time Constant 1 = 1.3; Time Constant 2 = 3.1 Sampling Time • = 3 ... ° <f> = = 1/4 decay ratio Loop Gain Response at 12th Sampling Loop Gain Response at 12th Sampling 0.5 sees 0.01921 -0-.-98136 0.0.2310 1.18033 0.7 sees 0.03401 1.01366 0.0409 1.21910 0.9 sees 0.07132 .1.06803 0.08579 1.28438 1.1 sees 0.16183 1.16441 0.19458 1.40005 60 See Appendix 4 for parameter definitions. The transient response of the control system with proportional controller is shown in Fig. 4.17 for a performance index <J> = 3 and various sampling periods. An equivalent performance index to one-quarter decay ratio is used for the transient response of Fig. 4.18. For all the tested sampling rates, the one-quarter decay ratio equivalence gave a poorer response than that of performance index <f = 3. For both performance indices, an increase in sampling time results in an increase in loop gain and hence less stability margin. Table 4.2 list the values of loop gain and response after 12 sampling times for the two cases shown in Figs 4.17 and 4.18. 4.2.2 Transient Response of Second-Order Overdamped With Half-Order Hold Consider the process shown in Fig 4.1 but with a process dynamics of a second-order overdamped transfer function and a half-order in the circuit. The overall transfer function is G(s) = 4 + 5Ts 4 + 4Ts (1-e ) (s+^Xs+e^ (4.82) and the set of first-order difference equations is x1(k+l) "•!>) +_V(T> x2(k+l) • £<T> •£CT> X2(k) + r(k) (4.83) c(k) = [l 0] x(k) 61 15CM in c o a (/> S10CH c a> w c. ro: I— -r-T= 0-5S T= 0-7S T= 0-9 s T= Ms Tj = 13s xa=3-1s 2 4 § $ Sampling Interval, N 10 Fig. 4.19 - Open loop transient response of sampled-data second-order process with no dead time for different sampling rates (half-order hold). 62 The general solution to equation (4.83) is x(nT) = N , N N N allTll + d12Tll al3Yll + al4Y12 N N N N ay + a y a Y + a Y 15rll 16r12 17T11 18Y12 N-1 x(0) + I i=0 a yN-l-i a N-l-i N-l-i yN-l-i 11 11 12 12 13 11 14 12 15 11 16 12 17 11 18 12 *JV(T) *21V(T) (4.84) If the states are initially at rest, the particular solution becomes N-1 x(nT) = I i=0 N-l-i , N-l-i a Y + a Y llrll 12T12 N-l-i' N-l-i a15Yll + al6T12 N-l-i , N-l-f a!3Tll + al4T12 N-l-i ^ N-l-i al7Yll + al8Y12 ^V(T) t21V(T) and the transient -response is N-1 C(nT) = I i=0 {ant1V(T) + ^^T^-Ma^t^ (4.86) The transient response of the system is as shown in Fig. 4.19 for various sampling rates. Introduction of a proportional controller in the feedback loop, gives an error response at any instant of N=l ' . . ... . e(nT) = l-K E { [a^JVHa^V) ] Y^"1" ^a^* VHa^V) ] n^1"*} 1=0 (4.87) 63 3.0769 x 10" = 1.68954 x 1.0 1.35124 x 10" -3 = 1.0781 x 10 -l 2 4 6 8 Sampling Interval, N 10 Fig. 4.20 Closed loop transient response of a proportionally controlled sampled-data second-order overdamped process with no dead time for different sampling time (half-order hold). 64 The amount of the loop gain K is estimated from the performance criterion. That is » N-1 • = Z e(jT) j=0 N-1 Z e (jT) j=0 Hence, N N-1 Z [1-k S {[an^V(T)+a13^V(T)]Y^1"1+[a12^V(T)+a14^ j=l j=0 : 1 N N-1 I [1-k E {[a11^(T)+a13^(T)]y^1^[a12t^T)+a14t2lv(T)]Tf;-1-i}]2 j=1 J=° (4.88) Therefore the loop gain is given by D21 + /D21 + 4D11D31 K - — fi (4.89) 11 See appendix 2 for parameter definition. Hence, -the sampling rate is a free parameter, and for any sampling period, there exists a loop gain such that the performance index is <|>. The transient responses of the control system with the corresponding loop gains is shown In Fig. 4.20 for performance index a) = 3 and for various sampling times. The trend of the transient response for the various sampling rates indicates that a decrease in the sampling time results in a reduced deviation from set point before steady state is attained. Thus, increasing sampling time decreases the stability margin of the system since high loop gain values mean low 65 stability margin. For all conditions considered, the control system with half-order hold gave better transient response and attained steady state conditions faster than did the control system with zero-order hold. This suggests that the half-order hold Is a better ideal filter approximation than is the zero-order hold. The equivalent one-quarter decay ratio performance index gave a poorer transient response as shown in Fig 4.21. Also the control system with half-order hold is more stable than the system with zero-order hold with both performance indices as measured by the values of the loop gain. Table 4.3 shows a typical loop gain variation for the control system with half-order hold and for the two performance indices. 4.2.3 Second-Order Overdamped Plus Dead Time Addition of delay time to the second-order dynamics gives a process transfer function Vs) = (s+vcs+v (4-90) where jT < x _< (j+l)T J = 0,1,2,3,.... Once again the type of response is second-order overdamped, but the outputs are delayed by the dead time and occur at sampling instants plus the dead time. To analyse the outputs of the transient response, the same approach used in the case of second-order overdamped with no delay is utilized, with the minor modification of adding the dead time to the hold delay. The output signal will be delayed by an amount x such that the outputs will occur at the Instants of sampling the delayed output signal. From equations (4.46) and (4.61) the order of the Table 4.3 - Loop gain as a function of sampling time for the two performance indices: (control system with half-order hold) Time Constant 1 = 1.3; Time Constant 2 = 3.1 Sampling Time $ = 3 <f> = l ./4 decay ratio Loop Gain Response at 12th Sampling Loop Gain Response at 12th Sampling 0.5 sees . 3.0769 x 10"4 0.99249 3.7318 x 10"4 1.08243 0.7 sees 1.68954 x 10"3 0.99371 2.04911 x 10~3 1.08391 0.9 sees 1.35124 x 10-2 0.99550 1.6388 x 10~2 1.08608 1.1 sees 1.0781 x 10-1 0.99823 1.26744 x 10"1 1.08938 67 2 4 Sampling ^ Interval, N 10 Fig. 4.21 - Closed loop transient response of a proportionally controlled sampled-data second order overdamped process with no dead time for different sampling rates (half-order hold). 68 characteristic equations is seen to be 2(j+l). Thus for j > 0 — i.e., x > T — the analysis will be extremely difficult by analytical techniques. 4.2.4 Control System With Zero-Order Hold The overall transfer function is -Ts G(s) = -TS -(' " 6 ) ( 3+6^(5+6,,) (4.91) The set of first-order difference equations of the above transfer function is x[(k+j=l)T] = *21(V) <|,22IV) x1(kT) x2(kT) "^(V) t2vi(v) (4.92) C[(k+J)T] = [l 0] x [(k+j)T] where V = (1-6)T. The transient response is given as (assume initial states are at rest) N-1 C(k+jT) = HK^CV) + a3^1(V)}Y^-1 + {a2^(V) + V) jy^1"1 ] (4.93) Parameter definitions in appendix 4. When a proportional controller is added to the feedback loop, and the performance criterion is applied, the design loop gain is determined. Table 4.4 shows the loop gain as a function of number of samplings used for various values of performance index and sampling rates for the control system. As can be seen from the table, an increase in the performance index results in a decrease in stability. Also as the number of sampling intervals used in the performance index, .yi,„xi N-l-i ,vi, ,vi/r7X i N-l-i-69 Table 4.4 - Loop gain as a function of number of sampling intervals used for various performance index values and sampling time (zero-order hold) Sampling Time =1.5 sees; Process Time Constants = 5.027 Desired Steady State Value = 1; Process Dead Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 1.0 0.3827 6 0.32207 0.19791 8 0.25146 0.11460 10 0.20395 0.7126 12 0.16985 1.5 1.17431 6 0.98804 0.76279 8 0.96917 0.53336 10 0.94921 0.39002 12 0.92967 2.0 . 1.41954 6 1.19437 Or.92370 8 1.17361 0.64683 10 1.15115 0.47357 12 1.12882 2.5 1.54883 6 1.30315 1.0084 8 1.28122 0.70647 10 1.25728 0.51743 12 1.23335 3.0 1.62974 6 1.37123 1.06134 8 1.34849 0.74371 10 1.32356 0.54480 12 1.29859 70 Sampling Time = Desired Steady 2 sees; State Value = 1 Process Time ; Process Dead Constants = 5.027 Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 0.43035 6 0.31606 1.0 0.21978 8 0.24679 0.12601 10 0.20020 0.07764 12 0.16671 1.33077 6 0.97733 1 5 0.85394 8 0.95890 0.59129 10 0.93938 0.42855 12 0.92014 1.60876 6 1.18149 2.0 • 1.03414 8 1.16125 0.71713 10 1.13930 0.52038 12 1.11731 1.75532 6 1.28913 2 5 1.12899 8 1.26776 0.78327 10 1.24437 0.56858 12 1.22080 1.84703 6 1 .35648 3.0 . 1.18828 8 1.33433 0.82457 10 1.30999 0.59866 12 1.28538 71 Sampling Time = Desired Steady 3 sees; ' State Value = 1 Process Time ; Process Dead Constants = 5.027 Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 0.50224 6 0.31037 1.0 0.25410 8 0.24265 0.14490 10 0.19715 0.08895 12 0.16441 1.56500 6 0.96712 1.5 0.99457 8 0.94973 0.68455 10 0.93137 0.49391 . 12 0.91312 1.89203 6 1.16921 2.0 , '': 1.20452 8 1.15021 0.83028 10 1.12965 0.59978 12 1.10884 2.06443 6 1.27575 2.5 ' 1.31502 . 8 1.25573 0.90686 10 1.23385 0.65534 12 1.21156 2.17230 6 1.34241 3.0 • 1.38408 8 1.32168 0.95468 10 1.29891 0.69001 12 1.27566 1fl Sampling Interval, N 4.22 - Transient response of uncompensated zero-order hold control system. 73 N, increases the system becomes more stable as measured by the low loop gain values but the error (deviation from desired value of 1) decrease. Fig. 4.22 is a typical transient response (equation 4.93) of the uncompensated control system as a function of sampling interval. The proportional controlled system transient response is shown in Fig. 4.23 as a function of the sampling interval with performance index as parameter. Increase in performance index reduces steady state error until a point is reached after which the error increases. Also increase in performance index decreases the stability of the control system. 4.2.5 Control System With Half-Order Hold With the addition of the dead time, the overall process transfer function with half order hold becomes G(s) = + 5Ts1 (1_ + 4Ts_ -Ts. -TS - e ) 9 e |4 + | s (s+61)(s+92) The set of first-order difference equations of equation (4.94) is x[(k+j+DT; (See Appendix 2 for details and parameter definition) c[(k+j]T) = [l 0] x [(k+j)T] ; where V = (1-6)T The transient response is given as (assume initial states are zero) N-1 (4.94) •ii<7> d>+' (V) *12K ; x(kT) + r(kT) (4.95) _*2i(v) d>+ (V) C[(k+J)T]=T [ivI(V) + Vl^Kl1 1 +'{Vl(V) + b4^2(V)^321"il (4.96) When a proportional controller is added to the feedback loop, and the 74 Table 4.5 - Loop gain as a function of number of sampling intervals used for various performance index values and sampling time (half-order hold) Sampling Time Desired Steady = 1.5 sees State Value = 1; Process Time Process Dead Constants = 5.027 Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 1.49164 x 10-2 6 , 0.17013 1.0 4.07075 x 10-2 8 0.12699 1.21437 x 10-3 10 0.10128 3.808 x 10-4 12 0.08423 6.01111 x 10~2 6 0.68561 1.5 2.11693 x 10"3 8 0.66040 7.72897 x 10-4 10 0.64463 2.8658 x 10~4 12 0.63386 7.28172 x 10-2 6 0.83053 2.0 2.56944 x 10-3 8 0.80157 9.39432 x 10-4 10 0.78353 3.48692 x 10-4 12 0.77124 7.95029 x 10-2 6 0.90679 2.5 2.80706 x 10-2 8 0.87570 1.02675 x KT2 10 0.85636, 3.81223 x 10-4 12 0.84319 8.36811 x 10"2 6 0.95444 3.0 2.95539 x 10~2 8 0.92197 1.08121 x 10"2 10 0.90178 4.01498 x 10~4 12 0.88804 9.4321 x 10-2 6 1.2131 4 .0 3.0187 x 10"2 8 1.1042 1.63432 x 10~2 10 1.0346 5.19831 x 10-1+ 12 1.0021 75 Sampling Time = 2 sees; Process Time Constants = 5.027 Desired Steady State Value = 1; Process Dead Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 1.0 7.66176 x 10-2 6 0.17133 3.64853 x 10-2 8 0.12768 1.90363 x 10-3 10 0.10173 1.04544 x 10~3 12 0.08453 1.5 3.07823 x 10-1 6 0.68833 1.8928 x 10~2 8 0.66239 1.20918 x 10~3 10 0.64617 7.8545 x I0~k 12 0.63511 2.0 3.72881 x 10"1 6 0.83381 2.29736 x l'O"2 8 0.80397 1.46971 x 10-3 10 0.78539 9.55674 x 10_lt 12 0.77275 2.5 4.07114 x 10_1 6 0.91036 2.50981 x 10-1 8 0.87831 1.60631 x 10~2 10 0.85839 1.04483 x 10-3 12 0.84485 3.0 4.28508 x 10"1 6 0.95820 2.64241 x 10-1 8 0.92472 1.6915 x 10~2 10 0.90391 1.1004 x 10~3 12 0.88978 4.0 4.68201 x 10_1 6 1.2321 2.8434 x 10"1 8 1.1356 1.9003 - x 10~2 10 1.0632 1.16831 x lO"3 12 1.0042 76 Sampling Time Desired Steady = 3 sees; State Value = 1; Process Time Process Dead Constants = 5.027 Time =7.4 Performance Index Loop Gain No. of Sampling Intervals Used Transient Response at Steady State 1.88962 x 10-1 6 0.17217 1.0 1.22913 x 10-1 8 0.12818 8.82331 x 10-2 10 0.10205 6.69777 x 10-3 12 0.08476 7.57575 x 10_1 6 0.69024 1.5 6.36551 x 10"2 8 0.66382 5.59645 x 10~3 10 0.64730 5.02585 x 10"3 12 0.63604 9.17672 x 10-1 6 0.83611 2.0 7.72597 x 10-2 8 0.80569 6.80216 x 10-3 10 0.78675 6.11502 x 10-3 12 0.77388 1.00192 6 0.91287 2.5 8.44039 x 10_1 8 0.88019 7.43438 x 10-2 " 10 0.85988 6.68548 x 10"3 12 0.84607 1.05456 6 0.96084 3.0 8.88633 x 10"1 8 0.92670 7.82866 x 10"2- 10 0.90548 7.04104 x lO"3 12 0.89107 1.13627 6 1.3675 4.0 8.99741 x 10"1 8 1.2003 7.97865 x 10-2 10 1.0856 7.15603 x 10-3 12 1.0473 Sampling Interval, N Fig. 4.23 - Transient response of Compensated zero-order hold control system with performance index as parameter. X10 TI = T2 = 5.0271 sees 4 ~6 ~8 10 12 Sampling Interval, N Fig. 4.24 - Transient response of uncompensated half-order hold control system. 79 -* Sampling Interval, N Fig. 4.25 - Transient response of compensated half-order hold control system with performance index as parameter. 80 performance index applied, the design loop gain is calculated. Table 4.5 shows the loop gain as a function of number of samplings used for various values of performance index and sampling rates for the control system. Increase in performance index decreases stability as measured by the value of the loop gain, — small loop gain values implies more stability —. All the trends observed in the case of the control system with zero-order are repeated here. Fig. 4.24 is a typical response [equation (4.96)] of the uncompensated system as a function of sampling interval. The proportional controlled system transient response is shown in Fig. 4.25 as a function of the sampling interval with performance index as a parameter. Increase In performance index reduces steady state error and also decreases the stability margin of the control system. Common to both control systems (system with zero-order hold and system with half-order hold) is the increase in loop gain and hence less stability as the value of the performance index is increased. This is also true for increase in sampling time. Also the error, —deviation from the desired steady state value of 1 —, decreases with increased value of performance index but increases with increased number of samplings used and sampling time- In all the conditions tested, the control system with half-order hold gave better transient response and is more stable than the system with zero-order hold. An interesting feature observed from the analysis of the transient response of the two control systems is their behaviour with different performance index values. The best transient response and hence minimum error response occurs at a performance index of 1.5 ± 0.25 for the control system with 81 zero-order hold, while for the system with half-order hold, the best response occurs at <j> = 3.0 ± 0.25. Also the system with half-order hold attains steady state conditions faster than that of the zero-order hold system. 4.3 Experimental Equipment The designs suggested above were tested experimentally using the equipment shown schematically in Fig. 4.26. The system consists of a heating tank of about 0.08327m (22 gals.) capacity connected through 1.9cm (3/4 inch) pipe of length 0.762m (2 1/2 feet) to a U-tube shell and tube exchanger. The heat exchanger shell is 0.914m (3 feet) long and 20.32cm ( 8 inches) in diameter and is made of 6 inch schedule 40 iron pipe. There are 18 — 1.27cm (1/2 inch) outside diameter copper tubes of length 76.2cm (30 inches) in the tube compartment of the heat exchanger (see appendix 13 for heat exchange diagram). The heat exchanger is connected as a feedback loop to the heating tank through a 1.27cm (1/2 inch) copper pipe and a recirculating pump. _ Also on this feedback loop is a by pass that is controlled manually through a gate-valve. The heating tank (drum) has a copper heating coil through which steam from the main line in the laboratory is used to heat the water in the tank. The steam flow rate is controlled by a gate valve that is manually controlled. Five copper-constantan 'ungrounded' thermocouples are placed as shown in the diagram. Water is heated in the drum by steam and flows through the connecting pipe, where one of the thermocouples is located, into the shell side of the heat exchanger. It is assumed that the water temperature at this connecting pipe is the same as that in the tank. The hot water in the shell is used to heat the coolant water in the tubes. The outlet shell water is returned to the tank through the recirculating pump and an 'MK 315' LEGEND AID A/D A/D -Or Cold Later —x>a— I Steam gate valve pleating coil (£" copper coil) LL) Or IM1 D/A Pipe line Cable lines Flow sensor 'ungrounded' Thermocouple Analog-Digital converter Digital-Analog Converter Heat tank r~ HEAT EXCHANGER 8 Bypass va.lve A/D A/D | I I HP Pump ' (Constant flowrate at 31.13 ft3/s) D/A A/D A/D DIGITAL COMPUTER I Fig. 4.26 - Schematic Diagram of Equipment 83 paddle wheel flow sensor which measures the flow rate and transmits a flow signal to an 'MK 314' signal conditioner. This conditioner converts the signal to voltages and transmits it to the digital computer through a 'Miniac' analog computer for voltage scale down. The PDP8 digital computer reads this voltage in machine units which in turn is converted to flow rate values by a control program logic. Another 'MK315' paddle wheel flow sensor is placed at the tube water inlet position. This sensor measures the flow rate of water which flows through the control valve. The thermocouples transmit temperature readings in voltage to five (one for each thermocouple) 'Model 199 Omega digital temperature indicators' that are mounted on a vertical panel to enable a visual inspection of the temperature profile in the control system. Voltages proportional to temperature are sent from the temperature indicator to the digital computer (PDP8) through the Miniac analog computer. In the analog computer, the voltages are magnified ten times to reduce the error in the A/D converter. The control system consists of a PDP8 digital computer which samples the inlet-outlet water temperatures, and water flow rates and manipulates the control valve to obtain the desired outlet water temperature. The computer is interfaced to the control valve through an operational amplifier. The voltage signal is 'power amplified' to 24 volts and sent out in square wave form to a power-current converter, this then transmits the current signal to a current to air pressure converter which then drives an air-to-close 'Foxboro' control valve positioned at the water inlet tube of the heat exchanger. All through this study, it has been assumed that the dynamics of the control valve, thermocouples and flow sensors are negligible compared to the process dynamics. 84 4.4 System Identification and Initialization 4.4.1 Identification By Graphical Methods The control system as described above was used in the identification and initialization process. In this stage of the study the air that controls the valve was cut off making the loop an open one. Under this condition, water was allowed to flow through the tube and out to the drain continuously, while the heating tank was filled and the recirculating pump was used to circulate the water from the drum through the heat exchanger shell and back to the heating tank. This situation was allowed to continue until steady state in temperature as observed from the digital temperature indicators was attained. Then a 10% increase in steam pressure, manually set by turning the steam valve on the mainline was effected. A sampling time of one second was used to datalog the temperature profile of the outlet tube water. Due to the excessive noise in the system, the temperature response was filtered. This was done by a program which averaged the temperature from fifteen measurements taken at equal times calculated for each sampling rate. In this case fifteen measurements were averaged in one second, the average was filtered by multiplying it by a weighting factor and added to a weighted value of the previous filtered response. The relationship used in this algorithm (temperature response datalog) is given as T(J) = cx^CJ) + (l-af)T(J-l) (4.97) where T(J) is the jth filtered response; T^(J) is the averaged temperature, T(J-l) is the previous (J-l)th filtered response a.f is the weighting factor. , --f— _ , . , ... 100 200 300 Time Sec-Fig. 4. 27 - Process Reaction Curve. 86 The used in this work was 0.4. Both the number of samplings summed up and averaged and the weighting factor were determined by trial and error, comparing the printed responses with that observed on the digital temperature indicator. The process reaction curve is shown in Fig. 4.27. Since there Is no prior knowledge of the control system dynamics and hence transfer function, an approximate transfer function was obtained by the method of Strejc. The control system approximate transfer function was determined to be -0.8734s G (S) = * v- - (4.98) P (4.2s+l) This was then modified to a second-order system with a transfer function of G (s) = e"7*4s/(6.8s+l)2 (4.99) P See Appendix 5 for details 4.4.2 Quasilinearization Method This method has been known to give better parameter values than graphical method16. A better approximation of the second-order transfer function parameters was calculated by quasilinearization method. The basic assumptions necessary for the formulation of the identification algorithm used in this study are constant dead time (or negligible variation in it), constant values for sampling time, filtering time and weighting factor for filtering the measured temperature response. The quasilinearization method (Eveleigh, V.W.16) identifies x^ in the second-order overdamped plus dead time transfer function by solving for 87 successive solutions of the transfer function linearized with respect to variations in the unknown parameters. The above algorithm was used with Runge-kutta 4th order formula to estimate the time constant of the process (see appendix 6 for details) and it was found to be 5.0271. The same dead time as determined by the graphical method was used again since the linearization method employed here requires the computation of the derivative |T(t-T) = "(t-T) The process reaction response used in this determination was generated by a step input which does not yield sufficient information to calculate the delay time. 4.5 Experimental Result The suggested design, using the new performance index-definition, was tested. A 50% proportional band about the set point was imposed on the controller. A proportional control algorithm for the half-order hold circuit was programmed into the PDP8 digital computer. The switches for the circulating pump, control valve and digital temperature indicators were set on. The cold water from the tap was allowed to flow through the valve and into the heat exchanger tube. The whole system was left at this condition for about five minutes in order to attain steady state. A step change in the load variable (steam pressure) was manually imposed- on the heating drum-heat exchanger control system. Due to excessive noise present in the system, the single-exponential filtering equation was again used to smoothen the measured outlet temperature response. The single-exponential filtering equation is given as 1 2 3 4 5 6 7 Time M ins-Fig. 4.28a - Experimental closed-loop transient response of proportionally controlled sampled-data system for a 2% step change in loan (half-order hold) . Fig. 4.28b - Manipulated variable response of proportionally controlled sampled-data system for a 2% step change in loan (half-order hold) . —i 1 3—4 5—r~—f Time Min-Fig. 4.29a - Experimental closed-loop transient response of proportionally controlled sampled-data system for a 3°C step change in set point (half-order hold) . i 5 5 4~ 5 £T 7 Time Min-Fig. A.29b - Manipulated variable response of proportionally controlled closed-loop sampled-data system for a, 3°C step change in set point (half-order hold). 92 DP(J) = otfDl(J) + (l-af) DP(J-l) (4.100) where DP(J) is the smoothened temperature at instant J, DP(J-l) is the previous smoothened temperature and D1(J) is the average actual tempera ture after fifteen sampling times. The is the filter factor and is equal to 0.4. The control algorithm is written in such a way that the valve is only activated or moved after fifteen sampling measurements. For the control system with half-order hold the actual temperature printout is calculated from the relation DK(J) = DP(J-l) + 0.5[DP(J-1) + DP(J-2)]*(t-T)/T (4.101) where DK(J) is the calculated output response at instant J, DP(J-l) and DP(J-2) are the actual smoothened output temperature for the previous and penultimate periods response respectively. A half-order hold uses the two, previous responses to determine the new response. Fig. 4.28a,b and4.29a,b are the transient responses and manipulated variable responses respectively for the control system with half-order hold for i two different values of performance index. Figs. 4.30a,b and 4.31a,b are the same conditions for the control system with zero-order hold. These results confirm what has been shown theoretically to be true that the half-order hold circuit always results in better responses than that of zero-order hold. The criterion used to arrive at this conclusion is the less oscillatory nature of the temperature and manipulated variable responses of the half-order hold control1system than that of zero-order hold control system. Hence the possibility of the half-order hold control system exceeding threshold stability condition is greatly minimised. Also the system with halforder hold attained steady state conditions faster than those of zero~order hold. Fig. A.30a - Experimental closed-loop transient response of proportionally controlled sampled-data system for a 2% step change in load (zero-order hold). 1 3 Time 4 Min. Fig. 4.30b - Manipulated variable transient response of proportionally controlled closed-lodp sampled-data system for a 2% step change in load (zero-order hold). 1 Time 4 Min. Fig. 4.31a - Experimental closed-loop transient response of a proportionally controlled sampled-data system for a 3°C step change in set point (zero-order hold) . 2 " 3 4 § & f Time Min. Fig. 4.31b - Manipulated variable response of proportionally controlled closed-loop sampled-data system for a 3°C step change in set point (xero-order hold). 97 CHAPTER 5 DIGITAL COMPENSATION DESIGN Discrete control algorithms, suitable for programming in a direct digital control computer are now derived. Three compensation design algorithms viz: deadbeat performance or minimal prototype design (Bergen and Ragazzini);4 improved proportional controller (Moore et al)4*4 and optimum feedback control (Tou, J.T.)56 are formulated and experimentally verified. 5.1 Deadbeat (Minimal Prototype) Performance Design Many special purpose algorithms, both continuous and discrete, for lumped parameter systems have been published in the control litera-ture.Most of these works have dealt with first order plus dead time model systems. In an earlier paper, Mosler et al46 reported on minimal 6 0a prototype algorithms for this type of system. Shunta and Luyben gave minimal prototype and minimum squared error designs for a process with inverse response behaviour. Also Luyben, W.L.363 presented damping coefficient design charts for sampled data control of a first-order process with dead time. Several workers, Gupta, S.C. and C.W. Ross;203 Hartwigsen, C.C. et al;20b Morley, R.A. and CM. Cundell443 and 6 3a Thompson,A have reported the use of- discrete versions of conventional control algorithms. The performance of these -systems under computer control is of course limited to that which is obtainable from their continuous-data analogs. Although the responses of these special purpose algorithms are excellent for the specific tasks for which they 98 are designed, their performance often deteriorates under undesigned load condition or parameter shifts. In this study a generalized, — single algorithm that can apply rJo setpoint and load changes —, direct digital control algorithm Is designed for a second-order overdamped process with dead time using either a zero-order hold or half-order hold as smoothing device. A direct digital control computer is normally used to control a number of process loops on a time-shared basis. In this study a typical loop is considered, and other loops in the overall control system can be treated in a similar manner. At the end of each sampling period for this particular loop, the computer samples the output of the loop and compares it with the desired setpoint value to form a value for the error. The computer then calculates a new value for the manipulated variable. The manipulated variable of the loop is held constant at the value calculated by. the computer until the loop is sampled again. The computer memory is used to store sequentially past values of the error and manipulated variable. Note that only a small number of the most recent values, as defined by the algorithm, are retained in the computer. The control algorithm utilizes a linear combination of the past history of the system in forming a new value for the manipulated vari able. The absolute position u(t) of the final control element is deter mined from the formula k P u(nT) = I g e [(n-i)T] - J h u[(n-j)T] (5.1) i=0 j=l 3 Equation (5.1) gives the value at which u(t) is to be held constant during the entire (n+l)st sampling period, that is, u(t) = u(nT) for 99 nT < t < (n+l)T. T is the sampling time and the g's and h's in equation (5.1) are all constants. In this algorithm only the (K+l) most recent values of the error and the p most recent values of the manipulated variable need be stored. The design objective is to determine suitable va lues of {gi}, and {h.}. The deadbeat performance index design by the method of transition state matrix is used. The requirements of the deadbeat performance criterion for the control system are: (i) The compensation algorithm must be physically realizable, which implies that the order of the numerator should be less than or equal to that of the denominator, (ii) The output of the system should have zero steady state error at the sampling points, (iii) The final output should equal the input in a minimum number of sampling periods. However, for applications of digital compensation to real . systems-, several additional constraints are included: (iv) The digital compensation algorithm should be open-loop stable. (v) Unstable or nearly unstable pole-zero cancellations should be avoided, since exact cancellation in real processes is impossible, and the resulting closed-loop system may be unstable or excessively oscillatory, (vi) The design should consider the entire response of the system to eliminate hidden oscillations (intersampling ripple). 100 (vii) In addition to the system responding optimally to a given test input, it should perform satisfactorily for other possible inputs and disturbances. These extra constraints are required inorder to ensure that the proposed compensation algorithms perform satisfactorily on real systems. To meet these requirements, the resulting control system may respond with a settling time longer than the deadbeat performance settling time. However, the idea of finite settling time is used only «' as a theoretical performance criterion. In real systems, as with the case in this study, where, modeling error, noise, and momentary disturb ances are present, it is not possible to bring the state of the system completely to rest. This does not negate the value of the theoretical concept of finite settling time, because systems designed to meet this theoretical requirement give satisfactory performance in real tests as is observed in this study. 5.1.1 Development of Algorithm The compensator design procedure is known as the variable-gain approach due to Tou, J.T.65 The basic principle underlying this approach is the assumption that the desired digital controller can be treated as a variable-gain element Kn, which will have different values during different sampling periods. The input to the variable-gain element Kn is the control signal u, and the output is assumed to be uj. At any instant t = nT*",' the input and output of the variable-gain element are related through a constant multiplying factor Kv, that is u (nT+) = Kv u(nT+) (5.2) 101 where Kv is the gain constant of the variable-gain element during the (n+l)st sampling period. See Appendix 7 for theory. Let the deadtime x be any multiple of the sampling time. The design of the required digital compensation will depend only on the response of the system at instants of sampling plus deadtime. Therefore, it will be necessary to verify that the system does have satisfactory intersampling behaviour. At least two methods exist for determining the presence of hidden oscillations (that is, intersample ripple). One classical tech nique is to analyze the system by the modified Z-transform after the compensator D(Z) has been designed. The entire response can then be verified to have finite settling time. A second method is to determine the corresponding response of the manipulated variable M(Z). For linear, time-invariant, overdamped processes, if the response of the closed-loop system has zero steady state error at sampling plus deadtime instants, and if the manipulated variable also has a finite settling time, then it is assured that no hidden oscillations exist because the system is receiving constant input. It is not necessary to use the modified Z-transform on the manipulated variable, because it is a piece-wise constant signal and its values at sampling plus delay time instants completely describe its reponse. If the same system responds with finite settling time, but the manipulated variable continues to oscil late, the response of the system must obviously have an intersampling ripple. 5.1.2 Compensator Design for System with Zero-Order Hold The first step towards obtaining a set of first-order differen tial equations to describe the dynamics of the system and hence the r + Or Hold u -8. ->' o Fig. 5.1 - State-variable diagram of control system with zero-order hold. 103 state variable formulation is to draw a block diagram for the control system. This diagram is made up of integrators and constants. Consider the control system of Fig. 4.1 and remove the controller, the overall transfer function becomes -ts G(s) = (s + 81)(s + e2) (Ljl4—> (5.3) The state-variable diagram of Equation (5.3) is shown in Fig. 5.1 for a unit step change. The dotted line represents the future position of the i compensator. The state vector V is defined as V = r Xl X2 u (5.4a) and the initial state vectors are V(A) 1 0. 0 0 (5.4b) while after the step change the state vectors become V(A+) 1 0 0~ 1 (5.4c) where A is the deadtime. From Fig. 5.1 the first-order differential equations are: dV — = AV dt (5.5) 104 where A = 0 0 0 0 0 -Qi 1 e 0 0 -62 9 0 0 0 0 and the state transition difference equations are where B V(n + AT""") = BV(n + AT) (5.6) 10 0 0 0 10 0 0 0 10 1-10 0 The solution to the differential equations by state transition matrix method is V(t) = 4(A) V(A+) (5.7) where X = t - (n + A)T Note that 4>(X) is the overall transition matrix and is given as $(X) = L~1[SI-A]~1 Thus, I- -10 0 0 -ex -ex -e x -ex -ex 0 e b'(e -e ) b^+b^e 4-b^e 4>(X) = 0 0 0 e 0 -v 0^1 - e ) 1 (5.8) 105 See Appendix 8 for details of derivation and parameter definition. If it is assumed that the digital compensator is a variable-gain element K , which implies that the value of K varies from one period to n n another, and let this compensator be introduced into the control loop as shown in Fig. 5.1; then at any instant t = (n + A)T+, the input and output of the variable-gain element are related through a constant multiplying factor K, that is, ui[(n + A)T+] = Knu[(n + AT+]. For the condition t=n+j+lT, the X in the transition matrix becomes X = (n + j + 1)T - (n + j + 6)T = (1 - 6)T = V. (where j is the integral multiple of sampling time part of the process delay). Hence the transition matrix is given as (V) = -0 V -0 V -0 V 1 12 0 e b^(e -e ) 0 e -02V -0 V -0 V [bl+ble 1 +b!e 2 ]K L 5 4 n -0 V il(l-e )Kn (5.9) Thus, equation (5.7) can be written as V[(n + j + 1)T] = <j>n(V)BV[(n + j)T] (5.10) 106 From equation (5.10) when n=0 V(l+jT) = 4>o(V)BV(J) --e v -e v [b' + b'e + b'e ]K -02v 0l(l - e )KQ (5.11) and when n=l V[(2 + j)T] = *1(V)BV(l+jT) = -0. V -0 V -0 V -e v -0 v -0 v {e 1 (bj+bje 1 +bje 2 )Kq + b^l-e 2 )(e 1 -e 2 )KQ + -9 7 -6 7 -0 7 -0 7 -9 7 -0 7 Kl(b2+b3e +b4e )tl-(b2,+b^e +bje 1 ^jl^e 2 (1-e 2 )K£ -0 7 -6 7 -9 V -9 7 -0 7 {0ie (1-e * )KQ + 61(l-e * )[l-(b^e +bje 1 )KQ]K } . -0 7 -0 7 1 - (b^+b'e +b£e )KQ (5.12) Since the process has been assumed to be a second-order system, the following condition must be satisfied for dead beat performance, i.e. system responds to a stepwise input in the quickest manner without overshoot. -0 7 -0 7 -0 V -9 V -6 7 -6 V X1(2+jT) = e (b^+b^e +b£e )Kq + bje^l-e )(e -e )KQ -0 7 -6 7 -6 7 -6 7 +(b'+b'e +b'e )[l-(b'+b'e +b'e )K ]K - 62 (5.13) 107 -0 V -0 7 -0 7 -0 7 -0 7 X2(2 + jT) = 6ie L (1-e Z )Ko+91(l-e Z )[l-(b^b'e +b£e Z )K01K1=61 (5.14) Equations (5.13) and (5.14) are solved simultaneously for Kq and -0 7 -0 7 -0 7 [8 (1-e ) - (bl+ble +b'e )] K = - — (5.15) ° -0«V -8 7 -8 7 -0 7 -0 7 -8 7 (1-e )(e -e )[(b^+b»e +b£e )+b{8 (1-e )] -8 7 -0 7 [1-e (1-e )K ] K = (5.16) -8 7 -0 7 -0 7 (1-e * )[l-(b'+b'e +b£e )K } For simplicity in analysis; it is assumed that all the delay effects in the control system are encountered in the compensator such that the output from it, is a delayed signal. Thus, instead of having the output signal be ui(nT), an output signal of ui(n+jT) is derived. The relationship between the input and output signals to and from the compensator is ui[(n+j)] = Kn u(nT) (5.17) Also required for deadbeat performance is that the output from the variable-gain element after the second sampling plus deadtime instant should be held constant at 1/0^ Equation (5.11) gives u(0+) = 1, thus ui(jT+) = K 108 From Equation (5.12), + -V -e2v u(T ) = 1 - (bl+ble +b.'e )K = X, (5.18) i. J 4 O 1 and Ul[(l+j)T+] = KlU(T+) = K1X1 (5.19) Thus, the Z-transform of the output sequence from the digital compensator (variable-gain element K ) may be expressed as n ux(Z) = Z~J[KQ + K1X1Z~1 + X2Z~2 + X2Z~3 + ] (5.20) which reduces to Z'^K '+ (K.X.-K )Z_1 + (X. - K.X.)Z~2] /r,\ 1 o 1 1 o 2 1 1' ] ,_ u.(Z) = : — (5.21) (1 - Z l) But the Z-transform of the input signal to K is n ; u(Z) = 1 + XjZ-1 (5.22) Thus, the pulse transfer function of the desired digital controller is given by u.(Z) Z_J[K + (K X -K )Z_1 + (X -K.X. )Z"2] M(Z) D(Z) = — 110 _ 1 1 = (5.23) u(Z) (1 + \Z~ )(1 - Z ) E(Z) Equation (5.23) is a generalised compensator algorithm for the control system with zero-order hold irrespective of the value of the deadtime. The three important cases are as follows: Case I: No dead time (x = 0) In this case j and 6 are zero, thus V = T. 109 TRANSIENT RESPONSE OF COMPENSATED SYSTEM: Therefore, the compensator transfer function becomes D(Z) = [Kq + Y z"1 + Y2Z*2] [1 + Y3Z-1 - X^"2] (5.24) where Yj_ = K X - KQ; Y2 = *2 - K1X1; Y3 = ^ - 1 A schematic diagram of the system controlled by the digital computer is shown in Fig. 5.2 At each sampling instant, the digital controller samples the error signal e(t). The controller operates on this sampled value e*(t) and the previous sampled values to obtain an output m*(t). This value of m*(t) is then retained until a new value is computed at the next sampling instant. The signal flow diagram of the control system is shown in Fig. 5.3. The state differential equations in matrix form are given as: X2(s) X3(K+1) X4(K+1) *ii(s) <t>i2(s) *i3(8) 0 4>21(s) <t>22(s) <J>23(s) 0 -K„ -K, h Y3 X1(KT) X2(KT) + X3(KT) K2 X4(KT) K3 _ _ _ _ r(KT) where K = Y. " K T ; K - y + K Y, - Y0K„. (See Appendix 8 for I. 1 OJJ / ol Jz parameter definitions) 110 Fig. 5.2 - Schematic block diagram of control system with digital controller. r(t) e(kj Fig. 5.3 - Signal flow graph of control system with digital controller (zero-order hold). Ill Fig. 5.4 - Open loop transient of uncompensated control system with zero-order hold. 112 Fig. 5.5 - Open loop transient response of compensated control system zero-order hold. 113 The transient response of the digitally compensated second-order overdamped process with zero-order hold and no dead time is derived from, the solution of Equation (5.25), noting that the output C(nT) is equal to Xi(nT). Figs. 5.4 and 5.5 are the transient responses of both the uncompensated and compensated system respectively.Case II: Dead time x = mT, where 0 < m < 1. This condition results in j = 0 and V = V; and K + (K.X - K ) Z_1 + (X0 - K. X. ) Z~2 D(Z) = -2 1 2 ^ 1 (5.26) (i - z A)(i .+ x1z"i) Case III: Dead time x = (j + m)T where 0 < m < 1; and V = V. This results in Z~J[K + (K.X. - K )Z-1 + (X_ - K.X.)Z~2] D(Z)=—!-2 LJ_o 2 (5.27) (i - z x)(i.+ xxz L) 5.1.3 Compensator Design for System with Half-Order Hold Consider the control system of Fig. 4.1 and remove the controller, the overall transfer function becomes: A + i _ p Ts op"TS G<s> " (VT^"—I—> (s * v<s + e2) <5-28> The state-variable diagram of Equation (5.28) is as shown in Fig. 5.6 for a unit step change. The dotted line represent the future position L _ _ J t>-W-^H>-¥H> 9iM Fig. 5.6 - State-variable diagram by cascade programming method. i of the compensator. r X, V = 115 The state vector V is defined as (5.29a) and the initial state vectors are V(A) = 1 0 0 0 0 (5.29b) while after the step change the state vectors become V(A+) 1 0 0 0 1 (5.29c) From Fig. 5.6 the first-order differential equations are dV dt = AV (5.30) 116 where A = 0 0 0 -6-0 0 0 0 0 0 0 0 0 0 -1/5T (5/4)8 >2 -1/5T (5/4)9 -1/T (5/4)9 0 and the state transition equations are (5.31) V[(n + A)+] = BV[(h + A)] where B. = 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 -1 0 0 0 and A is the total process dead time. As has been stated earlier on, the solution to the differential equations (5.30) by state transition matrix method is V(t) =-<{>( X) V(A+) (5.7). 117 Thus, 1 0 0 e 4>(X) =0 0 0 0 1 -ex -ex <*{(e -e ) *24(X) *25(A) -e2x -aX -ex -«'(e -e ) ^(X) -aX ^2(l-e"aX) 0 0 0 0 1 (5.32) where a = 1/T; an =.1/5T; a2i = (5/4)6. See Appendix 9 for parameter definitions. Applying the same procedure used in the zero-order hold case gives (V) = 10 0 0 e a^(e -e ) 0 *24(V) 0 *25k; 0 0 -e v 2 _av _e v -a'(e -e 2 * K' 6 ) 35 n 0 0 0 0 0 0 a' Cl-e ")K' 22> 6 ; n 118 Thus, equation (5.7) can be written as V[(n + 1 + j)T] = <j> (V)BV[(n + j)T] (5.10) From equation (5.10), when n = 0 V[(l + j)T] = <|)o(V)BV(J) = 25 o 35 o a1 (1 22v -av e )K' o (5.34) when n = 1 'V'." V[(2 + j)T] = *1(V)BV[(1 + j)T] -8 7 -0 V -9 7 1 -av ^25K'oe +ai(e "e )*35K;-*24a22(1-e >Ko+*25(1-*25Ko)Ki> -0 7 -aV. -a7 -9 7 e *35K;-a6a22(1-e )(e "e >Ko^35(1-*25Ko)Ki _a7 -a7 -a7 a22e (1"6 )K;+a22(1-e )(1-*25Ko)Ki 1 " +7.K 25 o (5.35) 119 Since the process is a second-order system, the following conditions must be satisfied for dead-beat performance, i.e. system responds to a stepwise input in the quickest manner without overshoot. -6 V -0 7 6 7 -a7 X1[(2+J)T] = »25K;e +ai*35(e -e ^-^a'.a-e )KM-*25(1-*25Ko)Ki = 1 (5'36) -9 7 -97 9 7 -aV X1[(2+j)T] = •35K'e +a6a22(e "e )(1"e )KQ + •35(1-*25Ko)Kl = ° (5'37) Equations (5.36) and (5.37) are solved simultaneously for K' and K'. ^ o i . -9 7 -9 7 -a7 -0 7 K; = *35/[(e -e )(*25*35+ai*35)+*25a6a22(1-e ><e > " -9 7 • <t»24<f)35a22(1"e )] (5.38) Ki - [a6a22k;(e~aV-e"e V> " ^o6'9 71/*35(1-*25K;) (5'39) For simplicity in analysis, it is being assumed that all the delay effects in the control system are concentrated in the compensator such that the output from it is a delayed signal. Thus, instead of having the output signal be uj(nT), an output signal of ui[(n+j)T] is derived. The relationship between the input and output signals to and from the compensator is given as uit(n + j)T] = ru(nT) (5.40) 120 Equation (5.34) gives u(0+) = 1, thus ui(jT+) = K1 o From Equation (5.35), u(T+) = 1 - <f.25K^ = ^ (5.41) and Ul[(l+j)T+] = K[u(T+) = K| (l-<t>25K^) = Kjf^ (5.42) —aV -aV -aV X3(2+j)T) = e a a22(l-e a )K^ + <*22(l-e a )(l-*^)^ = B2 (5.43) It should be noted that deadbeat performance requires zero input to the third integrator for t > (2+j)T. To satisfy this requirement on the third integrator, the output of the variable-gain element K' must be n maintained at 02 after the second sampling plus deadtime period. Thus the Z-transform of the output sequence from the digital compensator (variable-gain element K') may be expressed as n uT(Z) = Z j[K^ + K^Z 1 + 32Z 2 + 32Z 3 + ,...] (5.44) which reduces to _ _ _ [K» + (K g -K )Z + (3 -K'3 )Z~2] u. (Z) = Z"J -2 Li_^ _ ?_J_1 (5>45) (1 - z l) But the Z-transform of the input signal to K' is n u(Z) = 1 + B1Z~1 , (5.46) Thus, the pulse transfer function of the desired digital controller is given by Mz> -n tKA + (K1B1"KA)Z + (B9-K'B )Z 2] D(Z)=nT7^= Z ——Ii _l (5.47) 121 Equation (5.47) is the generalised compensator algorithm irrespective of the value of the deadtime. The three prominent cases are as follows: Case I: No dead time (T = 0) In this case j and 6 are zero, thus V = T TRANSIENT RESPONSE OF COMPENSATED SYSTEM: Therefore the compensator transfer function becomes [K' + g.Z-1 + B,Z~2] D(Z) = — ^ (5.48) [1 + 65Z - BjZ z] where 3„ = K.'B. - K'; g. = 6 - K'B1 and g = 3 - 1 311 o 4 2 11 5 1 A schematic diagram of the system controlled by the digital computer is shown in Fig. 5.7. At each sampling Instant, the digital controller samples the error signal e(t). The controller operates on this sampled e*(t) and the previous sampled values to obtain an output m*(t). This value of m*(t) is then retained until a new value is computed at the next sampling instant. The signal flow diagram of the control system is shown in Fig. 5.8. The state differential equations in matrix form are given as (see Appendix 9 for parameter definition). 122 r(t) +^ em, e*ct) m*ft) Hold m(t) {4+5TS)0 C(t), jr Fig. 5.7 - Schematic block diagram of system with digital controller. 123 Sampling Interval, N Fig. 5.9 - Open loop transient response of uncompensated control system with half-order hold. 124 _i , t , f— 2 4 6 8 10 Sampling Interval, N Fig. 5.10 - Open loop transient response of compensated control system with half-order hold. 125 Xx(s) X2(s) X3(K+1) X4(K+1) _ _ >u(s) *12(s) *13(s) 0 4»21(s) <(>22(s) <()23(s) 0 -h1 0 0 -h„ "3: X1(KT) X2(KT) X3(KT) X4(KT) *2(s) Y(KT) where h = B„ - K'0 • h = g, + K'g - B h . 12o5 24 ol51 The transient response of the digitally compensated second-order overdamped process with no. deadtime is derived from the solution of Equation (5.49), noting that the output C(nT) is equal to Xi(nT). Figs. 5.9 and 5.10 are the transient responses of the uncompensated and compensated system respectively. Case II: Dead T = XT, where 0 < X < 1. This condition leads to j = 0, and V = V, and D(Z) = [K0 + (KierK0)z 1 + (VK{3i)z 2] (1- - Z_1)(l + B1Z_1) (5.50) Case III: Dead time T = (J+X)T where 0 < X < 1 This results in D(Z) = Z [K^ + (K'B^K^Z 1 + (02-K'B1)Z 2] (1 - Z_1)(l + B^"1) (5.50) 126 EXPERIMENTAL RESULT: In evaluating any proposed control algorithm, the closed loop system should perform satisfactorily in the presence of modeling error and noise which inevitably occur in real systems. The digital compensation of Equations (5.23) and (5.51) for control system with zero-order hold and half-order hold respectively were tested experimentally. Due to the excessive noise present in the system, the output temperature response was averaged after fifteen measurements and filtered using the single-exponential filter equation as has been explained in Chapter 4. Figs. 5.11a,b; 5.12a,b, 5.13a,b and 5.14a,b are the transient and manipulated variable responses for step changes In the load variable (steam pressure) and set-point respectively for control systems with.zero-order hold and half-order hold. Though, it was not possible to bring the state of the system completely to rest after two sampling plus dead time periods; this does not negate the value of the theoretical concept of finite settling time, because systems designed to meet this requirement theoretically as observed in this work, give satisfactory performance in real tests. In the two conditions tested the system with half-order hold gave better responses than those of system with zero-order hold. This is in agreement with what has been 29 suggested in the literature since the half-order hold is a better approximation to an ideal filter than zero-order hold. What looks like ripples in the manipulated variable responses of the two systems may be due to the process noise in the control system. Time Min-Fig. 5.11a - Transient response of a digitally controlled closed loop sampled-data system with zero-order hold for a 2% step change in load variable (steam pressure) . Fig. 5.11b - Manipulated variable response of a digitally controlled closed-loop sampled-data system with zero-order hold for a 2% step change in load variable (steam pressure). to 1—1— i i A—~5 r i Time Min-Fig. 5..12a - Transient response of a digitally controlled closed-loop sampled-data system with zero-order hold for a 3°C step change in set point. 1 2 3~ 4 5 6~ 7 Time Min. - Manipulated variable response of a digitally controlled closed loop sampled-data with zero-order hold for a 3°C step change in set point. Fig. 5.13a - Transient response of a digitally controlled closed-loop sampled-data system with half-order hold for a 2% step change in load variable (steam pressure). Time Min • 5.13b - Manipulated variable response of digitally controlled closed-loop sampled-data system with half-order hold for a 2% step change in load variable (steam pressure). Fig. 5.14a - Transient response of a digitally controlled closed-loop sampled-data system with half-order hold for a 3°C step change in set point. 5.14b - Manipulated variable response of a digitally controlled closed-loop sampled-data system with half-order hold for a 3°C step change in set point. 135 5.2 Application of Combined Optimum Control and Prediction Theory to Direct Digital Control The dynamics of chemical process, as distinguished from those of mechanical or electrical systems, are characterized by large time con stants, distributed parameters, and often time sluggish response. Although the criterion for optimum control in the chemical industry is generally maximum profit, a criterion of minimum steady state error would seem to be almost equivalent and may clearly be more convenient and simplier for analysis. The optimum feedback control law gives the manipulated variable as a function of state output. In the control of many industrial processes transport lag has a significant effect on the performance of the control algorithm. Common also, is the fact that the state variables of these systems are not per fectly known, but instead noisy measurements of a subset of them are available. Furthermore, there is often substantial process noise pre sent. This part.of the study develops a methodology for the combined optimum control and prediction of a class of these systems using either a zero-hold order or half-order hold as the smoothing device. Combined control and prediction theory is applied to second-order plus dead time approximations of higher order overdamped systems. For example, in a distillation column, the transfer function between feedrate and overhead composition can accurately be represented by this approximation. Also, a heater-heat exchanger system can be approximated by this model. For these systems, the combined control and prediction algorithm may be used as a direct replacement for conventional direct digital control. Using combined control and prediction, optimum control of noisy systems can be 136 achieved within realistic operating constraints. This section describes the implementation of combined control and prediction to single input -single output systems which may be approximated with the second-order plus deadtime representation. The dynamic programming me thod66 is employed for the derivation of optimum feedback control law. See Appendix 10 for details of theory.5.2.1 Analysis and Design of Control System with Zero-Order Hold The state-variable diagram of the control system for a step change is given in Fig. 5.15. The existence of transportation lag and process noise makes the measurement of an accurate value of the one state variable which is accessible for direct measurement very questionable. Therefore an analytical predictor is introduced into a feedback loop, such that the predicted state variable values at time t + (0.5 + j + 6)T in the future is used in the minimization process instead of actual values. The time used in the prediction includes, t, the future time; 0.5T which is the time suggested by Murril, P.W. , to represent the dynamic effect of the interface between the discrete and continuous parts of the control system; plus (j + 6)T the process deadtime. The control system overall transfer function is G(s) = (1 - e"Ts) 6e"TS/s(s + 6^(3 + 6^ (5.52) The set of first-order differential equations is X' = u (5.53) where X = [C XL X r]; D' = [0 0 1 0] 137 and A' = 0 0 0 0 0 0 1 1 0 0 0 0 0 It is assumed here that the effect of the process deadtime is eliminated by using the predicted state-variable values in future time which includes the deadtime. The performance criterion requires that N 2 . J = Z . [C(K) - r(K)r K=l be minimised. Equation (5.53) is solved by state transition matrix method to give X(t) = <f>'(T)X(to) + /T <j)'(T,A)DV u(A)d\ o •where § '(T) = L 1[SI - A±] 1 The performance index can be expressed as N Min J = E X'(K) Q'X(K) N K=l (5.54) (5.55) where Q1 1. 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 1 is a weighting factor, positive definite symmetric matrix chosen in such a way as to give more significance to the measurable state variables. 138 u 9r e Fig. 5.15 - State-variable d-iagram of control system by iterative programming method. Predictor Fig. 5.16 - State-variable diagram of control system with analytical predictor. 139 The choice of a positive definite matrix guarantees the uniqueness and linearity of the control law and the asymptotic stability of the control system for a controllable process. The state transition equation in discrete form describing the control process is X[(K + 1)T] = <^(T)X(K) + G'(T)u(K) (5.56) where G'(T) = [g|(T) g^T) g^(T) 0] is estimated from J>J(T, X)DdX, since u(KT) is assumed to be a piecewise constant input. See Appendix 11 for parameter definition. By a dynamic programming method and for a control system with accessible state variables for direct measurement, the optimum law is given as u°(K) = B'X(K) (5.57) where B' = [G*(T)Q'G(T)]_1 G'(T)Q'(T) (5.57a) Since X^(K) and X^(K) are not directly measurable, the solution above, Equation (5.57) is not complete, and a method for the estimation of these state-variables must be applied. Normally the states can be determined from the values of the directly measurable state but due to the existence of the transport lag and excessive process noise, a predictor is used instead of an estimator. The difference between a predictor and an estimator is that the former predicts future values of the state variables while the estimator uses the past measurements to calculate the values of the state variables. With the addition of the analytical predictor in the feedback loop, the state-variable diagram of the control system is shown in Fig. 140 The predictor algorithm must therefore calculate a control action at time, t, on the basis of an output X , predicted for time P t + T(0.5 + j + 6). Equation (5.53) is solved to give the predicted state variable values. The output state variables predicted at time t + T(0.5 + j + 6) are given as j i-1 Xp = (l-ApD'ut + A-^l-BpD' E (Bp u^) + A^B^td-C'pD'u^^ +CpCt] (5.58) (See Appendix 11 for parameter definition) 5.2.2 Analysis and Design of Control System with Half-Order Hold Control of single manipulated input- single controlled output processes is considered, where dynamics may be represented by a transfer function of the form u(s) (s + 6^(3 + 82) . ^'^> A unity process gain with no loss of generality is assumed. C(s) and u(s) are the normalised, transformed process output and input vari ables. The control system overall transfer function is approximated by 4 + 5Ts 6e~TS 1 - e~Ts G<s> = <TT1& (s + 8^(8 + e2) 'Hr—* (5'60) The state-variable diagram of the control system for step change is given in Fig. 5.17. Because of the availability of only one state-variable for direct measurement, process deadtime and presence of process noise which cannot be effectively determined or eliminated, an analytical predictor is Fig. 5.17 - State-variable diagram of control system. 142 introduced into a feedback loop. The predicted state variable values at time t + (0.5 + j + 6)T in the future are used in the minimization process instead of actual values. The set of first-order differential equations is X - AjX + Du (5.61) where X = [C Xx X2 X3 r]; D = [0 0 0 1 0] and -an 0 A = 0 0 1 0 -&1 1 0 0 -Q, -a 0 . 11 -ail 0 0 0 0 -a2i 0 0 0 0 0 0 a = (5/4)9; an = 1/5T; a^ = 1/T The performance index requires that N • 2 JN = Z [C(K) - r(K)]Z . K=l be minimised. Equation (5.61) is solved by a state transition matrix method. The performance criterion can be expressed as N Min J = Z X*(K)QX(K) K=l (5.62) where Q = 1 0 0 0 -1 0 0 " 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 143 The state transition equation, in discrete form, describing the control process is X(K + 1) = <KT)X(K) + G(T)u(K) (5.63) where G(T) = [gi(T) g2(T) g3(T) gi+(T) 0] is estimated from /«|)(T,X)DdX, since u(K) is assumed to be a piece wise constant input. See Appendix 11 for parameter definition. For a control system with accessible state variable for direct measurement and by a dynamic programming method, the optimum feedback control law is given as u°(K) = BX(K) (5.64) where B = [G'(T)QG(T)j"1 G'(T)Q(KT) (5.64aEquation (5.64) is not a complete solution of the optimum control problem, since Xi(K), X2(K) and X3(K), the state-variables, are not accessible for direct measurement. An analytical predictor is Introduced into a feedback loop to' estimate the inaccessible state variables. The state-variable diagram of the control system is given in Fig. 5.18.The predictor algorithm is given as j i-l i X = (l-A)Du +A(1-B1)D E (B ut_iT)+AB3[(l-C)Du _T+CXfc] (5.65) (See Appendix 11 for parameter definition). IMPLEMENTATION: The implementation of combined optimum feedback control and prediction is as follows: (i) Calculation of optimum Gain: The optimum gain is precompu-ted for both control systems; Equations (5.57a) and (5.64a). Equations (5.57a) and (5.64a) show that the optimum gain is a function of the it 5T -Q- 2k 50 4 T ft predictor V Fig. 5.18 - State-variable diagram of control system with analytical predictor. 145 weighting matrix Q' and Q. The necessary requirements for the selection of the weighting matrix are that, it should be positive definite symmetric so that the control law is unique and linear. This condition also guarantees the asymptotic stability of the control system. the second requirement is that the values of Q1 or Q should be such that more weight is given to all directly measurable state variables. (ii) Prediction Matrices: The prediction matrices are computed off-line. The process deadtime should be broken down into its integral and fractional components with respect to the sampling time. With these off-line calculated values, the on-line prediction equation (5.58) or (5.<65), is used to estimate the states. Note that the states are assumed to be initially at rest. (iii) Control Equation: The optimal feedback control (Equations (5.57) and (5.64) is applied at the present time t = KT and stored as first element in the manipulative 'u' vector. EXPERIMENTAL RESULTS: the combined optimal and prediction algorithms, of' Equations (5.57) and (5.58), or (5.64) and (5.64) for control system with either a zero-order hold or half-order hold respectively were tested experimentally. Due to the excessive noise present in the system, the output temperature response was averaged after fifteen measurements and filtered using the single-exponential equation as has been described in Chapter 4. Figs. 5.19a,b; 5.20a,b; 5.21a,b and 5.22a,b are the transient and manipulated variable responses for step changes in the load variable (steam pressure) and setpoint respectively for control system with zero-order hold or half-order hold. A compari son of the two control systems shows that the system with half-order Fig. 5.20b - Manipulated variable response of optimum controlled sampled-data system with zero-order hold for a 2% step change in load variable. 2 3 4 5 6~ 7 Time Min. 5.21a - Optimum control of closed-loop sampled-data system with half-order hold for a 3°C step change in set point. Time Min-g. 5.21b - Manipulated variable response of optimum controlled sampled-data system with half-order for a 3°C step change in set point. -» 1 :—• 1 1— +- 4-1 2 3 5 6 7 Time Min-Fig. 5.22a - Optimum control of closed-loop sampled-data system with half-order hold for a 2% step change in load variable (steam pressure) . 154 hold has the best transient response and less oscillation or variation in the response of the manipulated variable. 5.3 Improved Proportional Controller In the process industry the commonest control equipment is the analog computing element which exerts continuous control action (u) based on the instantaneous difference between the desired condition and the actual condition. Electronic or pneumatic controllers, using Proportional, Proportional-Integral, or Proportional-Intergral-Derivative algorithms are standard instruments in virtually all process pl'ants. Efforts in digital control still rely heavily on numerical approximations of analog algorithms. This practice may result in degraded performance. Control degradation in a sampled-data system can be understood by considering the Interaction between a digital computer and a continuous process. The dynamic effect of the interface between . the discrete and continuous systems is similar to that of pure deadtime 4 ft or transportation lag, equal to half the sampling time. A digital algorithm which eliminates the effect of deadtime is not penalized by sampling. This can be accomplished by including an analytical predictor in the control process, to estimate the value of the process output at time equal to half the sampling time plus deadtime in the future. Corrective action is then based on the predicted rather 4 4 than the actual ,output. This approach suggested by Moore et al. is used to derive a simple proportional control algorithm for the system. 155 5.3.1 Improved Proportional Controller of System with Zero-Order Hold The overall transfer function is -Ts G(s) - (r—rr ) 6e -TS (s + e1)(s + e2) (5.66) The state-variable diagram by the iterative programming method is given in Fig. 5.23. The set of first-order differential equations describing the control system is X = FX + Eu (5.67) C = Xx -9! 1 where F = 0 -0; and E 0 0 The effect of the total delay time in the control system,— delay due to the hold and process transportation lag —, is eliminated by using a proportional controller that operates on the error between the desired value and the predicted value from the analytical predictor. That is, u = K (r - c ) (5.68) c p The solution to equation (5.67) by state-transition matrix method is x(t) = Kt tn) x (t.) + fi <|.(t X)EudX' (5.69) » u u to , If the assumption that u(t) is approximately constant from one sampling period to another, that Is jT K T K. (j+l)T, Is made, then u(t) can be brought out of the integral sign. Thus, equation (5.69) becomes j i 1 i x = (1-P^EU + Fl(l-F2)E I (F2 o ) + F1Fj[(l-F3)Eu • + F3xt ] i=l Predictor Fig. 5.23 - State-variable diagram of control system and predictor 157 where Fl " -e T/2 , -eLT/2 -e2T/2 e a^(e -e -82T/2 : a = l/f6 -6 ) 1 /K 2 r F2 " -9 T -9 T -9 T e a (e -e ) 0 -9 T 2 ' F3 " -9 6T -8 5T -9 6T e a (e -e ) 0 -926T Note that jT is the integral multiple of the sampling time part of the process dead time and <5T is the fractional component. But C = [ 1 0 ]X (5.71) P P Thus, the proportional controller algorithm is given as K t 1 + EK (1-F ') c I rt -:FIXI-F2)E MF^u^) 1=1 - F,F3[ E(l-F„)u + F„x 1 1 2L V 3 • t-jT-T 3 t. J (5.72) 5.3.2 Improved Proportional Controller Of System With Half-Order Hold The control system overall transfer function is -Ts „ -Ts G(s) - (A ... /.T„)(—:— ) ^4 •+ 4Ts/v s (s+e^Cs+e^ (5.73) 158 The state-variable diagram is as shown in Fig 5.24. The set of first-order differential sequations for the control system is x = Hx + qu c = [ 1 0 0 ]X (5.74) where H = 0 0 -a. '2 "al and q = [ a a a ] a = (5/4)9; &l = 1/5T; ^ = 1/T As in the case of the control system with zero-order hold, the effect of the delay is eliminated by using a proportional controller that operates on the error between desired value and the predicted value from the predictor. The predicted states are X = (1-Hl)qut + Vl-H2)q J (H^u^),+ :I1HJ[(1-H3)qut _T + ^X ] 1=1 J (5.75) where Hl = a^e -92j2 , - e ) -6 2/2 A_ 9lj2 . _A_ a2?2 , „A 62?2 V + a3e + a e 4 a5(e - e ) *2?2 -a 2/2 al = A. a3 = A ar = -a i/(e2-el); a2 = -a(82-81+l)/a2-G1)(e2-81); -a(e2-a2+l)/(61-a2)(82-a2) a4 = -a/(8^ ) (a^ ) ; l/(a2-62) X + K. u H(s| 5T Sh1 H -a Xt+'05+j+S)T Predictor X Fig. 5.24 - State-variable diagram of control system with analytical predictor, i 160 H2 " "-V A, "V -V i a1(e - e ) -82T r A"°1T+ A"a2T+ A-V; [a e + a e + a e J A, 2 2 . <*5(e - e ) -a2T and H3 " 1 A 1 2 1 e a^(e - e _e 6T 2 ) , -8 6x . -a <5x . -6 6T Al A 2 A ? • xe + a e + a e 2 3 4 A -e26T "a26T «5(e - e ) -a26T But u = K (r-c ) c p Substituting the value of and rearranging gives the control algorithm as ' u - [i + qyi-Hl)] K - Hi(i-H2^ .^"r^t-iTV - H^3 [ q(l-H3)ut_.T_T + H3xt]} (5.76) 5.3 Experimental Results The improved proportional controller equations (5.72) and (5.76) for the two control systems were experimentally verified. Due to the noise in the process, the output temperature response was averaged after fifteen' measurements and filtered using the single-exponential equation as has been described in Chapter 4. The same proportional gain values for the normal or conventional proportional controllers (see Chapter 4) were used- Figs. 5.25a,b and 5.26 a,b are typical transient and 161 manipulated variable responses respectively for the two control systems. As is seen there is a marked improvement over the results in figs. 4.31a,b and 4.29a,b. Fig. 5.25a - Experimental closed-loop response of proportional control with predictor of a sampled-data system with zero-order hold for a 3°C step change in set point. ' Fig. 5.25a - Experimental closed-loop response of proportional control with predictor of a sampled-data system with zero-order hold for a 3°C step change in set point. Time Min-Fig. 5.25b - Manipulated variable response of closed-loop proportional control with predictor of a sampled-data system with zero-order hold for a 3°C step change in set point. K\ = 1.81971 x 10-3 Time Min-Fig. 5.26a - Experimental closed-loop response of proportional controller with predictor of sampled-data system with half-order hold for a 3°C step change in set point. •01 1 • Experimental Ti = T2 = 5.0271 sees T = 7.4 sees T = 0.5 sees N = 8 = 3 Kx = 1.81971 x 10~3 Time Min-Fig. 5.26b Manipulated variable response of proportional control with predictor of sampled-data system with half-order hold for a 3°C step change in set point. 166 CHAPTER 6 ADAPTIVE CONTROL Controllers are linear elements that are often required to operate in non-linear systems. Thus they cannot be expected to provide optimum performance over a wide range of system operating conditions. However, through a linear representation of the non-linear system a controller can be designed with adaptive features that do provide opti mum compensation for the transient system requirements. In general terms, an ideal adaptive controller would, based on measurements of only the input and output variables of a totally unknown plant, ensure that the plant's output converges to a desired value as specified by the operator. This controller would imply good servo control, that is, response to changes in plant's setpoint, plus good regulatory control, that is, rejection or compensation for the effect of external disturb ances. The adaptive algorithms in most of the adaptive controllers developed recently are based on one of the search strategies or a stabi lity analysis that guarantees global asymptotic stability of the complete closed loop system. Also in most adaptive algorithms the controller is required to continuously test and update the system para meters. This has the disadvantage of requiring large memory storage capacity and thus increased cost of operation. Since the majority of system dynamics found in chemical, petroleum, and other continuous process industries are slowly time varying, it is unnecessary to have continuous updating of system parameters. In this study the system parameters are updated periodically. D DC Computed f ft) Process input pulse ^Actuator Process Process pulse response Sensor Fig. 6.1 - Flowsheet of on-line parameter identification. 168 A direct digital control computer can periodically test plant dynamics and tune parameters of the control algorithm. Fig. 6.1 shows an approach to accomplishing self-tuning of the system. In the control algorithm, the computer Is expected to internally disconnect the feed back, thereby making the process open looped. It then carries out the following steps: (1) It pulses the process. In a pulse test, the principal re quirements are that.the system be driven sufficiently hard so that the dynamics of the system are excited but not so hard that the capacity of the system to respond is exceed ed. In applying the pulse method compromises are made, particularly in selecting the pulse height and width. For example, if the width of the input pulse is long compared with the response, the dynamics of the system are only mod erately excited; hence, the high frequency responses are suppressed, obscured, or non-existent. Ideally, it would appear that the smaller the input pulse the better, for then perturbations of the output would be a minimum and the -system would tend towards linear behaviour. However, the presence of noise necessitates the production of a response which is discernible from the interferences. While the disturbing pulse excites the system with all frequencies at once, the amplitude of the exciting frequencies contained in a pulse are not necessarily constant. In fact, except for an impulse 169 function (one that differs from zero for only an infinitesimal period of time), the amplitude of the harmonic content diminishes monotonically with frequency. Depending upon the shape of the pulse, amplitude functions may or may not diminish to zero. Those which do may increase again and exhibit another zero at a higher frequency. Pulse shapes and the location of their first zeros are important criteria for evaluating their usefulness as pulsing functions. For a given pulse width T , a rectangular pulse has the smallest useful harmonic content. In this study a smooth pulse given in Equation (6.1) is used. f(t) = K[l - cos(2-t/T )] (6.1) P This type of pulse has been suggested by Hougen et al.24 to extend the useful harmonic content considerably. (ii) The computer identifies the process In the form of a second-order plus deadtime fit, and finally (iii) calculates the controller settings for the deadbeat perform ance criterion compensator already designed in Chapter 5. The direct digital control computer identifies overall process dynamics through the same actuator and sensor dynamics that its control action sees. This is a distinct advantage over attaching special sensors to the control loop for performing dynamic analysis and control synthesis. It is assumed that the pulsing inputs f^(t) to tne process are noise free since these values are internally computed and applied. Only the process response, the outlet temperature, contains noise. Some 169 function (one that differs from zero for only an infinitesimal period of time), the amplitude of the harmonic content diminishes monotonically with frequency. Depending upon the shape of the pulse, amplitude functions may or may not diminish to zero. Those which do may increase again and exhibit another zero at a higher frequency. Pulse shapes and the location of their first zeros are important criteria for evaluating their usefulness as pulsing functions. For a given pulse width T , P a rectangular pulse has the smallest useful harmonic content. In this study a smooth pulse given in Equation (6.1) is used. f(t) = K[l - cos(2jtt/T )] (6.1) P 24 This type of pulse has been suggested by Hougen e^t al_. to extend the useful harmonic content considerably. (ii) The computer identifies the process in the form of a second-order plus deadtime fit, and finally (iii) calculates the controller settings for the deadbeat perform ance criterion compensator already designed in Chapter 5. The direct digital control computer identifies overall process dynamics through the same actuator and sensor, dynamics that its control action sees. This is a distinct advantage over attaching special sensors to the control loop for performing dynamic analysis and control synthesis. It is assumed that the pulsing inputs f^(t) to the process are noise Eree since these values are Internally computed and applied. Only the process response, the outlet temperature, contains noise. Some 170 other possible noise sources include: other process input, internally generated noise, and measurement noise. The problem then is to charac terize the process from these input-output sequences. A moment method as suggested by Michelsen et al.**1 in which noise effect on the process characterization is small was used. 6.1 Parameter Estimation by a Modified Moments Method The transfer function of any stable linear, any dimensional sys tem can be evaluated by numerical integration of its experimental trans ient response to an arbitrary pulse forcing function. The experiment ally determined, normalised transient response C^(t) and CQ(t) are converted into moments of the form Mn'S = /" C(t)exp(-st).tndt = (-l)n (C(s)) (6.2) ds where C (s) = /' C(t)exp(-st)dt . The Laplace transforms and their derivatives are related to the system transfer function, G, through the relations: C (s) G = -2 '- (6.3) C.(s) i GJ_ = C'(s) G C(s) o (6.4) i 21 _ (G'2) = c"(s) _ (CCs)^ G G C(s) C(s) o i <6'5 171 or, in general dsn G dsn C(s) i The right hand sides of Equations (6.3 to (6.6) are evaluated by o (6.6) TI S computing the moments M ' , and G and its derivatives are thus determined for an arbitrary number of s-values. The model transfer function has been chosen as ,. -TS G(s) = - j r (6.7) (xlS + ir where x is the deadtime and x^ the process time constant. The parameters x and t\ are determined from the following relations: (Note: that the moments are calculated using a fixed s^value). In G = -xs - 2 ln(xlS +1) , (6.8) Zj_ =T + 7 * (6.9G (x^s +1) 2 2x2 (£1) _ (£1_) L_ (6.10) G G (xlS+l) -G' . ,G". ,G\2 Let u[ = — and u2 = (—) - (—) Solving equations (6.9) and (6.10) with these substitutions gives ul/2 x "2 1/2 (6.1D (1.414 - su2/Z) j7 172 and U'(T s+1) - 2T x = L (6.i2) (T^S+1) Evaluation of T and thus requires the calculation of at least two n s moments M ' for each transient response. Parameter evaluation for a model containing r parameters requires calculation of at least r moments. It is normally advantageous to compute a larger number of moments and evaluate the parameters by statistical analysis, because the validity of the system model may thereby be assessed. This is not necessary in this case since the model has been proved earlier on to be correct. The main advantages of the outlined method compared with the normally used method of central moments are: (i) the validity of the model may easily be assessed, and (ii) The sensitivity to experimental errors, in the determination of the transient responses is greatly .reduced, provided suitable s-values are used. The optimum s-value is determined from the noise sensitivity function. Fig. 6.2 is the noise sensitivity as a function of s for = 5.027, T = 7.4 and unit step input. See appendix 12 for details of derivation. In the central moment method, the s-value is always taken to be zero but as the noise sensitivity analysis shows, (Fig. 6.2); as the s-value is increased from 0 to 1, the noise intensity decreases until a minimum is reached at an s-value of one. Since this mimimum occurs for both time constant and dead time it is advisable to use a s-value of 1. Noise has a great degrading effect on processes, more over high noise effects leads to greater model error which will result in poor control of the system. Fig. 6.2 - Noise sensitivity as a function of laplace transform operator. 174 6.2 Compensator Design The control algorithm utilizes a linear combination of the past history of the system in forming a new value for the manipulated variable. The absolute position of the final control element is determined from the formula t k p u(nT) = I g.e[(n-i)T] - J h u[(n-j)T] (6.13) i=0 1 j=l J Equation (6.13) gives the value at which u(t) is to be held constant during the entire (n+l)st sampling period, that is, u(t) = u(nT) for n/T _< t < (n+l)T. T is the sampling period and the gi' s and h ' s in equation (6.13) are all constants. In this algorithm only the (k+1) most recent values of the error and the p most recent values of the manipulated variable need be stored. The design objective is to determine suitable values of {g^}, and {hj}* These constants have already been calculated in Chapter 5 and are given as: (a) For control system with zero-order hold Df, uco M(z> -j tko +. (Vrv*"1 + (yvx^"2] D(z) = uTzT ~ ETZT ~ z ri+x rhn 7h ~~~~~ ' ( } (l+X1z )(l-z ) (b) For control isystem with half-order hold {Z' (I-z )(l+3Lz ) See chapter 5 for details. 175 6.3 Implementation and experimental result (i) The first step in the implementation of the adaptive control is initialization of the model parameters off-line. With some modification in the programming of the algorithm it is possible to initialize the model parameters on-line using the estimation subroutine of the algorithm. (ii) Program the manipulated variable position algorthm of equations (5.27) and (5.51) for the two control systems respectively in their discrete time form. ' (iii) The model parameter estimation subprogram should include the pulsing function given in equation (6.1). When the computer controller is internally disconnected, the manipulated valve is made to track equation (6.1). During this pulsing time, the outlet water temperature is internally datalogged and used In the modified moments method as, has been discussed earlier on to estimate the parameter values. This parameter estimation may be performed continuously, that is, after every sampling and manipulated valve move or after some time interval that may be held constant as in this study, decreased or increased as the operator seems necessary. The above adaptive designs were experimentally tested on the heater-hear exchanger control system described in chapter 4. A 50% proportional band about the set point was imposed on the controller. Due to the noise present in the system, the single-exponential filtering equation was used to smoothen the measured outlet temperature response. No filtering was used in the pulse temperature datalog program since it Time Min. Fig. 6.3a - Adaptive control response of a sampled-data system with zero-order hold. Time Min Fig. 6.3b - Manipulated variable response of sampled-data system with zero-order hold adaptive-controller. 178 is assumed that the process noise is negligible because it is interna generated. Figs. 6.3a,b and 6.4a,b are typical adaptive control responses for the controlled temperature and manipulated variable for control system with zero-order hold and half-order hold respectively. Time Min-Fig. 6.4a - Adaptive controller response of a sampled-data system with half-order hold. • Updating Point ,Experimental 1 2 - Manipulated variable response of sampled-data system with half-order hold adaptive controller. + 181 CHAPTER 7 DISCUSSION AND CONCLUSION 7.1 Discussion 7.1.1 Analysis of proportional control In the stability analysis of the control system under investigation, the value of the limiting proportional gain is a measure of the degree of stability of the system. In the analysis of the second-order overdamped system, — that is, model with no transport lag —, increase in sampling time results in decreased stability of the control system irrespective of the smoothing device employed. This is expected since longer sampling periods imply a greater deviation from the continuous system state. This observation has been made by many 2 9 H7 6^ other workers. , , In both cases (control system with zero-order hold and control system with half-order hold) increase in the ratio of the time constants results in increased stability. This trend is expected because, as has been reported in control literatures, 11,6I+ multiplicity of poles or zeros always introduces greater instability to a control system.. It Is a common practice in the design of compensators for control systems to place the poles far apart from each other. This will definitely lead to increased difference between the time constants and hence increase their ratio. As has been stated in the main study, although all proportionally controlled first and second-order systems are stable in the continuous domain, regardless of the value of the loop gain. This is not true for a second-order system in the sampled data domain, irrespective of the smoothing device used. 182 For a second-order plus dead time overdamped system with either a zero-order hold or half-order hold, the stability increases with increased dead time until a maximum is reached and thereafter the stability decreases. In all the cases considered, — Fig. 4.12 and 4.13 are typical stability boundary conditions for the two control systems —, the points of maximum stability for the two control systems occur at approximately the same dead time value. This is expected from equation (4.55) where the half-order circuit gain is just that of a zero-order hold circuit gain multiplied by. a positive factor greater than one. This amplification results in greater operating proportional gain • range. Hence, for all the conditions tested the control system with half-order hold is more stable than the control system with zero-order hold. In the transient response analysis of the two control systems, the new performance criterion gave a more stable and better response for 75 the system than the one-quarter decay ratio index. This is expected, since a second-order overdamped system, at least theoretically, does not overshoot. The existence of an overshoot is the underlying assumption of the one-quarter decay ratio criterion. Irrespective of the performance criteria used, increase in sampling time Introduces greater instability to the control systems. For the new performance index used, increase in the number of sampling Intervals used Increases the stability of the control systems. This is expected since for any sampling time, the amount of time given for the control system to attain steady state conditions is dependent on the number of sampling intervals employed. A shorter time will impose greater constraint on the control system and hence will introduce 183 instability. A detrimental aspect of a larger imposed settling time is the production of a sluggish response which results in greater steady state error. Thus an optimum number of sampling intervals of 8 was used in the experimental tests. For comparison purposes, the performance index <|> was increased from 1 to 3, while in one case <|> was increased to 4. Increase in <j> brings about greater instability to the systems. Also the error response decreases with increased <j> until a minimum is reached; — for control system with zero-order hold, <p = 1-5 and for the half-order system <b = 3 —, after which the error response increases with increase <J>. (See Tables 4.4 and 4.5). In all the conditions tested, the control system with half-order hold gave better responses for both theoretical and experimental verifications than the control system with zero-order hold. (See Figs. 4.28 to 4.31). 7.1.2 Compensator Design Of the three compensators, the algorithm derived from the deadbeat performance principle gave the best transient responses. This may be due to the constraints of stability, fastest response and settling time, and zero steady state error used in the derivation. Although the stability of the compensated control system is a prerequisite for the application of any compensator to a control system and must be used in the derivation of the algorithm; the other constraint of error minimisation imposed on the combined optimum control and predictor compensator does not always guarantee zero steady state error, since the minimum may not be zero. This may explain why the dead beat performance compensator gave the best response. Also the 184 Inaccessibility of some of the states in the optimum control which led to the use of a predictor may contribute to its poorer response as compared to that of deadbeat performance. The worst response was given by the improved proportional controller which made use of predicted output response instead of actual measured values in its corrective response. This is expected; after all a zero steady state error response is not a constraint on its formulation but an objective. Despite its poor response when compared to the other two, it still gave a better response than the conventional proportional controller (Figs. 5.25 to 5.26 and 4.28 to 4.31). Even though, it was not possible to bring the state of the systems, — for the deadbeat performance compensator —, completely to rest after two sampling plus dead time periods, this does not negate the value of the theoretical concept of finite settling time, because systems designed to meet this requirement theoretically, as shown in this study, give satisfactory performance in real tests. 7.1.3 Adaptive Control The good response of the adaptive control system used in this study has demonstrated that it is not necessary to continuously update model parameter values in most equipment found in the chemical and petrochemical industries. As has been stated in this study, the periodic updating of parameters has the added advantage of requiring less computer memory. Also, this study has illustrated the possibility of using pulse tests for on-line parameter estimation. The trend of the experimental transient responses all through this study confirms the assumption that any high order system can be 185 approximated by a second-order overdamped plus dead time model. During the experimental verification a sample averaging method was applied to reduce and in some cases eliminate the excessive noise in the process. Each of the fifteen sampling measurements for any particular sampling time, is summed up and the average is taken, and the single-exponential filter is applied to it to give the response. 7.2 Conclusion • For sampled-data systems which can be adequately modeled as over-damped second-order plus dead time with either a zero-order hold or half-order hold as the smoothing device, a systematic design procedure has been given for choosing the loop gain and sampling rate of a sampled-data feedback controller using a new performance Index. This type of controller is simple to set and implement. A comparative study was carried out on the relative efficiencies of the new performance index and the normally used one of, one-quarter decay ratio index. The new performance index gave better responses than the one-quarter decay ratio criterion. This may be due to the assumption of an overdamped second-order model for this work. If the recommended settings are used, a relatively small amount of information is needed for satisfactory control. This is of significant importance for control when the measurement is difficult and /or expensive, and when information channels may be limited, as, in this case when a small digital computer is used. Satisfactory performance of the proposed algorithms has been demonstrated when applied to the heater-heat exchanger system with higher order dynamics. The resulting model error may be the reason why 186 the control system did not have finite settling time for the deadbeat performance criterion compensator. However, finite settling time is only a theoretical criterion. Of all the three compensator designs the deadbeat performance criterion gave the best response while the simple feedback proportional controller gave the worst. An adaptive control scheme has been developed which can be applied to a wide class of single input-single output plants. Any of the control algorithms can be used but in the experimental verification only the deadbeat performance criterion was tested. The adaptive control scheme used here depends on a linear second-order overdamped model with a time delay in the process. The method for determining such a model from finite time input-output operating data of the plant was discussed. A pulse method was developed for on line updating of the model parameters. It is also observed that increased sampling periods degrades the response of the control system. 7.3 Recommendation - . The given responses in this work are those of compensators de signed as second-order plus dead time model controlling a fourth order plus dead time model. It is recommended that an actual second-order plus dead time control system be tried to verify how effective the com pensators are. A comparative study of these compensators with continu ous or analog controls viz proportional, proportional-intergral, and proportional-intergral-derivative compensators should be carried out. The equipment has been built such that multivariate control is possible, so, since this work dealt with only single input-single output system; 187 it is suggested that a multivariate control compensator be tried out on the equipment. The versatility of the compensators should be investiga ted with other than temperature response loops. And finally the effect of varying the coefficient of the zero-order hold to give different holds should be investigated. « 188 NOMENCLATURE C(t) Assumed process response with no hold C (t) Assumed process response with hold o DP(J-l), DP(J-2) Actual smoothened output temperature for the previous and penultimate periods respectively for control system with half-order hold DK(J) Calculated output temperature at J-th instant for control system with half-order hold G,G',G" Model transfer function and its first and C second derivatives Error coefficents of deadbeat performance compensator h. Manipulated response coefficient of deadbeat 2 performance compensator H (s) Laplace transform of zero-order hold o \ H^^Cs) Laplace transform of half-order hold J Performance criterion for optimum control N j Integral multiple of sampling time part of model dead time K Proportional gain c K , K , K , K' K', K', Variable-gain elements of deadbeat performance o 1 o 1 n v compensators Q,Q' Weighting matrices for optimum control s Laplace transform operator T Sampling time T Pulse function period P T(J) J-th smoothened temperature 189 T(J-l) (J-l)-th smoothened temperature T^(J) J-th averaged temperature u, u^ Input> output of variable-gain compensator respectively <|> Performance Index $» <t>(^)> <KT), <t>'(T) Transition-state matrices Filter weighting factor a Decay ratio 1 6 Fractional multiple of sampling time component of process dead time. Xa,b,c,d Ratio of model first time constant to second time constant. A, A^ Determinants used in Mason's formula V = (1-6)T Effective time used in the transition matrices x, (j+6)T, A Model dead time ,Model time constants The following parameters are defined in 5.3 E, F, F1, F2, F3, H, H1, H2> H3> q, 6^, &2, a^, , &5 The following parameters are defined in appendix 2: V V V V Dll' D21' °31' V V V V Q7' Q3 • %> Q5' %' Q7 Q9> V "ll' ai2' °13' °15» "16' °17' "ig' Yll> Y12' T3l' Y32' •ll(s)' 4»i2(s)' W'* *22(s)' *11(V)» *12(7)' *21(V)' <f,22(V)' •ll(T)» *12(T)> *21(T)' *22(T)' *1(V)» *2(V)' ^lV(T)> *2V(T) 190 The following parameters are defined in appendix 4: al' a2' a3' a4' ^1' ^2' ^3' ^4' ^5' ^6' ^1' ^2' ^3* ^1' ^2* al' a2' a3' V °5» V V V 811' 612> V 614« 915' 616' 617> V V Y2> Y21 Y22, Vs), VS)« *1(V)» *2(V)» *l"W> *2i(V)> •n(s), <f>12(s), *21(s)' *22(s)' *11(V)' •l2<7)» *21(7)» *22(7)' *11(V) 4 •l2(V)» *21(V)» *22(V) The following parameters are defined in appendix 8: bi' b2> b3» b4> W VVV V V *il(s)' *12(S)' *13(s)> *2i(8)» *22(s)' •iV'0, *i'(s)' ^2 (S)" The following parameters are defined in appendix 9: a, alx, a21, h^, h2, KQ> K{» «{»"02.' a3> al> a'5> aD' a7» a8» a9» ai0' ail> ai2' ai3> ai4> °15' ai6> "I?' °18'' ai9' a20' a2i> a22' Bl' B2' *3' 04, B5,*£, +2..*{1, •{2'*13' Hi' *22' *23 The following parameters are defined in appendix 11: A, Av A|, A'1, B, BL, B\ BJ, C, C'\ D, D', <|>'(T) 191 BIBLIOGRAPHY 1. Allen, P., 2. Astrom, K.J. and Wittenmark, B., 3. Beck, M.S., ^ • 4. Bergen, A.R. and Ragazzlni, J.R., 5. Biery, S.C.and Boylan, D.R., 6. Buckley, P.S., 7. Callander, A.; Hartree, D.; Porter, A.; Stevenson A., 8. Chien, K.; Hrones, J.; and Reswick, J., 9. Cohen, G. and Coon, G., 10. Coon, G.A., 11. Coughanowr, D.R. and Koppel, L.B., 12. Cox, J.B.; Heliums, L.J. and Williams, T.J. 13. Dahlin, E.B., Ph.D. Dissertation, 1967, Loughborough University of Technology. "On self-tuning regulators" Automatica 9, 185-199 (1973). "Adaptive Control-Fundamental Aspects and their Application," Non linear and adaptive control techniques Dun-Donnelley Pub. Corp. 1974. pp. 1-25. AIEE Trans. 73, Pt2, 236 (1954). Ind. Eng. Chem. Fund. 2, 44 (1963). Techniques of Process Control. Wiley, NY. p. 95 (1964). Proc. Royal Soc. Lond. 161 ser. A. 460 (1937). Trans. ASME 74, 175 (1952). Trans ASME 75, 827 (1953). ISAJ 11, 77 (Sept. 1964); 81 (Oct. 1964); 81 (Nov. 1964). "Process Systems Analysis and Control", McGraw-Hill, NY. (1965). "Algorithm for DDC of Chemical Processes", IFAC session 4B, Paper 43A. Instruments and control system. Vol. 41, 77 (June 1968). 192 14. Donaldson, D.D. and Kishi, F.H., 15. Eckman, D.P.; Bublitz, A. and Holben, E., 16. Eveleigh, V.W., ' 17. Feuer, A. and Morse, A.S"., 18. Freedman, B.C., 19. Galller, P.W. and Otto, R.E., 20. Gary, R.I. and Prados, J.W., 20a. Gupta, S.C. and Ross, C.W., 20b. Hartwigsen, C.C.; and Mortimer, K.; Ruopp, D.E. and Zoss, L.M., 21. Hassen, M.A. and Solberg, K.O., 22. Hazebroek, P.; and Vander Waerden, B., 23. Hougen, J.O., 24. Hougen, J.O. and Walsh, R.A., 6 25. Jury, E.I., "Review of Adaptive Control Systems Theories or Techniques," Modern control system theory. Edited by C.T. Leodes Mcgraw-Hill. pp. 228-84 (1965). ISA J. (1962). "Adaptive Control and Optimization Techniques," McGraw-Hill. Chapter 7. (1967). "Adaptive Control of Single Input, Single Output Linear Systems," IEEE Trans. Auto. Control AC-23(4), pp. 557-569 (1978). AIChE Symp. Ser. No. 159, Vol. 72, p. 206. "Self-tuning Computer Adapts DDC'.ISA. p. 235 (1969). AIChE, J 9, No. 2, p. 211 (1963). ISA Trans. 3, 3, 271 (1964). Preprint No. 30.1-4-65 20th Annual ISA Conf. Los Angeles. (1965). Automatica, 6, 409 (1970). Trans. ASME 72, 309-22 (1950). Chem. Eng. Prog. 59, 49 (1963) . "Pulse Testing Methods." Chem. Eng. Prog. 57, No. 3. p. 69 (1961). "Theory & Application of the Z-transform Method." John Wiley & Sons Inc., NY. p. 91 (1964) . 193 26. Kestenbaum, A.; Shlnhar, R. and Thau, F.C, 27. Koppel, L.B., 28. Koppel, L.B.; Kamman, D.T. and Woodward, J.L., 29. Kuo, B.C., 30. Landau, I.D., < 31. Landau, I.D., 33. Latour, P.R.; Koppel, L.B. and Coughanowr, D.R., 34. Lupfer, D.E. and Oglesby, M.W., 35. Lupfer, D.E. and Persons, J.R., 36a. Luyben, W.L., 36. Luyben, W.L., 37. Marr, G.R. and Johnson, E.F., 38. Mason, S.J., IE&C Proc. Des. Dev. Vol. 15, No. 11 (1976). IE&C Fund. 5,403 (1963). IE&C Fund. 198 (1970). "Analysis & Synthesis of Sampled-Data Control System." Prentice-Hall Englewood Cliffs, iN.J. p. 328 (1963). "A Survey of Model reference Adaptive Techniques — Theory and Applications." Automatica 353-79 (1974). Journal of Dynamic Systems, Measurement & Control. 94, 119 (1972). IE&C Proc. Des. & Dev. Vol. 6, No. 4, 452 (196?). ISA Trans. 1, No. 1, 72 (1962). Chem. Eng. Prog. 59, 49 (1963). "Damping Coefficient Design Charts for Sampled-Data Control of Processes With Dead Time." AICHE J. 18, No. 5, 1048 (1972). "Process Modeling, Simulation and Control for Chemical Engineers." McGraw-Hill, NY. p. 520 (1973). Chem. Eng. Prog. Symp. Ser. No. 36, 57, 109 (1961). "Feedback Theory — Some Properties of Signal Flow Graphs." Prg. IRE 41(9). pp. 114-56 (Sept. 1953). 194 39. Mayer, F.X. and Rippel, G.R., 40. McAvoy, T.J. and Johnson, E.F., 41. Michelsen, M.L. and Ostergaard, K., 42. Moczeck, J.S.; Otto, R.E. and Williams, T.J., 43. Monopoli, R.V., 44. Moore, C.F.; Smith, C.L. and Murrill, P.W., 44a. Morley, R.A. and Cundall, CM., 45. Mosler, H.A.; Koppel, L.B. and Coughanowr, D.R., 46. Mosler, H.A.; Koppel, L.B., and Coughanowr, D.R., 47. Mosler, H.A.; Koppel, L.B. and Coughanowe, D.R., 48. Murrill, P.W., 50. Narendra, K.S. and Valavani, L.S., 51. Narendra, K.S. and Valavani, L.S., Chem. Eng. Prog. Symp. Ser. No. 48, 59, 84 (1963). Control Eng. 9, No. 4, 104; No. 8,93 (1962). "The use of residence time distribution data for estimation of parameters in the axial dispersion model." Chem. Eng. „Sci._Vol. 25. pp. 583-592 (1970). Chem. Eng. Prog. Symp. Ser. No. 55, 61, 136 (1965). "Model reference adaptive control with an augmented error signal." IEEE Trans. Aut. Contril AC - 19. pp. 478-484 (1974). ISA. p 70 (Jan. 1970). Process Control Automation, 12, 7, 289 (1965). AIChEJ Vol. 13, No. 4. p< 768 (1967). AIChEJ. . p. 768 (July 1967). IE&C Proc. Des. & Dev. Vol. 5,3. p. 297 (July 1966). "Automatic Control of Processes." International Textbook Comp. Scanton, Pa. (1967). "Stable Adaptive Controller Design." IEEE Trans. Aut. Cont. AC-23(4). .pp. 570-83 (1978). "Stable Adaptive Observers & Controllers." Proc. IEEE, 64(8). pp. 1198-1208. 195 52. Oldenbourg, T. and Sartorious, H., 53. Oldenbourg, T. and Sartorious, H., 54. Palas, R.F., 55. Paraskos, J.A. and McAvoy, T.J., 56. Pokoshi, J.L. and Pierre, D.A., 57. Ray, W.H., 58. Ream, N., 59. Roguemore, K.G. and Eddey, E.E., 60. Seinfeld, J.H.; Gavalas, G.R. v. . : and Hwang, M., 60a. Shunta, J.P. arid W.L. Luyben., 61. Soliman, J.I. and Al-Shaikh, A.,. 62. Sproul, J.S. and Gerster, J.A., 63 . St'rejc V., 63a. Thompson, A., "The dynamics of Automatic Control." ASME. NY. pp. 65-77 (1948). Ibid. Ph.D. Thesis, University of Minnesota. (1970). AIChEJ 16(5). p. 754 (1970). IEEE Trans. Auto. Control, pp. 14, 199 (1969). "Advanced Process Control." McGraw-Hill. p. 256 (1981). Trans. Soc Instr. Tech. 6, No. 1, 19 (1954). Chem. Eng. Prog. 57, No. 9, 35 (1961). IE&C Fund. 9 (1970). "Studies of Sampled-Data Control of Distillation Columns. Feedback Control of Bottoms Composition With Inverse Response Behaviour." IE&C Fund. 10, No. 3, p. 486 (1971). Control. pp. 8, 554 (1965). Chem. Eng. Prog. Symp. Ser. No. 46, 59, 21 (1963). "Approximate determination of the control characteristics of an Aperiodic response process." Automatisme. (March 1960). "Paper presented at IFAC/IFIP Conf. Applications of digital computers for process control. Stockholm, Sweden. (Sept. 1964). 196 64. Tou, J.T., 65. Tou, J.T., 66. Tou, J.T., 67. Truxal, J.G., 68. Tsypkin, Y.Z., 69. Wescott, J., 70. Wills, D., 71. Wilson, H.S., 72. Wolfe, W., 73. Yetter, E.W. and Sauders, G.W., 74. Yih-Shuh Jan., 75. Ziegler, J. and Nichols, N., 76. Ziegler, J. and Nichols, N., Digital & Sampled-Data Control Systems. McGraw-Hill, NY. p. 318 (1959). Modern Control Theory. McGraw-Hill, N.Y. Chapter 4. (1964). Optimum Design of Digital Control Systems. Academic Press, NY. (1963). Control System Synthesis. McGraw-Hill, NY. p. 546 (i959). Sampling Systems Theory. Macmillan, NY. Vol. 2. p. 555 (1964). Trans. ASME 76, 1253 (1954). Control Eng. 9, No. 4, 104. Chem. Eng. Prog. Vol. 60, No. 8, p. 68. Trans. ASME 73, 413 (1951). ISA J. (1962). Proc. IEEE 65, 1728 (1977). Trans. ASME 64, 759 (1942); 65, 433 (1943). ISA J. 11, 77 (June 1964); 75 (July 1964); 63 (Aug. 1964). 197 APPENDIX I HALF-ORDER HOLD TRANSFER FUNCTION DERIVATION The output waveform of a zero-order hold has a zero slope between two consecutive sampling periods. Also its frequency characteristic shows a rapid attenuation for low-frequency signals. In other words, the zero-order-hold circuit holds the measured response of the system at any sampling instant at that level until the next sampling instant. A first order hold exhibits an impulse response that has a constant slope between two consecutive sampling instants, which is determined by the values of the two preceding samples. Thus, the first-order hold estimates the response over the sampling interval from K to K+l as a ramp with the slope determined by the signal values at time K and K-1. It is conceivable that better response characteristics may be obtained from a half-order hold; which has an impulse response with constant slope between two consecutive sampling instants, and which lies midway between the impulse responses of and as shown in Fig. Al.l. The estimation of the new response measurements is as described for first-order hold but with a ramp slope of 1/2. The impulse response of the half-order hold can be represented as a series of step and ramp functions. That is H1/2 = (1 + IT-MO - j u(t-T) - i (t-T) u(t-T) + \ u(t-2T) + |Y (t-2T) Vu(t-2T) (Al.l) 198 First Order Fig. Al.1 - Impulse response of half-order hold. 199 The Laplace transform gives „ f v Is .3 N -sT 1 -sT , 1 -2Ts , 1 -2Ts H1/2(s)=-4 r-- (—) e e + — e + e ' s 2Ts 2s Ts 2s 2Ts /A1 ON (Al.Z) Rearranging gives -Ts H . (s) = (1 - (l/2)e"sT)(^-£ ) +_1 (1 _ e-TS)2 (A1>3) 1 S 2TsZ Fig. A2.1 - Signal flow diagram. 201 APPENDIX 2 STATE VARIABLE DERIVATION AND PARAMETER DEFINITIONS FOR CONTROL SYSTEM WITH HALF-ORDER HOLD The overall transfer function is -Ts „, . ,4 + 5Tswl - e . K0 , .n 1N G(s) - (4-T^TS-)( s—}(S + el)(s + e2) (A2-1} To determine the state equations, Mason's gain formula is applied. There are three loops in the diagram and are given as: ' Li L2 L3 ~=k (a2'2) s Loops Lj, L3 and L2, L3 are non touching loops, thus the determinant of the signal flow graph is given as: A = 1 - (L1+L2+L3) + (InL3+L2L3) That is, [Ts3+s2(T6 +1) •+ s(T9+8 ) + 9] . A = — - - ' (A2..3) Ts The transfer function relation the input X^(KT) to the output X^(s) is (j)^^(s) and is composed of three parts derived from three forwardj paths (a), (b), (c). The transmittance of forward path (a) from X^(KT) to X^(s) is T' = 1/s. Path (a) is touched by loop L2> therefore the determinant of the process becomes Aj = 1 - (Lx + L3) = (TS + ll + l) .(A2.4) 202 Thus, [Ts"+s"(T93+l) + s(T8+63) + 6] 1 1 s(Ts + T9 + 1) , ^ , „ , . — = 3—5 " = *,,(s) (A2.4a) The transmittance (path (b)) from X1(KT) to X (s)•is -K8 T" = 1 _ 4 Ts this path is touched by all loops, thus A^ = 1. Therefore, T"A'' J_i KG ; = 4>" (s) (A2.4b) s[Ts +s (T9.3+l) + s(T9+93)+9] The transmittance from X^(KT) to X^(s) (path c) is -5K9 T 11 1 _ 1,3 4 s The path is touched by all loops, thus A|'1 = 1 Therefore, rjn I I I ^ I I I 1 A1 = o—-5 = +1'1,,(s) (A2.4c) 4[Ts +s (T83+l) + _sCT8+8 )+6]. Hence, the overall transfer function relating the input X^(KT) to the output X (s) is ^ps) which is the sum of equations (A2.4a), (A2.4b) and (A2.4c). That is, *11(S) = *11(S) + *ll(s) + *ii'(s) (A2-5) The transfer function relating the input X^(KT) to the output X^(s) 203 is <}>,',•, (s). There is only one forward path (d) in this case. The trans-2 mittance of the forward path is T^2 = 1/s . This path is touched by two Ts + 1 loops , L2; thus, A 12 Ts T A Therefore 12 .U = =—= (Ts+1) '=+1,,(s) (A2.6) [Ts3+s2(T03+l) + s(TG+03) + 0] 12 The transfer function relating the input xi(kT) to the output X2(s) is <f>2^(s) and is made up of three paths b, c and d. The transmittance of -K0 path b is T' = —5- . This path is touched by all the loops hence S Ts 'A^ = 1. Therefore T* A * 21 21 -K0 . . , . ,o N T— = 5 o = •*,(«) (A7,2a) [Ts +s (T63+l)1 + s(T0+03) + 0] 5K0 The transmittance of path c is = 2~ ; the path is touched by all 4s the loops, thus A^ = 1. T " A " Therefore 21 21 = =- ~5KT9s : = <J>''(s) (A2.7b) 4[Ts +s (T03+1) + s(T0+93) + e] —0 The transmittance of path d is T^j' = — ; the path is touched by loops s" Li and L2, thus A-' = Igl 204 That is, [Ts3+s2(T9 +1) + s(T9+9 ) + 9] A = — : - (A2.3) Ts The transfer function relation the input X^(KT) to the output X^(s) is (fi^^(s) and is composed of three parts derived from three forward paths (a), (b), (c). The transmittance of forward path (a) from X^(KT) to X1(s) is T| = 1/s. Path (a) is touched by loop , therefore the determinant of the process becomes A; = 1 - (Ll + L3). = (TS + H + l) (A2.4) Therefore, Jk^. :. 3-2 -e(T.H-i)-- - .,.,.(s) (A2.7c) [.Ts +s (T9 +1) f s(T8+e3)+6] -The overall transfer function relating the input X^(KT) to the output X2(s) is *21(s) = *21(s) + *2l'(s) + <f)2l'(s) (A2.8) The transfer function relating the input X2(KT) to the output ^(s) *s <j>22(s) and the transmittance is given as T = 1/s and the path is touched by loops and L?, thus „ Ts + 1 A__ = — . Therefore, Z z is 205 T22 *22 = sCTs^tl) (A2>9) [Ts +s (T63+l) + s(T6+e3)+e] The transfer function relating the input r(KT) to the output X^s) is t|^(s) and is made up of two paths: T'A' JL1 „ 5! = ^*(S) (A2.10a) s[Ts +s (T83+l) + s(T6+e3)+9] and T"A" A-2 — ^ — = f"(s) (A2.10b) 4[Ts +s (T93+l) + s(T8+93)+9] The overall transfer function is *J(s) = **(s) + *J(s) (A2.ll) The transfer function relating the input r(KT) to the output X2(s) is composed of two paths viz: ^ K9 _ (A2,12a) [Ts3+s2(T93+l) + s(T9+63)+9] 2 and TJ^L = - 5*™°— — = K(s) (A2.12b) 4[Ts +s (T93+l) + s(T9+93)+9] The overall trartsfer function relating the input r(KT) to the output X2(s) is *2'(s) = +2'(s) + ijT(s) (A2.13) 206 Therefore, the set of first order differential equations expressed in matrix form is X(s) = *il<S> 4>' ( ) .•{2<s> •J2( ) XL(KT) X2(KT) r(KT) (A2.14) Due to the presence of sample and hold, there is a time delay to = KT in the control system; after obtaining the inverse Laplace transform, the time t is replaced by t - KT. The first step in determining the inverse Laplace transform of equation (A2.14) is to find the factors of the main determinant. That is, Ts3 + s2(T83'+ 1) + s(T8 + 83) + 0 '(' (A2.15) or 3 2 s + e.s + ecs + e^ 4 5 6 where 8, = (T0O + 1)/T; 8C = (T6 + 6^)/ T; 6, = 6/T 4 3 5 3 6 (A2.15a) The cubic function Equation (A2.15a) is reduced to the form y3 + Vy + w by performing the substitution s = (y - 6^^3)* Tne three roots of the reduced cubic function as given by Cardan are yi = (Q1 + Q2); Y2 = " <1/2>H<*i + V + ^ (Q1 " V1^ y3 = - (1/2)[-(Q1 + Q2) - /I (Qx - Q2)i] where 207 n = \— + (^: + X_V/2l1/3-yl L 2 ^ A 27; J 2 3 r-w /W , V .l/2il/3 ,,N Q2 = ["2 ~ (-4 + 27) J 5 (A2.16) and w = [263 - 9e465 + 278 ]/27; V = (395 - 82)/3 Since the system is assumed to be overdamped, the roots should be real and hence the condition 2 v3 2- + — < 0 4 27 ^ should be satisfied. Therefore, the solutions to the unreduced cubic Equation (A2.15a) are -Sl " yl " 94/3; S2 = y2 " 94/3; S3 = y3 ~ 94/3 (A2'17) The major determinant is then given as (s + s )(s + s )(s + s ) (A2.17a) -s1(-Ts1+T8+l)/(s2-sl)(s3-s1); B'^ -s2(-Ts2+Te?+l ^(s^Xs^) CL1 = -S3(-Ts3+T9+1)/(S1-S3)(s2"s3); D* = ~6/sls2S3 208 All= 8/s1(s2_si^s3~si); Bii = 0/s2(s1-s2)(s3-s2) Ci'l= e/,s3^sl~s3^s2~S3^; A12 = ^ ~ Ts1)/(s2-s1)(s3-s1) B12- (1 " Ts2)/(s1-s2)(s3-s2); BJ2 = (1 - Ts3)/() (s2-s3) Ajj' = -518/4(82-8^(83-8^; B-' = -5T6/4 (S;L-s2)(s3-s2) C-'=-5T9/4 (Sl-83)(82-s3); A^=-0/(s2-81)(s3-82); B' -ey^Xs^) C^1=-8/(s1-s3)(s2-s3); A21=5esl/4(s2-s1)(s3-s1); 8^5882/4(3^32 ) C21 = 56s3/4 (s1-s3)(s2-s3); A^'' =.0(18^1 )(s3-s2 ) B2l'= 6(Ts2"1)/(srs2)(s3"s2); C2l ~ 8(Ts3~l )(s2~s3) A22 = sl(_Tsl+ l)/(s2-s1)(s3-s1); B22=-s2(-Ts2+l)/(s1-s2)(s3-s2)' C22 =-s3(-T'S3+ l)/C81-83)(32-83); Dul-e/Sl 32 83 ; A^-8^ (82-8l ) (s^s} Bni=-6/s2(srS2)(s3-S2); Cill=-0/s3(srS3)(s2-S3); Am=5T9/4(V8! >(VS1 > BlU=5T9/4(srS2)(s3"S2); ClU=5T9/4(srS3)(s2"S3); A2 = 0/(s?-s1 )(s3~s1) B^ = e/(Sl-s2)(s3-s2); C2' = 0/(s1-s3)(s2-s3); A2 =-5T8sl/4(s2,-s1)(s3-s1) 209 B2" = -5T9s2M(s1-s2)(s3-s2); C2 = -5T6s3/4(Sl-s3)(s2-s3) Pj = exp(-s1T); P^ = exp(-s2T); ?^ = exp(-s3T) • 11(T) = KT^AjpKAjpi^^Pj+CBjpKB^pra^ • 12(T) = A12P;+B12P2+C12P3; *21(T)KA2r+KA21«A2pp;+(B2r+KB21^B21)P2 (C2{'+KC21+KC2r)P3; *22(T) = A^PJ+B^P'+C^P' ^(T) = KD111+K(AIll+A1'11)Pi + K(Biu+B1-11)P' + KCC^+C^ ^ tp2(T) = K(A^+A2,)P'+ K(B^+B2)P2 + K(C^+C2')P3 Q3 - A^PJ+B'^+C^P' +.*22(t)[l " (ApP'+B^P'+Cppp] Q4=*;i2 (T) [A- ' P[+B2{ ' P '+Cy ' P' ] ; Q5=D+(A',1+A|' * )P|+(Bp+B[|' yP^+CC^+C'{ ' )P Q6 = *22(T)Q5; Q7 = *12(T)[(A2pA2ppp(B2pB21)P2+(C21+C21)P3] P|x = exp(-SlVT); P|2 = exp(-s2VT); P^ = exp(-s2VT) ^(oT) = KD*-KA|1«ApKA|p)P|p(B|14KBp+KB' ' ^Pp+CCp+KCp+KClp)?^ • i2(vT) = A12P(1+B12P;2^12P{3; •.2(7T) = A^P^+B^P^-K^P^ *21 ( VT) = (A2i ,+KA21+KA21 )Pil+(B2i ****h™"2l )Pi2+(C2i '+KC21KC21 )Pi3 -ft; *{(VT) = KD11pK(A[lpAppp;i+K(Blll+B1-u)P;2+K(Clu-fCpi)P;3 210 ^(VT) = K(A,^A"^P'1|K(B,JB,^P,124C(C'JC"^P,13 Q' = A^P^+B^P^P- Q4 = ^2(VT)[Q'-1] Q5 = (1-*22(VT)[D*+(Aii+A',')pii+(Bn+B',,)pi2+(cii^'',)pi^ % " *i2(VT)t(A21+A2\)Pll+(B21+B2VPl2+(Sl^n)P;3^ = *2^(VT)[Q3+1]; = <I»22(VT)Q3 Q8 ' = (1+*22(VT))[D*+(Ai\+Aii,)pii+(Bn+Bii,)pi2+(cn^'',)pn RL - • «2(VT)[D*4-(A-1+Aii')?i1+(B1-1+Bi;• )Pi2+(c--1+c;;• >pi3] *JV(T) =A1?Pi+Bl2P2+Cl2P3; 1V *2l(T) = (A21+A2i+A2i')Pi+(B21+B2;+B2r)P2 (C21+C21C2i,)P3 • ^(T) = W-(Ail+Aii+Aii')P1 + (B^+Bii+B-^P- + (C^ i+C{ {')P' *\V2iV. = *22(T); *JV(T) = ^m+(A[11+Aiil)Pi+(Blll+Biil)P2+(Clll+Ciil)P 4>2V(T) = (A^+A^PJ + (B^B^P' +_(C2,+C2,,)P31 r iv iv' / Tv iv 2 Tv iv iv fv~ T Y11=[(<|)11(T)+*22(T))+/(<(.11(T)+(|)22(T)) -4(<t,U(T)4>22(T)-^12(T)<()21(T))]/2 r iv iv / iv Tv 2 iv fv ' Tv Tv i T12=[(<t>11(T)+4»22(T))-/(<j)11(T)+<j)22(T)) -4(<t,U(T)4>22(T)-<}>17(T)^1(T))]/2 211 °ir(Yir*22(T))/(YirY12)j ^2-<Y12"*22(T))/(Y12-Yll) IV IV IV a13=*12(T)/(Yn-Y12); "iA-^^^^^ll^ a15"*21(T)/(YirY12) IV IV IV IV a16=0»21(T)/(Y12-y11); «17-(.Y11-*11(T)/(Y11-Y12); "is"^-*!!™^^!^ N N-1 j=l 1=0 x ^ /Vfr ,1V,^,, ,lV/mN, N-l-iir ,1V,,,,, rlV,,,,. N-l-ii.2 11 . - . n 11 1 (T)+°13*2 (T)lYll +I-°12*1- (T)+a14*2 (T)]Y12 *>j j=l i=0 J D31 = N(<j> - 1) V) = D+CAp+Ap+Ap ' )P[[+(B|1+B-+B ' ' ' )P('+(C'''+C • ' ' )P{^ *!2^)=A12Pii+B12Pi2+C12Pi3' <P2lCV) = <M1+A-+A'r)Pii+(B^1+B-+B-«)P- + *22(V) = A22P11+B22P12+C22P13; ^1 P{2=exp(-s2V); P-=exp(-s3V) Y31= [(*{pv)+<f,22(V))W(f^ Y32= [(^(VyH^CV^+Z^^ bl - (Y3r42(V)>/(Y3rY32); b2 = (Y32-*22(V))/(Y32-Y31) b, = <2(V)/(Y31-Y32); b, - <2(V)/(Y32-Y31) 212 APPENDIX 3 RELATIONSHIP BETWEEN j> AND DECAY RATIO INDEX Let a be the decay ratio, defined as the ratio of the overshoot/undershoot at one sampling instant to the overshoot/undershoot in the succeeding sampling time. That is _ C(1T) - CO") C(«Q - C(iT) . a, n C(nT) - C(») C(°°) - C(nT) (.AJ.I; where C(iT) is the output response value at the sampling instant where an overshoot or undershoot occurred and C(nT) is the next sampling point where an overshoot or undershoot resulted. C(°°) is the system output response at an infinite sampling point. For a unit step input change, C(°°). tends to •unity. If it is assumed that there is overshoot or undershoot at each sampling time then for N sampling points, the total error expressed in terms of the decay, ratio and the final overshoot or undershoot is given as ~ N-1 - _ _? _M_? I e(iT) = [c{(N-l)T} - C(NT)][l + a + a + + a ] (A3.2) i=0 Equation A3.2 is a geometric series with first term C(N-1T) - C(N) and geometric progression ratio of a. Expressing in short form gives N-1 r -U-li I e (iT) = [c{(N-l)T} - C(NT)] ^ (A3.3) i=0. 1 - a Also for the condition N-1 _ r -2(N-l)i I e (iT) = [C(N-1T) - C(NT) ] [- J i=0 , - 2 213 Therefore, the ratio becomes N-1 I e(iT) i=0 = (1+g) Y e2(iT) [clCN^l)1} " C(NT)] (l+aN_1) i=0 But since N has been taken to be a function of the settling time, the overshoot or undershoot [c(N-lT) - C(NT)] has already been specified. Thus '<)> - • <A3-5> (1+a ) is ,the relationship between <|> and the decay ratio index. 214 APPENDIX 4 11 PARAMETER DEFINITIONS FOR CONTROL SYSTEM WITH ZERO-ORDER HOLD (BJ+8J) + /(3{+3^)2 - 4(B'B^+B2'ep Y, = 2— (8£+8^) - A8{+8^)2 - 4(0^+3^) Y2 = — 2 -9 T -9 T -9 T -9 T -9 T -0 T S{ = c^e 1 + a2e 2 - (l+c^e 1 + c^e 2 ); 8^ = a.5(e 1 -e 2 ) -9 T -9 T -9 T -9 T -9 T -6,1 $j = 2a6(e 1 -e 2 ); 8^ = a?e 1 + age 2 ; PL = e 1 ; P2 = e Y, - 8. Y„ - 8. 80 89 1 • 4 . „ 2 4 • „ _ 2 -. Q _ 2.Q_ Tl - T2 ' 12 Y2 " YL ' 13 YL " Y2 ' 14 Y2 - Y^' 15 Y 1 Tl - Bl , Y2 " \ "16 Y? -T^' "17 Y; " Y?_' "18 Y2 " YL N N-1 v N-l-i Dx = * I[ I U(1+a3Pl+a4P2)eil +-a6813(p-rP.2)^l j=l i=0 .+ [<1+Vl+V2)912 + a6614(prP2)]T2"1"1 N N-1 N-1 . D2 = (24--1) [ [ [ {[(l+a3p1+a4p2>eil + a& e^Cp^) ]y\ j=l i=0 + [(l+a3p1+a4p2)012 + a60u(Pl-p2)]T^1"1} -0 V -9 V -8 V -9^ D3 = N(cf)-l); ^(v) = c^e 1 + c^e 2 - K(l+a3e + c^e ) -0 V -6 V -0 V -8 V 4>i2(V) = a5(e 1 - e (*)2i(V) = "V1+k)(e " e • ) 215 -e v -e2v 62 8i e ^(V) = a?e 1 + a8e ; ^ = °<2 = ^ _ a3 = Tff=B^ e _L_ e -9i "G2 4 - e2(e2-e1)—5 e2-V"6. e2 - ep ~7 e2 - ep 8 ^ - e2 -ep -e2v Let P1;L = e ; p12 = e . . Ai = Vll + a2P12 + a7Pll + a8P12 ! A2 = (Vll+Vl2)(aiPll+Vl2) A3 = (1+a3pll+a4P12)(a7pll+a8P12"1) 5 A4 = a6°5(pll_p12^ A' = a+Vii+Vi2)(Vii+Vi2+1) ; A- = («7P11+«8P12)(I+«3P11+«4P12) -6 V -6 v -e V • -6 V , vi. 1 2 , 1 A . 4>U(V) = a e + a2e - (l+^e + a^e ) .- -e v -e v . -9 v -o v <f>12(V) = a5(e " e ) ••; <t»2J(V) = -2a6(e - e ) -G v -o v -9 v. -e v •' 4>22(V) = a?'e 1 + age 2 ; *vi(V) = (1 + ^e 1 + ^e 2 ) -9 V -0 V ^JX(V) = a6(e - e ) r21 -'[ •iJ(V)+^(V)+V{^(V)+^(V)}2 - 4{<ov1i(V)^(v) - 4.^(V)^( T22 = [(<t>Vj(V)+<t>V2(V)- /{^(V)+J^(V)}2'- 4{^1i(V)^V2i(V) - 4>V2(V)^j(V)}]/2 al - [Y2r*22(7^ 1 <Y2rY22) 5 32 = [Y22-*22(V)^ 7 <Y22-Y21> a3 = *12(V) ' (Y2rT22) ; a4 ° *12(7) 7 (Y22-Y21) 216 APPENDIX 5 SYSTEM IDEDNTIFICATION AND INITIALIZATION IDENTIFICATION BY GRAPHICAL METHOD The control system as described in section 4.3 is used in the identification and initialization process. In this stage of the study the air that controls the valve is cut off so that the valve is no more manipulated. At this condition, water is allowed to flow through the tube and out to the drain continuously, while the heating tank is filled and the recirculating pump used to circulate the water from the drum through the heat exchanger shell and back to the heating tank. This situation is allowed to continue until steady state in temperature as observed from the digital temperature indicator is attained. Then a ten percentage increase In steam pressure, manually set by turning the steam valve on the main line, is effected. A sampling time of 1 second is used to datalog the temperature profile. Due to the excessive noise in the system, the temperature response is filtered. The datalog program requires that the temperature response, (which is the temperature of water at the outlet of the heat exchager tube), be summed up for fifteen samplings and the average used. This averaged value is filtered by multiplying with.a weighting factor and added to a weighted value of the previous filtered response. The relationship used in this algorithm (temperature response datalog) is given as T(J) = a^CJ) •+ (l-af) T(J-l) (A5.1) where T(J) is the J-th filtered response T,(J) is the J-th (present) averaged temperature 217 T(J-l) is the previous (J-1) filtered response temperature cx^ is the weighting factor The used in this work is 0.4. Both the number of samplings summed up and averaged and the weighting factor are determined by trial and error and comparing the printed responses with that observed-on.the digital temperature indicator. The response of the control system for an open loop te percentage steam pressure change Is shown in Table A5.1. The "process reaction curve" is shown in Fig. A5.1. Since there Is no prior knowledge of the control system's transfer function, an approximate transfer function is obtained by the method of 6 3" Strejc. This method is based on the fact that the step change response of a system comprising n time constants can be validly approximated by a transfer function containing n times the same time constant. In most cases, the expression of the approximate transfer function is combined with a delay time (distance velocity lag) in order to increase the accuracy of the approximation. The general form of the transfer function is Ke"TS -G (s) = — - (A5.2) P (TlS+l)n The transient response of the control system is represented in Fig. A5.2. The method of analysis requires the knowledge of the point of inflexion P. A tangent to the response curve is drawn through this point and extrapolated to both the horizontal axis and the horizontal line joining through 13 C as shown in the figure. Thus by setting the response deviation 218 Table A5.1 - "Transient Response" Time in Seconds Temperature °C Deviation From Initial Point 0 12 • 0 15 12.4378 0.4378 30 12.8209. 0.8209 60 12.99320 0.99320 75 13.10150 1.10150 90 13.27170 1.27170 105 13.3787 1.3787 135 13.51770 1.51770 150 13.69870 1.6987 13.903 1.903 ' '; . 195 . 14.1001 2.1001 210 14.2684 2.2684 240 14.49980 2.4998 255 14.66620 2.6662 300 14.81210 2.81210 Fig. A5.1 - Process reaction curve for a 10% step change in steam pressure. Fig. A5.-2 - Approximate estimation of transfer function parameters St're'jd method. 221 from the initial temperature (12 C) to zero, the value of T is obtained. u By increasing the deviation f to 1 (13 C), the value of T is determined, i b then T is calculated as T = T, - T . The table drawn up by V. Strejc a a b u (Table A5J.2), directly affords the order 'n' of the transfer function as dependent upon the value of T /T . This result can also be verified by using the deviation response (iK) value or the ratio T /T . For the value of 'n' i e a thus obtained. Table A5.2 gives pairs of values which enable a direct calculation to be made of the time constant r , by using the ratio T /T and T /T, or vice versa. If the T /T value gives a ratio that does not correspond to an u a integral ' n' value but fall between two consecutive values, take the lower integral n of these two values. This simplification is taken into account by introducing a dead time into the expression of the transfer function. The actual value of the ratio T /T ,. corresponding to the process reaction curve was calculated, but the approximation caused a lower value of this ratio to be selected. Knowledge of these two ratios permits the calculation of x. . The absolute value of T is not affected by the dead time. It is thus possible to write T T +x . (/-) T (-£-) a real a table (A5.3) T T (^) = C^> + f a real a table a 222 TABLE A5.2 'TABLE OF COEFFICIENTS" (V. STREJC)63 n To/T / T /T u T /Ta u Td/T *i T /T e T /T e a 1 1 0 0 0 0 1 1 2 2.718 0.282 0,104 - 1 0.264 2.00 0.736 3 3.695 0.805 0.218 2 0.323 2.500 0.677 4 4.463 1.425 0.319 3 0.353 2.888 0.647 5 5.119 2.100 0.410 4 0.371 3.219 0.629 6 5.699 2.811 0.493 5 0.384 3.510 0.616 7 . 6.226 3.549 0.570 6 0.394 3.775 0.606 8 . 6.711 4.307 0.642 7 0.401 4.018 0.599 9 ; 7.164 5.081 0.709 8 0.407 4.245 0.593 10 7.590 5.869 0.773 9 0.413 4.458 0.587 223 It is thus sufficient to multiply the difference between the two ratios by T in order to obtain the value of x. If the system possesses a a natural dead time, which was neglected when the origin of the curve for the analysis was chosen, the value of the natural dead time is added to the calculated value of x to give the effective dead time. All the coefficients of the approximate transfer function are then determined.(the value of constant K can always be reduced to Unity by choosing a suitable unit). For this study T = 6.33; T = 18.67; T = 12 u a e . . V r The ratio T , ~„ T .. ~ T^ " I8T6T = °'339' " 1FT67 " °'6427 and *1 3t P " °'357 a a -From Table A5.2," these ratios fall between n = 4 and n = 5. Choosing n = 4, the dead time is calculated from equation A5.3. That is A real a table a 0.339 - 0.319 = Y~ a But T =. 18.67. Therefore x = 0.02(18.67) = 0.3734 a T Also from Table 6; the ratio — for n = 4 is 4.463 T Therefore T = .. . a_ = 4.183248 ^4.2 4.463 . From Fig. A5.2, K = .1 . 224 Since it is not possible to determine the natural dead time due to the method formulated for datalogging the response, a dead time of 0.5 sees, is assumed from previous observation. Thus the effective dead time is (0.3734+0.5) = 0.8734 sees. The approximate transfer function of control process is -0.8734s G(s) = - 7- (A5.4) (4.2s+l) A useful graphical method of analyzing the response of a system 53 having two time constants is the Oldenbourg and Sartorius method. This method also depends on locating the inflexion point and the slope of the curve at this point. More convenient for analysis are the quantities T^ and T^ shown in Fig. A5.3. In the Oldenbourg and Sartorius diagram Fig. A5.4 the ratio T /T. is used as the intercept on each axis of the straight line, c A The straight line intersects the curve at two points, if the ratio T /T is C A greater than 0.73, either of the intersection points can be use to calculate the two time constants T^ and . Their graph Fig. A5.4 covers the whole range of possible ratios of T^ to T^ from infinity to unity. Their response curve was derived from an actual second-order process. When the ratio of T /T is 0.73, the straight line T /T = T /T + T /T is tangential to 3 C A i. A Z. A their curve and thus T^ = T^. As is observed from Fig. A5.3, the ratio of T /T. for the control system is less than 0.73 (0.6427) which also is C A expected for a higher order process as shown earlier on. In order to model the control process to a second-order case, the two time constants are set Time Sec • Fig. A5.3 - Fitting transient response to a second-order with dead time model by Oldensbourg and Sartorius method. 226 Fig. A5.4 Oldenbourg and sartorius diagram for equivalent time constants from process reaction curve for second-order process. 227 equal to each other. The method of calculating the time constant ignores that part of the reaction curve which precedes point A in Fig. A5.3. An appreciable time has actually elapsed before point A is reached. This is shown in the smoothed reaction curve of Fig. A5.5. The flat section of Fig. A5.5 is not necessarily caused by dead time alone. To determine process parameters, the following steps are performed: (i) The time constant T1, T0 are set equal to each other and equal to where T = 18.67 (see Fig. A5.3) thus T = T2 = 0.365(18.67) = 6.81455 6.8 (ii) Set T Fig. A5.5 equal to 0.365T = 6.8 (iii) Measure T from Fig. A5.5. That is, T = 14.2 P ... P (iv)- The dead time T is calculated, as T. = T - T 14.2 - 6.8 = 7.4 D P i Thus, the transfer function of the process as a second-order plus dead time model is -7.4s Fig. A5.5 - Determination of time constants for the system modelled as a second-order plus dead time process. 229 APPENDIX 6 IDENTIFICATION BY QUASILINEARIZATION METHOD The basic assumptions necessary for the formulation of the identification algorithm used in this study are constant dead time (or negligible variation in it), constant values for sampling time, filtering . time and weighting factor for filtering the measured temperature response The quasilinearization method (Eveleigh, V.W)16 identifies in the second-order overdamped plus dead time transfer function by solving for successive solutions of the transfer function linearized with respect to variation in the unknown parameter. For a given input [r(k)j the model output is forced to fit the observed output in a least square error sense The differential form of the transfer function is given as 2 V + 2T1 of + C(t) = r(t_T) ' (A6.1) dt where = process time constant x = dead time c(t) = response or output • This can be expressed in the form of a set of first-order linear differential equations with c = x1 as 230 Let Tj be treated as an additional state variable with the linear differental equation (A6.2c) Expressing equations (A6.2a), (A6.2b) and (A6.2c) in matrix form gives x3 = xl = 0 x = Ax + Br(t-T) where x = (x^ x2 x^); x(to) = x^ (A6.3) "0 l cr ~0~ A = -e -e^ 0 ; B --e 0 . 0 0 0 / — — 0 = -T 4 T Equation A6.3 can be represented as k = f^x, r, t) 1 = 1, 2, ..., N (A6.3a) Let it be assumed that f^ and its derivatives relative to x and r are continuous functions of x and r. Also let Y(t) and x(t) denote a nominal control input and the corresponding output response, respectively and known over the interval [tQ, Expanding equation (A6.3a) in Taylor series about the measured X(t) provides the equations defining changes from the nominal trajectory in terms of changes in initial state and control over the interval as N 3f. N Zf± 6x * J-, 3x^ 6xj + J 3rT 6rk + Ri(x' r> c> J=l J k=l k (A6.3b) where p Aj.-, A r • • • fix. = x, - x. ; or. = r. - r, ; ox. = x, - x, 3 3 j'k k k'i i i R^(x, r, t) includes all terms involving higher-order derivatives and are made negligible by taking sufficiently small values of 6x and Sr. The partial derivatives in equation (A6^.3b) are evaluated along the nominal 231 trajectory and are thus generally dependent upon t. Disregarding the R^(x, r, t) term in (A6.3b) and recognizing that the input is a step change, the linearized equation of (A6.3) about the past trajectory is 6x = H6x ; 6r = 0 (A6.4) where H is defined later on. . The computational procedure involves the following steps: (i) r(t) and x(t) are recorded over a time period T. Note that r(t) and x(t) are the measured input and output responses, (ii) The model equations, — equations (A6.2a), (A6.2b) and (A6.2c) are programmed in the computer. (iii) Guess starting conditions x° as near the true value as possible, otherwise convergence becomes a problem. These initial values can be obtained from least square estimates, or through physical knowledge of the process. In this study the initial value used is that obtained earlier on by graphical analysis, (iv) With these initial values, numerically integrate equation A6.3, use this value and the input r(t-x) to minimize the function JN = ^t+T ViA* dt (A6,5) o (v) The model equations of (A6.2) are linearized about the trajectory obtained in step (iv). (vi) The effects of change in x° upon system responses are obtained by solving the linearized equations derived in step (v) computationally. 232 (vii) The linearized solutions are weighted by an arbitrary constant matrix Q and is expressed as a general function of Q. (viii) JN is minimized relative to Q, to determine the desired parameter changes on the next iteration. (It should be remembered that these changes are based upon a first-order system linearization and are not , in general, the exact changes required), (ix) The process is repeated, if necessary, until successive adjustments provide negligible improvements in J^. (x) The resulting model parameters are read out as the desired plant identification . i The linearization about the past trajectory gave equation (A6.4), that is 6x = H6x ; 6r = 0 (A6.4) where the elements of matrix H are h. . = 0* ) and "*" means that the state ij 6Xj variables are evaluated on the past trajectory. The component of the function H are h = x2 ; h2 = -62X;L - 64x2 + 62r(t-T) ; h~3 = 0 (A6.6) 2 1 2 But 6 = —r- ; 9. = — in terms of the state vector, x. Therefore the 2 4 x_ X3 3 elements of H are A "fc A A 2 A h,, = 0 ; h10 = 1 ; hn, = 0 ; h01 = -6 . ; h99 = -64 ; 233 23 203Xl + 262x2 - 293 r(t-x) = y (A6.7) '31 = 0 h32 = ° h33 = 0 Thus H = 0 10 -e2 -e^ ^ 0 0 0 Solving equation (A6.4) by state transition method gives 5x(t) = <))(t, tQ)6x ; 6r = 0 (A6.8) where <|)(t, tQ) is determined by solving the relation Kt, tQ) = H(t) *(t, tQ) ;-*(tQ, tQ) = I (A6.8a) Since equation (A6.8a) shows that H is a function of time, the equation can be solved correctly by making the approximation <j>(t, t ) = <|>(t-t ); where o o <|>(t-t ) is the transition matrix for the constant coefficient linear o differential equation over the interval t ., - t = At and h.., are n+1 n ij's evaluated at x(t ). Hence n 4>(t) = H-<Kt) ; <Kt ) = 1 (A6.8b) Laplace transforming (A6.8b) gives <J>(s) = (SI-H) * <|>(o). Inverting results into the relation <j> = T <(> ; ((> = ())(o) = 1 (A6.8c) n+1 nno 234 where T = L-1[(SI-H and H = H(t ) n L v n J n v n That is (SI-Hn) -1 (A6.8d) Thus T = n e-9t + 8te-9t -e2te-0t -8t te -et _ -et e - 8te 1 (1_e-et+ete-6tn) e -8tn (A6.8e) It should be borne in mind that T^ varies as t changes, since the x's will be assuming new values for each change in t. The values <J>(t ) serve as n the initial conditions for the computation of over the interval n+l At = t^+^ - t^. This process is repeated over the interval of integration to obtain the trajectory. The response of the model to initial conditions o , r o x + ox is x.(x +6x ) = x.(x ) + J 6x. d>.; I I • i J iJ j=l (A6.9) where the "t^jtg are from equation (A6.8c). 235 Let the performance index be, minimize t +T 3 3 JN = U° I + I - \]Z dt (A6.10) o i=l j=l J J Where t and T are the start and duration, respectively, of the observation interval; the 4^'s are weighting factors—generally held constant and assumed known; the x^ are model responses to observed input r(t-x); and x^ are observed values of the system state. The weighting factors ¥^ corresponding to unavailable (or unmeasured) elements of state are set equal to zero. Partial differentiating equation (A6.10) with respect to 5x°j and 9JN setting -= 0; gives a set of 3 algebraic equations of the form 3 3 0 = f[+T 2 l Vjx^x0) +; I '^•ik.-.xi]*ljdt (A6.ll) But since there is only one output, (A6.11) reduces to t + T 3 0 = / ° 2 [X;L(x0) + I 6x^*lk " xj * dt (A6.1U) o k=l J That is, by setting 4^ = 1 and ^ = = 0 because the states are no directly measurable. x^(x°) is the model response and is given as xL = x2 (A6.11b) from equation (A6.3). 236 Numerically integrating (A6.11a) by Runge-Kutta 4-th order formula given as Ah X _LI = x + T~<K i+2K o+2K o+K /) (A6.11c) n+l n 6 nl n2 n3 n4 where Ah is the integration grid size and K = f(t , x ) = x.(x°) nl n n 2 n K = f(t + \ Ah, x + I Ah) = x_(x°) + ^- k n2 n 2 n 2 2 n 2 nl Kn3 = f ^n + \ Ah> Xn + \ ^ = ^ + ^ Kl K . = f(t + Ah, x + Ah) = x„(x°) + Ah K „ n4 n n 2 n n3 (A6.12) Thus at any time t, x , = x„(x°) + T^(k , +2k„+2k0+k.) (A6.12a) n+l 2 n 6 nl n2 n3 . n4 where the K 's are as defined in equation (A6.12) substituting equation n (A6.11c) for•x- ' in equation (A6.11a), all the terms in the equation are. known except ^xj^. Thus, (A6.11a) is a linear equation with one unknown, which is solved for 6x.° as k t +T • t +T - Jt° [{x^x0') - x^}* ]dt•= \° *u • 6x°df (A6.13) and -/t° [{^(x0) - xt} • ]dt 6x° =• - ________ (A6.13a) 237 The next computer iteration is made based upon the revised initial conditions, or x° = x° + 6x° (A6.13b) new old The entire process is repeated based upon these new initial conditions. The iterative process is terminated when improvements become negligible. Using initial state values of x^ = 0; x^ = 0 and x^ = 6.0, the above algorithm was programmed and run in the PDP8 digital computer. This method gave a time constant of 5.02710 with an integration grid size of 1. The same dead time value as determined in the graphical method was used since the linearization used in this method requires the computation of the derivative 4~^t T^ = -r(t-T). The process reaction response used in this oT determination was generated by a step input which does not yield sufficient information to calculate the delay time. 238 APPENDIX 7 THEORY OF VARIABLE GAIN METHOD OF DESIGN65 Let the desired digital controller as shown in Fig. A7.1 be treated as a variable-gain element K^, which takes on different values from one sampling time to another. The input to the variable-gain element K^is the control signal u, and the output Is assumed to be u^. At any sampling instant t - nT+, the input and output of the variable-gain element are related through a constant multiplying factor K^; that is u1(nT+) = Knu(nT+) (A7.1) where k is the gain constant of the variable-gain element during the n st (n+1) sampling period. ' Based upon the above suggestion, the transition matrix of the system is expressed as a function of the variable-gain K and has different n values at different sampling instants. It has been shown by Tou, J.T,65 that the state-transition equations for a linear system are given by v(nT+) = BV(nT) (A7.2) v[(n+l)T] = <j>(T) V(nT+) .. (A7.3v[ (n+l)T], = <)>(T) BV(nT) (A7.4) Thus, when n = 0 v(0+) = BV(0) (A7.5) HOLD U DIGITAL COMPENSATOR PROCESS Fig. A7.1,- A digital control system. 240 and at t = T V(T) = <|>0(T) BV(o) (A7.6) where V(o) is the given (or derived from state variable diagram) initial state vector. Since the transition matrix <)>g(T) is a function of the gain constant Kn of the variable-gain element during the first sampling period, the state vector V(T) at t =.T is also a function of K0. Once V(T) is determined from equation (A7.6) in terms of Kg, the state-vector VCT*") can readily be found from the state-variable diagram of the system or by use of equation (A7.2). It follows from equation (A7.3) that the state vector V(2T) is given by V(2T) = ^(T) V(T+) (A7.7) where the transition matrix ^(T) is a function of the gain constant Kj of the variable-gain element during the second sampling period, and the state vector V(T+)' is a function of..-Kg. Thus, the state vector V(2T) is a func tion of both Ko and Ki. Once V(2T) is found, the state vector V(2T+) follows from equation (A7.2). The state vector V(2T+) is also a function of both Ko and K\ . With the same reasoning, at t = jT, the state vector is given by V(JT) = >((j-l) T+) ^ (A7.8) where the transition matrix <t>j_^(T) is a function of the gain constant of the variable-gain element during the j-th sampling period, and the state vector v[(j-l)T+] is a function of the gain constants K^, , K^, K-_2* 241 Hence the state vector v(jT) is a function of the gain constants KQ, , IC, • • •, K.j 2 and ^ • The pulse-transfer function D(z) of the digital controller can be expressed in terms of the various gain constants of the variable-gain elements as follows: ' -Beginning with ,-• then similarly, u(o+) = r(o+) Ul(o+) = KQu(o+) = KQr(o+) Ul(T+) = KlU(T+) + + + where u(T ) is obtained from v(T ) = Bv(T) = Bd> (T) v(o ) o (A7.9) (A7.10) (A7.U) (A7.12) Since u(T ) is defined as an element of V, where V = Similarly, Ul(2T+) = K1u(2T+) where u(2T+) is derived from V(2T+) = B^CT) V(T+) V(2T+) = B*1(T) B<J>0(T) V(0+) In general, Ul(jT+) = KjU(jT+) r x (A7.13) (A7.14) (A7.14a) (A7.15) 242 where uCjT**") is determined from V(jT+) = B* (T) V[(j-1)T+] (A7.16) V(jT+) = B* (T) B<J>_._2(T) B<t>0(T) V(0+) (A7.17) The z-transform for the control sequence u(jT+) is n _ . u(z) = I u(jT+)z 2 (A7.18) j=0 and also the z-transform of the sequence ui(JT+) is given as n _ . u (z) = I K u(jT+)z J (A7.19) j=0 J the pulse-transfer function D(z) is the ratio ul(z) ^u(^)«"J D(z)=-iy-=^ .- (A7.20) I u(jT+)z J j=0 Thus, the design reduces to the determination of the various gain constants K of the variable-gain element. Once the gain constants K are .] J found, the desired digital controller is derived. The gain constants k are j evaluated from the performance specifications. For a deadbeat performance, the following conditions must be satisfied. The output response is always less than the input signal for t < pT, where T is the sampling period. The system error is zero for t > pT. These conditions are satisfied if xL(PT) = r(PT) (A7.21) x2(PT) = x3(PT) = xp(PT) = 0 (A7.22) where p denotes the order of the control process, and the state variables 243 x (pT), x (pT) , x (pT) are functions of the gain constants K , K 2 3 p 1 0 1 K K , which are derived from (A7.8). Equation (A7.22) implie 2 p-1 that the inputs to the various integrators are equal to zero for t >_ pT. The successive gain constants K_. can be determined by solving equations (A7.21) and (A7.22) simultaneously. 244 APPENDIX 8 DEADBEAT COMPENSATOR DESIGN FOR CONTROL SYSTEM WITH ZERO-ORDER HOLD The overall transfer function for the control system is - -TS,. -Ts. h{s) 8(8+6^(5+62) (A8.1) For simplicity in state-variable diagram, the zero-order hold is treated as a clamp (cl) or hold. The state-variable diagram of (A8.1) is as shown in Fig. A8.1. where 8 1 T]L' "2 = 8^8^. and T0 are the control system time constants. The state vector V is defines as V = (A8.2) The initial state vectors are V(0) 1 0 0 0 (A8.2a) Since there is process delay of A in the system, there shift of A of the origin. After a unit step change in initial state vectors, become will be a set point, rightward the Fig. A8.1. - State-variable diagram by iterative (cascade) programming method. 246 v(A) 1 0 0 1 (A8.2b) From Fig. A8.1, the set of differential equations is f = 0 or i2 = -e2x2 + eu xl = ~61X1 + X2 + 8u (A8.3) V = AV A = .0 0 0 0 -0] 0 0 0 0 1 9 -e 2 e o o The transition difference equations fOr the condition t = nT + A, where T is the sampling period and A is the process dead time, are r[(nT+A)+] = r[(nT+A).] ; u[(nT+A)+] = r[(nT+A)].- x [(nT+A)] x2(nT+ A) = x2(nT+A) ; X]L[(nT+A)+] = x^nT+A) The total delay time in the control system is nT + A, where nT is due to the hold and A which can be broken down to (j+,6)T (integral and fractional (A8.4) 247 components) is the dead time. The solution to equation (A8.3) is v(t) = 4>(A) V(A+) where X = t - (n+j+S)T and <t>(A) = ^-""[SI-A]"1. But [sI-A] (s+O1)(s+02) 1 s + B 3(s+82+l) j(s+01)(s+°2) s(s+«2) (A8.5) and <j)(X) = L_1[SI-A] -1 0 0 -V o 0 -ex -ex b{(e -e ) • -e2x \ -ex e?x bl +. ble + b!e 2 j 4 -ex e. d-e V) where (A8.6) b2 = e2+i 6(8-8+1) b' = • b' 61(e1-e2) • "4 6^-6^ 2 1 Introduce the digital compensator at the dotted line position in Fig. A8.1 Assume that it is a variable-grain element K , which means that the value of n 248 varies from one sampling period to another. The input to the variable-gain element K is the control signal u, and the output is u . At any n 1 instant t = (n+j+6)T+, the input and output of the variable-gain element are related through a constant multiplying factor k , ie. n u1[(n+j+6)T+] = knu(nT+) (A8.7) (By assuming that the whole process delay is encountered in the compensator). With the addition of the digital compensator, the transition matrix becomes 4 (X) = 4> (K ) = n n n 0 -ex -ex -ex -ex -ex 0 e b.'(e -e ) (bl+bie +b!e )K l Z J 4 n 0 0 o ". '• 0 -e2x \^ >Kn 0 - •; •.. . • • :iv ; (A8.8) For the condition t = (n+j+l)T, X becomes (n+j+l)T - (n+j+6)T = (1-5)T = V. Thus for n = 0, the transition matrix is VV) - •o(Ko) 1 0 0 -e v _e v -e v 0 e 1 b|(e 1 -e 2 ) 0 0 0 0 -e v 2 0 -0 7 -0 V b2+b3e 2 +b4e 2 ]K0 -0 7 )KQ 1 (A8.9) 249 But the coefficient of the transition difference equation is B = 1 0 0 0 0 1 0 0 0 0 1 0 1 -1 0 0 (A8.10) Thus, v[(l+j)T] = <t>Q(V) BV(0); but BV(O') = V(A+) 0 0 Therefore V[(I+J)T; • -e v -ev . b' + b3e + b4e ]K0 -e2v ^d-e )KQ (A8.ll) 250 Also, v[(l+j)T+] = BV[(1+J)T] = -6 V -9 V [b' + b3e + bje ]KQ -9 V \a-* 2 )K0 -9 V -9 V 1 - [b£ + b^e 1 + b^e 2 kQ (A8.12) For n = 1 0 0 -9. V -9 V -9, V 0 e -9 V -9 V b'(e 1 -e 1 ) [b^+b^e +b^e 2 ]^ 0 0 0 0 -e2v -e2v 91(l-e )Kr (A8.13) 251 Therefore, V((2+j)T) = •1(V)V((l+j)T+) = 1 -e v -e v -e v -e v -e v -e v -e v -e v e (B2+B3E +b^e )K +b'Q (1-e )(e -e )K +(b2+b3e e Z ) [1 " ((I))]K1 -9 V -9 V -9 V -9 V -9 V \e 2 (1-e 2 ) K^pi-e 2 )[l-(b2+b3e 1 +b'e 2 )KQ]K1 -6 V -9 V 1 - (b2 + b3e 1 '+ b4e 2 )KQ ••; -9 V -9 V •• • '-. * = (B2+B3E +B4G >K0 (A8.14) Designing for deadbeat performance requires that the inputs to all integrators be zero for t >_ [(2+j)TJ. From the state-variable diagram Fig. A8.1, the following conditions hold: ' XJ(2+J)T] = e2 (A8.15) X2[(2+J)T] = ep and u1[(2+j)T] =' knu(2T) = |— for n > (2+j). That is, after the second sampling plus dead time instant, the output from the variable gain element should be kept constant at , consequently deadbeat performance requires 252 that -9 V -9 V -9 V -9 V -9 V -9 V Xl[(2+j)T] = e (b^+b3e +b£e )KQ + b'O^l-e )(e -e )KQ -9 V -9 V -9 V -9 V + (b^+b3e +b^e 1 )[l-(b^+b3e +b^e )K0JK1 = e2 (A8.16) x0 -9 v -e v -9 v -9 v -e v (2+jT) = 6ie 2 (1-e 2 )KQ + 8^1-e 2 )[l - (b'+b^e 1 +b^e )KQ ]K^ (A8.17) Solving equations (A8.16) and (A8.17) simultaneously gives -9 V -8 V -9 V [62(l-e ) - (b'+b^e +b^e )] K0 ' =9TV -8 V -9 V : ^97V =97V -8 7 (A8*18) (1-e 2 )(e 1 -e )[(b^+b«e +b^e ) + bje^l-e )] . and -0 V . .-9 V [l - e (1-e )K j _ - - KI -9 v/. . -• ;-9lv, -82v... -•• • •••••, <^'i9r (1-e )[l - (b^+b'e 1 +b£e )KQ] . : * -6 V -8 V From (A8.14) u(T+) = 1 - (b^+b^e +b^e )KQ = ^ Also, . Ul(jT+) = KQu(0+) = KQ ; since u(0+) = 1 and uj(l+j)+] = KlU(T+) = K1X1 Thus, the input signal to K (variable-gain element) has the z-transform n . _ -8V -8 V u(z) = 1 + \ z'1 where X = 1 - (b2+b^e +bje )KQ (A8.20) 253 and the z-transform of the output signal from K is n u1(z)zJ = KQ + K^X^z + X2z + X2z + which reduces to t . Z"J[K0+ (KlX1^0)rl + <X2-K1X1>Z"21 u (z) = (A8.21) 1 (1-z ') Therefore the pulse transfer function of the desired digital controller is given by u.(z) z J[K + (K X -K )z + (X -K X )z ] D(z) = -J—- = —^ 1 (A8.22) U(Z) (l-z'Sd+^z"1) For the case when the process dead time is zero; j = 0 and 6=0; therefore V = T. Hence, n, , M(z) [KQ + (K.X^^z-1 + (X^X^z'2: _ D(Z)=E(7)- " n -I' .+. -K " (A8.23) (1-z )(1+X1z ) Equation (A8.23) can be expressed as -1 -2 w/ v Kn• + Y, z + Y0z where Y, - - KQ ; Y, = *2 - ; h = \ ~l Rearranging equation (A8.24) gives M(z)[l + Y3z_1 - XlZ"2] = [KQ + YLz_1 + Y2z"2]E(z) (A8.24a) 254 Expressing in difference equation form gives M(k+2) + T3M(k+l) - ^MCk) = KQe(k+2) + y e(k+l) + Y2e(k) Let M(k) = x3(k) + KQe(k) Performing first and second differencing on (A8,24c) gives M(k+1) = x3(k+l) + kQe(k+l) M(k+2) = x3(k+2) + kQe(k+2) (A8.24b) (A8.24c) (A8.24d) (A8.24e) Substituting equations (A8.24c), (A8.24d) and (A8.24e) into equation (A8.24b) gives x3(k+2) +Y3x3(k+1) - X^k) - (Y1-k0Y3)e(k+l) + (Y^K^)e(k) (A8.25) Expressing equation A8.25 in the form x3(k+l) xA(k+l) "0 X. 1 -Y, x3(k) x4(k) + e(k) (A8.26) That is, x3(k+l) = x4(k) + k2e(k) x4(k+l) = XlX3(k) - Y3x4(k) + k3e(k) : Solving equation (A8.27) for4x (k) gives x4(k) = x3(k+l) - k2e(k) Differencing equation (A8.29) gives x4(k) = x3(k+2) - k2e(k+l) Substituting equation (A8.30) and (8.29) in (A8.28) gives (A8.27) (A8.28) (A8.29) (A8.30) x3(k+2) + Y3x3(k+1) - XLx3(k) = k2e(k+l) + (Y3k2+k3)e(k) (A8.31) 255 Compare equations (A8.31) and (A8.25) gives the following relations k2 " Yl K0Y3 k3 = 'WrW (A8.32) The state diagram for the digital compensator controller is as shown in Fig. (A8.2). The overall transfer function of the compensator control system lis -Ts, , _,_ -1. . -2 G(s) = 9(j-e ") fO '2- i > ~ S(s+el)(s+e2) -x + ^-v _ ^-2 J (A8.33) The signal flow graph of equation (A8.33) is as given in Fig. (A8.3). The output nodes for this system are x^(s), X2(s), x^Ck+l) and x^(k+l). The input nodes are x^(k), x2(k), x^Ck), x^(k) and r(k). There are two loops -6. L = — 1 s and L2 2* s The state differential equations in matrix form is given as x1(s) •iV8> •;2(s) •l3(s) 0 xx(kT) x2(s) *21(s) <l>22(s) *23(S) 0 x2(k) +2'(s) = + x3(k+l) "k2 0 0 1 • x3(k) k2 x4(k+l) _"k3 0 \ Vk) _ k3 r(k) (A8.34) 256 Fig. A8.3 - Control system with digital controller and state-space representation. 257 where (s+e3) (8+9^(8+62). V . , 1 sCs+9, )(s+9.) ' *12 (s+9, )(s+9„) il^s) s(s+91)(s+92) * *2iK8) (s+e1)(s+92) s(s+e1)(s+e2) 4>o,(s) = 4>22(s) s(s+91)(s+92)' Y23^' (s+9, )(s+90) ' s( s+9, ) (s+9„ ) V 2' K06 Vs) (3+9^(8+02) Inverse transforming equation A8.34 gives x1(k+l) •iVT> •lYT> *I3(T) x2(k+l) •21(T> *22(T) *23(T) x3(k+l) "V 0 0 x4(k+l) "k3 0 0 0 1 xL(k) x2(k) *2(T) x3(k) k2 x4(k) k3 _ _ _ _ r(k) (A8.35) the transient 258 APPENDIX 9 DEADBEAT COMPENSATOR DESIGN FOR CONTROL SYSTEM WITH HALF-ORDER HOLD The overall transfer function for the control system is Ks) = 9^4 + 5Ts^ -TS H (s) [4 + 4Ts] (s + 6 )(ar+ 8 ) (A9.1) The state-variable diagram of Equation (A9.1) is as shown in Fig. A9.1 for unit step change. NB: The H represents the zero-order hold or inbuilt delay in digital ' o control computers. The state vector V is defined as V (A9..2) and the initial state vector is 1 0 V(0) = 0 0 (A9.2a) U I •a. Fig. A9.1 - State-variable diagram by iteration (Gascade) programming method. 260 while the state vector just after the step change is made is 1 0 V(A+) = 0 0 1 From Fig. A9.1, the first-order differential equations are r = 0; u = 0 (A9.21 X3 = (1/T) X3 + (5/4) 8u X2 = "62X2 ~ (1/5T> X3 + (5A)6u Xl = ~91X1 + X2 " (1/5T) X3 + (5/4)6u or V = AV where A 0 0 0 0 0 0 -°1 1 -1/5T (5/4)6 0 0 -e 2 -1/5T (5/4)6 0 0 0 -1/T (5/4)6 0 0 0 0 0 The transition difference equations for the condition T = nT + where T is the sampling period and A is the process dead time, are r((nT+A)+) = r((nT+A)); u((nT+A)+) = r((nT+A)) - X (nT+A); 261 X3((nT+A)+) = X3((nT+A)); X2((nT+A)+) = X2((nT+A)) X ((nT+A)+) = X1(nT+A). The total delay time in the control system is nT+<f>, where nT is due to the zero-order hold and A, - which can be broken down into (j+S)T (integral and fractional components) is the dead time. The solution to Equation (A9.3) -1-1 is V(t) = <()(X)(A+)> where X = t-(n+j+6)T and <KX) = L [sI-A] Thus 4>(A) = 0 0 0 e -0,X 1A n<r0-ul —8iA —69A a,'(e 1 -e z ) -<f>24(X) 0 e -e x 2 0 0 0 0 whe re -aX *25(X) -a'(e-aX-e92 ) ^(X) 22U 6 ) a = 1/T; an = 1/5T; a21 = (5/4)6 a' = l/(82-91); a' = an/(6^3) (e^a) ; a' = a^Ca-S^e^) 0^ = a11/(a-e2)(61-e2); <x» = a11(81-a); ci£ = a11/(62-a); a} = a21/6; a8 " a21/Ol(°r02); a9 = a21/02( 92-9l); °<io = a21/9l; ail = alla21/a9 = a\i - -^n^v^V^ «;3 = -aua2i/9i(a-V(VV; 262 a' = -a a /Q (a-0 )(9 -9 ); a' = a a /a9 : o1 = a a /a(a-9 ); 14 11 21 2 2 K 1 2'' 15 11 21 1 16 11 21 1 ' °22 = 321/a' -aX -9 X .-0X -aX -9 X Y24(X) = a2e +a3e +a4e +a5(e ~e 1 } -9 X ' -9 X -6X -aX -9 X -9 X <t>25(X) = a7+a^e +^e +a{0(l-e ) - {o^+a^e +a^e \+«J4e } --aX -ex {a'5+ai6e +a^e } -e2x -ax -e2x •35(x) = ai8^1-e J ~ ^al9+a20e +a21e ' • Assume that the compensator is variable-gain element K1 , which means that n the value of K1 varies from one sampling period to another, and let it be n introduced at the dotted rectangle on Fig. A9.1. The input to the variable-gain element is the control signal u, and the output is u^. At any instant t = (n+j+6)T+, the input and output of the variable-gain element are related through a constant multiplying factor K , i.e. n u, ((n + j + 6)T+) = K u(nT+) (A9.6) 1 n (By assuming that the process delay is encountered in the compensator for simplicity case). With the addition of the digital compensator, the transition matrix becomes 263 4 (X) = $ (K1) = n n 1 0 -9 X „ „ _9 X -ex 0 e 1 <x'(e -e ) -*24(X) •25(X)K; 0 0 e 0 0 -v -aX -9 X -a.(e -e ) ^(XVK; -aX 0 0 -aX «22d-e )K; 1 (A9.7) For the condition t = (n+ j + 1)T, X becomes (n + j + 1)T - (n + j + 6)T (i - 6)T = v... , . , .• . :;.. .. • .'/.._ • Thus for n = 0, the transition matrix is 1 0 -9 7. -0 7 . -9 V 0 e 1 a-(e 1 -e 2 ) -+24<V) *25(V)K' 0 0 e 0 0 -e27 -a7 -0 7 -a'(e -e ) 4>35(V)K'_ -aX -aV a22(l-e )K' 0 0 264 But the coefficient of the transition difference equation is 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 -1 0 0 0 (A9.8) (A9.9) Thus, 1 0 V((l+j)T) = * (V)BV(A); but BV(A) = V(A+) = 0 0 1 Therefore, 1 V((l + j)T) = 22 (1-e 1 265 Also, V((l+j)T ) = BV ((l+j)T) = For n = 1 *25(V)KQ *35(V)K6 -aV «' (1-e )K' 22K ' 0 1-*25<7)K,0 (A9.ll) -e v -0 7 -6 7 0 e o'(e -e ) -*24<7> *25<7>Ki 0 0 e 0 0 •e27 -aV -0 7 -a»(e. -e ) ^(V*' -aV a22(l-e-aV)Ki 0 0 266 Therefore, V((2+j)T) = *i(V)V((l+j)T+) _0 V -6 V -9 V -aV *25K0e 1 +ai*35K0(e 1 "6 2 ) ~ "kW1"6 >+*25<1^25K0>Kl -9 V -a7 " -aV -8 7 ot22e"aV(l-e aV)KQ + a22(1"e"aV)(1"<t)35Ki)Kl 1 - 4> K' W25 0 (A9.13) Since the process has been assumed to be a second-order system, the following conditions must be satisfied for deadbeat performance: .X1((2+J)T) = 4»25K0e Va'*35K'(e ^ V2 Va'^K'U-e 1-^)^1 (A9.14) -9 7 -a7 -a 7 -8 7 X1((2+j)T) = 4>35K0e a'a'2K0(l-e )(e -e ) +. •35(l-t25^)K{ = 0 (A9.15) Equations (A9.14) and (A9.15) are solved simultaneously to give Ko -*35 -8 7 -9 7 -a7 -9 7 a7 -a7 [(e -e )(*25<(,35+<!)35ai)+<,,25a6Ct22(e ~e )(1_e )"*24*35°22(1_e )] (A9.16) 267 -aV -6 V -6 7 -• \ 1 tr I -* ., _ [«D«22^(e -e ) - ] and K' —— — (A9.17) •35(1"*25K0) Also u1(jT)+ = K^u(0+) = K^; since u(0+) - 1 u(T+) - 1 - ^ = Bl. u1((l+j)T+) = Kju(T+) = KJ(1-*25KJ) = KJ3X and X3«2+j)T) = a2^e"a7(l-e"aV)K^ + (l-e"aV) (l-c^K^Kj = ^ (A9.18) It'should be noted that deadbeat performance requires zero input to the third integrator for t > (2 + j)T. To satisfy this requirement on the third integrator, the output of the variable-gain element K1 must be maintained at n $2 after the second and deadtime instant. Thus the Z-transform of the . output sequence from the digital compensator (variable-gain element K^) may be expressed as u1(z)zJ = KQ + K1e1 + 32z~2 + e2z~2 + ... which reduces to Z-J[K^ 4- (K^-K^z'1 + (B2-K{g )Z-2] u (Z) = — (A9.19) (1 - z l) But the Z-transform of the input signal to K' is n U(z) = i + e1z~1 269 the pulse transfer function of the desired digital controller is given by .-1 . -2 D(Z) u^Z) Z~J[K- + (K|B1-K')Z + (g^K'B^Z Z] u(Z) (1 - Z_1)(l + !) For the case when process deadtime is zero; j = 0 and 6=0: Therefore V = T. Thus, Equation (A9.20) becomes D(Z) [K2 + (K|<(>1 - K')Z 1 + (g2-K|01)Z_2 (l - z_1)(i + f^z"1) Equation (A9.21) can be expressed as M(Z) D(Z) = + 63Z 1 + 34Z-2 E(Z) 1 + g5Z 1 - B Z 2 where B3 =1^ - K'; 3, = .B, - K'B - ^ = ^ - 1. .Rearranging Equation (A9.22) gives -2. (A9.20) (A9.21) (A9.22) M(Z) [1 .+ B5Z 1 - 3^Z 2] = [K£ + 32Z 1 +' B^Z.'] E(Z) (A9.23) After a bit of differencing and collecting of terras as has been shown in Appendix 8 the digital controller difference equations are X3(K+l) — 0 1 X3(K) + hl" X4(K+l) "B5_ X4(K) _h2_ e(K) (A9.24) where 1^ = 33 - K'B5; h2 = B4 + K'B^f^ 270 The overall transfer function of the control system with digital controller is 4 + 5Ts ( ) K' + a z"1 + 8Az 2 t— £Zi ZT—] Hn(s) (A9.25) 4 + 4Ts (s + e )(S + e ) i + 35z_1 -.31z"2 ° The signal flow graph of Equation (A9.25) is shown in Figure A9.2. The output nodes for the control system are X (s), X2(s), X^CK+l) and X^(K+1). The input nodes are X (K), X^K), X3(K), X^(K), and r(K). There are 3 2 loops: Lx = -Q3/s, L2 = -9/s , L3 = -1/Ts. Also M(K) = X (K) + KQe(K) The state differential equations in matrix form is given as X1(s) -^(S) •{2(8) •{3(8) 0 XX(K) X2(s) _ *21<8> *22(s). •23(8) 0 X2(K) + ;^(s) X3(K+l) "hl 0 0 1 X3(K) hl X4(K+l) ;h2 0 \ ~\ X4(K) _h2 T(K) where, 3 2 C| = Ts + s (T6 +1) + s(T0+63) + s(Ts +'T03+1) K^e 5TKQ0 °1 (Ts + I) 0 5T9 1 1 1 271 421(s) -K^O 5TKQ0 8(TS+1) cl Y22(s) s(Ts + 1) 6 5T9 ' 923^S; sCj 4CJ ' K^6 5TKQ0 K^0 5TK^s6 4C[ Inverse transforming gives X1(K+1) X2'(K+1) X3(K+1) X4(K+1) The solution t X(nT) Yll(T) Y12(T) Y13(T) 0 • 21.(T) -h. *22<T) -h. *23(T) X1(K) X2(K) *2(T) + X3(K) hl X4(K) _h2 _ r(K) n-1 i=0 n-l-i. (A9.28) for unit step change where <j>n -.Z"1{Z(ZI - A)"1} 272 But (ZI - A) -1 611 612 612 21 J31 ) 42 6 22 332 42 '23 333 3 43 '14 324 334 344 (A9.29) where, = [Z(Z+B5)-B1](Z-422); 9^ = <f[2 [Z(Z+B,. )-B1 ] ; II 5' "1-313 - (Z+B5)[n3(Z-*22)+n2*23]; V = •13(Z"*22) + *'l2*23> 321 " •22I'Z(Z+B5)-311 " Y23[VZ+V + V 322 = (z-<t>}1)[z(z+e5)-ei] - *13[hl<:Z+B5) + V 323={(z-4[1)(z+35)[4;3(z-*22)+4;2423i-4;3(z+s5)t(z-4[1)(z-4;9)-41,94;1i }/4 '24 r22' Y12T21J = {(z-4[1)[4|3(z.-422) + 4{2423] -4'3(z-<r;1)[(z-<r;9) - "i^*;,]}/*;. 22' '21Y12J Y12 e3i = -[(z+P5)+h2](z-422); e32 = -4[2[h1(z+B5)+h2]; Q33 - (Z+B5)[Z-4il)(Z-422) -•{2*211-034 " [(Z-*ll)(Z-Y22)-n2Y21]; 941 = VZ(Z+35> " ei](Z"Y22) " z[n1(Z+e5)+h2](Z"<*)22) 942 = Vi2[z(Z4V~V ' Yi2 ztvz+y+h2] 643 - ^KZ-^.XZ-^) -4;2421] -VYl3(z-*22) +Y12*23] V " Wu^-W +*i2*23] + fCZ-ni)(Z-4>22) -A214^2] 273 A = {[(Z-^^CZ-^^^HZCZ^)-^] + [hl(Z+B5) -H»2][*{3(Z-*i2)+*12*23]} Expanding A and grouping terras gives A = Z4 + AjZ3 + k^Z1 + A3Z + A4 (A9..30) where Al " -<*il+*22-B5>5 A2 - I*il*22-*12*2re5*irP5*22-0l+ A3 " [VIlY23-V21Yl2+Vn+V^ A = fh 3 6' 6' -h 6* 4' +h V A' -hg A' A1 -3 A' A'+B A' A' 1 4 1 1 5Y12Y22 2*13*22 2Y12Y23 1 5Y12Y22 1Y11Y22 1Y12Y21J The general quartic, Equation (A9.30) is reducible (substitute Z = X - Al/4) to the form 4 2 X + uX + VX + W = 0 (A9.31) The four roots of the reduced quartic for positive V are X, = -/Z\ - /Z„ - /z„; X„ = -/z~ + /Z-+ /z„; X • = Vz - /z~ + 7z„; 1 1 2 3 2 1. 2 3 3 2 3 X^ = /z^ ^2 - ' wbere ^> ^2 > an^ ^3 are tne roots of the unreduced cubic Equation 2 2 Y3 + (y)Y2 + (—- |T; = 0 (A9.32) 3 2 or Y + A,Y '+. A,Y + A, = 0 (A9.32aJO/. where Ac = u/2; A, = (u2 - 4w)/16; A7 = -V2/64 274 and 2 2 3 3 6 A 3A 3A^ 4A A.A. u = [(-f ) - -TL+ A ]; V = [—i i- - A ] 4 4 2 A1 Ar A2A1 ^3^1 W = " ~3 + 2 " " + A4] 4 4J 4 4 Equation (A9.32a) can be reduced to . Yl + V1Y1 + Wl = ° (A9.32b) 2 3 where VL = (3A6~A5)/3 and W1 = (2A5 - 9A5A& + 27A?)727 The three roots are r = B + B ; r = -l/2[-(B +B ) + /3 (B -B )i 1 1 2 2 L 1 2 12 arid r3 = -1/2 [-(B^) - VT (B^B^l] where .' •. '. \.' • - \. • •'.' ' B _ r"wi + rwi + v? a/2,1/3. B _ r_wi A +vu 1/2.1/3 Bl _ [~2~ + ("T + 27 } ] ' B2 " [~ •" ("T + 27) ] Thus A = (Z - XL)(Z - X2)(X - X3)(Z - X4) (A9.32c) If the initial states are assumed to be zero, then the transient response 275 the system is n-1 C(nT) = Z [* * * * ] i=0 *2 (A9.33) where [x1(y35)-31Kx1-^22) *11 = — — Xi ••: • (x1-x2)(x1-x3)(x1-x4) [x2(x2+B5)-e1](x2-^2]vn_1_, : x2 (x2-x1)(x2-x3)(x2-x4) [X3(X3+35)-31](X3-^22)^_1_. + [X4(X4+35)-31](X4-^2]^_1_, ~ 3 X4 (x3-x1)(x3-x2)(x3-x4) (x4-x1)(x4-x2)(x4-x3) [X1(X1+S5)-31] rn-l-i 12 '(x1-x2)(x1-x3)(x1-x4) l '12 [X2(X2+35)-31] (x2-x1)(x2-x3)(x2-x4) + +1' 12 (x3-x1)(x3-x2)(x3-x4) n-l-i , x3 + <D12 (x4-x1)(x4-x2)(x4-x3) .n-l-i 13 (X +3 )U' (X -4' +<J>' cb' 1 (X +3 )fd>' (X-cb' )+*' cb' ] ^ 1 5nv13^ 1 T22 V12*23J vn-l-i . v 2 5;L+13V 2^22; l12v23J n-l-i XT + ' — — ; x2 (x1-x2)(x1-x3-)(x1-x4) (x2-x1)(x2-x3)(x2-x4) 276 (X +B Hcb' (X -cb' +<b' <b' 1 (X +g )r<b' (X-cb' )+<b' cb' 1 ^ 3 5My13k 3 ^22 912V23J vn-l-i , 4 5nvl3K 2*22J y12y23J X3 + (x3-x1)(x3-x2)(x3-x4) (x4-x1)(x4-x2)(xA-x3) ^13(Xr*22)+*12*233 n-l-i ^ "^VW*^^1 n-l-i + x + X + (x1-x2)(x1-x3)(x1-x4) (x2-x1)(x2-x3)(x2-x4) [•{3(X3-*22)+*{2*23l I *13( V*22)+*12*233 n-l-i X (x3-x1)(x3-x2)(x3-x4) (x4-Xl)(x4-x2)(x4-x3) 277 APPENDIX 10 OPTIMUM DESIGN OF CONTROL SYSTEM BY DYNAMIC PROGRAMMING (66) Consider a multivariable process governed by the following first-order vector-matrix differential equation x = Ax + Du (A10.1) where A is the coefficient matrix of the process; D is the driving matrix; is the state vector and u is the control vector. The solution of equation (A10.1) by state-transition matrix method is given as x(t) = 6(t, tQ) x (tQ) + fi Ut, T)DudT (A10.2) where <(>(t, t^) is the overall transition matrix and satisfies the condition <Kt, tQ) = A6(t, tQ) and (r(tQ, tQ) = I (A10..3) Since this is a digital control system, u(x)= u(kT) for kT £ T < (k+l)T, and the solution in discrete form is given as x(k+l) = <})(k) x (k) + G(k) u(k) (A10.4) where - <f>(k) = *(k+-lT, kT) (A10.4a) G(k) = /^1T 4(k+lT, T) D(T) dT (Al0.4b) where sampling time T has been dropped in (A10.4) for convenience. Applying a quadratic performance index of the form N J« = I {[x°(k) - x(k)]'Q(k)[x°(k) - x(k)] + Xu'(k-l) H(k-l) u(k-l)} k=l (A10.5) 278 for the control system optimization, in which Q and H are positive definite symmetric matrices. The selection of positive definite matrix assures the uniqueness and linearity of the control law and asymptotic stability of the contol system for the controllable process. The expansion of the above equation leads to a weighted sum of squares of (x°-x) and u, with the weighting determined by the elements of matrices Q and H. The first terra in the right hand side of equation (A10.5) could be used to specify the deviation of the process from the desired condition at any time KT, and the second term provides an energy constraint on'the control signals. The first terra in the right hand side can be considered as a representation of economic penalties caused by response errors and the second term may be viewed as the cost of control. The multiplier X is a penalty factor and can be determined directly from engineering considerations. The addition of,the second term, provides a mathematically convenient way to ensure the avoidance of saturating the control signal,^ thus the multiplier can be chosen so that the square of the control signal is less than a certain limit where saturation occurs. The optimum control problem can be formulated as follows: Find the control law (u(i)}, i = 0, 1, 2, N-1, which minimizes the. expected value of the performance index of equation (A10.5) subject to the relationship of equation (A10.4), for any arbitrary initial state x(0). If the optimum digital control problem is viewed as an N-stage decision process, the determination of the optimum control law can best be carried out by means of dynamic programming technique. Let the minimum of 279 the expected value of the performance index be denoted by fN [x(0)j = mn±) E JN (A10.6) N I k=l IN = Min E { I {[x (k) - x(k)]' Q(k)[x°(k) - x(k)] + Au'(k-l) H(k-l) u(k-l}} u(0) u(l) u(n-l) Expressing in a more general form gives fN_j[x°(j) " X(J)] = Min E JN_j (A10.7) If the optimum digital control problem is viewed as an N-stage decision process, the determination of the optimum control law can best be carried out by means of dynamic programming technique. Let the minimum of the expected value of the performance index be denoted by fM [x(0)] = Min. E j . (A10.6) N . u (1) N • =• Min E { I I[x (k) - x(k)]' Q(k)[x (k) - x(k)] + Xu'(k-l) H(k-l) u(k-l}} k=l u(0) u(l) u(n-l) Expressing in a more general form gives fN_jf*0(j) " x(j)] = Min E JN-j (A10.7) N = Min E { I {[x°(k) - x(k)]* Q(k)[x°(k) - x(k)]+X u'(k-l) H(k-l) u(k-l}} k=j+l u(j) u(j+l) u(n-l) j = 0, 1, 2, ...... N when j = 0, equation (A10.7) reduces to (A10.6) and it is apparent that fg = 0. 280 Suppose that the return from the first (j-l) stages is optimum. Then the output of the remaining N-j stages is equal to output from the j-th stage plus optimum output from the remaining [N-(J+1)] stages; that is {[x°(j+l) - x(j+l)]'Q(j+l)[x°(j+l)-x(j+l)] + Xu'(j) H(j) u(j)] (A10.8) + fN_j+ltx°(J+1)-x(j+1^ Applying the principle of optiraality fN_j[x°(j) " x(j)] = Min E {([x°(J+l)-x(J+l)],Q(j+l)[x0(j+l)-x(j+l)] (A10.9) + Xu'(j) H(j) u(j)] + fN_j+1[x°(j+l)-x(j+l)]} Since the function f is quadratic in [x^ - x], it can be assumed that fN_j[x0(j) " X(J)] = [X°(J) - X(J)]' P(N"j)[x°(j) - x(j)] (A10.10) and fN_j+LtX°(j+1) " x(J+1)i = [x°(i+l) - x(j+l)]' P(N-j+l)[x°(j+l) x(j+l)] (A10.ll . . •• • • J ' This assumption is readily justified by mathematical induction. The P's are positive definite, symmetrical matrices which put these two expression in quadratic form. Substituting equation (A10.10) in equation (A10.9) gives [x°(j)'- x(j)]' P(N-j)[x°(j) - x(j)] = Min E {([x°(j+l) - x(j+l)]' S(N-j+l) u(j) (A10.12) [x°(j+l) - x(j+l)]) - Xu'(j) H(j) u(j)} where S(N-j+l) = Q(j+1) + P(N-j+l) (A10.12a) 281 Let I = E{([x°(j+1) - x(j+l)]' S(N-j+-l)[x°(j+l) - x(j+l)]) + Xu'(j) H(j) u(j)} (A10.13) In light of equation (A10.10), In_j'" E^tx°^> " X<J>]'KH[N _ (J+D][x°(j) ~ x(j)]) +u'(j) LG+(n-(j+l)) [x°(j) = x(j)]'•>L^G(N-j+i)u(-j)-+ u'(j) ]LGG(S-j+i)-+-X H(j)] u(j)} (A10.14) where L [N - (j+l)] = S[N - (j+l)] cj>(j) (A10.15) LGG[N - (j+l)] - G'(j) S[N - (j+l)] G(j) (A10.16) L [N - (j+l)] = G'(j) S[N - (j+l)] <j>(j) (A10.17) L+(J[N - (j+D] = 4>'(j) S[N - (j+l)] G(j) (A10.18) The minimization procedure is readily carried out through ordinary differentiation, since the N-stage decision process has been reduced to a sequence of single-stage decision process. Differentiating equation (A10.14) with respect to u(j) yields LG+[H - (J+D][x°(j) - x(j)] + [x°(j) - x(j)]' -.L^[N _ ( + [LGG[N - (j+l)] + XH(j)] u(j) + u'(j)[LGG[N - (j+l)] + XH(j)] (A10.19) In view of the symmetry of the matrices, = 2LG<f)[N - (j+D][x°(j) - x(j)] + 2[LGG[N - (j+l)] + XH(j)] u(j) (A10.20) At the minimum the derivative is zero, and thus the optimum control law is 282 u°(j) = B(N-j) [x°(j) - x(j)] (A10.21) where the feedback matrix B is given as B(N-j) = -[LGG[N - (j+1)] + XH(j)]"1 LG(()[N - (j+1)] (A10.22) It is noted that the optimum control law is a function of the state variables of the system. Since the feedback matrix B Involves the unknown matrix P, the optimum control law is still undefined until the matrix P is determined. Substituting equation (A10.17) into equation (A10 .12) yields the minimum [x°(j) - x(j)]' P(N-j)[x°(j) - x(j)] = [x°(j) --x(j)]' LH[N - (J+D] [x°(j) - x(j)] + (B(N-j)[x°(j) - x(j)]}' LG(()[N - (j+l)][x°(j) • - x(j)] + [x°(j) - x(j)]'L(J)G[N - (j+l)]{B(N-j)[x°(j) - x(j)]}+{B(N-j)[x° (j) " x(j)]}' [LGG[N - (j+1)] + XH(j)] {B(N-j)[x°(j) - x(j)]} = [x°(j) - x(j)]' LH[N - (j+D][x°(j) - x(j)] [x°(j) - x(j)] + [x°(j) - x(j)]}'B'(N-j) LG+[N - (j+D][x°(j) -" x(j)] + [x°(j) - x(j)]'L^[N - (j+1)] B(N-j)[x°(j) - x(j)] +[x°(j) - : «(j)]}'B'(N-j) [LGG[N - (j+1)] + XH(j)] (B(N-j)[x°(j) - x(j)]] (A10.23) Applying equation (A10.18) to equation (A10.23) gives • [x°(j) - x(j)]' P(N-j)[x°(j) - x(j)] = [x°(j) - x(j)]' [L^[N • - (J+D] 283 + L^N - (j+l)] B(N-j)][x°(j) - x(j)] (A10.24) Since Q and P are positive definite matrices, then by equation (A10.12a), S is also definite. Comparing both sides of equation (A10.24) yields P(N-j) = LH[N - (j+l)] + L [N_- (j+l)] B(N-j) . (A10.25) Starting with P(0) = 0 for j = N-1; equation (A10.18) gives B(l) = ~[LGG(0) + XH(N-l)]"1 LG(j)(0) (A10.26) and equation (A10.25) gives P(l) = L (0) + L.„(0) B(l) (A10.27) cpcp <pG Thus, combining equations (A10.22) and (A10.25) gives the recurrence relation and hence the control law is defined. It is being assumed that the control system in this study is of finite stage process and there is no , constraint on the control signal. Equation (A10.25) reduces to P(N-j) = LH[N - (j+l)] - LjjQ[N - (j+l)] L^N - (j+l)] LG-+[N - (j+l)] (A10.28) Using equations (A10.15) to (A10.18) and for simplicity dropping the arguments gives p = <j>'s<j> - <(>,SG[G,SG]~1G'S4> = (b'Scb - cb'SGG~1S~1[G']_1G'Scb = cb'Scb - <b*Scb = 0 (A10.29) Provided that the inverse matrices exist; that is, if there are as many 284 control signals as there are state variables. The feedback matrix is then given by B(N-j) = -[G'(j) Q(J+1) G(j)]"1 G'(j) Q(j+1) 4<j) (A10.30) It should be noted that, when the performance index is not time weighted, the process is time invariant, and matrix G is non singular, the feedback matrix is a constant matrix given by B = -[G'(T) QG(T)]"1 G'(T) Q4(T) (A10.31) The solution as given by equation (A10.21) is not complete since in some cases the states are unaccessible for direct measurement. Due to the dead time present in the process a predictor is used to estimate the state variables. Consider a linear control system with the following equations x = Ax(k) 6(k) (A10.32) y(k) = Mx(k) + n(k) (A10.33x(0) = x0 + e0 . (A10.34) Where x is an n vector of states, y is an i vector of discrete time outputs, e(k) is an n vector of random process,h(k) is an I vector of random measurement error, A and M are n x n and £ x n constant matrices, XQ is an estimate of the initial state, and e0 is its random error. The variables x(k), y(k) are discrete stochastic random variables having some probability distribution at any instant of time k, and equation (A10.32) is a stochastic 5 7 differential equation. Using the weighted least squares performance index along with the system equations (A10.32) to (A10.34) given as 285 JM = j[*<0)'- XQ]'PQ1[X(0) - xQ] + |/kT{(x-Ax)'R(x-Ax) + [y - Mx]q[y -Mx]}dt (A10.35) where the first term minimizes the squared error of initial condition estimates, the second term minimizes the integral squared modeling error, and the third term minimizes the integral squared measurement error. The weighting factors Po-1. R, Q are chosen based on the statistics of the problem. Assuming that the noise process e(k), n(k) in equations (A10.32) and (A10.33) to be Gaussian and uncorrelated in time (ie. white noise) as well as uncorrelated with the initial state. Also, assume that the expected value relations E[e(k)] = 0; E[n(k)] =0; E[e(k) e(x)'] = R_1(k) 6(kT-x) E[n(k) x'(0)] = 0; E[e(k) x'(0)J = 0; E[e(k) n'(x)] . o E[x(0)] = xQ; E{[Xq - x(0)][x0 x(0)]'} = PQ E[n(k) n(T)1] = Q_1(k) 6(kT-T) hold, where PQ is the covariance of the initial state errors, R-1(k) is the covariance of the process noise, and Q~1 is the covariance of the measurement errors. Equation (A10.35) can be reformulated by defining u(k) = x - Ax, and rewriting the objective relation (equation A10.35), that is,-JM = |-[x(0) - XQ]'PQ1[X(0) - xQ] + y/kT{u'(k) Ru(k) + [y - Mx(k)]' Q[y - Mx(k)]}dt (A10.36) Thus, the estimation problem can be posed as a deterministic optimal control problem; ie., select the control u(k) such that J in equation (A10.36) is 286 minimized subject to the constraints x = Ax + u (A10.37) x(0) unspecified (A10.38Applying the maximum principle to this problem gives H = y[u'Ru + (y-Mx)' Q(y-Mx)] + X'(Ax+u) (A10.39) 8H and the condition ~— = yields 3u J u(k) = -R_1X (A10.40) where X' = —— - [M'Q(y-Mx) -A'XJ' (A10.41or X = -M'QMx - A'X + M'Qy (A10.42) Because both x(0), x(k) are free, there are then two boundary conditions on •xi • •"" , : X(k) =0 (A10.43) and x(0) = xQ - PQX(O) (A10.44) Substituting equation (A10.40) into equation (A10.37) gives x = Ax - R_1X (A10.45) Equations (A10.42) to (A10.45) form a two-point boundary value problem which can be solved for x(k), X(k) and thus produce the optimal estimates.^ Let xCkVjj), u(k7kf ), — where k^ is the final time —, denote the optimal estimates and controls at time kT, with data y(k) up to time k^. Thus 287 A(k/kj) is the estimate found from the two-point boundary value problem of of equations (A10.42) to (A10.45). Make the transformation x(k/k ) = W(k) - P(k) X(k) (A10.46) where the n vector W(k) and nxn matrix P(k) are to be determined. Substitute equation (A10.46) into equation (A10.45) gives for each side of the equation RHS = A(W-PX) - R_1X (A10.47) LHS = W - PA - PA = W - PX + P[M'QM(W-PX) + A'X - M'Qy] (A10.48) Collecting terms gives W - PM'Q(y-MW) - AW = (f-PA'-AP-R~1PM'QMP)X (A10.49) It is now possible to choose to define W(k), P(k) such that the coefficients in equation (A10.49) vanishes and choose the boundary conditions to satisfy equations (A10.43) and (A10.44). Thus, W = AW + PM1Q(y-MW W(0) = xQ (A10.50) $ = PA' + AP' + R-1 - PM'QMP P(0) = PQ (A10.51) Note that the estimates may be found first by equations (A10.50) and (A10.51)forward in time to produce W(k), P(k), then solving backward in time using equations (A10.43), (A10.45) and (A10.46) to find the optimal estimates x(k/k j. 288 From equation (A10.43) it could be seen that at the end of a data period KT = kT , ^(k ) |lways vanishes. Thus for any kT , equation A10.46 yields the result x(kf/kf) = W(kf) (A10.52) Thus, the filtered estimates are determined from the sequential real-time equation (A10.50), where k is always the current time. x(k/k) = Ax(k/k) + P(k) M'Q[y(k) - Mx(k/k)] x(0/0) = xQ (A10.53) The n x n matrix function P(k) is given by equation (A10.51). Prediction estimates x(k/kp) for the control system are estimates at time k > k^ for a system having no data after time k^. These arises directly from the filtering equations if Q is set equal to 0 for k > k^ in equations (A10.51)and (A10.53). Thus the prediction equations are x(k/kQ) = Ax(k/kQ) (A10.54) where x(k/kQ) is the filter estimate at time k^. The prediction covariances PCk/kg) are given by P(k/kQ) = P(k/kQ) A' + AP(k/kQ) + R_1 P(k0/kQ) = P(kQ) (A10.55) Equation (A10.54) is solved by numerical integration, in this study the Runge-Kutta fourth order formula is used. 289 APPENDIX 11 ZERO-ORDER HOLD PARAMETER DEFINITION M , + "9lT/2+ "62T/2 (1-e ) (a1 + a2e + c^e -9 T/ -9 T/ -8 T/ 1 '2 , 2I72 lIX2N e a2(e - e ) -9 T/ n 22 0 e 0 0 -9 T -9 T (l-e-V) ai + V +V -6iT , -v -ei\ e a2(e -e ) -92T 0 e 0 0 0 1 -9L6T -916T -926T (1-e ) + a2e + o^e -9 6T -9 6T -9 6T 1 2 1 e a2(e -e ) 0 0 -e26T e 290 2. i (29rV, °1 ~ V ' a2 (\-*2> ' °3 WV 2V 2 g{(T) = a2 _eiT a3 _e2T <_ -91T0 ^ °1 0 6, e 0, 1 ^ g2(T) = a2(Q- e - Q- e ) - a2(- e - g- e ) , -8,Tn -0„T 8iCD-|-(. 2°-e 2 > HALF-ORDER HOLD PARAMETERS gr(T) 9 >: e -e T 10 1 —- e a -0 T 11 2 a. 12 "Vi — e J " tVo ~ 0- e aio "Vo °11 "VO g2(T) ral3 "V °14 °15 -a2T! _ ra!3 "Vo ^ a!4 62T0 + ai5 + [-T— e + ^ e + •0. 0. F °" "62T + "le "a2T1 r °16 -62T0 + °16 g4(T) - -l/a2(e -e ) 291 "4 = a/6l; "5 = <8i+a)/8ie2; "6 = a/0l(9re2) 5 a7 = (ere2+a)/62 ( 82 "8l); °8 = 1/(62-91); a9 = a^aS^l-e^S^/e^a.^ ; a1Q = -a.1(e2-e1+i)/e1(82-e1)(a2-e1); «n = -a1(a2-e1-e2)/82(e1-62)(Ve2) al2 - -[aa1(e2-a2+1) "WV "al(6ra2)(e2"a2^/a2(eira2)(92"a2) ai3 = -i.(92-fll+1)/(V8l)(VV; aH= «1/(fl1-82)CV82) a!5= al(82-a2+1)/(8ra2)(82-a2); a!6 = -al/(a2-82) -8 T/2 -ST/2 -81/2 1 a4(l-e ) [a5+a6e +a?e ] : \ -81T/2 -82T/2 0 e • ag(e -e :-; . A = | -8 T/2 0 0 e 0 0 0 0 0-8 T/2 -82T/2 ~a2T/2 [a9+a1()e +ctne +«12e ] 0 -9 T/2 -62T/2 -a2T/2 [a13e +cxue +«15e ] 0 -8 T/2 -a T/2 a16(e -e ) 0 -a T/2 e 0 1 292 Bl = -e,T — 6,T -6„T 9,T -9„T -a„T 1 — 1 2 1 2 2 i 1 o4(l-e ) [a5+a6e +aye ] [ag+a1()e +ane +a12e J 0 -e1T 0 0 0 0 -e T -e2T ag(e -e ) -e2T o o -01T -02T -a2T [«13e +«14e +a1se ] 0 -82T -a2T a16(e " -e ) -a2T C = ':- -e 6T -e 6T -e 6T - -e 6T -BJT -a26T 1 a4(l-e ) [a5+a6e +a?e ] [ValOe +ane +al2e J. ° -6 -6T 0 e 0 0 -6 6T -626T -61.5T ~926T ~A26T ag(e -e ) [o13e +aiAe +aise ] 0 0 0 -626T 0 0 -9 6T -a26T a16(e -e ) -a26T 293 APPENDIX 12 NOISE SENSITIVITY ANALYSIS The following assumption is made: (1) the experimentally determined transient responses can be represented as C(t) , = C (t) +Vft) (A12.1) 1 measured i exact 1 and C (t) . = C (t) + V (t) (A12.2) o measured o exact o where /°°C(t) dt = 1 o and J~V(t) exp(-st) tndt « /"cCt) exp(-st) tndt for the values of n and s in consideration. The noise functions V(t) are defined as the difference between the measured responses and the exact responses. The relative error on dead time x, that is Ax = -^i (A12.3) r,o T V /. due to experimental and measuring errors on CQ(t), is expressed as AT = jTv (t) F (t) dt (A12.4) r,o'ooo where F (t) is the noise sensitivity function, o The assumption J"v(t) exp(-st) tndt « /°°C(t) exp(-st) t°dt 294 means that the total error on the calculated dead time is equal to the sum of the individual errors due to noise at infinitesimal time intervals. The error on the dead time due to noise on, say, the outlet response at times t = T-, T„, T_ for time intervals of duration At can thus be written as 1 2' 3 n Ax = V(T ) F(T ) • At + V(T ) • F(T_) • At. + ... (A12.5) r,o 1 1 1 L 2. I or in the limit AT = fv ft.) F (t) dt r, o o o o If V(t) = A • 6(t-T), where A « 1, then TTT „ • rVJt) ' F (t) dt = A • F (T) (A12.6) r, o o o o o That is F(T) = lm - AT - / A%o A r° The value of the weighting function F(t) for t = T, F(T), is thus the ratio between the relative dead time error due to noise at t = T and the noise intensity at t = T. The objective is to determine the function F(t) and hence calculate the optimum s-value to be used. In order to determine the noise function FQ(T), T is calculated using the relation C (t) * = C (t) = C (t) + A • 6(t-T) (A12.7) 0 measured o o exact and Cft) , = C (t) = G\(t) 1 measured i i exact n s First the perturbated moments M ' are calculated. 295 The normalisation factor for Cq is now changed, that is, and J^Co(t) dt = /~Co(t) dt + fy • 6(t-T) dt = 1 + A (A12.8) "I'* = ro7T=' £Co(t)exact + A ' *W1 dt 1 + A —k- (M°'S + Ae"St) • (A12.9) 1 + A i M l,s = j» _l_ . [c (t) + A • 6(t-T)l te~St dt o o , . -T- 1 o exact v 'J 1 + A -— • (M1,S + A • T • e~St) 1 + A (A12.10) 1 + A - • . ..• . —^-3 (M2'S + A • T2 • e~St) (A12.ll) 1 + A ° Mn,s = n,s (A12.12) l i Equation (A12.12) comes from the assumption that the input pulse is noise —st free. Expanding the e term in both equations (A12.10) and (A12.ll) and second order and higher terms in A, gives Au, = uJ* - u' = -Ae [T -—1 = -A • R,(T) (A12.13) 111 LMo,sJ 1 M o 296 and -r -sT f/m o x2 r o _ / o .2 = -A • R (T) (A12.14) But . , 1/2 1/2 , „ 1/2 2su ~ 1 2 T f/TT 172 172 u2 SU2 ~ S (A12.15) Differentiating equation (A12.15) and setting dx = x^ - x; A\xy = AU;L and du2 = Au2 * That is r 1/2 A/2, -T . " T [2su - 2 J : = F.(T) = —TT^ m wTT Au [ul/2 + -ul/2__ 2l/2] . 1 [(ul/2+sul/2.2l/2)(s-l/2u,.-l/2).(2su,ul^ 2 (A12.16) 2 , 1/2A 1/2 1/2 2 2 (u2 +su2 -2 ) Substituting for uJ, u2> Au1 and Au2 gives. M1'3 FT(T) = -Aie-ST(T- -g—) - A2A3e"sT + A^e"^ (A12.17) M ' o 297 where Al * 2i 2S(- l_^l/2 _ 2l/2 2t (TJS+I)' )1/2(l+s) - 21/2 [(-^L-y)1'2 (l+s) - 21/2](^^)-1/2[s(r+T!llr) - 1] (T1S+1) (TlS+l)' A. = {(T M 1,8 0 )2 M o, s 2x [(^_)1/2(1+S) - 21/2]2 (V+i)' M2'S M1'5 [— - (—)2]} M°>S M°'S ^(-^^{sCx*^ A, = (TlS+l)' 2x, 1' (^8+1)' 2x )1/2(l+s) -2i/Z] (T1S+1)' l/2i2 Applying the same approach for the noise sensitivity function of the time constant, the time constant x is given as ul/2 V 1/22 1/2 <A12'18> su2 - 2 298 Differentiating equation (A12.18) and setting dx, = x - x • du„ = Au 1 leal 12 2 gives -(l/2)(21/2u-1/2> _ Tlcll T , 1/2 ,1/2,2 Au2 (A12.19) (su2 -2 ) but 2 2 (xlS+l)Z substituting gives (2i«[_!!L^]-irt) -1^1 L=FT(T)= T-i : A3e ST (A12.20) (xlS+l)Z The noise sensitivity functions, equations (A12.17) and (A12.19) are esperimentally verified by pulsing testing and the resulting analysis gives the plot of Fig. 6.2. The noise sensitivity function can be expressed as -st 2 F(T) = e (at +bt+c), which means that F(.T) approaches zero for t approaching infinity. Using the normal central moment method, ie. s = 0, the damping influence of the exponential factor is lost, and the noise sensitivity increases unbounded for high t-values, thus making the calculations extremely sensitive to errors in the 'tails' of the transient responses. 299 Appendix 13 1 " 5 \ 8'—— *i Heat Exchanger Shell 300 Heat Exchanger Tube
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- The design of a direct digital controller for sampled-data...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
The design of a direct digital controller for sampled-data systems Okorafor, Ogbonna Charles 1982
pdf
Page Metadata
Item Metadata
Title | The design of a direct digital controller for sampled-data systems |
Creator |
Okorafor, Ogbonna Charles |
Date | 1982 |
Date Issued | 2010-04-15 |
Description | This study is made up of three parts viz: 1. For a process which can adequately be modelled as second-order overdamped with pure delay, design techniques are presented for choosing the loop gain and sampling rate of the proportional, feedback, sampled-data controller. Control of an experimental higher-order system is used to verify these suggested designs. 2. Discrete control algorithms, suitable for programming in a direct digital control computer, are presented. Digital compensation algorithms are derived to yield theoretically a response with finite settling time, when the system is step forced in either set point or load. The utility of the proposed designs is experimentally verified by application to a higher order (heater-heat exchange) process whose dynamics can be described as fourth order overdamped with pure dead time. 3. Finally, this study is concerned with the problem of designing an adaptive controller for a class of single-input single-output time-invariant linear discrete systems modeled as second-order overdamped with pure delay. In each case the effect of using either a zero-order hold or half-order hold as the smoothing device was considered. In every case the system with half-order hold gave better transient responses than systems with zero-order hold and better stability conditions. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | Eng |
Collection |
Retrospective Theses and Dissertations, 1919-2007 |
Series | UBC Retrospective Theses Digitization Project |
Date Available | 2010-04-15 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0058912 |
Degree |
Doctor of Philosophy - PhD |
Program |
Chemical and Biological Engineering |
Affiliation |
Applied Science, Faculty of Chemical and Biological Engineering, Department of |
Degree Grantor | University of British Columbia |
Campus |
UBCV |
Scholarly Level | Graduate |
URI | http://hdl.handle.net/2429/23641 |
Aggregated Source Repository | DSpace |
Download
- Media
- UBC_1982_A1 O55.pdf [ 11.17MB ]
- Metadata
- JSON: 1.0058912.json
- JSON-LD: 1.0058912+ld.json
- RDF/XML (Pretty): 1.0058912.xml
- RDF/JSON: 1.0058912+rdf.json
- Turtle: 1.0058912+rdf-turtle.txt
- N-Triples: 1.0058912+rdf-ntriples.txt
- Original Record: 1.0058912 +original-record.json
- Full Text
- 1.0058912.txt
- Citation
- 1.0058912.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Country | Views | Downloads |
---|---|---|
India | 10 | 0 |
Germany | 8 | 0 |
United States | 5 | 3 |
China | 2 | 10 |
City | Views | Downloads |
---|---|---|
Unknown | 13 | 3 |
Patel | 4 | 0 |
Ashburn | 2 | 0 |
Redmond | 2 | 0 |
Beijing | 2 | 0 |
Mumbai | 1 | 0 |
Atlanta | 1 | 0 |
{[{ mDataHeader[type] }]} | {[{ month[type] }]} | {[{ tData[type] }]} |
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0058912/manifest