C ONTROLLABILITY ANALYSIS FOR PROCESS AND CONTROL SYSTEM DESIGN by Audun Faanes A Thesis Submitted for the Degree of Dr. Ing. Department of Chemical Engineering Norwegian University of Science and Technology Submitted August 2003 i Abstract Controllability is the ability of a process to achieve acceptable performance, and in this thesis we use controllability analysis in the design of buffer tanks, feedforward controllers, and multivariable controllers such as model predictive control (MPC). There is still an increasing pressure on the process industry, both from competitors (prize and quality) and the society (safety and pollution), and one important contribution is a smooth and stable production. Thus, it is important to dampen the effect of uncontrolled variations (disturbances) that the process may experience. The process itself often dampens high-frequency disturbances, and feedback controllers are installed to handle the low-frequency part of the disturbances, including at steady state if integral action is applied. However, there may be an intermediate frequency range where neither of these two dampens the disturbances sufficiently. In the first part of this thesis we present methods for the design of buffer tanks based on this idea. Both mixing tanks for quality disturbances and surge tanks with “slow” level control for flow-rate variations are addressed. Neutralization is usually performed in one or several mixing tanks, and we give recommendations for tank sizes and the number of tanks. With local PI or PID control, we recommend equal tanks, and give a simple formula for the total volume. We also give recommendations for design of buffer tanks for other types of processes. We propose first to determine the required transfer function to achieve the required performance, and thereafter to find a physical realization of this transfer function. Alternatively, if measurements of the disturbances are available, one may apply feedforward control to handle the intermediate frequency range. Feedforward control is based mainly on a model, and we study the effect of model errors on the performance. We define feedforward sensitivities. For some model classes we provide rules for when the feedforward controller is effective, and we also design robust controllers such as -optimal feedforward controllers. Multivariable controllers, such as model predictive control (MPC), may use both feedforward and feedback control, and the differences between these two also manifest themselves in a multivariable controller. We use the class of serial processes to gain insight into how a multivariable controller works. For one specific MPC we develop a state space formulation of the controller and its state estimator under the assumption that no constraints are active. Thus, for example the gains of each channel of the MPC (from measurements to the control inputs) can be found, which gives further insight into to the controller. Both a neutralization process example and an experiment are used to illustrate the ideas. ii Acknowledgments I want to thank Sigurd Skogestad for pointing out the directions in which to proceed, and for his support along the way. He is an excellent supervisor. In addition to his knowledge and skills, from which I have learned a lot, I appreciate his focus on reporting and publishing of results. This improves the research and is beneficial for progress. I thank my fellow students at the institute in Trondheim, my former colleges at the Norsk Hydro Research Centre in Porsgrunn, and my colleges at Statoil Research Centre in Trondheim for always pleasant and often fruitful discussions. The Norwegian Research Council and my former employer, Norsk Hydro ASA, are gratefully acknowledged for financing this work. I also want to thank my present employer, Statoil ASA, for allowing me time to finish it. Finally, I want to thank my wife Sophie and our daughters Sarah and Mathilde. Our family has come into being during the same period as this thesis. My parents can be thanked for many things, and of particular relevance is their hospitality when I needed a home in Trondheim during this work. Contents 1 Introduction 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Thesis overview . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 3 5 2 pH-Neutralization: Integrated Process and Control Design 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Motivating example . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Time delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 A simple formula for the volume and number of tanks . . . . . . . 2.6 Validation of the simple formula: Improved sizing . . . . . . . . 2.7 Equal or different tanks? . . . . . . . . . . . . . . . . . . . . . . 2.8 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8.1 Measurement noise and errors . . . . . . . . . . . . . . . 2.8.2 Feedforward elements . . . . . . . . . . . . . . . . . . . 2.8.3 pH set-points in each tank . . . . . . . . . . . . . . . . . 2.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix A Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 Single tank . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Linear model for multiple tank in series . . . . . . . . . . . . A.3 Non-linear model for multiple tank in series . . . . . . . . . . A.4 Representation of delays . . . . . . . . . . . . . . . . . . . . Appendix B The effect of pH measurement errors on the scaled excess concentration, . . . . . . . . . . . . . . . . . . . . . . . . . Appendix C On the optimization problem (2.32) subject to (2.35) . . . 7 9 9 12 12 14 18 23 25 25 25 27 28 28 28 30 30 32 33 34 35 37 iv 3 Buffer Tank Design for Acceptable Control Performance 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Introductory example . . . . . . . . . . . . . . . . . . . . 3.3 Step 2: Physical realization of with a buffer tank . . I Mixing tank for quality disturbance ( ) . . . II Surge tank for flow-rate disturbance ( ) . . . 3.4 Step 1: Desired buffer transfer function . . . . . . . 3.4.1 given (existing plant) . . . . . . . . . . . . . . . 3.4.2 not given . . . . . . . . . . . . . . . . . . . . . 3.5 Before or after? . . . . . . . . . . . . . . . . . . . . . . . 3.6 Further discussion . . . . . . . . . . . . . . . . . . . . . 3.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix A Surge tank with level dependent flow . . . . . . . Appendix B Capital investments . . . . . . . . . . . . . . . . . Appendix C Surge tank: Required volume with n-th order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Control Design for Serial Processes 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Model structure of serial processes . . . . . . . . . . . . . . . . . 4.3 Control structures for serial processes . . . . . . . . . . . . . . . 4.3.1 Local control (diagonal control) . . . . . . . . . . . . . . 4.3.2 Pure feedforward from upstream units . . . . . . . . . . . 4.3.3 Lower block triangular controller . . . . . . . . . . . . . 4.3.4 Full controller . . . . . . . . . . . . . . . . . . . . . . . 4.3.5 Final control only in last unit (input resetting) . . . . . . . 4.4 Case study: pH neutralization . . . . . . . . . . . . . . . . . . . . 4.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Model uncertainty . . . . . . . . . . . . . . . . . . . . . 4.4.4 Local PID-control (diagonal control) . . . . . . . . . . . . 4.4.5 Feedforward control (control elements below the diagonal) 4.4.6 Combined local PID and feedforward control (lower block triangular control) . . . . . . . . . . . . . . . . . . . . . 4.4.7 Multivariable control . . . . . . . . . . . . . . . . . . . . 4.4.8 MPC with input resetting . . . . . . . . . . . . . . . . . . 4.4.9 Conclusion case study . . . . . . . . . . . . . . . . . . . 4.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 40 43 45 46 47 48 51 55 59 63 65 66 68 69 71 73 74 76 78 80 80 82 85 85 86 86 87 88 88 89 89 91 97 97 98 98 99 99 v Appendix A State space MPC used in case study . . . . . . . . . . . . 102 Appendix B Derivation of equations (4.20) and (4.31) . . . . . . . . . 104 5 On MPC without active constraints 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Derivation of equivalent controller from receding horizon controller without active constraints . . . . . . . . . . . . . . . . . . 5.3 The steady-state solution . . . . . . . . . . . . . . . . . . . . . . 5.4 Generalization with tracking of inputs . . . . . . . . . . . . . . . 5.5 State and disturbance estimator . . . . . . . . . . . . . . . . . . . 5.6 State-space representation of the overall controller . . . . . . . . . 5.7 On the number of estimated disturbances . . . . . . . . . . . . . . 5.8 Closed loop model . . . . . . . . . . . . . . . . . . . . . . . . . 5.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 109 110 112 113 115 118 120 120 6 Feedforward Control under the Presence of Uncertainty 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 The characteristics of feedforward control . . . . . . . . . 6.3 Feedforward sensitivity functions . . . . . . . . . . . . . 6.4 The effect of model error with feedforward control . . . . 6.5 Some classes of model uncertainty . . . . . . . . . . . . . 6.6 Example: Two tank process . . . . . . . . . . . . . . . . . 6.7 When is feedforward control needed and when is it useful? 6.8 Design of feedforward controllers under uncertainty . . . 6.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . 6.10 Acknowledgements . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix A Modelling of the two tank process . . . . . . . . . 123 124 126 128 129 132 137 142 144 148 149 149 152 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 107 7 Offset free tracking with MPC under uncertainty: Experimental verification 155 7.1 Experimental set-up . . . . . . . . . . . . . . . . . . . . . . . . . 157 7.1.1 Equipment . . . . . . . . . . . . . . . . . . . . . . . . . 157 7.1.2 Instrumentation and logging . . . . . . . . . . . . . . . . 158 7.1.3 Basic control . . . . . . . . . . . . . . . . . . . . . . . . 158 7.2 Process model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 7.3 Identification of process parameters . . . . . . . . . . . . . . . . 160 7.4 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 7.5 Experimental procedure . . . . . . . . . . . . . . . . . . . . . . . 165 7.6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 vi 7.7 Discussion . . . . . 7.8 Conclusions . . . . 7.9 Acknowledgements References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 170 170 170 8 Conclusions and directions for future work 8.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Buffer tank design . . . . . . . . . . . . . . . . . . . . . 8.1.2 Feedforward control under the presence of uncertainty . . 8.1.3 Multivariable control under the presence of uncertainty . . 8.2 Directions for further work . . . . . . . . . . . . . . . . . . . . . 8.2.1 Serial processes: Selection of manipulated inputs and measurements . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.2 MIMO feedforward controllers under the presence of uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.3 Effect of model uncertainty on the performance of multivariable controllers . . . . . . . . . . . . . . . . . . . . . 8.2.4 MPC with integral action . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 173 173 174 174 176 A Control Structure Selection for Serial pH-Neutralization A.1 Example: pH neutralization . . . . A.2 Conclusion . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 178 178 179 179 Processes with Application to 181 . . . . . . . . . . . . . . . . . 182 . . . . . . . . . . . . . . . . . 187 . . . . . . . . . . . . . . . . . 187 B A Systematic Approach to the Design of Buffer Tanks B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . B.2 Transfer functions for buffer tanks . . . . . . . . . . B.2.1 Quality disturbance . . . . . . . . . . . . . . B.2.2 Flow rate disturbance . . . . . . . . . . . . . B.3 Controllability analysis . . . . . . . . . . . . . . . . B.3.1 Additional requirements due to high order B.4 Quality variations . . . . . . . . . . . . . . . . . . . B.5 Flow variations . . . . . . . . . . . . . . . . . . . . B.5.1 First-order filtering . . . . . . . . . . . . . . B.5.2 Second-order filtering . . . . . . . . . . . . B.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 190 190 191 192 193 194 195 200 202 202 202 203 Chapter 1 Introduction We start with some words on the title of the thesis, or more precisely with a definition of what we mean by controllability and controllability analysis (Skogestad and Postlethwaite, 1996, Chapter 5): Definition 1.1 (Input-output) controllability is the ability to achieve acceptable control performance; that is, to keep the outputs ( ) within specified bounds or displacements from their references ( ), in spite of unknown but bounded variations, such as disturbances ( ) and plant changes, using available inputs ( ) and available measurements ( or ). A plant is controllable if there exists a controller (connecting plant measurements and plant inputs) that yields acceptable performance for all expected plant variations. From this, controllability is independent of the controller, and a property of the process alone. Further, controllability analysis is applied to a plant to find out what control performance can be expected. The definition above is in accordance with the definition given by Ziegler and Nichols (1943) “the ability of the process to achieve and maintain the desired equilibrium value”, but must not be confused with the more narrow state controllability definition of Kalman from the 60’s. In particular, in this thesis we will apply controllability analysis in the design of processes, namely such processes that are designed for dynamic and control purposes, and in the design and understanding of feedforward and multivariable controllers. 1.1 Motivation High degree of competition in all branches of the process industry put pressure on each single site and plant to stay competitive. Even within a company there is Chapter 1. Introduction 2 an internal competition of being the most productive and effective, and delivering the best quality products. The second best risks that investment plans are rejected by the central management, or even that the plant is closed. There are many important requirements that must be met by a plant organisation (1) On-site and off-site safety (2) Discharge shall be below certain limits, both on a long term basis, e.g., total over a year, or on a shorter the period of time, such as on an hourly basis. (3) Requirements for certain quality parameters to stay within given limits (to obtain maximal prizes) (4) Minimal production costs, such as energy consummation (5) Maximal production Running smoothly without abrupt changes of any kind, will be an important contribution to meet all the above-mentioned requirements. The risk of accidents and undesired discharge is reduced, and a natural consequence is also a more constant product quality. Finally, production cost can be reduced and the production rate increased, because the risk of unplanned stops is reduced and because it is possible to move the operating point closer to the constraints. On the other hand, within a process, there are many sources that introduce variations of all kinds, namely disturbances. This can be such as variations in the quality of the raw materials or the incomming flow rates, inaccurate charging equipment, sticky vales, or badly tuned control loops. Some of these things are, at least in principle, easy to handle, others are more difficult or costly to avoid, and must therefore be treated by other process parts. It is our experience that the Norwegian process and oil industry has increased the focus on smooth production in recent years, and therefore puts pressure on process control. This is because of the increased competition in the process industry in general (the competitors focus on this), and also because of changes in the oil production in the North Sea, which lead to more disturbances and “new” bottle-necks (primal reasons are increased water and gas production and longer pipes between the wells and the processing units). In this thesis two basic ideas are elaborated. The first is that high-frequency disturbances are dampened by the process itself (e.g., by inventories like reactor volumes, and liquid hold-ups in distillation columns) whereas low-frequency disturbances can be dampened out with effective single-loop feedback controllers. To handle intermediate frequencies, we look into the design of buffer tanks and 1.2 Thesis overview 3 more sophisticated controllers (like traditional feedforward control and multivariable control). As far as we have found in the literature, even though buffer tanks are introduced for control purposes, control theory has not been applied. Further, feedforward control theory is treated by most textbooks on control, but often very briefly, and even a simple analysis of the effect of model errors is often missing (exceptions are Balchen (1968), and the work of Scali and co workers (Lewin and Scali, 1988; Scali et al., 1989)). Based on our experience from industrial processes, we assume that sinusoidal disturbances of varying frequency are the most important. The disturbances may be caused by oscillations in other parts of the process, for example, from aggressive control, valve stiction etc. However, in the simulations we also consider step disturbances. The second idea is that within multivariable feedback controllers there may be controller blocks or elements that are similar to feedforward control. Like traditional feedforward controllers, such elements may nominally improve the performance to a large extent. Unfortunately, feedforward controllers rely heavily on a model of the process, and this drawback also applies to the feedforward elements within the multivariable controller. 1.2 Thesis overview The thesis is composed of six chapters written as independent articles, each with a separate bibliography, and most of them also have their own appendices. In the end of the thesis there is a concluding chapter (Chapter 8) and in addition there are two appendices, A and B, referred to by “Thesis’ Appendix A (or B)” to distinguish from the appendices within each chapter. Chapters 2 and 3 give rules regarding the design of buffer tanks, especially regarding tank sizes (the first specializes on pH-neutralization). Also Chapter 4 can be useful for readers with interest in this, since it looks into different control strategies for serial processes, and one or more buffer tanks are usually placed in series with other process units. In particular, pH neutralization is included as a case study. Chapters 4 - 7 focus on control design. One may say that Chapters 5 and 6 are theoretical foundations for Chapters 4 and 7. If the interest is how to handle disturbances, our basic idea is that when neither the process itself, or a simple feedback control system can handle them, either buffer tanks (Chapters 2 and 3) or feedforward controllers (Chapter 6) may be used to handle the resting frequencies. Chapter 1. Introduction 4 In Chapter 2 we provide a simple rule for the size of mixing tanks for pH neutralization processes ensuring that incoming disturbances are dampened such that the outlet pH is kept within given limits. We assume traditional single-loop feedback control, and that the efficiency of the feedback loops are limited by delays and other high order dynamics. Neutralization processes often have large process gains, and it is therefore often convenient to use several stages. In Chapter 3 we extend the mixing tank design from Chaper 2 to the design of a broader class of buffer tanks. The aim of the buffer tank is disturbance dampening in the frequency range where neither the process itself nor any feedback loop dampen the disturbances sufficiently. We consider disturbances in both quality and flow rates, for which mixing tanks and surge tanks with slow level control are used, respectively. Chapter 4 discusses control design for serial processes. As a case study we consider neutralization in several stages, which we also discuss in Chapter 2. We use the structure of serial processes to identify different classes of control blocks of a multivariable controller, and comment, in particular, on feedforward effects and how to obtain integral action. The multivariable controller we use in Chapter 4 is a model predictive controller (MPC). In Chapter 5 we assume that no constraints are active, in which case the MPC can be considered as a linear quadratic controller (LQ), and derive a state-space formulation of the resulting controller, including the state estimator. Chapter 5 is mainly a tool for Chapters 4 and 7, but also include a result on how to choose input biases to gain integral action. One of the control block classes discussed Chapter 4 is feedforward control, and in Chapter 6 we discuss feedforward control under model uncertainty. In accordance with the sensitivity function defined for feedback control, we introduce feedforward sensitivities, and discuss how this can be used to determine the usefulness of a feedforward controller (or of a feedforward control block). Chapter 7 verifies some of the results from Chapters 4 and 5 through an experiment. We show that even if simulations indicate that a specific controller gives integral action, when applied to the actual process, steady-state offset is obtained. Chapter 8 sums up the conclusions from the thesis, and tries to propose some directions for further work. The thesis’ Appendixes A and B are “older” published versions of Chapters 4 (only a part) and 3, respectively. They are included since they contain material that has been removed from the chapters now included (Chapters 4 and 3). Appendix A contains an example where control has been applied (in Chapter 4 model predictive control (MPC) is used). Appendix B is more focused on the short-cut method for buffer tank design than Chapter 3, and contains some more details regarding this. Preliminary versions or parts of the following chapters have been or will be REFERENCES 5 presented at the following conferences, and versions nearly identical to the chapters have been either submitted to, accepted by or published in the following journals1 : Chapter 2: Adchem 2000, June 14-16, 2000, Pisa, Italy (preprints: 1, pp. 75-80) Preliminary accepted for publication in Computers and Chemical Engineering Chapter 3: Nordic Process Control Workshop 9, January 13-15, 2000, Lyngby, Denmark PSE’2000, 16-21 July, 2000, Keystone, Colorado, USA (Supplement to Computers and Chemical Engng., 24, pp.1395-1401) Ind. Eng. Chem. Res., 42, 10, pp. 2198-2208 Chapter 4: Nordic Process Control Workshop 8, August 23-25, 1998, Stockholm, Sweden European Control Conference, ECC’99, Aug. 31-Sept. 3, 1999, Karlsruhe, Germany Submitted to Journal of Process Control Chapter 5: Submitted to Modeling, Identification and Control, MIC Chapter 6: Nordic Process Control Workshop 11, January 9-11, 2003, Trondheim Accepted for presentation at European Control Conference, ECC’03, Sept. 1-4, 2003, Cambridge, UK Preliminary accepted for publication in European Journal of Control Chapter 7: Accepted for presentation (poster session) at AIChE, Annual Meeting, Nov. 2003, San Francisco, US References Balchen, J. G. (1968). Reguleringsteknikk Bind 1 (In Norweigan) 1. Ed.. Tapir. Trondheim, Norway. Lewin, D. R. and C. Scali (1988). Feedforward control in presence of uncertainty. Ind. Eng. Chem. Res. 27, 2323–2331. Scali, C., M. Hvala and D. R. Lewin (1989). Robustness issues in feedforward control.. ACC-89 pp. 577–581. Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Ziegler, J. G. and N. B. Nichols (1943). Process lags in automatic-control circuits. Trans. ASME 65, 433–444. 1 The difference between the chapters and their corresponding journal article is indicated on the front page of each chapter. Chapter 2 pH-Neutralization: Integrated Process and Control Design Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Preliminary accepted for publication in Computers and Chemical Engineering Extended version of a paper presented at Adchem 2000, June 14-16, 2000, Pisa, Italy, Preprints Vol. I, pp.75-80. also affiliated with Statoil ASA, TEK, Process Control, N-7005 Trondheim, Norway Author to whom all correspondence should be addressed. E-mail: [email protected], Tel.: +47 73 59 41 54, Fax.: +47 73 59 40 80 Extensions compared to paper to be published: Appendix A.3 8 Chapter 2. pH-Neutralization: Integrated Process and Control Design Abstract The paper addresses control related design issues for neutralization plants. Mainly for control reasons, the neutralization is usually performed in several steps (mixing tanks) with gradual change in the concentration. The aim is to give recommendations for issues like tank sizes and number of tanks. Assuming strong acids and bases, we derive linearized relationships from the disturbance variables (e.g. inlet concentration and flow rate) to the output (outlet concentration), including the scaled disturbance gain, . With local PI or PID control in each tank, we recommend to use identical tanks with total volume , where we give as a function of , the time delay in each tank , the flow rate , and the number of tanks . For , which is common in pH neutralization, this gives . Keywords: pH control, Process control, Processs design, PID control 2.1 Introduction 9 2.1 Introduction The pH-neutralization of acids or bases has significant industrial importance. The aim of the process is to change the pH in the inlet flow, the influent (disturbance, ), by addition of a reagent (manipulated variable, ) so that the outflow or effluent has a certain pH. This is illustrated in Figure 2.1 as a simple mixing, but normally it takes place in one or more tanks or basins, see Figure 2.3. Examples of areas where pH control processes are in extensive use are water treatment plants, many chemical processes, metal-finishing operations, production of pharmaceuticals and biological processes. In spite of this, there is little theoretical basis for designing such systems, and heuristic guidelines are used in most cases. Textbooks on pH control include (Shinskey, 1973) and (McMillan, 1984). General process control textbooks, such as (Shinskey, 1996; Balchen and Mummé, 1988), have sections on pH control. A critical review on design and control of neutralization processes that emphasizes chemical waste water treatment is given by Walsh (1993). Our starting point is that the tanks are installed primarily for dynamic and control purposes. In our paper process design methods using control theory are proposed. We focus on the neutralization of strong acids or bases, which usually is performed in several steps. The objective is to find methods to obtain the total required volume for a given number of tanks, and discuss whether they should be identical or not. Design of surge (buffer) tanks is generalized to other processes in Chapter 3. Clearly, the required tank size depends on the effectiveness of the control system, and especially with more than one tank, there are many possibilities with respect to instrumentation and control structure design. This is discussed in Chapter 4. Section 2.2 motivates the problem. Since time delays are important design limitations, Section 2.3 contains a discussion on delays. From the models presented in Section 2.4, in Section 2.5 we follow Skogestad (1996) and derive a simple formula for the required tank volume, denoted . In Section 2.6 the validity of the simple formula for is checked numerically, and improved rules for sizing are proposed. Whether equal tanks is best or not is discussed in Section 2.7. Discussions on measurement noise, feedforward control and the pH set-point to each tank are found in Section 2.8. The main conclusions are summarized in Section 2.9. 2.2 Motivating example We use a simple neutralization process to illustrate the ideas. 10 Chapter 2. pH-Neutralization: Integrated Process and Control Design Example 2.1 We want to neutralize of a strong acid (disturbance) of ( ) using a strong base (input) with to obtain a product of ( "!# %$ $ ""&'( ). We derive a model for the process in Section 2.4, and we find that it is convenient to work with the excess -concentration, ) *#+ (( ). In terms of this variable, the product specification is , , and the variation requirement .-'/ corresponds to a concentration deviation 0 21.354 "& 2 . We assume that the maximum expected disturbance is 0 1.354 , corresponding to a pH variation from 67 to 879: . We first try to simply mix the acid and base, as illustrated in Figure 2.1 (no tank). The outlet concentration is measured (or calculated from a pH measurement), and the base addition is adjusted by a feedback PI- controller assuming a time delay of in the feedback loop. A step disturbance in the inlet concentration of 2 , results in an immediate increase in the product of ; 7 (to pH 67=< ), since the total flow is half the acid flow. After a while the PI controller brings the pH back to , but for a period of about > the product is far outside its limits. This can be seen from the simulation in Figure 2.2 (solid line). This is clearly not acceptable, so, next, we install one mixing tank to dampen the disturbances. For a tank with residence time ? , the response is (for the case with no control): [email protected] B; 7 DC FE HGJI5KML (2.1) Now the pH of the product does not respond immediately, and provided ? is sufficiently large, the controller can counteract the disturbance before the pH has crossed its limit of N . Solving for [email protected] "& , we get @P <RQ8 S ? (2.2) For example, ? 8> gives @ <TQU HV , that is, for a tank with a residence time of 8> the pH goes outside its limits after 7=<W . However, no control system can respond this fast. With a time delay of (typical value), the feedback controller needs at least @ to counteract the disturbance, which gives a minimum required residence time of ? <XQM S B; 7 QY S . In practice, a larger tank is required, and in Figure 2.2 we also show the closed-loop response for the case with ? :ZQ% S (dashed line). With a flow rate of this corresponds to a tank size of :>>F>8,\[ . This is of course unrealistic, but in Section 2.5 we will see that the total tank size can be reduced considerably by adding several tanks in series as illustrated in Figure 2.3. 2.2 Motivating example 11 ∆cinfl,max= ±5 mol / l Base Acid q=5 l / s pHC pH - 1 pHI kd ~ 106 pH 7 ± 1 ∆cmax =±10-6 mol / l Figure 2.1: Neutralization of strong acid with strong base (no tank) 8 7 6 One tank with 5 residence time 8 × 107s pH 4 3 Pure mixing (no tank) 2 1 0 −1 0 100 200 300 400 500 Time [s] 600 700 800 900 1000 Figure 2.2: Mixing capacity is required to dampen the disturbance. Closed-loop responses in outlet pH to a step change in inlet acid concentration from to with time delay of in the PI-control loop. (Controller: PI with Ziegler-Nichols tuning.) ∆cinfl,max= Acid ±5 mol / l q=5 l / s Base pH - 1 pHC Base pHI pHC Base V1 pHI pHC pHI V2 V3 pH 7 ±1 kd ~ 106 ∆cmax =±10-6 mol / l Figure 2.3: Neutralization in three stages. 12 Chapter 2. pH-Neutralization: Integrated Process and Control Design 2.3 Time delays Time delays provide fundamental limitations on the achievable response time, and thereby directly influence the required volumes. The delays may result from transport delays or from approximations of higher order responses for mixing or reaction processes and from the instrumentation. For pH control processes, the delays arise from (1) Transport of species into and through the tank, in which the mixing delay is included ( ) (2) Transport of the solution to the measurement and approximation of measurement dynamics ( ) (3) Approximation of actuator and valve dynamics ( ) (4) Transport of the solution to the next tank ( G ) In this paper, we mainly consider local feedback control, and the total effective delay is the sum of the contributions from the process and instrumentation . If the influent (disturbance) and the reagent addition (manipulated variable) are placed close, they will have about the same delay , but for feedback control only the delay for manipulated variables matters. Both the volume and the mixing speed determine the mixing delay, which is the most important contribution to . If the volume is increased, one would also usually increase the mixing speed, and these two effects are opposing. Walsh S . Since the (1993) carried out calculations for one mixer type and found exponent of 7 is close to zero he concludes that is constant (typically about ), independent of the tank size. On the other hand, Shinskey (1973, 1996) assumes that the overall delay is proportional to the tank volume (this is not stated explicitly, but he assumes that the ultimate or natural period of oscillation, which here is < , varies proportionally with the volume). In this paper, we follow Walsh and assume that the overall effective delay is in each tank. 2.4 Model The model is derived in Appendix A. pH-control involving strong acids and bases is usually considered as a strongly “nonlinear” process. However, if we look at the underlying model written in terms of the excess concentration *#,+ : >@ 3 3 (2.3) 2.4 Model 13 qinfl cinfl qreag creag V, c pHc c, q Figure 2.4: Neutralization tank with pH control. then we find that it is linear in composition (the overall model is bilinear due to the product of flow rate ( ) and concentration ( )). The fact that the excess concentration will vary over many orders of magnitude (e.g. we want #$ "& $ : , whereas 2 for a strong acid with ), shows to have N $ the strong sensitivity of the process to disturbances (with ; see below), but has nothing to do with non-linearity in a mathematical sense. In Appendix A we have derived a Laplace transformed, linearized, and scaled model for the process illustrated in Figure 2.4: (2.4) 0 2 1.354 is a scaled value of the effluent excess concentration, 0 3 3 1.354 is a scaled value of the reagent flow rate, and 0 1.354 0 1.354 0 3 3 1.354 0 3 3 1.354 is a disturbance vec denote the maximum tolerated ( ), possible ( ) or extor. The subscripts where pected ( ) variation; see also Table 2.1. Note that we have included a reagent flow rate, 3 , as a disturbance, since it may also have uncontrolled variations due to e.g. inaccuracies in the valve or upstream pressure variations. is the transfer function from the control input, and a vector of transfer functions from the disturbances. Normally it is convenient to consider the effect of one disturbance at a time, so from now on we consider as a scalar and as a (scalar) transfer function. The reason for the scaling is to make it easier to state criteria for sufficient dampening, and we scale the model so that the output, control input and the expected disturbances all shall lie between -1 and 1. For a single tank the transfer functions and are represented as E ? where ? is the nominal residence time in the tank (? ? E (2.5) where is the 14 Chapter 2. pH-Neutralization: Integrated Process and Control Design nominal volume and the total flow rate), and is effective time delay, due to mixing, measurement and valve dynamics (see Section 2.3). In Appendix A.2 we derive a linear model for a series of tanks. Neglecting reagent disturbances (except in the first tank) and changes in outlet flow-rates of each tank, we obtain for any disturbance entering in the first tank, K E where ? is the total residence time . is the total volume and flow rate through the tanks, and we here assume 7277 . (2.6) is the With the above-mentioned scalings, the gain from the control input is (Appendix A.1) 3 3 M 1.354 (2.7) 1.354 while for various disturbances is given in Table 2.1. We will assume that (typically is 8[ or larger for pH systems). Table 2.1: Steady-state gain for different disturbances. Superscript denotes nominal values, and subscript denotes maximum tolerated ( 1.354 ) or expected (the other variables) variation. 3 1.354 is maximal expected uncontrolled variation in reagent flow. Influent Reagent Concentration disturbance !# " $ ! " 3 ! &(" ' *) &(' * ) + ! " Flow disturbance 2 ! 3 ! " " ! % ! " &(" ' *) " ! &(' *# ) ,+ ! " Example 2.1 (continued from page 9): We consider the influent disturbances. Nominally, 7 (acid flow rate is half the total flow rate), 1.354 "& , , and - 1.354 2 (maximum inlet concentration variation). This gives +/. QM 7 B; 7 10 & (as found earlier). Furthermore, 1.3542 7 Q2 7 (maximum variation in acid flow rate is 2 ) so 2 ! +/ . 7 QM 7 B; 7 Q & . 2.5 A simple formula for the volume and number of tanks The motivating example in Section 2.2 showed that the control system is able to reject disturbances at low frequencies (including at steady state), but we need design modifications to take care of high-frequency variations. Based on (Skogestad, 1996) a method for tank design using this basic understanding is presented. 2.5 A simple formula for the volume and number of tanks 15 The basic control structure is local control in each tank, as illustrated in Figure 2.3 (flow sheet) and Figure 2.5 (block diagram). We assume no reference 777 ), and the closed-loop response of each tank then changes ( becomes (2.8) where , and for , . is the sensitivity function for tank . Combining this into one transfer function from the external disturbance to the final output leads to where SISO systems. . The factorization of d r1 - (2.9) (2.10) is possible since the tanks are Gd1 K1 y1 G1 r2 Gd2 K2 - y2 G2 r3 - K3 Gd3 y3 G3 Figure 2.5: Block diagram corresponding to Figure 2.3 with local control in each tank. We assume that the variables ( and ) have been scaled such that for disturbance rejection the performance requirement is to have for all at all frequencies, or equivalently (2.11) 16 Chapter 2. pH-Neutralization: Integrated Process and Control Design Combining (2.11) and the scaled model of in (2.6) yields an expression for the required total volume with equal tanks: I (2.12) Assuming I (since and the design is most critical at frequencies where is close to 1) this may be simplified to I I (2.13) We see that enters into the expression in the power of . This is because is of the same order as . This gives the important insight that a “resonance” peak in due to several tanks in series, will not be an important issue. Specifi- cally if the tanks are identical and the controllers are tuned equally, the expression is (2.14) I where is the sensitivity function for each locally controlled tank. This condition must be satisfied at any frequency and in particular at the bandwidth frequency . This gives the , here defined as the lowest frequency for which minimum requirement (Skogestad, 1996) Since I (2.15) decreases as increases, this volume guarantees that (2.16) In words, the tank must dampen the disturbances at high frequencies where control is not effective. With only feedback control, the bandwidth (up to which feedback control is effective), is limited by the delay, , and from (Skogestad and Postlethwaite, 1996, p.174) we have (the exact value depends on the controller tuning), which gives (2.17) where (Skogestad, 1996) I is a “reference value” we will compare with throughout the paper. For we have P I (2.18) , (2.19) 2.5 A simple formula for the volume and number of tanks 17 (2.19) gives the important insight that the required volume in each tank, , is proportional to the total flow rate, , the time delay in each tank, , and the disturbance gain raised to the power . Table 2.2 gives as a function of for Example 2.1. With one tank the size of a supertanker ( ;> >8> [ ) is required (as we got in the motivating example). The minimum total volume is obtained with 18 tanks (Skogestad, 1996), but the reduction in size levels off at about 3-4 tanks, and taking cost into account one would probably choose 3 or 4 tanks. For example, Walsh (1993) found the following formula for the capital cost in of a stirred tank reactor B; >8> ; 8> S From this we obtain the following total cost for :> , > , , ; , i.e. lowest cost is for three tanks. Table 2.2: Total tank volume, . from (2.18). Data: Number of tanks, 1 2 3 4 5 (2.20) 777 [ in , Total volume [ ;> 8>> N < 7 7 7 8> : ; 8> [ & , and ] Remark 1 Conditions (2.15) and (2.17) are derived for a particular frequency and other frequencies may be worse. However, we will see that is “flat” around the frequency if the controller tuning is not too aggressive, and is close to the worst frequency in many cases. Remark 2 In (2.6) we neglected the variation in the outlet flow rate from each tank. The outlet flow rate is determined by the level controller (see (2.59) and (2.60)). With more than one tank and a different pH in each tank, a feed flow rate variation (disturbance) into the first tank will give a parallel effect in the downstream concentration variations since both the inlet flow rate and inlet concentration will vary. Also, variations in the reactant flow rate will influence the level and thereby outlet flow rate. Perfect level control is worst since then outlet flow rate equals inlet flow rate. With averaging level control (surge tank), the outlet flow variations are dampened, but extra volume is required also for this, which is not taken into account in the analysis presented in this paper. 18 Chapter 2. pH-Neutralization: Integrated Process and Control Design 2.6 Validation of the simple formula: Improved sizing In (2.18) we followed Skogestad (1996) and derived the approximate value for the total volume. This is a lower bound on due to the following two errors: (E1) The assumed bandwidth (e.g. PI or PID). (E2) The maximum of is too high if we use standard controllers occurs at another frequency than . In this section we compute numerically the necessary volume when these two errors are removed. We assume first sinusoidal disturbances, and later step changes. Each tank (labeled ) is assumed to be controlled with a PI or PID con troller with gain , integral time ? and for PID derivative time ? : O? ? O? 7J ? (2.21) (cascade form of the PID controller). We consider four different controller tuningrules for PI and PID controllers: Ziegler-Nichols, IMC, SIMC and optimal tuning. For the case with Ziegler-Nichols, IMC or SIMC tunings the controller parameters are fully determined by the process parameters , ? and , and an optimization problem for finding the minimum required tank volumes may be formulated as: (2.22) subject to is stable (2.23) (2.24) To get a finite number of constraints, we define a vector containing a number of frequencies covering the relevant frequency range (from [ to 8[ ). It is assumed that if the constraints are fulfilled for the frequencies in , they are fulfilled for all frequencies. The stability requirement is that the real part of the poles of are negative. The poles are calculated using a 3rd order Padé approximation for the time delays in , but this is not critical since the stability constraint is never active at the optimum. Ziegler and Nichols (1942) tunings are based on the ultimate gain and ultimate period . For our process the resulting PI controller has gain 2.6 Validation of the simple formula: Improved sizing 7< 19 P 7 ?# and integral time ? >7 ;DP 7 . The corresponding “ideal” PID tunings are: 7 N P 7 < ?' , ? >; ; and ? 7 < Y?# and ? ? : 7 , which correspond to >;P for our cascade controller. The IMC-tunings derived by Rivera et al. (1986) have a single tuning parameter , which we select according to the recommendations for a first order process with delay as >7 for PI control and 7 : for PID control. We get a PI controller with gain 7 > : ?' and integral time ? ? . For the cascade form IMC-PID controller, we get 7 >M?# , ? ? and ? 7 . However, the IMC tuning is for set-point tracking, and for “slow processes” with ? this gives a very slow settling for disturbances. Skogestad (2003) therefore suggests to use ? A? : , which for our process gives ? : . The controller gain is 7 Y?# . We denote this tuning SIMC PI. For a SIMC-PID controller (on cascade form), the gain and integral time are left unchanged, and we have chosen to set the derivative time ? to 7 . For optimal tunings, the controller parameters are optimized simultaneously with the volumes: K K (2.25) subject to is stable 777 (2.26) (2.27) (2.28) To assure a robust tuning, a limit, 1.354 ; , is put on the peak of the gain of the individual sensitivity functions . (For PID control we also let ? 7727 ? vary in the optimization.) In the following we apply this numerical approach to the process in Example 2.1. For multiple tanks in series, is distributed equally between the tanks, so that for tank we get I . The results for the four different controllers (ZN, IMC, SIMC and optimal) are given in Table 2.3 for PI control and in Table 2.4 for PID control. The optimal controller PI-tunings (last column in Table 2.3) give a large in tegral time, so that we in effect have obtained P-control with >Y? equal to 7 N (one tank), 7 and 7 8N (two tanks), 7 : and twice 7 (three tanks) and 7 and three times 7 (four tanks). The optimal PID-tuning (last column in Table 2.4) also gave a large integral time (PD control) with 7 : ?' and derivate time ? 7 < for all tanks. 20 Chapter 2. pH-Neutralization: Integrated Process and Control Design on From Tables 2.3 and 2.4 we find that the “correction factor”, (2.29) is in the range >7 ; to 7 ; . The correction factor is independent of the number of tanks in most cases, which is plausible since the combination of (2.14) and (2.19) gives (2.30) where is close to independent of the number of tanks involved. To see this, insert the tuning rules into the controller transfer function and calculate . For the IMC tuning depends only on , so that when it is scaled with it will independent of the process parameters. for ZN and SIMC depends on ? , but only for low frequencies (when ? is small compared to ). For up to three tanks, only depends on at the relevant frequencies. Recall, however, that this analysis is not exact since (2.30) is an approximation. Frequency-plots for 3 tanks with PI control are given in Figure 2.6. In all four cases the bandwidth is lower that (error E1). is the worst frequency, with exception of the Ziegler-Nichols tunings (which due to the high peak in give error E2). The optimal controller makes constant for a wide frequency range. Table 2.3: PI controllers: Volume requirements obtained from (2.22) (for Ziegler Nichols, IMC, SIMC) and from (2.25) (optimal tuning). (Data: & , ) n 1 2 3 4 79 N 97 N 97 < 7 ZN ; < >7 : >7 : >7 : >7 : IMC 5; < SIMC 7=< =7 < =7 < =7 < ; : ; : 5; ; N ; ; < Optimized 87 : 87 > 87 87 N : ; < Table 2.4: PID controllers: Volume requirements obtained from (2.22) (for Ziegler Nichols, IMC, SIMC) and from (2.25) (optimal tuning). (Data: & , ) n 1 2 3 4 ZN ; 7 ; 7 ; 7; ; 7 ;8 IMC 5 ; < >7 >7 >7 ; >7 ; : SIMC 5; < ; 7J ; 7J ; 7J< ; 7J Optimized ; < >7 ;8; >7 ;8; >7 ; >79 5 ; < 2.6 Validation of the simple formula: Improved sizing 21 Gd Gd Si Si 1/θ θ 0 Magnitude Magnitude 0 10 ωB 10 ωB 1/θ θ SGd SGd −1 10 −1 −2 −1 10 10 0 10 10 −2 −1 10 (a) ZN settings Gd Si 1Si 0 Magnitude Magnitude 2Si’s Gd 0 1/θ θ 10 ωB 1/θ θ SGd SGd −1 10 10 (b) IMC settings 10 ωB 0 10 Frequency [rad/s] Frequency [rad/s] −1 −2 10 −1 10 Frequency [rad/s] (c) SIMC settings 0 10 10 −2 10 −1 10 0 10 Frequency [rad/s] (d) Optimal PI settings Figure 2.6: Frequency-magnitude-plots corresponding to results for PI-control of 3 tanks in Table 2.3 Chapter 2. pH-Neutralization: Integrated Process and Control Design 22 Next consider in Figure 2.7(a) the response to a step disturbance in inlet concentration ( ) for the different controller tunings and tank volumes for the case with three tanks in series. As stated before, the optimal PI controller is actually a P controller, and the controller with IMC tuning also has a “slow” integral action and this is observed by the slow settling. We see that for the other two tunings, and especially for the Ziegler-Nichols tuning, the frequency domain result is conservative when considering the step response. This is because the peak in is sharp so that exceeds 1 only for a relatively narrow frequency range, and this peak has only a moderate effect on the step response. This means that we can reduce the required tank volume if step disturbances are the main concern. For the step response, we find that a total tank size of >7 keeps the output within for PI controllers tuned both with Ziegler-Nichols and SIMC. For PID control we find that >7 and >7 N are necessary for these two tuning rules (1-4 tanks). In conclusion, for PI control we recommend to select tanks with size P ; , whereas with PID control )P >7 N is sufficient. These recommendations are confirmed in Figure 2.7(b) where we use ; , and we see that after a unit disturbance step the output is within . 1.2 1.2 Optimal controller Vtot= 1.73V 0 1 1 0.8 IMC 0.8 0.6 0.6 0.4 IMC Vtot= 1.81V 0 0.4 0 Ziegler−Nichols Vtot= 3.14V 0 0.2 SIMC 0.2 −0.2 0 −0.4 −0.2 −0.6 SIMC Vtot= 2.46V 0 −0.4 0 50 100 150 200 250 Time [s] 300 Ziegler−Nichols −0.8 350 400 450 (a) Volumes and tunings from Table 2.3 500 0 50 100 150 200 250 Time [s] 300 (b) Equal tanks with ) Figure 2.7: Response to step disturbance in 350 400 450 500 ( for 3 tanks using PI-control. Remark 1 We have specified that in each tank ; , where is the (open loop) disturbance gain in each tank, but the results are independent of this choice, since the controller gains are adjusted relative to the inverse of . 2.7 Equal or different tanks? 23 Remark 2 The sensitivity functions, , are independent of the pH set-points in each tank (see Remark 1). is determined by its time constants and delays, which are independent of the pH-values, and its steady state overall gain, . is defined by the inlet and outlet pH. The fundamental requirement (2.11), and thereby the results of this and the previous section, are therefore independent of the pH set-points in intermediate tanks. 2.7 Equal or different tanks? In all the above optimizations (Tables 2.3 and 2.4) we allowed for different tank sizes, but in all cases we found that equal tanks were optimal. This is partly because we assumed a constant delay of 10 seconds in each tank, independent of tank size. This confirms the findings of Walsh (1993) who carried out calculations showing that equal tanks is cost optimal with fixed delay. We present here a derivation that confirms this. We assume that the cost of a tank of volume is proportional to where is a scaling factor. To minimize the total cost we then must minimize QQQ (2.31) which provided the flow rate through all tanks are equal (which is true for example if most of the reagent is added into the first tank) is equivalent to O ? K K ? QQQ ? (2.32) This cost optimization is constrained by the demand for disturbance rejection (2.11). The expression for for arbitrary sized tanks is: E O? QQQ A? (2.33) Combining (2.33) with the inequality (2.11) yields C O ? L QQQ C A ? L (2.34) which constraints the optimization in (2.32). We assume again that the peak in occurs at the frequency where . (2.34) then simplifies to C O ? L QQQ C O ? L (2.35) and it can easily be proved (e.g. using Lagrange multipliers, see Appendix C) that equal tanks minimizes cost. 24 Chapter 2. pH-Neutralization: Integrated Process and Control Design This result contradicts Shinskey (1973, 1996) who assumed that the delay varies proportionally with the volume, and found that the first tank should be about one fourth of the second. McMillan (1984) also claims that the tanks should have different volume. Let us check this numerically. We assume a minimum fixed delay of and let our previous . To get consistency with results with constant delay of , we let for , where is the total volume required with constant delay (see the final column of Table 2.3). The results of the optimization with PI control are presented in Table 2.5. We see that in this case it is indeed optimal with different sizes, with a ratio of about 1.5 between largest and smallest tank. However, if we with the same expression for , require equal tanks and equal controller tunings in each tank, the incremental volume is only 14% or less for up to 4 tanks (see the last column in Table 2.5). Table 2.5: Optimal PI design with volume dependent delay: n 2 3 4 Volume each tank 217, 326 18.4, 18.4, 30.7 5.36, 5.36, 5.36, 9.14 544 67.6 25.2 Volume ratio 1.50 1.67 1.71 . increase with equal tanks +4% +9% +14% With a smaller fixed part in , the differences in size are larger. For example with a fixed delay of only we get a optimal ratio of up to 7 (for 3 tanks). However, if we allow for PID-controllers the ratio is only >7 . These numerical results seem to indicate that our proof in (2.35), which allows for different delays in each tank, is wrong. In the proof we assumed that at the frequency where has its peak. This will hold for a complex controller, where due to the constraint (2.26) we expect to remain flat over a large frequency region, but not necessarily for a simple controller, like PI. The frequency plots for the resulting PI-controllers in Table 2.5 confirm this. In conclusion, it is optimal, in terms of minimizing cost, to have identical tanks with identical controllers, provided there are no restrictions on the controller. With PI-control, there may be a small benefit in having different volumes, but this benefit is most likely too small to offset the practical advantages of having identical units. This agrees with the observations of Proudfoot (1983) from 6 neutralization plants with two or three tank in series. In all cases equal tanks had been chosen. 2.8 Discussion 25 2.8 Discussion 2.8.1 Measurement noise and errors In this paper, we have focused on the effect of disturbances. Another source of control errors is errors and noise in the measurements. Normally the accuracy of pH instruments is considerable better than the requirement for the pH variation, which we as an example has given as pH units in the present paper. However, due to impurities, the measured value may drift during operation. In one of Norsk Hydro’s fertilizer plants, the probes are cleaned and recalibrated once a week, and during this period, the pH measurement may drift up to 1 pH unit. This drifting is, however, very slow compared to the process, and will not influence the dynamic results from this paper, except that the controller cannot make the pH more correct than its measurement. The worst error type is steady-state offset in the measurement of the product. This can lead to a product outside its specifications, and can only be avoided by regular calibration (possibly helped by data reconciliation). Measurement errors in upstream tanks may lead to disturbances at later stages, since the controller using this measurement will compensate for what it believe to be a change in the concentration. Such errors can be handled at later stages. To study the effects of measurement errors in the setting of this paper, one must convert the expected errors in the pH measurement to a corresponding error in the scaled concentration variable, . Tools for such conversion is provided in Appendix B. Often the error in becomes larger than the pH error (as seen in the example of Appendix B). The conclusion is that small and slowly appearing measurement errors do not cause problems, provided frequent maintenance is performed, whereas higher frequency variation with amplitude close to allowed pH variation must be converted into variation in and treated as disturbances. 2.8.2 Feedforward elements In this section, we discuss the implications for the tank size of introducing feedforward control. Feedforward from an influent pH measurement is difficult since an accurate transition from pH to concentration is needed. An indication of this is that Shinskey removed the section “Feedforward control of pH” in his fourth edition (compare (Shinskey, 1988) with (Shinskey, 1996)). Feedforward from the influent flow rate is easier, and McMillan (1984) states that one tank may be saved with effective feedforward from influent flow rate and pH. Skogestad (1996) show for an example with three tanks that use of a feedforward controller that reduced the disturbance by 80%, reduced the required total Chapter 2. pH-Neutralization: Integrated Process and Control Design 26 volume from <>7 to ; 7 : [ . Previous work has considered feedforward from external disturbances. We will in the following analyze the situation with tanks in series and “feedforward” to downstream tanks from upstream measurements. In this way, no extra measurements are required. As is discussed in Chapter 4, a multivariable controller may give this kind of feedforward action. We assume no feedforward to the first tank, and assume that the feedforward controllers reduce the disturbance to each of the next tanks by a factor of , 7727 (where hopefully $ ). The effective gain from an inlet disturbance to the concentration in the last tank then becomes (2.36) To calculate the required volumes for this case, we insert (2.36) into (2.18), and get If Q QQ I (2.37) , (2.19) and (2.37) yield: P + (2.38) For example, if each feedforward effect reduces the disturbance by :>2 ( 7 ; ), we get ( tank), 7 < ( ; tanks), etc.; see Table 2.6 for more details. Table 2.6: The volume requirement with feedforward from each tank to next assuming that the feedforward reduces the disturbance by ( ) and with perfect feedforward control ( ). is given by (2.17). No. of tanks < ; :>2 reduction Perfect feedforward control 7=< 7 < 7 7 ;> 7; ; < To have perfect feedforward from one tank to another one need, in addition to a perfect model, an invertible process. With a delay in the measurement or a larger delay for the control input than for the disturbance this is not possible. Feedforward and multivariable controllers may actually benefit from transportation delay as will be illustrated in the following example. 2.8 Discussion 27 Example 2.2 We have three tanks with (at least) measurement of pH in tank 1 and reagent addition in at least tank 3. The transport delay is in each tank, and the measurement delay is also (or less). If an upset occurs in tank 1 at time , the upset reaches tank 2 at time and tank 3 at . It is “discovered” in the measurement in tank 1 at time or before (the sum of the transport delay and the measurement delay). With a multivariable controller or a feedforward controller from tank 1 to 3, action can be taken in tank 3 at the same time the upset reaches the tank. For control of tank 2, however, the measurement in tank 1 will show the upset too late. The example is illustrated in Figure 2.8. Inlet tank 1 Outlet tank 1 Measured tank 1 Inlet tank 2 Outlet tank 2/ Inlet tank 3 0s 5s 10s Figure 2.8: With three tanks in series, an upset entering tank 1 reaches tank 3 at the same time the upset is seen in the measurement of tank 1. We assume the measurement and transport delays are equal. From the feedback analysis in the previous sections, the smaller the total time delay the better. Example 2.2 shows, however, that if feedforward or multivariable control is used, one may benefit from a transport delay in intermediate tanks that is not shorter than the measurement delays. One should always seek to minimize the measurement delay. 2.8.3 pH set-points in each tank We have already noted that the analysis in the previous sections is independent of the pH set-point in each tank (Remark 2, Section 2.6). Here we discuss some issues concerning the set-points or equivalently the distribution of reagent addition between the tanks. For some processes e.g. in fertilizer plants, the pH in intermediate tanks is important to prevent undesired reactions. Such requirements given by the chemistry of the process stream shall be considered first. Next, instead of adjusting the set-points directly, one may use the set-points in upstream tanks to slowly adjust the valves in downstream tanks to ideal resting 28 Chapter 2. pH-Neutralization: Integrated Process and Control Design positions. But also in this case, one must have an idea of the pH levels in the tanks when designing the valves. Whenever possible, we prefer to add only one kind of reagent, for example only base, to save equipment (see Figure 2.3). To be able to adjust the pH in both directions as we have assumed, one then needs a certain nominal flow of reagent in each tank. This implies that the pH nominally needs to be different in each tank. On the other hand, equal set-points in each tank minimizes the effect of flow rate variations. In addition, more reagent is added early in the process, so that reagent disturbances enter early. One common solution is to distribute the pH set-points so that the disturbance gain is equal in each tank. In this way one may keep the pH within where is the same in each tank. In conclusion, it is preferable to choose the set points as close as possible, but such that we never get negative reagent flow. 2.9 Conclusions Buffer and surge tanks are primarily installed to smoothen disturbances that cannot be handled by the control system. With this as basis, control theory has been used to find the required number of tanks and tank volumes. We recommend identical tank sizes with a total volume of ; where is given in (2.18) as a function of the overall disturbance gain, , time delay in each tank, the flow rate and number of tanks . The disturbance gain can be computed from Table 2.1. Typically, the mixing and measurement delay is about or larger. 2.10 Acknowledgements Financial support from the Research Council of Norway (NFR) and the first author’s previous employer Norsk Hydro ASA is gratefully acknowledged. References Balchen, J. G. and K. I. Mummé (1988). Process Control. Structures and Applications. Van Nostrand Reinhold. New York. McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. REFERENCES 29 Proudfoot, C. G. (1983). Industrial Implementation of On-Line Computer Control of pH. PhD thesis. Univ. of Oxford, UK. Rivera, D. E., M. Morari and S. Skogestad (1986). Internal model control. 4. PID controller design. Chem. Engn. 25, 252–265. Shinskey, F. G. (1973). pH and pIon Control in Process and Waste Streams. John Wiley & Sons. New York. Shinskey, F. G. (1988). Process Control Systems - Application, Design, and Tuning, 3rd Ed.. McGraw-Hill Inc.. New York. Shinskey, F. G. (1996). Process Control Systems - Application, Design, and Tuning, 4th Ed.. McGraw-Hill Inc., New York. Skogestad, S. (1996). A procedure for SISO controllability analysis - with application to design of pH neutralization processes. Computers Chem. Engng. 20(4), 373–386. Skogestad, S. (2003). Simple analytic rules for model reduction and PID controller tuning. J. Proc. Contr. 13(4), 291–309. Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Walsh, S. (1993). Integrated Design of Chemical Waste Water Treatment Systems. PhD thesis. Imperial College, UK. Ziegler, J. G. and N. B. Nichols (1942). Optimum settings for automatic controllers. Trans. ASME 64, 759–768. Chapter 2. pH-Neutralization: Integrated Process and Control Design 30 Appendix A Modelling A.1 Single tank We first consider one single tank with volume , see Figure 2.4. Let ( ) concentradenote the concentration of -ions, *#,+ ( ) denote the tion, and denote flow rate. Let further subscript denote influent, subscript denote reagent and no subscript denote the outlet stream. Material balances yield: for and ) @ ) 3 3 ) (2.39) *#,+ * + * + 3 3 *#+ >@ ( . ) is the rate of the reaction (2.40) . For strong, where i.e. completely dissociated, acids and bases this is the only reaction in which participate, since the ionization reaction already has taken place (for and weak acids and bases, also the ionization reaction must be included in the model). can be eliminated from the equations by taking the difference. In this way we get a model for the excess of acid, i.e. the difference between the concentration of ions (Skogestad, 1996): and ) * + (2.41) The component balance is then given by >@ (2.42) 3 3 Making use of the total material balance ( > @ 3 ) the component balance simplifies to 3 3 >@ (2.43) Linearization of (2.43) around a steady-state nominal point (denoted with an asterisk) and Laplace transformation yields: " " !+ " ! " ! &(" ' *) ! " 3 " $ ! " " &" ' *) ! " " 3 (2.44) where 3 (steady-state mass balance) and the Laplace variables , , , 3 , and 3 now denotes deviations from their nominal point. Note that the dynamics of have no effect on the linearized quality response. Appendix A Modelling 31 The nominal excess acid concentration are found from the nominal C V L values: (2.45) The composition balance is used to obtain the nominal reagent flow rate. The reagent flow rate, 3 , may be divided into 3 which is determined by the controller, and a disturbance term, 3 , which is due to leakages and other uncertainties in the dosing equipment. Thus 3 3 3 . We introduce scaled variables, where subscript denotes maximum allowed or expected variation: 1. 354 (2.46) 1.354 2 ! 2 1. 354 (2.47) (2.48) 3 33 1.354 3 ! 33 1. 354 3 (2.49) 3 M 1.354 Thus , 2 , ! , 3 , 3 ! and all shall stay within . We obtain 1.354 2 1.354 ! 1.354 1.354 ! " 3 1.354 3 3 3 3 1.354 3 ! (2.50) 1.354 1.354 3 3 1.354 1.354 The scaling factor 1.354 is found from the given allowed variation in pH ( ): 1. 354 C V L (2.51) 1.354 C V L (2.52) 1.354 C 1. 354 1.354 L (2.53) " If we consider one disturbance at a time, the model is on the form where ble 2.1. ? &(" ' * ) " ! &(' * )+ ! " and ? (2.54) (2.55) for different disturbances are given by Ta- Chapter 2. pH-Neutralization: Integrated Process and Control Design 32 A.2 Linear model for multiple tank in series We will now extend the model to include tank in series, and label the tanks 777 . For the first tank we get the same expression as for the single tank (2.50) (except for the labeling): 1.354 2 1.354 ! / 1.354 1.354 3 1.354 3 3 3 3 1.354 3 ! / 1.354 1.354 / " ! " 3 / 1.354 (2.56) 3 1.354 For the following tanks, the inflow is equal to the outflow from previous tank, so that 1.354 1.354 1.354 !+ " 3 1.354 3 3 3 3 1.354 3 ! 1.354 1.354 3 3 1.354 1.354 " (2.57) is the deviation from nominal value for the flow rate from previous tank and is determined by the level controller in previous tank, . For tank , the outlet flow rate becomes (2.58) where is the variation in the volume set-point. We assume that and express as a function of the total inlet flow: 3 ! 3 If a P controller is used, we get where , (2.59) is the controller gain, and (2.60) Appendix A Modelling 33 F? A? , where Alternatively a PI-controller can be used, is controller gain, and ? is the integration time, but if ? , we may ignore the integral effect in the model. Often we may assume that the level controller is very slow, which leads to WP (recall that denotes the deviation from the nominal value). With the additional simplification that the disturbances from the reagent can be neglected, we get the following model for tanks: 1 .. . where ? (2.61) ? 7727 (2.62) From (2.61) and (2.62) we get for the scaled output of the last tank ? ? ? (2.63) (2.64) In the present paper we use (2.63) and (2.64) to represent the tanks. A.3 Non-linear model for multiple tank in series We label the tanks with and get by using (2.43): / 3 3 >@ / 3 3 >@ (2.65) .. . 3 3 >@ 34 Chapter 2. pH-Neutralization: Integrated Process and Control Design The dynamic behaviour of the volumes are given by the mass balances: @ 3 . @ 3 (2.66) .. 3 >@ The flow rates from each tank, , are given by the flow controllers (2.59). As in the linear case, 3 may be divided into a manipulable part and a disturbance. A.4 Representation of delays In section 2.3 we discuss the delays the are present in this process. In the linearized transfer function model the total delay, , may be represented by the term E (2.67) For models of multiple tanks in series, the different type of delay must be considered differently. Figure 2.9 illustrates this. The total delay in the control loop d Delay θp Delay θn u Delay θm Delay θv Figure 2.9: The delays in a neutralization process is % (2.68) whereas the total delay related to the transportation and mixing through a tank and to the next is 3 (2.69) G 2.10 Appendix B The effect of pH measurement errors on the scaled... 35 Appendix B The effect of pH measurement errors on the scaled excess concentration, In a real plant we measure the pH, and not the scaled excess concentration variable, , that we have used in this paper. The pH measurement must be transformed into if the controller shall use and not the pH value. In this appendix we study the effect of errors and noise in the pH measurement on the scaled excess variable . The scaling in this paper is chosen in such a way that as long as we are sure that the variation in actual pH value, , around a nominal pH value, , is less than 1 pH units: (2.70) However, the implication does in general not go in the opposite direction. concentration is *# + , or expressed by the correThe excess sponding pH value: V (2.71) We denote the actual pH for , and the measurement error for 0 . Then, what we measure is F0 . The corresponding error in the excess acid concentration is 0 0 (2.72) From (2.70) we obtain for the scaled variable, : 1.354 (2.73) where corresponds to . Provided the acceptable pH variation is the maximum accepted value for the excess concentration is 1.354 0 , (2.74) : (2.73) and (2.74) yield for the error in the scaled variable, 0 " " " " (2.75) Chapter 2. pH-Neutralization: Integrated Process and Control Design 36 (2.75) can be used to find 0 corresponding to a pH measurement error or noise of 0 . We will now consider some special cases. As in the paper, we specify , and let the actual value equal the nominal value. We consider first F $ . Then 0 0 For L " C L V C 67 Q " >Q V " " (2.76) we obtain 0 " " C " L H C L " V Q " 7 Q V " L 7 (since then " V " ) For X$ N we get 0 P C L 7 (since then V " and for : we get 0 P C " ). This yields the following simple formula (when ): Y 0 $ N F : (2.77) 7 0 Example 2.3 We have made a model of a neutralization process (as described in Appendix A) and have chosen and . The pH measurement may have a measurement noise of 7 pH units, and we want to determine the corresponding noise in the scaled concentration variable . We consider an actual pH value equal to- the nominal, and since $ N , we can use 7 7J< . (2.77): 0 1.354 Appendix C On the optimization problem (2.32) subject to (2.35) 37 Appendix C On the optimization problem (2.32) subject to (2.35) Here we prove that the solution to O ? K K C O ? QQQ subject to ? L QQQ C O ? ? L (2.78) is to have ? ? QQQ ? . The solution will not be at an interior point so we take the limiting of the constraint. We introduce ? , and get the following optimization problem with the same solution as the original: subject to QQQ C L (2.79) The Lagrange function, , for this problem is, denoting the Lagrange multiplier : QQQ C L and in the constrained optimum we have ; This implies, using the constraint, that C L 7277 (2.80) (2.81) ; 7727 (2.82) In equation (2.82), , and are independent of the index , and the value of is therefore the same for all ’s. So QQQ , which implies that Q Q Q ? ? ? . Chapter 3 Buffer Tank Design for Acceptable Control Performance Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Ind. Eng. Chem. Res. 2003 42(10),2198-2208 Abstract This paper provides a systematic approach for the design of buffer tanks. We consider mainly the case where the objective of the buffer tank is to dampen (“average out”) the fast (i.e., highfrequency) disturbances, which cannot be handled by the feedback control system. We consider separately design procedures for (I) mixing tanks to dampen quality disturbances and (II) surge tanks with averaging level control to handle flow-rate disturbances. also affiliated with Norsk Hydro ASA, Corporate Research Centre, N-3907 Porsgrunn, Norway, E-mail: [email protected], Tel.: +47 35 92 40 21, Fax.: +47 35 92 32 63 Author to whom all correspondence should be addressed. E-mail: [email protected], Tel.: +47 73 59 41 54, Fax.: +47 73 59 40 80 Extensions compared to published paper: Section “Further discussion” and Appendices A-C Chapter 3. Buffer Tank Design for Acceptable Control Performance 40 3.1 Introduction Buffer tanks are common in industry, under many different names, such as intermediate storage vessels, holdup tanks, surge drums, accumulators, inventories, mixing tanks, continuous stirred tank reactors (CSTRs), and neutralization vessels. We start with a definition: A buffer tank is a unit where the holdup (volume) is exploited to provide smoother operation. We here focus on buffer tanks for liquids, although most of the results may be easily extended to gas- or solid-phase systems. Buffer tanks may be divided into two categories, namely, for (A) disturbance attenuation and (B) independent operation: A. Buffer tanks are installed between units to avoid propagation of disturbances for continuous processes. B. Buffer tanks are installed between units to allow independent operation, for example during a temporary shutdown and between continuous and batch process units. In this category there is a continuous delivery or outdraw on one side and a discontinuous delivery or outdraw on the other side. The design of the tank size for these types of buffer tanks is often fairly straightforward (typically equal to the batch volume) and is not covered further in this paper. LC Quality Flow rate (I) Averaging by mixing (mixing tank) (II) Averaging level control (surge tank) Figure 3.1: Two types of buffer tanks In this paper we focus on category A. There are two fundamentally different disturbances, namely, in quality and flow rate, and two approaches to dampen them (see Figure 3.1): 3.1 Introduction 41 (I) Quality disturbances, e.g., in concentration or temperature, where we dampen by mixing. Such buffer tanks are often called mixing tanks or neutralization vessels for pH processes. (II) Flow-rate disturbances, e.g., in the feed rate, where we dampen by temporarily changing the volume (level variation). Such buffer tanks are often called surge tanks, intermediate storage vessels, holdup tanks, surge drums, accumulators, or inventories. In both cases the tank volume is exploited, and a larger volume gives better dampening: In the first case, mixing of a larger volume means that the in-flow entering during a longer period is mixed together, and in the second case, larger level variations are allowed. Often, in the design of buffer tanks, the residence or hold-up time is used as a , where measure instead of the volume. The residence time is defined as ? [ [ . is the volume and the nominal flow rate Even if the buffer tanks are designed and implemented for control purposes, control theory is rarely used when sizing and designing the tanks. Instead, rules of thumb are used. For example, textbooks on chemical process design seem to agree that a half-full residence time of 5-10 minutes is appropriate for distillation reflux drums and that this also applies for many other buffer (surge) tanks. For tanks between distillation columns, a half-full residence time of 10-20 minutes is recommended (Lieberman, 1983; Sandler and Luckiewicz, 1987; Ulrich, 1984; Walas, 1987; Wells, 1986). Sigales (1975) sets the total residence time as the sum of the surge time and a possible settling time. The following surge times are recommended: distillation reflux, 5 minutes; product to storage, 2 minutes; product to heat exchanger or other process streams, 5 minutes; product to heater, 10 minutes. The settling time applies when there is an extra liquid phase. For water in hydrocarbons, a settling time of 5 minutes is proposed. None of the above references provide any justifications for their rules. The most complete design procedure for reflux drum volumes is presented by Watkins (1967), who proposes a half-full volume given by [ V (3.1) Here (typical range 0.5-2) and (typical range 1-2) are instrumentation and labor factors, respectively, related to buffer tanks of category B mentioned above. For example, the value of may be based on how much time it takes for the operator to replace a disabled pump. and are reflux and product rates, and the factor [ (typical range 1.25-4) is dependent on how well external units are operated (e.g., 1.25 for product to storage). V (typical range 1-2) is a level indicator factor. The method gives half-full hold-up times from >7 to ; . 42 Chapter 3. Buffer Tank Design for Acceptable Control Performance In addition to the volumes proposed above, one normally adds about 2 of the volume to prevent overfilling (Wells, 1986). For reflux drums, 25-50% extra volume for the vapor is recommended (Sandler and Luckiewicz, 1987). A basic guide to the design of mixing tanks is given by (Ludwig, 1977). The process control literature refers to the level control of buffer tanks for flow-rate dampening (surge tanks) as averaging level control. Harriott (1964), Hiester et al. (1987), and Marlin (1995) propose controller and tank size designs that are based on specifying the maximum allowed change in the flow rate out of the buffer (surge) tank because this flow acts as a disturbance for the downstream process. However, no guidelines are given for the critical step of specifying the outlet flow-rate change. Otherwise, these methods have similarities with the one proposed in the present paper. To reduce the effect of the material balance control on the quality control loop, Buckley (1964) recommends designing the buffer tank such that the material balance control can be made 10 times slower than the quality loop. In practice, this means that the effect of the disturbance on the quality at the worst-case frequency is reduced by a factor of 10. This applies to both surge and mixing tanks. There have also been proposals for optimal averaging level control, e.g., (McDonald et al., 1986), where the objective is to find the controller that essentially gives the best disturbance dampening for a given surge tank. To reduce the required surge tank volume, provided one is willing to accept rare and short large changes in the outlet flow, one may use a nonlinear controller that works as an averaging controller when the flow changes are small but where the nonlinear part prevents the tank from being completely empty or full, e.g., (McDonald et al., 1986; Shunta and Fehervari, 1976; Shinskey, 1996). Another related class of process equipment is neutralization tanks. Neutralization is a mixing process of two or more liquids of different pH. Normally this takes place in one or more buffer (mixing) tanks in order to dampen variations in the final product. The process design for neutralization is discussed by Shinskey (1973) and McMillan (1984). Another design method and a critical review on the design and control of neutralization processes with emphasis on chemical wastewater treatment is found in Walsh (1993). In Chapter 2 tank size selection for neutralization processes is discussed. Zheng and Mahajanam (1999) propose the use of the necessary buffer tank volume as a controllability measure. The objective of this paper is to answer the following questions: When should a buffer tank be installed to avoid propagation of disturbances, and how large should the tank be? The preferred way of dealing with disturbances is feedback control. Typically, with integral feedback control, perfect compensation may be achieved at steady state. However, because of inherent limitations such as time delays, the control system is generally not effective at higher frequencies, and the 3.2 Introductory example 43 process itself (including any possible buffer tanks) must dampen high-frequency disturbances. We have the following: The buffer tank (with transfer function ) should modify the disturbance, , such that the modified disturbance (3.2) can be handled by the control system. The buffer tank design problem can be solved in two steps: Step 1. Find the required transfer function . (Typically A? , and the task is to find the order and the time constant ? .) Step 2. Find a physical realization of level control tuning). (tank volume and possibly In this paper we present design methods for buffer tanks based on this fundamental insight. 3.2 Introductory example The following example illustrates how we may use (1) the control system and (2) a buffer (mixing) tank to keep the output within its specified limits despite disturbances. Example 3.1 Consider the mixing of two process streams, and , with different components (also denoted and ), as illustrated in Figure 3.2. The objective is to mix equal amounts of and such that the excess concentration of the outlet flow is close to zero. More specifically, we require to stay within 2 [ . The combined component and total material balance gives the following model: > @ (3.3) For the case with no control and no buffer tank, the time response in the outlet concentration, , to a step disturbance in the feed concentration, , is shown by the solid line (“Original”) in Figure 3.3. The value of approaches \ [ , which is 10 times larger than the accepted value. 44 Chapter 3. Buffer Tank Design for Acceptable Control Performance qA cA,f qB cB,f Mixer c0 CIC Buffer tank c Figure 3.2: Mixing process. The concentration is controlled by manipulating the flow rate of stream . Variations are further dampened by an extra buffer tank. (1) We first design a feedback control system, based on measuring , and manipulating to counteract the disturbance. We choose a proportional-integral (PI) composition controller, 7 . Note that the speed of the control system is limited by an effective delay . , mainly due to the concentration measurement. The resulting response with control is shown by the dashed line. Because the controller has integral action, the outlet concentration returns to its desired value of \[ . However, because of the delay, the initial deviation is still unacceptable. (2) To deal with this, we install, in addition, a buffer tank with volume [ (residence time ) (drawn with dashed lines in Figure 3.2). We are now able to keep the outlet concentration within its limit of . [ at all times as shown by the dash-dotted line in Figure 3.3. Instead of the buffer tank, we could have installed a feedforward controller, but this requires a fast (and accurate) measurement of the disturbance, , and a good process model. In practice, it would be very difficult to make this work for this example. Comment on notation: Throughout the paper, the main feedback controller for the process is denoted , whereas the buffer tank level controller is denoted . In the following sections we will show how to design buffer tanks for quality disturbances, like in the above example, as well as for flow-rate disturbances. 3.3 Step 2: Physical realization of with a buffer tank 45 10 Original Concentration 8 6 With control 4 With control and buffer tank 2 } Allowed range 0 0 10 20 30 40 Time [min] 50 60 70 80 Figure 3.3: Response in the excess outlet concentration to a step in inlet quality (from [ to [ at ) for the system in Figure 3.2. A composition controller handles the long term (“slow”) disturbance, but a buffer tank is required to handle the short term deviations. Nominal data: , , , !#" , $ %!&(')" . Residence time mixer: * . Delay in control loop * . The levels in the mixer and the buffer tank are controlled +0!,21 3 . +0!,3. . by adjusting the outflow with PI controllers, #+-,. / 3.3 Step 2: Physical realization of 4 tank 5768 with a buffer Consider the effect of a disturbance, , on the controlled variable . Without any buffer tank, the linearized model in terms of deviation variables may be written as :9 (3.4) where :9 is the original disturbance transfer function (without a buffer tank). To illustrate the effect of the buffer tank, we let denote the transfer function for the buffer tank. The disturbance passes through the buffer tank. With a buffer tank, the model becomes (see Figure 3.4) ; :9 >< = @ , ? (3.5) where is the resulting modified disturbance transfer function. A typical buffer tank transfer function is A? (3.6) 46 Chapter 3. Buffer Tank Design for Acceptable Control Performance Quality/Flow disturbance Buffer tank d(s) Process Gd0(s) h(s) Gd(s) Figure 3.4: Use of buffer tank to dampen the disturbance Note that so that the buffer tank has no steady-state effect. We will now consider separately how transfer functions of the form (3.6) arise for (I) quality and (II) flow-rate disturbances. In both cases, we consider a ([ , inlet flow rate [ , and outlet flow buffer tank with liquid volume rate \[ . I Mixing tank for quality disturbance ( ) Let denote the inlet quality and the outlet quality (for example, concentration or temperature). For quality disturbances, the objective of the buffer tank is to smoothen the quality response (3.7) so that the variations in are smaller than those in . A component or simplified energy balance for a single perfectly mixed tank yields >@ . By combining this with the total material balance >@ (assuming constant density), we obtain 2 @ , which upon linearization and taking the Laplace transform yields ! " " (3.8) where an asterisk denotes the nominal (steady-state) values and the Laplace variables , , , and now denote deviations from the nominal values. We note that flow-rate disturbances (in ) may result in quality disturbances if we mix streams of different compositions (so that ). From (3.8), we find that the transfer function for the tank is ? (3.9) 3.3 Step 2: Physical realization of with a buffer tank 47 where ? is the nominal residence time. We note that the buffer (mixing) tank works as a first-order filter. Similarly, for tanks in series, we have where from ? A? (3.10) residence time in tank . We find the required volume of each tank ? , where is the nominal flow rate through tank . ) II Surge tank for flow-rate disturbance ( For flow-rate disturbances, the objective is to use the buffer volume to smoothen the flow-rate response (3.11) The total mass balance assuming constant density yields @ (3.12) We want to use an “averaging level control” with a “slow” level controller, because tight level control yields @ P and P . Let denote the transfer function for the level controller including measurement and actuator dynamics and also the possible dynamics of an inner flow control loop. Then (3.13) where is the set-point for the volume. Combining this with (3.12) and taking Laplace transforms yields or from (3.13): The buffer (surge) tank transfer function is thus given by (3.14) (3.15) (3.16) With a proportional controller, , we get that is a first-order filter with ? . Alternatively, for a given , the resulting controller is (3.17) Chapter 3. Buffer Tank Design for Acceptable Control Performance 48 Table 3.1: Averaging level control: Design procedure II for flow-rate disturbances for alternative choices of . Step 2.1. Desired (from Step 1) 2.2. Level controller, from (3.17) 2.3. from (3.18) 2.4. G5G 1st order K ? Y? ? 01.354 2nd order K K Y; ? ;Y? 0 1.354 nth order K K ? 1 ?'0 1.354 Compared to the quality disturbance case, we have more freedom in selecting , because we can quite freely select the controller . However, the liquid level will vary, so the size of the tank must be chosen so that the level remains between its limits. The volume variation is given by (3.14), which upon combination with (3.17) yields (3.18) Note that represents the deviation from the nominal volume. The maximum value of this transfer function occurs for all of our cases at low frequencies ( ). In Table 3.1 we have found the level controller and computed the required total volume for ? . For example, for a first-order filter, A? , the required controller is a P controller with gain Y? and the required volume of the tank is G G ? 01.354 . Note that the resulting level controllers, , do not have integral action. A level controller without integral action was also recommended and further discussed by Buckley (1964, page 167) and Shinskey (1996, page 25). For flow-rate disturbances, a high-order can alternatively be realized using multiple tanks with a P level controller, , in each tank. However, the required total volume is the same as that found above with a single tank and a more complex , so the latter is most likely preferable from an economic point of view. 3.4 Step 1: Desired buffer transfer function 4 5768 What is a desirable transfer function, ? We here present a frequency-domain approach for answering this question. Figure 3.5 shows the frequency plot of O? Y for to < , where ? in most cases is the total residence time in the tanks. With a given value of ? , we see that is 1 See Appendix C. 3.4 Step 1: Desired buffer transfer function 49 “best” if we want to reduce the effect of the disturbance at a given frequency by a factor ( 7 ) or less; ; is “best” if the factor is between 3 and about ( 7J<>< ), and is “best” if the factor is between about 7 and ( 7 N < ). Thus, we find that a larger order is desired when we want a large disturbance reduction. We now derive more exactly the desired . 0 10 Gain 0.33 (min.vol. n=1) Gain 0.144 (min.vol. n=2) −1 10 Magnitude Gain 0.064 (min.vol. n=3) n=1 −2 10 n=2 n=3 n=4 −3 10 −1 0 10 1 10 2 10 10 Frequency × τh Figure 3.5: Frequency responses for K$ . Let us start with an uncontrolled plant without a buffer tank. The effect of the disturbance on the output is then :9 (3.19) To counteract the effect of the disturbances, we apply feedback control ( ) (see Figure 3.6). The resulting closed-loop response becomes 9 (3.20) With integral action in the controller, the sensitivity function approaches zero at low frequencies. However, at higher frequencies, the disturbance response, :9 , may still be too large, and this is the reason for installing a buffer tank. The closed-loop response with a buffer tank is ; 9 <>= ? @ , (3.21) 50 Chapter 3. Buffer Tank Design for Acceptable Control Performance d h Gd Gd0 + yr - u K + G y + Figure 3.6: Feedback control system which is acceptable if 9 is sufficiently small at all frequencies. We need to quantify the term “sufficiently small”, and we define it as “smaller than 1”. More precisely, we assume that the variables and thus the model ( 9 ) has been scaled such that The expected disturbance is less than 1 ( The allowed output variation is less than 1 ( From (3.21) we see that to keep we must require when , ) ) (worst-case disturbance), (3.22) from which we can obtain the required . We illustrate the idea with an exam- ple. , Example 3.1 (continued) (Mixing process). Let Linearizing and scaling the model (3.3) then yields :9 - E . (3.23) We here used for the scaling the following: expected variations in , ; 2 \[ ; range for , 7 \[ ; allowed range for : 2 ([ . In Figure 3.7 we plot the disturbance effects , :9 , and :9 as functions of frequency. Originally (without any buffer tank or control), we have :9 at lower frequencies. The introduction of feedback makes :9 $ at low frequencies, whereas adding the buffer tank brings 9 ,$ also at intermediate frequencies. , and 3.4 Step 1: Desired buffer transfer function 51 1 10 Magnitude Gd0 SGd0 0 10 SGd0 h −1 10 −2 10 −1 0 10 1 10 Frequency [rad/min] 10 2 10 Figure 3.7: Original disturbance effect ( :9 ), with feedback control ( :9 ) and with feedback control and a buffertank ( : 9 ). A buffer tank with a residence time of is required to bring :9 for all In the following we will present methods for finding based on the controllability requirement (3.22). There are two main cases: S. Existing plant with an existing controller: The “counteracting” controller, , is already designed, so is known. The “ideal” is then simply the inverse of 9 . N. New plant: The “counteracting” controller, , is not known so is not known. This is the typical situation during the design stage when most buffer tanks are designed. In most cases we will choose 3.4.1 to be of the form ? . given (existing plant) We consider an existing plant where controller is known. The task is to find such that H$ 9 . Several approaches may be suggested. S1. Graphical approach with ? : This is done by selecting ? and adjusting ? until touches 9 at one frequency. As a starting point we choose the following: (a) is the slope of 9 . 9 in a log-log plot in the frequency area where Chapter 3. Buffer Tank Design for Acceptable Control Performance 52 9 crosses one from below. Numerical approach with ? : With a given we find ? such that just touches 9 by solving the following problem: (b) S2 ? is the inverse of the frequency where ? where ? ! ? ! 9 I (3.24) 9 otherwise (3.25) Because it is not practical to calculate ? ! for all frequencies, we replace with , where , which is a finite set of frequencies from the range of interest. The calculation is explicit and fast, so a large number of frequencies can be used. (This approach was used to obtain in Figure 3.7.) As illustrated in Example 3.2 (below), for one may save some volume with the following approach, which is more involved since it includes nonconvex optimization. S3. Numerical approach with “free” : We formulate a constrained optimization problem that minimizes the (total) volume of the buffer tank(s) subject to (3.22). As in the previous method, we formulate the optimization for a finite set of frequencies, , from the frequency range of interest. (I) Quality disturbances: For mixing tanks O? Q QQ A? (3.26) when the tanks are not necessarily equal. Because the flow rate is in ), we may minimize the total residependent of the volumes (? dence time (instead of minimizing the total volume) subject to (3.22): ? K K QQQ subject to O? Q QQ A ? ? 9 (3.27) where is a set of frequencies. This is a single-input, single-output variant of a method proposed by Zheng and Mahajanam (1999). 3.4 Step 1: Desired buffer transfer function 53 (II) Flow-rate disturbances: 5 5 (3.28) where we have parametrized the level controller with the parameter vector . We minimize subject to (3.22) the required tank volume (3.14): 9 subject to 5 (3.29) Many controller formulations are possible, for example, the familiar PI(D) (D=derivative) controller or a state-space formulation. We here express the controller by a steady-state gain, , real zeros, and real poles: 5 and thus With O ? 777 and O? ? 7277 ? (3.30) . in (3.30) we get ? $ Q QQ QQQ A? Y; ? (3.31) does not give real time constants as the previous approaches. For a first-order filter (with and ? ), there is no extra degree of freedom in the optimization, and we get the same result as that with (3.24). Example 3.2 (Temperature control with flow-rate disturbance). :9 8 : 7 ;> : > ; > E (3.32) (3.33) This may represent the process in Figure 3.8, where two streams and are mixed, and we want to control the temperature ( ) after the mixing point. Stream is heated in a heat exchanger, and the manipulated input, , is the secondary 54 Chapter 3. Buffer Tank Design for Acceptable Control Performance A B u d = Flow in Buffer tank with "slow" level control LIC y=Temperature TIC Figure 3.8: Temperature control with flow-rate disturbance flow rate in this exchanger. The disturbance, , is variation from the nominal flow rate of . , , and are scaled as outlined above. First consider the case without the buffer tank. Because :9 > , the disturbance has a large impact on the output, and a temperature controller is certainly required. However, this is not sufficient because, as seen in Figure 3.9, 9 exceeds 1 at higher frequencies and it approaches 100 at high frequencies. We thus need to install a buffer tank with averaging level control to dampen the flow-rate disturbance at higher frequencies. The slope of :9 is 2 after it has crossed 1, so one would expect that a second order is the best. 1 10 Magnitude SGd0(V=0) SGdfree (V= 56) 2 0 10 SGd2(V=72) SGd1(V=242) −1 10 −3 10 −2 10 −1 0 10 Frequency [rad/s] 10 Figure 3.9: A buffer tank is needed for the temperature control problem: :9 for frequencies above % . Comparison of :9 for designs 1, 2 and 3 in Table 3.2. For the graphical approach S1, we use ? . crosses 1 at about frequency 0.024 rad/s, corresponding to ? P 7 ; < < ; , and because this is a flow-rate disturbance (II), we have from Table 3.1 that G5G B;Y? 0 P :8< 0 . The required level controller is 7 ;> 5; . For the more exact numerical approaches (S2 and S3), we consider three de- 3.4 Step 1: Desired buffer transfer function 55 Table 3.2: Buffer (surge) tank design procedure II (flow-rate disturbance) applied to the temperature control example Step Design 1 1. Numerical approach to S2: obtain 1st order 2.1. Desired (from Step 1) V 7 > < 2.2. Level controller, 2.3. ;<; 2.4. G5G ; < ; 0 1.354 Design 2 S2: 2nd order [ & V !Q Design 3 S3(II): 2nd order ; > N B>; >;8 0 1.354 - V! [ [ N N>01.354 signs, and the results are given in Table 3.2. Design 1 (with A? ) only requires a P level controller, but as expected, the required volume is large because is first-order. Design 2 (with ? ) gives a considerably smaller required volume. From design 3 (with in (3.31)), the required volume is even smaller than with design 2, as expected. Little is gained by increasing the order of above 2. In Figure 3.9 we plot the resulting for the three designs, which confirms that they stay below 1 in magnitude at all frequencies. These results are further confirmed by the time responses to a unit step disturbance shown in Figure 3.10. Buckley’s method (Buckley, 1964) gives a residence time of , which is much less than the minimum required residence time of about N (see Table 3.2). The reason is that the disturbance needs to be reduced by a factor of > , and not as Buckley implicitly assumes. 3.4.2 not given The requirement is that (3.22) must be fulfilled; that is, the buffer tank with trans at all frequencies. fer function must be designed such that :9 However, at the design stage the controller and thus is not known. Three approaches are suggested: N1. Shortcut approach: The requirement (3.22) must, in particular, be satisfied at the bandwidth frequency where , and this gives the (minimum) requirement ; :9 <>= ? (3.34) In Skogestad and Postlethwaite (1996, p. 173-4) it is suggested that ' , where is the effective delay around the feedback loop. However, to Chapter 3. Buffer Tank Design for Acceptable Control Performance 56 1 0.8 Scaled output 0.6 Design 2 (V=72) 0.4 Design 3 (V=56) 0.2 0 Design 1 (V=242) −0.2 0 20 40 60 80 100 Time[s] 120 140 160 180 200 Figure 3.10: Temperature control with flow-rate disturbance: Response in the scaled output to a unit step in the disturbance (flow rate) with different tank sizes and level controllers (Table 3.2). 3.4 Step 1: Desired buffer transfer function 57 get acceptable robustness, we here suggest to use a somewhat lower value P ; (3.35) Skogestad (2003) proposes the following simple rule for estimating ? ? ; ? B; for PI-control for PID-control : (3.36) where is the delay, ? is the inverse of a right half-plane zero , and ? is the time lag (time constant) number ordered by size so that ? is the largest time constant. We now assume to get A? , use 5; I ; , and solve (3.34) ? (3.37) :9 ' . Alternatively, Figure 3.5 may be used for a where given to read off the normalized frequency ,? where , and the required ? for each tank is then ? . N2. Numerical approach based on preliminary controller design: The above shortcut method only considers the frequency . To get a more exact design, we must consider all frequencies, and a preliminary controller design is needed. This approach consists of two steps: N2a. Find a preliminary controller for the process, and from this, obtain . N2b. Use one of the approaches S1, S2, or S3 from section 3.4.1. For step N2a, we have used the method of Schei (1994), where we maxi Y? , subject to a robustness mize the low-frequency controller gain restriction (maximum value on the peak of ): ? 2 subject to "$ and stable (3.38) ? ? . Compared to the where for a PI controller optimization problem that Schei uses, we have added the constraint that is stable. This is implemented by requiring the eigenvalues of to be in the left half-plane, where is obtained from by replacing the delay with 58 Chapter 3. Buffer Tank Design for Acceptable Control Performance a Padé approximation. To obtain a robust design, should be chosen > 7 low, typically N ; . With this controller design, we then use one of the methods S1-S3 to design the buffer tank. N3. Numerical approach with a simultaneous controller and buffer tank design. A more exact approach is to combine the controller tuning and the buffer tank design optimization into one problem. For (I) quality disturbances, the optimization problem may be formulated as an extension of (3.27): ? K K ? Q QQ A ? QQQ ? subject to 5 5 H$ stable : 9 5 :9 subject to 5 5 H$ stable (3.39) Likewise for (II) 5 . where is the controller parameter vector for flow-rate disturbances, we get from (3.29): (3.40) where is the controller parameter vector for the level controller , which enters in , and is the controller parameter vector for the feed back controller , which enters in . To ensure effective integral action in , these optimization problems must be extended by a constraint; for example, if is a PI controller, a maximum value must be put on the integral time. Example 3.2 (continued) (Temperature control with flow-rate disturbance (II)) :9 > 8 ; > E (3.41) The available information of the process is given by (3.41), and we assume that the controller is not known. The delay is . We get the following results: 3.5 Before or after? 59 N1. The shortcut approach yields ( 7 and all ) from (3.37) (or Figure 3.5) the following: 9 > for ): G 5G B; > 0 1.354 . Second-order filter ( B ; ): G 5G < 0 1.354 . First-order filter ( N2. The Schei tuning in (3.38) followed by the optimal design (3.29) yields for a second order ( and ) the following: 8 7 N : G 5G B >; 0 1.354 . B; : G G >01.354 . N3. Simultaneous controller tuning and optimal design (3.40) yields with secondorder ( and ) the following: 8 7 N : G 5G B >; 0 1.354 (as for method N2) B; : G G >01.354 (as for method N2) Note that >7 N gives more robust (and “slow”) controller tunings than ; and therefore requires a larger tank volume. The smallest achievable tank volume with a second-order filter is G5G ;>80 1.354 (found with method N3 with free). Methods N2 and N3 yield almost identical results for this example. The shortcut method N1 also gives a tank volume B; . very similar to that found with 3.5 Before or after? If the buffer tank is placed upstream of the process, the disturbance itself is dampened before entering the process. If it is placed downstream of the process, the resulting variations in the product are dampened. The control properties are mainly determined by the effect of input on output (as given by the transfer function ). An upstream buffer tank has no effect on , and also a downstream buffer tank has no effect on provided we keep the original measurement. On the other hand, placement “inside” the process normally affects . In the following we list some points that may be considered when choosing the placement. We assume that we prefer to have as few and small buffer tanks as possible (sometimes other issues come into consideration, like differences in cost due to different pressure or risk of corrosion, but this is not covered). 60 Chapter 3. Buffer Tank Design for Acceptable Control Performance (1) In a “splitting process”, the feed flow is split into two or more flows (Figure 3.11(a)). One common example is a distillation column. To reduce the number of tanks, it will then be best to place the buffer tank at the feed (upstream placement). An exception is if only one of the product streams needs to be dampened, in which case a smaller product tank can be used because each of the product streams are smaller than the feed stream. (2) In a “mixing” process, two or more streams are mixed into one stream (Figure 3.11(b)). To reduce the number of tanks, it is here best with a downstream placement. An exception is if we only have disturbances in one of the feed streams because the feed streams are smaller than the product stream, leading to a smaller required size. (a) A splitting process (b) A mixing process Figure 3.11: Two types of processes (3) An advantage of a downstream placement is that a downstream buffer tank dampens all disturbances, including disturbances in the control inputs. This is not the case with upstream tanks, which only dampen disturbances entering upstream of the tank. (4) An advantage of an upstream placement is that the process stays closer to its nominal operation point and thus simplifies controller tuning and makes the response more linear and predictable (see Example 3.3). (5) An advantage of the “inside” placement is that it may be possible to avoid installation of a new tank by making use of an already planned or existing unit, for example, by increasing the size of a chemical reactor. (6) A disadvantage with placing the buffer tank inside or downstream of the process is that the buffer tank then may be within the control loop, and 3.5 Before or after? 61 the control performance will generally be poorer. Also, its size will effect the tuning, and the simultaneous approach (N3) is recommended. For the downstream placement, these problems may be avoided if we keep the measurement before the buffer tank, but then we may need an extra measurement in the buffer tank to get a more representative value for the final product. Example 3.3 (Distillation column). We apply the methods from section 3.4.1 to a distillation column and compare the use of a single feed tank with the use of two product tanks (Figure 3.12). We consider a distillation column with 40 stages (the linearized model has 82 states; see column A from (Skogestad and Postlethwaite, 1996, p.425)). The disturbances to the column are feed flow rate and composition ( and ), and the outputs are the mole fractions of the component in top and bottom products, respectively ( and ). The manipulated variables are ). The variables have been scaled the reflux and the boilup ( and 2 so that a variation of in the feed flow rate corresponds to and a variation of 2 in the feed composition corresponds to . A change in the top and bottom product composition of 7 mole fraction units corresponds to a change in and . Decentralized PI controllers are used to control the compositions. In the top, N 7 :8< ; ; , and in the bottom, 7 < N ; ; . There is a delay of in each loop, which we represent with fifth-order Padé approximations in the linear model. Nominally, the feed flow rate is .\[ , and the top and bottom concentrations are 0.99 and 0.01, respectively. The holdup in the reflux and the boiler are controlled with controllers (with gain ) by the top and bottom product streams, respectively. We consider the effect of the flow-rate disturbance, . The closed-loop gains from to and without any buffer tank, 9 and 9 are shown with solid lines in Figure 3.13. The gains are both above at intermediate frequencies, so our purity requirements will not be fulfilled, unless we install a buffer tank. Upstream placement (feed surge tank). is known, and with , (3.24) in method S2 yields ? ><, . The resulting and are shown with dashed lines, and we see that just hits (as expected). is also plotted (dash-dotted) to indicate the limiting frequency, which is not at the maximum of 9 , but at a lower frequency “shoulder”. Following design procedure II, we now get the following: 2.1 > < 2.2 The required level controller for the buffer tank is 2.3 ? >2< >2< 7 >>:>: Chapter 3. Buffer Tank Design for Acceptable Control Performance 62 y1=xD u1=L V=49 LIC V=68 d1=F d2=zF V=94 u2=V y2=xB Figure 3.12: Distillation column with either one feed surge tank or two product mixing tanks to dampen disturbances. 2.4 G G ? 01.354 8<, Q ; MQ 7 \[ N : [ . Comment: Since the slope of 9 is less that 1 around the limiting frequency, higher order filters will increase the volume demand. For example, with ; , (3.24) gives ? B8N 7 N , and G G B;Y? 01.354 >7 \[ . Downstream placement (product mixing tank). Because both 9 and 9 at some frequencies, we must apply one mixing tank for each of the two products. When we designed the feed tank, we had to consider the worst of 9 and 9 , but now we may consider 9 for the top product and 9 for the bottom product. With , (3.24) yields ; for the top buffer tank and as before ><, for the bottom tank. The corresponding volumes are ; Q 7 >>7 [ (top) and >2< Q 7 > \[ (bottom), which gives a total volume of N [ , which is the same as that for the feed tank. However, the feed tank placement is preferred because we then need only one tank. Nonlinear simulations. The above design is based on a linearized model, and (as expected) the feed tank placement is further justified if we consider a nonlinear model because the column is then less perturbed from its nominal state. This is illustrated by the simulations in Figures 3.14, 3.15 and 3.16. If the buffer tanks are placed downstream, the nonlinear response deviates considerably from the linear response, and the tanks designed by linear analysis are too small. By trial and error with disturbance step simulations on the nonlinear model, we find that 3.6 Further discussion 63 1 10 1/h Magnitude Limiting ω SGd20 ↓ 0 10 SGd2 SGd10 SGd1 −1 10 −3 10 −2 −1 10 0 10 10 Frequency [rad/s] 9 and Figure 3.13: Feed flow disturbance for the distillation column: 9 (for top and bottom) are both above 1 (solid line). A feed tank with averaging level con , brings the disturbance gain to both top and bottom below 1 trol, (dashed). Note that is just touching 9 . and ? :>: are needed for the top and bottom product tanks. This gives a total volume of 2< [ , considerably larger than the required feed tank of N : [ . In conclusion, an upstream feed tank with a P controller (averaging level control) proves best for this example. The example also illustrates that for nonlinear processes the buffer tank design methods that we have proposed are most reliable for the design of upstream buffer tanks. For (highly) nonlinear processes, the results should, if possible, be checked with simulations on a nonlinear model. ?G :, 3.6 Further discussion In this paper we have assumed that the surge tank outlet flow rate is controlled, which for example is the case when an inner flow-control loop is installed. When such a flow loop is missing, the flow rate is level dependent (this was what Harriott (1964) assumed). In Appendix A, we find that essentially the same results are obtained in this case. When comparing one large with several smaller (mixing) tanks, the actual investment cost related to the tanks must be considered. A short discussion on Chapter 3. Buffer Tank Design for Acceptable Control Performance 64 1 8 0 6 −1 4 −2 2 −3 0 −4 0 −2 0 50 100 150 200 250 300 Time [min.] 350 400 450 500 (a) Output . Nonlinear simulation (solid) and linear simulation (dashed). 50 100 150 200 250 300 Time [min.] 350 400 450 500 (b) Output . Nonlinear simulation (solid) and linear simulation (dashed). Figure 3.14: Distillation example with no buffer tanks installed. The control system is not able to handle the disturbance. There is a large deviation between nonlinear and linear simulation. 0 4 −1 3 −2 2 −3 1 −4 0 50 100 150 200 250 300 Time [min.] 350 400 450 500 0 0 (a) Output . Nonlinear simulation (solid) and linear simulation (dashed). 50 100 0 4 −1 3 −2 2 −3 1 50 100 150 200 250 300 Time [min.] 350 400 450 (a) Output . Nonlinear simulation (solid) and linear simulation (dashed). 200 250 300 Time [min.] 350 400 450 500 (b) Output . Nonlinear simulation (solid) and linear simulation (dashed). Figure 3.15: Distillation example with a feed tank of and the nonlinear simulation is close to the linear one. −4 0 150 500 0 0 50 100 [ . Both outputs stay within 150 200 250 300 Time [min.] 350 400 450 , 500 (b) Output . Nonlinear simulation (solid) and linear simulation (dashed). Figure 3.16: Distillation example with product tanks at the top ( ( [ ). The outputs deviate from in the nonlinear simulations. [ ) and at the bottom 3.7 Conclusions 65 this is given in Appendix B. A small number is favoured, even if this means a larger total volume. The use multiple of buffer tanks in series is of interest for processes with large disturbances, e.g., for neutralization processes. With multiple tanks one may ask whether it is best with equal or unequal sized buffer tanks. Equal tanks are easiest to handle, but for neutralization it has been argued (Shinskey, 1973) that unequal tanks reduce resonance peaks. The conclusion from Chapter 2 is that there may be a reduction in total volume with tanks of different size, but this most likely does not compensate for the added cost of different units. The shortcut formula (3.37) in method N1 is easy to use and convenient at an early stage of the process design. It is especially convenient for mixing processes like neutralization Chapter 2. However, it is a necessary but not sufficient requirement for (3.22). Two possible errors may occur: E1. The estimate for may be wrong. E2. is not the “worst” frequency. We only consider fulfilled here, :9 "$ may be violated at (a) lower frequencies than . (b) higher frequencies than due to peaks in 9 at . Even if it is . Errors E1 and E2(b) are not really a problem with the choice for used in this paper, which allows for a robust controller tuning where is “flat” over a frequency range and with a low peak for . Error E2(a) may be an important issue if is of high order, and how to overcome it is discussed in the Thesis’ Appendix B (B3.1 and 4). 3.7 Conclusions The controlled variables ( ) must be kept within certain limits despite disturbances ( ) entering the process. High-frequency components of disturbances are dampened by the process itself, while low-frequency components, e.g., the long-term effect of a step, are handled by the control system. There are, however, always limitations in how quickly a control system can react, for example, as a result of delays. Thus, for some processes there is a frequency range where the original process and the controller do not dampen the disturbance sufficiently. In this paper we introduce methods for designing buffer tanks based on this insight. The methods consist of two steps: 66 Chapter 3. Buffer Tank Design for Acceptable Control Performance Step 1. Find the required transfer function such that (with scaled variables) 9 $ . The methods for this have been divided into two groups depending on whether the control system for the process is already designed (methods S1-S3) or not (methods N1-N3). The shortcut methods (S1/S2 or N1), supplemented with nonlinear simulations, are recommended for most practical designs. Step 2. Design a buffer tank that realizes this transfer function . For a first-order transfer function, O? , we have the following: I. Quality disturbances Install a mixing tank with volume is the nominal flow rate. M? , where II. Flow-rate disturbances Install a tank with averaging level control with gain Y? and volume ?'01.354 where 01.354 is the expected range (from minimum to maximum) in the flow-rate variation. Sometimes a higher-order is preferable, in which case we need (I) for quality disturbances more than one mixing tanks and (II) for flow-rate disturbances a more complicated level controller (with lags) (see Table 3.1). References Buckley, P. S. (1964). Techniques of Process Control. John Wiley & Sons, Inc.. New York. Harriott, P. (1964). Process Control. McGraw-Hill. New York. Hiester, A. C., S. S. Melsheimer and E. F. Vogel (1987). Optimum size and location of surge capacity in continuous chemical processes. AIChE Annual Meet, Nov. 15-20, 1987, paper86c. Lieberman, N. P. (1983). Process Design for Reliable Operations. Gulf Publishing Company. Houston. Ludwig, E. E. (1977). Applied Process Design for Chemical and Petrochemical Plants. Vol. 1. Gulf Publishing Company. Houston. Marlin, T. E. (1995). Process Control. Designing Processes and Control Systems for Dynamic Performance. McGraw-Hill, Inc.. New York. McDonald, K. A., T. J. McAvoy and A. Tits (1986). Optimal averaging level control. AIChE J. 32(1), 75–86. REFERENCES 67 McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. Peters, M. S. and K. D. Timmerhaus (1991). Plant Design and Economics for Chemical Engineers. 4 ed.. McGraw-Hill. New York. Sandler, H. J. and E. T. Luckiewicz (1987). Practical Process Engineering. McGraw-Hill Book Company. New York. Schei, T. S. (1994). Automatic tuning of PID controllers based on transfer function estimation. Automatica 30(12), 1983–1989. Shinskey, F. G. (1973). pH and pIon Control in Process and Waste Streams. John Wiley & Sons. New York. Shinskey, F. G. (1996). Process Control Systems - Application, Design, and Tuning, 4th Ed.. McGraw-Hill Inc., New York. Shunta, J. P. and W. Fehervari (1976). Nonlinear control of liquid level. Instrum. Technol. pp. 43–48. Sigales, B. (1975). How to design reflux drums. Chem. Eng. 82(5), 157–160. Skogestad, S. (2003). Simple analytic rules for model reduction and PID controller tuning. J. Proc. Contr. 13(4), 291–309. Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Ulrich, G. D. (1984). A Guide to Chemical Engingeering Process Design and Economics. John Wiley & Sons. New York. Walas, S. M. (1987). Rules of thumb, selecting and designing equipment. Chem. Eng. 94(4), 75–81. Walsh, S. (1993). Integrated Design of Chemical Waste Water Treatment Systems. PhD thesis. Imperial College, UK. Watkins, R. N. (1967). Sizing separators and accumulators. Hydrocarbon Processing 46(11), 253–256. Wells, G. L. (1986). The Art of Chemical Process Design. Elsevier. Amsterdam. Zheng, A. and R. V. Mahajanam (1999). A quantitative controllability index. Ind. Eng. Chem. Res. 38, 999–1006. Chapter 3. Buffer Tank Design for Acceptable Control Performance 68 Appendix A Surge tank with level dependent flow In section 3.3, II we assume that we control the outlet flow rate from the buffer (surge) tank. If we instead let the controller determine the valve position, which is the case if the cascade flow loop is omitted to save cost, the actual flow rate depends on both the valve position and the given tank level (or volume) as well as external pressure variations. The flow rate through a control valve is a function of the valve position, , and the differential pressure across the valve, 0 . We assume that the differential pressure is given by the hydrostatic pressure at the outlet (neglecting the other pressure variations), and that the tank area of the tank is not varying with the level. We then find a linearized model (Harriott, 1964): 0DP 0 0 or by Laplace transform (3.42) (3.43) where , and now represent deviations from nominal values. A controller acting on the valve position , is given by the following equation: (3.44) We insert (3.43) and (3.44) into the the buffer tank mass balance, and Laplace transform yields: (3.45) (3.46) where . (3.14) and (3.15), and see that the effect of inlet flow We compare this with rate changes on and is unchanged provided , that is ! ! (3.47) Here > is the scaling from flow rate to valve position, while 8 represents the effect that the outlet flow rate is increasing with increasing level (“selfregulation”). The time contant, ? , is then ? ! ! (3.48) Appendix B Capital investments 69 From (3.48) we can see that for first order the largest possible ? is now , so for high 8 (i.e., for low pressure drop over the control valve) a flow cascade loop is recommended. This is in agreement with normal practice. > Appendix B Capital investments We will here consider the capital investment in connection with the installation of one buffer tank. It consists of two terms, namely a constant independent of the tank size, and a term which relates with the tank size (Peters and Timmerhaus, 1991): The constant term, , includes the cost of instruments (level measurements), valves (whose size only depends on the flow rates), controllers (normally only programming and testing cost), piping (increased tank size may both increase and decrease the amount of piping), wiring for signals and electrical power, engineering and , includes the price of the purchased equipstart-up. The size dependent term, ment and its installation. A common approximation is that it is proportional to the tank weight, which (assuming that wall thickness and materials are independent of the size) yields the typical exponent, P 7 . For equal tanks with total volume G5G , we then have C G 5G S L (3.49) Often the constant term is large, which favors few (one) tanks. Since normally < (or even ; ), theory on the cost optimal is not interesting since it is easy to calculate the cost for different and compare. ; >> and ; >> [ for neuExample 3.4 Walsh (1993) found tralization tanks. The resulting cost for to < tanks is shown in Figure 3.17. Now we can combine Figures 3.5 and 3.17. We want to reduce the effect of a quality disturbance by a factor 8 , and read from Figure 3.5 the value of ,? that corresponds to magnitude . We find that the volume with one tank is about times larger than the total volume of two tanks, and about times larger than the total volume of three tanks, and about : times larger than the total volume of four tanks. In Figure 3.17 we have marked the cost of one tank of [ , two tanks of > [ , three tanks of > \[ and four tanks of :\[ . With 8 the cost of one tank is the lowest, even though the total volume is much larger. Chapter 3. Buffer Tank Design for Acceptable Control Performance 70 4 16 x 10 14 n=4 12 Cost [£] n=3 10 n=2 8 6 n=1 4 2 0 10 20 30 40 50 60 Total volume [m3] 70 80 90 100 Figure 3.17: Capital investment as a function of total volume. The cost of each tank is G5G S . Appendix C Surge tank: Required volume with n-th order 71 Appendix C Surge tank: Required volume with n-th order 4 5 68 In this appendix we derive the required tank volume for a desired buffer tank transfer function ? . For the -th order filter, ? , the resulting controller from (3.17) O? is of order ? . Furthermore, from (3.18): QQQ (3.50) O? ? ? ? (3.51) where is a polynomial with terms 777 with positive coefficients. The maximum occurs at and the volume requirement is ? . Chapter 4 Control Design for Serial Processes Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Submitted to Journal of Process Control Extended version of a paper presented at European Control Conferance, ECC’99, Aug.31-Sept.3, 1999, Karlsruhe, Germany. Abstract Conceptually, a multivariable controller uses the two basic principles of “Feedforward” action, based mainly on the model (for example the off-diagonal decoupling elements of the controllers), and feedback correction, based mainly on the measurements. The basic differences between feedback and feedforward control are well-known, and these differences also manifest themselves in the multivariable controller. Feedforward control may improve the performace significantly, but is sensitive to uncertainty, especially at low frequencies. Feedback control is very effective at lower frequencies where high feedback gains are allowed. In this paper we aim at obtaining insight into how a multivariable feedback controller works, with special attention to serial processes. Serial processes are important in the process industry, and the structure of this process makes it simple to classify the different elements of the multivariable controller. An example of neutralization of an acid in a series of three tanks is used to illustrate some of the ideas. Keywords: Control structure, Serial process, Multivariable control, Feedforward, Feedback also affiliated with Statoil ASA, TEK, Process Control, N-7005 Trondheim, Norway Author to whom all correspondence should be addressed. E-mail: [email protected]no 74 Chapter 4. Control Design for Serial Processes 4.1 Introduction Before designing and implementing a multivariable controller, there are some questions that are important to answer: What will the multivariable controller really attempt to do? Will a multivariable controller significantly improve the response as compared to a simpler scheme? What must the multivariable controller take into account to succeed? How accurate a model is needed? One key issue with multivariable control is uncertainty. There is a fundamental difference between feedforward and feedback controllers with respect to their sensitivity to uncertainty. Feedforward control is sensitive to static uncertainty, while feedback is not. On the other hand, aggressively tuned feedback controllers are very sensitive to uncertainty in the crossover frequency region. Similar differences with respect to uncertainty can be found for multivariable controllers. Traditional single loop controllers are predominantly based on feedback, whereas model based multivariable controllers often combine feedback and feedforward control, and usually the component of feedforward action is significant (for example the off-diagonal “decoupling” elements of the controllers). In this paper we discuss these issues for the important class of serial processes. A serial process consists of a series of one-way interacting units. The states in one unit influence the states in the downstream unit, but not the other way round. This is very common in the process industry, where the outlet flow of one process enters into the next. One example, which will be studied in Section 4.4, is neutralization performed in several tanks in series. Examples of processes that are not serial are processes with some kind of recycle of material or energy. Even for such processes, however, parts of the process may be modelled as a serial process, if the outlet variations of the last unit is dampened through other process units before it is recycled, so that no significant correlation can be found between the outlet variations and the variations in the disturbances to the first unit. A multivariable controller often yields significant nominal improvements compared to local single-loop control. This is largely because of to the “feedforward” action, and with model error, the feedforward effect may in fact lead to worse performance. On the other hand, use of feedback from downstream measurements is much less dependent on the model, as use of high feedback gains at low frequencies removes the steady-state error. However, one must be careful about high feedback gains at higher frequencies due to potential stability problems, and it is at these higher frequencies one may have the largest benefit of the model-based “feedforward” action of the multivariable controller. Buckley (1964) discusses control structure design for serial processes and distinguishes between material balance control (control of inventory or pressure by flow rate adjustments) and product quality control (control of quality parameters such as concentration). 4.2 Model structure of serial processes 75 Shinskey (1973) and McMillan (1982) present methods for design of pH neutralization processes. Mixing tanks are used to dampen disturbances, and they find that the total volume may be reduced by use of multiple stages with one control loop for each tank. Another advantage with multiple stages is that one may use successively smaller and smaller control valves, leading to a more precise manipulated variable in the last stage. McMillan and Shinskey both recommend different sized tanks to avoid equal resonance frequencies in the tanks, but this has later been questioned (Walsh, 1993), Chapter 2. A discussion on the open loop response of serial process is found in Marlin (1995, p. 156f). Morud and Skogestad (1996) note that the poles and zeros of the transfer function of a serial process are the poles and zeros of the transfer functions of the individual units. Thus, the overall response may be predicted directly from the individual units, in contrast to e.g. processes with recycle. Many series connections of processing units are not really serial processes, as the response of each unit also depends on the downstream unit (for example if the outlet flow rate from a unit depends on the pressure in the subsequent unit) (Marlin, 1995), (Morud, 1995, Chapter 4), (Morud and Skogestad, 1995). Morud et al. denote the latter process structure cascades, whereas Marlin uses the terms noninteracting and interacting series, respectively, for the two structures. The characteristics of serial processes can be utilized when analyzing multivariable controllers for such processes. The multivariable controller can be divided into three types of controller blocks: Local feedback, feedback from downstream units and “feedforward” from upstream units. Thus, depending on the location, the control input will be a sum of these three terms. This division of the controller blocks has two purposes. First, it gives insight into the behaviour of the control system. Second, it allows simple implementation. In some cases the multivariable controller can be implemented as combinations of conventional single loop controllers. In Section 4.2 we develop the model structure for serial processes and discuss some of its properties. In Section 4.3 control of serial processes is discussed. One popular multivariable controller is MPC, and to be able to use theory for linear systems, we summarize in Appendix A how to express an unconstrained MPC combined with a state estimator on state space and transfer function form. This was not available for the controller we have used, so that a detailed description is given in Chapter 5. The ideas of the paper are illustrated through an example with pH neutralization in three stages (section 4.4). The paper is concluded by a short discussion (section 4.5) and the conclusions in section 4.6. Chapter 4. Control Design for Serial Processes 76 ui-1, di-1 ui, di ui+1, di+1 yi-2 Unit no. i-1 yi-1 Unit no. i yi Unit no. i+1 yi+1 (manipulated) and (disturFigure 4.1: Serial process with exogenous variables bances) into unit . The vector represents the outflow of unit , which continues into unit number . 4.2 Model structure of serial processes In this section we look closer at serial processes and develop a general transfer function model. An example of a serial process is a process where mass and/or energy flows from one process unit to another, and there is no recycling of mass or energy. We define a serial process by the following (also see Figure 4.1): A serial process can be divided into a series of sub-processes or units, where the states in each unit depend on the states in the unit itself ( ), the states in the upstream unit ( ), and the exogenous variables ( , ) to the unit. The model for unit no. can then be expressed as >@ (4.1) where and are the state vectors for unit and unit respectively, and the external input is divided into a vector of manipulated inputs, , and disturbances, . We further define the outputs from a unit as a function of the states and the external inputs for this unit (4.2) It is easy to also inlude direct througput terms, i.e., define , but is makes the expressions below slightly more complex. around a working point, introduce We linearize (4.1) and (4.2) , O , O , and O and let the variables be the deviation from their working point. Applying Laplace transformation, and recursively inserting for variables from previous tank, we obtain: We have defined the total output vector, , as all the outputs, manipulated inputs, as all the disturbances. Defining (4.3) as all the (4.4) 4.2 Model structure of serial processes 77 we get 1 .. . .. . .. . QQQ QQQ .. .. . .. QQQ QQQ . QQQ QQQ .. . . QQQ QQQ .. . (4.5) and .. . .. . .. .. . . QQQ QQQ QQQ QQQ . .. .. QQQ QQQ . QQQ QQQ .. . (4.6) is replaced where is the number of units. and are identical except in by (the disturbances to each unit are assumed independent). We see that and are both lower block triangular. From (4.5) and (4.6), we can deduce the following properties: The state vector of a process unit is not influenced by control inputs and disturbances to downstream units. The influence from a control input or a disturbance which enters an upstream unit, , is dampened by the transfer function ! before it reaches the output of unit . .. . Chapter 4. Control Design for Serial Processes 78 The open loop stability of the total process is given by the stability of each unit since the elements in and consists of products of ’s. and are block diagonal at infinite frequency ( ). Note that the nominal model of unit can be expressed as (4.7) where is the transfer function from “disturbances” due to variations in the upstream unit, to output : (4.8) This is illustrated in Figure 4.2. Figure 4.2: Model structure for serial processes 4.3 Control structures for serial processes In the previous section we introduced the concept of serial processes and Equations (4.3)-(4.6) summarize the linearized model. If a full, multivariable controller is used to control this process, the characteristics of each blocks of this controller 4.3 Control structures for serial processes 79 can be identified. If we for simplicity assume that the set-points are zero, and we want to control all the outputs, the control inputs are given by: where is the controller. We divide the controller in : into # .. . 0 (4.9) blocks of the same size as the blocks 777 777 .. . .. . 777 .. . (4.10) These controller blocks can be divided into three groups: Blocks on the diagonal ( ) These blocks use local control, where inputs to the unit are used to control outputs of the same unit. Blocks above the diagonal ( , ,$ ) These blocks represents feedback from the outputs of downstream units. Intuitively, when the effective delay through the units is large, these blocks seem ineffective since the local feedback always will be quicker. There are, however, several cases when it may prove useful: (1) We have no relevant control inputs downstream so local control is impossible. (2) The downstream actuators are slow, so that it actually is more efficient to manipulate the upstream control inputs. (3) There are not enough degrees of freedom in the downstream units. (4) The control inputs downstream are constrained, and insufficient to compensate for the disturbances. (5) The downstream actuators are expensive to use. In the latter two cases the upstream manipulated variable can be used to (slowly) drive the downstream ones to zero or to some other ideal resting value. This is called input resetting and is normally used for systems where we have more control variables than outputs (e.g., (Skogestad and Postlethwaite, 1996, page 418)). Blocks below the diagonal ( , ) Through these blocks an output from an upstream unit directly affects the input in a downstream unit. Since upstream units act as disturbances to downstream units (see (4.7)), these controller blocks may be viewed as “feedforward” elements. Chapter 4. Control Design for Serial Processes 80 In analyzing the controller it is useful to plot the gain of the controller elements as a function of frequency, see Figures 4.6, 4.8(a), 4.10(a), and 4.12(b) presented below. A key point is to find out whether there is integral action in the feedback part of the controller or not. Integral action requires high gain at low frequencies, but it is not always straight-forward to interpret the gain plot of the controller elements. For example, in Figure 4.8(a) all the elements have large gains at low frequencies. In such cases the steady-state effect is better illustrated by plotting the individual gains of the sensitivity function, where is the loop transfer function. The usefulness of is seen from the following expression E (4.11) ), is the reference, is the disturbance where E is the control error ( and is the (open loop) transfer function matrix from the disturbance to the output. To have no steady-state offset in an output we need that all elements in the corresponding row of to be small at low frequencies. Also note that system stability is determined by the poles of . 4.3.1 Local control (diagonal control) Local control is by far the most common control element, [ 1# [ # (4.12) # [[ ), the loop transfer function becomes With only local control and three units ( 1# Local control: [[ [[ [[ (4.13) From this it follows that the stability of the closed-loop system is determined only by the blocks on the diagonal. That is, we have closed-loop stability if and are stable. only if each of the individual loops 4.3.2 Pure feedforward from upstream units The use of measurements in upstream units in the control of a unit is denoted feedforward control: Feedforward ( ) (4.14) 4.3 Control structures for serial processes 81 With “pure” feedforward control (only feedforward elements), the controller does not influence stability. From (4.7) and (4.8) we find that perfect nominal control is obtained by selecting Q QQ (4.15) (4.16) The reason for the zero in (4.16) is that the disturbance is already eliminated by (4.15). If (4.15) cannot be realised, for example if it is not casusal, (4.15) must be modified: (4.17) where subcript minus indicates that negative delays and other non-causal elements of the (total) controller has been removed (this is a simplification of the optimal feedforward controller given by Lewin and Scali (1988) and Scali et al. (1989)). As an example, let , E E (4.18) ? ? , E (4.19) Remark 1 It is not necessary to make causal itself. For example if has a delay of and a delay of N the delay of the “ideal” feedforward Then controller would have been < , which is not implementable. (4.17) states that the controller delay shall be truncated to 0, which means that the effect of the controller of the controller occurs < too late. But, requiring to be causal would have given a N delay in the controller (zero in delay in plus N in ), and the effect of the feedforward controller would have occurred < N too late. When (4.15) cannot be realised, feedforward from units ; 7727 can be useful. For example, if it is causal, the following feedforward controller from unit ; eliminates the control error that “rests” after : C L C L (4.20) See Appendix B for a derivation of (4.20). Feedforward control is generally sensitive to uncertainty, and we will now consider its effect. The nominal model is given by (4.7), and the actual model (with uncertainty) is (4.21) Chapter 4. Control Design for Serial Processes 82 A pure feedforward controller from upstream units then yields the following actual control error: E (4.22) With “ideal” feedforward control based on the nominal model, as given by (4.15) and (4.16), the actual control error becomes E ; <> = ? ,% where denotes generalized inverse (Zhou et al., 1996, page 67), and relative model error in . In particular, for scalar blocks (4.23) is a O (4.24) Thus model errors at any frequency, directly influences the actual control error. Upon comparing the response with control in (4.23) with the response without control ( in (4.21)) we see that “feedforward” (decoupling) control has a positive (dampening) effect on disturbances from upstream units at frequencies where $ (4.25) or in words, as long as the relative error in is less than 1 in magnitude. Here, an appropriate norm dependent on the definition of performance is used. External disturbances entering directly into the process at unit , , are (of course) not dampened by feedforward control from upstream units, but if is measured, then separate feedforward controllers may be designed for . Feedforward control from the reference, , is also necessary to avoid control error if and no feedback is applied. 4.3.3 Lower block triangular controller A lower (block) triangular controller will result if we combine local feedback and feedforward from upstream units, Local control ( Feedforward ( ) ) 4.3 Control structures for serial processes 83 ): The loop transfer function now becomes ( # [ [ [ [[ 1# # [ # [ # # [ [[ [ [ [[ [[ [ [[ [[ (4.26) The diagonal elements are feedback elements, where most of the control benefits are achieved simply by using sufficiently high gains, and an accurate process model is not needed. The main problem is that too high gain may give closed-loop instability. As for the local feedback (diagonal) control structure the stability of the closedloop system is determined only by the blocks on the diagonal, that is we have closed-loop stability if and only if each of the local loops are stable. Note that we also obtain this control structure if an inverse-based (decoupling) design method ( ) is used. An example of an inverse based controller is IMC decoupling (Morari and Zafiriou, 1989), where and are (block) diagonal matrices (with blocks corresponding to the blocks in ). For this controller we obtain the following diagonal and subdiagonal blocks: (4.27) + + (4.28) where denotes block of weight matrix (this is the integrator). (4.27) and (4.28) can be verified by calculating that . Since the stability is determined by the diagonal blocks, and these are the scaled inverse of the blocks of , the weights can be selected independently for each unit, e.g. using (Rivera et al., 1986) (for scalar blocks). If is not invertible, e.g., due to right half plane zeros and delays, the not invertible part of is essentially factored out before the inversion (for details, see (Morari and Zafiriou, 1989)). Using (4.8), we note that the sub-diagonal part of the IMC controller, (4.28), is identical to the ideal feedforward controller (4.15), except for the weights. Integral action in the feedback part of the controller ( ) requires an integrator in either or . For example, we may choose K where ? is the desired closed loop time constant, (Rivera et al., 1986). Thus we see from (4.28) that also the “feedforward” gain will be amplified at low frequencies. Let us now consider the effect of model uncertainty. The nominal model is given by (4.7) and the actual model by (4.21). A lower triangular controller yields Chapter 4. Control Design for Serial Processes 84 the following actual control error: E (4.29) where (Skogestad and Postlethwaite, 1996) C L (4.30) where and are nominal sensitivity and complementary sensitivity functions, respectively, and relative error in (note that we in Section 4.2 let denote something else). Upon comparing the closed-loop response in (4.29) with the open loop response in (4.21) we see the following: ) dampens disturbances (1) Effective local feedback control ( from the preceding tank ( ), external disturbances entering the process at unit , and also the effect of the model error ( ) and errors in the feedforward control. (2) For frequencies where the feedback control is not effective, i.e., , the results from Section 4.3.2, (4.15)-(4.25) can be applied except that (4.20) must be modified due to the feedback control in unit : C L C L (4.31) As for the pure feedforward case, external disturbances entering the process at unit , , are not dampened by the feedforward control from upstream units, but are handled by the feedback control. For serial processes with a lower block triangular controller it is particularly simple to identify feedforward and feedback controller elements, but similar differences between the elements occur for most multivariable controllers. Such insights are important, e.g. when evaluating how the controller is affected by model error. A more general analysis of feedforward control under the presence of uncertainty is given in Chapter 6. 4.3 Control structures for serial processes 85 4.3.4 Full controller ), the loop transfer With a full controller, as in (4.10), and three units ( function becomes [ 1# # [ # # [[ [ [ QQQ # [ [ [ [ # [ [ [[ [ QQQ [ [ [[ [[ (4.32) In this case the stability of the closed-loop system is affected by all elements in the controller (and in ). As illustrated in the case study in Section 4.4, even in this case the controller block below the diagonal may be similar to feedforward control. 4.3.5 Final control only in last unit (input resetting) In many serial processes, the output from the last unit is by far the most important for the overall plant economics, and the outputs in upstream units are mainly controlled to improve control performance in the final unit. The extra degrees of freedom are used for local disturbance rejection, but are otherwise typically reset to some ideal resting value by adjusting set-points in upstream units. ru2 + IR K12 - r1 + - K11 u1 Unit y1 1 Unit 2 y2 Unit y3 3 FF K21 ru3 + - IR K23 r2 + - K22 + + u2 FF K31 r3 + - K33 FF K32 + + + + u3 Figure 4.3: Serial units controlled with a combination of local control, feedforward control and input resetting Chapter 4. Control Design for Serial Processes 86 We may then use the following control elements: Local control ( ) Feedforward ( ) Input resetting ( ) as illustrated in Figure 4.3. Note that we here have restricted input resetting to operate between neighbouring units, but this is not strictly required. With local control in the three units, feedforward from unit 1 to unit 2 and 3 and from unit 2 to unit 3, and input resetting from unit 3 to unit 2 and from unit 2 to unit 1, the resulting full multivariable controller is: C # [ [ [ [ L [ # # # [ [ # C QQQ C # [ [[ [ L [ [ L [ [ [ [ [[ [ [[ [[ [[ QQQ [[ (4.33) (4.34) , where is the set point for the with controlled output in unit 3, whereas and are the ideal resting values for the inputs in tank 2 and 3. The final controller in (4.33) and (4.34) may seem very complicated, but it can usually be tuned in a rather simple cascaded manner. The feedforward elements are normally the fastest acting and should normally be designed first. The local feedback controllers can be tuned almost independently. Finally, the slow input resetting is added, which will not affect closed-loop stability if it is sufficiently slow. 4.4 Case study: pH neutralization 4.4.1 Introduction Neutralization of strong acids or bases is often performed in several steps (tanks). The reason for this is mainly that with a single tank the pH control is not quick enough to compensate for disturbances (Skogestad, 1996). In (McMillan, 1984), an analogy from golf is used: the difficulty of controlling the pH in one tank is 4.4 Case study: pH neutralization 87 compared to getting a hole in one. Using several tanks, and smaller valves for addition of reagent for each tank, is similar to reaching the hole with a series of shorter and shorter strokes. This is further discussed in Chapter 2. In the present example we want to compare different control structures for neutralization of a strong acid in three tanks (see Figure 4.4). This is clearly a serial process. The aim of the control is to keep the outlet pH from the last tank constant despite changes in inlet pH and inlet flow rate. For each tank the pH can be measured, and the reagent (here base) can be added. Figure 4.4 shows the process with only local control in each tank ( diagonal). ∆cin,max= Acid ±5mol/l q=0.005m3/s Base pH - 1 pHC Base pHI pHC Base V1 pHI pHC pHI V2 V3 kd ~ 106 pH 7 ±1 ∆cout,max=±10-6mol/l Figure 4.4: Neutralization of an acid in three tanks in series with local control in each tank. Data: Outlet requirement: , set-points tank 2 and 3: ! and . . Reactant (base): Inlet acid flow ' ( %! ) and flow rate > . . ( ), nominal flow: > 4.4.2 Model To study this process we use the models derived in Chapter 2. In each tank we consider the excess concentration, defined as ) *#+ . This gives a bilinear model which is linearized around a steady-state working point, so that the methods from linear control theory can be used. We get two states in each process unit (tank), namely the concentration, , and the level. The disturbances (feed changes mainly) enter in tank 1. We here assume that there is a delay of for the effect of a change in inlet acid or base flow rate or inlet acid concentration to reach the outflow of the tank, e.g. due to incomplete mixing, and a further delay of until the change can be measured. In the discrete linear state space model these transportation delays are represented as extra states (poles in the origin). We assume no further delay in the pipes between the tanks. The levels are assumed to Chapter 4. Control Design for Serial Processes 88 be controlled by the outflows using a P controller such that the time constant for the level is about 1/10 of the residence time ( 7 , where is the volume set-point). The volumes of the tanks are chosen to 7 N ([ , which are the smallest possible volumes according to the discussion in Skogestad (1996). The concentrations are scaled so that a variation of corresponds to a scaled value of . The control inputs and the disturbances are also scaled appropriately. The linear model is used for multivariable controller design, while the simulations are performed on the nonlinear model. 4.4.3 Model uncertainty The model presented in the previous section was the nominal model, which will be used in the controller design. If the model gives an exact representation of the actual process, we say it is perfect. Due to simplifications in the modelling or process variations, there is often a discrepancy between the model and the actual process. Often the model is idealized, i.e., simplified, to ease the modelling work, the identification of parameters, and the controller design. In this example we use linearized models in the MPC design. In the design of (SISO) feedforward controllers a further simplification is that outlet flow variations are neglected. This gives a steady-state model error, but dynamically the error is small due to slow level control. What we here consider as the “actual plant”, is the full nonlinear model, possibly with the following errors: Offset of 0.2 (in scaled value) in control input measurement error of R [ (last tank). in second tank. 4.4.4 Local PID-control (diagonal control) The conventional way of controlling this process is to use local PID-control of the pH in each tank. Starting from the tunings obtained with the method of Ziegler and Nichols (1942), and employing some manual fine tuning (by trial and error), we obtained # 67 67 ; < ; [[ 67 ; >: ; ; ; ; ; ; < 7: 7=< : ; >7 ; < >7=< (4.35) (4.36) (4.37) 4.4 Case study: pH neutralization 89 Figure 4.5(a) shows the pH-response in each tank when the acid concentration in the inflow is decreased from 2 to 2 . As expected (Skogestad, 1996), this control system is barely able to give acceptable control, in last tank. However, the nominal response can be significantly improved with feedforward or multivariable control as shown in the following. 4.4.5 Feedforward control (control elements below the diagonal) We now want to study the use of feedforward control from upstream units. As before, we let the pH in the first tank be controlled with local PID control (the same tuning as before), since we do not measure inlet disturbances to tank 1, and feedback is therefore the only possibility. We let the pH in the second and third tanks be controlled with feedforward control only, namely with feedforward from to and from to [ . With “ideal” feedforward control based on the nominal model we then get [ [ [ (4.38) [ (4.39) where and [ are given by (4.8) and subscript minus indicates that the net delay is increased to obtain a causal controller with zero or positive delay in the controller. The two feedforward controllers will react too late due to the measurement delays in and , and thereby introduce a transient output error. To avoid this, the last feedforward controller, [ , from to [ , can be used to eliminate this error by choosing [ from (4.31): [ [ [ C [ [ [ [ L C L [ (4.40) Figure 4.5(b) shows a simulation on the same model as used for the feedforward controller design, and we can see that perfect control is acheived in tank 3 (solid line). However, when applied to a more realistic nonlinear model (incorporating flow rate changes), the feedforward controller fails (dotted lines). 4.4.6 Combined local PID and feedforward control (lower block triangular control) We now combine local PID-control in all the tanks, (4.35)-(4.37) with feedforward control of tanks 2 and 3 (controllers , [ and [ ). In [ it is now necessary to take into account the feedback loop of tank 2 and use Equation (4.31): [ [ [ C X [ [ [ [ L C L [ (4.41) Chapter 4. Control Design for Serial Processes 90 3 2 1 0 3 2 1 0 pH in tank 1 pH in tank 2 4 pH in tank 1 pH in tank 2 4 2 2 8 8 pH in tank 3 pH in tank 3 6 6 1 1 Control inputs u, scaled Control inputs u, scaled 0 0 −1 0 50 100 150 time [s] 200 250 (a) Local feedback control in all three tanks: The PID controllers must be aggressively tuned to keep the pH in the last tank within . −1 0 50 100 150 time [s] 200 250 (b) Feedback control in tank 1 only, and feedforward control of tanks 2 and 3: With a perfect model (i.e. simulation on idealistic model) the disturbance is cancelled (solid line). With model error (i.e.,simulation on a “realistic” nonlinear model), the response is very poor and drifts away (dotted line). is only given for the nominal case. 3 2 1 0 pH in tank 1 pH in tank 2 4 2 8 pH in tank 3 6 1 Control inputs u, scaled 0 −1 0 50 100 150 time [s] 200 250 (c) Local feedback control in all three tanks combined with feedforward control of tanks 2 and 3: Even with model error, the response in the outlet pH is good (solid line). Figure 4.5: Simple control structures applied to the neutralization process in Figure 4.4 (tank (dash-dotted), tank (dashed) and tank (solid)). Disturbance in inlet concentration occurs at . 4.4 Case study: pH neutralization 91 where is the PID controller of tank 2. Again, with perfect model (i.e. simulated on the simplified model with constant flow rates) the effect of the disturbance is eliminated (same result as in Figure 4.5(b)). Simulation on the more realistic model reveals an improvement compared to the pure feedback and pure feedforward structures, as expected. The feedforward controllers reduce the transient errors, whereas the PID controllers remove the steady-state errors, as illustrated in Figure 4.5(c). In Figure 4.6 the controller gains are plotted (lower left corner). The integral actions are recognized from the high gains at low frequencies in the diagonal elements. The sub-diagonal control elements are constant, whereas [ only has an effect at high frequencies. This is where [ is no longer effective (error in gives feedforward control error control for frequencies above delay, 0 80 7 ; , see Chapter 6). Note that with a larger model error, the positive effect of the feedforward controller may be reduced, and the feedforward action may even amplify the disturbances. 4 10 u 1 K11 −3 10 −6 0 10 10 4 10 4 10 K K 22 u 2 21 −3 10 −3 −6 0 10 10 4 10 10 −6 0 10 10 4 10 4 10 K32 K33 u 3 K31 −3 10 −3 −6 0 10 10 y 1 10 −3 −6 0 10 10 y 2 10 −6 0 10 10 y 3 Figure 4.6: The controller gains of the lower block-diagonal control structure resulting from combination of feedback (PID) and feedforward control (Section 4.4.6) 4.4.7 Multivariable control Original MPC control (full multivariable controller) Figure 4.7(a) shows the response with a 0 MPC controller ((Muske and Rawlings, 1993); see also Appendix A). To obtain the current state at each time step for the controller, a state estimator is used. The estimated states in this “original” MPC-controller also includes the two (unmeasured) disturbances: Inlet flow rate and inlet excess concentration, modelled as integrated white noise (we will discuss this choice later). 92 Chapter 4. Control Design for Serial Processes The controller design is based on a discretized model, whereas in the simulation only the controller is discrete. Even if this is a feedback controller, we see that the disturbance response is similar to that of combined local feedback and feedforward control, and the main reason for the large improvement compared to the local feedback case (Figure 4.5(a)) is in fact the “feedforward” effect. From the lower plots in Figure 4.5 and Figure 4.7(a) we can see that the control input in tanks 2 and 3 acts both earlier and with a steeper slope for MPC control than for local control. Note that with MPC the control inputs for tanks 2 and 3 react before the disturbance can be measured in the two tanks. The MPC also has a higher order controller, which may explain why it reacts even faster than the combined feedback/feedforward controller (Figure 4.5(c)). “Feedforward” part of MPC-controller To study the “feedforward” effect separately, we design a MPC-controller that uses the pH measurement in the first tank only, but adjust the reactant flow rates to all three tanks as shown in Figure 4.7(b). The response for the nominal case is similar to the simulation with the full MPCcontroller shown in Figure 4.7(a). If, however, a model error is introduced, e.g. by simulation on the nonlinear model instead, a steady-state error occurs for outlet pH. The reason for this is the lack of feedback control in the last two tanks. The individual gains of the 0 MPC-controller are shown as a function of frequency in Figure 4.8(a) (solid lines). The diagonal control elements are the local controllers in each tank, whereas the elements below the diagonal represent the “feedforward” elements. From these plots we get an idea of how the multivariable controller works. For example, we see that the control input to tank 1 (row 1) is primarily determined by local feedback, while in tanks 2 and 3 (rows 2 and 3) it seems that “feedforward” from previous tank is more important for the control input. In tanks 2 and 3 the control actions are smaller, which is also confirmed in the simulation (Figure 4.7(a)). The local feedback control elements on the diagonal compare well with the PID controllers (dashed lines), except that the gain is reduced for tanks 2 and 3, but this depends on the tuning of the MPC. At high frequencies the “feedforward” elements are similar to the manually designed feedforward controllers. As discussed in Section 4.3, it is not straight-forward to interpret the steady state behaviour from the gain plots of the controller elements when all the elements have large gains at low frequencies as in Figure 4.8(a). In Figure 4.8(b) we . therefore show the individual gains of the sensitivity function, To have no steady-state offset in an output we need that all elements in the corresponding row of to be small at low frequencies. From Figure 4.8(b) we then see that we do have integral action for output 1, but not for outputs 2 and 3. We should therefore expect steady-state offset in tank 3. However, the simulations in Figure 4.7(a) show no offset. The reason is that the integral effect in the first 4.4 Case study: pH neutralization 3 2 1 0 93 3 2 1 0 pH in tank 1 pH in tank 2 4 pH in tank 1 pH in tank 2 4 2 2 8 pH in tank 3 8 6 pH in tank 3 6 1 1 Control inputs u, scaled Control inputs u, scaled 0 −1 0 0 50 100 150 time [s] 200 250 ) and reduced ( 100 150 200 250 (b) MPC with measurement in first tank only: With a perfect model the response is as for the “full” MPC controller. With model error, i.e., simulated on the “realistic” nonlinear model, the response is poor and drifts away (dotted line for pH in tank 3). 50 time [s] (a) Full multivariable control: A large improvement in nominal performance is possible with a MPC-controller compared to pure local feedback. Figure 4.7: Full ( occurs at .) −1 0 ) MPC (Disturbance in inlet concentration Chapter 4. Control Design for Serial Processes 94 1 10 3 10 K12 K13 u1 e 1 K11 −4 −3 10 10 1 3 10 10 K22 K23 e u2 2 K21 −4 −3 10 10 3 1 10 K32 10 K33 e 3 u3 K31 −3 10 −4 −5 0 10 10 y1 −5 0 10 10 y2 −5 0 10 10 y3 (a) of the control elements of the Gain MPC (solid). Also shown: Local PID controllers and manually designed feedforward elements (dashed). 10 −4 0 10 10 yr1 −4 0 10 10 yr2 −4 0 10 10 yr3 (b) The gains of the sensitivity function ( +7. ) with the MPC: Steadystate offset can be expected since some of the elements related to control errors and have high gain at low frequencies. Figure 4.8: The original multivariable MPC controller: Frequency domain analysis. tank removes the concentration effect, and the “feedforward” control gives the correct compensation for the flow rate disturbance. However, if some unmodelled disturbance or model error is introduced (e.g. a constant offset in [ or a measurement error in tank 2), then we do indeed get steady-state offset. This is shown in Figure 4.9. The local PID controllers give no such steady-state offset. Modified MPC-controller with integral action In the “original” estimator used above we only estimated the inlet disturbances. We now redesign the controller by estimating one disturbance in each tank: The concentration disturbance to the first tank and disturbances in the manipulated variables in tanks 2 and 3 ( and [ ). The resulting controller gains are shown in Figure 4.10(a). With this design the gain in is low at low frequencies for all tanks (Figure 4.10(b)), and the simulations in this case give no steady-state offset (Figure 4.11). This agrees with the result from Chapter 5 that the number of disturbance estimates in the controller must equal the number of measurements. This illustrates one of the problems of the “feedforward” control block, namely its sensitivity to static uncertainty. Simulations using the perfect model may lead the designer to believe that there is integral effect in the controller even if it is not. 4.4 Case study: pH neutralization 3 2 1 0 95 3 2 1 0 pH in tank 1 pH in tank 2 4 pH in tank 1 pH in tank 2 4 2 2 8 8 pH in tank 3 6 pH in tank 3 6 1 1 Control inputs u, scaled Control inputs u, scaled 0 0 −1 0 50 100 150 time [s] 200 250 −1 0 100 150 time [s] 200 250 (b) Measurement error: At time a pH measurement error of ' is introduced in tank 2, and the steady-state pH is 5.9 instead of 7 in the last tank. (a) Unmodelled disturbance: Control input has got an offset of 0.2 (at time 0) compared to the model, and the steady-state pH is in stead of in last tank (disturbance in inlet concentration occurs at ). Figure 4.9: The original 50 MPC has insufficient integral action 3 10 K12 1 10 K13 e 1 u1 K11 −3 10 −3 10 3 10 1 K22 10 K23 e2 u2 K21 −3 10 −3 10 3 10 1 K K K 32 33 e3 u3 31 10 −3 10 −3 −5 0 10 10 y 1 −5 0 10 10 −5 0 10 10 y y 2 −4 0 10 10 −4 0 10 −4 10 r 3 10 r 2 0 10 r 1 (a) Gain of the control elements of the modified MPC (solid). Also shown: Local PID controllers and manually designed feedforward elements (dashed). Figure 4.10: Modified 10 3 (b) The elements + 7. show that there is no steady-state offset in output 3 (last tank). MPC: Frequency domain analysis. Chapter 4. Control Design for Serial Processes 96 3 2 1 0 3 2 1 0 pH in tank 1 pH in tank 2 4 pH in tank 1 pH in tank 2 4 2 2 8 8 pH in tank 3 6 pH in tank 3 6 1 1 Control inputs u, scaled Control inputs u, scaled 0 −1 0 0 50 100 150 time [s] 200 250 (a) Unmodelled disturbance: Control input has got an offset of 0.2 (at time 0) compared to the model, and with the modified MPC we get no steady-state offset. (disturbance in inlet concentration occurs at ). Step disturbance at time . Figure 4.11: Modified model errors. −1 0 50 100 150 time [s] 200 250 (b) Measurement error: At time a pH measurement error of ' is introduced in the tank 2, and now we get no steady-state offset. MPC with integral action: Closed loop simulations with 4.4 Case study: pH neutralization 97 4.4.8 MPC with input resetting In the simulations above we gave set points for the pH in each tank. Actually we are only interested in the pH in the last tank, so that giving set points for the other two is not necessary. Since we have three control inputs, this leaves two extra degrees of freedom as described in section 4.3.5, which may be used for input resetting. The MPC controller is easily modified to accommodate this. Figure 4.12 illustrates how this works after a unit step in the disturbance: At steady-state all the required change in base addition is done in the first tank. Since we do not measure the actual base addition, offsets in the control input are not compensated for. 3 10 3 2 1 0 K11 K12 K13 K21 K22 K23 K31 K32 K33 u1 pH in tank 1 −3 10 3 pH in tank 2 4 10 u2 2 8 pH in tank 3 −3 10 6 3 10 u3 1 Control inputs u, scaled 0 −1 0 −3 10 50 100 150 time [s] 200 250 (a) and are brought back to 0 (but it takes slightly more than ). Step ! disturbance at time . −5 0 10 10 −5 0 10 y 1 10 y 2 −5 0 10 10 y 3 (b) Control element gains: At steadystate the dominant control element is + . : is used to control at low frequencies. Figure 4.12: MPC with input resetting. 4.4.9 Conclusion case study The case study shows a large improvement that is obtained by the introduction of a multivariable controller instead of single loop control (Figure 4.5(a)). The improvement is caused by “feedforward” effects (Figure 4.5(c)), and with model errors, the “feedforward” may in fact lead to worse performance. Integral action or strong gain in the local controllers at low frequencies is required, even if the “feedforward” effect itself nominally give no steady-state. Feedback to upstream tanks may be used to bring the inputs to their ideal resting 98 Chapter 4. Control Design for Serial Processes positions. The example indicates that it is possible to get a good performance with careful use of a multivariable controller or a combination of local control, “feedforward” from tank 1 and 2 and possibly input resetting. 4.5 Discussion There are several ways to avoid steady-state offsets with MPC controllers. The most common method is to estimate the bias in the outputs, i.e. the difference between the predicted and the measured outputs, and compensate for this bias. However, performance is often improved by estimating input biases, or disturbances (Muske and Rawlings, 1993; Lee et al., 1994; Lundström et al., 1995). In this paper we have followed this approach. We ended up with estimating the concentration disturbance into first tank and input biases for tanks 2 and 3 (three input biases gives similar results). Our controller handles well both input disturbances (see Figure 4.7(a)) and output disturbances or measurement errors (see Figure 4.11(b)). We have also tried to estimate output biases, but this gave a very slow settling in response to inlet disturbances. The reason is the long time constants in our process, which give the output bias estimates a ramp form (Lundström et al., 1995). The controller then faces a problem similar to following a ramp trajectory. In Chapter 2 we found that the minimum volume in each tank is limited by the delays in each tank. In the present paper we found that with a multivariable controller for simultaneous control of all three tanks, these limitations are no longer valid provided a sufficiently accurate process model is used. The reason for this is that the multivariable controller does not have to wait for the measurement in last tank before it takes action (due to the “feedforward” effect). To be able to achieve a nominally perfect “feedforward” control effect, the delay from at least one control input to the output must be shorter or equal to the delay from a measurement in the disturbance to the output. The effect of model uncertainty on the feedforward control improvements must be evaluated for the process. If there is an improvement, one may design smaller tanks compared to the sizes given in Chapter 2, or reduce the instrumentation. 4.6 Conclusions An example of neutralization of a strong acid with base in a series of three tanks is used to illustrate some of the ideas in the paper. This is obviously a serial process. The example illustrates that a multivariable controller yields significant nominal improvements compared to single loop PID control (compare Figure 4.7(a) with 4.7 Acknowledgements 99 Figure 4.5(a)). This is mainly due to “feedforward” elements (see Figure 4.5(c)). Due to imperfections in the process model, including unmodelled disturbances, an efficient feedback effect must also be included. To obtain this one must: include measurements late in the process. include integral action if offset free steady-state is important. For MPC control, the use of input error estimates is one efficient method, which requires that the disturbance vector is chosen with some care. Testing of the controller on a too idealistic process model may give the impression that the feedback is better than it actually is. Simulations with the multivariable controller active must include all possible disturbances, model offsets (for example one may apply the controller on a more realistic (nonlinear) process model) and also offsets in the measurement signals. Assuming no active constraints, a linear analysis may be used to analyze the controller. The frequency dependent gain in each channel may give insight into how the controller utilize each measurement and the magnitude of the control actions for each input. The steady-state behaviour can be seen from the low frequency gains. But often more than one channel in a row have high gain at low frequencies, for example when inversed based methods like IMC is used, and then it is difficult to interpret the result. It is then better to consider the elements of the sensitivity function matrix. An offset-free steady-state control for a specific output requires that all the elements in the corresponding row have low gain at low frequencies. When designing the controller one must also consider which of the outputs that is really important. If the number of inputs exceed the number of (important) outputs, one may either give set-points to other (less important) outputs, or one may let the controller bring some of the inputs back to ideal resting positions. In this study we used multivariable MPC, but very similar results have also been found for a multivariable -controller (Faanes and Skogestad (1999), i.e., Thesis’ Appendix A). 4.7 Acknowledgements Financial support from the Research Council of Norway (NFR) and the first author’s previous employer Norsk Hydro ASA is gratefully acknowledged. References Buckley, P. S. (1964). Techniques of Process Control. John Wiley & Sons, Inc.. New York. 100 Chapter 4. Control Design for Serial Processes Faanes, A. and S. Skogestad (1999). Control structure selection for serial processes with application to pH-neutralization. Proc. European Control Conferance, ECC 99, Aug. 31-Sept. 3, 1999, Karlsruhe, Germany. Lee, J. H., M. Morari and C. E. Garcia (1994). State-space interpretation of model predictive control. Automatica 30(4), 707–717. Lewin, D. R. and C. Scali (1988). Feedforward control in presence of uncertainty. Ind. Eng. Chem. Res. 27, 2323–2331. Lundström, P., J. H. Lee, M. Morari and S. Skogestad (1995). Limitations of dynamic matrix control. Comp. Chem. Engng. 19(4), 409–421. Marlin, T. E. (1995). Process Control. Designing Processes and Control Systems for Dynamic Performance. McGraw-Hill, Inc.. New York. McMillan, G. K. (1982). Effect of cascade control on loop performance. Proc. ACC ’82, Arlington pp. 363–368. McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. Morari, M. and E. Zafiriou (1989). Robust Process Control. Prentice Hall. Englewood Cliffs, N.J., USA. Morud, J. (1995). Studies on the Dynamics and Operation of Integrated Plants. PhD thesis. Norwegian Unitversity of Science and Technology. Morud, J. and S. Skogestad (1995). The dynamic behavior of cascade processes with application to distillation columns. Presented at AIChE Annual Meeting, Miami Beach, Nov. 12-17 1995, Paper 189b. Morud, J. and S. Skogestad (1996). Dynamic behaviour of integrated plants. J. Proc. Cont. 6(2/3), 145–156. Muske, K. R. and J. B. Rawlings (1993). Model predictive control with linear models. AIChE Journal 39(2), 262–287. Rivera, D. E., M. Morari and S. Skogestad (1986). Internal model control. 4. PID controller design. Chem. Engn. 25, 252–265. Scali, C., M. Hvala and D. R. Lewin (1989). Robustness issues in feedforward control.. ACC-89 pp. 577–581. Shinskey, F. G. (1973). pH and pIon Control in Process and Waste Streams. John Wiley & Sons. New York. Skogestad, S. (1996). A procedure for SISO controllability analysis - with application to design of pH neutralization processes. Computers Chem. Engng. 20(4), 373–386. REFERENCES 101 Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Walsh, S. (1993). Integrated Design of Chemical Waste Water Treatment Systems. PhD thesis. Imperial College, UK. Zhou, K., J. C. Doyle and K. Glover (1996). Robust and Optimal Control. Prentice Hall. New Jersey, US. Ziegler, J. G. and N. B. Nichols (1942). Optimum settings for automatic controllers. Trans. ASME 64, 759–768. Chapter 4. Control Design for Serial Processes 102 Appendix A State space MPC used in case study Here we briefly describe the MPC controller of Muske and Rawlings (1993) under the assumption that the constraints are not active. For details we refer to Chapter 5. The MPC controller uses an estimate of the current states of the process and a state space model to predict future responses to control input movements. By letting the control input change each time step over a certain horizon, and thereafter held constant, the optimal sequence of control inputs is calculated. The criterion for the optimization is C 0 ,0 L (4.42) where is the vector of future control inputs, the first at sample number , is the output vector at time , is the control input at time , 0 is the change in since last time step and , and are weight matrices. Note that in the crierion we assume that the set-point for the output, . Non-zero set-points are handled by a steady-state solver. Only the first control input is applied, since at next time step the whole sequence is recalculated, starting from the states actually obtained at that moment. Without constraints the MPC can be represented as state feedback control, i.e. the control input at time step no. can be expressed by (4.43) where is the state vector at time and and are constant matrices, independent of time provided the model is assumed time invariant. The dependence of the control input at the previous step, , comes from the weight on change in in the optimization criterion. Since all the states are not measured, we estimate them for example with a Kalman filter. For the MPC algorithm we use a discretized model with time step 1 second and use a zero order hold method for the discretization since the inputs are held constant between the time steps. In the discretized model time delays are represented exactly, as long as they are multiples of the time step. In Chapter 5 we derive a state space formulation for the controller and the estimator: (4.44) (4.45) where is the control input at sample number , is the controller/estimator state vector, is the measurement vector and the reference, which may be seen as a disturbance to the controller. , , , , and are constant matrices. Appendix A State space MPC used in case study 103 For frequency analysis of the controller we may convert this discrete controller into a continuous one using d2c in Matlab (Tustin method), and Laplace transform yields: (4.46) We have chosen weights in the MPC optimization criterion as > , and in the MPC optimization criterion (4.42). For the estima tor the co-variance matrices are (process noise) and (measurement noise). Chapter 4. Control Design for Serial Processes 104 Appendix B Derivation of equations (4.20) and (4.31) With pure feedforward control we get the following control error E L C (4.47) where we have inserted feedforward from unit from (4.17). With a combination of feedback and feedforward control we get (with (4.17)) L (4.48) In both cases “ideal” feedforward requires E for all and : C L (4.49) We consider first pure feedforward, , and find the transfer function from to : (4.50) E C yields C L (4.51) and upon inserting (4.51) into (4.49) we obtain C L C leading to (4.20). Second, we find the transfer function from local feedback and feedforward, L to for a combination of where . Then C L (4.52) (4.53) and by inserting this into (4.49) it follows C which gives (4.31). L X C L (4.54) Chapter 5 On MPC without active constraints Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Submitted to Modeling, Identification and Control, MIC. also affiliated with Statoil ASA, TEK, Process Control, N-7005 Trondheim, Norway Author to whom all correspondence should be addressed. E-mail: [email protected], Tel.: +47 73 59 41 54, Fax.: +47 73 59 40 80 106 Chapter 5. On MPC without active constraints Abstract In order to be able to use traditional tools when analysing a multivariable controller as MPC, we develop a state space formulation of the resulting controller for MPC without constraints or assuming that the constraints are not active. Such a derivation was not found in the literature. The state space formulation is used in Chapters 4 and 7. The formulation includes the state estimator. The MPC algorithm used is a receding horizon controller with infinite horizon based on a state space process model. When no constraints are active, we obtain a state feedback controller, which is modified to achieve either output tracking, or a combination of input and output tracking. When the states are not available, they need to be estimated from the measurements. It is often recommended to achieve integral action in a MPC by estimating input disturbances and include their effect in the model. We show that to obtain offset free steady state the number of estimated disturbances must equal the number of measurements. The estimator is included in the controller equation to obtain the overall controller with the set-points and measurements as inputs, and which give the manipulated variables. One use of the state space formulation is to combine it with the process model to obtain a closed loop model. This can for example be used to check the steady-state solution and see if integral action is obtained. 5.1 Introduction 107 5.1 Introduction In this paper, we develop a state-space formulation for a MPC without constraints or assuming that the constraints are not active. This state-space formulation of the controller enables the use of traditional tools to get insight into how the controller behaves (see Chapters 4 and 7). Maciejowski (2002) (independently) use a linear formulation for a MPC controller to analyze its controller tuning for a paper machine headbox. He combines the linear controller formulation with the process model, and calculates the singular values of the sensitivity function and the complementary sensitivity function. The main idea behind MPC is that a model of the process is used to predict the response of future moves of the control inputs (the inputs that the controller can manipulate to control the process). This prediction is used to find an optimal sequence of the control inputs. Optimal means that a certain criterion containing an output vector and the vector of the control inputs is minimized. In most MPC implementations the control inputs are assumed to be held constant within a given number of time intervals. At a given time, the first value in the sequence of control inputs is implemented in the process. The prediction depends on the current state of the process, and this will also the optimal sequence do. At the next time step, the state being reached is therefore used in the calculation of a new optimal control input sequence. This sequence will not necessarily be what was computed at the previous time step, due to the effects of model errors and unmodelled disturbances. So, at each time step we only implement the first step in the control input sequence, and discard the rest. Normally we include constraints in the optimization problem. These are constraints that naturally occur in a process, like the range of control valves and pump speeds (on control inputs), and safety-related constraints on the outputs. One may also restrict the rate of change of the control inputs. For a review of industrial MPCs we refer to (Qin and Badgwell, 1996; Badgwell and Qin, 2002). In this chapter, we consider the MPC formulation proposed by Muske and Rawlings (1993). This MPC is based on a state-space model. Our assumption is that no constraints are active, and this also covers the case when the same constraints are active all the time and the degree of freedom is reduced. Bemporad et al. (2002) (first appeared in (Bemporad et al., 1999)) have shown that the controller also for the case with dynamic constraints is piecewise linear. Since the models are not perfect, and there always are unmodelled disturbances, the MPC needs some correction from measurements. The most common approach is to estimate some output bias in the measurements, and correct for this bias. However, for integrating processes or processes with long time constants, this method has proved unsatisfactory (Muske and Rawlings, 1993; Lee Chapter 5. On MPC without active constraints 108 et al., 1994; Lundström et al., 1995). We therefore estimate input disturbances, which is straight forward using a state-space representation of MPC. As known, MPC without constraints is a special case of optimal control, and in Sections 5.2, 5.3 and 5.4 we will demonstrate how the control input can be expressed by the current state and the previous control input. The first of these sections, Section 5.2, covers the simple case when the reference for the output vector is zero, while Section 5.3 handles non-zero references. When the number of control inputs exceeds the number of outputs, the extra degree of freedom may also be used to give references to the control inputs (Section 5.4). Since the full state vector normally is not measured, we include a state estimator, which also estimates input disturbances, in Section 5.5. The total controller formulation, i.e., the control inputs, given by the measurements, is given in Section 5.6. In Section 5.7 we find the number of estimated disturbances needed to obtain effective integral action. We develop the closed loop model of the system in Section 5.8. 5.2 Derivation of equivalent controller from receding horizon controller without active constraints Muske and Rawlings (1993) present a model predictive control algorithm based on the following state-space model: ; 777 (5.1) (5.2) Here is the state vector, the control input vector, the vector of (unmeasured) disturbances and the output vector, all at time . The model is assumed to be time invariant so , and are constant matrices. The optimal control input minimizes the following infinite horizon criterion: C 0 ,0 L (5.3) 777 Here is a vector of future moves of the control input, of which only the first is actually implemented. The control input, , is assumed zero for all . In the criterion it is assumed that the reference for is zero. We assume that the process is stable, and Muske and Rawlings (1993) show how this formulation can be transformed into the following finite optimization problem: C L ;RC L (5.4) 5.3 The steady-state solution 109 where , and are time independent matrices expressed by the model ma trices, , and , and the weight matrices, , and . Since is unknown in the future, the term from (5.1) is omitted in the derivation of (5.4). For normal use of this MPC algorithm, the control input is found by optimizing (5.4) subject to given constraints on the outputs, the control inputs and changes in the control inputs. Assuming no active constraints, however, the optimum of (5.4) can be found by setting the gradient equal to zero (Halvorsen, 1998): C L ; which implies Only the first vector from ; (5.5) (5.6) is applied: (5.7) and , respectively, where and consist of the first rows in and is the number of control inputs. Since , and are constant, also and are constant matrices. The first term can therefore be recognized as state feedback. The second term comes from the weight on the change in control input from the original criterion. The matrix only contains and zeros, so when no weight is put on the change in the control input, is zero, and . 5.3 The steady-state solution Here, we consider tracking of outputs. If the output reference vector, , is nonzero, (5.7) must be shifted to the steady-state values for the states and the control inputs: (5.8) or and can be found from the steady-state solver: subject to (5.9) (5.10) (5.11) Chapter 5. On MPC without active constraints 110 '1 '1.354 (5.12) where and are the references for the output and the control input, respectively. Again, we assume that the limitations are never active, and that we have no extra freedom for the control inputs (number of control inputs equals number of outputs), in which case the problem reduces to solving the equation set (5.11). Assuming square systems (i.e., equal number of control inputs and references), invertible) and that is no poles in the origin (which makes invertible (it is at least quadratic from the first assumption), we get the following solution: (5.13) where C L C C C L L L (5.14) (5.15) Since we have no knowledge of future disturbances, we assume that it will keep as desired, and that its current value, that is . We note that if we assume that the disturbance enters via the control inputs, i.e., , the expression for simplifies to where and are defined in Section 5.2 and i.e., and . Now (5.9) can be expressed with and : (5.16) (5.17) (5.18) 5.4 Generalization with tracking of inputs In this section, we generalize the steady-state solution to include tracking of both inputs and outputs. The total number of references that it is possible to track is limited by the number of (independent) control inputs. 5.4 Generalization with tracking of inputs 111 We collect the inputs that we want to give a reference into the vector , and likewise the outputs we want to give a reference into . The rest of the inputs and outputs are assembled into and , respectively. The model may now be formulated as (5.19) two matrices 1 and where we have distributed the columns of into the corresponding to the division of , and the rows of is divided into and corresponding to the division of . At steady state and . Now and can be expressed by , , and ( ): where C C (5.20) (5.21) L L L (5.22) (5.23) are invertible. For we obtain and L L C L where Introduction of and C C C provided that (5.26) (5.27) (5.24) (5.25) yields (5.28) Chapter 5. On MPC without active constraints 112 5.5 State and disturbance estimator To calculate from (5.16) or (5.28) one must know the state, , and if it is not measured, it must be estimated from the measurements. The same applies also to the disturbance vector . If we assume that neither the states nor the disturbances are measured, we extend the state variable with the disturbance vector (5.29) As basis for a state estimator the following model based on (5.1) and (5.2) is introduced: (5.30) (5.31) where and are zero-mean, uncorrelated, normally distributed white stochas tic noise with covariance matrices of and respectively, and not necessarily the same as the output vector is the measured output vector, that shall track a reference, and is the corresponding matrix in the estimator model, mapping from the states to the measured output vector. We have modelled the disturbance as constant except for the noise. The augmented state estimator is then formulated as (5.32) (5.33) where is the estimator gain matrix, for example the Kalman filter gain. is called the a priori estimate (since it is prior to the measurement), and the a posteriori estimate (after the measurement is available). For a Kalman filter, is given by the solution of a Ricatti equation: (5.34) (5.35) We want to express the estimator in a single expression, and this can be done in two ways, depending on which of the two estimates one prefers to use. Alternative 1: A posteriori estimate, : (5.36) 5.6 State-space representation of the overall controller Alternative 2: A priori estimate, : 113 (5.37) Remark 1 Muske and Rawlings (1993) refer to Åström (1970) who used a priori estimate (Alternative 2), (noting that their corresponds to our ). However, according to (Rawlings, 1999) they actually used Alternative 1 (a posteriori) in their work. Normally the control input is implemented directly after a new measurement has been sampled, in which case the a posteriori estimate is preferred since it utilizes this new measurement. Thus, in this paper we will use Alternative 1, the a posteriori estimate. 5.6 State-space representation of the overall controller In this section, we will form the overall controller, containing the state feedback, the steady-state solution and the estimator on state-space form. With the extended state vector from (5.29) and (5.38) the controller equations (5.16) and (5.28) can both be expressed by (5.39) For (5.16) (without input resetting) and . Since generally is not available, we use the estimate . Combination of the controller equation (5.39) with the estimator difference equation (5.36) yields where (5.40) (5.41) . This is not an ordinary discrete state-space formulation. First, and do not have the same index on the right side of (5.40). To overcome this we introduce the artificial state variable : (5.42) (5.43) Chapter 5. On MPC without active constraints 114 Next, the term is a problem. We first assume that in the optimization criterion (5.3) . Then , and we get an ordinary discrete state-space system with as the states, as the input and as the output. The reference, , can be seen as a ”disturbance” to the controller. We may express the controller as where , , , , (5.44) and . For we have not yet obtained the controller on ordinary state-space form. We first express the controller as insert for in the expression for and . (5.45) (5.46) and re-arrange: where in addition to the definitions above We repeat shifted one time step, (5.47) We now introduce the state vector and obtain (5.48) (5.49) 5.7 On the number of estimated disturbances Again, we have which yields For we obtain in the expression for , and introduce 115 (5.50) (5.51) (5.52) which yields the following expression for the total controller: where (5.53) In summary, we have shown that with no active constraints, the MPC controller with augmented state estimator can be expressed on discrete state-space form. If we instead use the a priori estimate (Alternative 2), we get a different controller with other poles. 5.7 On the number of estimated disturbances In this section, we will discuss the number of estimated disturbances (the dimension of ) necessary to avoid steady-state offset. According to Muske and Rawlings (1993), the number of elements in can not exceed the number of measurements if observability of the estimator shall be achieved. But what is the smallest number required? Chapter 5. On MPC without active constraints 116 We first have to specify clearer what ”no steady-state offset” means. If the process is perturbed by measurement noise and disturbances that change their value from time step to time step, the control will never be offset free, and no steady state will be obtained. Thus, we will consider the response when the noise, the model error and the disturbances are constant. (Alternatively, one may model noise, model error and disturbances as stochastic processes and consider a large number of experiments.) Using as before the a posteriori estimate, the estimate of the measurement is (5.54) In order to obtain a offset free steady state, the estimator must provide a correct state estimate for the MPC despite model errors, constant measurement errors or noise and a constant input disturbance at steady state. More precisely, the prediction of the measured output must equal the actual one: (5.55) We let index to denote steady state. We want to see what this condition means for our MPC and estimator, and first we extract the expression for from the estimator equation (5.36): (5.56) is the upper part of , corresponding to the dimension of . At steady where state which yields (5.57) (5.58) To find we cannot use (5.13) or (5.20) since these include the actual state and disturbance vectors and not their estimates. Instead we apply (5.39) which yields for the steady-state control input (5.59) We insert this into (5.58) and obtain C C LL C L (5.60) 5.7 On the number of estimated disturbances 117 To simplify the notation we introduce the matrices [ [ Thus (5.54) and (5.55) yields [ [ [ [ which leads to the following matrix equation (5.61) (5.62) (5.63) and obtain for the a posteriori state estimate [ [ (5.64) (5.65) (5.66) In (5.66) the number of scalar equations equals the number of measurements ). The only free variables are the elements of . To (the number of rows in obtain an offset free steady-state solution of the control problem there must exist a solution of (5.66), which implies that the number of elements in must be equal or greater than the number of measurements (independent of the size of the reference, , and the number of control inputs, ). Thus, since the number of estimated disturbances cannot exceed the number of measurements (see above), we may conclude that: If offset free steady state shall be obtained, the number of estimated disturbances must be equal to the number of measurements. This was, independently, also found by Muske and Badwell (2002), except that they do not distinguish between outputs to be controlled by the MPC and the measurements. Such a distinction proves to be useful in Chapter 7, where an experimental illustration is given. Remark 2 In the general case (5.66) cannot be used to determine given and . It will often be many that fulfills (5.66), and the value of will depend on the disturbance, measurement or model error that is present. Example 5.1 For the neutralization example in Chapter 4 we use three measurements, and thus estimation of three disturbances is required. For the ”original” MPC we only estimate two input disturbances, and the result is insufficient integral action, as expected. The modified MPC with three disturbance estimates gets full integral action. Chapter 5. On MPC without active constraints 118 5.8 Closed loop model The combination of the process model with the controller yields the closed loop model of the system. The process is expressed by the discrete model (5.1) and (5.2) which we repeat for the actual process, marked with a prime: The vector of measurements, ; 777 (5.67) (5.68) , is expressed by (5.69) where is the matrix mapping from the states to the measured output vector and is the measurement error. The controller is expressed by (5.44) or (5.39). and are then eliminated from the equations by combining the controller with (5.67), (5.68) and (5.69). We then get the following closed loop model (where we have omitted the tilde in the controller matrices from (5.39)): (5.70) (5.71) (5.72) We combine the process states, , and the controller states, into and obtain the following model where 0 0 (5.73) (5.74) (5.75) (5.76) (5.77) (5.78) (5.79) 5.8 Closed loop model 119 One possible use of the closed loop model is to study the steady state of input steps. Introducing the time-shift operator E where is the time step, gives 0 The z-transform of a unit step is inputs at a time. This may be formulated as (5.80) . We apply a unit step on one of the (5.81) where , and are vectors with zeros except one element equal . From see e.g., (Phillips and Harbor, 1991, p. 452), we have (5.82) and thus 0 0 Thus the matrices 0 , and 9 (5.83) reveal the steady-state effect of a unit step in each of the inputs on each of the outputs. For gives the steady-state effect of a example, element 5; in matrix unit step in disturbance no. on output no. ; (when the controller is applied). Example 5.2 For the neutralization example in Chapter 4 we get for the ”original” MPC with estimation of disturbances into first tank only (resulting in insufficient integral action): Q "! 0 <DQ ""! N Q "! : Q S Q "& Q HV ; Q 67 : Q ; Q "& 6 Q ""& Q " : Q ; Q "& 6 (5.84) (5.85) ; Q 7 R RQ H V ; Q [ : Q [ (5.86) We see that we get significant deviations from set point when measurement errors are present. For example, a measurement error of 1 in measurement no.1 gives a Chapter 5. On MPC without active constraints 120 deviation from set-point of 1 in output 3 (element in the matrix in (5.86)). With disturbances in all outputs (and full integral action), we obtain RQ "& 0 Q S Q "! Q "& P : Q S ; Q "HV <RQ "! P ; Q " S Q Q " & Q 6<DQ " & Q : Q S Q "& (5.87) (5.88) : Q N Q> : Q ""! N >Q " Q - 6:DQ "! (5.89) and there are no significant steady-state errors. 5.9 Conclusions In this paper, we have developed a state-space formulation for a MPC (for stable processes) without constraints or assuming that the constraints are not active. This state-space formulation of the controller makes it possible to use traditional tools to get insight into how the controller behave (see Chapters 4 and 7). The controller can be extended with tracking of inputs, and also include the state estimator necessary if not all the states are measured. To obtain offset-free tracking, estimates of the input disturbances are included in the estimator and in the calculation of steady state. We show that the length of this estimated disturbance vector must equal the number of measurements available to the estimator. Finally, a closed loop state-space formulation is derived, assuming a statespace formulation of the process model. References Åström, K. J. (1970). Introduction to Stochastic Control Theory. Mathematics in Science and Engineering. Academic Press. New York San Francisco London. Badgwell, T. A. and S. J. Qin (2002). Industrial model predictive control - an updated overview. Process Control Consortium, University of California (UCSB), March 8 9, 2002. Bemporad, A., M. Morari, V. Dua and E. N. Pistikopoulus (1999). The explicit linear quadratic regulator for constrained systems. Technical Report AUT99-16. ETH, Zürich. REFERENCES 121 Bemporad, A., M. Morari, V. Dua and E. N. Pistikopoulus (2002). The explicit linear quadratic regulator for constrained systems. Automatica 38, 3–20. Halvorsen, I. (1998). Private communication. Lee, J. H., M. Morari and C. E. Garcia (1994). State-space interpretation of model predictive control. Automatica 30(4), 707–717. Lundström, P., J. H. Lee, M. Morari and S. Skogestad (1995). Limitations of dynamic matrix control. Comp. Chem. Engng. 19(4), 409–421. Maciejowski, J. M. (2002). Predictive Control with Contraints. Prentice Hall. Harlow, England. Muske, K. R. and J. B. Rawlings (1993). Model predictive control with linear models. AIChE Journal 39(2), 262–287. Muske, K. R. and T. A. Badwell (2002). Disturbance modeling for offset-free linear model predictive control. J. Proc. Cont. 12, 617–632. Phillips, C. L. and R. D. Harbor (1991). Feedback Control Systems. Prentice-Hall International, Inc.. London. Qin, S. J. and T. A. Badgwell (1996). An overview of industrial model predictive control technology.. Presented at Chemical Process Control-V, Jan 7-12, 1996, Tahoe, CA. Proceedings AIChE Symposium Series 316 93, 232 – 256. Rawlings, J. B. (1999). Private communication. European Control Conference, ECC’99, Karlsruhe, September 2, 1999. Chapter 6 Feedforward Control under the Presence of Uncertainty Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Preliminary accepted for publication in European Journal of Control Abstract In this paper we study the effect of model errors on the performance of feedforward controllers. In accordance with the sensitivity function for feedback control, we define the feedfor ward sensitivities, (feedforward from disturbance) and (feedforward from set-point), as measures for the reduction in the output error obtained by the feedforward control. For “ideal” feedforward controllers based on the inverted nominal model, the feedforward sensitivities equal the relative model errors, which must thus remain less than for feedforward control to have a positive (dampening) effect. For some common model error classes we provide rules for when the feedforward controller is effective, and we also design -optimal feedforward controllers. Keywords: Process control, Linear systems, Feedforward control, Uncertainty also affiliated with Statoil ASA, TEK, Process Control, N-7005 Trondheim, Norway Author to whom all correspondence should be addressed. E-mail: [email protected] also to be presented at European Control Conferance, ECC’03, September 1-4, 2003, Cambridge, UK 124 Chapter 6. Feedforward Control under the Presence of Uncertainty 6.1 Introduction There is a fundamental difference between feedforward and feedback controllers with respect to their sensitivity to uncertainty. Feedforward control is sensitive to uncertainty in general (including steady state), whereas feedback control is insensitive to uncertainty at frequencies within the system bandwidth. With no model error a feedforward controller may remove the effect of disturbances, but due to its dependence of the process model, it may actually amplify the effect of a disturbance if the model is faulty. Textbooks on control and process control focus mainly on feedback controllers. This reflects the difference in importance and popularity of the two controllers, but also that feedback theory is more complicated. Most of the articles on feedforward control refer to industrial applications. However, some control textbooks, e.g., Buckley (1964), Stephanopoulos (1984), Doebelin (1985), Seborg et al. (1989), Middleton and Goodwin (1990), Coughanowr (1991), Marlin (1995), Ogata (1996), Shinskey (1996), describe feedforward controllers and their design, and the advantages and disadvantages compared to feedback is discussed. It is concluded that a feedforward controller may improve the performance, and is valuable when feedback control is not sufficient, but that in practice it must be combined with a feedback controller. It is agreed that the feedforward controller is most efficient if good disturbance measurements and accurate models are available, but no quantitative analysis is given (with some exceptions as given in the following). Harriott (1964) claims that in a “typical system” the disturbance effect is reduced to ; 2 . Middleton and Goodwin (1990) demonstrate that the variation in the gain from the inputs to the outputs (the process uncertainty) is amplified with feedforward control. Shinskey (1996) states that the integrated error of the output signal can be reduced by a factor of 10 even if the feedforward calculation has 2 error, and that mass- and energy balance based feedforward controllers typically has less than ; 2 error, leading to a reduction in integrated output error with a factor of 50. Shinskey also provides an interesting figure showing nine different responses to disturbance steps for a process with a pure gain (static) feedforward controller. The nine cases are the combinations of neglected time constants and delays in the transfer functions from the disturbance and the manipulated variable to the output (Shinskey, 1996, Figure 7.12). The figure may also be used for dynamic feedforward controllers as a qualitative illustration of the effect of errors in delays or time constants on disturbance step responses. (Note that Shinskey assumes that the disturbance has a negative effect on the output, in contrast to what we assume in the present paper.) In the context of IMC (Internal Model Control), Morari and Zafiriou (1989) recommend a structure for the combined feedback-feedforward scheme that decouples the two functions such that the feedforward controller handles disturbance 6.1 Introduction 125 dampening and the feedback controller handles reference tracking. This is exploited in the controller tuning (assuming perfect models) since the two controllers can be tuned independently. The traditional controllers can then be derived from these controllers and the process models. It is shown that assuming perfect models optimal feedforward can only be better than optimal feedback if there are non minimum phase components (such as delays and inverse responses) in the process. Scali and co-workers (Lewin and Scali, 1988; Scali et al., 1989), also work in the IMC context and compare the control error of optimal feedback controllers with an optimal combination of feedback and feedforward controllers under the presence of uncertainty. The motive is to make a fair comparison, and to give methods for identifying when feedforward is worth the effort, and to quantify the benefits from accurate models. Uncertainty representations, similar to the ones we will discuss, are used. Numerical results for parametric uncertainty in first-order processes with delay are presented for different nominal values and uncertainties. Even for this simple case the picture gets rather complicated, as there are many parameters that must be varied to cover all cases, both nominal parameters as well as the parameters representing the uncertainty, so it is difficult to present the results and give general quantitative answers. The overall conclusion is that feedforward may make the performance poorer if the response to the manipulated input is considerably faster than the disturbance response and the uncertainty is large for the model of the disturbance effect. Marlin (1995) studies the effect of model errors (one at a time) by comparing combined feedforward and feedback control with the response when pure feedback is applied. The response to a disturbance step for a first order process with delay is the criterion for the comparison. From his example the feedforward reduces the control error with more than 2 for parametric errors up to 2 . A general quantitative frequency domain analysis of feedforward control under model uncertainty is proposed by Balchen (1968) (and referred in (Balchen and Mummé, 1988)). The aim of this article is to study feedforward control under the presence of uncertainty and answer the following basic questions: (1) How much does the feedforward controller reduce the control error? (2) When is the feedforward controller amplifying the effect of disturbances on the outputs? (3) If combined with feedback control, when is feedforward control necessary (and useful)? (4) How can uncertainty be taken into account when the feedforward controller is designed? 126 Chapter 6. Feedforward Control under the Presence of Uncertainty The outline of the paper is as follows. We first recapitulate the characteristics of feedforward control (Section 6.2), and then define feedforward sensitivities (Section 6.3). We then discuss the effect of model errors under feedback and feedforward control, i.e., answer questions 1 and 2 (Section 6.4) and study some classes of model uncertainty in Section 6.5. We illustrate some of the ideas with an example (Section 6.6). Question 3 is discussed in Section 6.7. Proposals to answers of Question 4 are given in Section 6.8. The article is concluded by Section 6.9. 6.2 The characteristics of feedforward control A block diagram where feedforward from a disturbance and the reference is combined with feedback, is shown in Figure 6.1. To analyze the effect of a given feedforward controller, we denote the feedback controller and the feedforward action from the disturbance and the reference . With perfect measurements we then have (see Figure 6.1) ; <> = ? Feedback ; <>= ? (6.1) Feedforward Some important characteristics of the “traditional” feedforward controller are: d Gdm dm Kff yr + Gd r Kff,r ff -e - K + + + u ym + G y + Gm Figure 6.1: Block scheme for feedforward control combined with a feedback controller. We assume ideal measurements: and . (1) The basic task of a feedforward controller ( and ) is to use the process input, , to reduce the effect of measured disturbances and improve set-point tracking. 6.2 The characteristics of feedforward control 127 (2) Feedforward control is “open loop” since the disturbance measurement, , and the reference (which are used by the feedforward controller) are independent of . (3) For linear systems, the feedforward controller does not influence the stability of the system. (4) The feedforward controller uses a model of the process ( and ). If the model is faulty, then the controller based on this faulty model will not yield the desired performance, and the controller may even amplify the effect of the disturbance. (5) Normally the effect of the disturbance is observed earlier in the disturbance measurement than in the other process measurements. (6) Referring to Figure 6.1, the closed loop response for the combination of feedforward and feedback control is (6.2) where is the feedback sensitivity function. E Ideal feedforward control An “ideal” feedforward controller, which is based on inverting the nominal model (e.g., (Balchen, 1968; Balchen and Mummé, 1988) and (Morari and Zafiriou, 1989)), removes completely the effect of the disturbance and reference changes such that E . We denote the “ideal” controller with an asterisk, and get from (6.2) (6.3) Designs of robustly optimized ( -optimal) feedforward controllers presented later in this paper, confirm that this is a good controller as to use in some practical cases. However, there are three reasons why ideal feedforward control (E ) may not be achieved in many cases: (a) The ideal feedforward controller in (6.3) may not be realizable. First, if is non-minimum phase, it cannot be inverted. Second, if has more ? , the inverse is improper and repoles than zeros, e.g., quires differentiation. Because of measurement noise higher-order derivatives are normally avoided (Harriott, 1964). Thus we divide into a (prac, such that tically) invertible part, , and a not invertible allpass part, Chapter 6. Feedforward Control under the Presence of Uncertainty 128 (Holt and Morari, 1985a; Holt and Morari, 1985b). Morari and Zafiriou (1989) derive the -optimal feedforward controller (in the context of IMC). A simpler alternative that we will use here is (6.4) (6.4) has a optimal -norm ( -optimal for impulse disturbances on the output, , and impulses in the reference). (b) The ideal feedforward controller in (6.3) is also not realizable if the number of outputs exceeds the number of manipulated inputs (the length of exceeds the length of ). One must then control the (most) important outputs (reducing the length of till it equals the length of ), or find some compromise between the outputs, for example use the pseudo-inverse of . (c) The model used in the design of the feedforward controller differs from the actual plant. This is the main topic of this paper. 6.3 Feedforward sensitivity functions The closed loop response for combined feedforward and feedback control in (6.2) may be rewritten as follows E (6.5) where we define the feedforward sensitivities as (6.6) (6.7) These express the effect of feedforward action on the control error. denotes the generalized inverse of (Zhou et al., 1996, page 67). Feedback control is effective and improves performance as long as the gain of the sensitivity function $ . Similarly feedforward control improves the performance if $ and $ (6.8) Here, an appropriate norm dependent on the definition of performance is used. With no feedforward control , and with “ideal” feedforward control . In the literature and are also denoted control ratio and feedforward control ratio, respectively (Balchen and Mummé, 1988). More precisely, in (Balchen 6.4 The effect of model error with feedforward control 129 and Mummé, 1988), the feedforward control ratio is defined for single-input/singleoutput (SISO) controllers as (6.9) where is the actual feedforward controller and is the “ideal” controller for the actual process. For SISO controllers this is identical to the definition in Equation (6.6). Balchen uses a Nichols chart to determine requirements on the gain and phase error in relative to for a given disturbance dampening (e.g. 0.1) in . The Nichols chart used to be convenient for the study of given a transfer function . With tools like Matlab, it is now easy to study any transfer function by defining a finite number of frequencies and calculate the gain or phase shift over this set of frequencies. We follow this direct approach. 6.4 The effect of model error with feedforward control In this section we restrict ourselves to single-input/single-output (SISO) processes, i.e., with one control input, , one disturbance, , and one output . With a nom , and an actual plant model , inal process model, the actual control error is: E C where L (6.10) (6.11) (6.12) (6.13) expresses the ratio between the output when controller is applied a feedback and when it is not (open loop). Similarly, and express the ratio of the output when feedforward is applied and the output when it is not. This follows by comparing the output error using control in (6.10) with the output error when no control is applied ( ): E Note case with no control ( that for the , , . , (6.14) , ), we have Chapter 6. Feedforward Control under the Presence of Uncertainty 130 The actual sensitivity can be expressed in terms of the nominal sensitivity and the relative error as following (6.15) and Here, are the nominal sensitivity and complementary sensitivity functions, respectively, and the relative error in , i.e., (see also (Skogestad and Postlethwaite, 1996, Section 5.13)). The “ideal” feedforward controller (6.3) gives with no model error With model error we get the result (6.16) (6.17) (6.18) Here, is the relative and the relative error in . Thus for error in “ideal” controllers, and are equal to (except for the sign) the relative model errors in and , respectively, and we have that the “ideal” feedforward action reduces the control error for a frequency , as long as the relative modelling errors are less than one, i.e., $ $ (6.19) (6.20) In Section 6.8 we discuss how to modify the ideal feedforward controller such that '$ . However, the nominal performance becomes worse. If is not invertible, we obtain for the feedforward controller, in (6.4) (6.21) (6.22) For a given process and the knowledge of its uncertainty we can use (6.19) and (6.20) to see whether an “ideal” feedforward controller will be effective. This can be used to consider whether the extra controller shall be implemented, and if 6.4 The effect of model error with feedforward control 131 other control configurations or even process modifications are necessary to obtain the desired response (e.g., introduction of buffer tanks, see Chapter 3). If the model error (uncertainty) is sufficiently large, such that the relative error in is larger than , then we see from (6.17) that is larger than and feedforward control makes control worse. This may quite easily happen in practice. For example, if the gain in by 33% and the gain in is @ @ is increased [ [ I @ , @ , reduced by 33%, then & S ; R . In words, the I feedforward controller overcompensates for the disturbances, such that its negative counteractive effect is twice that of the original effect. Another important insight from (6.10) and (6.17) is the following: To achieve E #$ for with feedforward control only ( ) we must require that the relative model error in is less than . This requirement is unlikely to be satisfied at frequencies where is much larger than (see the following example) and motivates the need for feedback control in such cases. Example 6.1 Consider a plant with > > (6.23) The objective is to keep '$ for , but note that the disturbance gain gives at steady state is 8 . Nominally, the feedforward controller perfect control, . Now we apply this controller to the actual process where the gains have changed by 2 (6.24) From (6.10) the disturbance response in this case is 6 7 >; ; ; (6.25) Thus, for a step disturbance of magnitude , the output will approach ; (much larger than ). This means that we need to use feedback control, which is hardly affected by the above model error. There is some benefit in using feedforward control, though. The feedback control is required to be effective at all frequencies where the gain from the disturbance to the output is larger than 1. Without feedforward control the feedback loop must be effective up to P Y? > . The feedforward controller brings this limit down to about ; ; . In other words, the feedforward controller reduces the bandwidth requirement for the feedback controller from to ; . 132 Chapter 6. Feedforward Control under the Presence of Uncertainty 6.5 Some classes of model uncertainty In the following we will consider some examples of model uncertainties for ideal feedforward controllers, and use (6.19) and (6.20) to analyse when feedforward control should be used. To simplify notation we write: and . where and are conand Static gain uncertainty. Let stants. (Nominally, and and a 82 gain error corresponds to ; and ; .) In this case we have from (6.19) that ideal feedforward control reduces the error from the disturbance, , as long as $ $ ; $ (6.26) and from (6.20) for the reference as long as H$ $ $ ; (6.27) See Figure 6.2(a). In other words, if the effect of the input changes sign (which is not very common), or is increased by more than 100% (which may easily happen), feedforward actually makes the response worse. This will also happen, as we saw above, if the gain in is increased by more than 2 and the gain in at the same time is reduced with more than 33%, since 87 > 7 N B; 7 . In the following we will only consider feedforward from the disturbance, . Delay uncertainty. We let , , and denote the delays for , , , and , respectively. We assume so that ideal feedforward control is feasible, and perfect models except for the delay. Now the feedforward sensitivity becomes E E , E E , JFE (6.28) where 0 is the error in the difference between the delays in and . The ideal feedforward control reduces the error at a frequency as long as FE ; ; 0 $ (6.29) We note that since 0 0 , the relative delay uncertainty is independent of the sign of 0 . 6.5 Some classes of model uncertainty 133 In Figure 6.2(b) we plot in (6.29) as a function of normalized frequency. At low frequencies feedforward control is perfect, but for frequencies above , feedforward has a negative effect, and in the worst 87 8 0 case (at frequency )1.354 0 ) the feedforward effect doubles the error. To avoid that the feedforward controller amplifies the control error, the feedforward control signal may be low-pass filtered with a break frequency or less. at about 0 We may find the frequency, , where analytically: >7 0 > ; 0 P 0 (6.30) To find the frequency 1.354 for the first maximum value of 2 we differentiate the expression for with respect to the frequency ; ; 0 to obtain 1.354 0 O0 ; ; 0 0 (6.31) (6.32) Uncertainty in time constants. In the general case this is more complicated to analyze than the gain and delay errors. We consider the situation where the :9 A? error is in only and is restricted to one time constant: and 9 ? where is the relative error in the time constant. We then obtain the following limit for effective feedforward ? $ (6.33) ? If ; , then ? A? is always less than or equal to one. For ; the feedforward is effective as long as ,? 6 $ ; (6.34) The maximum value of is , see Figure 6.2(c). Again this can be used to find the frequency for which the feedforward controller shall be active. The situation if there is an error in only in only . is similar to the case with error 134 Chapter 6. Feedforward Control under the Presence of Uncertainty Combined uncertainty in both gain and time constant (“pole uncertainty”). Some physical parameter changes affect both the gain and the time constant ? , such that their ratio Y? remains constant. As an example, consider the following physical state-space model with a single state @ (6.35) where is the state, is the control input (manipulated variable), output, and and are constants. Laplace transform yields C L An error in constant (? (6.36) is the (6.37) will then influence both the gain ( ) and the time R ), whereas M? remains unchanged. :9 A? and The model in (6.37) can be written on the form :9 ? , where is the relative error in the gain and the time constant (which is equal to the relative error in ). contains no ). We then obtain the following requirement for effective errors ( feedforward ? $ (6.38) The effect of model error is largest at low frequencies (below Y? ) . Feedforward has a positive effect at all where P frequencies when 8; . For $ >; , feedforward is effective at high frequencies ,? as shown in Figure 6.2(d). In other cases and consider the physical model @ and we get In this case control and gives ,? . ; (6.39) share the same dynamics. For example, and an error in (6.40) (6.41) does not affect feedforward 6.5 Some classes of model uncertainty 135 2 1.8 1.6 |Sff| α |1−___| αd 1.4 1.2 1 π 0.8 |Sff| 0.6 0.4 0.2 0 −2 10 ω ' corresponding to and . (a) Effect of gain uncertainty −1 10 0 1 10 2 10 ω|∆θ| [rad/s] 10 (b) Effect of time delay uncertainty ' where + ' . ' + ' !. , and , , and are the delays in , , and , respectively. At low frequencies the effect is zero, but for high frequencies, it doubles the worst-case error. 1 |1−___| αd αd−1 |Sff| |Sff| 1 1 1 __________ αd(αd−2) 1_ __ αd √ 0 0 ωτd (logarithmic scale) ωτd (logarithmic scale) +! " 3, 1 3 . + 3, 1 3. (c) Effect of time constant uncertainty ' , 1− 2α √ d corresponding to , . Figure 6.2: Effect of uncertainty on # (d) Effect of combined uncertainty in gain and time constant correspond ' %$ & & +' 3,21. ( +) * 3,71. ing to , . for SISO feedforward control , 136 Chapter 6. Feedforward Control under the Presence of Uncertainty Frequency domain representation of uncertainties. In (Lewin and Scali, 1988; Scali et al., 1989) combinations of the above uncertainties were examined. The analytical method we have used above is not suitable for this case, and another approach is proposed. We want to find 1.354 , i.e., the worst-case feedforward sensitivity for each frequency given the parametric uncertainty. Since it is impractical to find an analytical expression for 1.354 , we calculate its value for some where is a set of frequencies in the relevant range: ' 1.354 , (6.42) where and are vectors of the parameters in and , respectively. For each parameter we have . The optimization is in general non-convex, so that precautions must be taken to find the global optimum at each frequency. Example 6.2 We consider the following process (Skogestad and Postlethwaite, 1996, Example 7.3): ? E ; ? E , ; ? ? (6.43) (6.44) i.e., nominally and are equal, but their parameters may vary independently between ; and . Nominally 7 ; 7 ; (6.45) We find that the ideal feedforward controller from the disturbance measure ment is . Solving the optimization problem (6.42)1 gives 1.354 as shown in Figure 6.3. We can see that the ideal feedforward controller dampens the disturbance for frequencies below 7 for all combinations of the parameters. 1 The optimization problem is non-convex so we first make a uniform grid in the space spanned by the parameters and take the maximum value of + 3. for all points. The result of this is used as initial value for the routine fmincon in Matlab. AMonte-Carlo-simulation results in lower values of . + . up to a frequency higher than 6.6 Example: Two tank process 137 2 1.8 1.6 |Sff|max Magnitude 1.4 1.2 1 0.8 0.6 0.4 0.2 0 −2 10 −1 10 0 10 Frequency [rad/s] Figure 6.3: 1.354 when frequency domain uncertainty is used to represent the gain, delay and time constant uncertainties, see (6.43) and (6.44). 6.6 Example: Two tank process Example 6.3 In this example we consider feedforward control of the process illustrated in Figure 6.4(a). A hot flow with flow rate and temperature passes through tank 1 and into tank 2 where it is cooled by mixing with a cold flow with flow rate and temperature . is measured before the first tank. The outlet temperature, , shall be kept constant despite temperature variations in the hot flow. To obtain this the measurement of is used by a feedforward controller to adjust to compensate for the variations. In Appendix A we derive the model on transfer function form ? O ? A? (6.46) E where is the disturbance, is the control input and output that shall be kept constant. The parameters are defined by ? , ' and . (6.47) ? is the , Feedforward controller design The ”ideal” feedforward controller is given by (6.3): ? 2 E (6.48) Chapter 6. Feedforward Control under the Presence of Uncertainty 138 TT d=Tin FF qin Tc d u=qc Tank T1 1 q1 V1 V2 Tank y=T2 2 Kff = k'd e-θ's (τ'1s+1)(τ'2s+1) kd/k e-θs u G' = k' (τ1s+1) (τ'2s+1) +y + (b) Block diagram. Parameters derived from the nominal ' , , , data: . In addition there is a delay, . (a) Illustration of the process. ! , Nominal data: , , , ' ' - G'd = Figure 6.4: The process in Example 6.3 In Figure 6.4(b) we have illustrated the process and the feedforward controller in a block diagram. The variables of the actual plant are marked with a prime. Sinusoidal disturbances We will now see how a feedforward controller dampens the effect of sinusoidal disturbances. The disturbance has amplitude and three frequencies are considered: 7J , and ; . (These three frequencies have been chosen to illustrate $ , %P , and .) We will study six cases (the results are summarized in Figure 6.5): (a) No control. see Figure 6.5(a). In the remaining cases we use the feedforward control in (6.48). (b) Nominal case (perfect model) As seen in Figure 6.5(b), the disturbance is perfectly cancelled by the feedforward controller. (c) Gain error 7 , and no error in . Figure 6.5(c) illustrates that the feedforward controller does not help, i.e., the feedforward controller overcompensates such that the variation in has the same amplitude as without control, as expected from (6.26). This applies to all frequencies. If Actually in Example 6.3 we consider errors in the nominal model ( ), and thereby in the controller , while the actual plant ( ) is kept constant. This has the advantage that the response without control remains constant, so that it is easier to identify the effect on performance of using an incorrect model in the controller. 2 6.6 Example: Two tank process 139 the gain error is reduced, the feedforward controller has a positive effect on the dampening compared to no control, whereas if the gain error increases further above ; , the feedforward controller has a negative effect. 0 , which is 2 of the delay (see (d) Delay error Figure 6.5(d)). From (6.30) the feedforward controller has a dampening ef , as confirmed by the simulation fect up to the frequency 0 results. Even this relative small error gives a low frequency limit for where the feedforward controller is effective. (e) Error in time constant ? ? . This may be the result of operating tank 1 with a higher level than expected in the model. In Section 6.4 we found that for all frequencies, the feedforward controller has a positive effect on the dampening as long as ? $ ;Y? . When the error is larger than this than this, as it is here, feedforward control is effective (by (6.34)) for frequencies $ N 7 ;8> ; 7 ;8> . As illustrated in Figure 6.5(e) at 79 , the controller has some dampening effect, while above this frequency the controller makes the situation worse. (f) Error in gain and time constant 7 and ? 7 Y? , see Figure 6.5(f). At low frequencies the response is similar to a pure gain error, but this error gives no problems for high frequency disturbances. Step disturbances Using the same controller, the output response ( ) to a unit step in the disturbance ( ) is shown in Figure 6.6. (a) Gain errors give problems at low frequencies, and therefore we get an offset from set-point after a step disturbance (see Figure 6.6(a)). With pure feedforward this is clearly the worst error for “step like” disturbances. (b) Delay errors give problems only at high frequencies (Figure 6.6(b)), so that the deviation from set-point has a limited duration. The performance is improved compared to no control. (c) Time constant errors give only transient deviations from the set-point (see Figure 6.6(c)). (d) Combined gain and time constant errors (Figure 6.6(d)) give the same steadystate response as the gain error. But the error is smaller in the beginning, which makes it easier for feedback control. Chapter 6. Feedforward Control under the Presence of Uncertainty 140 1 1 0 0 −1 −1 0.1 0.1 0 0 −0.1 −0.1 0.02 0.02 0 0 −0.02 −0.02 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 Time [s] (a) No control 1 0 0 −1 −1 0.1 0.1 0 0 −0.1 −0.1 0.02 0.02 0 0 −0.02 −0.02 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 Time [s] 1 0 −1 −1 0.1 0.1 0 0 −0.1 −0.1 0.02 0.02 0 0 −0.02 −0.02 30 40 50 60 70 80 90 100 0 10 Time [s] 90 100 60 70 80 90 100 20 30 40 50 60 70 80 90 100 Time [s] (e) Error in time constant ( ): Improved performance only for the lowest frequency. 50 0 20 80 (d) Delay error ( ): Improved performance for , no effect for , and larger amplitude for . 1 10 70 Time [s] (c) Gain error ( ( ): Same amplitude as with no control (for all frequencies) 0 60 (b) Nominal case: Perfect control 1 0 50 Time [s] (f) Error in gain and time constant ( and ): Improved performance for the two highest frequencies. ) to sinusoidal Figure 6.5: Feedforward control of two tank process: Response ( disturbances ( : with frequencies , and % (upper, middle and lower plot, respectively) 6.6 Example: Two tank process 141 0.8 0.8 No control No control 0.6 0.6 0.4 θd′=θ θd+∆ ∆θ 0.4 kd′=2kd ∆ θ = 1, 0, −1, −2 [s] 0.2 0.2 0 0 Nominal case −0.2 −0.2 −0.4 −0.4 −0.6 −0.6 kd′=0.5kd −0.8 −0.8 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50 Time [s] Time [s] (a) Gain errors (b) Delay errors 0.8 0.8 No control No control 0.6 0.6 τ 1′ = α d τ 1 0.4 αd = 3, 2, 1, 1/2 0.2 kd′=2kd; τd′=2ττd 0.4 0.2 0 0 −0.2 −0.2 −0.4 −0.4 −0.6 −0.6 Nominal case −0.8 0 kd′=0.5kd; τd′=0.5ττd −0.8 5 10 15 20 25 30 35 40 Time [s] (c) Errors in time constant 45 50 0 5 10 15 20 25 35 40 45 50 (d) Errors in gain and time constant Figure 6.6: Feedforward control of two tank process: Response ( disturbances ( ) 30 Time [s] ) to unit step Chapter 6. Feedforward Control under the Presence of Uncertainty 142 6.7 When is feedforward control needed and when is it useful? We will now shortly discuss when a feedforward controller is needed and useful in the combination with a feedback controller. We consider a scalar system and assume that the variables are scaled, so that the disturbance is within , and the , shall stay within . We consider two cases (similar control error, E to the buffer tank design, Chapter 3: Given feedback controller (known ) Given the sensitivity function and a transfer function from the disturbance to the output of . Then feedforward is needed (with H$ ) at all frequencies where Unknown (6.49) (shortcut method) (1) Let denote the frequency up to which , such that control is needed to achieve acceptable disturbance rejection. (2) Let denote the frequency up to which feedback control is effective, i.e., .$ for all $ . Approximations of the achievable for a given process are discussed in (Skogestad and Postlethwaite, 1996, p. 173-4) and Chapter 3. It then follows that feedforward control is needed (with H$ ) in the frequency range from to . A similar rule is given by Middleton and Goodwin (1990), although they denote the desired bandwidth with no reference to how to determine this. Feedforward control may also be needed outside the range between . But at least we know that if and , namely when $ , then feedforward control (or some process or instrumentation modification) is needed. Knowing where feedforward control is needed, we may use to identify where a given feedforward controller is useful. This is illustrated in Figure 6.7. In Figure 6.7(a), the model error is so large that feedforward control has a negative effect on the performance for frequencies between and . In Figure 6.7(b) feedforward control reduces the control error for some frequencies, while at others it makes the performance worse ( ). In Figure 6.7(c) feedforward control is effective in the whole range between and . 6.7 When is feedforward control needed and when is it useful? 1 143 1 10 10 S′ff 0 10 ωd Magnitude Magnitude S′ff ωB −1 10 ωd FF useful 0 10 ωB FF neg. effect FF not necessary and may have negative effect −1 −4 −2 10 10 0 2 10 10 4 10 10 −4 −2 10 0 10 10 2 10 4 10 Frequency Frequency (a) Feedforward has a negative effect (b) Feedforward is useful at low frequencies, but has a negative effect at high frequencies 1 10 Magnitude S′ff ωd 0 10 ωB −1 10 −4 10 −2 10 0 10 2 4 10 10 Frequency (c) Feedforward is useful for all frequencies between and Figure 6.7: Examples of (a) large, (b) intermediate and (c) small relative model error, . is the bandwidth for feedback control, and is the required disturbance bandwidth. More generally, feedforward control is required at frequencies where . 144 Chapter 6. Feedforward Control under the Presence of Uncertainty Example 6.3 (continued from Section 6.6) Is the feedforward controller needed and useful? Figure 6.7 demonstrates that the feedforward controller must be effective for the frequencies where the feedback loop fails to dampen disturbances. We will here check if our feedforward controller is useful when there is a delay error in . the feedforward loop of 0 We apply feedback control using a measurement of . Because of the delay and the higher-order dynamics in tank 2, the bandwidth of this control loop is limited. We consider two different effective delays in the feedback loop: Case a) 7 N ; and Case b) . The process model is scaled assuming that the outlet temperature is allowed to vary 7 around the nominal value, and obtain a modified 7 N 7 . A PI controller with 7 Y? and ? O? : ? (SIMC tuning, see (Skogestad, 2003)) is used. Now is known, and thereby . For both cases a) and b) there is a frequency range where (see Figure 6.8). For both cases, $ $ , so feedforward control is clearly useful. For case a) the combination of feedforward and feedback gives acceptable performance with "$ . However, for case b) this is not the case, and we have an intermediate frequency range where . We note from Figure 6.8(a) that feedforward control is needed even though . The reason is that has slope ; whereas has slope in the logarithmic scale. in the feedforward In conclusion, we see that for a delay error of 0 loop, the addition of feedforward control is useful both with the short ( 7 N ; ) and long delay ( ) in the feedback loop. For the longest delay ( ), additional improvements (design changes) are necessary in order to achieve the performance requirements. 6.8 Design of feedforward controllers under uncertainty Knowledge of the model uncertainty may be utilized in the feedforward controller design. optimal combined feedforward/feedback control under the presence of uncertainty is derived in (Lewin and Scali, 1988; Scali et al., 1989). Here, we discuss two other methods: Two step procedure: 1) Choose a nominal model and design the ideal feedforward controller. 2) Modify this by introducing a low-pass filter or by 6.8 Design of feedforward controllers under uncertainty Gd 1 10 Gd 1 10 Magnitude Magnitude SGd Sff S 0 10 SffSGd SGd ω B=ω ωd SffSGd Sff 0 10 ωB ωd S −1 10 145 −1 −2 10 −1 0 10 1 10 10 10 −2 −1 10 (a) Delay of in tank 2: 0 10 Frequency [rad/s] 1 10 10 Frequency [rad/s] (b) Delay of in tank 2: Figure 6.8: Example 6.3: Combination of feedback and feedforward control illustrated in . the frequency domain. Delay error, reducing the gain to achieve H$ -optimal feedforward controller Modification of ideal feedforward controller Errors in time constants or time delays lead to reduced performance at high frequencies, and one may attempt to avoid this by adding a low-pass filter in series with the feedforward controller. The break frequency can be chosen as the frequency where crosses . For delay error 0 the break frequency is about 80 , and for a relative error in the time constant in the break frequency is about ; (see Section 6.4 for details). Low-pass filters are also often used to remove noise from the measurement to avoid excessive wear in the actuators (e.g., (Buckley, 1964)). Gain errors reduce the performance at all frequencies, so a low-pass filter does not help. The only way to avoid the feedforward controller from making the situation worse, is to reduce the gain of the feedforward controller so that "$ for the whole range of the process gains. This will, however, reduce the effect of the feedforward controller in the nominal case. If we choose (where is the ideal controller obtained with the nominal model), we obtain (6.50) where and are the gain errors in and , respectively. To assure .$ , we take the smallest possible , and the largest possible and choose the Chapter 6. Feedforward Control under the Presence of Uncertainty 146 following reduction factor, : ; We have here assumed make use of it as long as . (6.51) will always be less than 1 since we only ; . -optimal feedforward design Normally, -design is used for feedback controllers (Doyle, 1982; Doyle, 1983; Skogestad and Postlethwaite, 1996), but may also be applied to feedforward controllers. In this case, the whole design is taken in one step (and not by modifications on a nominal design). Figure 6.9 illustrates how the problem may be formulated for the feedforward case. The -design algorithm finds the controller (between the disturbance, , and ) that minimizes the weighted output, i.e., the output of . The uncertainty block 0 may be structured so that the uncertainty in and may be independent. WI ∆ + d u + + + Gd G + + WP Figure 6.9: Problem formulation for the design of a -optimal feedforward controller With the presently available software we cannot handle delays in the -design. If one knows that nominally the feedforward controller should include a delay, this may be included manually after the -design. The nominal delays in and are then omitted in the models used for the -design. We will now apply the two methods to the example in Section 6.6. Example 6.3 (continued from Section 6.6) , and add to the ideal feedforward Low-pass filter. We consider . controller a first-order low-pass filter with break frequency 0 From Figure 6.10(a), we see that the filtered feedforward controller makes the nominal performance worse, especially at high frequencies where it approaches 6.8 Design of feedforward controllers under uncertainty 147 no control (compare with Figure 6.5(b)). On the other hand, with delay error (Figure 6.10(b)) the performance is slightly improved (compare with Figure 6.5(d)) at the highest (worst) frequency, but at lower frequencies the performance remains poorer with the filter. These results are confirmed in Figure 6.11, which shows the magnitude at all frequencies. The filter introduces a phase shift, and therefore a delay error of no longer gives the same effect as R , and in the opposite direction the effect of the filter is better. 1 1 0 0 −1 −1 0.1 0.1 0 0 −0.1 −0.1 0.02 0.02 0 0 −0.02 −0.02 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 Time [s] 50 60 70 80 90 100 Time [s] (b) Delay error ( ' ): With the filter the feedforward controller do not make the performance worse for any of these three frequencies. (a) Nominal case: The feedforward effect is reduced or removed by the filter. Figure 6.10: Feedforward controller with low-pass filter (response of sinusoidal disturbances with amplitude and frequencies , and on the process of Example 6.3). -design. We consider combined gain and delay error in , and design a optimal feedforward controller using the setup in Figure 6.9. We let the uncer , be diagonal with elements tainty weight, HV 879 7 ; C [ [ L & Q 7 C L [ & [ ; QM7 : : Q [ & [ ; QM7 N : Q [ & [ (6.52) (6.53) represents the uncertainty in (approximately zero) and Here repre 2 sents the uncertainty in corresponding to ; gain uncertainty and delay uncertainty (Skogestad and Postlethwaite, 1996, eq. (7.27)). The performance Chapter 6. Feedforward Control under the Presence of Uncertainty 148 Sff for ideal FF with filter 0 0 10 10 Magnitude Magnitude Sff for ideal FF with filter Sff for ideal FF Ideal FF: Sff = 0 −1 −1 10 −1 0 10 1 10 10 Frequency [rad/s] (a) Nominal case Figure 6.11: 10 −1 0 10 1 10 10 Frequency [rad/s] (b) Delay error ( ' ) with and without low-pass filter (Example 6.3) weight, , is chosen as a constant independent of frequency, and several values for is considered (from HV to >> ). A large value of corresponds to requiring tight control. The -controller is designed with D-K iterations using the -toolbox in Matlab (with scaling matrices of order ; ). The delay difference between and is removed from the models used for the design, and the nominal delay of is included manually in the feedforward controller. The resulting is seen in Figure 6.12. From the peak value in Figure 6.12(b) we see that with large the -optimal feedforward control is close to the “ideal” controller in (6.48). “Detuning” ( $ ) gives little improvement when there is a delay error, except when a large detuning ( ) is used. However, nominal performance is then poor. This is confirmed by Figure 6.13, which shows the response with gain and delay errors (only errors in the direction that gives benefit are shown). In summary, with a low weight on performance (small ), the -optimal feedforward controller approaches no control ( ). Interestingly, with a large weight on performance (large ) we obtain a feedforward controller close to the ideal. 6.9 Conclusions In this paper we have discussed and illuminated some important characteristics of feedforward controllers. We have defined the feedforward “sensitivity functions”, and for the disturbance and the reference, respectively. For ideal feedfor ward controllers, we find that is equal to the and relative error in , and is equal to the relative error in (except for the 6.10 Acknowledgements 149 Sff for µoptimal FF Sff for µoptimal FF WP = 100,5,1,10−4 0 WP = 1000,100,5,1,10−4 0 Magnitude 10 Magnitude 10 Sff for ideal FF Ideal FF: Sff = 0 −1 10 −1 −1 10 0 10 1 10 10 −1 0 10 (a) Nominal case (no uncertainty) 1 10 Frequency [rad/s] 10 Frequency [rad/s] (b) Delay error ( ' ) Figure 6.12: Effect of detuned feedforward control: for -optimal feedforward controllers with performance weight, HV . ( for the ideal controller (6.48) is dashed.) signs). A simple frequency domain analysis of and shows for which frequencies feedforward control has a positive (dampening) effect when certain uncertainties are present (in gain, delay, dominant time constant and a common combination of gain and time constant). The results are summarized in Figure 6.2. We also discuss how to analyze the effect of more complex uncertainties. Feedforward is needed when the bandwidth, , of the feedback controller is below the frequency for which becomes less than one (with appropriate scaling). We must then require W$ in the frequency region between and , or if it is known, for all frequencies where the closed loop frequency response, , is above . See Figure 6.7 for a summary. The ideas are illustrated with a process example. 6.10 Acknowledgements Financial support from the Research Council of Norway (NFR) and the first author’s previous employer Norsk Hydro ASA is gratefully acknowledged. The authors also wish to thank Ass. Prof. Torsten Wik, Chalmers University of Techology, Sweden, for useful comments. References Balchen, J. G. (1968). Reguleringsteknikk Bind 1 (In Norweigan) 1. Ed.. Tapir. Trondheim, Norway. Chapter 6. Feedforward Control under the Presence of Uncertainty 150 0.8 0.8 0.7 0.7 No control 0.6 (overlapping with WP = 10−4) 0.5 0.4 0.4 0.3 0.3 WP = 1 0.2 0.2 WP = 5 0.1 0 −0.1 No control 0.6 (overlapping with WP = 10−4) 0.5 −0.1 (and WP=1000, 100) 5 10 15 20 25 30 WP = 1000,100,5,1,10−4 0 WP = 1000,100,5,1,10−4 Ideal FF −0.2 0 WP = 1 WP = 5 0.1 35 40 45 50 Ideal FF −0.2 0 (and WP=1000, 100) 5 10 15 20 25 30 35 40 45 50 Time [s] Time [s] (b) (a) No delay error gain error 0.8 0.7 No control 0.6 (overlapping with WP = 10−4) 0.5 0.4 0.3 WP = 1 0.2 WP = 5 0.1 WP = 1000,100,5,1,10−4 0 −0.1 Ideal FF −0.2 0 (and WP=1000, 100) 5 10 15 20 25 30 35 40 45 50 Time [s] (c) Delay error: 1 Figure 6.13: Effect of detuned feedforward control: Step responses for -optimal feedforward controllers with performance weight, HV . REFERENCES 151 Balchen, J. G. and K. I. Mummé (1988). Process Control. Structures and Applications. Van Nostrand Reinhold. New York. Buckley, P. S. (1964). Techniques of Process Control. John Wiley & Sons, Inc.. New York. Coughanowr, D. R. (1991). Process Systems Analysis and Control. McGraw-Hill Inc.. New York. Doebelin, E. O. (1985). Control System Principles and Design. John Wiley & Sons. New York. Doyle, J. (1982). Analysis of feedback systems with structured uncertainties. IEEE Proceedings, Part D 129(6), 242–250. Doyle, J.C. (1983). Synthesis of robust controllers and filters. Proc. IEEE Conf. on Decision and Control, San Antonio, Texas pp. 109–114. Harriott, P. (1964). Process Control. McGraw-Hill. New York. Holt, B.R and M. Morari (1985a). Design of resilient processing plants - V. The effect of deadtime on dynamic resilience. Chem. Eng. Sci. 40(1), 1229–1237. Holt, B.R and M. Morari (1985b). Design of resilient processing plants - VI. The effect of right-half-plane zeroes on dynamic resilience. Chem. Eng. Sci. 40(1), 59–74. Lewin, D. R. and C. Scali (1988). Feedforward control in presence of uncertainty. Ind. Eng. Chem. Res. 27, 2323–2331. Marlin, T. E. (1995). Process Control. Designing Processes and Control Systems for Dynamic Performance. McGraw-Hill, Inc.. New York. Middleton, R. H. and G. C. Goodwin (1990). Digital Control and Estimation. PrenticeHall International. London. Morari, M. and E. Zafiriou (1989). Robust Process Control. Prentice Hall. Englewood Cliffs, N.J., USA. Ogata, K. (1996). Modern Control Engineering. Prentice-Hall, Inc.. Englewood Cliffs, N.J., USA. Scali, C., M. Hvala and D. R. Lewin (1989). Robustness issues in feedforward control.. ACC-89 pp. 577–581. Seborg, D., T. F. Edgar and D. A. Mellichamp (1989). Process Dynamics and Control. John Wiley & Sons. New York. Shinskey, F. G. (1996). Process Control Systems - Application, Design, and Tuning, 4th Ed.. McGraw-Hill Inc., New York. Chapter 6. Feedforward Control under the Presence of Uncertainty 152 Skogestad, S. (2003). Simple analytic rules for model reduction and PID controller tuning. J. Proc. Contr. 13(4), 291–309. Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Stephanopoulos, G. (1984). Chemical Process Control: An Introduction to Therory and Practice. Prentice-Hall International. Englewood Cliffs, New Jersey, USA. Zhou, K., J. C. Doyle and K. Glover (1996). Robust and Optimal Control. Prentice Hall. New Jersey, US. Appendix A Modelling of the two tank process We here develop a model of the two tank process of Example 6.3. Energy balances for tanks 1 and 2 can be expressed by >@ >@ (6.54) (6.55) where and are the temperatures in the two tanks, is the heat capacity, the density,( and are both assumed constant and temperature independent), and are the volumes of tank 1 and 2, respectively, and and are the outlet flow rates from the two tanks. By use of the mass balance for both tanks, the energy balance simplifies to >@ >@ (6.56) (6.57) Linearization around a steady-state nominal point (marked with ) under the assumption that , and are constant, yields H0 >@ H0 >@ 0 0 0 0 (6.58) 0 where . The terms with 0 and 0 are cancelled since and in tank 2 steady-state energy balance yields (6.59) . Appendix A Modelling of the two tank process 153 Laplace transform yields for the outlet temperature ' (6.60) In (6.60), some delay and higher order dynamics in tank 1, i.e., between the measurement of and the inlet of tank 2, is ignored. This is represented by a delay, . Delay and higher order dynamics in tank 2 can be ignored since they can be assumed equal for the disturbance and the control input. We obtain the model (6.46) and (6.47). Chapter 7 Offset free tracking with MPC under uncertainty: Experimental verification Audun Faanes and Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology N–7491 Trondheim, Norway Accepted for presentation (poster session) at AIChE Annual Meeting, November 16-21, 2003, San Francisco. also affiliated with Statoil ASA, TEK, Process Control, N-7005 Trondheim, Norway Author to whom all correspondence should be addressed. E-mail: [email protected], Tel.: +47 73 59 41 54, Fax.: +47 73 59 40 80 156 Chapter 7. Offset free tracking with MPC under uncertainty 777 Abstract In this paper, a laboratorial experiment has been used to investigate some aspects related to integral action in MPC. We have used MPC for temperature control of a process with two tanks in series. Since this often improves performance, we used the temperature measurements of both tanks in the controller, even if we only are interested in the outlet temperature, and we have only one control input. To avoid outlet temperature steady-state offset, estimates of input disturbances have been used in the calculation of the steady-state control input. This method has been reported in the literature as the generally most efficient. Simulations may indicate that integral action is present and that disturbances are handled well, but in practice unmodelled phenomena may give a poor result in the actual plant, also at steadystate. If should be verified that integral action (feedback) is actually present and not an apparent effect of perfect feedforward control. The experiments verify that output feedback through input disturbance estimation is efficient, provided that it is correctly done. To obtain integral action, care must be taken when choosing which input disturbance estimates to include. It is not sufficient to estimate a disturbance or bias in the control input(s), even if the control input(s) are sufficient to control the process. The present work verifies the result that the number of independent disturbance estimates must equal the number of measurements. In our experiment the use of estimates of input disturbances to both tanks gave satisfactory performance with no steady-state error. Keywords: MPC, Uncertainty, Integral action, Feedforward control, Experiment 7.1 Experimental set-up 157 7.1 Experimental set-up 7.1.1 Equipment The experimental set-up is illustrated in Figure 7.1. The aim of the process is to keep the temperature in the circulation loop (as measured by TI2) constant by adjusting the cold-water flow-rate (marked with in the Figure) despite disturbances (marked and ). A more detailed description of the equipment follows. TI H Hot water reservoir Cold water reservoir d1 TI 1 u Heat loss d2 Mixing tank Cold water TI 2 Main tank y FI 1 Circulation Figure 7.1: The experimental set-up Hot and cold water from two reservoirs are mixed together into a mixing tank. The water flow rates are controlled with peristaltic pumps (Watson Marlow 505Du/RL). At a certain level in the mixing tank there is a spout acting as an overflow drain, and the mixed water flows through this spout and through a flexible tube to the main tank, which is situated at a lower altitude. The outlet provides a constant level in the mixing tank. The main tank has a circulation loop with a pump (Johnson Pump F4B-8) and a flow-rate measurement (tecfluid SC-250). The main tank temperature measurement is placed in the circulation loop, which gives an adjustable delay in the measurement. In addition, the circulation serves for mixing. In the circulation loop, below the main tank, there is a drainage. The drainage flow is controlled with an on-off valve (Asco SCE030A017). The drainage keeps 158 Chapter 7. Offset free tracking with MPC under uncertainty 777 the level in the main tank approximately constant despite the inflow from the mixing tank. The reservoirs and the tanks are all modified beakers. The pipes of the circulation loop are made of glass. The experiments are taking place in room temperature (about ; ). Since ), the hotthe hot-water temperature deviates considerable from this (< : water reservoir is placed on a hot-plate with thermostat to keep the hot-water temperature approximately constant. Since the two reservoirs do not contain a sufficient amount for the whole experiment, refill is necessary. The cold-water is , which is considered fairly close to room temperature. about Magnetic stirrers are placed in the hot-water reservoir and in the mixing tank. 7.1.2 Instrumentation and logging Pt-100 elements (class B, 3 wire, single, diameter 3mm, length 150mm) are placed in the hot-water reservoir, the mixing tank and in the circulation loop of the main tank. The main tank level is measured with a capacitance probe (Endress+Hauser Multicap DC11 TEN). The instruments are connected to National Instruments Fieldpoint modules, which are further connected to a PC via the serial port. In the PC, Bridgeview (National Instruments) is used for data display and basic control. Bridgeview also provides an OPC server interface, such that an OPC client may read off measured data, and give values to the actuators. The temperature controller is implemented in Matlab. The temperature measurements are read into Matlab, and the flow rate for the peristaltic pumps are determined in Matlab, and provided to Bridgeview via the OPC interface. Matlab is also used to plot the results. 7.1.3 Basic control The following basic control is implemented in Bridgeview on the connected PC: (1) The level in the main tank is controlled by opening the drainage valve when the main tank level reaches above ; 7 , and closing it when it is below >7 . A manually adjustable valve is installed on the drainage tube to reduce the drainage flow (otherwise the main tank empties too quickly compared to the response time of the level control loop). (2) The rotational speed of the circulation pump is set to a constant value, which in this set-up gives a constant circulation flow-rate. (3) The speed of the peristaltic pumps is determined from the desired flow rate by a linear relation. A two-point calibration is used. 7.2 Process model 159 7.2 Process model We assume perfect mixing in both tanks, and model the main tank with circulation loop as one mixing tank. Combination of mass and energy balance for the mixing tank (numbered ) and the main tank (numbered ; ) yields >@ >@ (7.1) (7.2) where the variables are explained in Table 7.1. Here we have assumed that the outlet flow from the mixing tank is identical to the inflow (i.e. constant level in the tank). In addition there is a delay in tank 1 of and a delay in tank 2 of . These represent transportation delays and neglected dynamics. Table 7.1: The model variables of nonlinear model given by (7.1) and (7.2) Name Explanation Temperature mixing tank Temperature main tank Volume mixing tank Volume main tank Temperature cold-water into mixing tank Temperature hot-water into mixing tank Temperature cold-water into main tank Flow rate cold-water into mixing tank Flow rate hot-water into mixing tank Flow rate cold-water into main tank Unit Linearization around a nominal point, denoted with an asterisk, yields: >@ O @ [email protected] ! " " ! " " " " " !+" " !#" " " " A @ A @ A @ " " " (7.3) (7.4) (7.5) Chapter 7. Offset free tracking with MPC under uncertainty 160 777 where the model variables are given in Table 7.2 and the model parameters are given in Table 7.3. Here we have incorporated the delays. The linear model is discretized with the Matlab Control Toolbox routine c2d. sample time is chosen. The delays are implemented as extra poles in the origin in the model (by delay2z in Matlab Control Toolbox). The linear discrete model has 27 states. Note that in this way the delays are implemented exactly. The linear discrete model may be formulated as where the subscript (7.6) (7.7) 7727 denotes the time step number. Table 7.2: The model variables of the linear model given by (7.3) - (7.5) Name ( ) Explanation Unit Variation in temperature mixing tank ( ) Variation in temperature main tank ( ) Measurement vector The output that we want to control Variation in cold-water flow rate into mixing ) tank ( Variation in hot-water flow rate into mixing tank ( ) Variation in cold-water flow rate into main tank ( ) In this work we have used the linear model (7.6) and (7.7) for the controller, whereas the nonlinear model (7.1) and (7.2) is used instead of the process in the simulations referred in section 7.6. 7.3 Identification of process parameters Most of the process parameters can be determined directly by inspection or measurements. The delays and and the nominal volume of the main tank, , are more difficult to quantify in this way, since they represent more than one phenomena. The main tank volume includes the recirculation loop, and the delays represent both transportation of water and other neglected dynamics. Therefore, three open loop experiments have been performed to determine these three parameters. The MPC with a preliminary tuning was used to drive the process towards a steady state, after which the controller was turned off. Three 7.3 Identification of process parameters 161 Table 7.3: The model parameters Name Explanation Nominal temperature mixing tank Nominal temperature main tank (=set-point) Nominal liquid volume of mixing tank (tank no.1) Nominal liquid volume of main tank, including circulation loop (tank no. 2) , Cold-water temperatures (assumed constant) Hot-water temperature Nominal total flow from mixing tank ( ) Nominal flow rate from hot reservoir Nominal flow rate from cold reservoir into mixing tank Nominal flow rate from cold reservoir into main tank Transportation and measurement delay in Transportation and measurement delay in 1 For experiment 1 and 2, repectively. Value >7 > , >7 > , >> >8 7 <: >> > > 8 7 >: >7 >: Unit 1 1 Chapter 7. Offset free tracking with MPC under uncertainty 162 777 steps tests were performed, and in each test the process was run to the new steady state. The results are shown in Figure 7.2. The linear model (7.3) - (7.5) was simulated with the actual and as inputs. The nominal volumes and the delays and were determined by trial and error. Simulation results with the final model are compared with the experiments in Figure 7.2. The resulting parameter values are given in Table 7.3. 7.4 Controller The MPC used for temperature control is based on the controller proposed by Muske and Rawlings (1993). A discrete linear model, as expressed by (7.8) (7.9) is used. This model is the same as (7.6) and (7.7), except that the disturbance term is omitted. The control input, , is found from an infinite horizon criterion: C L (7.10) where is the deviation in the main tank temperature at sample number , is a vector of future moves of the 7277 and control input, of which only the first is actually implemented. The control input, , is assumed zero for all . Weight may also be put on change in the control input, but this is omitted here. Muske and Rawlings (1993) demonstrated how to formulate (7.10) as a finite optimisation problem. By assuming that the constraints never are active, at optimum the control law can be formulated as state feedback: (7.11) is assumed constant from to . If we have a nonzero reference for or external disturbances, however, the control law (7.11) has no integral action, and will give steady-state offset. There are many ways to obtain integral action, and one is to modify the control law (7.12) ) and is the where is the state corresponding to desired value of ( control input that is necessary to obtain the state . and are both functions 7.4 Controller 163 6 6 Simulation 2 Experiment 0 −2 2 4 6 8 10 12 14 16 18 y2 Experiment 0 −2 6 8 10 12 14 16 Simulation 18 20 2 y2 Experiment 0 −2 −4 0 2 4 6 8 10 12 14 16 18 −4 0 20 100 d1 [ml/min] [ml/min] 4 4 [gr.C] [gr.C] 2 0 2 6 Simulation 4 −100 y1 Experiment 0 −4 0 20 6 0 2 −2 −4 0 100 Simulation 4 y1 [gr.C] [gr.C] 4 u 2 4 6 8 2 4 6 8 10 12 14 16 18 20 10 12 Time [min] 14 16 18 20 u 0 d1 −100 2 4 6 8 10 12 Time [min] 14 16 18 20 0 (b) Step in hot flow rate: from to , corresponding to a change in from to ! % . Cold flow rate , corresponding to ! % . (a) Step in cold flow rate: from ' 3 to , corresponding to a change in from % % . Hot flow to rate , corresponding to . 6 [gr.C] 4 2 Simulation −2 −4 0 y1 Experiment 0 2 4 6 8 10 12 14 16 18 20 6 [gr.C] 4 y2 2 Experiment 0 −2 −4 0 Simulation 2 4 6 8 10 12 14 16 [ml/min] 18 20 d1 100 u 0 −100 0 2 4 6 8 10 12 Time [min] 14 16 18 20 (c) Step in hot flow rate: from ' ! to , corresponding to a change in from ! to % . Cold , corresponding to flow rate ! . Figure 7.2: The resulting linear model: Open loop simulations compared with the open loop experiments Chapter 7. Offset free tracking with MPC under uncertainty 164 777 of the reference and disturbances. is known, and is held constant during the experiments. Disturbances, however, are here assumed unknown, and must therefore be estimated from the temperature measurements. For processes with large time constants better performance is obtained if we estimate input disturbances (Lee et al., 1994; Lundström et al., 1995). The states, , must also be estimated, so we define an extended state vector including a disturbance estimate vector, , of length : (7.13) In the experiments we will investigate the use of two different vectors . First we let be the input disturbance to the mixing tank ( ). Second we let be the input disturbance to both the mixing and the main tank ( ; ). We assume that the disturbances are integrated white noise, and introduce the extended model ; <>= ? ; <>= ? <> = ; ? where (7.14) (7.15) , .. . (7.16) and and are zero-mean, not correlated, normally distributed white stochastic noise with covariance matrices of and , respectively. We design a Kalman filter: (7.17) (7.18) where and are a priori and a posteriori estimates of , respectively, and is the estimator gain matrix given by the solution of a Ricatti equation: (7.19) (7.20) 7.5 Experimental procedure 165 The steady-state solutions and can be expressed by the disturbance estimate and the reference. This yields for the control law: (7.21) Values for the weight and covariance matrices: 8N Q 7 , - >> (7.22) (7.23) is number of states and is number of estimated disturbances. The large difference in magnitude between and is a result of not having scaled the model. For a variation in between 7 and 7 and between > and > , the two terms are in the same order of magnitude for the limiting values: 7 >Q 7 8 Q 8N Q - 7=< ; (7.24) (7.25) 7.5 Experimental procedure In each experiment, the process was run to a steady-state working point. The following sequence of disturbances was then introduced: To introduce disturbance : > Increase hot flow rate back from < > to > (1) Reduce hot flow rate from (2) > to < To introduce disturbance : 3. Start addition of cold-water to main tank 4. Stop addition of cold-water to main tank Two such sequences (1.- 4.) was performed with the MPC for the temperature control active. Prior to the experiments, we performed a simulation with the nonlinear model of the process (7.1) and (7.2), which was implemented in Simulink (a Matlab toolbox). In the simulation we only introduced disturbance (steps 1. and 2.). In the experiments we wanted to investigate the effect of different disturbance vectors, , to be estimated and used in the calculation of steady-state control and state vector: 166 Chapter 7. Offset free tracking with MPC under uncertainty 777 The simulation and experiment no.1 Estimate of the disturbance into the mixing tank only. Experiment no.2 Estimate of the disturbances into the mixing tank and the main tank. The change in hot flow was done by adjusting the speed of the peristaltic pump via the Matlab user interface. The addition of cold-water to the main tank was done by pouring from a jug. During 7 minutes < (experiment 1) and < (experiment 2) cold-water was added. This gives a mean flow rate of N >7=<, 2 and N <7 , respectively for the two experiments. During the two experiments the hot-water temperature varied between <>: and , whereas during the simulations the temperature was held constant. 7.6 Results First the disturbance was applied (as described in section 7.5) to the nonlinear model of the process (7.1) and (7.2), implemented in Simulink. In Figure 7.3 we see the response when no temperature control is applied. [gr.C] 2 −2 0 200 [ml/min] y2 0 y1 5 10 15 20 10 15 20 Time [min] 25 30 35 25 30 35 0 d1 −200 0 5 Figure 7.3: Open loop simulation with the same disturbances as the experiment In Figure 7.4 the closed loop simulation is shown. Note that (solid line) is the important output (temperature) which we want to return to its set-point as quickly as possible. Disturbance is estimated and used in the calculation of steady state. We see that the disturbance is well handled by the controller. In Figures 7.5 and 7.6 we see the results of the experiments. In contrast to the simulation, the controller with estimation of only one disturbance failed to achieve the desired steady state, both before and after the disturbances was added (experiment 1, Figure 7.5). We also see that is above . The reason for this 7.7 Discussion 167 [gr.C] 2 0 −2 [ml/min] 0 200 y2 y1 5 10 20 25 30 35 20 25 30 35 25 30 35 d1 0 u −200 0 15 5 0.02 10 15 Estimated d1 0 −0.02 0 5 10 15 20 Time [min] Figure 7.4: Simulation: MPC with estimate of is mainly heat loss, and there was also a small difference in the calibration of the temperature elements. The model does not cover these effects. In the experiments we also introduced disturbance . In experiment 1 where this disturbance was not modelled, the controller failed to bring back to steady state. In Figure 7.6 we can see that in experiment 2 we reached the desired steady state for the temperature in the main tank, . To compensate for the heat loss, the controller increased the temperature in tank 1 ( ). Both disturbances were handled well. 7.7 Discussion In the experiments the estimator exploited two measurements: The measurement in addition to which is the output of real interest. With estimation of two input disturbances an offset free steady state was obtained, whereas with only one input estimate insufficient integral action was obtained. This is in accordance with the theoretical results in Chapter 5. We there found that the number of estimated input disturbances must equal the number of measurements if steady-state offset shall be avoided. We have also simulated the case when is omitted, i.e. only is used by the MPC. Then it is sufficient to only estimate one disturbance in the second tank ( ). Normally this controller will give a poorer performance, since the early information of disturbances to the first tank from is not exploited, but for the controller Chapter 7. Offset free tracking with MPC under uncertainty [gr.C] 2 0 y1 y2 −2 [ml/min] 0 200 5 10 15 20 25 30 35 25 30 35 25 30 35 d2 d1 0 u −200 0 5 10 0.02 15 20 Estimated d1 0 −0.02 0 5 10 15 20 Time [min] Figure 7.5: Experiment 1: MPC with estimate of [gr.C] 2 0 0 200 5 10 15 20 25 30 35 25 30 35 25 30 35 d2 d1 −200 u 5 0.02 10 15 20 Estimated d2 0 Estimated d1 −0.02 0 y2 0 0 y1 −2 [ml/min] 168 5 10 15 20 Time [min] Figure 7.6: Experiment 2: MPC with estimate of and 777 7.7 Discussion 169 tunings we have chosen, the performance was actually slightly improved for the controller without . We will compare our MPC controllers (with estimation of and with estimation of and ) in the frequency domain. This is possible since the constraints in the control input, , is never active. In Chapter 5 we derive a state-space formulation for the combination of the controller and the estimator for this case. The controller may further be expressed by an approximated continuous state-space formulation (by d2c in Control Toolbox in Matlab), which is easily converted to a transfer function formulation: (7.26) We will study the magnitude of , but first it is convenient to introduce scaled variables. The maximum possible variation in in each direction is 1.354 > 2 , and 1.354 7 is the maximum desired variation in . We there fore introduce the scaled variables and ' . 1 5 3 4 1.354 such that both and stay within . The corresponding controller equation for the scaled system is (7.27) where Y1.3542 '1.354 . In Figure 7.7 we have illustrated the magnitude of for the two types of controllers. We see that the controller with only one disturbance estimation has low gain at low frequencies and higher gain from than from (Figure 7.7(a)), whereas for the controller with two disturbances the low frequency gain from is high (Figure 7.7(b)). (Figure 7.7(b) also reveals that the gain from is low for all frequencies, which explains why the use of in the control did not improve performance as expected.) 3 3 u′ 10 u′ 10 −3 10 −3 −6 0 10 10 −6 0 10 y′1 10 10 −6 0 10 10 y′2 −6 (a) Estimates 0 10 y′1 10 y′2 (b) Estimates and Figure 7.7: In this work, we have assumed that the constraints never are active in the design and analysis of the controller. In this set-up, this will at least be the case 170 Chapter 7. Offset free tracking with MPC under uncertainty 777 close to steady state. This means that the result will be the same if we use an ordinary MPC for the same example. 7.8 Conclusions In a laboratorial experiment, we have used MPC combined with an estimator for temperature control of a process with two tanks in series. Since this often improves performance, we used the temperature measurements of both tanks in the controller, even if we only are interested in the last temperature, and we have only one control input. To avoid steady-state offset, we have estimated input disturbances, and used these estimates in the calculation of the steady-state control input. Simulations may indicate that integral action is present and that disturbances are handled well, but in practice unmodelled phenomena may give a poor result in the actual plant, also at steady state. It should be verified that integral action (feedback) is actually present and not an apparent effect of perfect “feedforward control”. Estimates of input disturbances have been described in the literature as efficient for a quick response back to the desired steady state. The present work confirms this provided that it is correctly done. To obtain integral action, care must be taken when choosing which input disturbance estimates to include. It is not enough to estimate a disturbance or bias in the control input(s), even if the control input(s) are sufficient to control the process. The number of disturbance estimates must equal the number of measurements. In our experiment, the use of estimates of input disturbances to both tanks gave satisfactory performance with no steady-state error. 7.9 Acknowledgements The experimental equipment has been set up at Norsk Hydro Research Centre, and was originally designed by Jostein Toft, Arne Henriksen and Terje Karstang. Norsk Hydro ASA has financed the experiments. References Lee, J. H., M. Morari and C. E. Garcia (1994). State-space interpretation of model predictive control. Automatica 30(4), 707–717. REFERENCES 171 Lundström, P., J. H. Lee, M. Morari and S. Skogestad (1995). Limitations of dynamic matrix control. Comp. Chem. Engng. 19(4), 409–421. Muske, K. R. and J. B. Rawlings (1993). Model predictive control with linear models. AIChE Journal 39(2), 262–287. Chapter 8 Conclusions and directions for future work 8.1 Conclusions 8.1.1 Buffer tank design The first part of this thesis treats the design of buffer tanks for control purposes. The basic idea is that the buffer tank shall handle disturbances in the frequency range where neither the (original) process nor the basic feedback control system dampens them sufficiently. Chapter 2 addresses control-related design for neutralization plants. One or several mixing tanks are usually installed to smoothen disturbances that cannot be handled by the control system. Control theory has been applied to determine the required number of mixing tanks and their volumes, assuming strong acids and bases. Skogestad (1996) derived a minimum required total volume, I , where is the flow rate, is the number of tanks, is the delay in each tank and is the scaled disturbance gain. With PI or PID control in each tank, we compute numerically the required volume for different tunings, and based on this we recommend a total volume of G G ; . We recommend identical tank sizes (in contrast to Shinskey (1973) and McMillan (1984)). Chapter 3 extends the ideas from Chapter 2 to buffer tanks for all kind of processes. We first find the required buffer tank transfer function such that (with scaled variables) the gain from the disturbance to the output (including the process, the feedback loop, and the buffer tank) is less than . We realize this transfer function with either one or several mixing tanks (for quality disturbances) or a surge tank with “slow” level control (for flow-rate disturbances). The work is based on (Skogestad, 1994). In the present work more “accurate” numerical and graphical methods have been included, and we have distinguished 174 Chapter 8. Conclusions and directions for future work between the case when the feedback loop of the original plant is given (such that the sensitivity function, , is known), and the case when it is not. Aspects regarding the buffer tank placement (before or after the process) are discussed. A literature survey and several process examples are included. 8.1.2 Feedforward control under the presence of uncertainty In Chapter 6 feedforward control under the presence of model uncertainty is discussed, and we define the feedforward sensitivity functions, and for the disturbance and the reference, respectively. For “ideal” feedforward controllers, we find that is equal to the relative error in , and is equal to the relative error in (except for the signs). A simple frequency domain analysis of and shows for which frequencies feedforward control has a dampening effect when some common model errors are present ( in gain, delay, dominant time constant, or a common combination of gain and time constant). The effect of more complex uncertainties is also discussed. Feedforward is needed when the bandwidth, , of the feedback controller is below the frequency for which becomes less than one (with appropriate scaling). We must require $ in the frequency region between and , or if it is known, for all frequencies where the magnitude of the closed loop disturbance response, , is above . To make the feedforward controller more robust, two methods have been proposed: 1) Adding a low-pass filter to the nominal design and 2) -optimal feedforward controller design. 8.1.3 Multivariable control under the presence of uncertainty Serial processes are very common in the process industry, and in Chapter 4 we use this class of processes to illustrate that a multivariable controller may actually use the two basic principles of “feedforward” action (based mainly on the model), and feedback correction (based mainly on measurements) simultaneously. The feedforward action may improve the performance significantly, but is sensitive to uncertainty, in particular at low frequencies. Therefore it is important to include efficient feedback control by using measurements late in the process, and to include integral action if offset-free steady-state is important. In Chapter 4 we see that testing the process on a too idealistic process model may give the impression that the control is better than it actually is. This is confirmed by the experiments reported in Chapter 7 (Model predictive control, MPC, is used for temperature control of a process with two tanks in series). Simulations may indicate that integral action is present and that disturbances are handled well, but unmodelled phenomena may give a poor result in the actual plant, also at 8.1 Conclusions 175 steady state. It should be verified that integral action (feedback) is actually present and not an apparent effect of “ideal feedforward control”. Estimates of input disturbances have been described in the literature as efficient for a quick response back to the desired steady state. The experiments confirm this provided that it is correctly done. Care must be taken when choosing which input disturbance estimates to include. It is not enough to estimate a disturbance or bias in the control input(s), even if the control input(s) are sufficient to control the process. The number of disturbance estimates must equal the number of measurements (as found theoretically in Chapter 5). When designing the controller, one must also consider which of the outputs that are really important. If the number of inputs exceed the number of (important) outputs, one may either give set-points to other (less important) outputs, or one may let the controller bring some of the inputs back to ideal resting positions (Chapter 4). As a tool to understand the model predictive controller (MPC), in Chapter 5 we derive a (linear, discrete) state-space realization of a MPC controller (Muske and Rawlings, 1993) under the assumption that it is operated with no active constraints. A generalization to tracking of both inputs and outputs is derived. The final controller expression also includes a state estimator that is extended with input disturbance states. We have not found such a derivation of a MPC controller on state-space form elsewhere. A direct result is that to obtain integral action with input bias estimation, it is required to include the same number of input biases as measurements. Combined with the process model (also on state-space form), the closed loop model is determined, and this can, for example, be used to check the steady-state solution. The state-space MPC formulation has been applied (in Chapters 4 and 7) to obtain the frequency dependent gain for each controller channel and the magnitude of each of the elements in the sensitivity function matrix. The frequency dependent gain in each channel may give insight into how the controller utilizes each measurement and the magnitude of the control actions for each input. The steady-state behaviour can be seen from the low-frequency gains. But, often more than one channel in a row have high gain at low frequencies, and then it is difficult to interpret the result. It is then better to consider the elements of the sensitivity function matrix. An offset-free, steady-state control for a specific output requires that all the elements in the corresponding row have low gain at low frequencies. Chapter 8. Conclusions and directions for future work 176 8.2 Directions for further work 8.2.1 Serial processes: Selection of manipulated inputs and measurements A general question related to control structure design is the choice of manipulated inputs and measurements. In Section 4.4 we study a serial process with three units, and with one candidate measurement (pH) and one candidate manipulated input (addition of a reactant) in each unit. To save installation and operational costs, one may omit one or more of the instruments or actuators. From Table 8.1 we see there are 49 possible combinations. Often one would like to monitor the final output, in which case the number of possible combinations is 28. Table 8.1: Possible combinations of inputs and measurements for the example in Section 4.4. The last column is for the case with a measurement in the last unit. Inputs Measurements No of combinations 3 3 3 2 2 2 1 1 1 Total 3 2 1 3 2 1 3 2 1 1 3 3 3 9 9 3 9 9 49 No of combinations pH in last tank used 1 2 1 3 6 3 3 6 3 28 In general, if one may choose from to inputs and from to measurements, the number of combinations is given by (Nett, 1989): possible (8.1) In the example . To illustrate the problem, we will here compare two realistic combinations from the example: (1) pH measurement and reactant addition in tanks and . (2) pH measurement and reactant addition in tanks ; and . 8.2 Directions for further work 177 In both cases we keep the measurement and reactant addition in the last tank, since normally we want to measure the product quality, and the late reactant addition minimizes the delay in the last control loop. When we omit reactant addition to a tank, the steady-state pH will be the same as the inflow pH. From the simulations in Figure 8.1 we see that the resulting pH-response in the last tank is similar to the full instrumentation case (compare with Figure 4.7(a)). We see that the small deviation in the pH of last tank has a shorter duration for case 1 (with no instrumentation in tank 2). In case 2 (Figure 8.1(b)) the control inputs have not reached their steady state after ;> ( reaches 7 < ). The simulations indicate that with a multivariable controller one may omit the instrumentation in one of the three tanks. 10 5 0 4 1 0 −1 −2 −3 pH in tank 1 pH in tank 1 4 pH in tank 2 pH in tank 2 2 2 8 8 pH in tank 3 pH in tank 3 6 6 1 1 Control inputs u, scaled Control inputs u 0 0 −1 0 50 100 150 time [s] 200 250 (a) Instrumentation is removed from tank 2. pH set-point in tanks 1 and 2 are both set to 2.4. −1 0 50 100 150 time [s] 200 250 (b) Instrumentation is removed from tank 1. At steady state the pH in tank 1 is equal to the influent pH. pH set-point is in tank 2. Figure 8.1: pH measurement in and reactant addition to two tanks only. as with full instrumentation) (not Even if the final results for the two cases are similar, one may point out some important distinctions: In case 1, the total control loop includes all three tanks, whereas in case 2, only the two last tanks are included. In case 1, therefore the feedback loop from the last tank to the first is slower, but on the other hand, the “feedforward” controller element can be made close to “ideal”, in contrast to case 2 (because of the delays). A further analysis of the differences between different control configurations would be useful, both as a basis for recommendations to process designers, but also to get a deeper understanding of the process and the controller. 178 Chapter 8. Conclusions and directions for future work 8.2.2 MIMO feedforward controllers under the presence of uncertainty MPC vendors often offer feedforward control from measured disturbances (e.g., Honeywell (1999) and ABB (2003)), and therefore the study of multivariable feedforward controllers (from multiple measurements to multiple control inputs) has become more interesting. The theory of Chapter 6 covers multiple-input, multiple-output (MIMO) feedforward controllers, but the application of the theory to MIMO examples is still remaining. 8.2.3 Effect of model uncertainty on the performance of multivariable controllers In this thesis we have studied some aspects of multivariable control under the presence of uncertainty. The basic idea is that a multivariable controller consists of both “feedforward” and feedback control elements, and these two types of elements respond differently to model error. We believe that a closer look into some of the following thoughts might be useful Identify elements or blocks of a multivariable controller that may degrade the performance, and redesign the controller to avoid this. In principle, it should be possible to identify such elements from the process model. One way to change (or remove) a controller element is to change the corresponding part of the model, for example, by removing the relationship in the model between the control input and the output. One method to investigate, is to consider feedforward elements (either manually or automatically detected) and compute for expected model errors to determine the frequency range for which the controller element is effective. If there are any feedback element (e.g., ) that also controls output , one may compute to see if this control element remove errors introduced by the feedforward branch. If the frequency range for which the feedforward element is effective is not overlapping with the range where it is needed, it is better to leave this controller element out. A simple example using this method has been presented (Faanes and Skogestad, 2003). Automatically detect feedforward control elements. Sometimes this is not an easy thing to do manually. One possible automatic method is (from the process model) to determine which outputs depend on which inputs when all the loops are closed. A control element from measurement to manipulated variable is feedforward control if 1) is (closed loop) independent REFERENCES 179 of , 2) there is another output which depends on , and 3) there is another input that both and depend on. An output is (closed loop) dependent of an input if a change in the input leads to a change in the output (when all the loops are closed). Due to other feedback loops or weak dependencies in the process, a control element may fail to fulfil the criteria for a feedforward controller, even though it has many similarities with feedforward control. This is seen in the case study in Chapter 4. For such cases it may be better to find an appropriate definition for the “degree of feedforward action” for a (total) controller or its control elements. This may for example be a number between 0 and 1 where 1 corresponds to pure feedforward control and 0 corresponds to pure feedback control. 8.2.4 MPC with integral action There are many ways of obtaining integral action with mode predictive controllers (MPC). Output bias estimation is the most popular. Another is input disturbance or bias estimation (which we have used). Alternatively, integration may be introduced in the process model itself (for example by integrating the control input) with the disadvantage that the MPC optimization problem has grown, and also that the “new process” includes poles at the imaginary axis. For example, this means that the state-space formulation we derived in Chapter 5 must be modified since it only applies to stable processes. We believe that a comparison of the different methods would be useful. The recent paper by Muske and Badwell (2002) is a good starting point. It is also interesting to consider the methods proposed for integral action for linear qudratic (LQ) controllers, since a criterion for obtaining offset-free steady state is that none of the constraints are active (Muske and Badwell, 2002). References ABB (2003). IndustrialIT Solutions for advanced process control and optimization. Brochure. Faanes, A. and S. Skogestad (2003). Feedforward control under the presence of uncertainty. Nordic Process Control Workshop 11, January 9-11, 2003, Trondheim. Honeywell, Hi-Spec Solutions (1999). RMPCT implementation course. McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. 180 Chapter 8. Conclusions and directions for future work Muske, K. R. and J. B. Rawlings (1993). Model predictive control with linear models. AIChE Journal 39(2), 262–287. Muske, K. R. and T. A. Badwell (2002). Disturbance modeling for offset-free linear model predictive control. J. Proc. Cont. 12, 617–632. Nett, C. N. (1989). A quantitative approach to the selection and partitioning of measurements and manipulations for the control of complex systems. Presentation at Caltech Control Workshop, Pasadena, USA. Shinskey, F. G. (1973). pH and pIon Control in Process and Waste Streams. John Wiley & Sons. New York. Skogestad, S. (1994). Design modifications for improved controllability - with application to design of buffer tanks. AIChE Annual Meeting, San Francisco, Nov. 1994. Skogestad, S. (1996). A procedure for SISO controllability analysis - with application to design of pH neutralization processes. Computers Chem. Engng. 20(4), 373–386. Appendix A Control Structure Selection for Serial Processes with Application to pH-Neutralization Audun Faanes and Sigurd Skogestad Extract from paper presented at European Control Conferance, ECC’99, Aug.31-Sept.3, 1999, Karlsruhe, Germany. Abstract In this paper we aim at obtaining insight into how a multivariable feedback controller works, with special attention to serial processes. Keywords: Control structure, Serial process, Multivariable control, Feedforward, Feedback 182 Appendix A. Control Structure Selection for Serial Processes 7277 A.1 Example: pH neutralization Neutralization of strong acids or bases is often performed in several steps. The reason for this is mainly that the pH control in one tank cannot be quick enough to compensate for disturbances (Skogestad, 1996). In (McMillan, 1984), an analogy from golf is used: the difficulty of controlling the pH in one tank is compared to getting a hole in one. Using several tanks, and smaller valves for addition of reagent for each tank, is compared to the easier task of reaching the hole with a series of shorter and shorter strokes. In this example, control structures for neutralization of a strong acid by use of three tanks in series are discussed. The aim of the control is to keep the outlet pH from last tank constant despite changes in inlet pH or flow. This is obviously a serial process, since the flow goes from one tank to another. For each tank, the pH can be measured, and the reagent can also be added to each tank. Referring to Figure 4.1, the three units (i-1, i and i+1) correspond to the three tanks (1, 2 and 3). To study this process we model each tank as described in (Skogestad, 1996). concentrations, that is *#,+ . In each tank we model the excess This gives bilinear models, which are further linearized around a stationary working point so that methods from linear control theory can be used. We get two states in each process unit (tank), namely the concentration, , and the level. The disturbances enter tank 1 only. We here assume that there is a delay of 5 seconds for the effect of a change in inlet acid or base flow or inlet concentration to reach the outflow of the tank, e.g. due to incomplete mixing, and a further delay of 5 seconds until the change can be measured. In the linear state space model these transportation delays are modelled by Padé-approximations of 4th order. There is assumed no further delay in the pipes between the tanks. We assume that the levels are controlled by the outflows using a P controller such that the time constant for the level is about 1/10 the time constants for the concentrations. The volumes of the tanks were chosen to 7 N [ , the smallest possible volumes according to the discussion in (Skogestad, 1996). The acid inflow (distur R . The pH of the final product in tank 3 should be , bance) has and we selected the set-points in tank 1 as 1.65 and in tank 2 as 3.8. The concentrations are scaled so that a variation of around these set-points corresponds to a scaled value of . The control inputs and the disturbances are also scaled appropriately. The linear model was used for multivariable controller design, while the simulations are performed on the nonlinear model. A conventional way of controlling this process is to use local control of the pH in each tank using PID-controllers. Figure A.1 shows the response of pH in each tank when the acid concentration in the inflow is decreased from 10mol/l to 5mol/l. As expected from (Skogestad, 1996), this control system is barely able pH 1 3 2 1 0 pH 2 A.1 Example: pH neutralization 4 183 pH 3 2 8 6 1 u 0 −1 0 50 100 150 time [s] 200 250 Figure A.1: With only local control, PID controllers must be agressively tuned to keep the pH in the last tank within . (Disturbance in inlet concentration occurs at .) pH 1 3 2 1 0 pH 2 to give acceptable control. However, the nominal response can be significantly improved with multivariable control. 4 pH 3 2 8 6 u 1 0 −1 0 50 100 150 time [s] 200 250 Figure A.2: A large improvement in nominal performance is possible with multivariable control. (Disturbance in inlet concentration occurs at ) Figure A.2 shows the response with a 0 multivariable controller designed with performance weights on the outputs and on the control inputs in all tanks, and with composition into tank 1 as a disturbance. The main reason for the large improvement is the feedforward effect discussed in section 4.3. The gain of the elements in the multivariable controller as a function of fre- 184 Appendix A. Control Structure Selection for Serial Processes 7277 4 u1 10 −4 10 4 u2 10 −4 10 4 u3 10 −4 10 −4 4 10 10 y1 −4 4 10 10 −4 4 10 10 y2 Figure A.3: Gain of the control elements of the original controllers are dashed.) y3 controller. (Local PID quency are shown in Figure A.3. The diagonal control elements are the local controllers in each tank, whereas the elements below the diagonal represent the ”feedforward” elements. From such plots we get an idea of how the multivariable controller works. For example, we see that the control input to tank 1 (row 1) is primarily determined by local feedback, while in tank 2 it seems that ”feedforward” from tank 1 is most decisive for the control input. In tank 3 the control actions are smaller. This is also seen from the simulation in Figure A.2 (the solid line in the plot of ). We observe that none of the control elements have any integrators, even though the simulation in Figure A.2 show no steady-state offset. However, if some model error is introduced ( ; 2 reduced gain in tank 2 and 3), we do get a steady-state offset. Figure A.4 shows the start of the response, it finally ends up slightly above : . Local PID controllers give no such steady-state offset. We subsequently redesigned the controller to get three integrators in the control loop shape (Figure A.5). The simulation in this case gives no steady-state offset. This illustrates one of the problems of the ”feedforward” control block, namely the sensitivity to static uncertainty. Simulations on the perfect model may lead the designer to believe that no integrator is necessary. controller was designed To study the feed forward effect separately, a using the measurement in tank 1, and control inputs in all tanks. The result is local control in tank 1 and feed forward from tank 1 to tanks 2 and 3. Simulation on the linear model gives the same result as for the 0 controller (Figure A.2), whereas nonlinear simulation gives steady-state offset due to static model error and no feedback in tanks 2 and 3. pH 1 3 2 1 0 pH 2 A.1 Example: pH neutralization 4 185 pH 3 2 8 6 1 u 0 −1 0 50 100 150 time [s] 200 250 Figure A.4: Model error gives steady-state offset with original controller. 4 u1 10 −4 10 4 u2 10 −4 10 4 u3 10 −4 10 −4 4 10 10 y1 −4 4 10 10 −4 4 10 10 y2 Figure A.5: Gain of the control elements of the redesigned PID controllers are dashed). y3 controller. (Local 186 Appendix A. Control Structure Selection for Serial Processes 7277 pH 1 3 2 1 0 pH 2 The effect of feedback from downstream tanks, i.e. the blocks above the diagonal from the discussion in section 4.3, is illustrated through the following simulations. We introduce a static measurement noise in tank 2 of 1 unit. In Figure A.6 we see the response for the process with local control with PID. We can see that the pH in tank 3 relatively quickly returns to a pH of 7. The problem is the control input in tank 3, which stabilizes at a level away from the point in the middle of the range (0), which we consider as the ideal resting position. Since we really are interested in the pH in only the last tank, we get two extra degrees of freedom, which can be used for resetting the control inputs of the last two tanks. Figure A.7 shows the simulation for the multivariable controller. Here we see that both the pH and the control input in tank 3 go to their desired values. The actual pH in tank 2 is increased to the correct value to obtain this. This illustrates that the elements above the diagonal in the multivariable controller give input resetting. 4 pH 3 2 8 6 u 1 0 −1 0 50 100 150 time [s] 200 250 Figure A.6: Steady-state measurement noise in tank 2: Local control with PID do not bring the control input for tank 3, [ , back to the ideal resting position. (u-plot: solid line.) To summarize the example we can say that the multivariable controller gives significant improvements compared to local control based on PID. This is especially due to the feedforward effect, and with large model errors, the feedforward may lead to worse performance. Integral action is important in the controllers, even if the feedforward effect may give no stationary deviation for the nominal case. The inputs in the last two tanks are reset to their ideal resting position with the multivariable controller, because of the feedback from downstream tanks. A.2 Conclusion pH 1 3 2 1 0 pH 2 187 4 pH 3 2 8 6 u 1 0 −1 0 2000 4000 6000 time [s] 8000 10000 Figure A.7: Steady-state measurement noise in tank 2: The multivariable controller has built in input resetting, and brings [ back to the ideal resting position (u-plot: solid). Note that the timescale differs from the other plots. A.2 Conclusion An example of neutralization of a strong acid with base in a series of three tanks is used to illustrate some of the ideas in the paper. This process is obviously serial. The example illustrates that the multivariable controller yields significant nominal improvements compared to local control based on PID. But this is especially due to feedforward, and with model errors, the feedforward may in fact lead to worse performance. Integral action or strong gain in the local controllers at low frequencies is important to obtain no steady-state offset, even if the feedforward effect itself may nominally give no steady-state. Feedback to upstream tanks brings the inputs to their ideal resting positions, also when a wrong pH measurement give problems in an upstream tank. The example indicates that it is possible to get a good performance with careful use of a multivariable controller or a combination of local control, feed forward from tank 1 and input resetting. -contoller, but similar results have also been found In this study we used a for a MPC controller. References McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. Skogestad, S. (1996). A procedure for SISO controllability analysis - with application to design of pH neutralization processes. Computers Chem. Engng. 20(4), 373–386. Appendix B A Systematic Approach to the Design of Buffer Tanks Audun Faanes and Sigurd Skogestad Presented1 at PSE’2000, July 16-21, 2000, Keystone, Colorado, USA, Supplement to Computers and Chemical Engineering, 24, pp. 1395-1401 Abstract Buffer tanks are often designed and implemented for control purposes, yet control theory is rarely used when sizing and designing buffer tanks and their control system. Instead, rules of thumb such as “10 min residence time” are used. The objective of this paper is to provide a systematic approach. We consider mainly the case where the objective of the buffer tank is to dampen (“average out”) the fast (i.e. high frequency) disturbances, e.g. in flow and concentration, which cannot be handled by the feedback control system. Keywords: Process control, process design, buffer tanks 1 In the present version some corrections and clarifying modifications from the original text have been made. The most important error was step 3 in Table B.1. Some missing values have been provided for the examples, and equation (B.26) has been modified. A concluding section that was omitted due to spatial limitations has been included. 190 Appendix B. A Systematic Approach to the Design of Buffer Tanks B.1 Introduction The objective of this paper is to provide a systematic approach to the design of buffer tanks based on control theory. The background for this approach is that buffer tanks often are implemented for control purposes. Even so, control theory is rarely used when sizing and designing the tanks. Instead, rules of thumb are used. Text books on chemical process design seem to agree that a half-full residence time of 5-10 minutes is appropriate for reflux drums and that this also applies for other buffer tanks. For tanks between distillation columns a half-full residence time of 10-20 minutes is recommended. ((Lieberman, 1983), (Sandler and Luckiewicz, 1987), (Ulrich, 1984), (Walas, 1987) and (Wells, 1986)). Sigales (1975) is more specific concerning what follows after the drum. None of these references give any justifications for their choice. (Watkins, 1967) gives a reflux drum volume dependent on instrumentation and labor factors (both related to operational use of the buffer tank), reflux and product rates, and a factor dependent on how well external units are operated. The method gives half full hold-up times from 1.5 to 32 min. Design of vessels to dampen flow variations is presented by Harriott (1964) using a specification of outlet flow rate change given a certain step in inlet flow. This method has similarities with the one presented for flow variations in the present paper. Another related class of process equipment is neutralization tanks. The main problems for this process are large and varying process gain and delays in the control loop. Design is described in (Shinskey, 1973) and (McMillan, 1984). Another design method and a critical review is found in (Walsh, 1993). Zheng and Mahajanam (1999) find the necessary buffer tank volume by optimization and use it as a controllability measure. A stated above, due to limitations in the control system, there is a limitation in frequencies above which the control system is not effective. The process itself must dampen the disturbances in this area. If it initially does not, addition of one or more buffer tanks is necessary. In this paper we present design methods for buffer tanks based on this fundamental understanding. B.2 Transfer functions for buffer tanks Consider the effect of a disturbance, , on the controlled variable, . The linearized model in terms of deviation variables may be written as (B.1) B.2 Transfer functions for buffer tanks 191 To illustrate the effect of the buffer tank, we express the dynamic model of the tank with the transfer function . The disturbances passes through the buffer tank (e.g. see Figure B.1), so that the process with a buffer tank may be expressed by 9 (B.2) where 9 is the disturbance transfer function of the original plant, and is the modified disturbance transfer function. A typical buffer tank transfer function is (B.3) A? Note that so that the buffer tank has no steady state effect. Quality/ Flow disturbance Buffer tank h(s) Process Gd0(s) Gd(s) Figure B.1: Example of how a buffer tank dampens disturbances. [ , inlet flow-rate [ , We consider a buffer tank with liquid volume outlet flow-rate . Further we let and denote the inlet and outlet quality (concentration or temperature), respectively. A component or simplified energy balance for a perfectly mixed tank yields >@ (B.4) In addition we have the total mass balance (assuming constant density): >@ (B.5) B.2.1 Quality disturbance For quality disturbances the objective of the buffer tank is to smoothen the quality response, , so that the variations in are smaller than in . Appendix B. A Systematic Approach to the Design of Buffer Tanks 192 Combining (B.4) and (B.5) yields linearization yields ! " G and for a single buffer tank (B.6) where denotes the nominal (steady state) values. Note that the dynamics of (level control) have no effect on the linearized response of . Furthermore for the case with a single feed stream and the dynamics of have no effect on the response of . In any case we find that the transfer function for quality is ? (B.7) where ? is called the residence time (steady state). We can see that the buffer tank works as a first order filter. Similarly for buffer tanks in series we have ? (B.8) where ? is the total residence time. B.2.2 Flow rate disturbance For flow rate disturbances the objective of the buffer tank is to smoothen the flow response, . Note that we need to use a “slow” level controller, as tight level control yields P . Let denote the transfer function for the level controller including measurement and actuator dynamics and the possible dynamics of an inner flow control loop. Then , where is the set-point for the volume. Combining this with the total mass balance (B.5) yields (B.9) The buffer tank transfer function is thus given by (B.10) In this case we have more freedom in selecting since we can select the controller . With a proportional controller , we get that is a first order filter with ? . For a given the controller is ' (B.11) B.3 Controllability analysis 193 B.3 Controllability analysis We here provide a review of some controllability results which are subsequently used for buffer tank design. We consider SISO (single input-single output) systems. Consider a linear process in terms of deviation variables (B.12) the manipulated input and the disturbance (includ- Here denotes the output, ing disturbances entering at the input which are frequently referred to as “load changes”). We assume throughout this paper that the model has been scaled such that expected disturbances make the magnitude of the elements of lie within for all frequencies and the requirement for the scaled output vector, , is that the magnitude of each element in shall lie between R and for all frequencies, and is scaled so that the manipulated input range corresponds to a variation of in . Feedback control yields , and from this we eliminate to get (B.13) is the set-point, and and are the sensitivity function and the com- plementary sensitivity function, respectively. We ignore set-point changes and get the following expression for the effect of disturbances (B.14) Two different requirements must be fulfilled to get acceptable control performance. The first relates to the speed of response to reject disturbances. From (B.14) we see that to keep $ when , we must require We define as the frequency where . (B.15) At higher frequencies we cannot rely on feedback control for disturbance rejection, so that (B.16) For acceptable performance and robustness we have the following maximum value of the bandwidth (Skogestad, 1999), (Skogestad and Postlethwaite, 1996): (B.17) Appendix B. A Systematic Approach to the Design of Buffer Tanks 194 where 1999): is the effective delay. With PI or PID control we have (Skogestad, ? ? ; B; ? for PI for PID (B.18) where is the delay, ? , where is a right half plane zero, and ? is lag number ordered by size so that ? is the largest time constant. For more realistic PI controllers, must be reduced compared to (B.17). Ziegler-Nichols tuning gives 87 , while a more robust tuning (Skogestad, 1999) gives ; (B.19) Note that (B.16) is only a necessary requirement, as (B.15) needs to be satisfied for $ . In particular, (B.15) may impose additional requirements if is of high order; this is discussed later. In words (B.16) tells us that at sufficiently high frequencies the process must be “self-regulating”. If (B.16) is not satisfied then we need to modify the process. One commonly used approach is to add buffer tanks as illustrated in Figure B.1, such that the “new” disturbance response becomes as in equation (B.2). The second limitation relates to input constraints for disturbances, but will not be covered by this article. B.3.1 Additional requirements due to high order As mentioned, (B.16) is only a necessary requirement as (B.15) needs to be satisfied also for B$ . To investigate this further we make the following approximation of the sensitivity function, , with the loop transfer function, ( ): P (B.20) Inserting this approximation into (B.15), we obtain (B.21) Now it may be difficult to have sufficiently high roll-off (slope) in the loop transfer at frequencies below the bandwidth function to get (even though we satisfy it at the bandwidth). The problem is that a high roll-off in yields a large phase lag, and we get instability problems. For reasonable robustness and performance we must have that the slope for is about -1 near the bandwidth . In this case it is difficult to make general formulas for the buffer tank design. Graphical or optimization based solutions are probably simplest. One particular case is studied later. B.4 Quality variations 195 We can get a steeper slope around the bandwidth, however, with multiple control loops. E.g. with a series of buffer tanks and control in each tank, the total slope of is (even though it is -1 for each individual tank). B.4 Quality variations When the main source of disturbances are variations in the inflow quality (temperature or concentration) they may be smoothened by a mixing tank. With perfect mixing and a residence time of ? ( denotes hold-up), the outflow quality is roughly speaking the sliding mean of the input quality within a time window of length ? . The transfer function for one buffer tank is given by (B.7). We may also consider using a series of buffer tanks. For equal tanks in series with a total residence time of ? , and total volume , the transfer function is given by (B.8). 0 10 Gain 0.33 (min.vol.1 tank) Gain 0.144 (min.vol. 2 tanks) −1 10 Magnitude Gain 0.064 (min.vol. 3 tanks) n=1 −2 10 n=2 n=3 n=4 −3 10 −1 0 10 1 10 10 2 10 Frequency × τh Figure B.2: Quality disturbance: Frequency responses for n tanks in series with total residence time , K . In Figure B.2 we show the amplitude plot of for ; < equal tanks in series with a given total residence time ?/ . Physically, on the x-axis is shown the normalized frequency, ,? , of the sinusoidal varying input concentration, [email protected] [email protected] ,@ 196 Appendix B. A Systematic Approach to the Design of Buffer Tanks into the first tank, and on the y-axis is shown the normalized output concentration from tank , , where and denote the magnitude of the sinusoidal variations. Note that both axis are logarithmic. M? , we have P , which means that slow siAt low frequencies, nusoidal variations are unaffected when they pass through the tanks. However, fast variations (with high frequencies) are dampened by the tanks which tend to “average out” the variations. At sufficiently high frequencies, M? , we find that (log-scale) as a function of frequency (log-scale) approaches a straight line. This follows because the high-frequency asymptote is ? Q (in words, “the slope is ” at high frequencies for tanks in series). Thus, at high frequencies the use of many tanks is “better”, in terms of providing more dampening for a given total volume. On the other hand, the frequency where the asymptote crosses magnitude 1 (its “break” or “corner” frequency) is Y? Y? , which is at a lower frequency when is smaller, so at lower frequencies fewer tanks is better. This is also seen from the more exact plot in Figure B.2. The plot may be used to obtain the total required volume of the buffer tanks if we at a given frequency specify the factor by which we want to reduce the disturbance. The required “gain” of the buffer transfer function is then and we can read off ,? and with a given value of obtain the total residence time ? . Typically, the given frequency is the achievable closed-loop bandwidth of the feedback control system, , and is the value of at this frequency. We see that one tank is “best” if we want to reduce the effect of the disturbance at a given frequency by a factor 7 or less; two tanks is “best” if the factor is between 3 and about 7J<>< , and three tanks is “best” if the factor is between about 7 and 7 N < . The word “best” has been put in quotes because we here only consider the total combined volume of the tanks. In practice, there are several other factors that favor using as few tanks as possible; S ), the cost of this includes the scaling law for cost (typically, cost scales with additional equipment like pipes, pumps, sensors, control systems, etc. as well as other controllability considerations (slope condition on ). Therefore, one would probably consider using only one tank also when we want to reduce the effect of the disturbance by a factor > , even though in this case the volume of one tank is about 5 times larger than the total volume of two tanks, and more than 7 times larger than the total volume of three tanks (this is seen from Figure B.2 by reading off the value of ,?/ that corresponds to magnitude ). To satisfy the necessary condition (B.16) we need to select such that :9 (B.22) We introduce the factor by which the effect of the disturbance must be reduced 9 (B.23) B.4 Quality variations 197 We must at least require . As mentioned this may be solved graphically using Figure B.2, but alternatively we can find the analytical solution from (B.8) and (B.17): I (B.24) ? For one tank and we have the appropriate formula ? . For ; the use of (B.24) assumes that the total slope of around can be . This can be achieved with local quality control in each tank, e.g. for a neutralization plant, it must be possible to measure the concentration and automatically add a reactant in each tank. To find the optimal number of tanks one must then take into account equipment, piping, control systems (each tanks may require a level controller), etc. as mentioned above. Normally the optimal number of tanks will not be large, so that the cost calculations has to be made for a limited number of cases. Example B.1 Consider mixing of two process streams, and as illustrated in Figure B.3. The concentration and flow rate of stream are denoted and , and for stream they are called and ( and may also be temperatures). The two streams with total flowrate [ , are mixed in a mixing tank of [ , and the concentration of the outlet flow is denoted . The concentrations since stream never represent the difference between component 1 and 2. has less of component 1, whereas is negative. The objective is to mix equal amounts of the components such that is zero. This concentration is controlled by manipulating the flow rate of . First we check if this controller, together with the mixing tank, is sufficient for suppressing disturbances in the concentration of stream . Combination of component balance and total material balance gives the following model: > @ (B.25) This model is linearized and scaled (as described in the controllability section). We require a variation in less than of the variation in . The scaled deviation variables are marked with a prime and we get the following model after Laplace transformation ; (B.26) where we have assumed constant . We study concentration disturbances, leading to 9 and further ; . Mainly due to the measurement, the control loop has an effective delay of 7 With a robust controller tuning, (B.19) gives a bandwidth of 7 " . 198 Appendix B. A Systematic Approach to the Design of Buffer Tanks qA cA qB cB FIC Tank 1 CIC c0 Tank 2 c Figure B.3: Extra buffer tank for a mixing process. Concentration is controlled by manipulating flow rate of stream B. Nominal data: [ , [ , [ [ [ , , . Range, used for scaling: Expected variations in : [ . Range for : [ . Allowed range for : [ . B.4 Quality variations 199 and 9 are shown in Figure B.4 (dashed lines). We see that for all frequencies, so that input constraints pose no problems in this case. In the figure the bandwidth frequency, , is also marked. We see that :9 at frequencies above the bandwidth, so a standard (robust) control system is not sufficient to fulfil the requirements on the outlet concentration. To solve this problem, we may either improve the control system (e.g. feedforward control), increase the volume of the mixing tank, or install an extra buffer tank. In this case we assume that the latter alternative is the best, and introduce a new tank after the mixing tank (dashed in Figure B.3). We see from Figure B.4 that the gain must be reduced with 10 at the bandwidth ( ), and obtain from (B.24) ( ) a required residence time of the buffer tank of ; , corresponding to a Y? ; ,\[ . The modified disturbance transfer function gain, volume of , is shown with a solid line in Figure B.4. The slope is -1 or smaller below the bandwidth, so that we need not consider the problem discussed in section B.3.1. is plotted (dash-dotted) to illustrate this ( $ ). is below 1 for all frequencies (dashed). Figure B.5 shows the response of a unit step in concentration of stream with (solid) and without (dashed) the extra buffer tank. We see that it is kept below 7J with the extra buffer tank present. 9 2 10 G0 1 10 Magnitude Gd Gd0 0 10 ωB SGd −1 L 10 −2 10 −2 10 −1 10 Figure B.4: With an extra buffer tank, the bandwidth. 0 10 Frequency [rad/s] 1 10 2 10 is brought below 1 for all frequencies above If the slope of is steeper than the slope of , ?/ is too optimistic. We will however analyze one case. We assume 9 has slope R so that has slope 200 Appendix B. A Systematic Approach to the Design of Buffer Tanks 0.8 0.7 0.6 Concentration 0.5 Concentration without extra buffer tank 0.4 0.3 0.2 Concentration with extra buffer tank 0.1 0 −0.1 0 10 20 30 40 Time [s] 50 60 70 80 Figure B.5: With an extra buffer tank the outlet concentration is kept within 0.1 from set-point despite a unit step in disturbance. This is not the case without the extra buffer tank. ; above the frequency M?/ , where ? is the buffer tank residence time. Further we assume that has slope near the bandwidth and that it increases to ; due to an integrator in the controller below M? , where ? is the integral time. A robust choice of ? is : (Skogestad, 1999). Using geometry it is easy to show that in this case ? : . Compared to (B.24) for one tank we see that the residence time for this case is increased by a factor of : . Example B.2 Consider the process from example B.1, modified so that the mea[ and the variation resurement delay is 7J , the volume of the first tank is quirements for the outlet concentration is 0.01. The concentration in the first tank is controlled with a robust PI controller (Skogestad, 1999). In this case the slope of is ; around the bandwidth, and (B.24) leads to a residence time of 7 , which is insufficient. In Figure B.6 a residence time of ? : 7 ; is applied. The method uses asymptotes, and we see that is just touching the asymptote of . itself is a distance above so the result here is slightly conservative. By optimization one find a minimum residence time of ; 7 < required to fulfil (B.21) for this controller tuning. B.5 Flow variations By exploiting the volume of the buffer tank, flow variations in the outflow may be dampened using a slow level control. The outflow will then be dependent on the B.5 Flow variations 201 2 10 1 Magnitude 10 Gd0 0 10 ωB SGd L −1 10 Gd 1/τ1 1/τ2 1/τI −2 10 −2 10 −1 10 0 10 Frequency [rad/s] 1 10 2 10 in the second tank, Figure B.6: With a residence time of for all frequencies, and disturbances are rejected. [ and the inlet and outlet flowchosen controller. Denote the tank volume rates and respectively. The transfer function for the buffer tank is then given by (B.10). Compared to the quality disturbance case, we have more freedom in selecting , since we can select the controller . But the level will vary, so the size of the tank must be chosen so that the level remains between its limits. The volume variation is given by ' , and combination with (B.11) yields: (B.27) ' which is used to find the required tank volume. The tank size design consists of the following steps: (1) Select satisfied. such that if has the desired shape, that is such that (B.16) is (2) Find the corresponding controller from (B.11) (is it realizable?) (3) Find the largest effect of on ). from (B.27) (usually at steady state, (4) Obtain the required total volume from the expected range of 0 ). (denoted In table B.1 we have applied the method for first and second order filtering. 202 Appendix B. A Systematic Approach to the Design of Buffer Tanks Table B.1: Flowrate disturbance: Procedure for buffer tank design applied to first and second order filtering Step 1. Desired 2. from (B.11) 3. 4. 1st order ? from (B.27) G5G A? Y? ?0 2nd order A? K ;Y? ;Y? 0 B.5.1 First-order filtering With K the required controller is a P-controller with gain Y? . From (B.27), K K . The maximum value of this transfer function occurs at low frequencies ( ), and the required volume of the tank is G5G ? 0 . Adding a slow integral action to the controller will not affect these results considerably. Such an integral action will reset the volume to its nominal value. This is not always desired, however. If e.g. is at its maximum, we may want the volume to stay at a large value to anticipate a possible large reduction in . B.5.2 Second-order filtering With K we get from (B.11) that the required controller is a lag ;Y? K (B.28) and from (B.27) the response of the volume deviation is B;Y? O? >; A ? This has its largest value equal to ;Y? volume is ;Y? 0 . at low frequencies ( (B.29) ), and the required B.6 Conclusions The objective of the control system is to counteract disturbances. However, the maximum achievable control bandwidth is approximately equal to the inverse of the effective process delay, i.e. FP . For “fast” disturbances, above the bandwidth frequency, one must rely on the process itself, including any buffer REFERENCES 203 tanks, to dampen the disturbances. The requirement is that the effect of disturbances on the controlled variable (usually concentration), should be less than 1 (in scaled units) at frequencies above the bandwidth. Specifically, if the magnitude of the original disturbance transfer function is larger than 1 at frequencies above the bandwidth, then we must add one or more buffer tanks, with overall transfer function , such that is less than 1. In the paper we present design methods for sizing buffer tanks based on this fundamental insight. The two fundamentally different sources of disturbances are variations in flowrate and variations in quality (concentration, temperature). Quality variations are dampened by mixing, and it may be adventageous to use several smaller rather than a single large buffer tank. Figure B.2 shows how depends on the number of tanks and total residence time ?/ . If we define as the value of at the bandwidth frequency , then the design objective is that should be less than 1/f at this frequency, and we derive in (B.24) the required value for ? . The volume in each buffer tank is then Y?Y where is the total flowrate. If the resulting slope of around the bandwidth is steeper than -1, then we need to increase the volume or add local feedback loops. The design method is illustrated in Examples B.1 and B.2. Flowrate variations are dampened using a slow level controller in the buffer tank, and there is no advantage of using several tanks as we may include dynamics in . Table B.1 gives a design procedure for flowrate disturbances. In conclusion, buffer tanks are designed and implemented for control purposes, yet control theory is rarely used when sizing and designing buffer tanks and their control system. In this paper we have presented a systematic approach for design of buffer tanks to dampen disturbances in quality and flowrate. References Harriott, P. (1964). Process Control. McGraw-Hill. New York. Lieberman, N. P. (1983). Process Design for Reliable Operations. Gulf Publishing Company. Houston. McMillan, G. K. (1984). pH Control. Instrument Society of America. Research Triangle Park, NC, USA. Sandler, H. J. and E. T. Luckiewicz (1987). Practical Process Engineering. McGraw-Hill Book Company. New York. Shinskey, F. G. (1973). pH and pIon Control in Process and Waste Streams. John Wiley & Sons. New York. Sigales, B. (1975). How to design reflux drums. Chem. Eng. 82(5), 157–160. 204 Appendix B. A Systematic Approach to the Design of Buffer Tanks Skogestad, S. (1999). Lecture notes for the course Process control (Tillegg til fag 52041 Prosessregulering, in Norwegian). Skogestad, S. and I. Postlethwaite (1996). Multivariable Feedback Control. John Wiley & Sons. Chichester, New York. Ulrich, G. D. (1984). A Guide to Chemical Engingeering Process Design and Economics. John Wiley & Sons. New York. Walas, S. M. (1987). Rules of thumb, selecting and designing equipment. Chem. Eng. 94(4), 75–81. Walsh, S. (1993). Integrated Design of Chemical Waste Water Treatment Systems. PhD thesis. Imperial College, UK. Watkins, R. N. (1967). Sizing separators and accumulators. Hydrocarbon Processing 46(11), 253–256. Wells, G. L. (1986). The Art of Chemical Process Design. Elsevier. Amsterdam. Zheng, A. and R. V. Mahajanam (1999). A quantitative controllability index. Ind. Eng. Chem. Res. 38, 999–1006.
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement