Robert Haber, Ruth Bars, and Ulrich Schmitz Predictive Control in Process Engineering
Related Titles
Abel, D., Epple, U., Spohr, G.-U. (eds.)
Integration von Advanced Control in der Prozessindustrie Rapid Control Prototyping 2008 ISBN: 978-3-527-31205-4
Puigjaner, L., Heyen, G. (eds.)
Computer Aided Process and Product Engineering 2006 ISBN: 978-3-527-30804-0
Reichwein, J., Hochheimer, G., Simic, D.
Messen, Regeln und Steuern Grundoperationen der Prozessleittechnik 2003 ISBN: 978-3-527-30572-8
Basar, T. (ed.)
Control Theory Twenty-Five Seminal Papers (1932-1981) 2000 ISBN: 978-0-7803-6021-1
Farinwata, S. S., Filev, D. P., Langari, R. (eds.)
Fuzzy Control Synthesis and Analysis 2000 ISBN: 978-0-471-98631-7
Robert Haber, Ruth Bars, and Ulrich Schmitz
Predictive Control in Process Engineering From the Basics to the Applications
WILEY-VCH Verlag GmbH & Co. KGaA
The Authors Prof. Robert Haber Cologne University of Applied Sciences Institute of Plant & Process Engineering Betzdorfer Str. 2 50679 Köln Germany
[email protected] Prof. Ruth Bars Budapest University of Technology & Economics Department of Automation and Applied Informatics Magyar Tudósok Körútja 2 1117 Budapest Hungary
[email protected] Ulrich Schmitz Shell Deutschland Oil GmbH Rheinland Raffinerie Godorf Ludwigshafener Straße 1 50389 Wesseling Germany
[email protected] Cover illustration Shell Rheinland Refinery, with permission
All books published by Wiley-VCH are carefully produced. Nevertheless, authors, editors, and publisher do not warrant the information contained in these books, including this book, to be free of errors. Readers are advised to keep in mind that statements, data, illustrations, procedural details or other items may inadvertently be inaccurate. Library of Congress Card No.: applied for British Library Cataloguing-in-Publication Data: A catalogue record for this book is available from the British Library. Bibliographic information published by the Deutsche Nationalbibliothek The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.d-nb.de. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA, Boschstr. 12, 69469 Weinheim, Germany All rights reserved (including those of translation into other languages). No part of this book may be reproduced in any form – by photoprinting, microfilm, or any other means – nor transmitted or translated into a machine language without written permission from the publishers. Registered names, trademarks, etc. used in this book, even when not specifically marked as such, are not to be considered unprotected by law. Typesetting le-tex publishing services GmbH, Leipzig Printing and Binding Fabulous Printers Pte Ltd, Singapore Cover Design Formgeber, Eppelheim Printed in Singapore Printed on acid-free paper ISBN Print 978-3-527-31492-8 ISBN oBook 978-3-527-63624-2 ISBN ePDF 978-3-527-63626-6 ISBN ePub 978-3-527-63625-9
V
Contents Preface XIII References
XXI
Notation and Abbreviations XXIII 1
Introduction to Predictive Control 1 1.1 Preview of Predictive Control 2 1.1.1 Prediction of the Reference Value 3 1.1.2 Prediction of the Disturbance 3 1.2 Manipulated, Reference, and Controlled Signals 4 1.3 Cost Function of Predictive Control 5 1.4 Reference Signal and Disturbance Preview, Receding Horizon, One-Step-Ahead, and Long-Range Optimal Control 8 1.5 Free and Forced Responses of the Predicted Controlled Variable 12 1.6 Minimization of the Cost Function 13 1.6.1 Minimization Algorithms for Nonlinear Processes with or without Constraints 14 1.6.2 Minimization of the Quadratic Cost Function for Linear Processes without Constraints 14 1.7 Simple Tuning Rules of Predictive Control 15 1.8 Control of Different Linear SISO Processes 18 1.9 Control of Different Linear MIMO Processes 21 1.10 Control of Nonlinear Processes 23 1.11 Control under Constraints 24 1.12 Robustness 25 1.13 Summary 27 References 28
2
Linear SISO Model Descriptions 29 2.1 Nonparametric System Description 31 2.1.1 FIR Model 31 2.1.2 FSR Model 33 2.1.3 Relationship between the FIRs and the FSRs 35 2.1.4 Disturbance Model 36
VI
Contents
2.2
2.3
2.4
Pulse-Transfer Function Model 36 2.2.1 Pulse-Transfer Function and Difference Equation 37 2.2.2 Relationship between the Pulse-Transfer Function, the Weighting Function, and the Step Response Models 38 2.2.3 Disturbance Model 41 Discrete-Time State Space Model 43 2.3.1 Minimal-Order State Space Representation 44 2.3.2 Non-Minimal-Order State Space Representations 48 Summary 54 References 54
3
Predictive Equations of Linear SISO Models 55 3.1 Predictive Equations Based on Nonparametric Models 56 3.1.1 Predictive Equations of the Impulse Response Model 56 3.1.2 Predictive Equations of the Step Response Model 61 3.2 Predictive Equations Based on the Pulse-Transfer Function 64 3.2.1 Repeated Substitution of the Process Model Equation 65 3.2.2 Prediction by Solving the Diophantine Equation 70 3.2.3 Prediction if the Additive Noise Is Autoregressive 74 3.2.4 Prediction in the Presence of a Measurable Disturbance 78 3.2.5 Prediction if the Additive Noise Is Nonautoregressive 81 3.2.6 Matrix Calculation Method 88 3.3 Predictive Equations of the State Space Model 93 3.4 Summary 99 References 101
4
Predictive On–Off Control 103 4.1 Classical On–Off Control by Means of Relay Characteristics 104 4.2 Predictive Set Point Control 107 4.2.1 Cost Function Minimization by a Selection Strategy 108 4.2.2 Cost Function Minimization by a Genetic Algorithm 110 4.2.3 Simulation and Comparison of the Predictive Set Point Control Algorithms 110 4.3 Predictive Start-Up Control at a Reference Signal Change 112 4.4 Predictive Gap Control 118 4.4.1 Quadratic Cost Function Minimization by the Selection Strategy or the Genetic Algorithm 118 4.4.2 Quasi Continuous-Time Optimization 119 4.4.3 Minimizing a Limit-Violation-Time-Point-Dependent Cost Function 121 4.4.4 Online Start-Up Strategy 124 4.4.5 Comparison of the Predictive On–Off Gap Control Algorithms 126 4.5 Case Study: Temperature Control of an Electrical Heat Exchanger 131
Contents
4.6
Summary 133 References 134
5
Generalized Predictive Control of Linear SISO Processes 135 5.1 Control Algorithm without Constraints 135 5.2 Linear Polynomial Form of Unconstrained GPC 142 5.3 Tuning the Controller Parameters 151 5.3.1 Effect of the Controller Parameters on the Control Behavior 151 5.3.2 Recommended Initial Parameters 161 5.3.3 Systematic Tuning of the Controller Parameters 163 5.3.4 Optimization of the Controller Parameters by a Genetic Algorithm 165 5.3.5 Simple Rule of Thumb for Tuning Second-Order Aperiodic Processes 172 5.4 Blocking and Coincidence Points Techniques 173 5.4.1 Coincidence Points Technique 175 5.4.2 Blocking Technique 176 5.4.3 Simultaneous Use of Coincidence Points and Blocking Techniques 178 5.4.4 Some Heuristic Rules on Allocation of the Coincidence Points 179 5.4.5 Some Blocking Techniques 182 5.4.6 Optimal Choice of the Coincidence Points and the Blocking Technique 183 5.5 Measured Disturbance Feed-Forward Compensation 188 5.6 Control Algorithm with Constraints 193 5.6.1 Physical Constraints 193 5.6.2 Mathematical Formulation of Typical Constraints 194 5.6.3 Hard and Soft Constraints 198 5.6.4 Explicit MPC with Multiparametric Programming without Online Optimization 200 5.6.5 Simulation Results 207 5.7 Extended GPC with Terminal Methods 213 5.7.1 End-Point State Constraint 213 5.7.2 End-Point State Weighting 216 5.8 Summary 218 References 219
6
Predictive PID Control Algorithms 221 6.1 Predictive PI(D) Control Structure 222 6.2 Predictive PI Control Algorithm 222 6.2.1 One-Step-Ahead Predictive PI Control 223 6.2.2 Long-Range Predictive PI Control 224 6.2.3 Predictive PI Control of a First-Order Process with Dead Time 225 6.3 Predictive PID Control Algorithm 228
VII
VIII
Contents
6.3.1 6.3.2 6.3.3
6.4
6.5 6.6 6.7 7
One-Step-Ahead Predictive PID Control 229 Long-Range Predictive PID Control 230 Predictive PID Control of a Second-Order Process with Dead Time 231 Equivalence between the Predictive PI(D) Algorithm and the Generalized Predictive Control Algorithm 234 6.4.1 Equivalence in the Case of Extended Horizon Control 234 6.4.2 Equivalence in the Case of Long-Range Horizon Control 236 Tuning of Predictive PI(D) Algorithms 240 Robustifying Effects Applied for Predictive PI(D) Control Algorithms 245 Summary 249 References 249
Predictive Control of Multivariable Processes 251 7.1 Model Descriptions 252 7.1.1 Matrix Fraction Model 252 7.1.2 State Space Representation 255 7.2 Predictive Equations 260 7.2.1 Prediction Based on the Matrix Fraction Model 260 7.2.2 Prediction Based on the State Space Representation 271 7.3 The Control Algorithm 277 7.4 Polynomial Form of the Controller (without Matrix Inversion) 284 7.5 Pairing of the Controlled and the Manipulated Variables 287 7.6 Scaling of the Controlled and the Manipulated Variables 290 7.7 Tuning 294 7.8 Decoupling Control 297 7.8.1 Decoupling by Using Static Compensators 300 7.8.2 Decoupling by Using a Dynamic Compensator 308 7.8.3 Decoupling by Slowing the Reference Signal Change 312 7.8.4 Decoupling by Changing the Control Error Weighting Factors at Any Set Point Change 315 7.8.5 Decoupling by Control-Error-Dependent Adaptation of the Control Error Weighting Factors 316 7.9 Case Study: Control of a Distillation Column 318 7.9.1 Distillation Column Model 318 7.9.2 Predictive TITO Control 321 7.9.3 Decoupling by Using Static Compensators 323 7.9.4 Decoupling by Control-Error-Dependent Adaptation of the Control Error Weighting Factors 328 7.9.5 Summary of the Experiences 330 7.10 Summary 331 References 332
Contents
8
Estimation of the Predictive Equations 335 8.1 LS Parameter Estimation 336 8.2 More-Steps-Ahead Prediction Based on the Estimated Process Model 337 8.3 Long-Range Optimal Single Process Model Identification 339 8.4 Multi-Step-Ahead Predictive Equation Identification 344 8.5 Comparison of the Long-Range Optimal Identification Algorithms 346 8.6 Case Study: Level Control in a Two-Tank Plant 348 8.7 Summary 350 References 350
9
Multimodel and Multicontroller Approaches 353 9.1 Nonlinear Process Models 354 9.1.1 Models with Signal-Dependent and Direction-Dependent Parameters 354 9.1.2 Multimodels 355 9.1.3 Multiparameter Models 358 9.2 Predictive Equations 359 9.3 The Control Algorithm 359 9.3.1 Control Based on the Multimodel Approach 359 9.3.2 Control Based on the Multiparameter Model 360 9.3.3 Multicontroller Approach 360 9.4 Case Study 362 9.4.1 Experimental Modeling of an Electrically Heated Heat Exchanger 362 9.4.2 Temperature Control of an Electrically Heated Heat Exchanger 370 9.4.3 Temperature Control with Forced Heating and Free Convective Cooling 375 9.5 Summary 379 References 380
10
GPC of Nonlinear SISO Processes 383 10.1 Nonlinear Process Models 383 10.1.1 Nonparametric Process Models 384 10.1.2 Cascade Process Models 385 10.1.3 Quadratic Block-Oriented Process Models 386 10.1.4 Linear-in-Parameters Models Including Multiplicative Terms 388 10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models 391 10.2.1 Predictive Equation Using the Input Signal 392 10.2.2 Predictive Equation Using the Input Increments 397 10.2.3 Common Incremental Predictive Form of the Quadratic Models 405
IX
X
Contents
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models 406 10.3.1 One-Dimensional Minimization of the Cost Function 406 10.3.2 Multidimensional Minimization of the Cost Function 410 10.3.3 Simulation Results 414 10.4 Control Based on Linearized Models 422 10.5 Control Based on Nonlinear Free and Linearized Forced Responses 422 10.6 Case Study: Level Control of a Two-Tank Plant 424 10.6.1 Nonlinear Process Model of the Two-Tank Process 424 10.6.2 Level Control of the Two-Tank Process 426 10.6.3 Level Control Based on Linearized Models 430 10.6.4 Level Control Based on Nonlinear Free and Linearized Forced Responses 431 10.7 Summary 433 References 434 11 Predictive Functional Control 437 11.1 Control Strategy and Controller Parameters for a Constant Set Point 438 11.2 PFC for Aperiodic Processes 443 11.2.1 PFC for First-Order Processes without Dead Time 443 11.2.2 PFC for Higher-Order Aperiodic Processes without Dead Time 446 11.2.3 PFC for a First-Order Process with Dead Time 449 11.3 PFC with Disturbance Feed-Forward 451 11.3.1 Algorithm for First-Order Process and Disturbance Models without Dead Time 451 11.3.2 Algorithm for First-Order Process and Disturbance Models with Dead Time 452 11.4 PFC with Constraints 454 11.5 Nonlinear PFC for Processes with Signal-Dependent Parameters 457 11.6 Case Study: Temperature Control of a Hot Air Blower 458 11.6.1 Physical Model of the Pilot Plant 459 11.6.2 Linear Process and Disturbance Model Identification 459 11.6.3 Simulation of Linear Temperature Control 460 11.6.4 Linear Temperature Control with a Real Process System 461 11.6.5 Nonlinear Process Model Identification 462 11.6.6 Nonlinear Temperature Control with a Real Process System 463 11.7 Summary 464 References 465 12 Case Studies 467 12.1 Predictive Temperature Control of an Injection Molding Machine 468 12.1.1 Modeling of the Plastification Unit 469
Contents
12.1.2 Predictive Zone Temperature Control 473 12.1.3 Predictive Start-Up Control with Temperature Difference Limitation 475 12.1.4 Summary 477 12.2 Wastewater Quality Control of an Intermittently Operated Plant 477 12.2.1 Modeling of the Plant 479 12.2.2 Conventional On–Off Control 480 12.2.3 Predictive On–Off Control Based on the Simulated Physical Model 481 12.2.4 Predictive On–Off Control Based on a Simplified Model 482 12.2.5 Summary 487 12.3 Wastewater Quality Control with Pre-denitrification 488 12.3.1 Modeling of the Plant 489 12.3.2 Comparison of the Conventional and Predictive Three-Level Control 489 12.3.3 Summary 492 References 494 13
Industrial Applications 497 13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column 498 13.1.1 Description of the Distillation Column 499 13.1.2 Control Targets, Controlled and Manipulated Signals, Constraints 500 13.1.3 The Process Model 504 13.1.4 Choice of the Set Values, Constraints, and Weighting Factors 506 13.1.5 Simulation Results of the Tuning of the Weighting Factors 508 13.1.6 Implementation and Results of Real-Time Control 511 13.1.7 Economic Benefits of the Optimization 513 13.1.8 Summary 514 13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column 515 13.2.1 Description of the Stripping Column and the Basic Control Loops 515 13.2.2 Control Targets, Controlled and Manipulated Signals, Constraints 516 13.2.3 Process Models from Step Tests 519 13.2.4 Hierarchical Minimization of the Control Cost Function 520 13.2.5 Set Point Control Considering the Constraints 522 13.2.6 The Controller Parameters 523 13.2.7 Real-Time Control 523 13.2.8 Economic Benefits and Summary 525
XI
XII
Contents
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline 527 13.3.1 The Furnace with the Reactor and Control Targets 528 13.3.2 Manipulated, Controlled, and Disturbance Signals 529 13.3.3 Process Model 530 13.3.4 Predictive Control Algorithm and the Choice of the Set Values, Constraints, and Weighting Factors 534 13.3.5 Simulation of Set Value, Disturbance Changes, and Constraint Violation 539 13.3.6 The Effect of the Weighting Factors of the Controlled, Manipulated, and Constrained Signals 544 13.3.7 Real-Time Predictive Control 549 13.3.8 Summary 551 References 552 14 Practical Aspects and Future Trends 553 14.1 Classification of a Predictive Control Project 553 14.2 Project Implementation 559 14.2.1 APC Project Chain 561 14.2.2 Achievable Benefits, an Example 565 14.3 Implementation of a Predictive Controller 566 14.3.1 Control Aim and Optimization 566 14.3.2 Advanced Optimization Features 569 14.3.3 Signal Scaling and Weighting 572 14.3.4 Handling of Ill Conditions 574 14.3.5 Handling of Constraints 575 14.3.6 Handling of Set Point or Set Range Changes 578 14.3.7 Techniques to Reduce Computational Effort 580 14.3.8 Dealing with Inner Loop Performance 581 14.4 Future Trends 585 14.4.1 Identification and Testing of the Plant 585 14.4.2 Nonlinear MPC 591 14.4.3 Integration of a Predictive Controller into the Base Layer 14.4.4 Performance Monitoring 593 14.5 Summary 594 References 595 Index
597
592
XIII
Preface The predictive control idea emerged in the 1970s as an industrial approach to process control. Today this technique is the most frequently applied advanced process control (APC) method in industry. Basic control algorithms are often extended by advanced control algorithms to exploit a plant better, to increase the benefits, to reduce the costs and manpower, and so on. To the advanced algorithms belong advanced regulatory control (e.g., cascade, ratio, override, disturbance feedforward control, fuzzy logic control, etc.) model-based control (e.g., predictive control, internal model control, Smith predictor, etc.) real-time optimization (linear or nonlinear, static or dynamic optimization). Only the last two methods are considered as APC methods. Common to these techniques is that they are model-based algorithms, that is, a model of the process (and often of the disturbances) is required and used during online calculations. Figure 1 shows the hierarchy of the four control levels. It is seen that the achievable benefits are greatest with basic control. Therefore, it is very important that the sensors and the valves be of good quality and the basic controllers be tuned well. On the other hand, APC applications help to improve the efficiency, which could be achieved otherwise only by extending and modifying the plant. (A similar but more detailed hierarchy is shown in Blevins et al. [1].) The capital costs as a function of the achievable benefits are shown in Figure 2. APC applications have mostly been applied in the refining and petrochemical industry; see, for example, the statistics in Figure 3 presented by Qin and Badgwell [2]. This diagram is based only on the implementations of two big vendors, Aspen Technology and Honeywell. On the basis of process models which can be obtained by simple measurements even in an industrial environment, predictive control provides good tracking and disturbance rejection behavior considering also constraints for both single-input, single-output (SISO) and multi-input, multi-output (MIMO) systems. In recent years, besides the generally used proportional plus integral plus derivative (PID) control algorithms, predictive control has gained significant industrial acceptance,
Preface Necessary effort to build a control structure
Achievable benefits by different control structures
APC: RTO (Real-Time Optimization) (nonlinear dynamic or steady-state process optimization)
APC: RTO APC: Model based control
APC: Model based control (multivariable, predictive control, linear optimization, )
(multivariable, predictive control, linear optimization, )
Advanced regulatory control
Advanced regulatory control
(fuzzy logic, constrained control, override control, cascade control feed-forward, )
Process control
Process control (basic control)
Figure 1 Necessary effort to build a hierarchical control structure and the achievable benefits.
100%
Advanced regulatory control >10%
80% Capital costs %
XIV
Model predictive control >20%
60%
Real-time optimization >25%
40% 20% 0% 0%
Basic regulatory control >45%
20% 40% 60% 80% Potential performance improvement
100%
Figure 2 Benefits of control and optimization. Source: ARC Advisory Group, Real-time Process Optimization & Training Outlook, 2008.
supported also by industrial software. In the case of a long dead time and a known reference trajectory, predictive control ensures much faster performance than the PID algorithms. Figure 4 shows statistics based on about 150 responses to a questionnaire from the ARC Advisory Group (founded as Automation Research Corporation) related to the industry sectors refinery, chemicals, oil and gas, power, pulp and paper, polymers, metals, mining, food and beverage, cement, glass, and pharmaceuticals. Bauer and Craig [3] surveyed the answers of 38 APC users and 28 APC suppliers to a questionnaire about APC applications. Figure 5 shows the statistics of the “standard” and “frequently” used advanced techniques. (The possible categories for how frequently the method was used were in decreasing order: standard, fre-
Preface
Mining/Metallurgy: 0.6% Pulp and paper: 2.7%
Other/Unclassified: 4.6%
Chemicals: 4.7%
Petrochemicals: 21.0%
Refining: 66.4%
Figure 3 APC applications by area of operation. Does your company use MPC (model-based predictive control)?
Routinely
Sometimes
Never
0%
5%
10% 15% 20% 25% 30% 35% 40% 45% 50% Respondents
Figure 4 Usage of model-based predictive control. Source: ARC Advisory Group, Real-time Process Optimization & Training Outlook, 2008.
quently, rarely, and never. As the answers to the questionnaire may be subjective, the statistics presented should be interpreted with caution.) Though not all techniques listed belong to APC (e.g., split-range control), and some applications might have used several of the methods listed (e.g., model-based predictive control (MPC) based on a neural net model, or constrained control by means of MPC), the diagram shows that today MPC is the most frequently applied APC method in industry. Further, the survey of Bauer and Craig confirms the finding of the survey of Qin and Badgwell, namely, the refinery, petrochemical, and chemical industries are the largest users of APC. As a fourth sector, mineral processing was mentioned by Bauer and Craig. Figure 6 shows the level of adoption of APC by industrial users based on the same questionnaire evaluated in Figure 2. The diagram shows that APC is rather
XV
XVI
Preface Standard or frequently
Model-based Predictive Control Constraint control
Rarely or never
Split-range control
unknown
LP (Linear Programming) Nonlinear control algorithms Deadtime compensation Statistical process control Neural networks based control Expert system based control Fuzzy logic control IMC (Internal Model Control) Adaptive / self-tuning control DS (Direct Synthesis) 0%
20%
40%
60%
80%
100%
Figure 5 Most frequently used advanced control methods in industry.
Leaders
Competitors
Followers
All 0%
20%
40%
Small-Midsize Units/Plants
60%
80%
100%
Large Units/Plants
Figure 6 Current level of APC implementations.
applied to large plants than to small or medium-sized plants (because of the higher achievable profits and safety requirements with larger plants). The acceptance is best with the leaders (companies with high technology), not as good with competitors, and even lower with followers. The last bar “all” shows the average value. The aim of this book is to introduce the topic of predictive control, to give a detailed discussion of the control algorithms for both linear SISO and linear MIMO systems, to describe some predictive control methods for nonlinear systems, and also to discuss some new trends and practical aspects in predictive control. The book intends to make the topic understandable and practically applicable for students and industrial users by giving the philosophy of the control ideas and also
Preface
the mathematics behind them with computational details. The book was written for senior undergraduate and graduate students and for engineers who would like to apply advanced control techniques in industrial practice. The book supposes basic knowledge of control theory. A simple introduction and a discussion of predictive control concepts with straightforward explanations are given. The theoretical results are demonstrated through simple examples. The details of the calculations are described, and simulations illustrate the behavior of the algorithms. The reader will get some practice in applying predictive control and an insight into the effects of the tuning parameters. The control algorithms are based on adequate system models. These models can be obtained by first principles describing the system behavior or by identification based on input/output (I/O) measurements. Here the systems are represented by discrete-time, mainly by I/O models. In some cases state space models are also considered. As predictive control requires predictive process models, providing prediction of future outputs based on information available till the current time point, generally predictive transformation of the model equations is required. Some aspects of identification of the parameters of the predictive models themselves, that is, some details of identification for predictive control, are also dealt with. In control practice on–off control is widely applied providing simple and cheap control solutions. On the other hand, predictive algorithms are very rarely presented for on–off valves. Different predictive solutions for on–off control have been developed and are discussed in this book. Nowadays, nonlinear predictive control solutions are at the forefront of interest. As generally the systems are nonlinear, control algorithms considering the nonlinearities would provide better performance in the whole operating range than linear algorithms. Some new predictive algorithms for control of nonlinear processes have been worked out and their performance has been analyzed. Here, predictive control algorithms based on the Hammerstein and Volterra model approximation of the system model and solutions using multimodel and multicontroller approaches are discussed and their performance is demonstrated. For real-time applications the computational demand of the control algorithms is of significant importance. Several possibilities to reduce the computation time are dealt with. The algorithms applying optimization procedures under constraints could be applied rather in the case of slow processes. The main criticism of predictive control was that in its original formulations stability is not guaranteed. Stability and robustness issues have been addressed in the technical literature recently and robust predictive control solutions can be obtained. Some predictive control solutions guaranteeing stability are also given, but for detailed discussion on stability and robustness, we refer to the literature. Experiences with an industrial predictive control program package, several simulated case studies (e.g., injection molding machine, wastewater treatment), and some applications from a refinery (distillation column, gas-heated furnace) are given. Several practical aspects based on our experiences and based on the literature are presented.
XVII
XVIII
Preface
The book consists of 14 chapters. Chapter 1 gives an introduction to predictive control. The control algorithms are based on adequate system models. Chapter 2 presents the different linear SISO model descriptions, whereas Chapter 3 derives their predictive equations. Chapter 4 presents new conceptions and algorithms of predictive on–off control. Linear predictive control is discussed in Chapter 5. Chapter 6 shows predictive PID algorithms which equip PID control with predictive properties. Chapter 7 discusses predictive algorithms applied to MIMO systems. Chapter 8 shows identification methods to determine the coefficients of the predictive equations. Chapter 9 discusses predictive algorithms for nonlinear systems based on Hammerstein and Volterra models, whereas Chapter 10 describes multimodel and multicontroller predictive control solutions for nonlinear systems. Chapter 11 presents predictive functional control, a simply realizable very effective method. Chapter 12 gives some case studies (temperature control of an injectionmolding machine, wastewater quality control of two plants, the first with an intermittently operated plant and the second with pre-denitrification). Chapter 13 discusses solutions and experiences with some industrial predictive control applications in a refinery (distillation column, gas-heated furnace). Chapter 14 discusses the methodology and practical aspects of the introduction of predictive control in an industrial environment. A flowchart describing the organization of the book is given in Figure 7. In the main streamline, the usual predictive control topics are introduced and discussed. The aim of the authors was to give clear explanations and demonstrations of the methods through simple examples with computational details. For nonlinear control, simplified effective control algorithms are given as derived by the authors. In the parallel streamline, additional topics are considered, related to the main streamline and including also contributions of the authors. Estimation of predictive equations involves a procedure for how to estimate the coefficients of the predictive equations immediately instead of identifying the original parameters and then executing predictive transformation. Predictive PID control equips the well-known PID algorithms with predictive properties, introducing PID control algorithms with embedded predictive features. Nonlinear predictive control algorithms nowadays are at the forefront of interest, as considering the nonlinear characteristics of the process in the control algorithm promises better control performance in the whole operating range than using linear control algorithms. On–off control is discussed here in a predictive context. Also, nonlinear multimodel and multicontroller approaches are shown to control nonlinear processes. Case studies and some industrial applications demonstrate the effectiveness of predictive control applications. (Case studies are presented not only in Chapter 12 but also at the end of Chapters 4, 9, and 11, as shown in Figure 7.) Finally, some practical aspects of advanced control algorithms in practice and a discussion of future trends are given. The material in this book is based on the literature on predictive control (textbooks and papers) and also on the research work of the authors. The experiences of our teaching courses have shown that explaining general ideas and research results has to be extended by background materials, explanations, and examples. It
Preface
1. Introduction
2. Linear SISO models
3. Linear predictive equations
4. Predictive on/off control
4. Case study: heat exchanger
11. PFC (Predictive Functional Conrol)
12. Case studies: injection molding, wastewater treatment
5. Linear predictive control algorithm
8. Estimation of predictive equations
5. GPC (Generalized Predictive Control) • tuning • constraints handling • disturbance feed-forward • reduction of computation time
6. Predictive PID control
7. Linear MIMO predictive control
9. Multi-model comtrol
10. Nonlinear predictive control
11. Case study: hot air blower
13. Industrial applications: distillation column, furnace
9. Case study: heat exchanger
10. Case study: level control
14. Practical aspects and future trends
Figure 7 Flowchart describing the organization of the book.
took several years to write the text, which we think can be taught at universities. The third author, Ulrich Schmitz, was a PhD student of the first two authors and contributed a lot to the practical realization and simulation of the algorithms. (He defended his thesis on the topic of nonlinear predictive control in 2006.) The first draft of the material provided the basis for short intensive PhD courses held in the Department of Process Control, Helsinki University of Technology, Finland, in 1999, 2003, and 2006 (by invitation from Prof. Sirkka-Liisa Jämsä-Jounela) and master courses offered in the Faculty of Electrical Engineering and Informatics of Budapest University of Technology and Economics, Hungary (department of the second author), and the Faculty of Process Engineering, Energy, and Mechanical Systems of Cologne University of Applied Sciences, Germany (department of the first author). Some lectures on selected topics in predictive control were held in the frame of master and PhD courses in the Faculty of Informatics and Electrical Engineering, University of Rostock, Germany, in 2000 (by invitation from Prof. B. Lampe),
XIX
XX
Preface
in the Faculty of Electrical Engineering and Information Technology of the Slovak University of Technology, Bratislava, Slovak Republic, in 2004 (by invitation from Prof. S. Kožak), in the Faculty of Electrical Engineering of Louisiana State University, Lafayette, USA, in 2002 (by invitation from Prof. Fahmida Chowdhury), and in the Department of Systems Engineering and Automation of the University of Seville, Spain, in 2008 (by invitation from Prof. E.F. Camacho).
Acknowledgements
This book is the result of collaboration between Cologne University of Applied Sciences, Germany, and Budapest University of Technology and Economics, Hungary, supported by the EU Socrates-Erasmus project and by the “Internationalization” fund of Cologne University of Applied Sciences. Some parts of the material included in this book are the results of research work sponsored by a grant from the Hungarian Academy of Sciences for control research and by the Hungarian National Research Fund for Control Research through grants T042741 and T068370. This work is also connected with the scientific program of the project “Development of quality-oriented and cooperative R+D+I strategy and functional model at Budapest University of Technology and Economics.” This project is supported by the New Hungary Development Plan (Project ID: TÁMOP-4.2.1/B-09/1/KMR-2010-0002). The development of the predictive control strategy for wastewater clarification was supported by the Federal Ministry for Education and Research (BMBF) as promotion of applied research and development, recommended by the German Federation of Industrial Cooperative Research Associations “Otto von Guericke”. In February and March 2008, the first two authors performed research work in the Department of Systems Engineering and Automation of the University of Seville, Spain, in the frame of the Marie Curie program MOBILITY-1.3 “Improving the tuning methodology for MPC” project. The authors express their thanks for the invitation and the fruitful discussions with Prof. E.F. Camacho, C. Bordons and Dr. J. Gruber. The common research in Seville contributed to some new results on nonlinear predictive control. We are also very grateful for the invitation by our colleagues (listed above) which allowed us to lecture on parts of the book and get feedback on the material. We highly appreciate the permanent support of our colleagues in our departments. The Laboratory of Process Automation of Cologne University of Applied Sciences has had working contact with the Department of Technology of Shell’s Rhineland Refinery for many years. The authors gratefully acknowledge the collaborations in several diploma theses and long discussions with the engineers U. Volk and H. Golisch about predictive control of industrial processes. The third author is now working with Shell on APC applications. We tried to incorporate all these experiences in the present book. Dr. D. Honc, from the Department of Control Systems, Institute of Electrical Engineering and Informatics, University of Pardubice, Czech Republic, has spent several months at Cologne University of Applied Sciences. He provided several
Preface
valuable comments on the manuscript and the discussions with him were very helpful. He contributed to the topics of predictive control of multivariable and nonlinear processes. Dr. M. Kvasnica from the Department of Information Engineering and Process Control of the Slovak University of Technology, Bratislava, coauthor of the MultiParametric Toolbox, explained to us multiparametric programming for solving constrained predictive control and helped us write the corresponding section of the book. The authors are also grateful to Dr. J. Richalet, one of the pioneers of predictive control and a former manager at ADERSA (France), who drew our attention to the easily implementable predictive functional control. Two of the authors participated in and enjoyed his impressive training course. The book was typeset in LATEX by B. Moddemann, a student of ours in Cologne. He did an excellent job. All three authors thank their families for their support, patience, and understanding. The authors hope that the material will be useful in understanding and teaching topics in advanced control and also in providing some ideas for further research. The authors would be thankful for any comments, corrections, and recommendations by the readers. June 2011 Cologne Budapest Frechen (near Cologne)
Robert Haber Ruth Bars Ulrich Schmitz
(
[email protected]) (
[email protected]) (
[email protected])
References 1 Blevins, T.L., McMillan, G.K., Wojsznis, W.K., and Brown, M.W. (2003) Advanced Control Unleashed: Plant Performance Management for Optimum Benefit, Research Triangle Park, USA: ISA (Instrumentation Systems and Automation Society).
2 Qin, S.J. and Badgwell, T.A. (2003) A survey of industrial model predictive control technology. Control Engineering Practice, 11, 733–764. 3 Bauer, M. and Craig, I.K. (2008) Economic assessment of advanced process control – a survey and framework. Journal of Process Control, 18, 2–18.
XXI
XXIII
Notation and Abbreviations
Notation
A(q 1 )
polynomial matrix of the output signal in the matrix fraction model Ax system matrix of the CARMA state space description system matrix of the CARIMA state space description A∆ x A(q 1 ) denominator polynomial of the pulse-transfer function 1 two-dimensional polynomial of quadratic output terms A 2 (q 1 1 , q2 ) 1 A ∆ (q ) denominator polynomial of (1 q 1 )A(q 1) coefficient of the polynomial A(q 1) ai coefficient of the polynomial A ∆ (q 1 ) a∆i 1 B(q ) polynomial matrix of input terms in the matrix fraction model input vector and matrix of the CARMA state space description b x , Bx (SISO, MIMO) b∆ x , B∆ x input vector and matrix of the CARIMA state space description (SISO, MIMO) B(q 1 ) numerator polynomial of the pulse-transfer function 1 two-dimensional polynomial of quadratic input terms B2 (q 1 1 , q2 ) coefficient of the polynomial B(q 1) bi cx , Cx output vector and matrix of the CARMA state space description (SISO, MIMO) output vector and matrix of the CARIMA state space description c∆ x , C∆ x (SISO, MIMO) c0, c1, c2 coefficients of quadratic polynomials diag h. . .i diagonal matrix d dead time relative to the sampling time dead time relative to the sampling time from input j to output i di j of a MIMO process E j (q 1 ), F j (q 1 ) polynomial matrices obtained by solving the MIMO Diophantine equation
XXIV
Notation and Abbreviations
E j (q 1 ), F j (q 1 ) polynomials obtained by solving the SISO Diophantine equation eO(k C j jk) j-steps-ahead predicted signal of e(k) e(k) discrete-time control error F coefficient matrix of y p for prediction of yO free 1 F j (q ) polynomial of y (k) with j-steps-ahead output prediction G coefficient matrix of ∆u f for prediction of ∆Oyforc G(q 1 ) MIMO pulse-transfer function matrix post postcompensator pulse-transfer function matrix G c (q 1 ) pre precompensator pulse-transfer function matrix G c (q 1 ) post pulse-transfer function matrix of a process with a postcompenG p (q 1 ) sator pre–post 1 Gp (q ) pulse-transfer function matrix of a process with a precompensator and a postcompensator pre G p (q 1 ) pulse-transfer function matrix of a process with a precompensator G( j ω) frequency function pulse-transfer function G(q 1) G(s) transfer function coefficient of the weighting function series gk G i j (q 1 ) pulse-transfer function between input j and output i of a MIMO process transfer function between input j and output i of a MIMO proG i j (s) cess coefficient matrix of ∆u f for prediction of yO forc Hf H Hp coefficient matrix of ∆u p for prediction of yO free Hdist,f coefficient matrix of ∆v m, f for prediction of yO free dist,p H coefficient matrix of ∆v m,p for prediction of yO free f
H j (q 1 ) p
H j (q 1 ) f Cp
Hj
(q 1 )
f
H j (q 1 ) p
H j (q 1 ) f Cp
Hj (q 1 ) h k , h 1k h 2i j I I MM J
matrix polynomial of current and future ∆u(k) terms with jsteps-ahead (MIMO) output prediction matrix polynomial of past ∆u(k) terms with j-steps-ahead MIMO output prediction matrix polynomial of ∆u(k) with j-steps-ahead MIMO output prediction polynomial of current and future ∆ u(k) terms with j-stepsahead SISO output prediction polynomial of past ∆ u(k) terms with j-steps-ahead SISO output prediction polynomial of ∆ u(k) with j-steps-ahead SISO output prediction coefficient of the step response series quadratic Volterra kernel unity matrix diagonal unity matrix of dimension M M cost function
Notation and Abbreviations d J(∆u) d ∆u post Kc pre Kc
KGPC kGPC k Kc Kp Kr Kp i j M m Mu My max min n na nb nt ne n e1 n e1i n e2 n e2i n e,hor ni j nu P r (q 1 ) P y (q 1 ) Pi j p 0 , p 1, p 2 1 q 1 q 1 1 Q 2 (q 1 1 , q2 ) R(q 1 ) s S(q 1 ) sgn(.)
derivative of cost function J according to ∆u static gain matrix of postcompensator static gain matrix of precompensator controller gain matrix of the GPC algorithm in the MIMO case controller gain vector of the GPC algorithm in the SISO case discrete time controller gain static gain set point weighting factor static gain from input j to output i of a MIMO process number of input and output signals of a MIMO system memory of a nonparametric model number of input signals of a MIMO system number of output signals of a MIMO system maximum minimum order of a pulse-transfer function degree of polynomial A(q 1) degree of polynomial B(q 1) degree of polynomial T(q 1 ) (extended) prediction horizon beyond the dead time first point of the extended prediction horizon beyond the dead time first point of the extended prediction horizon of output i for a MIMO process last point of the extended prediction horizon beyond the dead time last point of the extended prediction horizon of output i for a MIMO process length of the long-range prediction horizon model order of a submodel between input j and output i of a MIMO process length of the control horizon reference signal filter controlled signal filter process between input j and output i of a MIMO process coefficients of a discrete-time PID controller difference operator backward shift operator two-dimensional polynomial of product terms of input and output signals polynomial of ∆ u(k) in the RST algorithm argument of the Laplace transformation polynomial of y (k) in the RST algorithm two-value signum function (0 or 1)
XXV
XXVI
Notation and Abbreviations
sign(.) ∆T T(q 1 ) t T(q 1 ) T1 , T2 TD Td TDF TI ti TL Tr (q 1 ) TT Td i j Ti j tinfl tsim u(k) ∆ u(k) U u(t) u F (k) ∆ u F (k) u low , u up ∆ u low , ∆ u up u off, u on u(k) ∆u(k) uf ∆u f ∆u p ∆uact (k) v (k) v (t) v m (k) ∆v m, f ∆v m,p v u (k) xO (k C j jk) x (k) x ∆ (k)
three-value signum function (1, 0, or 1) sampling time MIMO robustness/disturbance filter matrix (filter of unmeasured noise) continuous time robustness/disturbance filter polynomial (filter of unmeasured noise) time constants derivative time constant (of a PID controller) continuous-time dead time filter time constant of the derivative part of a PID controller integrating time constant (of a PI(D) controller) coefficient of the polynomial T(q 1 ) latent dead time polynomial of y r (k) in the RST algorithm latent time constant continuous-time dead time from input j to output i of a MIMO process time constant from input j to output i of a MIMO process inflexion time point simulation time discrete-time input signal (manipulated variable) increment of input signal (manipulated variable) steady-state input signal continuous-time input signal (manipulated variable) filtered discrete-time input signal filtered increment of the input signal (manipulated variable) lower and upper constraints of the output signal lower and upper constraints of control signal increments manipulated variable values with on–off control multivariable control input u 1 (k), . . . , u M (k) multivariable control input increments ∆ u 1 (k), . . . , ∆ u M (k) vector of current and future manipulated variables vector of current and future input signal increments vector of past input signal increments current manipulated variable vector (with a MIMO process) discrete-time auxiliary signal continuous-time auxiliary signal measurable disturbance vector of current and future measured disturbances vector of past measured disturbances unmeasured disturbance j-steps-ahead predicted signal x(k) discrete-time state variable of the CARMA model discrete-time state variable of the CARIMA model
Notation and Abbreviations
∆y ∆yforc ∆yfree ∆y low , ∆y u p y(k O C j jk) yOforc (k C j jk) yOfree (k C j jk) yO yO (k C j jk) yO forc yO free y(k) yp Y y (t) y F (k) y r (k) y rt r (k) y low , y up y r,low , y r,up y (k) ∆y (k) [yr] [d] [h] [s] Φ i (.) Λu Λy λr λu λ suc λy λ syc λi j ω ω0 σi ξ θ φ
vector of output signal increments forced response vector of output signal increments free response vector of output signal increments lower and upper constraints of output signal increments j-steps-ahead prediction of signal y (k) in the SISO case j-steps-ahead predicted forced response of y (k) j-steps-ahead predicted free response of y (k) vector of predicted outputs in the prediction domain j-steps-ahead prediction of signal y(k) in the MIMO case vector of predicted forced responses in the prediction domain vector of predicted free responses in the prediction domain vector of multivariable outputs y 1 (k), . . . , y M (k) vector of past outputs steady-state output signal continuous-time output signal (controlled variable) filtered discrete-time output signal discrete-time reference signal discrete-time reference trajectory lower and upper constraints of the output signal lower and upper reference value limits discrete-time output signal (controlled variable) output signal increment year (dimension) day (dimension) hour (dimension) second (dimension) weighting factor of the ith locally valid model weighting factor matrix of the control increments (manipulated signal changes) weighting factor matrix of the control errors control error reduction factor (with PFC) weighting factor of the control increments (manipulated signal changes) scaling factor of the control increments (manipulated signal changes) weighting factor of the control error scaling factor of the control error relative gain of controlled variable i with respect to manipulated variable j frequency natural frequency of a second-order oscillating process standard deviation of the ith Gaussian validity function damping factor of a second-order oscillating process model parameter vector memory vector
XXVII
XXVIII
Notation and Abbreviations
Abbreviations
APC ARC ARMAX ARIMAX
advanced process control advanced regulatory control autoregressive moving average model with exogenous input autoregressive integrating moving average model with exogenous input ASM1 activated sludge model no. 1 BOT-PCT pressure-compensated bottom temperature CARMA controlled autoregressive moving average model CARIMA controlled autoregressive integrating moving average model CPM control performance monitoring CSTR continuous stirred tank reactor CV controlled variable DCS distributed control system DV disturbance variable FBP final boiling point FIR finite impulse response FSR finite step response GPC generalized predictive control IMC internal model control LD linear dynamic LRPI long-range predictive identification LS least squares LPV linear parameter varying LV limited variable MIMO multi-input, multi-output MPC model-based predictive control MSPI multi-step-ahead predictive identification MV manipulated variable NARMAX nonlinear autoregressive moving average model with exogenous input NS nonlinear static PCT pressure-compensated temperature PFC predictive functional control PI proportional plus integral PID proportional plus integral plus derivative PLC programmable logic controller PRBS pseudo-random binary signal PRMS pseudo-random multi-level signal PRTS pseudo-random three-level signal PWA piecewise affine RGA relative gain array
Notation and Abbreviations
RST SISO TITO TOP-PCT WWTP
RST polynomial form single input, single output two input, two output pressure-compensated top temperature wastewater treatment plant
XXIX
1
1 Introduction to Predictive Control Model-based predictive control is a relatively new method in control engineering. The basic idea of the method is to consider and optimize the relevant variables, not only at the current time point but also during their course in the future. This goal is achieved first by a heuristic choice of the manipulated variable sequence and simulation of the future course of the process variables. If the future course of the controlled and the constrained variables is not satisfactory, then new manipulated variable sequences are tried out until the control behavior becomes satisfactory. The expression “predictive control” arises from a forecast of the variables. A process model is necessary to simulate the process; therefore, we have the attribute “model based”. In acquiring knowledge of the predicted process variables, constraints on the manipulated, controlled, and other variables can be simply taken into account. Predictive control makes possible robust control, mostly at the expense of slower performance. These algorithms are particularly suitable for petrochemical plants, which are slow enough to allow the simulation of the future course of the process values to consider both the controlled variables and the fulfillment of the constraints. In the sequel the basics of predictive control are dealt with, namely,
preview of predictive control, manipulated, reference, and controlled signals, cost function of predictive control, receding horizon strategy, free and forced responses of the predicted controlled variable, minimization of the cost function.
Several simulation examples illustrate the predictive control principle and its advantage over proportional plus integral (plus derivative) (PI(D)) control for linear single-input, single-output (SISO) systems, linear multi-input, multi-output (MIMO) systems, and nonlinear processes.
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
2
1 Introduction to Predictive Control
Finally, the possibility of handling constraints is demonstrated. Practical examples are not dealt with in this introductory chapter. They are discussed in Chapters 12 and 13.
1.1 Preview of Predictive Control
There is a fundamental difference between predictive control and conventional on– off or PID control: A conventional controller observes only the current (and remembers the past) process variables. A predictive controller observes the current and also the future process variables (and remembers the past variables). Predictive thinking is more natural in everyday thinking, for example, during car driving one observes the future shape of the road, brakes if one is approaching a curve, pushes the gas pedal if one is nearing a hill, and decreases the speed if another, slower car appears in the field of vision. Figure 1.1 compares the two driver philosophies. Conventional control in driving would mean a driving style where the car driver looks only through the side windows. In a curve the driver can correct the trace following the position only after having observed an error. Any real driver on the route is a predictive controller, because he/she drives depending on the curvature and what he/she sees in advance in front of the car. The longer the preview distance, the better the position control, but the calculations are more time consuming. The horizon length has to be increased with the car speed. Beyond a certain preview distance the control would not be better. A minimum sampling time is necessary, otherwise the car cannot follow the driver’s commands in due time.
(a)
nonpredictive control
Figure 1.1 Car driving strategies.
(b)
predictive control
1.1 Preview of Predictive Control
The aim of control is to follow the reference signal and reject (which means eliminate) the effect of the disturbances. Therefore, the quality of the control depends on how these signals can be known in advance and also on the quality of the process model. Sometimes there is no information about the future course of the reference signal or disturbance. Then the signal is assumed to remain constant, which is also a prediction, though it is not optimal. 1.1.1 Prediction of the Reference Value
In some cases the course of the future reference signal is known. Examples are: the product quality changes are planned in advance, the desired temperature in rooms in offices, schools, and so on, according to a schedule, the trajectory of a robot arm. If the manipulated variable can be changed according to knowledge of the future reference signal course and before the change of the reference signal, then the desired value of the controlled variable can be achieved earlier than without this knowledge. Table 1.1 illustrates this fact for temperature control. 1.1.2 Prediction of the Disturbance
In some cases the course of the future disturbances is known. Examples are: weather forecast, electrical consumption forecast (schedule of broadcasting an event, when many people switch on their TV, lights, or heating). Table 1.1 Decision about how to heat a school building before the teaching starts (8:00 in the morning). Strategy
Heating before 8:00
Pupils in the class at 8:10
Decision based on the current temperature set point
Heating according to the current (night) demand
Freezing pupils can not learn
Decision based on the current and future temperature set point
Heating starts at about 6:30 as the building warms up slowly
Pupils learn in a pleasant climate
3
4
1 Introduction to Predictive Control Table 1.2 Decision about taking or not taking an umbrella on an excursion. Current weather situation
Future weather situation
Decision based on the current weather situation
Without a forecast, one gets into difficulties
Decision based on the weather forecast
One can handle disturbances by planning in advance (with a forecast)
If the manipulated variable can be changed with knowledge of the future course of the disturbances and before the disturbances occur, then the desired course of the controlled variable can be achieved earlier than without this knowledge. Table 1.2 illustrates this fact for “weather control” in everyday life. The advantage of predictive control is obvious: one will not get wet if an umbrella is taken on an excursion.
1.2 Manipulated, Reference, and Controlled Signals
Figure 1.2 shows the course of the manipulated, reference, and controlled signals during the control. The following symbols are introduced: u: y, y r : y: O t, k: ∆T : d:
manipulated variable (also called control signal) controlled and reference signals predicted controlled signal current continuous and discrete times sampling time discrete physical dead time relative to the sampling time.
Predictive control performs the following tasks: minimizes the control error several steps ahead of the current time point (between k C N1 and k C N2 ), penalizes the control increments several steps (n u 1) ahead of current time point (e.g., to eliminate valve wear), takes into account limitations in the control, controlled, and other computed (e.g., state) variables.
1.3 Cost Function of Predictive Control
Figure 1.2 Manipulated, reference, and controlled signals during the control.
A sudden, for example, stepwise change of the reference signal can produce a too large, nonrealizable change in the manipulated variable. Sometimes a reference trajectory is introduced, which is the filtered value of a set value (reference signal) change. In the sequel only the reference signal and not the reference trajectory will be used, unless it is mentioned explicitly. The future course of the controlled signal can be calculated only if a model of the process is known. Therefore, predictive control is often called model-based predictive control. The difference between predictive and nonpredictive control is shown in Figures 1.3 and 1.4. Nonpredictive control (like PI(D) control) works with current (and through the internal memory also with past) values, whereas predictive control considers also future reference and/or measurable or observable disturbance and predicted manipulated and controlled signal sequences. (The connections with the predicted signals are drawn with double arrows as these signals usually contain several values. The selector generates the current control signal from the calculated manipulated variable sequence.)
1.3 Cost Function of Predictive Control
Any reasonable criterion can be defined to be achieved by the predictive controller. Some possible aims may be:
5
6
1 Introduction to Predictive Control Measurable and observable disturbances
Nonpredictive controller
Reference signal
Current manipulated variable
Nonmeasurable disturbance
Controlled signal
Process
Current controlled signal
Figure 1.3 Block scheme of a nonpredictive controller. Measurable, observable and known future disturbances
Current and future
Selector
Optimizer
reference signal
Predicted
Predicted controlled variables
Nonmeasurable disturbance
Process
Controlled signal
Current
manipulated variable
Predictor Current controlled signal
Figure 1.4 Block scheme of a predictive controller.
fastest control, fastest control without overshoot in the controlled signal, fastest control with limitation of the manipulated signal, and so on. A possible criterion of predictive control is to minimize a quadratic cost function of the control error and the manipulated variable increments during the corresponding prediction horizons. Clarke et al. [2] derived the control algorithm called Generalized Predictive Control (GPC) for linear input/output models. In the unconstrained case, the solution is explicit. The quadratic cost function for the SISO case is JD
N2 X
nu 2 X λ y i y r (k C i) y(k O C ijk) C λ u j ∆ u2 (k C j 1) ) min ,
iDN1
j D1
∆u
(1.1) with the notation
1.3 Cost Function of Predictive Control
y r (k C ijk): reference signal i steps ahead of the current time, y(k O C ijk): predicted (and controlled) output signal i steps ahead, ∆ u(k C i): controller output increment i steps ahead, where (k C ijk) denotes that the future signal is predicted on the basis of the information available till the current time point k. The tuning parameters of the control algorithm are: N1 : N2 : nu:
first point of the prediction horizon beyond the current time, last point of the prediction horizon beyond the current time, length of the control horizon (the number of supposed consecutive changes in the control signal), λ y,N1 , . . . , λ y,N2 : weighting factors of the control error, usually assumed to be equal to 1 (λ y D 1 in the SISO case), λ u1 , . . . , λ u,n u : weighting factors of the control increments, usually assumed to be equal (and denoted then by λ u ). As the current manipulated variable can influence the controlled signal only after the dead time, the first and last points of the control error horizon are considered by n e1 and n e2 : n e1 : first point of the prediction horizon beyond the current time point and the dead time, n e2 : last point of the prediction horizon beyond the current time point and the dead time n e1 D N1 d 1 I
n e2 D N2 d 1 .
(1.2)
With these denotations (1.1) becomes JD
n e2 X
y r (k C d C 1 C n e ) y(k O C d C 1 C n e jk)
2
n e Dn e1
C
nu X j D1
λ u ∆ u2 (k C j 1) ) min . ∆ u(k)
(1.3)
The cost function consists of two parts: costs due to control error during the control error horizon, which is also called the optimization or prediction horizon, costs to penalize the control signal increments during the manipulated variable horizon, which is also called the control horizon. After the control horizon, that is, after n u steps, the manipulated variable is kept constant. That means that if the reference signal is a constant value, then the last manipulated variable is the steady-state value of the corresponding manipulated variable.
7
8
1 Introduction to Predictive Control
The above cost function can be minimized with knowledge of the process model for different controller parameters. This will be done for linear SISO processes in Chapter 5 and for MIMO processes in Chapter 7. Now let us consider a practical example of a complex task. Example 1.1 Control of the economy: decision about increase or reduction of taxes The global goal is to maximize the satisfaction of the citizens (as the government would like to win the next parliamentary election). More precisely, sometimes this global goal is reduced to a current goal of maximizing the satisfaction of the citizens on the day of the election (without consideration of the problems after the election, e.g., guaranteeing pensions). The target (cost) function consists of several parts: maximizing the incomes of the state, maximizing the incomes of the citizens (satisfaction feeling), minimizing the working time (satisfaction feeling), and so on. The following variables are defined:
Controlled variable: satisfaction of the citizens Disturbances: effects of the world economy Manipulated signal: tax change (increase or reduction) Constraints: Each citizen must receive the subsistence level, daily working time maximum 8 h, and so on.
Model-based prognosis: To compute the target function some years ahead, models are used which simulate (predict) the consequences of a tax change. Model-based control: On the basis of minimization of the target function, a new, optimal tax (manipulated variable) is computed. Sampling time of discrete-time control: The tax is changed each 1 January, which means ∆T D 1 year. A sequence of tax changes is calculated for the next years, but only the current tax change is realized. The calculation is repeated every year in the knowledge of the current (measured) values, considering also the situation of the world market.
1.4 Reference Signal and Disturbance Preview, Receding Horizon, One-Step-Ahead, and Long-Range Optimal Control
In the sequel the basic principles of predictive control are illustrated by some simulation results. As predictive control minimizes the future control error, the future values of the reference signal have to be known. There are two possibilities:
1.4 Characteristic Features of Predictive Control
the future reference signal course is known; the future reference signal course is not known. If there is no other information, then the current set value is assumed to be constant in the future. Example 1.2 Predictive control of a linear third-order process without knowing the future reference signal Figure 1.5 shows the predictive control of a linear third-order process without a reference signal and disturbance prediction. The process parameters are as follows: static gain K p D 1, and three equal time constants of T1 D 1/3 s. The set value is increased stepwise at t D 1 s from 0 to 1 and a load disturbance of 1 is added to the input of the process at t D 6 s. The sampling time is ∆T D 0.1 s and the controller parameters are n e1 D 0, n e2 D 9, n u D 3, and λ u D 0.1.
Example 1.3 Predictive control of a linear third-order process knowing the future reference signal Figure 1.6 shows the predictive control of a linear third-order process if the future reference signal course is known for n y r ,p r e steps. All other parameters are as in Example 1.2. In the case of the reference signal preview, the control starts n y r ,p r e steps before the set point change and achieves the new set value earlier than without a preview. As is seen, a part of the control error after the set point change is shifted to before the set point change. As the disturbance is not known in advance, its compensation starts after its occurrence (and measurement).
(a)
controlled variable
(b)
manipulated variable
Figure 1.5 Predictive control of a linear third-order process without knowing the future reference signal.
(a)
controlled variable
(b)
manipulated variable
Figure 1.6 Predictive control of a linear third-order process knowing the future reference signal for some n y r ,p re steps in advance.
9
10
1 Introduction to Predictive Control y
ndist,pre yr
dist,pre
dist,pre
y
ndist,pre t
(a)
controlled variable
(b)
manipulated variable
Figure 1.7 Predictive control of a linear third-order process without knowing the future reference signal but knowing the disturbance n d i st,p re steps ahead.
Disturbances can be divided into three groups: Nonmeasurable (or unobservable) disturbances Only the controlled output signal is measured and used in the control algorithm. Measurable (or observable) disturbances Both the disturbance and the controlled output signals are measured and used in the control algorithm. The control starts only if the disturbance occurred. If the process has a long delay and/or dead time, the manipulated signal can compensate for the effect of the disturbance with delay. Future course of the measurable (or observable) disturbances is known The control can start in advance to compensate for the disturbance. In the optimal case, the disturbance does not influence the controlled output. Example 1.4 Predictive control of a linear third-order process knowing the disturbance in advance Figure 1.7 shows the predictive control of a linear third-order process if the future course of the disturbance signal is known for n d i s t,p r e steps. All other parameters are as in Example 1.2. In the case of a preview, the control starts n d i s t,p r e steps before the disturbance change and compensates for the disturbance earlier than without a preview. As is seen, a control error occurs before the appearance of the disturbance and acts to eliminate it. As the future course of the reference signal is not known in advance, the control starts to move to the new set point after the change of the reference signal. For comparison, the controlled and the manipulated signals are also plotted for the case when the disturbance is not known.
In Example 1.1 it was mentioned that a sequence of tax changes is calculated for the next years but only the current tax change is realized. The calculation is repeated every year. Receding horizon control strategy: The manipulated variable and its future values are computed in each control sampling step. Only the current manipulated signal is realized. The advantage is that changes in the model, in the reference signal, in the disturbances, and/or in the constraints during the prediction horizon (which means in the future) can be actually considered.
1.4 Characteristic Features of Predictive Control
(a)
controlled variable
(b)
manipulated variable
Figure 1.8 Predictive control of a linear third-order process with and without a receding horizon, without knowing the future reference and disturbance signal.
Example 1.5 Control of a disturbed plant without and with the receding horizon technique The control scenario is the same as in Example 1.2. The variable n u,h o r shows how many elements of the manipulated variable are taken from the control signal sequence without a new calculation. n u,h o r D 1 corresponds to the receding horizon case. As is seen, the control is faster if the manipulated variable is calculated in every control step in the case of a disturbance (shown in Figure 1.8) or of a process parameter change (not shown here). Depending on the control error horizon bounds, one can distinguish two types of cost function: One-step-ahead control: The start and the end of the control error horizon are equal; the cost function is optimized only at one time point in the future (n e1 D n e2 ). Long-range optimal control: The end point of the control error horizon is larger than the start point; the cost function is optimized at more time points in the future (n e2 > n e1 ). Example 1.6 One-step-ahead and long-range optimal control of a linear third-order process Figure 1.9 compares the one-step-ahead and long-range optimal control of a linear third-order process if the future reference signal course is unknown. All other parameters are as in Example 1.2. The one-step ahead control with a short prediction n e1 D n e2 D 1 caused overshoot and oscillations, and with a long prediction n e1 D n e2 D 9 it was very slow. The overshoot could be decreased and the control becomes faster if a long-range optimal control is used with nearly the same start and end values of the control error horizon as in the one-step-ahead cases before. The simulations show that a too short prediction horizon may cause overshoot for higher-order systems; a too long prediction horizon results in slow control without overshoot; a long-range optimal control with a low starting value and high end value of the horizon may lead to fast control with a small overshoot.
11
12
1 Introduction to Predictive Control
(a)
controlled variable
(b)
manipulated variable
Figure 1.9 One-step-ahead and long-range optimal predictive control of a linear third-order process without knowing the future reference and disturbance signals.
1.5 Free and Forced Responses of the Predicted Controlled Variable
The predicted process response y(k O C 1 C d C n e jk) is the effect of the free and the forced response (Figure 1.10): The free response yO free (k C 1 C d C n e jk) is obtained if the last value of the manipulated signal is kept unchanged. – u(k 1) D u(k) D u(k C 1) D . . . D u(k C n u 1) or ∆ u(k C j 1) D 0 with j D 1, 2, . . . , n u – with the initial values y (k), y (k 1), . . . , y (k n) (n is the model order) The forced response yO f o r c (k C 1 C d C n e jk) is the effect of the consecutive changes in the manipulated variable at the current and future time points. – ∆ u(k), ∆ u(k C 1), . . . , ∆ u(k C n u 1), and ∆ u(k C i) D 0 for i n u – with the initial values y (k) D 0, y (k 1) D 0, . . . , y (k n) D 0. For linear processes the predicted controlled output can be calculated as the sum of the free and forced responses (superposition principle). Unfortunately, the superposition is not valid for nonlinear processes.
Figure 1.10 Splitting the predicted controlled variable into a free and a forced response for linear systems.
1.6 Minimization of the Cost Function
Figure 1.11 Preview of the reference value, free response, and controlled variable by the program INCA from IPCOS Technologies.
Figure 1.11 shows the prediction of the free response and the predicted controlled variable (as the sum of the free and the forced response) in a display hard copy of the commercial program INCA from IPCOS Technologies, Boxtel, The Netherlands. The operator can see a preview of the above-mentioned variables and can stop the automatic control, change the set value, or change the manipulated variable if the predicted values are not satisfactory.
1.6 Minimization of the Cost Function
The controlled output also depends on future manipulated variable values. Accordingly, future values of the current manipulated variable have to be optimized as well. The sequence of the changes in the manipulated variable to be calculated is T ∆u D ∆ u(kjk), ∆ u(k C 1jk), . . . , ∆ u(k C n u 1jk) T ∆ u(k), ∆ u(k C 1), . . . , ∆ u(k C n u 1)
(1.4)
and the first term of vector (1.4) is used as the current manipulated variable. For simplicity, ∆ u(k C ijk) is written as ∆ u(k C i) in the sequel, although the future manipulated variable is calculated at the current time point k.
13
14
1 Introduction to Predictive Control
1.6.1 Minimization Algorithms for Nonlinear Processes with or without Constraints
Generally there is no analytical solution: the cost function is computed by simulation in the prediction horizon for all sequences of the manipulated variable and the manipulated variable sequence is calculated by a numerical algorithm such as the simplex or gradient method (this is faster, however sometimes no global minimum is found), an evolutionary algorithm (this is slower, but mostly the global minimum is found). The initial value for the minimization can be the manipulated signal sequence in the previous sampling step. 1.6.2 Minimization of the Quadratic Cost Function for Linear Processes without Constraints
The free response can be calculated with knowledge of the model parameters from the current and past input/output values. The forced response is a linear function of the manipulated variable sequence in the future horizon. A quadratic cost function of the manipulated signal sequence can be minimized analytically without iteration if there are no constraints. Table 1.3 summarizes the cases mentioned. Figure 1.12 shows the general structure of a predictive controller. If the minimization of the cost function leads to an analytical solution, then the control algorithm is a difference equation like with PID control. Then the online computation Table 1.3 Comparison of the minimization algorithms. Linear model and no technological constraints
Linear model with technological constraints
Nonlinear model with or without technological constraints
Model type Hard constraint Prediction of the controlled signal
Linear No Sum of the free and forced system responses
Nonlinear Possible Direct calculation
Minimization algorithm
Analytical solution
Computational demand
Low
Linear Possible Direct calculation or sum of the free and forced system responses Minimization of the cost function in an iterative way High
Minimization of the cost function in an iterative way Very high
1.7 Simple Tuning Rules of Predictive Control
Data storage Current values
Old values
Future reference signals
Manipulated signal
Optimizer
Manipulated signal sequence Current state
Process
Controlled signal
Future controlled signals
Predictor
Figure 1.12 Structure of a predictive controller.
time is comparable with that of PID control, which is usually negligible related to the sampling time. If iterative minimization is necessary, then the online computational demand is higher, depending on the dimension of the minimization problem and on the algorithm applied. There are some algorithms known for linear processes with hard constraints which work with a series of a priori computed control laws and with knowledge of the state variables the linear control algorithm has to search for in a lookup table.
1.7 Simple Tuning Rules of Predictive Control
The advantage of predictive control over PI(D) control is obvious when the process has nonaperiodic characteristics or it contains significant dead time. This is illustrated by two examples. Example 1.7 Level control in a tank and in a boiler The relation between the water flow and the level in a tank results in an aperiodic process (without boiling water), and the level control is an easy task. In a boiler, however, the cold water increase leads temporarily to a decrease of the level as bubbles in the boiling water collapse. If the water feed becomes warmer, the level increases and achieves its new, higher steady-state value. Such processes are called inverse repeat or non-minimum-phase processes. Figure 1.13 shows both cases with the step responses. The tanks and boilers in Figure 1.13 also show the sequences of the level changes. The sampling time is ∆T D 0.1 s. First, a PID controller is tuned according to Chien et al. [1] for the tank level control. The simulated process is approximated by a first-order lag element with dead time and the following parameters: static gain
15
16
1 Introduction to Predictive Control
(a)
tank
(b)
boiler
Figure 1.13 Level step responses of a tank and a boiler.
K p D 1, apparent dead time TL D 0.2 s, and apparent time constant TT D 1.4 s (of course, such a process is much slower in practice). The controller parameters are as follows: Kc D
0.6 TT 0.6 1.4 s D 4.5 I D K p TL 1 0.2 s
TI D TT D 1.4 s I
TD D 0.5 TT D 0.5 0.2 s D 0.1 s .
The set value was increased stepwise at t D 1 s from 0 to 1 and a step disturbance was added to the input of the process at t D 11 s from 0 to 1. The control with an overshoot of about 50% is seen in Figure 1.14. The same process was controlled by GPC. All controller parameters were selected with their minimum value, n e1 D 0, n u D 1, and λ u D 0, except for the end of the control error horizon, n e2 D 30. The fast, aperiodic control is seen in Figure 1.15. Now the level controller is designed for the boiler. Again, first a PID controller is tuned according to Chien et al. [1]. The inverse-response step response is approximated as an aperiodic process with dead time. The process parameters are given by the static gain K p D 1, the apparent dead time TL D 1.1 s, and the apparent time constant TT D 0.8 s. The controller parameters are as follows: Kc D
0.6 TT 0.6 0.8 s D 0.436 I D K p TL 1 1.1 s
TI D TT D 0.8 s I
TD D 0.5 TT D 0.5 1.1 s D 0.55 s .
The set value and the disturbance were changed as before. The control behavior became significantly slow and oscillating (Figure 1.16). The same process was controlled by GPC. The controller parameters were selected as before with the tank level control, only the control error horizon started at n e1 D 11 because of the apparent dead time TL D 1.1 s. The control became fast and aperiodic (Figure 1.17).
1.7 Simple Tuning Rules of Predictive Control 4 y 2
1 h 0.8
–1
dist.: 0
y
yr
0 0.6
-2
0.4
5 u
0.2 TL
TT
0
2
4
6
8
10 12 14 16 t [s] 20
0
2
4
6
8
10
0
0
-5 0
0.5
1
1.5
2
2.5
3
t [s]
4
12 14 16 t [s] 20
Figure 1.14 PID control of an aperiodic process (tank level). (ne2 +1) ∆T
1 h 0.8
4 y 2
y
0 0.6 0.4
-2
0 5 u
(ne1+1) ∆T
0.2
–1
dist.: 0
yr
2
4
6
8
10 12 14 16 t [s] 20
2
4
6
8
10 12 14 16 t [s] 20
0
0
-5 0
0.5
1
1.5
2
2.5
3
t [s]
0
4
Figure 1.15 GPC of an aperiodic process (tank level).
0.8
4 y 2 y r
0.6
0
0.4
-2
h 1
TL
0.2
TT
0
5 u
-.2
0
dist.: 0
–1
y
16 t [s] 20
0
2
4
6
8
10
12 14
0
2
4
6
8
10
12 14 16 t [s] 20
-.4 -.6
0
0.5
1
1.5
2
2.5
3
t [s] 4
-5
Figure 1.16 PID control of an inverse-response process (boiler level).
The example shows that GPC can be tuned more easily than a PI(D) controller and the controller parameters can be derived from the physical parameters of the step response. The control error horizon should be started immediately after the dead time (with inverse-response characteristics the time duration of the initial inverse response is considered as a dead time).
17
18
1 Introduction to Predictive Control h 1
4 y 2
(ne2+1) ∆T
dist.: 0
0
0.6 (ne1+1) ∆T
0.4
y
-2 0 5 u
0.2 0
–1
yr
0.8
14 16 t [s] 20
2
4
6
8
10
12
2
4
6
8
10
12 14
0
-.2 -.4 -.6
0
0.5
1
1.5
2
2.5
3
t [s]
4
-5
0
16 t [s] 20
Figure 1.17 GPC of an inverse-response process (boiler level).
The control error horizon should be finished at the settling time of the openloop step response (it can be chosen to be longer, but this has no effect on the control behavior any more).
1.8 Control of Different Linear SISO Processes
Predictive control can be used for different process types. Example 1.8 Predictive control of different linear SISO processes Table 1.4 shows the open-loop step responses of different linear processes to a unit step at t D 1 s and the control of a set value change from 0 to 1 at t D 1 s for given values of the tuning parameters. 1. Oscillating process (second order): Process parameters: static gain K p D 1, damping factor ξ D 0.5, and time constant T2 D 2 s. The transfer function of the process is G(s) D
1 . 1 C 2 0.5 2s C 22 s 2
where s denotes the Laplace operator. Controller parameters: ∆T D 0.2 s, n e1 D 0, n e2 D 19, n u D 5, and λ u D 0.01. 2. Integrating process: Process parameters: integrating time constant TI D 2 s and time constant T1 D 1 s: G(s) D
1 . 2s(1 C s)
Controller parameters: ∆T D 0.2 s, n e1 D 0, n e2 D 19, n u D 5, and λ u D 0.01.
1.8 Control of Different Linear SISO Processes Table 1.4 Control of different linear processes. No.
Open-loop step response
1. Oscillating h
Set value and controlled signal y
h
1
1
0
2
4
6
h
0
2
4
6
8
10 t [s]
2
3
4
5 t [s]
2
3
4
5 t [s]
2
3
4
5 t [s]
y
h
1
1
yr
y
0
0
1
2
3
4
5 t [s]
0
1
y
h
1
1
yr
h
0
0 0
4. Unstable
10 t [s]
8
0
3. Inverse response
y
0
0
2. Integrating
yr
1
h
2
3
4
5 t [s]
1
y
h
1
0
y
1
yr
y
0
0 0
1
2
3
4
5 t [s]
0
1
3. Process with inverse-response characteristics: Process parameters: static gain K p D 1, three equal time constants T1 D T2 D T3 D 1/3 s, and time constant corresponding to non-minimum-phase zero τ D 1/3 s: G(s) D
1 (1/3)s . (1 C (1/3)s)3
Controller parameters: ∆T D 0.2 s, n e1 D 5, n e2 D 19, n u D 3, and λ u D 0.01. 4. Unstable process: Process parameters: static gain K p D 1 and time constants T1 D 1/3 s and T2 D 1/3 s: G(s) D
1 . (1 C (1/3)s) (1 (1/3)s)
Controller parameters: ∆T D 0.2 s, n e1 D 0, n e2 D 9, n u D 3, and λ u D 0.1.
19
20
1 Introduction to Predictive Control
(a)
controlled variable
(b)
manipulated variable
Figure 1.18 Predictive control of a linear third-order process with different dead times without knowing the future reference signal.
(a)
controlled variable
(b)
manipulated variable
Figure 1.19 Predictive control of a linear, third-order process with dead time with knowledge of the future reference signal.
As can be seen, different processes can be controlled fast and nearly without overshoot. Control of the unstable process is possible without any problems. The next example shows the control of a dead-time process. Example 1.9 Control of processes with different dead times Figure 1.18 shows the predictive control of the same linear third-order process without dead time (Td D 0) as in Example 1.2. As the future course of the reference signal is not known, the manipulated signal changes only after the change in the set value. Furthermore, the control of the same process with dead time is also shown for Td D 1 s and Td D 2 s. As is seen, the controlled signal is shifted by the dead time and the manipulated variable is the same in all cases until the time point when the disturbance appears. The simulations are repeated for the case when the future course of the reference signal is known, see Figure 1.19. Now, all controlled signals for the reference tracking control are identical and the manipulated variable starts before the set value change by the process dead time.
A process with known dead time can be controlled as if the dead time were not present if the future reference values are known in advance. (This is also valid for the disturbance signal, but in the simulated cases the disturbance was not assumed to be known in advance.) Predictive control has – in this respect – features similar to those of the Smith predictor. However, predictive control is more robust than the Smith predictor (see also Section 1.12).
1.9 Control of Different Linear MIMO Processes
1.9 Control of Different Linear MIMO Processes
The next example shows how easily a MIMO process can be controlled according to the predictive control principle minimizing a quadratic cost function. The simulated process is of two-input, two-output (TITO) type. Both terms of the cost function of the SISO process (1.1) had to be extended by similar terms for the second manipulated and controlled variable. Example 1.10 Predictive control of different TITO processes Figure 1.20 shows three different structures: 1. two SISO processes, 2. a TITO process, 3. another TITO process where the main channels and the coupling terms are interchanged. All subprocesses have the same three time constants T1 D T2 D T3 D 1/3 s. The static gains of the coupling terms are smaller than those of the main channels, K p11 D 1, K p12 D 0.25, K p 21 D 0.5, K p 22 D 1, and the dead times of the coupling terms are bigger than those of the main channels, Td11 D 0.4 s, Td12 D 0.8 s, Td21 D 1.0 s, Td22 D 0.6 s. With traditional PI(D) design, first a decoupling has to be designed and afterwards the PI(D) parameters have to be determined. With predictive control, solely the start and end points of both control error horizons and the lengths of the manipulated variable horizons have to be given – in addition to the process model. The sampling time was ∆T D 0.2 s and the controller parameters were chosen for both variables as in Example 1.2 for the SISO third-order process: n e1 D 0, n e2 D 9, n u D 3, and λ u D 0.1.
(a)
SISO
(b)
TITO
Figure 1.20 SISO and different TITO processes.
(c) TITO interchanged
21
22
1 Introduction to Predictive Control
(a)
control by two SISO controllers
(b)
control by a MIMO controller
Figure 1.21 Predictive control of two SISO processes (process (a) in Figure 1.20).
(a)
control by two SISO controllers
(b)
control by a MIMO controller
Figure 1.22 Predictive control of the TITO process (process (b) in Figure 1.20).
In the sequel two cases are compared: control by two independent (decentralized) SISO controllers, control by a TITO controller. Figure 1.21 shows the SISO and MIMO predictive control of the two noncoupled processes. Of course, there is no difference between the control behaviors. Figure 1.22 shows the SISO and MIMO control of the two coupled processes. As expected, the SISO control is bad. With MIMO control the controlled signals are very similar to those of the uncoupled case; the MIMO predictive control decouples the process automatically. Figure 1.23 shows the SISO and MIMO control of the coupled processes if the main and coupling terms are interchanged. Because of the longer dead times of the coupling terms than those of the main channels, the SISO control is very bad (unstable). The MIMO control results in the same control behavior as in case when the main and coupling channels were not interchanged. The only difference is in the course of the manipulated variables (not shown here). Example 1.10 has shown that a predictive controller can be tuned very easily for MIMO processes using similar controller parameters now for more variables, predictive MIMO control decouples the controlled variables and the degree of the decoupling can be influenced by the choice of the controller parameters (not shown here).
1.10 Control of Nonlinear Processes
(a)
control by two SISO controllers
(b)
control by a MIMO controller
Figure 1.23 Predictive control of the TITO process (process (c) in Figure 1.20).
1.10 Control of Nonlinear Processes
Any predictive controller consists of a predictor, as shown in Figures 1.4 and 1.12. As a prediction can be performed by repeated simulations, this technique can be used both for linear and for nonlinear processes. (For linear systems more effective ways exist to calculate the predicted model output. This technique is dealt with later on.) Example 1.11 Prediction of a linear and a nonlinear model Consider the first-order nonlinear (bilinear) difference equation y (k) D a 1 y (k 1) C b 1 u(k 1) C c 1 u(k 1)y (k 1) . The one-step-ahead prediction is a similar equation: y (k C 1) D a 1 y (k) C b 1 u(k) C c 1 u(k)y (k) . The two-steps-ahead prediction is obtained by shifting the one-step-ahead predictive equation and substituting y (kC1) from the one-step-ahead predictive equation: y (k C 2) D a 1 y (k C 1) C b 1 u(k C 1) C c 1 u(k C 1)y (k C 1) D a 1 a 1 y (k) C b 1 u(k) C c 1 u(k)y (k) C b 1 u(k C 1) C c 1 u(k C 1) a 1 y (k) C b 1 u(k) C c 1 u(k)y (k) . This equation is predictive, as y (k C 2) depends only on known measured values y (k) and u(k) and a future input value u(k C 1). The method for calculation of the predictive equation is the same for the nonlinear case c 1 ¤ 0 and for the linear case c 1 D 0.
23
24
1 Introduction to Predictive Control
1.11 Control under Constraints
During the control different variables can be constrained. Some typical constraints concerning the manipulated and the controlled variable are shown in Figure 1.24. Another variable, for example, a state variable, can be restricted as well. In this case the cost function (1.1) should be minimized under constraints. Alternatively, the cost function can be extended by a quadratic term that weights the constraint violation. In the case of the so-called soft constraints, the unconstrained minimization of the cost function is an easy task. Example 1.12 Predictive control with constraints Figure 1.25 is the same as Figure 1.5 for Example 1.10 where a linear third-order process was controlled without constraints. In Figure 1.26 the manipulated signal is limited to the interval 0 u(k) u u p D 2. As is seen, the control becomes a bit slower, mainly the compensation of the disturbance after t D 6 s; however, no steady-state error occurs. In Figure 1.27 the controlled output signal is limited to the interval 0 y (k) y u p D 0.9. As expected, the controlled variable never achieves the desired set value.
In both simulated cases constraint handling was very effective and the control remained relatively fast. As with predictive control, the future course of the manipulated and controlled variables is simulated in every step, and constraint handling can be performed online with little additional computational demand. However, in this case GPC does not have an analytical form.
(a) manipulated variable
(b) controlled variable
Figure 1.24 Constraints.
(a)
controlled variable
(b)
manipulated variable
Figure 1.25 Predictive control of a linear third-order process without constraints.
1.12 Robustness
(a)
controlled variable
(b)
manipulated variable
Figure 1.26 Predictive control of a linear third-order process if the manipulated variable is limited below 2.
(a)
controlled variable
(b)
manipulated variable
Figure 1.27 Predictive control of a linear third-order process if the controlled variable is limited below 0.9.
1.12 Robustness
Predictive control is usually more robust to parameter changes than PI(D) control. Example 1.13 Comparison of predictive control and PID control This example shows control of the same linear third-order process as in Example 1.2 but with dead time Td,m D 1 s. The weighting factor is raised from 0.1 to 10.0 to make the GPC similar to PID control. The GPC tuning parameters are n e1 D 0, n e2 D 9, n u D 3, and λ u D 10. The PID control is tuned manually (K p D 0.7, TI D 1.2 s, and TD D 0.5 s), because the usual tuning rules do not work very well for processes with dead time. Figure 1.28 shows the control with the process dead time equal to the model dead time Td,m D 1 s and with a value increased by 10%, Td,p D 1.1 s. Both controls show mostly the same sensitivity to the parameter change, even if the PID controller generally produces more oscillations, bigger manipulated variable changes (the initial change was from 0 to 4.22), and needs more considerations for the tuning. The next example shows a special case: the control of a dead-time process with a PID controller using a Smith controller vs. predictive control.
25
26
1 Introduction to Predictive Control
(a) controlled variable of predictive control
(b) manipulated variable of predictive control
(c)
(d) manipulated variable of PID control
controlled variable of PID control
Figure 1.28 Control of a linear third-order dead-time process with dead-time mismatch.
(a) controlled variable of predictive control
(b) manipulated variable of predictive control
(c)
(d)
controlled variable of PID with Smith predictor control
manipulated variable of PID with Smith predictor control
Figure 1.29 Control of a linear third-order dead time process and with dead-time mismatch.
Example 1.14 Comparison of predictive control and PID control using a Smith predictor Figure 1.29 shows the predictive control of the same linear thirdorder process as in Example 1.2 but with dead time Td,m D 2 s and the weighting factor raised from 0.1 to 10.0 to make the GPC as slow as the PID control. The predictive controller parameters are as in Example 1.2. The same process was controlled by a PID controller with a Smith predictor as well. The PID controller was tuned for fast aperiodic control according to the tuning rule of the T-sum rule
1.13 Summary
of Kuhn [3]: K p D 1.0 I TI D
TΣ D 1.0 s I
Kc D
2 2 2 TΣ D 1.0 s D s I 3 3 3
1 1 D 1.0 I D Kp 1.0 1 1 1 TD D TΣ D 1.0 s D s . 6 6 6
Here TΣ is the sum of the time constants. Now, the simulation was repeated with the dead time of the processes reduced by 10% (the model remained unchanged) (Td,m D 2 s, Td,p D 1.8 s). What Example 1.14 shows is generally valid: predictive control is usually more robust than PI(D) control, not only if a Smith predictor is used. (There are some methods that ensure enhanced robustness for both predictive and PI(D) control algorithms.)
1.13 Summary
The above-mentioned considerations, the industrial experiences, and the literature show that predictive control is to be preferred to PID control if:
the future course of the reference signal is known, the future course of the disturbances is known, the the process has a long dead time, the process has inverse-response (non-minimum-phase) characteristics, the process is unstable, constraints are to be considered, the process is nonlinear, the process parameters may change during the control, several control variables are to be controlled simultaneously, decoupling of a MIMO process is desired.
The advantages of predictive control are as follows:
simple controller tuning based on physical process parameters, robust behavior against model parameter and disturbance changes, applicable both for input/output and for state space models, nonparametric models, such as finite impulse response and finite step response models, can be used, predictive control works with physically interpretable parameters and therefore this algorithm can be easily understood by engineers and operators.
27
28
1 Introduction to Predictive Control
References 1 Chien, K.L., Hrones, J.A., and Reswick, J.B. (1952) On the automatic control of generalized passive systems. Transactions ASME, 74, 175–185. 2 Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987) Generalized predictive control. Part I. The basic algorithm. Automatica, 23(2), 137–148.
3 Kuhn, U. (1995) Eine praxisnahe Einstellregel für PID-Regler: Die TSummenregel (A practical tuning rule for PID controllers: the T-sum rule). Automatisierungstechnische Praxis, 37(5), 10–16.
29
2 Linear SISO Model Descriptions The system model gives a description of the behavior of a system. Modeling considers some important viewpoints on how to handle the process, and ignores some others which at this time are not at the forefront of interest. For controller design the main viewpoint of modeling is to determine the signal transfer properties of the system. Process models can be obtained from prior knowledge – understanding the process behavior, the physical principles governing its operation, and giving a proper mathematical formulation for them. Another way to get process models is by experimentation on the process. Simple measurements, for example, the step response of the system obtained by switching on the input signal, provide important information on the process dynamics. System identification which uses an appropriate exciting signal is another experimental approach to process modeling. To obtain a good model describing the system, it is often beneficial to combine the methods of physical modeling and experimentation. The models can describe the relationship between the input and the output signals, or can give the dynamic behavior of the inner (so-called state) variables as well. The models generally give the relationship not only between the manipulated input u and the output y but also describe the effect of the disturbances and noises on the output. Load disturbances generally show slow variations, whereas noises are considered as measurement errors containing high-frequency components. The system model may incorporate both the process and the disturbance model. A feedback control system in itself suppresses in some extent the effect of the disturbance, but supposing a realistic disturbance model, disturbance rejection could be much more effective. The system model can be characterized by the block diagram shown in Figure 2.1. Process outputs show basically the effect of the process input, but this “ideal” output is often disturbed. With linear systems the measured output signal is the superposition of the effect of the process input (manipulated variable) and the effect of the disturbances. The effect of a measurable disturbance v m and a nonmeasurable disturbance v u can be considered with appropriate disturbance models. For controller design, linear process models are preferred, as linear control theory provides well-elaborated general controller design methods. Nonlinear systems Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
30
2 Linear SISO Model Descriptions
vm vu Disturbance model of the unmeasurable disturbance
u
Process model
Disturbance model of the measurable disturbance
y
Figure 2.1 SISO system incorporating the process and the disturbance models showing also the measurement possibilities.
with continuous nonlinearities can often be approximated by linear systems in the surroundings of the operating point. In the sequel the following linear single-input, single-output (SISO) discretetime models will be considered: nonparametric models – weighting function model – step response model parametric models – pulse-transfer function – state space model. The discrete-time weighting and step response functions are weighting function and step response series, as they consist of series of discrete values. The discretetime transfer function is called a pulse-transfer function. All discrete-time model types describe the relation between the sampled values of the input and output signals. The discrete-time models are equivalent to the corresponding continuoustime models if the input signal between the sampling times is kept constant. Transformation between the continuous-time and discrete-time models is called continuous/discrete-time transformation and usually a zero-order holding device is assumed. The zero-order assumption arises from the fact that the manipulated signal is kept constant between two sampling times in industrial practice. In practice, the output of a real dynamic system cannot jump for an input step: there is no throughput effect between the input and the output. This assumption will be considered further on. With transport processes there is a time delay between the input signal change and the start of the process response. This delay is called dead time and is denoted by Tt . The discrete dead time d D int(Tt /∆T ) is the integer part of the dead time related to the sampling time ∆T , where the function “int” denotes the integer part.
2.1 Nonparametric System Description
2.1 Nonparametric System Description
Nonparametric models describe the system behavior with an infinite number of parameters. An infinite number of past input signals is necessary to calculate the output at a given time point. For practical calculations the nonparametric models have to be “truncated” taking into consideration a large – but not infinite – number of parameters. The most frequently used nonparametric model descriptions are the finite impulse response (FIR) model and the finite step response (FSR) model. The FIR model gives the system response at the sampling points for a pulse of unity amplitude which acts through one sampling period. The FSR model is the output of the system for a sampled step input of unity amplitude. These models characterize the static and dynamic properties of a system. With these models the system response can be calculated also for arbitrary input signals. The advantage of the FIR and FSR models is that there is no need for a priori knowledge of the system structure such as the model order or the dead time. Previous identification of the dead time is not so important, as very small values of the first points of these series related to the consecutive ones will indicate the presence of dead time whose value could be determined. The disadvantage of these models is that a big number of function points is needed for an appropriately accurate description of the system. Determining a big number of parameters by identification may not be accurate. Furthermore, only stable processes can be described by these models. 2.1.1 FIR Model
The output signal of any linear model is the linear combination of the previous input signals, where the coefficients are the values of the FIR series (see Figure 2.2): y (k∆T ) y (k) D g 1 u(k d 1) C g 2 u(k d 2) C C g m u(k d m) C D
1 X j D1
g j u(k d j )
m X
g j u(k d j ) .
(2.1)
j D1
Equation (2.1) is the so-called convolution sum. The sampling time points 0, ∆T, 2∆T, 3∆T, . . . , k∆T are briefly denoted by 0, 1, 2, 3, . . . , k, where ∆T is the sampling time. (The signals are also defined for the past with negative k values.) As in practice the output of a real dynamic system cannot jump after a stepwise change in the manipulated variable, g 0 D 0. It is assumed that the input signal is constant between the sampling points. If k ! 1, an infinite number of impulse response points is to be considered, and an infinite number of previous values of the input signal have to be stored to calculate the current value of the output signal. The output can be calculated approximately if the impulse response is decreasing
31
2 Linear SISO Model Descriptions g1
...
g2
...
32
∑
y(k)
gm-1 gm
u(k-d)
q -1
u(k-d-1)
q -1
u(k-d-2)
u(k-d-m+1)
q -1
u(k-d-m)
Figure 2.2 FIR model.
and its truncation after m finite points is acceptable, that is, the subsequent points are small related to the previous ones and are neglected. The truncation can be accepted only for stable, nonintegrating processes. By introducing the shift operator q 1 , one can write the one-step delay of an arbitrary signal (e.g., x (k)) as q 1 x (k) D x (k 1) .
(2.2)
The FIR model is defined in the operator domain as m X g i q i D g 1 q 1 C g 2 q 2 C C g m q m . G q 1 D
(2.3)
iD1
If the model contains dead time as well, then the FIR is shifted by d sampling steps m X q d G q 1 D g i q di D g 1 q d1 C g 2 q d2 C C g m q dm . (2.4) iD1
The model output can be described in an alternative form to (2.1) by means of q d G(q 1 ) (see, e.g., [3]) as y (k) D
m X
g j u(k d j ) D G q 1 u(k d) D q d G q 1 u(k) . (2.5)
j D1
From (2.5) it follows that the FIR is the system response for an input pulse of unity amplitude and duration ∆T . The FIR decays for proportional processes. (A process is called proportional if it has a nonzero finite steady-state value for a nonzero constant input signal.)
2.1 Nonparametric System Description
Figure 2.3 FIR of first-order, second-order, and third-order processes.
Example 2.1 FIR of aperiodic processes of different orders Figure 2.3 shows the weighting function g(t) and the FIR g(k) of three typical processes with static gain K p D 2 and one, two, or three time constants. The sampling time is ∆T D 2 s and the time constants are Tn [s] D 10/n s, i D 1, 2, 3, where n is the number of time constants (system order). Only m D 20 points are taken into account. This truncation is appropriate for all processes.
2.1.2 FSR Model
The output signal can be calculated with knowledge of the step response as well. In an industrial environment it is usually much easier to measure the output signal for an input step than for a pulse input. Any input signal can be set up as the sum of small input steps starting from an old sampling time point (m); see also Figure 2.4. u(k) D u(k m) C ∆ u(k m C 1) C C ∆ u(k 2) C ∆ u(k 1) C ∆ u(k) D u(k m) C
m1 X
∆ u(k i) ,
(2.6)
iD0
where ∆ u(k i) D u(k i) u(k i 1) .
(2.7)
The output signal can be calculated as the sum of step responses for the individual input steps (see also Figure 2.5): y (k) D h 1 ∆ u(k d 1) C h 2 ∆ u(k d 2) C C h m ∆ u(k d m) C D
1 X j D1
h j ∆ u(k d j )
m X j D1
h j ∆ u(k d j ) ,
(2.8)
33
2 Linear SISO Model Descriptions
Figure 2.4 Input signal superposed from step increments. h1
...
h2
...
34
∑
y(k)
hm-1 hm
∆u(k-d)
q -1
∆u(k-d-1)
q-1
∆u(k-d-2)
∆u(k-d-m+1)
q -1
∆u(k-d-m)
Figure 2.5 Step response series model.
where ∆ u(k d m) D u(k d m) .
(2.9)
The FSR model is defined in the operator domain similarly to (2.3) as m X H q 1 D h i q i D h 1 q 1 C h 2 q 2 C C h m q m .
(2.10)
iD1
If the model contains a discrete dead time d as well, (2.10) has to be extended to m X q d H q 1 D h i q di D h 1 q d1 C h 2 q d2 C C h m q dm . iD1
(2.11) The model output can be described in an alternative form to (2.8) by means of q d H(q 1 ) as y (k) D
m X
h j ∆ u(k d j ) D H q 1 ∆ u(kd) D q d H q 1 ∆ u(k) .
j D1
(2.12)
2.1 Nonparametric System Description 2
2 h(t)
2 h(t)
h(k)
h(k)
n =1
n=2
1
0
n=3
1
0
10
20
h(k)
h(t)
30
t [s] 0
1
10
20
30
t [s] 0
10
20
30
t [s]
Figure 2.6 Step response series of first-order, second-order, and third-order processes.
From (2.12) it follows that the FSR is the system response for an input step of unity amplitude. For proportional processes the unit step response series tends to the constant value of the static gain. Example 2.2 FSR of aperiodic processes of different orders Figure 2.6 shows the continuous-time step response and the FSR series of the three typical aperiodic processes whose FIRs were presented in Example 2.1. All parameters are the same as in Example 2.1. Again, only m D 20 points are taken into account. It is seen that the transients settle within 20 sampling steps.
2.1.3 Relationship between the FIRs and the FSRs
It follows from (2.6) that u(k j ) D u(k m) C ∆ u(k m C 1) C C ∆ u(k j 1) C ∆ u(k j ) X
m j
D u(k m) C
∆ u(k m C i) .
(2.13)
iD1
Substituting (2.13) into the convolution sum of (2.5) gives y (k) D g 1 u(k d 1) C g 2 u(k d 2) C C g m u(k d m) D g 1 u(k d m) C ∆ u(k d m C 1) C C ∆ u(k d 1) C g 2 u(k d m) C ∆ u(k d m C 1) C C ∆ u(k d 2) C C g m1 u(k d m) C ∆ u(k d m C 1) (2.14) C g m u(k d m) . Comparison of (2.12) and (2.14) results in the following relationship between the FIR and the FSR: h1 D g1 ,
h2 D g1 C g2, . . . , h j D
j X iD1
gi .
(2.15)
35
36
2 Linear SISO Model Descriptions
The parameters of the FSR are the sum of the FIR points till the current discrete time. This result is in accordance with the known relation that the continuoustime unit step response is the integral of the unit pulse response. (In the case of a continuous-time unit step response, the input signal is a step with unity amplitude. In the case of a continuous-time unit pulse response, the input signal is a short (socalled Dirac delta) pulse with unity area.) 2.1.4 Disturbance Model
Similarly to the process model, the disturbance models can also be described by a FIR or a FSR model: y (k) D G q 1 q d u(k) C G ud i s t q 1 v u (k) C G md i s t q 1 v m (k) , (2.16a) y (k) D H q 1 q d ∆ u(k) C H ud i s t q 1 ∆v u (k) C H md i s t q 1 ∆v m (k) . (2.16b) In the disturbance models the upper index denotes the disturbance and the lower index indicates its type (m for “measured” and u for “unmeasured”). In case of the FIR model, the input is the disturbance source; in case of the FSR model, the input is the disturbance source increment. A mixed model is also possible, for example, y (k) D H q 1 q d ∆ u(k) C G ud i s t q 1 v u (k) C H md i s t q 1 ∆v m (k) . (2.17) It is possible but not usual to consider the dead time in the disturbance model, at least not in the unmeasurable part. The unmeasurable disturbance is usually assumed to be an uncorrelated (white) or a correlated (colored) noise. Both noise types are filtered white noises. A constant drift can be considered either as a nonzero mean source noise or as a zero mean source noise and a noise model of integrating type. Of course, there are other unmeasurable or measurable disturbances as well.
2.2 Pulse-Transfer Function Model
Parametric models describe the system behavior with a finite number of parameters. These models can be input/output or state space representations. A finite number of past input and output values are required to determine the output at the next sampling point. (With dynamic processes the current input signal usually has no direct effect on the current output signal.)
2.2 Pulse-Transfer Function Model
2.2.1 Pulse-Transfer Function and Difference Equation
With nonparametric models it was shown that the output signal of a linear model is the linear combination of the previous input signals. As all previous output signal samples already contain the effect of all input signal samples before, it can be imagined that it is possible to express the current output value as a linear combination of some previous input and output samples. Of course, later samples have a stronger effect on the current output value than the earlier ones. The maximum number of old output samples considered in the model is called the order n of the model. The difference equation giving the current output as a linear combination of some previous input and output values is y (k)Ca 1 y (k1)C Ca n a y (kn a ) D b 1 u(kd1)C Cb n b u(kdn b ) . (2.18) Equation (2.18) can be rewritten by using the shift operator (2.2): y (k) 1 C a 1 q 1 C C a n a q n a D q d u(k) b 1 q 1 C C b n b q n b (2.19) or
y (k)A q
1
Dq
d
B q
1
u(k) and
B q 1 d y (k) D q u(k) . A (q 1 )
(2.20)
In (2.20) d denotes the discrete dead time and B(q 1 ) and A(q 1) are the numerator and denominator polynomials of the shift operator q 1 : B q 1 D b 0 C b 1 q 1 C C b n b q n b ,
(2.21a)
A q 1 D 1 C a 1 q 1 C C a n a q n a .
(2.21b)
Polynomial A(q 1) is monic (its leading coefficient is 1). It is assumed that b 0 D 0, as for typical dynamic plants a stepwise input change does not cause a change in the output immediately. Typically the degree of polynomials B(q 1) and A(q 1 ) is equal, n b D n a D n. The pulse-transfer model provides a parametric form, as a linear system can be modeled with a finite number of parameters. (This fact will also be illustrated in Example 2.5.) The effect of the old input signals considered in the nonparametric models is condensed here in the previous output signals. Because of the smaller number of parameters, linear dynamic processes are often described by their pulsetransfer function (which corresponds to a difference equation).
37
38
2 Linear SISO Model Descriptions
2.2.2 Relationship between the Pulse-Transfer Function, the Weighting Function, and the Step Response Models
On the basis of the shift operator, the difference operator (1 q 1 ) can be defined as ∆ x (k) D x (k) x (k 1) D x (k) q 1 x (k) D (1 q 1 )x (k) .
(2.22)
The three different model realizations are y (k) D
B q 1 d q u(k) D G q 1 q d u(k) D H q 1 q d (1q 1 )u(k) . A (q 1 ) (2.23)
From (2.23) the relation between the different models can be derived: weighting function series: B q 1 G q 1 D . A (q 1 )
(2.24)
step response series:
H q
1
B q 1 1 D . (1 q 1 ) A (q 1 )
(2.25)
The values of the weighting function or of the step response series can be obtained from (2.24) and (2.25) by coefficient comparison or by polynomial division. In the sequel the step response series of a first-order and a second-order model will be calculated. Example 2.3 Calculation of the step response series from the pulse-transfer function for a first-order process For a first-order process the following relationship can be written based on (2.25): h 1 q 1 C h 2 q 2 C D
1 b 1 q 1 . 1 1 q 1 C a 1 q 1
(2.26)
Rearranging (2.26) leads to b 1 q 1 D 1 q 1 1 C a 1 q 1 h 1 q 1 C h 2 q 2 C .
(2.27)
The coefficients of q 1 are equal on both sides of (2.27): h1 D b1 .
(2.28a)
2.2 Pulse-Transfer Function Model
Similarly, for the coefficients of q i , i 2, the following is valid: 0 D h i h i1(1 a 1 ) a 1 h i2 ! h i D (1 a 1 )h i1 C a 1 h i2 I
i2. (2.28b)
The first values (i 2) are then h 2 D b 1 (1 a 1 ) I
h 3 D (1 a 1 ) h 2 C a 1 h 1 D b 1 1 a 1 C a 21 I h 4 D b 1 1 a 1 C a 21 a 31 .
(2.28c)
As is seen, the step response points can be expressed as h i D b1
i1 X
(1) j (a 1 ) j .
(2.29)
j D0
Example 2.4 Calculation of the step response series from the pulse-transfer function for a second-order process For a second-order process the following relationship can be written based on (2.25): h 1 q 1 C h 2 q 2 C D
1 b 1 q 1 C b 2 q 2 . 1 1 q 1 C a 1 q 1 C a 2 q 2
(2.30)
Rearranging (2.30) leads to b 1 q 1 C b 2 q 2 D 1 q 1 1 C a 1 q 1 C a 2 q 2 h 1 q 1 C h 2 q 2 C . (2.31) The coefficients of q 1 and q 2 are equal on both sides of (2.31): h1 D b1 ,
(2.32a)
b 2 D h 2 h 1 (1 a 1 ) ! h 2 D b 2 C (1 a 1 )h 1 D b 2 C (1 a 1 )b 1 . (2.32b) Similarly, for the coefficients of q i i 3, the following is valid (with h 0 D 0): 0 D h i h i1(1 a 1 ) h i2(a 1 a 2 ) h i3 a 2 ! h i D (1 a 1 )h i1 C (a 1 a 2 )h i2 C a 2 h i3 I The third value is then h 3 D b 1 (1 a 1 )2 C (a 1 a 2 ) C b 2 (1 a 1 ) .
i3.
(2.32c)
39
40
2 Linear SISO Model Descriptions
parametric model 1.5 1.0
nonparametric model h(t)
h(k)
0.5
0
0
10
20
t [s]
30
Figure 2.7 Step response calculated from the parametric and nonparametric models.
Example 2.5 Relationship between the pulse-transfer function, the FIR, and the FSR The transfer function of a continuous first-order system is G(s) D 2/(1 C 10s). The sampling time is ∆T D 2 s. At the input zero-order hold is applied. Let us calculate the pulse-transfer function, 10 points of the step, and the impulse responses. Show the step response of the discrete-time system for 15 sampling points based on these three system representations. The pulse transfer function is G q 1 D
0.3625q 1 . 1 0.8187q 1
The points of the FSR are calculated according to (2.29). The points of the impulse response (2.3) are obtained by polynomial division of the numerator and the denominator polynomials of the pulse-transfer function. The points of the step response h(k) and of the weighting function g(k) are hi D f0, 0.363, 0.659, 0.902, 1.101, 1.264, 1.398, 1.507, 1.596, 1.669, 1.729, . . .g , gi D f0, 0.363, 0.297, 0.243, 0.199, 0.163, 0.133, 0.109, 0.089, 0.073, 0.059, . . .g . The step response based on these system representations is shown in Figure 2.7. It is seen that the step response based on the pulse-transfer function is accurate, whereas the output calculated from the FSR or the FIR is the same, but shows static deviation. With more points this deviation could be decreased.
2.2 Pulse-Transfer Function Model
2.2.3 Disturbance Model
Figure 2.8 shows the process and disturbance models of Figure 2.1 with their pulsetransfer functions: 1 dist B q 1 d B ud i s t q 1 Bm q q u(k) C d i s t 1 v u (k) C d i s t 1 v m (k) . (2.33) y (k) D A (q 1 ) A u (q ) A m (q ) In a control algorithm measurable disturbances can be used for feed-forward compensation. This possibility will be shown in Chapter 5. Here only the process model with the unmeasurable disturbance is considered. For simplicity the denominator polynomials in the process and the disturbance models are assumed to be equal: A q 1 D A dui s t q 1 . (2.34) (Two pulse-transfer functions with different denominator polynomials can always be extended to equal denominator polynomials.) The resulting model is B q 1 d B ud i s t q 1 y (k) D q u(k) C v u (k) . (2.35) A (q 1 ) A (q 1 ) Model (2.35) is called the AutoRegressive Moving Average model with eXogenous input (ARMAX) or in control applications the Controlled AutoRegressive Moving Average (CARMA) model. Often the disturbance model is not estimated and its numerator polynomial is assumed to be known in the process model or considering some controller design purposes as explained in Section 5.3. Then, B ud i s t q 1 T q 1 D 1 C t1 q 1 C C t n t q n t (2.36) and the process with the unmeasurable disturbance model becomes [2] B q 1 d T q 1 y (k) D q u(k) C v u (k) . A (q 1 ) A (q 1 )
(2.37)
vm (k) v u (k)
Budist (q −1 ) Audist (q −1 ) u(k-d)
B (q −1 ) A(q −1 )
Bmdist (q −1 ) Amdist (q −1 ) y(k)
Figure 2.8 Parametric model of the process and the disturbances showing also the measurement possibilities.
41
42
2 Linear SISO Model Descriptions
(In (2.37) the polynomial T(q 1 ) is usually assumed as a design parameter and it is not estimated as part of the disturbance model.) Some control algorithms calculate the control increment instead of the control signal. Then it is advisable to use an incremental model, for example, to use the control signal increment as the model input. This can be done by applying the following equivalent rearrangements in (2.37): B q 1 1 q 1 B q 1 u(k d) D u(k d) y (k) D A (q 1 ) A (q 1 ) (1 q 1 ) B q 1 ∆ u(k d) , (2.38) D A ∆ (q 1 ) where A ∆ q 1 D (1 q 1 )A q 1 D 1 C (a 1 1) q 1 C (a 2 a 1 ) q 2 C C a n a a n a 1 q n a a n a q (n a C1) . (2.39) Moreover, it is assumed that the unmeasured disturbance n(k) may have a stochastic part and also a constant term. This fact can be expressed by integrating a stochastic colored noise: T q 1 T q 1 1 v v u (k) . (k) D (2.40) n(k) D u 1 q 1 A (q 1 ) A ∆ (q 1 ) Consequently, the process and the disturbance models become T q 1 B q 1 ∆ u(k d) C v u (k) , y (k) D A ∆ (q 1 ) A ∆ (q 1 )
(2.41)
where v u (k) is assumed to be a white noise with zero mean. (White noise is an uncorrelated stochastic signal.) Figure 2.9 shows the block scheme according to (2.41). Model (2.41) is called the AutoRegressive Integrated Moving Average model with eXogenous input (ARIMAX) or in control applications the Controlled AutoRegressive Integrating Moving Average (CARIMA) model [2]. Equation (2.41) can be rearv u (k)
T (q −1 ) AΔ (q −1 ) ∆u(k-d)
B (q −1 ) AΔ (q −1 )
n(k) y(k)
Figure 2.9 Parametric models of the process and the disturbance showing also the measurement possibilities.
2.3 Discrete-Time State Space Model
ranged to a difference equation: y (k) D a ∆1 y (k 1) a ∆2 y (k 2) C a ∆,n a y (k n a ) a ∆,n aC1 y (k n a 1) C b 1 ∆ u(k d 1) C C b n b ∆ u(k d n b ) C v u (k) C t1 v u (k 1) C C t n t v u (k n t ) . (2.42) With this equation the current output signal can be calculated on the basis of some previous input and output values and the current and some previous disturbance signal values.
2.3 Discrete-Time State Space Model
Besides input/output representations, state space representations are generally used for system modeling. State variables are inner variables, whose current value is determined by the past inputs of the system. For abrupt input changes the state variables cannot be changed abruptly, it takes time to modify their values. The current value of the input signal and of the state variables determine the next value of the state variables and of the output signal. In practical cases the state variables are not always measurable, so they have to be estimated from the input and the output signal. Therefore, control algorithms based on a state space description may become complicated. The state space description gives the same formalism for SISO and multi-input, multi-output (MIMO) systems. Here, the discussion considers only SISO systems. The form of the discrete-time state equations is x(k C 1) D A x x(k) C b x u(k) , y (k) D c x x(k) C d x u(k) .
(2.43)
x(k) denotes the vector of the state variables. A x , b x , c x , and d x are the parameters of the state space description. In the SISO case A x is a quadratic matrix, b x is a column vector, and c x is a row vector. Usually the output is influenced by the input only via the state variables, as there is no direct feed-through between the input and the output, that is, d x D 0 and this is assumed further on. Both the states and the output may be affected by disturbances; however, this form is not presented here. Alternatively, state space model (2.43) can be set up also with the input increment as input. In this case the state space equation has to be augmented with the additional state variable u(k 1) as x(k C 1) A x bx x(k) b D C x ∆ u(k) , u(k) 0 1 1 u(k 1) x(k) . (2.44) y (k) D c x 0 u(k 1)
43
44
2 Linear SISO Model Descriptions
Defining a new state vector as T xQ (k) D x(k), u(k 1) ,
(2.45)
one can write the enhanced, incremental state equation in the following form [1]: Q x xQ (k) C bQ x ∆ u(k) , xQ (k C 1) D A y (k) D cQ x xQ (k) ,
(2.46)
where Q x D Ax A 0
bx , 1
b bQ x D x , 1
and cQ x D [c x , 0] .
(2.47)
Another way to build state space descriptions with input increments is shown later in this section. Sometimes it is not necessary to represent the dead-time part of a system by state variables. Then the delayed input signal (or its increment, as will be seen later) is the input of the state space description: x(k C 1) D A x x(k) C b x u(k d) , y (k) D c x x(k) .
(2.48)
Model (2.43) has more state variables than (2.48) and consequently the model parameters differ. Similarly, an incremental model, that is, a model with input signal increments, can be set up without the dead-time part: x ∆ (k C 1) D A ∆ x x ∆ (k) C b ∆ x ∆u(k d) , y (k) D c ∆ x x ∆ (k) .
(2.49)
(The subscript ∆ denotes an incremental model.) State space models can be obtained considering first principles describing the behavior of a physical system. State space models can also be derived from the nonparametric or parametric system descriptions. The current output signal and its previous values, the previous input values, or their increments could be chosen as state variables fulfilling the properties of state variables. Different equivalent forms of the state representation exist, as all linear combinations of the state variables provide new state variables. 2.3.1 Minimal-Order State Space Representation
The state space description is of minimal order if the number of state variables is equal to the order of the system. Different state space representations can be derived from the pulse-transfer function. One way to give the state space representation is based on the following considerations. The difference equation of the
2.3 Discrete-Time State Space Model
linear process model given by (2.18)–(2.21) with the same orders n a D n b D n can be rearranged as u(k)q d y (k) D D v (k) . 1 (q ) B A (q 1 )
(2.50)
The auxiliary variable v (k) in (2.50) is used with the derivation of the state space models and should not be confounded with the source disturbances v u (k) or v m (k). Hence, v (k) D u(k)q d A q 1 1 v (k) D u(kd)a 1 v (k1) a n v (kn) (2.51) and y (k) D B q 1 v (k) D b 1 v (k 1) C C b n v (k n) .
(2.52)
Now v (k i), i D 1, . . . , n, and u(k i), i D 1, . . . , d 1, can be selected as state variables. If u(k d) is used as the input signal of the state space description, then the state variables arising from the dead time are superfluous and the number of state variables is reduced to n. Example 2.6 Deriving the minimal-order state space model of the dead-time-free part of a second-order process with dead time The second-order process with dead time d D 2 is described by y (k) D
b 1 q 1 C b 2 q 2 q 2 u(k) . 1 C a 1 q 1 C a 2 q 2
Equations (2.51) and (2.52) in this case become v (k) D u(k 2) a 1 v (k 1) a 2 v (k 2) and y (k) D b 1 v (k 1) C b 2 v (k 2) . The block diagram of the system is given in Figure 2.10. The state variables are the outputs of the shift blocks, as these variables cannot change their values abruptly. The number of state variables is n D 2. The state equations become, in the form of (2.48),
x1 (k C 1) 0 D x2 (k C 1) a 2 y (k) D b 2
x1 (k) 1 0 C u(k 2) , a 1 x2 (k) 1 x1 (k) . b1 x2 (k)
45
46
2 Linear SISO Model Descriptions v(k-1) ≡ x2(k)
b1
v(k-2) ≡ x1(k) u(k-2)
v(k)
q -1
q -1
y(k)
b2
-a1 -a2
Figure 2.10 State space model of the dead-time-free part of a second-order process with dead time d D 2.
The general discrete-time state space form of a linear system of order n with input u(k d) is as follows: 32 2 3 2 3 x1 (k C 1) x1 (k) 0 1 0 0 6 x (k C 1) 7 6 0 6 7 0 0 0 7 7 6 x2 (k) 7 6 2 7 6 7 6 6 7 6 . 7 . . . . . .. 6 6 7D6 . 7 .. .. .. .. 7 .. . 76 6 7 6 . 7 76 6 7 6 7 4 x n1 (k C 1)5 4 0 0 0 1 5 4 x n1 (k)5 x n (k C 1) x n (k) a n a n1 a 2 a 1 2 3 0 607 6 7 6.7 7 C6 (2.53) 6 .. 7 u(k d) 6 7 405 1 and y (k) D [b n , b n1, . . . , b 2 , b 1 ] x(k) .
(2.54)
If the nondelayed input signal itself is used as the input of the state space form, then further d state variables have to be introduced.
v(k-1) ≡ x2(k) u(k-1) ≡ x4(k) u(k)
q-1
q
u(k-2) ≡ x3(k) v(k) -1
b1
v(k-2) ≡ x1(k) q-1
q-1
b2
-a1 -a2
Figure 2.11 State space model of a second-order process with dead time d D 2.
y(k)
2.3 Discrete-Time State Space Model
Example 2.7 Deriving the minimal-order state space model for a second-order process with dead time The second-order process with dead time d D 2 was given in Example 2.6. In Figure 2.10 the signal u(k 2) should be built by shifting the input signal by two sampling times as seen in Figure 2.11. The number of state variables now becomes n C d D 2 C 2 D 4. The state equations of Example 2.6 are extended by the delayed input signal terms u(k 2) x3 (k) and u(k 1) x4 (k), which are considered as additional state variables. 32 3 2 3 x1 (k) 0 0 6 x2 (k)7 607 07 76 7 C 6 7 u(k) 15 4 x3 (k)5 405 x4 (k) 1 0 2 3 x1 (k) 6 x2 (k)7 7 y (k) D b 2 b 1 0 0 6 4 x3 (k)5 . x4 (k)
3 2 0 x1 (k C 1) 6 x2 (k C 1)7 6a 2 7 6 6 4 x3 (k C 1)5 D 4 0 x4 (k C 1) 0 2
1 a 1 0 0
0 1 0 0
The general form of a discrete-time state space equation of a system with order n and dead time d is (e.g., [3]) 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4
x1 (k C 1) x2 (k C 1) .. . x n1 (k C 1) x n (k C 1) x nC1 (k C 1) .. . x nCd1 (k C 1) x nCd (k C 1)
3
2
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5
6 6 6 6 6 6 6 6 6 6 6 6 D6 6 6 6 6 6 6 6 6 6 6 6 4 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4
0 0 .. . 0 a n 0 .. . 0 0
1 0 .. . 0 a n1 0 .. . 0 0
x1 (k) x2 (k) .. . x n1 (k) x n (k) x nC1 (k) .. . x nCd1 (k) x nCd (k)
3
.. . .. . 2
7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7C6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 5 4
0 0 .. . 0 0 0 .. . 0 1
0 0 .. . 0 a 2 0 .. . 0 0
0 0 .. . 1 a 1 0 .. . 0 0
0 0 .. . 0 1 0 .. . 0 0
.. . .. .
0 0 .. . 0 0 0 .. . 0 0
0 0 .. . 0 0 0 .. . 1 0
3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5
3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5
u(k)
(2.55)
47
48
2 Linear SISO Model Descriptions
and y (k) D
bn,
b n1 ,
...,
b 2,
b1,
0,
...,
0,
0
x(k) .
(2.56)
Example 2.7 shows a special case of (2.55) and (2.56). 2.3.2 Non-Minimal-Order State Space Representations
In nonminimal representations the state variables are chosen as the current output and its previous values and the previous values of the input signal or its increments [2]. Therefore, the number of state variables is higher than the order of the system. The advantage of these representations is that all the state variables are measurable. Furthermore, this form can be advantageously applied for the derivation of the predictive equations, as shown later in Section 3.3. Only the dead-timefree part of the linear model shall be modeled and the delayed input signal u(k d) is used as the input of this state space model. 2.3.2.1 State Space Form Derived from the Pulse-Transfer Function Considering a CARMA Model Using a CARMA model, the input of the state space model is the delayed input signal u(k d). The method is illustrated by two examples.
Example 2.8 State space model of a first-order process with dead time on the basis of the CARMA model The first-order process with dead time d D 1 is described by the difference equation y (k) D a 1 y (k 1) C b 1 u(k 2) . The output signal at discrete-time point k C 1 is y (k C 1) D a 1 y (k) C b 1 u(k 1) . The scheme of the state space model is given in Figure 2.12. The state variable is chosen as x(k) D x1 (k)
and
x1 (k) D y (k) .
The corresponding state space equations are in the form of (2.48) and become scalar ones in this case: x1 (k C 1) D y (k C 1) D a 1 y (k) C b 1 u(k 1) , y (k) D x1 (k) . In this special case the state space model is of minimal order, as the number of state variables is equal to the order of the model.
2.3 Discrete-Time State Space Model x1 k+1 ≡ y k+1 u k-1
q-1
b1
x1 k ≡ y k
a1
Figure 2.12 Minimal-order state space model of the dead-time-free part of a first-order CARMA model.
Example 2.9 State space model of a second-order process with dead time on the basis of the CARMA model The second-order process with dead time d D 2 is described by the difference equation y (k) D a 1 y (k 1) a 2 y (k 2) C b 1 u(k 3) C b 2 u(k 4) . The output signal at discrete-time point k C 1 is y (k C 1) D a 1 y (k) a 2 y (k 1) C b 1 u(k 2) C b 2 u(k 3) . The scheme of the state space model is given in Figure 2.13. The state variables are chosen as T x(k) D y (k), y (k 1), u(k 3) and the corresponding state space equations are in the form of (2.48): 2 3 2 3 x1 (k C 1) y (k C 1) 4 x2 (k C 1)5 4 y (k) 5 x3 (k C 1)
2
u(k 2)
a 1 D4 1 0
a 2 0 0
32 3 2 3 b2 y (k) b1 0 5 4 y (k 1)5 C 4 0 5 u(k 2) , 0 1 u(k 3)
y (k) D [1, 0, 0] x(k) . b1 u(k-2)
q-1
b2
y(k) ≡ x1(k)
y(k+1) ≡ x1(k+1) q-1
q-1
y(k-1) ≡ x2(k)
u(k-3) ≡ x3(k) -a1
-a2
Figure 2.13 Non-minimal-order state space model of the dead-time-free part of a second-order CARMA model.
49
50
2 Linear SISO Model Descriptions
As the number of state variables is 3 and the system order is 2, this is a nonminimal-order state space representation. The results of Examples 2.8 and 2.9 can be generalized. The state variables consist of the current and older output signal values and the delayed input signals: T y(k) D y (k), y (k 1), y (k 2), . . . , y (k n a C 2), y (k n a C 1) , (2.57a) T u(k) D u(k d 1), u(k d 2), u(k d 3), . . . , u(k d n b C 1) , (2.57b) T x(k) D y T (k), u T (k) .
(2.57c)
Then, the parameters of the state space description based on the CARMA model are as follows: Ax D 2 a 1 a 2 a 3 6 1 0 0 6 6 0 1 0 6 6 . .. .. 6 . . . 6 . 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 6 0 6 . .. .. 6 . 6 . . . 6 4 0 0 0 0 0 0
. . . a n a 1 a n a b 2 b 3 b 4 0 0 0 0 0 0 0 0 0 0 .. .. .. .. .. .. . . . . . . 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 .. .. .. .. .. .. . . . . . . 0 0 0 0 0 0 0 0 0 0
3 . . . b n b 1 b n b 0 0 7 7 0 0 7 7 .. .. 7 .. 7 . . . 7 7 0 0 0 7 7 0 0 0 7 7, 0 0 7 7 0 0 7 7 7 0 0 7 .. 7 .. .. 7 . . 7 . 7 0 0 5 1 0 (2.58a)
bx D cx D
b 1, 1,
0, 0,
0, 0,
..., ...,
0, 0,
0, 0,
1, 0,
0, 0,
0, 0,
..., ...,
0, 0,
0 0
T ,
, (2.58b) (2.58c)
and the output signal is composed from the state variables as y (k) D
1,
0,
0,
...,
0,
0,
0,
0,
0,
...,
0,
0
x(k) . (2.59)
2.3 Discrete-Time State Space Model
2.3.2.2 State Space Form Derived from the Pulse-Transfer Function Considering a CARIMA Model The system equation without disturbance was given by (2.38) and the difference equation can be written as
y (k) D a ∆1 y (k 1) . . . a ∆(n a C1) y (k n 1) C b 1 ∆ u(k d 1) (2.60) C C b n b ∆ u(k d n b ) . Because of the higher degree of A ∆ (q 1 ) than of A(q 1), the number of state variables is increased by one. Therefore state representations based on incremental models become of non-minimal order. To distinguish between CARMA and CARIMA models, the state variable vector of a CARIMA model is denoted by x ∆ . Two examples illustrate this state space model. Example 2.10 State space model of a first-order process with dead time on the basis of the CARIMA model The system is the same as in Example 2.8. The CARIMA model is described by the difference equation y (k) D (1 a 1 )y (k 1) C a 1 y (k 2) C b 1 ∆ u(k 2) D a ∆1 y (k 1) a ∆2 y (k 2) C b 1 ∆ u(k 2) . The scheme of the state space model is given in Figure 2.14. The output signal at discrete-time point k C 1 is y (k C 1) D a ∆1 y (k) a ∆2 y (k 1) C b 1 ∆ u(k 1) . The state vector is composed as x ∆ (k) D y (k), y (k 1) and the state equation is in the form of (2.49): y (k) y (k C 1) b a ∆1 a ∆2 x ∆ (k C 1) D C 1 ∆ u(k 1) , D 1 0 0 y (k 1) y (k) y (k) D [1, 0] x ∆ (k) . y(k) ≡ x∆1(k) y(k+1) ≡ x∆1(k+1) ∆u(k-1)
b1
q-1
q-1
y(k-1) ≡ x∆2(k)
-a∆1 -a∆2
Figure 2.14 Non-minimal-order state space model of the dead-time-free part of a first-order CARIMA model.
51
52
2 Linear SISO Model Descriptions
Example 2.11 State space model of a second-order process with dead time on the basis of the CARIMA model The system is the same as in Example 2.9. The CARIMA model is described by the difference equation y (k) D a ∆1 y (k 1) a ∆2 y (k 2) a ∆3 y (k 3) C b 1 ∆ u(k 3) C b 2 ∆ u(k 4) . The output signal at discrete-time point k C 1 is y (k C 1) D a ∆1 y (k) a ∆2 y (k 1) a ∆3 y (k 2) C b 1 ∆ u(k 2) C b 2 ∆ u(k 3) . The scheme of the state space model is given in Figure 2.15. The state vector is composed as x ∆ (k) D y (k), y (k 1), y (k 2), ∆ u(k 3) and the state equation is in the form of (2.49): 2 3 y (k C 1) 6 y (k) 7 7 x ∆ (k C 1) 6 4 y (k 1) 5 ∆ u(k 2) 2 32 3 y (k) a ∆1 a ∆2 a ∆3 b 2 6 6 1 7 0 0 07 7 6 y (k 1) 7 D6 5 4 4 0 1 0 0 y (k 2) 5 0 0 0 0 ∆ u(k 3) 2 3 b1 607 7 C6 4 0 5 ∆ u(k 2) , 1 y (k) D [1, 0, 0, 0] x ∆ (k) . y(k) ≡ x∆1(k)
b1 y(k+1) ∆u(k-2)
q-1
b2
q-1
y(k-1) ≡ x∆2(k) q-1
q-1
y(k-2) ≡ x∆3(k)
∆u(k-3) ≡ x∆4(k)
-a∆1
-a∆2
-a∆3
Figure 2.15 Non-minimal-order state space model of the dead-time-free part of a second-order CARIMA model.
2.3 Discrete-Time State Space Model
The results of Examples 2.10 and 2.11 can be generalized. The state variables consist of the current and older output signal values and the delayed input increment signals. The number of state variables of a CARIMA model is more by one than the number of state variables of the corresponding CARMA model. T y(k) D y (k), y (k 1), y (k 2), . . . , y (k n a C 1), y (k n a ) u(k) D ∆ u(k d 1), ∆ u(k d 2), ∆ u(k d 3), . . . , T ∆ u(k d n b ), ∆ u(k d n b C 1)
(2.61b)
T x ∆ (k) D y T (k), u T (k) .
(2.61c)
(2.61a)
Then, the parameters of the state space description based on the CARMA model are as follows: A∆ x D 2 a ∆1 a ∆2 a ∆3 6 1 0 0 6 6 0 1 0 6 6 . .. .. 6 . . . 6 . 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 6 0 6 . .. .. 6 . 6 . . . 6 4 0 0 0 0 0 0
b∆ x D
b 1,
0,
0,
. . . a ∆ n a a ∆ n a C1 0 0 0 0 .. .. .. . . . 0 0 1 0 0 0 0 0 0 0 .. .. .. . . . 0 0 0 0
...,
0,
0,
1,
0,
b2 0 0 .. . 0 0 0 1 0 .. . 0 0
0,
b3 0 0 .. . 0 0 0 0 1 .. . 0 0
b4 0 0 .. . 0 0 0 0 0 .. . 0 0
...,
3 . . . b n b 1 b n b 0 0 7 7 0 0 7 7 .. .. 7 .. 7 . . . 7 7 0 0 0 7 7 0 0 0 7 7, 0 0 7 7 0 0 7 7 7 0 0 7 .. 7 .. .. 7 . . 7 . 7 0 0 5 1 0 (2.62a) 0,
T
0
, (2.62b)
c∆ x D
1,
0,
0,
...,
0,
0,
0,
0,
0,
...,
0,
0
0,
0
,
(2.62c)
and the output signal is composed from the state variables as y (k) D
1,
0,
0,
...,
0,
0,
0,
0,
0,
...,
x ∆ (k) . (2.63)
53
54
2 Linear SISO Model Descriptions
2.4 Summary
Modeling a process is important to describe the dynamic behavior of the system. A dynamic model gives the relations between the input and the output of a system. Generally, it also incorporates the effects of the disturbances. On the basis of an adequate system model, the behavior of the system can be analyzed, and the model can also be used for solving synthesis tasks, for example, controller design. Linear SISO models were given. Nonparametric forms such as FIR and FSR models were described. These models use a big number of parameters. Their advantage is that they can be determined by simple measurements and not too much a priori information is required to set up these models. Parametric forms are the pulse-transfer model and the state space representations of a system. These descriptions use only a few parameters, but require more a priori information related to the system order and the dead time. The parametric models can also be written in state space form. The advantage of this description is not only that the inner behavior of the process can be observed, but also that some techniques, for example, prediction, can be performed more easily than by other methods. Disturbance models are also required to give the effect of the disturbances on the output signal. Using such models, one can achieve better disturbance rejection in control applications. The relationship of the different nonparametric and parametric models was derived. The different system models were described and represented through simple typical examples. First-order and second-order systems with dead time are significant system descriptions as in practical applications a number of systems can be described or approximated by such models. Different model types of these system classes were given. These system models will be considered further on for predictive control design.
References 1 Camacho, E.F. and Bordons, C. (2004) Model Predictive Control, 2nd edn, Springer-Verlag, London. 2 Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987) Generalized predictive con-
trol. Part I. The basic algorithm. Automatica, 23(2), 137–148. 3 Isermann, R. (1998) Digital Control Systems, Springer-Verlag, Berlin.
55
3 Predictive Equations of Linear SISO Models For predictive control, predictive models are required. Predictive models predict the output of the system in a future horizon on the basis of information on the system inputs and outputs available till the current time point k. The prediction is executed n e steps over the mathematical dead time d C 1 (the index e in n e denotes “extended horizon”). The output of the system in a future horizon is influenced by the past input signals and by the current and subsequent control increments. The effect of the past input activities till point k 1, supposing that the input signal is frozen at this point, is the free response of the system. The effect of the current and consecutive control increments on the output in the future horizon is the forced response. In a linear system the predicted output in the future horizon is the sum of the free and the forced responses. Figure 3.1 illustrates the future output of a system composed of these components. When controlling a system, one can only modify the forced response with the appropriate choice of the current and subsequent control
Figure 3.1 The future output is the sum of the free and the forced responses.
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
56
3 Predictive Equations of Linear SISO Models
increments. The effect of the past activities influences the future performance, but cannot be modified. Predictive equations of the weighting function model, the step response model, the pulse-transfer function, and the state space representation of a system will be given. The effect of the disturbances will also be considered. Additive disturbances at the model output can be either measurable or nonmeasurable. Measurable disturbances v m (k) can be predicted with knowledge of the disturbance model. This case is dealt with in Chapter 5 together with the control algorithms. Here, only the effect of the unmeasurable disturbance v u (k) is investigated.
3.1 Predictive Equations Based on Nonparametric Models
In the sequel predictive forms of the weighting function model and the step response model will be given. These models are nonparametric, as they cannot be described by a finite number of parameters. 3.1.1 Predictive Equations of the Impulse Response Model
With knowledge of the finite impulse response or weighting function model (2.1) the output signal at time point k C d C 1 can be approximated as y(k O C d C 1jk) D g 1 u(k) C g 2 u(k 1) C C g m u(k m C 1) C vOu (k C d C 1jk) D
m X
g i u(k i C 1) C vO u (k C d C 1jk) ,
(3.1)
iD1
where yO and vOu are predicted values. The output signal can also be predicted for time points beyond the dead time. For a time point k C d C 1C n e the output signal can be expressed by the following relationship: y(k O C d C 1 C n e jk) D
m X
g i u(k C 1 C n e i) C vOu (k C d C 1 C n e )
iD1
D g 1 u(k C n e ) C g 2 u(k C n e 1) C C g n e u(k C 1) C g n e C1 u(k) C g n e C2 u(k 1) C C g m u(k C 1 C n e m) C vOu (k C d C 1 C n e jk) D
nX e C1
g i u(k C 1 C n e i)
iD1
C
m X
g i u(k C 1 C n e i) C vOu (k C d C 1 C n e jk) .
iDn e C2
(3.2)
3.1 Predictive Equations Based on Nonparametric Models
On the right side of (3.2) the first term contains the effect of the current and future inputs on the future output, whereas the second term is the effect of the past inputs on the future output. The third term is the effect of the unpredictable future disturbance on the future output. A possible consideration is supposing the future disturbance is equal to the current disturbance value, which can be estimated as the difference between the measured output y (k) and the output of the system model [9]: O d 1) vO u ( k C d C 1 C n e j k) v u (k) y (k) y(kjk D y (k)
m X
g i u(k d i) .
(3.3)
iD1
This estimated disturbance signal contains the effect of the real disturbance and also the effect of the mismatch between the real system and its model, including the effect of the truncation as well. If there is no plant/model mismatch, and there is no disturbance, or the additive disturbance is a white noise, then the best prediction of the disturbance is zero. The weighting function model is predictive by nature, as the future output can be estimated from knowledge of the weighting function points, the past inputs, and the future control actions (control “scenario”). On the basis of (3.2), at time point k C d C 1 C n e the effect of the current and future inputs on the future output (forced response) can be separated from the effect of the past inputs on the future point (free response). The outputs for a future horizon between points k C d C 1 and k C d C 1 C n e2 can be calculated by the following equation: 3 3 2 0 0 0 0 0 y( O k C d C 1j k) g1 6 y( 6 g1 0 0 0 07 O k C d C 2j k) 7 7 6 7 6 g2 6 y( 7 6 g g g 0 0 07 O k C d C 3j k) 3 2 1 7 6 7 6 6 7 6 . .. 7 .. .. .. .. .. .. 7 6 7 6 . . . .7 . . . . 6 7D6 . 7 6 7 6 6 y( g1 07 O k C d C 1 C n e1 j k)7 6 g n e1 C1 g n e1 g n e1 1 7 6 7 6 .7 .. .. .. 6 .. 7 6 .. .. .. 4 5 4 . . .. 5 . . . . . g n e2 C1 g n e2 g n e2 1 g n e1 C1 g 1 y( O k C d C 1 C n e2 j k) 2 3 2 3 2 3 u(k) yOfree (k C d C 1jk) vO u ( k C d C 1j k) 6 u(k C 1) 7 6 yOfree (k C d C 2jk) 7 6 vO u ( k C d C 2j k) 7 6 7 6 7 6 7 6 u(k C 2) 7 6 yO (k C d C 3jk) 7 6 vO ( k C d C 3j k) 7 free u 6 7 6 7 6 7 6 7 6 7 6 7 .. .. .. 6 7 6 7 6 7 6 . . . 7C6 7C6 7, 6 7 6 7 6 7 6 u(k C n e1 )7 6 yOfree (k C d C 1 C n e1 jk)7 6 vOu ( k C d C 1 C n e1 j k)7 6 7 6 7 6 7 .. .. .. 6 7 6 7 6 7 4 5 5 5 4 4 . . . u(k C n e2 ) yOfree (k C d C 1 C n e2 jk) vOu ( k C d C 1 C n e2 j k) (3.4) 2
57
58
3 Predictive Equations of Linear SISO Models
where yOfree (k C d C 1 C n e jk) denotes the effect of the past input signals on the future output points, yO free (k C d C 1 C n e jk) D
m X
g i u(k C 1 C n e i)
iDn e C2
C vO u ( k C d C 1 C n e j k) .
(3.5)
If the disturbance can be predicted, then it can be considered as part of the free response. O C d C 1 C n e1 ), and the predictive equation If n e1 ¤ 0, (3.4) starts with row y(k is given by 2
3 y(k O C d C 1 C n e1 j k) 6 7 .. 4 5D . y(k O C d C 1 C n e2 j k)
2 6 4
g n e1 C1 .. . g n e2 C1
g n e1 .. . g n e2
g n e1 1 .. . g n e2 1
2
.. .
g1 .. . g n e2 n e1 C1
.. .
3 yO free (k C d C 1 C n e1 jk) 7 6 .. C4 5 . . 2
3 u(k) 6 u(k C 1) 7 6 7 3 6 u(k C 2) 7 6 7 0 6 7 .. 7 .. 7 6 . 6 7 5 . 6 7 6 7 ) u(k C n e1 g1 6 7 6 .. 7 4 5 . u(k C n e2 )
yOfree (k C d C 1 C n e2 jk)
(3.6)
Equation (3.6) can be written in vector/matrix form as yO D Gu f C yO free C vO u ,
(3.7)
T O C d C 1 C n e2 jk) , yO D y(k O C d C 1 C n e1 jk), . . . , y(k
(3.8)
T u f D u(k), u(k C 1), . . . , u(k C n e1 ), . . . , u(k C n e2 ) ,
(3.9)
where
T yO free D yOfree (k C d C 1 C n e1 jk), . . . , yOfree (k C d C 1 C n e2 jk) ,
(3.10)
T vO u D vO u (k C d C 1 C n e1 jk), . . . , vO u (k C d C 1 C n e2 jk) .
(3.11)
3.1 Predictive Equations Based on Nonparametric Models
The lower index f means that u f contains only the current and future input signals. G is a Toeplitz matrix, 2
g n e1 C1 6 .. GD4 . g n e2 C1
g n e1 .. . g n e2
g n e1 1 .. . g n e2 1
.. .
g1 .. . g n e2 n e1 C1
.. .
3 0 .. 7 .5 ,
(3.12)
g1
which contains in each descending diagonal from left to right the same parameter. The first term of expression (3.7), Gu f , is the forced response, whereas the second term, yO free , is the free response. The disturbance estimation according to (3.3) can also be included in the free response. Including the disturbance estimation (3.3) in the free response and using the predicted output according to (3.7) in a control algorithm would realize a closedloop control with integral action [10]. If only n u consecutive changes are considered in the input signal, then the further manipulated signal values are equal to the previous ones, that is, u(k C n u ) D u(k C n u C 1) D u(k C n u C 2) D . . .
(3.13)
and then matrix G consists only of n u columns. For instance, if n u D 3 consecutive changes are taken into account and n e1 D 0 and n e2 D 4, the predictive equation is as follows: 3 2 3 2 0 y( O k C d C 1j k) g1 0 2 3 7 6 y( 7 6 u(k) 0 7 6 O k C d C 2j k)7 6 g 2 g 1 7 4 u(k C 1)5 6 y( 7 6 g1 7 6 O k C d C 3j k)7 D 6 g 3 g 2 4 y( 5 4 g4 g3 g 2 C g 1 5 u(k C 2) O k C d C 4j k) g5 g4 g3 C g2 C g1 y( O k C d C 5j k) 2 3 yOfree (k C d C 1jk) 6 yOfree (k C d C 2jk)7 6 7 7 C6 (3.14) 6 yOfree (k C d C 3jk)7 . 4 yOfree (k C d C 4jk)5 yOfree (k C d C 5jk)
Example 3.1 Predictive equations of a noise-free first-order dead-time process with the weighting function points Let us determine the predictive form of the first-order process given by the transfer function G(s) D
Kp e Td s 1 C s T1
with static gain K p D 1, time constant T1 D 1 s, and dead time Td D 0.2 s. The input and the output are sampled with ∆T D 0.2 s and zero-order hold is applied at the input. The step response equivalent discretization of the transfer function
59
60
3 Predictive Equations of Linear SISO Models
leads to the pulse-transfer function: B q 1 d b 1 q 1 D q d , q A (q 1 ) 1 C a 1 q 1 with the parameters a 1 D e ∆T/ T1 D e 0.2/1 D 0.8187, b 1 D 1 C a 1 D 1 0.8187 D 0.1813, and d D Td /∆T D 1. The weighting function is calculated by polynomial division of the numerator and the denominator of the pulse-transfer function till m D 20 points: m X G q 1 D g i q i D 0.1813q 1 C 0.1484q 2 C 0.1215q 3 C 0.0995q 4 iD1
C 0.0814q 5 C C 0.006 q 18 C 0.005q 19 C 0.0041q 20 . The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. According to (3.6), the predictive equation is as follows: 2
3 2 2 3 3 u(k) yO free (k C 3jk) 0 6 7 u(k C 1)7 4 5 056 4 u(k C 2)5 C yO free (k C 4jk) g1 yO free (k C 5jk) u(k C 3) 3 2 2 3 u(k) 0.1484 0.1813 0 0 6 u(k C 1)7 7 D 40.1215 0.1484 0.1813 0 56 4 u(k C 2)5 0.0995 0.1215 0.1484 0.1813 u(k C 3) 3 2 yO free (k C 3jk) C 4 yO free (k C 4jk)5 , yO free (k C 5jk)
3 2 y(k O C 3) g2 4 y(k O C 4)5 D 4 g 3 g4 y(k O C 5)
g1 g2 g3
0 g1 g2
where the free responses, considering m D 20 points of the weighting function, are expressed as yOfree (k C 3jk) D g 3 u(k 1) C g 4 u(k 2) C g 5 u(k 3) C C g 20 u(k 18) D 0.1215u(k 1) C 0.0995u(k 2) C 0.0814u(k 3) C C 0.0041u(k 18) ,
3.1 Predictive Equations Based on Nonparametric Models
yOfree (k C 4jk) D g 4 u(k 1) C g 5 u(k 2) C g 6 u(k 3) C C g 19 u(k 17) D 0.0995u(k 1) C 0.0814u(k 2) C 0.0667u(k 3) C C 0.005u(k 17) , yOfree (k C 5jk) D g 5 u(k 1) C g 6 u(k 2) C g 7 u(k 3) C C g 18 u(k 16) D 0.0814u(k 1) C 0.0667u(k 2) C 0.0546u(k 3) C C 0.006u(k 16) . The disturbance is considered as the difference of the measured output y (k) and its approximation y( O kj k d 1) calculated from the weighting function model according to (3.3).
3.1.2 Predictive Equations of the Step Response Model
A linear plant can be characterized by its unit step response. According to (2.8), the output signal can be approximated at time point k C d C 1 as y(k O C d C 1jk) D
m X
h i ∆ u(k i C 1) C vO u (k C d C 1jk) .
(3.15)
iD1
The step response is truncated at length m. At the last point considered, ∆ u(k m C 1) D u(k m C 1). Extending the prediction beyond the mathematical dead time by n e steps, we get y(k O C d C 1 C n e jk) D
m X
h i ∆ u(k i C 1 C n e ) C vO u (k C d C 1 C n e jk)
iD1
D h 1 ∆ u(k C n e ) C h 2 ∆ u(k 1 C n e ) C C h n e ∆ u(k C 1) C h n e C1 ∆ u(k) C h n e C2 ∆ u(k 1) C C h m u(k m C 1 C n e ) C vO u (k C d C 1 C n e jk) . (3.16) The future value of the disturbance can be considered equal to the current disturbance, which can be estimated as the difference of the current output and the model output according to (3.3).
61
62
3 Predictive Equations of Linear SISO Models
Calculating the outputs for a future horizon between time points k C d C 1 C n e1 and k C d C 1 C n e2 , we obtain the following relationship: 2
3 y(k O C d C 1 C n e1 jk) 6 7 ... 4 5 y(k O C d C 1 C n e2 jk) 3 2 h1 0 h n e1 C1 h n e1 h n e1 1 6 .. 7 .. .. .. .. .. D 4 ... . . .5 . . . h n e2 C1 h n e2 h n e2 1 h n e2 n e1 C1 h 1 2 3 ∆ u(k) 6 ∆ u(k C 1) 7 6 7 6 ∆ u(k C 2) 7 2 3 6 7 yO free (k C d C 1 C n e1 jk) 6 7 .. 7 6 7 6 .. 6 . 7C4 5 , . 6 7 6 ∆ u(k C n e1 )7 y O (k C d C 1 C n jk) free e2 6 7 .. 6 7 4 5 .
(3.17)
∆ u(k C n e2 ) where yO free (k C d C n e jk) denotes the effect of the past input signals on the future output points, yO free (k C d C 1 C n e jk) D
m1 X
h i ∆ u(k C n e C 1 i)
iDn e C2
Ch m u(k m C 1 C n e ) C vOu ( k C d C 1 C n e j k) .
(3.18)
With vector/matrix notation, (3.17) can be written as yO D H f ∆u f C yO free C vO u ,
(3.19)
where yO , yO free , and vO u were defined in (3.8), (3.10), and (3.11). ∆u f is defined as T ∆u f D ∆u(k), ∆u(k C 1), . . . , ∆u(k C n e1 ), . . . , ∆u(k C n e2 ) .
(3.20)
Matrix H f is the following Toeplitz matrix, containing the points of the step response: 2
h n e1 C1 6 .. f H D4 . h n e2 C1
h n e1 .. . h n e2
h n e1 1 .. . h n e2 1
.. .
h1 .. . h n e2 n e1 C1
.. .
3 0 .. 7 . .5 h1
(3.21)
Matrix H f consists of the step response coefficients and is called the dynamic matrix of the system [5]. The first term of expression (3.19), H f ∆u f , is the forced response, whereas the second term, yO free , is the free response. The index f points out
3.1 Predictive Equations Based on Nonparametric Models
the future input signal components. If only n u consecutive changes are considered in the input signal ∆ u(k C n u ) D ∆ u(k C n u C 1) D ∆ u(k C n u C 2) D D 0 ,
(3.22)
then matrix H f contains only n u columns. For instance, if n u D 3 consecutive changes are taken into account and n e1 D 0 and n e2 D 4, the predictive equation is as follows: 3 2 3 2 0 y(k O C d C 1jk) h1 0 2 3 7 6 y(k 7 6 ∆ u(k) 6 O C d C 2jk)7 6 h 2 h 1 0 7 74 6 y(k 7 6 5 6 O C d C 3jk)7 D 6 h 3 h 2 h 1 7 ∆ u(k C 1) 4 y(k O C d C 4jk)5 4 h 4 h 3 h 2 5 ∆ u(k C 2) h5 h4 h3 y(k O C d C 5jk) 3 2 yOfree (k C d C 1jk) 6 yOfree (k C d C 2jk)7 7 6 7 C6 (3.23) 6 yOfree (k C d C 3jk)7 . 4 yOfree (k C d C 4jk)5 yOfree (k C d C 5jk) The unit step response – similarly to the weighting function model – provides a predictive system model, as in the model the effect of the current and the future control increments can be separated immediately from the past input effects. The main difference between the weighting function model and the step response model is that whereas the weighting function model uses the control signal inputs, the step response model uses the control increments. Example 3.2 Predictive equations of a noise-free first-order dead-time process with the step response coefficients The same system is considered as in Example 3.1. The points of the step response of the first-order process are according to (2.12) or (2.15): h 1 D 0.1813 , h 2 D 0.3297 , h 3 D 0.4513 , h 4 D 0.5507 , h 5 D 0.6322 , h 6 D 0.6989 , . . . , h 19 D 0.9776 , h 20 D 0.9817 . The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. At least m D 20 points have to be taken into account to approach the steady-state value of the step
63
64
3 Predictive Equations of Linear SISO Models
response. According to (3.17), the predictive equations are written as 2
3 2 y(k O C 3jk) 0.3297 4 y(k O C 4jk)5 D 40.4513 y(k O C 5jk) 0.5507
0.1813 0.3297 0.4513
0 0.1813 0.3297
2
2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 0.1813 ∆ u(k C 3)
0.4513∆ u(k 1) C 0.5507∆ u(k 2) C 0.6322∆ u(k 3) C C 4 0.5507∆ u(k 1) C 0.6322∆ u(k 2) C 0.6989∆ u(k 3) C 0.6322∆ u(k 1) C 0.6989∆ u(k 2) C 0.7534∆ u(k 3) C 3 C0.9776∆ u(k 17) C 0.9817u(k 18) C0.9727∆ u(k 16) C 0.9776u(k 17) 5 . C0.9666∆ u(k 15) C 0.9727u(k 16) The disturbance is considered as the difference of the measured output y (k) and its approximation y( O kj k d 1) calculated from the step response model: O d 1) D y (k) vO u (k) D y (k) y(kjk
m X
h i ∆ u(k d i) .
iD1
If the estimated disturbance has a zero mean, then its best prediction is zero. Otherwise, the mean value of the disturbance can be assumed as a constant disturbance for the future.
3.2 Predictive Equations Based on the Pulse-Transfer Function
The system is described by the following controlled autoregressive integrating moving average (CARIMA) model: B q 1 T q 1 v u (k) y (k) D u(k d) C A (q 1 ) A (q 1 ) 1 q 1 1 B q T q 1 d q v u (k) . D ∆ u(k) C (3.24) A ∆ (q 1 ) A ∆ (q 1 ) (Polynomials B(q 1), A(q 1), and T(q 1 ) are defined in (2.21a), (2.21b), and (2.36).) The pulse-transfer function is a nonpredictive model, as for calculating the output signal at point k C d C 1C n e , the output values at the sampling points between the current time point k and the future point at k C d C 1 C n e are also required, which are still not available. This fact is seen, for example, in the case of n e D 0: y(k O C d C 1jk) D (1 a 1 )y (k C d) C (a 1 a 2 )y (k C d 1) C (a n a 1 a n a )y (k C d n a C 1) C a n a y (k C d C n a ) C b 1 ∆ u(k) C C b n b ∆ u(k n b C 1) C v u (k C d C 1) C t1 v u (k C d) C C t n t v u (k C d n t C 1) .
(3.25)
3.2 Predictive Equations Based on the Pulse-Transfer Function
It is seen that besides the current values of the input and the output signal and some of their past values, future output and disturbance values between time points k and k C d C 1 are also required for calculating y(k O C d C 1jk). To use the model for predictive control, predictive transformation of the model is required. 3.2.1 Repeated Substitution of the Process Model Equation
A predictive form can be obtained by repeated substitutions of the system equation. If the dead time is long, the procedure requires many steps. Applying it to simple models, we can give some rules for calculating the forced and the free responses. Such systems are the first-order and second-order elements with dead time, which can approximate well a lot of industrial processes. 3.2.1.1 Predictive Transformation of a First-Order CARIMA Model with Dead Time The CARIMA model of a first-order process with dead time is
y (k) D
T q 1 b 1 q 1 d v (k) . q u(k) C (1 q 1 ) (1 C a 1 q 1 ) u 1 C a 1 q 1
(3.26)
The difference equation is as follows: y (k) D b 1 ∆ u(k d 1)C(1a 1)y (k 1)Ca 1 y (k 2)CT q 1 v u (k) . (3.27) The prediction of the output at point k C d C 1 C n e becomes y(k O C d C 1 C n e jk) D b 1 ∆ u(k C n e ) C (1 a 1 ) y(k O C d C ne) O C d 1 C ne) C a 1 y(k 1 vOu (k C d C 1 C n e jk) . CT q
(3.28)
It is seen that the still unavailable y(k O C d C n e ) and y(k O C d 1 C n e ) output values are necessary to give the prediction. Also, predicted output noise would be required for the calculation, which is unknown. If T(q 1 ) D 1, the noise terms are unpredictable, and their values are assumed to be zero. If T(q 1 ) is a polynomial, some values of the noise preceding the current time points can be considered in the prediction. O C d 1 C n e ) can be expressed by using the differy(k O C d C n e ) and y(k ence equation, and finally, with recursive substitutions a predictive form will be obtained. For example, if d D 1, from the model equation (3.27), not considering the disturbance, the one-step-ahead prediction is y(k O C 1) D b 1 ∆ u(k 1) C (1 a 1 )y (k) C a 1 y (k 1)
65
66
3 Predictive Equations of Linear SISO Models
and the two-steps-ahead prediction can be obtained from O C 1) C a 1 y (k) y(k O C 2) D b 1 ∆ u(k) C (1 a 1 ) y(k D b 1 ∆ u(k) C (1 a 1 ) b 1 ∆ u(k 1) C (1 a 1 )y (k) C a 1 y (k 1) C a 1 y (k) D b 1 ∆ u(k) C (1 a 1 )b 1 ∆ u(k 1) C (1 a 1 C a 21 )y (k) C a 1 (1 a 1 )y (k 1) . With recursive substitutions for the predicted values of the output signal the following relationship is obtained for a first-order process with physical dead time d, not considering the effect of the disturbance [8]: 2
3 ∆ u(k) 7 6 6 ∆ u(k C 1) 7 y(k O C d C n e C 1jk) D h n e C1 , h n e , . . . , h 1 6 7 .. 4 5 . ∆ u(k C n e ) y (k) C f dCn e C1,1 , f dCn e C1,2 y (k 1) 2 3 ∆ u(k 1) 7 6 6 ∆ u(k 2) 7 C h n e C2 , h n e C3 , . . . , h n e C1Cd 6 7 . .. 4 5 . ∆ u(k d) (3.29) The first term on the right side of (3.29) gives the forced response, whereas the second and the third terms give the free response. If there is no dead time, that is, d D 0, the last term on the right side of (3.29) is missing. In (3.29) h i are the points of the step response, which can be calculated according to (2.28b). f dCn e C1,1 , and f dCn e C1,2 are the coefficients in row d C n e C 1 of the vectors f1 and f2 : 3 1 a1 6 1 a 1 C a 21 7 7 6 f1 D 61 a 1 C a 2 a 3 7 I 15 1 4 .. . 2
3 a1 6 (1 a 1 )a 1 7 7 6 f2 D 6(1 a 1 C a 2 )a 1 7 1 5 4 .. . 2
(3.30)
or f1 [i] D
i X j D0
(a 1 ) j I i 1 I f2 [1] D a 1 ,
f2 [i] D a 1 f1 [i 1] ,
i 2 . (3.31)
3.2 Predictive Equations Based on the Pulse-Transfer Function
Example 3.3 Predictive transformation of a first-order process with dead time based on (3.29) Let us determine the predictive form of the first-order process examined in Examples 3.1 and 3.2 given by the following pulse-transfer function: B q 1 d 0.1813q 1 q D q 1 . A (q 1 ) 1 0.8187q 1 The points of the step response are h 1 D 0.1813 ,
h 2 D 0.3297 ,
h 4 D 0.5507 ,
h 5 D 0.6322 , . . . .
h 3 D 0.4513 ,
A filtered disturbance signal is supposed at the process output. The discretized process is described by a CARIMA model, where for simplicity T(q 1 ) D 1 is taken into account. The process output has to be predicted from n e1 D 1 till n e2 D 3, thus from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. Vectors f1 and f2 are calculated as f1 D [1.8187, 2.489, 3.0377, 3.487, 3.8548] T , f2 D [0.8187, 1.489, 2.0377, 2.487, 2.8548] T . Taking (3.29) and (3.31) into consideration, we obtain the following predictive equations: 2
3 2 y(k O C 3jk) 0.3297 4 y(k O C 4jk)5 D 40.4513 y(k O C 5jk) 0.5507 2
0.1813 0.3297 0.4513
3 2 0.4513 3.0377 C 40.5507 5 ∆ u(k 1) C 43.4870 0.6322 3.8548
2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 0.1813 ∆ u(k C 3) 3 2.0377 y (k) 5 . 2.4870 y (k 1) 2.8548 0 0.1813 0.3297
The system considered in Example 3.2 is the step response representation of the system given by the pulse-transfer function in Example 3.3. It is seen that the forced response in both cases is obtained in the same way. The difference is in the form of calculating the free response.
67
68
3 Predictive Equations of Linear SISO Models
3.2.1.2 Predictive Transformation of a Second-Order CARIMA Model with Dead Time The CARIMA model of a second-order process with dead time is
y (k) D
b 1 q 1 C b 2 q 2 q d u(k) 1 C a 1 q 1 C a 2 q 2 T q 1 v u (k) . C (1 q 1 )(1 C a 1 q 1 C a 2 q 2 )
(3.32)
The difference equation for predicting the future output values can be written as y(k O C d C 1jk) D b 1 ∆ u(k) C b 2 ∆ u(k 1) C (1 a 1 )y (k C d) C (a 1 a 2 )y (k C d 1) C a 2 y (k C d 2) C T q 1 vO u (k C d C 1jk) y(k O C d C 2jk) D b 1 ∆ u(k C 1) C b 2 ∆ u(k) C (1 a 1 )y (k C d C 1) C (a 1 a 2 )y (k C d) C a 2 y (k C d 1) C T q 1 vO u (k C d C 2jk) .. .
(3.33)
Equation (3.33) is a nonpredictive form, as for calculating the predicted output signal the values of the output signal between points k and k C d C i are also required. A predictive transformation has to be executed. If d is not too big, a predictive form can be given by recursive substitutions of the output values. For the disturbance filter, let us suppose T(q 1 ) D 1. For example, if d D 2, to predict y(k O C 3) it is necessary to substitute the expressions of y(k O C 2jk) and y(k O C 1jk) to get a predictive form. As the future noise values are not known, their best estimates are zero. y(k O C 3jk) D b 1 ∆ u(k) C b 2 C b 1 (1 a 1 ) ∆ u(k 1) C b 2 (1 a 1 ) C b 1 (1 a 1 )2 C b 1 (a 1 a 2 ) ∆ u(k 2) C (1 a 1 )2 b 2 C b 2 (a 1 a 2 ) ∆ u(k 3) C (1 a 1 )3 C2(1 a 1 )(a 1 a 2 ) C a 2 y (k) C (1 a 1 )2 (a 1 a 2 ) C a 2 (1 a 1 ) C (a 1 a 2 )2 y (k 1) C a 2 (1 a 1 )2 C a 2 (a 1 a 2 ) y (k 2) . (3.34) It can be observed that the coefficients of the input increments are the values of the step response. For the coefficients of the current and the two previous output signals, a construction rule can also be given. Finally, the general rule for the prediction of the output signal in the case of a second-order system with dead time
3.2 Predictive Equations Based on the Pulse-Transfer Function
can be given by the following relationship: 2
3 ∆ u(k) 7 6 6 ∆ u(k C 1) 7 y(k O C d C n e C 1jk) D h n e C1 , h n e , . . . , h 1 6 7 .. 4 5 . ∆ u(k C n e ) 2 3 y (k) C f dCn e C1,1 , f dCn e C1,2 , f dCn e C1,3 4 y (k 1)5 y (k 2)
3 ∆ u(k 1) 7 6 6 ∆ u(k 2) 7 C h n e C2 , h n e C3 , . . . , h n e CdC2 6 7 . .. 5 4 . ∆ u(k (d C 1)) 2
(3.35)
If d D 0, then the last term in (3.35) contains only h n e C2 ∆ u(k 1). In (3.35) h i are the values of the step response and f dCn e C1,1 , f dCn e C1,2 , and f dCn e C1,3 are coefficients in row d C n e C 1 of vectors f1 , f2 , and f3 : 3 2 1 a1 2 7 6 (1 a 1 ) C (a 1 a 2 ) 6 7 f1 D 6(1 a 1 ) (1 a 1 )2 C (a 1 a 2 ) C (1 a 1 )(a 1 a 2 ) C a 2 7 5 4 .. . 3 2 a1 a2 7 6 7 6 (a 1 a 2 )(1 a 1 ) C a 2 f2 D 6(a 1 a 2 ) (1 a 1 )2 C (a 1 a 2 ) C (1 a 1 )a 2 7 5 4 .. . 3 2 a2 7 6 a 2 (1 a 1 ) 6 7 f3 D 6 a 2 (1 a 1 )2 C (a 1 a 2 ) 7 . (3.36) 5 4 .. . The rule for creating the elements of matrix F is as follows: f1 [1] D (1 a 1 ) I
f1 [i] D (1 a 1 )f1 [i 1] C f2 [i 1] ,
i2,
f2 [1] D (a 1 a 2 ) I
f2 [i] D (a 1 a 2 )f1 [i 1] C f3 [i 1] ,
i2,
f3 [1] D a 2 I
f3 [i] D a 2 f1 [i 1] ,
i2. (3.37)
On the right side of the predictive model (3.35) the first term is the forced response, and the second and third terms provide the free response. In the general case for a system of order n (which is equal to n a , the degree of polynomial A(q 1 ), i.e., n D n a ) the free response is influenced by y (k), y (k 1),
69
70
3 Predictive Equations of Linear SISO Models
y (k 2), . . . , y (k n), and h n e C2 ∆ u(k 1)Ch n e C3 ∆ u(k 2)C Ch n e CdCn ∆ u(k d n C 1). 3.2.2 Prediction by Solving the Diophantine Equation
Predictive transformation of the pulse-transfer function model (3.24) can be given in a general form by solving a Diophantine equation. The output signal at time point k C d C 1 C n e can be calculated as B q 1 T q 1 ∆ u(kC1Cn e )C v u (kCdC1Cn e jk) . y(kCdC1Cn O e) D A ∆ (q 1 ) A ∆ (q 1 ) (3.38) The aim is to predict the future value of the output signal yO on the basis of the information available till the current time point k (see [1, 2, 4, 6]). In (3.38) the noise term can be separated into its past and future values according to the separation equation (e.g., [2]): 1 F j q 1 j T q 1 C (3.39) D Ej q q I j D d C 1 C ne . A ∆ (q 1 ) A ∆ (q 1 ) The degree of polynomial E j (q 1 ) is j 1 D d C n e (the meaning of this choice can be seen later by analyzing the last term in (3.44)) and the degree of polynomial F j (q 1 ) is n ∆ a 1 D n a . (3.40a) F j q 1 D f j,0 C f j,1 q 1 C C f j,n a q n a E j q 1 D e j,0 C e j,1 q 1 C C e j, j 1 q ( j 1) .
(3.40b)
Equation (3.39) is a Diophantine equation, where polynomials A ∆ (q 1 ) and T(q 1 ) and the prediction length j D d C 1 C n e are given, and polynomials E j (q 1 ) and F j (q 1 ) have to be determined. The equation can be solved by polynomial division, where F j (q 1 ) is the remainder of the division. Equation (3.39) can also be written in the following form: T q 1 D E j q 1 A ∆ q 1 C F j q 1 q j . (3.41) Substituting (3.41) into (3.38) leads to 1 B q 1 F j q 1 y(k O C j) D v u (k C j )C ∆ u(k C1C n e )C E j q v u (k) . A ∆ (q 1 ) A ∆ (q 1 ) (3.42) Multiplying the first term of the right side of (3.42) by F j q 1 j E j q 1 A ∆ q 1 , C q 1D T (q 1 ) T (q 1 )
3.2 Predictive Equations Based on the Pulse-Transfer Function
one obtains the following equation: B q 1 E j q 1 ∆ u(k C 1 C n e ) y(k O C j) D T (q 1 ) 1 1 Fj q B q ∆ u(k d) C A ∆ (q 1 ) T (q 1 ) T q 1 F j q 1 v u (k) C E j q 1 v u (k C j ) . C 1 1 T (q ) A ∆ (q ) By using the CARIMA model (3.24), one can write (3.43) as B q 1 E j q 1 ∆ u(k C 1 C n e ) y(k O C j) D T (q 1 ) 1 Fj q C y (k) C E j q 1 v u (k C j ) . 1 (q ) T
(3.43)
(3.44)
The last term in (3.44) is (as the degree of polynomial E j (q 1 ) is j 1) the future noise, which is unpredictable, thus it is considered to have zero value in the prediction. Introducing the notation f Cp H dC1Cn e q 1 D B q 1 E dC1Cn e q 1 ,
(3.45)
(3.44) becomes
y(k O C d C 1C n e ) D
f Cp H dC1Cn e q 1 T (q 1 )
∆ u(k C 1C n e ) C
F dC1Cn e q 1 y (k) . T (q 1 ) (3.46)
The upper index f C p denotes that the corresponding term includes future f (including current) and past p terms. The lower index dC1Cn e shows that for every f Cp prediction step different polynomials are valid. The polynomial H dC1Cn e (q 1 ) can be divided into two parts in such a way that the current and the future input terms can be separated from the past terms [3]: f Cp f p H dC1Cn e q 1 D H dC1Cn e q 1 T q 1 C q (2Cn e ) H dC1Cn e q 1 . (3.47) p
In (3.47) the shift operator q (2Cn e ) ensures that the term q (2Cn e ) H dC1Cn e (q 1 ) ∆ u(k C 1 C n e ) includes only old manipulated variable terms ∆ u(k i)I i 1. p Furthermore, the degree of polynomial H dC1Cn e (q 1 ) is d C n 2 to get the past manipulated variable terms ∆ u(k 1), ∆ u(k 2), . . . , ∆ u(k (d C n 1)), as shown by (3.35) for n D 2.
71
72
3 Predictive Equations of Linear SISO Models
By solving this second Diophantine equation (3.47), the output prediction results in f y(k O C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p H dC1Cn e q 1 F dC1Cn e q 1 ∆ u(k 1) C y (k) C T (q 1 ) T (q 1 ) f D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u F (k 1) (3.48) C F dC1Cn e q 1 y F (k) , where ∆ u F (k) and ∆y F (k) are filtered signals by the inverse of polynomial T(q 1 ): ∆ u F (k) D
1 1 ∆ u(k) and y F (k) D y (k) . T (q 1 ) T (q 1 )
(3.49)
The future input terms are f f H dC1Cn e q 1 ∆ u(k C 1 C n e ) D h dC1Cn e ,1 ∆ u(k C n e ) C f
C h dC1Cn e ,1Cn e ∆ u(k)
(3.50)
and the past input terms are p p H dC1Cn e q 1 ∆ u F (k 1) D h dC1Cn e ,0 ∆ u F (k 1) p
C h dC1Cn e ,1 ∆ u F (k 2) C p
C h dC1Cn e ,dCn2 ∆ u F (k (d C n 1)) . (3.51) 1
The upper indices f and p of polynomial H(q ) denote the future and past terms. The predicted output can be separated into two components: forced response:
f yO f o r c (k C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) I
(3.52)
free response: p yOfree (k C d C1C n e ) D H dC1Cn e q 1 ∆ u F (k 1)C F dC1Cn e q 1 y F (k) . (3.53) f
From (3.52) we conclude that the degree of polynomial H dC1Cn e (q 1 ) is 1 C n e . If the additive output noise is autoregressive, T(q 1 ) D 1, then (3.48) becomes simpler, f y(k O C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u(k 1) C F dC1Cn e q 1 y (k) , (3.54)
3.2 Predictive Equations Based on the Pulse-Transfer Function f
f Cp
p
and the polynomials H dC1Cn e (q 1 ) and H dC1Cn e (q 1 ) are parts of H dC1Cn e (q 1 ): f Cp f H dC1Cn e q 1 ∆ u(k C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e )C p C H dC1Cn e q 1 ∆ u(k 1) . (3.55) Furthermore, the two components of the predicted output do not include filtered terms: forced response: f yO f o r c (k C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) I
(3.56)
free response: p yOfree (k C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k 1) C F dC1Cn e q 1 y (k) . (3.57) There are two ways (nonrecursive and recursive) for solving the Diophantine equation. The nonrecursive solution will be presented for the general case T(q 1 ) ¤ 1 and the recursive solution later only for T(q 1 ) D 1. The calculation of the j D d C 1 C n e steps ahead prediction requires the coefficients of the polynomials in (3.41). They can be obtained from a comparison of the coefficients of the two sides of the Diophantine equation (3.41): 1 C t1 q 1 C C t n t q n t D e j,0 C e j,1 q 1 C C e j, j 1 q ( j 1) i h 1 C a ∆1 q 1 C C a ∆(n a C1) q (n a C1) C q j f j,0 C f j,1 q 1 C C f j,n a q n a , (3.58) whence e j,0 D 1 ,
t1 D e j,1 C a ∆1 ,
t2 D e j,2 C e j,1 a ∆1 C a ∆2 ,
...
t j 1 D e j, j 1 C e j, j 2 a ∆1 C e j, j 3 a ∆2 C C e j,1 a ∆( j 2) C a ∆( j 1) t j D a ∆ j C e j,1 a ∆( j 1) C C e j, j 1 a ∆1 C f j,0 t j C1 D a ∆( j C1) C e j,1 a ∆ j C C e j, j 1 a ∆2 C f j,1 ,
...
t j Cn a D a ∆(1Cn a ) C f j,n a . Then the coefficients e j,i and f j,i can be expressed as e j,0 D 1 I
e j,i D t i
i1 X
e j,l a ∆(il) I
i D 1, . . . , j 1 D d C n e , (3.59a)
lD0
f j,i D t iC j
j 1 X
e j,l a ∆(iC j l) I
i D 0, 1, . . . , n a .
(3.59b)
lDiC1
The above equations are also valid for T(q 1 ) D 1; then, t1 D t2 D . . . D 0.
73
74
3 Predictive Equations of Linear SISO Models
3.2.3 Prediction if the Additive Noise Is Autoregressive
If the additive noise is autoregressive, that is, T(q 1 ) D 1, then only the first Diophantine equation (3.41) has to be solved. 3.2.3.1 Nonrecursive Calculation of the Coefficients of the Predictive Equation It follows from (3.59) with T(q 1 ) D 1 that the coefficients e j,i and f j,i can be expressed as
e j,0 D 1 I
e j,i D
i1 X
e j,l a ∆(il) I
i D 1, . . . , j 1 D d C n e , (3.60a)
lD0 j 1 X
f j,i D
e j,l a ∆(iC j l)I
i D 0, 1, . . . , n a ,
(3.60b)
lDiC1
where j D d C 1 C n e is the prediction step. Example 3.4 Predictive equations of a linear first-order dead-time process by solving the Diophantine equations nonrecursively Let us determine the predictive form of the first-order process with dead time d D 1, considered in Example 3.3. The process is described by a CARIMA model with T(q 1 ) D 1. B q 1 B q 1 1 q u(k) D q 1 ∆ u(k) y (k) D A (q 1 ) (1 q 1 )A (q 1 ) B q 1 1 D q ∆ u(k) , A ∆ (q 1 ) where B(q 1 ) D 0.1813q 1 and A ∆ (q 1 ) D 1 1.8187q 1 C 0.8187q 2 . The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. The Diophantine equation according to (3.41) is 1 D E j q 1 1 1.8187q 1 C 0.8187q 2 C q j F j q 1 . The equation has to be solved for j D 3, 4, and 5. For j D 3, e 3,0 D 1 , e 3,1 D t1 e 3,0 a ∆1 D 0 1 (1.8187) D 1.8187 , e 3,2 D t2 [e 3,0 a ∆2 C e 3,1 a ∆1 ] D 0 1 0.8187 C 1.81817 (1.8187) D 2.489 , f 3,0 D t0C3 [e 3,1 a ∆2 C e 3,2 a ∆1 ] D 0 1.8187 0.8187 C 2.489 (1.8187) D 3.0377 , f 3,1 D t1C3 e 3,2 a ∆2 D 0 2.489 0.8187 D 2.0377 .
3.2 Predictive Equations Based on the Pulse-Transfer Function
Consequently, E3 q 1 D 1 C 1.8187q 1 C 2.489q 2 I
F3 q 1 D 3.0377 2.0377q 1 .
The corresponding polynomials can be calculated for j D 4 and 5 similarly: E4 q 1 D 1 C 1.8187q 1 C 2.489q 2 C 3.0377q 3 , F4 q 1 D 3.487 2.487q 1 , E5 q 1 D 1 C 1.8187q 1 C 2.489q 2 C 3.0377q 3 C 3.487q 4 , F5 q 1 D 3.8548 2.8548q 1 . f Cp 1 q D E j q 1 B q 1 : Calculation of the coefficients of polynomial H j f Cp 1 q D E3 q 1 B q 1 H3 D 1 C 1.8187q 1 C 2.4890q 2 0.1813q 1 f Cp
H4
f Cp
H5
q
1
q
1
D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 , D E4 q 1 B q 1 D 1 C 1.8187q 1 C 2.4890q 2 C 3.0377q 3 0.1813q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 C 0.5507q 4 , D E5 q 1 B q 1 D 1 C 1.8187q 1 C 2.4890q 2 C3.0377q 3 C 3.4870q 4 0.1813q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 C 0.5507q 4 C 0.6322q 5 .
The predicted outputs which include the control increments are f Cp 1 q ∆ u(k C 1 C 1) D 0.1813∆ u(k C 1) C 0.3297∆ u(k) H3 f Cp H4
f Cp H5
q
1
q
1
C 0.4513∆ u(k 1) , ∆ u(k C 1 C 2) D 0.1813∆ u(k C 2) C 0.3297∆ u(k C 1) C 0.4513∆ u(k) C 0.5507∆ u(k 1) , ∆ u(k C 1 C 3) D 0.1813∆ u(k C 3) C 0.3297∆ u(k C 2) C 0.4513∆ u(k C 1) C 0.5507∆ u(k) C 0.6322∆ u(k 1) .
The above expressions can be separated into those including only the current and the future control increments (denoted in the sequel by superscript f ), and those giving the effects of the past control increments (denoted by superscript p): f H3 q 1 ∆ u(k C 1 C 1) D 0.1813∆ u(k C 1) C 0.3297∆ u(k) , p H3 q 1 ∆ u(k 1) D 0.4513∆ u(k 1) , f H4 q 1 ∆ u(k C 1 C 2) D 0.1813∆ u(k C 2) C 0.3297∆ u(k C 1) C 0.4513∆ u(k) ,
75
76
3 Predictive Equations of Linear SISO Models
p H4 q 1 ∆ u(k 1) D 0.5507∆ u(k 1) , f H5 q 1 ∆ u(k C 1 C 3) D 0.1813∆ u(k C 3) C 0.3297∆ u(k C 2) p H5
q
1
C 0.4513∆ u(k C 1) C 0.5507∆ u(k) , ∆ u(k 1) D 0.6322∆ u(k 1) .
The predicted outputs can be expressed by means of the polynomial equation (3.48) as f y(k O C d C 1 C n e jk) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u(k 1) C F dC1Cn e q 1 y (k) , with f H3 q 1 D 0.1813q 1 C 0.3297q 2 , p H3 q 1 D 0.4513 , f H4 q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 , p H4 q 1 D 0.5507 , f H5 q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 C 0.5507q 4 , p H5 q 1 D 0.6322 , or it can be written in vector/matrix form as 2
3 2 y(k O C 3jk) h2 4 y(k O C 4jk)5 D 4 h 3 h4 y(k O C 5jk)
h1 h2 h3
2
f 3,1 C 4 f 4,1 f 5,1
0 h1 h2
2 3 3 2 3 ∆ u(k) 0 6 h3 7 ∆ u(k C 1) 7 C 4 h 4 5 ∆ u (k 1) 0 56 4 ∆ u(k C 2)5 h1 h5 ∆ u(k C 3)
3 f 3,2 y (k) , f 4,2 5 y (k 1) f 5,2
which in detail is 2
3 2 y(k O C 3jk) 0.3297 4 y(k O C 4jk)5 D 40.4513 y(k O C 5jk) 0.5507 2
0.1813 0.3297 0.4513
3 2 0.4513 3.0377 C 40.55075 ∆ u (k 1) C 43.4870 0.6322 3.8548
2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 0.1813 ∆ u(k C 3) 3 2.0377 y (k) 2.48705 , y (k 1) 2.8548
0 0.1813 0.3297
which gives the same result as that obtained in Example 3.3. In the equation above the forced response is the first term on the right side and the free response is the sum of the second and the third terms.
3.2 Predictive Equations Based on the Pulse-Transfer Function
The last example has illustrated that the predicted output signals in the prediction time domain can be expressed in the case of autoregressive additive noise T(q 1 ) D 1 by yO D H f ∆u f C H p ∆u p C Fy p ,
(3.61)
where yO is defined by (3.8), ∆u f contains the current and future control increments, ∆u p consists of the past control increments, and y p includes current and past measured output values. In the case of T(q 1 ) ¤ 1, the last values have to be replaced by their filtered ones according to (3.49): yO D H f ∆ u f C H p ∆ u Fp C Fy pF .
(3.62)
3.2.3.2 Recursive Calculation of the Coefficients of the Predictive Equation The coefficients of the polynomials F j (q 1 ) and E j (q 1 ), j D d C 1 C n e , in (3.41) can also be calculated recursively [2], starting with one-step-ahead prediction j D 1: F1 q 1 D q 1 A ∆ q 1 , (3.63a)
f j C1,i D f j,iC1 f j,0 a ∆(iC1) ,
i D 0, 1, n a 1 ,
f j C1,n a D f j,0 a ∆(n a C1) , E1 q 1 D 1 ,
(3.63b)
E j C1 q 1 D E j q 1 C f j,0 q j .
(3.63c)
Example 3.5 Predictive equations of a linear first-order dead-time process by solving the Diophantine equations recursively The process and the prediction domain are the same as in Example 3.4: d D 1, B(q 1) D 0.1813q 1 , A ∆ (q 1 ) D 11.8187q 1 C0.8187q 2 , n e1 D 1, and n e2 D 3. The polynomials F j (q 1 ) and E j (q 1 ) are calculated recursively till j D d C 1 C n e1 D 1 C 1 C 1 D 3: F1 q 1 D q 1 A ∆ q 1 D 1.8187 0.8187q 1 , f 2,0 D f 1,1 f 1,0 a ∆1 D 0.8187 1.8187 (1.8187) D 2.489 , f 2,1 D f 1,0 a ∆2 D 1.8187 (0.8187) D 1.4889 , 1 D 2.489 1.4889q 1 , F2 q f 3,0 D f 2,1 f 2,0 a ∆1 D 1.4889 2.4889 (1.8187) D 3.0377 , f 3,1 D f 2,0 a ∆2 D 2.4889 0.8187 D 2.0377 , F3 q 1 D 3.0377 2.0377q 1 , 1 D1, E1 q 1 D E1 q 1 C f 1,0 q 1 D 1 C 1.8187q 1 , E2 q E3 q 1 D E2 q 1 C f 2,0 q 2 D 1 C 1.8187q 1 C 2.489q 2 .
77
78
3 Predictive Equations of Linear SISO Models
The polynomials F j (q 1 ) and E j (q 1 ) can be calculated similarly further till j D d C 1 C n e2 D 1 C 1 C 3 D 5. They are the same as in Example 3.4, where they were calculated in a nonrecursive way. The further steps of the prediction are the same as in Example 3.4 and are not repeated here.
3.2.4 Prediction in the Presence of a Measurable Disturbance
If a measurable disturbance affects the output as 1 1 dist dist q q Bm Bm (k) D v v m (k) , m A dmi s t (q 1 ) A (q 1 ) then the predictive equation (3.48) can be extended to f y(k O C d C 1 C n e jk) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u F (k 1) C F dC1Cn e q 1 y F (k) d i s t, f C H dC1Cn e q 1 ∆v m (k C 1 C n e ) d i s t,p C H dC1Cn e q 1 ∆v mF (k) ,
(3.64)
(3.65)
with ∆v mF (k) D
1 ∆v m (k) . (q T 1 )
(3.66)
Here the increments of the measurable disturbance are taken into account. In the case of T(q 1 ) D 1, (3.65) will be simpler: f y(k O C d C 1 C n e jk) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u(k 1) C F dC1Cn e q 1 y (k) d i s t, f C H dC1Cn e q 1 ∆v m (k C 1 C n e ) d i s t,p C H dC1Cn e q 1 ∆v m (k) . (3.67) In (3.65) the past terms of the measurable disturbance are p H dC1Cn e q 1 ∆v m (k) D h dC1Cn e ,0 ∆v m (k) C h dC1Cn e ,1 ∆v m (k 1) C (3.68) and the future (occasionally predictable) terms are d i s t, f H dC1Cn e q 1 ∆v m (k C 1 C n e ) d i s t, f
d i s t, f
D h dC1Cn e ,1 ∆v m (k C n e ) C C h dC1Cn e ,n e ∆v m (k C 1) .
(3.69)
3.2 Predictive Equations Based on the Pulse-Transfer Function
The reason for considering the current measurable disturbance as part of the past terms, that is, part of the free response, is that in calculating the current manipulated input, one already knows the current measurable disturbance. The next example demonstrates the prediction in the presence of a measurable disturbance. Example 3.6 Prediction of a linear first-order dead-time process in the case of a measurable disturbance at the process input (continuation of Example 3.4) The first-order process is the same as in Example 3.3. Assuming a measurable disturbance at the process input and a filtered nonmeasurable disturbance at the process output, the model equation becomes (the disturbance model is transformed to the process output according to Figure 2.8) B q 1 T q 1 B q 1 d y (k) D ∆ u(k d) C q ∆v m (k) C v u (k) , A ∆ (q 1 ) A ∆ (q 1 ) A ∆ (q 1 ) with B q 1 D 0.1813q 1 , A q 1 D 1 0.8187q 1 , A ∆ q 1 D 1 1.8187q 1 C 0.8187q 2 .
T q 1 D 1 ,
The prediction has to be calculated from k C N1 till k C N2 , where N1 D d C 1 C n e1 D 1 C 1 C 1 D 3 and N2 D d C 1 C n e2 D 1 C 1 C 3 D 5. The Diophantine equation (3.41) was solved in Example 3.4, and polynomials E j (q 1 ), F j (q 1 ), and H j (q 1 ), j D 3, 4, 5, were calculated. As the pulse-transfer function between the process output and the manipulated and the disturbance variables is the same, we obtain d i s t, f Cp
Hj
f Cp 1 q 1 D H j q ,
with
j D 3, 4, 5 .
The predicted outputs will include the additional effects of the disturbance increments which are calculated as H dj i s t (q 1 )∆v m (k C 1 C n e ). For the prediction points considered, d i s t, f Cp
H3
∆v m (k C 1 C 1) D 0.1813∆v m (k C 1) C 0.3297∆v m (k) C 0.4513∆v m (k 1) ,
d i s t, f Cp
H4
∆v m (k C 1 C 2) D 0.1813∆v m (k C 2) C 0.3297∆v m (k C 1) C 0.4513∆v m (k) C 0.5507∆v m (k 1) ,
d i s t, f Cp H5 ∆v m (k
C 1 C 3) D 0.1813∆v m (k C 3) C 0.3297∆v m (k C 2) C 0.4513∆v m (k C 1) C 0.5507∆v m (k) C 0.6322∆v m (k 1) .
The above terms can be separated into those including only the current and future control increments and those including the past effects (denoted by upper
79
80
3 Predictive Equations of Linear SISO Models
indices f and p, respectively): d i s t, f
H3
∆v m (k C 1 C 1) D 0.1813∆v m (k C 1) , d i s t,p
H3 d i s t, f H4
∆v m (k C 1 C 2) D 0.1813∆v m (k C 2) C 0.3297∆v m (k C 1) , d i s t,p
H4 d i s t, f H5
∆v m (k) D 0.3297∆v m (k) C 0.4513∆v m (k 1) , ∆v m (k) D 0.4513∆v m (k) C 0.5507∆v m (k 1) ,
∆v m (k C 1 C 3) D 0.1813∆v m (k C 3) C 0.3297∆v m (k C 2) C 0.4513∆v m (k C 1) , d i s t,p ∆v m (k) H5
D 0.5507∆v m (k) C 0.6322∆v m (k 1) .
The predicted outputs can be expressed either by means of polynomial equations (similarly to (3.48)) as f y(k O C d C 1 C n e ) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u(k 1) C F dC1Cn e q 1 y (k) d i s t, f C H dC1Cn e q 1 ∆v m (k C 1 C n e ) d i s t,p C H dC1Cn e q 1 ∆v m (k) , with q 1 D 0.1813q 1 , d i s t,p 1 q D 0.3297 C 0.4513q 1 , H3 d i s t, f 1 q D 0.1813q 1 C 0.3297q 2 , H4 d i s t,p q 1 D 0.4513 C 0.5507q 1 , H4 d i s t, f q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 , H5 d i s t,p 1 q D 0.5507 C 0.6322q 1 , H5 d i s t, f
H3
or in the form of a vector/matrix equation: 2
3 2 2 3 3 ∆ u(k) h3 0 6 7 ∆ u(k C 1) 7 C 4 h 4 5 ∆ u (k 1) 0 56 4 ∆ u(k C 2)5 h1 h5 ∆ u(k C 3) 3 32 3 2 dist f 3,2 0 0 ∆v m (k C 1) h1 y (k) C 4 h 2d i s t h 1d i s t f 4,2 5 0 5 4 ∆v m (k C 2)5 y (k 1) h 3d i s t h 2d i s t h 1d i s t ∆v m (k C 3) f 5,2 3 dist h3 ∆v m (k) , h 4d i s t 5 ∆v m (k 1) h 5d i s t
3 2 y(k O C 3jk) h2 4 y(k O C 4jk)5 D 4 h 3 h4 y(k O C 5jk) 2
f 3,1 C 4 f 4,1 f 5,1 2 dist h2 C 4 h 3d i s t h 4d i s t
h1 h2 h3
0 h1 h2
3.2 Predictive Equations Based on the Pulse-Transfer Function
which in detail is 2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 0.1813 ∆ u(k C 3) 2 3 2 3 0.4513 3.0377 2.0377 y (k) C 40.5507 5 ∆ u (k 1) C 43.4870 2.48705 y (k 1) 0.6322 3.8548 2.8548 3 2 32 0.1813 0 0 ∆v m (k C 1) C 40.3297 0.1813 0 5 4 ∆v m (k C 2)5 ∆v m (k C 3) 0.4513 0.3297 0.1813 2 3 0.3297 0.4513 ∆v m (k) C 40.4513 0.55075 . ∆v m (k 1) 0.5507 0.6322
2
3 2 y(k O C 3jk) 0.3297 4 y(k O C 4jk)5 D 40.4513 y(k O C 5jk) 0.5507
0.1813 0.3297 0.4513
0 0.1813 0.3297
The forced response is the first term on the right side of the equation. The free response is given by the second to fifth terms. The fourth term depends on the future values of the disturbance. If the future disturbances are known in advance or can be forecasted, then they can be used in addition to the current and past values of the measurable disturbance in a control algorithm for disturbance feedforward. This example illustrates that the predicted output signals in the prediction time domain can be expressed in the case of autoregressive additive noise T(q 1 ) D 1 by yO D H f ∆u f C H p ∆u p C Fy p C H d i s t, f ∆v m, f C H d i s t,p ∆v m,p ,
(3.70)
where the terms in additional to those in (3.61) are ∆v m, f , which contains the future (predicted) disturbance values, and ∆v m,p , which contains the current and past measured disturbance values. In the case of T(q 1 ) ¤ 1, the past values have to be replaced by their filtered ones according to (3.48) and (3.62): yO D H f ∆u f C H p ∆u Fp C Fy pF C H d i s t, f ∆v m, f C H d i s t,p ∆v Fm,p .
(3.71)
3.2.5 Prediction if the Additive Noise Is Nonautoregressive
In the case of nonautoregressive output noise, there are several methods to calculate the predicted output. 3.2.5.1 Prediction by Solving the Second Diophantine Equation The predictive equation was derived as (3.48) and the calculation is shown for a first-order process.
81
82
3 Predictive Equations of Linear SISO Models
Example 3.7 Prediction of a linear first-order dead-time process with colored noise by using two Diophantine equations (continuation of Example 3.4) The system is the same as discussed in Example 3.4 but with a noise filter T(q 1 ) D 1 0.8q 1 . y (k) D
0.1813q 1 q 1 ∆ u(k) (1 0.8187q 1 ) 1 0.8q 1 C v (k) . (1 q 1 ) (1 0.8187q 1 ) u q 1 ) (1
The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. According to (3.41), the Diophantine equations are 1 0.8q 1 D E j q 1 1 1.8187q 1 C 0.8187q 2 C q j F j q 1 I j D 3, 4, and 5 . For j D 3, e 3,0 D 1 ,
e 3,1 D t1 e 3,0 a ∆1 D 0.8 1 (1.8187) D 1.0187 , e 3,2 D t2 [e 3,0 a ∆2 C e 3,1 a ∆1 ] D 0 1 0.8187 C 1.01817 (1.8187) D 1.034 , f 3,0 D t0C3 [e 3,1 a ∆2 C e 3,2 a ∆1 ] D 0 1.0187 0.8187 C 1.034 (1.8187) D 1.0465 , f 3,1 D t1C3 e 3,2 a ∆2 D 0 1.034 0.8187 D 0.8465 .
Consequently, E3 q 1 D 1 C 1.0187q 1 C 1.034q 2 ,
F3 q 1 D 1.0465 0.8465q 1 .
The corresponding polynomials can be calculated for j D 4 and 5 similarly: E4 q 1 D 1 C 1.0187q 1 C 1.034q 2 C 1.0465q 3 , F4 q 1 D 1.0568 0.8568q 1 , 1 E5 q D 1 C 1.0187q 1 C 1.034q 2 C 1.0465q 3 C 1.0568q 4 , 1 F5 q D 1.0652 0.8652q 1 . f Cp
(q 1 ) D E j (q 1 )B(q 1): Calculation of the coefficients of polynomial H j f Cp 1 q D E3 q 1 B q 1 H3 D 1 C 1.0187q 1 C 1.034q 2 0.1813q 1 D 0.1813q 1 C 0.1847q 2 C 0.1875q 3 , f Cp 1 q D E4 q 1 B q 1 H4 D 1 C 1.0187q 1 C 1.034q 2 C 1.0465q 3 0.1813q 1 D 0.1813q 1 C 0.1847q 2 C 0.1875q 3 C 0.1897q 4 ,
3.2 Predictive Equations Based on the Pulse-Transfer Function f Cp
H5
q 1 D E5 q 1 B q 1 D 1 C 1.0187q 1 C 1.034q 2 C 1.0465q 3 C 1.0568q 4 0.1813q 1 D 0.1813q 1 C 0.1847q 2 C 0.1875q 3 C 0.1897q 4 C 0.1916 q 5 .
The above expressions can be separated according to the second Diophantine equation (3.47) into those including only the current and the future control increments (denoted by superscript f ), and those giving the effects of the past control increments (denoted by superscript p): f Cp f Cp f Cp q 1 D h 3,1 q 1 C h 3,2 q 2 C h 3,3 q 3 p D h 3,1 q 1 C h 3,2 q 2 1 C t1 q 1 C q 3 h 3,0 , f Cp 1 q D 0.1813q 1 C 0.1847q 2 C 0.1875q 3 H3 p D h 3,1 q 1 C h 3,2 q 2 1 0.8q 1 C q 3 h 3,0 . f Cp
H3
From this f Cp
h 3,1 D h 3,1 h 3,2 D
f Cp h 3,2
p h 3,0
f Cp h 3,3
D 0.1813 , t1 h 3,1 D 0.1847 (0.8) 0.1813 D 0.3297 ,
D t1 h 3,2 D 0.1875 (0.8) 0.3297 D 0.4513 , f H3 q 1 ∆ u(k C 1 C 1) D 0.1813∆ u(k C 1) C 0.3297∆ u(k) , p 1 ∆ u F (k 1) D 0.4513∆ u F (k 1) . H3 q Similarly, f H4 q 1 ∆ u(k C 1 C 2) D 0.1813∆ u(k C 2) C 0.3297∆ u(k C 1) p H4
1
1
C 0.4513∆ u(k) ,
q ∆ u (k 1) D 0.5507∆ u F (k 1) , f H5 q 1 ∆ u(k C 1 C 3) D 0.1813∆ u(k C 3) C 0.3297∆ u(k C 2) p H5
q
F
C 0.4513∆ u(k C 1) C 0.5507∆ u(k) , ∆ u (k 1) D 0.6322∆ u F (k 1) . F
The predicted outputs can be expressed by means of the polynomial equation (3.48) as f y(k O C d C 1 C n e j k) D H dC1Cn e q 1 ∆ u(k C 1 C n e ) p C H dC1Cn e q 1 ∆ u F (k 1) C F dC1Cn e q 1 y F (k) ,
83
84
3 Predictive Equations of Linear SISO Models
with f H3 q 1 D 0.1813q 1 C 0.3297q 2 , p H3 q 1 D 0.4513 , f H4 q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 , p H4 q 1 D 0.5507 , f H5 q 1 D 0.1813q 1 C 0.3297q 2 C 0.4513q 3 C 0.5507q 4 , p H5 q 1 D 0.6322 , or they can be written in vector/matrix form as 2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 h1 ∆ u(k C 3) 3 2 2 3 h3 f 3,1 f 3,2 F y (k) F , C 4 h 4 5 ∆ u (k 1) C 4 f 4,1 f 4,2 5 F y (k 1) h5 f 5,1 f 5,2
2
3 2 y(k O C 3jk) h2 4 y(k O C 4jk)5 D 4 h 3 y(k O C 5jk) h4
h1 h2 h3
0 h1 h2
which in detail is 2
3 2 y(k O C 3jk) 0.3297 4 y(k O C 4jk)5 D 40.4513 y(k O C 5jk) 0.5507
0.1813 0.3297 0.4513
2 3 1.0465 0.4513 C 40.55075 ∆ u F (k 1) C 41.0568 1.0652 0.6322 2
2 3 3 ∆ u(k) 0 6 ∆ u(k C 1)7 7 0 56 4 ∆ u(k C 2)5 0.1813 ∆ u(k C 3) 3 0.8465 y F (k) 5 . 0.8568 y F (k 1) 0.8652
0 0.1813 0.3297
These predictive equations are similar to those with T(q 1 ) D 1 if the past input and output terms are replaced by their filtered values according to (3.49). The coefficients of the input signal terms are the same; only the coefficients of the past output signals differ in the two cases.
3.2.5.2 Prediction by Filtering All Input and Output Signals Filter the process equation (3.38) including the colored noise by the noise filter T(q 1 ):
B q 1 ∆ u F (k C 1 C n e ) yO (k C d C 1 C n e ) D A ∆ (q 1 ) 1 v u (k C d C 1 C n e jk) . C A ∆ (q 1 ) F
(3.72)
3.2 Predictive Equations Based on the Pulse-Transfer Function
The filtering is performed according to (3.49). Now the additive noise term becomes autoregressive with the same denominator as that of the incremental process model. Equation (3.72) has a form as if the polynomial T(q 1 ) would be 1. The output prediction can be calculated by (3.54) and (3.55) and the Diophantine equation (3.41) has to be solved with T(q 1 ) ¤ 1. Finally, the predicted signal yO F (k C j jk) has to be filtered by T(q 1 ) in order to get yO (k C j jk): y(k O C d C 1 C n e ) D T q 1 yO F (k C d C 1 C n e ) .
(3.73)
This method differs from the previous one because not only the old input and the old and current output terms, that is, the free response, but also the current and future input terms, that is, the forced response, have to be filtered in this way the predicted signal is the filtered output and it has to be filtered with the inverse of the filter in order to get the desired (unfiltered) predicted output.
Example 3.8 Prediction of a linear first-order dead-time process with colored noise by the filtering method (continuation of Example 3.4) The system is the same as discussed in Example 3.4 but the noise filter is T(q 1 ) D 1 0.8q 1 . y (k) D
(1 C
0.1813q 1 q 1 ∆ u(k) 0.8187q 1 )
q 1 ) (1
1 0.8q 1 v u (k) . (1 q 1 ) (1 0.8187q 1 )
The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. According to (3.73), the filtered output signal y F (k) and the control increment ∆ u F (k) u F (k) u F (k 1) are y F (k) D y (k) C 0.8y F (k 1),
∆ u F (k) D ∆ u(k) C 0.8∆ u F (k 1) ,
k D 0, 1, 2, . . . , and the filtering is initialized by y F (k 1) D
y (k 1) , T(1)
∆ u F (k 1) D
∆ u(k 1) . T(1)
85
86
3 Predictive Equations of Linear SISO Models
The predictive equations calculated in Example 3.4 are now valid for the filtered signals: 2
3 2 yO F (k C 3jk) 0.3297 4 yO F (k C 4jk)5 D 40.4513 yO F (k C 5jk) 0.5507 2
0.1813 0.3297 0.4513
3 2 0.4513 3.0377 C 40.55075 ∆ u F (k 1) C 43.4870 0.6322 3.8548
3 2 3 ∆ u F (k) 0 F 6 ∆ u (k C 1)7 7 0 56 4 ∆ u F (k C 2)5 0.1813 ∆ u F (k C 3) 3 2.0377 F y (k) . 2.48705 F y (k 1) 2.8548 0 0.1813 0.3297
Because of filtering of the past input increments, the current and future input increments differ from zero and they belong to the free response. Finally, the predicted output signal is obtained by y (k) D yO F (k) 0.8y F (k 1) I
k D 1, 2, 3, . . . , d C 1 C n e2 D 5 .
In the case of filtering by the polynomial 1/ T(q 1 ), the resulting equation representing the relationship between the unfiltered signals ∆ u(k 1), ∆ u(k), . . . , ∆ u(k C 3), y (k) and y (k 1) is the same as the predictive equation system in the case of autoregressive additive noise in Example 3.4. The advantage of filtering by 1/ T(q 1 ) is the suppression of the high-frequency noises. 3.2.5.3 Prediction by Using the One-Step-Ahead Prediction Error According to another approach, the effect of the noise is immediately considered in the prediction [7]. The current noise is estimated as the difference between the measured output signal and the predicted output from the last sampling:
O 1) . vO u (k) D y (k) y(kjk
(3.74)
The best prediction of the white noise with zero mean is zero: vO u (k C ijk) D 0 I
k D 1, 2, 3, . . . , d C 1 C n e2 .
(3.75)
The next example illustrates the method. The prediction is performed by repeated substitution of the process model equation. Example 3.9 Prediction of a linear first-order dead-time process with colored noise by considering the effect of the current noise (continuation of Example 3.4) The system is the same as discussed in Example 3.4 but there is a noise filter T(q 1 ) D 1 0.8q 1 . y (k) D
(1 C
0.1813q 1 q 1 ∆ u(k) 0.8187q 1 )
q 1 )(1
1 0.8q 1 v u (k) . (1 q 1 )(1 0.8187q 1 )
3.2 Predictive Equations Based on the Pulse-Transfer Function
The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. The difference equation of the process and the noise model is y (k) D 1.8187y (k1)0.8187y (k2)C0.1813∆ u(k2)Cv u (k)0.8v u (k1) . The one-step-ahead prediction is obtained by shifting the time arguments and considering that the best estimate of the random white noise with zero mean is zero, vOu (k C 1jk) D 0: y(k O C 1jk) D 1.8187y (k) 0.8187y (k 1) C 0.1813∆ u(k 1) C vOu (k C 1jk) 0.8v u (k) D 1.8187y (k) 0.8187y (k 1) C 0.1813∆ u(k 1) 0.8v u (k) . Similarly, the two-steps-ahead prediction with vO u (k C 1jk) D 0 becomes y(k O C 2jk) D 1.8187 yO (k C 1jk) 0.8187y (k) C 0.1813∆ u(k 1) 0.8 vO u (k C 1jk) D 1.8187 1.8187y (k) 0.8187y (k 1) C 0.1813∆u(k 1) 0.8v u (k) 0.8187y (k) C 0.1813∆ u(k 1) D 2.489y (k) 1.489y (k 1) C 0.3297∆ u(k 1) C 0.1813∆ u(k) 1.455v u (k) . The three-steps-ahead prediction with vOu (k C 1jk) D 0 becomes y(k O C 3jk) D 2.489y (k C 1jk) 1.489y (k) C 0.3297∆ u(k) C 0.1813∆ u(k C 1) 1.455 vO u (k C 1jk) D 2.489 1.8187y (k) 0.8187y (k 1) C 0.1813∆ u(k 1) 0.8v u (k) 1.489y (k) C 0.3297∆ u(k) C 0.1813∆ u(k C 1) D 3.0335y (k) 2.0377y (k 1) C 0.4512∆ u(k 1) C 0.3297∆ u(k) C 0.1813∆ u(k C 1) 1.9912v u (k) . Continuing the prediction, one can express the output values in vector/matrix form as 3 2 2 3 2 3 ∆ u(k) y(k O C 3jk) 0.3297 0.1813 0 0 6 ∆ u(k C 1)7 7 4 y(k O C 4jk)5 D 40.4513 0.3297 0.1813 0 56 4 ∆ u(k C 2)5 y(k O C 5jk) 0.5507 0.4513 0.3297 0.1813 ∆ u(k C 3) 2 3 2 2 3 3 0.4513 3.0377 2.0377 1.9912 y (k) C 40.55075 ∆ u(k 1)C 43.4870 2.48705 C 42.43035 v u (k) . y (k 1) 0.6322 3.8548 2.8548 2.7898
87
88
3 Predictive Equations of Linear SISO Models
As is seen, the predictive equations are almost the same as in the autoregressive noise case with T(q 1 ) D 1. Now the equations are extended with a term depending on the current noise. Camacho and Bordons [2] derived another Diophantine equation for prediction of the output signal in the case of colored noise with T(q 1 ) ¤ 1.
3.2.6 Matrix Calculation Method
The predictive equations based on the pulse-transfer function can be computed also by the matrix calculation method according to Rossiter [10]. This method provides a simpler way to derive the predictive equations than by solving Diophantine equations. The system is described by the CARIMA model given in (3.24). Here only the case when T(q 1 ) D 1 is considered. If the additive noise is nonautoregressive (T(q 1 ) ¤ 1), then the filtering methods presented in Section 3.2.4 can be additionally applied. The difference equation corresponding to (3.24) is written in the following form: y (k) D a ∆1 y (k 1) a ∆2 y (k 2) a ∆(nC1) y (k n 1) C b 1 ∆ u(k d 1) C b 2 ∆ u(k d 2) C C b n ∆ u(k d n) C v u (k) .
(3.76)
Write the predictive equations for many steps ahead by substituting the last term, the unknown future disturbance, with its best, zero prediction value: y(k O C 1jk) C a ∆1 y (k) C C a ∆(nC1) y (k n) D b 1 ∆ u(k d) C b 2 ∆ u(k d 1) C C b n ∆ u(k d n C 1) , O C 1jk) C C a ∆(nC1) y (k n C 1) y(k O C 2jk) C a ∆1 y(k D b 1 ∆ u(k d C 1) C b 2 ∆ u(k d) C C b n ∆ u(k d n C 2) , .. . y(k O C d C 1jk) C a ∆1 y(k O C djk) C C a ∆(nC1) y (k C d n) D b 1 ∆ u(k) C b 2 ∆ u(k 1) C C b n ∆ u(k n C 1) , .. . y(k O C d C 1 C n e2 jk) C a ∆1 y(k O C d C n e2 jk) C C a ∆(nC1) y (k C d C n e2 n) D b 1 ∆ u(k C n e2 ) C b 2 ∆ u(k 1 C n e2 ) C C b n ∆ u(k n C 1 C n e2 ) .
(3.77)
3.2 Predictive Equations Based on the Pulse-Transfer Function
In vector/matrix form: 2
1 a ∆1 a ∆2 .. .
6 6 6 6 6 6 6 6 a∆d 6 6 a ∆(dC1) 6 .. 4 . a ∆(dCn e2) 2 6 6 6 6 6 6 6 6 6 6 6 4
.. .
0 1 a ∆1 .. .
0 0 1 .. .
a ∆(d1) a∆d .. .
a ∆(d2) a ∆(d1) .. .
a ∆(dCn e21) y(k O C 1jk) y(k O C 2jk) y(k O C 3jk) .. .
y(k O C d C 1jk) y(k O C d C 2jk) .. .
a ∆(dCn e22) 3
.. .
0 0 0 .. .
0 0 0 .. .
1 a ∆1 .. .
0 1 .. .
a ∆ n e2
a ∆(n e2 1)
.. . .. .
3 0 07 7 07 .. 7 7 .7 7 07 7 07 .. 7 5 . 1
7 7 7 7 7 7 7 7 7 7 7 5
y(k O C d C 1 C n e2 jk) 2 a ∆2 a ∆1 6 a ∆2 a ∆3 6 6 a ∆3 a ∆4 6 .. .. 6 6 . . C6 6 a ∆(dC1) a ∆(dC2) 6 a ∆(dC3) 6 a ∆(dC2) 6 .. .. 4 . . a ∆(dCn e2C1) a ∆(dCn e2C2) 2 0 0 0 0 60 0 0 0 6 60 0 0 0 6. .. .. .. . . .. 6. . . 6 . . . D6. 6b1 0 0 0 6 6b2 b1 0 0 6. .. .. .. . . .. 4. . . . . . . 0 0 0 bn 2 0 0 b 1 b n1 6 0 b1 b2 bn 6 6b1 b2 b3 0 6. .. .. .. . . 6. . 6 . . . C6 . 6b2 b3 b4 0 6 0 6b3 b4 b5 6. .. .. .. . . 4. . . . . . 0 0 0 0
... .. . .. .
a∆n a ∆(nC1) 0 .. . 0 0 .. .
3 a ∆(nC1) 0 72 3 7 y (k) 0 7 7 y (k 1) 7 .. 7 6 7 . 76 .. 7 76 7 6 . 0 74 7 y (k n C 1)5 0 7 y (k n) .. 7 5 .
0 0 3 3 2 0 ∆ u(k) 07 76 7 ∆ u(k C 1) 7 0 76 ∆ u(k C 2) 7 7 6 .. 7 6 7 . 7 . 76 . 76 7 . 7 0 76 7 6 ∆ u(k C 1 C n e2 n)7 0 76 7 . 5 4 .. .. 7 5 . ∆ u(k C n e2 ) b1 3 bn 3 0 72 ∆ u(k 1) 7 0 76 7 ∆ u(k 2) 7 .. 7 76 7 6 ∆ u(k 3) . 76 7. 76 .. 7 0 76 7 . 74 0 7 ∆ u(k d n C 2)5 .. 7 5 ∆ u(k d n C 1) . 0
(3.78)
89
90
3 Predictive Equations of Linear SISO Models
In the first and second terms on the left side of (3.78) the value of the coefficient is zero if the index of the coefficient a ∆ i exceeds n C 1. In the first term on the right side of (3.78) the number of all-zero rows in the matrix is equal to d. In the second term in the matrix there is an upper-left triangle containing zeros. In the first row the number of zeros is d 1. (If d D 1, the triangle of zeros is missing. If n D 1 and d D 0, the second term on the right side is missing.) The matrices in (3.78) have a special form (Toeplitz and Hankel matrices); therefore, manipulations with these matrices become simpler than with general matrices. (A Hankel matrix contains the same constant in its skew diagonals from right to left.) Denote 3 y(k O C 1jk) 6 7 y(k O C 2jk) 7 6 7 6 y(k O C 3jk) 7 6 7 6 .. 7 6 . 7 6 yO D 6 7, 6 y(k O C d C 1jk) 7 7 6 6 y(k O C d C 2jk) 7 7 6 7 6 .. 5 4 . y(k O C d C 1 C n e2 jk) 2 3 ∆ u(k) 6 7 ∆ u(k C 1) 6 7 6 7 ∆ u(k C 2) 6 7 6 7 .. 6 7 . ∆u f D 6 7, 6 7 6 ∆ u(k C 1 C n e2 n)7 6 7 6 .. 7 5 4 . 2
∆ u(k C n e2 )
2
3 y (k) 6 y (k 1) 7 6 7 6 7 .. 7, yp D 6 6 7 . 6 7 4 y (k n C 1)5 y (k n)
2
3 ∆ u(k 1) 6 7 ∆ u(k 2) 6 7 6 7 ∆ u(k 3) 6 7 6 7 , ∆u p D 6 .. 7 6 7 . 6 7 4 ∆ u(k d n C 2)5 ∆ u(k d n C 1) (3.79)
and My f D 2 1 6 a ∆1 6 6 a ∆2 6 6 .. 6 . 6 6 6 a∆d 6 6 a ∆(dC1) 6 6 .. 4 . a ∆(dCn e2)
0 1 a ∆1 .. .
0 0 1 .. .
a ∆(d1) a∆d .. .
a ∆(d2) a ∆(d1) .. .
a ∆(dCn e21)
a ∆(dCn e22)
.. . .. .
0 0 0 .. . 1 a ∆1 .. . a ∆ n e2
0 0 0 .. . 0 1 .. . a ∆(n e21)
.. . .. .
3 0 07 7 07 7 .. 7 7 .7 7, 07 7 07 7 .. 7 .5 1
3.2 Predictive Equations Based on the Pulse-Transfer Function
2
My p
Mu f
6 6 6 6 6 6 6 D6 6 a ∆(dC1) 6 6 a ∆(dC2) 6 6 .. 4 . a ∆(dCn e2C1) 2 0 0 0 60 0 0 6 60 0 0 6 6. .. .. 6. . . 6. D6 6b1 0 0 6 6b2 b1 0 6 6 .. .. .. 4. . . 0
0
0
0 60 6 6b1 6 6. 6. 6. D6 6b2 6 6b3 6 6 .. 4. 0
0 b1 b2 .. . b3 b4 .. . 0
b1 b2 b3 .. . b4 b5 .. . 0
2
Mu p
a ∆2 a ∆3 a ∆4 .. .
a ∆1 a ∆2 a ∆3 .. .
a ∆(dC2) a ∆(dC3) .. . a ∆(dCn e2C2) .. . .. . .. . .. .
0 0 0 .. . 0 0 .. . bn
... .. . .. .
a ∆(nC1) 0 .. . 0 0 .. . 0
3 a ∆(nC1) 0 7 7 0 7 7 .. 7 7 . 7 7, 0 7 7 0 7 7 .. 7 . 5 0
3
.. . .. .
b n1 bn 0 .. . 0 0 .. . 0
a∆n
0 07 7 07 7 .. 7 7 .7 7, 07 7 07 7 .. 7 .5 b1 3
bn 07 7 07 7 .. 7 7 . 7 7. 07 7 07 7 .. 7 . 5
(3.80)
0
Then (3.80) is written in the following form: M y f y C M y p y p D M u f ∆u f C M u p ∆u p .
(3.81)
Hence, the predicted output yO is calculated as 1 1 yO D M1 y f M u f ∆u f C M y f M u p ∆u p M y f M y p y p .
(3.82)
The prediction has to be started from k C 1. In this case matrix M y f is a Toeplitz matrix, its determinant is 1, and its inverse exists. Example 3.10 Predictive equations of a linear first-order process with dead time by the matrix calculation method Let us determine the predictive form of the first-order process with dead time d D 1 considered in Example 3.4. The process model equation is y (k) 1.8187y (k 1) C 0.8187y (k 2) D 0.1813∆ u(k 2)
91
92
3 Predictive Equations of Linear SISO Models
and its shifted-ahead forms are y(k O C 1jk) 1.8187y (k) C 0.8187y (k 1) D 0.1813∆ u(k 1) , y(k O C 2jk) 1.8187 yO (k C 1jk) C 0.8187y (k) D 0.1813∆ u(k) , and so on. The predictive equations from yO (k C 1jk) till y(k O C 5jk) are given according to (3.78) by 32 3 2 yO (k C 1jk) 1 0 0 0 0 7 61.8187 6 1 0 0 07 6 7 6 yO (k C 2jk)7 6 0.8187 1.8187 7 6 1 0 07 6 yO (k C 3jk)7 6 7 4 0 0.8187 1.8187 1 05 4 yO (k C 4jk)5 yO (k C 5jk) 0 0 0.8187 1.8187 1 2 3 1.8187 0.8187 6 0.8187 0 7 6 7 y (k) 6 7 C6 0 0 7 y (k 1) 4 0 0 5 0 0 2 3 3 2 0 0 0 0 ∆ u(k) 60.1813 7 0 0 0 6 7 6 ∆ u(k C 1)7 6 7 D6 0.1813 0 0 7 6 0 7 4 ∆ u(k C 2)5 4 0 0 0.1813 0 5 ∆ u(k C 3) 0 0 0 0.1813 3 2 0.1813 6 0 7 7 6 7 C6 6 0 7 ∆ u(k 1) 4 0 5 0 and expressing the vector of the predicted outputs according to (3.82) using matrix inversion leads to 3 3 2 2 3 2 0 0 0 0 y(k O C 1jk) ∆ u(k) 7 7 60.1813 6 y(k 0 0 0 O C 2jk) 7 6 ∆ u(k C 1)7 7 6 6 6 7 7 6 6 y(k 0 0 7 7 4 ∆ u(k C 2)5 6 O C 3jk)7 D 60.3297 0.1813 4 y(k 0 5 O C 4jk)5 40.4513 0.3297 0.1813 ∆ u(k C 3) 0.5507 0.4513 0.3297 0.1813 y(k O C 5jk) 2 3 2 3 0.1813 1.8187 0.8187 60.32977 6 2.489 1.489 7 6 7 6 7 y (k) 7 ∆ u(k 1) C 63.0377 2.03777 C6 0.4513 6 7 6 7 y (k 1) . 40.55075 4 3.487 2.487 5 0.6322
3.8548
2.8548
The output predictions from k C 3 till k C 5 are the third to fifth rows of the equation above. They are identical to the previous result obtained by solving the Diophantine equations in Example 3.4.
3.3 Predictive Equations of the State Space Model
Example 3.11 Predictive equations of a linear second-order process with dead time by the matrix calculation method The second-order process is given by the following equation: y (k) D
b 1 q 1 C b 2 q 2 1 u(kd)C v u (k) . 1 C a 1 q 1 C a 2 q 2 (1 q 1 )(1 C a 1 q 1 C a 2 q 2 )
The output signal can be expressed as y (k) D a ∆1 y (k 1) a ∆2 y (k 2) a ∆3 y (k 3) C b 1 ∆ u(k d 1) C b 2 ∆ u(k d 2) , where a ∆1 D a 1 1, a ∆2 D a 2 a 1 , and a ∆3 D a 2 . Let us consider the case when d D 3 and n e2 D 2. According to (3.78), the predictive equations are written as 2 32 3 y(k O C 1jk) 1 0 0 0 0 0 6a 6 O C 2jk)7 1 0 0 0 07 6 ∆1 7 6 y(k 7 6 76 7 1 0 0 07 6 y(k O C 3jk)7 6 a ∆2 a ∆1 6 76 7 6 a ∆3 a ∆2 a ∆1 1 0 07 6 y(k O C 4jk)7 6 76 7 4 0 1 05 4 y(k a ∆3 a ∆2 a ∆1 O C 5jk)5 0 0 a ∆3 a ∆2 a ∆1 1 y(k O C 6jk) 3 2 a ∆1 a ∆2 a ∆3 6a 0 7 7 2 y (k) 3 6 ∆2 a ∆3 7 6 0 0 74 6 a ∆3 C6 7 y (k 1)5 0 0 7 6 0 7 y (k 2) 6 4 0 0 0 5 0 0 0 3 2 3 2 0 0 b1 b2 0 0 0 3 6 72 60 0 07 7 2 ∆ u(k) 3 6 0 b 1 b 2 0 7 ∆ u(k 1) 6 7 6 76 6 0 7 6 ∆ u(k 2)7 0 0 74 6b1 b2 0 60 7 . D6 7 ∆ u(k C 1)5 C 6 7 6b2 0 07 0 0 7 4 ∆ u(k 3)5 6b1 0 7 ∆ u(k C 2) 6 7 6 40 4b2 b1 0 5 0 0 0 5 ∆ u(k 4) 0 b2 b1 0 0 0 0 The predicted output values can be calculated according to (3.82) using matrix inversion.
3.3 Predictive Equations of the State Space Model
In the sequel prediction of the state variables and the output signal will be given based on the state space representation of the system. The form of the discrete-time
93
94
3 Predictive Equations of Linear SISO Models
state equation is given in (2.48). xO (k C 1jk) D A x x(k) C b x u(k d)
(3.83a)
y(k O C 1jk) D c x xO (k C 1jk) .
(3.83b)
The state vector in the next sampling points k C 1, k C 2, . . . can be calculated by repeated substitutions starting from (3.83): xO (k C 2jk) D A x xO (k C 1jk) C b x u(k d C 1) D A2x x(k) C A x b x u(k d) C b x u(k d C 1) , xO (k C 3jk) D A x xO (k C 2jk) C b x u(k d C 2) D A3x x(k) C A2x b x u(k d) C A x b x u(k d C 1) C b x u(k d C 2) .. .
(3.84)
The predicted values of the output signal in the future horizon can be written in the following vector/matrix form: 2 3 3 2 yO (k C 1jk) cx Ax 6 7 7 6 c x A2 yO (k C 2jk) x 6 7 7 6 3 6 7 7 6 yO (k C 3jk) 6 7 7 6 cx Ax 6 7 7 6 . . 6 7 7 6 . . . . 6 7 x(k) 7D6 6 7 7 6 dCn C1 6 y(k O C d C n e1 C 1jk)7 6c x A x e1 7 6 7 7 6 6 .. 7 .. 7 6 4 5 5 4 . . dCn e2 C1 y(k O C d C n e2 C 1jk) cx Ax 3 2 0 0 0 cx bx 6 cx A x bx cx bx 0 0 7 7 6 6 c A2 b cx A x bx cx bx 0 7 7 6 x x x 6 .. 7 .. .. .. .. 6 7 . C6 . 7 . . . 7 6 dCn dCn 1 dCn 2 6c x A x e1 b x c x A x e1 b x c x A x e1 b x 0 7 7 6 .. 7 .. .. .. 6 .. 4 . . 5 . . . e2 b c x A dCn c x A xdCn e21 b x c x A xdCn e22 b x c x b x x x 2 3 u(k d) 6 u(k d C 1)7 6 7 6 u(k d C 2)7 6 7 6 7 .. 6 7 . 6 (3.85) 7 . 6 7 6 u(k C n e1 ) 7 6 7 6 .. 7 4 5 . u(k C n e2 )
3.3 Predictive Equations of the State Space Model
Example 3.12 Predictive equations of a first-order dead-time process on the basis of the state space form of the controlled autoregressive moving average (CARMA) model The pulse-transfer function of a first-order process is 1 B q 1 d b 1 q 1 G q q D q d . D A (q 1 ) 1 C a 1 q 1 The parameters are as in Example 3.3: a 1 D 0.8187, b 1 D 0.1813, and d D 1. According to Example 2.8 the state vector has only one term chosen as: x(k) D y (k) . The parameters of the state space form are all scalar values: A x D [a 1 ] D 0.8187 I
b x D [b 1 ] D 0.1813 I
c x D [1] .
The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. The predictive equations are calculated according to (3.85): 2
3 2 3 y(k O C 3jk) 0.5487 4 y(k O C 4jk)5 D 40.44935 y (k) y(k O C 5jk) 0.3678 2
0.1215 C 40.0995 0.0815
0.1484 0.1215 0.0995
0.1813 0.1484 0.1215
0 0.1813 0.1484
3 u(k 1) 6 u(k) 7 0 6 7 7 0 56 6 u(k C 1)7 . 0.1813 4 u(k C 2)5 3
2
u(k C 3)
Consider the input increments instead of the input signals in the individual sampling points: u(k d) D u(k d 1) C ∆ u(k d), u(k d C 1) D u(k d) C ∆ u(k d C 1) D u(k d 1) C ∆ u(k d) C ∆ u(k d C 1) .. . u(k d C n e ) D u(k d 1) C
nX e C1 iD1
∆ u(k d 1 C i) .
(3.86)
95
96
3 Predictive Equations of Linear SISO Models
Equation (3.85) can be written with the control increments from (3.86) in the following form: 3 3 2 yO (k C 1jk) cx Ax 7 6 7 6 c x A2 yO (k C 2jk) x 7 6 7 6 3 7 6 7 6 yO (k C 3jk) 7 6 7 6 cx Ax 7 6 7 6 . . 7 6 7 6 . . . . 7 x(k) 6 7D6 7 6 7 6 dCn C1 6 y(k O C d C n e1 C 1jk)7 6c x A x e1 7 7 6 7 6 7 .. .. 6 7 6 5 5 4 4 . . dCn e2 C1 y(k O C d C n e2 C 1jk) cx Ax 2 3 cx bx 1 6 P 7 6 c x A ix b x 7 6 7 6 iD0 7 6 P 7 2 6 7 i cx A x bx 7 6 6 iD0 7 6 7 .. 6 7 7 u(k d 1) . C6 6 7 6 dCn 7 e1 P 6 i cx A x bx 7 6 7 6 iD0 7 6 7 .. 6 7 6 7 . 6 dCn 7 4 P e2 5 i cx A x bx 2
2
iD0
0
0
cx bx
0
cx bx
.. .
.. .
..
dCn Pe1 1
dCn Pe1 2
cx bx
1 6 P 6 c x A ix b x 6 6 iD0 6 P 6 2 c x A ix b x 6 6 iD0 6 .. 6 . C6 6 6 dCn 6 P e1 c A i b x x x 6 6 iD0 6 . 6 .. 6 6 dCn 4 P e2 c x A ix b x iD0
1 P iD0
iD0
iD0
c x A ix b x
.. .
dCn Pe2 1
3 ∆ u(k d) 6 ∆ u(k d C 1)7 6 7 6 ∆ u(k d C 2)7 6 7 6 7 .. 6 7 6 . 7 . 6 7 6 ∆ u(k C n e1 ) 7 6 7 6 .. 7 4 5 . ∆ u(k C n e2 ) 2
c x A ix b x
c x A ix b x
iD0
.
c x A ix b x
.. .
..
dCn Pe2 2
c x A ix b x
.
0
3
7 0 7 7 7 7 7 0 7 7 7 .. 7 . 7 7 7 0 7 7 7 .. 7 7 . 7 7 5 cx bx
iD0
(3.87)
3.3 Predictive Equations of the State Space Model
The predictive equations can also be derived on the basis of the incremental model without the dead-time part (2.49), xO ∆ (k C 1jk) D A ∆ x x ∆ (k) C b ∆ x u(k d) ,
(3.88a)
y(k O C 1jk) D c ∆ x xO ∆ (k C 1jk) ,
(3.88b)
and they result in 3 3 2 dCn e1 C1 c∆ x A∆ y(k O C d C n e1 C 1jk) x 7 6c ∆ x A dCn e1 C2 7 6 y(k 7 ∆x 6 O C d C n e1 C 2jk)7 6 7 x ∆ (k) C 7D6 6 .. . 7 6 .. 4 5 4 5 . dCn e2 C1 y(k O C d C n e2 C 1jk) c∆ x A∆ x 2 dCn e1 dCn e1 1 dCn e1 2 c∆ x A∆ x b∆ x c∆ x A∆ b∆ x c∆ x A∆ x b∆ x x 6c A dCn e1 C1 b dCn e1 dCn e1 1 c∆ x A ∆ x b∆ x c∆ x A∆ b∆ x 6 ∆x ∆x ∆x x 6 .. .. .. 6 4 . . . dCn e2 1 dCn e2 2 e2 c ∆ x A dCn b c A b c A b∆ x ∆ x ∆ x ∆ x ∆ x ∆x ∆x ∆x 2 3 ∆ u(k d) 6 ∆ u(k d C 1)7 7 6 7 6 ∆ u(k d C 2) 7 . 6 6 7 . 7 6 . 4 5 . ∆ u(k C n e2 ) 2
.. .
3 0 0 7 7 .. 7 7 . 5 c∆ x b∆ x
(3.89)
The first term of the right side of (3.89) gives the free response. The free response depends on the current values of the state variables, which store the information about the past effects of the input signal in the system. The second term provides both free and forced response parts. Terms with past input signal belong to the free response, whereas terms with the current and future input signals belong to the forced response. Equation (3.89) can be written in condensed form as f Cp
yO D F x x ∆ C H x
f
∆u f Cp D F x x ∆ C H xp ∆u p C H x ∆u f , f Cp
(3.90)
where matrices F x and H x are defined by (3.89) and vector ∆u f Cp in (3.90) can be separated into ∆u p , the input value vector of past input values, and ∆u f , the vector of the current and future input values: T ∆u p D ∆ u(k d), ∆ u(k d C 1), . . . , ∆ u(k 1) , T ∆u f D ∆ u(k), ∆ u(k C 1), . . . , ∆ u(k C n e2 ) . Consequently, ∆u f Cp D
∆u p ∆u f
I
f Cp
Hx
h D H xp ,
f
Hx
i .
97
98
3 Predictive Equations of Linear SISO Models
Example 3.13 Predictive equations of a first-order dead-time process on the basis of the state space form of the CARIMA model Consider the system analyzed in Example 3.12. An integrating disturbance model is taken into account; thus, a CARIMA model describes the system with d D 1: y (k) D
b 1 q 1 1 v u (k) q d u(k) C 1 C a 1 q 1 (1 q 1 )(1 C a 1 q 1 )
or y (k) D (1 a 1 )y (k 1) C a 1 y (k 2) C b 1 ∆ u(k 1 d) C v u (k) D a ∆1 y (k 1) a ∆2 y (k 2) C b 1 ∆ u(k d 1) C v u (k) . The best prediction of the unmeasured noise term is zero. The state variables can be chosen as the output and its previous values and the previous values of the control increments, as shown in Example 2.10: T x ∆ (k) D y (k), y (k 1) . The parameters of the state space equations are a ∆1 a ∆2 1.8187 0.8187 A∆ x D D I 1 0 1 0 b ∆ x D [b 1 , 0] T D [0.1813, 0] T I
c ∆ x D [1, 0] .
The process output has to be predicted from n e1 D 1 till n e2 D 3 over the mathematical dead time d C 1 D 1 C 1 D 2, that is, the output signal has to be given from k C d C 1 C n e1 D k C 3 till k C d C 1 C n e2 D k C 5. According to (3.89), 2 3 3 2 y(k O C 3jk) c ∆ x A3∆ x y (k) 4 5 4 y(k 4 5 O C 4jk) D c ∆ x A ∆ x y (k 1) c ∆ x A5∆ x y(k O C 5jk) 3 2 c∆ x b∆ x 0 0 c ∆ x A2∆ x b ∆ x c ∆ x A ∆ x b ∆ x c∆ x b∆ x 0 5 C 4c ∆ x A3∆ x b ∆ x c ∆ x A2∆ x b ∆ x c ∆ x A ∆ x b ∆ x 3 4 2 c∆ x A ∆ x b∆ x c∆ x A ∆ x b∆ x c∆ x A ∆ x b∆ x c∆ x A ∆ x b∆ x c∆ x b∆ x 2 3 ∆ u(k 1) 6 ∆ u(k) 7 6 7 7 6 6 ∆ u(k C 1)7 . 4 ∆ u(k C 2)5 ∆ u(k C 3)
With the parameters of the system considered, 2 3 2 3 y(k O C 3jk) 3.0377 2.0377 y (k) 4 y(k 5 4 5 O C 4jk) D 3.487 2.487 y (k 1) y(k O C 5jk) 3.8548 2.8548 2
0.4513 C 40.5507 0.6322
0.3297 0.4513 0.5507
0.1813 0.3297 0.4513
0 0.1813 0.3297
3 ∆ u(k 1) 6 ∆ u(k) 7 0 7 6 6 ∆ u(k C 1)7 , 5 0 7 6 0.1813 4 ∆ u(k C 2)5 ∆ u(k C 3) 3
2
3.4 Summary
which is the same result as that obtained in Examples 3.3 and 3.4. The first term on the right side belongs to the free response. The second term includes terms of both the free and the forced response. By separating the vector ∆u f Cp into ∆u p D [∆ u(k 1)] and ∆u f D [∆ u(k), ∆ u(k C 1), ∆ u(k C 2), ∆ u(k C 3)] T , the terms related to ∆ u(k 1) belong to the free response and the further terms belong to the forced response. The prediction based on the state space representation is much simpler than the solution of the Diophantine equations. If the non-minimal-order form is used with a proper choice of the state variables as shifted values of the input and output signals, the prediction form of the output signal can easily be obtained.
3.4 Summary
Predictive control algorithms require predictive models which predict the system output values in a given future horizon on the basis of input and output information available till the current time point. In this chapter predictive equations of linear SISO models described in Chapter 2 were given. Nonparametric forms as the discrete-time weighting function and step response models are predictive by nature, and by describing the future output values on the basis of these models, the effects of the past and future inputs on the future output value can immediately be separated. A constant disturbance is supposed for the entire prediction horizon and it is calculated as the difference between the current output and the one-step-ahead output prediction. The parametric pulse-transfer model is nonpredictive, because to predict a future output value on the basis of the system equation, previous output values between the current and the future time point are also required. With predictive transformation the model equations can be transformed to such forms which use only measured output values available till the current time point. Different methods were given for predictive transformation. With repeated substitutions of the system model, predictive equations can be obtained. This method is tedious, especially with a long horizon, but for simple models such as the first-order or second-order systems, closed forms are derived. By solution of Diophantine equations, a systematic method was given for predictive transformation. Another method is the matrix calculation method, which is more straightforward. Predictive equations of state space models were also derived. The predicted output values can be calculated easily by means of a special form of a non-minimal-order state space representation. The effect of the disturbances on the predicted output was also considered through the disturbance models. The different methods for predictive transformation were illustrated through simple examples.
99
100
3 Predictive Equations of Linear SISO Models
The predicted output values in the prediction domain were expressed by (3.71) if the additive noise is nonautoregressive, that is, T(q 1 ) ¤ 1: yO D H f ∆u f C H p ∆u Fp C Fy Fp C H d i s t, f ∆v m, f C H d i s t,p ∆v Fm,p .
(3.91)
This contains the following components: forced response: yO f o r c D H f ∆u f I
(3.92)
free response: yO free D H p ∆u Fp C Fy Fp C H d i s t, f ∆v m, f C H d i s t,p ∆v Fm,p .
(3.93)
The predicted output values in the prediction domain were expressed by (3.70) if the additive noise is autoregressive, that is, T(q 1 ) D 1: yO D H f ∆u f C H p ∆u p C Fy p C H d i s t, f ∆v m, f C H d i s t,p ∆v m,p .
(3.94)
This contains the following components: forced response: yO f o r c D H f ∆u f I
(3.95)
free response: yO free D H p ∆u p C Fy p C H d i s t, f ∆v m, f C H d i s t,p ∆v m,p .
(3.96)
If the future measured disturbances ∆v m, f are known or can be forecasted, then the term H d i s t, f ∆v m, f belongs to the free response. Otherwise, the future disturbances cannot be considered, that is, ∆v m, f D 0. Accordingly, the predicted output values are in the prediction domain k C d C 1 C n e with n e D n e1 , . . . , n e2 : yO D yO f o r c C yO free D H f ∆u f C yO free .
(3.97)
For simplicity, matrix H f will be used without an upper index, H Hf I
(3.98)
thus, the forced response becomes yO f o r c D H∆u f
(3.99)
and the predicted output values are yO D H∆u f C yO free .
(3.100)
Equation (3.100) is the general form of output signal prediction of linear systems and it will be used later for deriving predictive control algorithms.
3.4 Summary
References 1 Åström, K.J. and Wittenmark, B. (1984) Computer Controlled Systems: Theory and Design, Prentice Hall, Englewood Cliffs, New Jersey, USA. 2 Camacho, E.F. and Bordons, C. (2004) Model Predictive Control, 2nd edn, Springer-Verlag, London. 3 Clarke, D.W. and Mohtadi, C. (1989) Properties of generalized predictive control. Automatica, 25(6), 859–875. 4 Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987) Generalized predictive control. Part I. the basic algorithm. Automatica, 23(2), 137–148. 5 Cutler, C.R. and Ramaker, B.C. (1980) Dynamic matrix control – a computer control algorithm, in Automatic Control Conference, San Francisco, USA. 6 Goodwin, G.C. and Sin, K.S. (1984) Adaptive Filtering, Prediction and Control,
7
8 9
10
Prentice Hall, Upper Saddle River, New Jersey, USA. Honc, D. and Haber, R. (2007) Application of noise filter with multivariable GPC, in Process Control Conference, Štrbské Pleso, Slovak Republic, and AT&P Journal PLUS 2, pp. 112–117. Johnson, M.A. and Moradi, M.H. (2005) PID Control, Springer-Verlag, Berlin. Richalet, J., Rault, A., Testud, J.L., and Papon, J. (1976) Algorithmic control of industrial processes, in 4th IFAC Symposium on Identification and System Parameter Estimation, Tbilisi, USSR, pp. 119– 1127. Rossiter, J.A. (2003) Model-Based Predictive Control: A Practical Approach, CRC Press, London.
101
103
4 Predictive On–Off Control On–off control is still widely used in industry, especially for discontinuous actuators, for example, compressors, steam turbines, and furnace burners, which can be controlled continuously only in a small working area and have to be switched fully off if the flow (of gas for compressors, steam for turbines, and gas and/or air for burners) falls below a lower limit. Also, devices driven by three-phase asynchronous motors, for example, many fans for air coolers of distillation columns or cooling towers of power plants, are switched on or off because of the behavior of these motors, which offer high power for a small machine with very good efficiency but do not ensure easy control of the engine speed. Speed control of such engines usually requires a frequency converter, but these devices are too expensive for such a simple equipment as a fan. But actuators are not the only reason for hard switching and thus for applying on–off controllers, some other processes also need hard switching, for example, some biological processes which are operated alternating between anaerobic (without oxygen) and aerobic (with oxygen) modes. Microorganisms can operate in both modes but prefer usually aerobic operation. Therefore, it is necessary to withdraw all oxygen from the tank to bring the microorganisms to their anaerobic operation. Two-level control is common with heat exchangers working with heat accumulators, thus mostly refrigerating plants for producing pure oxygen and nitrogen by liquidizing and distilling air. These plants use two temporally separated phases for the heat accumulators: they are driven either cold (with cold products) or warm (with warm feed). After a short overview of classical relay-characteristics-based on–off control, some methods of predictive on–off control are presented. These are as follows:
quadratic cost function minimization by a selection strategy, quadratic cost function minimization by a genetic algorithm, quasi continuous-time optimization, minimizing a limit-violation-time-point-dependent cost function, online start-up strategy.
The predictive on–off control algorithm was introduced by Hoffmann [6, 7] and Hoffmann and Wiesner [8] and was also used by Haber et al. [1]. Predictive threelevel temperature control including cooling and heating was recommended by Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
104
4 Predictive On–Off Control
Wiesner et al. [12] and Wiesner and Rake [13]. Additionally, the start-up control strategy for predictive on–off control was introduced by Hoffmann [7] and was also used by Haber et al. [1]. The online start-up strategy was recommended for on–off predictive control by Schmitz and Haber [9] and Schmitz et al. [10]. One of the major problems of predictive on–off control is the very high computational effort needed for the simulation of all possible manipulated variable sequences. This problem becomes even worse for industrial plants, as most of the processes in such plants are slow with long dead times, which therefore need long prediction horizons. Hence, the main task is to develop algorithms for predictive on–off control which allow one to use long horizons without raising the computational effort to unsolvable degrees. The different algorithms presented differ in the computational demand; therefore, the simulation times are compared. All the simulations were performed using a notebook with an Intel Pentium M CPU of 1.5 GHz, 512 MB of RAM, Windows XP, and the simulation software program MATLAB 6.5.
4.1 Classical On–Off Control by Means of Relay Characteristics
The general structure of on–off control (Figure 4.1) is the same as for continuous controllers. The difference is in the realization of the controller. The controller is a relay (without or with hysteresis) which switches the output of the relay on if the controlled signal is below the reference signal, thus if the control error is positive, and switches the output off if the control error is negative (or vice versa, depending on the process to be controlled). Figure 4.2 shows an exemplary control of a first-order dead-time process with static gain K p D 2, time constant T1 D 10 s, and dead time Td D 1 s. The reference value is y r D 1. The controller output is switched off or on if the controlled variable exceeds or falls below the set value. In the case shown, only the dead time of the process examined prevents the control from continuously switching the manipulated variable, because a first-order process acts without delay to the process input. The delay is caused by the dead time, if present. The switching frequency can be decreased by using different threshold values for switching on and off the manipulated signal. There are two ways for defining the same on–off gap control: yr
u
Figure 4.1 The structure of on–off control.
y
4.1 Classical On–Off Control by Means of Relay Characteristics
yr
y
u
t
Figure 4.2 Typical control with an on–off controller.
r,up
r,low
t
Figure 4.3 Typical on–off gap control.
Reference value with a hysteresis, which means an allowed difference from the reference value, thus a difference for the upper and lower switching points from the reference value. This is the typical implementation for on–off control around a working point (e.g., for temperature or pressure control). Upper and lower reference values, thus giving directly the two switching points (on and off) of the controller output. This is the typical implementation if the limits are known, for example, for governmental limits of exhaust gas from a furnace, or the water outflow of a wastewater treatment plant. A typical control result is shown in Figure 4.3 with an upper and a lower switching point, which is equivalent to a reference value of y r D 1 and a hysteresis of ∆y r D ˙0.1. The controller output is still changing at the points where the controlled variable crosses the reference values. The switching frequency is significantly reduced compared with the on–off set point control (Figure 4.2). However, the amplitude of the oscillation becomes much higher.
105
106
4 Predictive On–Off Control
(a)
step response
(b)
on-off control
Figure 4.4 Nonpredictive control of an oscillating process.
(a)
step response
(b)
on-off control
Figure 4.5 Nonpredictive control of an inverse-response process.
It is also possible to control oscillating processes (Figure 4.4 with G(s) D 2/(1 C s C s 2 )) or processes with an inverse-response (or non-minimumphase) step response (Figure 4.5 with G(s) D (2 s)/(1 C s C s 2 )). The overshoot becomes much bigger than with aperiodic processes, especially for the process with a non-minimum-phase step response. Control of unstable processes is usually difficult, and generally not possible with the usual experimental proportional plus integral (plus derivative) (PI(D)) tuning rules. In Figure 4.6 the controlled process is G(s) D 10/(1 10s). The controller output states of the prior cases u on D 1 and u off D 0 were modified to u on D 1 and u off D 1 to decrease the controlled variable in the case of an off-switched manipulated variable. It is observable that the control is unstable. The disadvantage of the big overshoot can be partly dealt with by selecting the reference signals in such a way that the real limits are kept. For example, if the real limits of a temperature control are 70 and 80 ı C and the typical overshoot with an
4.2 Predictive Set Point Control
(a)
step response
(b)
on-off control
Figure 4.6 Nonpredictive control of an unstable process.
on–off controller is ˙2 ı C, then the reference (switching) values of the on–off gap controller should be set to y r, low D 72 ı C and y r, up D 78 ı C. However, this technique works only without disturbances and only with linear processes because otherwise the overshoots could not be predicted correctly. Also this technique works only if the overshoot is smaller than the hysteresis, for example, if the overshoot in the previous example were ˙6 ı C, this technique would fail.
4.2 Predictive Set Point Control
Predictive on–off control uses the same technique as predictive control with a continuous actor; it simulates the process future behavior based on a process model, according to the assumed future manipulated variable sequence. Figure 4.7 demonstrates this technique. The cost function of a predictive on–off controller for set point control is similar to the cost function of a predictive controller with a continuous actor, shown in Section 1.4, but with the restrictions that the manipulated variable increments can only embrace the values of “1” or “0” according to the state of the controller output “on” or “off”, respectively. JD
n e2 X n e Dn e1
eO (k C d C 1 C n e jk)2 C λ u
nu X j D1
∆ u2 (k 1 C j ) ) min ∆u
(4.1)
with eO (k C d C 1 C n e jk) D y r (k C d C 1 C n e jk) y(k O C d C 1 C n e jk): (future, predicted) control error; ∆ u(k 1 C j ): (current and future) manipulated variable increment;
107
108
4 Predictive On–Off Control
(a) past and future manipulated variable
(b)
past and future controlled variable
Figure 4.7 Principle of predictive on–off control.
d: k: n e1 : n e2 : n u:
dead time relative to the sampling time; current discrete time; beginning of the control error horizon beyond the dead time; end of the control error horizon beyond the dead time; length of the manipulated variable horizon from the current time.
With predictive control using a continuous actor the predicted control error horizon n e2 n e1 C 1 is usually assumed to be much longer than the manipulated variable horizon n u . As the manipulated variable can take only two different values, it usually makes no sense to use a shorter horizon for the manipulated variable than for the control error. Generally, it makes no sense to keep the manipulated variable constant beyond the end of the manipulated variable horizon as an on–off controller switches almost permanently, otherwise the controlled signal would violate one of the control limits. Consequently, n e1 D 0 and n u D n e2 C1 or approximately n u D n e2 is usually chosen. Depending on how the cost function is minimized, one can distinguish different methods: a selection strategy; optimization, for example, by a genetic algorithm.
4.2.1 Cost Function Minimization by a Selection Strategy
The usual optimization algorithms do not operate with integer variables as optimization variables. The number of possibilities for the future manipulated variable sequences is, in contrast to the continuous actor case, finite: 2 n u . For the case of a manipulated variable sequence horizon length of n u D 4, all 16 possibilities are shown in Table 4.1 assuming u off D 0 and u on D 1. Because of the finite number of manipulated signal sequences and the lack of a usable optimizer, a predictive on– off controller usually computes all of the future controlled signals (depending on
4.2 Predictive Set Point Control Table 4.1 Possibilities for the manipulated signal sequence in the case of n u D 4.
nu
1
2
3
4
5
Manipulated variable possibility 6 7 8 9 10 11 12
13
14
15
16
1 2 3 4
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 0
0 0 1 0
1 0 1 0
0 0 1 1
1 0 1 1
0 1 1 1
1 1 1 1
0 1 1 0
1 1 1 0
0 0 0 1
1 0 0 1
0 1 0 1
1 1 0 1
2.53 1.24 0.51 1.05 1.67 0.51 0.78 0.12 0.78 0.51 1.67 1.05 0.51 1.24 2.53
Figure 4.8 All possibilities for the future controlled variable characteristics for n u D 4, n e1 D 0, and n e2 D 4 and the cost functions in discrete time k C 4. The smallest factor is displayed bold.
the future manipulated signal sequences) and selects the sequence which results in the smallest cost factor. This strategy is called selection strategy (see [6, 7]; [1]). These 16 possibilities for the manipulated signal sequence also result in 16 different future characteristics for the controlled variable. Figure 4.8 shows all these possibilities for a proportional process with static gain K p D 2 and three equal time constants T1 D 1 s including the corresponding sum of the quadratic control errors assuming λ u D 0 for a reference value of y r D 1 and a sampling time of ∆T D 2 s. The partial cost factors are also shown in Figure 4.8. As is seen from the direction of the controlled signal change in Figure 4.8, the optimal manipulated sequence was f0, 1, 0, 1g. For longer horizons the computation time rises exponentially because of the exponential growth of the number of possibilities for the manipulated variable sequences. The number of possibilities is 2 n e2 n e1 C1 and all these have to be computed. The problem with longer horizons is not only the computational effort
109
110
4 Predictive On–Off Control
but also the storage of the cost factors for each possibility to choose the smallest factor afterwards, for example, for a horizon length of n u D 30 there exist 230 D 1 073 741 824 109 possibilities. 4.2.2 Cost Function Minimization by a Genetic Algorithm
An alternative way to simulate the controlled variable with all possible manipulated variable sequences is a systematic search for the smallest control cost without calculating all possible cases. As the manipulated signal is not a real value, gradientbased methods cannot be used. Genetic algorithms 1) can work with both real and integer numbers. The first question for the application of a genetic optimizer for an on–off controller is the choice of the optimization variable. It is expected that the optimization variable is the manipulated variable sequence of “0” and “1” values, but in this case the optimization problem is of high order of n u D n e2 n e1 C 1. Another possibility is to enumerate all possible manipulated variable sequences and to treat the number of the sequence as the optimization variable. The most reasonable way of enumerating the manipulated variable sequence is to treat this sequence as a binary number and use the corresponding decimal number for the enumeration. Thus, it is possible to convert easily the number of the manipulated signal sequence to the sequence itself and vice versa. Table 4.1 shows the 16 possibilities for a manipulated signal sequence, all with length 4 and with the corresponding enumeration (which is equal to the decimal number, corresponding to the binary number of the sequence plus 1). When the minimization has finished, only the first binary place is converted and transformed to the controller output because of the receding horizon strategy. 4.2.3 Simulation and Comparison of the Predictive Set Point Control Algorithms
Example 4.1 Predictive on–off control of a first-order dead time process using the selection strategy Figure 4.9 shows the predictive control of the first-order process with static gain K p D 2, time constant T1 D 10 s, and dead time Td D 1 s with reference value y r D 1 using the selection strategy. The sampling time was ∆T D 0.1 s. The horizon length was chosen as 14 with n e1 D 0 and n e2 D 13 and the manipulated variable increment weighting factor was λ u D 106 .
1) The genetic algorithm is a heuristic random search method which can be used for the optimization of a complex, also a nonquadratic cost function depending on scalar and integer parameters. The genetic algorithm is a special type of the evolutionary methods.
4.2 Predictive Set Point Control
(a)
simulation interval 20 s
(b)
simulation interval 2 s
Figure 4.9 Predictive set point control by using the selection strategy.
(a)
simulation interval 20 s
(b)
simulation interval 2 s
Figure 4.10 Predictive set point control by using the genetic algorithm.
Figure 4.10 shows the set point control of the same process using the same controller parameters but the cost function was minimized by a genetic algorithm. In both cases the reference value is kept very well but with a very high switching frequency which could be decreased by a higher weighting factor for the manipulated variable increments. The reduction of the computation time is significant. The genetic algorithm needs 40 times fewer calculations than the selection strategy, as seen in Table 4.2.
Table 4.2 Control parameters.
Process
n e1
2e s 1C10 s
0
Quadratic cost function with the selection strategy n e2 nu λu ∆T [s] 13
4
1 106 0.1
tsim [s]
n e1
2627 0
Quadratic cost function with genetic optimization n e2 nu λu ∆T tsim [s] [s] 13
4
0.0
0.1
65.7
111
112
4 Predictive On–Off Control
Saving computation time is well seen if the genetic algorithm is used. The saving increases with the increase in length of the prediction horizon; this was seen in further simulations as well.
4.3 Predictive Start-Up Control at a Reference Signal Change
As explained before, the length of the horizons is limited and cannot be chosen as long as necessary in some cases. One widely applied case to meet the requirement for longer horizons is the start-up, for example, the heating up of a machine or the acceleration of a steam turbine. During the start-up of some equipment, such as an injection molding machine or a steam turbine, the set value has to be achieved as fast as possible without any overshoot. A predictive on–off controller usually demands a relatively long horizon. Long horizons require very high computational effort up to a nonfeasible control, as shown before. The problem can be handled with the so-called start-up strategy (see Haber et al. [1], Hoffmann [6]). During the start-up, the actor, for example, the heating device, is permanently switched on and the only question is the optimal point for switching off. Accordingly, the number of possible manipulated signal sequences is significantly reduced. For example, in the case of n u D 4, the number of possibilities is restricted to 5 (Table 4.3) instead of 16 for the original on–off control (Table 4.1). In general, the number of possible manipulated signal sequences is n u C 1 with the start-up strategy. For example, the number of possible manipulated signal sequences in the case of n u D 30 is only 31 instead of approximately 109 . The computation time of predictive (non-start-up) on–off control rises exponentially, whereas the computation time with the start-up strategy rises linearly with the length of the manipulated variable horizon, as shown in Figure 4.12. Figure 4.11 shows the possible sequences of the manipulated variable with a horizon length of n u D 4.
Table 4.3 Possibilities for the manipulated signal sequence in the case of n u D 4 with the start-up strategy.
nu
1
1 2 3 4
1 1 1 1
Possibilities 2 3 4 1 1 1 0
1 1 0 0
1 0 0 0
5 0 0 0 0
4.3 Predictive Start-Up Control at a Reference Signal Change
Figure 4.11 Possible sequences of the manipulated variable with a horizon length of n u D 4. 120
Computation time [s]
100 80 60 40 20 0 5
6
7 8 Length of the horizon
without start-up strategy
9
10
with start-up strategy
Figure 4.12 Computation time of predictive on–off control with and without the start-up strategy.
The algorithm of the start-up strategy is as follows: 1. The current time point is k. 2. Simulation of the controlled signal with the sequence of the manipulated variable: u(k) D u on and u(k C 1) D D u(k C n u 1) D u off . 3. If the controlled signal does not achieve the reference value in the control error horizon, then the first value of the manipulated variable sequence is used as the current manipulated variable. k ! k C 1. Go to item 2. 4. From the current time point let u(k) D u off . k ! k C 1. Figure 4.13 demonstrates the principle of the predictive on–off start-up strategy by simulation. In this example a horizon length of n u D 5 was used, but only three
113
114
4 Predictive On–Off Control
yr
0.7
y 0.6
yr 0.5 -1
0
1
2
3
4
k
5
-1
0
1
2
3
4
k
5
1
u 0.6 0.4 0.2 0
Figure 4.13 Selection of the optimal manipulated variable sequence with the start-up strategy.
possibilities are displayed. As is seen, the manipulated signal sequence with the solid line offers the best control behavior. The start-up strategy is used if the machine is switched on. If the controlled signal approaches the set value (e.g., at 80% of the reference value), the strategy is changed to the predictive on–off control with a constant reference signal. (A change exactly at the reference value would cause overshoot.) Example 4.2 Predictive on–off start-up and set point control of a third-order process A third-order linear process with static gain K p D 10 and time constants T1 D 10 s, T2 D 7.5 s, and T3 D 5 s is simulated with sampling time ∆T D 0.4 s. The parameters of the on–off controller were as follows: start of the control error prediction yr
1 y
y
0
0
20
40
60
t [s]
100
0
20
40
60
t [s]
100
1 u
0
Figure 4.14 Start-up and set point control with a changeover at 95% of the reference value.
4.3 Predictive Start-Up Control at a Reference Signal Change
horizon n e1 D 0, end of the control error prediction horizon with the start-up strategy n e2 D 40 and with the set point control n e2 D 7, length of the manipulated variable prediction horizon with the start-up strategy n u D 40 and with the set point control strategy n u D 7. Switching from the start-up control to the on–off control with a constant reference signal was accomplished when the controlled value reached 95% of the reference value. As Figure 4.14 shows, the transition from the start-up to the set point control is optimal, that is, fast without overshoot.
Example 4.3 Predictive on–off start-up and constant set point control of a thirdorder process with too early changeover The same process as in Example 4.2 was controlled with almost the same controller parameters except that the switching from the start-up control to the constant set point control was accomplished when the controlled value reached 80% of the reference value. As Figure 4.15 shows, there is an overshoot of about 18% because the changeover occurred too early.
y 1
yr y
0
0
20
40
60
t [s]
100
0
20
40
60
t [s]
100
1 u
0
Figure 4.15 Start-up and set point control with a changeover at 80% of the reference value.
Example 4.4 Predictive on–off start-up and constant set point control of a thirdorder process with reduced prediction horizons during the start-up The same process as in Example 4.2 was controlled with almost the same controller parameters as in Example 4.2 except that the lengths of both prediction horizons during the start-up were reduced from n u D n e2 D 40 to n u D n e2 D 15. As is seen in Figure 4.16, there is a big overshoot of about 45% because of the too short horizons.
115
116
4 Predictive On–Off Control y yr
1
y 0.5 0
0
20
40
60
t [s]
100
0
20
40
60
t [s]
100
1 u
0
Figure 4.16 Start-up and set point control with reduced prediction horizons during the start-up.
y 1
yr y
0
0
20
40
60
t [s]
100
0
20
40
60
t [s]
100
1 u
0
Figure 4.17 Start-up and constant set point control with increased prediction horizons during the set point control.
Example 4.5 Predictive on–off start-up and set point control of a third-order process with increased manipulated variable horizons during the set point control The same process as in Example 4.2 was controlled with almost the same controller parameters as in Example 4.2 except that the lengths of both prediction horizons during the constant set point control were increased from n e2 D n u D 7 to n e2 D n u D 15. This change has no effect on the control behavior as the horizons were selected already in Example 4.4 to be long enough; compare Figures 4.14 and 4.17.
4.3 Predictive Start-Up Control at a Reference Signal Change yr
1
y
y
0 0 1
20
40
60
t [s]
100
20
40
60
t [s]
100
u
0 0
Figure 4.18 Start-up and constant set point control with doubling of the sampling time.
Example 4.6 Predictive on–off start-up and set point control of a third-order process with a longer sampling time The same process as in Example 4.2 was controlled with almost the same controller as in Example 4.2 except that the controller sampling time was doubled to ∆T D 0.8 s. This change has only a small effect on the control behavior – the ripples became bigger during the constant set point control; see Figure 4.18.
Example 4.7 Predictive on–off start-up and set point control of a third-order process with a lower level of the manipulated signal The same process as in Example 4.2 was controlled with almost the same controller as in Example 4.2 except that the upper level of the manipulated signal was reduced yr
1 y
0
y
0
20
40
60
t [s]
0
20
40
60
t [s]
100
1 u
0 100
Figure 4.19 Start-up and constant set point control with reduction of the upper level of the manipulated signal.
117
118
4 Predictive On–Off Control
from u o n D 1.0 to u o n D 0.2. As expected, the ripples during the constant set point control became much less; compare Figures 4.19 and 4.14.
4.4 Predictive Gap Control
As an on–off controller cannot keep the reference value exactly, it is better to define an upper and a lower boundary value and the controlled signal has to be within these boundaries. Five different control strategies will be presented:
quadratic cost function minimization by a selection strategy, quadratic cost function minimization using a genetic algorithm, quasi continuous-time optimization, minimizing a limit-violation-time-point-dependent cost function, an online start-up strategy.
4.4.1 Quadratic Cost Function Minimization by the Selection Strategy or the Genetic Algorithm
The control error is modified in the cost function of the prediction control as shown in (4.2): JD
n e2 X
eO (k C d C 1 C n e jk)2 C λ u
n e Dn e1
nu X j D1
∆ u(k 1 C j )2 ) min , ∆u f
with eO (k C d C 1 C j jk) D 8 ˆ O C d C 1 C n e jk) ˆ < y r,u p y(k 0 ˆ ˆ :y
r,l o w
y(k O C d C 1 C n e jk)
for
y(k O C d C 1 C n e jk) > y r,u p y r,l o w y(k O C d C 1 C n e jk) y r,u p .
for
y(k O C d C 1 C n e jk) < y r,l o w
for
(4.2) The only difference from the cost function of set point control (4.1) is that the cost function of the control error is zero if the controlled variable is between the upper and the lower reference values. Two different optimization strategies, the selection strategy and the genetic algorithm were used. As mentioned before, according to the selection strategy all possible future manipulated variable sequences are simulated and one is selected which results in the lowest cost function. This algorithm has no convergence problem but requires a lot of calculations and is consequently very slow. For longer predic-
4.4 Predictive Gap Control
tion lengths the genetic algorithm is more effective than the selection strategy, as seen already with the set value control. (On the other hand, the genetic algorithm is usually slower in the case of continuous actors than other optimization methods, such as quadratic programming, which can not be used with on–off control.) In the simulations the genetic optimization algorithm of Sekaj [11] was used. 4.4.2 Quasi Continuous-Time Optimization
At any time point the question is whether it is necessary to change the state of the current manipulated variable or not. Alternatively, one can ask when the manipulated variable should be switched the first time. It would be relatively easy to search for this time point by using an optimization algorithm for real numbers if continuous-time and not discrete-time control had been applied. The realization of this controller implies some special techniques as a common iterative optimizer is not able to handle “quasi integer” optimizing variables. The controller runs in discrete time and the manipulated signal is allowed to change only at discrete-time points (assuming equidistant sampling). A continuous-time optimizer which tries to optimize such a discrete-time optimizing variable would fail because the optimizing algorithm uses smaller and smaller steps during the iteration process. If these steps become smaller than the sampling time of the controller, the cost factor does not change any more and the optimizer assumes that a minimum has been reached. Thus, a controller which optimizes a signal at discrete-time points but uses a continuous-time optimization variable has to implement some special handling of the variables. The controller optimizes only one single (scalar) variable – the time when the current controller output should be changed. This time point can be at any arbitrary point in the given prediction horizon. If this switching time is shifted to the nearest discrete-time point, then the effect would be that small changes in the predicted controller output would have no effect to the control behavior (because the controller output, forced to discrete-time points, will mostly be the same for small changes in the switching time – see Figure 4.20). The solution to this problem is to add an additional (semidiscrete) sampling step to the (future) output of the controller at the same time when the switching occurs, as shown in Figure 4.21a [5]. Then the simulation of the process output has to be performed for every point of this “semi-discrete-time” manipulated variable horizon. The process model used for the simulation is resampled according to the new sampling time in the neighborhood of the switching time: ∆T1 between the last ordinary sampling point and the additional sampling point, and ∆T2 between the additional sampling point and the next ordinary sampling point after the additional point (see Figure 4.21a). The prediction is then performed including this additional sampling point. For the subsequent computation of the cost factor, the additional sampling point has to be removed from the prediction to keep the absolute number of sampling points in the cost function constant. When the continuous-time optimizer has found the optimal switching time for the controller, this time is al-
119
120
4 Predictive On–Off Control
u
k
k+1
k+2
k+3
k+4
k+5
k+6
k+7
k
k+1
k+2
k+3
k+4
k+5
k+6
k+7
y
Figure 4.20 False prediction with a switching time forced to the nearest sampling point. ∆ ∆
y
∆
∆
u
∆ ∆
k
(a)
k+1
k+2
∆
k+3
∆
k+4
k+5
manipulated variable
k+6
k+7
k
(b)
k+1
k+2
k+3
k+4
k+5
k+6
k+7
controlled variable
Figure 4.21 Semi-discrete-time sequence containing one additional (non-discrete-time) sampling point representing the switching of the controller output.
ways forced to the lower (closer to the current time) discrete sampling time of the controller, otherwise a violation of the given limit may occur. Thus, if the optimal switching time found by the controller is less than the next sampling time, the controller always switches the manipulated variable in this sampling step. Example 4.8 Predictive on–off gap control of a first-order process The simple first-order process with static gain K p D 2 and time constant T1 D 10 s is controlled by a sampling time of ∆Tc D 0.1 s. The process is simulated by a sampling time of ∆Ts D 0.1 s. The limits of the controlled variable are y low D y r,low D 1 0.1 D 0.9 and y up D y r,up D 1 C 0.1 D 1.1, and the levels of the controller outputs are u on D 1.0 and u off D 0.0. Figure 4.22a shows the gap control applying the discrete-time optimization. There was no difference between the control behaviors of the two optimization strategies (selection strategy and genetic algorithm) for the quadratic cost function (4.2). The same process was controlled using the quasi continuous-time op-
4.4 Predictive Gap Control y
y
r,up
r,up
r,low
r,low
t s
t s
(a)
discrete-time optimization
(b) quasi continuous-time optimization
Figure 4.22 Predictive gap control.
timization, Figure 4.22b shows the simulation. The control behavior is very similar in the two cases; however, with the second algorithm the controlled variable is sometimes switched a bit earlier and the switching frequency is a bit larger than necessary. This is the consequence of the fact that a quasi continuous-time optimization and not a real continuous-time optimization was performed.
4.4.3 Minimizing a Limit-Violation-Time-Point-Dependent Cost Function
An alternative nonquadratic cost function is defined which tries to shift the time points of the first violation of the reference signal gap by the predicted controlled signal and of the first change of the manipulated variable far into the future. The new cost function is shown in (4.3): J D Q viol C λ u Q ∆ u .
(4.3)
The first term, Q viol , considers the controlled variable. Each violation of the given upper and lower reference values produces a number. The sum of all these values increases the cost function – this is the same effect as with the quadratic criterion shown in (4.2). The difference is that the quadratic control errors are not summarized, but an integer value is produced which is higher the closer the violation is to the current time point. In the special case, a violation at the very beginning of the control error horizon n y,viol D n e1 produces a value of n e2 n e1 C 1, whereas a violation at the end of the horizon n y,viol D n e2 produces a value of 1. The function which is able to accomplish this strategy is given in (4.4): Q viol D n e2 X n y,viol Dn e1
8 ˆ ˆ < n e2 C 1 n y,viol n e2 C 1 n y,viol
ˆ ˆ :0
for y(k O C d C 1 C n y,viol jk) < y r,low for y(k O C d C 1 C n y,viol jk) > y r,u p
.
for y r,low y(k O C d C 1 C n y,v i o l jk) y r,up (4.4)
121
122 y 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1
(a)
4 Predictive On–Off Control
y > yr,up → weighting*1 y < yr,up → weighting*0
0
5
10
15
20
25
ne2=30
k
y 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1
3 n -n -1 ne2-ne1e2 e1 ne2-ne1+1 0
5
10
(b)
activation
2 1
15
20
25
ne2=30
k
weighting
Figure 4.23 Activation and weighting of the violations with the limit-violation-time-pointdependent cost function for predictive on–off gap control.
ne2-ny,viol +1 31 21 11 1
0
5
10
15
20
25 ne2=30 ny,viol
Figure 4.24 Result of the violations with the limit-violation-time-point-dependent cost function for predictive on–off gap control.
Figure 4.23a shows an example of a prediction horizon of a predictive on–off control with some violations of the upper reference value in the second half of the horizon. The violating points are multiplied by 1, whereas the nonviolating points are multiplied by 0. The weighting of the violating points is shown in Figure 4.23b. It can be seen that the nearer the considered point is to the end of the horizon, the lower is its weighting factor. Figure 4.24 shows the linear alignment of the weighting values over the prediction horizon from n e2 n e1 C 1 at the beginning of the horizon till 1 at the end of the horizon as a thin, dashed line and the result of the above example as a thick, solid line. The value of Q v i o l is the sum of all single points of the curve within the allowed limits, shown in Figure 4.24, that is, the area under this curve. The second term in the cost function (4.3) takes the changes in the manipulated variable into account. The difference from the cost function with the quadratic criterion is that here the cost function contains one value, the discrete time of the first change of the manipulated variable in the future. That means the closer the first change of the manipulated variable is to the current time, the higher is the value in the cost function. Because of the fact that with predictive on–off control the manipulated variable horizon has the same length as the control error horizon, the weighting of the changes of the manipulated variable starts at n u for a change
4.4 Predictive Gap Control 1
nu
Q∆u
nu
Maximum value added to cost function
30 u
20
10 0
nu nu 0 5
10
(a)
15
20
25
1
nu =30
0
5
10
(b)
weighting
15
20
25
nu =30 n∆u, const
result
Figure 4.25 Handling of the changes of the manipulated variable with the limit-violation-timepoint-dependent cost function.
at the very beginning of the horizon and ends with 1 at the end of the horizon. Equation (4.5) shows the mathematical relation of this behavior:
Q∆u
8 ˆ nu ˆ ˆ ˆ ˆ ˆ 1 n ˆ ˆ u ˆ ˆ . ˆ .. ˆ ˆ ˆ ˆ ˆ
if u(k) ¤ u(k C 1), if u(k) D u(k C 1) ¤ u(k C 2) if u(k) D D u(k C n ∆ u,c o n s t ) ¤ u(k C n ∆ u,c o n s t C 1)
.
(4.5)
if u(k) D D u(k C n u 2) ¤ u(k C n u 1)
The meaning of this function is shown in Figure 4.25a for the case of a permanent change of the manipulated variable at every point of the prediction horizon. As explained, the first possible change is weighted with the value of n u , the second possible change with the value of n u 1, and so on till 1 for the last point. Figure 4.25b shows the linear dependence of the factors on the distance to the end of the horizon. Only the first, biggest value is taken into account in the cost function. Q∆u
1
30
u 20 nu
nu
Maximum value added to cost function
10 nu
0 0
(a)
5
10
15
20
weighting
25
nu =30
k
1
(b)
0
5
10
15
20
25
nu=30 n∆u, const
result
Figure 4.26 Handling of the changes of the manipulated variable with the limit-violation-timepoint-dependent cost function.
123
124
4 Predictive On–Off Control
In the case when the first change n ∆ u,c o n s t of the manipulated variable occurs later in the prediction horizon, Figure 4.26a shows the manipulated variable sequence and Figure 4.26b the resulting weighting factor. As is seen, the value which is taken into account in the cost function is significantly lower than in the previous example (see Figure 4.25) because the first change is further in the future. 4.4.4 Online Start-Up Strategy
Controllers with genetic optimization are able to reduce the computational effort of predictive on–off control in cases of long horizons significantly, as shown in the previous sections. But in the case of even longer horizons, n e2 D 40 or more, the computational effort with the genetic optimization controllers is also very high and might prevent the usage of such controllers in industrial environments. Therefore, the need for a completely different predictive on–off controller which is able to handle horizons of nearly arbitrary lengths emerges. The suggested solution for such a controller is the start-up strategy, introduced already, but will now be applied during set range control (see [10]; [9]). The basic idea of this application is that a controller does not try to find an optimal manipulated signal sequence for the whole future control horizon, but tries only to find the optimal point for the change of the current state of the controller output, starting at the current time, with the aim to prevent any violation of the reference value. As an on–off controller following the start-up strategy has a significantly lower number of possibilities for the manipulated signal sequences (for the start-up strategy only n e , instead of 2 n e ), the computational effort is also expected to be significantly lower. The start-up control strategy for predictive on–off control was introduced by Hoffmann [6, 7]. However, he applied it only for the start-up phase and not to compensate for the disturbances during the constant set point control. This idea was extended to the predictive on–off gap control by Schmitz et al. [10] and was used for the simulation of control of nonlinear processes and of a wastewater treatment plant, for example, in Schmitz and Haber [9] and Haber et al. [3]. The online start-up strategy does not consider a weighting of the manipulated signal in a cost function, for example, in (4.2), but searches for a gap control with as small a switching frequency as possible. First, the controlled signal is simulated during the prediction horizon and the current manipulated variable is kept unchanged. If no reference value is violated, no further simulations are needed – the controller can simply keep the current state of the manipulated variable. Figure 4.27a demonstrates the case when the controller will be able to keep all the limits without changing the current controller output state. If the upper or the lower reference value is violated for the case when the controller does not change its current output state, a suitable time point has to be searched for where the controller output has to change within the prediction horizon. The iterative search starts with a change of the current controller output at the
4.4 Predictive Gap Control 1.5 y
1.5 y
yr,up
yr,up y
y
1
1 yr,low
0.5 2 u 1.5
yr,low
0.5
-2
0
2
4
6
8
k 10
1
1 0.5
0 -2
-2
0
2
4
6
8
k 10
-2
0
2
4
6
8
k 10
2 u 1.5
0.5
(a)
125
0
2
4
6
8
k 10
0
(b) the controller has to change the current
simulation without any change of the current controller output
controller output only in a future sampling step
1.5 y
yr,up y
1
yr,low 0.5 -2 2 u 1.5
0
2
4
6
8
k
10
0
2
4
6
8
k
10
1 0.5 0 -2
(c)
the controller is not able to prevent a violation of the upper limit if it changes the controller output in the next (k=1) sampling step Figure 4.27 Operating mode of the online start-up strategy.
very end of the prediction horizon. If the controller is able to keep the limits with this change of the manipulated variable in a future sampling step, there is no need for a change in the current sampling step; thus, the controller keeps the current output state. If the controller is not able to keep the limits with a change of the manipulated variable at the last point of the prediction horizon, then a second simulation is performed with a change at the penultimate time point of the horizon and the algorithm checks if the limits can be kept. If the limits cannot be kept, the controller proceeds to a third simulation with a change of the manipulated variable at the third-last point of the horizon and so on. Figure 4.27b demonstrates these cases. If the controller is not able to prevent a violation of the upper or the lower limit for the case when the manipulated variable is switched (on or off) in the next sampling step, then the controller has to change the current controller output in the current sampling step. Figure 4.27c demonstrates the case when the controller is not able to prevent a violation of the upper limit in the first step after the current time (thus the controller has to change the controller output state in the current sampling step).
126
4 Predictive On–Off Control
With the online start-up strategy the computational effort could be extremely decreased to a small fraction of the computational demand of the other predictive on–off control algorithms presented. 4.4.5 Comparison of the Predictive On–Off Gap Control Algorithms
Simulation of the quasi continuous-time optimization has been already presented in this section. In the sequel the other four methods are simulated. Thus, five different, linear processes – first-order dead time, third-order process, oscillating second-order process, inverse response (non-minimum-phase) process, and unstable process – were simulated with four methods:
quadratic cost function minimization by the selection strategy, quadratic cost function minimization using the genetic algorithm, minimizing a limit-violation-time-point-dependent cost function, online start-up strategy.
The controller parameters and the simulation times are summarized in Table 4.4. In all cases the limits of the controlled variable are y r,low D 1 0.1 D 0.9 and y r,up D 1 C 0.1 D 1.1. The levels of the controller outputs were u on D 1.0 and u off D 0.0 if stable processes were simulated. The sampling time was ∆T D 0.1 s if no another value is mentioned. The genetic algorithm of Sekaj [11] was applied. Example 4.9 Predictive on–off gap control of a first-order process with dead time The first-order process with static gain K p D 2, time constant T1 D 10 s, and dead time Td D 1 s was controlled. Figure 4.28 shows the control with the four minimization strategies. All control algorithms gave the same results. According to all four methods, the limits are kept without any violation and with a small switching frequency.
Example 4.10 Predictive on–off gap control of a third-order process The third-order process with static gain K p D 2 and three equal time constants T1 D 0.333 s was controlled. Figure 4.29 shows the same control result with the four minimization strategies. According to all four methods, the limits are kept without any violation and with a small switching frequency.
4.4 Predictive Gap Control
Figure 4.28 Predictive gap control of a first-order dead-time process.
Figure 4.29 Predictive gap control of a third-order process.
Example 4.11 Predictive on–off gap control of an oscillating second-order process The second-order oscillating process with transfer function G(s) D 2/(1 C s C s 2 ) was controlled. Figure 4.30 shows the control with four minimization strategies. The genetic controller was not able to control this process in an acceptable way – the controller produced more oscillations than expected and also some violations of the limits. Unfortunately, the genetic optimizer was terminated too early in this case, presumably the cost factor decreased too slowly for this process. The control with the other three methods, on the other hand, produced the same fast and reliable control behavior.
Example 4.12 Predictive on–off gap control of a second-order process with inverse response The second-order process with inverse response with transfer function G(s) D (2 s)/(1 C 2s C s 2 ) was controlled. Figure 4.31 shows the control with four minimization strategies. According to all four methods, the limits are kept without any violation and with a small switching frequency.
127
128
4 Predictive On–Off Control
(a) selection strategy or limit-violation-
(b)
genetic algorithm
time-point-dependent or online start-up Figure 4.30 Predictive gap control of a second-order oscillating process.
(a)
selection strategy
(b) genetic algorithm or limit-violationtime-point-dependent or online start-up
Figure 4.31 Predictive gap control of a second-order process with inverse response.
Example 4.13 Predictive on–off gap control of a first-order unstable process The first-order unstable process with transfer function G(s) D 1/(1 10s) was controlled. Because of the unstable process behavior, the controller output levels were u on D C1.0 and u off D 1.0. Figure 4.32 shows the control with all four minimization strategies. All controllers were able to control this fast, unstable process without any violations of the limits and with minimum changes in the manipulated variable. The selection strategy failed with the sampling time used in Examples 4.9–4.13; therefore, in this case ∆T D 0.01 s was used. That is why the simulation interval in Figure 4.32a differs from the other cases. Figure 4.33 shows the computational effort of the different predictive on–off gap control algorithms versus the length of the prediction horizon for the aperiodic, third-order process of Example 4.10. The relations were very similar for the other stable simulated processes.
2e s 1C10s 2 (1C 13 s)3 2 1CsCs 2 2s (1C2sCs 2 ) 10 110s
Process
2e s 1C10s 2 (1C 13 s)3 2 1CsCs 2 2s (1C2sCs 2 ) 10 110s
Process
7 7
3
0 0
0
n e1 0 0
4 4
4 4 4 101
106 3 103 1.0 0.1
0.1 0.1
4
8 8
0.1 0.1 0.01
1 103 3 103 3 104
3 4 3 102 0.1 Limit-violation-time-point-dependent cost function with genetic optimization n e2 nu λu ∆T [s] 13 4 1 106 0.1 3 4 3 103 0.1
3 3
0 0
0
13 3
Quadratic cost function with the selection strategy n e2 nu λu ∆T [s]
0 0
n e1
89.5
0
0 0
n e1 0 0
tcomp [s] 67.1 9.23 13.1 13.7
0
0 0
0 0
n e1
9.96
10.4 10.4
2684 1.29
tcomp [s]
Table 4.4 Control parameters for the simulation examples with predictive on–off gap controllers.
8 8
4 4
0.1 0.1 0.1 0.1
106 3 102 103 3 103
3
7 7
4
8 8
–
– –
0.01
0.1 0.1
4 3 104 0.01 Predictive on–off controller following the online start-up strategy n e2 nu λu ∆T [s] 19 10 – 0.1 3 4 – 0.01 3
7 7
13 3
Quadratic cost function with genetic optimization n e2 nu λu ∆T [s]
1.38
0.53 0.56
tcomp [s] 0.77 0.45
96.0
16.0 15.6
69.5 10.0
tcomp [s]
4.4 Predictive Gap Control 129
4 Predictive On–Off Control
(a)
(b) genetic algorithm or limit-violation-
selection strategy
time-point-dependent or online start-up Figure 4.32 Predictive gap control of a first-order unstable process.
80 92.7
70 60 Computation time [s]
130
88.8
Selection strategy with quadratic cost function
50
197.9 205.9
427.1 448.1
Selection strategy with limit-violation-time-pointdependent cost function
40
Genetic optimization with quadratic criterion
30 Genetic optimization with
20 limit-violation-time-pointdependent cost function on-line start-up strategy
10 0 0
2
4
6
8
10
12
Horizon length Figure 4.33 Computational effort of the predictive on–off gap controllers as a function of the horizon length.
Whereas the computational effort of the conventional predictive on–off controller (both in the case of the quadratic cost function and in the case of the limit-violation-time-point-dependent cost function) rises exponentially with the horizon length, the computational effort of the controllers using genetic optimization rises nearly linearly. Furthermore, the controllers with genetic optimization and with the limit-violation-time-point-dependent cost function offer slightly faster
4.5 Case Study: Temperature Control of an Electrical Heat Exchanger Table 4.5 Comparison of the predictive on–off gap control algorithms. Rise of computational effort with the length of the horizon
Horizon lengths for which it is applicable
Selection strategy with a quadratic cost function
Exponential
Short
Selection strategy with a limit-violation-time-point-dependent cost function
Exponential
Short
Genetic optimization with a quadratic criterion
Linear
Medium
Genetic optimization with a limit-violation-time-pointdependent cost function
Linear
Medium
Online start-up strategy
Linear
Long
Quasi continuous-time optimization
Linear
Long
computation. Finally, the online start-up controller requires very low, nearly irrelevant computational demand, which rises linearly with the prediction horizon length. Table 4.5 summarizes the properties of the algorithms. The computation time tcomp in Table 4.4 is the time duration of the simulation of tsim D 20 s, shown in Figures 4.29–4.32.
4.5 Case Study: Temperature Control of an Electrical Heat Exchanger
The heat exchanger is the feed heater of the distillation column in the Department of Automation and Applied Informatics of Budapest University of Technology and Economics. A photograph of it and the scheme for the temperature control are shown in Figure 4.34, described also by Haber and Keviczky [2]. The temperature of the water outflow #(t) depends on the inflow m(t), P the inflow temperature #0 (t), and the electrical heating power P(t). The heat balance equation is shown in (4.6) with m(t)c P p ∆#(t) C αV c p
d#(t) D P(t) , dt
where ∆#(t) D #(t) #0 (t). The variables in (4.6) are:
(4.6)
131
132
4 Predictive On–Off Control
m(t) ϑ(t)
cold water m(t) ϑ0(t) water inflow
hot water
water outflow
P(t) electrical heating
controller
(a)
photo
(b)
control scheme
Figure 4.34 Electrically heated heat exchanger.
m P [kg/s]: flow rate through the heat exchanger, ∆# [ı C]: temperature difference between the water inflow and outflow, P [kW]: electrical heating power. Some of the parameters are physical constants of the medium or the apparatus, whereas others were estimated: V: cp: : α:
volume of the heat exchanger, V D 2.75 dm3 , heat capacity of water and is assumed to be constant, c p D 4.18 kWs/(kg ı C), density of water and is also assumed to be constant, D 1.00 kg/dm3 , correction term, which was estimated as α D 0.903.
The heat exchanger has a nonlinear characteristic as the heating speed depends on the water flow. With increasing flow the process becomes slower, that is, the time constant becomes larger. The temperature was controlled at three different working points, which means with three different flow rates m P D [50, 110, 170] kg/h. The temperature difference between the inlet and the outlet temperature should be kept within the limits # r,u p D 5 ı C and # r,l o w D 10 ı C. The heating power is P D 2 kW. The predictive on–off controller was simulated by the online start-up strategy with sampling time ∆T D 0.1 s. The controller parameters were n e1 D 0 and n e2 D 13 and the manipulated variable increment weighting factor was λ u D 106 . The conventional on–off controller is shown in Figure 4.35a. The behavior of the predictive on–off controller following the online start-up strategy is presented in Figure 4.35b [4]. As is seen, only the predictive on–off controller keeps the temperature within the prescribed lower and upper limits.
4.6 Summary
(a)
conventional on-off control
(b)
133
predictive on-off control
Figure 4.35 Temperature control of the electrically heated heat exchanger at three different operating points.
4.6 Summary
Predictive on–off control offers an adequate method for controlling processes with discontinuous (usually switched either on or off) actors, mostly fans, compressors, burners, and so on. Whereas the conventional on–off control usually produces big overshoot, especially in the case of processes which are difficult to control, for example, nonminimum-phase, oscillating, or unstable processes or processes with dead time, the predictive on–off control is able to prevent violations of the given limits. But the computational effort of the conventional on–off control is usually extremely high, especially for long prediction horizons. It was shown that predictive start-up control requires much less computational effort than any numerical optimization of a general (e.g., quadratic) cost function. As a rule of thumb, the online start-up strategy can be applied for predictive gap control till n e2 200 (or even more), whereas the conventional predictive on–off control algorithm usually fails as early as horizon lengths of n e2 10, and the controllers with genetic optimization can be implemented until horizon lengths of n e2 30. Of course, these values depend on the complexity of the process model used – the horizon lengths mentioned are valid for polynomial discrete-time models described by a pulse-transfer function. It is recommended to use predictive (off-line) start-up control at the start of the heating (or cooling) and switch to the online start-up strategy before the set value is reached to keep the controlled variable within the lower and upper limits around the reference signal.
134
4 Predictive On–Off Control
References 1 Haber, R., Jörgl, H.P., Vecsei, T., and Haider-Schmid, E. (1991) Adaptive and predictive strategies for extruder temperature control, in 9th IFAC/IFORS Symposium on Identification and System Parameter Estimation, Budapest, Hungary. 2 Haber, R. and Keviczky, L. (1999) Nonlinear System Identification – Input-Output Modeling Approach. Volume 2: Nonlinear System Structure Identification, Kluwer Academic Publishers, Dordrecht, The Netherlands. 3 Haber, R., Lang, F., and Schmitz, U. (2004) Predictive control of nitrogen in waste water plants with three variable zones, in 6th International Process Control Conference, Kouty nad Desnou, Czech Republic. 4 Haber, R. and Schmitz, U. (2006) Nonlinear predicitve control of a heat exchanger model, in Workshop on System Identification and Control Systems, Budapest, Hungary, pp. 81–97. 5 Haber, R., Schmitz, U., and Bars, R. (2007) Optimization strategies for predictive on-off control. International Journal of Tomography and Statistics, 5(W07), 44–49. 6 Hoffmann, U. (1984) Entwurf und Erprobung einer adaptiven Zweipunktregelung (Design and test of an adaptive on-off controller), Ph.D. dissertation, University RWTH Aachen, Faculty of Mechanical Engineering. 7 Hoffmann, U. (1987) Eine adaptive Zweipunktregelung für Prozesse mit schaltenden Stellgliedern (A self-tuning
8
9
10
11
12
13
on-off controller for processes with switching actuators). Automatisierungstechnik, 35(5), 184–191. Hoffmann, U. and Wiesner, N. (1987) Einsatz eines adaptiven schaltenden Reglers an Temperaturregelstrecken (Application of an adaptive controller for thermal processes with discontinuous actuators). Automatisierungstechnische Praxis, 29(1), 23–28. Schmitz, U. and Haber, R. (2003) A predictive on-off controller for nonlinear processes, in 14th International Process Control Conference, Strbské Pleso, High Tatra, Slovak Republic, pp. 136–143. Schmitz, U., Haber, R., and Bars, R. (2003) A performance optimized predictive on-off controller for linear models, in International Carpathian Control Conference, Tatranská Lomnica, Slovak Republic, pp. 385–388. Sekaj, I. (1984) Genetic algorithms with changing criterion functions, in Intelligent Technologies – Theory and Applications (eds P. Sincak, J. Vascak, V. Kvasnicka, and J. Pospichal), IOS Press, pp. 183–188. Wiesner, N., Hoffmann, U., and Rake, H. (1986) On adaptive control of thermal processes by a predictive 3-levelcontroller, in 2nd IFAC Workshop on Adaptive System in Control Signal Processing, Lund, Sweden, pp. 405– 410. Wiesner, N. and Rake, H. (1987) Adaptive predictive 3-level-control of processes with two actuators, in IFAC World Congress, Munich, Germany, pp. 250– 255.
135
5 Generalized Predictive Control of Linear SISO Processes A possible criterion for predictive control is to minimize a quadratic cost function of the control error and the manipulated variable increments during the corresponding prediction horizons. This formulation of predictive control was introduced by Clarke et al. [9] and is called Generalized Predictive Control (GPC). Using a quadratic criterion in the unconstrained case leads to an analytical solution. In practical cases constraints have to be considered; however, an analytical solution shows several features of the algorithm more clearly. This section deals with the basic GPC algorithm, and shows that this is equivalent to a linear control algorithm described by a difference equation. Also feed-forward disturbance compensation is considered. The control behavior depends on the choice of the controller parameters. There are some recommended initial values, and manual and automatic tuning rules. Two techniques (using blocking and coincidence points) help to decrease the online computation time of GPC. Some heuristic and systematic optimization methods of these techniques are presented. The basic formulation of GPC does not guarantee stability in some cases. Two methods are shown for how to ensure the stability of GPC: end-point constraint and end-point state weighting.
5.1 Control Algorithm without Constraints
The cost function (5.1) of predictive control is known from Section 1.3: J(∆u f ) D
n e2 X
λ y,n e [y r (k C d C 1 C n e ) y(k O C d C 1 C n e jk)]2
n e Dn e1
C
nu X j D1
λ u, j ∆ u2 (k C j 1) ) min . ∆u f
(5.1)
The meaning of the notation was explained there. The predicted output signal y(k O C d C 1 C n e jk) can be written as the sum of the forced and free respons-
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
136
5 Generalized Predictive Control of Linear SISO Processes
es. The forced response is B q 1 u(k C 1 C n e jk) A (q 1 ) B q 1 (1 q 1 )u(k C 1 C n e jk) D (1 q 1 )A (q 1 ) B q 1 D ∆ u(k C 1 C n e jk) A ∆ (q 1 ) 1 (5.2) ∆ u(k C 1 C n e jk) , DH q
yO forc (k C d C 1 C n e jk) D
where u(k C j jk); j > 0 denotes future input values postulated at time point k. The following notation is used: G(q 1 ) D B(q 1 )/A(q 1 ) is the pulse-transfer function of the process without physical dead time, H q 1 D B(q 1 )/A ∆ (q 1 ) is the pulse-transfer function of the process extended by an integrator without physical dead time. The free response is the effect of the past inputs on the future output assuming no control actions from the current time point: B q 1 yO free (k C d C 1 C n e jk) D u(k C 1 C n e jk 1) I A (q 1 ) ∆ u(k C i) D 0 I
i
D 0, 1, 2, . . . .
We define the vectors T y r D y r (k C d C 1 C n e1 jk), , y r (k C d C 1 C n e2 jk) , T yO D y(k O C d C 1 C n e1 jk), , y(k O C d C 1 C n e2 jk) , T yO forc D yOforc (k C d C 1 C n e1 jk), , yOforc (k C d C 1 C n e2 jk) , T yO free D yOfree (k C d C 1 C n e1 jk), , yOfree (k C d C 1 C n e2 jk) .
(5.3)
(5.4)
The vector of the predicted outputs is the sum of the predicted forced and free responses: yO D yO forc C yO free .
(5.5)
5.1 Control Algorithm without Constraints
The predicted forced output can be expressed as 3 2 yOforc (k C d C n e1 C 1jk) 6 yOforc (k C d C n e1 C 2jk) 7 7 6 7 6 . 5 4 .. yOforc (k C d C n e2 C 1jk) 2 h n e1 n u C2 h n e1 C1 h n e1 6 h n e1 C2 h n e1 C1 h n e1 n u C1 6 D6 . .. . . .. 4 .. . . . h n e2 C1 h n e2 h n e2 n u C2
32 76 76 76 54
∆ u(k) ∆ u(k C 1) .. . ∆ u(k C n u 1)
3 7 7 7 5
or
where
yO forc D H∆u f ,
(5.6)
T ∆u f D ∆ u(kjk), ∆ u(k C 1jk), . . . , ∆ u(k C n u 1jk) T ∆ u(k), ∆ u(k C 1), . . . , ∆ u(k C n u 1) .
(5.7)
The current and the future manipulated variables ∆ u(k C i), i 0 are designed at discrete-time point k, and this can be expressed by writing ∆ u(k C ijk). For simplicity, in the sequel ∆ u(k C ijk) is written as ∆ u(k C i). H contains the coefficients of the unit step response as 3 2 h n e1 n u C2 h n e1 C1 h n e1 6 h n e1 C2 h n e1 C1 h n e1 n u C1 7 7 6 (5.8) HD6 . 7. .. . . .. 5 4 .. . . . h n e2 C1 h n e2 h n e2 n u C2 As the step response is defined only for positive discrete times, the upper-right elements of matrix H are zeros. The quadratic cost function (5.1) can be written as T J(∆u f ) D y r yO Λ y y r yO C ∆u Tf Λ u ∆u f ) min . (5.9) ∆u f
Substituting the vector yO with the sum of the forced and free responses results in T J D y r H∆u f yO free Λ y y r H∆u f yO free C ∆uTf Λ u ∆u f ) min . ∆u f
(5.10) Unconstrained minimization of the cost function according to the sequence of the input increments leads to h i h i d J(∆u f ) D H T Λ Ty C Λ y y r H∆u f yO free C Λ Tu C Λ u ∆u f d∆u f D0,
137
138
5 Generalized Predictive Control of Linear SISO Processes
which results in i1 h ∆u f D H T Λ Ty C Λ y H C Λ Tu C Λ u H T Λ Ty C Λ y y r yO free . Both weighting matrices are symmetrical and generally diagonal, since the control error and the control effort (increment) are considered as square functions of the individual time points and no cross-products are taken into account between different time points. Λ Ty D diaghλ y,n e1 , λ y,n e1 C1 , . . . , λ y,n e2 i I Λ Tu D diaghλ u0 , λ u1 , . . . , λ u,n u 1 i . As with diagonal matrices the transposed matrix is equal to the original matrix, Λ Tu D Λ u and Λ Ty D Λ y , the control signal sequence becomes 1 T ∆u f D H T Λ y H C Λ u H Λ y y r yO free . Usually in the weighting matrices the constants in the diagonals are identical, Λ y D λ y I and Λ u D λ u I (where I is the unity diagonal matrix) in the corresponding horizons. With λ y ¤ λ u , then 1 T H y r yO free . ∆u f D λ y H T H C λ u I The control behavior is influenced only by the relation λ y /λ u ; therefore, one weighting factor can be set to 1, for example, λ y D 1. Then, 1 T (5.11) ∆u f D H T H C λ u I H y r yO free . In the sequel λ y D 1 is assumed with single-input, single-output (SISO) control if not stated otherwise. According to receding horizon strategy, only the first input increment ∆ u(k) is used and the calculations are repeated in the next control (sampling) step: 1 T (5.12) H y r yO free , ∆ u(k) D [1, 0, . . . , 0] T H T H C λ u I where the vector [1, 0, . . . , 0] has n u 1 zeros. Example 5.1 One-step-ahead control of a first-order process without dead time The first-order process without dead time is given by (see Section 3.2.1) y (k) D a 1 y (k 1) C b 1 u(k 1) .
(5.13)
One-step-ahead prediction is calculated as yO (k C 1jk) D yO free (k C 1jk) C yOforc (k C 1jk) ,
(5.14)
5.1 Control Algorithm without Constraints
with the free response yOfree (k C 1jk) D (1 a 1 ) y (k) C a 1 y (k 1)
(5.15)
and the forced response yOforc (k C 1jk) D b 1 ∆ u(k) D h 1 ∆ u(k) .
(5.16)
The cost function to be minimized is with n e1 D 0, n e2 D 0, n u D 1, and λ y D 1, 2 O C 1jk) C λ u ∆ u2 (k) ) min , J (∆u(k)) D y r (k C 1) y(k ∆ u(k)
and the optimal manipulated variable can be obtained by derivation of the cost function: d J (∆u(k)) D 2 y r (k C 1) y(k O C 1jk) h 1 C 2λ u ∆ u(k) D 0 . d∆ u(k) The control algorithm becomes h 1 y r (k C 1) yO free (k C 1jk) . ∆ u(k) D λ u C h 21
(5.17)
Example 5.2 Long-range control with prediction length of 2 and with one allowed change in the manipulated variable of a first-order process without dead time The two-steps-ahead prediction is (see Section 3.2.1) y(k O C 2jk) D yOfree (k C 2jk) C yO forc (k C 2jk) ,
(5.18)
with the free response
yOfree (k C 2jk) D 1 a 1 C a 21 y (k) C (1 a 1 )a 1 y (k 1)
(5.19)
and the forced response yOforc (k C 2jk) D (1 a 1 )b 1 ∆ u(k) C b 1 ∆ u(k C 1) D h 2 ∆ u(k) C h 1 ∆ u(k C 1) .
(5.20)
The cost function to be minimized is with n e1 D 0, n e2 D 1, n u D 1, and λ y D 1: 2 J (∆u(k)) D y r (k C 1) y(k O C 1jk) 2 C y r (k C 2) y(k O C 2jk) C λ u ∆ u2 (k) C ∆ u2 (k C 1) . Its derivative is set equal to zero, d J (∆u(k)) D 2 y r (k C 1) y(k O C 1jk) h 1 d∆ u(k) 2 y r (k C 2) y(k O C 2jk) h 2 C 2λ u ∆ u(k) D 0 ,
139
140
5 Generalized Predictive Control of Linear SISO Processes
which leads to y r (k C 1) yOfree (k C 1jk) C h 1 ∆ u(k) h 1 y r (k C 2) yOfree (k C 2jk) C h 2 ∆ u(k) C h 1 ∆ u(k C 1) h 2 C λ u ∆ u(k) D 0 . The control algorithm with one allowed change in the manipulated variable (∆ u(k C 1) D 0) results in 2 P
∆ u(k) D
h i y r (k C i) yO free (k C ijk)
iD1
λu C
2 P iD1
.
(5.21)
h 2i
This expression can be easily generalized for longer horizons.
Example 5.3 Long-range control with a prediction length of 2 of a first-order process without dead time Now consider the case if both possible changes are allowed during the manipulated variable horizon. The cost function to be minimized with n e1 D 0, n e2 D 1, n u D 2, and λ y D 1 is 2 J(∆u(k), ∆u(k C 1)) D y r (k C 1) y(k O C 1jk) 2 C y r (k C 2) y(k O C 2jk) 2 C λ u ∆ u (k) C ∆ u2 (k C 1) . The derivation according to the current manipulated variable becomes dJ D 2 y r (k C 1) y(k O C 1jk) h 1 d∆ u(k) 2 y r (k C 2) y(k O C 2jk) h 2 C 2λ u ∆ u(k) D 0 . Hence, y r (k C 1) yOfree (k C 1jk) C h 1 ∆ u(k) h 1 y r (k C 2) yOfree (k C 2jk) C h 2 ∆ u(k) C h 1 ∆ u(k C 1) h 2 C λ u ∆ u(k) D 0 . The derivation according to the future manipulated variable becomes dJ D 2 y r (k C 2) y(k O C 2jk) h 1 C 2λ u ∆ u(k C 1) D 0 . d∆ u(k C 1) Hence, h 1 y r (k C 2) yO free (k C 2jk) C h 2 ∆ u(k) C h 1 ∆ u(k C 1) C λ u ∆ u(k C 1) D 0
5.1 Control Algorithm without Constraints
141
or h 1 y r (k C 2) yO free (k C 2jk) C h 1 h 2 ∆ u(k) C h 21 C λ u ∆ u(k C 1) D 0 . The two equations can be summarized in a matrix equation:
h 21 C h 22 C λ u h1 h2 h1 h2 D 0 h1
∆ u(k) ∆ u(k C 1) y r (k C 1) yO free (k C 1jk) h 1 h 2 C . 0 h 1 y r (k C 2) yO free (k C 2jk) h1 h2 h 21 C λ u
The control increments ∆ u(k) and ∆ u(k C1) can be calculated by matrix inversion. Figure 5.1 shows the control plots of Examples 5.1–5.3 for the process with static gain K p D 2, time constant T1 D 1 s, and sampling time ∆T D 1 s. The reference signal was changed stepwise from 0 to 1 at t D 2 s in the first case and at t D 3 s in the second and third cases. The future values of the reference signal are assumed
y
λu
y
λu
λu
λu
λu
λu
yr
yr
t
t u
u
λu
λu
λu
λu λu
λu t
(a)
t
ne1 = ne2 = 0
ne1 = 0, ne2 = 1, nu = 1
(b)
y
λu
λu λu
yr t u
λu
λu λu
t
(c)
ne1 = 0, ne2 = 1, nu = 2
Figure 5.1 One-step-optimal (a) and two-step-optimal (b, c) control of a first-order process.
142
5 Generalized Predictive Control of Linear SISO Processes
to be known. A stepwise disturbance signal of 1 was superposed on the process input at t D 6 s in the first and second cases and at t D 7 s in the third case. The weighting factor of the control errors was λ y D 1 and the weighting factor of the control increments varied: λ u D 0, 0.5, and 1. (Because of the relatively long sampling time of both the control and the simulation, the plots contain stepwise linear parts.) The plots illustrate the following: The manipulated variable starts as many steps before the reference signal as the length of the control error horizon is: 1 in Figure 5.1a and 2 in Figure 5.1b,c. The control error occurs earlier before the change in the set value and the controlled signal reaches its new set value earlier if the control error horizon is longer. Comparing the control errors in the case of a prediction length of 2, the sum of the error in the sampling points is less if two changes of the control signal are allowed during its horizon compared with the case of one allowed change. The polynomial form can be derived also for the general case. A lot of further simulation results for stepwise changes in the set value and/or in the disturbance at the process input were presented in Chapter 1.
5.2 Linear Polynomial Form of Unconstrained GPC
Although the current and also the future manipulated signals are calculated with GPC, only the current manipulated signal will be actuated (receding control strategy). The calculation of this signal depends on the current and the future reference signals and on the free response. The last one is a linear combination of the past manipulated signals and the current and earlier controlled output signals. This consideration suggests that the current manipulated signal can be expressed as a linear combination of the current and the earlier controlled signal values, the earlier manipulated signal values, and the future reference signal values, or if these are not known, then the current reference signal. Consequently an unconstrained GPC algorithm can be expressed by a linear polynomial equation, the so-called RST algorithm [1]. As an illustration of this method, two examples from Section 5.1 are considered and the polynomial form is derived.
5.2 Linear Polynomial Form of Unconstrained GPC
Example 5.4 One-step-ahead control of a first-order process without dead time (continuation of Example 5.1) If the free response yO free (k C 1jk) (5.15) is substituted into the control algorithm (5.17), then one gets h 1 y r (k C 1) (1 a 1 )y (k) a 1 y (k 1) . ∆ u(k) D λ u C h 21 The polynomial equation has the form ∆ u(k) D
h1 h 1 (1 a 1 ) a1 h1 y r (k C 1) 2 y (k) 2 y (k 1) . h 21 C λ u h1 C λ u h1 C λ u
If the future reference signal is not known, its value can be replaced by the value of the current reference signal: y r (k C 1) D y r (k). Figure 5.2a shows a similar control scenario as in Figure 5.1a but without reference signal prediction. The manipulated variable changes only after the reference signal step.
Example 5.5 Long-range control with a prediction length of 2 and with one allowed change in the manipulated variable of a first-order process without dead time (continuation of Example 5.2) If the free responses yO free (k C 1jk) (5.15) and yO free (k C 2jk) (5.19) are substituted into the control algorithm (5.21), one gets n 1 h 1 y r (k C 1) (1 a 1 )y (k) a 1 y (k 1) ∆ u(k) D 2 2 h1 C h2 C λ u o C h 2 y r (k C 2) 1 a 1 C a 21 y (k) a 1 (1 a 1 )y (k 1) , which results in the polynomial form ∆ u(k) D
h2 h1 y r (k C 1) C 2 y r (k C 2) h 21 C h 22 C λ u h 1 C h 22 C λ u h 1 (1 a 1 ) C h 2 1 a 1 C a 21 y (k) h 21 C h 22 C λ u h 1 a 1 C h 2 a 1 (1 a 1 ) y (k 1) . h 21 C h 22 C λ u
If the future reference signals are not known, their values can be replaced by the value of the current reference signal: h 1 (1 a 1 ) C h 2 1 a 1 C a 21 h1 C h2 y r (k) y (k) ∆ u(k) D 2 h 1 C h 22 C λ u h 21 C h 22 C λ u h 1 a 1 C h 2 a 1 (1 a 1 ) y (k 1) . h 21 C h 22 C λ u
143
144 y
5 Generalized Predictive Control of Linear SISO Processes y
yr
yr
y
y
t
t u
u
t
t
(a)
ne1 = ne2 = 0, λu = 1
(b)
ne1 = 0, ne2 = 1, λu = 1
Figure 5.2 One-step-ahead and two-steps-ahead control of a first-order process.
Figure 5.2b shows a similar control scenario as in Figure 5.1b but without reference signal prediction. As is seen, the manipulated variable changes only after the change of the reference signal. The polynomial form can be derived also for the general case. In Section 5.1 the cost function (5.9) T y r yO C λ u ∆u Tf ∆u f ) min J(∆u f ) D y r yO ∆u f
was minimized by 1 T ∆ u D [1, 0, . . . , 0] H T H C λ u I H y r yO free D k TG P C y r yO free , (5.22) where k TG P C is the first row of matrix 1 T H . K TG P C D H T H C λ u I In Section 3.2 the free response of a linear SISO model with colored disturbance v u (k) A q 1 y (k) D q d B q 1 u (k) C T q 1 1 q 1 was derived as ∆ u(k 1) p yO free (k C d C 1 C n e jk) D H dC1Cn e q 1 T (q 1 ) 1 y (k) C F dC1Cn e q . T (q 1 )
(5.23)
5.2 Linear Polynomial Form of Unconstrained GPC
Putting (5.23) into (5.22) leads to ∆ u(k) D k TG P C y r yO free n e2 X
D
h k G P C [n e n e1 C 1] y r (k C d C 1 C n e )
n e Dn e1
yO free (k C d C 1 C n e jk) n e2 X
D
k G P C [n e n e1 C 1] y r (k C d C 1 C n e )
n e Dn e1 n e2 X
n e Dn e1 n e2 X
∆ u(k 1) p k G P C [n e n e1 C 1] H dC1Cn e q 1 T (q 1 ) k G P C [n e n e1 C 1] F dC1Cn e q 1
n e Dn e1
y (k) , T (q 1 )
(5.24)
where k G P C [. . . ] denotes the corresponding element of vector k G P C . Multiplying (5.24) by the filter polynomial T(q 1 ) leads to # " n e2 X 1 1 p 1 Cq ∆ u(k) T q k G P C [n e n e1 C 1] H dC1Cn e q n e Dn e1
DT q
n e2 X 1
k G P C [n e n e1 C 1] y r (k C d C 1 C n e )
n e Dn e1
n e2 X
k G P C [n e n e1 C 1] F dC1Cn e q 1 y (k) .
n e Dn e1
If the future reference signals are assumed to be equal to the current one y r (k C d C 1 C n e 1 ) D . . . D y r (k C d C 1 C n e 2 ) y r (k), then this form can be interpreted as the so-called linear polynomial RST form (Figure 5.3). S q 1 Tr q 1 y r (k) y (k) , ∆ u(k) D R (q 1 ) R (q 1 ) with Tr q 1 D T q 1 , R q 1 D
(5.25)
n e2 P p T q 1 C q 1 k G P C [n e n e1 C 1] H dC1Cn e q 1 n e Dn e1 n e2 P
n e Dn e1
,
k G P C [n e n e1 C 1] (5.26)
145
146
5 Generalized Predictive Control of Linear SISO Processes vu
yr
+
∆u
u
∆
y
–
–
(a)
(b)
form 1
form 2
Figure 5.3 Linear polynomial control algorithm (RST form).
and n e2 P
S q
1
D
n e Dn e1
k G P C [n e n e1 C 1] F dC1Cn e q 1 n e2 P n e Dn e1
.
(5.27)
k G P C [n e n e1 C 1]
The closed-loop transfer function between the reference signal y r (k) and the controlled signal y (k) becomes T ( q 1 ) B (q 1 ) d 1 q y (k) R ( q 1 ) 1q 1 A(q 1 ) D 1 1 S (q ) B (q ) y r (k) 1 C R (q 1 ) 1q1 1 A(q 1 ) q d T q 1 B q 1 q d D A ∆ (q 1 ) R (q 1 ) C S (q 1 ) B (q 1 ) q d
(5.28)
and that between the disturbance v u (k) and the controlled signal y (k) can be expressed as T ( q 1 ) y (k) A( q 1 ) D S ( q 1 ) B (q 1 ) v u (k) 1 C R (q 1 ) 1q1 1 A(q 1 ) q d T q 1 R q 1 (1 q 1 ) D . A ∆ (q 1 ) R (q 1 ) C S (q 1 ) B (q 1 ) q d
(5.29)
The common denominator in both pulse-transfer functions (5.28) and (5.29) can be rewritten by replacing R(q 1 ) and S(q 1) from (5.26) and (5.27), respectively: " 1 A ∆ q 1 T q 1 C n e2 P k G P C [n e n e1 C 1] n e Dn e1
n e2 X p q 1 A ∆ q 1 k G P C [n e n e1 C 1] H dC1Cn e q 1 C n e Dn e1
q
d
B q
n e2 X 1 n e Dn e1
k G P C [n e n e1 C 1] F dC1Cn e q
1
# .
5.2 Linear Polynomial Form of Unconstrained GPC p
Further, H dC1Cn e (q 1 ) and F dC1Cn e (q 1 ) can be replaced by using (3.45) with (3.47) and (3.41), respectively: " T q 1 A ∆ q 1 C n e2 P k G P C [n e n e1 C 1] n e Dn e1 n e2 X
k G P C [n e n e1 C 1] q
n e Dn e1
n e C1
# h 1 f 1 i 1 B q A∆ q H dC1Cn e q .
The resulting pulse-transfer function between the reference signal and the controlled signal is independent of T(q 1 ): y (k) D y r (k)
n e2 P n e Dn e1
A ∆ (q 1 ) C
n e2 P n e Dn e1
k G P C [n e n e1 C 1] q d B q 1
h i. f n C1 1 1 1 e (q ) (q ) (q ) [n B k G P C e n e1 C1] q A ∆ H dC1Cn e
As expected, the resulting pulse-transfer function between the disturbance and the controlled signal depends on T(q 1 ): y (k) D v u (k)
n e2 P p T q 1 C k G P C [n e n e1 C 1] H dC1Cn e q 1 n e Dn e1
A ∆ (q 1 ) C
n e2 P n e Dn e1
h i. f k G P C [n e n e1 C1] q n e C1 B (q 1 ) A ∆ (q 1 ) H dC1Cn e (q 1 )
From the roots of the denominator of these closed forms the stability of the control algorithm can be checked. The advantage of this form is that no matrix inversion occurs in the algorithm. Of course, the matrix inversion has to be performed when calculating the coefficients of the RST form. A computer program for calculating the RST polynomials was published by Shook et al. [34]. Example 5.6 GPC predictive controller algorithm of a linear first-order dead-time process (continuation of Example 3.4) The process parameters are as follows: static gain K p D 1, time constant T1 D 1 s, and dead time Td D 0.2 s. The sampling time is ∆T D 0.2 s and the controller parameters are as follows: n e1 D 1, n e2 D 3, n u D 2, λ y D 1, and λ u D 0.5. For simplicity, a disturbance filter was not used: T(q 1 ) D 1. As n u D 2, only two changes are allowed in the manipulated variable horizon, ∆ u(k C 2) D ∆ u(k C 3) D D 0 ,
147
148
5 Generalized Predictive Control of Linear SISO Processes
and the predicted process outputs in the prediction domain from N1 D d C n e1 C 1 D 1 C 1 C 1 D 3 to N2 D d C n e2 C 1 D 1 C 3 C 1 D 5 can be expressed on the basis of the result in Example 3.4: 2
3 2 3 2 3 y(k O C 3jk) 0.3297 0.1813 0.4513 ∆ u(k) 4 y(k C 40.55075 ∆ u(k 1) O C 4jk)5 D 40.4513 0.32975 ∆ u(k C 1) y(k O C 5jk) 0.5507 0.4513 0.6322 2 3 3.0377 2.0377 y (k) C 43.4870 2.48705 , y (k 1) 3.8548 2.8548 with the matrix of the step response coefficients of the process 2
h2 H D 4h3 h4
3 2 h1 0.3297 h 2 5 D 40.4513 h3 0.5507
3 0.1813 0.32975 . 0.4513
The following gain matrix and vector can be computed off-line: 1 T H KG P C D HT H C λ u I 2 2 3 0.3297 0.1813 0.3297 0.4513 0.5507 40.4513 0.32975 D4 0.1813 0.3297 0.4513 0.5507 0.4513 31 0.3297 0.4513 0.5507 0.5 0 5 C 0.1813 0.3297 0.4513 0 0.5 0.2668 0.3143 0.3532 D , 0.0702 0.2202 0.3429 where k TG P C is the first row of matrix K G P C . k TG P C D
0.2668,
0.3143,
0.3532
.
Only the current control signal has to be calculated, as only this control signal is applied according to the receding horizon strategy. 02
3 2 31 y r (k C 3) yO free (k C 3jk) ∆ u(k) D k TG P C @4 y r (k C 4) 5 4 yO free (k C 4jk) 5A y r (k C 5) yO free (k C 5jk) D 0.2668, 0.3143, 0.3532 3 2 31 02 yOfree (k C 3jk) y r (k C 3) @4 y r (k C 4) 5 4 yOfree (k C 4jk) 5A , y r (k C 5) yOfree (k C 5jk)
(5.30)
5.2 Linear Polynomial Form of Unconstrained GPC y
u
(–1) yr
t
(a)
controlled variable
t
(b)
manipulated variable
Figure 5.4 Predictive control of a linear first-order dead-time process without knowing and knowing the future reference signal.
where the free responses are 2
3 2 3 yO free (k C 3jk) 0.4513 4 yO free (k C 4jk) 5 D 4 0.5507 5 ∆ u(k 1) yO free (k C 5jk) 0.6322 2 3 3.0377 2.0377 y (k) C 4 3.4870 2.4870 5 . y (k 1) 3.8548 2.8548
(5.31)
Figure 5.4 shows the control when the set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 6 s. Two cases are considered: in the first case the future reference signal is known, in the second case it is not known. With knowledge of the future reference signal, the manipulated variable starts earlier than the change in the reference signal. Consequently, there is a control error before the set value change; on the other hand, the control error vanishes earlier than without prior knowledge of the future reference signal. If the reference signal is not known in advance, y r (k C 3jk) D y r (k C 4jk) D y r (k C 5jk) y r (k)
(5.32)
is taken into account. Then the control starts after a stepwise change of the set value at t D 1 s.
Example 5.7 RST predictive controller form of a linear first-order dead-time process (continuation of Examples 3.4 and 5.6) The process parameters and the controller parameters were given in Example 5.6. Substituting the free response (5.23) into the control algorithm (5.22) leads to the
149
150
5 Generalized Predictive Control of Linear SISO Processes
polynomial equation form (see also (5.30) and (5.31)): h i ∆ u(k) D k TG P C y r yO free 02 3 y r (k C 3) D [0.2668, 0.3143, 0.3532] @4 y r (k C 4)5 y r (k C 5) 2 3 1 0.4513 3.0377 2.0377 y (k) A 40.55075 ∆ u(k 1) C 43.4870 2.48705 y (k 1) 0.6322 3.8548 2.8548 2
3
D 0.2668y r (k C 3) C 0.3143y r (k C 4) C 0.3532y r (k C 5) 0.5167∆ u(k 1) C 3.2675y (k) 2.3334y (k 1) . Dividing the equation by the sum of the coefficients of the reference signal, 0.2668 C 0.3144 C 0.3532 D 0.9342, results in R q 1 D 1.0704 C 0.5531q 1 , S q 1 D 3.4977 2.4977q 1 , Tr q 1 D 0.2856 q 3 C 0.3364q 4 C 0.3781q 5 . If the future reference signal is not known in advance, then a constant reference signal can be assumed according to (5.32) and the polynomial Tr (q 1 ) becomes, as expected, Tr (q 1 ) D 1. The polynomials R(q 1 ) and S(q 1 ) can also be calculated from (5.26) and (5.27), respectively: n e2 P p T q 1 C q 1 k G P C [n e n e1 C 1] H dC1Cn e q 1 n e Dn e1 R q 1 D n e2 P k G P C [n e n e1 C 1] n e Dn e1
D S q 1 D
1C q
1 [0.2668
0.4513 C 0.3144 0.5507 C 0.3532 0.6322] , 0.2668 C 0.3144 C 0.3532 n e2 P k G P C [n e n e1 C 1] F dC1Cn e q 1
n e Dn e1
n e2 P
"
n e Dn e1
k G P C [n e n e1 C 1]
0.2668(3.03772.0377q 1 )
#
C0.3144(3.48702.4870q 1 )
D
C0.3532(3.85482.8548q 1 )
0.2668 C 0.3144 C 0.3532
.
As is seen, the difference equation of the RST form is the same as the form obtained from the solution of the GPC algorithm using the matrix inversion if the future reference signals are assumed to be equal to the current one.
5.3 Tuning the Controller Parameters u
y
(–1) yr
t
(a)
controlled variable
t
(b)
manipulated variable
Figure 5.5 Predictive control of a linear third-order process without knowing and knowing the future reference signal.
A further control example of a third-order process shows the equivalence between the GPC algorithm and the RST form without knowing the future reference signal in advance. Example 5.8 Predictive control of a linear third-order process without knowing and knowing the future reference signal Figure 5.5 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The process parameters are as follows: the static gain is K p D 1 and there are three equal time constants T1 D T2 D T3 D 1/3 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was ∆T D 0.2 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ y D 1.0, and λ u D 0.1. A disturbance filter was not used: T(q 1 ) D 1. The polynomials of the control algorithm are R q 1 D 0.49 C 0.46 q 1 C 0.42q 2 C 0.06 q 3 , 1 D 7.66 11.63q 1 C 6.02q 2 1.06 q 3 , S q 1 D T q 1 D 1 . Tr q Figure 5.5 also shows the simulation of a corresponding GPC algorithm knowing the future reference signal. The difference is well seen. In the case of the RST form the control starts after the reference signal change and with knowledge of the future reference signal values it starts earlier to minimize the cost function of the control.
5.3 Tuning the Controller Parameters 5.3.1 Effect of the Controller Parameters on the Control Behavior
The effect of the choice of the controller parameters will be shown in the control of a typical linear aperiodic process, as shown already in Example 1.2.
151
152
5 Generalized Predictive Control of Linear SISO Processes u
y y
3 2
yr
1 0
t
(a)
controlled variable
-1
0
1
(b)
2
3 4 5 6 7 8 manipulated variable
9 t [s]
Figure 5.6 Predictive control of a linear third-order process without knowing the future reference signal.
Example 5.9 Predictive control of a linear third-order process without knowing the future reference signal (the same as Example 1.2) Figure 5.6 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The process parameters are as follows: static gain K p D 1, and three equal time constants of T1 D T2 D T3 D 1/3 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was T D 0.1 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ u D 0.1, and λ y D 1. The control is fast with about 5% overshoot.
The effect of the preview of the reference signal and of the observable disturbance, and the difference between one-step-ahead and long-range control were discussed in Chapter 1. In the sequel the effect of the following parameters on the control behavior will be shown:
start of the control error horizon, end of the control error horizon, length of the manipulated variable horizon, weighting of the control increments, weighting of the control errors, sampling time, different filtering techniques.
5.3.1.1 Effect of the Start of the Control Error Horizon
Example 5.10 Predictive control of a linear third-order process with different start points of the control error horizon Figure 5.7 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9. The start of the control error horizon n e1 varied between 0, 3, and 9.
5.3 Tuning the Controller Parameters y
u
ne1
ne1
153
ne1
ne1
yr
ne1
ne1 t
(a)
t
(b)
controlled variables
manipulated variables
Figure 5.7 Predictive control of a linear third-order process with different start points of the control error horizon.
Figure 5.7 illustrates the typical effect of the choice of the first point of the control error horizon: If the start of the control error horizon is near the current time, the control becomes faster. If the start of the control error horizon is far in the future, the control becomes slower but with less overshoot and oscillation. Further, the control error horizon should start immediately after the dead time except for processes with inverse repeat character, when it should start from the time point where the step response and the input step first have the same sign. 5.3.1.2
Effect of the End of the Control Error Horizon
Example 5.11 Predictive control of a linear third-order process with different end points of the control error horizon Figure 5.8 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9; solely the end of the control error horizon n e2 varied between 1, 9, and 25.
y
ne2
u
ne2
ne2
ne2
yr ne2
ne2 t
(a)
controlled variables
t
(b)
manipulated variables
Figure 5.8 Predictive control of a linear third-order process with different end points of the control error horizon.
154
5 Generalized Predictive Control of Linear SISO Processes
Figure 5.8 illustrates the typical effect of the end of the control error horizon: The end point of the control error horizon very far in the future does not lead to better control but requires longer computation time. The end point of the control error horizon too near the current time leads to higher overshoot and more oscillation. The control will be slower with less overshoot and more sluggish by ending the optimization horizon later. Two special cases are mentioned below: Control error horizon length of 1: Selecting n e1 D n e2 D 0, n u D 1, λ y D 1, and λ u D 0.1 leads to deadbeat control with usually not allowed big changes in the manipulated variable [8]. Infinitely large control error horizon length: The controller is called a “mean-level” controller. The control increment in each step reduces the control error to zero. The poles of the closed-loop system become equal to the poles of the open-loop process for stable processes. The zeros of the process appear in the closed-loop transfer function [8]. An unstable process cannot be stabilized by this method.
5.3.1.3 Effect of the Length of the Manipulated Variable Horizon
Example 5.12 Predictive control of a linear third-order process with different lengths of the manipulated variable horizon Figure 5.9 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9; solely the length of the manipulated variable horizon n u varied between 1, 3, and 5.
Figure 5.9 illustrates the typical effect of the number of allowed manipulated signal changes during the manipulated signal horizon: y
nu
u
nu
nu nu
yr nu nu t
(a)
controlled variables
t
(b)
manipulated variables
Figure 5.9 Predictive control of a linear third-order process with different lengths of the manipulated variable horizon.
5.3 Tuning the Controller Parameters
155
A too long manipulated signal horizon does not lead to better control than a properly selected long enough horizon. A too short manipulated variable horizon leads to slow control. For underdamped processes n u D 2 is recommended [25]. It is also suggested to select n u equal to the number of poles of the process transfer function which cause instability or large oscillations. 5.3.1.4
Effect of the Weighting of the Control Increments
Example 5.13 Predictive control of a linear third-order process with different weighting factors of the control increments Figure 5.10 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9; solely the weighting factor of the control increments λ u varied between 0.01, 0.1, and 0.5.
Figure 5.10 illustrates the typical effect of the weighting factor of the control increments: Higher weighting leads to slower control (with less overshoot) and to smaller changes in the manipulated variable. Smaller weighting leads to faster control (with more overshoot) and to bigger changes in the manipulated variable. A too small weighting factor may cause overshoot and the settling time increases because of oscillations. As mentioned before, predictive control without control increment weighting leads to deadbeat control. For infinitely large control increment weighting the poles of the closed-loop transfer function converge at the poles of the open-loop transfer function and additionally one pole takes the value of 1, that is, the process becomes of integrating character [13]. From the foregoing, we conclude that y
λu
u
λu
yr
λu
λu λu
λu
t
(a)
controlled variables
t
(b)
manipulated variables
Figure 5.10 Predictive control of a linear third-order process with different weighting factors of the control increments.
5 Generalized Predictive Control of Linear SISO Processes
156
the control of a stable process can be made smoother (and slower) by increasing the control increment weighting, and the control of an unstable process cannot be made smoother (and slower) by increasing the control increment weighting, because with a very large weighting factor the closed-loop process becomes unstable.
5.3.1.5 Effect of the Weighting of the Control Error
Example 5.14 Predictive control of a linear third-order process with different weighting factors of the control errors Figure 5.11 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9; solely the weighting factor of the control errors λ y varied between 0.25, 1, and 3.
Figure 5.11 illustrates the effect of the weighting factor of the control error: Higher weighting leads to faster control (with more overshoot) and to higher control signal increments. Smaller weighting leads to slower control (with less overshoot) and to smaller changes in the manipulated signals. As was seen, a higher weighting of the control errors is equivalent to a lower weighting of the manipulated signals and vice versa. This is a consequence of the symmetrical role of the weighting factors in the cost function (5.9). As the change of the two parameters is redundant, assumption λ y D 1 is kept for SISO systems further on (if not mentioned otherwise).
y
λy
yr
u
λy
λy
λy λy
λy
t
(a)
controlled variables
t
(b)
manipulated variables
Figure 5.11 Predictive control of a linear third-order process with different weighting factors of the control errors.
5.3 Tuning the Controller Parameters
5.3.1.6
157
Effect of the Sampling Time
Example 5.15 Predictive control of a linear third-order process with different sampling times Figure 5.12 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9; solely the sampling time ∆T varied between 0.1, 0.2, and 0.5 s. The sampling time influences the predictive control similarly as generally in any digital control algorithm. A shorter sampling time leads to a bit faster control reaching the reference signal, much faster rejection of the disturbances, bigger changes in the manipulated signal. Lalonde and Cooper [23] recommend choosing the sampling time as 1/10 of the maximum dead time or the equivalent time constant if the process is approximated by a first-order system with dead time. After having investigated the effect of the usual controller parameters, we now consider three further filtering possibilities. These are Reference signal filter: 1C
nr P
pri iD1 . P r q 1 D 1 C p r1 q 1 C C p r,n r q n r Controlled signal filter:
Py q
1
1C D
ny P
pyi
iD1
1 C p y1 q 1 C C p y,n y q n y
.
Disturbance (robustness) filter: T q 1 D 1 C t1 q 1 C C t n t q n t . u
y
∆T ∆T
yr
∆T
∆T ∆T ∆T
t
t
(a)
controlled variables
(b)
manipulated variables
Figure 5.12 Predictive control of a linear third-order process with different sampling times.
158
5 Generalized Predictive Control of Linear SISO Processes
(The condition related to the sum of the coefficients is needed to ensure unity static gain for the filters.) The first two filters filter the reference signal and the controlled signal, respectively. The cost function with constant weighting factors over the horizons now becomes J(∆u f ) D
n e2 X
λ y,n e P r q 1 y r (k C d C 1 C n e )
n e Dn e 1 nu 2 X P y q 1 y(k λ u, j ∆ u2 (k C j 1) , O C d C 1 C n e jk) C j D1
(5.33) which has to be minimized according to ∆u f . The disturbance filter is the numerator polynomial of the assumed additive output noise term of the Controlled AutoRegressive Integrating Moving Average (CARIMA) model. As the disturbance filter influences the robustness of the control behavior, it is called also a robustness filter. 5.3.1.7 Effect of the Reference Signal Filter
Example 5.16 Predictive control of a linear third-order process using a reference signal filter Figure 5.13 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9 and in addition the reference signal is weighted by a firstorder filter with p r1 D 0.6 or p r1 D 0.8. Also, the unfiltered case (p r1 D 0) is shown for comparison.
The reference signal filter does not influence the disturbance rejection or a plant/model mismatch. When it is applied, the control can be slower, overshoots can be damped, and the changes in the manipulated variable can be suppressed. y
u
pr1
pr1
pr1
pr1 yr
pr1
pr1 t
t
(a)
controlled variables
(b)
manipulated variables
Figure 5.13 Predictive control of a linear third-order process with different reference signal filters.
5.3 Tuning the Controller Parameters
5.3.1.8
159
Effect of the Controlled Signal Filter
Example 5.17 Predictive control of a linear third-order process using a controlled signal filter Figure 5.14 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9 and in addition the controlled signal is weighted by a firstorder filter with p y1 D 0.25 or p y1 D 0.5. The unfiltered case (p y 1 D 0) is also shown for comparison. y
py1
u
py1
py1
py1
yr
py1 py1 t
(a)
t
(b)
controlled variables
manipulated variables
Figure 5.14 Predictive control of a linear third-order process with different controlled signal filters.
The control signal filter influences both the reference tracking and the disturbance rejection properties. When it is applied, the control can be slower, the overshoots can be damped, and the changes in the manipulated variable can be suppressed. 5.3.1.9
Effect of the Disturbance/Robustness Filter
Example 5.18 Predictive control of a linear third-order process using a robustness filter Figure 5.15 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9 and in addition a first-order robustness filter with t1 D 0.8 or t2 D 0.9 is applied. Also, the unfiltered case is shown for comparison. u
y
→
1
t1= 0
3 2
r
1
1
t
(a)
controlled variables
t1= -0.9 t1= -0.8
0
1
-1
0
(b)
1
2
3
4
5
6
7
8
manipulated variables
Figure 5.15 Predictive control of a linear third-order process with different robustness filters.
9
t [s]
160
5 Generalized Predictive Control of Linear SISO Processes
Figure 5.16 Step response of the process and the model used for controller design.
The robustness filter does not influence the control of a reference signal step. When it is applied, the rejection of any disturbance will be slower, overshoots and undershoots can be damped, and the changes in the manipulated variable can be suppressed. Furthermore, the effect of a mismatch between the process and its model can be reduced. That is why this filter is called a robustness filter. A further example illustrates how a robustness filter increases the quality of the control in the case of a process/model mismatch. Example 5.19 Predictive control of a linear third-order process in the case of process/model mismatch using a robustness filter The process and the controller parameters and the control scenario are the same as in Example 5.9; solely an approximating first-order process with dead time Td D 1/3 s and time constant T1 D 2/3 s was used for the prediction of the output of the third-order process. Figure 5.16 shows the step response of the process model and the approximating first-order model. Figure 5.17 shows the control behavior with the exact and the approximating predictive model. As is seen from the oscillating behavior, the control is very sensitive to plant/model mismatch when the robustness filter (t1 D 0) is not used. (The control performance without mismatch was shown in Figure 5.6.) The oscillations became damped with the first-order robustness filter with t1 D 0.5.
McIntosh et al. [27] recommended the robustness filter as n T q 1 D 1 C t1 q 1 a ,
with 0.9 t1 0.89 ,
where n a is the order of the denominator polynomial of the process transfer function. Honc and Haber [19] illustrated the improvement of the control quality by controlling a nonlinear distillation column using a linearized model and an appropriate robustness filter.
5.3 Tuning the Controller Parameters
161
u
y
yr t1
t1
t1
t1 t
t
(a)
controlled variables
(b)
manipulated variables
Figure 5.17 Predictive control of a linear third-order process with model mismatch with and without use of a robustness filter.
5.3.2 Recommended Initial Parameters
On the basis of several simulations and recommendations from references, the controller parameters should be chosen as follows: 1. The process model on which the controller design is based should be a good approximation of the process behavior. 2. If there is a plant/model mismatch, a robustness filter (usually a first-order one) can help to improve the control behavior. 3. The control error horizon should start immediately after the dead time, n e1 D 0, except for processes with inverse repeat character, when it should start from the time point when the step response and the input step have the same sign for the first time. 4. The length of the control error horizon n e2 n e1 should be equal to the discrete settling time of the open-loop process reduced by the dead time. (For inverseresponse processes n e2 n e1 is still smaller for the same reason explained in item 3.) 5. As changing both weighting factors is redundant, the weighting factor of the control error can be kept equal to λ y D 1. 6. With simple (e.g., aperiodic) process models one change in the manipulated variable is enough, n u D 1. With more complex models, for example, oscillating or unstable processes, more changes should be allowed. 7. The weighting factor of the control increments should be increased from a very small value (e.g., λ u D 0.001) until a smooth manipulated variable is achieved. 8. If the control is too slow, the allowed changes in the manipulated variable horizon n u should be increased and one should continue from item 7. The next example illustrates an optimal (fast and almost aperiodic) controller tuning for an aperiodic process.
162
5 Generalized Predictive Control of Linear SISO Processes u
y dist.: 0 → (–1)
y
3
1
2
yr
1
0.5
0 0
(a)
0
1
2
3
4
5
6
7
8
9 t [s]
controlled variables
–1
0
(b)
1
2
3 4 5 6 7 8 manipulated variables
9 t [s]
Figure 5.18 Predictive control of a linear third-order process with recommended controller parameters.
Example 5.20 Predictive control of a linear third-order process with recommended controller parameters Figure 5.18 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The control scenario and the parameters are as in Example 5.9 and the fixed controller parameters were n e1 D 0, n e2 D 9, n u D 1, λ u D 0.1, and λ y D 1. The control can be made faster at the cost of an overshoot of about 10% by allowing more changes in the manipulated variable horizon. This case was shown in Figure 5.6 for Example 5.9 for n u D 3.
Increasing either the length of the optimization horizon by n e2 or the weighting factor of the control increments λ u makes the control smoother, more sluggish, and slower. Rani and Unbehauen [29] have shown that if both controller parameters are changed proportionally to each other, then the control behavior remains unaltered. As the computational demand decreases with shortening the optimization horizon, it is expedient to decrease both parameters simultaneously. Example 5.21 Illustration of the tuning rule of Rani and Unbehauen in the case of a linear third-order process The process parameters and the control scenario are the same as in Example 5.9. When the controller parameters are fixed to n e1 D 3 and n u D 4, similar fast, aperiodic control behaviors are obtained for n e2 D 5, λ u D 3 and n e2 D 9, λ u D 4. From the above parameters the relation λ u D c 0 C c 1 (n e2 C 1) ,
c 0 D 1.5 ,
c 1 D 0.25 ,
can be estimated. Consequently, the control behavior for the parameters, for example, n e2 D 9, λ u D 4 or n e2 D 19, λ u D 6.5, or n e2 D 49, λ u D 14 should be very similar, which can be observed in Figure 5.19.
5.3 Tuning the Controller Parameters y
dist.: 0 → (–1)
163
u 2
1 0.5
1
yr
0
0 0
(a)
2
4
6
8
t [s] 10
controlled variables
0
(b)
2
4
6
8
t [s]
manipulated variables
Figure 5.19 The tuning relation of Rani and Unbehauen [29].
5.3.3 Systematic Tuning of the Controller Parameters
Nungam and Lee [28] proposed starting with a very large optimization horizon and with a small weighting of the control increments and afterwards decreasing the optimization horizon and increasing the weighting factor. The tuning algorithm is as follows: 1. The initial parameters are, for example, n e1 D 0, n e2 D 99, n u D 1, λ u D 0.0001, and λ y D 1. 2. Decrease n e2 (if necessary) until a small overshoot appears. 3. Increase λ u (if necessary) until the manipulated signal becomes satisfactorily smooth.
Example 5.22 Tuning of the predictive control of a linear second-order process based on a different third-order control model according to Nungam and Lee The process parameters of a second-order process are as follows: static gain K p D 1, and two equal time constants of T1 D T2 D 1/2 s. A different third-order model was used for controller design: static gain K p D 1, and three equal time constants of T1 D T2 D T3 D 1/3 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was ∆T D 0.2 s. With the initial controller parameters n e1 D 0, n e2 D 9, n u D 3, λ u D 0.1, and λ y D 1 the controlled signal is aperiodic and sluggish and the manipulated signal fluctuates; see Figure 5.20. The settling time can be reduced by increasing n e2 till 15 so that the controlled signal still remains aperiodic; see Figure 5.21. The fluctuations in the manipulated variable can be suppressed by increasing λ u to 20; see Figure 5.22.
Wang et al. [36] recommended starting with well-established parameters and then first increasing the weighting factor of the control increments and afterwards extending the optimization horizon if necessary. A further possibility is the increase of the control horizon and repeated tuning of the other parameters mentioned. The steps of the algorithm are as follows:
10
5 Generalized Predictive Control of Linear SISO Processes
164 y
u
dist.: 0 → (–1)
1
2
0.5
1
yr
y
0
0 0
2
4
(a)
6
8
t [s]
0
10
2
(b)
controlled variable
4
6
8
t [s]
10
t [s]
10
t [s]
10
manipulated variable
Figure 5.20 Initial step of the tuning according to Nungam and Lee [28]. y
u
dist.: 0 → (–1)
2
1
yr 0.5
1
y
0
0 0
2
4
(a)
6
8
t [s] 10
0
2
(b)
controlled variable
4
6
8
manipulated variable
Figure 5.21 Step 2 of the tuning after Nungam and Lee [28]: increase of n e2 . y
u
dist.: 0 → (–1)
1
2
yr
0.5
1
y
0
0 0
(a)
2
4
6
controlled variable
8
t [s]
10
0
(b)
2
4
6
8
manipulated variable
Figure 5.22 Step 3 of the tuning after Nungam and Lee [28]: increase of λ u .
1. The initial parameters are, for example, n e1 D 0, n e2 D 9, n u D 1, λ u D 0.0001, and λ y D 1. 2. Increase λ u (if necessary) until the control becomes satisfactorily smooth. 3. Increase n e2 (if necessary) until the overshoot is less than allowed. 4. If the control behavior is not satisfactory, increase n u and go to step 1.
Example 5.23 Tuning of the predictive control of a linear second-order process based on a different third-order process model according to Wang et al. [36] The process model, the model used for designing the controller, the sampling time, and the control scenario are the same as in Example 5.22. With the initial controller parameters n e1 D 0, n e2 D 9, n u D 1, λ u D 0.0001, and λ y D 1 the control becomes unstable; see Figure 5.23. Figure 5.24 shows that by raising the weighting factor of the control increments to λ u D 10, the control became smooth. An elongation of the optimization horizon is superfluous as the control is already aperiodic. The settling time could be reduced by increasing the control horizon to n u D 2; see Figure 5.25.
5.3 Tuning the Controller Parameters
165
dist.: 0 → (–1) u
y
2
1
yr
0.5
1
y
0
0 0
2
4
(a)
6
8
t [s]
10
0
2
(b)
controlled variable
4
6
8
t [s]
10
manipulated variable
Figure 5.23 Initial step of the tuning after Wang et al. [36]. y
u
dist.: 0 → (–1)
2
1
yr
0.5
1
y
0
0 0
2
4
(a)
6
8
t [s]
0
10
2
(b)
controlled variable
4
6
8
t [s] 10
manipulated variable
Figure 5.24 Step 2 of the tuning after Wang et al. [36]: increase of λ u . y
u
dist.: 0 → (–1)
2
1
yr
0.5
1
y
0
0 0
2
4
(a)
6
8
controlled variable
t [s]
10
0
2
(b)
4
6
8
t [s] 10
manipulated variable
Figure 5.25 Step 3 of the tuning after Wang et al. [36]: increase of n u .
5.3.4 Optimization of the Controller Parameters by a Genetic Algorithm
A new cost function is introduced which evaluates the settling time, the overshoot, and the computational costs. The controller parameters can be optimized by minimizing a cost function given by (5.34), where the aim is the fastest aperiodic control for a stepwise change of the reference signal: J
D D )
Jset ‚ …„ ƒ λ set t98% min ,
C C
Jov ‚ …„ ƒ λ ov jy max y ref j
C C
Jh ‚ …„ ƒ λ e,hor Vne C λ u,hor Vnu
n e1 ,n e2 ,n u ,λ u
(5.34)
166
5 Generalized Predictive Control of Linear SISO Processes
with Vn e D
n e2 X
(
n e Dn e1
0
for (d C n e C 1) 4TΣ
ne
for (d C n e C 1) > 4TΣ
and Vn u D
( nu X 0 for
(i 1) TΣ
for
(i 1) > TΣ
iD1
i
.
Here the notation is as follows: t98% : jy max y ref j: TΣ : Vn e : Vn u : λ set : λ ov : λ e,hor : λ u,hor :
settling time, till a steady-state error of 2% is achieved, overshoot, sum of all time constants and the dead time for an aperiodic process, penalty term if the control error horizon is longer than 4TΣ , penalty term if the manipulated variable horizon is longer than TΣ , weighting factor of the settling time, weighting factor of the overshoot, weighting factor of the penalty terms if the control error horizon is longer than 4TΣ , weighting factor of the penalty terms if the manipulated variable horizon is longer than TΣ .
The third term of the cost function (5.34) is a constraint for the optimization and prevents the occurrence of senseless long horizons. The horizon limits depend on the open-loop step response. The limit for the control error horizon is 4TΣ , which is approximately the settling time of the open-loop process, and the limit for the manipulated variable horizon is TΣ . The limits for the horizon lengths are realized as soft constraints; thus, these limits can be violated (in contrast to the hard constraints, which cannot be violated and are handled directly by the optimization algorithm). The penalty terms increase the cost function by 1 for each sampling step if the horizons exceed the given limit. These simulations were performed till t D kset ∆ t, where kset is the discrete-time settling time approximated by kset D 4TΣ . The optimization was performed by a genetic optimizer of Sekaj [33]. As the calculation can be performed off-line, the relatively long computation time is not a problem. The controller parameters n e1 , n e2 , n u , and λ u were optimized with constant λ y D 1 for three typical linear processes: aperiodic second-order process, underdamped second-order process, second-order process with inverse-response step response. On the basis of the optimization and a number of simulations, a rule of thumb will be given for the controller tuning.
5.3 Tuning the Controller Parameters Table 5.1 Optimization results of the fastest control with the smallest overshoot of the aperiodic processes. Process
T1 [s]
T2 [s]
J
Jset
Jov
Jh
n e1
n e2
nu
λu
1 2 3 4 5 6 7 8 9
1 1 1 5 5 5 10 10 10
10 20 30 10 20 30 10 20 30
4.4 5.0 5.23 7.18 8.75 9.54 8.6 10.46 11.92
4.4 5.0 5.2 7.0 8.6 9.4 8.6 10.4 11.8
0.0 0.0 0.03 0.18 0.15 0.14 0.0 0.06 0.12
0 0 0 0 0 0 0 0 0
0 3 4 1 2 1 2 4 8
102 246 500 59 78 88 70 84 95
5 5 5 10 13 11 12 12 14
0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05
Example 5.24 Optimization of the controller parameters for an aperiodic secondorder process The step responses of the second-order aperiodic process with transfer function G(s) D
1 (1 C T1 s)(1 C T2 s)
with different time constant combinations are plotted in Figure 5.26. To avoid overshoot, the optimization parameters were λ ov D 100 and λ set D 1. The sampling time was ∆T D 0.1 s. The result of the optimization including the sub-cost factors is presented in Table 5.1. The optimal horizons are also shown in Figure 5.26 graphically in the open-loop step responses (the control error horizon is marked by two dashed–dotted lines for the beginning and the end of the horizon, respectively, and the length of the manipulated variable horizon is marked by a single dashed line). The controlled and manipulated variables of the optimized predictive control with a reference step change are plotted in Figure 5.27, where thin lines mark the maximum overshoots (horizontal line), the rise times, and the settling times (vertical lines). As is seen from the figures, all controls are fast and aperiodic. (In some cases the settling time is very long as it was defined as the duration of time till 98% of the end value is achieved.)
Example 5.25 Optimization of the controller parameters for an underdamped second-order process The step responses of the second-order oscillating process with transfer function G(s) D
s2
ω 20 C 2ξ ω 0 s C ω 20
with different natural frequency ω 0 and damping factor ξ combinations are plotted in Figure 5.28.
167
168
5 Generalized Predictive Control of Linear SISO Processes
1 h
0 ne1=0, nu =5
ne2=102
kset =202 ne1=3,nu =5
ne2=246
kset =398 ne1=4,nu =5
ne2=500 kset =593
1 h
0 ne1=1,nu =10, ne2=59
kset =232 ne1=2, nu =13, ne2=78
kset =421 ne1=1, nu =11, ne2=88
kset =616
kset =293 ne1=4, nu =12, ne2=84
kset =462 ne1=8, nu =14, ne2=95
kset =649
1 h
0 ne1=2, nu =12, ne2=70
Figure 5.26 Optimized horizons of the aperiodic processes (T1 D 1, 5, and 10 s in the rows and T2 D 10, 20, and 30 s in the columns).
(a)
controlled variables
(b)
manipulated variables
Figure 5.27 Fastest control with the smallest overshoot of the set of aperiodic processes.
To avoid overshoot the optimization parameters were λ ov D 100 and λ set D 1. The sampling time was ∆T D 0.1 s. The result of the optimization including the sub-cost factors is presented in Table 5.2. Remarkable in the results is also that in two cases a very high manipulated variable increment weighting factor was found: λ u D 32.8. The reason is that the genetic optimization algorithm stopped the evolution before the minimum was found. The optimal horizons are also shown in Figure 5.28 graphically in the open-loop step responses (the control error horizon is marked by two dashed–dotted lines for the beginning and the end of the hori-
5.3 Tuning the Controller Parameters
h 1
0 ne1=0, nu =7, ne2=43
kset =133 ne1=1, nu =9, ne2=43
kset =200 ne1=2, nu =10, ne2=247 kset =400
h 1
0 nu =10, ne1=20, ne2=30 kset =66 ne1=1, nu =8, ne2=48
kset =100 ne1=0, nu =4, ne2=30
kset =200
kset =44 nu =10, ne1=11, ne2=22 kset =66 ne1=0, nu =5,ne2=28
kset =133
h 1
0 ne1=0, nu =4
ne2=23
Figure 5.28 Horizon settings for the fastest control with the smallest overshoot of the oscillating processes (ω 0 D 0.25, 0.5, and 0.75 s1 in the rows and ξ D 0.75, 0.5, and 0.25 in the columns).
zon, respectively, and the length of the manipulated variable horizon is marked by a single dashed line). The controlled and manipulated variables of the optimized predictive control with a reference step change are plotted in Figure 5.29, where thin lines mark the maximum overshoots (horizontal line), the rise times, and the settling times (vertical lines). As is seen from the figures, all controls are fast and aperiodic.
Example 5.26 Optimization of the controller parameters for a second-order process with inverse-repeat step response The inverse response (also called non-minimum-phase) process is described by the transfer function G(s) D
1 (T1 C T2 )s . (1 C T1 s)(1 C T2 s)
The step responses are plotted in Figure 5.30 with different time constant combinations.
169
170
5 Generalized Predictive Control of Linear SISO Processes
(a)
(b)
controlled variables
manipulated variables
Figure 5.29 Fastest control with the smallest overshoot of the oscillating processes. Table 5.2 Optimization results for the fastest control with the smallest overshoot of the oscillating processes. Process
ω 0 [s1 ]
ξ
J
Jset
Jov
Jh
n e1
n e2
nu
λu
1 2 3 4 5 6 7 8 9
0.25 0.25 0.25 0.5 0.5 0.5 0.75 0.75 0.75
0.75 0.5 0.25 0.75 0.5 0.25 0.75 0.5 0.25
5.69 6.0 6.0 11.45 5.23 5.0 3.2 7.84 3.43
5.6 6.0 6.0 11.4 5.2 5.0 3.2 7.8 3.4
0.09 0.0 0.0 0.05 0.03 0.0 0.0 0.04 0.03
0 0 0 0 0 0 0 0 0
0 1 2 20 1 0 0 11 0
43 43 247 30 48 30 23 22 28
7 9 10 10 8 4 4 10 5
0.1 0.1 0.1 32.8 0.5 0.5 0.05 32.8 0.05
To avoid overshoot the optimization parameters were λ ov D 100 and λ set D 1. The sampling time was ∆T D 0.1 s. The result of the optimization including the sub-cost factors is presented in Table 5.3. The optimal horizons are also shown in Figure 5.30 graphically in the open-loop step responses (the control error horizon is marked by two dashed–dotted lines for the beginning and the end of the horizon, respectively, and the length of the manipulated variable horizon is marked by a single dashed line). The controlled and manipulated variables of the optimized predictive control with a reference step change are plotted in Figure 5.31, where thin lines mark the maximum overshoots (horizontal line), the rise times, and the settling times (vertical lines). As seen from the figures, all controls are fast and aperiodic.
All 27 simulations show that a fast aperiodic control could be achieved. As far as the process parameters do not change, new off-line optimization of the controller parameters is not necessary. All processes were simulated with static gain K p D 1. The optimal weighting factor of the control increments λ u,K p D1 has to be modified for a different static
5.3 Tuning the Controller Parameters 1 h 0
-1 ne1=3, nu =7, ne2=107, kset =220 nu =7, ne1=12, ne2=350, kset =420 ne1=9,ne2=34, nu =88, kset =620 1 h 0
-1 ne1=7, nu =37, ne2=122,
kset =300 ne1=9,nu =92, ne2=210, kset =500 ne1=10, nu =12, ne2=500, kset =700
1 h 0
-1 ne1=8, nu =12,
ne2=241,kset =400 nu =18,ne1=44, ne2=411,kset =600 ne1=16, nu =27, ne2=485, kset =800
Figure 5.30 Horizon settings for the fastest control with the smallest overshoot of processes with non-minimum-phase step response (T1 D 1, 5, and 10 s in the rows and T2 D 10, 20, and 30 s in the columns).
(a)
controlled variables
(b)
manipulated variables
Figure 5.31 Fastest control with the smallest overshoot of the processes with non-minimumphase step response.
gain K p ¤ 1 as λ u,K p ¤1 D K p2 λ u,K p D1
(5.35)
to keep the control behavior unchanged. (Larger gains lead to smaller manipulated variables; thus, the weighting factor of the control increments has to be increased.)
171
172
5 Generalized Predictive Control of Linear SISO Processes Table 5.3 Optimization results for the fastest control with the smallest overshoot of processes with non-minimum-phase step response. Process
T1 [s]
T2 [s]
J
Jset
Jov
Jh
n e1
n e2
nu
λu
1 2 3 4 5 6 7 8 9
1 1 1 5 5 5 10 10 10
10 20 30 10 20 30 10 20 30
5.0 6.0 5.41 8.47 10.2 14.0 9.0 13.01 18.0
5.0 6.0 5.4 8.4 10.2 14.0 9.0 13.0 18.0
0.0 0.0 0.01 0.07 0.0 0.0 0.0 0.01 0.0
0 0 0 0 0 0 0 0 0
3 12 9 7 9 10 8 44 16
107 350 34 122 210 500 241 411 485
7 7 88 37 92 12 12 18 27
0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.5
5.3.5 Simple Rule of Thumb for Tuning Second-Order Aperiodic Processes
From the results of the optimization for the fastest control behavior with the smallest overshoot with aperiodic second-order processes it was possible to find a simple tuning rule by comparison of the optimal controller parameters with different combinations of the characteristic parameters of the process. Because of the limited set of processes examined, this rule is limited to aperiodic second-order processes with a ratio of the time constants within the range 1 < Tbig / Tsmall < 30. (Tbig is the bigger time constant and Tsmall is the smaller time constant.) The simple tuning rules of thumbs are: start of the control error horizon (over the dead time): n e1 D 0.03
Tbig Tsmall I ∆T
(5.36)
end of the control error horizon (over the dead time): n e2
( 5 Tbig /Tsmall C 20 D 1 (Tbig C Tsmall )/∆T C 105 3
for Tbig /Tsmall 10 for Tbig /Tsmall < 10
I
(5.37)
length of the manipulated variable horizon: ( nu D
0.045(Tbig C Tsmall )/∆T
for Tbig /Tsmall 10
0.085(Tbig C Tsmall )/∆T
for Tbig /Tsmall < 10
.
(5.38)
(The calculated values have to be rounded to integer ones.) The optimal weighting factor of the control increments was in all cases the same, λ u D 0.05; see Table 5.1.
5.4 Blocking and Coincidence Points Techniques
The parameters computed on the basis of the rules above and the results of the genetic optimization do not differ much; see Haber et al. [17]. For the other two typical processes, a simple rule of thumb could not be found.
5.4 Blocking and Coincidence Points Techniques
There are two known techniques to reduce the computation time of the predictive control algorithm: 1. Coincidence points: The number of points in the control error horizon at which the cost function is considered can be reduced. The remaining points are called coincidence points. 2. Blocking technique: The manipulated variable is not calculated in every control sampling step but it is kept constant till the next calculation at a later sampling point. By this technique, the dimension of the optimization is reduced. Both techniques reduce the online computation time. Considering the same number of points omitted from the calculation, the blocking technique is more effective. The question is which points in the prediction horizon can be omitted or which changes in the manipulated variable horizon can be set to zero without any unacceptable loss in the control quality. Some heuristic rules and an iterative off-line optimization will be presented for the solution of the problem. By using polynomial process models, one can use a predictive form of the model where each point in the future control error horizon is predicted by one equation using only current and past controlled variables and future manipulated variables. Example 5.27 Predictive equations of a first-order process in vector/matrix form As an example the very simple process model G(q 1 ) D (0.5q 1 )/(1 0.5q 1 ) is used. The predictive equations with the control signals have the following form: y(k O C 1jk) D 0.5y (k) y(k O C 2jk) D 0.25y (k) y(k O C 3jk) D 0.125y (k) .. .
C0.5u(k C 2)
C0.5u(k C 1) C0.25u(k C 1)
C0.5u(k) , C0.25u(k) , C0.125u(k) ,
To use a process model with manipulated signal increments, it is necessary to multiply the denominator polynomial A(q 1) with ∆(q 1 ) D 1 q 1 . The polynomial model then results in B q 1 0.5q 1 ∆ u(k) ∆ u(k) D y (k) D 1 1 A ∆ (q ) (1 q )(1 0.5q 1 ) D
0.5q 1 ∆ u(k) . 1 1.5q 1 C 0.5q 2
173
174
5 Generalized Predictive Control of Linear SISO Processes
The predictive equations with the control increments have the following form: y(k O C 1jk) D 1.5y (k) C0.5y (k 1) C0.5∆ u(k) , y(k O C 2jk) D 1.75y (k)C0.75y (k 1) C0.5∆ u(k C 1)C0.75∆ u(k) , y(k O C 3jk) D 1.88y (k)C0.87y (k 1)C0.5∆ u(k C 2)C0.75∆ u(k C 1)C0.87∆ u(k) , .. .
The matrix equation for the first eight points looks like 2
3 2 y(k O C 1jk) 1.5 6 y(k 7 6 6 O C 2jk)7 6 1.75 6 y(k 7 6 6 O C 3jk)7 61.875 6 7 6 O C 4jk)7 61.938 6 y(k 6 7D6 6 y(k O C 5jk)7 61.969 6 7 6 6 y(k 7 6 6 O C 6jk)7 61.984 4 y(k O C 7jk)5 41.992 y(k O C 8jk) 1.996 2 0.5 0 0 6 0.75 0.5 0 6 60.875 0.75 0.5 6 6 60.938 0.875 0.75 C6 60.969 0.938 0.875 6 60.984 0.969 0.938 6 40.992 0.984 0.969 0.996 0.992 0.984 2 3 ∆ u(k) 6 ∆ u(k C 1)7 6 7 6 ∆ u(k C 2)7 6 7 6 7 6 ∆ u(k C 3)7 6 7. 6 ∆ u(k C 4)7 6 7 6 ∆ u(k C 5)7 6 7 4 ∆ u(k C 6)5 ∆ u(k C 7)
3 0.5 7 0.75 7 7 0.8757 7 0.9387 y (k) 7 0.9697 y (k 1) 7 0.9847 7 0.9925 0.996 0 0 0 0.5 0.75 0.875 0.938 0.969
0 0 0 0 0.5 0.75 0.875 0.938
0 0 0 0 0 0.5 0.75 0.875
0 0 0 0 0 0 0.5 0.75
3 0 07 7 07 7 7 07 7 07 7 07 7 05 0.5
The general form of the predictive equations in vector/matrix form is shown by (5.39): yO full D Ffull y p C Hfull ∆u f .
(5.39)
5.4 Blocking and Coincidence Points Techniques
5.4.1 Coincidence Points Technique
The coincidence points technique means that instead of the complete number of points only some points in the control error horizon are computed and considered by minimizing the cost function. Figure 5.32 demonstrates the principle of reducing the number of points considered in the control error horizon. By means of the coincidence points technique the vector of the predicted outputs is reduced in size, that is, some of the rows of the vector are eliminated from the vector of the predicted outputs. Example 5.28 Predictive equations of a first-order process in vector/matrix form using coincidence points Applied to the simple system from Example 5.27, the beginning and the end of the horizon are set to n e1 D 0 and n e2 D 7 and the coincidence points are ncoinc D [0, 1, 3, 7]. (The additional information of the beginning and the end of the control error horizon is not necessary as the control error is calculated at the coincidence points, but it makes the predictive controller better understandable.) Now the predictive equation in vector/matrix form becomes 2
3 2 3 y(k O C 1jk) 1.5 0.5 6 y(k 7 6 0.75 7 y (k) 6 O C 2jk)7 D 6 1.75 7 4 y(k O C 4jk)5 41.938 0.9385 y (k 1) y(k O C 8jk) 1.996 0.996 2 0.5 0 0 0 0 0 6 0.75 0.5 0 0 0 0 C6 40.938 0.875 0.75 0.5 0 0 0.996 0.992 0.984 0.969 0.938 0.875 2 3 ∆ u(k) 6 ∆ u(k C 1)7 6 7 6 ∆ u(k C 2)7 6 7 6 7 6 ∆ u(k C 3)7 6 7. 6 ∆ u(k C 4)7 6 7 6 ∆ u(k C 5)7 6 7 4 ∆ u(k C 6)5 ∆ u(k C 7)
0 0 0 0.75
3 0 07 7 05 0.5
The general form of the predictive equations in vector/matrix form with coincidence points is yO coinc D Fcoinc y p C Hcoinc ∆u f .
(5.40)
175
176
5 Generalized Predictive Control of Linear SISO Processes 3
3 All points in the control error horizon are viewed
y
Control errors are only considered at the points ne =0, 1, 3, and 7
y 2
2
y(k)
ne1
1
ne2
ne1
1
0
k = -10
k= -5
k= 0
k =5
ne2 control error horizon
control error horizon k= 10
(a)
0
k =-10
k = -5
k =0
k=5
k= 10
(b)
Figure 5.32 Reducing the number of points in the control error horizon.
y
(a)
=
yp
Ffull
+
full size
Hfull
∆uf
ycoinc
(b)
Fcoinc
yp
Hcoinc
∆uf
reduced size
Figure 5.33 Reducing the number of predicted points in the control error horizon.
where Fcoinc and Hcoinc are matrices reduced in size, depending on the number of the coincidence points. As is seen, both measurement vectors y p and ∆u f are of the same size, as with the full-size horizon. Only matrices F and H, which depend on the process model, are reduced in size and, of course, the size of the control error horizon itself is reduced. Figure 5.33 demonstrates the mathematical procedure of using coincidence points in a graphical way. (The arrows show the reduction of the dimension of the vectors and matrices.) 5.4.2 Blocking Technique
The blocking technique means that changes in the future manipulated signal sequence are allowed only at some selected points. Figure 5.34 demonstrates the effect of reducing the number of allowed changes in the manipulated signal sequence. This reduction means that some terms of the vector of the manipulated signal increment sequence ∆u f in the predictive equation are forced to zero, and can then be canceled.
5.4 Blocking and Coincidence Points Techniques u
u
Changes are allowed at all 11 points of the manipulated variable horizon
3
3
2
2
1
1
0 k=-10
k= -5
nu =11, manipulated variable horizon k= 0 k= 5 k=10
(a)
Changes in the manipulated signal are allowed only at the points 0, 1, and 3
0
k=-10
k=-5
nu =11, manipulated variable horizon k=0 k=5 k=10
(b)
Figure 5.34 Reducing the number of allowed changes in the future manipulated signal sequence.
Example 5.29 Predictive equations of a first-order process in vector/matrix form using the blocking technique The same process and control error horizon are considered as in the incremental form of Example 5.27; only the blocking points are selected as nblock D [0, 1, 3]: 2
3 2 3 y(k O C 1jk) 1.5 0.5 6 y(k 7 6 0.75 7 6 O C 2jk)7 6 1.75 7 6 y(k 7 61.875 0.8757 O C 3jk) 7 6 6 7 6 7 6 7 O C 4jk)7 61.938 0.9387 y (k) 6 y(k 7D6 6 7 6 y(k O C 5jk)7 61.969 0.9697 y (k 1) 6 7 6 7 6 y(k 7 6 7 6 O C 6jk)7 61.984 0.9847 4 y(k O C 7jk)5 41.992 0.9925 y(k O C 8jk) 1.996 0.996 2 3 0.5 0 0 6 0.75 0.5 0 7 6 7 60.875 0.75 72 3 0 6 7 ∆ u(k) 6 7 0.5 7 4 60.938 0.875 C6 7 ∆ u(k C 1)5 . 60.969 0.938 0.75 7 6 7 ∆ u(k C 3) 60.984 0.969 0.8757 6 7 40.992 0.984 0.9385 0.996 0.992 0.969
In consequence of the blocking technique, the number of columns in matrix H is reduced according to the number of elements in the vector ∆u f . The general form of the predictive equations in vector/matrix form with the blocking technique is yO full (k) D Ffull y p C Hblock ∆u f,block .
(5.41)
177
178
5 Generalized Predictive Control of Linear SISO Processes
y
Ffull
=
(a)
yp
+
Hfull
full size
∆uf
y
=
(b)
Ffull
yp
+
Hblock ∆uf,block
reduced size
Figure 5.35 Reducing the number of allowed changes in the manipulated variable sequence.
Figure 5.35 demonstrates the blocking technique schematically. The blocking technique not only reduces the size of the matrix equations for the prediction, much more important is the saving of computational effort through the reduction of the dimension of the optimization. 5.4.3 Simultaneous Use of Coincidence Points and Blocking Techniques
It has been shown that the computational effort of predictive control could be reduced by two procedures: It is possible to reduce the number of rows of the model-dependent matrices F and H by the coincidence points technique. It is possible to reduce the number of columns in H and the number of elements in ∆u f by the blocking technique. Of course, it is possible to apply both techniques at the same time and to use the benefits of both as shown in Example 5.30. Example 5.30 Predictive equations of a first-order process in vector/matrix form using the coincidence points and blocking techniques Choose the coincidence points ncoinc D [0, 1, 3, 7] and the blocking nblock D [0, 1, 3] for the process in Example 5.27. 2
3 2 y(k O C 1jk) 1.5 6 y(k 7 6 1.75 O C 2jk) 6 7D6 4 y(k O C 4jk)5 41.938
3 0.5 0.75 7 y (k) 7 0.9385 y (k 1)
y(k O C 8jk) 1.996 0.996 2 3 3 2 0.5 0 0 ∆ u(k) 7 6 0.75 0.5 0 7 4 ∆ u(k C 1)5 C6 40.938 0.875 0.5 5 ∆ u(k C 3) 0.996 0.992 0.969
5.4 Blocking and Coincidence Points Techniques
y
(a)
=
Ffull
yp
+
full size
Hfull
ycoinc =
∆uf
Fcoinc
yp
+ Hcoinc
+block
(b)
∆uf,block
reduced size
Figure 5.36 Reducing the number of predicted points in the control error horizon and the number of allowed changes in the manipulated variable sequence.
The general form of the predictive equations in vector/matrix form with both the coincidence points technique and the blocking technique becomes yO coinc D Fcoinc y p C Hcoinc+block ∆u f,block .
(5.42)
As is seen, only the output measurement vector y p has the same size as with the full-size horizon, that is, without blocking or coincidence points. The dimension of all other matrices is decreased. Figure 5.36 demonstrates the combination of the two techniques. The reduction of the allowed changes in the manipulated variable sequence leads to a lower dimension of the optimization task, and consequently to less computational effort as not all control errors are considered in the future. 5.4.4 Some Heuristic Rules on Allocation of the Coincidence Points
The question is how to allocate the coincidence points in the prediction horizon. A natural way would be to place them equidistantly. On the other hand, it seems better to consider more control errors in the near future than in the far future. Example 5.31 Predictive control of a second-order process using coincidence points The linear second-order process has the following parameters: static gain K p D 1 and time constants T1 D 1 s and T2 D 10 s. This process was controlled by a predictive controller with the settings n e1 D 0, n e2 D 100, n u D 30, λ y D 1, and λ u D 0. The open-loop step response is shown in Figure 5.37a and the closed-loop control with a reference signal step y r (t) D 0 ! 1 in t D 1 s and a disturbance step at the process input v u (t) D 0 ! 1 in t D 15 s is shown in Figure 5.37b. The sampling time was chosen as ∆T D 0.1 s. An optimal allocation of the coincidence points in the control error horizon is searched for to reduce the original 101 points to only 10 remaining points. Equidistantly Spaced Coincidence Points The first idea for the allocation of the points is equidistant allocation in the given horizon; thus, the points are ncoinc D [0, 11, 22, 33, 44, 55, 66, 77, 88, 100]. Figure 5.38a shows the allocation of the coincidence points in the open-loop step and the impulse response and Figure 5.38b gives the closed-loop control together
179
180
5 Generalized Predictive Control of Linear SISO Processes Table 5.4 Comparison of the results of the different methods for the allocation of the coincidence points. Experiment
J
tsim [s]
y ov [%]
t98% [s]
Full horizon Equidistantly spaced Exponentially spaced
11.6 17.7 15.7
83.6 21.6 18.2
7.3 5.0 10.8
7.5 9.5 8.5
with the control without a reduced number of points in the control error horizon, where the latter is indicated by dashed line. It is observable that the control becomes significantly slower and the overshoot is slightly reduced. Exponentially Spaced Coincidence Points On the basis of the previous thoughts, an exponential allocation was tried. With a given length of the control error horizon and a given number of coincidence points, an allocation can be computed according to (5.43): ncoinc [i] D 2(i1) f corr C n e1 ,
with
f corr D
log2 (n e2 n e1 ) , Ncoinc 2
(5.43)
where Ncoinc is the number of coincidence points and the first coincidence point is equal to the beginning of the control error horizon ncoinc [1] D n e1 . For the given example, the coincidence points are ncoinc D [0, 1, 2, 3, 6, 10, 18, 32, 56, 100]. Figure 5.39a shows the allocation of the coincidence points in the open-loop step and the impulse response and Figure 5.39b gives the closed-loop control together with the control signal without a reduced number of points in the control error horizon. It is observable that the control is a little slower than when all the points are considered and the manipulated signal has a significantly smaller overshoot. Comparison of the Heuristic Methods for the Allocation of the Coincidence Points Figure 5.40 shows the control behavior of the methods introduced for the allocation of the coincidence points for the process investigated. Table 5.4 summarizes the features of the control behaviors of all experiments. In the table the cost factor is the 300 P [y r (k) y (k)]2 sum of the quadratic errors over all points of the simulation J D (simulation time t s i m D 30 s, sampling time ∆T D 0.1 s).
kD0
On the basis of the above and further simulations [31, 32], the following conclusions can be drawn. With a reduced number of points in the control error horizon the original control performance cannot be reproduced, at least not without any further modification of the weighting factors. The exponential spacing of the coincidence points leads to the smallest control error (except for the control with the full number of points of course).
5.4 Blocking and Coincidence Points Techniques
181
yr y
h
y
t
k
(a)
open-loop step response
t
(b)
closed-loop control
Figure 5.37 The second-order process examined.
(a)
the allocation of the points
(b)
closed-loop control (dashed line: without, solid line: with coincidence points)
Figure 5.38 Control with equidistantly spaced coincidence points.
(a)
the allocation of the points
(b)
closed-loop control (dashed line: without, solid line: with coincidence points)
Figure 5.39 Control with exponentially spaced coincidence points.
182
5 Generalized Predictive Control of Linear SISO Processes 10 nonreduced
1
u
y
6
0.6
exponentially spaced
exponentially spaced
equidistantly spaced
2 equidistantly spaced
0.2 nonreduced
0
(a)
5
controlled variable
10
t [s]
-2
0
(b)
5
10
t [s]
manipulated signal
Figure 5.40 Comparison of the different methods for the allocation of the coincidence points.
The computation time t s i m is different as the computation of points far in the future needs more computational effort than the computation of points closer to the current time. According to this consideration, the exponential allocation of the coincidence points saves the most computational effort. The maximum overshoot y o v shows that the equidistant allocation of the coincidence points leads to the smallest overshoot. The exponential allocation method resulted in a bit higher overshoot. The settling time shows that the exponential allocation leads to the fastest control behavior. Within the control behaviors examined, the exponentially spaced allocation of the coincidence points offers the best control behavior, and thus the fastest control together with the smallest overshoot.
5.4.5 Some Blocking Techniques
The question is how to reduce the allowed changes in the manipulated variable prediction horizon. Some of the known techniques reduce the degree of freedom of the manipulated variable online (iteratively), whereas others design the blocking strategy off-line and calculate online with the reduced dimension: Cagienard et al. [6] used a time-dependent “moving window blocking”, that is, designed the blocking technique in each control step. van Donkelaar et al. [35] minimized the deviation between the manipulated sequences without and with blocking. Haber et al. [15] recommend keeping the control increment constant during the control horizon. This strategy reduces the optimization dimension to 1 (in SISO case) and leads to smoother control than if only one change is allowed during the control horizon (both methods need the same computation time).
5.4 Blocking and Coincidence Points Techniques
Halldorsson et al. [18] optimized the manipulated sequence only at some few equidistant points of the control horizon. Then the control horizon is halved and the manipulated sequence is optimized in the first half of the control horizon assuming half of the sampling time as before. The iteration is continued until the sampling time of the last iteration achieves the desired value. With this iterative procedure, the optimization dimension is small and the final manipulated signal approximates the optimal one (without blocking) well. Zheng [37] computed only the first term of the manipulated variable sequence and the future control variables were approximated like the controller output of a linear nonpredictive controller. Some other blocking techniques synthesize the manipulated variable sequence during the control from some predefined functions but the number of these basic functions is less than the control horizon length (e.g., [24, 30, 35]). 5.4.6 Optimal Choice of the Coincidence Points and the Blocking Technique
Instead of direct minimization of a cost function of predictive control, the optimal allocation of the coincidence points and of preventing (blocking) some changes in the manipulated variable is chosen so that the control behavior with the reduced number of points will approximate the control behavior considering all the points. The following cost function is minimized: J D Je C Ju C Jh N X
D Cλ e,d e v
y full (k) y r e d (k)
2
kD0
C λ u,d e v
N X
u full (k) u r e d (k)
2
kD0
C λ P e VP e C λ P u VP u ) min , X
N r ed,n e
with
VP e D
(
(5.44)
P n e ,P n u
0 for
P n e [i] 4TΣ ,
i for P n e [i] > 4TΣ ( X 0 for P n u [i] TΣ
iD1
N r ed,n u
and
VP u D
iD1
i
for P n u [i] > TΣ
.
Here the notation is as follows: Nred,n e : reduced number of points in the control error horizon, Nred,n u : reduced number of points in the manipulated variable increments horizon, Pn e : vector of coincidence points, Pn u : vector of allowed changes of the manipulated variable increments,
183
184
5 Generalized Predictive Control of Linear SISO Processes
y full (k): u full (k): y red (k): u red (k): λ e,dev : λ u,d e v : TΣ : λPe: λ P u: N:
controlled signal without coincidence points or blocking, manipulated variable without coincidence points or blocking, controlled signal using coincidence points and blocking, manipulated variable using coincidence points and blocking, weighting factor of the deviations between the controlled signals without and with coincidence points or blocking, weighting factor of the deviations between the manipulated signals without and with coincidence points or blocking, sum of all time constants and the dead time of the process to be controlled, weighting factor of the penalty terms if coincidence points are beyond 4TΣ , weighting factor of the penalty terms if blocking points are beyond TΣ , N D 200 samplings were used during the simulations.
The elements of vectors P n e and P n u are consecutively numbered and each of them represents exactly one point in the corresponding horizon. In cost function (5.44) the quadratic error of the bias between the control behavior without the coincidence points technique or the blocking technique (this is the result from a priori optimization) and the control behavior with these techniques in both the controlled and the manipulated variable are considered. If a coincidence point is beyond 4TΣ or an allowed change for the manipulated variable increment is beyond TΣ , a penalty of “1” is added to the cost function. This penalty term in cost function (5.44) is the third term. The optimization was performed by a genetic optimizer [33]. As the calculation is executed off-line, the relatively long computation time is not a problem. The optimal weighting factor for the manipulated variable increments was found for some typical processes in Section 5.3.4 without using coincidence points or blocking. Nevertheless it is necessary to adapt the weighting factor for the reduced number of points. If the number of points from which an error sum is built is changed, then the ratio between the two terms in the cost function (5.1) of the predictive control is modified. With the reduction of the number of elements of the two sums in (5.1) also the values of the two sums are modified. Usually the number of coincidence points is reduced more than the number of nonblocked points. Therefore, the weighting factor for the manipulated variable increments has to be modified to get the same ratio between the two cost function terms as with an unreduced number of points in the horizons. The adaptation of the weighting factor can simply be calculated by λ u,red D λ u,full
n u,full n e,red , n e,full n u,red
with λ u,full : weighting factor of the manipulated variable increments without coincidence points and blocking,
5.4 Blocking and Coincidence Points Techniques 1.0 y 0.5
u 10
0 1.0 y 0.5
u 10
0 1.0 y 0.5
u 10
0
0
0
0 0
(a)
60 120
k0
60 120
k0
controlled variables
60 120
k
0
(b)
60 120 k
0
60 120 k
0
60 120 k
manipulated variables
Figure 5.41 Control of the aperiodic processes with a reduced number of points in both horizons.
λ u,red : weighting factor of the manipulated variable increments assuming coincidence points and blocking, n u,full : number of allowed changes in the manipulated variable horizon without coincidence points and blocking, n u,red : number of allowed changes in the manipulated variable horizon assuming the blocking technique is used, n e,full D n e2full n e1full C 1: number of control error points considered without coincidence points and blocking n e,red : number of coincidence points in the control error horizon. In the sequel three simulation examples are presented [17]. Example 5.32 Optimization of the coincidence points and blocking for an aperiodic second-order process (continuation of Example 5.24) The resulting control behavior from the optimization for the aperiodic processes given in Example 5.24 is shown in Figure 5.41. The controlled and manipulated signals with the reduced number of points approximate almost exactly the controlled signal without using coincidence points or blocking (see Figure 5.27). The weighting factors in (5.44) were λ e,d e v D 1, λ u,d e v D 0.1, and λ P e D λ P u D 1. Thus, the sum of the bias between manipulated variables u full and u red was weighted significantly lower than the bias between the controlled variables y full and y red . The reason for this weighting strategy is that with a predictive controller the control error is usually weighted with a higher factor than the manipulated variable increments. The optimal allocation of the coincidence points is marked by dots and the optimally allowed changes in the manipulated variable are marked by vertical lines in both the open-loop step and impulse responses of the process in Figure 5.42.
185
186
5 Generalized Predictive Control of Linear SISO Processes 0.009
0.017
1
0.006
g 0
0
70
140
k 0
140 280
k 0
210 420
0
k
0.01
1
0
70
140
k
0
80
160
k
100 200
k
0 0 0.006
140
280
k
0
150 300
k
0
160 320
k
0 0 0.005
210 420
k
0
220
440
k
0
230 460
k
g 0
0 0
80
160
k 0
150 300
k 0
220 440
k
0.008
1
0 0.005
0 0.004
g 0
0 0
(a)
100 200
k 0
160 320
k 0
230 460
k
0 0
(b)
step responses
0
impulse responses
Figure 5.42 Allocation of the coincidence points and the allowed changes in the manipulated variable with the control of the aperiodic processes. 1.0 y 0.5
10 u 5
0.0 1.0 y 0.5
0 10 u 5
0.0 1.0 y 0.5
0 10 u 5
0.0
0 0
(a)
60 120 k 0
60 120 k 0
controlled variables
60 120 k
0
(b)
60 120 k 0
60 120 k
0
60 120 k
manipulated variables
Figure 5.43 Control of the oscillating processes with a reduced number of points in both horizons.
Example 5.33 Optimization of the coincidence points and blocking for an underdamped second-order process (continuation of Example 5.25) Figure 5.43 shows the controlled and the manipulated variables of the resulting control behavior for the control of the oscillating processes given in Example 5.25 with a reduced number of points in both horizons. As can be seen from comparison with Figure 5.29, the control behavior was approximated perfectly for both the controlled and the manipulated variables. Figure 5.44 shows the optimization results by means of the open-loop step and impulse responses with the coincidence points marked by dots and the allowed changes in the manipulated variable marked by vertical lines.
Example 5.34 Optimization of the coincidence points and blocking for a secondorder process with inverse response step response (continuation of Example 5.26) Figure 5.45 shows the controlled and the manipulated variables of the resulting control behavior for the control of the processes with non-minimum-phase step response given in Example 5.26 with a reduced number of points in both horizons. As
5.4 Blocking and Coincidence Points Techniques
0
h 1
0.04
g 0 0
40 80
k
0
70 140 k 0 140 280 k
h 1 0
0.03
0.024
h 1
187
0.048
0 0 40 80
k
0 20 40
k
0 10
k
0.06
0
70 140 k
0 0 140 280 k 0.081
g
0
0 0
20 40
k
0 30 60
k
0 70 140 k
0.072
0.091
0 30 60
k
0 20 40
k
0 0 0.121
70 140 k
g
0 0 10 20 30
k 0
(a)
20 40
k 0 40 80
0
k
30
(b)
step responses
0
0
impulse responses
Figure 5.44 Allocation of the coincidence points and the allowed changes in the manipulated variable with the control of the oscillating processes. 20 u 10
1.0 y 0.5 0.0
0 20 u 10
1.0 y 0.5 0.0
0 20 u 10
1.0 y 0.5 0.0
0 0
(a)
60
120
k
0
60
120
k
0
controlled variables
60
120
k
0
(b)
60 120
k 0
60 120
k 0
60 120
k
manipulated variables
Figure 5.45 Control of the processes with non-minimum-phase step response with a reduced number of points in both horizons.
is seen, the control behavior and the manipulated variables are approximated nearly perfectly compared with the case without coincidence points or blocking (see Figure 5.31). Figure 5.46 shows the optimization results by means of the open-loop step and impulse responses of the processes with non-minimum-phase step response, again with the coincidence points marked by dots and the allowed changes in the manipulated variable marked by vertical lines.
By the use of genetic optimization, the control behavior without using the coincidence points and blocking technique could be approximated. All three examples almost perfectly approximate the performance without reduction by using a reduced number of points in both horizons. In this way the online computational demand was reduced drastically, as the numbers of points in the two horizons were reduced from many hundreds to only 20 in the control error horizon and to 10 in the manipulated variable horizon.
0 40 80
k
188
5 Generalized Predictive Control of Linear SISO Processes
h
g
k
k
k
k
k
k
k
k
k
k
k
h
g
k
k
k
h
g k
(a)
k
step responses
k
k
(b)
impulse responses
Figure 5.46 Allocation of the coincidence points and the allowed changes in the manipulated variable with the control of the processes with non-minimum-phase step response.
5.5 Measured Disturbance Feed-Forward Compensation
If the disturbance can be measured, then it can be compensated for by feedforwarding it to the controller. Of course, physical constraints cannot be ignored. Perfect disturbance compensation cannot be achieved if the process has a longer dead time than the delay of the effect of the disturbance to the process output. The measured disturbances can be considered differently in a nonpredictive and a predictive control algorithm: With nonpredictive, for example, Proportional plus Integral (plus Derivative) (PI(D)) control, only the effect of the disturbance till the current time point can be taken into account. With predictive control, the effect of the future disturbances can also be considered if they are known or can be predicted. Two simple examples show how the disturbance feed-forward with predictive control works. Example 5.35 One-step-ahead control of a first-order process without dead time, with a prediction length of 1 in the case of measured disturbance at the process input The one-step-ahead prediction of a first-order process without dead time is (see Chapter 3) yO (k C 1jk) D (1 a 1 )y (k) C a 1 y (k 1) C h 1 ∆ u(k) . As the disturbance at the process input has the same effect as the manipulated variable, the predicted output due to the disturbance is yO d i s t (k C 1jk) D (1 a 1 )y (k) C a 1 y (k 1) C h 1 ∆v m (k) .
(5.45)
5.5 Measured Disturbance Feed-Forward Compensation
(a)
controlled signal
(b)
manipulated variable
Figure 5.47 Stepwise disturbance at the process input, one prediction step.
As the current disturbance value v m (k) can be measured, (5.45) belongs to the free response as well. The forced response was given by (5.16). The cost function with n e1 D 0, n e2 D 0, n u D 1, and λ y D 1, 2 J(∆u(k)) D y r (k C 1) yO (k C 1jk) C λ u ∆ u2 (k) , was minimized in Example 5.1 by (5.17). Figure 5.47 shows the control for different weighting factors λ u D 0, 0.5, and 1 if the reference signal is changed stepwise from 0 to 1 at t D 2 s and the disturbance is changed from 0 to 1 at t D 6 s. The process parameters are as follows: static gain K p D 2, time constant T1 D 1 s, and sampling time ∆T D 1 s. Comparing Figures 5.47 and 5.1a, one can see that the effect of the disturbance at the output is much less with feed-forward than without it and with λ u D 0 the disturbance is totally rejected.
Example 5.36 Long-range control with a prediction length of 2 and with one allowed change in the manipulated variable of a first-order process without dead time in the case of measured disturbance at the process input The two-steps-ahead prediction is given by (5.18)–(5.20). The free response depending on the manipulated variable has to be extended by all terms of the effect of the disturbance on the output: yOfree (k C 2jk) D (1 a 1 C a 21 )y (k) C (1 a 1 )a 1 y (k 1) C h 2 ∆v m (k) C h 1 ∆v m (k C 1) . The cost function with n e1 D 0, n e2 D 1, n u D 1, and λ y D 1, 2 O C 1jk) J(∆u(k)) D y r (k C 1) y(k 2 C y r (k C 2) y(k O C 2jk) C λ u ∆ u2 (k) C ∆ u2 (k C 1) , was minimized under the condition ∆ u(k C 1) D 0 in Example 5.2 and the result was given by (5.21). Figure 5.48 shows the same control scenario of the same process as in Example 5.2. It is seen that disturbance rejection is better than in Figure 5.1b. The predictive controller sees the disturbance in advance and begins to compensate for it before the disturbance occurs. The manipulated variable and
189
190
5 Generalized Predictive Control of Linear SISO Processes
(a)
controlled signal
(b)
manipulated variable
Figure 5.48 Stepwise disturbance at the process output, two prediction steps.
consequently also the controlled variable increase before the disturbance decreases the controlled variable. This phenomenon is a consequence of the fact that the prediction horizon is longer than the manipulated variable horizon and only one change in the manipulated variable is calculated in each control step.
Example 5.37 One-step-ahead control of a first-order process without dead time, with a prediction length of 1 in the case of measured disturbance at the process output The effect of the disturbance at the output is B q 1 B q 1 y(k) O D u(k) C v m (k) D ∆ u(k) A (q 1 ) (1 q 1 )A (q 1 ) 1 A q C ∆v m (k) (1 q 1 )A (q 1 ) or yO (k C1jk) D (1 a 1 )y (k)C a 1 y (k 1)C h 1 ∆ u(k)C ∆v m (k C1)C a 1 ∆v m (k) . (5.46) The free response is given by yOfree (k C 1jk) D (1 a 1 )y (k) C a 1 y (k 1) C a 1 ∆v m (k) C ∆v m (k C 1) and the forced response is yOforc (k C 1jk) D h 1 ∆ u(k) . The cost function minimized is the same as in Examples 5.1 and 5.35. Figure 5.49 shows the same control scenario of the same process as in Example 5.35. It is seen that in the case of λ u D 0 the disturbance is totally rejected.
5.5 Measured Disturbance Feed-Forward Compensation
(a)
controlled signal
(b)
manipulated variable
Figure 5.49 Stepwise disturbance at the process output, one prediction step.
(a)
controlled signal
(b)
manipulated variable
Figure 5.50 Stepwise disturbance at the process output, two prediction steps.
Example 5.38 Long-range control with a prediction length of 2 and with one allowed change in the manipulated variable of a first-order process without dead time in the case of measured disturbance at the process output Shifting the one-step-ahead prediction (5.46) and substituting the future output values by past ones, y(k O C 2jk) D (1 a 1 )y (k C 1jk) C a 1 y (k) C a 1 ∆v m (k C 1) C ∆v m (k C 2) C h 1 ∆ u(k C 1) D (1 a 1 ) (1 a 1 )y (k) C a 1 y (k 1) C a 1 ∆v m (k) C∆v m (k C 1) C h 1 ∆ u(k) C a 1 y (k) C a 1 ∆v m (k C 1) C ∆v m (k C 2) C h 1 ∆ u(k C 1) , leads to (5.18) with the forced response (5.20) and the free response yOfree (k C 2jk) D 1 a 1 C a 21 y (k) C (1 a 1 )a 1 y (k 1) C (1 a 1 )a 1 ∆v m (k) C ∆v m (k C 1) C ∆v m (k C 2) . The control algorithm is the same as in Examples 5.2 and 5.36. Figure 5.50 shows the same control scenario of the same process as in Example 5.36. (See also the explanation in Example 5.36.)
From the simulation plots and from theoretical considerations, it follows that the measured disturbance can be compensated for completely if
191
192
5 Generalized Predictive Control of Linear SISO Processes
(a)
controlled variable
(b)
manipulated variable
Figure 5.51 Predictive control of a linear third-order process with knowledge of and without knowledge of the future disturbance signal.
the current, past, and future disturbance values are known, the control increments are not weighted (however, in this case big control changes may occur). In Section 3.2 it was shown how to derive generally predictive equations of a process with measurable and nonmeasurable disturbances. The known parts of the disturbance effects on the future outputs can be considered as parts of the free response and if they are included in the control algorithm, better disturbance rejection can be obtained. Example 5.39 Predictive control of a linear third-order process knowing the disturbance in advance Figure 5.51 shows the predictive control of a linear third-order process if the future course of the disturbance signal is known for n d i s t,p r e steps. The process parameters are as follows: static gain K p D 1 and three equal time constants of T1 D T2 D T3 D 1/3 s. The set value was increased stepwise from 0 to 1 at t D 1 s and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was ∆T D 0.1 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ u D 0.1, and λ y D 1. In the case of a preview, the control starts n d i s t,p r e steps before the disturbance change and compensates for the disturbance earlier than without a preview. As is seen, in the case of a preview the manipulated signal starts acting before the change of the disturbance. As the future course of the reference signal is not known in advance, the control starts to move the manipulated signal after the change in the reference signal.
5.6 Control Algorithm with Constraints
5.6 Control Algorithm with Constraints 5.6.1 Physical Constraints
Constraints mean the limitation of any signal (manipulated variable, controlled output, or state variable) or any function of the such signals, for example, their increments. The limits can be a lower limit, an upper limit or a band limit, which means both lower and upper limits. Figure 5.52 illustrates a minimum, a maximum, and a band limit. For the case of a constant reference signal step y r , y r yO (k C d C n e C 1) ,
n e1 n e n e2 ,
some possible limits in control loops are listed [7]: Avoiding overshoots: y(k O C d C n e C 1jk) y r ; n e1 n e n e2 I Ensuring a monotonic controlled variable (i.e., neither oscillating nor overshooting): O C d C n e C 1) I y(k O C d C n e jk) y(k
n e1 n e n e2 I
Eliminating inverse response phenomena: y(k O C d C n e C 1jk) y(k O C d) I
(a) minimum and maximum limits Figure 5.52 Different limit types.
(b)
n e1 n e n e2 .
band limit
193
194
5 Generalized Predictive Control of Linear SISO Processes
5.6.2 Mathematical Formulation of Typical Constraints
In the sequel some practical constraints are considered:
limitation of the control increments (items 1 and 2 below), limitation of the manipulated signal (items 3 and 4 below), limitation of the controlled variable (items 5 and 6 below), limitation of the change in the controlled variable (items 7 and 8 below).
(The dimension of the vectors and matrices used are also shown.) 1. Frequent and large positive changes in the manipulated variable may cause wear of the valves. The maximum control increments are limited below ∆ u up > 0 if ∆ u(k C j ) ∆ u up , j D 0, 1, . . . , n u 1 , 3 2 2 1 0 0 ∆ u(k) 7 6 . 7 6 6 . ∆ u(k C 1) . 0 7 6 0 1 6 6 7 6 . . . .. .. 7 6 . .. 4 . .. 5 . 4 . ∆ u(k C n u 1) 0 0 1 (n n ) u
3
2
7 6 7 6 76 5 4
∆ u up ∆ u up .. . ∆ u up
3 7 7 7 5
. (n u 1)
u
2. Frequent and large negative changes in the manipulated variable may cause wear of the valves. The minimum control increments are limited over ∆ u low < 0 if ∆ u(k C j ) ∆ u low , j D 0, 1, . . . , n u 1 , 3 2 2 1 0 0 ∆ u(k) 7 6 .. 7 6 6 ∆ u(k C 1) . 0 7 6 0 1 6 6 7 6 . . . . .. 7 6 . .. 4 . . .. 5 . 4 . ∆ u(k C n u 1) 0 0 1 (n n ) u
u
3
2
7 6 7 6 76 5 4
∆ u low ∆ u low .. . ∆ u low
3 7 7 7 5
. (n u 1)
(The limitation of the control increments above a given positive value ∆ u l o w > 0 has no sense, as in the steady state ∆ u(k) D 0.) 3. The maximum manipulated variable, such as valve stroke or flow, is limited through the pipe diameter and the valve size. The upper limit of the manipu-
5.6 Control Algorithm with Constraints
lated signal is ensured if u(k C j ) D
nX u 1
∆ u(k C j ) C u(k 1) u up
j D0
!
nX u 1
∆ u(k C j ) u up u(k 1) I
j D 0, 1, . . . , n u 1
j D0
3 2 1 0 0 ∆ u(k) 6 1 1 0 7 6 ∆ u(k C 1) 7 6 6 6 6 . . . .. 7 .. . . . 4 . . 4 . . 5 . 1 1 1 (n n ) ∆ u(k C n u 1) u u 2 3 u up u(k 1) 6 u up u(k 1) 7 6 7 6 . 7 .. 4 5 . 2
u up u(k 1)
3 7 7 7 5
(n u 1)
4. Usually pumps transport materials such as heating gas in one direction to the furnace. In this case the manipulated variable is always positive. The lower limit of the manipulated signal is ensured if u(k C j ) D
nX u 1
∆ u(k C j ) C u(k 1) u low
j D0
!
nX u 1
∆ u(k C j ) u(k 1) u low I
j D 0, 1, . . . n u 1
j D0
3 2 ∆ u(k) 1 0 0 6 6 1 1 0 7 ∆ u(k C 1) 7 6 6 6 6 . .. 7 .. .. .. 5 4 4 .. . . . . 1 1 1 (n n ) ∆ u(k C n u 1) u u 2 3 u(k 1) u low 6 u(k 1) u low 7 6 7 6 . 7 .. 4 5 . 2
u(k 1) u low
3 7 7 7 5
(n u 1)
5. Controlled signals are often limited in practice. For example, air pollution is limited by environmental laws, and oxygen and carbon monoxide concentrations are limited by firing. The controlled output signal can be constrained via its predicted values. The predicted output can be calculated by the sum of the free and the forced responses. This value should be less than its upper limit over the prediction horizon. y(k O C d C 1 C n e ) y up ,
n e1 n e n e2 ,
195
196
5 Generalized Predictive Control of Linear SISO Processes
as yO D H∆u f C yO free ! H∆u f yup yO free I thus, 2
3 3 2 h n e1 C1 h n e1 h n e1 n u C2 ∆ u(k) 6 h n e1 C2 h n e1 C1 h n e1 n u C1 7 7 6 ∆ u(k C 1) 6 7 7 6 6 6 7 7 . .. .. . . . . . 4 5 5 4 . . . . . h n e2 C1 h n e2 h n e2 n u C2 (n n ) ∆ u(k C n u 1) u u 2 3 y up y free (k C d C n e1 C 1jk) 6 y up y free (k C d C n e1 C 2jk) 7 7 6 6 . 7 .. 4 5 . y up y free (k C d C n e2 C 1jk) (n 1) (5.47) u
6. Similarly to the last case, the controlled output signal can be constrained by a lower limit y(k O C d C 1 C n e ) y low , n e1 n e n e2 , as yO D H∆u f C yO free ! H∆u f ylow yO free ! H∆u f yO free ylow I thus, 2 6 6 6 4 2 6 6 6 4
h n e1 h n e1 C1 .. .. . . h n e2 3 2 ∆ u(k) 7 6 ∆ u(k C 1) 7 6 76 .. 5 4 .
h n e1 C1 h n e1 C2 .. . h n e2 C1
∆ u(k C n u 1)
h n e1 n u C2 h n e1 n u C1 .. . h n e2 n u C2
3 7 7 7 5 (n u n u )
yO free (k C d C n e1 C 1jk) y low yO free (k C d C n e1 C 2jk) y low .. . yOfree (k C d C n e2 C 1jk) y low
3 7 7 7 5
. (n u 1)
7. Often big changes in the controlled signal are not allowed, for example, a fast temperature increase may damage a boiler. The change of the controlled output signal can be constrained via its predicted values. The predicted output increment can be calculated by the sum of its free and forced responses and this value should be less than its upper limit over the prediction horizon. ∆ y(k O C d C 1 C n e ) ∆y up ,
n e1 n e n e2 ,
5.6 Control Algorithm with Constraints
as ∆Oy D G∆u f C ∆Oyfree ! G∆u f ∆yup ∆Oyfree I thus, 2
3 2 g n e1 g n e1 n u C2 g n e1 C1 ∆ u(k) 6 g n e1 C2 g n e1 C1 g n e1 n u C1 7 6 ∆ u(k C 1) 6 7 6 6 6 7 .. .. .. .. . . 4 5 4 . . . . . g n e2 C1 ∆ u(k C n u 1) g n e2 g n e2 n u C2 (n n ) u u 3 2 ∆y up ∆y free (k C d C n e1 C 1) 6 ∆y up ∆y free (k C d C n e1 C 2) 7 7 6 . 6 7 .. 5 4 . ∆y up ∆y free (k C d C n e2 C 1)
3 7 7 7 5
(n u 1)
8. The controlled signal increments can be limited over a lower limit ∆y low < 0 in a way similar to the limitation below an upper limit: ∆ y(k O C d C 1 C n e ) ∆y low ,
n e1 n e n e2 ,
as ∆Oy D G∆u f C ∆Oyfree ! G∆u f ∆ylow ∆Oyfree I thus, 3 2 g n e1 g n e1 n u C2 ∆ u(k) g n e1 C1 6 6 g n e1 C2 g n e1 C1 g n e1 n u C1 7 ∆ u(k C 1) 7 6 6 6 7 6 . .. .. . . .. .. .. 5 4 4 . . g n e2 C1 g n e2 g n e2 n u C2 (n n ) ∆ u(k C n u 1) u u 2 3 ∆y low ∆y free (k C d C n e1 C 1) 6 ∆y low ∆y free (k C d C n e1 C 2) 7 7 6 6 . 7 .. 4 5 . ∆y low ∆y free (k C d C n e2 C 1) (n 1) 2
3 7 7 7 5
u
(The limitation of the change of the controlled signal above a given positive value ∆y low > 0 has no sense, as in the steady state ∆y (k) D 0.) All six constraint types can be generally formulated as linear matrix inequalities of the form Aconstr ∆u f bconstr . These inequalities can be considered in the optimization of the cost function as constraints.
197
198
5 Generalized Predictive Control of Linear SISO Processes
Of course, any other signals in addition to the controlled output can be limited. Then the constraints have to be set up for these signals using the step response coefficients of the model between the manipulated and the constrained signals. Further on the limits may be assumed to be not constant during the prediction. 5.6.3 Hard and Soft Constraints
Constraints can be divided into hard constraints, which cannot be violated, for example, the maximum flow in a pipe or valve, soft constraints, which should not be violated but can be violated for a short period, for example, the allowed environmental pollution. If this limit is exceeded occasionally a fine has to be paid but the operation does not have to be stopped immediately. Figure 5.53 shows the limits of hard and soft constraints graphically. Soft constraints can be handled by additional quadratic terms in the quadratic cost function: Considering a lower limit (y low ): Jadd, low D
n e2 X
λ low [y low C δ low y(k O C d C 1 C n e jk)]2 I
n e Dn e1
y(k O C d C 1 C n e jk) y low or Jadd, low D
n e2 X
λ low [y low C δ low y(k O C d C 1 C n e jk)]2
n e Dn e1
sgn (y low y(k O C d C 1 C n e jk)) .
(a) hard constraints
(b) soft constraints
Figure 5.53 Hard and soft constraints.
(5.48)
5.6 Control Algorithm with Constraints
Considering an upper limit (y up ): Jadd, up D
n e2 X
λ up [y up δ up y(k O C d C 1 C n e jk)]2 I
n e Dn e1
y(k O C d C 1 C n e jk) y up
(5.49)
or Jadd, up D
n e2 X
λ up [y up δ up y(k O C 1 C d C n e jk)]2
n e Dn e1
sgn y(k O C 1 C d C n e jk) y up . Here the signum function is defined as ( 1 if x > 0 sgn(x) D . 0 if x 0 It is advisable to use big weighting factors λ low and λ up compared with the weighting factors of the cost function of predictive control, to fit the bias δ low > 0 and δ up > 0 to the practical problem. The additional quadratic term should be considered only if the conditions given in (5.48) and (5.49) are fulfilled. The solution of this minimization problem is more complicated than minimization without these conditions. However, in practical cases the controlled output signal is usually constrained between a lower and an upper bound; thus, such a minimization algorithm is required in any case. For the optimizer there is no difference between a controlled and a constrained variable. Variables to be constrained should also be considered similarly to the controlled output variables, which means a model between the manipulated variable (and if possible between the measurable disturbances) and the limited variable has to be set up as well. If the constraints must not be violated, the cost function of predictive control has to be minimized under hard constraints, that is, under linear inequality constraints as shown in the previous section. The known algorithms are: Quadratic programming: The cost function has to be minimized in every control step. Depending on the constraints and the current reference signal sequence, it may happen that no manipulated signal sequence can be found which fulfills all the requirements. In spite of this so-called feasibility problem, Model-based Predictive Control (MPC) algorithms are used in numerous industrial applications successfully. A detailed discussion of the problem and some solutions preventing infeasibility are presented in Camacho and Bordons [7].
199
200
5 Generalized Predictive Control of Linear SISO Processes
Multiparametric programming: An alternative method for linear systems is to calculate all possible control signal sequences depending on the current value of the state variables in advance off-line. Then in all control steps the control algorithm can be performed with knowledge of the current state variables. The algorithm is discussed in detail in Bemporad et al. [3], Borrelli [5], and Goodwin et al. [14]. Quadratic programming has a high online computational demand. With multiparametric programming, however, some calculations can be done off-line and fewer calculations have to be performed online. 5.6.4 Explicit MPC with Multiparametric Programming without Online Optimization
As already mentioned in Section 5.6.3, an optimal method for constrained predictive control of linear systems is using so-called multiparametric programming. The algorithm uses the state space representation of the system. Optimal control actions are computed off-line as functions of all feasible values of the state variables. Then in every control step the control algorithm can be performed with knowledge of the current state variables using a look-up table. The computational effort required by this kind of implementation is typically much less than with quadratic programming as online optimization is not executed. The algorithm presented here is based on Kvasnica [21]. It consists of three steps: optimization of a quadratic cost function by multiparametric programming, defining the quadratic cost function of predictive control for zero reference signal, defining the quadratic cost function of predictive control for nonzero reference signal. Some simulation results are given in Section 5.6.5. 5.6.4.1 Optimization by Multiparametric Programming By means of multiparametric programming a quadratic cost function of an optimization vector variable z (later the vector of the manipulated value sequence in the control horizon) and a parameter x (later the initial state of the system) is minimized according to the vector variable z with subject to constraints both in x and in z. Consider the following strictly convex quadratic programming problem of the cost function:
J(z) D x T (k)K x x x(k) C x T (k)K x z z(k) C z T (k)K z z z(k) ) min . z
(5.50a)
5.6 Control Algorithm with Constraints
The optimization variable z is of dimension n z , and the vector of the parameters x is of dimension n x . The optimization has to be solved subject to the constraints Kconstr, z z 6 kconstr, x0 C Kconstr, x1 x ,
(5.50b)
x 2 Σ constr .
(5.50c)
Σ constr is a convex polyhedral set which contains all the feasible x values. (A polyhedron is a set that equals the intersection of a finite number of closed half-spaces.) K z z and K x x are positive-definite symmetrical matrices of dimension n z n z and n x n x , respectively. The dimensions of the other matrices and vectors are as follows: K x z is of dimension n x n z , Kconstr, z of n constr, z n z , kconstr, x0 of n constr, z , and Kconstr, x1 of n constr, z n x , where n constr, z denotes the number of rows of Kconstr, z , that is, the number of constraints. Let us denote the set of x for which (5.50) has a feasible solution by Ωconst Σ constr . Without loss of generality it can be assumed [4] that the set Ωconst is full-dimensional and for all x 2 Ωconst the set of feasible solutions z D z(x) D fzjKconstr, z z 6 kconstr, x0 C Kconstr, x1 xg is nonempty. Under these assumptions the optimal solution zopt can be obtained explicitly as a PieceWise Affine (PWA) function for all parameters x 2 Ωconst . (A scalar function f (x) is PWA if there exists a partition <1 , <2 , . . . , < n part of x and f (x) D k x0,i Ck Tx1,i x, for all x 2 < i , i D 1, 2, . . . , n part . Here k x0,i is a scalar and k x1,i is a vector. A similar definition is valid for a PWA vector function – with a higher dimension of the coefficients.) The solution of (5.50) can be obtained on the basis of the following considerations [21, 22]: 1. The set of feasible parameters Ωconst is a polyhedron with the closure given x x x 6 k0constr g, where Kconstr is a matrix and k0constr is a vector by Ωconst D fxjKconstr defining the region Ωconst . 2. Ωconst is partitioned into a finite number n part of convex polyhedral regions < i 0 x x with a closure < i D fxjKconstr, i x 6 kconstr, i g, i D 1, 2, . . ., n part , where Kconstr, i is a 0 matrix and kconstr, i is a vector defining the region < i . 3. The optimal solution zopt is a continuous PWA function of the state zopt D zopt (x) in every region i D 1, 2, . . ., n part . 4. The optimizer is affine in each region, that is, zopt can be expressed as zopt D zopt (x) D k x0,i C K x1,i x(k), if x 2 < i , where k x0,i is a vector of dimension n z and K x1,i is a matrix of dimension n z n x for i D 1, 2, . . ., n part . The above properties suggest that the optimal solution zopt (x) of (5.50) can be precalculated for all feasible values of the parameter x and stored as a PWA function. The computation of such a function for a given value of x is usually faster compared with solving problem (5.50) with quadratic programming using off-the-shelf software for small to intermediate-size problems. Many multiparametric programming solvers of (5.50) have been developed (see, e.g., Baotic [2], Bemporad et al. [4]) and some of them are implemented in the Multi-Parametric Toolbox [22].
201
202
5 Generalized Predictive Control of Linear SISO Processes
5.6.4.2 Linear PWA State Feedback Solution of MPC for Zero Reference Signal Let us consider the linear SISO CARMA model given by the state space representation introduced in Section 2.3:
x(k C 1) D A x x(k) C b x u(k) , y (k) D c x x(k) .
(5.51)
For simplicity the dead time is not considered explicitly. Further, first the reference signal is assumed to be zero, that is, the state x has to be controlled from its initial (current) value x(k) to zero state. The optimal manipulated signal sequence is denoted in analogy to (5.7) by u f D [u(k), u(k C 1), . . . , u(k C n u 1)] T .
(5.52)
The cost function to be minimized is similar to (5.9): J1 (u f ) D
n e2 X
x T (k C 1 C n e jk)Λ x x(k C 1 C n e jk) C
n e D0
nX u 1
λ u u2 (k C j )
j D0
D x T (k)Λ x1 x(k) C x T (k C n e2 C 1jk)Λ x,n e2 C1 x(k C n e2 C 1jk) C
n e2 X T x (k C n e jk)Λ x x(k C n e jk) C λ u u2 (k C j ) ) min . uf
n e D0
(5.53a) The meaning of the weighting coefficients differs from the meaning of those in (5.9) as the cost function includes the control signal instead of the control increments. In (5.9) the cost function depends on the output signal (besides the manipulated variable) instead of all state variables. By proper selection of the weighting matrix of the state variables, the cost function (5.53a) depends also only on the output signal (besides the manipulated variable). The minimization of (5.53a) is equivalent to the minimization of the cost function (5.53b), J(u f ) D x T (k C n e2 C 1jk)Λ x,n e2 C1 x(k C n e2 C 1jk) C
n e2 X T x (k C n e jk)Λ x x(k C n e jk) C λ u u2 (k C j ) ) min, n e D0
uf
(5.53b) as the quadratic term x T (k)Λ x1 x(k) depends only on the initial (current) state and cannot be influenced by the control signal. (The cost function (5.53b) was used in Bemporad et al. [4] introducing the explicit solution of predictive control with constraints.) The optimization horizon is from n e1 D 0 to n e2 and the number of changes in the manipulated signal sequences is assumed to be equal to the length of the prediction horizon n u D n e2 C 1. The system equation is described by (5.51) and it has to be considered as a constraint during the optimization of (5.53b): x(k C 1 C n e ) D A x x(k C n e ) C b x u(k C n e ) I
n e D 0, 1, . . . , n e2 . (5.54a)
5.6 Control Algorithm with Constraints
Physical constraints are given for the state during the control x(k C n e ) 2 Xconstr ,
n e D 0, 1, . . . , n e2 ,
(5.54b)
together with the terminal constraint in the last step t er mi nal x(k C n e2 C 1) 2 Xconstr Xconstr
(5.54c)
and with constraints for the manipulated variable sequence u(k C n e ) 2 Uconstr ,
n e D 0, 1, . . . , n e2 .
(5.54d)
t er mi nal All constraint sets Xconstr , Xconstr , and Uconstr are of polyhedral type containing the origin in their interiors, that is,
˚ x x Xconstr W Kconstr , n e D 0, 1, . . . , n e2 , x(k C n e ) 6 kconstr o n x,t e r m i n a l x,t e r m i n al t er mi nal , Xconstr W Kconstr x(k C n e2 C 1) 6 kconstr
(5.55b)
˚ u u Uconstr W kconstr , u(k C n e ) 6 kconstr
(5.55c)
(5.55a)
n e D 0, 1, . . . , n e2 .
The future state values depend on the initial state and the manipulated sequence according to (3.84) with d D 0: x(k C n e ) D A nx e x(k) C
nX e 1
j
A x b x u(k C n e j ) .
(5.56)
j D0
The state vectors of different time points in the cost function (5.53b) are combined to form a single vector: T xQ D x T (k), x T (k C 1jk), . . . , x T (k C n e2 C 1jk) .
(5.57)
By means of (5.56) and (5.57), the following equation can be set up: Q x x(k) C BQ x u f , xQ D A
(5.58)
with 2 6 6 6 Q Ax D 6 6 6 4
I Ax A2x .. . A xn e2 C1
3 7 7 7 7, 7 7 5
2 6 6 6 QB x D 6 6 6 4
0 bx Ax bx .. . A nx e2 b x
0 0 bx .. . A xn e2 1 b x
.. .
0 0 0 .. . bx
3 7 7 7 7. 7 7 5
The cost function (5.53b) can be rewritten in the following form: Q x xQ C u T Λ Q u u f ) min , J (u f ) D xQ T Λ f uf
(5.59)
203
204
5 Generalized Predictive Control of Linear SISO Processes
Q x D diaghΛ x , . . . , Λ x , Λ x,n C1 i has the dimension n e2 C 2 and Λ Qu D where Λ e2 diaghλ u , . . . , λ u i has the dimension n u D n e2 C 1. Substituting (5.58) into expression (5.59) leads to Q x Ax(k) Q uu f Q Q f C uTf Λ Q Q f TΛ J (u f ) D Ax(k) C Bu C Bu Q u uf Q x Ax Q x BQ C Λ QTΛ Q (k) C u Tf BQ T Λ D x T (k)A Q x Bu Q x Ax QTΛ Q f C u Tf BQ T Λ Q (k) ) min . C x T (k)A
(5.60)
uf
The cost function (5.60) can be rewritten with the notation T Q u, Q x BQ C Λ K uu D BQ Λ
Q x A, Q QTΛ Kx x D A
Q x BQ QTΛ and K x u D 2A
into the form of (5.61), J (u f ) D x T (k)Kx x x T (k) C x T (k)Kx u u Tf (k) C u Tf (k)K uu u f ) min , (5.61) uf
and has to be minimized subject to the constraint Kconstr, u u f 6 kconstr, x0 C Kconstr, x1 x(k) .
(5.62)
The quadratic cost function (5.61) with the linear inequality equations (5.62) has the form of (5.50) considering u f D z. Consequently, the cost function (5.61) can be minimized by multiparametric programming. Further, the solution minimizes the cost function of predictive control with respect to the constraints (5.54). The solution is given as a PWA function of x(k): u f D u f (x(k)) D k x0,i C K x1,i x(k) ,
i D 1, 2, . . . , n part ,
(5.63)
where k x0,i is a vector of dimension n u and K x1,i is a matrix of dimension n u n x , which provide the state feedback gains for all n part polyhedral regions < i of the state space. According to receding horizon strategy, the current manipulated signal is applied to the process and the cost function is minimized in the next control step again. Hereby the online optimization reduces to searching the precalculated coefficients for the state space control depending on the current state variable. 5.6.4.3 Linear PWA State Feedback Solution of MPC for Nonzero Reference Signal The cost function (5.53b) can be extended to the case of nonzero reference signal. The manipulated variable in (5.53b) should be replaced by the control increments to include an integrator in the controller and consequently to track a constant reference state x r without steady-state error. (The reference state x r can be calculated with knowledge of the state space equation of the process model and the set value y r of the controlled variable.) The new cost function to be minimized with respect
5.6 Control Algorithm with Constraints
to the control signal increments is J(∆u f ) D (x(k C n e2 C 1jk) x r ) T Λ x,n e2 C1 (x(k C n e2 C 1jk) x r ) n e2 h X (x(k C n e2 jk) x r ) T Λ x (x(k C n e2 jk) x r ) C n e D0
i C λ u ∆ u2 (k C n e jk) ) min . ∆u f
(5.64)
(The meaning of the weighting coefficients in Λ x and λ u differs from the meaning of those in (5.53) as the cost function now includes the control increments.) In (5.9) the cost function depends on the output signal (besides the manipulated variable) instead of all state variables. By proper selection of the weighting matrix of the state variables, the cost function (5.64) depends also only on the output signal (besides the manipulated variable). To use multiparametric programming instead of process model (5.51), an augmented linear model with the control increments as inputs is set up: 3 2 Ax x(k C 1) 4 u(k) 5 D 4 0 0 xr 2
bx 1 0
32 3 2 3 0 x(k) bx 0 5 4 u(k 1) 5 C 4 1 5 ∆ u(k) . I xr 0 (5.65)
The new augmented state variable (with dimension n x ) is 3 x(k) D 4 u(k 1) 5 xr 2
x∆
(5.66a)
and the new system matrix and input vector are 2
A∆ x
bx 1 0
Ax D4 0 0
3 0 0 5, I
3 bx D 4 1 5. 0 2
b∆ x
(5.66b)
The one-step-ahead predictive equation of (5.65) has form similar to that of (5.54a): x∆ (k C 1) D A∆ x x∆ (k) C b∆ x ∆ u(k) .
(5.67)
The cost function (5.64) is equivalent to the following cost function: J(∆u f ) D xT ∆ (k C n e2 C 1jk)Λ x,n e2 C1 x ∆ (k C n e2 C 1jk)
C
n e2 X T x ∆ (k C n e2 jk)Λ x x∆ (k C n e2 jk) C λ u ∆ u2 (k C n e jk) n e D0
) min , ∆u f
(5.68)
205
206
5 Generalized Predictive Control of Linear SISO Processes
with the augmented state vector (5.66a) and the augmented weighting factor matrices 3 2 0 Λ x Λx 0 0 5, Λx D 4 0 Λ x 0 Λ x 3 2 Λ x,n e2 C1 0 Λ x,n e2 C1 5. 0 0 0 Λ x,n e2 C1 D 4 Λ x,n e2 C1 0 Λ x,n e2 C1 The equivalence is shown exemplarily for the quadratic term of x(k C n e jk): xT ∆ (k C n e jk)Λ x x ∆ (k C n e jk) T D x (k C n e jk), u(k C n e 1), x Tr 32 3 2 x(k C n e jk) 0 Λ x Λx 4 0 0 0 5 4 u(k C n e 1) 5 Λ x 0 Λ x xr
D (x(k C n e jk) x r ) T Λ x (x(k C n e jk) x r ) . The cost function (5.68) has the same form as (5.53b) and can be minimized by multiparametric programming under the constraints of the augmented state equation (5.67) and the physical constraints: x Kconstr x∆ (k C n e ) 6 kx constr ,
n e D 0, 1, . . . , n e2 ,
(5.69a)
x,t e r m i n al x,t e r m i n al Kconstr x ∆ (k C n e2 C 1) 6 kconstr ,
(5.69b)
∆u ∆u kconstr ∆ u(k C n e ) 6 kconstr ,
(5.69c)
n e D 0, 1, . . . , n e2 .
The initial augmented state is now x∆ D [x T (k), u(k 1), x r ] T , where the reference state is a function of the output reference value y r . The solution is given as a PWA function of x∆ (k): ∆u f D ∆u f (x∆ (k)) D kx0,i C Kx1,i x∆ (k) ,
i D 1, 2, . . . , n part ,
(5.70)
where kx0,i is a vector of dimension n u and Kx1,i is a matrix of dimension n u n x , which provide the state feedback gains for all n part polyhedral regions < i of the state space. According to receding horizon strategy, the current manipulated signal u(k) D u(k 1) C ∆ u(k) is applied to the process and the cost function is minimized in the next control step again. Hereby the online optimization reduces to searching the precalculated coefficients for the state space control depending on the current state variable.
5.6 Control Algorithm with Constraints
5.6.5 Simulation Results
The following simulations show the effect of the different constraint types and the different constraint handling with predictive control of the linear third-order process of Example 1.2. Example 5.40 Predictive control of a linear third-order process without constraints Figure 5.54 is the same as Figure 1.5 for Example 1.2, where a linear third-order process was controlled without constraints, reference signal preview, and disturbance preview. The process parameters are as follows: static gain K p D 1 and three equal time constants of T1 D T2 D T3 D 1/3 s. The set value was increased stepwise from 0 to 1 at t D 1 s and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was ∆T D 0.1 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, and λ u D 0.1. Figure 5.54 was simulated by GPC based on the input/output model. The same control task with the same parameters was also simulated by using multiparametric programming based on the equivalent discrete-time state space equations: 2
0.3297 x(k C 1) D 4 0.5038 0.0593
0.2250 0.8964 0.1926
3 2 3 0.1063 0.0630 0.0500 5 x(k) C 4 0.0296 5 u(k) , 0.9964 0.0021
y (k) D [0, 0, 1.6875]x(k) . Figure 5.55 shows the state variables and the manipulated variable during the tracking of the reference signal. The plots in Figures 5.54 and 5.55 show the same control behavior with y (k) D 1.6875x3 (k). All constraints (controlled and manipulated variables and the control increments) were set to ˙10, a value which was never violated. Consequently, only one region exists and the following state space controller equation was set up: u(k) D 1.532x1 (k)1.8784x2 (k)1.6875x3 (k)0.5249u(k1)C2.1594y r .
(a)
controlled variable
(b)
manipulated variable
Figure 5.54 Predictive control of a linear third-order process without constraints.
207
208
5 Generalized Predictive Control of Linear SISO Processes 1 xi 0.5
x3=y/1.6875
3 u 2
x2
1
0 x1
0
-0.5 0
2
(a)
4
0
t [s]
2
4
t [s]
(b) manipulated signal
state variables
Figure 5.55 Predictive control without constraints based on the state space form of the linear third-order process. 1 xi 0.5
x3=y/1.6875 x2
0
2 u 1.5 1
x1 -0.5
0.5 0
(a)
2
4
state variables
t [s]
0
2
4
t [s]
(b) manipulated signal
Figure 5.56 Manipulated variable limited below 2.0 by cutting the larger values.
5.6.5.1 Constraining the Manipulated Variable
Example 5.41 Predictive control of a linear third-order process by constraining the manipulated variable The process and the controller parameters are the same as in the unconstrained case of Example 5.40. In Figures 5.56 and 5.57 the manipulated signal is limited between 0 u(k) 2. In the first case the manipulated variable was cut, and in the second case the optimization was performed by using sequential quadratic programming and considering the constraint. As is seen, the control becomes a little bit slower, mainly during the compensation of the disturbance after t D 6 s. The overshoot is also smaller. No steady-state error occurs. The constrained predictive control was also simulated on the basis of the state space equation given in Example 5.40 using multiparametric programming [22]. Figure 5.58 shows the state variables and the manipulated variable during the tracking of the reference signal. The results of the quadratic and multiparametric programming coincide as can be seen from the plots (Figures 5.57 and 5.58). Figure 5.59 shows the eight regions of the state space for which different linear control equations were set up. The corresponding linear state space control equations are of type (5.70) and are not listed here.
The consideration of the hard constraints during the optimization is more effective than cutting (or clipping) as is seen in the faster control.
5.6 Control Algorithm with Constraints
(a)
(b)
controlled variable
manipulated variable
Figure 5.57 Manipulated variable limited below 2.0 by considering this as a hard constraint. 1 xi 0.5
2 u 1.5
x3=y/1.6875 x2
0
1 x1
-0.5
0.5 0
(a)
2
4
t [s]
0
2
4
t [s]
(b) manipulated signal
state variables
Figure 5.58 Predictive control by limiting the manipulated variable based on the state space form of the linear third-order process.
10 5 x3 0 -5 -10 10 x2 0 -10 -10
-5
5
0
10
x1
Figure 5.59 Controller partition with eight regions if the manipulated variable is limited u(k) 6 2.0.
5.6.5.2 Constraining the Change of the Manipulated Variable It makes sense to limit the absolute value of the change of the manipulated variable. It can be constrained only by an upper limit as in the steady state the minimum value is zero.
Example 5.42 Predictive control of a linear third-order process by constraining the change of the manipulated variable The process and the controller parameters are the same as in the unconstrained case of Example 5.40. Figures 5.60–5.62 show different constraint handling of the control increments:
209
210
5 Generalized Predictive Control of Linear SISO Processes
(a)
controlled variable
(b)
manipulated variable
Figure 5.60 Limiting the control increments by cutting ∆u(k) over a limit of ˙0.1.
(a)
controlled variable
(b)
manipulated variable
Figure 5.61 Limiting the control increments j∆ u(k)j 0.1 by increasing the weighting to λ u D 23.34.
in Figure 5.60 the control increments are cut over the limit of j∆ u(k)j 0.1, in Figure 5.61 the weighting factor of the control increments was increased until the constraint j∆ u(k)j 0.1 was fulfilled (λ u D 23.34), in Figure 5.62 the MPC algorithm is solved by considering the hard constraint j∆ u(k)j 0.1 by online numerical optimization using sequential quadratic programming. The constrained predictive control was also simulated on the basis of the state space equation given in Example 5.40 using multiparametric programming. Figure 5.63 shows the state variables and the manipulated variable during the tracking of the reference signal. The plots in Figure 5.62 and 5.63 show almost the same control behavior. Figure 5.64 shows the 27 regions of the state space for which different linear control equations were set up. The corresponding state space control equations are of type (5.70) and are not listed here.
Summarizing the experiences with the three alternatives for constraining the manipulated variable change: The simplest way is to cut the current manipulated variable over the prescribed limit. The disadvantages of this method are that, firstly, the whole manipulated variable sequence is not limited and, secondly, the control algorithm does not get the information that the manipulated variable was limited and calculates with the not limited sequence further on.
5.6 Control Algorithm with Constraints
(a)
(b)
controlled variable
manipulated variable
Figure 5.62 Minimizing the control cost function by considering the control increment limit j∆ u(k)j 0.1 as a hard constraint. 1 xi 0.5
x3=y/1.6875
1.5 u 1
x2 0
0.5
x1
-0.5
0
0
(a)
2
4
0
t [s]
(b)
state variables
2
4
t [s]
manipulated signal
Figure 5.63 Predictive control limiting the control signal change based on the state space form of the linear third-order process.
10 5 x3 0 -5 -10 10 0 x2
-10 -10
-5
5
0
10
x1
Figure 5.64 Controller partition with 27 regions if the control increments are limited ju(k)j 0.1.
The weighting factor of the control increments can be increased until the upper constraint is fulfilled. Accordingly, the manipulated variable can be calculated analytically, as no constraints have to be considered any more. The control becomes much slower than in the case of considering the constraint directly. An online version of the algorithm can also be realized. Then the maximum allowed value of the weighting factor is calculated in every control step. The best method is the explicit consideration of the hard constraints during the minimization of the cost function; the control is fast and there is no overshoot. However, the control algorithm is more complicated than without considering the constraints.
211
212
5 Generalized Predictive Control of Linear SISO Processes
(a)
controlled variable
(b)
manipulated variable
Figure 5.65 Controlled signal limited below 0.9 by considering this as a hard constraint.
5.6.5.3 Constraining the Controlled Variable
Example 5.43 Predictive control of a linear third-order process by constraining the controlled variable The process and the controller parameters are the same as in the unconstrained case of Example 5.40. In Figure 5.65 the controlled output signal is limited between 0 y (k) 0.9 by considering this as a hard constraint. The control cost function was minimized considering the controlled signal limit as a hard constraint. As expected, the controlled variable never achieves the desired set value.
5.6.5.4 Constraining the Change in the Controlled Variable
Example 5.44 Predictive control of a linear third-order process by constraining the change in the controlled variable The process and the controller parameters are the same as in the unconstrained case of Example 5.40. Figure 5.66 shows the limitation of the change of the controlled signal by considering this as a hard constraint. The control cost function was minimized online using sequential quadratic programming considering the limit of the controlled signal change as a hard constraint.
The above simulations show the different types of constraints and some of their handling techniques. It was seen clearly that the algorithmically simple methods, that is, fitting the weighting factor or cutting (or clipping) the manipulated variable, result in worse control behavior than considering the hard constraints during the optimization.
5.7 Extended GPC with Terminal Methods
(a)
(b)
controlled variable
manipulated variable
Figure 5.66 Limiting the change in the controlled signal to j∆y(k)j 0.05 by considering it as a hard constraint.
5.7 Extended GPC with Terminal Methods
Open-loop stable processes can be stabilized by increasing the end point of the control error horizon [8]. That means the control can be made smoother at the cost of greater computational effort. Two alternative methods are presented here: end-point constraint [10], end-point state weighting [12]. Common to the two methods is that the prediction horizon can be shortened and consequently the computational effort is reduced. The above methods belong to the stabilization by terminating methods, see, for example, Mayne et al. [26]. 5.7.1 End-Point State Constraint
Clarke and Scattolini [10] recommended minimizing the cost function (5.1) under the constraint that the controlled signal should be equal to the reference signal at m c D n C 1 points after the end of the prediction horizon, where n is the order of the transfer function of the process (Figure 5.67). yr y k+d+ne2+ y k+d+ne2+ +mc
ne1
ne2
k
Figure 5.67 Fixing the end-point values with end-point constraint.
213
214
5 Generalized Predictive Control of Linear SISO Processes
There are several ways to solve the algorithm. 1. Constrained minimization under equality constraint On the basis of (5.47) the equality constraint has the form 2 32 h n e2 C2 h n e2 C1 h n e2 n u C3 ∆ u(k) 6 h n e2 C3 7 6 ∆ u(k C 1) h h n C2 n n C2 e2 e2 u 6 76 6 76 .. .. .. .. .. 4 54 . . . . . c c c ∆ u(k C n u 1) h n e2 Cm h n e2 n u C2Cm h n e2 C1Cm 3 2 yO r y free (k C d C n e2 C 2jk) 7 6 yO r y free (k C d C n e2 C 3jk) 7 6 D6 7. .. 5 4 . c yO r y free (k C d C n e2 C 1 C m jk)
3 7 7 7 5
2. Constrained minimization using a Lagrange multiplier Using a Lagrange multiplier, one can obtain an analytical solution, see Clarke and Scattolini [10], Damian and Krolikowski [11], Krolikowski and Jerzy [20], and Bemporad et al. [3]. 3. GPC with different control error weightings The length of the control error minimization horizon of the original algorithm is extended in such a way that the prediction horizon covers also the output endpoint constraints. The control error, that is, the deviation between the controlled output and the predicted reference signal, is weighted by infinite (practically very large) values in that part of the extended prediction horizon where the output should be constrained. This technique recommended in Haber et al. [16] is very simple as it uses only the GPC algorithm with different weighting factors of the control error in the optimization horizon.
Example 5.45 Predictive control of a linear third-order process without and with output end-point constraint Figure 5.68 shows the predictive control of a linear third-order process without reference signal and disturbance prediction. The process parameters are as follows: static gain K p D 1 and three equal time constants of T1 D T2 D T3 D 1/3 s. The set value was increased stepwise from 0 to 1 at t D 1 s and a disturbance of 1 was added to the input of the process at t D 6 s. The controller parameters were n e1 D 0, n e2 D 4, n u D 5, λ y D 1, and λ u D 0.1. The sampling time was selected too small, ∆T D 0.05 s, to get oscillating control behavior. The oscillations can be damped by increasing the control increment weighting to λ u D 3 at the cost of a very slow control (Figure 5.69). Alternatively. a longer control error prediction horizon (n e2 D 9) can eliminate the overshoot (Figure 5.70). The control becomes fast at the cost of great computational efforts. Aperiodic control can be achieved also with a short prediction horizon if the output end-point constrained GPC is used. Figure 5.71 shows this control with the original controller parameters n e1 D 0,
5.7 Extended GPC with Terminal Methods
(a)
controlled variable
(b)
manipulated variable
Figure 5.68 GPC of a linear third-order process with a very small sampling time.
(a)
controlled variable
(b)
manipulated variable
Figure 5.69 GPC with an increased weighting factor of the control increments.
(a)
controlled variable
(b)
manipulated variable
Figure 5.70 GPC with an increased control error prediction horizon.
(a)
controlled variable
(b)
manipulated variable
Figure 5.71 GPC with output end-point constraint.
n e2 D 4, n u D 5, λ y D 1, λ u D 0.1, and m c D 3 C 1 D 4. The only disadvantage is that the manipulated variable contains big abrupt changes. Clarke and Scattolini [10] presented three stability conditions: λ y 0; λ u > 0; n e1 > 0; n e2 > n C 1; n u D n e2 C 1 and m c D n C 1, λ y D 1; λ u > 0; n e1 D 0; n e2 n C 1; n u D n e2 C 1; and m c D n C 1, n e1 D 0; n e2 D n 1; n u D n e2 C 1; and m c D n C 1.
215
216
5 Generalized Predictive Control of Linear SISO Processes
As is seen, the output is constrained at m c D n C 1 time points over the end of the control error horizon. 5.7.2 End-Point State Weighting
Using output end-point constraint stabilizes the control behavior at the cost of sometimes too large changes in the manipulated variable. An alternative method was recommended by Demircioglu and Clarke [12], penalizing the difference between the end state and its reference value. The advantage is that the weighting factor of the final state error can be used as an additional tuning parameter; thus, very large changes in the manipulated variable can be avoided. Extending the cost function (5.9) of GPC by the term of the final state error leads to T J D y r yO Λ y y r yO C (x r xO ) T Λ x (x r xO ) C ∆u Tf Λ u ∆u f ) min , ∆u f
(5.71) where xO and x r are the predicted final state and its reference value: 2 6 6 xO D 6 4 2 6 6 xr D 6 4
xO 1 (k C d C 1 C n e2 njk) xO 2 (k C d C 1 C n e2 (n 1)jk) .. . xO n (k C d C 1 C n e2 jk) x r (k C d C 1 C n e2 n) x r (k C d C 1 C n e2 (n 1)) .. . x r (k C d C 1 C n e2 )
3 7 7 7I 5 3 7 7 7. 5
The state variables can be derived from the pulse-transfer function using the auxiliary variable v (k) (see also Figure 2.10): v (k) D
1 1 u(k 1) D y (k) . A (q 1 ) B (q 1 )
The constant reference state values are equal to the steady-state value of v (k) and can be calculated from the constant reference signal of the controlled output: x r (k C d C 1 C n e2 i) D
yr yr D n P B(1)
I
i D 0, 1, . . . , n .
bi
iD1
Similarly to the prediction of the controlled output signal, the predicted state is xO D xO forc C xO free .
5.7 Extended GPC with Terminal Methods
The predicted forced state variables can be expressed as xO forc D H x ∆u f , with ∆u f given in (5.7) and 2 6 6 Hx D 6 4
h x,n e1 C1 h x,n e1 C2 .. . h x,n e2 C1
h x,n e1 h x,n e1 C1 .. . h x,n e2
.. .
h x,n e1 n u C2 h x,n e1 n u C1 .. . h x,n e2 n u C2
3 7 7 7. 5
Minimizing (5.71) results in 1 T H Λ y y r yO free ∆u f D H T Λ y H C Λ u C H Tx Λ x H x 1 T H x Λ x x r xO free . C H T Λ y H C Λ u C H Tx Λ x H x
(5.72)
Usually all elements of the individual weighting matrices are equal, which means Λ Ty D diaghλ y , λ y , . . . , λ y i D λ y I , Λ Tx D diaghλ x , λ x , . . . , λ x i D λ x I , Λ Tu D diaghλ u , λ u , . . . , λ u i D λ u I , and then one weighting factor can be chosen as unity, for example, λ y D 1. Example 5.46 Predictive control of a linear third-order process without and with output end-point state weighting Figure 5.68 of Example 5.45 showed predictive control of a linear third-order process without reference signal and disturbance prediction. Because of the too small sampling time, ∆T D 0.05 s, all signals oscillated. If additionally the weighting factor of the end-point state is set to λ x D 10, the control becomes aperiodic, fast, and smooth; see Figure 5.72. The controller parameters were n e1 D 0, n e2 D 4, n u D 5, λ y D 1, λ u D 0.1, and λ x D 10. Similar control behavior could be achieved by GPC (without end-point constraints or weighting) with a relatively large control error weighting λ y,e n d D 1000 for the last point in the control error horizon; see Figure 5.73. ˛ ˝ Λ Ty D diag λ y , λ y , . . . , λ y , λ y,e n d D diag h1, 1, . . . , 1, 1000i . A comparison of the different techniques (see Figures 5.70 and 5.71) shows that similarly fast, almost aperiodic control can be achieved with the smoothest manipulated signal if the final state error is weighted.
217
218
5 Generalized Predictive Control of Linear SISO Processes
(a)
controlled variable
(b)
manipulated variable
Figure 5.72 GPC of a linear third-order process with end-point state weighting.
(a)
controlled variable
(b)
manipulated variable
Figure 5.73 GPC with a reduced weighting factor of the control increments.
5.8 Summary
An analytical form of MPC minimizing a quadratic cost function without constraints can be given. This algorithm derived by Clarke et al. [9] is called Generalized Predictive Control (GPC). In this chapter the algorithm given was based on the CARIMA parametric model of the process. The polynomial (so-called RST) form of the control algorithm was also derived. Simple examples demonstrated the behavior of the algorithm. The effect of the tuning parameters on the control performance was shown. Recommendations for the choice of the tuning parameters and also systematic tuning methods were given. Two techniques – coincidence points and blocking of the manipulated signal – were discussed to reduce the computation time. These techniques can be used successfully in real-time applications. In the case of a measurable disturbance, GPC can be improved by feed-forward compensation. This method was discussed and demonstrated through simple examples. Constraints can be formulated as matrix inequalities. Minimizing the cost function with constraints using quadratic programming provides predictive control algorithms keeping the variables between the required limits. As this method may be time consuming, an alternative way to calculate the manipulated variable was described as well. The manipulated variable is always a linear static function of the current state. Using so-called multiparametric programming, one can calculate the “controller gain” in advance off-line; thus, the online computational demand is much less than with any online optimization. Some simulations illustrated constrained control with different techniques. As GPC does not guarantee stability, two modified methods, GPC with endpoint state constraint and GPC with end-point state weighting, were discussed and
5.8 Summary
demonstrated through simple examples. These enhanced methods guarantee stable control behavior. It has to be emphasized that an integral action is important in a control algorithm to ensure static accuracy for reference signal tracking and disturbance rejection. Integral action is automatically included in GPC if the process model is incremental, that is, using the increments of the input signal. An incremental model is obtained using a CARIMA model. If the model is not incremental, a predictive control algorithm enhanced with Internal Model Control (IMC) structure will automatically introduce an integrating effect in the control loop. (IMC structure estimates the current disturbance as the difference between the measured output and the model output, and considers its current or filtered value in the free response.) This solution was used in the first formulations of predictive control based on nonparametric system models.
References 1 Åström, K.J. and Wittenmark, B. (1984) Computer Controlled Systems: Theory and Design, Prentice Hall, Englewood Cliffs, New Jersey. 2 Baotic, M. (2005) Optimal Control of Piecewise Affine Systems – a Multiparametric Approach, PhD thesis, ETH Zurich, Zurich, Switzerland. 3 Bemporad, A., Borrelli, F., and Morari, M. (1974) Model predictive control based on linear programming – the explicit solution. IEEE Transactions on Automatic Control, 47(12), 1974–1985. 4 Bemporad, A., Morari, M., Dua, V., and Pistikopoulos, E.N. (2002) The explicit linear quadratic regulator for constrained systems. Automatica, 38(1), 3– 20. 5 Borrelli, F. (2003) Constrained Optimal Control of Linear and Hybrid Systems, Springer, Berlin. 6 Cagienard, R., Grieder, P., Kerrigan, E.C., and Morari, M. (2004) Move blocking strategies in receding horizon control, in IEEE Conference on Decision and Control, Paradise Island, Bahamas, pp. 2023–2028. 7 Camacho, E.F. and Bordons, C. (2004) Model Predictive Control, 2nd edn, Springer Verlag, London. 8 Clarke, D.W. and Mohtadi, C. (1989) Properties of generalized predictive control. Automatica, 25(6), 859–875.
9 Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987) Generalized predictive control. Part I. the basic algorithm. Automatica, 23(2), 137–148. 10 Clarke, D.W. and Scattolini, R. (1993) Constrained receding-horizon predictive control. IEE Proceeding, 138, Part D(4), 275–282. 11 Damian, J. and Krolikowski, A. (2000) Generalized Predictive Control under Constraints, Proceedings of the 6th International Conference and Models in Automation and Robotics, Miedzyzdroje, Poland, pp. 315–320. 12 Demircioglu, H. and Clarke, D.W. (1993) Generalised predictive control with endpoint state weighting. IEE Proceeding, 140, Part D(4), 275–282. 13 Garcia, C.E. and Morari, M. (1982) Internal model control. 1. A unifying review and some new results. Industrial and Engineering Chemistry Process and Development, 21, 308–323. 14 Goodwin, G.C., Seron, M.M., and Dona, J.D. (2004) Constrained Control and Estimation, Springer, Berlin. 15 Haber, R., Bars, R., and Lengyel, O. (2000) Nonlinear predictive control algorithms with different input sequence parameterizations applied for the quadratic Hammerstein and Volterra models, in Nonlinear Model Predictive Control, Birkhäuser Verlag, Basel, pp. 347–356.
219
220
5 Generalized Predictive Control of Linear SISO Processes 16 Haber, R., Schmitz, U., and Bars, R. (2002) Stabilizing Predictive Control with Infinite Control Error Weightings, Proceedings of the International Conference Process Control, Kouty nad Desnou, Czech Republic. 17 Haber, R., Schmitz, U., and Bars, R. (2004) Optimal choice of horizons for predictive control by using genetic algorithm. Annual Reviews in Control, 28(1), 53–58. 18 Halldorsson, U., Fikar, M., and Unbehauen, H. (2002) Multirate nonlinear predictive control, in American Control Conference, Anchorage, Alaska. 19 Honc, D. and Haber, R. (2007) Application of Noise Filter with Multivariable GPC, Proceedings of the International Conference Process Control, Strebske Pleso, Slovak Republic, CD-ROM, P013. 20 Krolikowski, A. and Jerzy, D. (2001) Self-tuning generalized predictive control with input constraints. International Journal of Applied Mathematics and Computer Science, 11(2), 100–110. 21 Kvasnica, M. (2009) Real-time Model Predictive Control via Multi-parametric Programming: Theory and Tools, VDM Verlag, Saarbrücken, FRG. 22 Kvasnica, M., Grieder, P., and Baotic, M. (2004) Multi-parametric toolbox (MPT). http://control.ee.ethz.ch/~mpt/. Last access: 1 November 2010. 23 Lalonde, A.M. and Cooper, D.J. (1989) Automated design, implementation and adaption of the generalized predictive controller, in American Control Conference, Vol. 2, Pittsburgh, PA, USA, pp. 1840–1845. 24 Lee, J., Chikkula, Y., and Yu, Z. (1995) Improving computational efficiency of model predictive control algorithms using wavelet transformation. International Journal Control, 61, 859–883. 25 Lee, T.H., Hang, C.C., Nungam, S., and Tan, K.K. (1994) A knowledge-based predictive process controller – development and implementation. Control Engineering Practice, 2(4), 577–589. 26 Mayne, D.Q., Rawlings, J.B., Rao, C.V., and Scokaert, P.O.M. (2000) Constrained model predictive control: stability and optimality. Automatica, 36, 789–814.
27 McIntosh, A.R., Shah, S.L., and Fisher, D.G. (1991) Analysis and tuning of adaptive generalized predictive control. The Canadian Journal of Chemical Engineering, 69, 97–110. 28 Nungam, S. and Lee, T.H. (1991) Investigate studies for a knowledge-based intelligent adaptive generalized predictive controller, in IFAC Conference Intelligent Tuning and Adaptive Control, Singapore, pp. 15–17. 29 Rani, K.Y. and Unbehauen, K.H. (1996) Tuning and Auto-Tuning in Predictive Control, Proceedings of the 13th IFAC World Congress, San Francisco, USA. 30 Richalet, J., Ata-Doss, S.E., Arber, C., Kuntze, H., Jacubasch, A., and Schill, W. (1987) Predictive functional control application to fast and accurate robots, in 10th IFAC World Congress, Munich, FRG. 31 Schmitz, U. (2006) Nonlinear Predictive Control of Slowly Varying Dynamic Systems, Ph.D. dissertation, Department of Automation and Applied Informatics, Budapest University of Technology and Economics. 32 Schmitz, U., Haber, R., and Bars, R. (2003) Reduction of the Optimization Efforts with Predictive Control by Using Nonequidistant Prediction Points, Proceedings of the 12th IFAC Workshop on Control Applications of Optimisation, pp. 73–78. 33 Sekaj, I. (1984) Genetic algorithms with changing criterion functions, IOS Press, pp. 183–188. 34 Shook, D.S., Mohtadi, C., and Shah, S.L. (1991) Identification for long-range predictive control. IEE Proceedings-D, 138(1), 110–118. 35 van Donkelaar, E.T., Bosgra, O.H., and van den Hof, P.M.J. (1999) Model predictive control with generalized input parametrization, in European Control Conference, Karlsruhe, Germany. 36 Wang, Q., Chalaye, G., Thomas, G., and Gilles, G. (1997) Predictive control of a glass process. Control Engineering Practice, 5(2), 167–173. 37 Zheng, A. (2000) Some practical issues and possible solutions for nonlinear model predictive control, Nonlinear Model Predictive Control, Birkhäuser Verlag, Basel, pp. 129–143.
221
6 Predictive PID Control Algorithms The most widely used algorithms in practice are the Proportional plus Integral plus Derivative (PID) control algorithms. The algorithms are simple, and with three effects (proportional, integrating, and differentiating) generally the quality specifications prescribed for the control system can be met. The proportional path of the algorithm considers the effect of the current error, the integrating part reacts according to the past history of the error signal, whereas the differentiating path acts considering the change in the error signal, taking into account the initial future trend. Nevertheless in case of long dead time in the process, the performance of the control system will be slow, the PID controller cannot accelerate the control system significantly. There are some discrete control algorithms such as the Smith predictor and deadbeat control which provide faster performance than PID control for dead-time systems, but these algorithms did not get really wide industrial acceptance, especially because of their sensitivity to plant/model mismatch. Nevertheless, there are some methods to make the Smith predictor less sensitive to parameter uncertainties (see [12]). Predictive control algorithms, where predicted error values are used to calculate the current control signal, are also widely applied. Predictive algorithms provide good performance especially in the case of a long dead time and if the future reference trajectory is known. Applications of predictive control algorithms are supported by different industrial software packages. Nowadays, besides PID control, predictive control has gained increased acceptance in practical control systems. As operators of industrial process control systems are familiar with PI(D) controllers and have expertise in PI(D) controller tuning, it would be advantageous to enhance the performance of PI(D) controllers with predictive properties, while applying the well-accepted PI(D) tuning rules. In this way the operator gets a PI(D) controller with hidden predictive properties. The properties of the two algorithms – predictive control and PI(D) control – can be combined. The idea of predictive PI(D) controllers presented here was initiated by Katebi and Moradi [8] and Johnson and Moradi [7].
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
222
6 Predictive PID Control Algorithms
yr(k+d+1+ne1)
^ e(k+d+1+n e1|k)
u(k) PI(D) controller yr(k+d+1+ne2)
y(k) Process
^ e(k+d+1+n e2|k)
^ y(k+d+1+n e2)
Predictor ^ y(k+d+1+n e1)
Figure 6.1 Predictive PI(D) controller structure with parallel paths.
6.1 Predictive PI(D) Control Structure
The widely applied PI(D) controllers calculate the value of the current manipulated variable considering the current error signal„ which is the difference between the current reference signal and the current output signal. A predictive PI(D) controller considers a predicted value of the error signal; therefore, it can provide faster performance than the usual PI(D) controller in case of a long dead time. An extension of the predictive PI(D) controller is when a series of the predicted error values are taken into account, which are calculated as the difference between the predicted reference signal values and the predicted values of the output signal in a given prediction horizon. In this way parallel connected PI(D) controllers are used in the control system. Katebi and Moradi [8] suggested a predefined number of parallel connected PI(D) controllers with inputs of the predicted error signal values. For all controller paths the same PI(D) controller is applied. A block diagram of the predictive PI(D) control system is shown in Figure 6.1, where eO (k C d C 1 C n e jk) denotes the predicted values of the error signal n e1 n e n e2 steps ahead of the dead time increased by one (d C 1). n e1 is the first and n e2 is the last point of the prediction horizon. The number of parallel paths is n e,h o r D n e2 n e1 C 1. The predicted values of the reference and the output signal are denoted by y r (k C d C 1 C n e ) and y(k O C d C 1 C n e jk), respectively.
6.2 Predictive PI Control Algorithm
The form of a nonpredictive discrete-time proportional plus integral (PI) controller is u(k) D k c p e(k) C k c i
k X iD1
e(i) ,
(6.1)
6.2 Predictive PI Control Algorithm
where e denotes the error signal and k c p and k c i are the coefficients of the proportional and the integrating components of the controller. Taking the difference on both sides of (6.1) at steps k and k 1 leads to ∆ u(k) D u(k) u(k 1) D k c p e(k) e(k 1) C k c i e(k) D p 0 e(k) C p 1 e(k 1) ,
(6.2)
where p0 D kc p C kci I k c p D p 1 I
p 1 D k c p , kci D p0 C p1 .
(6.3)
In predictive PI control the manipulated variable is the sum of the controller outputs based on the predicted control errors with different prediction horizons. Applying the algorithm to a future error signal d C 1 C n e step ahead of the current time point, one obtains the corresponding control increment as ∆ u n e (k) D p 0 eO (k C d C 2 C n e jk) C p 1 eO (k C d C 1 C n e jk) .
(6.4)
Let us introduce the following vector notation: k P I D [p 1 , p 0 ] T ,
(6.5)
T eO P I (k C d C 1 C n e jk ) D eO (k C d C 1 C n e jk ), eO (k C d C 2 C n e jk ) . (6.6) With this notation (6.4) can be written in the following form: ∆ u n e (k) D k TP I eO P I (k C d C 1 C n e jk ) .
(6.7)
6.2.1 One-Step-Ahead Predictive PI Control
A special case of predictive control is extended horizon (one-step-ahead) predictive control, where n e D n e1 D n e2 . The future error signal is estimated as the difference between the future reference signal and the predicted output signal. The output prediction at a future point is obtained by the sum of the forced and the free response. Supposing only one change in the manipulated signal, ∆ u(k) D ∆ u n e (k) D k TP I eO P I (k C d C 1 C n e jk ) O C d C 1 C n e jk ) y r (k C d C 1 C n e ) y(k D k TP I y r (k C d C 2 C n e ) y(k O C d C 2 C n e jk ) y r (k C d C 1 C n e ) h n e C1 ∆ u(k) yOfree (k C d C 1 C n e jk ) . D k TP I y r (k C d C 2 C n e ) h n e C2 ∆ u(k) yOfree (k C d C 2 C n e jk ) (6.8)
223
224
6 Predictive PID Control Algorithms
Introducing the notation T h P I,n e D h n e C1 , h n e C2
(6.9a)
containing points of the step response, and y r P I,n e (k C d C 1 C n e ) D [y r (k C d C 1 C n e ), y r (k C d C 2 C n e )] T (6.9b) and yO freePI,n e (k C d C 1 C n e jk ) T D yOfree (k C d C 1 C n e jk ), yO free (k C d C 2 C n e jk ) , one can write (6.8) as h i ∆ u(k) D k TP I y r P I,n e h P I,n e ∆ u(k) yO freePI,n e
(6.9c)
(6.10)
and ∆ u(k) is expressed as h i1 ∆ u(k) D 1 C k TP I h P I,n e k TP I y r P I,n e yO freePI,n e .
(6.11)
6.2.2 Long-Range Predictive PI Control
In long-range predictive PI control the manipulated variable is obtained considering the sum of the predicted control errors. The control increment can be expressed as ∆ u(k) D k TP I
n e2 X
eO P I (k C d C 1 C n e jk ) .
(6.12)
n e Dn e1
With the assumption ∆ u(k C i) D 0I i D 1, 2, . . ., (6.12) can be given in detailed form as 2 n e2 3 P y (k C d C 1 C n ) e 7 6 n e Dn e1 r 7 ∆ u(k) D k TP I 6 n e2 4 P 5 y r (k C d C 2 C n e ) n e Dn e1
2 k TP I
3 h n C1 e1 6 n e Dn e1 7 6 n 7 ∆ u(k) e2 4 P 5 h n e1 C2 2
k TP I
n e2 P
n e Dn e1
3 y O (k C d C 1 C n ) jk e 6 n e Dn e1 free 7 6 n 7. e2 4 P 5 yOfree (k C d C 2 C n e jk ) n e2 P
n e Dn e1
(6.13)
6.2 Predictive PI Control Algorithm
Let us introduce the following notation: 3 h n C1 e 7 6 n e Dn e1 7I D6 n e2 5 4 P h n e C2 2
hP I
n e Dn e1
y r P I,s um
n e2 P
n e Dn e1
3 y O (k C d C 1 C n ) jk e 7 6 n e Dn e1 free 7. D6 n e2 5 4 P yO free (k C d C 2 C n e jk ) 2
yO freePI,sum
3 y (k C d C 1 C n ) r e 7 6 n e Dn e1 7I D6 n e2 5 4 P y r (k C d C 2 C n e ) 2
n e2 P
n e2 P
n e Dn e1
(6.14)
From (6.13) the control increment can be expressed similarly to (6.11) as h i1 ∆ u(k) D 1 C k TP I h P I k TP I (y r P I,s um yO freePI,sum ) .
(6.15)
For different systems the forced response can be calculated with knowledge of the points of the step response, whereas the free response is obtained from the parameters of the model and from the past inputs and the current and past output signals. 6.2.3 Predictive PI Control of a First-Order Process with Dead Time
Aperiodic processes can be approximated well by a first-order process with dead time. In the process industries a lot of processes can be described by this model. In most cases the step response of the system can be measured easily even within industrial circumstances. A good, but slow control of this process can be achieved by a PI controller. Different practical tuning rules exist considering the parameters of the approximating first-order model of the process. Applying a predictive PI controller can improve the performance of the control system especially in case of significant dead time. In this case the control algorithm (6.15) can be expressed in analytical form. The first-order system is described by the following Controlled AutoRegressive Integrating Moving Average (CARIMA) model: y (k) D
1 b 1 q 1 v u (k) . q d u(k) C 1 1 1 C a1 q (1 q )(1 C a 1 q 1 )
(6.16)
The predictive equations are given in Chapter 3 according to (3.29) and (3.31). Let us define vector yO (k C d C 1 C n e ) as yO (k C d C 1 C n e ) D
y(k O C d C 1 C ne) y(k O C d C 2 C ne)
.
(6.17)
225
226
6 Predictive PID Control Algorithms
Taking into consideration (3.29), we can express it as y(k O C d C 1 C ne) yO (k C d C 1 C n e ) D y(k O C d C 2 C ne) 2
3 ∆ u(k) 6 7 ∆ u(k C 1) 7 6 7 6 h ne h1 0 h n e C1 .. 7 6 D 7 . h n e C2 h n e C1 h 2 h 1 6 7 6 4 ∆ u(k C n e ) 5 ∆ u(k C 1 C n e ) y (k) f dCn e C1,1 f dCn e C1,2 C f dCn e C2,1 f dCn e C2,2 y (k 1) 2 3 ∆ u(k 1) 6 7 h n e C2 h n e C3 h n e C1Cd 6 ∆ u(k 2) 7 C 6 7. .. h n e C3 h n e C4 h n e C2Cd 4 5 . ∆ u(k d)
(6.18)
f i,1 and f i,2 are calculated according to (3.31). If there is no dead time, that is, d D 0, the last term on the right side of (6.18) is missing. Let us write (6.18) in the following form: f
yO (k C d C 1 C n e ) D H n e ∆u f C F yp n e y p C H np e ∆u p , where
h1 0 , h n e C1 h2 h1 f dCn e C1,1 f dCn e C1,2 , D f dCn e C2,1 f dCn e C2,2 h n e C2 h n e C3 h n e C1Cd , D h n e C3 h n e C4 h n e C2Cd
f
Hn e D F yp n e H np e and
(6.19)
2 6 6 6 ∆u f D 6 6 6 4 2 6 6 ∆u p D 6 4
h n e C1 h n e C2
h ne
∆ u(k) ∆ u(k C 1) .. . ∆ u(k C n e ) ∆ u(k C 1 C n e ) 3 ∆ u(k 1) ∆ u(k 2) 7 7 7. .. 5 . ∆ u(k d)
3 7 7 7 7, 7 7 5
yp D
y (k) y (k 1)
,
(Index f refers to future data, whereas index p indicates past effects.)
(6.20)
6.2 Predictive PI Control Algorithm
If n u D 1, that is, for the future control increments ∆ u(k C i) D 0 is supposed, f f only the first column of H n e is considered, H n e h P I,n e D [h n e C1 , h n e C2 ] T . In the sequel this assumption is taken into account. The control algorithm can be written according to (6.15), where the free response is obtained by the second and third terms of the right side of (6.19). In the case of one-step-ahead predictive control, the control increment is obtained as i1 h ∆ u(k) D 1 C k TP I h P I,n e (6.21) k TP I y r P I,n e F yp n e y p H np e ∆u p . In the case of long-range predictive control, i1 h ∆ u(k) D 1 C k TP I h P I k TP I (yr P I,s um yO freePI,sum ) i1 h D 1 C k TP I h P I k TP I
n e2 X
y r P I,s um
n e Dn e1
F yp n e y p
n e2 X n e Dn e1
! H np e ∆u p
. (6.22)
Example 6.1 Calculation of the parameters of the predictive PI control rule of a firstorder process with dead time Let us calculate the parameters of (6.22) for a first-order process with static gain K p D 1, time constant T1 D 1 s, and dead time Td D 0.2 s. The transfer function of the continuous-time system (without the dead time) is G(s) D 1/(1 C s). The sampling time is ∆T D 0.2 s. At the input zero-order hold is applied. The first and last points of the prediction horizon beyond the dead time plus 1 are n e1 D 1 and n e2 D 3, and n u D 1. The process output has to be predicted from k C d C1C n e1 D k C 3 till k C d C 1 C n e2 D k C 5 (see also Example 3.3). The parameters of the pulse-transfer function without the dead time are b 1 D 0.1813 and a 1 D 0.8187, and the points of the step response are h 1 D 0.1813, h 2 D 0.3297, h 3 D 0.4513, h 4 D 0.5507, h 5 D 0.6322, h 6 D 0.6989, . . .. The parameters of (6.22) are calculated as 3 h n C1 7 6 n e Dn e1 e 7 D h 2 C h 3 C h 4 D 1.3317 I D6 n e2 5 4 P 1.6342 h3 C h4 C h5 h n e C2 2
hP I
n e2 P
n e Dn e1
2 P 3 h n e2 X 6 n e D1 n e C2 H np e ∆ u p D 6 3 4 P n e Dn e1 h n e C3 D
3 7 7 ∆ u(k 1) 5
n e D1
h3 C h4 C h5 h4 C h5 C h6
∆ u(k 1) D
1.6342 1.8818
∆ u(k 1) I
227
228
6 Predictive PID Control Algorithms
1 a 1 C a 21 a1 D 1 a 1 C a 21 a 31 a 1 n e Dn e1 1 a 1 C a 21 a 31 C a 41 1 a 1 C a 21 a 31 a1 C 1 a 1 C a 21 a 31 C a 41 a 1 1 a 1 C a 21 a 31 C a 41 a 51 1 a 1 C a 21 a 31 C a 41 a1 1 a 1 C a 21 a 31 C a 41 a 51 C 1 a 1 C a 21 a 31 C a 41 a 51 C a 61 1 a 1 C a 21 a 31 C a 41 a 51 a 1 10.1761 7.1761 D . 11.2294 8.2294 n e2 X
F yp n e
1 a 1 C a 21 a 31 1 a 1 C a 21 a 31 C a 41
The reference signal is taken into account as 2
y r P I,s um
3 y (k C d C 1 C n ) r e 7 6 n e Dn e1 7 D6 n e2 5 4 P y r (k C d C 2 C n e ) D
n e2 P
n e Dn e1
y r (k C 3) C y r (k C 4) C y r (k C 5) y r (k C 4) C y r (k C 5) C y r (k C 6)
.
The control increment is then calculated according to (6.22).
6.3 Predictive PID Control Algorithm
The form of a nonpredictive discrete-time PID controller is u(k) D k c p e(k) C k c i
k X
e(i) C k c d e(k) e(k 1) .
(6.23)
iD1
k c p , k c i , and k c d are the coefficients of the proportional, the integral, and the derivative components of the controller. Taking the difference on both sides of (6.23) at steps k and k 1 leads to ∆ u(k) D u(k) u(k 1) D k c p e(k) e(k 1) C k c i e(k) C k c d e(k) 2e(k 1) C e(k 2) D (k c p C k c i C k c d )e(k) C (k c p 2k c d )e(k 1) C k c d e(k 2) D p 0 e(k) C p 1 e(k 1) C p 2 e(k 2) ,
(6.24)
6.3 Predictive PID Control Algorithm
where p0 D kc p C kci C kcd p 1 D k c p 2k c d
k c p D p 1 2p 2 or
p2 D kcd
kci D p0 C p1 C p2 kcd D p2 .
(6.25)
In predictive PID control the manipulated variable is the sum of the controller outputs based on the predicted control errors with different prediction horizons. Applying the algorithm to a future error signal d C 1 C n e steps ahead of the current time point, we obtain the corresponding control increment as ∆ u n e (k) D p 0 eO (k C d C 3 C n e jk) C p 1 eO (k C d C 2 C n e jk) C p 2 eO (k C d C 1 C n e jk) .
(6.26)
(It has to be mentioned that as three future error signal points are considered in calculating the control increment, the first one is taken at the first predictable point k C d C 1 C n e .) The future error signals are predicted on the basis of the information available till the current time point k. Let us introduce the following vector notation: kPID D [p 2 , p 1 , p 0 ] T ,
(6.27)
eO PID (k C d C 1 C n e jk ) D [ eO (k C d C 1 C n e jk ), eO (k C d C 2 C n e jk ), eO (k C d C 3 C n e jk )] T . (6.28) With this notation, (6.26) can be written in the following form: T ∆ u n e (k) D kPID eO PID (k C d C 1 C n e jk ) .
(6.29)
6.3.1 One-Step-Ahead Predictive PID Control
A special case of predictive control is extended horizon (one-step-ahead) predictive control, where only one control channel is considered (n e D n e1 D n e2 ). In (6.29) the predicted error values are calculated as the difference between the future reference signal y r (k C d C 1 C n e ) and the predicted output signal y( O k C d C 1 C n e j k). As the predicted output values contain effects of the forced response and the free response, the current and the next two future control increments do appear on the right side of the expression. A closed form to calculate ∆ u(k) can be obtained simply only if some assumptions are considered for the future control increments, for example, ∆ u(k C 1) D ∆ u(k C 2) D 0 is supposed [8]. The forced response is calculated with knowledge of the points of the step response
229
230
6 Predictive PID Control Algorithms
(h i , i D 1, 2, 3): 2 ∆ u(k) D ∆ u n e (k) D 2
y r (k C d 4 y r (k C d D y r (k C d 2 y r (k C d T 4 y r (k C d D kPID y r (k C d T kPID
T kPID
3 eO (k C d C 1 C n e jk ) 4 eO (k C d C 2 C n e jk )5 eO (k C d C 3 C n e jk )
3 C 1 C n e ) y(k O C d C 1 C n e jk ) C 2 C n e ) y(k O C d C 2 C n e jk )5 C 3 C n e ) y(k O C d C 3 C n e jk )
3 C 1 C n e ) h n e C1 ∆ u(k) yOfree (k C d C 1 C n e jk ) C 2 C n e ) h n e C2 ∆ u(k) yOfree (k C d C 2 C n e jk )5 , C 3 C n e ) h n e C3 ∆ u(k) yOfree (k C d C 3 C n e jk ) (6.30)
where n e is a chosen extension point beyond the dead time increased by one (d C1). Let us introduce the following notation: hPID,n e D [h n e C1 , h n e C2 , h n e C3 ] T , yrPID,n e (k C d C 1 C n e ) D [y r (k C d C 1 C n e ), y r (k C d C 2 C n e ), y r (k C d C 3 C n e )] T , (6.31) and yO freePID,n e (k C d C 1 C n e jk ) D [ yOfree (k C d C 1 C n e jk ), yO free (k C d C 2 C n e jk ), yOfree (k C d C 3 C n e jk )] T . With this notation, (6.30) is written as T [yrPID,n e hPID,n e ∆ u(k) yO freePID,n e ] ∆ u(k) D kPID
(6.32)
and ∆ u(k) is expressed as i1 h T T hPID,n e kPID [yrPID,n e yO freePID,n e ] . ∆ u(k) D ∆ u n e (k) D 1 C kPID
(6.33)
6.3.2 Long-Range Predictive PID Control
In long-range predictive PID control the manipulated variable is obtained considering the sum of the predicted control errors. The control increment can be expressed as T ∆ u(k) D kPID
n e2 X
eO PID (k C d C 1 C n e jk ) .
(6.34)
n e Dn e1
The predicted error values are calculated as the difference between the future reference and the predicted output signals. As the predicted output signals contain
6.3 Predictive PID Control Algorithm
the effect of the future control increments as well, again a closed form to calculate ∆ u(k) can be obtained simply only if some assumptions are considered for the future control increments, for example, ∆ u(k C i) D 0I i D 1, 2, . . . is supposed. This means that the control horizon is n u D 1, that is, only one change is supposed in the control signal. (Another assumption which leads to a simple solution could suppose a given n u subsequent equal changes in the control signal.) With this assumption, (6.34) can be given in detailed form as 3 2 P 2 P 3 n e2 n e2 y r (k C d C 1 C n e ) h n e C1 7 6 n e Dn e1 6 n e Dn e1 7 7 6 n e2 6 n e2 7 7 6 6 7 P P T 6 T 6 7 y r (k C d C 2 C n e )7 kPID 6 h n e C2 7 ∆ u(k) D kPID 6 7 ∆ u(k) e1 e1 7 6 n e Dn 6 n e Dn 7 n e2 n e2 5 4 P 4 P 5 y r (k C d C 3 C n e ) h n e C3 n e Dn e1
2 P 3 n e2 yO free (k C d C 1 C n e jk ) 6 n e Dn e1 7 6 n 7 e2 6 7 P T 6 7 . y O (k C d C 2 C n ) jk kPID free e 6 n Dn 7 6 e n e1 7 e2 4 P 5 yO free (k C d C 3 C n e jk )
n e Dn e1
n e Dn e1
(6.35)
Let us introduce the following notation: 2
hPID
6 6 6 D6 6 6 4
3
n e2 P n e Dn e1 n e2 P n e Dn e1 n e2 P n e Dn e1
2
yO freePID,sum
6 6 6 D6 6 6 4
h n e C1 h n e C2 h n e C3 n e2 P
2
7 6 7 6 7 6 7I y 6 rPID, sum D 6 7 7 6 5 4
n e2 P
y r (k C d C 1 C n e )
7 7 7 y r (k C d C 2 C n e ) 7 7I n e Dn e1 7 n e2 5 P y r (k C d C 3 C n e ) n e Dn e1 n e2 P
n e Dn e1
yOfree (k C d C 1 C n e jk )
3
7 7 7 yOfree (k C d C 2 C n e jk ) 7 7. n e Dn e1 7 n e2 5 P yOfree (k C d C 3 C n e jk ) n e Dn e1 n e2 P
3
n e Dn e1
From (6.35) the control increment can be expressed as i1 h T T hPID kPID [yrPID, sum yO freePID,sum ] . ∆ u(k) D 1 C kPID
(6.36)
(6.37)
6.3.3 Predictive PID Control of a Second-Order Process with Dead Time
Both aperiodic and oscillating processes can be approximated by a second-order model. Enhancing the PID control with predictive properties will improve the control performance of a process modeled by a second-order model especially in case of long dead time.
231
232
6 Predictive PID Control Algorithms
The CARIMA model of a second-order process with dead time is given by y (k) D
b 1 q 1 C b 2 q 2 q d u(k) 1 C a 1 q 1 C a 2 q 2 1 v u (k) . C (1 q 1 )(1 C a 1 q 1 C a 2 q 2 )
(6.38)
The predictive equations are given in (3.35)–(3.37). For this model the predictive PID algorithm (6.37) can be applied. Example 6.2 Calculation of the parameters of the predictive PID control rule in the case of a second-order system with dead time Let us calculate the parameters of (6.37) for a second-order process with static gain K p D 1, time constants T1 D 1 s and T2 D 2 s, and dead time Td D 2 s. The transfer function of the continuous-time system (without the dead time) is G(s) D 1/((1 C s)(1 C 2s)). The sampling time is ∆T D 1 s. At the input zero-order hold is applied. The first and last points of the prediction horizon beyond the dead time plus 1 are n e1 D 1 and n e2 D 4, and n u D 1. The parameters of the pulse-transfer function without the dead time are as follows: b 1 D 0.1548 I
b 2 D 0.0939 I
a 1 D 0.9744 I
a 2 D 0.2231 .
The points of the step response are as follows: h 1 D 0.1548 I
h 2 D 0.3999 I
h 3 D 0.6035 I
h 4 D 0.7476 I
h 5 D 0.8426 I
h 6 D 0.9029 I
h 7 D 0.9405 I
h 8 D 0.9637 I
h 9 D 0.9779 I
h 10 D 0.9866 I
...
Vectors f1 , f2 , and f3 are calculated according to (3.37). Their values are as follows: f1T D f2T D f3T D
1.9744, 2.7008, 3.1911, 3.5068, 3.705, 3.8278, 3.9031, 3.9491, 3.9772, 3.9942 , 1.1975, 2.1413, 2.7937, 3.2188, 3.4875, 3.6545, 3.7572, 3.82, 3.8583, 3.8817 , 0.2231, 0.4406, 0.6026, 0.712, 0.7825, 0.8267, 0.8541, 0.8812, 0.8874, 0.9709
.
6.3 Predictive PID Control Algorithm
The parameters of (6.37) are 3 2 P n e2 h n e C1 7 2 6 n e Dn e1 3 2 3 7 6 n e2 2.5936 h2 C h3 C h4 C h5 7 6 P 7 4 h 3 C h 4 C h 5 C h 6 5 D 4 3.096 5 , hPID D 6 6 n Dn h n e C2 7 D 7 6 e n e1 3.4336 h4 C h5 C h6 C h7 e2 5 4 P h n e C3 n e Dn e1
2
yrPID, sum
6 6 6 D6 6 6 4
n e2 P
y r (k C d C 1 C n e )
3
7 7 7 y r (k C d C 2 C n e ) 7 7 n e Dn e1 7 n e2 5 P y r (k C d C 3 C n e ) n e Dn e1 n e2 P
n e Dn e1
3 y r (k C 4) C y r (k C 5) C y r (k C 6) C y r (k C 7) D 4 y r (k C 5) C y r (k C 6) C y r (k C 7) C y r (k C 8) 5 , y r (k C 6) C y r (k C 7) C y r (k C 8) C y r (k C 9) 2 P 3 n e2 yOfree (k C d C 1 C n e jk ) 6 n e Dn e1 7 6 n 7 e2 6 P 7 6 7 y O (k C d C 2 C n ) jk yO freePID,sum D 6 free e 7 n Dn 6 e n e1 7 e2 4 P 5 yOfree (k C d C 3 C n e jk ) 2
n e Dn e1
3 yO free (k C 4) C yOfree (k C 5) C yO free (k C 6) C yOfree (k C 7) D 4 yO free (k C 5) C yOfree (k C 6) C yO free (k C 7) C yOfree (k C 8) 5 yO free (k C 6) C yOfree (k C 7) C yO free (k C 8) C yOfree (k C 9) 2 h3 C h4 C h5 C h6 h4 C h5 C h6 C h7 D 4 h4 C h5 C h6 C h7 h5 C h6 C h7 C h8 h5 C h6 C h7 C h8 h6 C h7 C h8 C h9 32 3 h5 C h6 C h7 C h8 ∆ u(k 1) h 6 C h 7 C h 8 C h 9 5 4 ∆ u(k 2) 5 h 7 C h 8 C h 9 C h 10 ∆ u(k 3) 2 f 4,1 C f 5,1 C f 6,1 C f 7,1 f 4,2 C f 5,2 C f 6,2 C f 7,2 C 4 f 5,1 C f 6,1 C f 7,1 C f 8,1 f 5,2 C f 6,2 C f 7,2 C f 8,2 f 6,1 C f 7,1 C f 8,1 C f 9,1 f 6,2 C f 7,2 C f 8,2 C f 9,2 32 3 f 4,3 C f 5,3 C f 6,3 C f 7,3 y (k) f 5,3 C f 6,3 C f 7,3 C f 8,3 5 4 y (k 1) 5 y (k 2) f 6,3 C f 7,3 C f 8,3 C f 9,3 2 32 3 3.096 3.4336 3.6497 ∆ u(k 1) D 4 3.4336 3.6497 3.785 5 4 ∆ u(k 2) 5 3.6497 3.785 3.8687 ∆ u(k 3) 2 32 3 14.9427 14.118 3.1753 y (k) C 4 15.385 14.7192 3.4342 5 4 y (k 1) 5 . 15.6572 15.09 3.5329 y (k 2) 2
233
234
6 Predictive PID Control Algorithms
6.4 Equivalence between the Predictive PI(D) Algorithm and the Generalized Predictive Control Algorithm
In Section 5.3 some guidelines were given for the choice of the tuning parameters for Generalized Predictive Control (GPC). These guidelines could be used for tuning predictive PI(D) controllers as well if an equivalence could be given between the two algorithms. The GPC algorithm is obtained by minimizing the cost function JD
n e2 X n e Dn e1
eO 2 (k C d C 1 C n e ) C
nu X
λ u ∆ u2 (k C i 1) ,
(6.39)
iD1
where λ u is a factor punishing the control increments. Without constraints the minimization of the cost function gives the following analytical solution: 1 T ∆u f D H T H C λ u I (6.40) H y r yO free . H is the matrix containing the points of the step response (see (5.8)). Only the first element of vector ∆u f is used as a control input, and at the next time point the procedure is repeated (receding horizon strategy). As predictive PI(D) algorithms have been derived only for n u D 1, for the GPC algorithm this assumption is also considered. 6.4.1 Equivalence in the Case of Extended Horizon Control
The equivalence of the two algorithms can be derived easily in the case of one-stepahead predictive control. Comparing (6.40) and (6.11) or (6.40) and (6.33), one can give predictive PI or PID algorithms which generate behavior similar to that of the GPC algorithm. In this case the two tuning parameters are n e and λ u . In the case of the PID algorithm in (6.33), n e1 D n e and n e2 D n e C 2, so the prediction considers three future points from k C d C n e C 1 till k C d C n e C 3. The equivalent predictive PID parameters are obtained by solving the following equation i1 h 1 T T T 1 C kPID hPID,n e kPID D HT H C λ u I H 31 2 nX e C3 2 h n e C1 , h n e C2 , h n e C3 , D4 h i C λ u5 iDn e C1
(6.41)
6.4 Equivalence of Predictive PID and GPC Algorithms
or in detail [h n e C1 , h n e C2 , h n e C3 ] [p 2 , p 1 , p 0 ] D 1 C p 2 h n e C1 C p 1 h n e C2 C p 0 h n e C3 λ u C h 2n e C1 C h 2n e C2 C h 2n e C3 D
[h n e C1 , h n e C2 , h n e C3 ] , N
(6.42)
where N D λ u C h 2n e C1 C h 2n e C2 C h 2n e C3 .
(6.43)
If λ u D 1, the trivial solution is p 0 D h n e C3 , p 1 D h n e C2 , p 2 D h n e C1 . In other cases, using some mathematical manipulations, we have to solve the following equation: 3 2 h n e C1 h n e C3 /N p0 4 p 15 D 6 h 4 n e C2 h n e C3 /N p2 1 h 2n e C3 /N 3 2 h n e C1 /N 4 h n e C2 /N 5 . h n e C3 /N 2
h n e C1 h n e C2 /N 1 h 2n e C2 /N h n e C3 h n e C2 /N
31 1 h 2n e C1 /N 7 h n e C2 h n e C1 /N 5 h n e C3 h n e C1 /N
(6.44)
In case of the PI algorithm in (6.23) n e1 D n e and n e2 D n e C 1, so the prediction considers two future points from k C d C n e C 1 till k C d C n e C 2. The equivalent predictive PI parameters considering also (6.11) are obtained by solving the following equation: h i1 1 T 1 C k TP I h P I,n e k TP I D H T H C λ u I H 31 2 nX e C2 D4 h 2i C λ u 5 [h n e C1 , h n e C2 ] . (6.45) iDn e C1
In detail [h n e C1 , h n e C2 ] [h n e C1 , h n e C2 ] [p 1 , p 0 ] , D D 2 2 1 C p 1 h n e C1 C p 0 h n e C2 N λ u C h n e C1 C h n e C2 (6.46) where N D λ u C h 2n e C1 C h 2n e C2 .
(6.47)
If λ u D 1, the trivial solution is p 0 D h n e C2 , p 1 D h n e C1 . In other cases the following equation has to be solved:
p0 p1
"
D
h n e C1 h n e C2 /N 1 h 2n e C2 /N
1 h 2n e C1 /N h n e C2 h n e C1 /N
#1
h n e C1 /N h n e C2 /N
. (6.48)
235
236
6 Predictive PID Control Algorithms
As in the case of the predictive PI(D) algorithms the sum of the reference signals in the prediction points is taken into account, to set the output to the required reference value, the PI(D) gain has to be divided by the number of parallel channels. That means that the values of p 0 , p 1 , and p 2 have to be divided in the case of extended horizon control by 2 for the PI algorithm, and by 3 for the PID algorithm [1]. 6.4.2 Equivalence in the Case of Long-Range Horizon Control
For the GPC algorithm the control increment is expressed with n u D 1 as 1 T H (y r yO free ) ∆ u(k) D H T H C λ u I i T 1 T h p p D H H C λuI H y r F y G P C y p H G P C ∆u p ,
(6.49)
where the free response is divided into two parts, the effect of y p , the vector containing the current and past output values, and the effect of ∆u p , the vector containing the past inputs. For predictive PID control the algorithm is i1 h i h T T yrPID, sum yO freePID,sum hPID kPID ∆ u(k) D 1 C kPID i1 h i h p p T T yrPID, sum FyPID y p HPID ∆u p . (6.50) hPID kPID D 1 C kPID It is supposed that y p and ∆u p are nearly the same for the two algorithms. For longer prediction horizons this assumption can be accepted. Considering zero reference signals, we can compare the two algorithms as done by Johnson and Moradi [7]: " # i T 1 T h p yp p H H C λuI H F y G P C , H G P C ∆u p " # i1 h i h yp p p T T . (6.51) kPID FyPID , HPID D 1 C kPID hPID ∆u p Let us introduce the following notation: 1 T kG P C D HT H C λ u I H , h i p p k0 D k G P C F y G P C , H G P C , h i p p S D FyPID , HPID .
(6.52) (6.53) (6.54)
With this notation, from (6.51) the following relationship is obtained: h i1 T T 1 C kPID hPID kPID S D k0
(6.55)
6.4 Equivalence of Predictive PID and GPC Algorithms
and T D k0 [S hPID k0 ]1 . kPID
(6.56)
As the matrix in (6.56) generally is not invertable, the solution can be calculated by the following relationship [7]: 1 T kPID D k0 (S hPID k0 ) T (S hPID k0 )(S hPID k0 ) T .
(6.57)
T From kPID the tuning parameters of the PID algorithm can be calculated.
Example 6.3 Calculation of the parameters of the GPC-equivalent one-step-ahead predictive PID control The transfer function of a plant with gain K p D 1 and time constants T1 D 1 s and T2 D 2 s is G(s) D 1/((1 C s)(1 C 2s)); the sampling time is ∆T D 1 s. The pulsetransfer function is given by (6.38). The parameters of the pulse-transfer function and the points of the step response were given in Example 6.2. For λ u D 1 and λ u D 10 the controller parameters are calculated with n e D 5 according to (6.44) and are given in Table 6.1. It is seen that for λ u D 1 the values of the controller parameters are equal to the appropriate step response points. These parameters have to be divided by 3. The equivalence of the extended horizon GPC and predictive PID algorithms is demonstrated in Figure 6.2. In the simulation a positive unit step reference signal acts at Table 6.1 PID controller parameters for extended horizon control n e D 5.
p0 p1 p2
λu D 1
λ u D 10
0.9637 0.9405 0.9029
0.0964 0.0941 0.0903
y
y
dist.: 0 → (–0.5)
pred. PID 1
y
GPC
y
0.5
0.5
GPC
yr 0
0
0 u 1.5
10
20
30
40
50
t [s]
0
u 1.5
pred. PID
10
20
30
40
50
t [s]
30
40
50
t [s]
pred. PID
1
1 0.5 0
dist.: 0 → (–0.5)
pred. PID
yr
1
0
(a)
10
GPC
0.5
GPC 20
30
40
ne = 5, λu = 1
50
t [s]
0
0
(b)
10
20
ne = 5, λu = 10
Figure 6.2 Equivalence of predictive PID and GPC algorithms in the case of one-step-ahead extended horizon control.
237
238
6 Predictive PID Control Algorithms
time point 5s, and a negative 0.5 step disturbance is applied at time point 30 s at the process input. Prediction of the reference signal is taken into account. Figure 6.2 shows the controlled and the manipulated signals. It has to be mentioned that for longer horizons the equivalence is better.
Example 6.4 Calculation of the parameters of the GPC-equivalent long-range predictive PID control The plant is the same as in Example 6.3. For n e1 D 1, n e2 D 10, and λ u D 1 the controller parameters calculated according to (6.57) are p 0 D 1.2818, p 1 D 0.4812, and p 2 D 0.0947 (which in case of long-range control are not divided, as (6.57) considers already the effect of the parallel paths). In the simulation a positive unit step reference signal acts at time point 10 s, and a negative 0.5 step disturbance is applied at time point 25 s at the process input. Prediction of the reference signal is taken into account. Figure 6.3 gives the controlled and the manipulated signals for the GPC and the equivalent PID control.
Example 6.5 GPC-equivalent predictive PI control of a third-order process approximated by a first-order process with dead time The transfer function of the plant with gain K p D 1 and equal time constants T1 D T2 D T3 D 0.333 s is G(s) D 1/((1 C 0.333s)3 ). The step response can be approximated by a first-order process with dead time as GO (s) D e 0.26s /(1 C 1.25s). The first-order approximation is calculated considering the tangent in the inflection point of the step response. The step responses of the third-order plant and its firstorder approximation are shown in Figure 6.4. The sampling time is ∆T D 0.1 s. Determine the GPC-equivalent PI controller parameters considering the first-order approximation if the parameters of the GPC algorithm are λ u D 1, n u D 1, n e1 D 1, and n e2 D 10. As the discrete dead time has to be an integer, it is approximated by 3. The parameters of the PI algorithm are p 0 D 0.7723 and p 1 D 0.3826 or equivalently k c p D 0.3826 and k c i D 0.3897. In the simulation a positive unit step reference signal acts at time point 5 s, and a negative 0.5 step disturbance is applied at time point 15 s at the process input. Prediction of the reference signal is taken into account. Figure 6.5a shows the cony dist.: 0 → (–0.5)
long-range PID 1
1
y
0.5
0
(a)
5
0.5
GPC
yr 0
u 1.5 long-range PID
10
15
GPC
20
25
controlled variable
30
35 t [s]
0
0
(b)
5
10
15
20
25
30
35 t [s]
manipulated variable
Figure 6.3 Equivalence of predictive PID and GPC algorithms in the case of long-range horizon control (n e1 D 1, n e2 D 10, λ u D 1).
6.4 Equivalence of Predictive PID and GPC Algorithms
Figure 6.4 Step responses of the third-order plant and its first-order approximation.
(a)
first-order process with dead time and exact process model
(b) third-order process and approximating first-order model with dead time
Figure 6.5 Predictive PI control and equivalent GPC control with parameters λ u D 1, n e1 D 1, and n e2 D 10.
trolled output and the manipulated variable in the case of GPC control and its equivalent predictive PI control supposing that the plant is exactly the same as the first-order model with dead time. In this case the two algorithms practically provide the same performance. Figure 6.5b demonstrates the performance in the case of plant/model mismatch, when the plant is of third order and it is approximated by a first-order model with dead time. It is seen that in the case of plant/model mismatch the control shows some oscillations. It has to be emphasized that the control system is not stable for all parameter settings. Especially in the case of plant/model mismatch it can be sensitive to the appropriate tuning parameters. Appropriate choice of λ u and of the prediction horizon could generally ensure stable performance for the given plant. The effect of plant/model mismatch could be compensated for with additional robustifying considerations (see Section 6.6).
239
240
6 Predictive PID Control Algorithms
6.5 Tuning of Predictive PI(D) Algorithms
Besides the GPC equivalence, other PI(D) controller tuning rules can also be applied for predictive PI(D) algorithms. Different tuning rules of thumb are known mainly for continuous PI(D) controllers. These rules can be used for digital controllers as well after discretization. The continuous-time PID control algorithm with ideal differentiating effect is given by the relationship 0 1 Zt 1 d e(t) A. e(τ)d τ C TD (6.58) u(t) D K c @ e(t) C TI dt 0
The discrete-time PID algorithm for the control increment is expressed as ∆ u(k) D p 0 e(k) C p 1 e(k 1) C p 2 e(k 2) ,
(6.59)
∆ u(k) D u(k) u(k 1) .
(6.60)
where
Discretization with sampling time ∆T can be executed in different ways. Using, for example, the trapezoid rule for approximate integration, K c ∆T ∆ u(k) D K c e(k) e(k 1) C e(k 1) C e(k) 2TI K c TD e(k) 2e(k 1) C e(k 2) . C ∆T Comparing (6.59) and (6.61), we obtain the following relationship:
∆T ∆T TD 2TD p 0 D Kc 1 C I p 1 D K c 1 I C C 2TI ∆T 2TI ∆T TD . p 2 D Kc ∆T
(6.61)
(6.62)
For predictive PID control n e,h o r D n e2 n e1 C1 parallel controller paths are considered. If the tuning is done on the basis of continuous-time control, the controller gain has to be divided by the number of paths; thus, all the discrete-time controller parameters p 0 , p 1 , p 2 have to be divided by n e,h o r . There are different tuning rules for aperiodic processes. An aperiodic process can be described by the following transfer function: G(s) D
Kp e s Td , (1 C s T1 )(1 C s T2 ) . . . (1 C s Tn )
(6.63)
where K p is the static gain, T1 , T2 , . . . , Tn are the time constants, and Td is the dead time. TΣ is defined as the sum of the dead time and the time constants: TΣ D Td C
n X iD1
Ti .
(6.64)
6.5 Tuning of Predictive PI(D) Algorithms Table 6.2 PI(D) controller tuning rules according to Kuhn [9].
Kc TI TD
PI
PID
0.5/K p 0.5TΣ 0
1/K p 0.66TΣ 0.167TΣ
Rules of thumb suggested by Kuhn [9] for the coefficients of the continuous-time PI(D) controller with higher-order aperiodic processes are given in Table 6.2. It has to be emphasized that when the rule for predictive control is applied, in TΣ the dead time Td is not considered, as predictive control based on predicted signals compensates for the effect of the dead time. Therefore, for systems containing significant dead time, predictive PI(D) control will result in faster behavior than the conventional PI(D) control. Example 6.6 Predictive PI control of a third-order process approximated by a firstorder model with dead time using Kuhn’s tuning rule The system is the same as in Example 6.5. The third-order process is approximated by a first-order system with dead time. The exact and the approximating first-order transfer functions of the plant are G(s) D 1/((1 C 0.333s)3 ) and GO (s) D e 0.26s / (1 C 1.25s), respectively. The sampling time is ∆T D 0.1 s. The prediction horizon is given by n e1 D 1, n e2 D 5. The parameters of the continuous-time PI controller according to Kuhn’s rules (Table 6.2) considering TΣ D 1 s are K c D 0.5/K p D 0.5/1 D 0.5 and TI D 0.5TΣ D 0.5 1 D 0.5 s. Considering the discretization (6.62) and also dividing by n e,h o r D n e2 n e1 C 1 D 5, the parameters of the discrete-time controller are as follows:
0.1 ∆T 0.5 Kc 1C D 0.11 , 1C D p0 D n e,h o r 2TI 5 2 0.5
∆T 0.5 0.1 Kc p1 D 1 D 1 D 0.09 . n e,h o r 2TI 5 2 0.5 Applying (6.3), the discrete-time tuning parameters are k c p D p 1 D 0.09 and k c i D p 0 C p 1 D 0.11 0.09 D 0.02. Including physical dead time Td , the tuning parameters are the same. Different dead times (0, 0.5, 1, 2, and 5) are considered in the process. In the simulation a positive unit step reference signal acts at time point 1 s, and a negative unit step disturbance is applied at time point 15 s. No prediction of the reference signal is taken into account. Figure 6.6 shows the controlled and the manipulated variables when the system is of first order and its model is accurate, also of first order with the same parameters. It is seen that the quality of the control with a stepwise ref-
241
242
6 Predictive PID Control Algorithms y 1
u dist.: 0 → (–1)
yr
2 Td=0 0.5 1
5
0 0
5
(a)
2 1 0.5 Td =0 10
Td=5
Td=0
1
2 5 15
25
20
t [s]
0 0
5
(b)
controlled variable
10
15
20
25
t [s]
manipulated variable
Figure 6.6 Control of a first-order process with different dead times by controllers designed on the basis of the exact process model. u
y 1
dist.: 0 → (–1)
yr 2
0 0
(a)
5
5
1 0.5 Td=0 10
0.5 1 2 5 15
20
controlled variable
Td=5
2
Td=0
Td=0
25
1
t [s]
0 0
(b)
5
10
15
20
25
t [s]
manipulated variable
Figure 6.7 Control of a third-order process with different dead times by controllers designed on the basis of the approximating first-order process models with dead time.
erence signal change is the same for all dead-time cases, the outputs are shifted appropriately, and the manipulated variables remain the same. The disturbance rejection depends on the dead time. Figure 6.7 gives the controlled and the manipulated variables when the system is of third order with the dead times given above, and the controller is designed according to the first-order approximation. The performance is worse than before, and also with longer dead time the dynamics is also affected. There are also other tuning rules based on the approximation of an aperiodic process by a first-order system with dead time (e.g., Chien et al. [5]). Tuning can also be done on the basis of frequency domain considerations, using the pole-cancellation technique. Åström and Hägglund [4] recommended tuning rules considering also the socalled set point weighting to attenuate too high manipulated variable values. The original feedback structure is supplemented by an additional path affecting directly the manipulated variable from the reference signal. The structure of the control system is given in Figure 6.8.
Figure 6.8 PID controller with set point weighting.
6.5 Tuning of Predictive PI(D) Algorithms Table 6.3 PI(D) controller tuning rules according to Åström and Hägglund [4]. PI
PID
2 exp 2.7TLr C 3.7TLr 2 8.9TL exp 6.6TLr C 3TLr or 2 0.79TT,63% exp 1.4TLr C 2.4TLr
0.29 TT,63% Kp TL
Kc
TI
TD
0
0.81 exp 0.73TLr C 1.9TLr
Kr
2
2 exp 8.4TLr C 7.3TLr 2 5.2TL exp 2.5TLr 1.4TLr or
3.8 TT,63% K p TL
2
0.46TT,63% exp 2.8TLr 2.1TLr 2 0.89TL exp 0.37TLr 4.1TLr or
0.077TT,63% exp 5.0TLr 4.8TLr 2 0.40 exp 0.18TLr C 2.8TLr
2
The aperiodic process is approximated by a first-order process with dead time: G(s) D
Kp e s TL , 1 C s TT
(6.65)
where the meaning of the variables is as follows: K p : static gain of the model, TT : time constant of the model, TL : apparent dead time. Furthermore, TT,63% : time constant, defined as the time to reach 63% of the final value of the step response after the apparent dead time, TLr : ratio of the dead time and the time constant of the process, TLr D Kr :
TL , TL C TT,63%
(6.66)
set point weighting factor.
The suggested tuning rules for the continuous PI and PID controllers are given in Table 6.3. When two suggestions are given for calculation of a parameter, generally the two calculated values do not differ much. If both are calculated, a mean value can be taken into account. For predictive control, set point weighting is applied for all the parallel paths [2]. K c has to be divided by the number of parallel paths.
243
244
6 Predictive PID Control Algorithms
Example 6.7 Predictive PI(D) control of a third-order process approximated by a first-order system with dead time using the Åström–Hägglund tuning rules The system is the same as in Example 6.6. It is approximated by a first-order process with dead time as in Example 6.6. The sampling time is ∆T D 0.1 s. The prediction horizon is given by n e1 D 1, n e2 D 5. The parameters are tuned according to the Åström–Hägglund rules in Table 6.3. The design was executed considering the parameters of the first-order approximation of the system as follows: TT D 1.25 s, TL D 0.26 s, and TT,63% 0.63TT D 0.7875 s, TLr D
TL 0.26 s D D 0.2482 . TL C TT,63% 0.26 s C 0.7875 s
The controller gain applied in the predictive control is divided by the number of paths. Table 6.4 gives the controller parameters. Figures 6.9 and 6.10 give the controlled and the manipulated variables for predictive PI and PID control, respectively, with tuning parameters calculated according to Kuhn and Åström–Hägglund rules applied for the first-order process with dead time. The control is implemented for the third-order plant. It is seen that in the case of PI control the performances of the two algorithms are similar. With PID control the Åström–Hägglund method gives a more dynamic behavior. With the Åström–Hägglund method, reference signal tracking can be accelerated by increasing the factor K r providing set point weighting. Figure 6.11 shows the predictive PI control of the third-order process tuned according to the Åström– Hägglund rule, but with different values of set point weighting K r . With set point weighting according to the rule, the control behavior is similar to the Kuhn tuning effect. Increasing the weighting results in the reference signal tracking being somewhat accelerated. Disturbance rejection is not affected, as expected. y 1 0.5 0
0
(a)
dist.: 0 → (–1)
A-H
yr y
A-H
Kuhn
5
10
Kuhn
15
20
25 t [s]
u 2 1.5 1 0.5 0 0
A-H A-H
(b)
controlled variable
Kuhn Kuhn 5
10
15
20
25 t [s]
manipulated variable
Figure 6.9 Controlled and manipulated variables for predictive PI control with Kuhn and Åström–Hägglund (A–H) tuning rules. Table 6.4 Controller parameters. Set point weighting
Kc
TI
TD
p0
p1
p2
Kr D 0.7597 (PI) Kr D 0.497 (PID)
0.5645 2.2434
0.52 0.65
0 0.16
0.6188 6.0054
–0.51 –9.25
0 3.5894
6.6 Robustifying Effects Applied for Predictive PI(D) Control Algorithms y yr
1 0.5
y
0 0
dist.: 0 → (–1)
Kuhn
A-H
A-H
Kuhn
5
(a)
10
15
20
25
t [s]
u 2 1.5 1 0.5 0
A-H Kuhn
A-H 0
5
(b)
controlled variable
Kuhn
10
15
20
25
t [s]
manipulated variable
Figure 6.10 Controlled and manipulated variables for predictive PID control with Kuhn and Åström–Hägglund (A–H) tuning rules. y 1
yr
y Kr=1.5 Kr=0.76
0.5 0
(a)
dist.: 0 → (–1)
Kr=2.0
0
5
10
15
20
controlled variable
25
t [s]
u 2 1.5 1 0.5 0
Kr=2.0 Kr=1.5 Kr=0.76 0
(b)
5
10
15
20
25
t [s]
manipulated variable
Figure 6.11 Reference signal tracking can be accelerated by increasing the set point weighting.
6.6 Robustifying Effects Applied for Predictive PI(D) Control Algorithms
Control of a process is based on the process model. As generally there can be a mismatch between the process and its model, the real performance will differ from the ideal one. The tuning rules discussed above consider the first-order approximation of the process, so plant/model mismatch almost always exists. As these rules give calm performance, the algorithms will generally tolerate this mismatch. If there is a more significant mismatch, robustifying of the algorithms has to be considered. Control algorithms could be especially sensitive to mismatch in the dead time. In predictive PI(D) control, increasing the number of parallel paths generally reduces the effect of mismatch. Applying the T(q 1 ) polynomial in the predictive equations for predictive control, that is, for filtering the free response, has a robustifying effect (see Chapter 5). The T(q 1 ) polynomial can be used to make predictive PI(D) control more robust, as well (see Arousi et al. [3]). Example 6.8 Predictive PI control of a third-order process, the effect of the filtering polynomial in the predictive equation (continuation of Example 6.6) The system and the tuning parameters are the same as in Example 6.6. Including the T(q 1 ) polynomial (as discussed in Chapter 5) for filtering the free response during the prediction has a smoothing effect on the control performance. An appropriate choice of the T(q 1 ) filtering polynomial could decrease the effect of plant/model mismatch. Let us choose a first-order filter as T(q 1 ) D
245
246
6 Predictive PID Control Algorithms u
y dist.: 0 → (–1)
yr
1
0 0
5
(a)
5 2 1 0.5 Td =0 10
15
Td =5
2
Td =0 0.5 1 2 5 25
20
Td =0 1
t [s]
0
0
5
10
(b)
controlled variable
15
20
25
t [s]
manipulated variable
Figure 6.12 Control of a third-order process with different dead times by controllers designed on the basis of the approximating first-order process models with dead time using the robustifying filter T(q 1 ) D (1 0.7q 1 )/0.3. y
dist.: 0 → (–1)
t1=-0.7
yr
1
u
t1=-0.7
t1=-0.7
2 t1=-0.7
y t1=0
t1=0
1
t1=0
t1=0 0 0
5
(a)
10
15
20
25
t [s]
0
0
5
(b)
controlled variable
10
15
20
25
t [s]
manipulated variable
Figure 6.13 Control of a third-order process with dead time by a controller designed on the basis of the approximating first-order process model with dead time using different robustifying filters (with t1 D 0, t1 D 0.5, t1 D 0.7). y
u
ne,hor=0, 5 yr
1
dist.: 0 → (–1)
2
ne,hor=0, 5
ne,hor=0, 5 ne,hor=50
ne,hor=50
ne,hor=50
y
ne,hor=0, 5
1 ne,hor=50
0
0
(a)
5
10
15
20
controlled variable
25
t [s]
0
0
(b)
5
10
15
20
25
t [s]
manipulated variable
Figure 6.14 Control of a third-order process with dead time by a controller designed on the basis of the approximating first-order process model with dead time using a robustifying filter and different numbers of parallel channels.
(1 t1 q 1 )/(1 t1 ). Figure 6.12 demonstrates the effect of the T(q 1 ) polynomial (here t1 D 0.7). Figure 6.13 shows the performance with different filter parameter values in the case of Td D 2. It is expected that with further tuning of the T polynomial the effect of the mismatch could be decreased further. Figure 6.14 demonstrates that without using T(q 1 ) polynomial and increasing the prediction horizon also works against plant/model mismatch.
Another possibility to make predictive PI(D) control more robust is the application of a robustifying filter in a control structure similar to a Smith predictor as shown in Figure 6.15. This solution was suggested in Normey-Rico et al. [11] and was also applied in Normey-Rico and Camacho [12], where some robustness analysis is also given. The choice of the robustiyfing filter influences the control performance. The filter can generally be chosen as a first-order low-pass filter with unity gain as shown in Torrico and Normey-Rico [13] and Ingimundarson and Hägglund [6].
6.6 Robustifying Effects Applied for Predictive PI(D) Control Algorithms vu1(k) yr(k)
vu2(k)
+ Reference filter
+
e(k) Predictive PI(D) controller
u(k)
+
+ Process with dead time
y(k)
+
+ Process model without dead time
Dead time
+ +
Robustifying filter
Figure 6.15 Predictive PI(D) controller with a robustifying Smith-predictor-like scheme.
Robust stability can be given by the following relationship analyzed in the frequency domain [10]: ˇ ˇ ˇ ˇ 1 ˇ , 8ω , (6.67) jl( j ω)j < ˇˇ M n ( j ω) ˇ where l( j ω) D
∆G( j ω) G( j ω) G n ( j ω) D G n ( j ω) G n ( j ω)
(6.68)
is the relative additive uncertainty of the plant transfer function, G n ( j ω) is the nominal frequency function of the plant, G( j ω) is its current value, and ∆G( j ω) is the deviation between the current and the nominal frequency functions. M n ( j ω) is the nominal closed-loop frequency function between the output and the reference signals. With controller C( j ω) and filter F( j ω), frequency functions (6.67) can be given as ˇ ˇ ˇ 1 C C s m ( j ω)G n ( j ω) ˇ ˇ , 8ω . (6.69) j∆G( j ω)j < ˇˇ C s m ( j ω)F( j ω) ˇ With some block-diagram algebra, Figure 6.15 can be given in the form shown in Figure 6.16. Here the Smith-predictor-like C s m controller is C s m ( j ω) D
C( j ω) . 1 C C( j ω)G n ( j ω)(1 F( j ω)e j ω Td )
(6.70)
If C( j ω) denotes the frequency function of the predictive PI controller, it can be expressed, for example, by using the equivalence between the GPC and the PI algorithms and by applying the RST transformation relations. It can be seen that the filter influences the robustness properties.
247
248
6 Predictive PID Control Algorithms vu1(k)
Smith predictor like controller yr(k) Reference filter
e(k)
+
-
+
+
Predictive PI(D) controller
u(k)
Process with + dead time
+
-
+
+
+
vu2(k) y(k)
Process model without dead time Robustifying filter
Process model with dead time
Robustifying filter
Figure 6.16 Block diagram equivalent to Figure 6.15. y 1
y
0.5 0
dist.: 0 → (–0.5)
yr
1st-order system
0
5
(a)
10
3rd-order system 15
20
25
t [s]
u 2 1.5 1 0.5 0
3rd-order system
1st-order system 0
5
(b)
controlled variable
10
15
20
25 t [s]
manipulated variable
Figure 6.17 Predictive PI control of a third-order process and its approximating first-order process with dead time. The controller is designed on the basis of the same first-order process model using the Smith-predictor-like scheme without a robustifying filter. y 1
0
1st-order system
1
1st-order system
(a)
u 1.5
y
0.5 0
dist.: 0 → (–0.5)
yr
5
10
15
3rd-order system 20
controlled variable
25 t [s]
0.5 0
3rd-order system 0
(b)
5
10
15
20
25 t [s]
manipulated variable
Figure 6.18 Predictive PI control of a third-order process and its approximating first-order process with dead time. The controller is designed on the basis of the same first-order process model using the Smith-predictor-like scheme with a robustifying filter.
Example 6.9 Predictive PI control of a third-order process approximated by a firstorder model with dead time using the robustifying Smith-predictor-like scheme The system and the tuning parameters are the same as in Example 6.6. The controller is designed on the basis of the first-order model. However, the PI predictive controller is detuned: the parameters are not divided by the number of paths: k c p D 0.45 and k c i D 0.1. If the process is the same as the first-order model, the control performance is appropriate, but taking into consideration the plant/model mismatch with the third-order process, there are significant oscillations in the output signal (Figure 6.17). Applying the first-order Smith filter according to the struc-
6.7 Summary
ture shown in Figure 6.15 the oscillations decrease and the control performance becomes acceptable (Figure 6.18). The robustifying filter in the Smith-predictorlike scheme was F(q 1 ) D (0.2q 1 )/(1 0.8q 1 ).
6.7 Summary
The most frequently applied controllers in the process industries are the PI and the PID control algorithms. Control engineers and operators are familiar with the effects of the controller knobs and have expertise in their tuning. There are a number of tuning rules based on simple process models. Such models can be obtained by simple measurements, for example, getting the step response of the process, for which tests can generally be executed under industrial circumstances. In the case of significant dead time (transport delay), PI(D) algorithms provide slow control performance. To accelerate their response, PI(D) algorithms can be furnished with predictive properties. The structure of predictive PI(D) algorithms was shown. Analytical expressions of predictive PI and PID algorithms were given for first-order and second-order systems with dead time. Tuning rules equivalent to those for GPC were presented. Tuning rules of thumb [4, 9] can also be used. As in predictive PI(D) control the effect of the parallel paths is summarized, the continuous-time controller gain resulting from classical PI(D) tuning rules has to be divided by the number of parallel channels (this means that all the discrete-time controller parameter values are divided by the number of channels). In the case of plant/model mismatch, the robustifying effect of the noise model filter (T(q 1 ) polynomial) and of the robustifying filter in a Smith-predictor-like scheme was demonstrated. Simulation examples illustrated the behavior of predictive PI(D) algorithms.
References 1 Arousi, F., Bars, R., and Haber, R. (2008a) Tuning of predictive PID algorithms according to GPC equivalence, Proceedings of 8th Process Control Conference, Kouty nad Desnou, Czech Republic. 2 Arousi, F., Bars, R., Haber, R., and Schmitz, U. (2007) Predictive PI controller with set-point weighting, Proceedings of 8th Carpathian Control Conference, Strbské Pleso, Slovak Republic, pp. 32– 35. 3 Arousi, F., Schmitz, U., Bars, R., and Haber, R. (2008b) Robust predictive
PI controller based on first-order dead time model, Preprints 17th IFAC World Congress, Seoul. 4 Åström, K.J. and Hägglund, T. (1995) PID Controllers: Theory, Design and Tuning, Instrumentation Society of America. 5 Chien, K.L., Hrones, J.A., and Reswick, J.B. (1952) On the automatic control of generalized passive systems. Transactions of ASME, 74, 175–185. 6 Ingimundarson, A. and Hägglund, T. (2001) Robust tuning procedures of dead time compensating controllers. Control Engineering Practice, 9, 1195–1208.
249
250
6 Predictive PID Control Algorithms 7 Johnson, M.A. and Moradi, M.H. (2005) PID Control, Springer-Verlag, Berlin. 8 Katebi, M.R. and Moradi, M.H. (2001) Predictive PID controllers. IEE Proceeding – Control Theory Applications, 148(6), 478–487. 9 Kuhn, U. (1995) Eine praxisnahe Einstellregel für PID-Regler: Die TSummen-Regel (A practical tuning rule for PID controllers: the T-sum rule). Automatisierungstechnische Praxis, 37(5), 10–16. 10 Morari, M. and Zafiriou, E. (1989) Robust Process Control, Prentice Hall, Englewood Cliffs, USA.
11 Normey-Rico, J.E., Bordons, C., and Camacho, E.F. (1997) Improving the robustness of dead time compensating PI controllers. Control Engineering Practice, 5(6), 801–810. 12 Normey-Rico, J.E. and Camacho, E.F. (2007) Control of Dead-Time Processes, Springer Verlag, Berlin. 13 Torrico, B.C. and Normey-Rico, J.E. (2005) Robust constrained horizon predictive controller for dead time systems, Preprints 16th IFAC World Congress, Prague.
251
7 Predictive Control of Multivariable Processes Predictive control of linear multivariable processes will be presented. Industrial processes are very often multivariable, which means there are more manipulated and controlled variables. Three cases may occur: If the numbers of controlled and manipulated variables are equal, the problem is well determined. This case will be treated in this chapter. If there are more controlled variables than manipulated variables (underdetermined problem), then a combined cost function can be set up and can be minimized. The dimension of the optimization problem is equal to the number of manipulated variables. This procedure is applied when constraints are considered as soft constraints. In the rare case when there are more possibilities for the manipulation than the number of controlled variables, the problem is overdetermined and in addition to the direct control aim (e.g., keeping a certain variable at its set value) further aims can be fulfilled: some of the possible manipulated variables are not used or are controlled to their desired values. Alternatively, the cost of the manipulation can be minimized. Whereas with Single-Input, Single-Output (SISO) systems, input/output models are usual, Multi-Input, Multi-Output (MIMO) processes are often modeled and controlled on the basis of state space models. Therefore, both model types and the predictions based on them will be presented. The structure of the cost function and the control algorithm is similar to that in the SISO case. The special characteristics of the MIMO case will be demonstrated through examples. It will be shown that the control algorithm can be expressed by a linear control algorithm without matrix inversion in the unconstrained case. The derivation is analogous to that in the SISO case. Although theoretically any realistic control problem can be solved without proper pairing and scaling of the manipulated and controlled variables, these practical techniques will be treated and illustrated by simulations. Recommendations for choosing the tuning parameters have already been given for SISO control, so here only the parameters specific to the MIMO control are investigated. MIMO predictive control does not suppose prior decoupling of the process to be controlled. Nevertheless, it will be shown that a prior static decoupling, which is Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
252
7 Predictive Control of Multivariable Processes
easier than a dynamic one, is very advantageous. A case study of a Two-Input, Two-Output (TITO) physical model of a distillation column will close the chapter. Throughout the chapter the same number of process inputs and outputs is denoted by M. If this assumption is not valid, then different numbers of inputs and outputs are denoted by M u and M y , respectively.
7.1 Model Descriptions
The weighting function series model considered in the SISO case is not presented here. Like in the SISO case, Controlled AutoRegressive Moving Average (CARMA) and Controlled AutoRegressive Integrating Moving Average (CARIMA) models are dealt with. The input and output signals are arranged in vectors: T (7.1a) u(k) D u 1 (k), u 2 (k), . . . , u M (k) , T y(k) D y 1 (k), y 2 (k), . . . , y M (k) .
(7.1b)
7.1.1 Matrix Fraction Model 7.1.1.1 CARMA Matrix Fraction Model A MIMO model is described by a matrix fraction model (e.g., Camacho and Bordons [3], Kailath [13]). The general form of a MIMO system with polynomial matrices (the so-called CARMA model) is (7.2) A q 1 y(k) D B q 1 u (k d) C T q 1 e(k) ,
where A(q 1 ) and T(q 1 ) are M M monic polynomial matrices and B(q 1 ) is an M M polynomial matrix defined as (7.3a) A q 1 D I C A1 q 1 C A2 q 2 C C A n a q n a , B q 1 D B1 q 1 C B2 q 2 C C B n b q n b ,
(7.3b)
T q 1 D I C T1 q 1 C T2 q 2 C C T n c q n c .
(7.3c)
The transformation from the matrix fraction description to the pulse-transfer function matrix form is easy, and G y e q 1 D A1 q 1 T q 1 , G y u q 1 D A1 q 1 B q 1 (7.4) and the model equation becomes y(k) D A1 q 1 B q 1 u(k d) C A1 q 1 T q 1 e(k) .
(7.5)
The transformation from the pulse-transfer function matrix to the matrix fraction description is more complex:
7.1 Model Descriptions
1. For the general case, see Goodwin and Sin [7] and Camacho and Bordons [3]. 2. A common denominator of the pulse-transfer functions for all outputs (i.e., rows) has to be calculated (diagonal matrix A(q 1 )). The pulse-transfer func1 ). tions are obtained by multiplying matrix B(q 1 ) by A1 i i (q y(k) D diag hA11 , A22 , . . . , A M,M i1 B q 1 u(k d) D A1 q 1 B q 1 u(k d) . The procedure is similar for the noise pulse-transfer function matrix. 3. The order of the pulse-transfer functions is minimal if the least common denominators of the pulse-transfer functions for all outputs (i.e., rows) are calculated while building the diagonal matrix A(q 1). An example is shown below. Example 7.1 CARMA input/output model of a TITO process with different time constants of the submodels A TITO process is given with the transfer functions of the submodels. 3 2 0.25 0.4s 1 0.2s e e 7 u 1 (s) 6 sC1 y 1 (s) sC1 7 6 D4 5 u 2 (s) y 2 (s) 0.5 1 sC1 0.5s C 1 The pulse-transfer functions are obtained with sampling time ∆T D 0.2 s and assuming a zero-order holding device as 3 2 0.0453q 3 0.1813q 2 6 7 y 1 (k) 10.8187q 1 7 u 1 (k) 6 10.8187q 1 D6 . 7 y 2 (k) 5 u 2 (k) 4 0.0906 q 1 0.3297q 1 10.8187q 1
1 0.6703q 1
For parameter estimation and for control purposes, the difference equations of both process outputs are required. It is advantageous to use common denominator polynomials for each model output. 2 3 0.1813q 2 0.0453q 3 6 7 y 1 (k) 10.8187q 1 10.8187q 1 6 7 D6 7 1 1 2 2 y 2 (k) 4 0.0906 q 0.0608q 5 0.3297q 0.2699q 11.4891q 1 C 0.5488q 2 u 1 (k) . u 2 (k)
11.4891q 1 C 0.5488q 2
The difference equations of the two outputs result in the CARMA model: y 1 (k) D 0.8187y 1 (k 1) C 0.1813u 1 (k 2) C 0.0453u 2 (k 3) , y 2 (k) D 1.4891y 2 (k 1) 0.5488y 2 (k 2) C 0.0906u 1 (k 1) 0.0608u 1 (k 2) C 0.3297u 2 (k 1) 0.2699u 2 (k 2) .
253
254
7 Predictive Control of Multivariable Processes
The polynomial matrices of the form (7.3) are as follows: A q 1 D I C A1 q 1 C A2 q 2 1 0 D 0 1 0 0 0.8187 0 1 q 2 , q C C 0 0.5488 0 1.4891 B q 1 D B1 q 1 C B2 q 2 C B3 q 3 0 0 0.1813 0 D q 1 C q 2 0.0906 0.3297 0.0608 0.2699 0 0.0453 3 C q . 0 0
7.1.1.2 CARIMA Matrix Fraction Model Often a CARIMA model is used to take also a constant drift into account: T q 1 A q 1 y(k) D B q 1 u(k d) C e(k) . 1 q 1
(7.6)
After rearranging, one gets (1 q 1 )A q 1 y(k) D B q 1 (1 q 1 )u(k d) C T q 1 e(k) or A ∆ q 1 y(k) D B q 1 ∆u(k d) C T q 1 e(k) ,
(7.7)
A ∆ q 1 D (1 q 1 )A q 1
(7.8)
T ∆u(k) D ∆ u 1 (k), ∆ u 2 (k), . . . , ∆ u M (k) .
(7.9)
where
and
Now, the pulse-transfer functions are G y u q 1 D A1 q 1 B q 1
A1 q 1 T q 1 and G y e q 1 D 1 q 1
and the model equation becomes y(k) D A1 q 1 B q 1 u (k d) C
1 A1 q 1 T q 1 e(k) . 1 1q (7.10)
7.1 Model Descriptions
Example 7.2 CARIMA input/output model of a TITO process with different time constants of the submodels (continuation of Example 7.1) Both output equations in Example 7.1 can be transformed to the CARIMA form like with SISO models: y 1 (k) D 1.8187y 1 (k 1) 0.8187y 1 (k 2) C 0.1813∆ u 1 (k 2) C 0.0453∆ u 2 (k 3) , y 2 (k) D 2.4891y 2 (k 1) 2.0379y 2 (k 2) C 0.5488y 2 (k 3) C 0.0906∆ u 1 (k 1) 0.0608∆ u 1 (k 2) C 0.3297∆ u 2 (k 1) 0.2699∆ u 2 (k 2) , which corresponds to the input/output relation with the polynomial matrices
1 1.8187q 1 C 0.8187q 2 0 0 12.4891q 1 C 2.0379q 2 0.5488q 3 0.0453q 3 ∆ u 1 (k) 0.1813q 2 y 1 (k) D . y 2 (k) 0.0906 q 1 0.0608q 2 0.3297q 1 0.2699q 2 ∆ u 2 (k)
The polynomial matrices from (7.7) are as follows: A ∆ q 1 D I C A ∆1 q 1 C A ∆2 q 2 C A ∆3 q 3 1.8187 0 1 0 D C q 1 C 0 1 0 2.4891 0.8187 0 0 0 C q 2 C q 3 , 0 2.0379 0 0.5488 B q 1 D B1 q 1 C B2 q 2 C B3 q 3 0 0 0.1813 0 D q 1 C q 2 C 0.0906 0.3297 0.0608 0.2699 0 0.0453 3 C q . 0 0
7.1.2 State Space Representation
CARMA and CARIMA models are discussed in the sequel. Only that part of the process which does not include the dead time is described by the state space equations. Then the delayed input signal (or its increment) is the input of the state space description.
255
256
7 Predictive Control of Multivariable Processes
7.1.2.1 CARMA State Space Model Any linear system without an initial jump in the step response can be described by its state space form:
x (k C 1) D A x x(k) C B x u (k d) , y(k) D C x x(k) .
(7.11)
Denote the current and former input and output values by the vectors T y(k i) D y 1 (k i), y 2 (k i), . . . , y M (k i) , T u(k i) D u 1 (k i), u 2 (k i), . . . , u M (k i) I 8i .
(7.12)
The states of a system can be selected in different ways. A state space description requires that the states are measured or at least estimated by an observer. Clarke et al. [4] proposed using the current and older input and output variables as states: x(k) D y(k) , y(k 1) , y(k 2) , . . . , y(k n a C 1) , u(k d 1) , T . u(k d 2) , u(k d 3) , . . . , u(k d n b C 1) (7.13a) In the case of different dead times and model orders, (7.13a) has to be modified as n a ! max(n a i ) ,
d ! min(d i j ) ,
d C n b ! max(d i j C n b i ) ,
(7.13b)
where d i j is the discrete time of the submodels, and n a i and n b i are the common model order of the submodels of the ith output. This method has the advantage that all states can be measured. However, this form is not of minimal order, as the number of states is more than the (minimal) order of the process. This form can be used for the prediction of the output signal using some vector/matrix multiplications. The MIMO state space representation (7.11) is a generalization of the SISO form (2.58a, 2.58b, 2.58c) with the parameters 3 2 A1 A2 A3 . . . A n a 1 A n a B2 B3 B4 . . . B n b 1 B n b 6 I 0 0 0 0 0 0 0 0 0 7 7 6 6 0 I 0 0 0 0 0 0 0 0 7 7 6 6 . .. .. 7 .. .. .. .. .. . . .. . . .. 7 6 . . . . . 7 . . . . . . . 6 . 7 6 6 0 0 0 0 0 0 0 0 0 0 0 7 7 6 6 0 0 0 I 0 0 0 0 0 0 0 7 7, Ax D 6 6 0 0 0 0 0 0 0 0 0 0 7 7 6 6 0 0 0 0 0 I 0 0 0 0 7 7 6 7 6 0 0 0 0 0 I 0 0 0 7 6 0 6 . .. .. 7 .. .. .. .. .. . . .. .. . . 7 6 . 6 . . . . . 7 . . . . . . . 7 6 4 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 I 0 (7.14a)
7.1 Model Descriptions
Bx D Cx D
B1 , I,
0, 0,
0, 0,
0,
..., ...,
0,
0, 0,
I, 0,
0, 0,
0, 0,
..., ...,
0, 0,
T
0 0
.
, (7.14b) (7.14c)
Example 7.3 illustrates this form. Example 7.3 CARMA state space model of a TITO process with different time constants of the submodels (continuation of Example 7.1) The process parameters are given in Examples 7.1 and 7.2. Regarding both channels, the common (least) dead time of all output is d D 0, the maximal model order is n a D 2, and the greatest input signal memory is max(d i j C n b i ) D 3. The state vector is x(k) D y 1 (k), y 2 (k), y 1 (k 1), y 2 (k 1), u 1 (k 1), u 2 (k 1), T u 1 (k 2), u 2 (k 2) , or in shorter form T x(k) D y(k), y(k 1), u(k 1), u(k 2) . As the first two elements of the state vector are the output signals, matrix C x becomes 1 0 0 0 0 0 0 0 . Cx D 0 1 0 0 0 0 0 0 Matrix B x is 2 6 6 6 6 6 6 Bx D 6 6 6 6 6 4
0 0.0906 0 0 1 0 0 0
0 0.3297 0 0 0 1 0 0
3 7 7 7 7 7 7 7. 7 7 7 7 5
Finally, matrix A x has the form 3 2 0.8187 0 0 0 0.1813 0 0 0.0453 6 0 1.4891 0 0.5488 0.0608 0.2699 0 0 7 7 6 6 1 0 0 0 0 0 0 0 7 7 6 6 0 1 0 0 0 0 0 0 7 7 6 Ax D 6 7. 6 0 0 0 0 0 0 0 0 7 7 6 6 0 0 0 0 0 0 0 0 7 7 6 4 0 0 0 0 1 0 0 0 5 0 0 0 0 0 1 0 0 A comparison with the input/output difference equations of Example 7.1 shows the correctness of the derived state space equations.
257
258
7 Predictive Control of Multivariable Processes
7.1.2.2 CARIMA State Space Model In a CARIMA model, matrix A x is replaced by A ∆ x and the state equation becomes
x ∆ (k C 1) D A ∆ x x ∆ (k) C B ∆ x ∆u (k d) , y(k) D C ∆ x x ∆ (k) .
(7.15)
The nonzero parameters of matrices B ∆ x and C ∆ x are the same as those of matrices B x and C x . They are, however, denoted differently as the dimension of the state vector is higher in the CARIMA model than in the CARMA model because of the extension of the process model by an integrator. x ∆ (k) D y(k), y(k 1), y(k 2), . . . , y(k n a ), ∆u(k d 1), ∆u(k d 2), ∆u(k d 3), . . . , ∆u(k d n b C 1)
T
.
(7.16) In the case of different dead times and model orders, (7.16) has to be modified as shown in (7.13b). Equation (7.14) of the CARMA state space model can easily be modified for the CARIMA case (see, e.g., [3]): A∆ x D 2 A ∆1 A ∆2 A ∆3 6 I 0 0 6 6 0 I 0 6 6 . .. .. 6 . . . 6 . 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 0 6 6 0 0 6 0 6 . .. .. 6 . 6 . . . 6 4 0 0 0 0 0 0
. . . A ∆ n a A ∆ n a C1 0 0 0 0 .. .. .. . . . 0 0 I 0 0 0 0 0 0 0 .. .. .. . . . 0 0 0 0
B2 0 0 .. . 0 0 0 I 0 .. . 0 0
B3 0 0 .. . 0 0 0 0 I .. . 0 0
B4 0 0 .. . 0 0 0 0 0 .. . 0 0
. . . B n b 1 B n b 0 0 0 0 .. .. .. . . . 0 0 0 0 0 0 0 0 0 0 0 0 .. .. .. . . . 0 0 I 0
3 7 7 7 7 7 7 7 7 7 7 7 7, 7 7 7 7 7 7 7 7 7 7 5
(7.17a) B∆ x D
B1 ,
0,
0,
...,
0,
0,
I,
0,
0,
...,
0,
T
0
, (7.17b)
C∆ x D
I,
0,
0,
...,
0,
0,
0,
0,
0,
...,
0,
0
.
(7.17c)
Example 7.4 shows the state space description of the CARIMA model of Example 7.2.
7.1 Model Descriptions
Example 7.4 CARIMA state space model of a TITO process with different time constants of the submodels (continuation of Example 7.2) The process parameters are given in Examples 7.1 and 7.2. Regarding both channels, the common (least) dead time of all output is d D 0, the maximal model order is n a D 2, and the greatest input signal memory is max(d i j C n b i ) D 3. The state vector is x ∆ (k) D y 1 (k), y 2 (k), y 1 (k 1), y 2 (k 1), y 1 (k 2), y 2 (k 2), T ∆ u 1 (k 1), ∆ u 2 (k 1), ∆ u 1 (k 2), ∆ u 2 (k 2) , (7.18) or shorter written x ∆ (k) D y(k),
y(k 1),
y(k 2),
∆u(k 1),
∆u(k 2)
T
.
As the first two elements of the state vector are the output signals, matrix C ∆ x becomes 1 0 0 0 0 0 0 0 0 0 . C∆ x D 0 1 0 0 0 0 0 0 0 0 Matrix B ∆ x is 2
B∆ x
6 6 6 6 6 6 6 6 D6 6 6 6 6 6 6 4
0 0.0906 0 0 0 0 1 0 0 0
0 0.3297 0 0 0 0 0 1 0 0
3 7 7 7 7 7 7 7 7 7. 7 7 7 7 7 7 5
Finally, matrix A ∆ x has the form A∆ x D 3 2 1.8187 0 0.8187 0 0 0 0.1813 0 0 0.0453 6 0 2.4891 0 2.0379 0 0.5488 0.0608 0.2699 0 0 7 7 6 6 1 0 0 0 0 0 0 0 0 0 7 7 6 6 0 1 0 0 0 0 0 0 0 0 7 7 6 6 0 0 1 0 0 0 0 0 0 0 7 7 6 7. 6 0 0 1 0 0 0 0 0 0 7 6 0 7 6 6 0 0 0 0 0 0 0 0 0 0 7 7 6 6 0 0 0 0 0 0 0 0 0 0 7 7 6 4 0 0 0 0 0 0 1 0 0 0 5 0 0 0 0 0 0 0 1 0 0
259
260
7 Predictive Control of Multivariable Processes
A comparison to the input/output difference equations of Example 7.2 shows the correctness of the derived state space equations.
7.2 Predictive Equations
There are several possibilities to derive the predictive equations for linear MIMO models. It was shown in Section 7.1 that a matrix fraction model can be transformed into a form with a diagonal polynomial matrix A ∆ (q 1 ). This description corresponds to a Multi-Input, Single-Output (MISO) model with the manipulated variable paired to the output signal and with further manipulated variables of the MIMO model (see Example 7.1). The prediction can be calculated as with SISO processes with measured disturbances, as shown in Section 5.5. Instead of applying this SISO method, we will use a method based on solving the matrix Diophantine equations. The predictive form is derived first for the input/output model and then for the state space model. 7.2.1 Prediction Based on the Matrix Fraction Model
Rearranging and shifting the output signal in (7.7), we obtain the following relationship: yO (k C d C 1 C n e ) D A ∆ q 1 I yO (k C d C 1 C n e ) 1 ∆u(k C 1 C n e ) CB q 1 e(k C d C 1 C n e ) . (7.19) CT q This equation is not suitable for prediction as it contains future (unknown) output values. The predictive transformation of (7.19) based on the MIMO matrix fraction model is similar to the SISO case (Section 3.2.2) and the derivation is not repeated here. For white noise equation error (T(q 1 ) D I), the predictive equation results in f Cp yO (k C d C1C n e jk) D H dC1Cn e q 1 ∆u(k C1C n e )CF dC1Cn e q 1 y(k) . (7.20) f Cp
To get the polynomial matrices H dC1Cn e (q 1 ) and F dC1Cn e (q 1 ), the following Diophantine matrix equations have to be solved: I MM D E j q 1 A ∆ q 1 C q j F j q 1 I j D d C 1 C n e , (7.21) where I MM is a diagonal unity matrix of dimension M M , and E j (q 1 ) and F j (q 1 ) are polynomial matrices of order j 1 D d C n e and n ∆ a 1 D n a ,
7.2 Predictive Equations
respectively. na X F j q 1 D F j,i q i ,
Xe dCn E j q 1 D E j,i q i I
iD0
E j 0 D I MM ,
iD0
(7.22) where Fi, j and E i, j are the matrix components corresponding to the different power i of the shift operator in the prediction time point j. The j D d C1C n e steps ahead prediction of the system output can be written as [3, 7] f Cp H dC1Cn e q 1 D E dC1Cn e q 1 B q 1 .
(7.23)
The polynomial matrices E j (q 1 ) and F j (q 1 ), j D d C 1 C n e , can be computed recursively or nonrecursively. Here the recursive calculation, that is, starting with j D 1, is shown: F1 q 1 D q I MM A ∆ q 1 , F j C1,i D F j,iC1 F j,0 A ∆(iC1) ,
for
(7.24a) i D 0, 1, . . . , n a 1 ,
F j C1,n a D F j,0 A ∆(n a C1) , E j C1 q 1 D E j q 1 C F j,0 q j ,
(7.24b) (7.24c)
with
E1 D I MM .
(7.25)
Example 7.5 Prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Example 7.2) The process parameters were given in Example 7.1 and the CARIMA model was derived in Example 7.2. The physical dead time at the first output is d1 D 1 and at the second one is d2 D 0. The first output has to be predicted from N11 D d1 C 1 C n e11 D 1 C 1 C 1 D 3 to N21 D d1 C 1 C n e21 D 1 C 1 C 3 D 5 steps ahead and the second one from N12 D d2 C 1 C n e12 D 0 C 1 C 1 D 2 to N22 D d2 C 1 C n e22 D 0 C 1 C 2 D 3 steps ahead. The shortest prediction horizon is N21 D 2 and the largest one is N12 D 5; thus, for simplicity both outputs are predicted from k C 2 to k C 5. No robustness filter is used, T(q 1 ) D I. The polynomial matrix A ∆ (q 1 ) was calculated in Example 7.2:
A∆ q
1
0 1 1.8187 Cq 1 0 0 0 . C q 3 0 0.5488
1 D 0
0 2 0.8187 Cq 2.4891 0
0 2.0379
261
262
7 Predictive Control of Multivariable Processes
The matrices F i (q 1 ) have to be calculated for i D 1, 2, . . . , 5. F1 (q 1 ) is calculated from (7.24a): F1 q 1 D q I22 A ∆ q 1 1 0 Dq 0 1 0 11.8187q 1 C 0.8187q 2 q 1 0 12.4891q C 2.0379q 2 0.5488q 3 1 0 1.8187 0.8187q D 0 2.4891 2.0379q 1 C 0.5488q 2 or
F1 q 1 D F1,0 C F1,1 q 1 C F1,2 q 2 1.8187 0 0.8187 D C 0 2.4891 0 0 0 C q 2 . 0 0.5488
0 q 1 2.0379
The further matrices F j C1,i (q 1 ) are computed from (7.24): F2,0 D F1,1 F1,0 A ∆1 0.8187 0 1.8187 D 0 2.0379 0 2.4891 0 D , 0 4.1575 F2,1 D F1,2 F1,0 A ∆2 0 0 1.8187 D 0 0.5488 0 1.4891 0 D , 0 4.5235 F2,2 D F1,3 F1,0 A ∆3 1.8187 0 0 D 0 0 0 0 0 D , 0 1.3660
0 2.4891
0 2.4891
0 0
0 2.4891
0.8187 0
0 0.5488
1.8187 0
0 2.0379
0 2.4891
and consequently 2 X q i F2,i F2 q 1 D iD0
2.4891 1.4891q 1 D 0
0 4.1575 4.5235q 1 C 1.3660q 2
.
7.2 Predictive Equations
Similarly, F3 q 1 D . . . 3.0379 2.0379q 1 D 0 1 D ... F4 q 3.4872 2.4872q 1 D 0 1 D ... F5 q 3.8551 2.8551q 1 D 0
0 5.8247 7.1064q 1 C 2.2817q 2 0 7.3916 9.5883q 1 C 3.1967q 2
,
0 8.8098 11.8664q 1 C 4.0566 q 2
, .
The matrix polynomials E i (q 1 ) are calculated for i D 1, 2, . . ., 5 on the basis of on (7.25): 1 0 , E1 q 1 D 0 1 ˝ ˛ E2 q 1 D E1 q 1 C q 1 F1,0 D E1 q 1 C q 1 diag 1.8187 2.4891 0 1 C 1.8187q 1 , D 0 1 C 2.4891q 1 E3 q 1 D E2 q 1 C q 2 F2,0 D 0 1 C 1.8187q 1 C 2.4891q 2 , D 0 1 C 2.4891q 1 C 4.1575q 2 1 C 1.8187q 1 C 2.4891q 2 C 3.0379q 3 E4 q 1 D 0 0 , 1 C 2.4891q 1 C 4.1575q 2 C 5.8247q 3 1 C 1.8187q 1 C 2.4891q 2 C 3.0379q 3 E5 q 1 D 0 0 . 1 C 2.4891q 1 C 4.9575q 2 C 5.8247q 3 C 7.3916 q 4 f Cp
The matrix polynomials H j
q 1 D E1 q 1 B q 1 0.0453q 3 1 0 0.1813q 2 D 0.0906 q 1 0.0608q 2 0.3297q 1 0.2699q 2 0 1 0.0453q 3 0.1813q 2 , D 0.0906 q 1 0.0608q 2 0.3297q 1 0.2699q 2 f Cp
H1
(q 1 ) are obtained by (7.23):
263
264
7 Predictive Control of Multivariable Processes f Cp
H2
D D
q 1 D E2 q 1 B q 1
1 C 1.8187q 1 0
0 1 C 2.4891q 1
0.1813q 2 0.0906 q 1 0.0608q 2
0.0453q 3 0.3297q 1 0.2699q 2
0.1813q 2 C 0.3297q 3 0.0906 q 1 C 0.1648q 2 0.1512q 3
0.0453q 3 C 0.0824q 4 , 1 2 3 0.3297q C 0.5507q 0.6718q f Cp 1 H3 q D E3 q 1 B q 1 D 0.1813q 2 C 0.3297q 3 C 0.4512q 4 D 0.0906 q 1 C 0.1648q 2 C 0.2256 q 3 0.2526 q 4
0.0453q 3 C 0.0824q 4 C 0.1128q 5 , 0.3297q 1 C 0.5507q 2 C 0.6988q 3 1.1222q 4 f Cp 1 H4 q D E4 q 1 B q 1 D 0.1813q 2 C 0.3297q 3 C 0.4512q 4 C 0.5507q 5 D 0.0906 q 1 C 0.1648q 2 C 0.2256 q 3 C 0.2753q 4 0.3539q 5 0.0453q 3 C 0.0824q 4 C 0.1128q 5 C 0.1377q 6 , 0.3297q 1 C 0.5507q 2 C 0.6988q 3 C 0.7981q 4 1.5722q 5 f Cp 1 H5 q D E5 q 1 B q 1 D 0.1813q 2 C 0.3297q 3 C 0.4512q 4 C 0.5507q 5 C 0.6321q 6 D 0.0906 q 1 C 0.1648q 2 C 0.2256 q 3 C 0.2753q 4 C 0.3161q 5 0.4491q 6 3 4 5 6 7 0.0453q C 0.0824q C 0.1128q C 0.1377q C 0.1580q 0.3297q 1 C 0.5507q 2 C 0.6988q 3 C 0.7981q 4 C 0.8647q 5 1.9951q 6
.
If matrix A ∆ (q 1 ) is diagonal, matrices E j (q 1 ) and F j (q 1 ) are also diagonal, and the problem is reduced to the solution of scalar Diophantine equations. As a channel of a TITO process can be considered as a SISO process with a second input, which can be considered as a measured disturbance, the prediction method applied already in the corresponding SISO case can also be applied a here. This kind of solution is not shown here.
7.2 Predictive Equations
To separate the past input increments from the current and future terms, the f Cp polynomial matrix H dC1Cn e (q 1 ) is divided into two parts: f Cp H dC1Cn e q 1 D
dCn e Cn b X
f Cp
q i H dC1Cn e ,i
iD1
D
nX e C1
f Cp
q i H dC1Cn e ,i C
dCn e Cn b X
f Cp
q n e C2i H dC1Cn e ,i .
iDn e C2
iD1
(7.26) Let e C1 nX f f Cp H dC1Cn e q 1 D q i H dC1Cn e ,i ,
iD1 p
H dC1Cn e q
1
D
dCn e Cn b X
f Cp
q n e C2i H dC1Cn e ,i .
(7.27)
iDn e C2
Predictive equation (7.20) can now be separated into forced and free responses: yO (k C d C 1 C n e jk) D yO forc (k C d C 1 C n e jk) C yO free (k C d C 1 C n e jk) , (7.28) with f yO forc (k C d C 1 C n e jk) D H dC1Cn e q 1 ∆u(k C 1 C n e ) ,
(7.29)
p yO free (k C1C n e jk) D H dC1Cn e q 1 ∆u(k 1)CF dC1Cn e q 1 y(k) . (7.30) The next example demonstrates the calculation of the forced and free responses. Example 7.6 Prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Example 7.5) The predictive equations were calculated in Example 7.5. Applying the separation of the polynomial matrices according to (7.26) leads to f Cp 1 q ∆u(k C 2) C F2 q 1 y(k) yO (k C 2jk) D H2 f p D H2 q 1 ∆u(k C 2) C H2 q 1 ∆u(k 1) C F2 q 1 y(k) 0.1813q 1 0 D ∆u(k C 1) 0.0906 C 0.1648q 1 0.3297 C 0.5507q 1 0.3297 0.0453 C 0.0824q 1 C ∆u(k 1) 0.1512 0.6718 0 2.4891 1.4891q 1 C y(k) , 0 4.1575 4.5235q 1 C 1.3660q 2
265
266
7 Predictive Control of Multivariable Processes
f Cp 1 q ∆u(k C 3) C F3 q 1 y(k) yO (k C 3jk) D H3 f p D H3 q 1 ∆u(k C 3) C H3 q 1 ∆u(k 1) C F3 q 1 y(k) 0.0453q 2 0.1813q 1 C 0.3297q 2 D 0.0906 C 0.1648q 1 C 0.2256 q 2 0.3297 C 0.5507q 1 C 0.6988q 2 0.4512 0.0824 C 0.1128q 1 ∆u(k 1) ∆u(k C 2) C 0.2526 1.1222 3.0379 2.0379q 1 0 C y(k) , 0 5.8247 7.1064q 1 C 2.2817q 2 yO (k C 4jk) D H4 q 1 ∆u(k C 4) C F4 q 1 y(k) f p D H4 q 1 ∆u(k C 4) C H4 q 1 ∆u(k 1) C F4 q 1 y(k) 0.1813q 1 C 0.3297q 2 C 0.4512q 3 D 0.0906 C 0.1648q 1 C 0.2256 q 2 C 0.2753q 3 0.0453q 2 C 0.0824q 3 ∆u(k C 3) 0.3297 C 0.5507q 1 C 0.6988q 2 C 0.7981q 3 0.5507 0.1128 C 0.1377q 1 C ∆u(k 1) 0.3539 1.5722 0 3.4872 2.4872q 1 C y(k) , 0 7.3916 9.5883q 1 C 3.1967q 2 yO (k C 5jk) D H5 q 1 ∆u(k C 5) C F5 q 1 y(k) f p D H5 q 1 ∆u(k C 5) C H5 q 1 ∆u(k 1) C F5 q 1 y(k) 0.1813q 1 C 0.3297q 2 C 0.4512q 3 C 0.5507q 4 D 0.0906 C 0.1648q 1 C 0.2256 q 2 C 0.2753q 3 C 0.3161q 4 0.0453q 2 C 0.0824q 3 C 0.1128q 4 0.3297 C 0.5507q 1 C 0.6988q 2 C 0.7981q 3 C 0.8647q 4 0.6321 0.1377 C 0.1580q 1 ∆u(k C 4) C ∆u(k 1) 0.4491 1.9951 0 3.8551 2.8551q 1 C y(k) . 0 8.8098 11.8664q 1 C 4.0566 q 2
7.2 Predictive Equations
The above equations can be summarized in the vector/matrix equation 2 6 6 6 6 6 6 6 6 6 6 6 4
yO1 (k C 2jk) yO2 (k C 2jk) yO1 (k C 3jk) yO2 (k C 3jk) yO1 (k C 4jk) yO2 (k C 4jk) yO1 (k C 5jk) yO2 (k C 5jk)
3
2
0.1813 0.1648 0.3297 0.2256 0.4512 0.2753 0.5507 0.3161
7 6 7 6 7 6 7 6 7 6 7 6 7D6 7 6 7 6 7 6 7 6 5 4
0 0 0 0 0 0.0906 0.1813 0.1648 2 6 6 6 6 6 6 C6 6 6 6 6 4 2
2.4891 6 0 6 6 3.0379 6 6 0 6 C6 6 3.4872 6 6 0 6 4 3.8551 0
0 4.1575 0 5.8247 0 7.3916 0 8.8098
0 0.5507 0.0453 0.6988 0.0824 0.7981 0.1128 0.8647 0 0 0 0 0 0 0 0.5507
0 0.0906 0.1813 0.1648 0.3297 0.2256 0.4512 0.2753 0 0 0 0 0 0 0 0.0906
0.3297 0.1512 0.4512 0.2526 0.5507 0.3539 0.6321 0.4491
0.0453 0.6718 0.0824 1.1222 0.1128 1.5722 0.1377 1.9951
1.4891 0 2.0379 0 2.4872 0 2.8551 0
0 4.5235 0 7.1064 0 9.5883 0 11.8664
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.3297 0 0.5507 0.0453 0.6988 0.0824 0.7981
0 0 0 0 0 0 0.0906 0.3297 0.1813 0 0.1648 0.3297 0.3297 0.0453 0.2256 0.6988 3 2 ∆ u 1 (k) 3 6 ∆ u 2 (k) 7 0 7 6 7 7 6 0 7 6 ∆ u 1 (k C 1) 7 7 7 6 0 7 6 ∆ u 2 (k C 1) 7 7 76 0 7 6 ∆ u 1 (k C 2) 7 7 76 0 7 6 ∆ u 2 (k C 2) 7 7 76 7 6 ∆ u 1 (k C 3) 7 0 7 76 5 6 ∆ u 2 (k C 3) 7 0 7 6 0.3297 4 ∆ u 1 (k C 4) 5 ∆ u 2 (k C 4) 3 0.0824 7 0 72 3 0.1128 7 7 ∆ u 1 (k 1) 76 0 7 6 ∆ u 2 (k 1) 7 7 7 0.1377 7 4 ∆ u 1 (k 2) 5 7 7 ∆ u 2 (k 2) 0 7 0.1580 5 0 3 0 2 3 1.3660 7 y 1 (k) 7 7 6 y (k) 7 0 2 7 76 7 76 2.2817 7 6 y 1 (k 1) 7 7. 76 0 7 6 y 2 (k 1) 7 7 76 4 y 1 (k 2) 5 3.1967 7 7 5 y 2 (k 2) 0 4.0566 (7.31)
As was seen in Example 7.6, the output prediction in the prediction domain n e1 n e n e2 can be written by a vector/matrix equation, similarly to the SISO case, see (3.61): yO D yO forc C yO free I
yO forc D H∆u f I
yO free D H p ∆u p C Fy p ,
(7.32)
267
268
7 Predictive Control of Multivariable Processes
with
y D yO1 (k C 1 C min(d i j C n e1i )jk), . . . , yO M (k C 1 C min(d i j C n e1i )jk), . . . , yO 1 (k C 1 C max(d i j C n e2i )jk), . . . , T yO M (k C 1 C max(d i j C n e2i )jk) ,
(7.33)
yO free D yO 1free (k C 1 C min(d i j C n e1i )jk), . . . , yOMfree (k C 1 C min(d i j C n e1i )jk), . . . ,
yO forc
yO1free (k C 1 C max(d i j C n e2i )jk), . . . , T yOMfree (k C 1 C max(d i j C n e2i )jk) , D yO1forc (k C 1 C min(d i j C n e1i )jk), . . . ,
(7.34)
yO Mforc (k C 1 C min(d i j C n e1i )jk), . . . , yO 1forc (k C 1 C max(d i j C n e2i )jk), . . . , T yO Mforc (k C 1 C max(d i j C n e2i )jk) ,
(7.35)
y p D [y 1 (k), . . . , y M (k), . . . , y 1 (k max(n i )), . . . , y M (k max(n i ))] T , (7.36) ∆u f D [∆ u 1 (k), . . . , ∆ u M (k), . . . , ∆ u 1 (k C max(n e2i )), . . . , ∆ u M (k C max(n e2i ))] T ,
(7.37)
∆u p D [∆ u 1 (k 1), . . . , ∆ u M (k 1), . . . , ∆ u 1 (k max(d i j C n i ) C 1) (7.38) , . . . , ∆ u M (k max(d i j C n i ) C 1)] T . In the above equations, d i j is the discrete dead time of the submodels, n e1i and n e2i are the start and the end of the extended prediction horizon of the ith output, and n i is the common model order of the submodels of the ith output. In Example 7.6, the calculated minimum and maximum values are min(d i j C n e1i ) D 2, max(d i j C n e2i ) D 5, max(n i ) D 2, max(n e2i ) D 3, and max(d i j C n i ) D 3. Sometimes some predicted output values are not required in the prediction domain, and then some equations can be omitted from the vector/matrix equation (7.31). This is illustrated in Example 7.7. Example 7.7 Prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Example 7.6) In Example 7.5 the following task was considered: the first output has to be predicted from N11 D 3 to N12 D 5 steps ahead and the second one from N21 D 2 to N22 D 3 steps ahead. Equation (7.31) includes not only these, but also includes more predictions. Therefore, in (7.31) those rows can be omitted where nonrequired predictions are listed. These are yO1 (k C 2jk), yO 2 (k C 4jk), and yO 2 (k C 5jk). The remaining predictions are not influenced by the input signal terms ∆ u 2 (k C3),
7.2 Predictive Equations
∆ u 1 (k C 4), and ∆ u 2 (k C 4); thus, the corresponding elements in the vector of the future input signals can be omitted as well. Further, ∆ u 1 (k 2) and y 1 (k 2) have no effect on the predicted variables, as is seen from the zero values in the third column in the second term and in the fifth column in the third term of (7.31), respectively. The new matrix equations with reduced dimension are as follows: 2
3 yO 2 (k C 2jk) 6 yO 1 (k C 3jk)7 7 6 6 yO 2 (k C 3jk)7 7 6 4 yO 1 (k C 4jk)5 yO 1 (k C 5jk) 2 3 0.1648 0.5507 0.0906 0.3297 0 0 0 60.3297 0.0453 0.1813 0 0 0 0 7 6 7 6 D 60.2256 0.6988 0.1648 0.5507 0.0906 0.3297 0 7 7 40.4512 0.0824 0.3297 0.0453 0.1813 0 0 5 0.5507 0.1128 0.4512 0.0824 0.3297 0.0453 0.1813 3 2 ∆ u 1 (k) 3 6 ∆ u (k) 7 2 0.1512 0.6718 0 2 7 6 3 2 6 ∆ u (k C 1) 7 6 0.4512 0.0824 0.1128 7 7 6 6 1 7 ∆ u 1 (k 1) 7 6 6 7 4 ∆ u 2 (k 1) 5 6 ∆ u 2 (k C 1) 7 C 6 0.2526 1.1222 0 7 7 4 6 6 ∆ u 1 (k C 2) 7 0.5507 0.1128 0.1377 5 ∆ u 2 (k 2) 7 6 4 ∆ u 2 (k C 2) 5 0.6321 0.1377 0.1580 ∆ u 1 (k C 3) 2 3 32 0 4.1575 0 4.5235 1.3660 y 1 (k) 6 3.0379 7 6 y 2 (k) 7 0 2.0379 0 0 6 7 76 6 7 6 C6 0 5.8247 0 7.1064 2.2817 7 7 6 y 1 (k 1) 7 . 4 3.4872 5 4 y 2 (k 1) 5 0 2.4872 0 0 y 2 (k 2) 3.8551 0 2.8551 0 0 (7.39)
In (7.39) the predicted output signals are listed according to increasing prediction time. Sometimes it is more practical to arrange the predicted signals according to the channels, which means first output 1, then output 2 in the subsequent time points. Example 7.8 Prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Example 7.7) Let us rearrange the sequence of the signals in Example 7.7 first according to their input and output sequence and only then according to the time shift. Then the vector of the predicted output signals becomes yO D [ yO1 (k C 3jk), yO 1 (k C 4jk), yO1 (k C 5jk), yO 2 (k C 2jk), yO2 (k C 3jk)] T
269
270
7 Predictive Control of Multivariable Processes
and the vectors of the input increments and of the old input and output values will be ∆u f D ∆ u 1 (k), ∆ u 1 (k C 1), ∆ u 1 (k C 2), ∆ u 1 (k C 3), T ∆ u 2 (k), ∆ u 2 (k C 1), ∆ u 2 (k C 2) , ∆u p D [∆ u 1 (k 1), ∆ u 2 (k 1), ∆ u 2 (k 2)] T , y p D [y 1 (k), y 1 (k 1), y 2 (k), y 2 (k 1), y 2 (k 2)] T . Rearranging the sequence of the rows in (7.39) results in 2
3 yO 1 (k C 3jk) 6 yO 1 (k C 4jk) 7 7 6 6 yO 1 (k C 5jk) 7 7 6 4 yO 2 (k C 2jk) 5 yO 2 (k C 3jk) 2 3 0.3297 0.1813 0 0 0.0453 0 0 6 0.4512 0.3297 0.1813 7 0 0.0824 0.0453 0 6 7 7 D6 0.5507 0.4512 0.3297 0.1813 0.1128 0.0824 0.0453 6 7 4 0.1648 0.0906 5 0 0 0.5507 0.3297 0 0.2256 0.1648 0.0906 0 0.6988 0.5507 0.3297 3 2 ∆ u 1 (k) 3 6 ∆ u (k C 1) 7 2 0.4512 0.0824 0.1128 1 7 6 3 2 6 ∆ u (k C 2) 7 6 0.5507 0.1128 0.1377 7 ∆ u 1 (k 1) 7 6 6 1 7 7 6 5 4 6 ∆ u 1 (k C 3) 7 C 6 0.6321 0.1377 0.1580 7 7 ∆ u 2 (k 1) 7 6 6 4 5 6 ∆ u 2 (k) 7 ∆ u 2 (k 2) 0.1512 0.6718 0 7 6 4 ∆ u 2 (k C 1) 5 0.2526 1.1222 0 ∆ u 2 (k C 2) 2 32 3 3.4872 2.4872 0 0 0 y 1 (k) 7 6 6 0 0 4.1575 4.5235 1.3660 7 6 7 6 y 1 (k 1) 7 7 6 7 6 C 6 3.8551 2.8551 0 0 0 7 6 y 2 (k) 7 . 4 3.0379 2.0379 5 4 y 2 (k 1) 5 0 0 0 y 2 (k 2) 0 0 5.8247 7.1064 2.2817 (7.40) Equations (7.33)–(7.38) can be modified in a way that they give only those components which are required to describe the desired predictive equation: y D yO1 (k C min(d1 j ) C 1 C n e11 jk), . . . , yO1 (k C min(d1 j ) C 1 C n e12 jk), . . . , yO M (k C min(d M j ) C 1 C n e1M jk), . . . , T yO M (k C min(d M j ) C 1 C n e2M jk) ,
(7.41)
7.2 Predictive Equations
yO free D yO1free (k C min(d1 j ) C 1 C n e11 jk), . . . , yO1free (k C min(d1 j ) C 1 C n e12 jk), . . . , yOMfree (k C min(d M j ) C 1 C n e1M jk), . . . , T yOMfree (k C min(d M j ) C 1 C n e2M jk) ,
(7.42)
yO forc D yO 1forc (k C min(d1 j ) C 1 C n e11 jk), . . . , yO1forc (k C min(d1 j ) C 1 C n e12 jk), . . . , yOMforc (k C min(d M j ) C 1 C n e1M jk), . . . , T yOMforc (k C min(d M j ) C 1 C n e2M jk) ,
(7.43)
T y p D y 1 (k), . . . , y 1 (k n 1 ), . . . , y M (k), . . . , y M (k n M )) ,
(7.44)
T ∆u f D ∆ u 1 (k), . . . , ∆ u 1 (k C n e21 ), . . . , ∆ u M (k), . . . , ∆ u M (k C n e2M )) , (7.45) ∆u p D ∆ u 1 (k 1), . . . , ∆ u 1 (k max(d i1 C n i ) C 1), . . . , T ∆ u M (k 1), . . . , ∆ u M (k max(d i M C n i ) C 1) .
(7.46)
7.2.2 Prediction Based on the State Space Representation
The one-step-ahead prediction of the output signal can be easily obtained from the state-space form of the CARIMA model (7.15): xO ∆ (k C 1jk) D A ∆ x x ∆ (k) C B ∆ x ∆u(k d) ,
(7.47a)
yO (k C1jk) D C ∆ x xO ∆ (k C1jk) D C ∆ x A ∆ x xO ∆ (k)CC ∆ x B ∆ x ∆u(k d) . (7.47b) The two-steps-ahead prediction is obtained by shifting (7.47) one step ahead: xO ∆ (k C 2jk) D A ∆ x xO ∆ (k C 1jk) C B ∆ x ∆u(k d C 1) D A2∆ x x ∆ (k) C A ∆ x B ∆ x ∆u(k d) C B ∆ x ∆u(k d C 1) , yO (k C 2jk) D C ∆ x xO ∆ (k C 2jk) D C ∆ x A2∆ x x ∆ (k) C C ∆ x A ∆ x B ∆ x ∆u(k d) C C ∆ x B ∆ x ∆u(k d C 1) . The state vector predicted n e steps over the mathematical dead time (d C 1) can be expressed as e x ∆ (k) xO ∆ (k C d C 1 C n e jk) D A dC1Cn ∆x
C
dCn Xe iD0
dCn e i A∆ B ∆ x ∆u(k d C i) x
(7.48)
271
272
7 Predictive Control of Multivariable Processes
and the predicted output signal is yO (k C d C 1 C n e jk) D C ∆ x xO ∆ (k C d C 1 C n e jk) e D C ∆ x A dC1Cn x ∆ (k) C ∆x
dCn Xe
dCn e i C∆ x A∆ B ∆ x ∆u(k d C i) . x
(7.49)
iD0
The state vector (7.16) x ∆ (k) D y(k), y(k 1), . . . , y(k n a ), ∆u(k d 1), ∆u(k d 2), . . . , T ∆u(k d n b ) consists only of the current output signal value and the older input and output values. Consequently, the first term is the free response and the second term is the forced response in (7.49). The state vector can be composed from two subvectors: h iT x ∆ (k) D y Tp (k), ∆uTp d (k) , where y p (k) was defined by (7.36) and T ∆u p d (k) D ∆u T (k d 1), ∆u T (k d 2), . . . , ∆u T (k d n b ) . (7.50) The second term of (7.49) can be rearranged to dCn Xe
dCn e i C∆ x A∆ B ∆ x ∆u(k d C i) x
iD0 dCn e 1 e D C ∆ x A dCn B ∆ x ∆u(k d C 1) C ∆ x B ∆ x ∆u(k d) C C ∆ x A ∆ x n e C1 ne C C∆ x A∆ x B ∆ x ∆u(k 1) C C ∆ x A ∆ x B ∆ x ∆u(k)
C C ∆ x A n∆ex1 B ∆ x ∆u(k C 1) C C C ∆ x B ∆ x ∆u(k C n e ) .
(7.51)
From comparison of (7.51) and (7.29), the coefficient matrices of matrix polynomials of the forced response (7.29) are H dC1Cn e ,i D C ∆ x A i1 ∆ x B∆ x I
i D 1, 2, . . . , n e C 1 .
(7.52)
The terms in (7.51) belonging to older input signals build the free response together with the first term in (7.49). If there is no explicit dead time in the model (d D 0), then the first term in (7.49) is the free response and the second one is the forced response. The next example shows the calculation of an output prediction.
7.2 Predictive Equations
Example 7.9 One-step-ahead prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Examples 7.2 and 7.4) The difference equation of the process is given in Example 7.2 and the state space equations are derived in Example 7.4. No robustness filter is used: T(q 1 ) D I. The output has to be predicted two steps ahead. The forced response is calculated according to (7.49) with d D 0 and n e D 2, that is, d C 1 C n e D 0 C 1 C 2 D 3. yO forc (k C 3jk) D C ∆ x B ∆ x ∆u(k C 2) C C ∆ x A1∆ x B ∆ x ∆u(k C 1) C C ∆ x A2∆ x B ∆ x ∆u(k) 0 0 ∆u(k C 2) D 0.0906 0.3297 0.1813 0 C ∆u(k C 1) 0.1648 0.5507 0.3297 0.0453 C ∆u(k) 0.2256 0.6988 0 0 0.1813 0 1 D q C q 2 0.0906 0.3297 0.1648 0.5507 0.3297 0.0453 3 ∆u(k C 3) . C q 0.2256 0.6988 The state vector from Example 7.4 was T x ∆ (k) D y T (k), y T (k 1), y T (k 2), ∆u T (k 1), ∆u T (k 2) . According to (7.49) the free response is yO free (k C 3jk) D C ∆ x A3∆ x x ∆ (k) 3.0379 0 D 0 5.8247
0.4512 0.2526
2.0379 0
0.0824 1.122
0 0
0 7.1064 2
0.1128 0
6 6 6 6 4
0 0
0 2.2817 3 y(k) y(k 1) 7 7 y(k 2) 7 7, ∆u(k 1) 5 ∆u(k 2)
which can be rewritten in a polynomial form and separated as F3 q 1 y(k) D
C
0 2.0379 C 5.8247 0 0 q 2 y(k) , 2.2817
3.0379 0 0 0
0 7.1064
q 1 C
273
274
7 Predictive Control of Multivariable Processes
p H3
q
1
C
0 0
∆u(k 1) D 0.1128 0
q
yO free (k C 3jk) D F3 q
1
1
0.4512 0.2526
0.0824 1.122
∆u(k 1) ,
p y(k) C H3 q 1 ∆u(k 1) .
It is easy to check that the predictive equations derived are identical to yO (k C 3jk) in Example 7.6, where the prediction was based on the input/output difference equation. The prediction based on the state space representation was derived for the SISO case in Section 3.3. The form (3.89) is valid also in the MIMO case, only vectors b and c have to be replaced by matrices B and C: 3 2 3 2 e1 C ∆ x A dC1Cn yO ( k C d C 1 C n e1 j k) ∆x e1 7 6 yO ( k C d C 1 C n e1 C 1j k) 7 6 C ∆ x A dC2Cn 7 ∆x 6 7 6 7 x∆ 6 yO 6 7D6 .. .. 7 4 5 5 4 . . 2
yO ( k C d C 1 C n e2 j k)
e1 B∆ x C ∆ x A dCn ∆x 6 C A dCn e1C1 B 6 ∆x ∆x ∆x C6 .. 6 4 . e2 C ∆ x A dCn B∆ x ∆x
dCn e1 2 C∆ x A∆ B∆ x x dCn e1 1 B∆ x C∆ x A∆ x .. . dCn e2 2 C∆ x A∆ B∆ x x
e2 C ∆ x A dC1Cn ∆x
dCn e1 1 C∆ x B∆ B∆ x x e1 C ∆ x A dCn B ∆x ∆x .. . dCn e2 1 C∆ x A∆ B∆ x x 3 0 7 0 7 ∆u p 7 .. .. 7 ∆u f . . 5 . C∆ x B∆ x
(7.53)
The first term of the right side of (7.53) gives the free response. The free response depends on the current values of the state variables, which store the information about the past effects of the input signal in the system. The second term provides both free and forced response parts. Terms with the past input signal belong to the free response, whereas terms with the current and the future input signal belong to the forced response. Expression (7.53) can be written in condensed form as f Cp
yO D F x x ∆ C H x
f
∆u f Cp D F x x ∆ C H xp ∆u p C H x ∆u f ,
(7.54)
f Cp
are defined by (7.53) and vector ∆u f Cp in (7.54) can where matrices F x and H x be separated into ∆u p , the input value vector of past input values, and ∆u f , the vector of the current and future input values: T ∆u p D ∆u(k d), ∆u(k d C 1), . . . , ∆u(k 1) ,
(7.55a)
T ∆u f D ∆u(k), ∆u(k C 1), . . . , ∆u(k C n e2 ) .
(7.55b)
7.2 Predictive Equations
Consequently, ∆u f Cp D
∆u p ∆u f
I
f Cp
Hx
h D H xp ,
f
Hx
i .
(7.56)
In (7.55) d is the common (least) dead time of all outputs and n e2 is the common (greatest) extended prediction horizon of all outputs. The coefficient matrices are as follows: 3 2 e1 C ∆ x A dC1Cn ∆x 6C A dC2Cn e1 7 7 6 ∆x ∆x 7, Fx D 6 (7.57a) .. 7 6 5 4 . e2 C ∆ x A dC1Cn ∆x 3 2 e1 e1 B∆ x ... C ∆ x A1Cn B∆ x C ∆ x A dCn ∆x ∆x 7 6 dCn C1 1Cn C1 6C ∆ x A ∆ x e1 B ∆ x . . . C ∆ x A ∆ x e1 B ∆ x 7 7 , H xp D 6 .. .. .. 7 6 5 4 . . . 1Cn e2 e2 C ∆ x A dCn B . . . C A B ∆ x ∆ x ∆ x ∆x ∆x 2 n e1 1 C∆ x A∆ B∆ x . . . C ∆ x A n∆e1x B ∆ x x 6C A n e1 C1 B n e1 C A B ... 6 ∆x ∆x ∆x ∆x ∆x ∆x f H f Hx D 6 .. .. .. 6 . 4 . .
C ∆ x A n∆e2x B ∆ x
n e2 1 C∆ x A∆ B∆ x x
...
(7.57b) 3 0 7 0 7 7 . .. 7 5 . C∆ x B∆ x (7.57c)
p
f Cp
(the second coefficient matrix in H x contains the first d columns of matrix H x f f Cp f (7.53)) and H H x contains the remaining columns of H x . If d D 0, then the vector ∆u p does not exist and the old terms of the input signal are given by the corresponding terms of x ∆ ; see (7.16). The next example illustrates the calculation of (7.54). Example 7.10 Long-range prediction form of the CARIMA model of a TITO process with different time constants of the submodels (continuation of Examples 7.2 and 7.4) The difference equation of the process is given in Example 7.2 and the state space equations are described in Example 7.4. No robustness filter is used: T(q 1 ) D I. As stated in Example 7.6, both outputs have to be predicted from k C 2 to k C 5.
275
276
7 Predictive Control of Multivariable Processes
The computation according to (7.54) results in 2 6 6 6 6 6 6 6 6 6 6 6 4
yO1 (k C 2jk) yO2 (k C 2jk) yO1 (k C 3jk) yO2 (k C 3jk) yO1 (k C 4jk) yO2 (k C 4jk) yO1 (k C 5jk) yO2 (k C 5jk)
2
3
2
7 6 7 6 7 6 7 6 7 6 7 6 7D6 7 6 7 6 7 6 7 6 5 4
2.4891 6 0 6 6 3.0379 6 6 0 6 C6 6 3.4872 6 6 0 6 4 3.8551 0
0.1813 0.1648 0.3297 0.2256 0.4512 0.2753 0.5507 0.3161
0 0.5507 0.0453 0.6988 0.0824 0.7981 0.1128 0.8647
0 0.0906 0.1813 0.1648 0.3297 0.2256 0.4512 0.2753
0 0.3297 0 0.5507 0.0453 0.6988 0.0824 0.7981
0 0 0 0 0 0.0906 0.1813 0.1648
0 0 0 0 0 0 0 0.5507
0 0 0 0 0 0 0 0.0906
0 0 0 0 0 0 0 0.3297
0 4.1575 0 5.8247 0 7.3916 0 8.8098
1.4891 0 2.0379 0 2.4872 0 2.8551 0
0 4.5235 0 7.1064 0 9.5883 0 11.8664
0.0453 0.6718 0.0824 1.1222 0.1128 1.5722 0.1377 1.9951
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0.0824 0 0.1128 0 0.1377 0 0.1580 0
0 0 0 0.0906 0.1813 0.1648 0.3297 0.2256 3 72 7 7 76 76 76 76 74 7 7 7 5
0 0 0 0.3297 0 0.3297 0.0453 0.6988
∆u(k) ∆u(k C 1) ∆u(k C 2) ∆u(k C 3) ∆u(k C 4)
0 1.3660 0 2.2817 0 3.1967 0 4.0566 3
3 7 7 7 7 5
0.3297 0.1512 0.4512 0.2526 0.5507 0.3539 0.6321 0.4491
72 7 y(k) 7 7 6 y(k 1) 76 76 7 6 y(k 2) 74 7 ∆u(k 1) 7 7 ∆u(k 2) 5
3 7 7 7, 7 5
which is equivalent to (7.31) obtained in Example 7.6 from the input/output difference equation.
7.3 The Control Algorithm
7.3 The Control Algorithm
As shown in Section 7.2, the predicted output signal of a MIMO process can be described in the future time domain k C d C 1 C n e1 k k C d C 1 C n e2 by (7.32): yO D yO forc C yO free D H∆u f C yO free ,
(7.58)
with matrix H containing the step response coefficients 2 6 6 HD6 4
H n e1 C1 H n e1 C2 .. . H n e2 C1
H n e1 H n e1 C1 .. . H n e2
.. .
3
H n e1 n u C2 H n e1 n u C3 .. . H n e2 n u C2
7 7 7, 5
(7.59a)
where 2 6 6 Hn e D 6 4
h 11,n e h 21,n e .. . h M,1,n e
h 12,n e h 22,n e .. . h M,2,n e
.. .
h 1M,n e h 2M,n e .. . h M,M,n e
3 7 7 7. 5
The control aim is to follow the reference signal T y r (k) D y r1 (k), y r2 (k), . . . , y r,M (k)
(7.59b)
(7.60)
in the prediction domain y r D y Tr (k C d C 1 C n e1 ), y Tr (k C d C 2 C n e1 ), . . . , T y Tr (k C d C 1 C n e2 ) .
(7.61)
Usually a quadratic cost function is minimized: T J D y r yO Λ y y r yO C ∆u T Λ u ∆u ) min ,
(7.62)
∆u f
with the weighting matrix Λ y of the control errors and Λ u for the control increments. All weighting matrices are diagonal, since the control error and the control effort (increment) are considered as square functions of the same time point and there are no cross-product terms between the different time points: ˛T ˝ Λ y D diag Λ y,n e1 , Λ y,n e1 C1 , . . . , Λ y,n e2 , ˛T ˝ with Λ y,n e D diag λ y,1,n e , λ y,2,n e , . . . , λ y,M,n e I (7.63) Λ u D diag hΛ u0 , Λ u1 , . . . , Λ u,n u 1 i T , with
Λ ui D diag hλ u,1,i , λ u,2,i , . . . , λ u,M,i i T .
(7.64)
277
278
7 Predictive Control of Multivariable Processes
Substituting the vector of forced and free responses results in
T
J D y r H f ∆u f yO free Λ y y r H f ∆u f yO free C ∆u Tf Λ y ∆u f ) min . ∆u f
(7.65)
Unconstrained minimization of the cost function according to the whole sequence of input increments in the control time domain leads to
d J(∆u) D H T Λ Ty C Λ y y r H∆u f yO free d∆u
C Λ Tu C Λ u ∆u D 0 , which results in
i1 h ∆u f D H T Λ Ty C Λ y H C Λ Tu C Λ u
H T Λ Ty C Λ y y r yO free . As with diagonal matrices the transposed matrix is equal to the nontransposed one, Λ Tu D Λ u , Λ Ty D Λ y , thus,
1 T ∆u f D H T Λ y H C Λ u H Λ y y r yO free .
(7.66)
According to receding horizon technique only the current control signals will be used and the computation is repeated in the next control step. We denote the current control increments by T ∆u a c t ∆u D ∆ u 1 (k), ∆ u 2 (k), . . . , ∆ u M (k) ,
(7.67)
which are the first M terms of the whole control increment vector ∆u f and can be expressed as ∆u a c t (k) D [1, 1, . . . , 1, 0, 0, . . . , 0, 0, 0, . . . , 0] T ∆u f (k) ,
(7.68)
where the number of zeros is (M 1) (n u 1). The optimization/prediction domain n e2 n e1 C1 and the allowed changes in the manipulated variable n u are equal for each variable. The tuning of the controller can be influenced by choosing the weighting factors individually, and if a possible control error term should not be considered in the cost function, then the corresponding weighting factor has to be selected as zero. if a change in the manipulated variable should be not allowed, then the corresponding weighting factor has to be selected as infinite (very large). A TITO example is given below.
7.3 The Control Algorithm
Example 7.11 Predictive control of a TITO process based on a matrix fraction model (continuation of Examples 7.1, 7.2, and 7.6) The process in Example 7.1 is given by 2 0.25 0.4s 1 0.2s e 6 s C1e y 1 (s) s C1 D6 4 y 2 (s) 0.5 1 sC1 0.5s C 1
3 7 7 5
u 1 (s) u 2 (s)
with dead times d1 D 1 and d2 D 0. The sampling time is ∆T D 0.2 s. The control parameters were given in Example 7.6: n e11 D 1, n e12 D 3, n e21 D 1, n e22 D 2, n u1 D 2, and n u2 D 1. As d2 C 1 C n e21 D 0 C 1 C 1 D 2 < d1 C 1 C n e11 D 1 C 1 C 1 D 3 and d1 C 1 C n e12 D 1 C 1 C 3 D 5 > d2 C 1 C n e22 D 0 C 1 C 2 D 2, the predictions have to be calculated from k C d2 C 1 C n e21 D k C 2 till k C d1 C 1 C n e22 D k C 5. These predictive equations were derived in Example 7.6; see (7.31). Hence, the free response is 3 2 2 3 0.3297 0.0453 0 0.0824 yO1free (k C 2jk) 6 yO2free (k C 2jk)7 60.1512 0.6718 0 0 7 7 6 6 72 3 6 yO (k C 3jk)7 6 0.4512 0.0824 0 0.11287 7 6 6 1free 7 ∆ u 1 (k 1) 7 6 6 76 0 7 6 ∆ u 2 (k 1)7 6 yO2free (k C 3jk)7 60.2526 1.1222 0 7 7D6 6 7 6 yO1free (k C 4jk)7 6 0.5507 0.1128 0 0.13777 4 ∆ u 1 (k 2)5 7 6 6 7 6 yO2free (k C 4jk)7 60.3539 1.5722 0 0 7 7 6 6 7 ∆ u 2 (k 2) 4 yO1free (k C 5jk)5 4 0.6321 0.1377 0 0.15805 yO2free (k C 5jk) 0.4491 1.9951 0 0 2 3 2.4891 0 1.4891 0 0 0 3 2 6 0 4.1575 0 4.5235 0 1.3660 7 y 1 (k) 6 7 6 3.0379 7 6 y (k) 7 0 2.0379 0 0 0 2 6 7 76 6 7 76 0 5.8247 0 7.1064 0 2.2817 7 6 y 1 (k 1) 7 6 C6 7. 76 6 3.4872 7 6 y 2 (k 1) 7 0 2.4872 0 0 0 7 6 76 6 4 y 1 (k 2) 5 0 7.3916 0 9.5883 0 3.1967 7 6 7 4 3.8551 5 y 2 (k 2) 0 2.8551 0 0 0 0 8.8098 0 11.8664 0 4.0566 As the maximum number of allowed changes in the manipulated signal is n u1 D 2, the following future control increments are zeros ∆ u 1 (k C 2) D ∆ u 2 (k C 2) D ∆ u 1 (k C 3) D ∆ u 2 (k C 3) D ∆ u 1 (k C 4) D ∆ u 2 (k C 4) D 0 ,
279
280
7 Predictive Control of Multivariable Processes
and the dimension of matrix H of the step response coefficients reduces from 810 (see (7.31) in Example 7.6) to 8 4: 2 6 6 6 6 6 6 HD6 6 6 6 6 4
0.1813 0.1648 0.3297 0.2256 0.4512 0.2753 0.5507 0.3161
0 0.5507 0.0453 0.6988 0.0824 0.7981 0.1128 0.8647
0 0.0906 0.1813 0.1648 0.3297 0.2256 0.4512 0.2753
0 0.3297 0 0.5507 0.0453 0.6988 0.0824 0.7981
3 7 7 7 7 7 7 7. 7 7 7 7 5
The predictive equations also include the output predictions yO 1 (k C 2jk), yO2 (k C 4jk), and yO 2 (k C 5jk), although the corresponding control error terms should not be considered. This fact is considered in the control error weighting matrix Λ y D diag h0, 0.9, 1, 0.9, 1, 0, 1, 0i by the zero terms. As n u2 D 1 < n u1 D 2, the term belonging to ∆ u 2 (k C ˛ 1) in the weighting matrix of the control increments Λ u D ˝ diag 0.5, 0.6, 0.5, 106 has to be very large. Now, the matrix in the control algorithm (7.66) being independent of the current measurements can be calculated. T 1 T H Λ y H C Λu H Λy 2 3 0 0.0300 0.2617 0.0275 0.3041 0 0.3388 0 6 0 0.3679 0.0443 0.4591 0.0532 0 0.0604 0 7 7 D6 4 0 0.0227 0.0682 0.0304 0.2154 0 0.3366 0 5 . 0 0 0 0 0 0 0 0 According to the receding control strategy, only the current control signals, that is, the first and second components of the matrix-vector product are used as manipulated signals ∆ u 1 (k) and ∆ u 2 (k). (That means the multiplication only with the
7.3 The Control Algorithm
first M D 2 rows is necessary.) The control algorithm becomes ∆u a c t (k) D
D
∆ u 1 (k) ∆ u 2 (k)
1 T D HT Λ y H C Λ u H Λ y y r yO free
0 0.0300 0.2617 0.0275 0.3041 0 0.3679 0.0443 0.4591 0.0532 02 3 2 yO r1 (k C 2jk) 0.3297 0.0453 B6 yO r2(k C 2jk)7 60.1512 0.6718 B6 7 6 B6 yO (k C 3jk)7 6 0.4512 0.0824 B6 r1 7 6 B6 7 6 B6 yO r2(k C 3jk)7 60.2526 1.1222 B6 76 B6 yO r1 (k C 4jk)7 6 0.5507 0.1128 B6 7 6 B6 yO r2(k C 4jk)7 60.3539 1.5722 B6 7 6 @4 yO r1 (k C 5jk)5 4 0.6321 0.1377 yO r2(k C 5jk) 0.4491 1.9951 2 2.4891 0 1.4891 0 6 0 4.1575 0 4.5235 6 63.0379 0 2.0379 0 6 6 5.8247 0 7.1064 6 0 6 63.4872 0 2.4872 0 6 6 0 7.3916 0 9.5883 6 43.8551 0 2.8551 0 0 8.8098 0 11.8664
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0.3388 0 0.0604 0 3 0.0824 0 7 72 3 0.11287 7 ∆ u 1 (k 1) 7 ∆ u 2 (k 1)7 0 76 7 76 4 0.13777 ∆ u 1 (k 2)5 7 0 7 7 ∆ u 2 (k 2) 0.15805 0 1 3 0 3 2 C 1.36607 y 1 (k) C 7 7 7 6 0 7 6 y 2 (k) 7C C 7C 76 2.28177 6 y 1 (k 1)7C 7C . 76 0 7 6 y 2 (k 1)7C 7C 76 5C 4 3.19677 7 y 1 (k 2) C 5 y 2 (k 2) A 0 4.0566 (7.69)
Figure 7.1 shows the control for a set value increase of the first controlled variable from 0.5 to 0.6 at t D 2 s and from 1.0 to 1.1 at t D 6 s for the second one. As is seen, the controller parameters were chosen well: the control is fast and almost aperiodic with a small cross-coupling effect. (On the basis of the simulation, the controller parameters could be retuned, if necessary.) Further examples are presented, for example, in Honc and Haber [11, 12]. It is expected that a MIMO controller will control a MIMO process better than several SISO controllers. The reason is that a MIMO controller considers all the controlled outputs, not only one. This (not imperatively perfect) decoupling can be considered as disturbance feed-forward, where the disturbances are the other controlled output signals. Figure 7.2 shows a TITO process with two SISO controllers and with a TITO controller, respectively. Example 7.12 Predictive control of a TITO process without dead time by two SISO controllers and by a TITO controller, respectively All subprocesses are linear third-order processes with three equal time constants of T1 D 0.333 s and without dead time. The static gains are K p11 D K p 22 D 1.0, K p12 D 0.25, and K p 21 D 0.5. The set value of process 1 was increased at t D 1 s
281
282
7 Predictive Control of Multivariable Processes
y1
y2
0.65
1.15
yr1
0.6
y1
0.55
y2
1.05 1.0
0.5 0.45
0.95 0
5
t [s] 10
0
5
t [s] 10
0
5
t [s] 10
u2
u1 0.4
0.9
0.35
0.85
0.3
0.8
0.25
yr2
1.1
0
5
t [s] 10
0.75
Figure 7.1 Control of set value steps with a TITO process. TITO process yr1 y1 yr2 y2
(a)
SISO predictive uc1 controller 1 SISO u predictive c2 controller 2
u1
P11
TITO process y1
uc1 y1
P12
yr2
P21 u2
P22
u1
yr1
two SISO controllers
y2
(b)
y1
P12
TITO predictive controller
P21
uc2 y2
P11
u2
P22
y2
TITO controller
Figure 7.2 Control scheme of a TITO process.
from 0 to 1 and the set value of process 2 was increased at t D 6 s in the same manner. No reference signal prediction was applied. The sampling time was ∆T D 0.2 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ y D 1.0, and λ u D 0.1. Figure 7.3 shows the predictive control without reference signal prediction. Although there is no big difference between those controlled signals whose set point was changed, with the TITO controller output 2 was less disturbed with the set point change of output 1.
Example 7.13 Predictive control of a TITO process with dead time by two SISO controllers and by a TITO controller, respectively The process parameters are as in Example 7.12 except for the additional dead times, which are Td11 D 0.4 s, Td12 D 0.8 s, Td21 D 1.0 s, and Td22 D 0.6 s. The control
7.3 The Control Algorithm 1.5 y 1
3 u 2
yr1 y1
0.5
yr2
y2
uc1=u1 uc2=u2
uc2=u2
0
0 -0.5
uc1=u1
1
-1 0
2
(a)
4
8 t [s] 10
6
controlled variable with two SISO controllers
1.5 y 1
0
(b) 3 u 2
yr1 y1
yr2
0.5
y2
2
4
6
uc1=u1
uc1=u1
1
0
8 t [s] 10
manipulated variable with two SISO controllers
uc2=u2
uc2=u2
0 -1
-0.5 0
2
(c)
4
6
8 t [s] 10
0
(d)
controlled variable with a TITO controller
2
4
6
8 t [s] 10
manipulated variable with a TITO controller
Figure 7.3 Predictive control of a TITO process without dead time. 1.5 y 1
3 u 2
yr1 y1
0.5
yr2
0
0
-0.5
-1 0
2
(a)
4
6
8 t [s] 10
controlled variable with two SISO controllers
1.5 y 1
y1
y2
yr2
(b)
2
4
6
uc1=u1
0
8 t [s] 10
manipulated variable with two SISO controllers
uc1=u1
1
0
(c)
uc2=u2 0
3 u 2
yr1
0.5
-0.5
uc1=u1
1
y2
uc2=u2
uc2=u2
-1 0
2
4
6
controlled variable with a TITO controller
8 t [s] 10
0
(d)
2
4
6
8 t [s] 10
manipulated variable with a TITO controller
Figure 7.4 Predictive control of a TITO process with dead time.
experiment and the controller parameters are the same as in Example 7.12. As is seen in Figure 7.4, the TITO control is very similar to the case without dead time (as expected from a predictive controller), but the independent SISO controllers cannot control the TITO process (at least not with the same controller parameters).
283
284
7 Predictive Control of Multivariable Processes
The last two examples demonstrated the advantage of the predictive MIMO controller over SISO controllers. A further convenience is that no decoupling controllers had to be designed as with classical tuning of MIMO Proportional plus Integral plus Derivative (PID) controllers.
7.4 Polynomial Form of the Controller (without Matrix Inversion)
Let us introduce matrix K G P C as the first M rows of matrix [H T Λ y HCΛ u ]1 H T Λ y . Then the control algorithm (7.68) with (7.66) reduces to
∆u(k) D K G P C H T Λ y y r yO free . (7.70) The free response in the optimization/prediction domain k C 1 C n e1 k k C 1 C n e2 is 2 3 yO free (k C d C 1 C n e1 jk) 6yO (k C d C 2 C n jk)7 e1 7 6 free 7 yO free D 6 .. 7 6 5 4 . yO free (k C d C 1 C n e2 jk) 2 p 3 3 2 H dC1Cn e1 q 1 F dC1Cn e1 q1 p 6H 1 7 6F dC1Cn e1C1 q 1 7 6 dC1Cn e1 C1 q 7 7 7 ∆u(k 1) C 6 D6 7 y(k) . 6 .. . 6 7 .. 5 4 5 4 . p F dC1Cn e2 q 1 H dC1Cn e2 q 1 A TITO process is considered. The predicted reference signal is assumed to be equal to the current one: 3 3 2 y r (k C d C 1 C n e1 ) I22 6y r (k C d C 1 C n e1 C 1)7 6I22 7 7 6 7 6 yO r D 6 7 D 6 . 7 y r (k) .. . 5 4 4 . . 5 y r (k C d C 1 C n e2 ) I22 2
7.4 Polynomial Form of the Controller (without Matrix Inversion)
where I22 is a unity matrix of dimension 2 2. Equation (7.70) results in
∆u(k) D K G P C H T Λ y y r yO free 02 2 p 3 3 H dC1Cn e1 q 1 I22 B 6I 7 6H p 1 7 7 B6 22 7 6 dC1Cn e1 C1 q T 7 ∆u(k 1) D KG P C H Λ y B .. 7 y r (k) 6 .. 7 B6 6 5 @4 . 5 4 . p I22 H dC1Cn e2 q 1 1 3 2 F dC1Cn e1 q1 C 6F dC1Cn e1 C1 q 1 7 C 6 7 C, 6 y(k) 7 .. C 4 5 A . (7.71) F dC1Cn e2 q 1 which leads to the polynomial matrix equation ∆u(k) D T q 1 y r (k) R q 1 ∆u (k 1) S q 1 y(k) or R q 1 ∆u(k) D I C R q 1 ∆u(k) D T q 1 y r (k) S q 1 y(k) , where T(q 1 ), R(q 1 ), R (q 1 ), and S(q 1 ) are polynomial matrices. Example 7.14 Predictive control of a TITO process by a polynomial matrix form (continuation of Examples 7.1, 7.6, and 7.11) The TITO process is the same as in Example 7.11. The predictive control algorithm was derived in Example 7.11. The matrix equation (7.69) can be written in an alternative way by using polynomial matrices. The components of the free response (7.32) are as follows based on Example 7.6: 2
p
H0C1C1
3
7 6 p 7 6H 6 0C1C2 7 H ∆u p D 6 p 7 ∆u(k 1) 7 6H 4 0C1C3 5 p
p
2
H0C1C4
0.3297 60.1512 6 6 0.4512 6 6 60.2526 D6 6 0.5507 6 60.3539 6 4 0.6321 0.4491
3 0.0453 C 0.0824q 1 7 0.6718 7 1 7 0.0824 C 0.1128q 7 7 1.1222 7 1 7 ∆u(k 1) , 0.1128 C 0.1377q 7 7 7 1.5722 7 1 5 0.1377 C 0.1580q 1.9951
285
286
7 Predictive Control of Multivariable Processes
3 F0C1C1 6F0C1C2 7 7 Fy p D 6 4F0C1C3 5 y(k) F0C1C4 2 2.4891 1.4891q 1 6 0 6 63.0379 2.0379q 1 6 6 0 6 D6 63.4872 2.4872q 1 6 6 0 6 43.8551 2.8551q 1 0 2
3 0 4.1575 4.5235q 1 C 1.3660q 2 7 7 7 0 7 1 2 7 5.8247 7.1064q C 2.2817q 7 7 y(k) . 7 0 7 7.3916 9.5883q 1 C 3.1967q 2 7 7 5 0 8.8098 11.8664q 1 C 4.0566 q 2
The future reference signal is assumed to be equal to the current one: y r (k C 2) D y r (k C 3) D y r (k C 4) D y r (k C 5) D y r (k) . The solution of the cost function minimization (7.69) from Example 7.11 can be written by means of the polynomial matrices ∆u a c t (k) D
0 0.0300 0.2617 0.0275 0.3041 0 0.3388 0 0 0.3679 0.0443 0.4591 0.0532 0 0.0604 0 3 2 02 3 0.3297 0.0453 C 0.0824q 1 1 0 7 60.1512 B60 17 0.6718 7 6 B6 7 6 0.4512 0.0824 C 0.1128q 1 7 B61 07 7 6 B6 7 6 7 B6 7 1.1222 7 ∆ u 1 (k 1) 60.2526 B60 17 y r1 (k) 6 B6 7 7 6 0.5507 0.1128 C 0.1377q 1 7 ∆ u 2 (k 1) B61 07 y r2(k) 7 6 B6 7 7 60.3539 B60 17 1.5722 7 6 B6 7 4 0.6321 0.1377 C 0.1580q 1 5 @41 05 0.4491 1.9951 0 1 3 1 2 0 2.4891 1.4891q 1 C 6 0 4.1575 4.5235q 1 C 1.3660q 2 7 7 C 6 7 C 63.0379 2.0379q 1 0 7 6 C C 6 1 2 7 0 5.8247 7.1064q C 2.2817q (k) y 7 1 C 6 6 7 C. 7 y 2 (k) C 63.4872 2.4872q 1 0 7 C 6 C 6 0 7.3916 9.5883q 1 C 3.1967q 2 7 7 C 6 5 A 43.8551 2.8551q 1 0 0 8.8098 11.8664q 1 C 4.0566 q 2
D
1 T ∆ u 1 (k) H Λ y y r yO free D HT Λ y H C Λ u ∆ u 2 (k)
7.5 Pairing of the Controlled and the Manipulated Variables
Performing the matrix multiplications results in the polynomial matrix equations
1 T ∆ u 1 (k) ∆u a c t (k) D D HT Λ y H C Λ u H Λ y y r yO free ∆ u 2 (k) 0.9046 0.0575 D y (k) 0.1579 0.8271 r 0.4882 0.0515 C 0.1249q 1 1 ∆u(k 1) 0.2591 0.7804 0.0219q 3.1616 2.2570q 1 0.2847 0.3309q 1 C 0.1037q 2 1 1 2 y(k) . 0.5528 C 0.3950q 4.2041 4.9273q C 1.5502q This form corresponds to a MIMO RST polynomial matrix equation with
0.9046 0.0575 T(q ) D , 0.1579 0.8271 1 0.2847 0.3309q 1 C 0.1037q 2 3.1616 2.2570q 1 D , S q 0.5528 C 0.3950q 1 4.2041 4.9273q 1 C 1.5502q 2 0.0515q 1 C 0.1249q 2 1 C 0.4882q 1 R q 1 D . 1 0.2591q 1 0.7804q 1 0.0219q 2 1
Further examples are presented in Honc and Haber [11, 12].
7.5 Pairing of the Controlled and the Manipulated Variables
MIMO processes occur often in practice. Examples are, for example, simultaneous temperature and humidity control with air conditioning, and distillate and bottom concentration control in a distillation column. In practice, for simplicity, control of MIMO processes is often decentralized, that means, it is realized by two independent SISO controllers. In this case the question is how to pair the controlled and the possible manipulated variables. As a rule of thumb, any controlled signal should be controlled by that manipulated variable which has the largest effect on this controlled variable with the shortest possible delay time. A practical method to pair the variables is the Relative Gain Array (RGA) method of Bristol [2]; however, by this method only static relations are considered. The big advantage of MIMO predictive control is that prior pairing of the controlled and manipulated variables is not necessary. This fact is illustrated by some simulations. Figure 7.5 shows a TITO process with two decentralized SISO controllers and with a TITO controller, respectively. The difference from Figure 7.2 is that now the controller outputs are interchanged, which is equivalent to the fact that the pairing of the manipulated and controlled variables is interchanged.
287
288
7 Predictive Control of Multivariable Processes TITO process yr1
SISO predictive uc1 controller 1
y1 yr2
SISO u predictive c2 controller 2
y2
(a)
u1
TITO process y1
P11
y1
P12
TITO predictive controller
yr2
P21
P21
uc2 y2
P22
y2
u2
(b)
two SISO controllers
y1
P11
uc1
P12
u2
u1
yr1
y2
P22
TITO controller
Figure 7.5 Control scheme of a TITO process with interchanged controller outputs. 1.5 y 1
3 u 2
y2 yr1
yr2
0.5
1
0
0
y1
-0.5 0
(a)
uc1=u2
uc2=u1
-1 2
4
6
8 t [s] 10
controlled variable with two SISO controllers
0
(b)
2
4
6
8 t [s] 10
manipulated variable with two SISO controllers
Figure 7.6 Decentralized predictive control of a TITO process without dead time with interchange of the assignment of the controlled and manipulated variables.
Example 7.15 Predictive control of a TITO process without dead time by two SISO controllers and by a TITO controller, respectively, if the pairing of the controlled and manipulated variables is interchanged (continuation of Example 7.12) All subprocesses are linear third-order ones with three equal time constants of T1 D 0.333 s and without dead time. The static gains are K p11 D K p 22 D 1.0, K p12 D 0.25, and K p 21 D 0.5. The control experiment and the controller parameters are as in Example 7.12. The difference is that the controller outputs were assigned to other manipulated variables as originally and the controller was designed on the basis of the new process structure. Figure 7.6 shows that both SISO controls became unstable, whereas the TITO control performs well. Figure 7.7 shows that with the TITO control, the control behavior remains unchanged in spite of the interchange; only the role of the manipulated variables was changed (compare Figure 7.6a,b with Figure 7.3c,d, respectively).
Example 7.16 Predictive control of a TITO process with dead time by two SISO controllers and by a TITO controller, respectively, if the pairing of the controlled and manipulated variables is interchanged (continuation of Example 7.13) The process parameters are as in Example 7.15 except for the additional dead times, which are Td11 D 0.4 s, Td12 D 0.8 s, Td21 D 1.0 s, and Td22 D 0.6 s. The control experiment and the controller parameters are as in Example 7.15 with the difference
7.5 Pairing of the Controlled and the Manipulated Variables 1.5 y 1
3 u 2
yr1 y1
0.5
yr2
uc2=u1
y2
0 -0.5
2
4
(a)
6
8 t [s] 10
-1 0
2
(b)
controlled variable with a TITO controller
uc1=u2
uc1=u2
0 0
uc2=u1
1
4
6
8 t [s] 10
manipulated variable with a TITO controller
Figure 7.7 Predictive TITO control of a TITO process without dead time with interchange of the assignment of the controlled and manipulated variables. 1.5 y 1
3 u 2
y2
yr1
uc1=u2
yr2 0.5
1
0
0
y1
-0.5 0
2
(a)
uc2=u1
-1 4
6
8 t [s] 10
controlled variable with two SISO controllers
0
(b)
2
4
6
8 t [s] 10
manipulated variable with two SISO controllers
Figure 7.8 Decentralized predictive control of a TITO process with dead time with interchange of the assignment of the controlled and manipulated variables. 1.5 y 1
3 u 2
yr1
uc2=u1
1 0
0
uc1=u2
uc1=u2
-1
-0.5 0
(a)
uc2=u1
y2
yr2
y1
0.5
2
4
6
8
controlled variable with a TITO controller
t [s] 10
0
(b)
2
4
6
8 t [s] 10
manipulated variable with a TITO controller
Figure 7.9 Predictive TITO control of a TITO process with dead time with interchange of the assignment of the controlled and manipulated variables.
that the controller outputs were assigned to the other manipulated variables as originally and the controller was designed on the basis of the new process structure. Figure 7.8 shows that both SISO controls became unstable, whereas Figure 7.9 illustrates that the TITO control performs well. With the TITO control, the control behavior remains unchanged in spite of the interchange; only the role of the manipulated variables was changed (compare Figure 7.9a,b with Figure 7.8c,d, respectively).
289
290
7 Predictive Control of Multivariable Processes
In Examples 7.12 and 7.13 the RGA matrix was
λ 11 1 λ 11
1.143 1 λ 11 D λ 11 0.143
0.143 , 1.143
with λ 11 D
1 1 D D 1.143 , K p12 K p 21 0.25 0.5 1 1 K p11 K p 22 11
which means that an interchange of the original pairing is not highly recommended. The simulation result confirmed the RGA calculation. Shah et al. [17] stated and illustrated by simulations that MIMO Generalized Predictive Control (GPC) is pairing invariant if the controlled error and manipulated horizons are selected to be the same for each channel and the difference between the control error and the manipulated variable horizons are greater than or equal to the maximum forward shift in the delay time interactor matrix minus 1. Tuning of SISO controllers is easier than that of MIMO controllers. Therefore, if the process is decoupled more or less, then it is recommended to use SISO controllers. In addition, with correct pairing a static decoupling can help to reduce the complexity of MIMO control to individual SISO controls.
7.6 Scaling of the Controlled and the Manipulated Variables
Scaling is a normalization of the manipulated and controlled variables. This is necessary if the controller outputs have different dimensions/magnitudes. Controlled outputs with large magnitudes suppress the effect of those with small ones. A cost function (e.g., quadratic) would depend to a higher extent on an output with a large magnitude than on an output with a small magnitude. This effect can be compensated for by scaling the variables, which can be done, for example, by modifying the weighting factor. This procedure is also known with SISO control and is illustrated by an example. Example 7.17 Predictive control of a SISO process with different static gains without scaling A linear process without dead time has the static gain K p D 1 and two time constants T1 D 1 s and T2 D 10 s. The set value was increased stepwise at t D 0 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 10 s. The control behavior is shown in Figure 7.10. The controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ y D 1.0, and λ u D 0.1 and the sampling time was ∆T D 0.2 s. If the static gain was decreased to K p D 0.1, the process became much slower with the same controller. This is understandable because now the same controlled sig-
7.6 Scaling of the Controlled and the Manipulated Variables
(a)
controlled variable
(b)
manipulated variable
Figure 7.10 Predictive control with different static gains without scaling.
nal can be achieved by a larger manipulated variable, which penalizes the quadratic cost function to a higher extent; thus, the control will be slower. The above problem can be understood and solved by investigating the cost function of a static process: y (k) D K p u(k) Assume a process with the original gain K o r i g which is modified to the gain K m o d . The controlled output should be the same in both cases; thus the manipulated signals u o r i g (k) and u m o d (k) differ: y (k) D K o r i g u o r i g (k) , y (k) D K m o d u m o d (k) , Km o d Km o d u o r i g (k) D D u m o d (k) ! ∆ u o r i g (k) D D ∆ u m o d (k) . Ko r i g Ko r i g The above equations are valid not only for a static process. The control behavior of the controlled variables is the same in both cases if the cost functions are equal, which means J D λy
n e2 X
eO 2 (k C d C 1 C n e jk) C λ u
n e Dn e1
D λy
n e2 X n e Dn e1
D λy
∆ u2o r i g (k C j 1)
j D1
eO 2 (k C d C 1 C n e jk) C λ u
n e2 X
nu X
nu X Km o d 2 j D1
eO 2 (k C d C 1 C n e jk) C
n e Dn e1
Ko r i g
∆ u2m o d (k C j 1)
nu λu X ∆ u2m o d (k C j 1) , s c λu j D1
(7.72)
where the scaling factor is λ suc
D
Ko r i g Km o d
2 .
(7.73)
Alternatively (but not at the same time), a scaling factor can be introduced for the weighting factor of the controlled variable. For that reason the cost function (7.73) is multiplied by the constant factor λ suc , but this does not influence the minimum
291
292
7 Predictive Control of Multivariable Processes
of the cost function: J λ suc J D λ suc λ y
n e2 X
eO 2 (k C d C 1 C n e jk)
n e Dn e1
C λu
nu X
∆ u2m o d (k C j 1)
j D1
D
λy λ syc
n e2 X
eO 2 (k C d C 1 C n e jk) C λ u
n e Dn e1
nu X
∆ u2m o d (k C j 1) ,
j D1
(7.74a) with λ syc
1 D sc D λu
Km o d Ko r i g
2 .
(7.74b)
Of course, it makes no sense to define both scaling factors in the SISO case. Example 7.18 Predictive control of a SISO process with different static gains with scaling The same process as in Example 7.17 is controlled with the same controller. The only difference from Example 7.17 is that scaling was used. If the static gain was K p D 1, then the scaling factor of the control error was λ syc D 1/12 D 1 and for K p D 0.1 its value was λ syc D 1/0.12 D 100. Figure 7.11 shows for both cases identical controlled signals with different manipulated signals. The quadratic cost function of a MIMO process can be defined as
JD
My n e2i X X iD1 n ei Dn e1i
C
λyi [y r i (k C d i C 1 C n e i ) yO i (k C d i C 1 C n e i jk)]2 λ syci
Mu X n ui X λ ui ∆ u2i (k C j 1) ) min , ∆ui λ suic
(7.75)
iD1 j D1
(a)
controlled variable
(b)
manipulated variable
Figure 7.11 Predictive control with different static gains with scaling.
7.6 Scaling of the Controlled and the Manipulated Variables
with the scaling factors λ syci : scaling factor of the square of the control error of the ith output, λ suic : scaling factor of the square of the control increments of the ith input. It has to be emphasized that scaling has to be done before the tuning to allow the effect the weighting factors in the cost function independently of the magnitude of the signals. In the case of predictive control of a MIMO process simply scaling as with SISO processes this is not possible as each manipulated variable influences all the outputs. Therefore, in this case only a best compromise can be found for the scaling of the manipulated and controlled variables. To demonstrate this fact, automatic scaling using an optimizer was used on a TITO process shown in the next example. The target function was simply the quadratic error between the controlled variables of both processes; thus, JD
N X
y o r i g i na l(k) y s c a l e d (k)
kD1
2
)
min
λ u Si C ,λ y iS C
.
(7.76)
Example 7.19 Optimization of the scaling factors of a TITO process The TITO process consisted of four linear first-order processes with the parameters P11 : P12 : P21 : P22 :
K p11 D 2, T11 D 10 s, K p12 D 1, T12 D 20 s, K p 21 D 1, T21 D 15 s, K p 22 D 2, T22 D 5 s.
The set value of process 1 was increased at t D 0.5 s from 0 to 1 and the set value of process 2 was increased at t D 10 s in the same manner. The sampling time was ∆T D 0.1 s and the controller parameters were n e1 D 0, n e2 D 9, n u D 3, λ y D 1.0, and λ u D 0.1. The scaling factors were calculated for N D tsim /∆T D 20 s/0.1 s D 200 samplings. Figure 7.12a,b shows the predictive control without reference signal prediction. Then the static gains of subprocesses P11 and P21 were decreased to 1/10 of their original value (K p11 D 0.2 and K p 21 D 0.1), whereas the static gains of subprocesses P12 and P22 were raised to the tenfold value (K p12 D 10 and K p 22 D 20). Figure 7.12c,d shows the control without scaling and with the optimized scaling factors. With the optimal scaling factors, the controlled variables remained identical to those before the parameter change. Scaling for multivariable control is also treated in Edmunds [6] and Wang and Tan [19].
293
294
7 Predictive Control of Multivariable Processes y yr1 1
60 u yr2
y1
y2 u1
0
u2
0 0
2
(a)
4
6
8
10
12
14
16 t [s] 20
controlled signal before the parameter change
y yr1 1
2
4
10
12
14
u2 unscaled u1 unscaled
y2 unscaled
0
8
16 t [s] 20
u1 scaled
y2 scaled
y1 unscaled
6
manipulated signal before the parameter change
60 u
yr2
y1 scaled
0
(b)
u2 scaled
0 0
2
4
6
8
10
12
14
16 t [s] 20
(c) controlled signal after the parameter change (solid: scaled, dashed: not scaled)
0
2
4
6
8
10
12
14
16 t [s] 20
(d) manipulated signal after the parameter change (solid: scaled, dashed: not scaled)
Figure 7.12 Predictive control of a TITO process without and with scaling.
7.7 Tuning
With SISO control, it is enough to use only one weighting factor, either that of the control increments λ y or that of the control error λ u . Usually λ y D 1 is selected and the control behavior is affected by changing λ u . (Here the same weighting factor is assumed in the prediction horizon.) With MIMO control, different control error weighting factors can be used to weight the control error of the different channels, which means to improve the control behavior of certain controlled signals at the expense of the others. The same is valid for the weighting of the manipulated variables. Of course, not the absolute value of the individual weighting factors but their relation is important. The following example illustrates the effect of the choice of the weighting factors. Example 7.20 Predictive control of the TITO model of a distillation column The control of a distillation column will be presented in Chapter 13, which discusses industrial applications in detail. Here only a simplified TITO model of another plant is used with Controlled variable: y 1 : pressure-compensated top temperature of tray 16 (TOP-PCT), y 2 : pressure-compensated bottom temperature of tray 2 (BOT-PCT), Manipulated variable: u 1 : heating duty (power), u 2 : flow. The parameters of the model are given in Table 7.1. In all simulation plots the following ranges of the variables were scaled from 0% to 100%, where the lower value means 0%, and the upper value means 100%: TOP-PCT from 50 to 64 ı C,
7.7 Tuning Table 7.1 TITO model parameters. Manipulated variables
Reflux (u 1 )
Heating duty (u 2 )
TOP-PCT (y 1 )
Controlled signals BOT-PCT (y 2 )
Td11 D 3 min K p11 D 0.0275 ı C/(t/d) T11 D 9.4 min
Td21 D 10 min K p11 D 0.0201 ı C/(t/d) T21 D 12.6 min
Td12 D 10 min K p22 D 3.32 ı C/MW T12 D 10 min
Td22 D 3 min K p22 D 3.32 ı C/MW T22 D 6.5 min
BOT-PCT from 148 to 162 ı C, reflux flow from 200 to 520 t/d, and heating power (duty) from 3 to 10 MW. Initially TOP-PCT was 60 ı C and BOT-PCT was 150 ı C. In t D 0 min the set value of TOP-PCT was increased from 60 to 63 ı C and in t D 200 min the set value of BOT-PCT was increased from 150 to 152 ı C. Figure 7.13 shows the control with the nominal controller parameters, whose values are not listed here because only the relation of the weighting factors is important in the next simulations. Figure 7.14 shows the control where the weighting factor of the controlled output y 1 (TOP-PCT) was increased by a factor of 10. The control error in TOP-PCT is significantly reduced during the set point change of the other variable y 2 (BOTPCT). Also the overshoot was decreased at the set point change of TOP-PCT. On the other hand, the control of y 2 (BOT-PCT) became worse. The plot shows that increasing the ratio of the weighting factors of the controlled variables leads to one-sided decoupling, which is beneficial to the variable whose weighting is larger. Figure 7.15 shows the effect of decreasing the weighting factor of the first manipulated variable u 1 (reflux flow) from the nominal case (Figure 7.13). The control of the corresponding first output y 1 (TOP-PCT) became faster with less overshoot at the cost of a little oscillating manipulated variable. The above example shows well the effect of changing the weighting factors with MIMO control: Increasing the weighting factor of a controlled output accelerates the control and depresses the overshoot of the controlled variable considered at the expense of the other variables. A relatively large increase of the weighting factor of a controlled output, in contrast to an increase of the weighting factors of the other output variables, leads to one-sided decoupling. Decreasing the weighting factor of the manipulated variable increments accelerates the control and depresses the overshoots of the controlled variables at the expense of a more oscillating manipulated variable.
295
296
7 Predictive Control of Multivariable Processes y1r
100 [%] 90
y1 (TOP-PCT) 80 70
u1 (reflux)
60 50
u2 (heating duty) 40 30
y2r
20
y2 (BOT-PCT)
10 0
0
50
100
150
200
250
300
350
400 t [min]
Figure 7.13 Predictive TITO control (nominal controller settings). 100 [%] 90
y1r y1 (TOP-PCT)
80 70
u1 (reflux)
60 50
u2 (heating duty) 40 30
y2 (BOT-PCT)
y2r
20 10 0
0
50
100
150
200
250
300
350
400 t [min]
Figure 7.14 Predictive TITO control (with increased weighting of TOP-PCT).
Other tuning strategies (e.g., choice of horizon lengths, placing of the coincidence and blocking points) are similar to those with SISO processes. As shown by Shah et al. [17], exact knowledge of the delay matrix is not necessary with long-range predictive control if the prediction horizon length minus the manipulated variable horizon length is greater than the maximum forward shift in the interactor matrix.
7.8 Decoupling Control 100 [%] 90
y1r y1 (TOP-PCT)
80 70
u1 (reflux)
60 50
u2 (heating duty) 40 30
y2 (BOT-PCT)
y2r
20 10 0
0
50
100
150
200
250
300
350
400 t [min]
Figure 7.15 Predictive TITO control (with decreased weighting of reflux change).
7.8 Decoupling Control
Decoupling is very important with MIMO processes. One of the advantages of predictive control is that in principle no decoupling compensator has to be designed and a decision about the best input/output pairing is not necessary. On the other hand, the decoupling is perfect only if the control increments are not weighted, which may result in nonsmooth control. Therefore, a practical method for decoupling is required. The following example demonstrates the decoupling effect of predictive control of a TITO process. Example 7.21 Predictive control of a TITO process with and without weighting of control increments The TITO process consists of the following aperiodic processes with different static gains K p i j , dead times Td i j , and number n i j of equal time constants Ti j between input j and output i: P11 : P12 : P21 : P22 :
K p11 D 1.5, K p12 D 0.5, K p 21 D 0.75, K p 22 D 1.0,
T11 D 1.0 min, T12 D 0.5 min, T21 D 0.5 min, T22 D 2.0 min,
n 11 D 2, n 12 D 4, n 21 D 3, n 22 D 1,
Td11 D 0.1 min, Td12 D 0.5 min, Td21 D 0.8 min, Td22 D 0.2 min.
The transfer function matrix of the process is 3 2 0.5 1.5 0.1s 0.5s e e 7 6 (1 C s)2 (1 C 0.5s)4 7 . G p (s) D 6 5 4 0.75 1 0.8s 0.2s e e 3 (1 C 0.5s) 1 C 2s
297
298
7 Predictive Control of Multivariable Processes
Figure 7.16 shows the unit step responses of the submodels. Figure 7.17 shows the TITO predictive control without decoupling. The sampling time was ∆T D 0.1 min and the controller parameters were:
start of control error horizons: n e11 D n e12 D 0, end of control error horizons: n e21 D n e22 D 90, length of control horizons: n u1 D n u2 D 30, weighting factors of the control errors λ y1 D λ y 2 D 1, weighting factors of the control increments λ u1 D λ u2 D 0.5.
The control scenario was: at t D 1 min stepwise increase of the first reference signal by 1, at t D 10 min stepwise increase of the second reference signal by 1. The control of the set value changes is fast with an overshoot of about 10%. There are changes of about 10–15% (related to the set value changes) in the controlled variables whose set value was kept constant. A perfect decoupling can be achieved if the increments in the manipulated variables are not penalized, that is, λ u1 D λ u2 D 0. Figure 7.18 shows the control with these controller parameters. The other tuning parameters are the same as in the case of Figure 7.17. A change in the set value does not cause any change in the other control variable at the cost of a very drastic change in the manipulated variables. Thus, this decoupling method is not practical and cannot be applied. Therefore, a small weighting factor (λ u ) of the control increments is always used. Before introducing some decoupling methods, we show that decentralized SISO control of this TITO process is difficult without any decoupling. The RGA matrix y1
y1
1 ∆u1: 0 → 1 (t=0 min)
0 y2
∆u2: 0 → 1 (t=0 min) y2
1 ∆u1: 0 → 1 (t=0 min)
0 0
2
4
6 t [min] 0
∆u2: 0 → 1 (t=0 min) 2
4
6 t [min]
Figure 7.16 Unit step responses of the TITO process (top left, P11 ; top right, P12 ; bottom left, P21 ; bottom right, P22 ).
7.8 Decoupling Control y1
y2 1
yr1
1
yr2
y1
y2
0
2
u1 4
u2 4
2
2
u1
-2
u2
0
0 0
5 10 15 t [min] top: y1, bottom: u1
(a)
-2
0
(b)
5 10 15 top: y2, bottom: u2
t[min]
Figure 7.17 TITO control without decoupling.
y1
y2
yr1
1
1
y1
yr2 y2
0
0
u1 4
u2 4
2
2
u1
0 -2
u2
0 0
(a)
5 10 15 t [min] top: y1, bottom: u1
-2
0
(b)
5 10 15 t [min] top: y2, bottom: u2
Figure 7.18 TITO control without penalizing the control increments.
of the process is 1 λ 11 λ 11 1.333 D 1 λ 11 λ 11 0.333
0.333 , 1.333
with λ 11 D
1 1
K p12 K p 21 K p11 K p 22
D
1 1
0.50.75 1.51
D 1.333
if the pairing of Example 7.21 is maintained. Because of the near to 1 main diagonal values, the pairing of Example 7.21 is advisable. Example 7.22 Decentralized predictive SISO control of a TITO process The process and controller parameters and the control scenario are as in Example 7.21 except that instead of a TITO controller two independent SISO controllers were used. With the same weighting factors λ u1 D λ u2 D 0.5 of the control increments the control was so oscillating that the weighting factors had to be increased
299
300
7 Predictive Control of Multivariable Processes
y1
y2
yr1
1
yr2
1
y2
y1 0
0
u1 4
u2 4
2
u1
0 -2
2
u2
0 0
(a)
5 10 15 t [min] top: y1, bottom: u1
-2
0
(b)
5 10 15 t [min] top: y2, bottom: u2
Figure 7.19 Decentralized SISO control of a TITO process without decoupling.
to λ u1 D λ u2 D 15. Even in this case the control did not become smooth enough; see Figure 7.19. Further increase of the above-mentioned weighting factors would slow down the control further on.
In the following some methods are presented which can be used for (not necessarily complete) decoupling: using a static precompensator, postcompensator, and combined precompensator and postcompensator, using a dynamic compensator, changing the control error weighting factors at any set point change, slowing down the reference signal, control-error-dependent adaptation of the control error weighting factors. For simplification, equal numbers of manipulated and controlled variables will be assumed. 7.8.1 Decoupling by Using Static Compensators
First, different kinds of static compensators are presented. Although they do not ensure complete decoupling, the decentralized SISO controllers together with these compensators result in a good performance which can be compared with that of MIMO predictive control without these compensators. The advantage is the simpler algorithm and easier tuning of the SISO controllers. The static precompensator is designed from the static-gain matrix K p of the process y D Kp u .
7.8 Decoupling Control
7.8.1.1 Decoupling by Using a Precompensator The precompensator has the form (Figure 7.20)
u D K cp r e uc , pre
where K c is the steady-state gain matrix of the precompensator and u c is the vector of the decentralized controller outputs, that is, the vector of the precompensator inputs. For the decoupled system the following relationship can be written: y D K p K cp r e u c D K d i a g uc , where K d i a g is the steady-state gain of the decoupled system. If matrix K d i a g is chosen as the identity matrix, the precompensator is obtained as the inverse of the process static-gain matrix K p . For a TITO process, 1 K p11 K p12 K cp r e D K1 p D K p 21 K p 22 1 K p 22 K p12 D . (7.77) K p11 K p11 K p 22 K p12 K p 21 K p 21 Example 7.23 Decentralized predictive control of a TITO process using a static precompensator (continuation of Example 7.21) The process, the control scenario, and almost all controller parameters are as in Example 7.21. Based on Example 7.21, the precompensator becomes 1 K p 22 K p12 0.8889 0.4444 K cp r e D D . 0.6667 1.3333 K p11 K p11 K p 22 K p12 K p 21 K p 21 The decentralized controllers have to be designed for the model (in the dashed box in Figure 7.20) 3 2 0.5 1.5 0.1s 0.5s e e 7 0.8889 0.4444 6 (1 C s)2 (1 C 0.5s)4 7 G pp r e (s) D 6 5 0.6667 1.3333 . 4 0.75 1 0.8s 0.2s e e (1 C 0.5s)3 1 C 2s The unit step responses of the four submodels of the process with the precompensators are shown in Figure 7.21. The decoupling can be seen in the subprocesses as both step responses giving cross-effects tend to zero, which means these Decentralized controllers
System decoupled in steady state uc1
yr1
Controller 1
yr2
Controller 2
uc2
Static pre-compensator
y1
u1 Process u2
y2
Figure 7.20 Decentralized TITO control scheme using a static precompensator.
301
302
7 Predictive Control of Multivariable Processes y1 1
y1 uc2: 0 → 1 (t=0 min)
uc1: 0 → 1 (t=0 min)
0 y2 1
y2 uc1: 0 → 1 (t=0 min)
0 0
2
4
uc2: 0 → 1 (t=0 min) 6
t [min] 0
2
4
6 t [min]
Figure 7.21 Unit step responses of the submodels of the precompensated TITO process P p re p re p re p re p re (top left, P11 ; top right, P12 ; bottom left, P21 ; bottom right, P22 ).
y1
y2
yr1
1
yr2
1
y2
y1 0
0
u1 4
u2 4
2
u1
u2
0
0 -2
2
0
(a)
5 10 15 t [min] top: y1, bottom: u1
-2
0
(b)
5 10 15 t [min] top: y2, bottom: u2
Figure 7.22 TITO decentralized control with a static precompensator.
models have zero static gain. On the basis of the step responses of the main submodels, reduced-order models were fitted by the least-squares method: 0.0062195q 2 C 0.0065561q 3 pre G p11 q 1 D , 1 1.7239q 1 C 0.73661q 2 0.64645q 2 0.10898q 4 C 0.046782q 5 pre . G p 22 q 1 D 1 2.6078q 1 C 2.2934q 2 0.68326 q 3 With the same weighting factors λ u1 D λ u2 D 0.5 of the control increments as with the TITO controller, the control was so oscillating that the weighting factors had to be increased to λ u1 D λ u2 D 15. Figure 7.22 shows the control behavior, which is not as fast as with the TITO controller (Figure 7.17) but is much faster and smoother than without static decoupling (Figure 7.19).
7.8 Decoupling Control
7.8.1.2 Decoupling by Using a Postcompensator An alternative way is to use a postcompensator presented as in Figure 7.23. The postcompensator has the form
u D K cp o s t u c , p ost
were K c system
is the steady-state gain matrix of the postcompensator. For the decoupled
y p o s t D K p K cp o s t uc D K d i a g u c , where K d i a g is the steady-state gain of the decoupled system. If matrix K d i a g is chosen as an identity matrix, the precompensator is obtained as the inverse of the process static-gain matrix. For a TITO process, Figure 7.23 is valid. Example 7.24 Decentralized predictive control of a TITO process using a static postcompensator (continuation of Example 7.21) The process, the control scenario, and almost all controller parameters are as in Example 7.21. The parameters of the postcompensator are identical to those of the precompensator in Example 7.23. The decentralized controllers have to be designed for the model equation (in the dashed box in Figure 7.23) 3 2 0.5 1.5 0.1s 0.5s e e 2 7 (1 C 0.5s)4 0.8889 .4444 6 7 6 (1 C s) G pp o s t (s) D 5 4 0.75 1 .6667 1.3333 0.8s 0.2s e e . 3 (1 C 0.5s) 1 C 2s The unit step responses of the four submodels of the process with the postcompensators are shown in Figure 7.24. The decoupling can be seen in the subprocesses as both step responses giving the cross-effects tend to zero, which means these models has a zero static gain. On the basis of the step responses of the main submodels, reduced-order models were fitted by the least-squares method: 0.0058556 q 2 C 0.002551q 3 q 1 D , 1 1.7999q 1 C 0.80814q 2 0.065008q 1 0.11818q 4 C 0.054306 q 5 p ost . G p 22 q 1 D 1 2.7658q 1 C 2.567q 2 0.80011q 3 p ost
G p11
With the same weighting factors λ u1 D λ u2 D 0.5 of the control increments as with the TITO controller, the control was so oscillating that the weighting factors Decentralized controllers yr1 yr2
post yr1 Static post-compensator y post r2
System decoupled in steady state uc1
y1
Controller 1 Process Controller 2
uc2
y2
post
Static post-compensator
Figure 7.23 Decentralized TITO control scheme using a static postcompensator.
y1
y2post
303
304
7 Predictive Control of Multivariable Processes post
y1
post
1 uc1: 0 → 1 (t=0 min)
0 post
y2
y2 uc2: 0 → 1 (t=0 min) post
y2
1 u :0→1 c1 (t=0 min) 0 0
2
4
uc2: 0 → 1 (t=0 min) 6 t [min] 0
2
4
6 t [min]
Figure 7.24 Unit step responses of the submodels of the postcompensated TITO process P p ost p ost p ost p ost p ost (top left, P11 ; top right, P12 ; bottom left, P21 ; bottom right, P22 ).
y1
y2
yr1
1
yr2
1
y2
y1 0
0
u1 4
u2 4
2
u1
-2
2
u2
0
0 0
(a)
5 10 15 t [min] top: y1, bottom: u1
-2
0
(b)
5 10 15 t [min] top: y2, bottom: u2
Figure 7.25 TITO decentralized control with a static postcompensator.
had to be increased to λ u1 D λ u2 D 15. Figure 7.25 shows the control behavior, which is not as fast as with the TITO controller (Figure 7.17), but is much faster and smoother than without static decoupling (Figure 7.19).
7.8.1.3 Decoupling by Using a Precompensator and a Postcompensator A third way to achieve steady-state compensation of the process is using both a precompensator and a postcompensator (Figure 7.26, Honc et al. [10]). The compensator can be designed by singular value decomposition of the static-gain matrix K p :
K p D XYZ T ,
(7.78)
where X is an orthogonal matrix with columns containing the eigenvectors of K p K Tp , Z is an orthogonal matrix with columns containing the eigenvectors of K Tp K p and matrix Y is a diagonal of the same size as K p with diagonal elements called singular values (square roots of nonzero eigenvalues of both K p K Tp and K Tp K p ). They fill the first places on the main diagonal of K p , where the number of these places is equal to the rank of K p . With orthogonal matrices the transpose matrix is equal to the inverse matrix (X T D X1 ). Using a precompensator pre p ost K c D ZY1 and a postcompensator K c D X T , the steady-state gain of the
7.8 Decoupling Control Decentralized controllers yr1 yr2
post yr1 Static post-compensator y post r2
System decoupled in steady state u1
uc1 Controller 1 Controller 2
uc2
Static pre-compensator
y1 Process y2
u2
y1post
Static post-compensator
y2post
Figure 7.26 Decentralized TITO control scheme using a static precompensator and a postcompensator.
decoupled system becomes an identity matrix: T X T XYZ ZY1 D I . „ƒ‚… „ƒ‚… „ƒ‚… pre Kc
Kp
(7.79)
p ost Kc
Example 7.25 Decentralized predictive control of a TITO process using a static precompensator and static postcompensator (continuation of Example 7.21) The process, the control scenario, and almost all controller parameters are as in Example 7.21. The precompensator and postcompensator can be obtained from the static gain of the process by singular value decomposition: 0.7991 XD 0.6012 0.8550 ZD 0.5187
0.6012 0.7991
1.9294 ,Y D 0
0 0.5831
,
0.5187 , 0.8550 0.4431 0.8895 pre 1 , Kc D Z Y D 0.2688 1.4663 0.7991 0.6012 K cp o s t D X T D . 0.6012 0.7991
The decentralized controllers have to be designed for the model equation (in the dashed box in Figure 7.26): G pp r ep o st(s) D 2
0.4431 0.2688
1.5 e 0.1s 6 (1 C s)2 6 4 0.75 e 0.8s (1 C 0.5s)3
0.8895 1.4663
3 0.5 0.5s e 7 0.7991 (1 C 0.5s)4 7 5 0.6012 1 e 0.2s 1 C 2s
0.6012 0.7991
.
The unit step responses of the four submodels of the compensated process are shown in Figure 7.27. The decoupling can be seen in the subprocesses giving the cross-effects. As both step responses tend to zero, these models have zero static gain. On the basis of the step responses of the main submodels, reduced-order
305
306
7 Predictive Control of Multivariable Processes
y1post 1
y1post uc2: 0 → 1 (t=0 min)
uc1: 0 → 1 (t=0 min)
0
post
post
y2
y2
1
0
uc1: 0 → 1 (t=0 min)
0
2
uc2: 0 → 1 (t=0 min) 4
6
t [min] 0
2
4
6
t [min]
Figure 7.27 Unit step responses of the submodels of the precompensated and postcompenp rep ost p rep ost p rep ost sated TITO process P p rep ost (top left, P11 ; top right, P12 ; bottom left, P21 ; p ost bottom right, P22 ).
y1
y2
yr1
1
yr2
1
y2
y1 0
0
u1 4
u2 4
2
2
u1
-2
u2
0
0 0
(a)
-2 0 5 10 15 t [min] (b) top: y1, bottom: u1
5 10 15 t [min] top: y2, bottom: u2
Figure 7.28 TITO decentralized control with both a precompensator and a postcompensator.
models were fitted by the least-squares method: p r ep o s t 1
Gp11
q
p r ep o s t 1
Gp22
q
D
0.010603q 2 C 0.002553q 3 , 1 1.8403q 1 C 0.8485q 2
D
0.060261q 3 0.097851q 4 C 0.03952q 5 . 1 2.2616 q 1 C 2.3389q 2 0.7055q 3
With the same weighting factors λ u1 D λ u2 D 0.5 of the control increments as applied with the TITO controller the control was so oscillating, that the weighting factors had to be increased to λ u1 D λ u2 D 15. Figure 7.28 shows the control behavior, which is not as fast as with the TITO controller (Figure 7.17), but is much faster and smoother than without static decoupling (Figure 7.19).
7.8 Decoupling Control
The simulations show that decoupling of a MIMO process using a static compensator and decentralized SISO controllers is possible. The best results were achieved by the precompensation and the combined precompensation and postcompensation. But the controller has to be slowed down by increasing the manipulated variable weighting to prevent oscillating behavior. There is only a negligible difference in the control behavior among the different static compensators; compare Figures 7.22, 7.25, and 7.28. To see which controller is the most robust, the weighting factor of the manipulated variable increments was reduced in turn from 15 to 5 and 2.5. Figures 7.29–7.31 show the results for the precompensator, postcompensator, and combined precompensator and postcompensator. In the simulated case, the combined precompensator and postcompensator is the most robust.
(a)
top: y1, bottom: u1
(b)
top: y2, bottom: u2
Figure 7.29 Control behavior as a function of the weighting factor of the control increments with the TITO decentralized control with a precompensator.
(a)
top: y1, bottom: u1
(b)
top: y2, bottom: u2
Figure 7.30 Control behavior as a function of the weighting factor of the control increments with the TITO decentralized control with a postcompensator.
307
308
7 Predictive Control of Multivariable Processes
(a)
top: y1, bottom: u1
(b)
top: y2, bottom: u2
Figure 7.31 Control behavior as a function of the weighting factor of the control increments with the TITO decentralized control with the combined precompensator and postcompensator.
7.8.2 Decoupling by Using a Dynamic Compensator pre
In the sequel only precompensation will be considered, where G c (q 1 ) is the pulse-transfer function of the precompensator. The manipulated variable is obtained as (7.80) u(k) D G cp r e q 1 u c (k) . With (7.80) and with the MIMO process model (7.5), the input/output relation between the compensator input and the process output becomes (7.81) y(k) D A1 q 1 q d B q 1 G cp r e q 1 u c (k) . If the pulse-transfer function G cpo m p q 1 D B q 1 G cp r e q 1 becomes a diagonal matrix, then the MIMO controller is decoupled and can be tuned for all outputs as a SISO controller. Usually the denominator matrix A1 (q 1 ) is diagonal or can be made diagonal; thus, only B(q 1 ), the numerator of the pulse-transfer function without the common dead time, has to be compensated for. Dion et al. [5] recommended choosing the inverse matrix of the numerator com p B(q 1) multiplied by a diagonal matrix G d i a g (q 1 ) of minimal McMillan degree such that the precompensator com p (7.82) G cp r e q 1 D B1 q 1 G d i a g q 1 com p
is causal and stable. The diagonal matrix G d i a g (q 1 ) is the result of the compensation of the numerator polynomial com p com p B q 1 G cp r e q 1 D B q 1 B1 q 1 G d i a g q 1 D G d i a g q 1 .
7.8 Decoupling Control
From (7.81) and (7.82) the compensated process model becomes com p G cpo m p q 1 D A1 q 1 q d B q 1 B1 q 1 G d i a g q 1 com p D A1 q 1 q d G d i a g q 1 .
(7.83)
Example 7.26 Compensation of a finite impulse response process by a minimalorder precompensator The parameters of the finite-order dead-time process are A q 1 D I I
d D2,
B q 1 D
q
1
0
2
1
q
.
As the first output is not influenced by the second input and there is no delay in the first SISO channel, a static component can be selected as the first diagonal element of the compensator matrix. As the second channel includes a time delay, consequently at least one delay should be in the second diagonal element of the compensator matrix. A first choice is then 1 com p G d i a g q 1 D 0
0
q 1
and using (7.82), com p G cp r e q 1 D B1 q 1 G d i a g q 1 1 1 0 1 0 1 D 2 D q 1 q 0 q 1 q 1
0 . 1
From (7.83) the compensated process model becomes G cpo m p
q
1
DA
1
q
1
q
d
com p Gd i a g
q
1
Dq
2
1 0
0 q 1
.
Figure 7.32a shows the process and the compensator, and Figure 7.32b gives its equivalent model. It is easy to verify that other compensators would not be optimal, for example, com p com p with G d i a g (q 1 ) D diag h1, 1i the compensator is not realizable and G d i a g (q 1 ) D ˝ 2 ˛ is not of nonminimal order. diag 1, q
Furthermore, Dion et al. [5] proposed com p G d i a g q 1 D det B q 1
(7.84)
309
310
7 Predictive Control of Multivariable Processes Compensator
uc1
1
u1
q-2
1
-q-1
uc2 (a)
1
Compensated process
Process
y1
uc1
y2
uc2
q-2
1
q-2
q-1
y1
q-2
u2
q-2
q-1
(b)
precompensator and process model
y2
equivalent model
Figure 7.32 Precompensator and process model of Example 7.26.
as a simplified solution with a nonminimal McMillan degree. The compensator has the form com p G cp r e q 1 D B1 q 1 G d i a g q 1 (7.85) D B1 q 1 det B q 1 D adj B q 1 . With (7.81) and (7.85) the pulse-transfer function of the compensated process becomes G cpo m p q 1 D A1 q 1 q d B q 1 adj B1 q 1 (7.86) D A1 q 1 q d det B q 1 , which is a diagonal matrix. Example 7.27 Compensation of a finite impulse response process by a nonminimal-order precompensator The process is the same as in Example 7.26. The compensator is calculated according to (7.85): G cp r e q 1 D adj
1
0
q 2
q 1
D q 1
1
0
q 2
q 1
1
D
q 1 q 2
0 . 1
From (7.86) the compensated process model becomes G cpo m p q 1 D A1 q 1 q d det B q 1 1 0 q . D I q 2 q 1 D q 2 0 q 1 Figure 7.33a shows the process and the compensator and Figure 7.33b gives its equivalent model. The compensated process model has equal pulse-transfer functions for both channels. Waller et al. [18] derived simple design equations for the compensators for a TITO process. The pulse-transfer function of the compensated process model should be
7.8 Decoupling Control Compensator
uc1
Process
u1
q-1
q-2
1
-q-2
uc2 (a)
Compensated process
y1
uc1
y2
uc2
q-2
q-1
q-2
q-1
y1
q-2
u2
1
q-2
q-1
(b)
precompensator and process model
y2
equivalent model
Figure 7.33 Precompensator and process model of Example 7.27.
diagonal: D com p E com p G p q 1 G cp r e q 1 D G cpo m p q 1 D diag G p11 q 1 , G p 22 q 1 . (7.87) From (7.87) the components of the compensator can be calculated: 1 G cp r e q 1 D G p11 (q 1 ) G p 22 (q 1 ) G p12 (q 1 ) G p 21 (q 1 ) 2 com p com p 3 G p 22 q 1 G p11 q 1 G p12 q 1 G p 22 q 1 4 com p com p 5. G p 21 q 1 G p11 q 1 G p11 q 1 G p 22 q 1 Four simple compensator structures are recommended. Of course, realizability has to be ensured. Structure a
2
6 G cp r e q 1 D 6 4
com p
G cp r e
q
1
Structure c pre
Gc
q
1
1 D 4 G p 21 (q 1 ) com p G p 22 ( q 1 ) 2 D4
G p 22 ( q 1 ) com p
G p 21
( q 1 )
(7.88)
3 1 G p11 ( q 1 ) 5 I com p G p12 ( q 1 )
(7.89)
com p
1
G p12 ( q 1 ) com p
G p11
1 Structure d
3
( q 1 ) 5 I
(7.90)
1
2
G p 22 ( q 1 ) com p 6 G p 21 ( q 1 ) G cp r e q 1 D 6 4 1
3
( q 1 ) 7 7 I 5
( q 1 )
2
G p12 ( q 1 ) G p11
G p 21 ( q 1 ) G p 22
Structure b
1
3 1
G p11 ( q 1 ) com p G p12
( q 1 )
7 7 . 5
(7.91)
311
312
7 Predictive Control of Multivariable Processes
Example 7.28 Compensation of a finite impulse response process by simplified calculation of the compensator The process is the same as in Example 7.26. The compensators are calculated according to (7.88)–(7.91). Only the compensator designed according to (7.88) is realizable: 3 2 2 G p12 q 1 03 1 c o m p 1 7 1 6 6 G p11 (q ) 7 6 17 G cp r e q 1 D 6 7 D 4 q 2 5 5 4 G p 21 q 1 1 1 c o m p 1 1 q G p 22 (q ) 1 0 . D q 1 1 This precompensator is the same as that designed in Example 7.26. A complete decoupling is not always realizable. If the coupling effects are well compensated, the MIMO controller algorithm is simpler and the tuning is easier.
7.8.3 Decoupling by Slowing the Reference Signal Change
It is expected that a slower change of the reference signal will lead to a smaller coupling effect. This is illustrated by a simulation. Example 7.29 Predictive TITO control using first-order reference signal filters (continuation of Example 7.21) The same TITO process as in Example 7.16 was controlled by the same controller with the same scenario. Here the stepwise change of both set values was filtered by a first-order filter with time constants Tr1 D 1.5 min and Tr2 D 1 min, respectively. The filter parameters were selected in such a way that the filtered reference signal would approximate the controlled signal without decoupling (Figure 7.17). As is seen, any set point change practically does not disturb the other controlled variable, whose value should remain unchanged. Maurath et al. [15] recommended the following procedure. First, the control of both outputs of the TITO process have to be simulated off-line in such a way that the set point changes do not disturb the other controlled variables. This can be achieved, for example, by slowing down the set point changes. In the online case, this “optimal” controlled variable is used as a reference trajectory. By this method the change of the reference signal is decelerated, which results in decoupling without any decoupling controller. Example 7.30 illustrates the method.
7.8 Decoupling Control
(a)
top: y1, bottom: u1
(b)
top: y2, bottom: u2
Figure 7.34 TITO control with first-order reference signal filters (dashed line, filtered reference signal).
Example 7.30 Predictive TITO control with the reference signal equal to the controlled signal in the nondecoupled case (continuation of Example 7.29) The same TITO process as in Example 7.21 was controlled by the same controller in the same scenario. The stepwise change of the set value was replaced by a modified reference signal equal to the controlled variable of the nondecoupled case (Figure 7.34). The new reference signal is forced to 0 before the set point step and is forced to 1 after the settling time. The coupling effects (prior to and after the reference step), the dead time, and the very small oscillations after the control step have been removed from the old controlled signal (in Figure 7.34) for the new reference signal. Figure 7.35 demonstrates the conditioning of the reference signal. Figure 7.36 shows the control using the new reference signal both for small λ y1 D λ y 2 D 1 and for larger λ y1 D λ y 2 D 100 weighting factors of the control errors. The weighting factors have to be raised because now the reference signal is not a step but a slower signal. Instead of storing the controlled variable as a modified reference signal, one can filter the current reference signal in such a way that the filtered reference signal will approximate the controlled signal in the nondecoupled case. This can be achieved if a filter is identified between the stepwise reference signal change and the controlled variable in the nondecoupled case (Figure 7.34) using a conventional least-squares algorithm [16]. Example 7.31 Predictive TITO control with the optimally filtered reference signal (continuation of Example 7.30) The same TITO process as in Examples 7.21 and 7.30 was controlled by the same controller in the same scenario. A filter with order 3 was required to have a sufficient fit between the reference signal change and the corresponding controlled variable in Figure 7.34. The estimated filter parameters using the least-squares al-
313
314
7 Predictive Control of Multivariable Processes y1
y2
yr1mod =0
1
yr1
0
yr1mod =1
yr2mod=y2 yr2mod =1
u2 4
yr1mod
2
0
0 0
5 10 15 t [min] (a) top: controlled signal y1, bottom: new reference signal yr1mod
y2
0
2 -2
yr2mod =0
y1
yr1mod=y1
u1 4
yr2
1
-2
yr2mod
0
(b)
5 10 15 t [min] top: controlled signal y2, bottom: new reference signal yr2mod
Figure 7.35 Conditioning of the new, modified reference signal (y rimod for Figure 7.36) based on the controlled signal in the nondecoupled case (y i from Figure 7.34). y2
y1 1
yr1
1
y1 (λy1= λy2=1) y1 (λy1= λy2=100)
0
yr1mod
u2
u1
4
4
λy1= λy2=100
2
λy1= λy2=1
0 -2
0
λy1= λy2=1 0
(a)
2
yr2 y2 (λy1= λy2=100) y2 (λy1= λy2=1) yr2mod
λy1= λy2=100
λy1= λy2=1 λy1= λy2=1 λy1= λy2=100 -2 0 5 10 15 t [min] (b) top: y2, bottom: u2 0
λy1= λy2=100
5 10 15 t [min] top: y1, bottom: u1
Figure 7.36 TITO control with the modified reference signal equal to the controlled signal in the coupled case (dotted line, modified reference trajectory).
gorithms are F y r1 (k) D
0.0082 C 0.001055q 1 0.01332q 2 y r1 (k) , 1 2.667q 1 C 2.423q 2 0.7405q 3
F y r2 (k) D
2.308 106 C 0.05613q 1 0.05421q 2 y r2(k) . 1 2.617q 1 C 2.304q 2 0.6843q 3
The control behavior is seen in Figure 7.37. Practically there is no difference between the cases when the controlled signal from the nondecoupled case or the filtered one was applied as a modified reference trajectory. However, the second case can be applied much more easily because only some filter parameters and not a whole reference trajectory have to be stored.
7.8 Decoupling Control
y1 1
y2
yr1
1 y1 (λy1= λy2=1) y1 (λy1= λy2=100)
0
F yr1
y2 (λy1= λy2=1) 0
F yr2
u2
u1 4
4
λy1= λy2=100
2
λy1= λy2=1
0 -2
yr2 y2 (λy1= λy2=100)
λy1= λy2=1
0
(a)
λy1= λy2=100
5 10 15 t [min] top: y1, bottom: u1
λy1= λy2=100
2 λy1= λy2=1 λy1= λy2=1 λy1= λy2=100 -2 0 5 10 15 t [min] (b) top: y2, bottom: u2
0
Figure 7.37 TITO control with the optimally filtered reference signal (dashed line, modified reference trajectory).
7.8.4 Decoupling by Changing the Control Error Weighting Factors at Any Set Point Change
Maurath et al. [15] considered the predictive control of a TITO process for a set point change only in one controlled variable while the other set point is kept constant. The control aim is a relatively fast control in the case of a set point change while minimizing the control error of the other variable, that is, minimizing the coupling effect. They recommended increasing the weighting factor of the control error of the variable whose set point was not changed against that of the controlled variable whose set point was changed. The disadvantage of the method is that the time point of the weighting factor change has to be synchronized to the change in the reference signal, which requires a simple “signal change detector or observer.” Example 7.32 illustrates this case. Example 7.32 Predictive control of a TITO process with weighting factor increase at set point steps (continuation of Example 7.21) The same TITO process as in Example 7.16 was controlled by the same controller in the same control scenario. The weighting factors of both control errors were changed from λ y1 D λ y 2 D 1 to λ y1 D λ y 2 D 100 for that variable whose set point was not changed at the moment of the set point change of the other variable. The duration of the change was 5 min, which is longer (by about 2 min) than the settling time of the controlled process. Figure 7.38 shows that the two processes are completely decoupled. The critical point of this method is the detection of the set point change. In the case of predictive control, there are applications where the reference signal trajectories are given, so the changes in the reference signals are known in advance and stored. If the changes in the reference signals are not known a priori, there are sev-
315
316
7 Predictive Control of Multivariable Processes y1
y2
yr1
1
yr2
1
y2
y1 0
0
u1
u2
4
4
2
2
0
0
-2 100
100
y1
y2
60
60
40
40
20
20
0
0
5 10 15 t [min] (a) top: y1, middle: u1, bottom: weighting factor of the control error
0
0
(b)
5 10 15 t [min] top: y1, middle: u1, bottom: weighting factor of the control error
Figure 7.38 TITO control with weighting factor increase at set point steps.
eral methods for detecting signal changes. However, in Section 7.8.5 an alternative method will be recommended which does not require any signal change detector or observer. In Example 7.32 the weighting factor was increased manually and its value was kept constant at least for the duration of the settling time of the closed-loop controlled process. That means the weighting factor is decreased to its old value (before the set point change) abruptly. Bego et al. [1] applied a similar technique and decreased the weighting factor exponentially to its old value before the set point change. They showed the effect of the choice of the starting value and the time constant of the exponential decrease; however, the weighting factors were tuned on the basis of repeated simulations instead of some tuning rules. Figure 7.39 shows two alternative procedures: constant or decreasing weighting factor during the settling time after the set point change in the other controlled variable. The exponential decrease ensures a smoother change of the weighting factor and should, therefore, be preferred over an abrupt change. 7.8.5 Decoupling by Control-Error-Dependent Adaptation of the Control Error Weighting Factors
The synchronization at the set value change can be performed automatically if the weighting factors are decentralized functions of the control errors. With a stepwise change of the reference signal of a controlled variable the control error increases faster than the control error of the other variable, whose set point was kept constant.
7.8 Decoupling Control
λyi
constant
settling time
exponential decreasing
t
set point change in the other variable Figure 7.39 Weighting factor modification strategies.
Consequently, if the weighting factor is set inversely proportional to the control error for all controlled variables, then after a stepwise change of the reference signal the weighting factor of the output whose set point was not changed will be higher than the weighting factor of those outputs whose set point was changed [16]. A suitable form of the control error weighting suggested in Schmitz et al. [16] is λyi D
λ y i,m a x . 1 C je i (k)j λ y i,d a m p
(7.92)
This weighting factor is equal to λ y i D λ y i,m a x if the control error is zero (e.g., in the steady state) and decreases if the absolute value of the control error increases.
y1
y2
yr1
1
y1
1
yr2 y2
0
0
u1
u2
4
4
2
2
0
0
-2 20
-2 20
y1
y2
10
10
5
5
0 0 5 10 15 t [min] 5 10 15 t [min] (b) (a) top: y1, middle: u1, bottom: top: y1, middle: u1, bottom: weighting factor y1 of the control error weighting factor y2 of the control error 0
0
Figure 7.40 TITO control with error-dependent weighting factors.
317
318
7 Predictive Control of Multivariable Processes
Example 7.33 Predictive TITO control with error-dependent weighting factors (continuation of Example 7.21) The same TITO process as in Example 7.16 was controlled by the same controller in the same scenario. After some simulation trials, the following dependence of the control error weighting factors on the control error seemed to be optimal: λ y1,m a x D 10, λ y 2,m a x D 20, λ y1,d a m p D 100, and λ y 2,d a m p D 200. The control is slightly slower than with the manual adaptation of the control error weighting (Figure 7.38), but the control is still fast and the decoupling is very good (as before). The automatic adaptation of the control error weighting also shows a decrease of the other controlled signal, whose set value was kept constant, which is an indicator of the remaining coupling effects. But these effects are very small and thus the decrease of the control error weighting is also small. From Figure 7.40 one can see that the weighting factors of those controlled variables whose set values were changed stepwise were temporarily significantly reduced. It has to be mentioned that the change of the weighting factors λ y 1 and λ y 2 approximates an exponential course (similarly to Figure 7.39). (As previously mentioned, an exponential change of the weighting factors was preferred over a stepwise change.)
7.9 Case Study: Control of a Distillation Column 7.9.1 Distillation Column Model
The distillation column model is related to a real pilot plant tray distillation column installed in the Department of Process Control and Computer Techniques, University of Pardubice, Czech Republic [8] (Figure 7.41). In the experiments a methanol– water mixture is distilled. The column has seven bubble-cup trays, a partial reboiler, and a total condenser. Feed is led to the fourth tray as a saturated liquid. The binary mixture is ACB, where A is considered more volatile. For simplicity, relative volatility is used instead of tabulated data. The mixture density and molar weight are proportional to the concentration. Concentration is expressed in mole fraction. The parameters of the two components are as follows [8, 9]: 1. Component A (methanol): – relative volatility: α D 3, – density: A D 770 g/dm3 , – molar weight: M A D 32.04 g/mol, 2. Component B (water): – density: B D 990 g/dm3 , – molar weight: M B D 18.01 g/mol.
7.9 Case Study: Control of a Distillation Column
Figure 7.41 Distillation column pilot plant.
The volumetric liquid holdup V in the reboiler is 6 dm3 , on trays it is 0.7 dm3 , and in the condenser it is 1 dm3 . From these values molar liquid holdups M in the reboiler, on trays, and in the condenser are calculated from the following equation: MDV
B C x ( A B ) . M B C x (M A M B )
(7.93)
The following operating point was selected for the simulations: Feed – Feed composition: x F D 0.2 D 20 mol %; – Feed flow rate: F D 0.4 dm3 /min; Reflux – Reflux flow rate: L D 0.25 dm3 /min; Boilup – Reboiler heating input: Q w D 7500 W; – Vapor flow V D 0.15 mol/s; – Evaporation parameter (V [mol/s] D k Q w [W]): k D 2 105 (mol/s)/W. From the above data it is possible to calculate steady-state concentrations on all trays, in the reboiler, and in the condenser, and also the flow rates of the distillate and bottom product:
319
320
7 Predictive Control of Multivariable Processes
distillate flow rate: D D 0.095 dm3 /min, distillate composition: x D D 0.89 D 89 mol%, bottom product flow rate: B D 0.312 dm3 /min, bottom product composition: x B D 0.09 D 9 mol%.
The sum of the distillation and bottom product volume flows is not exactly equal to the feed flow; it is valid only for the mass flows. The Mathematical–physical model is set of nonlinear ordinary differential equations and algebraic equations. They have to be solved numerically. For control experiments, the following simplification is considered. Instead of the volumetric reflux flow rate and reboiler heating input directly, molar flow rates of reflux and boilup are used. The nonlinear model was numerically linearized and the model order was reduced at the working point. The relations between the deviations from the working point are as follows [8]:
2
8.771 6 1 C 2825 s ∆L(s) ∆ x D (s) D G P (s) D6 4 1.692 ∆ x B (s) ∆V(s) 1 C 3366 s
3 6.762 1 C 2922 s 7 7 ∆L(s) 1.988 5 ∆V(s) 1 C 2536 s (7.94)
and
3 1.743 6 1 C 3673 s 7 ∆ x D (s) 7 D G d i s t (s)∆ x F (s) D 6 4 0.8876 5 ∆ x F (s) . ∆ x B (s) 1 C 2273 s
2
(7.95)
The concentrations are measured in molar ratios and are between 0 and 1. All flows are in moles per second and the time is in seconds. Therefore, the dimension of the static gains of the process is 1/(mol/s). (These dimensions are omitted for simplicity in the sequel.) Figure 7.42 shows the step responses of the full (13th) order and of the simplified first-order linearizing models at the working points. No difference can be observed between the two models for small changes. The following control scenario was simulated by Honc [8] with different controller structures: t D 0 h: steady-state initial conditions, t D 2 h: stepwise increase of distillation reference signal x D,r from 89 to 91 mol%, t D 5 h: stepwise increase of bottom concentration reference signal x B,r from 9 to 11 mol%, t D 8 h: stepwise increase of feed concentration from 20 to 21 mol%.
7.9 Case Study: Control of a Distillation Column ∆xD 5
∆V: 0 → 1 mol/s (t=0 h)
0
∆L: 0 → 1 mol/s (t=0 h)
-5
∆xF: 0 → 1 (t=0 h)
∆xB 5 0
∆V: 0 → 1 mol/s (t=0 h)
∆L: 0 → 1 mol/s (t=0 h)
-5 0
2
full approx.
∆xF: 0 → 1 (t=0 h)
4 t [h]
0
2
4
t [h] 0
2
4
t [h]
Figure 7.42 Concentration step responses to reflux, boiling, and feed concentration changes of the distillation column model (solid line, linear full order; dotted line, linear reduced order).
7.9.2 Predictive TITO Control
A predictive TITO controller with reference signal prediction was simulated with sampling time ∆T D 5 min and with the following controller parameters:
start of control error horizons: n e11 D n e12 D 0, end of control error horizons: n e21 D n e22 D 11, length of manipulated variable horizons: n u1 D n u2 D 11, weighting factors of the control errors: λ y1 D λ y 2 D 1, weighting factors of the control increments: λ u1 D λ u2 D 5.
The controller parameters were tuned for fast and almost aperiodic transients, as seen in Figure 7.43 with control of the linearized model. 0.14 xB 0.12
0.94 xD 0.92 0.90
xD
xF.: 0.2 → 0.21
xD,r
xB,r xB
0.10
0.88 0.2 L [mol/s] 0.15
0.08 0.2 V [mol/s] 0.15
0.1
0.1
0.05 0
2
4
6
8
t [h]
0.05
0
Figure 7.43 TITO predictive control of the linearized model.
2
4
xF.: 0.2 → 0.21
6
8
t [h]
321
322
7 Predictive Control of Multivariable Processes 0.94 xD 0.92
0.14 xB 0.12
0.90
xD
xF.: 0.2 → 0.21
xD,r
0.88 0.2 L [mol/s] 0.15
xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0.1 0.05
xB,r
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.44 TITO predictive control of the linearized model with measurement noise without filtering. 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1
0.1 0
2
4
6
8
t [h]
xB
0.10
0.88 0.2 L [mol/s] 0.15
0.05
xB,r
0.05
xF.: 0.2 → 0.21
0
2
4
6
8
t [h]
Figure 7.45 TITO predictive control of the linearized model with measurement noise and filtering.
In practice, the measurements are corrupted by noise. Therefore, a white noise with unit distribution between 0.0013 and C0.0013 was added to both controlled outputs. Figure 7.44 shows the TITO control without filtering and Figure 7.45 shows the TITO control with two independent robustness filters T(q 1 ) D (1 0.8q 1 )2 . Figure 7.46 presents the linear TITO predictive control of the nonlinear model. Because of plant/model mismatch, fluctuations occurred and a robustness filter had to be used. In Figure 7.47 two independent robustness filters T(q 1 ) D (1 0.8q 1 ) were used and the oscillations were completely damped. With use of a second-order filter the control became smoother; however, the control of the disturbance at t D 8 h and the coupling effects at t D 2 h and t D 5 h were not compensated for as fast as with the first-order filter in Figure 7.47. As is seen in Figures 7.43–7.45, filtering does not effect or change the transients of the set point control for those variables whose set point was changed.
7.9 Case Study: Control of a Distillation Column 0.94 xD 0.92
0.14 xB 0.12
0.90
xD
xF.: 0.2 → 0.21
xD,r
0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05 0
2
4
6
8
t [h]
Figure 7.46 Linear TITO predictive control of the nonlinear model without filtering. 0.94 xD 0.92 0.90
0.14 xB 0.12 xD
xF.: 0.2 → 0.21
xD,r
0.88 0.2 L [mol/s] 0.15 0.1 0.05 0
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.47 Linear TITO predictive control of the nonlinear model using a first-order robustness filter.
7.9.3 Decoupling by Using Static Compensators
The static gain of the process at the working point is 8.771 6.762 Kp D . 1.692 1.988
(7.96)
7.9.3.1 Decoupling by Using a Precompensator The precompensator is calculated according to (7.77) with the parameters of (7.96) [10]: 0.3316 1.1279 K cp r e D . 0.2822 1.4629
Figure 7.49 shows the unit step responses of the steady-state decoupled process (static compensator and dynamic process). As is seen, the static gain of the main
323
324
7 Predictive Control of Multivariable Processes 0.94 xD 0.92
0.14 xB 0.12
0.90
xD
0.88 0.2 L [mol/s] 0.15
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1 0.05
xB
0.10
xF.: 0.2 → 0.21
xD,r
xB,r
0.1 0
2
4
6
8
t [h]
0.05 0
2
4
6
8
t [h]
Figure 7.48 Linear TITO predictive control of the nonlinear model using a second-order robustness filter. 1 ∆x D,c
pre
post
pre-post
0.5 ∆Vc : 0 → 1 mol/s (t=0 h) ∆Lc : 0 → 1 mol/s (t=0 h)
0
1 ∆xB,c 0.5
∆Lc : 0 → 1 mol/s (t=0 h) ∆Vc : 0 → 1 mol/s (t=0 h)
0 0
2
4
6
t [h]
0
2
4
6
t [h]
Figure 7.49 Unit step responses of the steady-state decoupled process model (solid line, precompensator; dotted line, postcompensator; dashed line, combined precompensator and postcompensator).
effects became 1 and those of the cross-effects is 0. The index “c” shows that compensator inputs ∆L c and ∆Vc were set instead of ∆L and ∆V and compensator outputs ∆ x D,c and ∆ x B,c were measured instead of ∆ x D and ∆ x B depending on the compensator type. Because of the static decoupling, two SISO decentralized predictive controllers were used according to the scheme in Figure 7.20 with the same parameters as with the TITO control in Section 7.9.2. The only, small difference is that now the form of the reference signal was not known in advance, which means the manipulated signal was not changed before the set point change. Figure 7.50 shows the control with the precompensator. The behavior is similar if a linearized or a nonlinear model is controlled.
7.9 Case Study: Control of a Distillation Column 0.94 xD 0.92
0.14 xB 0.12
0.90
xD
xF.: 0.2 → 0.21
xD,r
0.88 0.2 L [mol/s] 0.15
xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0.1 0.05
xB,r
0
2
4
6
8
t [h]
0.05 0
2
4
6
8
t [h]
Figure 7.50 Linear decentralized TITO predictive control using a static precompensator.
7.9.3.2 Decoupling by Using a Postcompensator The postcompensator is calculated again according to (7.77) with the parameters of (7.96) and the compensator parameters are the same as in the case of the precompensator. Figure 7.49 shows the unit step responses of the steady-state decoupled process (static compensator and dynamic process). The plots of the main effects (reflux flow on distillate concentration, vapor flow on bottom concentration) are similar to those with the precompensator and the other cross-effects are similarly small like with the precompensator. Because of the static decoupling, two SISO decentralized predictive controllers were used according to the scheme in Figure 7.23 with the same parameters as with the TITO control in Section 7.9.2. Figure 7.51 shows the control with the postcompensator. The behavior is similar if a linearized or a nonlinear model is controlled. The disturbances are a little larger than with the precompensator because of the cross-coupling. 0.94 xD 0.92
0.14 xB 0.12
0.90
xD
xF.: 0.2 → 0.21
xD,r
0.88 0.2 L [mol/s] 0.15
xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0.1 0.05
xB,r
0
2
4
6
8
t [h]
0.05 0
2
4
6
8
Figure 7.51 Linear decentralized TITO predictive control using a static postcompensator.
t [h]
325
326
7 Predictive Control of Multivariable Processes
7.9.3.3 Decoupling by Using a Combined Precompensator and Postcompensator The compensators are calculated according to (7.78) with the parameters of (7.96) [10]: 0.0691 1.1736 0.9743 0.2252 I K cp o s t D . K cp r e D 0.0545 1.4889 0.2252 0.9743
Figure 7.49 shows the unit step responses of the steady-state decoupled process (static compensator and dynamic process). The plots are partly similar to those with the precompensator and partly similar to those with the postcompensator. Because of the static decoupling, two SISO decentralized predictive controllers were used according to the scheme in Figure 7.26 with the same parameters as with the TITO control in Section 7.9.2. Figure 7.52 shows the control of the linearized model and Figure 7.53 shows the control of the nonlinear model with the combined precompensator and postcompensator. 0.94 xD 0.92
0.14 xB 0.12
xD
0.90
xF.: 0.2 → 0.21
xD,r 0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.52 Linear decentralized TITO predictive control of the linearized model using a static combined precompensator and postcompensator. 0.94 xD 0.92
0.14 xB 0.12
xD xD,r
0.90
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1
0.1 0
2
4
6
8
t [h]
xB,r
0.10
0.88 0.2 L [mol/s] 0.15
0.05
xB
0.05
xF.: 0.2 → 0.21
0
2
4
6
8
t [h]
Figure 7.53 Linear decentralized TITO predictive control of the nonlinear model using a static combined precompensator and postcompensator.
7.9 Case Study: Control of a Distillation Column 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.54 Linear decentralized TITO predictive control of the linearized model using a static combined precompensator and postcompensator and a first-order robustness filter. 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.55 Linear decentralized TITO predictive control of the nonlinear model using a static combined precompensator and postcompensator and a first-order robustness filter.
With the control of the linear model the decoupling is good but the feed concentration disturbance is compensated for with large transients. The control of the nonlinear model is not stable because of the mismatch between the process model and the model used for controller design. With use of the first-order and secondorder robustness filters T(q 1 ) D (1 0.8q 1 ) and T(q 1 ) D (1 0.8q 1 )2 , respectively, the control of the linear model can be stabilized and smoothed by using the first-order filter (see Figures 7.54 and 7.56) and the control of the nonlinear model only by using the second-order filter (see Figures 7.55 and 7.57).
327
328
7 Predictive Control of Multivariable Processes 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.56 Linear decentralized TITO predictive control of the linearized model using a static combined precompensator and postcompensator and a second-order robustness filter. 0.94 xD 0.92
0.14 xB 0.12
xD,r xD
0.90
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1
0.1 0
2
4
6
8
t [h]
xB
0.10
0.88 0.2 L [mol/s] 0.15
0.05
xB,r
0.05
xF.: 0.2 → 0.21
0
2
4
6
8
t [h]
Figure 7.57 Linear decentralized TITO predictive control of the nonlinear model using a static combined precompensator and postcompensator and a second-order robustness filter.
7.9.4 Decoupling by Control-Error-Dependent Adaptation of the Control Error Weighting Factors
The predictive TITO control from Section 7.9.2 was repeated with two small modifications: the reference signal was not known in advance, that is, manipulation started only after the set point step, and the control error weighting factor was doubled for the bottom concentration: λ y1 D 1; λ y 2 D 2. Figures 7.58 and 7.59 show the control of the linearized and the nonlinear column model, respectively. In the case of the nonlinear model, oscillation occurs because of plant/model mismatch. The transient control errors are larger than in Figures 7.43 and 7.46, respectively, as now the reference signal change was not known in advance.
7.9 Case Study: Control of a Distillation Column 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1
0.1 0
2
4
6
8
t [h]
xB
0.10
0.88 0.2 L [mol/s] 0.15
0.05
xB,r
0.05
xF.: 0.2 → 0.21
0
2
4
6
8
t [h]
Figure 7.58 Linear TITO predictive control of the linearized model without filtering using constant control error weighting factors. 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xB
0.10
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15 0.1 0.05
xB,r xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.59 Linear TITO predictive control of the nonlinear model without filtering using constant control error weighting factors.
It was shown in Section 7.8.4 that decoupling can be achieved by reducing the control error weighting factors of those signals whose set value was not changed [16]. This fact can be realized by an error-dependent control error weighting given by (7.92). Figures 7.60 and 7.61 present the control of the linearized and the nonlinear column model with the parameters λ y 1 ,m a x D 1, λ y 2 ,m a x D 2, λ y 1 ,d a m p D 200, and λ y 2 ,d a m p D 200. In the linear case, the disturbance due to the coupling was significantly reduced; compare Figures 7.60 and 7.58. With the control of the nonlinear model the oscillations were damped by the error-dependent control error weightings without using filtering.
329
330
7 Predictive Control of Multivariable Processes 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15
xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15
0.1 0.05
xB,r
0.1 0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.60 Linear TITO predictive control of the linearized model without filtering using errordependent control error weighting factors. 0.94 xD 0.92
0.14 xB 0.12
xD,r
0.90
xD
xF.: 0.2 → 0.21
0.88 0.2 L [mol/s] 0.15
xB
0.10
xF.: 0.2 → 0.21
0.08 0.2 V [mol/s] 0.15 0.1
0.1 0.05
xB,r
0
2
4
6
8
t [h]
0.05
0
2
4
6
8
t [h]
Figure 7.61 Linear TITO predictive control of the nonlinear model without filtering using errordependent control error weighting factors.
7.9.5 Summary of the Experiences
The distillation and bottom product concentration control of the model of a pilot plant column was presented. The reflux and the boilup were selected as manipulated variables as in this case the column is highly coupled, see, for example, Honc [8] and Luyben [14]. Different linear predictive controller structures were tested on a nonlinear and a linearized column model. Some experiences are listed here: Linear predictive control of the linearized model was stable and smooth. With plant/model mismatch the control could be stabilized and smoothed by a firstorder or second-order robustness filter.
7.10 Summary
Linear, decentralized predictive control using a static precompensator or postcompensator leads to a control result comparable to that obtained with a TITO predictive control, however with less computational demand and simpler tuning [9, 10]. With linear, decentralized predictive control using a static precompensator or postcompensator no oscillation occurred with plant/model mismatch, in contrast to the linear TITO predictive control. Only the combined precompensation and postcompensation was very sensitive to plant/model mismatch. The control could be stabilized and smoothed by using simple robustness filters. Error-dependent control error weighting reduced the disturbances due to the coupling effects and the control behaved robustly even in the case of plant/model mismatch.
7.10 Summary
Predictive control algorithms have been extended for MIMO systems. Matrix fraction and state space models of MIMO systems have been derived and their predictive equations were given. Predictive control algorithms for MIMO systems were discussed. Several decoupling methods were presented for TITO processes. The advantage of a decoupling compensator is that decentralized SISO controllers can be applied and can be tuned independently. The realization of a SISO controller is always much easier than that of a multivariable controller and the computation time is also less. On the other hand, a predictive controller decouples the MIMO process automatically although not completely because the control increments are penalized, and the tuning is simple. Static decoupling is a compromise between fast aperiodic control by a MIMO predictive controller and slower control with a simply tuned static compensator applying SISO predictive controllers. The application of a dynamic controller is usually not profitable and not necessary. Alternative decoupling methods were presented as well in addition to use of a compensator. By the first method, the current reference signal was substituted by a modified, decelerated reference signal to damp the disturbance caused in the other variable, whose set point was not changed. As an optimal modified reference signal, the controlled signal in the nondecoupled case was used. Instead of storage of the whole reference trajectory, a new method was recommended by identifying a reference signal filter and using it to filter the current reference signal. With the second method, the control error weighting factor of that variable whose set value was not changed is increased to suppress the decoupling effect. Instead of synchronization of this adoption to the set point change by using a signal detec-
331
332
7 Predictive Control of Multivariable Processes
tor, the weighting factor was set as a function of the control error. In this way an automatic adoption is possible. Several simulations demonstrated the proper functioning of the proposed methods. The procedures presented for TITO processes can be extended for MIMO systems of higher dimensionality. The control of a distillation column was presented as a case study showing also the effect of the different decoupling methods.
References 1 Bego, O., Peric, N., and Petrovic, I. (2000) Decoupling Multivariable GPC with Reference Observation, Proceedings of the 10th Mediterranean Electromechanical Conference, Vol. II, Lissabon, pp. 819–822. 2 Bristol, E.H. (1966) On a new measure of interaction for multivariable process control. IEEE Transactions on Automatic Control, 11(1), 133–134. 3 Camacho, E.F. and Bordons, C. (2004) Model Predictive Control, 2nd edn, Springer Verlag, London. 4 Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987) Generalized predictive control. Part I. The basic algorithm. Automatica, 23(2), 137–148. 5 Dion, J.M., Dugard, L., and Minh, T.N. (1991) Decoupling and Constraints Aspects of Multivariable GPC, Proceedings of the European Control Conference, Grenoble, France, pp. 1075–1080. 6 Edmunds, J.M. (1998) Input and Output Scaling and Reordering for Diagonal Dominance and Block Diagonal Dominance, Proceedings of the Control Theory and Applications, 145, 523–530. 7 Goodwin, G.C. and Sin, K.S. (1984) Adaptive Filtering, Prediction and Control, Prentice Hall, Upper Saddle River, New Jersey, USA. 8 Honc, D. (2004) Distillation – Modelling and Control, Research study, Laboratory of Process Automation, Institute Process Engineering and Plant Design, Cologne University of Applied Sciences, Germany, p. 34. 9 Honc, D. (2007) Predictive Two-input, Two-output Control with Different Static
10
11
12
13 14
15
16
Decoupling Schemes. Research study, Laboratory of Process Automation, Institute Process Engineering and Plant Design, Cologne University of Applied Sciences, Germany, p. 23. Honc, D., Arousi, F., and Haber, R. (2007) TITO Decentralized Predictive Control Using Static Decoupling Compensators, Proceedings of the International Carpathian Control Conference, Strebske Pleso, Slovak Republic. Honc, D. and Haber, R. (2005a) Multivariable Predictive Control for Matrix Fraction Models, Proceedings of the International Carpathian Control Conference, Miskolc, Hungary. Honc, D. and Haber, R. (2005b) Multivariable Predictive Control in State Space Without Observer, Proceedings of the Process Control Conference, Strebske Pleso, Slovak Republic. Kailath, T. (1980) Linear Systems, Prentice Hall, Englewood Cliffs, N.J, USA. Luyben, W.L. (ed.) (1992) Practical Distillation Control, Van Nostrand Reinhold, New York. Maurath, P.R., Seborg, D.E., and Mellichamp, D.A. (1986) Achieving Decoupling with Predictive Controllers, Proceedings of the American Control Conference, Seattle, pp. 1372–1377. Schmitz, U., Haber, R., Arousi, F., and Bars, R. (2007) Decoupling Predictive Control by Error Dependent Tuning of the Weighting Factors, Proceedings of the Process Control Conference, Strebske Pleso, Slovak Republic and AT & P Journal PLUS 2, HMH s.r.o., Bratislava, pp. 131–140.
7.10 Summary 17 Shah, S.L., Mohtadi, C., and Clarke, D.W. (1987) Multivariable adaptive control without a prior knowledge of the delay matrix. System and Control Letters, 9(4), 295–306. 18 Waller, M., Waller, J.B., and Walter, K.V. (2003) Decoupling revisited. Industrial
and Engineering Chemistry Research, 42, 4575–4577. 19 Wang, S. and Tan, J. (1997) Weighting factor normalization for multivariable predictive control, in ASAE (American Society of Agricultural Engineers) Annual International Meeting, Minneapolis, USA, Part 3, pp. 19.
333
335
8 Estimation of the Predictive Equations Predictive control algorithms require the prediction of the controlled signal several steps ahead. There are different ways to calculate the predicted values, such as: transformation of the process model equation to a predictive equation, for example, by solving a Diophantine equation iterative simulations several steps ahead by using the process model. With long-range optimal control the controlled output has to be predicted several steps ahead simultaneously; thus, a multistep prediction is required. If the process model is known exactly, then the prediction is bias free. There are, however, cases when the process model has to be estimated, either because of noisy measurements or because the exact process model is too complex and model order reduction is useful. An iterative simulation several steps ahead based on the estimated process model may lead to a biased predictive equation, reducing the quality of the performance of the predictive controller. The reason is that the traditional process identification results in one-step-ahead optimal prediction, which may be not optimal for more simultaneous prediction steps. There are two ways to estimate multistep optimal prediction equations: Long-Range Predictive Identification (LRPI): parameter estimation of a single model, which is optimal for the prediction in a long-range horizon, Multi-Step-ahead Predictive Identification (MSPI): estimation of predictive equations different steps ahead in the long-range horizon simultaneously. The problem is formulated and the estimation algorithms of the predictive equations are shown for linear Single-Input, Single-Output (SISO) processes. The problem is illustrated for a third-order process approximated by a first-order one. The principle can be extended to higher-order linear and nonlinear processes as well. Although only a Least-Squares (LS) parameter estimation algorithm is discussed in Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
336
8 Estimation of the Predictive Equations
the sequel, the principles can also be extended to different noise-filtering strategies. Simulations and a level control example illustrate the algorithms presented.
8.1 LS Parameter Estimation
Often the process model is estimated by a LS algorithm which results in one-stepahead prediction. On the basis of this equation the output signal predictive equation can be calculated by simulation, by repeated replacement, or by applying a prediction transformation, for example, by using the Diophantine equation. A linear process model can be described by the difference equation B q 1 y (k) D u(k d) D [A q 1 1]y (k) C B q 1 u(k d) , A (q 1 ) where polynomials B(q 1 ) and A(q 1) were defined in Section 2.2. The current control signal y (k) can be calculated assuming n D n a D n b by y (k) D a 1 y (k 1) a n y (k n) C b 1 u(k d 1) C C b n (k d n) , which can also be written as a scalar product y (k) D φ T (k)θ
(8.1)
with the memory vector of the measured values φ T (k) D [y (k 1), . . . , y (k n), u(k d 1), . . . , u(k d n)] and the parameter vector θ D [a 1 , . . . , a n , b 1 , . . . , b n ] T . From the measured data, the vector of N measured outputs y D [y (k C 1), y (k C 2), . . . , y (k C N )] T can be expressed by the vector/matrix product y D Φθ, with matrix Φ composed of the memory vectors at the different time instants 2 y (k) . . . y (k n C 1) 6 y (k C 1) . .. y (k n) 6 ΦD6 .. .. . .. 4 . . y (k C N 1) . . . y (k C N n) 3 u(k d) . . . u(k d n C 1) 7 u(k d C 1) ... u(k d n) 7 7. .. .. .. 5 . . . u(k C N d C 1) . . . u(k C N d n)
(8.2)
8.2 More-Steps-Ahead Prediction Based on the Estimated Process Model
The parameter vector θ can be estimated by LS algorithm (8.3): θO D [Φ T Φ]1 Φ T y .
(8.3)
Algorithm (8.3) is used in an off-line environment; thus, a set of data is collected first and then the parameter estimation is executed. The resulting model is fixed and cannot be adapted by this algorithm while control is running. An alternative way is to perform the LS algorithm in recursive form, which means a new model is calculated in each sampling step of the identification. The off-line LS algorithm needs a long computation time for matrix inversion, but the recursive form of this algorithm uses just some data stored and the current measured data to build a new model; thus, the computation time is reduced significantly. The parameter vector in the case of the recursive LS algorithm is calculated in two steps. First, a convergence matrix is computed by R(k) D R(k 1)
R(k 1)φ(k)φ T (k)R(k 1) λ i d e n t C φ T (k)R(k 1)φ(k)
and then the parameter vector is estimated according to (8.4): h i O O 1) C R(k)φ(k) y (k) φ T (k) θ(k O 1) . θ(k) D θ(k
(8.4)
O This algorithm needs a set of start values for R(0) and θ(0). They can be computed by a priori off-line identification from N0 data by 1 R(0) D Φ TN0 Φ N0 , Oθ(0) D Φ T Φ N 1 Φ T y , 0 N0 N0 N0 or just initiating by O θ(0) D0I
R(0) D I I
104 .
The parameter λ i d e n t is called a forgetting factor. If λ i d e n t < 1, then the old data are weighted less than the current data. The application of a forgetting factor λ i d e n t < 1 is useful if the model parameters are time varying or the controlled process is nonlinear and the working point is changing.
8.2 More-Steps-Ahead Prediction Based on the Estimated Process Model
The meaning of one-step-ahead prediction is shown in Figure 8.1. The model is identified in such a way that the process output is predicted optimally one step ahead. (In Figure 8.1 only some points are shown.)
337
338
8 Estimation of the Predictive Equations h 1
} } } }
0 k+d+1+ne1
one-stepahead model y(k+d+ne+1|k+d+ne)
k+d+1+ne2
Figure 8.1 One-step-ahead prediction.
Example 8.1 Long-range prediction of a third-order process based on a first-order model A third-order linear process with static gain K p D 1 and equal time constants T1 D T2 D T3 D 1/3 s without dead time was excited by a Pseudo-Random Threelevel Signal (PRTS) with levels 2, 0, and 2 and a period of 26 steps. The sampling time was ∆T D 0.5 s. The minimum switching time of the PRTS was 4 times the sampling time of the identification. The input and output signals are plotted in Figure 8.2. The model equation was estimated on the basis of the current output signal and the earlier input and output signals supposing a first-order model: yO (kjk 1) D 0.6790y (k 1) C 0.3462u(k 1) .
(8.5)
The one-step-ahead predictive equation is obtained by shifting (8.5) one step ahead: yO (k C 1jk) D 0.679y (k) C 0.3462u(k) .
(8.6)
The two-steps-ahead prediction can be obtained by shifting (8.6) one step ahead and by substituting y (k C 1jk) from (8.6): y(k O C 2jk) D 0.679 yO (k C 1jk) C 0.3462u(k C 1) D 0.679 0.679y (k) C 0.3462u(k) C 0.3462u(k C 1) D 0.461y (k) C 0.2351u(k) C 0.3462u(k C 1) .
(8.7)
The three-steps-ahead prediction can be obtained by shifting (8.7) one step ahead and by substituting y (k C 1jk) from (8.6): y(k O C 3jk) D 0.679 yO (k C 2jk) C 0.3462u(k C 2) D 0.679 0.461y (k) C 0.2351u(k) C 0.3462u(k C 1) C 0.3462u(k C 2) D 0.3137y (k) C 0.1596u(k) C 0.2351u(k C 1) C 0.3462u(k C 2) .
(8.8)
8.3 Long-Range Optimal Single Process Model Identification 2 1
y
0
u
-1 -2 0
10
20
30
40
50
t [s]
70
Figure 8.2 The input and output signals.
The two-steps-ahead and three-steps-ahead predictive equations can be estimated from the input/output data record if the predictive equations are shifted to ensure that all values are measurable. The estimated equations are as follows: y(kjk O 2) D 0.3303y (k 2) C 0.4880u(k 2) C 0.2003u(k 1) ,
(8.9)
y(kjk3) O D 0.1311y (k3)C0.2967u(k3)C0.3858u(k2)C0.1955u(k1) . (8.10) As is seen, the estimated two-steps-ahead and three-steps-ahead model equations are not equal to the predictive equations (8.7) and (8.8) calculated from the onestep-ahead estimated model. The predictive equation calculated on the basis of the estimated one-step-ahead optimal process model does not predict the output signal correctly if the process model is not exact, for example, because of model type, model order mismatch, or disturbances. This fact was illustrated by Example 8.1. (Of course, if the estimated model is exact, then the estimated model and the predictions based on the onestep-ahead estimated model are identical.)
8.3 Long-Range Optimal Single Process Model Identification
Shook et al. [4] introduced the LRPI method. LRPI tries to fit a one-step-ahead predicting model to the input/output data for the whole prediction horizon of defined length (Figure 8.3). The cost function of the long-range predictive horizon optimal parameter estimation is JD
n e2 N X X
2 y (k) yO (kjk d 1 n e ) ,
kD1 n e Dn e1
where the notation is as follows:
(8.11)
339
340
8 Estimation of the Predictive Equations h 1
Best fit over complete horizon one-stepahead model y(k+d+1+ne|k) 0 k+d+1+ne1
k+d+1+ne2
Figure 8.3 Idea of long-range optimal parameter estimation.
y (k): measured output signal, y(kjk O d 1 n e ): output signal predicted from d C 1 C n e steps earlier information, n e1 : start of the prediction horizon over the dead time, n e2 : end of the prediction horizon over the dead time, N: number of input/output measurement samples. The cost function (8.11) can be minimized numerically [4, 6]. Another way is to apply the LS parameter estimation based on prefiltered data in an iterative way [2, 4, 5]. In the following the prefilter is derived. It was shown in Section 3.2.2 that the output signal of a linear Controlled AutoRegressive Integrating Moving Average model (CARIMA) model T q 1 B q 1 (8.12) ∆ u(k d) C v u (k) y(k) O D A ∆ (q 1 ) A ∆ (q 1 ) can be predicted by using the Diophantine equation 1 F j q 1 j T q 1 C , j D d C 1 C ne , D Ej q q A ∆ (q 1 ) A ∆ (q 1 ) and y(k O C j jk) D
B q 1 E j q 1 F j q 1 ∆ u(k C j d) C y (k) . T (q 1 ) T (q 1 )
By using the rearranged form of (8.13), 1 A ∆ q 1 F j q 1 j j Ej q Dq q , T (q 1 ) T (q 1 ) the second term in (8.14) becomes E j q 1 A ∆ q 1 y (k C j ) y (k C j ) T (q 1 )
(8.13)
(8.14)
(8.15)
(8.16)
8.3 Long-Range Optimal Single Process Model Identification
and the predicted output (8.14) can be written as B q 1 E j q 1 ∆ u(k C j d) C y (k C j ) y(k O C j jk) D T (q 1 ) E j q 1 A ∆ q 1 y (k C j ) . T (q 1 ) The prediction error becomes y (k C j ) y(k O C j jk) 1 Ej q A ∆ q 1 B q 1 E j q 1 y (k C j ) ∆ u(k C j d) D T (q 1 ) T (q 1 ) # " E j q 1 A ∆ q 1 B q 1 D y (k C j ) u(k C j d) . T (q 1 ) A (q 1 ) As the parameter estimation can be performed from the current and the old values, the current model error and not the predicted error should be calculated (with replacing j by d C 1 C n e ): y (k) y(kjk O (d C 1 C n e )) # 1 " B q 1 A ∆ q 1 E dC1Cn e q y (k) u(k d) . D T (q 1 ) A (q 1 )
(8.17)
Equation (8.17) can be interpreted as the filtered equation error of the parameter estimation; y (k) y(kjk O (d C 1 C n e )) 1 E dC1Cn e q (1 q 1 ) 1 D A q y (k) B q 1 u(k d) . 1 T (q ) The iterative algorithm contains the following steps [4, 5]: 1. Let
L q 1 D 1 .
2. Filter the measured input and output data by L q 1 1 q 1 . T (q 1 ) 3. Estimate the parameters of the process model by the LS method. 4. Solve L q 1 L (q) D
dC1Cn X e2
E j q 1 E j (q) ,
j DdC1Cn e1
where E j is the solution of the Diophantine equation T(q 1 ) D E j (q 1 )A ∆ q 1 C q j F j q 1 , j D d C 1 C n e . 5. Go to step 2 until the estimated parameters converge.
341
342
8 Estimation of the Predictive Equations Test signal generator
u(k)
y(k) Process
1− q−1 T(q−1)
1− q−1 T(q−1)
L(q−1)
L(q−1) LS parameter estimation No
Unchanged?
No
Yes
Estimated parameters
Figure 8.4 The long-range optimal parameter estimation.
The basic idea of this algorithm is to estimate a model in an iterative way until it fits the given horizon best by modifying a set of polynomial filters for the measured data (Figure 8.4). The result of LRPI depends of course on the choice of polynomial T(q 1 ). Although the numerical minimization can be used both for linear and nonlinear models, the iterative prefilter method is suitable only for linear models. Instead of the quadratic cost function (8.11), another cost function of the prediction error can be minimized as well. Tse et al. [7] applied a minimax criterion and minimized the worst prediction error. Example 8.2 LRPI of a third-order process by a first-order equation A third-order linear process with static gain K p D 1 and equal time constants T1 D T2 D T3 D 1/3 s without dead time was excited by a PRTS with levels 2, 0, and 2 and a period of 26 steps. The sampling time was ∆T D 0.2 s. The minimum switching time of the PRTS was 4 times the sampling time of the identification. The input and output signals are plotted in Figure 8.5. Table 8.1 shows the estimated parameters of the first-order difference equations for prediction lengths n e2 of 0, 1, 4, and 9, respectively. In all cases the prediction 2
u
y
1 0
u
-1
y
-2 0
5
10
15
20
Figure 8.5 The input and output signals.
t [s]
8.3 Long-Range Optimal Single Process Model Identification Table 8.1 Estimated parameters of the first-order predictive equations. Prediction horizon length
b1
a1
1 2 5 10
0.0231 0.0771 0.1505 0.1710
0.9463 0.9472 0.9053 0.8608
1.2 h 1
Process
ne2=0 ne2=1 ne2=4 ne2=9
h
0.8
ne2=9
0.6
ne2=4
0.4
0.2
0
ne2=1
0.5
1
ne2=0 1.5
2
2.5
3
3.5
t [s]
Figure 8.6 Step responses of the third-order process and of the estimated first-order predictive equations.
horizon started at n e1 D 0. The step responses in Figure 8.6 illustrate well that the LRPI method minimizes the deviation between the measured and predicted output signals for a longer range. The step responses of the approximating models approximate the step response of the third-order process for the discrete-time length which is equal to the prediction length (n e2 n e1 C 1) considered during the parameter estimation (these parts of the step responses are drawn as a bold line).
Example 8.3 Generalized Predictive Control (GPC) of a third-order process based on a first-order model using long-range optimal single model identification The third-order process and the sampling time are as in Example 8.1. The controller parameters are n e1 D 0, n e2 D 4, n u D 1, λ u D 0.8, and λ y D 1. The control was based on a first-order estimated model. Figure 8.7 shows the controlled output and the manipulated variable of GPC for a reference signal step from 0 to 1 at
343
344
8 Estimation of the Predictive Equations
(a)
(b)
controlled variable
manipulated variable
Figure 8.7 GPC of a third-order process based on first-order model identification: one-stepahead optimal estimation (LS, dashed line) and long-range optimal estimation (LRPI, solid line).
t D 1 s and a stepwise disturbance of 1 at the process input at t D 16 s for both identification methods: one-step-ahead optimal model identification, long-range optimal single model identification.
The predictive control is quicker and the amplitude of the oscillation is less with the long-range optimal identification than with the one-step-ahead estimation.
8.4 Multi-Step-Ahead Predictive Equation Identification
An alternative way to achieve long-range prediction optimal single model identification is the estimation of the coefficients of all predictive equations in the prediction horizon separately (see, e.g., [3]). Figure 8.8 illustrates this idea.
h 1 Individual model for each point in the horizon: y(k+d+1+ne2|k) y(k+d+ne2|k) ... y(k+d+4+ne1|k) y(k+d+3+ne1|k) y(k+d+2+ne1|k) y(k+d+1+ne1|k) 0 k+d+1+ne1
k+d+1+ne2
Figure 8.8 Idea of the multi-step-ahead predictive equation identification.
8.4 Multi-Step-Ahead Predictive Equation Identification
For the case of a first-order model without dead time y(k) O D a 1 y (k 1) C b 1 u(k 1) the predictive equations – till the maximum prediction of five steps ahead – are as follows: y(k O C 1jk) D a 1 y (k) C b 1 u(k) , y(k O C 2jk) D a 21 y (k) a 1 b 1 u(k) C b 1 u(k C 1) , y(k O C 3jk) D a 31 y (k) C a 21 b 1 u(k) a 1 b 1 u(k C 1) C b 1 u(k C 2) , y(k O C 4jk) D a 41 y (k) a 31 b 1 u(k) C a 21 b 1 u(k C 1) a 1 b 1 u(k C 2) C b 1 u(k C 3) , y(k O C 5jk) D a 51 y (k) C a 41 b 1 u(k) a 31 b 1 u(k C 1) C a 21 b 1 u(k C 2) a 1 b 1 u(k C 3) C b 1 u(k C 4) . Introduce the parameters of the predictive equations θin e , where n e is the number of prediction steps and i is the serial number of the unknown parameters in the equation. As only the current and the older signals can be measured or stored, the current output signal (not the future output signals) has to be predicted from older measured values for the purpose of parameter estimation: (1)
(1)
(2)
(2)
(2)
(3)
(3)
(3)
(3)
(4)
(4)
(4)
(4)
(5)
(5)
(5)
y(kjk O 1) D θ1 y (k 1) C θ2 u(k 1) , y(kjk O 2) D θ1 y (k 2) C θ2 u(k 2) C θ3 u(k 1) , y(kjk O 3) D θ1 y (k 3) C θ2 u(k 3) C θ3 u(k 2) C θ4 u(k 1) , y(kjk O 4) D θ1 y (k 4) C θ2 u(k 4) C θ3 u(k 3) C θ4 u(k 2) (4)
C θ5 u(k 1) , (5)
y(kjk O 5) D θ1 y (k 5) C θ2 u(k 5) C θ3 u(k 4) C θ4 u(k 3) (5)
(5)
C θ5 u(k 2) C θ6 u(k 1) . All predictive equations are linear in the parameters, that is, the output signal can be written as a scalar product of a memory vector with measured values or their known (e.g., delayed) functions and a parameter vector of the unknown coefficients. In this case not the original model parameters a 1 and b 1 , but the coefficients of the predictive equation θin e are estimated. Therefore, the LS parameter estimation can be performed in one step. Of course, alternatively, other usual parameter estimation algorithms can be used as well. The parameters of all predictive equations can be estimated simultaneously. The parameter estimation algorithm can be simplified because of common components in several equations. For higher-order systems (n D n a D n b > 1), any predictive equation has n components of old output values and a different number of input components. This number increases proportionally with the prediction length.
345
346
8 Estimation of the Predictive Equations
(a)
controlled variable
(b)
manipulated variable
Figure 8.9 GPC of a third-order process based on first-order model identification: one-stepahead prediction (LS, dashed line) and multi-step-ahead prediction (MSPI, solid line).
Example 8.4 GPC of a third-order process based on a first-order model using MSPI The process and the sampling time are as in Example 8.1. The controller parameters are n e1 D 0, n e2 D 4, n u D 1, λ u D 0.8, and λ y D 1. The control was based on a first-order estimated model. Figure 8.9 shows the controlled output and the manipulated variable of GPC for a reference signal step from 0 to 1 at t D 1 s and a stepwise disturbance of 1 at the process input at t D 16 s for both identification methods: one-step-ahead optimal model identification, MSPI. The predictive control is quicker and the amplitude of the oscillation is less with the MSPI than with the one-step-ahead estimation.
8.5 Comparison of the Long-Range Optimal Identification Algorithms
In the previous sections the advantages of both long-range optimal identification algorithms (LRPI and MSPI) over the one-step-ahead optimal parameter estimation were shown. Now some comparisons between the two long-range optimal methods are presented based on Haber et al. [1]. Example 8.5 Step responses of the identified first-order predictive equations of a third-order process The same third-order linear process as in Example 8.1 was excited by a PRTS signal as shown in Figure 8.2. The sampling time was ∆T D 0.5 s. Figure 8.10 shows the results of the three methods for an approximating PT1 model for different prediction horizons and different minimum switching times of the test signal. The three identification methods are one-step-ahead optimal model identification, long-range optimal single model identification, multi-step-ahead predictive identification.
8.5 Comparison of the Long-Range Optimal Identification Algorithms h
h
1.2
LS
LRPI
1.2
MSPI
1
1 Process
0.8
Process
LRPI
0.8
LS model
LRPI model
MSPI
LS
0.6
0.6
0.4
0.4
0.2
0.2
Process
0
0.5
1
1.5
2
2.5
3
0
4 t [s]
3.5
(a) identification horizon 5 · 0.5 s = 2.5 s
MSPI 1
2
3
4
5
6
7
8
9 t [s]
(b) identification horizon 25 · 0.5 s = 12.5 s
h LRPI
1.2
LS
1 MSPI
LRPI
0.8
Process
LS 0.6 0.4
MS Process
0.2 0
1
2
3
4
5
6
7
8
9 t [s]
(c) identification horizon 25 · 0.5 s = 12.5 s Figure 8.10 Step response of one-step-ahead LS, LRPI, and MSPI with different identification horizons and different minimum switching times of the PRTS.
Figure 8.10a shows the estimation for the prediction horizon from one to five steps when the minimum switching time of PRTS was equal to the sampling time. Figure 8.10a shows that the prediction based on a first-order model approximated well a third-order process model and the MSPI worked the best. Figure 8.10b shows the estimation for the prediction horizon from one to 25 steps with the same minimum switching time of the PRTS as in Figure 8.10a. The big deviations with big prediction length (i.e., in steady-state) are caused by the too short minimum switching time of the test signal (PRTS) used for identification. A better fit can be achieved by doubling the minimum switching time, as seen in Figure 8.10c. Example 8.6 GPC of a third-order process based on a first-order model using longrange optimal single model identification and MSPI In Examples 8.3 and 8.4 predictive control was shown based on the one-step ahead LS and the corresponding long-range optimal LRPI and MSPI techniques, respectively. Figure 8.11 shows the control based on the two long-range optimal techniques in the same plot. The MSPI is a bit better than the long-range optimal single model identification, although the difference is marginal.
347
348
8 Estimation of the Predictive Equations
(a)
(b)
controlled variable
manipulated variable
Figure 8.11 GPC of a third-order process based on first-order model identification: long-range optimal estimation (LRPI, dashed line) and multi-step-ahead prediction (MSPI, solid line).
The MSPI method requires more computation than the LRPI method, as the parameters of several predictive equations have to be estimated simultaneously and the number of parameters increases with the prediction length. However, the predictive control behavior seems better when using MSPI instead of LRPI.
8.6 Case Study: Level Control in a Two-Tank Plant
In the Department of Automation and Applied Informatics of Budapest University of Technology and Economics, a level control rig has been built. The pilot plant consists of two tanks with free flow out (Figure 8.12). The upper tank is filled by a pump and the water stream is controlled by a valve. The water leaving the upper tank fills the lower tank. The system is nonlinear as the outflow from the tank depends on the level according to a root function. For small changes in the control signal, linear proportional models with two lags were identified. Their parameters are summarized in Table 8.2 for different levels in the lower tank. The process was identified by a PRTS at the working point of 27% with the signal amplitude ˙3%. The parameters of the second-order model were estimated by one-step ahead identification and long-range single model identification till n e2 D 9 prediction steps. u1
A1 h1 y1
A2 h2 y2
Figure 8.12 Level control in a pilot plant with two tanks.
8.6 Case Study: Level Control in a Two-Tank Plant Table 8.2 Linearized models of the two-tank pilot plant. Level [%]
Gain
T1 [s]
T2 [s]
30 40 50 60
0.886 1.024 1.144 1.254
415 480 536 587
298 344 385 421
0.4 y
dist.: 0→(–0.054)
yr y
0.2
0.2 y 0
50
100
0.4 y
150
200
250 t [s]
0
1 u
1 u
0.5
0.5
0
0
50
(a)
100
150
200
250 t [s]
based on a one-step-ahead optimal estimated model
y y
50
50
(b)
dist.: 0→(–0.054)
yr
100
150
200
250 t [s]
100
150
200
250 t [s]
based on a long-range optimal estimated model
Figure 8.13 GPC of the two-tank-system (working point of control, 27%; working point of identification, 27%).
The GPC algorithm was applied with sampling time ∆T D 1 s and with the controller parameters n e1 D 0, n e2 D 9, n u D 3, λ u D 0.5, and λ y D 1 at different working points. Figure 8.13 shows the control at the working point of 27% with a model identified at the working point of 27%. As is seen, the controller outputs are very similar, but the manipulated variable is smoother in the case of long-range identification. The advantage of long-range optimal identification over one-step-ahead identification can be observed better if the working points of parameter estimation and control differ from each other, as illustrated in Figure 8.14. The process was identified again by a PRTS at the working point of 5% with signal amplitude ˙0.5%. The parameters of the second-order model were estimated by one-step ahead identification and long-range single model identification till n e2 D 9 prediction steps. The controller parameters are the same as in working point of 27%. It is seen that in the case of plant/model mismatch the control works better with long-range identification than with one-step-ahead parameter estimation.
349
350
8 Estimation of the Predictive Equations y y 0.06
dist.: 0→(–0.006) y
0
50
100
0.02
150
200
250 t [s]
0
u
u 0.3
0.5
0.2
0
0.1
y y
50
100
150
200
250 t [s]
100
150
200
250 t [s]
0
-0.5 50
(a)
yr
yr
yr
0.04 y r 0.02 y
dist.: 0→(–0.006)
0.04
100
150
200
250 t [s]
based on a one-step-ahead optimal estimated model
50
(b)
based on a long-range optimal estimated model
Figure 8.14 GPC of the two-tank system (working point of control, 27%, working point of identification, 5%).
8.7 Summary
If the model used for predictive control does not fit perfectly the real process, the predictive equations cannot be calculated bias free from a one-step-ahead optimal estimated process model. Long-range optimal identification fits an equivalent process model, which leads to better predictive equations in the whole horizon length. An alternative method, estimating all predictive equations individually but simultaneously, was recommended and illustrated by several simulations and also by a level control simulation example. As expected and shown by several simulations, the long-range simultaneous MSPI resulted in somewhat better control behavior than the long-range predictive optimal single-model identification (LRPI).
References 1 Haber, R., Schmitz, U., and Bars, R. (2003) Long-Range Optimal Model and Multi-Step-Ahead Prediction Identification for Predictive Control, Proceedings of the 13th IFAC Symposium on System Identification, Vol. 1, Rotterdam, The Netherlands, pp. 472–482. 2 Mahfouf, M. and Linkens, A. (1994) Generalized predictive control (GPC) with long-range predictive identification (LRPI) for multivariable anaesthesia. International Journal Control, 60(5), 885– 903. 3 Rossiter, J.A. (2000) Identification of Models for Predictive Control, Proceedings of the IEE Seminar on Model Validation
for Plant Control and Condition Monitoring, London, UK, pp. 7/1–7/7. 4 Shook, D.S., Mohtadi, C., and Shah, S.L. (1991) Identification for long-range predictive control. IEE Proceedings-D, 138(1), 110–118. 5 Shook, D.S., Mohtadi, C., and Shah, S.L. (1992) A control relevant identification strategy for GPC. IEEE Transaction on Automatic Control, 37(7), 975–980. 6 Tse, J., Bentsman, J., and Miller, N. (1982) Properties of the Self-Tuning Minimax Predictive Control (MPC), Proceedings of the American Control Conference, Vol. 30, San Francisco, CA, USA, pp. 1721–1725.
8.7 Summary 7 Tse, J., Bentsman, J., and Miller, N. (1994) Minimax Long Range Parame-
ter Estimation, Proceedings of the 33rd IEEE Conference on Decision and Control, Vol 1, pp. 277–282.
351
353
9 Multimodel and Multicontroller Approaches Nonlinear processes are controlled on the basis of nonlinear process models. Usually both the process model and the controller are described by nonlinear differential equations. As identification and control algorithms are better elaborated for linear systems than for nonlinear systems, it is intended to use these methods with some extension for modeling and controller synthesis of nonlinear processes. Nonlinear models can be obtained by fusion or merging of several locally valid linear models, and also nonlinear controllers can be synthesized by merging several locally valid linear controllers. According to this assumption, three methods will be presented: 1. Multimodel approach: the process output is merged from the outputs of several locally valid linearized process models; 2. Multiparameter approach: the parameters of the continuous-time or discretetime process model are merged from the parameters of the corresponding locally valid linearized models; 3. Multicontroller approach: the manipulated variable is merged from the outputs of a set of locally valid linear controllers. With the first two methods, first a globally valid nonlinear model based on linearized models at different operating/working points is obtained and then a nonlinear controller is applied. In the third case, the output of the nonlinear controller is the weighted sum of the linear controllers used at different operating/working points. All approaches mentioned above are presented with a continuous actuator. First nonlinear process models, then the prediction technique, and finally the control algorithm based on these methods will be described. All methods are illustrated by predictive temperature control of a nonlinear heat exchanger model using a continuous actuator.
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
354
9 Multimodel and Multicontroller Approaches
9.1 Nonlinear Process Models
First fusion methods are presented for building nonlinear process models. These are called multimodel and multiparameter approaches. Then models with signaldependent and direction-dependent parameters are dealt with briefly, as these models have a quasi-linear form with an analytical form of parameter dependence and the controller designed has likewise an analytical form of parameter dependence. If the model parameters can be described by an analytical function of the operating point, then this form should be used. The multiparameter approach is an alternative procedure and can be applied if the model parameters are known at some operating points and (usually) a smooth transition between the operating points can be assumed. 9.1.1 Models with Signal-Dependent and Direction-Dependent Parameters
In some cases the globally valid nonlinear process model can be described by the same quasi-linear model at each operating operating point but with different parameters: Haber and Keviczky [11, 12] called these processes quasi-linear processes with signal-dependent parameters and approximated them with either continuoustime or discrete-time equations. In the literature these models are called Linear Parameter Varying (LPV) models (e.g., [2]). Equation (9.1) shows the structure of a first-order quasi-linear transfer function with signal-dependent gain K p (x) and time constant T1 (x). Here x is the signal, the value of which determines the values of the parameters, and f (.) represents an analytical function. In the case of direction dependence, the parameters depend on the algebraic sign sign(∆ x), where ∆ x is a change of signal x. 88 ˆ ˆ ˆˆ < K p D f K p (x) ˆ ˆ ˆ ˆ T1 D f T1 (x) ˆ ˆ ˆ ˆ ˆ ˆ : ˆ T ˆ d D f Td (x) < Kp Td s . (9.1) G(s) D e with or 8 ˆ 1 C s T1 ˆ ˆ ˆ ˆ ˆ ˆ < K p D f K p (sign(∆ x)) ˆ ˆ ˆ ˆ T D f T1 (sign(∆ x)) ˆ ˆ ˆ 1 ˆ :ˆ : T D f (sign(∆ x)) d Td
9.1 Nonlinear Process Models y1
u
u
Φ1
Σ
...
yM
u
y
ΦM
Figure 9.1 Multimodel approach.
Equation (9.2) shows the structure of a first-order quasi-linear pulse-transfer function with signal-dependent parameters a 1 (x), b 1 (x), and d(x). 88 ˆ ˆ ˆ ˆ < b 1 D f b 1 (x) ˆ ˆ ˆ ˆ a 1 D f a 1 (x) ˆ ˆ ˆ ˆ ˆ ˆ : ˆ ˆ < d D f d (x) b 1 q 1 d G q 1 D . (9.2) q with or ˆ8 1 C a 1 q 1 ˆ ˆ ˆ ˆ ˆ ˆ < b 1 D f b 1 (sign(∆ x)) ˆ ˆ ˆ ˆ a 1 D f a 1 (sign(∆ x)) ˆ ˆ ˆ ˆ :ˆ : d D f (sign(∆ x)) d
Here the signum function is defined as 8 ˆ ˆ <1 I if ∆ x > 0 sign(∆ x) D 0 I if ∆ x D 0 . ˆ ˆ :1 I if ∆ x < 0 9.1.2 Multimodels
One sophisticated method to obtain a nonlinear model is the so-called multimodel approach, where several usually linear models are used, each valid at a different operating point. The globally valid model output is computed by some fusion technique (see, e.g., [23]). Figure 9.1 demonstrates the multimodel approach. The globally valid model output is the sum of the weighted outputs of the locally valid linear models y(k) O D
M X
yO i (k) Φi (x (k)) ,
iD1
with the following notation:
(9.3)
355
356
9 Multimodel and Multicontroller Approaches B1(q-1) A1(q-1) u
B1(q-1) A1(q-1)
x
B2(q-1) A2(q-1)
B2(q-1) A2(q-1)
u
y
y
∑ x
BM(q-1) AM(q-1)
BM(q-1) AM(q-1)
(a)
(b)
hard switching
linear weighting
B1(q-1) A1(q-1) B2(q-1) A2(q-1)
u
∑
y
x -1
BM(q ) AM(q-1)
(c)
nonlinear weighting
Figure 9.2 Different weighting methods for the model outputs in the multimodel approach.
y: O yO i : Φi : M:
the globally valid output of the model, output of the locally valid ith linear model, weighting factor for the output of the locally valid ith linear model, number of locally valid linear models.
As is seen from (9.3), the weighting factors determine to what extent the individual models are considered in building the globally valid model output from the outputs of the locally valid models. The simplest technique to compute the weighting factors is a hard switch between the outputs of the locally valid linear models. A better method is to use a linear weighting between the operating points, and the most universal method is to apply a nonlinear weighting function (often realized by fuzzy logic). These three possibilities of the multimodel approach are shown in Figure 9.2. A generally used weighting function is the Gaussian validity function (9.4), which allows one to perform either soft or hard transitions between the operating points by a proper selection of a single parameter, the standard deviation:
Φi (x (k)) D
e PM
12
j D1
e
(x (k)x i )2 σ 2i
12
(x (k)x j )2 σ 2j
!
,
(9.4)
where x is the signal indicating the actual operating point, x i is the signal indicating the operating point for the locally valid ith linear model, and σ i is the standard deviation at the ith operating point.
9.1 Nonlinear Process Models
Φi
Φi 1
1 2
1
3
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
1 3
2
0
0 40
(a)
60
80
100
120
140
•
40
m [kg/h]
60
(b)
stand. deviation σ = 8
80
100
120
140
•
m [kg/h]
stand. deviation σ = 30
Φi 1 1
2
0.8 0.6 0.4 0.2 0 40
(c)
60
80
100
120
140
•
m [kg/h]
stand. deviation σ = 18
Figure 9.3 Validity functions around the operating points.
The tuning parameters of the nonlinear model are the standard deviations σ i of the validity function, which can be assumed constant at each operating point; thus, σ i D σ. The smaller the standard deviation, the harder the transition from one operating point to another one. The higher the standard deviation, the smoother the transition. Figure 9.3 shows this behavior for three different operating points, where the standard deviation is the same at each operating point. It is also shown in Figure 9.3a that too small a standard deviation leads to a nearly hard switch between the locally valid model outputs (one output is fully valid, whereas the other outputs are not valid around one operating point) and the range where two local models are simultaneously valid is rather small. On the other hand, higher standard deviation leads to very smooth behavior where the individual locally valid models are (more or less) valid at the corresponding operating points – across the whole area, all three models are valid to some extent (Figure 9.3b). With use of the standard deviations as shown in Figure 9.3c, the global output is built by two (never by three) neighboring locally valid models at each operating point except for the operating point where the locally valid model was set up. There are several approaches to identify models:
357
358
9 Multimodel and Multicontroller Approaches
Kp T1s+1
u(t) Φ1(x)
Kp,1
∑
...
y(t)
u(k) Φ1(x)
b1,1
Kp(x)
...
Kp,M
ΦM(x)
b1,M
ΦM(x)
T1,1
Φ1(x)
a1,1
Φ1(x)
∑
... T1,M
(a)
T1(x)
...
ΦM(x)
fusion of the continuous-time model parameters
a1,M
(b)
b1 q-1 1+a1q-1
∑
b1(x)
∑
a1(x)
y(k)
ΦM(x)
fusion of the discrete-time model parameters
Figure 9.4 Principle of the multiparameter approach.
independent model parameter estimation at different operating points and a hard switch between the models (e.g., [21]), independent model parameter estimation at different operating points and calculation of the globally valid model output as the weighted sum of the submodels (e.g., [15, 18, 23]), globally valid identification of all submodels including the weighting factors [9, 16, 17, 19, 25], fuzzy logic technique which is equivalent to other merging techniques [3, 8], online calculation of the weighting factors [10, 26], calculation of the weighting factors by a genetic algorithm [14].
9.1.3 Multiparameter Models
The multiparameter approach is based on the idea of the signal-dependent process model, where the process parameters depend on a signal, which is characteristic for the nonlinear behavior of the plant. However, the multimodel approach does not use an analytical parameter dependence. There are two methods for the multiparameter approach. Either the continuoustime parameters are computed and these parameters are transformed to the discrete-time process model, or the parameters of the discrete-time model are computed immediately by the merging technique. Figure 9.4 shows both options for a first-order model. The parameter gain K p (x) and time constant T1 (x) of the differential equation and the parameters a 1 (x) and b 1 (x) of the difference equation are shown depending on signal x.
9.3 The Control Algorithm
9.2 Predictive Equations
Any predictive control algorithm requires the prediction of the controlled output signal. The different control algorithms use different predicted signals. 1. Multicontroller approach: The multicontroller approach merges the output signals of the locally valid controllers. The nonlinear algorithm (fusion) does not use any prediction. 2. Multiparameter model approach: According to the multiparameter model approach, a locally valid linearized model is computed at the operating point. The prediction of the model output can be calculated as the prediction of linear models for slowly varying nonlinear processes. 3. Multimodel approach: According to the multimodel approach, the locally valid output signal is merged from the output signals of the locally valid (usually linearized) models at selected operating points. The prediction of the model output can be calculated. Alternatively, the prediction of the locally valid output signal is merged from the prediction of the output signals of the locally valid (usually linearized) models at selected operating points. It is assumed for the calculation of the predicted values of the controlled output signal that the signal whose value determines the parameters of the model is constant during the prediction horizon. This is fulfilled for slowly varying nonlinear processes, for example, for most processes in chemical, thermal, and mechanical process engineering.
9.3 The Control Algorithm
Predictive control has to use incremental models to eliminate steady-state errors. Therefore, the locally valid linear models are extended by an integrating term, as B q 1 B q 1 u(k) H) y (k) D ∆ u(k) , y (k) D A (q 1 ) A ∆ (q 1 ) with A ∆ (q 1 ) D ∆(q 1 )A(q 1) and ∆(q 1 ) D 1 q 1 . 9.3.1 Control Based on the Multimodel Approach
The multimodel approach is a fusion technique for the model outputs; however, the predictive control algorithm uses predicted model outputs. Consequently two versions of the control algorithm can be realized.
359
360
9 Multimodel and Multicontroller Approaches
The predictive control algorithm based on the multimodel approach for the model outputs consists of the following procedure at each control step: 1. For all the selected operating points the outputs of the locally valid linear models are computed. 2. The actual operating point is defined by the reference value, and by any measured or observable state and disturbance signal. 3. The weighting factors are calculated for the locally valid output signals. 4. The locally valid prediction of the output signal is calculated for the actual operating point by merging the locally valid predicted outputs. 5. The actual manipulated variable is computed on the basis of the past and current manipulated and output signals and the prediction of the output signal.
9.3.2 Control Based on the Multiparameter Model
The predictive control algorithm based on the multiparameter approach consists of the following procedure at each control step: 1. For all the selected operating points the (continuous-time or discrete-time) parameters of the locally valid linear models are computed. 2. The actual operating point is defined by the reference value, and by any measured or observable state and disturbance signal. 3. An equivalent linearized discrete-time model is calculated by the multiparameter model approach. (In the case of a continuous-time multiparameter approach, the model is discretized.) 4. The current manipulated variable is computed according to a linear predictive control algorithm based on the semilinear difference equation.
9.3.3 Multicontroller Approach
The next extension of the multimodel approach is the multicontroller approach. This means merging the outputs of a set of linear controllers by the known fusion techniques. The idea of hard switching between the locally valid controllers is not new. Some improvements were introduced to smooth the switching among the different operating points: Pickhardt [20] reduced the switching frequency between the different controllers by using hysteresis.
9.3 The Control Algorithm
Linear MPC 1
u1
Φ1(x)
yr
...
y
Linear MPCM
∑
uM
u
ΦM(x)
Figure 9.5 Principle of the multicontroller approach.
Pottmann et al. [21] reduced the switching frequency between the different controllers by filtering the controlled signal (characterizing the operating point) and by using hysteresis. The possibility to combine the manipulated signals of locally valid (linear) controllers – instead of hard switching among them – is a later idea, which was almost simultaneously recommended by some research groups: Chow et al. [5], Aouf et al. [1], and Dougherty and Cooper [6, 7] weighted linearly the controller outputs between two operating points. Brown et al. [4] and Schmitz [22] merged the outputs of linear controllers using a nonlinear function. The globally valid controller output is computed by u(k) D
M X
u i (k) Φi (k) ,
iD1
where u is the manipulated variable, u i is the output of the locally valid linear ith controller, Φi is a weighting factor for the locally valid linear ith controller, and M is the number of locally valid linear controllers. The Gaussian validity function was already given by (9.4). The structure of the multicontroller is shown in Figure 9.5. For optimal merging of the local controller outputs, the same procedure is applied as with the multimodel and multiparameter approaches: determination of the optimal number of operating points, decision if the standard deviations should be the same or different at each operating point, design of the locally valid linear controllers, and optimization of the standard deviation(s). The predictive control algorithm based on the multicontroller approach consists of the following procedure at each control step: 1. For each selected operating points the manipulated variables of the locally valid linear predictive controllers are computed.
361
362
9 Multimodel and Multicontroller Approaches
2. The current operating point is defined by the reference value, and by any measured or observable state and disturbance signal. 3. The current manipulated variable is calculated by merging the outputs of the locally valid linear controllers. The multicontroller approach can be applied for any linear (also for predictive) controller without significant changes in the code of the linear control algorithm. The additional real-time demand is running several linear controllers simultaneously and merging the outputs of the controllers. Therefore, this method is very practical.
9.4 Case Study 9.4.1 Experimental Modeling of an Electrically Heated Heat Exchanger
This case study contains the following items: 1. 2. 3. 4.
Description of the process; Quasi-linear model with signal-dependent parameters; Multimodel; Multiparameter model.
9.4.1.1 Description of the Process The heat exchanger is the feed heater of the distillation column in the Department of Automation and Applied Informatics, Budapest University of Technology and Economics. A photograph of it and the scheme for temperature control are shown in Figure 9.6, also described by Haber and Keviczky [13]. The temperature of the water outflow #(t) depends on the inflow m(t), P the inflow temperature #0 (t), and the electrical heating power P(t). Figure 9.7 shows the temperature step responses obtained by switching on and off the heating with different water flows. The heat balance equation is given by (9.5):
P m(t)c P p #0 C P(t) D m(t)c p #(t) C αV c p
d#(t) . dt
(9.5)
On the left side are the enthalpy intake by the cold water inflow into the heat exchanger and the heating power; on the right side are the enthalpy outtake by the warm water outflow and the enthalpy increase of the medium by convectional heat transfer. Equation (9.5) can be transformed to a first-order model using ∆#(k) D
9.4 Case Study
cold m(t) water ϑ0(t) water inflow
m(t) ϑ(t) water outflow
hot water
P(t) electrical heating
Set value controller
(a)
(b)
photo
control scheme
Figure 9.6 Electrically heated heat exchanger. 40 ϑ [°C]
20 2
P [kW] 0 -1
m [kg/h] 100 50 0
50
100
150
200
250
t [min]
350
Figure 9.7 Step responses of the heat exchanger.
#(k) #0 (k): Kp ∆#(s) D , P(s) 1 C s T1
(9.6)
with Kp D
1 cp m P
and
T1 D
αV . m P
(9.7)
The variables in (9.5) are as follows: m: P flow rate through the heat exchanger (the flow rates were 50 kg/h < m P < 170 kg/h);
363
364
9 Multimodel and Multicontroller Approaches
#: temperature of the water outflow (usual values are 15 ı C < # < 45 ı C); P: electrical heating power (usual values are 0 kW < P < 10 kW). Some of the parameters are physical constants of the medium or the apparatus, whereas others were estimated: V: cp: : α:
volume of the heat exchanger, V D 2.75 dm3 ; heat capacity of the water, assumed to be constant, c p D 4.18 kWs/kg ı C; density of the water, assumed to be constant, D 1.00 kg/dm3 ; correction term, which was estimated as α D 0.903.
9.4.1.2 Quasi-Linear Model with Signal-Dependent Parameters Figure 9.8 shows the nonlinear characteristics of the static gain and the time constant, both depending on the water flow through the heat exchanger. The input/output difference equation of the heat exchanger using a zero-order holding device and a sampling time of ∆T D 1 min becomes (9.8);
∆#(k) D a 1 ∆#(k 1) C b 1 P(k 1) .
(9.8)
The parameters of the equivalent pulse-transfer function are given by (9.9): ∆T ∆T and a 1 D e T1 . b 1 D K p 1 e T1 (9.9) Figure 9.9 shows the dependence of the parameters of the pulse-transfer function on the water flow through the heat exchanger. As is seen, this function is less nonlinear than the change of the parameters of the transfer function. Whereas with the electrically heated exchanger example the parameters K p and T1 are some analytical functions of a signal (the water flow), in the multiparameter approach presented the parameters are computed by a merging technique such as with the multimodel approach (see [24]).
(a)
static gain
(b)
time constant
Figure 9.8 Continuous-time parameters as functions of the water flow.
9.4 Case Study
(a)
discrete time parameter b1
(b)
discrete time parameter a1
Figure 9.9 Discrete-time parameters as functions of the water flow.
9.4.1.3 Multimodel The first task was to find the optimal number of operating points, thus the number of locally valid linear models. Good possibilities for the number of operating points, depending on the flow rate through the heat exchanger, are 3 (for the operating points m P D [50, 110, 170] kg/h), 5 (with m P D [50, 80, 110, 140, 170] kg/h), and 7 (with m P D [50, 70, 90, 110, 130, 150, 170] kg/h). A search for the best fitting locally valid linear models was not necessary because these models could be simply derived from the nonlinear process model of the heat P and the time constant T1 ( m) P for the exchanger by computing the static gain K p ( m) given operating points. The next parameter to be determined was the standard deviation of the Gaussian fusion function. There are two possible assumptions: all standard deviations are equal at the different operating points or different standard deviations exist at the operating points. Of course the multivariable optimization needs higher computational effort than the scalar optimization, but also offers a better result, thus a better fitting nonlinear model. For the optimization a standard cost function was used which computes the quadratic error between the measured data from the nonlinear (simulated) plant and the simulated output from the multimodel. Figure 9.10 shows the data used for the search for the optimal standard deviation with different flow rates and heating power, the latter altered according to a Pseudo-Random Three-level Signal (PRTS). All possibilities, thus with three, five, and seven operating points, with equal and different standard deviations at all operating points were simulated. As an example, Figure 9.11 shows the result for the case when the standard deviations were equal considering three operating points and Figure 9.12 shows the result for seven operating points with different standard deviations at each operating point. The weighting functions are shown in both figures in the upper-left corner with the optimal standard deviations for the marked operating points. In the lower-left corner the static model output #(t D 1) is merged on the basis of the model input (heating power) P and the flow rate m. P On the right side of the figures the multimodel is verified in the time domain. The measured and simulated temperatures are seen in the first plot at the top. The heating power (the same
365
366
9 Multimodel and Multicontroller Approaches 10 ϑ (t) [°C] 0
-10 0.5 P(t) [kW] 0
-0.5 200 m [kg/h] 100
0
2000
4000
t [min] 6000
Figure 9.10 Reference data for determining the optimal standard deviations of the multimodel. 1
σ3 = 24.74
10
σ1 = 24.74
ϑ
σ2 = 24.74
[°C] 0
•
Φ (m) -10 0.5
0.5 P [kW] 0
0
-0.5 50
•
110
m [kg/h]
170
ϑ [°C]
200 • m [kg/h] 100
15 0
10
0.5 e [°C]
5
Σe² =61.74
0
0 1 170
0.5 P [kW] 0
50
110 • m [kg/h]
-0.5
2000
4000
t [min]
6000
Figure 9.11 Result of determining the optimal standard deviation on the basis of three operating points.
9.4 Case Study
1
σ5 = 8.182
σ7 = 7.71
σ6 = 7.441
σ3 = 8.551
σ1 = 9.076
σ2 = 8.63
σ4 = 8.435
10
ϑ (t) [°C] 0
•
Φ(m) -10 0.5
0.5 P(t) [kW] 0
0
-0.5 50
70
90
110
130
• 150 m(t) [kg/h]
15 ϑ (t) [°C] 10
200 • m(t) [kg/h] 100
0 0.5 e(t)
5
Σe² =1.115
0 0 1 0.5 P(t) [kW]
170
-0.5
2000
4000
t [min] 6000
110 50 m(t) [l/h] •
0
Figure 9.12 Result of determining the different optimal standard deviations on the basis of seven operating points.
PRTS as before) is shown in the second plot. The third plot shows the flow rate with solid lines and the operating points with dashed lines, for which the locally valid linear models of the multimodel were computed. The fourth plot shows the error between the measured process and the simulated multimodel output. It can be observed that the error is significantly higher for those flow rates where the output of the multimodel is merged from some locally valid linear models and is nearly zero at those operating points where a locally valid linear model exists. This behavior is typical for multimodels. The multimodel with seven operating points and different standard deviations for each operating point reproduces the measured plant output much better than the model with just three operating points and the same standard deviations. The computational effort of the multimodel directly depends on the number of operating points because at each operating point a linear model has to be computed. Therefore, the computational effort of the model with seven operating points is nearly double that for the model with only three operating points. The computational effort for the simulation with a multimodel does not depend on whether the standard deviations for the individual operating points are the same or different. This behavior influences the computational effort only during the calculation of the optimal standard deviation(s).
367
368
9 Multimodel and Multicontroller Approaches
9.4.1.4 Multiparameter Model The locally valid discrete-time parameters are estimated from the locally valid process model for the chosen operating point. The current valid parameters are then computed using the merging technique. Similarly to the multimodel approach, the locally valid parameters of the linearized pulse-transfer function were derived by the multiparameter approach directly for the given operating points. Also as before, the standard deviation was chosen to be the same at each operating point to estimate the model with three operating points (see Figure 9.13) and different standard deviations were assumed to estimate the model with seven operating points (see Figure 9.14). Both figures show on the right side the weighting functions with the standard deviation at the P given operating point. The approximation of the model parameters, the gain K p ( m) P is shown on the left side for the multiparameter apand the time constant T1 ( m), proach (solid line). The analytically computed parameters are shown with a dashed line. Figure 9.15 shows the estimated parameters for a multiparameter model with three operating points with the same standard deviations and Figure 9.16 gives •
•
KP(m)
•
T1(m)
°C kW
Φ(m) σ = 25.71 3 1
°C kW
15
σ2 = 25.71
σ1 = 25.71
2.5
2
0.5
10
1 0
5 50
110
50
•
m [kg/h]
110
•
m [kg/h]
50
•
110
m [kg/h]
170
Figure 9.13 Result of determining the optimal standard deviation on the basis of three operating points with the same standard deviation for the multiparameter approach with fusion of K p and T1 parameters. •
•
KP(m)
T1(m)
°C kW
°C kW
15
•
Φ(m) σ7=6.765 σ5=8.515 σ3=9.513 σ1=10.8 1 σ6=7.416 σ4=8.974 σ2=9.091
2.5
2
0.5
10
1 0
5 50
110
•
m [kg/h]
50
110
•
m [kg/h]
50
70
90
110
130
•
150 m [kg/h]
Figure 9.14 Result of determining the optimal standard deviation on the basis of seven operating points with different standard deviations for the multiparameter approach with fusion of K p and T1 parameters.
9.4 Case Study •
•
•
KP(m)
T1(m)
°C kW
°C kW
15
Φ(m) σ3=25.71 1
σ2=25.71
σ2=25.71
2.5
2
0.5
10
1 0
5 50
110
50
•
m [kg/h]
110
•
m [kg/h]
50
•
110
m [kg/h]
170
Figure 9.15 Result of determining the optimal standard deviation on the basis of three operating points with the same standard deviation for the multiparameter approach with fusion of a 1 and b 1 parameters. •
-0.3
Φ(m) σ7=11.65 σ5=12.11 σ3=12.89 σ1=14.0 1 σ6=7.817 σ4=8.661 σ2=8.279
5.0 • b1(m)
•
a1(m) °C kW
°C kW
-0.5
0.5 4.0
3.5
-0.7
0 50
110
•
m [kg/h]
50
110
•
m [kg/h]
50
70
90
110
130
•
150 m [kg/h]
Figure 9.16 Result of determining the optimal standard deviation on the basis of seven operating points with different standard deviations for the multiparameter approach with fusion of a 1 and b 1 parameters.
the optimal standard deviations with seven operating points considering different standard deviations at each operating point. In both figures the weighting functions are shown on the right side and parameters a 1 and b 1 obtained from the analytical computation (dashed line) and from the multiparameter approach (solid line) are presented on the left side. Figure 9.17 compares the outputs of the continuous-time and discrete-time models with the measured process output and with the simulated process output from the estimated multimodel. The parameter estimation was performed in both cases from sampled data; however, in the first case the parameters of the estimated transfer functions and in the second case the parameters of the estimated pulse-transfer functions were used for the parameter fusion. As is seen, all three simulated outputs are almost identical. 9.4.1.5 Conclusion The modeling of an electrically heated heat exchanger by different methods was presented using a continuous actuator. As the temperature is a nonlinear function of the water flow, globally valid nonlinear process models were set up from several
369
370
9 Multimodel and Multicontroller Approaches a-b fusion T-K fusion Process
40 ϑ [°C]
LM fusion
30
20 P [kW] 1 0
m [kg/h] 100 50 0
150
300
t [min]
Figure 9.17 Comparison of the model outputs (LM, merging the model outputs; a–b, merging the parameters of the pulse-transfer functions; T–K, merging the parameters of the transfer functions). Plots from top, measured and estimated temperatures, heating power, water flow.
locally valid linearized models. It was seen that the multimodel and the multiparameter model approaches lead to similar good globally valid nonlinear models. The computational demand depends on the number of operating points and on the assumption of whether the Gaussian validity function has the same or different standard deviations in the operating points. The estimation based on fewer operating points using the same standard deviations resulted in a very good model output fit in this case. 9.4.2 Temperature Control of an Electrically Heated Heat Exchanger
The heat exchanger described in Section 9.4.1 was controlled. The temperature set point was increased stepwise from 20 to 21 ı C at t D 30 s and at t D 60 s a disturbance was set which corresponds to a reduction of the heating power by 0.25 kW. The controller sampling time was ∆T D 1 min. 9.4.2.1 Linear PID Control The plant was controlled at four different flow rates m P D [50, 90, 130, 170] kg/h, first with a linear Proportional plus Integral plus Derivative (PID) controller as a basis for the comparison (Figure 9.18). The PID controller was manually tuned to offer the best (the fastest control with the smallest overshoot) control behavior for the mean flow rate of m P D 110 kg/h. The parameters obtained were K c D 0.1 kW/ı C, TI D 1.0 min, and TD D 0.5 min and the ratio of the derivative time
9.4 Case Study
ϑ
[°C] 21
dist.: 0 → (–0.25 kW)
ϑ ϑr
•
•
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
5 P [kW]
•
m=170 kg/h •
m=130 kg/h • m=90 kg/h
2.5
•
m=50 kg/h
0
30
60
t [min]
90
Figure 9.18 PID control of the heat exchanger at four different operating points.
constant to the filter time constant was TD / TFF D 10. It can be seen that the control of the plant with the PID controller is nearly aperiodic for a flow rate of m P D 170 kg/h, but shows a significant overshoot and oscillating behavior for a flow rate of m P D 50 kg/h. 9.4.2.2 Linear Predictive Control Figure 9.19 shows the control of ing a linear model valid only at can be observed that the control the PID controller. But also with ϑ [°C] 21
the plant with a linear predictive controller usoperating point m P D 110 kg/h. In general, it is faster and the overshoots are less than with the linear predictive controller the control with dist.: 0 → (–0.25 kW)
ϑ ϑr
•
•
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
•
P [kW]
m=170 kg/h •
m=130 kg/h •
m=90 kg/h
2.5
•
m=50 kg/h
0
30
60
t [min]
90
Figure 9.19 Linear predictive temperature control of the heat exchanger at four different operating points.
371
372
9 Multimodel and Multicontroller Approaches
ϑ [°C] 21
dist.: 0 → (–0.25 kW)
ϑr
•
ϑ
•
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
•
P [kW]
m=170 kg/h
2.5
m=90 kg/h
•
m=130 kg/h •
•
m=50 kg/h
0 30
60
t [min]
90
Figure 9.20 Predictive control of the heat exchanger at four different operating points based on a multimodel merged from three different operating points with the same standard deviations.
a flow rate of m P D 170 kg/h is nearly aperiodic and the control with a flow rate of m P D 50 kg/h shows a big overshoot (but much less oscillating behavior than with the PID controller). The controller parameters were manually tuned and their values were n e1 D 0, n e2 D 9, n u D 3, λ u D 10, and λ y D 1. 9.4.2.3 Predictive Control Based on a Multimodel Figure 9.20 shows the predictive control based on the nonlinear multimodel considering three operating points ( m P D [50, 110, 170] kg/h) with the same standard deviations. The parameters of the predictive controllers using multimodels were manually tuned, but only once for all simulations; thus, the controller parameters were the same for each process model (with different numbers of operating points and standard deviations): n e1 D 0, n e2 D 19, n u D 3, λ u D 10, and λ y D 1. It is remarkable that the multimodels estimated from seven operating points assuming different standard deviations of the Gaussian validity functions fit the measured process output much better than the multiparameter model estimated from only three operating points and assuming the same standard deviation (see Figures 9.11 and 9.12), whereas the control with the two different models is nearly similar in both cases. Therefore, the simulation plot using seven operating points is not shown here. 9.4.2.4 Predictive Control Based on Multiparameter Models Predictive control with continuous-time and discrete-time multiparameter approaches based on three operating points with the same standard deviation at each operating point is shown in Figure 9.21. The controller parameters were the same as in the previous simulation of the linear predictive controller, except
9.4 Case Study ϑ [°C] 21
dist.: 0 → (–0.25 kW)
ϑr
•
ϑ
•
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
•
P [kW]
m=170 kg/h
2.5
m=90 kg/h
•
m=130 kg/h •
•
m=50 kg/h
0 30
(a) ϑ [°C] 21
t [min]
60
90
using a continuous-time multiparameter model dist.: 0 → (–0.25 kW)
ϑr
•
ϑ
•
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
5 P [kW]
•
m=170 kg/h •
m=130 kg/h •
m=90 kg/h
2.5
•
m=50 kg/h
0 30
(b)
60
t [min]
90
using a discrete-time multiparameter model
Figure 9.21 Predictive temperature control of the heat exchanger at four different operating points.
that the weighting of the manipulated variable increments was smaller to get fast, aperiodic control behavior (n e1 D 0, n e2 D 9, n u D 3, λ u D 1, and λ y D 1). Nearly the same control behavior was achieved for both cases with the continuoustime and discrete-time multiparameter models estimated considering seven operating points with different standard deviations; therefore, these plots are not shown.
373
374
9 Multimodel and Multicontroller Approaches
9.4.2.5 Predictive Multicontroller Approach Figure 9.22 shows the control with a multicontroller merging the outputs of three linear predictive controllers designed for the operating points m P D [50, 110, 170] kg/h) and applying the same standard deviation for each operating point. As is seen in the plots, the control behavior is nearly the same for the different flow values. The controller parameters were as follows (to obtain fast, aperiodic control behavior): n e1 D 0, n e2 D 9, n u D 3, λ u D 10, and λ y D 1. ϑ [°C] 21
dist.: 0
ϑr
•
ϑ
(–0.25 kW) •
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
m=50 kg/h • m=90 kg/h • m=130 kg/h • m=170 kg/h
20
•
m=170 kg/h
P [kW]
•
m=130 kg/h •
m=90 kg/h
2.5
•
m=50 kg/h
0 30
60
t [min]
90
Figure 9.22 Temperature control of the heat exchanger with the merged output of three linear predictive controllers at four different operating points.
As a comparison, a multicontroller merging the outputs of seven linear predictive controllers and application of different standard deviations at each operating point was simulated as well. The control behavior is nearly the same for different flows and for different numbers of operating points and standard deviations and these results fit well the plots of merging the outputs of only three linear predictive controllers with the same standard deviation of the Gaussian validity function (Figure 9.22); therefore, these plots are not shown here. 9.4.2.6 Conclusion Multimodel and multiparameter model approaches for nonlinear process models are used to apply the predictive control algorithm. The multicontroller procedure uses only linear predictive controllers and the outputs of different locally valid controllers are merged to create the real manipulated signal. All these methods work well and lead to very similar results.
9.4 Case Study
9.4.3 Temperature Control with Forced Heating and Free Convective Cooling
As an example of a direction-dependent process, a thermal process with free convective cooling and forced heating was chosen. The system can be described by linear first-order submodels with the same static gain K p D 1, but with different time constants. The time constants are different because free convectional cooling is much slower than forced heating. The time constant for the upward direction (heating up) is Tu p D 1 min and for the downward direction (cooling down) is Td o w n D 10 min. Figure 9.23 shows the open-loop step responses of this process for both cases. A direction-dependent process is a signal-dependent process if the signal determining the model parameters is the sign of the manipulated variable increment; thus, x (k) D sign(∆ u(k)). The number of operating points is limited to 2 because the sign function can take only the values C1 and 1 for the up or the down direction. The standard deviation was chosen to be the same for both operating points 10
Δϑ
[°C] 5
0 1.0 ΔP [kW] 0.5
0 0
25
t [min]
50
Figure 9.23 Open-loop step responses for the direction-dependent process with forced heating and free convectional cooling. 1 Φ
0 -1
0
x
+1
Figure 9.24 Weighting function for the direction-dependent process.
375
376
9 Multimodel and Multicontroller Approaches +2.5
dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
Δϑ
[°C]
Δϑr
0
dist.: 0→5 kW
-2.5
dist.: -5 kW→0
+10 P [kW] 0
-11 0
50
100
t [min]
Figure 9.25 PID control of the direction-dependent process. Table 9.1 Steps in the reference and disturbance signals used in the simulations. t [min]
∆#r [ı C]
Disturbance [kW]
t [min]
yr
Disturbance [kW]
0.0 0.1 10.0 20.0 30.0 40.0 50.0 60.0
0.0 C1.0 C2.0 C1.0 0.0 1.0 2.0 1.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
70.0 80.0 90.0 100.0 110.0 120.0 130.0 –
0.0 0.0 0.0 0.0 0.0 0.0 0.0 –
0.0 0.0 C5.0 5.0 5.0 C5.0 0.0 –
and further it was supposed to be very small to achieve a very hard transition. Therefore, the standard deviation was set to σ D 0.05. Figure 9.24 shows the weighting function for the direction-dependent process. The control was realized with a PID controller first and its behavior is shown in Figure 9.25. A set of reference steps was performed in the time domain 0 < t < 80 min and a set of disturbance steps was performed at the process input after t > 80 min. The exact steps are shown in Table 9.1. The control of the plant with the cautiously tuned PID controller shows very slow control to prevent big overshoots in the upward direction. The controller settings were K c D 0.25, TI D 2.5 min, and TD D 0.1 min and the ratio of the derivative time to the filter time constant was TD / TDF D 10. Figure 9.26 shows the control of the process with a linear predictive controller. The time constant of an equivalent linear model was assumed to be T1 D 5 min for this controller design, which means the time constant was the mean value of the time constants in the two directions (and the same static gain was used for the two directions). The control is aperiodic and relatively slow in the upward direction and
9.4 Case Study +2.5
Δϑ
dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
[°C]
Δϑr
0
dist.: -5 kW→0
dist.: 0→5 kW -2.5 +10 ΔP [kW] 0
-11 0
50
100
t [min]
Figure 9.26 Linear predictive control of the direction-dependent process. +2.5
dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
Δϑ
[°C]
Δϑr
0
dist.: 0→5 kW
-2.5
dist.: -5 kW→0
+10 P [kW] 0
-11 0
50
100
t [min]
Figure 9.27 Control of the direction-dependent process with a predictive controller using a nonlinear multimodel predictor.
fast with a big overshoot in the downward direction. The controller parameters in this and in all the following simulations are n e1 D 0, n e2 D 19, n u D 5, λ u D 0.1, and λ y D 1. Figure 9.27 shows the control of the direction-dependent process with a predictive controller using a multimodel predictor. As is seen, the control is aperiodic in both directions and it is slower downward than upward (which is caused by the different time constants of the model). Figures 9.28 and 9.29 show the linear predictive control using the continuoustime and the discrete-time multiparameter approach, respectively. Both control behaviors are similar to the behavior of the control with the predictive controller using
377
378
9 Multimodel and Multicontroller Approaches +2.5 dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
Δϑ
[°C]
Δϑr
0 dist.: -5 kW→0
dist.: 0→5 kW -2.5
+10 P [kW] 0
-11 0
50
100
t [min]
Figure 9.28 Control of the direction-dependent process with a linear predictive controller with the model adapted by the multiparameter approach for the continuous-time parameters K p and T1 . +2.5 Δϑ
dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
[°C]
Δϑr
0 dist.: 0→5 kW
dist.: -5 kW→0
-2.5 +10 P [kW]
0
-11 0
50
100
t [min]
Figure 9.29 Control of the direction-dependent process with a linear predictive controller with the model adapted by the multiparameter approach for the discrete-time parameters a 1 and b 1 .
the nonlinear multimodel, but with the multiparameter approach the manipulated variable is slightly smoother, which is typical behavior for the generalized predictive control (GPC) algorithm. Finally, Figure 9.30 shows the control with a multicontroller. It is observable that the multicontroller shows aperiodic behavior for both directions and also it is as good as the predictive controller using the multimodel approach.
9.5 Summary +2.5
Δϑ
dist.: dist.: 5 kW→0 0→-5 kW
Δϑ
[°C]
Δϑ r
0
dist.: -5 kW→0
dist.: 0→5 kW
-2.5 +10 P [kW] 0
-11 0
50
100
t [min]
Figure 9.30 Control of the direction-dependent process with a multicontroller.
9.5 Summary
Three different predictive control methods have been introduced for the control of nonlinear processes. Each of these controllers works well, but the implementation of the controllers is significantly different. The multimodel approach for the predictor of a predictive controller usually offers the best control behavior, but this algorithm requires high computational effort as iterative optimization is necessary. Also the implementation of the multimodel in the predictor is usually combined with great computational effort. The multiparameter approach demands the smallest computational effort, as a linear predictive controller based on a linearized model computed before the prediction can be used. The additional calculation is the building of the linearized model in each control sampling step. The implementation is much easier than usTable 9.2 Comparison of the predictive controllers used to control nonlinear processes.
Control behavior Computational effort Effort for implementation of the controller
Multimodel approach for the predictor
Multiparameter approach (continuous-time and discrete-time)
Multicontroller approach
Very good
Good
Good
High
Low
Medium
High
Medium
Low
379
380
9 Multimodel and Multicontroller Approaches
ing just a multimodel for the predictor; the predictor only has to handle models with varying parameters at each sampling step. The multicontroller approach requires high computational effort because many linear controllers have to run simultaneously. The advantage of this controller is the very low additional effort for the implementation for the nonlinear case compared with the linear case, as this technique uses the already available linear controllers and merges the outputs of these controllers. Table 9.2 shows an overview of the predictive control algorithms presented here for nonlinear processes. These techniques can be applied only for slowly varying processes. This is not a serious restriction because most plants in the process industry belong to this kind of system. As case studies, the temperature control of two heat exchangers was shown. In one case the model parameters depended on a signal (the water flow); in the other case they depended on the direction of the change of a signal (heating or cooling).
References 1 Aouf, N., Bates, D.G., Postlethwaite, I., and Boulet, B. (2002) Scheduling schemes for an integrated flight and propulsion control system. Control Engineering Practice, 10, 685–696. 2 Bamieh, B. and Giarrey, L. (2001) LPV Models: Identification for Gain Scheduling Control, Proceedings of the European Control Conference, Porto, Portugal, pp. 3092–3097. 3 Boukhris, A., Muorot, G., and Ragot, J. (1999) Non-linear dynamic identification: a multi-model approach. International Journal of Control, 72(7/8), 591– 604. 4 Brown, M., Flynn, D., and Irwin, G. (2000) Identification and Control of a Laboratory Microalternator Using Local Model Networks, Proceedings of the 35th Universities Power Engineering Conference, UPEC 2000, UK. 5 Chow, C.W., Kuznetsov, A.G., and Clarke, D.W. (1995) Using Multiple Models in Predictive Control, Proceedings of the 3rd European Control Conference, Rome, Italy, pp. 1732–1737. 6 Dougherty, D. and Cooper, D. (2003a) A practical multiple model adaptive strategy for multivariable model predictive control. Control Engineering Practice, 11, 649–664.
7 Dougherty, D. and Cooper, D. (2003b) A practical multiple model adaptive strategy for single-loop MPC. Control Engineering Practice, 11, 141–159. 8 Fischer, M., Nelles, O., and Isermann, R. (1998) Adaptive predictive control of a heat exchanger based on a fuzzy model. Control Engineering Practice, 6, 259–269. 9 Foss, B.A., Johansen, T.A., and Sorensen, A.V. (1995) Nonlinear predictive control using local models – applied to a batch fermentation process. Control Engineering Practice, 3(3), 389–396. 10 Gendron, S., Perrier, M., Barrette, J., Amjad, M., Holko, A., and Legault, N. (1993) SISO processes using model weighting adaptation. International Journal of Control, 58(5), 1105–1123. 11 Haber, R. and Keviczky, L. (1985) Identification of linear systems having signaldependent parameters. International Journal of Systems Science, 16(7), 869– 884. 12 Haber, R. and Keviczky, L. (1999a) Nonlinear System Identification – InputOutput Modeling Approach. Volume 1: Nonlinear System Parameter Identification, Kluwer Academic Publishers, Dordrecht, The Netherlands. 13 Haber, R. and Keviczky, L. (1999b) Nonlinear System Identification – InputOutput Modeling Approach. Volume 2:
9.5 Summary
14
15
16
17
18
19
20
Nonlinear System Structure Identification, Kluwer Academic Publishers, Dordrecht, The Netherlands. Hachino, T. and Takata, H. (1997) Identification of Nonlinear Systems by the Automatic Choosing Function and the Genetic Algorithm, Proceedings of the 11th IFAC Symposium on System Identification, Fukuoka, Japan, pp. 69–74. Johansen, T.A. and Foss, B.A. (1993) Constructing NARMAX models using ARMAX models. International Journal of Control, 58(5), 1125–1153. Johansen, T.A. and Foss, B.A. (1994) Identification of Non-Linear Systems Structure and Parameters Using Regime Decomposition, Proceedings of the 10th IFAC Symposium on System Identification, Vol. 1, Copenhagen, Denmark, pp. 131– 136. Johansen, T.A. and Foss, B.A. (1995) Empirical Modelling of a Heat Transfer Process Using Local Models and Interpolation, Proceedings of the American Control Conference, Seattle, Washington, pp. 3654–3658. Lakshmanan, N.M. and Arkun, Y. (1999) Estimation and model predictive control of non-linear batch processes using linear parameter varying models. International Journal of Control, 72(7/8), 659– 675. Nelles, O. (2001) Nonlinear System Identification: From Classical Approaches to Neural Networks and Fuzzy Models, SpringerVerlag, Berlin Heidelberg. Pickhardt, R. (1997) Adaptive Regelung auf der Basis eines Multi-Modells bei einer Transportregelstrecke für Schüttgüter (Adaptive control using
21
22
23
24
25
26
a multi-model approach applied to a transportation system for bulk goods). Automatisierungstechnik, 45(3), 113–120. Pottmann, M., Unbehauen, H., and Seborg, D.E. (1993) Application of a general multi-model approach for identification of highly nonlinear process – a case study. International Journal of Control, 57(1), 97–120. Schmitz, U. (2006) Nonlinear Predictive Control of Slowly Varying Dynamic Systems, Ph.D. dissertation, Department of Automation and Applied Informatics, Budapest University of Technology and Economics. Schmitz, U., Haber, R., and Bars, R. (2003) Nonlinear Process Identification and Predictive Control by the Weighted Sum of Multi-Model Outputs, Proceedings of the 2nd IFAC Conference on Control Systems Design, Bratislava, Slovak Republic. Schmitz, U., Haber, R., and Bars, R. (2004) Nonlinear Process Identification and Predictive Control by Multi-Parameter Models, Proceedings of the 6th IFAC Symposium on Nonlinear Control Systems, Stuttgart, Germany. Trierweiler, J.O. and Secchi, A.R. (2000) Exploring the Potentiality of Using Multiple Model Approach in Nonlinear Model Predictive Control, Preprint Nonlinear Model Predictive Control, Vol. 26 (eds F. Allgöwer and A. Zheng), Birkhäuser, Basel, pp. 192–203. Yuan, X.Y., Shi, S.J., and Ikeda, M. (1999) Modeling of nonlinear system by multiple linearized models. Journal of Shangahi Jiaotong University, E-4(2), 26–31.
381
383
10 GPC of Nonlinear SISO Processes The chapter is divided into three parts: model equations, predictive equations, predictive control algorithms. Only Single-Input, Single-Output (SISO) systems are considered, although most of the results can be extended to Multi-Input, Multi-Output (MIMO) processes as well. Furthermore, the unconstrained case is derived here; constraints can be handled with numerical algorithms (presented partly already for linear processes).
10.1 Nonlinear Process Models
Real processes generally contain nonlinearities. The nonlinearity can usually be described by nonlinear steady-state characteristics. The process dynamics can be modeled by linear dynamic models which usually differ at the different working points. Locally valid approximating models have to be updated at every working point. The globally valid nonlinear models are more complex than the linearized ones because they are described by (partly comprehensive) structures whose parameters are constant in the whole working domain. In the sequel nonlinear dynamic process models with constant parameters are presented. There are several criteria for classifying the nonlinear dynamic models, for example, nonparametric and parametric models, block-oriented models, models that are linear or nonlinear in the parameters. In the following only such processes are considered which can be described by a quadratic polynomial steady-state characteristic. A comprehensive review of nonlinear model structures is given by Haber and Keviczky [16, 17]. Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
384
10 GPC of Nonlinear SISO Processes
The polynomial description is an approximation of mild nonlinear static characteristics. The limitation of considering only the linear and quadratic terms is not essential; the algorithms presented can be extended for higher degree cases as well. Models whose process output can be expressed as a scalar product of a memory vector φ containing only measured signals and a vector of parameters θO as y(k) O D φ T (u(k d), u(k d 1), . . . , u(k d n), y (k 1), . . . , y (k n)) θO can be identified easily experimentally. These models are called linear-in-parameters models. Here k is the discrete time, d is the dead time related to the sampling time, u(k) and y (k) are the current input and output signals, respectively, φ is the memory vector of the measured values, and θO is the parameter vector to be estimated. 10.1.1 Nonparametric Process Models
If a model can be described by a finite number of parameters, it is called a parametric model, otherwise the model is nonparametric. Nonparametric models can be described by an infinite number of parameters. In practice, the memory m of the models is restricted to about 10 to 20. There are two nonlinear weighting function series: Hammerstein weighting function series: y (k) D g 0 C
m X
g 1i u(k d i) C
iD1
m X
g 2i u2 (k d i) ,
(10.1)
iD1
Volterra weighting function series: y (k) D g 0 C C
m X
g 1i u(k d i)
iD1 m X m X
g 2i j u(k d i)u(k d j ) .
(10.2)
iD1 j Di
As in practice the output of a real dynamic system cannot jump, it was supposed in (10.1) and (10.2) that g 10 D 0 and g 20 j D 0; j D 0, 1, . . . , m. In the equations g 0 is the constant term, and g 1i and g 2i j are the parameters of the linear and the quadratic terms, respectively. As is seen, the Hammerstein model does not include cross-product terms between the differently delayed input signal terms. The Hammerstein model can be obtained from the Volterra model with g 2i j D 0 I
i¤ j .
(10.3)
10.1 Nonlinear Process Models
g0 u(k)
m
∆
∑ g1iu(k–i)
∆
∑ g2iu2(k–i)
∑
i =1
u(k-1)
m
∑
i =1
∆ u(k-m)
m
m
∑ ∑ g2iiu(k–i)u(k–j)
i =1 j=i+1
∑
y(k)
Figure 10.1 Linear, Hammerstein, and Volterra weighting functions.
The remaining terms are denoted by g 2i g 2i j .
(10.4)
Figure 10.1 shows the linear, the Hammerstein, and the Volterra weighting function series or finite impulse response models without dead time (d D 0) in one scheme. If the memory is finite, the model is parametric. However, if a big memory is needed to describe a process, the model is considered nonparametric. Finite impulse response models are linear in the parameters. A sufficient modeling requires long memory (m > 10), which results in more than 60 parameters with the Volterra series and the parameter estimation is problematic, otherwise this model class is predictive itself. (A predictive form predicts the output signal on the basis of the past and the current output signal and on the basis of the past, the current, and the assumed future input signal.) It has to be emphasized that the nonparametric models can be applied only if the weighting function series is decreasing, and thus the truncation is acceptable. Therefore, nonparametric models can be applied only in the case of stable processes. 10.1.2 Cascade Process Models
The cascade models consist of serial connections of linear dynamic and static nonlinear elements. Three models are of interest: Simple Hammerstein model: A static nonlinear model x n l (k) D
n nl X iD0
c i u i (k)
385
386
10 GPC of Nonlinear SISO Processes
is followed by a linear dynamic term B q 1 x n l (k d) , y (k) D A (q 1 ) where n n l is the degree of the static polynomial. Simple Wiener model: A linear dynamic term B q 1 x n l (k) D u(k d) A (q 1 ) is followed by a static nonlinear model y (k) D
n nl X
c i x ni l (k) ,
iD0
Simple Wiener–Hammerstein model: Between two linear dynamic terms B1 q 1 u(k d1 ) x n l1 (k) D A 1 (q 1 ) and B2 q 1 x n l2 (k d2 ) , y (k) D A 2 (q 1 ) there is a static nonlinear model x n l2 (k) D
n nl X
c i x ni l1 (k) .
iD0
It can be seen that only the simple Hammerstein cascade model is linear in the parameters. Figure 10.2 shows all three simple cascade models. (Variables x n l1 (k) and x n l2(k) are the outputs (inputs) of the submodels and do not mean state variables. The constant term c 0 differs from the constant term used later in the linear-inparameters form (10.5).) 10.1.3 Quadratic Block-Oriented Process Models
Block-oriented models include linear dynamic models connected by summation and by multipliers. Quadratic block-oriented models include only one multiplier. Besides the cascade models, the following further simple structures can be defined [14]:
10.1 Nonlinear Process Models
(a)
Hammerstein model
(c)
(b)
Wiener model
Wiener–Hammerstein model
Figure 10.2 Three types of cascade models (NS, nonlinear static; LD, linear dynamic).
Generalized Hammerstein model: B1 q 1 B2 q 1 2 ? u(k d1 ) C u (k d2 ) . y (k) D c 0 C A 1 (q 1 ) A 2 (q 1 ) Generalized Wiener model: y (k) D c ?0 C
B1 q 1 u(k d1 ) C A 1 (q 1 )
Extended Wiener model: B1 q 1 u(k d1 ) y (k) D c ?0 C A 1 (q 1 ) ! B2 q 1 C u(k d ) 2 A 2 (q 1 )
!2 B2 q 1 u(k d ) . 2 A 2 (q 1 )
! B3 q 1 u(k d ) . 3 A 3 (q 1 )
Generalized Wiener–Hammerstein model: y (k) D
c ?0 C
B1 q 1 B3 q 1 u(k d1 ) C A 1 (q 1 ) A 3 (q 1 )
!2 B2 q 1 u(k d2 d3 ) . A 2 (q 1 )
Extended Wiener–Hammerstein model: B1 q 1 B4 q 1 ? u(k d1 ) C y (k) D c 0 C A 1 (q 1 ) A 4 (q 1 ) " ! !# 1 B2 q B3 q 1 u(k d2 d4 ) u(k d3 d4 ) . A 2 (q 1 ) A 3 (q 1 ) The upper index (? ) is used with the constant terms c ?0 to distinguish them from the constant term of the linear-in-parameter forms. It can be shown that only the generalized Hammerstein model is linear in the parameters if the denominator polynomials (i.e., the time constants) are equal in all the linear channels.
387
388
10 GPC of Nonlinear SISO Processes
10.1.4 Linear-in-Parameters Models Including Multiplicative Terms
A linear-in-parameters parametric quadratic nonlinear model is given in Haber and Keviczky [15] and Leontaritis and Billings [20] as 1 1 2 A 1 q 1 y (k) C A 2 (q 1 u(k d) 1 , q 2 )y (k) D c 0 C B 1 q 1 2 C B2 (q 1 1 , q 2 )u (k d) 1 C Q 2 (q 1 1 , q 2 )u(k d)y (k) .
(10.5) The polynomials of the backward shift operator q 1 mean n
b1 X B1 q 1 u(k) D b 1i u(k i) ,
(10.6)
iD1
B2 (q 1 1 ,
2 q 1 2 )u (k)
D
1 2 A 2 (q 1 1 , q 2 )y (k) D
n b2 n b2 X X
b 2i j u(k i)u(k j ) ,
(10.7)
a 2i j y (k i)y (k j ) ,
(10.8)
iD1 j Di n a2 n a2
XX
iD1 j Di n q2 n q2
1 Q 2 (q 1 1 , q 2 )u(k)y (k) D
XX
q 2i j u(k i)y (k j ) .
(10.9)
iD1 j D1
The orders of the one- and two-dimensional polynomials are as follows: deg B1 q 1 D n b 1 , deg A 1 q 1 D n a 1 , 1 deg B2 (q 1 1 , q 2 ) D n b2 , n b2 , 1 deg A 2 (q 1 1 , q 2 ) D n a2 , n a2 , 1 deg Q 2 (q 1 1 , q 2 ) D n q2 , n q2 . 1 1 1 In special cases the two-dimensional polynomials B2 (q 1 1 , q 2 ) or Q 2 (q 1 , q 2 ) have zero off-diagonal values (which means that the coefficients are zeros if the delays in the two dimensions are different). Then they can be replaced by onedimensional polynomials as 1 1 , (b 2i j ! b 2i ) , if b 2i j D 0, i ¤ j B2 (q 1 1 , q 2 ) ! B2 q
and 1 1 , (q 2i j ! q 2i ) , Q 2 (q 1 1 , q2 ) ! Q 2 q
if q 2i j D 0, i ¤ j .
The general quadratic linear-in-parameters model description includes the following special cases:
10.1 Nonlinear Process Models
1. Linear transfer function model: A 1 q 1 y (k) D c 0 C B1 q 1 u(k d) or y (k) D
n a1 X
a 1 j y (k j ) C c 0 C
j D1
n b1 X
b 1i u(k d i) .
iD1
2. Generalized Hammerstein model (e.g., Haber and Keviczky [14, 15]): A 1 q 1 y (k) D c 0 C B1 q 1 u(k d) C B2 q 1 u2 (k d) or y (k) D
n a1 X
a 1 j y (k j )C c 0 C
j D1
n b1 X
b 1i u(k d i)C
iD1
n b2 X
b 2i u2 (k d i) .
iD1
3. Parametric Volterra model [14, 15]: 1 2 A 1 q 1 y (k) D c 0 C B1 q 1 u(k d) C B2 (q 1 1 , q 2 )u (k d) or y (k) D
n a1 X
a 1 j y (k j ) C c 0 C
j D1
C
n b1 X
b 1i u(k d i)
iD1
n b2 n b2 X X
b 2i j u(k d i)u(k d j ) .
iD1 j Di
4. Simple bilinear model (e.g., [1]): A 1 q 1 y (k) D c 0 C B1 q 1 u(k d) C Q 2 q 1 u(k d)y (k) or y (k) D
n a1 X
a 1 j y (k j ) C c 0 C
j D1
C
n q2 X
n b1 X
b 1i u(k d i)
iD1
q 2i u(k d i)y (k i) .
iD1
5. General bilinear model (e.g., [1]): 1 A 1 q 1 y (k) D c 0 C B1 q 1 u(k d) C Q 2 (q 1 1 , q 2 )u(k d)y (k) or y (k) D
n a1 X
a 1 j y (k j ) C c 0 C
j D1
C
n q2 n q2 X X iD1 j D1
n b1 X
b 1i u(k d i)
iD1
q 2i j u(k d i)y (k j ) .
389
390
10 GPC of Nonlinear SISO Processes
6. Linear in input signal, nonlinear in output signal model [19]: 1 1 2 u(k d) A 1 q 1 y (k) C A 2 (q 1 1 , q 2 )y (k) D c 0 C B 1 q or y (k) D
n a1 X
a 1 j y (k j )
j D1
n a2 X n a2 X
a 2i j y (k i)y (k j ) C c 0 C
n b1 X
j D1 j Di
b 1i u(k d i) .
iD1
All model classes are special cases of the parametric recursive polynomial Nonlinear AutoRegressive Moving Average with eXogenous input (NARMAX) model [20]. There are two models which are frequently used as nonlinear models for process approximations. The generalized Hammerstein model is the simplest dynamic model; it is linear in the parameters and approximates a nonlinear steady-state characteristics. The parametric Volterra model contains cross-product terms between differently delayed input components; therefore, it approximates a general nonlinear dynamic process better than the generalized Hammerstein model at the cost of more parameters to be estimated in the unknown case. For a dynamic behavior with order n a D n b D 2, the generalized Hammerstein model can be modeled by six parameters and the parametric Volterra model by 12 parameters. Figure 10.3 shows a block diagram of the generalized Hammerstein model and the parametric Volterra model without dead time. The model is linear in the parameters because the different pulse-transfer functions (B2i (q 1 ))/(A(q 1)) have the same denominator polynomial. It has to be mentioned that parametric models are more advantageous than the nonparametric models because fewer parameters have to be determined. The relationship between the parametric and the nonparametric forms can be given. For example, the parameters of the linear and quadratic parts of the nonparametric Volterra model can be determined by polynomial division from the estimated parameters of the parametric Volterra model: b 11 q 1 C b 12 q 2 C C b 1,n b1 q n b1 A (q 1 ) D g 11 q 1 C g 12 q 2 C C g 1m q m , b 211 q 1 C b 222 q 2 C C b 2,n b2 n b2 q n b2 A (q 1 ) D g 211 q 1 C g 222 q 2 C C g 2,m,m q m , b 21 j q 1 C b 22 j q 2 C C b 2,(n b2 j ),n b2 q n b2 A (q 1 ) D g 21 j q 1 C g 22,( j C1) q 2 C C g 2,(m j ),m q m I
j D 2, 3, . . . , m j . (10.10)
10.1 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models Constant term
c0 B1 (q –1 ) A(q –1 )
u(k)
∏
B20 (q –1 ) A(q –1 )
∏
B21 (q –1 ) A(q –1 )
∏
B22 (q –1 ) A(q –1 )
∆ u(k-1)
∆ u(k-2)
∆
Linear model
∑
Generalized Hammerstein model
∑
∑
∑
∑
y(k) Parametric Volterra model
u(k-m)
Figure 10.3 The generalized Hammerstein and the parametric Volterra models.
As is seen, the quadratic terms are calculated along the main diagonals and off1 diagonals of B2 (q 1 1 , q 2 ).
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
In the sequel the predictive forms of the quadratic generalized Hammerstein and Volterra models are considered, as predictive control algorithms use the predictive forms of the model equations. An additive stochastic noise model will be assumed at the process output, the parameters of which do not influence the prediction of the noise-free model. This can be achieved by choosing the stochastic part of the additive noise model as T q 1 (10.11) v u (k) , T q 1 D 1 , A (q 1 ) where v u (k) is a white noise. Here polynomial A(q 1) is the autoregressive part of the parametric model. With finite impulse series models A(q 1) D 1, that is, the stochastic part of the additive term is white noise. The process model can be described in nonincremental or in incremental form. In the nonincremental form the predicted output signal depends on the past and present input and output signals and on the future (unknown) input signals till the prediction time point. In the incremental form the present and future input increments are used instead of the input signal itself. The advantage of the incremental form is that the control algorithm can be derived more easily, as the cost function contains the punishment of the control increments. Another advantage is that in this case the control algorithm will contain automatically an integrating effect.
391
392
10 GPC of Nonlinear SISO Processes
10.2.1 Predictive Equation Using the Input Signal
The predicted output signal is expressed as a function of the past and present input and output signals and of the future (unknown) input signals till the prediction time point. 10.2.1.1 Nonincremental Predictive Equation of the Quadratic Hammerstein Weighting Function Series The Hammerstein weighting function series model is
y (k) D g 0 C
m X
g 1i u(k d i) C
iD1
m X
g 2i u2 (k d i) .
(10.12)
iD1
The prediction n e steps ahead of the dead time d can be obtained by shifting the signals in the model equation: y(k O C d C 1 C n e jk) D g 0 C
m X
g 1i u(k C 1 C n e i)
iD1
C
m X
g 2i u2 (k C 1 C n e i) .
(10.13)
iD1
As is seen, the weighting function series model is predictive: it predicts the output signal n e C 1 steps ahead beyond the dead time. The same model structure and parameters describe the nonpredictive and the predictive equations. In the above form the terms depending on the past and future input effects can be separated. Example 10.1 Predictive transformation of a Hammerstein weighting function model Consider a quadratic Hammerstein weighting function model with memory m D 4 and dead time d D 1. The nonpredictive form is y (k) D g 0 C g 11 u(k 2)C C g 14 u(k 5)C g 21 u2 (k 2)C C g 24 u2 (k 5) . The prediction n e C 1 D 1 C 1 D 2 steps ahead beyond the dead time can be obtained by shifting the model equation three steps forward: y(k O C 3jk) D g 0 C g 11 u(k C 1) C C g 14 u(k 2) C g 21 u2 (k C 1) C C g 24 u2 (k 2) . The free response contains g 0 and the terms depending on u(k 1) and u(k 2). The other terms give the forced response.
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
10.2.1.2 Nonincremental Predictive Equation of the Quadratic Volterra Weighting Function Series The Volterra weighting function series model is
y (k) D g 0 C
m X
g 1i u(k d i) C
m X m X
g 2i j u(k d i)u(k d j ) .
iD1 j Di
iD1
(10.14) The prediction n e C 1 steps ahead of the dead time d can be obtained by shifting the signals in the model equation: y(k O C d C 1 C n e jk) D g 0 C C
m X
g 1i u(k C 1 C n e i)
iD1 m X m X
g 2i j u(k C 1 C n e i)u(k C 1 C n e j ) .
iD1 j Di
(10.15) The finite impulse response model is predictive. The terms depending on the past and future input effects can be immediately separated. Example 10.2 Predictive transformation of a Volterra weighting function series model Consider a quadratic Volterra weighting function series model with memory m D 4 and dead time d D 1. The output is given as follows: y (k) D g 0 C g 11 u(k 2) C C g 14 u(k 5) C g 211 u2 (k 2) C g 212 u(k 2)u(k 3) C g 213 u(k 2)u(k 4) C g 214 u(k 2)u(k 5) C g 222 u2 (k 3) C g 223 u(k 3)u(k 4) C g 224 u(k 3)u(k 5) C g 233 u2 (k 4) C g 234 u(k 4)u(k 5) C g 244 u2 (k 5) . The prediction n e C 1 D 1 C 1 D 2 steps ahead beyond the dead time can be obtained by shifting the model equation three steps forward: y(k O C 3jk) D g 0 C g 11 u(k C 1) C C g 14 u(k 2) C g 211 u2 (k C 1) C g 212 u(k C 1)u(k) C g 213 u(k C 1)u(k 1) C g 214 u(k C 1)u(k 2) C g 222 u2 (k) C g 223 u(k)u(k 1) C g 224 u(k)u(k 2) C g 233 u2 (k 1) C g 234 u(k 1)u(k 2) C g 244 u2 (k 2) . The free response contains g 0 and the terms depending only on the past terms u(k 1) and u(k 2). The other terms give the forced response.
393
394
10 GPC of Nonlinear SISO Processes
10.2.1.3 Nonincremental Predictive Equation of the Quadratic Parametric Generalized Hammerstein Model The nonpredictive model equation is A q 1 y (k) D c 0 C B1 q 1 u(k d) C B2 q 1 u2 (k d) .
(10.16)
This form is nonpredictive, as to calculate y (k C d) it still requires unavailable information on the output signal y between points k and (k C d). Shifting the nonpredictive model equation d C 1 C n e steps ahead results in A q 1 y (k C d C 1 C n e ) D c 0 C B1 q 1 u(k C 1 C n e ) (10.17) C B2 q 1 u2 (k C 1 C n e ) . In analogy to the case of linear models, use of the Diophantine equation (e.g., [5]) gives 1 D E j q 1 A q 1 C q j F j q 1 , j D d C 1 C n e , 1 D d C n e , deg F j q 1 D n a 1 . (10.18) deg E j q Multiplying the shifted model equation by E j (q 1 ) leads to E j q 1 A q 1 y (k C d C 1 C n e ) D E j q 1 c 0 C E j q 1 B1 q 1 u(k C 1 C n e ) C E j q 1 B2 q 1 u2 (k C 1 C n e ) .
(10.19)
Substituting E j (q 1 )A(q 1) from the Diophantine equation leads to a predictive equation, that is, the predicted output signal depends only on present and past output signals and on future, present, and past input signals: y(k O C d C 1 C n e jk) D F j q 1 y (k) C E j q 1 c 0 C E j q 1 B1 q 1 u(k C 1 C n e ) (10.20) C E j q 1 B2 q 1 u2 (k C 1 C n e ) . The predictive form of the generalized Hammerstein model has the form [8] (dC1Cn e ) y(k O C d C 1 C n e ) D c 0p C α (dC1Cn e ) q 1 y (k) (dC1Cn e ) 1 C β1 q u(k C 1 C n e ) (dC1Cn e ) 1 2 q u (k C 1 C n e ) , C β2 (10.21) where
α (dC1Cn e ) q 1 D F dC1Cn e q 1 I (dC1Cn e )
D E dC1Cn e (1)c 0 I q D E dC1Cn e B1 q 1 I β1 (dC1Cn e ) 1 β2 q D E dC1Cn e B2 q 1 . c 0p
(dC1Cn e )
1
(10.22)
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
The upper index (d C 1 C n e ) means that the parameters depend on the prediction length. Example 10.3 Predictive transformation of a generalized Hammerstein model Consider a quadratic second-order process (n a D n b D 2) with dead time d D 1. The nonpredictive form is y (k) D a 1 y (k 1) a 2 y (k 2) C c 0 C b 11 u(k 2) C b 12 u(k 3) C b 21 u2 (k 2) C b 22 u2 (k 3) or shifted one step ahead is y (k C 1) D a 1 y (k) a 2 y (k 1) C c 0 C b 11 u(k 1) C b 12 u(k 2) C b 21 u2 (k 1) C b 22 u2 (k 2) . Shifting the nonpredictive equation one time unit forward and replacing y (k C1) from the nonpredictive model equation above leads to y(k O C 2jk) D (1 a 1 )c 0 C (a 21 a 2 )y (k) C a 1 a 2 y (k 1) C b 11 u(k) C (b 12 a 1 b 11 )u(k 1) a 1 b 12 u(k 2) C b 21 u2 (k) C (b 22 a 1 b 21 )u2 (k 1) a 1 b 22 u2 (k 2) . Shifting the two-steps-ahead predictive equation one time unit forward and replacing y (k C 1) from the nonpredictive model equation above leads to y(k O C 3jk) D (1 a 1 )c 0 C (a 21 a 2 )y (k C 1) C a 1 a 2 y (k) C b 11 u(k C 1) C (b 12 a 1 b 11 )u(k) a 1 b 12 u(k 1) C b 21 u2 (k C 1) C (b 22 a 1 b 21 )u2 (k) a 1 b 22 u2 (k 1) D (1 a 1 C a 21 a 2 )c 0 C a 1 (2a 2 a 21 )y (k) C a 2 (a 2 a 21 )y (k 1) C b 11 u(k C 1) C (b 12 a 1 b 11 )u(k) C [b 11 (a 21 a 2 ) a 1 b 12 ]u(k 1) C b 12 (a 21 a 2 )u(k 2) C b 21 u2 (k C 1) C (b 22 a 1 b 21 )u2 (k) C [b 21 (a 21 a 2 ) a 1 b 22 ]u2 (k 1) C b 22 (a 21 a 2 )u2 (k 2) . The parameters of the predictive form can be obtained also by using the Diaphontaine equation (10.18) with deg[E3 (q 1 )] D d C n e D 1 C 1 D 2 and deg[F3 (q 1 )] D n a 1 D 2 1 D 1 as well: e 3,0 D 1 I
e 3,1 D a 1 I
f 3,0 D 2a 1 a 3 I
e 3,2 D a 21 a 2 I
f 3,1 D a 2 (a 2 a 21 ) I
c 0p D c 0 (1 a 1 C a 21 a 2 ) I β 11 D b 11 I
α 0 D a 1 (2a 2 a 21 ) I
β 12 D (b 12 a 1 b 11 ) I
β 14 D b 12 (a 21 a 2 ) I
β 21 D b 21 I
β 23 D b 21 (a 21 a 2 ) a 1 b 22 I
α 1 D a 2 (a 2 a 21 ) I
β 13 D b 11 (a 21 a 2 ) a 1 b 12 I β 22 D (b 22 a 1 b 21 ) I
β 24 D b 22 (a 21 a 2 ) .
395
396
10 GPC of Nonlinear SISO Processes
10.2.1.4 Nonincremental Predictive Equation of the Quadratic Parametric Volterra Model The nonpredictive model equation is 1 2 A q 1 y (k) D c 0 C B1 q 1 u(k d) C B2 (q 1 1 , q 2 )u (k d) .
(10.23)
Shifting the nonpredictive model equation d C n e C 1 steps ahead results in A q 1 y (k C d C 1 C n e ) D c 0 C B1 q 1 u(k C 1 C n e ) 1 2 C B2 (q 1 1 , q 2 )u (k C 1 C n e ) .
(10.24)
In analogy to the case of the generalized Hammerstein model, using the same Diophantine equation (10.18), the predictive form of the parametric Volterra model becomes [8] (dC1Cn e ) y(k O C d C 1 C n e ) D c 0p C α (dC1Cn e ) q 1 y (k) (dC1Cn e ) 1 C β1 q u(k C 1 C n e ) (dC1Cn e )
C β2
1 2 (q 1 1 , q 2 )u (k C 1 C n e ) ,
(10.25)
where (dC1Cn e ) α (dC1Cn e ) q 1 D F dC1Cn e q 1 I c 0p D E dC1Cn e (1)c 0 I 1 (dC1Cn e ) 1 q D E dC1Cn e B1 q I β1 (dC1Cn e )
β2
1 1 1 (q 1 1 , q 2 ) D E dC1Cn e B 2 (q 1 , q 2 ) .
(10.26) Example 10.4 Predictive transformation of a parametric Volterra model Consider a quadratic second-order process with dead time d D 1. The nonpredictive form is y (k) D a 1 y (k 1) a 2 y (k 2) C c 0 C b 11 u(k 2) C b 12 u(k 3) C b 211 u2 (k 2) C b 212 u(k 2)u(k 3) C b 222 u2 (k 3) or shifted one step ahead is y (k C 1) D a 1 y (k) a 2 y (k 1) C c 0 C b 11 u(k 1) C b 12 u(k 2) C b 211 u2 (k 1) C b 212 u(k 1)u(k 2) C b 222 u2 (k 2) . Shifting the nonpredictive equation one time unit forward and replacing y (k C1) from the nonpredictive model equation above leads to y(k O C 2jk) D (1 a 1 )c 0 C (a 21 a 2 )y (k) C a 1 a 2 y (k 1) C b 11 u(k) C (b 12 a 1 b 11 )u(k 1) a 1 b 12 u(k 2) C b 211 u2 (k) C b 212 u(k)u(k 1) C (b 222 a 1 b 211 )u2 (k 1) a 1 b 212 u(k 1)u(k 2) a 1 b 222 u2 (k 2)
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
and a further shift results in y(k O C 3jk) D (1 a 1 )c 0 C (a 21 a 2 )y (k C 1) C a 1 a 2 y (k) C b 11 u(k C 1) C (b 12 a 1 b 11 )u(k) a 1 b 12 u(k 1) C b 211 u2 (k C 1) C b 212 u(k C 1)u(k) C (b 222 a 1 b 211 )u2 (k) a 1 b 212 u(k)u(k 1) a 1 b 222 u2 (k 1) D (1 a 1 C a 21 a 2 )c 0 C a 1 (2a 2 a 21 )y (k) C a 2 (a 2 a 21 )y (k 1) C b 11 u(k C 1) C (b 12 a 1 b 11 )u(k) C [b 11 (a 21 a 2 ) a 1 b 12 ]u(k 1) C b 12 (a 21 a 2 )u(k 2) C b 211 u2 (k C 1) C b 212 u(k C 1)u(k) C (b 222 a 1 b 211 )u2 (k) a 1 b 212 u(k)u(k 1) C [b 211 (a 21 a 2 ) a 1 b 222 ]u2 (k 1) C b 212 (a 21 a 2 )u(k 1)u(k 2) C b 222 (a 21 a 2 )u2 (k 2) . The transformation equations are the same for the output, constant, and linear terms as with the Hammerstein model in Example 10.3. The quadratic terms can be transformed by β 211 D b 211 I
β 222 D (b 222 a 1 b 211 ) I
β 244 D
a2) I
β 234 D
b 222 (a 21 b 212 (a 21
β 212 D b 212 I
β 233 D b 211 (a 21 a 2 ) a 1 b 222 I β 223 D a 1 b 212 I
a2) .
10.2.2 Predictive Equation Using the Input Increments
The incremental form of the predictive model means that the predicted output depends on the current and future input increments, ∆ u(k C i) ,
i D 0, 1, . . . , n e ,
(10.27)
instead of the current and future input signals, u(k C i) ,
i D 0, 1, . . . , n e .
(10.28)
The current and the future control signals are expressed with the current and future control increments and u(k 1) as follows: u(k C i) D u(k 1) C
i X
∆ u(k C j ) ,
i D 0, 1, . . . , n e .
(10.29)
j D0
Let us define ∆ u (k) as ( u(k) u(k 1) ∆u (k) D u(k)
if
k 0
if
k <0
.
(10.30)
397
398
10 GPC of Nonlinear SISO Processes
In the sequel the incremental predictive forms of the quadratic nonparametric and parametric generalized Hammerstein and Volterra models are derived. It will be shown that the quadratic terms can be interpreted from a control point of view as follows: Past input multiplied by past input: This term can be considered as a constant term when planning the current and future manipulated variables. Past input multiplied by current or future input: The past input can be interpreted as a known coefficient and thus the term is considered linear in planning the current and future manipulated variables. Actual or future input multiplied by current or future input: This term is quadratic, as both signals are unknown during planning the manipulated signal. Consequently, the predicted output can be separated into constant, linear, and quadratic terms of the (unknown) current and future input signals. 10.2.2.1 Incremental Predictive Equation of the Hammerstein Weighting Function Series The predictive equation of the quadratic Hammerstein weighting function series was given by (10.12):
y(k O C d C 1 C n e jk) D g 0 C
m X
g 1i u(k C 1 C n e i)
iD1
C
m X
g 2i u2 (k C 1 C n e i) .
iD1
Substituting the input signals by their incremental values results in [7] (dC1Cn e )
y(k O C d C 1 C n e jk) D c 0p
(dC1Cn e )
C γ2
(dC1Cn e )
C γ1
q 1 ∆ u (k C 1 C n e )
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e ) ,
(10.31) where (dC1Cn e )
D g0 I
(dC1Cn e )
D
c 0p
X
min(i,m)
γ1i
g 1ν ,
i D 1, . . . , n e C 2 I
g 2ν ,
i D 1, . . . , n e C 2 I
νD1
X
min(i,m) (dC1Cn e )
γ2i i
D
νD1
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
X
min(i,m) (dC1Cn e )
γ2i j
D2
i D 1, . . . , n e C 2 ,
g 2ν ,
νD1
j D i C 1, i C 2, . . . , n e C 2 I (dC1Cn e ) γ2i j (dC1Cn e )
D0,
γ1i
D g 1i ,
(dC1Cn e ) γ2i j
D g 2i j ,
j
if
i ne C 3 .
(10.32)
Example 10.5 Incremental predictive form of a Hammerstein weighting function series model Substituting u(k C 1) and u(k) with their incremental expressions, the predictive form of Example 10.1 results in y(k O C 3jk) D g 0 C g 11 [∆ u(k C 1) C ∆ u(k) C u(k 1)] C g 12 [∆ u(k) C u(k 1)] C g 13 u(k 1) C g 14 u(k 2) C g 21 [∆ u(k C 1) C ∆ u(k) C u(k 1)]2 C g 22 [∆ u(k) C u(k 1)]2 C g 23 u2 (k 1) C g 24 u2 (k 2) D g 0 C g 11 ∆ u(k C 1) C (g 11 C g 12 )∆ u(k) C (g 11 C g 12 C g 13 )u(k 1) C g 14 u(k 2) C g 21 ∆ u2 (k C 1) C (g 21 C g 22 )∆ u2 (k) C (g 21 C g 22 C g 23 )u2 (k 1) C g 24 u2 (k 2) C 2g 21 ∆ u(k C 1)∆ u(k) C 2g 21 ∆ u(k C 1)u(k 1) C 2g 21 ∆ u(k)u(k 1) C 2g 22 ∆ u(k)u(k 1) . The quadratic part of the Hammerstein model leads to cross-product terms of different delays although the original model did not have such terms. Furthermore, the predicted output can be separated into constant, linear, and quadratic terms of the (unknown) current and future input signals: y(k O C 3jk) D g 0 C (g 11 C g 12 C g 13 )u(k 1) C g 14 u(k 2) C (g 21 C g 22 C g 23 )u2 (k 1) C g 24 u2 (k 2) C [g 11 C 2g 21 u(k 1)]∆ u(k C 1) C [(g 11 C g 12 ) C 2(g 21 C g 22 )u(k 1)]∆ u(k) C g 21 ∆ u2 (k C 1) C (g 21 C g 22 )∆ u2 (k) C 2g 21 ∆ u(k C 1)∆ u(k) .
399
400
10 GPC of Nonlinear SISO Processes
10.2.2.2 Incremental Predictive Equation of the Predictive Volterra Weighting Function Series The predictive equation of the quadratic Volterra weighting function series was given by (10.15):
y(k O C d C 1 C n e jk) D g 0 C
m X
g 1i u(k C 1 C n e i)
iD1 m X m X
C
g 2i j u(k C 1 C n e i)u(k C 1 C n e j ) .
iD1 j Di
Substituting the input signals by their incremental values results in (Haber [7]) (dC1Cn e )
y(k O C 1 C d C n e jk) D c 0p
(dC1Cn e )
C γ1
(dC1Cn e )
C γ2
q 1 ∆ u (k C 1 C n e )
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e ) , (10.33)
where (dC1Cn e )
D g0 I
(dC1Cn e )
D
c 0p
X
min(i,m)
γ1i
g 1ν ,
i D 1, . . . , n e C 2 I
νD1
X
X
νD1
µDν
min(i,m) min(i,m) (dC1Cn e )
γ2i i
D
X
min(i,m) (dC1Cn e ) γ2i j
D
νD1
2 4
X
g 2ν µ ,
i D 1, . . . , n e C 2I
min(i,m)
X
min( j,m)
g 2ν µ C
µDν
3 g 2ν µ 5 ,
i D 1, . . . , n e C 2 ,
µDν
j D i C 1, i C 2, . . . , n e C 2 I (dC1Cn e ) γ2i j (dC1Cn e )
D0,
γ1i
D g 1i ,
(dC1Cn e ) γ2i j
D g 2i j ,
j
(10.34)
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
Example 10.6 Incremental predictive form of a Volterra series model Substituting u(k C 1) and u(k) expressed with the increments into the predictive form of Example 10.2 results in y(k O C 3jk) D g 0 C g 11 [∆ u(k C 1) C ∆ u(k) C u(k 1)] C g 12 [∆ u(k) C u(k 1)] C g 13 u(k 1) C g 14 u(k 2) C g 211 [∆ u(k C 1) C ∆ u(k) C u(k 1)]2 C g 212 [∆ u(k C 1) C ∆ u(k) C u(k 1)][∆ u(k) C u(k 1)] C g 213 ∆ u(k C 1) C ∆ u(k) C u(k 1) u(k 1) C g 214 ∆ u(k C 1) C ∆ u(k) C u(k 1) u(k 2) C g 222 [∆ u(k) C u(k 1)]2 C g 223 [∆ u(k) C u(k 1)]u(k 1) C g 224 [∆ u(k) C ∆ u(k 1)]u(k 2) C g 233 u2 (k 1) C g 234 u(k 1)u(k 2) C g 244 u2 (k 2) . Similarly to the Hammerstein model, the predicted output can be separated into constant, linear, and quadratic terms of the (unknown) current and future input signals: y(k O C 3jk) D g 0 C (g 11 C g 12 C g 13 )u(k 1) C g 14 u(k 2) C (g 211 C g 212 C g 213 C g 222 C g 223 C g 233 ) u2 (k 1) C (g 214 C g 224 C g 234 )u(k 1)u(k 2) C g 244 u2 (k 2) C [g 11 C (2g 211 C g 212 C g 213 )u(k 1) C g 214 u(k 2)]∆ u(k C 1) C [(g 11 C g 12 ) C (2g 211 C 2g 212 C 2g 222 C g 213 C g 223 )u(k 1) C (g 214 C g 224 )u(k 2)]∆ u(k) C g 211 ∆ u2 (k C 1) C (2g 211 C g 212 )∆ u(k C 1)∆ u(k) C (g 211 C g 212 C g 222 )∆ u2 (k) .
10.2.2.3 Incremental Predictive Equation of the Quadratic Parametric Generalized Hammerstein Model The predictive form of the quadratic generalized Hammerstein model was given by (10.21)
C α (dC1Cn e ) q 1 y (k) (dC1Cn e ) 1 C β1 q u(k C 1 C n e ) (dC1Cn e ) 1 2 q u (k C 1 C n e ) . C β2 (dC1Cn e )
y(k O C d C 1 C n e ) D c 0p
401
402
10 GPC of Nonlinear SISO Processes
Substituting the input signals by their incremental values results in [7] (dC1Cn e ) C δ (dC1Cn e ) q 1 y (k) y(k O C d C 1 C n e jk) D c 0p (dC1Cn e ) 1 C γ1 q ∆ u (k C 1 C n p ) (dC1Cn e )
C γ2
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n p ) , (10.35)
where δ (dC1Cn e ) q 1 D α (dC1Cn e ) q 1 I X
min(i,n b1 ) (dC1Cn e )
γ1i
D
(dC1Cn e )
β 1ν
i D 1, . . . , n e C 2 I
,
νD1
X
X
νD1
µDν
min(i,n b2 ) min(i,n b2 ) (dC1Cn e )
γ2i i
D
X
(dC1Cn e )
β 2ν
,
i D 1, . . . , n e C 2 I
min(i,n b2 ) (dC1Cn e )
γ2i j
D2
(dC1Cn e )
β 2ν
,
i D 1, . . . , n e C 2 ,
νD1
j D i C 1, i C 2, . . . , n e C 2 I (dC1Cn e ) γ2i j (dC1Cn e )
γ1i
(dC1Cn e ) γ2i j
D0,
j
(dC1Cn e )
D β 1i D
(dC1Cn e ) β 2i j
i ne C 3 I I
j i , i ne C 3 .
(10.36)
Example 10.7 Incremental transformation of the predictive generalized Hammerstein model Prediction of the quadratic second-order generalized Hammerstein model for n e C 1 D 1 C 1 D 2 steps ahead with dead time d D 1 is known from Example 10.3: y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C β 11 u(k C 1) C β 12 u(k) C β 13 u(k 1) C β 14 u(k 2) C β 21 u2 (k C 1) C β 22 u2 (k) C β 23 u2 (k 1) C b 24 u2 (k 2) . Substituting the current and future input signal terms by their incremental forms u(k C 1) D u(k 1) C ∆ u(k) C ∆ u(k C 1) , u(k) D u(k 1) C ∆ u(k) results in y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C β 11 [∆ u(k C 1) C ∆ u(k) C u(k 1)] C β 12 [∆ u(k) C u(k 1)] C β 13 u(k 1) C β 14 u(k 2) C β 21 [∆ u(k C 1) C ∆ u(k) C u(k 1)]2 C β 22 [∆ u(k) C u(k 1)]2 C β 23 u2 (k 1) C b 24 u2 (k 2) .
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
After rearrangement, the constant, linear, and quadratic terms of the current and future input signal increments can be separated: y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C [β 11 C β 12 C β 13 ]u(k 1) C β 14 u(k 2) C [β 21 C β 22 C β 23 ]u2 (k 1) C b 24 u2 (k 2) C [β 11 C 2β 21 u(k 1)]∆ u(k C 1) C [β 11 C β 12 C 2(β 21 C β 22 )u(k 1)]∆ u(k) C β 21 ∆ u2 (k C 1) C 2β 21 ∆ u(k C 1)∆ u(k) C (β 21 C β 22 )∆ u2 (k) .
10.2.2.4 Incremental Predictive Equation of the Quadratic Parametric Volterra Model The predictive form of the quadratic parametric Volterra model was given by (10.25):
C α (dC1Cn e ) q 1 y (k) (dC1Cn e ) 1 C β1 q u(k C 1 C n e ) (dC1Cn e )
y(k O C d C 1 C n e jk) D c 0p
(dC1Cn e )
C β2
1 2 (q 1 1 , q 2 )u (k C 1 C n e ) .
Substituting the input signals by their incremental values results in [7] C δ (dC1Cn e ) q 1 y (k) (dC1Cn e ) 1 C γ1 q ∆ u (k C 1 C n e ) (dC1Cn e )
y(k O C d C 1 C n e jk) D c 0p
(dC1Cn e )
C γ2
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e ) , (10.37)
where δ (dC1Cn e ) q 1 D α (dC1Cn e ) q 1 I X
min(i,n b1 ) (dC1Cn e )
γ1i
D
(dC1Cn e )
β 1ν
i D 1, . . . , n e C 2 I
,
νD1
X
X
νD1
µDν
min(i,n b2 ) min(i,n b2 ) (dC1Cn e )
γ2i i
D
X
min(i,n b2 ) (dC1Cn e )
γ2i j
D
2 4
min( j,n b2 )
C
µDν
,
i D 1, . . . , n e C 2 I
min(i,n b2 )
νD1
X
X
(dC1Cn e )
β 2ν µ
µDν
(dC1Cn e )
β 2ν µ
3
(dC1Cn e ) 5 , β 2ν µ
i D 1, . . . , n e C 2 ,
j D i C 1, i C 2, . . . , n e C 2 I
403
404
10 GPC of Nonlinear SISO Processes (dC1Cn e )
γ2i j
(dC1Cn e ) γ1i (dC1Cn e ) γ2i j
D0, D D
j
(dC1Cn e ) β 1i , (dC1Cn e ) β 2i j ,
i ne C 3 I j i , i ne C 3 .
(10.38)
Example 10.8 Incremental transformation of the predictive parametric Volterra model Prediction of the quadratic second-order parametric Volterra model n e C 1 D 1 C 1 D 2 steps ahead the dead time d D 1 is known from Example 10.4: y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C β 11 u(k C 1) C β 12 u(k) C β 13 u(k 1) C β 14 u(k 2) C β 211 u2 (k C 1) C β 212 u(k C 1)u(k) C β 222 u2 (k) C β 223 u(k)u(k 1) C β 233 u2 (k 1) C β 234 u(k 1)u(k 2) C β 244 u2 (k 2) . Substituting the current and future input signal terms by their incremental form u(k C 1) D u(k 1) C ∆ u(k) C ∆ u(k C 1) , u(k) D u(k 1) C ∆ u(k) results in y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C β 11 [∆ u(k C 1) C ∆ u(k) C u(k 1)] C β 12 [∆ u(k) C u(k 1)] C β 13 u(k 1) C β 14 u(k 2) C β 211 [∆ u(k C 1) C ∆ u(k) C u(k 1)]2 C β 212 [∆ u(k C 1) C ∆ u(k) C u(k 1)][∆ u(k) C u(k 1)] C β 222 [∆ u(k) C u(k 1)]2 C β 223 [∆ u(k) C u(k 1)]u(k 1) C β 233 u2 (k 1) C β 234 u(k 1)u(k 2) C β 244 u2 (k 2) . After rearrangement, the constant, linear, and quadratic terms of the current and future input signal increments can be separated: y(k O C 3jk) D c 0p C α 0 y (k) C α 1 y (k 1) C [β 11 C β 12 C β 13 ]u(k 1) C β 14 u(k 2) C [β 211 C β 212 C β 222 C β 223 C β 233 ]u2 (k 1) C β 234 u(k 1)u(k 2) C β 244 u2 (k 2) C [β 11 C (2β 211 C β 212 )u(k 1)]∆ u(k C 1) C [β 11 C β 12 C (2β 211 C β 212 C 2β 222 C β 223 )u(k 1)]∆ u(k) C β 211 ∆ u2 (k C 1) C (2β 211 C β 212 )∆ u(k C 1)∆ u(k) C (β 211 C β 212 C β 222 )∆ u2 (k) .
10.2 Predictive Equations for the Nonparametric and Parametric Hammerstein and Volterra Models
10.2.3 Common Incremental Predictive Form of the Quadratic Models
The nonparametric and parametric Hammerstein and Volterra models have the same incremental predictive form: (dC1Cn e )
y(k O C d C 1 C n e jk) D p 0
(dC1Cn e )
C P1
(dC1Cn e )
C P2
q 1 ∆ u(k C 1 C n e )
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e ) .
(10.39)
The degree of the polynomials is deg(P1 ) D n e C 1 and deg(P2 ) D [n e C 1, n e C 1]. The coefficients are calculated as follows: (dC1Cn e )
p0
p D c 0 C δ (dC1Cn e ) q 1 y (k) max(n e C2,n b1 )
X
C
(dC1Cn e )
γ1i
u(k C n e C 1 i)
iDn e C2 max(n e C2,n b2 ) max(n e C2,n b2 )
C
X
X
iDn e C2
j Di
(dC1Cn e )
γ2i j
u(k C n e C 1 j )
u(k C n e C 1 i) max(n e C2,n b1 ) (dC1Cn e )
p 1i
(dC1Cn e )
D γ1i
X
C
(dC1Cn e )
γ2i j
u(k C n e C 1 j ) I
j Dn e C2
i D 0, 1, . . . , n e C 1 (dC1Cn e ) p 2i j
(dC1Cn e )
D γ2i j
,
i D 1, . . . , n e C 1 ,
j D 1, 2, . . . , n e C 1 . (10.40)
In this predictive equation the term (dC1Cn e )
P1
nX e C1 (dC1Cn e ) q 1 ∆ u(k C 1 C n e ) D p 1i ∆ u(k C 1 C n e i) iD1
(10.41) includes the linear combination of the control increments between the current time point and the time point n e steps plus the dead time ahead. The term (dC1Cn e )
P2
D
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e )
nX e C1 nX e C1 iD1
(dC1Cn e )
p 2i j
∆ u(k C 1 C n e i)∆ u(k C 1 C n e j )
(10.42)
j Di
includes the linear combination of product terms between equally or differently delayed control increments between the current time point and the time point n e
405
406
10 GPC of Nonlinear SISO Processes (dC1Cn )
e steps ahead. The term p 0 does not depend on the current and future control increments, which are unknown at the current time point k. The upper index (d C1Cn e ) means that the parameters depend on the prediction length.
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
A quadratic cost function is minimized; this considers the quadratic deviation of the reference signal and the output signal predicted in a future horizon and punishes also the squares of the control increments. With knowledge of the future reference signal, the control error can be predicted and minimized; thus, the controlled output signal achieves its reference value earlier than if no prediction has been made. Depending on the control strategy and whether there are constraints or not, one can derive different algorithms. Multidimensional optimization of the manipulated signal sequence If the number of allowed changes in the control horizon is greater than one, then multidimensional optimization is required to compute the optimal control signal. One-dimensional optimization of the manipulated signal sequence Using special manipulated variable parameterization strategies during the control horizon, one can reduce the optimization problem to the one-dimensional (scalar) case. This is the case, for example, if only one change in the manipulated signal is allowed or all increments are assumed to be equal. In the following it will be assumed that the generalized Hammerstein model and the parametric Volterra model have quadratic steady-state characteristics. 10.3.1 One-Dimensional Minimization of the Cost Function
Two strategies lead to one-dimensional minimization of the cost function of predictive control: Strategy 1: Constant control signal in the control horizon Only one change is taken into account in the control signal at the current time point k, and the control signal is constant during the control horizon: ∆ u(k) ¤ 0, ∆ u(k C j ) D 0 I
j 1.
(10.43)
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
Strategy 2: Constant control increments in the control horizon The changes in the control signal are considered equal during the control horizon: ∆ u(k) D ∆ u(k C 1) D ∆ u(k C 2) D D ∆ u(k C n u 1) , ∆ u(k C j ) D 0 I
j nu .
(10.44)
(Of course, because of the receding horizon strategy, the control signal will change at every sampling point.) The above input sequence parameterization makes the minimization of the control cost function easy as the multidimensional minimization of the cost function leads to a one-dimensional search. As the predicted model output is a quadratic function of the input signal and the cost function is a quadratic function of the control error and the control increments, the cost function is a fourth-degree function of the control increments. Depending on constraints, two solutions exist: Constrained case: The fourth-degree cost function should be numerically minimized. Unconstrained case: In the unconstrained case the minimization leads to a third-degree equation in the control increments [9, 13]: k0 C k1 ∆ u(k) C k2 ∆ u2 (k) C k3 ∆ u3 (k) D 0 .
(10.45)
(The coefficients in (10.45) depend on the prediction length d C 1 C n e , though this is not indicated by an upper index.) The control increment has to be chosen from among the solutions of the cubic equation. From among three real roots that one is chosen where the value of the cost function is the least. The real root is chosen if conjugate complex pairs also exist. The control signal should be inside the control limits. In the sequel one-step-ahead and long-range optimal algorithms are presented for the unconstrained case [12, 13]. 10.3.1.1 One-Step-Ahead Control with the Assumption of a Constant Control Signal in the Control Horizon Assuming a constant control signal in the control horizon, the predictive equation reduces to (dC1Cn e )
y(k O C d C 1 C n e jk) D p 0
(dC1Cn e )
C p 1,n e C1
(dC1Cn )
∆ u(k) C p 2,n e C1,n ee C1 ∆ u2 (k) . (10.46)
The derivation of the cost function according to the control increment with the above predictive equation and with the assumption of one-step-ahead control n e1 D
407
408
10 GPC of Nonlinear SISO Processes
n e2 n e leads to the following coefficients of the cubic equation [12, 13]: h i (dC1Cn e ) (dC1Cn ) k0 D p 0 y r (k C d C 1 C n e ) p 1,n e C1 e , h i (dC1Cn e ) (dC1Cn ) k1 D 2 p 0 y r (k C d C 1 C n e ) p 2,n e C1,n ee C1 i h (dC1Cn ) 2 C p 1,n e C1 e C λ u0 , (dC1Cn )
(dC1Cn )
k2 D 3p 1,n e C1 e p 2,n e C1,n ee C1 , i2 h (dC1Cn ) k3 D 2 p 2,n e C1,n ee C1 .
(10.47)
10.3.1.2 One-Step-Ahead Control with the Assumption of Constant Control Increments in the Control Horizon Assuming constant control increments in the control horizon, the predictive equation reduces to (dC1Cn e )
y(k O C d C 1 C n e jk) D p 0
(dC1Cn e )
(dC1Cn )
C P1
e (1)∆ u(k) C P2 (1, 1)∆ u2 (k) " n C1 # e X (n ) (dC1Cn e ) D p0 e C p 1i (i) ∆ u(k)
2 C4
iD1 nX e C1 nX e C1
3 (dC1Cn e )
p 2i j
(i, j )5 ∆ u2 (k) .
(10.48)
iD1 iD j
The derivation of the cost function according to the control increment with the above predictive equation and with the assumptions of one-step-ahead control n e1 D n e2 n e leads to the following coefficients of the cubic equation [12, 13]: e C1 h i nX (dC1Cn e ) (dC1Cn e ) y r (k C d C 1 C n e ) p 1i , k0 D p 0
iD1
k1 D 2
h
(dC1Cn e ) p0
i
2
y r (k C d C 1 C n e ) 4
nX e C1 nX e C1 iD1
C
" n C1 e X iD1
k2 D 3
" n C1 e X
#2 (dC1Cn e )
p 1i
C
nX u 1
k3 D 2 4
λu j ,
3 # 2 n C1 n C1 e e X X (dC1Cn e ) 4 (dC1Cn e ) 5 , p p
iD1
2i j
j Di
iD1
nX e C1 nX e C1 iD1
j Di
j D0
1i
2
3 (dC1Cn e ) 5 p 2i j
j Di
32
(dC1Cn e ) 5 p 2i j
.
(10.49)
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
10.3.1.3 Long-Range Optimal Control with the Assumption of a Constant Control Signal in the Control Horizon The derivation of the cost function according to the control increment with the predictive equation (10.46) and with the initial and final prediction steps n e 1 C 1, n e 2 C 1 beyond the dead time leads to the following coefficients of the cubic equation [11–13]: n e2 h X
k0 D
(dC1Cn e )
p0
n e Dn e1 n e2 h X
k1 D 2
i (dC1Cn ) y r (k C d C 1 C n e ) p 1,n e C1 e ,
(dC1Cn e )
p0
n e Dn e1
C
n e2 h X n e Dn e1 n e2 h X
k2 D 3
n e Dn e1 n e2 h X
k3 D 2
n e Dn e1
i (dC1Cn ) y r (k C d C 1 C n e ) p 2,n e C1,n ee C1
i (dC1Cn e ) 2
p 1,n e C1
(dC1Cn e )
p 1,n e C1
(dC1Cn )
C λ u0 ,
i (dC1Cn ) p 2,n e C1,n ee C1 ,
p 2,n e C1,n ee C1
i2
.
(10.50)
10.3.1.4 Long-Range Optimal Control with the Assumption of Constant Control Increments in the Control Horizon The derivation of the cost function according to the control increment with the predictive equation (10.48) and with the initial and final prediction steps n e 1 C 1, n e 2 C 1 beyond the dead time leads to the following coefficients of the cubic equation [11–13]: n e2 h X
k0 D
(dC1Cn e ) p0
y r (k C d C 1 C n e )
n e Dn e1
k1 D 2
i
" n C1 e X
n e2 h X
(dC1Cn e ) p0
3 2 e C1 nX e C1 i nX (dC1Cn ) e 5 y r (k C d C 1 C n e ) 4 p 2i j iD1
" n C1 n e2 e X X n e Dn e1
k2 D 3
n e2 X
k3 D 2
iD1
" n C1 e X
#2 (dC1Cn e )
p 1i
C
nX u 1
n e2 X n e Dn e1
2 4
λu j ,
3 # 2 n C1 n C1 e e X X (dC1Cn e ) (dC1Cn e ) 5 4 p p ,
iD1
2i j
iD1
nX e C1 nX e C1 iD1
j Di
j D0
1i
n e Dn e1
,
iD1
n e Dn e1
C
# (dC1Cn e ) p 1i
j Di
32 (dC1Cn e ) 5 p 2i j
j Di
. (10.51)
409
410
10 GPC of Nonlinear SISO Processes
10.3.2 Multidimensional Minimization of the Cost Function
In the following the general case when more changes of arbitrary size are allowed in the manipulated variable sequence (n u > 1) will be considered. As now the changes are not equal as with suboptimal strategy 2 (constant control increments during the control horizon), the problem leads to multidimensional optimization. In Section 10.2.3 it was shown that the output of the quadratic parametric or nonparametric Hammerstein or Volterra model can be predicted by (10.39): (dC1Cn e )
y(k O C d C 1 C n e jk) D p 0
(dC1Cn e )
C P2
(dC1Cn e )
C P1
q 1 ∆ u(k C 1 C n e )
1 2 (q 1 1 , q 2 )∆ u (k C 1 C n e )
or in detail y(k O C d C 1 C n e jk)
(dC1Cn e )
D p0
2
i6 h (dC1Cn ) (dC1Cn e ) (dC1Cn e ) 6 C p 1,n e C1 e , p 1,n e , . . . , p 1,1 6 4
C ∆ u(k), ∆ u(k C 1), . . . , ∆ u(k C n e ) 2 (dC1Cn e ) (dC1Cn ) (dC1Cn ) p 2,n e C1,n e C1 p 2,n e ,n e C1e p 2,1,n e C1 e 6 (dC1Cn ) (dC1Cn ) 0 p 2,n e ,n e e p 2,1,n e e 6 6 .. . . 6 .. .. .. 4 . . (dC1Cn e ) 0 0 p 2,1,1
32 76 76 76 74 5
∆ u(k) ∆ u(k C 1) .. . ∆ u(k C n e )
∆ u(k) ∆ u(k C 1) .. . ∆ u(k C n e )
3 7 7 7C 5
3 7 7 7. 5 (10.52)
If only n u consecutive control increments are considered, vector ∆u f contains only n u elements and the dimension of the parameter vector in (10.52) is n u and that of the parameter matrix is n u n u . For long-range optimal control, the predictive equations have to be expressed for the prediction domain d C1C n e1 d C1C n e d C 1 C n e2 : 2 6 6 yO D 6 4
y(k O C d C 1 C n e1 jk) y(k O C d C 2 C n e1 jk) .. . y(k O C d C 1 C n e2 jk)
3 7 7 7. 5
(10.53)
The predicted outputs can be composed of three terms; yO D yO 0 C yO 1 C yO 2 ,
(10.54)
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
where the constant term is 2 dC1Cn 3 e1 p0 6 p dC2Cn e1 7 7 6 0 7. yO 0 D 6 .. 7 6 5 4 .
(10.55)
p 0dC1Cn e2 The linear term is given by f
yO D P1 ∆u f 2 (dC1Cn e1) p 1,n e1 C1 6 p (dC2Cn e1) 6 1,n e1 C2 D6 .. 6 4 . (dC1Cn e2) p 1,n e2 C1
(dC1Cn )
.. .
e1 p 1,n e1 (dC2Cn e1 ) p 1,n e1 C1 .. . (dC1Cn e2) p 1,n e2
.. . (dC1Cn e2)
p 11
32 76 76 76 74 5
∆ u(k) ∆ u(k C 1) .. . ∆ u(k C n e2 )
3 7 7 7, 5
(10.56) where vector ∆u f contains the current and the future control increments. The quadratic term at each prediction point is calculated according to the third term in (10.52): 2
yO2 (k C d C 1 C n e1 jk) 6 yO2 (k C d C 2 C n e1 jk) 6 yO2 D 6 .. 4 . yO2 (k C d C 1 C n e2 jk)
3 7 7 7. 5
(10.57)
A quadratic cost function J is minimized; this considers the quadratic deviation of the reference signal y r and the predicted output signal yO and punishes also the squares of the control increments. J D (y r yO ) T Λ y (y r yO ) C ∆u Tf Λ u ∆u f ) min , ∆u f
(10.58)
where Λ y and Λ u are generally diagonal matrices with equal elements. The cost function can be minimized in different ways: by numerical minimization of the cost function, by iterative minimization of the cost function. As the first method is a numerical minimization, it can be used without or with constraints. For the second method, the predictive equation can also be written in the following form: f
f
yO D yO 0 C yO 1 C yO 2 D yO 0 C P1 ∆u f C yO 2 D P1 ∆u f C yO free+nlin ,
(10.59)
where yO free+nlin contains not only the free response (i.e., terms which are already known at the current time point), but also the unknown, nonlinear quadratic terms
411
412
10 GPC of Nonlinear SISO Processes
of the current and future manipulated signals. Two versions can be considered where the nonlinear quadratic term is expressed with the control signal values or with the control increments. Assuming symmetrical (usually diagonal) weighting factor matrices, the unconstrained minimization of cost function (10.58) assuming that yO free+nlin is known becomes similar to generalized predictive control (GPC) for linear processes (see Chapter 5): i1 h fT f fT P1 Λ y (yr yO free+nlin ) . ∆u f D P1 Λ y P1 C Λ u
(10.60)
As the term yO free+nlin includes current and future manipulated signals, an iterative procedure can be applied to calculate the optimal control sequence: 1. Assume initial values for the current and future manipulated signals u f (e.g., based on the last control step). 2. Calculate the free plus nonlinear response term yO free+nlin according to (10.59). 3. Calculate the new manipulated variable sequence by (10.60) in the unconstrained case. In the constrained case (10.58) has to be minimized under constraints. 4. Check whether the new manipulated sequence differs from the previously calculated (or guessed) one. If the difference is larger than a predefined threshold vector, continue the iterative algorithm from step 2, otherwise terminate the iteration. This iterative algorithm was recommended for predictive control based on the nonparametric Volterra series with the incremental transformation applied only for the linear terms by Maner et al. [21] and Doyle et al. [4]. The algorithm can be used for parametric models as well; see Haber et al. [10]. It was mentioned before that the quadratic term can be expressed either with the control signal or with its increments. The predictive equations are different depending on how the quadratic term is expressed. The prediction n e C1 D 1C1 D 2 steps ahead of the dead time was shown for the Volterra series model with memory m D 4 and dead time d D 1 in Example 10.6 for the case when incremental transformation was applied both for the linear and for the quadratic terms. (This method was applied in [10].) Now the same prediction of the same model is shown in Example 10.9 if the incremental transformation is used only for the linear case. (This method was applied by [6].) Example 10.9 Different predictive forms of a Volterra series model Consider a quadratic Volterra series model with memory m D 4 and dead time d D 1. The prediction n e C 1 D 1 C 1 D 2 steps ahead of the dead time was given
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
in Example 10.2: y(k O C 3jk) D g 0 C g 11 u(k C 1) C C g 14 u(k 2) C g 211 u2 (k C 1) C g 212 u(k C 1)u(k) C g 213 u(k C 1)u(k 1) C g 214 u(k C 1)u(k 2) C g 222 u2 (k) C g 223 u(k)u(k 1) C g 224 u(k)u(k 2) C g 233 u2 (k 1) C g 234 u(k 1)u(k 2) C g 244 u2 (k 2) . The incremental form can be obtained by substituting u(k C 1) and u(k) by u(k C 1) D u(k 1) C ∆ u(k) C ∆ u(k C 1) , u(k) D u(k 1) C ∆ u(k) as was shown in Example 10.6. The incremental predictive form of Example 10.6 can be separated into an old (so-called constant) term (y c o n s t ), a linear term (y l i n ) of the current and future input increments, and a quadratic term (y q ua d r ) of the current and future input increments: y(k O C 3jk) D yO c o n s t (k C 3jk) C yO l i n (k C 3jk) C yO q ua d r (k C 3jk) , yO c o n s t (k C 3jk) D g 0 C (g 11 C g 12 C g 13 )u(k 1) C g 14 u(k 2) C (g 211 C g 212 C g 213 C g 222 C g 223 C g 233 )u2 (k 1) C (g 214 C g 224 C g 234 )u(k 1)u(k 2) C g 244 u2 (k 2) , yO l i n (k C 3jk) D g 11 C (2g 211 C g 212 C g 213 )u(k 1) Cg 214 u(k 2) ∆ u(k C 1) C (g 11 C g 12 ) C (2g 211 C2g 212 C 2g 222 C g 213 C g 223 )u(k 1) C(g 214 C g 224 )u(k 2) ∆ u(k) , yO q ua d r (k C 3jk) D g 211 ∆ u2 (k C 1) C (2g 211 C g 212 )∆ u(k C 1)∆ u(k) C (g 211 C g 212 C g 222 )∆ u2 (k) . An alternative way is if the incremental form is used only in the future linear terms: y(k O C 3jk) D g 0 C g 11 [∆ u(k C 1) C ∆ u(k) C u(k 1)] C g 12 [∆ u(k) C u(k 1)] C g 13 u(k 1) C g 14 u(k 2) C g 211 u2 (k C 1) C g 212 u(k C 1)u(k) C g 213 u(k C 1)u(k 1) C g 214 u(k C 1)u(k 2) C g 222 u2 (k) C g 223 u(k)u(k 1) C g 224 u(k)u(k 2) C g 233 u2 (k 1) C g 234 u(k 1)u(k 2) C g 244 u2 (k 2) .
413
414
10 GPC of Nonlinear SISO Processes
Now, in the quadratic terms one multiplier term is the current or a future input signal and the other is a past, current, or future input signal: yO (k C 3jk) D yO c o n s t (k C 3jk) C yO l i n (k C 3jk) C yO q ua d r (k C 3jk), yO c o n s t (k C 3jk) D g 0 C (g 11 C g 12 C g 13 )u(k 1) C g 14 u(k 2) C g 233 u2 (k 1) C g 234 u(k 1)u(k 2) C g 244 u2 (k 2) , yO l i n (k C 3jk) D g 11 ∆ u(k C 1) C (g 11 C g 12 )∆ u(k) , yO q ua d r (k C 3jk) D g 211 u2 (k C 1) C g 212 u(k C 1)u(k) C g 213 u(k C 1)u(k 1) C g 214 u(k C 1)u(k 2) C g 222 u2 (k) C g 223 u(k)u(k 1) C g 224 u(k)u(k 2) . As could be seen, the two predictive transformations lead to different predictive forms.
10.3.3 Simulation Results
Several simulation have been performed to show the effect of changing the start and end of the manipulated variable or of the control error horizon, and of varying the weighting factor and the sampling time. The effect of all these controller parameters in the nonlinear case [11–13] is similar to that in the linear case and is omitted here. In the sequel mainly those simulations are presented which illustrate some special features of the nonlinear GPC. Example 10.10 Comparison of the different parameterization strategies for the manipulated variable sequence for long-range optimal control of a Hammerstein model The simple Hammerstein model (Figure 10.4) with the static characteristic 2CU C 0.5U 2 and the time constants with the continuous linear dynamic part T1 D 5 s and T2 D 10 s is sampled by ∆T D 5 s and is controlled on the basis of the generalized Hammerstein model being linear in the parameters. The control strategy and the parameters are as follows: long-range optimal predictive control, start and end of the extended prediction horizon: n e1 D 2 and n e2 D 4, weighting factor of the control increments: λ u D 0.01. The reference signal started at 2 and was changed stepwise after every 20 sampling steps (100 s) to 3, 4, 3.5, and 2 in turn. The controlled output signals and the controller outputs are shown in Figure 10.5 with the two alternative suboptimal control strategies. The allowed changes in the control signal during the control horizon are n u D 1 with strategy 1 and n u D n e2 n e1 C 1 with strategy 2 supposing equal control increments. The plot shows the following expected effects:
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
Figure 10.4 Second-order quadratic simple Hammerstein model.
strategy 2 strategy 1
strategy 2 strategy 1
(a)
controlled variable
(b)
manipulated variable
Figure 10.5 Comparison of strategies 1 and 2 with the long-range optimal control of the Hammerstein model.
Strategy 1 (constant control signal during the control horizon) causes faster control with more overshoot in the manipulated variable, Strategy 2 (constant control increments during the control horizon) causes slower control with less overshoot in the manipulated variable.
Example 10.11 Comparison of one-step-ahead predictive control of a linear and a simple Hammerstein model with the same linear dynamic part Two processes with the same linear dynamic part and sampling time as in Example 10.10 are controlled. The simple Hammerstein model has the static characteristic Y D 2CU C0.5U 2 and the linear model has the static characteristic Y D 2CU. The following controller strategy and parameters are used in both cases:
long-range optimal predictive control, strategy 1: constant control signal assumed in the control horizon, start and end of the extended prediction horizon: n e1 D 2 and n e2 D 4, weighting factor of the control increments: λ u D 0.01.
The reference signal started at 2 and was changed stepwise after every 20 sampling steps (100 s) to 3, 4, 3.5, and 2 in turn. The controlled output signals and the controller outputs are given in Figure 10.6 for both the linear and the nonlinear model. As expected, the controlled output linear linear linear nonlinear
(a)
controlled signal
(b)
nonlinear nonlinear
manipulated signal
Figure 10.6 Control of a linear and a nonlinear process with the same linear dynamic part.
415
416
10 GPC of Nonlinear SISO Processes
signals coincide and the manipulated variables differ. As the static nonlinear part is invertible, the same dynamic effect (predictive control) can be achieved both in the linear and in the nonlinear case. Example 10.12 Control of a simple Hammerstein model with a nonrealizable reference signal The simple Hammerstein model given in Example 10.10 is controlled by the same sampling time on the basis of the generalized Hammerstein model being linear in the parameters. The following controller strategy and parameters were used:
one-step-ahead predictive control, strategy 1: constant control signal assumed in the control horizon, extended prediction horizon: n e D 2, weighting factor of the control increments: λ u D 0.01.
The reference signal started at 2 and was changed stepwise after every 20 sampling steps (100 s) to 3, 1.3, 3.5, and 2 in turn. The simulated Hammerstein model has the static characteristic Y D 2 C U C 0.5U 2 . Its minimum value is Ymin D 1.5, Umin D 1.0. As is seen in the plot of the output signal (Figure 10.7), the reference signal value of 1.3 cannot be achieved. However, the process output is kept at its minimum value, and the control becomes extremum control.
control error
(a)
controlled signal
(b)
manipulated signal
Figure 10.7 Output signal of the predictive control of a nonlinear process with a nonachievable reference signal.
Example 10.13 Control of a simple first-order Wiener model by the generalized Hammerstein model and by the parametric Volterra model A complex nonlinear process being nonlinear in the parameters (simple Wiener model) is controlled by means of two linear-in-parameters nonlinear dynamic models (generalized Hammerstein and parametric Volterra models). As the process model and the model used in control design are different, adaptive control with parameter estimation is required. The simple Wiener model (Figure 10.8) has the nonlinear static characteristic Y D 2 C U C 0.5U 2 and the difference equation of the linear dynamic part is x n l (k) D 0.5x n l (k 1) C 0.5u(k 2).
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
Figure 10.8 First-order quadratic simple Wiener model.
The control strategy and the tuning parameters are:
one-step-ahead predictive control, strategy 1: constant control signal assumed in the control horizon, extended prediction horizon: n e D 3, weighting factor of the control increments: λ u D 0.01.
The parameter estimation strategy is: off-line least-squares (LS) algorithm in the first 150 steps followed by the recursive LS algorithm, initial value of the diagonal elements of the covariance matrix 10, forgetting factor, 0.95. The adaptive control strategy (indirect method) is: dual control based on the certainty equivalence principle, parameter estimation and control signal calculation in each step. The reference signal started at 2 and was changed stepwise after every 200 sampling steps to 3.5, 4.5, 4, and 3.5 in turn. Figure 10.9a shows the controlled output signals and Figure 10.9b shows the controller outputs for the adaptive predictive control based on the generalized Hammerstein model and on the parametric Volterra model, respectively. The estimated parameters of the quadratic second-order generalized Hammerstein model are y(k) O D 0.0663y (k 1) C 2.0435 C 0.1656u(k 1) C 0.0779u2 (k 1) . The estimated parameters of the quadratic second-order parametric Volterra model are y(k) O D 0.4773y (k 1) 0.0805y (k 2) C 1.1448 C 0.4987u(k 1) C 0.0588u(k 2) C 0.233u2 (k 1) C 0.1044u2 (k 2) C 0.0647u(k 1)u(k 2) . As is seen, the control by the parametric Volterra model is better (smoother). Both the overshoot in the controlled output signal and the fluctuations in the manipulated variable are less for this model.
417
418
10 GPC of Nonlinear SISO Processes
y
H: Hammerstein
H
yr
u
V H V
Hammerstein
yr yr
yr k u
V: Volterra
Volterra
k
k
(a)
controlled variable
(b)
manipulated variable
Figure 10.9 Adaptive predictive control of a first-order Wiener model based on approximating generalized Hammerstein and parametric Volterra models.
Example 10.14 Control of a simple second-order Wiener model based on approximating parametric Volterra and Hammerstein models The simple Wiener model shown in Figure 10.10 is controlled on the basis of its approximating parametric Volterra and Hammerstein models, respectively. The nonlinear system is characterized by serially connected linear and nonlinear parts, where the nonlinear static characteristic follows the linear dynamic part. The static part is quadratic: the relationship between its output and input is y (k) D 2 C x n l (k) C 0.5x n2 l (k). The second-order dynamic part has the time constants T1 D 5 s and T2 D 10 s. The sampling time is ∆T D 5 s, and zero-order hold is applied at the input. First a random stochastic signal of zero mean value is applied as excitation for 60 sampling steps. On the basis of the collected input and output data, the off-line LS identification method is used supposing a third-order parametric Volterra model. The identified model is given by the following difference equation: y(k) O D 0.415 C 1.1049y (k 1) 0.3411y (k 2) C 0.0265y (k 3) C 0.1731u(k 1) C 0.0724u(k 2) 0.0274u(k 3) C 0.0204u2 (k 1) C 0.0441u(k 1)u(k 2) C 0.0276u(k 1)u(k 3) C 0.011u2 (k 2) C 0.01u(k 2)u(k 3) 0.0088u2 (k 3) . After the identification, the reference signal is changed stepwise every 30 sampling steps (i.e., in every 150 s) from 2 to 5, then to 2, 1.5, and 4, respectively. Control strategy 2 is applied (equal control increments during the control horizon). The tuning parameters are n e1 D 1, n e2 D 5, and λ u D 2. Figure 10.11 shows the controlled output and the manipulated signals with application of the identified parametric Volterra and the generalized Hammerstein models. For simplification, the parameters of the generalized Hammerstein model were taken to be equal to the estimated parameters of the parametric Volterra model except for the crossproduct terms of the quadratic part, which were omitted. The control based on the
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
Figure 10.10 Second-order quadratic simple Wiener model.
(a)
controlled signal
(b)
manipulated signal
Figure 10.11 Predictive control of a second-order Wiener model based on its Volterra and Hammerstein approximating models.
Volterra model gives smoother performance than the control based on the generalized Hammerstein model.
Example 10.15 Control of a Wiener model based on a parametric Volterra model with different memories without and with internal model control (IMC) The second-order Wiener model given in Example 10.13 is controlled with suboptimal strategy 1 with the tuning parameters n e1 D 2, n e2 D 4, λ u D 10, and n u D 1. The degree of the approximating parametric Volterra model is n a D n b1 D n b2 n D 2 and n a D n b1 D n b2 n D 7, respectively. The identified low-order model is y(k) O D 0.4747 C 0.9956y (k 1) 0.2393y (k 2) C 0.2013u(k 1) C 0.0832u(k 2) C 0.0101u2 (k 1) C 0.0386u(k 1)u(k 2) C 0.0327u2 (k 2)
(a)
controlled signal
(b)
manipulated variable
Figure 10.12 Control of a second-order Wiener model by the suboptimal algorithm with strategy 1 based on approximating parametric Volterra models of order 2 and 7, respectively.
419
420
10 GPC of Nonlinear SISO Processes
(a)
controlled signal
(b)
manipulated variable
Figure 10.13 Control of a second-order Wiener model by the suboptimal algorithm based on approximating parametric Volterra models of order 2 and 7, respectively, and using IMC.
and the higher order model is y(k) O D 0.3929 C 1.1825y (k 1) 0.5365y (k 2) C 0.2502y (k 3) 0.1558y (k 4) C 0.1055y (k 5) 0.0527y (k 6) C 0.0102y (k 7) C 0.1614u(k 1) C 0.0586u(k 2) 0.0061u(k 3) 0.0053u(k 4) 0.001u(k 5) 0.0064u(k 6) 0.0093u(k 7) C 0.0136u2 (k 1) C 0.0377u(k 1)u(k 2) C 0.0308u(k 1)u(k 3) C 0.0221u(k 1)u(k 4) C 0.0124u(k 1)u(k 5) C 0.0084u(k 1)u(k 6) C 0.0029u(k 1)u(k 7) C 0.0164u2 (k 2) C 0.0051u(k 2)u(k 3) 0.0019u(k 2)u(k 4) 0.0039u(k 2)u(k 5) 0.001u(k 2)u(k 6) 0.0007u(k 2)u(k 7) C 0.0076u2 (k 3) 0.0085u(k 3)u(k 4) 0.0046u(k 3)u(k 5) 0.0015u(k 3)u(k 6) 0.0009u(k 3)u(k 7) 0.0024u2 (k 4) 0.0042u(k 4)u(k 5) 0.0032u(k 4)u(k 6) 0.0007u(k 4)u(k 7) 0.0023u2 (k 5) 0.002u(k 5)u(k 6) 0.0001u(k 5)u(k 7) 0.0001u2 (k 6) C 0.0014u(k 6)u(k 7) C 0.0014u2 (k 7) . The output signals and the manipulated variables are shown in Figure 10.12. It is seen that with more Volterra terms the control is more accurate in the steady state. With a small number of Volterra parameters there is a significant steady-state error in the control. However, estimating fewer parameters is numerically an easier task. A solution to this problem is to use a lower-order model and apply the IMC structure, which works against plant/model mismatch. Figure 10.13 shows that the steady-state error can be eliminated by using the IMC structure.
10.3 Control Based on Nonparametric and Parametric Hammerstein and Volterra Models
Example 10.16 Control of a Wiener model by the suboptimal and by the iterative algorithm The same simple Wiener model as in Example 10.13 is controlled. The sampling time is ∆T D 5 s. The system is identified by a sixth-order Volterra model. In the first 60 sampling steps a stochastic input signal of zero mean is applied. The off-line LS parameter estimation resulted in the following model: y(k) O D 0.9649 C 0.7092y (k 1) 0.3962y (k 2) C 0.2356y (k 3) 0.0878y (k 4) C 0.0825y (k 5) 0.0262y (k 6) C 0.1627u(k 1) C 0.1344u(k 2) C 0.0955u(k 3) C 0.0622u(k 4) C 0.0274u(k 5) C 0.007u(k 6) C 0.0122u2 (k 1) C 0.04u(k 1)u(k 2) C 0.0305u(k 1)u(k 3) C 0.021u(k 1)u(k 4) C 0.0131u(k 1)u(k 5) C 0.0074u(k 1)u(k 6) C 0.0222u2 (k 2) C 0.0244u(k 2)u(k 3) C 0.0146u(k 2)u(k 4) C 0.0077u(k 2)u(k 5) C 0.005u(k 2)u(k 6) C 0.0036u2 (k 3) C 0.008u(k 3)u(k 4) C 0.0066u(k 3)u(k 5) C 0.0012u(k 3)u(k 6) C 0.0027u2 (k 4) C 0.005u(k 4)u(k 5) C 0.0012u(k 4)u(k 6) C 0.0008u2 (k 5) C 0.0001u(k 5)u(k 6) C 0.0005u2 (k 6) . Suboptimal control strategy 1 and the iterative procedure using the nonparametric Volterra weighting function description ([6]) were applied. The parameters of the nonparametric model were calculated from the parametric coefficients. The tuning parameters of the control algorithms are n e1 D 2, n e2 D 4, n u D 1, and λ u D 10. The nonparametric series is truncated at 20 for the iterative algorithm. The reference signal is changed stepwise from 2 to 5 at time point 300 s, then at 600 s to 10, and at 900 s again to 2. The controlled output and the manipulated variable are shown in Figure 10.14. The control with the iterative strategy is a bit faster than with the suboptimal strategy, but the calculation time is longer.
(a)
controlled signal
(b)
manipulated variable
Figure 10.14 Control of a a second-order Wiener model by the suboptimal and the iterative algorithm.
421
422
10 GPC of Nonlinear SISO Processes
10.4 Control Based on Linearized Models
Linear control algorithms are much simpler than nonlinear algorithms. Program packages based on linearized models are rather commonly applied for nonlinear processes. There are some approximations for how nonlinear processes can be controlled on the basis of their linearized models (see, e.g., Trierweiler and Secchi [22]): 1. Linear predictive control algorithm2. Nonlinear calculation of the free response and linear approximation of the forced response a) Linearization for a steady-state working point; b)Linearization at every sampling time point. 3. Nonlinear calculation of both the free and the forced responses. In this case there is no request to separate the two components, because the nonlinear process output (free and forced response together) can be predicted. Another type of linearization is the multicontroller approach, when the manipulated signal is superposed from manipulated signals calculated by linear control algorithms based on linearized models at some working points. It is known that an analytical solution of the control algorithm exists only if the free response is based on a linear(ized) model, there are no constraints. Some simulation results illustrate this method in Section 10.6.
10.5 Control Based on Nonlinear Free and Linearized Forced Responses
Some authors (e.g., Camacho and Bordons [2], De Keyser [3], Honc [18]) recommend superposing the predicted output signal as: 1. A nonlinear free response based on the last manipulated signal: The free response is calculated on the basis of the last manipulated variable u(k 1) (Figure 10.15a). The disadvantage of this method is that the free response is calculated only from the process input, which means the effect of the measured output signal and thus the effect of the disturbances or plant/model mismatch is not taken into account. The forced response is calculated on the basis of a linearized model using the control increments. Formally this method is very similar to the superposition of the free and forced responses in the linear process case.
10.5 Control Based on Nonlinear Free and Linearized Forced Responses
(a) The free response is calculated based on the last manipulated variable
(b) The free response is calculated based on the last manipulated variable sequence
Figure 10.15 Input signals of the forced and free responses.
2. A nonlinear free response based on the last manipulated signal sequence: The free response is calculated on the basis of the manipulated variable sequence during the whole control horizon (Figure 10.15b). Of course, the old sequence has to be shifted by one sampling time to the past and the missing last value (in the future) is set equal to the old last value. The forced response is calculated on the basis of a linearized model using the control increments. This method differs also formally from the linear process case because now the free response is based on the (shifted) whole control signal sequence and the forced response has only to calculate the difference from the (past) optimal prediction. In the ideal case the forced response and therefore the calculated control increments would be zero. Some remarks [18]: 1. As the free and forced responses in the two cases are completely different, the same weighting factors lead to different control behaviors. 2. With both methods the integrating effect is missing, which means disturbances are not compensated for by the pure control algorithm. 3. Disturbances can be estimated as the deviation between the measured and the predicted current output signals based on the process model and the past measured values. This algorithm is explained below. The estimated disturbance at the process output is O 1, k 2, . . . , k n) y (k) , y bias (k) D y(kjk
(10.61)
where y(kjk O 1, k 2, . . . , k n) is the predicted output signal based on past measurements. Here n is the model order (i.e., length of memory). The disturbance can be compensated for if the reference signal is reduced by the estimated disturbance: y r (k) D y r (k) y bias (k) ,
(10.62)
where y r (k) is the modified reference signal. In the simplest case the disturbance is assumed to be constant and also the future (n e steps ahead predicted) reference
423
424
10 GPC of Nonlinear SISO Processes
signals are shifted by the same value as the present one: y r (k C d C 1 C n e ) D y r (k) . A similar approach has been applied in the first formulations of predictive control (IDCOM and DMC).
10.6 Case Study: Level Control of a Two-Tank Plant
A level control system built in the Department of Automation and Applied Informatics, Budapest University of Technology and Economics, is analyzed. The pilot plant consists of two tanks with free outflow. The upper tank is filled by a pump and the water stream is controlled by a valve. The water leaving the upper tank fills the lower tank. 10.6.1 Nonlinear Process Model of the Two-Tank Process
Figure 10.16 shows the scheme of a two-tank system. The inlet water flow is denoted by u 1 , and the outlet flows are y 1 and y 2 , respectively. The water levels are denoted by h 1 and h 2 . The cross sections of the tanks are A 1 and A 2 . The cross sections of the tubes are denoted by a. A model of the plant can be derived from physical equations. From the balance of the potential energy and the motion energy the outflow velocity v1 of the upper tank is obtained by the relationship m g h1 D
1 mv2 I 2 1
hence,
v1 D
p
2g h 1 .
The outlet flow of the upper tank is p p p y 1 D µ av1 D µ a 2g h 1 D k1 h 1 ,
Figure 10.16 Two-tank system.
10.6 Case Study: Level Control of a Two-Tank Plant
where µ is the viscosity factor and k1 is a constant factor. The changes of the two levels can be written as 1 k1 p u 1 y1 d h1 D u1 h1 , D dt A1 A1 A1 p p 1 d h2 D (k1 h 1 k2 h 2 ) . dt A2 Introducing the relative units h r e l D h/ h m a x and u r e l D u/u m a x , one can rewrite the equations as p p k1 h 1m a x p 1 u 1m a x d h 1r e l u 1r e l h 1r e l D β 1r e l u 1r e l γ1r e l h 1r e l , D dt A 1 h 1m a x A 1 h 1m a x p p p k1 h 1m a x k2 h 2m a x p d h 2r e l D h 1r e l h 2r e l dt A 2 h 2m a x A 2 h 2m a x p p D β 2r e l h 1r e l γ2r e l h 2r e l . If A 1 D A 2 and h 1m a x D h 2m a x , then β 2r e l D γ1r e l . The nonlinear system can be linearized around the working point using the first two terms of the Taylor expansion: ˇ @ f (x) ˇˇ ∆x . f (x) f (x0 ) C @x ˇ xDx0 The square root function can be linearized by its Taylor series: p ˇ p p p @ f ( h) ˇˇ 1 h D h0 C ∆ h D h0 C p ∆ h . ˇ @h ˇ 2 h0 hDh 0
The physical variables can be expressed with small variation around the working points as u 1r e l D u 10r e l C ∆ u 1r e l I h 1r e l D h 10r e l C ∆h 1r e l I h 2r e l D h 20r e l C ∆ h 2r e l . The linearized system of equations are as follows: p d(h 10r e l C ∆ h 1r e l ) D β 1r e l (u 10r e l C ∆ u 1r e l ) γ1r e l h 10r e l dt ∆ h 1r e l γ1r e l p , 2 h 10r e l ! p ∆ h 1r e l d(h 20r e l C ∆ h 2r e l ) D β 2r e l h 10r e l C p dt 2 h 10r e l ! p ∆ h 2r e l γ2r e l . h 20r e l C p 2 h 20r e l
425
426
10 GPC of Nonlinear SISO Processes
u ≡u1rel
t
β 1rel
100
∫(.)dτ τ
h1rel
=0
t
β 2rel (.)
100
∫(.)dτ τ
y h2rel
=0
γ1rel (.)
γ 2rel (.)
Figure 10.17 Block scheme of the nonlinear model of the two-tank process.
Hence, the steady-state relationships between the working points become p d h 10r e l D 0 D β 1r e l u 10r e l γ1r e l h 10r e l , dt p p d h 20r e l D 0 D β 2r e l h 10r e l γ2r e l h 20r e l . dt It is seen that the working points are not independent: the inlet flow determines the working point level of the upper tank, which influences the working point level of the lower tank. The relationship between the small variations around the working points is d∆ h 1r e l D β 1r e l ∆ u r e l α 1r e l ∆ h 1r e l , dt d∆ h 2r e l D δ 2r e l ∆ h 1r e l α 2r e l ∆ h 2r e l , dt where γ1r e l α 1r e l D p I 2 h 10r e l
γ2r e l α 2r e l D p I 2 h 20r e l
β 2r e l δ 2r e l D p . 2 h 10r e l
(10.63)
The parameters were determined from simple measurements on the system (filling and emptying the tank): u 10r e l D 0.6, β 1r e l D 0.0033, γ1r e l D 0.003, β 2r e l D γ1r e l D 0.003, and γ2r e l D 0.00378. Acceleration by a factor of 100 was applied at the integrators to decrease the settling time during the simulations. A block scheme of the nonlinear model of the tank is shown in Figure 10.17. The static characteristic of the system for the level in the lower tank and the input flow is shown in Figure 10.18. In the sequel the input u 1r e l is denoted by u and the output h 2r e l by y: u u 1r e l I
y h 2r e l .
10.6.2 Level Control of the Two-Tank Process
First the level of the lower tank is controlled at a working point by a linear Proportional plus Integral plus Derivative (PID) controller. Then level control based on an estimated generalized Hammerstein and a parametric Volterra model is shown.
10.6 Case Study: Level Control of a Two-Tank Plant Y
0.8
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
U
Figure 10.18 Level in the lower tank versus the input flow.
10.6.2.1 Linear PID Control of the Two-Tank System The linearized model was calculated around the (relative) working point u 0r e l D 0.6. The steady-state level values can be calculated from the steady-state equations:
p 0 D 0.0033 0.6 0.003 h 10r e l , p p 0 D 0.003 h 10r e l 0.00378 h 20r e l , which results in h 10r e l D 0.4356 and h 20r e l D 0.2744. The linearized equations in the vicinity of the working point are d∆ h 1r e l ∆ h 1r e l D 0.0033∆ u 1r e l 0.003 dt 2 0.6600 D 0.0033∆ u 1r e l 0.002273∆ h 1r e l , ∆ h 1r e l ∆ h 2r e l d∆ h 2r e l D 0.003 0.00378 dt 2 0.6600 2 0.5238 D 0.002273∆ h 1r e l 0.0036∆ h 2r e l . The transfer function between the input flow and the level in the lower tank becomes y (s) ∆ h 2r e l (s) ∆ h 1r e l (s) ∆ h 2r e l (s) 1.452 0.6299 D D D u(s) ∆ u(s) ∆ u(s) ∆ h 1r e l (s) 1 C 446s 1 C 277s 0.9146 . D (1 C 446s)(1 C 277s) The simulation model was accelerated by time factor 100; thus, the transfer function of the process model becomes G p (s) D
0.9146 . (1 C 4.46s)(1 C 2.77s)
427
428
10 GPC of Nonlinear SISO Processes
u limited u limited
(a)
controlled variable
(b)
manipulated variable
Figure 10.19 Linear PID control of the two-tank process without (solid line) and with (dashed line) constraints of the manipulated variable.
A linear PID controller with a moderated differentiating effect was designed for a phase margin of 60 degrees. Its transfer function is G c (s) D 3.25
(1 C 4.46s)(1 C 2.77s) . 4.46s(1 C s)
The reference, the controlled, and the manipulated signals are given in Figure 10.19. The reference signal at time point t D 10 s changes from 0 to 0.2, then at t D 100 s to 0.3, at t D 150 s to 0.2 again, and at t D 200 s to 0.6. The manipulated variable is limited by the valve position: 1 u(k) 1. For a bigger change in the reference signal the controller output would exceed the upper limit. Figure 10.19 shows the control without constraints (solid line) and by cutting the controller output at the upper limit (dashed line). The linear PID control gives good performance in the neighborhood of the working point for which it was designed (e.g., y r h 2r e l , 0.2 ! 0.3, which belongs to input around u D 0.6.). For bigger changes of the reference signal (e.g., y r h 2r e l , 0.2 ! 0.6) the overshoot in the controlled signal is higher. For bigger reference signal changes a control algorithm based on a globally valid nonlinear model of the plant has to be designed. In the sequel the two-tank system is identified with its parametric Volterra model, then a nonlinear predictive control algorithm based on this model is applied. 10.6.2.2 Identification of the Two-Tank System in the Form of a Second-Order Volterra Model The model of the two-tank system is excited by a random signal composed of uniformly distributed random numbers in the interval [0, 1]. Each value is kept constant for 20 sampling points. The input and output data are collected and then off-line LS parameter estimation is executed supposing a second-order parametric Volterra model. The input and the output data of the level of the lower tank are shown in Figure 10.20. The identified Volterra model of the tank is given by the following relationship:
y(k) O D 0.0017 C 1.5358y (k 1) 0.6176y (k 2) C 0.0695u(k 1) 0.0697u(k 2) 0.0195u2 (k 1) C 0.0593u(k 1)u(k 2) C 0.0163u2 (k 2) .
10.6 Case Study: Level Control of a Two-Tank Plant
(a)
(b)
input flow
water level in the lower tank
Figure 10.20 Input and output signals for identification. Y 0.8 Y 0.6 Y 0.4
0.2 Y 0
0
Y 0.2
0.4
0.6
0.8
U
Figure 10.21 Static characteristic of the two-tank model and of its parametric Volterra model approximation.
From this model a quadratic polynomial static characteristic is calculated in the following form: YO D 0.0208 0.0034U C 0.6861U 2 . The estimated static characteristic approximates well the nonlinear function of the level model as shown in Figure 10.21. The control of the two-tank model is based on its identified Volterra model. 10.6.2.3 Predictive Control of the Two-Tank System Based on Its Second-Order Volterra Model The identified Volterra model is used in the predictive control algorithm to calculate the manipulated variable. The output signal is calculated on the basis of the physical model of the plant. The reference signal changes from 0 to 0.2, then to 0.3 and to 0.2 again, and finally a big jump changes the signal to 0.6. The iterative algorithm [21] was applied with the following parameters: n e1 D 1, n e2 D 5, n u D 1, and λ u D 2. Figure 10.22 shows the controlled and the manipulated signals. The control gives good performance in the whole range of the reference signal. In the case of the last input change, there is an acceptably small overshoot and the manipulated variable remains within the limits. This algorithm provides better performance than the linear PID control.
429
430
10 GPC of Nonlinear SISO Processes
(a)
(b)
controlled variable
manipulated variable
Figure 10.22 Nonlinear predictive control of the two-tank system with the iterative algorithm.
10.6.3 Level Control Based on Linearized Models
The following simulations from Honc [18] show the restricted feasibility of linearized models for large working domains but their validity for a small working point range. The nonlinear level model was linearized at three different working points. The transfer function parameters of the linearized models are presented in Table 10.1. Linear GPC was used with the following parameters: start and end of the prediction horizons n e1 D 0 and n e2 D n u D 19, and weighting of the control increments λ u D 0.01. The following scenario was simulated. The reference signal was changed at time point t D 50 s from 0.05 to 0.15, then to 0.35 at t D 100 s, then to 0.45 at t D 150 s. At time point t D 200 s a disturbance step of magnitude 0.1 was added to the output – a scenario which is an implausible worst case as the level cannot change abruptly in a tank. Figure 10.23 presents the level control alternatively with only the low-level model fitting to y 0 h 20r e l D 0.05 or the high-level model fitting to y 0 h 20r e l D 0.45. The low-level model is adequate for low levels but toward a high level the control tends to oscillate. On the other hand, the high-level model is good for high levels, but the control becomes too slow at low levels. In Figure 10.24a the level is controlled on the basis of the medium-level model. As is seen, this model is a good compromise between the low-level and the highlevel models fitting at the working point y 0 h 20r e l D 0.25, and the control is neither oscillating nor too slow. Of course, better control can be achieved if for low levels the low-level model and for high levels the high-level model is used, as shown in Figure 10.24b. Table 10.1 Linearization working points and model parameters. Model
y 0 D h 20r el
u0
h 10r el
KP
T1 [s]
T2 [s]
Low level Medium level High level
0.05 0.25 0.45
0.26 0.57 0.77
0.08 0.40 0.71
0.39 0.87 1.17
188 420 563
118 265 355
10.6 Case Study: Level Control of a Two-Tank Plant y
y
y
y 0.4
0.4 dist.: 0 → (0.1)
0.2
dist.: 0 → (0.1)
0.2
yr
0
0
50
100
yr 200
150
t [s]
0
u
u
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0
50
(a)
100
200 t [s]
150
0.2
0
50
0
50
(b)
low-level model
100
150
200 t [s]
100
150
200 t [s]
high-level model
Figure 10.23 Linear GPC level control with linearized models. y
y y
y 0.4
0.4 dist.: 0 → (0.1)
0.2
dist.: 0 → (0.1)
0.2 yr
yr 0
0
50
100
150
200 t [s]
0
0
u
u
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0
(a)
50
100
150
200 t [s]
medium-level model
0.2 0
(b)
50
100
150
200 t [s]
50
100
150
200 t [s]
hard switching between low-level and high-level models
Figure 10.24 Linear GPC level control with linearized models.
10.6.4 Level Control Based on Nonlinear Free and Linearized Forced Responses
As is seen in Figures 10.23 and 10.24, the worse control response was obtained with the low-level model when only one linearized model was used. Now it will be shown that a nonlinear controller based on nonlinear free and linearized forced responses can improve the control quality [18]. The free response is calculated on the basis of only the last manipulated variable. Again, the low-level model was used when calculating the forced response. Two control experiments are simulated with
431
432
10 GPC of Nonlinear SISO Processes y
y
y
y 0.4
0.4 dist.: 0 → (0.1)
0.2
dist.: 0 → (0.1)
0.2
yr
yr 0
0
50
100
150
200
t [s]
0
u
u
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0
(a)
50
100
150
200 t [s]
without disturbance estimation and set point modification
0.2
0
0
(b)
50
100
150
200 t [s]
50
100
150
200 t [s]
with disturbance estimation and set point modification
Figure 10.25 GPC level control with nonlinear free response based on the last manipulated signal and linearized forced responses. y yr
0.4
y
y
0
50
100
150
200 t [s]
0 u
0.8
0.8
0.6
0.6
0.4
0.4
(a)
0.2 0
50
100
150
200 t [s]
without disturbance estimation and set point modification
dist.: 0 → (0.1)
0.2
u
0.2
y
y
yr
0.4 dist.: 0 → (0.1)
0.2 0
y
(b)
0
0
50
100
150
t [s]
50
100
150
t [s]
with disturbance estimation and set point modification
Figure 10.26 GPC level control with nonlinear free response based on the last manipulated signal sequence and linearized forced responses.
each controller in Figure 10.25: without and with the set point modification based on the estimated disturbance according to (10.61) and (10.62). Figure 10.26 presents the nonlinear GPC based on nonlinear free and linearized forced responses. The free response is calculated on the basis of the last manipulated variable sequence in the whole control horizon. Again, the low-level model was used when calculating the forced response. Two control experiments are sim-
10.7 Summary
ulated with each controller: without and with the set point modification based on the estimated disturbance according to (10.61) and (10.62). The control is fast and almost aperiodic in both cases (Figures 10.25a and 10.26a) and compensates for the disturbance fast (Figures 10.25b and 10.26b). The set point control is a bit faster in Figure 10.26 than in Figure 10.25. The same weighting factors of the control deviations were used; however, the meaning of these control deviations is not the same, as was explained in Section 10.5. (If the free response is calculated on the basis of the control sequence in the whole control horizon, then the control deviations are not equal to the manipulated variable increments.)
10.7 Summary
Real processes generally contain nonlinearities. Control algorithms considering the nonlinear nature of the process would provide better control performance in the whole operating range than linear algorithms. Different (nonparametric and parametric) nonlinear models were derived. The nonparametric forms are predictive by nature, where the effect of the past inputs and the effect of the future input activities on the model output in a given prediction horizon can be immediately separated. Predictive equations of the parametric Hammerstein and Volterra models were derived. Predictive control algorithms using the predictive model equations were given under different conditions. Simulation results demonstrated the effectiveness of the algorithms. A case study of controlling the level in a two-tank system was shown. The system model was derived, then three techniques were presented for controlling the nonlinear dynamic process: control based on linearized models, control based on nonlinear (quadratic) models, control based on superposition of a nonlinear free response and a free response from a linearized model. The linearized models can be applied optimally only in the near vicinity of a working point (which is usually fulfilled with compensation disturbances at a constant set point but not with set points changes). Consequently, different linearized models have to be used at different working points. This technique is equivalent to the hard switching among different multimodels. Chapter 9 presented further control methods of nonlinear processes based on multimodels and multicontrollers using soft switching and merging techniques between the working points where the submodels are valid. Nonlinear dynamic models (e.g., with quadratic steady-state characteristics) can also be applied for set point changes. However, the control algorithm is nonlinear even without considering constraints. Suboptimal strategies, such as assuming a constant manipulated signal or a constant control signal increment during the whole control horizon, reduce the dimension of the minimization problem
433
434
10 GPC of Nonlinear SISO Processes
to a scalar problem in the SISO case. Faster control can be achieved by multidimensional optimization of the control signal in the manipulated variable horizon. However, multidimensional optimization requires longer computation time than a suboptimal control algorithm using one-dimensional optimization. The superposition of a nonlinear free response and a free response from a linearized model is a good compromise between using only a linear model and using only a nonlinear model. The two different techniques, calculating the free response from the last manipulated variable or from the predicted manipulated variable sequence, lead to different control behaviors even with the same weighting factor for the control deviations. With this technique the control algorithm is not an integrating one and, therefore, disturbances are not compensated for by the control algorithm itself. One way to compensate for the disturbance is to modify the set point with the difference between the measured output and the predicted model output.
References 1 Beghelli, S. and Guidorzi, A. (1976) Bilinear System Identification from Input/Output Sequences, Proceedings of the 4th Symposium on Identification and System Parameter Estimation, Tbilisi, USSR, pp. 360–370. 2 Camacho, E.F. and Bordons, C. (2004) Model Predictive Control, 2nd edn, Springer Verlag, London. 3 De Keyser, R. (1998) A Gentle Introduction to Model Based Predictive Control, Proceedings of the International Conference on Control Engineering and Signal Processing, European Union EC-ALFAPADI2, Piura, p. 16. 4 Doyle, F.J., Pearson, K., and Ogunnaike, B.A. (2001) Identification and Control Using Volterra Models, Springer, London. 5 Goodwin, G.C. and Sin, K.S. (1984) Adaptive Filtering, Prediction and Control, Prentice Hall, Upper Saddle River, New Jersey, USA. 6 Gruber, J.K., Bordons, C., Bars, R., and Haber, R. (2010) Nonlinear predictive control of smooth nonlinear systems based on Volterra models. Application to a pilot plant. International Journal of Robust and Nonlinear Control, 20(16), pp. 1817–1835. 7 Haber, R. (1992) Transformation of the absolute descriptions of linear and nonlinear processes to their incremental
8
9
10
11
12
forms. International Journal of Systems Science, 23(6), 935–955. Haber, R. (1995) Predictive control of nonlinear dynamic processes. Applied Mathematics and Computation, 70, 169– 184. Haber, R. and Bars, R. (1995) Extended Horizon Predictive Control of Non-Linear Systems – Multi-Dimensional Optimisation and Suboptimal Solution, Proceedings of the 10th IFAC Workshop on Control Applications of Optimization, Haifa, Israel. Haber, R., Bars, R., and Arousi, F. (2009) An Iterative GPC-Like Predictive Control Algorithm for the Parametric Volterra Model, Proceedings of the European Control Conference, Budapest, Hungary, pp. 3383–3388. Haber, R., Bars, R., and Lengyel, O. (1998) Long-Range Predictive Control of the Parametric Hammerstein Model, Proceedings of the IFAC Symposium on Nonlinear Control Systems Design, Vol. 2, Enschede, The Netherlands, pp. 434– 439. Haber, R., Bars, R., and Lengyel, O. (1999a) Nonlinear predictive control algorithms with different input sequence parameterizations applied for the quadratic Hammerstein and Volterra models, in Nonlinear Predictive Con-
10.7 Summary
13
14
15
16
17
trol (eds F. Allgöwer and A. Zheng), Birkhäuser Verlag, Basel. Haber, R., Bars, R., and Lengyel, O. (1999b) Sub-optimal nonlinear predictive and adaptive control based on the parametric Volterra model. AMCS Applied Mathematics and Computer Science, 9(1), 161–173. Haber, R. and Keviczky, L. (1974) Adaptive dual extremum control by finite order Volterra model. Problems of Control and Information Theory, 3(4), 247–260. Haber, R. and Keviczky, L. (1976) Identification of Nonlinear Dynamical Systems – Survey Paper, Proceedings of the 4th IFAC Symposium on Identification and System Parameter Estimation, Tbilisi, USSR, pp. 62–112. Haber, R. and Keviczky, L. (1999a) Nonlinear System Identification – InputOutput Modeling Approach. Volume 1: Nonlinear System Parameter Identification, Kluwer Academic Publishers, Dordrecht, The Netherlands. Haber, R. and Keviczky, L. (1999b) Nonlinear System Identification – InputOutput Modeling Approach. Volume 2: Nonlinear System Structure Identification, Kluwer Academic Publishers, Dordrecht, The Netherlands.
18 Honc, D. (2006) Nonlinear generalized predictive control based on nonlinear free and linearized forced responses, Research study, Laboratory of Process Automation, Institute of Process Engineering and Plant Design, Cologne University of Applied Sciences. 19 Lachmann, K.H. and Godecke, W. (1982) Ein parameteradaptiver Regler für nichtlineare Prozesse (A parameter adaptive controller for nonlinear processes). Regelungstechnik, 30(6), 197–206. 20 Leontaritis, I.J. and Billings, S.A. (1985) Input-output parametric models for non-linear systems. Part I: Deterministic non-linear systems. International Journal of Control, 41(2), 303–328. 21 Maner, B.R., Doyle, F.J., Ogunnaike, B.A., and Pearson, K. (1996) Nonlinear model predictive control of a simulated multivariable polymerization reactor using second-order Volterra models. Automatica, 32(9), 1285–1301. 22 Trierweiler, J.O. and Secchi, A.R. (2000) Exploring the Potentiality of Using Multiple Model Approach in Nonlinear Model Predictive Control, Proceedings of the Nonlinear Model Predictive Control, Vol. 26 (eds F. Allgöwer and A. Zheng), Birkhäuser, Basel, pp. 192–203.
435
437
11 Predictive Functional Control The linear Generalized Predictive Control (GPC) algorithm can be set up for both Single-Input, Single-Output (SISO) and Multi-Input, Multi-Output (MIMO) processes in a similar form using vector/matrix description. The cost function can be minimized analytically if no constraints are present; however, matrix inversion is necessary in the usual long-range horizon case. In the presence of constraints, either an online iterative optimization or a precomputed off-line optimization with a piecewise unconstrained control is required. Some commercial program packages offer algorithms for industrial applications. Such predictive program packages can also be used for SISO processes; however, there is a desire to use a simpler control algorithm which can be programmed by the users in Programmable Logic Controllers (PLCs) or Distributed Control Systems (DCSs). Richalet et al. [6] recommended Predictive Functional Control (PFC) as a simple predictive control algorithm for SISO processes. The simplicity of the PFC algorithm with a constant reference signal is due to the fact that the control variable is optimized only for a single point in the future (one-step-ahead strategy) and the manipulated signal is assumed to be constant during the control horizon. Therefore, PFC does not require matrix inversion or numerical minimization in this case. Further, the manipulated variable and/or its increment as well as other variables can be constrained in a straightforward way. In the sequel the PFC algorithm assuming a constant reference signal is shown for linear aperiodic processes with dead time and modeled by parallel connection of first-order submodels. Possible extension with disturbance feed-forward is also presented. Linear PFC algorithms can easily be extended for nonlinear processes approximated by a Linear Parameter Varying (LPV) model, which is a quasi-linear model having signal-dependent parameters. This algorithm is presented as well. As a case study, linear and nonlinear temperature control of a hot air blower is shown by using an industrial process control system.
Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
438
11 Predictive Functional Control
11.1 Control Strategy and Controller Parameters for a Constant Set Point
The principle of PFC is that the controlled variable y achieves the reference trajectory at the target point (or points) using one (not necessarily constant) change in the manipulated variable u(k). The desired change in the controlled variable during the prediction horizon (from the current time k and the dead time d) is calculated from the desired change of the reference trajectory and the predicted change of the model output. Richalet and O’Donavan [5] also considered the case of a not constant reference signal. In the sequel the reference signal is assumed for simplicity to be constant. In this case, the PFC algorithm is based on the following assumptions: The reference signal is assumed to be constant in the future. The control aim is to track a reference trajectory which follows the reference signal with a delay. The reference trajectory starts after d (dead time) steps from the (predicted) controlled value and tends to the reference or set value according to a given predefined function. (There is no sense in starting the reference trajectory earlier because the process cannot react earlier to any change in the manipulated signal.) Richalet et al. [6] recommended nearing the set value by a first-order exponential function, which means a reference model with a first-order time lag. The control target is to achieve the reference trajectory in some n p prediction steps. The manipulated variable is constant during the prediction horizon. The manipulated variable is calculated in every control step again according to the receding horizon strategy. The minimum value of the prediction horizon (if no dead time exists) is 1. The extended prediction horizon n e is the prediction horizon n p minus 1, defined and used originally in Richalet and O’Donavan [5] and Richalet et al. [6]. Thus, n e D n p 1. The control strategy is shown first for the case when the manipulated and the controlled values were zero in the past and the process has no dead time. The reference, manipulated, and controlled signals and the predicted model output are shown in Figure 11.1. According to the PFC strategy, the control signal has to achieve the reference trajectory y rt r in the discrete-time (coincidence) point k C 1 C ne: y (k C 1 C n e ) D y rt r (k C 1 C n e ) . The future output signal is predicted on the basis of the process model: O C 1 C n e jk) . y (k C 1 C n e ) y(k Consequently, the manipulated signal can be calculated from (11.1) y(k O C 1 C n e jk) D y rt r (k C 1 C n e )
(11.1)
11.1 Control Strategy and Controller Parameters for a Constant Set Point
Reference signal yr
Controlled variable y
∆y
y(k)
Reference trajectory yrtr Future y
Predicted y
Model output y
∆y
Manipulated variable u u(k<0)=0 k k+1 past
k+1+ne
Prediction horizon future
Figure 11.1 PFC control strategy for a process without dead time and with zero initial conditions.
as the predicted model output depends on the model equation and the manipulated signal. If the initial conditions are zero (i.e., the manipulated and controlled values are zero) but the process has dead time, then the reference trajectory has to be achieved at the coincidence point k C d C 1 C n e (see Figure 11.2): y (k C d C 1 C n e ) D y rt r (k C d C 1 C n e ) .
(11.2)
The future output signal is predicted on the basis of the process model without dead time: y (k C d C 1 C n e ) D yO no-dead (k C 1 C n e jk) .
(11.3)
Consequently, the manipulated signal can be calculated from (11.4) yO no-dead (k C 1 C n e ) D y rt r (k C d C 1 C n e jk)
(11.4)
as the predicted model output depends on the model equation and the manipulated signal. If the initial conditions were zero, then the controlled signal keeps its zero value in the time interval k to k Cd, as is seen in Figure 11.2. However, if the manipulated signal was not zero in the past, then the controlled signal changes from y (k) to y (k C d); see Figure 11.3. Equations (11.2)–(11.4) are valid further on. According to the PFC strategy, the control signal has to follow the reference trajectory y rt r , which is a filtered reference signal starting from the future controlled
439
440
11 Predictive Functional Control Reference signal yr Future y Controlled variable y
∆y
y(k)
Reference trajectory yrtr
d
Model (without dead time) output y
∆y
Predicted y (without dead time)
Manipulated variable u u(k<0)=0 k past
k+d future
k+1+ne
k+d+1+ne
Prediction horizon
Figure 11.2 PFC control strategy for a process with dead time and zero initial conditions. Reference signal yr Controlled variable y
Future y ∆y
y(k+d) y(k)
Reference trajectory yrtr
d
Model (without dead time) output y
∆y
Predicted y (without dead time)
Manipulated variable u u(k<0)=0 k past
k+d future
k+1+ne
k+d+1+ne
Prediction horizon
Figure 11.3 PFC control strategy for a process with dead time and a not zero steady-state condition.
output variable dead time ahead of the current time. The reference trajectory is calculated in each control step and therefore it is not equal to any linearly filtered reference signal. The difference between the constant set value and the reference trajectory is in the discrete-time point after the dead time k C d: e r (k C d) D y r y rt r (k C d) .
11.1 Control Strategy and Controller Parameters for a Constant Set Point
Reference signal yr Controlled variable y
er(k+d)
er(k+d+1)
er(k+d+1+ne)
Reference trajectory yrtr
er(k) y(k+d) y(k) k
k+d k+d+1
k+d+1+ne
Figure 11.4 Predicted changes of controlled output.
The future bias between the set value and the reference trajectory is supposed to have an equal decrement ratio in each step: e r (k C d C 1) D λ r e r (k C d) , e r (k C d C 2) D λ r e r (k C d C 1) D λ 2r e r (k C d) ,
e e y r y rt r (k C d) . e r (k C d C 1 C n e ) D λ 1Cn e r (k C d) D λ 1Cn r r
(11.5)
Figure 11.4 shows the constant reference signal (set value) and the predicted reference trajectory calculated with filtering of the reference signal change by a firstorder filter from time point k C d. The increase of the reference trajectory 1 C n e prediction steps ahead of the current time plus the dead time becomes ∆y rt r (k C d C 1 C n e ) D e r (k C d) e r (k C d C 1 C n e jk) e e r (k C d) D 1 λ 1Cn r e y r y (k C d) . D 1 λ 1Cn r
(11.6)
The reduction of the bias between the reference signal and its trajectory can be described by an exponential function, like the difference between the step response of a PT1 (proportional, first-order) process with time constant Tr and its final value. The reference trajectory can be described by the continuous-time function Tp y rt r (t C Td C T p ) D y (t C T d ) C y r y (t C T d ) 1 e Tr , t Td , where t is the current time and T p is the prediction time beyond the dead time. Tp ∆y rt r (t) D y rt r (t) y (t C Td ) D y r y (t C Td ) 1 e Tr , t Td . (11.7) The output signal is not known at the continuous-time point t D Td . It is assumed that the change in the controlled variable during the dead time is equal to the change in the output of the process model (assuming the same input signal, namely, the manipulated signal), y (t C Td ) y (t) D yOno-dead (t) yOno-dead (t Td ) ,
441
442
11 Predictive Functional Control yr -y(t+Td)
e-sTd 1+sTr
y(t+Td )
∆yrtr
∑
yrtr
Figure 11.5 Reference signal filter.
and, consequently, y (t C Td ) D y (t) C yOno-dead (t) yOno-dead (t Td ) .
(11.8)
On the basis of (11.7), the reference trajectory can also be defined as the output of a reference signal filter, as is seen in Figure 11.5. The reference trajectory changes like the output of a first-order process with time constant Tr , and achieves 95% of the set point change without overshoot within settling time 3Tr . The relation between the parameter λ r and the filter time constant is ∆T . (11.9) λ r D exp Tr The control target is that the controlled output signal will achieve the reference trajectory in d C 1 C n e steps without error, which means y(k O C d C 1 C n e ) D y rt r (k C d C 1 C n e ) . This boundary value problem is equivalent to the minimization of the quadratic cost function 2 J D y rt r (k C d C 1 C n e ) y(k O C d C 1 C n e jk) ) min , u(k)
known as one-step-ahead optimization without penalizing the manipulated variable (or its increment). The expected course of the controlled variable coincides with the course of the reference trajectory. Consequently, the controlled variable of the closed control loop should behave like a first-order process with time constant T D Tr , and achieve 95% of the set point change without overshoot within settling time Tc D 3Tr . By changing Tc , the controlled variable can speed up or slow down. The course of the controlled variable also depends on n e : extended prediction horizon, λ r : reduction ratio of the successive control errors (0 λ r 1), ∆T 3∆T ∆T D exp , D exp λ r D exp Tr Tc /3 Tc
(11.10)
where ∆T is the sampling time and Tc is the desired settling time (till the 95% value).
11.2 PFC for Aperiodic Processes
Richalet and O’Donavan [5] recommend the choice of the length of the (extended) prediction horizon as extended prediction horizon n e D 0 (or the prediction horizon n p D n e C1 D 1) for first-order processes, the discrete-time point of the inflection point of the step response for aperiodic processes of higher order minus 1. As the length of the prediction horizon is given by the process model, the only free controller parameter is the desired settling time Tc (called the Closed-Loop Time Response and denoted by CLTR in [5]). As with any predictive control algorithm, the future value of the controlled variable is predicted using the process model generally having dead time y(k O C d C 1C n e jk). Of course, the predicted model output can also be calculated from the process model without the dead time yOno-dead (k C 1 C n e jk) d steps before. In Richalet et al. [6] and Richalet and O’Donavan [5] the model without dead time has the index m. From (11.4)–(11.6), we conclude that e (1 λ 1Cn ) y r y (k C d) D ∆ yOno-dead (k C 1 C n e jk) . r
(11.11)
With knowledge of the process model equation (without the dead time) the constant manipulated signal can be calculated from (11.11). Depending on the process model, one can derive different control algorithms. The manipulated variable is calculated in every control step again according to the receding horizon strategy; thus, it does not remain constant as assumed in the control horizon. Further, the reference trajectory also becomes not equal to a linearly filtered reference signal as the new reference signal trajectory always starts from the predicted value of the controlled variable dead time beyond the current time.
11.2 PFC for Aperiodic Processes
In this section only linear aperiodic processes are treated. The PFC algorithm is presented for further linear process models (e.g., integrating, oscillating, etc.) in Richalet and O’Donavan [5]. 11.2.1 PFC for First-Order Processes without Dead Time
A PT1 model without dead time can be described by the following difference equation: O 1)Cb 1 u(k 1) D a 1 y(k O 1)CK p (1Ca 1 )u(k 1) , (11.12) y(k) O D a 1 y(k
443
444
11 Predictive Functional Control
with gain K p , time constant T1 , and the parameter of the difference equation a 1 D exp(∆T/ T1 ). (As the process has no dead time, the lower index “nodead” is superfluous in (11.12).) The prediction of the model output (11.12) can be calculated recursively assuming a constant manipulated signal u(k): O C K p (1 C a 1 )u(k) , y(k O C 1jk) D a 1 y(k) O C 1jk) C K p (1 C a 1 )u(k) y(k O C 2jk) D a 1 y(k D (a 1 )2 y(k) O C K p 1 (a 1 )2 u(k) , ...
i h y(k O C 1 C n e jk) D (a 1 )1Cn e y(k) O C 1 (a 1 )1Cn e K p u(k) .
(11.13)
In (11.12) and (11.13) not only the predicted but also the past and current model outputs are denoted by a predicted symbol. The reason is that the model output is calculated on the basis of previous model output values and not on the measured current process output. The predicted change of the model output 1 C n e step ahead of the current discrete-time k becomes: ∆ y(k O C 1 C n e jk) D yO (k C 1 C n e jk) y(k) O h i h i 1Cn e u(k) 1 (a 1 )1Cn e y(k) O . D K p 1 (a 1 ) (11.14) Substituting (11.14) into (11.11) with d D 0 results in h i h i e (1 λ 1Cn O . ) y r y (k) D K p 1 (a 1 )1Cn e u(k) 1 (a 1 )1Cn e y(k) r (11.15) From (11.15) the manipulated variable can be calculated as u(k) D k0 y r y (k) C k1 y(k) O ,
(11.16a)
with the measured process output y (k) (controlled variable), the model output y(k) O from (11.12), and k0 D
Kp
e 1 λ 1Cn r , 1 (a 1 )1Cn e
k1 D
1 . Kp
(11.16b)
The manipulated variable is superposed from two components: the first term is proportional to the current control error the second term is proportional to the calculated model output divided by the static gain. The control algorithm differs from the Proportional plus Integral (plus Derivative) (PI(D)) and the GPC algorithms as it includes no explicit integrator. It can
11.2 PFC for Aperiodic Processes y 1 0.8 0.6 0.4 0.2 0
yr
dist.: 0
2
4
6
8
10
12
14
controlled variable
Tc=3s
Tc=3s
1
Tc=2s
Tc=2s
Tc=2s
Tc=2s
1.5
Tc=3s
Tc=3s
0
2
Tc=4s
Tc=4s
(a)
u
(–1)
Tc=4s
0.5 16
18 t [s]
0
Tc=4s 0
(b)
2
4
6
8
10
12
14
16
18 t [s]
manipulated variable
Figure 11.6 PFC with n e D 0 and different Tc of a first-order process without dead time.
be shown [5], however, that the algorithm implicitly includes an integrator effect, which means a constant reference signal is followed without any steady-state error. This fact is seen from (11.16) in the steady state because then the first term is zero and the second term is equal to the manipulated variable of the model. Consequently, the manipulated variable applied to the process is equal to the manipulated variable of the process model necessary to ensure a model output equal to the set value. Example 11.1 Predictive functional control of a linear first-order process without dead time The PFC algorithm was applied to a linear first-order process with static gain K p D 1 and time constant of T1 D 1 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 10 s. The sampling time was ∆T D 0.2 s. Some simulations show the effect of the controller parameters. First, the extended prediction horizon was selected as n e D 0, as recommended by Richalet and O’Donavan [5]. It can be seen in Figure 11.6 that the settling time t95% is really equal to the controller parameter Tc . Further, the control can be accelerated by decreasing the desired settling time Tc , of course at expense of a larger initial change in the manipulated variable. With Tc D 3T1 D 3 s the manipulated variable achieves its final value in one control step. Figure 11.7 shows that in this case the control behavior is independent of the prediction horizon. If Tc ¤ 3T1 , then the prediction length also influences the control behavior, that is, the settling time. With the controller choice Tc D 3T1 , the controller parameter (11.10) becomes ∆T ∆T D a 1 D exp λ r D exp Tc /3 T1 and if the model is perfect y (k) D y(k) O , then the manipulated variable is constant during the control as seen in Figure 11.7: u(k) D k0 y r y (k) C k1 y(k) O D
e 1 λ 1Cn 1 1 r y r y (k) C y (k) D yr . Kp Kp K p 1 (a 1 )1Cn e
445
446
11 Predictive Functional Control y 1 0.8 0.6 0.4 0.2 0
yr
u
dist.: 0 → (–1)
2 1.5 ne=0, 2, 4
1 ne=0, 2, 4
0.5 0
2
4
6
(a)
8
10
12
14
16
18 t [s]
0
0
2
4
(b)
controlled variable
6
8
10
12
14
16
18 t [s]
manipulated variable
Figure 11.7 PFC with Tc D 3T1 and different n e of a first-order process without dead time. y 1 0.8 0.6 0.4 0.2 0
yr
u
dist.: 0 → (–1)
2 PFC
1
PI
PI PFC 0
(a)
2
4
6
PI
1.5
8
10
12
PFC
0.5 14
16
controlled variable
18 t [s]
0
0
(b)
2
4
6
8
10
12
14
16
18 t [s]
manipulated variable
Figure 11.8 PFC and PI control of first-order process without dead time (n e D 0, Tc D 3T1 , K c D 0.5, T I D 0, 53 s).
Example 11.2 PFC and PI control of a linear first-order process without dead time Figure 11.8 shows similar control behavior for the PFC and the PI control of the same process as in Example 11.1. The PFC parameters were n e D 0 and Tc D 3T1 , and the PI parameters were K c D 0.5 and TI D 0.53 s. The sampling time was again ∆T D 0.2 s. Although the PI controller tends to result in a slight overshoot, the controlled variable reached the set point almost as quickly as with PFC. The PFC, however, always works aperiodically. The advantages of PFC over the PI controller can be better seen with higher-order processes, shown, for example, in Figure 11.27 for a second-order process. 11.2.2 PFC for Higher-Order Aperiodic Processes without Dead Time
Chemical, heating, ventilating, and air conditioning plants are often described by an aperiodic process of higher order. Such processes can be approximated by parallel connection of first-order processes with different time constants, as shown in Figure 11.9 for a second-order model. The differential equation of the ith submodel is Ti yPO i (t) C yO i (t) D K p i u(t) , Kp1 u
1+sT1
∑
y
Kp2 1+sT2
Figure 11.9 Parallel connection of two first-order models.
11.2 PFC for Aperiodic Processes
with static gain K p i and time constant Ti , and the corresponding difference equation is yO i (k) D a 1i yO i (k 1) C K p i (1 C a 1i )u(k 1) ,
(11.17)
with a 1i as a parameter. If the process is described by a second-order aperiodic process with two time constants, then the second-order model can be replaced by two first-order submodels. Here the special case of when the transfer function has no zero term, that is, the differential equation does not include an input signal derivative, is dealt with: Kp K p1 Kp 2 D C (1 C s T1 )(1 C s T2 ) 1 C s T1 1 C s T2 K p1 (1 C s T2 ) C K p 2 (1 C s T1 ) . D (1 C s T1 )(1 C s T2 ) K p1 and K p 2 can be calculated from the equations K p1 C K p 2 D K p ,
K p1 T2 C K p 2 T1 D 0
and the gains are K p1 D
Kp 1
T2 T1
,
Kp 2 D
Kp 1
T1 T2
.
(11.18)
As is seen, one of the gains has to be negative in this case. If the above relation between the (e.g., identified) gains is not valid, for example, they have the same sign, then the step response of the model may have an overshoot (but no oscillation). The predicted change in the model output 1 C n e steps ahead of the current discrete-time point k is O C 1 C n e jk) y(k) O ∆ y(k O C 1 C n e jk) D y(k n h i X D u(k) K p i 1 (a 1i )1Cn e iD1 n h i X 1 (a 1i )1Cn e yO i (k) .
(11.19)
iD1
Substituting (11.19) in (11.11) with d D 0 results in n h i X (1 λ nr e ) y r y (k) D u(k) K p i 1 (a 1i )1Cn e iD1 n h i X 1 (a 1i )1Cn e yO i (k) . iD1
(11.20)
447
448
11 Predictive Functional Control
From (11.19) the manipulated variable can be calculated as [3, 5] n X k i yO i (k) , u(k) D k0 y r y (k) C
(11.21a)
iD1
with k0 D
e 1 λ 1Cn r n , P K p i 1 (a 1i )1Cn e
ki D
iD1
1 (a 1i )1Cn e n . P K p i 1 (a 1i )1Cn e iD1
(11.21b) The outputs of the first-order subprocesses yO i (k) in (11.21a) can be simulated by (11.17). With a second-order process, (11.21) becomes (11.22a) u(k) D k0 y r y (k) C k1 yO1 (k) C k2 yO 2 (k) , with k0 D
e 1 λ 1Cn r , 1Cn 1Cn e e C K K p1 1 (a 1,1 ) p 2 1 (a 1,2 )
k1 D
1 (a 1,1 )1Cn e . K p1 1 (a 1,1 )1Cn e C K p 2 1 (a 1,2 )1Cn e
k2 D
1 (a 1,2 )1Cn e . K p1 1 (a 1,1 )1Cn e C K p 2 1 (a 1,2 )1Cn e
(11.22b)
The controller equations of the second-order case (11.22) reduce to the first-order case if K P2 D 0, as yO2 (k) D 0 in (11.22a) and k0 and k1 become k0 D
e 1 λ 1Cn r , K p1 1 (a 1,1 )1Cn e
k1 D
1 (a 1,1 )1Cn e K p1 1 (a 1,1 )1Cn e C K p 2 1 (a 1,2 )1Cn e
D
1 (a 1,1 )1Cn e 1 D . K p1 K p1 1 (a 1,1 )1Cn e
Example 11.3 Predictive functional control of a linear second-order process without dead time The PFC algorithm was applied to a linear second-order process with static gain K p D 1 and time constants T1 D 1/3 D 0.333 s and T2 D 2/3 D 0.667 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 10 s. The sampling time was ∆T D 0.05 s. The weighting function (Figure 11.10) of the process model has its maximum value in the inflexion point of the step response curve tinfl D 0.5 s; thus, the extended prediction length was selected as n e D tinfl /∆T 1 D 0.5 s/0.05 s 1 D 9. The pro-
11.2 PFC for Aperiodic Processes
g 0.8 0.6 0.4 0.2 0
0 1 ne+1
2
3
4
5 t [s]
Figure 11.10 Weighting function of the PT2 process. y
yr
1
Tc =1 s Tc=3 s
0.5 0
(a)
0
2
dist.: 0 → (–1) Tc =1 s
4 6 8 controlled variable
Tc =3 s 10 t [s]
u 3 2 1 0 0
(b)
Tc=1 s
Tc=1 s
Tc =3 s Tc =3 s 4 6 8 10 t [s] 2 manipulated variable
Figure 11.11 PFC of a PT2 process with n e D 9 and different desired settling times Tc .
cess was modeled for a simpler prediction by the sum of two first-order processes with the time constants mentioned and the corresponding static gains according to (11.18): K p1 D 1 and K p 2 D 2. The control behavior is shown in Figure 11.11 for two desired settling times Tc D 1 s and Tc D 3 s. As is seen, the settling time till 95% of the set value is indeed as desired. Processes of higher than second order can be controlled in a similar way. The prediction of the process model output can be calculated in different ways: Approximation of the process model by the sum of first-order submodels: If the transfer function of the model is given, then the parameters of the parallel submodels can be calculated by using partial fraction decomposition. This method works even with multiple time constants approximating the equal time constants with only approximately equal values. Calculation of the predictive equation of the process models: The predictive equation can be calculated for a few steps ahead by some substitutions or by solving the corresponding Diophantine equations.
11.2.3 PFC for a First-Order Process with Dead Time
The control equation was given by (11.11) for a dead-time process and the predictive equation of the first-order model without dead time was given by (11.13).
449
450
11 Predictive Functional Control y 1
yr
2 1.5 PFC
PFC
PFC
0.5 PI 0
u
dist.: 0 → (–1)
0
(a)
2
4
8
10
12
14
controlled variable
PI (Tt=0s)
0.5
16
PI (Tt=2s)
1
PI 6
PFC PI (Tt=2s)
18 t [s]
0
PI (Tt=0s) 0
(b)
2
4
6
8
10
12
14
16
18 t [s]
manipulated variable
Figure 11.12 PFC and PI control of a first-order process with dead time.
Substituting (11.13) into (11.11) with d ¤ 0 results in h i e y r y (k C d) D K p 1 (a 1 )1Cn e u(k) 1 λ 1Cn r h i 1 (a 1 )1Cn e y(k) O .
(11.23)
From (11.23) the manipulated variable can be calculated in a similar way as (11.16): u(k) D k0 y r y (k C d) C k1 y(k) O ,
(11.24)
with the same parameters (11.16b) as in the dead-time-free case. The future controlled output value is not known at the current time but its value can be predicted as written in (11.8), y (k C d) D y (k) C y(k) O y(k O d) ,
(11.25)
and with parameters (11.16b) and y(k) O according to (11.12) the control algorithm (11.24) becomes ˚ u(k) D k0 y r y (k) C y(k) O y(k O d) C k1 y(k) O .
(11.26)
The dead time can be taken into account with other process model types in a similar way. Example 11.4 PFC and PI control of a linear first-order process with dead time Figure 11.12 shows the PFC of the same process as in Example 11.1 but now with a dead time of Td D 2 s. The sampling time was again ∆T D 0.2 s. By choosing the controller parameters n e D 0 and Tc D 3T1 , the set point control is fast and aperiodic, and in addition the manipulated variable reaches its final value in a single step. The manipulated variable has the same course without and with dead time and the controlled variable after a set point change is shifted by the dead time Td . The fastest aperiodic PI control based on the T-sum method of Kuhn [4] (without dead time K c D 0.5, TI D 0.53 s, with dead time K c D 0.5, TI D 1.53 s) is slower than the PFC. (The PFC system could be accelerated at the expense of a larger control signal change.)
11.3 PFC with Disturbance Feed-Forward
11.3 PFC with Disturbance Feed-Forward
With feed-forward control the expected impact of a measurable disturbance is taken into account. It is assumed that the source of the disturbance is constant, and that other assumptions would also be possible. The future change of the process output is predicted as the sum of the process and disturbance model output increments, both without dead time: ∆ y(k O C d C 1 C n e jk) D ∆ yOno-dead (k C 1 C n e jk) C ∆ yO v m ,no-dead (k C 1 C n e jk) . (11.27) According to the PFC strategy the value (11.27) should be equal to the change of the reference trajectory at the coincidence point k C d C 1 C n e : e (1 λ 1Cn ) y r y (k C d) D ∆ yOno-dead (k C 1 C n e jk) r C ∆ yO v m ,no-dead (k C 1 C n e jk) .
(11.28)
The algorithm is presented here for a first-order process model with a different first-order disturbance model, first assuming no dead time and then allowing dead time both in the process and in the disturbance model. The extension to higherorder processes can be derived in a similar way. The measured disturbance is denoted by v m (k), the calculated output of the disturbance model by yO v m (k), the static gain of the disturbance model by K p v , the time constant by T1v , and the difference equation is given by the coefficient a 1v D exp(∆T/ T1v ). 11.3.1 Algorithm for First-Order Process and Disturbance Models without Dead Time
First-order process and disturbance models without dead time are assumed. The process model was described by (11.12). The disturbance model equation is yO v m (k) D a 1v yO v m (k 1) C K p v (1 C a 1v )v m (k 1) .
(11.29)
The predicted change of the disturbance model output can be calculated in a similar way to the prediction of the change of the first-order process model output given by (11.14): ∆ yO v m (k C 1 C n e jk) D yO v m (k C 1 C n e jk) y v m (k) h i D K p v 1 (a 1v )1Cn e v m (k) i h 1 (a 1v )1Cn e yO v m (k) .
(11.30)
Taking into account (11.14), (11.28), and (11.30), one can calculate the manipulated variable by O C k1v v m (k) C k2v yO v m (k) , (11.31a) u(k) D k0 y r y (k) C k1 y(k)
451
452
11 Predictive Functional Control y y 1 r 0.8 0.6 0.4 0.2 0 0 2
dist.: 0 → (–1) without with disturbance disturbance feed-forward feed-forward 4
(a)
6
8
10 12 14 16 18 t [s]
controlled variable
u 2 1.5 1 0.5 0
with disturbance feed-forward without disturbance feed-forward 0
(b)
2
4
6
8
10 12 14 16 18 t [s]
manipulated variable
Figure 11.13 PFC of a first-order process with and without feed-forward.
with simulated outputs y(k) O (11.12), yO v m (k) (11.29), and e 1 λ 1Cn 1 r , k1 D , 1Cn e Kp K p 1 (a 1 ) K v m 1 (a 1v )1Cn e 1 (a 1v )1Cn e , k2v D . D 1Cn e K p 1 (a 1 ) K p 1 (a 1 )1Cn e
k0 D k1v
(11.31b)
Example 11.5 PFC feed-forward control of a linear first-order process without dead time Figure 11.13 shows the simulation of PFC with disturbance feed-forward control of the same first-order process without dead time as in Example 11.1. The process has the proportional gain K p D 1 and time constant T1 D 1 s; the disturbance model has the same gain K p v D 1 and a different time constant T1v D 2 s. The sampling time is ∆T D 0.2 s, and the controller parameters are n e D 0 and Tc D 3T1 . The disturbance step from 0 to 1 at t D 10 s is fully compensated for by the feedforward control. The disturbance compensation in this example was shown for the case when the time constant of the disturbance model is greater than the time constant of the process model. This is, however, not a precondition for a complete feed-forward compensation. 11.3.2 Algorithm for First-Order Process and Disturbance Models with Dead Time
Disturbance compensation is possible if the dead time of the disturbance process is greater than (or equal to) the dead time of the process. Suppose the dead time of the disturbance process Td v is not less than the dead time of the process Td . The measured disturbance should therefore act on the control signal after the dead time difference Td v Td ; see Figure 11.14. (The discrete dead time of the disturbance process and its model is denoted by d v D Td v /∆T .) The process output can be predicted by using its value shifted by the dead time. The effect of the dead time d of the process model was given in (11.25). The following effects of the disturbance have to be considered: The effect of disturbance on the process output is delayed by the dead time of the disturbance model d v .
11.3 PFC with Disturbance Feed-Forward
Measured disturbance
Feed-forward
vm
t
t
Tdv
Tdv-Td
yv
m
From feedback controller
yv
u
t
y
Td Process and disturbance model
Figure 11.14 Compensation of a disturbance taking into account the dead times.
Consequently, the resulting increase of the predicted controlled variable during the discrete dead time d can be calculated as follows: yO v m (k (d v d)) yO v m (k d v ) . Therefore, the future controlled variable in (11.28) has to be replaced by y (k C djk) D y (k) C yO (k) y(k O d) C yO v m (k (d v d)) yO v m (k d v ) .
(11.32)
To compensate for the disturbance dead time d v through the manipulated signal, the measured disturbance signal v m (k) has to be shifted by the discrete dead time difference ∆d D d v d: ∆ yO v m (k (d v m d) C 1 C n e jk) D yO v m (k (d v d) C 1 C n e jk) yO v m (k (d v d)) h i D K p v 1 (a 1v )1Cn e v v m (k (d v d)) i h 1 (a 1v )1Cn e y v m (k (d v d)) . It follows from (11.28), (11.32), and (11.33) that ˚ e (1 λ 1Cn ) y r y (k) C y(k) O y(k O d) r C y v m (k (d v d)) y v m (k d v ) h i h i O D K p 1 (a 1 )1Cn e u(k) 1 (a 1 )1Cn e y(k) h i C K p v 1 (a 1v )1Cn e v m (k (d v d)) i h 1 (a 1v )1Cn e yO v m (k (d v d)) .
(11.33)
(11.34)
453
454
11 Predictive Functional Control
After rearrangement of (11.34) the manipulated variable is calculated with the parameters of (11.31b) and using the properly shifted simulated process output y(k) O (11.12) and disturbance model output yO v m (k) (11.29): ˚ u(k) D k0 y r y (k) C y(k) O y(k O d) C yO v m (k (d v d)) yO v m (k d v ) O C k1v v m (k (d v d)) C k2v yO v m (k (d v m d)) . C k1 y(k)
(11.35)
As already mentioned, the controller algorithm is valid only if the dead time of the disturbance process is greater than (or equal to) the dead time of the process, that is, d v d, otherwise the components v m (k (d v d)) and yO v m (k (d v d)) cannot be calculated.
11.4 PFC with Constraints
Constraints can be simply taken into account with PFC. Three different types of limitations can be realized: Constraining the manipulated variable: The calculated manipulated variable has to be limited by the lower u l o w and upper u u p limits: u l o w u(k) u u p . The limited manipulated variable u l i m (k) is 8 ˆ ˆ < u u p if u(k) > u u p u l i m (k) D u(k) if u l o w u(k) u u p . ˆ ˆ :u if u(k) < u l ow
(11.36)
l ow
It is not enough to cut the manipulated signal; the limited manipulated variable has to be used as the input signal of the model in the controller as illustrated in Figure 11.15. Constraining the manipulated variable increments: The calculated manipulated variable increment has to be limited by the lower ∆ u l o w and upper ∆ u u p limits: ∆ u l o w ∆ u(k) ∆ u u p . Here ∆ u(k) D u(k) u l i m (k 1) , where u l i m (k 1) is the last realized (i.e., possible limited) manipulated signal value. As PFC does not calculate with the control increment, the constraint can
11.4 PFC with Constraints yr y(k)
uup
u(k)
PFC
ulim(k)
Process
y(k)
ulow ulim(k)
Figure 11.15 PFC control scheme with constraint of the manipulated signal.
yr y(k)
PFC
u(k)
∆u(k) ∆uup
∆ulim(k) ulim(k)
Process
y(k)
∆ulow
ulim(k-1)
ulim(k-1)
ulim(k)
∆
Figure 11.16 PFC control scheme with constraint of the manipulated signal increments.
be expressed with the manipulated variable itself: u l i m (k 1) C ∆ u l o w u(k) u l i m (k 1) C ∆ u u p .
(11.37)
From (11.37) the limited manipulated signal can be given as 8 ˆ u (k 1) C ∆ u u p ˆ ˆ lim ˆ < u(k) u l i m (k) D ˆ ˆ ˆ ˆ : u l i m (k 1) C ∆ u l o w
if
u(k) > u l i m (k 1) C ∆ u u p
if
u l i m (k 1) C ∆ u l o w u(k)
u l i m (k 1) C ∆ u u p if
.
u(k) < u l i m (k 1) C ∆ u l o w (11.38)
The limited manipulated variable has to be used as the input signal of the model in the controller as illustrated in Figure 11.16. Constraining other variables, for example, the controlled variable: The controlled variable can be predicted as the output of the process model and a violation of any constraints can be checked by simulation of the future values [5]. The limitation procedure of the manipulated signal is demonstrated for a firstorder process; however, the method also works for any process type. Example 11.6 Predictive functional control of a linear first-order process without constraints The PFC algorithm was applied to a linear first-order process with static gain K p D 1 and time constant T1 D 1 s. The set value was increased stepwise at t D 1 s from 0 to 1 and a disturbance of 1 was added to the input of the process at t D 6 s. The sampling time was ∆T D 0.1 s. The controller parameters were selected as n e D 0 and Tc D 0.5 s to have a relatively big initial change in the manipulated signal. Figure 11.17 shows the course of the controlled and the manipulated signals.
455
456
11 Predictive Functional Control y 1
dist.: 0 → (–1)
yr y
0.5 0 0
2
(a)
4 6 8 controlled variable
10 t [s]
u 3 2 1 0 0
2
(b)
4 6 8 10 t [s] manipulated variable
Figure 11.17 PFC of a first-order process without constraints. y 1
dist.: 0 → (–1)
yr y
0.5 0 0
2
(a)
4 6 8 controlled variable
10 t [s]
u 3 2 1 0 0
2
(b)
4 6 8 10 t [s] manipulated variable
Figure 11.18 PFC of a first-order process with cutting (i.e., not correctly constraining) the manipulated signal over 2.0. y 1
yr
dist.: 0 → (–1) y
0.5 0 0
(a)
2
4 6 8 controlled variable
10 t [s]
u 3 2 1 0 0
(b)
2
4 6 8 10 t [s] manipulated variable
Figure 11.19 PFC of first-order process with correctly constraining the manipulated signal below 2.0.
Example 11.7 Predictive functional control of a linear first-order process with limitation of the manipulated signal The PFC algorithm was applied to the same process and with the same controller as in Example 11.6. The manipulated variable was limited to u(k) 2. Figure 11.18 shows the case when the constrained manipulated variable was not fed back to the internal model and Figure 11.19 shows the case when this was done. It can be seen that the control is faster without overshoot if the input signal of the model is the limited signal. Example 11.8 Predictive functional control of a linear first-order process with limitation of the change of the manipulated variable The PFC algorithm was applied to the same process and with the same controller as in Example 11.6. The manipulated variable increments were limited to 0.4 ∆ u(k) 0.4 in each sampling step. Figure 11.20 shows the case when the constrained manipulated variable was not fed back to the internal model and Figure 11.21 shows the case when this was done.
11.5 Nonlinear PFC for Processes with Signal-Dependent Parameters y 1
dist.: 0 → (–1)
yr y
0.5 0 0
2
(a)
4 6 8 controlled variable
10 t [s]
u 3 2 1 0 0
2
(b)
4 6 8 10 t [s] manipulated variable
Figure 11.20 PFC of first-order process with (i.e., not correctly constraining) cutting the manipulated signal increments over ˙0.4 in each control step.
y 1
yr
dist.: 0 → (–1) y
0.5 0 0
(a)
2
4 6 8 controlled variable
10 t [s]
u 3 2 1 0 0
(b)
2
4 6 8 10 t [s] manipulated variable
Figure 11.21 PFC of first-order process with correctly constraining the manipulated signal increments to ˙0.4 in each control step.
It can be seen that the control is faster without overshoot if the input signal of the model is the limited signal.
11.5 Nonlinear PFC for Processes with Signal-Dependent Parameters
Industrial processes are usually nonlinear and require nonlinear control algorithms. Subsystems can be often modeled by quasi-linear models having workingpoint-dependent or signal-dependent parameters. These models are called LPV ones. Linear PFC algorithms can easily be extended for such nonlinear processes: the basic control algorithm remains the same, only the linear model has to be replaced by the nonlinear one. Figure 11.22 illustrates a nonlinear PFC controller which consists of a linear PFC and a static function which calculates the parameters of the linearized differential equation of the process at the different working points. (The linearized model is modeled in Figure 11.22 exemplarily by a dead time Td and static gains and time constants of parallel connected first-order submodels.) A nonlinear PFC controller is necessary only if the process is operated at different working points. As the controller parameters depend on the model parameters of the LPV model, they have to be computed at every sampling point – in contrast to the case of linear PFC, whose parameters are constant and can be stored as constant data values. Alternatively, a threshold can be defined and the controller parameters have to be updated only when the operating point change exceeds a threshold value. (The latter method is similar to the case when a control error dead band exists in a controller.)
457
458
11 Predictive Functional Control Noninear PFC y(k) yr(k) ne Tc Td(k) Kp1(k) x(k) Working point
Linear or nonlinear function
T1(k)
u(k)
Linear PFC
Kp2(k) T2(k)
Figure 11.22 Nonlinear PFC for second-order nonlinear processes with signal dependent parameters.
Some applications are described in Richalet and O’Donavan [5] and Zabet et al. [7].
11.6 Case Study: Temperature Control of a Hot Air Blower
The pilot plant LTR-701 [1] (Figure 11.23a) is a hot air blower with voltage and current connectors for measurement and control. The air is sucked over the centrifugal blower through a throttle flap. The air is heated by the heater and flows through the tube. The temperature is measured at two points with thermocouples (y T1 and y T 2 ) and the mass flow y mL P is calculated from the measured pressure difference in an orifice plate at the end of the tube. (The air density is assumed to be known and constant.) The measurement signal and control signal ranges are 0–10 V or 4–20 mA, respectively. Temperature Temperature yT 1 yT 2 Throttle flap Heater Centrifugal fan
(a)
Flow ym
L
mL
Heating uT Fan uF photo
Figure 11.23 Amira LTR-701 hot air blower.
(b)
Temperature yT Flow ymL input/output model
11.6 Case Study: Temperature Control of a Hot Air Blower
11.6.1 Physical Model of the Pilot Plant
Neglecting the temperature change of the tube, the air temperature #(t) depends on the heating power P(t), the mass flow m P L (t), the stationary air mass M L in the heater, and the specific heat capacity of air c p L according to the following equation: m P L (t)c p L ∆#(t) C M L c p L
d∆#(t) D P(t) . dt
(11.39)
(The air heat capacity is assumed to be constant.) Equation (11.39) represents a differential equation of a first-order system, whose transfer function is Kp ∆#(s) D . P(s) 1 C s T1
(11.40)
The process gain K p and the time constant T1 at constant mass flow have the form Kp D
1 , m P LcpL
T1 D
ML . m PL
(11.41)
11.6.2 Linear Process and Disturbance Model Identification
A linearized model (Figure 11.23b) of the heating process was identified between the heating control signal u T and the temperature measurement signal y T D y T 2 at the end of the tube. The airflow was kept constant by the fan input signal at u F D 6 V, and the manipulated signal of the heating power was changed stepwise between 1 and 3 V several times. Figure 11.24 shows the measured temperatures y T at the end of the pipe and the simulated model output yO T based on the estimated linear model. The model parameters were estimated using the method of least squares from the measured data by using a low-pass prefilter. A dead time of the system could not be observed with the sampling time of ∆T D 5 s. The physical process could be approximated better by a second-order model than by using a first-order one. This was expected because the tube was not included in the physical modeling as yT
5
yT, yT [V]
4.5
yT
yT
yT
4 yT= yT
3.5
yT
3
yT
2.5 0
4000
8000
12000
t [s]
Figure 11.24 Measured process y T and calculated model outputs yOT .
459
460
11 Predictive Functional Control Table 11.1 Model parameters in the operating point. Process model
Value
Disturbance model
Value
Time constant T1 Gain K p1 Time constant T2 Gain K p2
181.73 s 0.525 10.0 s 0.467
Time constant T1v Gain K p v1 Time constant T2v Gain K p v 2
123.55 s 0.12 13.45 s 0.11
an energy-storage unit. Instead of the assumption of a serial connection of two first-order models, the process was modeled with the parallel connection of two first-order models. Also a disturbance model was identified between the fan input signal u F and the temperature y T . The heating was kept constant at u T D 2 V and the fan input signal u F was changed stepwise between 5 and 7 V several times. Table 11.1 summarizes the estimated parameters of the process and the disturbance model.
11.6.3 Simulation of Linear Temperature Control
The PFC algorithm was simulated for the estimated second-order linear model of the laboratory plant Amira LTR-701. The system was simulated for a set point change from 0 to 1 at time t D 0 s and for a disturbance from 0 to 1 at t D 1600 s. On the basis of the step and impulse responses (Figure 11.25) the extended predicted horizon n e was chosen as 0 even though the process was identified as a second-order one (the reason is the big ratio of the time constants: T1 / T2 D 181.73/10.0 D 18.2). The PFC controller was simulated with different values of Tc (50 s, 200 s, and 470 s), as shown in Figure 11.26a. As seen, the scheme can be accelerated by reducing Tc . The faster control requires a more aggressive manipulated signal; also 0.95
1 Step response
0.8 0.6 0.4 Impulse response ×25
0.2 0
0
200 400 600 800 Process settling time (470 s)
Figure 11.25 Impulse and step responses.
t [s]
11.6 Case Study: Temperature Control of a Hot Air Blower y y 1 r 0.8 0.6 0.4 0.2 0 0 u 2
dist.: 0 → (–1) Tc=50 s Tc=200 s Tc=470 s
Tc=50 s Tc=200 s Tc=470 s 500
1000
1500
2000
Tc=50 s
1.5
2500 t [s]
Tc=50 s Tc=200 s
1
Tc=200 s
0.5 0
yr
Tc=470 s
Tc=470 s 0
(a)
500
1000
1500
2000
PFC control
2500 t [s]
y y r 1 0.5
yr
dist.: 0 → (–1)
Kc=0.48;TI=15 s Kc=0.48;TI=59.76 s
0
Kc=0.2;TI=70s 0
u 2 1.5 1 0.5 0 0
500
1000
1500
2000
2500 t [s]
2000
2500 t [s]
Kc=0.48;TI=15 s Kc=0.48;TI=59.76 s Kc=0.2;TI=70 s 500
(b)
1000
1500
PI control
Figure 11.26 Simulation of the temperature control.
in this case the control behavior remains aperiodic. The PI controller was simulated as shown in Figure 11.26b with the following scenario: optimal setting based on the T-sum method of Kuhn [4]: K c D 0.48, TI D 59.76 s, fastest control with an overshoot of 10%: K c D 0.48, TI D 15 s (tuned manually), fastest aperiodic setting: K c D 0.2, TI D 70 s (tuned manually). The PI controller with the fastest setting (overshoots of about 10%) is slower by a factor of 10 than the PFC controller with Tc D 50 s. (It would be possible to tune the PFC controller even more quickly). 11.6.4 Linear Temperature Control with a Real Process System
In the real-time experiment with the process control system PCS7 the fan input signal of the blower was set at u F D 50% (5 V). At t D 30 s the temperature set point was abruptly changed from 0 to 30%. From time t D 150 s the manipulated signal of the blower u F was increased stepwise to 70% and from t D 200 s it was decreased stepwise to generate a disturbance. The sampling time was ∆T D 0.1 s. The settings of the controller parameters were chosen for a quick and possibly aperiodic control. The PFC controller parameters were chosen as n e D 1 and Tc D 50 s. The PI controller should control as fast as PFC; thus, the PI controller parameters were set to K c D 1 and TI D 5 s. The manipulated signal should not exceed 20% of its steady-state value (without constraints), and the overshoot should not exceed more than 5%. The control signal was constrained both by the PI control and by PFC but this value was never achieved. The real-time PFC temperature control (Figure 11.27a) shows (as expected) a quick and aperiodic control. The constraint of the control signal is inactive. Compared with the PI control (Figure 11.27b) the PFC achieves the set point y r about
461
462
11 Predictive Functional Control y, yr uT [%] uT 35 30 25 20 15 10 5 0
uF yr
uF yT
30
(a)
130
yT uF
yT
uT
80
yr
yr=yT
uT
180
230
uF y, yr [%] uT [%] 35 60 30 50 25 40 20 30 15 20 10 10 5
0
0
t [s]
yr
yr
yr=yT uF
yT
yT
yT
uT
uF
60 50 40
uT
30 20 10
30
80
(b)
PFC
uF [%]
uF
uT
130
180
230
t [s]
0
PI control
Figure 11.27 Real-time temperature control. y, yr, uT [%] 35 uT yr 30 25 yT 20 15 10 5 0 30 80
uF [%]
uF yr=yT uF uT
yr=yT
60
uF
50 40
uT
30 20 10 130
180
230
t [s]
0
Figure 11.28 Real-time PFC temperature control with disturbance feed-forward control.
3 times faster. The changes in the flow (by modifying the fan power to make a disturbance) have roughly the same effect in both cases. Figure 11.28 shows the PFC with disturbance feed-forward [8]. The change of flow is taken into account in the disturbance model. Comparison of the PFC with and without feed-forward control shows that the changes in the flow are fully compensated for. (As can be seen in the plots, the manipulated signal u T was not quite in the steady state at the end of the experiments. This very slow effect is explained by the fact that the tube temperature is rising more slowly than the air temperature. Therefore, the increase of the temperature is compensated for by the slowly decreasing manipulated signal. Also, the ambient temperature is increased, which causes a slow, nonmeasurable disturbance, which can be a reason for the long nonstationary behavior of the manipulated signal.) 11.6.5 Nonlinear Process Model Identification
The physical modeling (11.41) has already shown that both the static gain and the time constant decrease with increasing flow. When controlling the temperature at different flow rates, one has to adjust the model parameters. For this purpose the temperature process model was identified in the range of the fan input signal (u F ) from 5 to 9 V. (That means the identified model parameters also include the rela-
11.6 Case Study: Temperature Control of a Hot Air Blower Kp1, Kp2
T1, T2 [s]
0.65 0.55
T1= -22.451uF[V] + 330.1
200.00
Kp1 = -0.0723uF[V] + 1.007 R2= 0.9066
R2= 0.9828
150.00 100.00
0.45 0.35 4.5
5.5
6.5
(a)
T2 = -1.4129uF[V] + 21.874 R2= 0.9479
50.00
Kp2 = -0.0491uF[V] + 0.812 R2= 0.9899 7.5
8.5
uF [V]
0.00 4.50
5.50
6.50
(b)
static gain
7.50
8.50
uF [V]
time constant
Figure 11.29 Estimated parameters as functions of the flow.
tion between the fan control signal and the flow.) The estimated time constants (T1 , T2 ) and static gains (K p1 , K p 2 ) are shown in Figure 11.29 as functions of u F . Approximating linear relations could be estimated between the fan control signal and the model parameters, which are also seen as dashed lines in the same diagrams: T1 [s] D 22.451u F [V] C 330.1 , T2 [s] D 1.413u F [V] C 21.874 , K p1 D 0.0723u F [V] C 1.007 , K p 2 D 0.0491u F [V] C 0.812 . 11.6.6 Nonlinear Temperature Control with a Real Process System
The temperature of the hot air blower was also controlled by the nonlinear PFC [2] described in Section 11.4. With the nonlinear PFC the model parameters were adjusted for the different working points. The sampling time was ∆T D 0.1 s. Figure 11.30 compares the temperature control by the linear and the nonlinear PFC for the same flow changes (see u F ). As can be seen, the nonlinear control compensates for the flow changes better than the linear PFC by keeping the temperature nearer to the set point during the flow changes. y, yr, uT [%]
uT
uF yr
30
yT
yT
yr=yT
40 uF
uT
uT
20 10 0 30
(a)
80
130
180
230
t [s]
uF y, yr, [%] uT [%] yr 70 uT 40 60 50 uF 30 40 yT 20 30 20 10 10 0 0 30 80
linear PFC
Figure 11.30 Real-time temperature control.
(b)
uF yr=yT uT
uT
130
180
nonlinear PFC
230
uF [%] 70 yr=yT 60 50 40 30 20 10 0 t [s]
463
464
11 Predictive Functional Control
11.7 Summary
Predictive control systems belong to advanced control strategies and are mainly used for complex optimizing control. Here an easily realizable predictive control, PFC [6], was introduced. The typical application of PFC is for SISO processes both without and with dead time. It is easy to understand the PFC algorithm, and it is easy to tune its parameters. In addition, the PFC algorithm can be easily implemented in PLCs and distributed process control systems [5]. The PFC algorithm was presented here in its basic form assuming a constant reference signal. The simplicity of the PFC algorithm is due to the fact that the control variable is optimized only for a single point in the future and the manipulated signal is assumed constant during the control horizon. The PFC algorithm was presented for SISO systems with and without disturbance feed-forward control. The algorithm developed for a first-order model could be easily extended to a second-order process, assuming parallel connection of two first-order submodels. The method can be easily applied also for higher-order aperiodic processes. An extension for other oscillating, integrating, unstable, and non-minimum-phase processes is described in Richalet and O’Donavan [5]. The tuning of a PI controller requires experience, because there is no clear relation between the controller parameters and the resulting system behavior. The advantage of the PFC controller is the physical interpretability of the controller parameter in the form of the desired closed-loop settling time by fixing the reference trajectory. Another advantage is the simple realization of the manipulated signal constraints by avoiding antiwindup action that occurs with PI controllers. The PFC showed rapid, aperiodic control with a relatively moderate change of the manipulated signal. The PFC and the PI control algorithms were compared for the temperature control of a hot air blower. The task was to compensate for the disturbances caused by the airflow changes. A second-order aperiodic model was set up and the parameters were estimated from active experiments. The controllers were first tuned on the basis of simulation with the estimated process model. Then the temperature controllers were implemented in the process control system PCS7 from Siemens and the temperature was controlled in real time. It was shown that the temperature can be kept constant using disturbance feed-forward in spite of alternating medium flow. Another alternative way is to use a nonlinear PFC based on a LPV model, which is a quasi-linear model having signal-dependent parameters. The linear and nonlinear control algorithms were compared and the superiority of the nonlinear method was emphasized.
11.7 Summary
References 1 Amira (2002) Controlled Air Mass and Temperature System with Actuators and Sensors LTR701, Operating Manual, ELWE-Lehrsysteme GmbH, D-38162 Cremlingen, FRG. 2 Haber, R., Kreutz, M., and Zabet, K. (2010) PFC-(Predictive Functional Control)-Regelung eines Heißluftgebläses (PFC (Predictive Functional Control) control of a hot air blower), Proceedings of the 7. Workshop AALE (Applied Automation in Education and Research), Vienna, Austria, pp. 99–104. 3 Khadir, M.T. and Ringwood, J.V. (2008) Extension of first order predictive functional controllers to handle higher order internal models. International Journal of Applied Mathematics and Computer Science, 18(2), 229–239. 4 Kuhn, U. (1995) Eine praxisnahe Einstellregel für PID-Regler: Die TSummen-Regel (A practical tuning rule for PID controllers: the T-sum rule).
5
6
7
8
Automatisierungstechnische Praxis, 37(5), 10–16. Richalet, J. and O’Donavan, D. (2009) Elementary Predictive Functional Control, Springer Verlag, Berlin. Richalet, J., Rault, A., Testud, J.D., and Papon, J. (1978) Model predictive heuristic control: application to industrial processes. Automatica, 14, 413–428. Zabet, K., Haber, R., and Kreutz, M. (2010a) Predictive Functional Temperature Control of a Nonlinear, Flow-Dependent Process, Proceedings of the International Carpathian Control Conference, Eger, Hungary, pp. 525–528. Zabet, K., Haber, R., and Kreutz, M. (2010b) Predictive Functional Temperature Control of an Air Blower Pilot Plant with Disturbance Feed-Forward, Proceedings of the 9th International Conference Process Control, Kouty nad Desnou, Czech Republic.
465
467
12 Case Studies The application of predictive control algorithms is illustrated by the following case studies: on–off temperature control of a heat exchanger (in Chapter 4), linear and nonlinear temperature control of a hot air blower (in Chapter 11), temperature control of a heat exchanger using multimodel and multicontroller methods (in Chapter 9) (as the process parameters depend on the water flow, the process is nonlinear), level control (in Chapter 10) (because of the free level-dependent outflow, the process is nonlinear), temperature control of an injection molding machine, wastewater quality control of an intermittently operated plant, wastewater quality control with pre-denitrification. The last three case studies are the topic of this chapter. Injection molding machines are usually controlled by on–off switching of the heating. The temperature is controlled in different zones of the plastification unit. During the start-up the temperature difference between the zones has to be limited. It will be shown that different strategies are recommended for the start-up and for the subsequent control with a constant reference signal. The temperature control of the zones in injection molding machines is a good example of how a multivariable process can be dealt with by Single-Input, SingleOutput (SISO) controllers considering and constraining the coupling between the neighboring zones. There are two common technologies used in WasteWater Treatment Plants (WWTPs). Smaller plants are usually operated intermittently, which means the nitrification (with aeration) and denitrification (without aeration) phases are operated alternately. Large plants are usually operated with pre-denitrification, that is, the nitrification and denitrification are separated spatially. Biological wastewater processes are highly nonlinear and complex. To predict the process output a very comprehensive model with more than 10 equations and several unknown physical parameters has to be simulated. Therefore, a simplified model is introduced and its parameters are estimated. The simulations show that this model can be used Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
468
12 Case Studies
for prediction and the legal limits of ammonium and nitrate concentration are not violated. The control algorithm in both cases is a predictive on–off aeration control as the microorganisms work well either in the presence or in the absence of oxygen. The concentration control in WWTPs is a good example for controlling complex nonlinear processes by using a simplified model for prediction.
12.1 Predictive Temperature Control of an Injection Molding Machine
In the plastification unit of injection molding machines the plastic granulate is warmed up with the help of several heating elements and is carried by a snail to the likewise heated nozzle. In the case examined, the plastification unit is heated by three heating elements and the nozzle by one heating element (see Figure 12.1). The temperature control task for the temperature zones of a molding machine can be separated into two phases: the start-up and the stationary operation. A good start-up control requires that there is no overshoot of the temperature, the final temperature is achieved fast, the difference between the temperatures of the neighboring zones is kept below a prescribed value. The latter requirement prevents thermal stress. Once the temperature has achieved its steady-state value, it has to be kept constant, that is, disturbances have to be rejected. A self-tuning control algorithm can be of great help to the operator while putting a new molding machine into operation, because each machine has its own set of parameters, and the time spent tuning the parameters manually can be saved. Furthermore, controller adaptation can be switched on if the plastification performance is not satisfactory – as a consequence of, for example, changing the parameters of the processed material.
Figure 12.1 Plastification unit of an injection molding machine.
12.1 Predictive Temperature Control of an Injection Molding Machine
The plastification unit of the molding machine is heated in several zones. In each zone there is a temperature sensor. Although the neighboring zones influence each other, in practice the zones are often controlled autonomously. In the literature three basic algorithms for molding machines have been reported: on–off control with feedback, Proportional plus Integral plus Derivative (PID) control, predictive control. Hoffmann et al. [8] reported on an adaptive on–off controller with feedback. The parameters of the process are estimated by the recursive least-squares method and the parameters of the PID-equivalent on–off controller are set by a rule of thumb. Gawthrop et al. [4] compared three adaptive algorithms. The so-called continuoustime self-tuning PID control is based on online least-squares estimation of the process parameters. The so-called closed-loop cycling method relies on on–off control. The parameters are calculated from the period of one oscillation at the operating point without parameter estimation. The regulator parameters are designed according to the Ziegler–Nichols rules. Entirely another concept was realized by Hoffmann [7], who used a predictive on–off regulator and calculated the cost function of the control for several steps ahead. A PID controller based on recursive parameter estimation and on process parameter calculation from the limit cycles caused by an on–off controller with hysteresis was reported in Jörgl and Haber [9] and Haber et al. [5]. 12.1.1 Modeling of the Plastification Unit
The plastification unit of the molding machine under investigation has four heating zones. The temperature of each zone is affected by the heating input of the zone and by the temperature difference between the actual and the neighboring zones. (This model is similar to the so called V-canonical structure.) The following symbols are introduced: u i (t): i D 1, . . . , 4 y i (t): i D 1, . . . , 4 G i i (t): i D 1, . . . , 4 G k,i j (t): i D 1, . . . , 4
heat input to the ith zone (0%, no heating; 100%, full power), temperature of the ith zone, transfer function between the heating input and the temperature of the ith zone, transfer function between the temperature difference of the ith and jth zones and the temperature of the kth zone.
469
470
12 Case Studies u1
y1
u1
y1 K11
G11
K1.2-1
G1.2-1
K2.1-2
G2.1-2 u2
y2
u2
y2 K22
G22
K2.3-2
G2.3-2
K3.2-3
G3.2-3 u3
y3
y3 K33
G33 G3.4-3
G4.3-4 u4
y4
dynamic model
.
K3.4-3
.
K4.3-4
.
u4
y4 K44
G44
(a)
.
u3
(b)
steady-state model
Figure 12.2 Temperature zone model of the molding machine. (All gains have the dimension ı C/%).
The model of the extruder can be set up with the following equations: y 1 (s) D G11 (s)u 1 (s) C [y 2 (s) y 1 (s)]G1,21 (s) , y 2 (s) D G22 (s)u 2 (s) C [y 1 (s) y 2 (s)]G2,12 (s) C [y 3 (s) y 2 (s)]G2,32 (s) , y 3 (s) D G33 (s)u 3 (s) C [y 2 (s) y 3 (s)]G3,23 (s) C [y 4 (s) y 3 (s)]G3,43 (s) , y 4 (s) D G44 (s)u 4 (s) C [y 3 (s) y 4 (s)]G4,34 (s) . Figure 12.2a shows the dynamic model of the plastification unit. The experimental model building is described in detail in Jörgl and Haber [9]. The transfer functions were identified from different experiments: separate heating of the zones, simultaneous heating of all zones. In both cases the heating input of the individual zones was changed stepwise from 0 to 40%, then from 40 to 30%, after that from 30 to 40%, and finally from 40 to 0%.
12.1 Predictive Temperature Control of an Injection Molding Machine
The estimated parameters of the transfer functions of the submodels are as follows: G11 q 1 D
2.261q 1 0.6488q 2 , 1 1.01q 1 C 0.1932q 2 1.57q 1 0.1622q 2 0.2927q 3 G22 q 1 D , 1 0.928q 1 0.048q 2 C 0.07141q 3 1.199q 1 0.2039q 2 0.725q 3 G33 q 1 D , 1 1.51q 1 C 0.2578q 2 C 0.2563q 3 1.074q 1 0.03657q 2 G44 q 1 D , 1 1.103q 1 C 0.2249q 2 0.4553q 1 0.1561q 2 G1,21 q 1 D , 1 1.01q 1 C 0.1932q 2 0.02814q 1 C 0.04207q 2 0.03302q 3 G2,12 q 1 D , 1 0.9288q 1 0.048q 2 C 0.07141q 3 0.2871q 1 0.3206 q 2 C 0.1037q 3 G2,32 q 1 D , 1 0.9288q 1 0.048q 2 C 0.07141q 3 0.12q 1 C 0.1198q 2 0.2209q 3 G3,23 q 1 D , 1 1.51q 1 C 0.2578q 2 C 0.2563q 3 0.02611q 1 C 0.03099q 2 C 0.0184q 3 G3,43 q 1 D , 1 1.51q 1 C 0.2578q 2 C 0.2563q 3 0.2297q 1 0.1107q 2 G4,34 q 1 D . 1 1.103q 1 C 0.2249q 2 Figure 12.2b shows the static gains of the submodels. The highest gain belongs to zone 3, the gain of zone 2 is about one sixth of that, and the gains of zones 1 and 4 are the smallest. The effects of the neighboring zones are always less than the effect of the heating powers. That is why autonomous SISO control of the zones can be applied instead of a Multi-Input, Multi-Output (MIMO) decoupling control. Figure 12.3 shows the identical heating powers of the zones and the zone temperatures with simultaneous heating of the zones. When a controller is implemented on a new molding machine, the parameters are unknown and have to be estimated. Figure 12.4 shows that the parameters can be estimated recursively by the least-squares method after simultaneously switching on the heating of all zones. Four independent linear SISO models were identified. (The initial values of all parameters were zero, the diagonal values of the convergence matrix were 1000, and the forgetting factor was 1.0. The sampling time was ∆T D 0.4 min.) Most parameters converged to their final value within 200 sampling steps (80 min). Usually the initial parameters can be selected on the basis of prior experience and then the convergence is faster.
471
472
12 Case Studies y [°C] 500
y3 y4
400
y2 y1
300 200 100 0 0
t [min]
100 200 300
400 500 600 700 800
100 200 300
400 500 600 700 800 t [min]
u [%] 30 25 20 15 10 5 0
0
Figure 12.3 Heating power and zone temperatures with simultaneous heating of the zones. 2
1 b11,2
1 0
a11,1
0 -1
a11,2
b11,1 -1
0
50
100
150
200 t [min]
2
-2
0
50
100
150
200 t [min]
150
200 t [min]
5 b22,2
a22,1
0
a22,3
-2 -4 0
b22,1
b22,3
50
0 a22,2
100
150
200 t [min]
0.5
-5
0
50
100
2 a33,1
b33,2
b33,3
a33,3
0
0 -2 a33,2
b33,1 -0.5
0
50
100
150
200 t [min]
-4
0
50
100
150
b44,1
0.5
a44,1 0 a44,2
b44,2 0
200 t [min]
5
1
0
50
100
150
200 t [min]
-5
0
50
100
150
200 t [min]
Figure 12.4 Online parameter estimation by the recursive least-squares method.
12.1 Predictive Temperature Control of an Injection Molding Machine
12.1.2 Predictive Zone Temperature Control
Although the zones are coupled, autonomous controllers were used for the zones. This is common in industrial practice. 12.1.2.1 Predictive Control with Constant Reference Signal With predictive control the future temperature is computed in the prediction horizon for all possible future heating sequences. The predicted temperature sequence has to be compared with the reference signal, and that heating sequence which causes the least deviation from the reference signal (usually in quadratic sense) has to be chosen. Then, this heating input power has to be realized and the same computation has to be repeated in the next sampling interval. Long-range predictive control can be realized easily because the number of possible control sequences is restricted by the two choices (switching on or off) in each (control) sampling period. Consequently, the number of possible sequences is 2 n e2 C1 , where n e2 is the length of the prediction horizon (e.g., [7] recommended choosing n e2 D 6). The computations can be further reduced if some auxiliary results are stored and reused while calculating the cost function of other sequences. 12.1.2.2 Predictive Start-Up Control The aim of start-up control is to achieve the reference value as fast as possible without overshoot. In the first sampling intervals the heating has to be switched on. Then it has to be checked when the heating has to be switched off the first time. The computation time is much less during the start-up phase than when the controlled signal achieved the reference value and the reference signal is kept constant. A long prediction horizon is easily realizable because only one sequence has to be computed. (For example, [7] recommended n e2 D 20, which proved to be satisfactory in the actual case as well.) The predictive start-up control can be performed adaptively because at the very beginning the heating power is switched on and the pulse-transfer function of the process can be estimated recursively by the least-squares method. Experiences have shown that the process parameters are correctly estimated before 10% of the reference value has been reached. Table 12.1 Controller parameters. Strategy parameter
u off [%]
u on [%]
nu
Zone 1 Zone 2 Zone 3 Zone 4
0 0 0 0
10 0.07 0.005 5
20 20 20 20
Start-up n e1 n e2 0 0 0 0
19 19 19 19
Constant reference signal nu n e1 n e2 λy λu 7 7 7 7
0 0 0 0
6 6 6 6
1 1 1 1
0 0 0 0
473
474
12 Case Studies
Predictive start-up control has to be changed to predictive control with a constant reference signal or to PID control at a given percentage (about 90%) of the reference value. Figure 12.5 shows the simulation of the start-up control and the subsequent control period with a constant reference signal. The controller parameters are summarized in Table 12.1. The zone temperatures are plotted by solid lines and the corresponding set values are plotted by dashed lines in Figure 12.5a, whereas the manipulated variables are seen in Figure 12.5b. The sampling time for all simulay1 [°C]
u1 [%]
300 200
50
100 0 0
0
50
100
150
200 t [min]
y2 [°C] 300
u2 [%]
200
50
t [min]
0
50
100
150
200
0
50
100
150
200 t [min]
0
50
100
150
200 t [min]
0
50
100
150
200 t [min]
100 0 0
0
50
100
150
200 t [min]
y3 [°C] 300
u3 [%]
200
50
100 0 0
0
50
100
150
200 t [min]
y4 [°C] 300
u4 [%]
200
50
100 0 0
(a)
0
50
100
150
200
t [min]
(b) Figure 12.5 Predictive temperature control including start-up. (a) Zone temperatures (solid lines) and the corresponding set values (dashed lines); (b) manipulated variables.
12.1 Predictive Temperature Control of an Injection Molding Machine
tions was ∆T D 0.4 min. The levels and changes of the manipulated variable were not weighted in the cost function; this is the reason for the too frequent switching of the heating in zones 1 and 4. The switching from start-up control to the subsequent control period with a constant reference signal was done at 95% of the set value. The switching time points are shown by dashed lines in the manipulated variable plots in Figure 12.5b before the first switching off time of the heating. A small temperature bias can be observed with zones 1 and 2 which is the consequence of the relatively too long control sampling time. If these biases are to be compensated for by the manipulated variable, then in zone 1 overshoot and in zone 2 undershoot would occur. 12.1.3 Predictive Start-Up Control with Temperature Difference Limitation
For technological reasons there must not be too large a difference between the zone temperatures. Such a problem may occur during the start-up, because the zones have different time constants. To avoid an undesired difference, care has to be taken that the temperature difference does not exceed a preliminary given value. The following algorithm can be applied: 1. Compute the heating powers of the zones according to the predictive start-up strategy. 2. Check whether there is a larger temperature difference than allowed between the predicted temperatures between the neighboring zones. If there is not, go to step 5. 3. If the temperature difference between any two neighboring zones is too large, then change the reference signal of the warmer zones to the lowest neighboring temperature plus the allowed difference. 4. Compute the heating powers of the zones according to the predictive strategy in the case of a constant reference signal using the modified reference value sequence of step 3. 5. The computed current heating power has to be realized. 6. Continue the computations in the next sampling interval beginning with step 1. The above predictive strategy can be performed adaptively if the pulse-transfer function of the process is updated recursively. Practical experiences have shown that a parameter estimation performed till the temperature has achieved 10% of the reference value results in good process parameters. Figure 12.6 shows the predictive control with constraint of the temperature difference to zero between the zones (of course, in practice the allowed difference could be more than zero). In the first 5 min the SISO controllers worked independently. As is seen, the slowest zone is zone 3. Therefore, the reference values of the other zones were limited to the current temperature of zone 3, that is, the control algorithm was changed in the zones to be constrained from the start-up control to the control strategy for a constant reference signal. The set value reduction is
475
476
12 Case Studies
y1
u1
[°C] 300
[%]
200
50
100 0 0 0
50
100
150
200 t [min]
y2 [°C] 300
[%]
200
50
0
50
100
150
200
t [min]
0
50
100
150
200
t [min]
0
50
100
150
200
t [min]
0
50
100
150
200
t [min]
u2
100 0 0 y3
0
50
100
150
200 t [min] u3
[°C] 300
[%]
200
50
100 0 0 0
50
100
150
200 t [min]
y4
u4
[°C] 300
[%]
200
50
100 0 0 0
(a)
50
100
150
200 t [min]
(b) Figure 12.6 Predictive temperature control including start-up and considering temperature difference constraints. (a) Zone temperatures (solid lines) and the corresponding set values (dashed lines); (b) manipulated variables.
indicated by the dashed lines in zones 1, 2, and 4. The set value was not reduced for zone 3 and the switching time point from the start-up control to the strategy with a constant reference signal is denoted by a dashed line in the plot of the manipulated signal of zone 3. As the final reference values of the zones are different, this strategy considering the constraints could not be applied till the final set values, otherwise the temperature could not achieve the final set value. Therefore, the constraints were not considered any more after the temperature had reached 95%
12.2 Wastewater Quality Control of an Intermittently Operated Plant
of its set value. The set values are plotted by dashed lines in the temperature plots in Figure 12.6a. It is seen that the set values of zones 1, 2, and 4 are restricted from t D 5 min till the time point when the temperatures of the corresponding zones reach 95% of their set value. A small temperature bias can be observed for zones 1 and 2 in Figure 12.6, which is a consequence of the relatively too large control sampling time. If these biases are to be compensated for by the manipulated variable, then in zone 1 overshoot and in zone 2 undershoot would occur. The controller parameters were the same as in the unconstrained case; see Table 12.1. 12.1.4 Summary
On–off control is common with molding machines. The above simulations showed the effectiveness of predictive control both during the start-up and if the reference signal was kept constant. Furthermore, the temperature difference between the neighboring zones could be limited during the start-up. Although the plastification unit is a MIMO process, SISO controllers could be used because the cross-coupling is less strong than the effect of the direct heating. The predictive control was compared with the on–off PID control with initial self-tuning during the start-up recommended by Jörgl and Haber [9] and Haber et al. [5]. The following conclusions could be drawn: Predictive control works well both for the start-up phase and during the stationary phase. Predictive control is better than PID control during the start-up. If the temperature is near to the reference signal, then there is no remarkable difference between the PID control and predictive control [9]. The computational demand of predictive control is much higher than that of the PID control. Only predictive control can take the limitations of the temperature differences between the neighboring zones effectively into account. A good compromise seems to be to apply predictive start-up control with a temperature difference constraint and a PID control after the zones have reached their desired temperatures.
12.2 Wastewater Quality Control of an Intermittently Operated Plant
Wastewater has high ammonium concentration, which is dangerous for the environment. The interesting aspects are:
477
478
12 Case Studies
with nitrogen oxidation, the oxygen content will be reduced in the water, depending on the pH, free, toxic ammonia is generated, an overfertilization effect arises, and possible consequences are that growth of algae and plants increases, oxygen deficiency occurs, and fishes die. Legal limits exist for the total nitrogen concentration and for the dissolved ammo nium (NHC 4 ) in the effluent from a WWTP but not for nitrate (NO3 ), which is usually used in an on–off control structure. In Germany the legal limit for the total nitrogen concentration is 13 g/m3 and the limit for the ammonium is 10 g/m3 , which are prescribed by the Environmental Agency. The nitrogen compounds in wastewater are reduced in three steps. The duct system reduces the organic nitrogen compounds by hydrolysis. The further two steps take place in the WWTP. During the nitrification phase of the process, a wastewater basin is filled with oxygen; thus, the basin is operated aerobically. In the aerobic biological process, ammonium is oxidized to nitrite NO 2 then to nitrate NO : 3 NHC 4 C 2O2 C 2HCO3 ! NO3 C 3H2 O C 2CO2 .
The next step, the denitrification phase, is operated anaerobically. During the denitrification, NO 3 , which is generated during the nitrification, is converted to N2 by 5C6 H12 O6 C 24NO 3 ! 12N2 " C6CO2 C 18H2 O C 24HCO3 .
N2 is released into the air. Both processes are nonlinear and dynamic. Numerical simulations for calculation of the complex processes in a municipal WWTP have been established. The International Water Association developed Activated Sludge Model no. 1 (ASM1) for modeling biological wastewater treatment. Dynamic simulations can be used to design a plant and test efficient operating concepts. Not only the concentration has to be kept below the allowed limit, but also the aeration should be minimized to operate the plant economically. An add-on library for MATLAB/SIMULINK, SIMBA (Simulation der Biologischen Abwasserreinigung, in English “simulation of wastewater treatment”) from the Institute für Automation und Komunikation in Magdeburg, Germany, was used for the simulation of the WWTP [2]. In smaller WWTPs the nitrification and denitrification phases are operated alternately; thus, the two stages of the nitrogen elimination process are separated chronologically but not spatially. This is realized by operating the activated sludge basin once aerobically and then anaerobically in turn. The switching between the aerobic and the anaerobic operation can be realized by a time schedule or by on–off control of, for example, the NO 3 concentration in the basin. Figure 12.7 shows the scheme for such a nitrification/denitrification process operated intermittently. The oxygen is discharged into the basin by an aeration fan which is controlled by a conventional Proportional plus Integral (PI) controller. The on–off controller has to maintain the concentration of NO 3 by setting the reference value of the PI oxygen concentration controller. This control structure is necessary because if the fan
12.2 Wastewater Quality Control of an Intermittently Operated Plant
cNO–3
raw water
primary clarification
cO 2
aerobic/anaerobic activation
secondary clarified clarification water
Air
on-off controller
PI controller recycle sludge
surplus sludge
Figure 12.7 Cascade (on–off and PI) control of a WWTP operated intermittently with the measuring points of NO 3 and O2 .
is simply switched on and the oxygen concentration is not controlled in the basin, then it may rise over a limit which is not tolerable for the bacteria involved in the biological process. The microorganisms can decompose nitrate as well as ammonium, but under different circumstances. During the nitrification ammonium is decomposed to nitrate in the presence of oxygen. The nitrate is decomposed in an anoxic phase to nitrogen but this can only be achieved under the full absence of oxygen because the microorganisms prefer aerobic operation. With the presence of only a low oxygen concentration in the reactor, the microorganisms operate still aerobically and do not consume any nitrate. Therefore, it is essential to withdraw all oxygen from the reactor during the denitrification phase. The switching between the nitrification and the denitrification can be achieved typically by an on–off controller. 12.2.1 Modeling of the Plant
Figure 12.8 shows an intermittently operated WWTP modeled with the toolbox SIMBA for SIMULINK/MATLAB. The first part of the plant is a preliminary mechanical clarification, which is also realized as a mixer of the inflow and the recycled sludge. The activation tank is the main reactor (primary clarification) – this is where the nitrification and denitrification take place. Instead of measurement of the nitrate and oxygen concentrations in the outflow of the plant after the secondary clarification, these variables are usually measured before the secondary clarification as at this measuring point the variables react much faster to a change in the aeration than in the outflow of the plant. In the secondary clarification no appreciable change of the nitrogen compounds occurs; only the concentration fluctuations are damped. The secondary clarification offers an additional buffer for the effluent concentrations, which must not violate governmental limits. The secondary clarification separates the clean water from the solids, mainly the biomass (sludge), which partially leaves the plant (surplus sludge) and partially is recycled to the inflow of
479
12 Case Studies
480
Secondary clarification
Primary clarification yin
yinbb
youtbb
ybb
activation
yeff
M Influent q2kla
0
V=12000
cO 2 cNO3– cNH 4+
Control
18000
SC-Mix
o2mess O2_Out ybb yues
1
OnOffOut youtbb
4
recycled sludge yues
P
385
excess sludge
Figure 12.8 An intermittently operated sewage plant, realized with SIMBA under SIMULINK.
the plant (the sludge includes still active biomass which is essentially needed for the biological processes in the plant). The block “control” itself includes the slave PI controller for the oxygen concentration and now the classical (and later on the predictive) on–off master controller. The simulations were performed with the following model parameters. The maximum rate was about 50 000 m3 /h, the average inflow rate was about 38 000 m3 /h, the minimum rate was about 30 000 m3 /h, the recirculation rate was about 150 000 m3 /h and hence the flow rate through the reactor was about 200 000 m3 /h, and the surplus sludge rate was about 385 m3 /h. The activating sludge tank had a volume of 12 000 m3 and the secondary clarifier had a volume of 2000 m3 . 12.2.2 Conventional On–Off Control
The process was first controlled by a conventional on–off controller. The switching points for the controller were set to 1 g/m3 NO 3 for the lower switching point and 4 g/m3 NO for the upper point. The aeration was switched on at the lower 3 switching point and was switched off at the upper switching point. Figure 12.9 shows exemplary the influent flow of a predefined inflow during a 7-day period. The inflow represents dry weather (with a period of 1 week). Figure 12.10 shows the control of the intermittently operated WWTP with the conventional discrete-time on–off controller with a sampling time of ∆T D 5 min. As can be seen, the nitrate concentration produces big overshoots for the upper limit, but only small overshoots for the lower limits. This is typical behavior for the highly nonlinear (and hard disturbed) process of a WWTP, which has a completely different dynamic process behavior for the nitrification and denitrification (thus this process is direction dependent).
4
cNH+
4
3
12.2 Wastewater Quality Control of an Intermittently Operated Plant
t
(a)
t
(b)
flow rate
ammonium concentration
3
cNO–
3
cNO–
Figure 12.9 Influent flow of the WWTP.
t
(a)
during a 7-day period
t
(b)
during a 0.8-day period
Figure 12.10 Conventional on–off control of the nitrate concentration.
12.2.3 Predictive On–Off Control Based on the Simulated Physical Model
ASM1 of the WWTP can be simulated by the software package SIMBA. This simulator can also be used as the model for a predictive controller. The nitrate concentration was controlled with the predictive on–off controller according to the online start-up strategy. The model used for this controller (Figure 12.11) was directly derived from the model realized with SIMBA, shown in Figure 12.8. As can be seen, the predictive model includes a From Workspace block (labeled with u) for the manipulated variables and a To Workspace block (labeled with y) for the predicted variable. The simulations with this model are always started at the current time of the sampling step. To achieve this the states of the SIMULINK model are reconstructed from the measured variables in each sampling step and loaded into the model as initial states. The predictive model also contains the known inflow from the predefined inflow matrix; thus, the future disturbances are assumed to be known. Of course, this strategy does not guarantee a completely error-free prediction of the influent parameters with a real plant, but with such a very good fitting model the performance of the on–off controller can be demonstrated very well.
481
12 Case Studies
M Influent1 q2kla
0
V=12000 Activation
cO 2
cNO3–
18000
SC-Mix
PI Controller u
y P
385
Figure 12.11 Simulation model used for the predictions of the on–off controller.
cNO3–
cNO–3
482
t
t
(a)
during a 7-day period
(b)
during a 0.8-day period
Figure 12.12 Predictive on–off control of the nitrate concentration.
Figure 12.12 shows the predictive control of the nitrate concentration in the WWTP. The horizon sample length of the controller was set to n e2 D 12; thus, the horizon time was 1 h with the chosen sampling time of ∆T D 5 min. With the very good fitting model it was possible to prevent nearly all violations of the given limits and very small overshoots occurred only sporadically. ASM1 requires very high computational effort both for the simulation of the continuous-time process equations and for the simulation of the SIMULINK model itself (the initial states of the SIMULINK model have to be loaded into the model at each control sampling time if a SIMULINK model is used in the control algorithm). 12.2.4 Predictive On–Off Control Based on a Simplified Model
Different approaches to obtain a simplified model of the wastewater system have been introduced. Fikar et al. [3] and Latifi [13] used ASM1 for the optimal control of a small WWTP with intermittent operation. Kim et al. [10] used the same model for the control of a laboratory plant with fewer unknown parameters than in the original ASM1 and estimated the unknown parameters from measurements. Lukasse et al. [14] used a simplified model with only some unknown, estimated parameters for the predictive on–off control of WWTPs. The parameters were estimated by a
12.2 Wastewater Quality Control of an Intermittently Operated Plant
Kalman filter and only one-step-ahead prediction was used. Alex et al. [1, 2] used a similar model for the sludge tanks in a WWTP with pre-denitrification. In the following the simplified models are used. The equations for the ammonium and the nitrate concentration of the nonlinear ASM1 are approximated by a first-order direction-dependent process model. The implementation is described in Lang et al. [11, 12] in detail. 12.2.4.1 Continuous-Time Model for the Model Parameter Estimation The simplified model of ASM1 is based on the model of Lukasse et al. [14] and Alex et al. [1, 2]. The equations for the continuous-time model are
d c NO QP i n 3 D c NO (t) c NO (t) C rNHC (t) rNO (t) 3 ,i n 3 3 4 dt V
(12.1)
for the prediction of the nitrate concentration and d c NHC 4
dt
D
i QP i n h c NHC ,i n (t) c NHC (t) rNHC (t) 4 4 4 V
(12.2)
for the prediction of the ammonium concentration. The symbols in the above equations are as follows: QP i n V c NHC ,i n 4 c NHC 4 c NO 3 ,i n c NO 3 rNHC 4 rNO 3
volume inflow rate [m3 /d], volume of the aeration tank [m3 ], concentration of ammonium in the inflow of the aeration tank [g/m3 ], concentration of ammonium in the aeration tank [g/m3 ], concentration of nitrate in the inflow of the aeration tank [g/m3 ], concentration of nitrate in the aeration tank [g/m3 ], conversion rate of ammonium [g/(m3 d)], conversion rate of nitrate [g/(m3 d)].
Both of the above equations are also valid during the aeration phase (the nitrification) and during the aeration break (the denitrification). The differences for the different directions are between the conversion rates, which are different during the two phases, and can be computed by the scheme of Table 12.2. Table 12.2 Conversion rates. Aeration phase rNHC 4
n NH4 ,max
c NHC
0
c O2 c O2 C !KO2 ,A
0
4
c NHC C KNHC 4
rNO 3
Aeration break
4
rNO 3 ,max
c NO 3
KO2 ,H c O2 C ! KO2 ,H
c NO C KNO 3 3
483
12 Case Studies
rNO–3, max rNO–3
cNO3–
cNO–3
cO 2
t
(a)
measured and estimated nitrate concentrations
t
(b) simulated and estimated maximum and actual nitrate conversion rates
Figure 12.13 Parameter estimation for the nitrate concentration model (solid line, physical model; dashed line, simplified model).
with rNHC ,m a x
maximum conversion rate of ammonium [g/(m3 d)],
r c O2 KO2 ,A
maximum conversion rate of nitrate [g/(m3 d)], concentration of dissolved oxygen in the aeration tank [g/m3 ], saturation constant of oxygen of autotrophic biomass, accepted to be equal to 0.4 g/m3 , saturation constant of ammonium, accepted to be equal to 1.0 g/m3 , saturation constant of oxygen of heterotrophic biomass, accepted to be equal to 0.2 g/m3 , saturation constant of nitrate, accepted to be equal to 0.5 g/m3 .
4 NO 3 ,m a x
KNHC 4 KO2 ,H KNO 3
in the above equations can The maximum conversion rates rNHC ,m a x and rNO 3 ,m a x 4 be estimated online; see Alex et al. [1, 2]. Figure 12.13 shows the measured and the predicted concentration of the NO 3 (Figure 12.13a) and the simulated, measured, and estimated maximum and cur(Figure 12.13b). On the other hand, Figure 12.14 rent conversion rates rNO 3 ,max
rNH+4, max rNH+4
cNH 4+
cNH +4
484
cO 2
t
(a)
measured and estimated ammonium concentrations
t
(b) simulated and estimated maximum and actual ammonium conversion rates
Figure 12.14 Parameter estimation for the ammonium concentration model (solid line, physical model; dashed line, simplified model).
12.2 Wastewater Quality Control of an Intermittently Operated Plant
shows the measured and the predicted concentration of NHC 4 (Figure 12.14a) and the simulated, measured, and estimated maximum and current conversion rates (Figure 12.14b). Note that the conversion rates are forced to be equal to zero during the respective phase. 12.2.4.2 Prediction Based on Discrete-Time Models Whereas continuous-time equations were used for the estimation of the model parameters, discrete-time models are used for the prediction of the model outputs in the control algorithm. The discrete-time equivalent of (12.1) assuming a zero-order holding device is
(k C 1) D e c NO 3
QP (k) iVn ∆T
c NO (k) C 3
" rNHC (k) r 4
NO 3
1e
QP (k) iVn ∆ T QP i n (k) V
# QP i n (k) c NO3 ,i n (k) , (k) C V
(12.3)
with sampling time ∆T D 5 min D 5/(24 60) d D 0.003472 d. Figure 12.15 shows the prediction of the nitrate concentration, once for 10 min (two sampling steps ahead) and once for 50 min (10 sampling steps ahead). Also the oxygen concentration and the upper and lower limits of the on–off controller are shown (the on–off control is based on the measured and not on the predicted concentration). The spikes in the predicted concentration occur if during the prediction a switch from the aeration to the anaerobic phase occurs. The discrete-time equivalent of (12.2) assuming a zero-order holding device is
c NHC (k C 1) D e
QP (k) iVn ∆T
4
c NHC (k) C 4
" rNHC (k) C 4
1e
QP (k) iVn ∆ T
QP i n (k) V #
QP i n (k) c NHC ,i n (k) . 4 V
(12.4)
Figure 12.16 shows the prediction of the ammonium concentration, once for 10 min (two sampling steps ahead) and once for 50 min (10 sampling steps ahead). Also, the oxygen concentration and the upper and lower limits of the on–off controller are shown (the on–off control is based on the measured and not on the predicted concentration). The spikes in the predicted concentration occur if during the prediction a switch from the aeration to the anaerobic phase occurs. Figure 12.17 shows the conventional control and the predictive control based on the simplified model of the nitrate concentration (Figure 12.17a,b) and of the ammonium concentration (Figure 12.17c,d). Also, the oxygen concentration is plotted. It can be seen that the predictive on–off control using the simplified model of the plant with a horizon length of 10 points (50 min) is much better than the control with the conventional on–off controller. It is also observable that with the
485
12 Case Studies 4.5 4 cNO3– Prediction 10 min
3.5
cNO3– Concentration
cNO–3 Prediction 50 min
cO 2 [g/m³], cNO–3 [g/m³]
3 50 min 2.5 10 min 2 1.5 1 cO 2 Concentration
0.5 0
Aeration on 0.4
0.42
0.44
0.48
0.46
0.5
0.52
0.54
0.56
0.58
t [d]
57.6 min
Figure 12.15 Prediction of the nitrate concentration 10 and 50 min ahead. 5.5 5 4.5
cNH +4 Prediction 10 min
10 min
4
cNH 4+ Prediction 50 min
3.5 cO 2 [g/m³], cNH +4 [g/m³]
486
50 min 3 cNH +4 Concentration
2.5 2 1.5
cO2Concentration
1 Aeration on
0.5 0 0.4
0.42
0.44
0.46
0.48
0.5
0.52
0.54
0.56
57.6 min
Figure 12.16 Prediction of the ammonium concentration 10 and 50 min ahead.
0.58 t [d]
12.2 Wastewater Quality Control of an Intermittently Operated Plant
cNO3–
cNO3–
cNO–3
cNO3–
cO 2
cO 2
t
(a)
(b)
conventional control of the nitrate concentration
cNH 4+
cNH 4+
cNH 4+
cNH +4
predictive control of the nitrate concentration
cO 2
cO 2
t
(c)
conventional control of the ammonium concentration
t
(d)
predictive control of the ammonium concentration
Figure 12.17 Conventional and predictive on–off control of the WWTP.
predictive controller there is a certain distance from the upper and the lower limits. The reason for this is based on the sampling time of the controller – with a shorter sampling time this gap could be decreased (but at the cost of a higher computational effort). 12.2.5 Summary
Figure 12.18 shows the conventional and the predictive on–off control for 0.8 and 0.2 day in one plot. Besides the control with the well-fitting ASM1 simulated with SIMBA, also a simplified model with less computational effort but also with less good fitting of the plant was used for the prediction. It can be seen that the control with the conventional controller produces overshoots of different magnitude, whereas the predictive on–off controller with the good fitting ASM1 is able to prevent violation of the limits in nearly all cases, and the very small overshoots produced are not influential. With the simplified model the predictive controller violates the limits a little; however, the overshoots produced by this controller are all nearly of the same magnitude (whereas the conventional on–off controller produces overshoots of different sizes). This indicates that the limits can be kept better by the predictive controller than would be possi-
487
12 Case Studies 6 5
conventional on-off control
predictive on-off control with full SIMBA model
6
predictive on-off control with simplified model
5
cNO–3 [g/m³]
4
cNO–3 [g/m³]
488
3
1
1
(a)
4.6
4.7
4.8
4.9
5
during a 0.8-day period
t [d]
predictive on-off control with simplified model
3 2
4.5
predictive on-off control with ASM1model
4
2
0 4.4
conventional on-off control
0 4.6
(b)
4.7
t [d]
4.8
during a 0.2-day period
Figure 12.18 Nitrate concentration using a conventional and a predictive on–off controller.
ble with a conventional controller (e.g., by modification of the reference values or switching points). In nearly all WWTPs there is a high potential for cost saving in the aeration because compressing and conveying air to the injectors at the bottom of the tank consumes a high amount of energy. By reducing the amount of air admitted, the plant becomes more economical. The aeration costs can be reduced if the ammonium and total nitrogen concentrations are not minimized but are allowed to be higher but less than the limits prescribed. The overall costs consist of four terms:
any violation of the legal limits of the total nitrogen concentration, any violation of the legal limits of the ammonium concentration, the duration of aeration, the number of switching on and switching off operations.
The latter term is considered because each alternation of load increases the abrasion of the fan and therefore increases the costs. A cost minimizing model based control strategy was recommended for intermittently operated WWTPs by Schmitz et al. [15].
12.3 Wastewater Quality Control with Pre-denitrification
Larger WWTPs are usually plants with a preliminary denitrification zone, which means the nitrification and denitrification are separated spatially instead of being separated in time. The constructional differences between an intermittently operated plant and a plant with preliminary denitrification are rather small – the main reactor of both plants is a single tank. But the structural differences are more significant. Whereas the intermittently operated plant considers the activation tank as one Continuous Stirred Tank Reactor (CSTR), the plant with preliminary denitrification separates the tank into some zones, treats each zone as one CSTR, and takes some zones for the denitrification, some for the nitrification, and some as
12.3 Wastewater Quality Control with Pre-denitrification
variable zones which enable the operator to vary the size of the nitrification and of the denitrification zones. The denitrification is constructively arranged before the nitrification. The reason for this is that the denitrification is operated anoxically – if this zone were arranged after the aerobically operated nitrification, the dissolved oxygen could be carried along from the nitrification to the denitrification, which would decrease the efficiency of the denitrification significantly. Because of the internal and external recirculation of plants with preliminary denitrification, the nitrate concentration in the outflow can nevertheless be kept within the allowed limits. 12.3.1 Modeling of the Plant
The plant with preliminary denitrification investigated includes five zones. Zones 1 and 2 are operated as denitrification zones. The remaining three zones are treated as variable zones, but they are separated additionally into two parts, one consists of zone 3 and one of a combination of zones 4 and 5. The controller structure can be understood as a three-level controller. If the ammonium concentration in the outflow of the activation tank is greater than a lower limit, then zones 4 and 5 are operated aerobically (thus as the nitrification phase) otherwise these zones are not aerated. If the ammonium concentration in the outflow of the activation tank is greater than an upper lower limit, then zone 3 is operated aerobically as well, otherwise this zone is not aerated. Figure 12.19 shows the realization of this plant in SIMBA. Both nonaerated zones have a volume of 1000 m3 (for the denitrification), and the three variable zones have a volume of 1333 m3 each (for the load-dependent denitrification or nitrification). The internal recirculation is 4 times the inlet flow rate. The surplus sludge is 150 m3 /d. The recycled sludge rate is equal to the inflow. The volume of the secondary clarifier was equal to the sum of the volumes of all zones, that is, 6000 m3 . 12.3.2 Comparison of the Conventional and Predictive Three-Level Control
The predictive controller is a modification of the online start-up predictive on–off controller for three-level control. The controller model is a simplified model as described by Haber et al. [6] and in Section 12.2.4, because the computational effort for a better fitting ASM1 realized in SIMBA (as for the intermittently operated plant) would be too high to implement it together with long prediction horizons. An identical daily influent flow was assumed over the week (which means also over the weekends); see Figure 12.20. If the inflow were different over the working days and the weekend, as used for the intermittently operated plant, the simulation would need about 70 days (simulated) to achieve a steady state of the plant. With the daily constant profile this time could be reduced to about (simulated) 28 days. In fact the influent concentrations
489
490
12 Case Studies
yin
yinbb02
1
yinBB1
1
yinbb
BB1 ybb1
2
BB2 ybb2
3
M
inflow
M
ASM1tm ASM1tm
2
qair1
V=100 0
[SimbaGlobalT]
ASM1tm
3
NitriP_T
qair2
V=100 0
4
qair3
NitriP_T1
V=100 0
NitriP_T2 yrs
yirz
SimbaGlobalT
18 T
Sctrl
(a)
first part of the SIMBA plant model
4
BB3
5
ybb3
BB4
ybb4
6
BB5 ybb5
ybb_e
ASM1tm
ye ASM1tm
5
qair4
V=133 3
NitriP_T3
6
qair5
P
V=133 3
NitriP_T4
0
7162*4
SC-Mix (7162+150)
yw
P
150
ybb5
yrs_v
ybb4 ybb3
x
ybb2 x ybb1 ybb_e yrs
(b)
second part of the SIMBA plant model
Figure 12.19 Model of the WWTP with preliminary denitrification using two fixed denitrification zones and three variable zones.
and flow are lower at the weekends; thus, the actual plant charge is lower than during the working days considered here. The aeration of the variable zones was switched on or off according to a threelevel control strategy. The switching points were chosen on the basis of simulation trials slightly differently for the conventional and for the predictive control. The conventional control worked as follows:
cNH 4+
3
12.3 Wastewater Quality Control with Pre-denitrification
t
t
(a)
flow rate
(b)
ammonium concentration
Figure 12.20 Influent of the WWTP.
aeration in zones 3, 4, and 5 is on if c NHC > 3 g/m3 , 4
aeration in zone 3 is off and in zones 4 and 5 is on if 3 g/m3 c NHC 1 g/m3 , aeration in zones 3, 4, and 5 is off if 1 g/m3 > c NHC .
4
4
The predictive control worked as follows: aeration in zones 3, 4, and 5 is on if c NHC > 2 g/m3 , 4
aeration in zone 3 is off and in zones 4 and 5 is on if 2 g/m3 c NHC 1 g/m3 , aeration in zones 3, 4, and 5 is off if 1 g/m3 > c NHC .
4
4
With the switching on of the aeration, the set value of the oxygen concentration was 2 g/m3 . Figure 12.21 shows the nitrogen concentrations in the zones. Figure 12.21a,b shows the nitrate concentrations, Figure 12.21c,d shows the ammonium concentrations, and Figure 12.21e,f shows the overall concentration of all nitrogen compounds for the classical (Figure 12.21a,c,e) and for the predictive controller (Figure 12.21b,d f), respectively. The nitrate concentration was raised slightly with the predictive controller in comparison with the conventional controller. On the other hand, the ammonium concentration and the overall concentration of all nitrogen compounds were reduced. Figure 12.22 shows the airflow for the three variable zones. It can be seen that the average airflow in zone 3 is higher with the predictive controller, but the average airflow in zones 4 and 5 is lower. Figure 12.23 shows the total airflow rates for all three variable zones and the total air volume versus the time as well. The air volume with the predictive controller is reduced from about 6 106 m3 to about 4 106 m3 after 14 days; thus, by about one third.
491
cNO–3
cNO–3
12 Case Studies
t
t
(b)
nitrate concentration achieved with the predictive three-level controller
cNH +4
nitrate concentration achieved with the conventional three-level controller
cNH +4
(a)
t
(c)
ammonium concentration achieved with the conventional three-level controller
t
(d)
ammonium concentration achieved with the predictive three-level controller
cN_total
cN_total
492
t
t
(e)
overall nitrogen concentration achieved with the conventional three-level controller
(f)
overall nitrogen concentration achieved with the predictive three-level controller
Figure 12.21 Nitrogen concentrations in the outflow with preliminary denitrification.
12.3.3 Summary
A WWTP is usually a highly nonlinear and hard disturbed process. Because of the physical and biological circumstances, such processes are usually controlled by a time schedule or by on–off control. Generally, an on–off controller offers the better ability for control. So far the complexity of the process model, the high computa-
12.3 Wastewater Quality Control with Pre-denitrification 4
4
4
4
4
4
t
(a)
t
(b)
conventional on-off control
predictive on-off control
Figure 12.22 Airflow for each variable zone with preliminary denitrification (the dashed lines indicate the mean value of the air inflow rate). 5
5
5
6
Σ
Σ
t
(a)
conventional on-off control
t
(b)
predictive on-off control
Figure 12.23 Airflow and volume with preliminary denitrification (the dashed lines indicate the mean value of the air inflow rate).
493
494
12 Case Studies
tional effort for the simulations, and the long prediction horizons have prevented the application of a predictive on–off controller. With the availability of faster hardware, the derivation of simplified process models, and the new predictive on–off controller algorithm, it is now possible to apply a predictive controller to control such plants. In the past, WWTPs were mainly designed for a higher load than what really occurs under real circumstances, in order to have a reserve and to be able to keep the allowed limits in all cases and to be prepared for a larger future load. With a better control strategy the violation of the concentration limits can be prevented and both the size of the plant and the costs of aeration can be reduced. The simplified model of the WWTP offers a slightly worse approximation of the plant than is achievable with the more complex ASM1 based on biological and physical equations. But the simplified model offers an adequate approximate model for such plants and also offers some additional advantages. First, the simplified model requires much less computational effort; thus, much longer horizons are possible for a predictive controller. In addition, the simplified model contains fewer parameters than the much more complex ASM1 (ASM1 is based on 14 state variables, which are not all measurable). Predictive on–off control based on the simplified model provides good results, as illustrated by the simulations in this chapter.
References 1 Alex, J., To, T.B., and Hartwig, P. (2002a) Improved design and optimization of aeration control for WWTPs by dynamic simulation. Water Science and Technology, 45(4–5), 365–372. 2 Alex, J., Tschepetzki, R., and Jumar, U. (2002b) Predictive Control of Nitrogen Removal in WWTPs Using Parsimonious Models, Proceedings of the IFAC 15th Triennial World Congress, Barcelona, Spain. 3 Fikar, M., Chachuat, B., and Latifi, M.A. (2002) Optimal Control Design for an Alternating Activated Sludge Process, Proceedings of the 5th Scientific-Technical Conference Process Control, Kouty nad Desnou, Czech Republic. 4 Gawthrop, P.J., Nomikos, P.E., and Smith, L. (1988) Adaptive Temperature Control of Industrial Processes – a Comparative Study, Proceedings of the CONTROL’88 Conference, Oxford, UK, pp. 42–48. 5 Haber, R., Jörgl, H.P., Vecsei, T., and Haider-Schmid, E. (1991) Adaptive and Predictive Strategies for Extruder Temper-
6
7
8
9
ature Control, Proceedings of the 9th IFAC/IFORS Symposium on Identification and System Parameter Estimation, Budapest, Hungary, Vol. 1, 481–486. Haber, R., Lang, F., and Schmitz, U. (2004) Predictive Control of Nitrogen in Waste Water Plants with Three Variable Zones, Proceedings of the 6th International Process Control Conference, Kouty nad Desnou, Czech Republic. Hoffmann, U. (1987) Eine adaptive Zweipunktregelung für Prozesse mit schaltenden Stellgliedern (A self-tuning on-off controller for processes with switching actuators). Automatisierungstechnik, 35(5), 184–191. Hoffmann, U., Müller, U., and Schürmann, B. (1983) A microprocessor based self-tuning on-off controller for thermal processes. Proceedings of the 5th International Conference on Instrumentation and Automation in Paper, Rubber, Plastics and Polymerization Industries, Antwerp, Belgium. Jörgl, H.P. and Haber, R. (1990) Adaptive und prädiktive Regelung einer
12.3 Wastewater Quality Control with Pre-denitrification Spritzgießmaschine (Adaptive and predictive control of injection molding machine), in Simulation in der Regelungstechnik (eds K.H. Fasol and K. Diekmann), Springer Verlag, pp. 440–457. 10 Kim, H., McAvoy, T.J., Anderson, J.S., and Hao, O.J. (2000) Control of an alternating aerobic-anoxic activated sludge system – part 2: optimization using linearized model. Control Engineering Practice, 8, 279–289. 11 Lang, F., Schmitz, U., and Haber, R. (2004a) Predictive Control with Simplified Models of WWTP with Intermittent Denitrification, Proceedings of the International Carpathian Control Conference, Zakopane, Poland, pp. 127–132. 12 Lang, F., Schmitz, U., Haber, R., and Mann, N. (2004b) Prädiktive Regelung der Ammoniumkonzentration bei der kommunalen Abwasserreinigung mit vorgeschalteter Denitrifikation und drei variablen
Zonen (Predictive control of nitrogen in waste water plants with three variable zones), Proceedings of the 11. SIMBA User Meeting, Tangermünde, Germany. 13 Latifi, M.A. (2003) Theoretical and Practical Aspects of Dynamic Optimization of Chemical Processes, Proceedings of the 14th International Conference Process Control, Strebske Pleso, Slovakia. 14 Lukasse, L.J.S., Keesman, K.J., and van Straten, G. (1999) Recursively identified model for a short-term predictions of NH4 /NO 3 -concentrations in alternating activated sludge processes. Journal of Process Control, 9, 87–100. 15 Schmitz, U., Haber, R., and Lang, F. (2005) Predictive On-Off Cost Minimizing Control of a Municipal Waste Water Treatment Plant, Preprint of the 16th IFAC World Congress, Vol. 16, Part 1, Prague, Czech Republic, pp. 43–48.
495
497
13 Industrial Applications Model-based Predictive Control (MPC) is a powerful tool for controlling MultiInput, Multi-Output (MIMO) processes considering hard and soft constraints. In the sequel three industrial applications are presented: concentration control of a petrochemical distillation column, concentration control and reduction of steam consumption in a stripping column, temperature and combustion control of a gas-heated furnace for chemical gasoline. All these applications were performed with the Rhineland Refinery of Shell in Cologne (Germany) in the frame of works for a common diploma thesis with Cologne University of Applied Sciences. These applications show how such a project is executed in practice. The steps of the design and implementation are as follows:
learning the process (based on the instrumentation and piping diagram), definition of the control targets (both technological and economic), selection of the controlled, manipulated, and disturbance variables, selection of the hard and soft constraints, experimental model building (test signal design, performing the experiments, parameter estimation), designing a simulation setup (simulation model, controller), iterative determination of the controller parameters by evaluating repeated simulations, real-time control, evaluation of stream factor (ratio of automatic control operation time to the manual operation time) and maintenance, calculation of the economic and technological benefits.
The above steps are given for all the three projects in detail. In all cases linear MPC was used at a typical operating point of the plant. Today, generally commercial model-based predictive controllers are rather applied as Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
498
13 Industrial Applications
linear constrained MIMO controllers than nonlinear controllers, even though nonlinear algorithms and realizations are also known. The first and the third application are examples of how the interactions between apparatus have to be prevented. In the first application the bottom concentration of a distillation column was controlled mainly by altering the heating power. On the other hand, the furnace, producing the heating oil for the heat exchanger should be operated smoothly. In the third application a closed-circuit process is controlled where the temperatures influence each other, as the furnace outlet is the reactor feed and the reactor product preheats the gasoline/hydrogen mixture, which is the furnace feed. The third application is an example of how safety can be ensured by advanced control. There is a minimum allowed oxygen concentration in the flue gas, as below this value the combustion is not stoichiometric and toxic carbon monoxide is emitted. There is a maximum allowed heating power in a furnace: this must not be exceeded for safety and emission reasons. The combustion airflow must not be decreased below a given value in order to prevent flame breaks.
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
For a petrochemical distillation column, which separates chemical petrol in a refinery of the Rhineland Refinery of Shell in Cologne (Germany), a multivariable predictive controller has been developed, simulated, and implemented. The controller design is presented in detail: the development of a controller concept, selection of the disturbance, manipulated, and controlled variables, process model identification, building of the controller structure and defining the physical constraints, adjustment of the controller parameters, the results of the simulations, and implementation and real-time operation of the controller are discussed. The attainable economic advantages are also summarized. Feed-forward disturbance control was designed for the compensation of the feed flow fluctuations. The weighting coefficients of the cost function were optimized interactively during simulations. With predictive control not only the operation of the column, but also the behavior of the coupled furnace became smoother. Simultaneously, the pressure was minimized, which resulted in reduced duty (heating power) consumption. However, there are several practical problems which are rarely discussed in scientific papers, for example: how to handle basic Proportional plus Integral plus Derivative (PID) controllers in a predictive control framework, how to handle predictive cascade control (in a better way than using independent single-variable predictive controllers),
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
how to reduce the online computation time by considering only predefined points and not all points in the control error horizon, how to reduce the online computation time by not allowing changes in the manipulated variable in the whole manipulated variable horizon (using the socalled blocking technique), how to tune the weighting factors of the control error in multivariable cases and in cascade cases, how to tune the weighting factors of the manipulated variable changes without influencing the effect of the weighting factors of the control error. In the design phase answers to the above questions had to be given. The solutions and experiences will be described here. It is expected that the results will be useful in other applications too. The control targets were keeping the important physical variables within a set range under consideration of the constraints. The constraints can be handled as soft constraints, which can be violated temporarily, and as hard constraints, which cannot be violated. In the sequel the technique of handling the constraints will be treated. In addition to the aim of controlling the concentration of the top and bottom product, the energy consumption should be minimized. A very simple practical method is applied which does not use any comprehensive extremum-searching algorithm. Every apparatus is a part of the plant. Effects on the downstream and neighboring apparatus (e.g., reboiler furnace) have to be taken into account during the design phase. The feed-forward disturbance compensation (caused by fluctuations in the feed flow) is one of the known control methods. In the present case, the load of the reboiler furnace also had to be kept constant. 13.1.1 Description of the Distillation Column
The column (Figure 13.1) is used for separating chemical petrol. Its main features are as follows: feed: chemical petrol from the desulfurization, top product: light petrol (boiling point between about 30 and 65 ı C), bottom product: heavy petrol (boiling point between about 65 and 180 ı C). The column has the following basic control loops: 1. Reflux control: The basic control is a Proportional plus Integral (PI) flow control loop.
499
500
13 Industrial Applications 0 - 50 %
50 - 100 %
off gas
TT
PC
LC
20
QT TT
petrol feed
FT
TC
16 11 reflux 10
light petrol
FC
heating medium steam
TT
2
UC
PDT
condensate
LC
reboiler
(a)
photo
TT
heavy petrol
(b) piping and instrumentation diagram
Figure 13.1 Distillation column with basic control loops.
2. Pressure control: The pressure can be decreased by increasing the pitch of the fin fans of the air coolers. Over 50% of the manipulated variable the natural cooling is at its maximum value, further pressure decrease is possible only by opening the flare valve (split range control). Flaring is not permitted. 3. Feed temperature control: The feed temperature is controlled via the steam flow. To work according to the design conditions the feed temperature should be equal to the feed tray temperature. If the duty consumption has to be reduced, the feed temperature can be increased. 4. Reboiler power: The reboiler power (duty) is controlled by the heating medium flow (heating oil). The oil is circulated in a reboiler furnace near to the column. 5. Condenser level control: The level in the condenser is kept constant by setting the distillation flow valve. 6. Column bottom level control: The level at the bottom of the column is controlled by setting the bottom product flow valve.
13.1.2 Control Targets, Controlled and Manipulated Signals, Constraints
The control targets are keeping the variables within a set range under consideration of constraints or to minimize the variables. The main variables which have to be kept constant or have to be minimized are as follows:
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
1. Distillate quality. The concentration of the heavy petrol in the top product (distillate) has to be kept below 2.5%. The concentration is estimated as the Final Boiling Point (FBP), that is, the boiling temperature of the product if 99% of the product has been evaporated. 2. Bottom product temperature. Instead of a bottom product concentration analysis, the much cheaper Pressure-Compensated Temperature (PCT; see (13.2)) of the bottom product (based on temperature and pressure measurements at tray 2) is calculated. 3. Furnace load. The hot oil flow through the reboiler is controlled by a multivariable predictive controller. However, the load of the furnace feeding the heating medium has to be kept constant. This can be achieved by changing the reboiler bypass flow in the heating medium depending on the reboiler pressure drop. Keeping the pressure difference at the bypass valve constant ensures a constant load of the furnace even if the reboiler flow is manipulated. 4. Column pressure. The column pressure has to be kept at its minimum value to reduce the energy consumption (reboiler heating). It was intended to decrease the pressure to decrease steam consumption. Changing the pressure set point meant the tray temperature had to be changed simultaneously to keep the concentration within the required limits. A new temperature value can be calculated from the temperature measurement and the pressure with the knowledge of the pressure reference value. The relation between the vapor absolute pressure (p) and the boiling temperature (T ) with constant concentration is expressed by a modified Clausius– Clapeyron equation: ln(p [bara b s ]) D a
b . T(K)
(13.1)
The new temperature value (TP C T ) can be calculated with knowledge of the pressure reference value (p r e f ), the actual tray temperature measurement (Ta c t ), and tray pressure (p a c t ) value, TP C T D
c c Tact
ln
pre f p act
,
(13.2)
where c is the slope of the line from (13.1) and can be calculated from two points of a vapor pressure diagram: ln pp 12 . (13.3) cD 1 T11 T2 The modified temperature is called the Pressure-Compensated Temperature (PCT). Knowledge of the piping and instrumentation scheme, the basic PI(D) control loops, and the control targets leads to the following controlled, manipulated, and constrained variables:
501
502
13 Industrial Applications
The Main Controlled Variables:
1. Top product (distillate) quality measured as the FBP; 2. Bottom product (pressure compensated) temperature measured at the second tray of the column; 3. Heating power (duty); 4. Column pressure.
Auxiliary Controlled Variables:
1. Feed temperature should be equal to the feed tray temperature. 2. As controlled variable of an inner cascade loop the PCT of tray 16 is calculated and controlled. The top PCT shows earlier a change in the distillate quality than the measured FBP.
Manipulated Variables and Their Hard Constraints:
1. Set value of the reflux basic controller – Minimum constraint: because of pump protection and tray sealing or weeping, – Maximum constraint: to prevent tray flooding, – Change (rate) limit: to ensure that the top vessel level controller could compensate for the reflux changes with the distillate draw-off. Usually the rate of change limit will never be violated because the manipulated variable weighting of the multivariable predictive controller is set large enough to avoid too big changes. 2. Set value of the pressure basic controller – Minimum constraint: to avoid jet flooding and make sure that the column pressure is higher than the pressure in the off-gas system if noncondensible gases have to be discharged. – Maximum constraint: to keep the separation perfect (in this case, the lower the pressure, the better the separation) and to keep the pressure below the value which would open the safety valve. – Change (rate) limit: to avoid big pressure changes to keep the effect on downstream plants moderate. 3. Feed temperature control valve position – Minimum constraint: completely open. – Maximum constraint: completely closed.
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
4. Duty (heating medium) control valve position – Minimum constraint: to keep a minimum flow (furnace circulation) to protect the furnace against film evaporation if any of the elements fail (e.g., bypass valve), to avoid slug flow, and to keep a minimum heat transfer coefficient. – Maximum constraint: because of the valve range. Soft Constraints of Variables:
1. Valve position of the pressure basic controller: – Maximum constraint: to avoid opening of the flare valve, which causes product loss and environmental pollution. It is only a soft constraint, which can be temporarily violated, because sometimes inert gas has to be bled. 2. Furnace duty: If the duty is minimized, the pressure will be decreased. In that case the separation becomes better and also less duty is needed. The minimization is done if the pressure cannot be decreased because of constraints. – Minimum constraint: to keep the tray loading at the minimum. – Maximum constraint: to save energy. 3. Bypass valve position: – Maximum and minimum constraints: to keep the basic pressure difference controller in the operating range. The reboiler flow has an effect on the reboiler bypass. If the reboiler valve closes the bypass, the pressure difference increases and the bypass PI controller opens the bypass valve. If the position of the bypass valve is between its minimum and maximum limits, then the bypass pressure difference controller can keep its set point. It is very important for the furnace to get enough circulation flow. 4. Set value of the reflux basic controller: – Maximum constraint: This soft constraint can be temporarily violated, for example, if there is sudden feed decrease, the heating cannot be decreased fast enough because of the large heat capacity, but the reflux can be increased very fast and can compensate for the disturbance. 5. Furnace duty violation, that is, the current minus the allowed duty: – Maximum constraint: to protect the furnace against overheating.
503
504
13 Industrial Applications
The above requirements can be fulfilled by
multivariable predictive control with hard and soft constraints, with disturbance feed-forward of feed flow, by quality control of both the top and the bottom products, and with a low pressure reference value to minimize the pressure while keeping the qualities at the desired value.
13.1.3 The Process Model
To design a model-based predictive controller both an action model (from the manipulated variables to the controlled and soft constrained variables) and a disturbance model (from the measured disturbances to the controlled and soft constrained variables) have to be set up. In both cases the model outputs are: the main controlled signals, the auxiliary controlled variables, and the soft constrained variables. According to experience, the plant does not keep its steady-state value for a long time. Therefore, instead of a pseudo-random signal some step tests were applied for experimental identification. Figure 13.2 shows such a test sequence which ensures that at the end of the test the working point does not change. From the measured records the parameters of first-order or second-order transfer functions including dead time were identified by a least-squares parameter estimation algorithm. As second-order models did not give significantly better results than the first-order models, first-order models were applied for control design. The elaboration of the step tests took most time (some weeks) in the controller design procedure, as often other variables could not be kept constant and they disturbed the experiment. As a result of the experimental identification, Figure 13.3a shows the action model and Figure 13.3b presents the disturbance model of the column [7]. The blocks
Figure 13.2 Step test (e.g., for the reflux flow).
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column Kp=0.95 Td =0.0 T1 =8.0
reflux ref.
pressure ref. + -
Kp =-0.017 Td =12.0 T1 =11.0
Kc =-40.0 TI =1 TD =0
reflux
Kp =1 Td =0.0 T1 =0.0 Kp=-0.015 Td =0.0 T1 =5.0
Kp=0.268 Td =1.0 T1 =3.0
Kp=2.5 Td =15.0 T1 =20.0 duty valve pos.
(a)
Kp=0.17 Td =0.0 T1 =2.0
final Kp =0.782 boiling Td =10.0 point T1 =1.0 top
Kp =-0.06 Td =10.0 T1 =9.0
Kp=0.64 Td =3.0 T1 =5.0 feed temp. valve pos.
505
+ + + + Kp =-17.0 Td =6.0 T1 =8.0
K p=-23.5 Td =6.0 T1 =18.0
PCT top
pressure valve pos. + + PCT + + bottom pressure
Kp=0.72 Td =3.0 T 1=7.0 Kp=-0.07 Td =10.0 T1 =10.0 Kp=3.0 Td =13.0 T1 =20.0
Kp=0.665 Td =0.0 T1 =2.0
action model
feed temp. furnace duty
feed flow
Kp =-.001 Td =0 .0 T1 =2 .0 Kp=-0 .008 Td =2 .0 T1 =9 .0
duty
Kp =-0 .001 Td =0 .0 T1 =3 .0
bypass valve pos.
(b)
Kp =0 .72 Td =3.0 T1 =4.0
+ PCT Kp =0.782 final Td =10.0 boiling top =1.0 T + 1 point top +
Kp =0 .72 Td =3.0 T1 =7.0
+
PCT bottom
feed temperature
(measured) disturbance model
Figure 13.3 Process model with the model parameters [7].
show the identified linear first-order processes with static gain (K p ), dead time (Td ), and time constant (T1 ). All times are in minutes, and the dimensions of the static gains are the ratios of the dimensions of the dependent variables and the dimensions of the independent variables. The action model has a speciality which differs from the usual input/output models. The reflux model, that is, the relation between the reflux reference value and the reflux flow, is modeled by an overall transfer function (with static gain approximately 1 and time constant), but the basic control loop of the pressure is modeled completely with a PI controller and an open-loop pressure model (between the valve position and the column pressure). (In Figure 13.3a the integrating time is given in minutes). The detailed modeling has two advantages (however, applied only if necessary): the manipulated variable of the basic control loop, that is, the valve position, can be modeled and used as a soft constraint variable, any disturbance (e.g., in the weather) influencing the pressure can be quickly compensated for by the PI controller and the predictive controller of the bottom and top products does not have to change the corresponding manipulated signals.
506
13 Industrial Applications
13.1.4 Choice of the Set Values, Constraints, and Weighting Factors
The quadratic cost function of the predictive control is (e.g., (7.75)) JD
My n e2i X X iD1 n ei Dn e1i
C
λyi [y r i (k C d i C 1 C n e i ) yO i (k C d i C 1 C n e i jk)]2 λ syci
Mu X n ui X λ ui ∆ u2i (k C j 1) ) λ suic iD1 j D1
min
∆ u i I iD1,2,...,N u
,
where the parameters are the common parameters of a MIMO predictive control and, in addition, λ syci is the scaling factor of the ith controlled or constrained signal, and λ suic is the scaling factor of the ith manipulated variable. In practice often a set range is given instead of a set value. The cost function is zero if all controlled variables are within their ranges and there is no change in the manipulated variables. The auxiliary controlled variables are controlled with less accuracy than the main controlled variables. The optimization was performed by SMOC (which stands for “Shell Multivariable Optimizing Controller”) [5]. The sampling time of the control was chosen as 1 min. The constraints considered in the manipulated variables are shown in Table 13.1. The constraints and other physical requirements (set value control, disturbance compensation, pressure minimization, etc.) could be fulfilled by tuning of the weighting factors. The scaling and weighting factors of the manipulated, controlled, auxiliary, and further constrained variables are given in Tables 13.2–13.5. From the optimization point of view, there is no difference between the main control, auxiliary control, and soft constrained variables. There are weighting factors and minimum and maximum limits for all the variables. The weighting of the FBP is higher than that for the bottom PCT. The violation of the FBP of 1 ı C fits with the accuracy. The bottom PCT can be violated by 5 ı C because this is less important than the FBP. The pressure is weighted less because this weighting is just a driving force to minimize the pressure. The normal pressure is between 0.15 to 0.3 bar, and a violation of 0.3 bar is acceptable. The weighting of the feed temperature is very weak, and a violation of 10 ı C is acceptable. If there is a degree of freedom, then the feed temperature should achieve its set point. The top PCT is also weighted like the distillate quality (FBP) with a deTable 13.1 Hard constraints of the manipulated variables. No. Manipulated variable
Minimum value Maximum value Increment
1 2 3 4
299 t/d 0.145 bar 0% 62%
Reflux PID set value Pressure PID set value Feed temperature valve Duty valve
700 t/d 0.8 bar 100% 100%
20 t/d/min 0.001 bar/min 0.5%/min 0.1%/min
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column Table 13.2 Weighting factors of manipulated variables. p
No.
Manipulated variable
1 2 3 4
Reflux PID set value Pressure PID set value Feed temperature valve Duty valve
λ ui
1.00 3.00 3.00 1.50
p
λ sc ui
13.016 0.003 4.179 1.138
Table 13.3 Soft constraints and weighting factors of the main controlled variables. No.
Controlled signals
Dimension
Minimum
Maximum
1 2 3
FBP Bottom PCT Pressure
ıC
67.75 85.5 0.15
68.25 86.5 0.15
ıC
bar
q
λ sc y i /λ y i
1.0 0.2 3.22
Table 13.4 Soft constraints and weighting factors of the auxiliary controlled variables. No.
Controlled signals
Dimension
Minimum
Maximum
1 2
Feed temperature Top PCT
ıC
70.0 56.0
70.0 66.0
ıC
q
λ sc y i /λ y i
0.1 1.0
Table 13.5 Soft constraints and weighting factors of the constrained variables. No. Controlled signals
Dimension Minimum Maximum
1 2 3 4 5
% MW % t/d MW
Pressure PID valve position Duty Bypass valve position Reflux PID flow Furnace duty violation
0.0 4.0 0.0 0.0 1000
42.0 5.5 95.0 650 0
q
λ sc y i /λ y i
5.0 1.0 1.0 0.01 1.25
viation of 1 ı C, so the top PCT keeps the top distillate quality in an acceptable range if the quality measurement drifts away. The PCT set range is based on experiences and historical data. The weighting of the pressure valve position is very high to increase the column pressure fast enough during an outside temperature rise on a hot summer day. The weighting of the duty is weak, so there is just a driving force to minimize the duty. The weighting of the bypass valve is strong enough to keep the bypass valve in the set range; thus, the pressure difference controller always reaches its set value. The weighting of the reflux flow is weak; thus, the reflux can always control the desired
507
508
13 Industrial Applications
quality. But if there is a degree of freedom, the reflux flow has to be kept below the maximum set value even if the pressure has to be increased. So the pressure minimization has to be weighted less than the reflux maximum flow. In the case of furnace duty violation, the controller reduces the reboiler duty moderately; thus, the quality can be kept with the other manipulated variables. To reduce the online computation time of real-time control, changes in the manipulated variable were allowed only at the following points of the manipulated variable horizon: 0, 1, 4, 10, 27, and 71 (where 0 is the current time). In addition, the control error was calculated at the following points of the control error horizon: 1, 2, 3, 6, 15, 38, 99, and 259 (which means n e1 D 0 and n e2 D 258). 13.1.5 Simulation Results of the Tuning of the Weighting Factors
In all simulation plots the ranges of the following variables were scaled from 0 to 100%: FBP from 40 to 70 ı C, top PCT from 40 to 70 ı C, top pressure from 0.1 to 0.4 bar, feed temperature from 81 to 95 ı C, bottom PCT from 90 to 120 ı C, pressure PID valve position from 0 to 60%, reflux flow from 450 to 670 t/d, duty from 0 to 8 MW, duty valve position from 70 to 100%, feed temperature valve position from 10 to 100%, and feed flow from 2800 to 3000 t/d. The control with a reference signal step at the FBP at time point 30 min is shown in Figure 13.4 without optimization and with optimization of the weighting factors, respectively. As initial values all weighting factors were chosen equal to 1. The systematic optimization by repeated simulations led to the values given in Tables 13.2– 13.5, see Volk et al. [7]. As is seen, the control became much faster in the second, optimized case. After the FBP had been fitted to its reference value, the pressure decreased as the optimizing controller minimizes the pressure reference value while fulfilling the quality requirements. The control of a feed flow (disturbance) step at time point 30 min is shown without and with optimization of the weighting factors in Figure 13.5. As initial values 100
boiling point top product ref. value boiling point top product
feed flow
90 80
60 percentage
pressure valve position maximum
PCT top product
70
feed temperature
reflux flow
50
pressure valve position
40
valve positionheating 30
pressure
valve position feed
20
ref. value PCT bottom product
temperature
10
PCT bottom product 0 0
10
20
30
40
50
60
70
80
90
100
time [min]
(a)
without optimizing the weighting factors
(b)
Figure 13.4 Control of a reference signal step [7].
with optimizing the weighting factors
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
(a)
without optimizing the weighting factors
(b)
509
with optimizing the weighting factors
Figure 13.5 Control of a feed step (disturbance step).
all weighting factors were chosen equal to 1. The optimization by repeated simulations led to the values given in Tables 13.2–13.5. As is seen, after the weighting factors had been optimized, the control became faster. Figure 13.6 shows the effect of using the top PCT as an inner loop controlled variable for the control of the FBP. The advantage of this is twofold: Cascade control effect: The top PCT detects a disturbance, for example, feed flow, composition, or temperature change, earlier than the FBP. Model correction: By comparison of the measured and the predicted controlled variables, a model output correction is done faster by using the estimated deviation in the inner loop controlled variable. With knowledge of the process model between the top PCT and the FBP, the future deviation in the FBP can be predicted earlier than without measuring the top PCT as an inner loop controlled variable. A stepwise disturbance in the top PCT at time point 5 min is compensated for faster with model correction considering the top PCT/FBP model than without it. (The control starts immediately after the disturbance step if the top PCT was measured.) Figure 13.7 shows the mutual effect of disturbance feed-forward and the use of measuring the top PCT for the model correction. Increasing feed flow decreases the top PCT and the FBPs, and the predictive controller reduces reflux flow and increases duty. Furthermore, the feed temperature is raised temporarily to compensate for the top temperature drop. This effect is only temporary because the quality is weighted higher than the feed temperature. Figure 13.7a shows this effect without disturbance feed-forward and without model correction considering the top PCT/FBP model. As is seen in Figure 13.7b, the feed flow disturbance is compensated for much earlier than without measuring the top PCT because the top PCT was used for
510 % 100
13 Industrial Applications % 100
final boiling point
final boiling point 90
90
PCT top
PCT top 80
80
70
70 duty
duty 60
60 50 reflux flow
preassure PID valve pos.
feed temp. valve pos.
40
reflux flow
t [min] feed temp. valve pos.
pressure PID valve pos.
40
feed Flow
pressure
50
feed flow
pressure
duty valve pos.
30
30 duty valve pos. 20
feed temperature
feed temperature 20
PCT bottom
PCT bottom
10
10
0
0 10
(a)
20
30
40
50
60
70
80
90 t [min]
10
20
(b)
without model correction considering top PCT/FBP model
30
40
50
60
70
80
90 t [min]
with model correction considering top PCT/FBP model
Figure 13.6 Stepwise disturbance in the top PCT. % 100
% 100
90
90
final boiling point
80
final boiling point
80
PCT top
PCT top feed flow
70 60
60
feed temp. valve pos.
50
feed flow
70
duty pressure PID valve pos.
40
duty feed temp. valve pos.
50
duty valve pos. feed temperature
pressure 30
duty valve pos. pressure feed temperature
30
reflux flow
reflux flow
20
20
10
10
PCT bottom
0
PCT bottom
0
10
(a)
pressure PID valve pos.
40
20
30
40
50
60
70
80
without model correction considering top PCT/FBP model
90 t [min]
10
(b)
20
30
40
50
60
70
80
90 t [min]
with model correction considering top PCT/FBP model
Figure 13.7 Stepwise feed flow disturbance without feed-forward.
the inner cascade control loop and for the model correction considering the top PCT/FBP model. The pure disturbance feed-forward control (without considering the top PCT/FBP model for prediction of the FBP correction) is hardly better than the control without feed-forward using the inner cascade control loop variable (Figure 13.7b). The small difference is explained by the fact that the top PCT detects feed flow change with very small delay and can compensate for a disturbance in the feed flow almost as fast as a disturbance feed-forward control. Using the top PCT as an inner cascade loop controlled variable for prediction, the FBP correction in addition to the disturbance feed-forward does not improve the control quality further, because there is a very short lag between the feed flow and the top PCT. The simulation results in a plot similar to that in Figure 13.7b.
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
13.1.6 Implementation and Results of Real-Time Control
Figure 13.8 shows the data communication between
an off-line PC (parameter estimation, controller tuning by simulations), SMOC [5] predictive controller (online optimization), a process computer (real-time database), and a process control system (Honeywell TDC 3000).
The communication between the off-line and online parts is now realized by OPC (originally meaning “OLE for Process Control”, where “OLE” stands for “Object Linking and Embedding”). Figures 13.9–13.11 show the real-time control during the first 10 days of implementation of the predictive control [7]. In the first 6.5 days only the basic control loops worked and then (marked by a vertical dashed line) the predictive control was started and the first 3.5 days of its performance is shown. The main controlled variable, the FBP of the top product, is kept almost constant. The reduction of the peak-to-peak value due to predictive control is about 3 : 1; the
Figure 13.8 Connection of the process to SMOC.
511
512
13 Industrial Applications
(a) Control of the final boiling point
(b)
Control minimizing the column pressure
Figure 13.9 Control of the distillation column.
(a) Feed flow fluctuation (disturbance)
(b)
Manipulated variable reflux
Figure 13.10 Control of the distillation column.
reduction of the variance is even better although big changes in the feed flow (between 3300 and 3900 t/day) happened. Also, the column pressure was controlled much more smoothly (reduction of the peak-to-peak values is better than 4 : 1) and the pressure keeps its minimum possible value. Finally, Figure 13.12 shows the control during an almost stepwise feed flow fluctuation caused by a crude change (different chemical petrol content in crude) about 1 yr after the implementation. Practically, there is no change in the FBP of the top product.
13.1 Concentration Control and Pressure Minimization of a Petrochemical Distillation Column
Figure 13.11 Heating power (duty).
Figure 13.12 Stepwise feed flow fluctuation.
13.1.7 Economic Benefits of the Optimization
Through a decrease of the variance of the FBP of the top product, the reference value can be increased and more heavy (cheaper) components in the expensive top product can be sold. This is shown by the following calculation. Assume the feed flow is 3136 t/d. Table 13.6 shows the mean value and the standard deviation of the FBP of the top product with PI control and with predictive control. Because of the reduction in the fluctuation (standard deviation), the reference value (mean value) can be increased. This leads to more bottom product and less top product, as shown in Table 13.7. The top product can be increased by 3.8 t/d to achieve a better control performance.
513
514
13 Industrial Applications Table 13.6 Quality of top product with different control techniques. Control
Mean value of FBP
Standard deviation of FBP
PI Predictive
60.857 ı C 60.890 ı C
1.9590 ı C 0.9795 ı C
Table 13.7 Product quantities with different control techniques. Control
Top product
Bottom product
PI Predictive
263.4 t/d 267.2 t/d
2873.0 t/d 2869.2 t/d
The price difference in summer and winter is as follows: the top product is more expensive than the bottom product in summer by 27 €/t and in winter by 9 €/t the top product in the whole year is more expensive on average than bottom product by (27 C 9)/2 D 18 €/t. If the availability of predictive control is assumed to be 90%, the benefit becomes: Top product increase price advantage availability 365 d/yr D 3.8 t/d 18 €/t 0.9 365 d/yr D D 22470 €/yr 13.1.8 Summary
A multivariable predictive controller has been developed, simulated, and implemented for a petrochemical distillation column, which separates chemical petrol in a refinery. The controller keeps the set points of the distillate and bottom concentration constant while fulfilling different practical physical constraints. Furthermore, the controller is able to compensate for measured disturbances, for example, feed flow changes, by disturbance feed-forward control. Application of predictive cascade control by measuring an inner variable (top PCT) enables the main control variable (FBP of top product) to be controlled much faster. The weighting factors of the control errors and of the manipulated variable increments were roughly tuned on the basis of physical considerations and were fine-tuned in several simulation runs in an iterative way. Some plots show the controlled and manipulated variables before and after the implementation of predictive control. It was demonstrated that the quality fluctuation became much smoother. Furthermore, using a low pressure reference value led to less duty, which means energy saving. If the pressure difference on the by-
13.0 Concentration Control and Reducing Steam Consumption in a Stripping Column
pass valve constant is kept constant, also the loading flow of the coupled furnace is kept constant, that is, the operation of the furnace became smooth. The linear control algorithm is valid in the vicinity of the operating point for changes of about 10%. At another working point a new model estimation and a new (linear) controller tuning would be required. The above case study from industry demonstrates well what can be achieved by the optimization of a cost function with a multivariable predictive control. It was also shown that physical limits can be considered either as hard limits during the minimization of the cost function or as soft limits by adding quadratic penalty terms to the cost function of the control.
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column
A stripping column in a refinery was controlled by conventional PID controllers at a working point. The aim of the controller design is to minimize steam consumption but simultaneously to keep the quality requirements. This optimizing control has to consider the physical constraints as well. Manual decoupling and tuning of the PID controllers is usually a comprehensive task. The MPC approach is a systematic design procedure based on physical requirements and on the simulation model, and requires relatively little control expertise. 13.2.1 Description of the Stripping Column and the Basic Control Loops
The stripping column (Figure 13.13) is a low-pressure separator and is used for separating fixed components of pyrolyzed petrol at the Rhineland Refinery of Shell in Cologne (Germany). The main components are as follows: feed: partially hydrated pyrolyzed benzine, top product: hydrocarbon components C1 to C4 and traces of the aromatic components CC 5 and hydrogen, bottom product: aromatic components. The main dimensions of the column are as follows: height about 20 m, diameter about 2 m. It has a capacity of about 1200 t/d at a temperature of about 95 ı C and a 2-bar overpressure. About 2.5% of the feed mass flow leaves the column at the top and the rest leaves at the bottom. The material mixture (pyrolyzed petrol) to be separated is fed laterally into the top of the column. The material mixture is separated by the heat supply. The gaseous component is exhausted at the top of the column. The top product is partly condensed and led through an air cooler into the condenser. The noncondensed head product is taken off over a compressor; the condensed head product is fed again as reflux into the column. In the lower part of the stripping column, the bottom
515
516
13 Industrial Applications
Figure 13.13 Piping and instrumentation diagram of the stripping column with the basic control loops, manipulated variables (MV), controlled variables (CV), limited variables (LV), and disturbance variables (DV).
product is enriched with heavy-boiling components. Most of the bottom product is passed into the subsequent plants. A part of the bottom product is evaporated in the steam-heated heat exchanger and fed to the bottom of the column. This is the source of the necessary thermal energy which causes the separation process of the material mixture in the splitter column. Figure 13.13 shows the piping and instrumentation scheme with the basic control loops. The stripping column possesses the following basic control loops: 1. 2. 3. 4. 5. 6.
feed tank level control by changing the feed flow, top product vessel level control by changing the reflux flow, bottom level control by changing the bottom product flow, tray temperature control by changing the steam flow, top product temperature control by changing the cooling fan angles, pressure control by changing the fuel gas valve position.
13.2.2 Control Targets, Controlled and Manipulated Signals, Constraints
The main objectives of the control are as follows: The product concentrations should be equal to their set values. Instead of the concentration, the PCT of a selected tray is controlled. (The concentration is measured once a week off-line.)
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column
Physical constraints should not be violated. There are two kinds of constraints: – state variables (e.g., column temperature), – manipulated variables (e.g., valve position). Production costs (energy consumption) have to be minimized. In this case the pressure has to be decreased to reduce the steam consumption.
Controlled Variables
1. PCT of tray 4: The product concentrations should be kept constant at their set values. As concentration measurement is expensive and usually slow, distillation columns are often controlled on the basis of temperature measurement and the temperature set value is corrected by means of infrequent laboratory concentration analysis. As shown in Figure 13.13, the temperature of a selected tray (tray 4) was controlled. When the pressure set point was changed, the temperature set point had to be changed simultaneously to keep the concentration constant. With decreasing pressure the set point of the PCT has to decrease. The new PCT reference value can be calculated from the old reference value with knowledge of the new pressure set value. (See Section 13.1.2 for details.) 2. Column pressure: It was intended to decrease the pressure in the column to decrease the steam consumption for the reboiler heating. However, with decreasing pressure the chemical separation becomes more difficult. Before the implementation of the predictive control, the column was controlled by PID controllers. Most of the basic control loops were kept in operation and the set points were modified by the predictive control. Only the temperature control loop of tray 4 was opened and the predictive controller took over the cascade control of the steam flow and set the steam flow reference value. Consequently, the set value of all PID controllers is set by the predictive controller. Manipulated Variables
1. Set value of the steam flow controller: The temperature of the chosen tray can be increased by raising the steam flow. 2. Set value of the top product temperature controller: The top product can be cooled by increasing the pitch angle of the fan. 3. Set value of the column basic pressure controller: The pressure can be increased if the fuel gas valve is opened and fuel gas with higher pressure flows into the column. By closing the valve, the pressure decreases.
517
518
13 Industrial Applications
To ensure good operation some variables have to be constrained. This possibility is the main advantage of predictive control over the classical PID control. Soft Limited or Constrained Variables
1. Upper limit of the pressure in the column: With higher pressure the boiling temperature would increase. The temperature could be raised by means of more steam and that would increase both the costs and the pressure further on. 2. Lower limit of the pressure valve position: If the pressure valve position is decreased below its limit, the pressure cannot be reduced by its own manipulated signal but only by reducing the steam flow, which means the temperature and the pressure cannot be controlled independently. 3. Upper limit of the top product temperature: The top product is cooled by air. The temperature can be decreased by increasing the pitch of the fin fans of the air coolers. The temperature is limited by the maximum cooling capacity of the natural cooling. Another reason for limiting the top product temperature is that the hot distillate damages the compressor. 4. Lower limit of the top product temperature valve (cooling fan angle) position: The upper temperature limit corresponds to a lower limit of the cooling fan position of the natural cooling. 5. Upper limit of the reflux valve position: The reflux valve position is limited to ensure a sure control range of the product quality. (The top product concentration can be increased by raising the reflux flow.)
Disturbance Variables
1. Feed flow: As the splitter is part of a larger plant, the feed is a product of prior apparatus and is not constant. To smooth the feed, it flows through a storage vessel. Sometimes the level control is tuned in such a way that flow fluctuations are not smoothed. That means flow fluctuations are usual in practice. The flow is measured. 2. Feed temperature: This disturbance fluctuates not as greatly as the flow. Also, the feed temperature is easily measurable. Figure 13.13 shows the manipulated variables, controlled variables, disturbance variables, and limited variables in the scheme of the stripping column.
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column
13.2.3 Process Models from Step Tests
The predictive control algorithm calculates the controlled signal and simulates the signals under limits at each control step in a future horizon. To be able to perform the simulation, a model between the following variables has to be set up: the input signals: – manipulated variables, – disturbances, and the output signals: – controlled signals, – soft constrained signals. Consequently, the multivariable plant has the following physical input and output variables: input signals: – set value of the steam flow controller, – set value of the top product temperature controller, – set value of the basic column pressure controller, – feed flow, – feed temperature. output signals: – pressure-compensated column temperature, – pressure in the column, – temperature of the top product, – reflux valve position, – pressure valve position, – top product temperature valve (cooling fan angle) position. First-order models were estimated from step tests by the method of least squares. The models are characterized by the estimated static gains (K p ), time delays (Td ), and time constants (T1 ). Table 13.8 shows the estimated action models between the manipulated and the controlled variables, Table 13.9 shows the estimated action models between the manipulated and the soft constrained variables and Table 13.10 shows the estimated disturbance models between the disturbances and the controlled and the soft constrained variables [4]. As is seen, in some cases modeling was not possible. All times are in minutes, and the dimensions of the static gains are the ratios of the dimensions of the dependent variables and the dimensions of the independent variables.
519
520
13 Industrial Applications Table 13.8 Action model for the controlled variables. Output Input
PCT [ı C]
Pressure [bar]
Steam flow set value [t/d]
K p D 0.1706 Td D 3.316 T1 D 1.467
K p D 0.0114 Td D 0 T1 D 9.369
Top temperature set value [ı C]
K p D 0.5967 Td D 5.116 T1 D 25.04
K p D 0.019 Td D 0 T1 D 11.9
Pressure set value [bar]
K p D 11.68 Td D 0 T1 D 11.27
K p D 1.0 Td D 0 T1 D 11.32
Table 13.9 Action model for the limited variables (except those which are controlled variables as well). Output Input
Top product temperature [ı C]
Reflux valve position [%]
Steam flow set value [t/d]
K p D 0.2186 Td D 1.48 T1 D 9.159
K p D 0.325 Td D 2.0 T1 D 17.7
Top temperature set value [ı C]
Kp D 1 Td D 0 T1 D 14.53
Pressure set value [bar]
K p D 16.26 Td D 1.684 T1 D 12.66
Pressure valve position [%]
Top product temp. valve position [%] K p D 0.722 Td D 0.6674 T1 D 7.446 K p D 2.192 Td D 0 T1 D 0.054
K p D 4.455 Td D 6.403 T1 D 0.9602
K p D 187.5 Td D 0 T1 D 6.102
All models identified are shown; the missing ones could not be estimated. 13.2.4 Hierarchical Minimization of the Control Cost Function
The predictive controller was realized by the commercial program package IDCOM [3] from Setpoint Inc. (Houston, Texas, USA; later belonging to Aspen Technology) in 1998.
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column Table 13.10 Disturbance model for the limited variables (except of those which are controlled variables, as well). Output Input
PCT [ı C]
Pressure [%]
Top product temperature [ı C]
Pressure valve position [%]
Feed flow [t/d]
K p D 0.0165 Td D 6.428 T1 D 2.627
K p D 0.0007 Td D 20 T1 D 121.5
K p D 0.0212 Td D 5 T1 D 47.7
K p D 0.0392 Td D 0.4065 T1 D 0.0021
Feed temperature [ı C]
This program allows the definition of a hierarchical control algorithm with rankings of the controlled and constrained variables. Generally the following rankings are defined: 1. Highest priority: The manipulated variables and their allowed changes are subject to hard constraints which must not be violated. Here manipulated variables are only the manipulated variables of the predictive controller (and not of the basic PID controller). 2. Medium priority: Soft constraints are defined (but not solely) for controlled variables. These variables should not be but can be violated temporarily. 3. Low priority: If all constraints are fulfilled, the controlled variables should be set to their ideal resting values. Within the same priority, weighting factors of the variables influence the control aim. In the case of the splitter column, the control aims were classified according to the following priorities in decreasing order: Rank 1: keeping the valve positions within the limits allowed: – lower limit of the pressure valve position, – lower limit of the distillate temperature valve (cooling fan angle) position.
521
522
13 Industrial Applications
Rank 2: not violating the constraints: – upper limit of the pressure in the column, – upper limit of the temperature in the column, – upper limit of the reflux valve position. Rank 3: – PCT control within a small band of 2 ı C. Rank 4: – keeping the pressure as low as possible.
13.2.5 Set Point Control Considering the Constraints
To ensure smooth control, the controlled variable is kept not exactly at a reference value but in a predefined range around the reference signal. This strategy allows greater freedom for optimizing the cost function of the control. Figure 13.14 shows the reference value dead band with a minimum and a maximum zone as soft constraints. The control algorithm performs as follows: 1. Dead band (point 1): If the controlled variable is within the dead band, then the calculated manipulated signal is not executed and the manipulated signal is kept at its past value. 2. Minimum/maximum zone (point 2): If the controlled variable is within the minimum or the maximum zone, then the manipulated signal calculated with the real reference signal is executed. 3. Outside the minimum/maximum limits (point 3): If the controlled variable is outside the minimum or the maximum zone, then the reference signal is changed to the corresponding limit signal and the manipulated signal calculated with the new reference signal is executed. With multivariable control there are several controlled variables. The control performance index is a weighted sum of the individual control errors and the sum of the penalty functions. The importance of the exact control of a variable is achieved
Figure 13.14 Dead band and limit zones.
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column
by choosing the corresponding weighting coefficient larger than the other coefficients. 13.2.6 The Controller Parameters
Table 13.11 summarizes the controller parameters of the controlled and constrained variables and Table 13.12 gives the controller parameters of the manipulated variables. The ideal resting values of the manipulated variables would be active only if the number of controlled and the constrained variables is less than the number of manipulated variables, which is not the case here. The number of coincidence points shows at how many points the control error was calculated in the control horizon. The priority increases with the ranking of the constraints. That means that for values greater than 100, the soft constraints considered are fulfilled as they would become hard constraints. The constraints of the manipulated variables (both absolute and incremental) are hard constraints which are considered during the optimization. The controller was implemented in February 1998. In July 2000 the current controller parameters were read from the computer and are listed in Tables 13.13 and 13.14, respectively. It is interesting to compare the values:
more hard constraints are considered, the current values of the constraints were modified, few scaling and weighting factors were modified, as a further (soft) constrained variable (not shown in Table 13.13), the bottom level was considered to avoid flooding the column.
13.2.7 Real-Time Control
The predictive control was first simulated and then applied in real time to the stripping column [4]. Figure 13.15a shows the plot of the column pressure without and with predictive control in February 1998. The advantages of the predictive control over the basic control are: the average pressure decreased from 1.86 bar to 1.6 bar, the pressure became smoother. The experiences with the other controlled variables were similarly satisfactory.
523
[bar]
[ı C] 0.28 4.0 3.0 50 5 90 1.0 40 (soft) 82.0 1.0 110 (hard)
Parameter
Scaling factor Weighting factor Dead time Length of the control horizon Coincidence points Minimum limit Dead band at minimum limit Minimum constraint ranking Maximum limit Dead band at the maximum limit Maximum constraint ranking
0.028 5.0 0.0 170 5 1.7 0.1 no 2.1 0.1 160 (hard)
Pressure
PCT
1.41 0.5 2.0 60 5 50.0 5.0 no 57.0 5.0 80 (soft)
Top product temperature [ı C] 2.82 1.0 2.0 60 5 0.0 5.0 no 95.0 15.0 140 (soft)
Reflux valve position [%]
Controlled and constrained variables
Table 13.11 Controller parameters of the controlled and constrained variables (February 1998).
2.82 1.0 2.0 60 5 5.0 15.0 60 (soft) 100 1.0 no
Pressure valve position [%]
2.82 1.0 2.0 60 5 5.0 15.0 70 (soft) 100 1.0 no
Top prod. cooling fan angle [%]
524
13 Industrial Applications
13.2 Concentration Control and Reducing Steam Consumption in a Stripping Column
525
Table 13.12 Controller parameters of the manipulated variables (February 1998). Manipulated variables
Parameter
Steam flow set value [t/d]
Top temperature set value [ı C]
Pressure set value [bar]
Scaling factor Weighting factor Ideal resting value Minimum limit Maximum limit Rate constraint
0.1 5.0 80.0 100.0 180.0 0.2
0.5 4.0 70.0 57.0 61.0 0.05
0.5 5.0 1.0 1.7 2.5 0.017
(a)
pressure control (upper plot without, lower plot with predictive control)
(b)
specific steam consumption (upper plot without, lower plot with predictive control)
Figure 13.15 Real-time control of the stripping column.
13.2.8 Economic Benefits and Summary
Figure 13.15b compares the specific steam consumption without and with predictive control in February 1998. (The specific steam consumption is the ratio of steam flow to feed flow.) The specific steam ratio decreased from 0.09 to 0.065, which is a reduction of 28%. The benefit of this reduction in steam consumption is on the order of 25 000 to 50 000 € per year depending on the steam price. In the case presented, a binary stripping column was modeled by a linearized multivariable model and the predictive control was designed on the basis of this model. Before the implementation of the predictive control, the column was controlled by PID controllers. Most of the basic control loops were kept in operation and the set points were modified by the predictive control. A conventional controller (of the tray temperature) was replaced by the predictive controller. A big advantage of the predictive control over the PID-based basic control is that it takes the constraints into account and ensures smoother control.
[bar]
[ı C] 1.4 0.5 3.0 50 5 94 1.0 40 (soft) 96.0 1.0 145 (hard)
Parameter
Scaling factor Weighting factor Dead time Length of the control horizon Coincidence points Minimum limit Dead band at the minimum limit Minimum constraint ranking Maximum limit Dead band at the maximum limit Maximum constraint ranking
0.028 0.2 2.0 170 5 1.7 0.05 160 (hard) 2.2 0.05 160 (hard)
Pressure
PCT
1.41 4.0 2.0 90 5 46.0 5.0 80 (soft) 50.0 5.0 80 (soft)
Top product temperature [ı C] 2.82 1.0 2.0 60 5 0.0 5.0 180 (hard) 95.0 15.0 190 (soft)
Reflux valve position [%]
Controlled and constrained variables
Table 13.13 Controller parameters of the controlled and constrained variables (July 2000)
2.82 1.0 2.0 60 5 10.0 15.0 190 (soft) 95.0 1.0 No
Pressure valve position [%]
2.82 1.0 4.0 60 5 0.0 15.0 No 100 1.0 No
Top prod. cooling fan angle [%]
526
13 Industrial Applications
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline Table 13.14 Controller parameters of the manipulated variables (July 2000). Manipulated variables
Parameter
Steam flow set value [t/d]
Top temperature set value [ı C]
Pressure set value [bar]
Scaling factor Weighting factor Ideal resting value Minimum limit Maximum limit Rate increment constraint Rate decrement constraint
0.1 5.0 80.0 80.0 180.0 5.0 0.1
0.5 4.0 70.0 43.0 67.0 0.5 0.5
10.0 0.2 1.0 0.9 2.5 0.01 0.01
A further aim was to decrease the column pressure to reduce steam consumption and save money. As not the product concentrations but the temperature of a selected tray was controlled, the constant temperature set point had to be changed to a pressure-corrected one. The pressure set value was decreased and as a consequence the energy consumption was reduced. With predictive control the operation of the column became smoother and because of the decreased pressure the steam consumption could be reduced by about 28%. The predictive control system has been working satisfactorily on the splitter column considered since February 1998.
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
Model building and predictive control of a gas-fired furnace for chemical gasoline is dealt with. The control aim is to keep the furnace output temperature constant. Further, the oxygen surplus in the flue gas is minimized within its limits. Measurable disturbances are changes in the fuel gas density, in the furnace feed inlet temperature, and in the hydrogen and gasoline flows. To design a multivariable predictive controller a plant model was set up between the variables: manipulated and controlled/constrained variables, measured disturbances, and controlled/constrained variables. The process parameters were estimated on the basis of the least-squares method from several step tests. The structure of the process model and the identification experiments are presented in detail. The controller was designed on the basis of the estimated process model. A multivariable predictive controller was designed, the controller parameters were tuned on the basis of simulations, and the controller was then implemented successfully. Finally, some records of the realtime control results are shown as well.
527
528
13 Industrial Applications
13.3.1 The Furnace with the Reactor and Control Targets
Figure 13.16a shows the plant which is used to remove the remaining sulfur and nitrogen from light gasoline by means of hydrogen in a reactor at high temperature at the Rhineland Refinery of Shell in Cologne (Germany). The chemical petrol/hydrogen mixture is fed to the heat exchanger, where it is completely evaporated and overheated. Overheating is required to prevent the condensation of components in the furnace feed pipe. A liquid film on the inner tube walls would partly decompose upon entry into the furnace owing to the sudden rise in temperature. The carbon residuals would settle on the inner walls of the furnace tubes and thus the heat transmission coefficient would be drastically reduced. Owing to a poorer heat transfer, the tube walls would be too warm, which would finally lead to material fatigue and to the destruction of the pipes. The gaseous naphtha is heated in the furnace to the reaction temperature of about 330 ı C. Afterwards the mixture flows through the fixed-bed reactor, which is filled with cobalt/molybdenum catalyst. Here the sulfur and nitrogen compounds are converted to hydrogen sulfide and ammonia at about 20 bar. The hot outlet of the reactor is used to preheat the chemical petrol/hydrogen mixture in the heat exchanger. The reactor product is separated in a high-pressure separator into gasoline and hydrogen. The hydrogen sulfide and ammonia are separated from the gasoline in a low-pressure separator. The control target is to keep the feed temperature (at the furnace output, which is also the reactor input) constant. The oxygen surplus in the flue gas must then be minimized. Figure 13.16b shows the piping and instrumentation diagram with some basic PID control loops of the plant.
flue gas
LV5 TT 4
flue gas
QT 5
reactor feed
UX 6
MV1
DV1 QT
furnace furnace feed
MV2
TT 7
furnace feed
chemical reactor
DV2 TT 8 FFC 12
reactor product
LV2
CV1
fuel gas
FT LV3 11
LV4
heat exchanger
TT 9
LV6
reactor product
gasoline FT 1
chemical petrol/ hydrogen mixture
(a)
PT 21
combustion air
heat exchanger
reactor feed
furnace
3
chemical reactor
fuel gas combustion air
PC 22
CV2 LV1
DV3
FT DV4 2
hydrogen
(b) Figure 13.16 The furnace with the reactor. (a) Process scheme; (b) Piping and instrumentation diagram with the manipulated variables (MV), controlled variables (CV), limited variables (LV), and disturbance variables (DV).
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
13.3.2 Manipulated, Controlled, and Disturbance Signals Manipulated Variables
1. Fuel gas pressure set value: The fuel gas flow is controlled by changing the pressure set value. This is better than changing the valve position as the supply pressure is not constant. Higher pressure causes more flow and temperature increase in the furnace. 2. Combustion air/fuel gas ratio set value: For a stoichiometric combustion, the theoretically calculated combustion airflow (stoichiometric quantity) is computed by the process control system depending on the current heating gas mass flow. A desired value of 1.0 corresponds to the air mass stream stoichiometrically needed for the combustion of the current heating gas mass flow. The airflow can be regulated by the air/fuel ratio. This ratio can be set in the range between 0.8 and 1.6. Carbon monoxide is toxic; furthermore, carbon burns with a very hot temperature. This can result in damage to the oven and an explosion. A firing with air surplus is not economical because too much nitrogen has to be warmed up. The latter case can be detected by higher oxygen surplus in flue gas (greater than 0.8 vol%).
Controlled Variables
1. Furnace output temperature: The exact temperature is required for the reaction in the chemical reactor. If the reactor temperature is too low, then the reaction will not be ideal and therefore the product quality will not meet the specifications. If the reactor temperature is too high, then the exothermic reaction will be too intensive. 2. Oxygen surplus in flue gas: The optimal combustion is about 1.5 vol% oxygen concentration in the flue gas. A firing with air deficiency results in a nonstoichiometric combustion and carbon monoxide emission.
Limited or Constrained Variables
1. Oxygen concentration in flue gas: There is a minimum allowed oxygen concentration in flue gas of 0.8 vol% as below this value the combustion is not stoichiometric and toxic carbon monoxide is emitted. 2. Heating duty (furnace thermal power): The heating duty is the maximum allowed heating power in a furnace, and must not be exceeded for safety and emission reasons. The dimension of the
529
530
13 Industrial Applications
3.
4.
5.
6.
heating duty is tSRF (ton standard refinery fuel): 1 tSRF is released by the combustion of 1 t oil with a certain composition (1 tSRF /d D 0.456 MW). Combustion air mass flow: The combustion airflow must not decrease below a given value, in order to prevent flame breaks. With a nonstoichiometric combustion, soot is produced and emitted. Combustion air valve position: To prevent incomplete combustion, there has to be at least 5% reserve in the valve position. Therefore, the maximum allowed position is 95%. Also the minimum position is limited to keep the combustion continuous. Flue gas temperature: The flue gas temperature is limited, as with too high temperature the stack would be damaged. Reactor output temperature: The reactor temperature should be within limits to have an optimal reaction.
Disturbance Variables
1. Fuel gas density: As the calorific value is proportional to the fuel gas density, an increase in the density could cause a higher furnace outlet temperature in the uncontrolled case. More hydrocarbon consumes more oxygen, which leads to oxygen deficiency. 2. Furnace feed temperature: A higher furnace feed temperature would lead to a higher output temperature without temperature control. 3. Hydrogen mass flow: Hydrogen has a high specific heat coefficient. If the hydrogen mass flow increases, then the ratio of hydrogen increases in the gasoline/hydrogen mixture and the specific heat mass flow increases. As a consequence, the furnace output temperature would increase. 4. Gasoline mass flow: If the gasoline mass flow increases, then the furnace output temperature will decrease because of the heat balance with unchanged heating duty.
13.3.3 Process Model
The process model was identified from step tests [2]. The constraints (limited variables) are considered as controlled variables within the cost function of the predictive controller. The input variables for the models are
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
Figure 13.17 Relation between the furnace and reactor temperatures.
manipulated variables and measured disturbance variables. The output variables are controlled variables and soft limited/constrained variables. As is seen in Figure 13.17, the temperatures influence each other as the furnace outlet is the reactor feed and the reactor product preheats the gasoline/hydrogen mixture, which is the furnace feed. Regarding the temperatures, the process works in a closed loop. The temperature model of the furnace was identified as a two-input, singleoutput model. The signals are plotted in Figure 13.18a. The reactor outlet temperature depends only on the reactor feed temperature, which is the furnace outlet temperature. The plots are given in Figure 13.18b. The furnace inlet (feed) is heatTable 13.15 Temperature models. Output Input
Reactor outlet temperature [ı C]
Furnace outlet (reactor input) temperature [ı C]
K p D 0.9757 Td D 5.0 T1 D 3.95
Reactor outlet temperature [ı C]
Furnace inlet temperature [ı C]
Furnace input temperature [ı C]
Reactor outlet temperature (reactor input) temperature [ı C]
K p D 0.914 Td D 1.0 T1 D 0.842 K p D 0.9757 Td D 5.0 T1 D 3.95
531
532
13 Industrial Applications
295 furnace inlet temperature [°C] 290 285 280 21 20
fuel gas pressure set value [bar]
19 18 17 335 measured
furnace outlet temperature [°C] 330
model output 325
320 100
200
300
t [min]
(a) 335
furnace outlet temperature [°C]
330 325 320 335
reactor outlet temperature [°C]
330
model output
325 measured 320 0
100
200
300
t [min]
400
(b) 335
reactor outlet temperature [°C]
330 325 320 furnace inlet temperature [°C] 290 measured 285 model output 280 0
100
200
300
t [min]
400
(c) Figure 13.18 Comparison of predicted and measured variables. (a) Furnace inlet temperature (top), flue gas set value (middle), and measured furnace outlet temperature and computed furnace outlet temperature based on the estimated model (bottom); (b) Furnace outlet temperature (top), and measured reac-
tor outlet temperature and computed reactor outlet temperature based on the estimated model (bottom); (c) Reactor outlet temperature (top), measured furnace inlet temperature and computed furnace inlet temperature based on the estimated model (bottom).
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
ed by the reactor outlet temperature in a heat exchanger. The temperature signals are plotted in Figure 13.18c. Table 13.15 shows the relation between the furnace outlet (reactor input) temperature, the reactor outlet temperature, and the furnace input temperature. The relation between the flue gas pressure set value and the furnace outlet temperature is given in Table 13.16. All time constants are in minutes, and the dimensions of the static gains are the ratios of the dimensions of the dependent variables and the dimensions of the independent variables. The parameter estimation was performed by the software program AIDA (which stands for “Advanced Identification and Data Analysis”) from Shell [6]. Table 13.16 shows the further estimated action models between the manipulated and the controlled variables, Table 13.17 gives the estimated action models between the manipulated and the soft constrained variables, and Table 13.18 provides the Table 13.16 Action model for controlled variables. Controlled variables Manipulated variables
Reactor outlet temperature [ı C]
Flue gas pressure set value [bar]
K p D 0.9 Td D 1.0 T1 D 1.86
Oxygen surplus in flue gas [vol%]
K p D 8.3 Td D 3.0 T1 D 1.33
Combustion air/fuel gas ratio set value
Table 13.17 Action model for limited variables. Limited variables Manipulated variables
Heating duty [tRSF /d]
Fuel gas pressure set value [bar]
K p D 0.5 Td D 0.5 T1 D 1.96
Combustion air/fuel gas ratio set value
Combustion air mass flow [t/d]
K p D 184.0 Td D 0.5 T1 D 1.34
Combustion air valve position [%]
Flue gas temperature [ı C]
K p D 26.45 Td D 0.5 T1 D 3.2
K p D 4.1 Td D 1.0 T1 D 2.33
K p D 60.0 Td D 0.5 T1 D 0.5
K p D 192.0 Td D 1.5 T1 D 3.22
533
534
13 Industrial Applications Table 13.18 Disturbance model. Controlled and limited variables Disturbance variables
Reactor outlet temperature [ı C]
Oxygen surplus in flue gas [vol%]
Flue gas temperature [ı C]
Fuel gas density [kg/m3 ]
K p D 3.0 Td D 0.75 T1 D 0.5
K p D 0.96 Td D 0.5 T1 D 0.5
K p D 21.0 Td D 1.0 T1 D 0.14
Furnace feed temperature [ı C]
K p D 0.35 Td D 6.0 T1 D 2.0
Hydrogen mass flow [t/d]
K p D 0.11 Td D 2.0 T1 D 1.8
Gasoline mass flow [t/d]
K p D 0.025 Td D 2.5 T1 D 5.5
estimated disturbance models of the disturbances and the controlled and the soft constrained variables. Other possible disturbance models were not identified. The next plots show some of the identification experiments from Kress et al. [2]. In all experiments a manipulated variable was changed stepwise and the measured model input and output and the simulated model output based on the estimated model are plotted. Figure 13.19 shows the heating duty, the combustion air valve position, and the flue gas temperature on changing the fuel gas pressure set value. Figure 13.20 shows the oxygen surplus in flue gas and the combustion air mass flow on changing the combustion air/fuel gas ratio set value. Figure 13.21a shows the flue gas temperature on stepwise changes of both the fuel gas pressure set value and the combustion air/fuel gas ratio set value. Finally, Figure 13.21b shows the effect of the measured fuel gas density on the oxygen surplus in flue gas. 13.3.4 Predictive Control Algorithm and the Choice of the Set Values, Constraints, and Weighting Factors
The optimization was performed by SMOC (Shell). The cost function is given by (7.75). In practice, a set range is often given instead of a set value. The cost function is zero if all controlled variables are within their ranges and there is no change in the manipulated variables. The sampling time of the control was chosen as ∆T D 0.5 min.
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
21
fuel gas pressure set value [bar]
20 19 18 17 16
heating duty [tSRF/d]
model output
15
14
measured
13
(a)
0
100
200
300
t [min]
400
21 fuel gas pressure set value [bar]
20 19 18 17 150
combustion air valve position [%] model output
100
50 measured 0
(b)
0
100
t [min]
200
21 fuel gas pressure set value [bar]
20 19 18 17
flue gas temperature [°C]
900 875
model output
850 measured
825
(c)
0
100
200
Figure 13.19 Comparison of predicted and measured variables. (a) Fuel gas pressure set value (top), and measured heating duty and computed heating duty based on the estimated model (bottom); (b) Fuel gas pressure set value (top), and measured computed
t [min]
300
combustion air valve position and computed combustion air valve position based on the estimated model (bottom); (c) Fuel gas pressure set value (top), and measured flue gas temperature and computed flue gas temperature based on the estimated model (bottom).
535
536
13 Industrial Applications 1.5 ratio combustion air/fuel gas set value
1.4 1.3 1.2 1.1 5.5
measured
5.0 4.5
oxygen surplus in flue gas [vol %]
4.0
model output
3.5 3.0
(a)
0
100
t [min]
300
200
400
1.5 1.4
ratio combustion air/fuel gas set value
1.3 1.2 1.1 300 275
measured combustion air mass flow [kg/m3]
250
model output 225 200
(b)
0
100
300
200
Figure 13.20 Comparison of predicted and measured variables. (a) Combustion air/fuel gas ratio set value (top), and measured oxygen surplus in flue gas and computed oxygen surplus in flue gas based on the estimated
t [min]
400
model (bottom); (b) Combustion air/fuel gas ratio set value (top), and measured combustion air mass flow and computed combustion air mass flow based on the estimated model (bottom).
The hard constraints considered in the manipulated variables and their allowed increments are shown in Table 13.19. The weighting factors of the control increments in the cost function are given in Table 13.20. From the optimization point of view, there is no difference between the main control and soft constrained variables. There are weighting factors and minimum and maximum limits for all variables. The constraints and other physical requirements (set value control, disturbance compensation, oxygen surplus minimization, etc.) could be fulfilled by tuning the weighting factors and by setting priorities for the minimization of the cost function. The lower and upper limits, the weighting Table 13.19 Hard constraints of the manipulated variables. No.
Manipulated variable
Minimum value
Maximum value
Increment
1 2
Fuel gas pressure set value Ratio combustion air/fuel gas set value
0 bar 0.8
2.5 bar 1.6
0.2 bar/min 0.01 1/min
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline 21
fuel gas pressure set value [bar]
20 19 18 17 1.5 1.4
ratio combustion air/fuel gas set value
1.3 1.2
flue gas temperature [°C]
900 875
model output
850 measured
825
(a)
0
100
300
200
t [min]
400
5 fuel gas density [kg/m3] 4 3 5 oxygen surplus in flue gas [vol %]
4
measured
3 2
model output
1
(b)
0
50
200 t [min]
150
100
Figure 13.21 Comparison of predicted and measured variables. (a) Fuel gas pressure set value (top), combustion air/fuel gas ratio set value (middle), and measured flue gas temperature and computed flue gas tempera-
ture based on the estimated model (bottom); (b) Measured fuel gas density (top), and measured oxygen surplus in flue gas and computed oxygen surplus in flue gas based on the estimated model (bottom).
Table 13.20 Weighting factors of manipulated variables. No.
Manipulated variable
1 2
Fuel gas pressure set value Ratio combustion air/fuel gas set value
p
λ ui
2.00 2.00
q
λ sc yi
290 3402
factors, and the priorities for the controlled and for the soft constrained variables are given in Tables 13.21 and 13.22. The controller’s behavior can be influenced with the help of the priorities. With equal priorities, those variables which have higher weighting factors are controlled more exactly. That means if some variables were to violate their limits, then the
537
538
13 Industrial Applications Table 13.21 Limits, weighting factors, and priorities for the main controlled variables. r No.
Controlled signals
Minimum value
Maximum value
1
Furnace outlet temperature Oxygen surplus in flue gas [vol%]
329.5
330.5
2 3
1.2
–
–
12
λ syci λyi
Priority
5.0
3
200.0 200.0
1 4
Table 13.22 Limits, weighting factors, and priorities for the constrained variables. r No.
Controlled signals
Minimum value
1
Heating duty [tSRF /d] Combustion air mass flow [t/d] Combustion air valve position [%] Flue gas temperature [ı C] Reactor outlet temperature [ı C]
–
2 3 4 5 6
Maximum value
4.0
λ syci λyi
Priority
20.6
10.0
2
5.5
1.0
1
15.5 – –
– 95 950
1.0 5.0 0.5
2 1 3
270
390
2.0
2
variable with the highest weighting factor would violate its limit the least. Another way to influence the controller behavior is to set priorities. If several variables were to violate their limits, then first those variables which have higher (which means a lower number of) priorities are prevented from violating their limits. Usually the priorities and the weighting factors of the constrained variables are greater than the weighting factors of the unconstrained controlled variables to prevent them from violating the limits. It is possible to set different priorities for low and high limits of the same constrained variable. As is seen in Tables 13.21 and 13.22, the highest priorities are set for the lower limit of oxygen surplus (to have a stoichiometric combustion) and for the upper limit of the combustion air valve position. The controlled variable furnace outlet temperature has a lower priority and a lower weighting factor than the oxygen surplus. Furthermore, it is much more important to have a minimum oxygen surplus (to have a stoichiometric combustion) than to keep the oxygen surplus below a maximum limit, which is rather an economic aim. Therefore, the minimum limit has the higher priority of 1 and the maximum limit the lower priority of 4. Of course, the initial values of the priorities and the weighting factors were retuned on the basis of the simulation results. The values in Tables 13.19–13.22 are their optimal values, which are applied in the implemented real-time controller.
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
13.3.5 Simulation of Set Value, Disturbance Changes, and Constraint Violation
The effect of the different controller parameters was simulated for the changes of the set value, the disturbances, and the constraints [1]. 13.3.5.1 Simulation of Set Value and Disturbance Changes Before real-time implementation of the controller, its performance was tested with several simulations. Figure 13.22 shows how the multivariable controller reacts to set value changes and compensates for disturbances. Table 13.23 summarizes the changes investigated. All changes were performed successively after the main controlled signal, the furnace outlet temperature, has achieved its desired value. However, the steady state was not completely perfect, because the other controlled variable, the oxygen content in the flue gas, was not yet at its desired minimum value. As is seen in Figure 13.22a, the oxygen concentration in flue gas was permanently decreased by the controller toward its reference value of 1.5 vol%. The corresponding manipulated variable, the set value of the combustion air/fuel gas ratio, was decreased continuously as well. Since the hydrogen mass flow hardly changes during the handling, this disturbance was not simulated.
1. Increase of furnace outlet temperature set value Owing to a temperature set point change to a higher furnace outlet temperature at sampling time k D 90, the controller increases the set value of the basic controller of the fuel gas pressure. The combustion air/fuel gas ratio controller opens the airflow valve. The desired new reference value is achieved in about 150 sampling steps. 2. Increase of the fuel gas density The increased fuel gas density at sampling step k D 250 increases the furnace outlet temperature stepwise and after a dead time also the reactor outlet temperature but with a different dynamic. As a consequence, the fuel value increases as well and the oxygen surplus decreases suddenly in the flue gas. The disturbance is compensated for by reduction of the fuel gas pressure. This must be accompanied by the combustion air/fuel ratio controller reducing the airflow to Table 13.23 Set value and disturbance changes. Step k 90 250 400 700
Variable Controlled variable Disturbance variable Disturbance variable Disturbance variable
Furnace outlet temperature set value Fuel gas density Gasoline mass flow Temperature of the gasoline mixture before the heat exchanger
Set value change 330 ı C ! 335 ı C C0.35 kg/m3 C80 t/h C6 ı C
539
540
13 Industrial Applications % 100
furnace outlet temperature set value reactor outlet temperature
90 80 70
furnace outlet temperature
fuel gas pressure
60 50 40
air/fuel gas ratio set value air valve position
30 flue gas oxygen surplus
20 10 0
(a)
0
100
200
300
400
500
k
600
% 100 90
reactor outlet temperature
fuel gas pressure
80
furnace outlet temperature
70
furnace outlet temperature set value
60 50 40
air/fuel gas ratio set value
30 20
air valve position flue gas oxygen surplus
10 0
(b)
650
700
750
800
850
900
950
k
Figure 13.22 Controller performance. (a) For a change of the furnace outlet temperature set value, the fuel gas density, and the gasoline mass flow; (b) For compensation of the temperature increase of the gasoline/hydrogen mixture before the heat exchanger.
maintain a constant air/fuel mix. The effect of the disturbance is compensated for in about 150 steps. 3. Increase of the gasoline mass flow As a consequence of the increase of the gasoline mass flow at sampling step k D 400, both the furnace outlet temperature and the reactor outlet temperature decrease slightly. The controller increases the set value of the basic fuel gas pressure controller. The combustion air/fuel gas ratio controller opens the airflow valve. The desired new reference value is achieved in about 250 sampling steps. 4. Temperature increase of the gasoline/hydrogen mixture before the heat exchanger The increased temperature of the gasoline/hydrogen mixture before the heat exchanger at sampling step 700 leads to a slight increase of the furnace outlet temperature, and also to a delayed increase of the reactor outlet temperature, which was compensated for by decreasing the set value of the basic controller
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
of the fuel gas pressure. Simultaneously, the combustion air/fuel gas ratio controller closes the airflow valve to some extent. The disturbance is compensated for in about 300 sampling steps.
13.3.5.2 Simulation of a Violation of Limit Values Figure 13.23 shows how the multivariable controller acts if a violation of the limit values occurs. Table 13.24 summarizes the situations analyzed. All changes were performed successively after the controlled signal, the furnace outlet temperature, had achieved its desired value. However, the steady state was not completely perfect because the other controlled variable, the oxygen content in flue gas, was not at its desired minimum value. The oxygen surplus in flue gas is permanently decreased by the controller toward its reference value of 1.5 vol%. The corresponding manipulated variable, the set value of the combustion air/fuel ratio, is decreased continuously as well.
1. Upper limit of the heating duty Because of a change to a higher furnace outlet temperature at sampling time k D 60, the controller increases the set value of the basic controller of the fuel gas pressure. As the controller keeps the combustion air/fuel gas ratio steady, the airflow valve opens. The increasing heating duty achieves its upper limit at about step k D 80. The controller does not increase the set value of the basic controller of the fuel gas pressure further. Simultaneously, the combustion air/fuel gas ratio controller stops the increase of the valve position. Because of the thermal capacity of the furnace, both the feed outlet temperature and the reactor output temperature increase. The next change was simulated before these temperatures settled. 2. Upper limit of combustion air valve position The upper limit of the heating duty is increased at step k D 100, so the current heating duty does not violate this limit further. As the furnace outlet temperature is less than its set value, the temperature controller increases the set value of the basic fuel gas pressure controller. The combustion air/fuel gas ratio controller opens the airflow valve. At step k D 120 the combustion air valve position achieves its upper limit and keeps its value. Consequently, the multiTable 13.24 Set value, disturbance, and constraint changes (L, lower; U, upper). Step k 50 60 100 200 300 400
Variable Limited variable (U) Controlled variable Limited variable (U) Controlled variable Disturbance variable Limited variable (U)
Heating duty Furnace outlet temperature set value Heating duty upper limit Furnace outlet temperature set value Fuel gas density Reactor outlet temperature upper limit
Set value change (20.5 ! 15.2) tSRF 330 ı C ! 340 ı C (15.2 ! 20.5) tSRF 340 ı C ! 345 ı C C1.0 kg/m3 380 ı C ! 337 ı C
541
542
13 Industrial Applications % 100
upper limit heating duty
90
air valve position
upper limit air
80 valve position 70
furnace outlet temperature set value
air/fuel gas ratio set value
60 fuel gas pressure
50
furnace outlet temperature
40 30
reactor outlet temperature
20
lower limit oxygen surplus heating duty
10
flue gas oxygen surplus
0
(a)
0
50
100
150
200
250
300
k
% 100 90 air valve position 80
air/fuel gas ratio set value
70
furnace outlet temperature
60 fuel gas pressure
40 30
reactor outlet temperature
upper limit reactor outlet temperature
50
flue gas oxygen surplus
20 10
heating duty
0 300
350
400
450
500
550
600
650
700
k
(b) % 100
lower limit combustion air mass flow
upper limit flue gas temperature combustion air mass flow
90
flue gas oxygen surplus
80
fuel gas pressure
70 furnace outlet temperature
60 50
air/fuel gas ratio set value
40
flue gas temperature
30 air valve position
20 10 0 0
(c)
50
100
150
200
250
300
350
Figure 13.23 Controller performance. (a) During control of prevention of a violation of the upper limit of the heating duty, of the combustion air valve position, and of the lower limit of oxygen surplus in flue gas; (b) During
400
k
a violation of the upper limit of the reactor outlet temperature; (c) During a violation of the flue gas temperature upper limit and the combustion air mass flow lower limit.
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
variable controller does not keep increasing the set value of the basic fuel gas pressure controller. Because of the thermal capacity of the furnace, both the furnace outlet temperature and the reactor output temperature increase further. 3. Lower limit of oxygen concentration in flue gas The oxygen surplus in flue gas is permanently decreased by the controller toward its reference value of 1.5 vol%. The corresponding manipulated variable, the set value of the ratio air/fuel, decreases continuously as well. However, at step k D 150 the oxygen surplus achieves its lower limit, which was set to 1.5 vol%. From this time point the controller stops decreasing the combustion air/fuel gas ratio set value. A stepwise increase of the set value of the furnace outlet temperature at step k D 200 is ignored by the controller, as the combustion air valve position is restricted by its upper limit. At step k D 300 the fuel gas density was increased stepwise. This disturbance increases the furnace outlet temperature stepwise and also increases the reactor outlet temperature. The disturbance is compensated for by a lower heating gas pressure. Because of the initial better firing due to the fuel gas density increase, the oxygen content in the flue gas decreases stepwise. The controller compensates for it by increasing the set value of the air/fuel ratio, which causes a short transient rise of the combustion airflow as well (see the air valve position). After this transient, which takes about 20 steps, none of the limits – neither the combustion air valve position upper limit nor the oxygen surplus lower limit – are violated any more. 4. Upper limit of reactor outlet temperature At step k D 400 the upper limit of the reactor outlet temperature is decreased below its current value. The controller reduces immediately the set value of the basic controller of the fuel gas pressure. The furnace outlet temperature decreases with some delay and the reactor output temperature decreases with some more delay. As the controller maintains the combustion air/fuel gas ratio, the airflow valve closes to some extent. The oxygen surplus keeps its lower limit value. As was shown, all restrictions considered could be kept. As all limits – oxygen surplus in flue gas, heating duty, and combustion air valve position – were soft constrained, transient violations were allowed and observed. A further scenario was set up according to Table 13.25. 5. Upper limit of flue gas temperature The upper limit of the flue gas temperature was decreased at step k D 50 in Figure 13.23c below the current value. As the furnace outlet temperature should be kept constant, the set value of the basic controller of the fuel gas pressure remains constant after a small transient reduction of about 50 steps duration. The predictive multivariable controller increases the set value for the combustion air/fuel gas ratio and opens the combustion air valve and the flue gas temperature decreases below its reduced upper limit within about 150 steps. Because of the increasing combustion air/fuel gas ratio, the oxygen surplus in the flue gas increases over its optimal value.
543
544
13 Industrial Applications Table 13.25 Limit value changes (L, lower; U, upper). Step k 50 300
Variable Limited variable (U) Limited variable (L)
Flue gas temperature upper limit Combustion air mass flow lower limit
Set value change 950 ı C ! 800 ı C 100 t/d ! 280 t/d
6. Lower limit of combustion air mass flow At step k D 300 the lower limit of the combustion air mass flow is increased above its current value. As the furnace outlet temperature should be kept constant, the set value of the basic controller of the fuel gas pressure remains constant. The predictive multivariable controller increases the set value for the combustion air/fuel gas ratio and opens the combustion air valve until the combustion air mass flow exceeds the desired lower limit. The violation was vanquished within about 50 sampling steps. The temperature of the flue gas then decreases with increasing combustion airflow. Because of the increasing combustion air/fuel gas ratio, the oxygen surplus then increases in the flue gas.
13.3.6 The Effect of the Weighting Factors of the Controlled, Manipulated, and Constrained Signals
The effect of the weighting factors of the controlled, manipulated, and constrained signals was investigated by simulation [1]. 13.3.6.1 Effect of the Weighting Factors of the Controlled Signals The simulations presented so far were performed with the optimal weighting factors resulting from the optimization. The optimal choice of the weighting factors is very important and their effect on the control performance is shown as the subject of further simulations. First, the effect of changing the weighting factors of the controlled variables is investigated.
1. Weighting factor of the furnace outlet temperature In Figure 13.22a the control of the furnace outlet temperature on increasing the outlet temperature set value, the fuel gas density, and the gasoline mass flow with the optimal weighting factor of 5 is shown. Figure 13.24a shows the same scenario with a decreased weighting factor of 1. As expected and plotted in Figure 13.24a, the temperature controls became much slower. The minimizing control of the oxygen surplus in the flue gas was not influenced by this modification. In Figure 13.23a the control of the furnace outlet temperature preventing violation of the upper limit of the heating duty, of the combustion air valve position, and the lower limit of oxygen surplus in flue gas with the optimal weighting
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
factor of 5 is shown. Figure 13.24b shows the same scenario with an increased weighting factor of 20. As observed, the temperature tries to follow its new set value at step time k D 60 much faster than before. However, from step k D 75 this change is slowed down because the upper limits of both the heating duty and the combustion air valve position are achieved and violated. This violation is an effect of the too high weighting factor of the temperature control in relation to the weighting factors of the soft constraints (heating duty and combustion air valve position). 2. Weighting factor of the oxygen concentration in flue gas Figure 13.22a shows the predictive control on increasing the furnace outlet temperature set value, the fuel gas density and the gasoline mass flow with the optimal weighting factor of 200 for the oxygen surplus in the flue gas. Figure 13.24c shows the same scenario with the raised weighting factor of 500. As is expected and indeed seen, the minimizing control of the oxygen surplus became much slower. The temperature controls were not influenced by this modification. Figure 13.23a shows how the control prevents violation of the upper limit of the heating duty, of the combustion air valve position, and of lower limit of the oxygen concentration in flue gas with the optimal weighting factor of 200 for the oxygen concentration in flue gas. In Figure 13.24d the same scenario is shown with the reduced weighting factor of 20. After having increased the upper limit of the heating duty, the multivariable controller increases the temperature to reach its set value. The set value of the combustion air/fuel gas ratio is decreased faster than in the ideal case, then which leads to a violation of the lower limit of the oxygen surplus in flue gas at step k D 120. At step k D 300 the fuel gas density was increased stepwise. This disturbance led to an immediate oxygen surplus drop in the flue gas. As a consequence, the controller increases the air/fuel ratio set value and compensates for the oxygen surplus drop. However, this disturbance compensation is much slower than with the ideal weighting factors. There is no significant change in the temperature controls between Figures 13.23a and 13.24b as the weighting factor for the furnace outlet temperature was kept constant. 13.3.6.2 Effect of the Weighting Factors of the Manipulated Signals The different weighting factors for the manipulated variables are investigated in the following examples.
1. Weighting factor of the fuel gas pressure set value change In Figure 13.22a the control on increasing the furnace outlet temperature set value, the fuel gas density and the gasoline mass flow with the optimal weighting factor of value 289 for the fuel gas pressure set value change is shown. Figure 13.25a shows the same scenario with the raised weighting factor of 800. As is expected and observed, the temperature controls became much slower because the fuel gas pressure is increased much more slowly than in the reference case. The minimizing control of the oxygen surplus in flue gas was not influenced by this modification.
545
546 % 100
13 Industrial Applications
furnace outlet temperature set value
90
% 100
upper limit heating duty
90
reactor outlet temperature
80
80 upper limit air
70
70
air valve position
valve position
60
furnace outlet temperature
fuel gas pressure
furnace outlet temperature set value fuel gas pressure
50
50 40
air/fuel gas ratio set value
furnace outlet temperature
40
air valve position
flue gas oxygen surplus
20
reactor outlet temperature
flue gas oxygen surplus
30
30
air/fuel gas ratio set value
60
20 heating duty
10
10
0
0 0
100
200
300
400
500
600
k
(a) % 100
50
80 furnace outlet temperature
70 60 fuel gas pressure
50 40
200
250
k
air/fuel gas ratio set value
0
0 400
reactor outlet temperature
lower limit oxygen surplus
20 10
300
furnace outlet temperature
30
air valve position
200
fuel gas pressure
40
10 100
air valve position
air/fuel gas ratio set value
70
50
30 20
upper limit air valve position
60
flue gas oxygen surplus
0
150
furnace outlet temperature set value
80
(c)
100
% heating 100 upper limit duty 90
furnace outlet temperature set value reactor outlet temperature
90
0
(b)
500
600
heating duty flue gas oxygen surplus
50
k
100
150
200
250
300
350
k
(d) Figure 13.24 Controller performance for different controlled variable weighting factors. (a) Control on increasing the furnace outlet temperature set value, the fuel gas density, and the gasoline mass flow with a decreased weighting factor of the furnace outlet temperature; (b) Control during provocation of a violation of the upper limit of the heating duty, of the combustion air valve position, and of the lower limit of the oxygen concentration in flue gas with an increased weighting factor of
the furnace outlet temperature; (c) Control on increasing the furnace outlet temperature set value, the fuel gas density, and the gasoline mass flow with a raised weighting factor of the oxygen concentration in flue gas; (d) Control during provocation of a violation of the upper limit of the heating duty, of the combustion air valve position, and of the lower limit of oxygen surplus in the flue gas with a reduced weighting factor for the oxygen concentration in flue gas.
2. Weighting factor of the combustion air/fuel gas ratio set value change In Figure 13.22a the control on increasing the outlet temperature set value, the fuel gas density, and the gasoline mass flow with the optimal weighting factor of 3400 for the combustion air/fuel gas ratio change is shown. Figure 13.25b shows the same scenario with the reduced weighting factor of 1700. As is expected and indeed seen, the combustion air/fuel gas ratio set value changes much faster on minimizing the oxygen surplus in the flue gas than in the ideal case in Figure 13.22a. This fact leads to faster oxygen surplus control as seen in Figure 13.25b from step k D 0 till step k D 250. At time step k D 250 the
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
disturbance fuel gas density is increased stepwise and the oxygen surplus falls below its lower limit. The air/fuel ratio controller reduces the airflow much faster than in the ideal case and the oxygen surplus increases very fast over its lower limit. The temperature controls are similar in Figures 13.22a and 13.25b. As in Figure 13.22a the scenario of the violation of the oxygen surplus limit cannot be observed because of the slower oxygen content minimization, the real effect of changing the weighting factor of the air/fuel ratio cannot be evaluated. In practice, the minimization of the oxygen surplus is too fast with the decreased weighting factor; therefore, the weighting factor of 3400 results in better performance than the decreased value of 1700.
% 100
furnace outlet temperature set value
90
reactor outlet temperature
fuel gas pressure
80 70
furnace outlet temperature
60 50
air/fuel gas ratio set value
40 30
air valve position
flue gas oxygen surplus
20 10 0 0
100
200
300
400
500
600
k
(a) % 100
furnace outlet temperature set value
90
reactor outlet temperature
80 70
furnace outlet temperature
fuel gas pressure
60 50
air/fuel gas ratio set value
40 30
air valve position
20
flue gas oxygen surplus
10
lower limit oxygen surplus
0 0
100
200
300
400
500
600
k
(b) Figure 13.25 Controller performance for different manipulated variable weighting factors. (a) Control on increasing the furnace outlet temperature set value, the fuel gas density, and the gasoline mass flow with a raised weighting factor of the fuel gas pressure set
value change; (b) Control on increasing of the furnace outlet temperature set value, the fuel gas density, and the gasoline mass flow with a reduced weighting factor of the air/fuel gas ratio set value change.
547
548
13 Industrial Applications
13.3.6.3 Effect of the Weighting Factors of the Constrained Signals The effect of changing the weighting factors of the constrained variables is investigated in the following examples.
1. Weighting factor of the heating duty In Figure 13.23a the control preventing violation of the upper limit of the heating duty, of the combustion air valve position, and of the lower limit of the oxygen concentration in flue gas with the optimal weighting factor of 100 for the heating duty is shown. In Figure 13.26a the same scenario is shown with the reduced weighting factor of 50. As the furnace outlet temperature set value % 100
upper limit air valve position
90 80
furnace outlet temperature set value
air valve position
70
air/fuel gas ratio set value
60
fuel gas pressure
50 flue gas oxygen surplus
40
furnace outlet temperature reactor outlet temperature
30 20
heating duty
10
upper limit heating duty
0 20
(a)
40
60
80
% 100
100
k
lower limit combustion air mass flow
90
combustion air mass flow flue gas oxygen surplus
80 fuel gas pressure
70 furnace outlet temperature
60 50
air/fuel gas ratio set value flue gas temperature
40 30
upper limit flue gas temperature
20
air valve position
10 0 0
(b)
50
100
150
200
250
300
350
Figure 13.26 Controller performance for different manipulated variable weighting factors. (a) Control preventing violation of the upper limit of the heating duty and the combustion air valve position with a reduced weighting
400
k
factor of the heating duty; (b) Control preventing violation of the flue gas temperature upper limit and the combustion air mass flow lower limit with reduced weighting factors of the flue gas temperature and the combustion air mass flow.
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
increases at sampling time k D 60, the controller increases the set value of the basic controller of the fuel gas pressure. As the controller maintains the combustion air/fuel gas ratio, the airflow valve opens further on. The increasing heating duty achieves its upper limit at about step k D 80. In the ideal case in Figure 13.23a the controller did not increase the set value of the basic controller of the fuel gas pressure from this time point and the heating duty was kept at its upper limit. Because of the smaller weighting of the heating duty than in the reference case, the controller does not stop increasing the fuel gas pressure – as the temperature set value was increased at step k D 60 – and the upper limit of the heating duty is continuously violated from this time point on. As is seen, the combustion air valve position achieves but does not violate its upper limit from step k D 110. (The change of the fuel gas density in Figure 13.23a was not simulated in Figure 13.26a.) 2. Weighting factor of the flue gas temperature and the combustion air mass flow The upper limit of the flue gas temperature was reduced at step k D 50 below the current value. Because of the reduced weighting of the flue gas temperature (0.2 instead of 0.5), the controller increases the set value for the combustion air/fuel gas ratio and opens the combustion air valve much more slowly (Figure 13.26b) than in the reference case (Figure 13.23c). Therefore, the flue gas temperature is decreased in Figure 13.26b much more slowly than in the ideal case in Figure 13.23c. At step k D 300 the lower limit of the combustion air mass flow is increased above its current value. The predictive controller increases the set value for the combustion air/fuel gas ratio and opens the combustion air valve till the combustion air mass flow exceeds the desired lower limit. This control procedure is much slower in Figure 13.26b than in the ideal case in Figure 13.23c because of the reduced weighting of the combustion air mass flow (0.3 instead of 1). The flue gas temperature does not violate its upper limit from step k D 320. The controller kept the furnace outlet temperature constant during the simulation; thus, there is no difference in this respect between Figures 13.23c and 13.26b.
13.3.7 Real-Time Predictive Control
A multivariable predictive controller was designed for controlling the furnace outlet temperature and minimizing the oxygen surplus in the flue gas. The controller includes disturbance feed-forward (e.g., from the measured fuel gas density) and prevents the violation of the constrained variables (e.g., heating duty, flue gas temperature, reactor output temperature). The control sampling time was ∆T D 0.5 min. The optimization was performed by SMOC [5]. The controller parameters were tuned on the basis of several simulations. The control cost function
549
550
13 Industrial Applications
Furnace outlet temp. set value [°C] Furnace outlet temp. [°C] Gasoline feed [t/d] Fuel gas pressure [bar] Ratio combustion air/fuel gas Oxygen surplus in flue gas [vol %]
(a) Status MPC controller
on off
Furnace outlet temp. [°C] Fuel gas pressure [bar] Fuel gas mass flow [t/d] Feed (gasoline/ hydrogen mixture) temp. Gasoline feed [t/d]
(b) Figure 13.27 Real-time control of the plant. (a) Minimizing the oxygen surplus in flue gas; (b) Control with (MPC on) and without (MPC off) predictive control.
and the effect of some controller parameters on the control behavior are shown in Kress et al. [1]. Here two plots of real-time control are shown. Figure 13.27a shows for a period of 2 days how the predictive controller reduces the oxygen surplus in flue gas by reducing the combustion air/fuel gas ratio set value. Simultaneously, the furnace outlet temperature is kept constant. Figure 13.27b presents 5.5 h of the predictive control with a break between 10:00 and 11:00. As is seen, the main controlled variable, the furnace outlet temperature, is nearly constant if the predictive controller is switched on. The temperature starts decreasing if the predictive controller is switched off although the basic controller initiates to increase the fuel gas pressure set value (and consequently the fuel gas mass flow).
13.3 Temperature and Combustion Control of a Gas-Heated Furnace for Chemical Gasoline
13.3.8 Summary
The experimental model building and the predictive temperature control of a gasfired furnace for chemical gasoline were presented. Further, the minimum oxygen surplus in the flue gas is limited and has to be minimized within its limits. The predictive multivariable controller computes online set values for the basic PID controllers. The two manipulated variables are the fuel gas pressure and the combustion air/fuel gas ratio. Measurable disturbances are the changes in the fuel gas density, in the furnace feed inlet temperature, and in the hydrogen and gasoline flows. For technological reasons several variables had to be constrained: heating duty, combustion air mass flow, combustion air valve position, flue gas temperature, and reactor output temperature. All these variables were considered as soft constraints in the control cost function. To design a multivariable predictive controller a plant model was set up between the manipulated and controlled/constrained variables, and between the measured disturbances and controlled/constrained variables. The process parameters were estimated on the basis of the least-squares method from several step tests. The structure of the process model and the identification experiments were presented in detail. Both manipulated variables (fuel gas pressure set value, combustion air/fuel gas ratio set value) could be changed independently. Consequently, the action models could be identified independently from Single-Input, Single-Output (SISO) models. One exception was the furnace outlet temperature as it influences the reactor temperature and as the outlet product preheats the furnace feed, the temperature signals had to be identified in a closed technological loop. Therefore, the furnace outlet temperature was identified as a two-input, single-output process considering not only the fuel gas pressure set value, but also the furnace feed (inlet) temperature. Similarly, the flue gas temperature was also identified on changing both the fuel gas pressure set value and the combustion air/fuel gas ratio set value. The predictive multivariable controller was designed on the basis of the estimated process model considering the soft constraints. The controller performance depends on the weighting factors of the controlled, manipulated, and soft constrained variables. The controller was designed with an initial set of parameters chosen on the basis of technological knowledge of the plant, for example, on the basis of the priorities between the control targets. The controller performance was tested off-line using a dynamic process model of the plant. The weighting factors were changed and the controller was tested and tuned until the performance was satisfactory. The simulation of the set value changes, the disturbances, and the violation of the limits was presented with the accepted optimal weighting factors. Further, simulations with other than optimal weighting factors showed that the weighting factors were selected correctly and the predictive multivariable controller works well. The real-time controller was installed in October 2004 and it has been working since then very well. Some records of real-time control results were shown as well.
551
552
13 Industrial Applications
References 1 Kress, T., Volk, U., Golisch, H., and Haber, R. (2005) Effect of the Parameters to the Predictive Control of a Gas Fired Furnace for Chemical Gasoline, Proceedings of the Process Control Conference, Strebske Pleso, Slovak Republic. 2 Kress, T., Volk, U., Golisch, H., and Haber, R. (2006) Model Building for Control of a Gas Fired Furnace, Proceedings of the Process Control Conference, Kouty nad Desnou, Czech Republic. 3 Setpoint (1994) SMC-IDCOM control reference manual. Setpoint Inc., Houston, Texas, USA. 4 Prasser, I., Schneider, R., Hahn, R., and Haber, R. (2000) Predictive Control of a Stripping Column, Proceedings of the
International Conference Process Control and Instrumentation, Glasgow, pp. 420–425. 5 Shell (1999) SMOC: Shell multivariable optimizing controller, Bulletin 36J06D10-01E, Yokogawa Electric Corporation, Tokyo, Japan. 6 Shell (1999) AIDA: Advanced identification and date analysis, Bulletin 36J06D20-01E, Yokogawa Electric Corporation, Tokyo, Japan. 7 Volk, U., Kniese, D.W., Hahn, R., Haber, R., and Schmitz, U. (2005) Optimized multivariable predictive control of an industrial distillation column considering hard and soft constraints. Control Engineering Practice, 13, 913–927.
553
14 Practical Aspects and Future Trends In this chapter some features of commercial predictive controllers will be given. The differences between the actually applied controllers and the predictive control algorithms discussed in the previous chapters will be outlined. Also, some enhancements to commercial predictive control will be introduced. In the sequel process engineering (e.g., chemical, thermal, biological, power, refinery) plants and processes which need some minutes to change the operating state are considered. Plants, for example, electrical drives with time constants on the order of and under seconds, and economical processes with settling times of days or months, are not considered here. In the process industry a usual application of a predictive controller is described under different names. Some examples are: Model-based Predictive Control (MPC), sometimes “MPC” also stands for “multivariable predictive control”; Multivariable control; Advanced Process Control (APC); Optimization application or just process optimization.
14.1 Classification of a Predictive Control Project
An application of a predictive controller in a commercial environment is usually applied as an enhancement to an already existing so-called base layer control environment. The base layer control has to fulfill some special requirements such as very high availability; thus, these controllers and instrumentation are often implemented in a redundant way, not only for the controllers, but also for the power supply, the input/output interfaces and the fundamental hardware. These instrumentation can work autonomously without any interaction with the user. 1) These controllers usu1) Usually this is really not wanted, but is acceptable for a short time period. Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
554
14 Practical Aspects and Future Trends
ally implement only the fundamental Single-Input, Single-Output (SISO) control loops, sometimes enhanced by a cascade control loop, feed-forward, or ratio controller. The main task of the base layer control is to stabilize the process and to provide the operator with an interface to manipulate single variables for the operation of the plant but without respecting loop interactions. If loop interactions have a strong influence on the process, an optimal process operation would offer a big advantage, ensured by application of APC or Advanced Regulatory Control (ARC). 2) APC structures implement, for example, decoupling of a distillation column from the top to the bottom quality. From the aspect of hardware, APC (or ARC) can be considered dispensable, that is, safe operation of a plant is also possible without APC structures. The only condition that has to be fulfilled is safe operation. Optimal or comfortable behavior is not necessarily a required operation. Therefore, if it is applied, APC hardware is generally not implemented in a redundant way. Anyhow, very important APC structures can be implemented with high availability (i.e., in a redundant way), depending on the importance of the applications, the likelihood of failure, and the costs of implementation. Figure 14.1 shows the arrangement of base layer control and APC in a usual Distributed Control System (DCS) such as Honeywell PKS or TPS. 3) In Figure 14.1 the base layer control is implemented in the so-called HighPerformance Manager (HPM). The main tasks and properties are:
connection of the plant to the DCS, A/D and D/A conversion, basic control loop implementation, redundant implementation, high sampling rate of about 1 s.
The APC is implemented in the so-called application module. The main features are:
it executes general control tasks, free programmable logic, dedicated hardware, usually it acts as master controller for the basic loop controllers in the HPM, usually there is no redundant implementation, a low sampling rate of about 15 s up to 5 min (sampling rates from 1 s to 1 day can also be handled).
The user interfaces are implemented by the so-called user station and are arranged in the same hierarchical layer as the APC hardware and usually are not redundant.
2) ARC usually implements advanced control structures by SISO controllers. 3) PKS stands for “process knowledge system” and TPS stands for “total plant scape”.
14.1 Classification of a Predictive Control Project Process Control Network User Station Historical Process Data Server
Historical Process Data Server
Application Modul
LCN (Local Control Network)
(Universal Control Network) UCN
NIM (Network Interface Modul)
HPM (High Perf. Modul)
HPM (High Perf. Modul)
Figure 14.1 Classical commercial APC implementation in a DCS.
But this is without consequences, as usually there is more than one user station in one environment. In Figure 14.1 a redundant historical process data server is also shown. Such servers are not necessarily redundant. In a given time interval they collect all relevant process data for long-time storage. In recent years the level of implementation of APC has been shifted more and more toward MPC. Different vendors supply the user with different tools or control suites which are more or less comparable. Qin and Badgwell [10] gave a very good overview of the MPC suites available today with their history, specialities, and features. A common feature of these control suites is that they usually run within a Windows-based box. 4) Thus, the classical application module has been completed with a Windows-based box (in the Honeywell DCS this box is called APP) which is connected either directly to the DCS or via the open data exchange interface OPC (originally meaning “OLE for Process Control”, where “OLE” stands for “object
4) In the early years many of these controllers also ran within a Unix-based box for different reasons, such as higher availability and multiuser/multithread, and multi-CPU environments. But in recent years use has shifted more and more from Unix to Windows and Unix-based controllers have nearly become extinct.
555
556
14 Practical Aspects and Future Trends
APC Computer
Generic-Computer
Process Control Network User Station Historical Process Data Server
Historical Process Data Server
Application Node
LCN (Local Control Network) NIM
(Universal Control Network) UCN
(Network Interface Modul)
HPM (High Perf. Modul)
HPM (High Perf. Modul)
Figure 14.2 Modern commercial APC implementation in a DCS.
linking and embedding”), a standard for data exchange and embedding defined by Microsoft Corporation. Figure 14.2 shows an implementation. The tasks and features of the application node (Windows-based box, directly connected to the DCS) are: Windows-based PC with dedicated hardware for a local control network connection,
14.1 Classification of a Predictive Control Project
runs APC programs as – data collection tools, – quality estimators, – predictive controllers, – optimizers, OPC server, usually no redundant implementation, usually slow sampling rates from 15 s to 5 min (not necessarily). The APC computer is a general, Windows-based machine with the following tasks and features: Windows-based PC with OPC connection to the plant, runs APC programs as – data collection tools – quality estimators, – predictive controllers, – optimizers and/or OPC servers, usually no redundant implementation, usually slow sampling rates from 15 s to 5 min (anyhow, sampling rates from 1 s to 1 day are also possible). The generic computer in Figure 14.2 is a Windows-based PC with specialized software for the observation of the plant, for example, for plant managers or scheduling engineers to monitor the current state of the plant site. The plant connection is realized via an OPC connection. The connection can be restricted to the historical data collection servers, depending on the tasks of this machine. Besides the already shown predictive controllers, the big field of APC also covers some other applications. These can be arranged below or above a model-based predictive controller. Below the predictive controller are arranged, for example: Soft sensors, which compute a usually nonmeasurable controlled variable from other, measurable process variables. A typical example for such a computed variable is a pressure-compensated temperature, a temperature in a distillation column which is corrected by the pressure to indicate the pure boiling temperature in a given tray in the column (this temperature is then an indicator for the concentration of the components on this tray). Quality estimators, which estimate the quality of a stream. The estimation of an already measured quality makes sense, because many quality measurement instruments, for example, a chromatograph, have a long dead time (e.g., 60 min) and/or slow sampling rates (e.g., 15 min), which are based on the principle or the implementation of the measurement instrument. These properties make it very difficult to control these variables; thus, a quality estimator is used to estimate an current value without dead time and with faster sampling rates.
557
558
14 Practical Aspects and Future Trends
Loop optimizers or analyzers, which can observe and analyze single control loops, for indication of bad performance of a loop (e.g., unstable or very slow behavior), bad working actors (e.g., valves suffering from stiction), or bad measurement instrumentation (e.g., broken sensors) or they may suggest better tuning parameters for Proportional plus Integral plus Derivative (PID) controllers and can also perform a (maybe iterative) loop optimization. Typical APC applications which are arranged above the model-based predictive controllers are the so-called optimizers. This may be somewhat confusing, because most commercial MPC suites also contain an optimizer (as shown below), but the task of the higher-level optimizers is to optimize many installed and working MPC applications simultaneously to bring a complete plant to its optimum. Whereas a single MPC application controls and optimizes a part of a plant, for example, a furnace or a distillation column, the higher-level optimizer optimizes the complete
Multivariable predictive dynamic and static optimizer
The site oriented APC optimizes the reference and optimization variables of many plant oriented MPCs regarding to economic and profit optimization
Multivariable predictive dynamic controller Multivariable predictive dynamic controller
The plant oriented APC controls single parts of plants or complete smaller plants by one multivariable predictive dynamic controller
Multivariable predictive dynamic controller Controlled variables
PID
Quality estimator
Distrubance variables
Loop optimizer
Manipulated variables
Quality estimator
PID
Loop optimizer
Soft sensors, quality estimators, single-loop predictive controllers, basic loop monitor and optimizer PID PID
Including redundant implementation if necessary
PID PID
PID PID
Plant connection
PID PID
Plant connection
M M M
Figure 14.3 Layers of process control implementation.
M M M
14.2 Project Implementation
plant by manipulating the reference values (or limits) of the single model-based predictive controllers. The higher-level optimizer usually uses static nonlinear plant models, but applications with dynamic models are also possible, for example, for very slowly acting variables. Because of the very high computational effort of these nonlinear plant models, the sampling time of these optimizers is rather slow, for example, 1 h up to 24 h, whereas a typical sampling time for a model-based predictive controller is 1 min. The overall control structure of a plant can be separated into four layers, which are shown in Figure 14.3.
14.2 Project Implementation
Generally, a commercial implementation of APC in a real plant has to fulfill one or more of the following tasks: increasing profitability; increasing availability; increasing usability. Increase of profitability generally includes not only the increase of throughput or the yield of a plant. It may also incorporate, for example, the decrease of emissions of a furnace, as in many cases lower emissions are rewarded by governments. Or because of a limited overall amount of emissions for a complete plant or site, the increase of throughput of other plant parts may be considered. Also, for example, the increase of the lifetime of catalyst can be seen in the frame of increased profitability. The increase of the catalyst lifetime might, however, not be seen in this frame, but in many cases a more deactivated catalyst may lead to higher energy consumption. 5) As most industrial plants shut down in a fixed time frame (e.g., every 5 yr) for maintenance and inspection, there is thus a given time for the usage of the catalyst, and a less deactivated catalyst may decrease the energy consumption at the end of the usage time, that is, in the months before the planned exchange of the catalyst. Increase of availability does not mean increase of the overall plant uptime (this is usually covered by increase of profitability), but means the decrease of big plant upsets which would lead to products which do not meet the prescribed specifica5) A catalyst makes a chemical reaction possible, but besides also decreases the activation energy needed to start the reaction. Even if a catalyst – by definition – does not change during the chemical reaction, it may still be deactivated, for example, by the agglomeration of coke on the its surface
(fouling). Therefore, the active surface may decrease over time, usually over years. If the active surface of a catalyst decreases, the activation energy necessary to start the reaction increases. Therefore, a more deactivated catalyst often leads to higher energy consumption.
559
560
14 Practical Aspects and Future Trends
[ppm]
[ppm]
sulfur in sulfur in sulfur in
sulfur in
for sulfur
t
for sulfur
t
furnace outlet
furnace outlet
t
(a)
manually operated
t
(b)
with APC application
Figure 14.4 Operation of a desulfurization plant.
tions 6) or to an unplanned shutdown. In most plants one person operates several plants, which automatically leads to less attention being devoted to a single plant (or part of the plant). An alarm management system is used to call the operator’s attention to an upset, but the operator might be altered too late to completely prevent it. An APC application observes the plant in each sampling step, can predict upsets before they occur, and performs an adjustment to prevent or reduce the effects of this upset.For example, a change in the feed of a desulfurization plant usually occurs slowly, and its effect on the outflow caused by a higher sulfur content in the inflow of a plant is even slower – it usually takes many hours. An APC application which monitors the sulfur content in the inflow can increase the reaction before the upset reaches the sulfur measurement in the outflow the plant. The result is an in-spec production for the complete period of the feed change (Figure 14.4). A desulfurization plant is a typical one-by-one problem, as far as no other plant constraints have to be considered (e.g., maximum allowed reactor outlet temperature). The sulfur in the outflow of the plant is controlled by the reactor temperature (thus, there is one controlled and one manipulated variable). The higher the reactor temperature is, the more excessive desulfurization reaction takes place and the sulfur content in the outflow of the plant becomes lower. In the example shown in Figure 14.4a, increase of the sulfur in the inflow of the plant from 0.8% to 1.2% takes place at a time point of 10 min (this process usually changes slowly). The sulfur in the outflow of the plant is stable at 9 ppm. 7) Approximately 60 min
6) A common description for a product that does not meet the specification is an off-spec product. In contrast, an in-spec product meets the specification. 7) 1 ppm is equal to 0.0001%
14.2 Project Implementation
after that the sulfur in the plant inflow starts to increase, the sulfur in the outflow begins to increase as well, and violates the limit of 10 ppm at the time point of 100 min. The operator then increases the reactor temperature by 5 ı C, but the effect of this temperature increase takes place only after an additional 60 min by a slow change of the measured variable. During this time the sulfur content in the outflow has already violated the limit by 2 ppm; thus, the operator increases the reactor temperature again by 5 ı C. These two temperature increases lead to a final sulfur content of 6 ppm, thus far below the given limit of 10 ppm, leading to unnecessary energy consumption and decreased catalyst lifetime, combined with an off-spec production for approximately 120 min. The same example with APC is shown in Figure 14.4b. Shortly after the sulfur content in the plant inflow (which is monitored by the APC) starts increasing, the APC increases the reactor temperature smoothly by 5 ı C, which is enough to prevent violation of the limit of the sulfur content in the outflow of the plant. The sulfur in the outflow increases for a short time period, but reaches its optimal value of 9 ppm again shortly after the change. The reactor temperature is increased only by the necessary amount; thus, there is no unnecessary giveaway, 8) increased energy consumption, and decrease of catalyst lifetime. The above example shows also how difficult it is sometimes for the operator to control a plant. In this case an APC application may increase the usability of a plant significantly, not only by an easier operation, but also by decreasing the number of alarms and operator actions. In an industrial plant with a poor control strategy or with process variables which are difficult to control, it is not unusual that during the normal shift-operation time of 8 h hundreds of alarms occur, and nearly the same number of operator actions are necessary. In this case an APC application may decrease this number by a factor of 10 or even more, which is a significant increase in convenience, giving the operating personnel more time for more important tasks or the ability to monitor the plant in a way to see upsets which cannot be monitored by APC. 14.2.1 APC Project Chain
For the implementation of an APC project, a number of steps should be taken into account (see also Dittmar and Pfeiffer [4]). These steps are: 1. Feasibility and benefit study This also includes the evaluation of historical data, laboratory analysis, research of the available literature, and rudimentary benefit analysis (in the scope of the three above-mentioned tasks). If this part of the project covers more than one part of the plant, this study also leads to a prioritization of the subtasks, mostly determined by the achievable benefits in relation to the effort needed. 8) “Giveaway” identifies a product that not only meets the specification but is also better than necessary. The higher cost to produce this better than necessary product is usually called giveaway.
561
562
14 Practical Aspects and Future Trends
2. Review of the installed base layer equipment and performance As most APC applications use installed base layer implementation, for good running of APC it is essential that the base layer equipment performs adequately. 9) The review should check not only the performance of the base layer control loops, but also the installed measurement equipment (in some cases the operation task of a plant may have changed in recent years, but the measurements are still designed for the old operation). Also, an inadequate base layer structure may have been applied in a plant. Thus, a very important step in the scope of an APC project is the review and – if necessary – the improvement of the installed base layer equipment. 3. Perform pretests Pretests are important to get a qualitative impression of how the plant acts on changes of the potential input (manipulated and disturbance) variables. This pretest is also very useful for planning the following step tests, because it gives not only an impression of the qualitative process behavior, but also – with some restrictions – of the quantitative, dynamic behavior. With knowledge of the process gain, the settling time, and with estimation of the measurement noise, the APC engineer can plan the smallest size of the step per process input variable assuming the smallest necessary signal-to-noise ratio using the equation ∆MV D SNR
noise amplitude , process gain
where ∆MV is the manipulated variable change and SNR is the signal-to-noise ratio. As usually a process input variable influences more process output variables (so-called controlled variables), this manipulated variable change is computed for each controlled variable and the biggest change is scheduled for the next step test. On the other hand, the settling time is required to plan the time duration of one step test. Also here, if a manipulated variable influences more controlled variables, the longest settling time is chosen. 4. Execution and evaluation of step test The most common technique for the execution of step tests in industry is still the manual changing of the potential manipulated variables according to a given pattern, which usually follows a simple sequence of steps, for example, a small step up, a waiting time, a big step down, again followed by a waiting time, and finally a step back to the original value (see, e.g., Figure 14.5a). A more complicated pattern (Figure 14.5b) uses a short step (e.g., a quarter of the settling time), a long step (e.g., for the duration of the settling time t98% ), and a medium step (e.g., half of the settling time), which is slightly better to get more information on the high- and low-frequency responses of the plant. To get the best possible data, it is essential to consider some circumstances: – the plant should be at the steady state to minimize the influences of unmeasured disturbances, 9) In most cases, the installed APC runs with a significantly slower sampling time than the installed base layer equipment. A very common structure is that the APC runs with sampling time of 1 min, whereas the base layer runs with a sampling time of 1 s.
14.2 Project Implementation
t98%
t98%
t98%
t98%
t98%
t98%
t98%
t
step test
t98% t
t98%
(a)
563
(b)
modified step test
Figure 14.5 Different test signal types.
– the patterns used for the step test are usually the same for each manipulated variable, these signals are correlated; therefore, the best practice is to move only one manipulated variable at a time, – the plant should not be driven back to the original working point by manipulating other variables; this is very important, especially for manual execution of step tests, because the operator as a rule tries to compensate for plant upsets. On the basis of the data collected, a model of the process is estimated by using the so-called off-line design suite of the APC package. 5. Model identification After the step tests have been executed, the data collected are evaluated and the model parameters are estimated by means of the so-called off-line design suite of the APC software. This model is used for designing the “model-based” controller. 6. Basic controller tuning Prior to the online implementation a basic controller tuning should be performed in a simulated off-line environment. The off-line design suites of the APC package offer the ability to perform simulations with defined scenarios. Tuning of the parameters of a model-based predictive controller relies better on the physical nature of the application than the tuning of the parameters of, for example, a PID controller. A model-based predictive controller in a multivariable environment may show some behaviors that are not always clear. It might be, for example, that a model-based predictive controller uses all available manipulated variables to control a single controlled variable if there is a connection between these variables (defined by the model). For example, it is commonly known that the reflux of a distillation column acts faster on all tray temperatures than the outlet temperature of a furnace used as a reboiler at the bottom of the column. If the controller has to change the temperature of a tray in a distillation column, a model-based predictive controller would prefer to use the reflux to control this temperature. If this is not wanted, the tuning of the controller has to be adjusted in such a way that the controller would prefer to use the outlet temperature of the furnace instead, for example, by increasing the weighting factor for the reflux change as a manipulated variable.
564
14 Practical Aspects and Future Trends
7. Implementation and commissioning of the controller After the basic tuning of the controller, the application is set up in the online environment. The implementation of the controller includes not only the connection to the DCS (mostly via OPC), but also the building of a user-friendly operator interface. During the commissioning phase the controller is switched on usually with some additional restrictions, such as very tight limits for the manipulated variables and/or their maximum movements. During this phase all control actions are monitored and the controller has to be retuned until the control behavior and all actions are satisfactory. Prior fine-tuning of the controller can also be performed by means of off-line simulation. 8. Documentation For the documentation it might be useful to create two separate documents: one for the engineers, including all tunings, step test data, models, and – where required – special topics, such as improved base layer structures; one (of reduced size) for operators. During this step, training for the operators should also be considered. When running an APC application, the operation may change significantly, for example, in such a way that temperatures, flows, or pressures are controlled not directly, but indirectly, through qualities, yields, or other – possibly newly created – variables. Especially for old plants and highly experienced operating personnel, it is not always clear what the main scope of the new APC application is. These operators then tend to switch off the manipulated variables and set the temperatures, flows, and pressures as usual, instead of giving meaningful limits to the new controlled variables of the APC application. Thus, it is very important to write clearly understandable documentation, combined with operator training. 9. Postimplementation review After the new APC application has been run for a period of time, the targets achieved should be reviewed. This review includes not only the benefits, but also the operator acceptance and uptime of the application, including interviews with the management, engineers, and operating personnel. 10. Maintenance It is well known that good maintenance is essential for an APC application. The uptime of an APC application without adequate maintenance may decrease in the first 6 months after the implementation to less than 25%. Thus, continuous maintenance is indispensable. The APC engineer, responsible for the maintenance of an application, is well advised to continuously monitor not only the uptime of the application, but also the control behavior of the application. During the maintenance period some plant states may occur which have not been observed before. Therefore, retuning slightly and (in the worst case) a complete restructuring might be necessary to cover new plant behaviors.
14.2 Project Implementation
14.2.2 Achievable Benefits, an Example
The benefits of an APC application are based in most cases on increase of the throughput or the yield. As an example, see Figure 14.6. Assume that the sulfur concentration limit in the outflow in a desulfurization plant is 10 ppm. With manual operation the sulfur content is fluctuating between 6 and 9 ppm with a mean value of 7.5 ppm. On the right of Figure 14.6 the distribution of the sulfur content is shown as a flat Gaussian distribution between approximately 6 and 9 ppm. With MPC this fluctuation could be reduced to approximately 2 ppm, between 6.5 and 8.5 ppm. The distribution is still Gaussian, but is taller with a much higher peak. It is seen that the APC application can keep the variations of the sulfur content within a range of ˙1 ppm, and the mean value can be shifted from 7.5 to 9.0 ppm, which still prevents violation of the limits. The achieved benefit is then given by the increase of the mean value from 7.5 to 9.0 ppm. Depending on the task of the plant and its surroundings, one can specify this benefit, for example, by increased throughput or by decreased energy consumption. For example, if the difference between feed and product (e.g., not desulfurized and desulfurized gasoline) is 5 USD/t, the ability of increased throughput given by the above-mentioned 1.5 ppm is 20 t/h, and the usual uptime is 8000 h/yr, the benefit of the APC application can be calculated – assuming 100% on stream factor of the APC – by 10) Benefit D 5
t h USD USD 20 8000 D 800 000 . t h yr yr
Figure 14.6 Probable increase of yield for the sulfur content in the outflow of a desulfurization plant.
10) These values and throughputs are fictitious
565
566
14 Practical Aspects and Future Trends
14.3 Implementation of a Predictive Controller
The most common usage of commercial program packages for multivariable predictive control in industry is in refining and petrochemical and chemical processing. Thus, we ill now look more closely at some techniques and procedures for this application area. The control strategy in a (petro)chemical plant is split into different layers. The base layer control is usually implemented on highly available hardware called a DCS. The optimization parts of process control (the APC) are then arranged in higher levels and are usually connected via OPC to the DCS. The most commonly used sampling time of APC applications is 1 min because of the relatively slow processes. A good overview of the optimization techniques is given by Qin and Badgwell [10] Bauer and Craig [1], and Wojsznis et al. [12]. 14.3.1 Control Aim and Optimization
The control aim of APC applications is optimization of the plant. This may include stabilization, noise reduction, disturbance rejection, decoupling, and many tasks. As almost every real process is nonlinear, but most commercial program packages use only linear algorithms, the controllers are usually designed only for one working point and for robust operation to cover a small range around this working point. Reasonably, the working point is selected near to the optimal working point, so the controller is able to control the plant at the optimum. The usually selected strategy for a multivariable predictive controller is the gap control strategy instead of controlling the plant at set points given by the user. The user gives a range by setting a higher and a lower limit for the controlled variables (and for the manipulated variables, but this is not common in all commercial program packages). The main aim of MPC is then to keep all the controlled variables within these user-given limits. Nevertheless, depending on the control task, set points might be essential; thus, all controllers also offer the ability to control controlled variables at given set points. Furthermore, most of commercial program packages offer the ability to optimize any of the controlled variables. This means that the controller uses a second engine, the optimizer, to bring the plant to an optimal working point within the limits of the controlled variables. This is not necessarily the plant optimizer as shown in Figure 14.3, because most predictive controllers included in commercial program packages offer this ability innately. The process optimizer uses the same iterative optimization algorithm as the controller, but usually runs more slowly than the control algorithm and tries only to push the steady states of the controlled variables to their optimal working point. Figure 14.7 clarifies the difference between control and optimization considering a Two-Input, Two-Output (TITO) problem. The manipulated variables (MV1 and MV2) are on the axes. The horizontal and vertical dashed lines represent the up-
MV2
CV l im 1 u p p it er
MV1 upper limit
MV1 lower limit
14.3 Implementation of a Predictive Controller
MV2 upper limit
Moving to the limits r ppe 2u CV it l im CV lim 1 lo w it er
2 CV
er low it lim
MV2 lower limit
MV1 Figure 14.7 Optimizer room of a predictive controller for a TITO case.
per and lower limits for the manipulated variables. The diagonal dash-dotted lines represent the upper and lower limits of the controlled variables (CV1 and CV2). According to these limits, the gray highlighted area represents the so-called feasible area, the area where the controller has to keep the actual working point. The thick lines and circles in Figure 14.7 show the trajectory of a working point, driven by the controller and the optimizer. Assuming that the actual working point is located at circle 1, we can see that the lower limit for MV1 is violated. 11) In this case the control algorithm firstly moves this point into its feasible area, marked by circle 2. This way is direct and always the shortest possible way, only constrained by the maximum allowed move size for this manipulated variable. Starting at the working point marked by circle 2 the control algorithm pushes this point into the feasible area, thus to the working point marked by circle 3. The trajectory of how the controller pushes the working point into the feasible area is by default the shortest possibility, thus a straight line, perpendicular to the closest limit. On the other hand, this way is directly influenced by the controller tuning.
11) It has to be remarked that this condition cannot occur while the controller is running. The limits for the manipulated variables are treated by the controller as hard limits which cannot be violated. Thus, the condition which leads to working point “1” may occur only if the controller is switched on while the plant is in this condition.
567
568
14 Practical Aspects and Future Trends
Here, the most influential tuning parameters for this way are the weights 12) for the controlled and manipulated variables. For example, higher weighting for MV2 than for MV1 would result in lower movements in MV2 than in MV1 and therefore in a longer trajectory between working points 2 and 3 as shown in Figure 14.7. If the actual working point is located in the feasible area, the optimizer pushes this working point to its optimal point. In Figure 14.7 this is shown by the move from point 3 to point 4, where point 4 represents the optimal working point in the steady state. The position of this optimal working point is influenced by the tuning parameters for the optimizer, usually by a cost factor given for single controlled variables and/or manipulated variables. These cost factors directly result from the value or cost of the given variables 13) and may also represent real costs or values of process streams. It has to be remarked that nearly all commercial MPC packages offer not only the option to minimize or maximize given variables (controlled variables or manipulated variables) but also to push these variables to a given point. This is usually implemented by a so-called desired value and a quadratic optimization factor (in contrast to a “linear optimization factor” if the variable should be simply minimized or maximized). As a summary of the control aim of a commercial multivariable predictive controller, the following tasks have to be fulfilled: keep the controlled variables within the user-given limits, stabilize the process and reduce or reject oscillations, minimize the noise (thus reduce the standard deviation) of a controlled variable to shift the mean value closer to the limit toward the optimal working point, reduce the effects of the measurable and nonmeasurable disturbance variables on the plant, reduce or reject coupling effects (e.g., offer the ability to control both the bottom and the top quality of a distillation column independently), push the controlled variables to their optimal working point considering the user-given limits. Looking at the above list of control aims, we see that APC can simplify the operation of a plant very effectively. Good working APC in the case of a plant with difficult control conditions may offer the user some more evident controlled variables. For example, in the case of a distillation column, it is usually very difficult to control both (distillate and bottom) qualities using the base layer control strategy;
12) In many commercial predictive controllers these weights are implemented as penalties, which act in a reverse way; thus, a higher penalty for a controlled variable leads to slower movement for this controlled variable, whereas a lower controlled variable penalty would lead to a faster movement. 13) Depending on the philosophy of the program package, the costs will be either minimized or maximized; in the latter case, however, negative costs are defined.
14.3 Implementation of a Predictive Controller
thus, usually only one concentration is controlled and the second one fluctuates. APC can retrofit this ability by decoupling the controlled variables and thus both qualities can be controlled. This strategy is usually more evident for the operators. 14) 14.3.2 Advanced Optimization Features
As shown in the previous subsection, most commercial MPC packages offer not only the ability to control the plant, but also to optimize it. This means that the plant is driven to an optimal steady-state point within the feasible area according to the limits for the manipulated variables and controlled variables, using additional degrees of freedom. Some of these parameters which can influence this optimization will be explained here. Most controllers offer a so-called speed factor which specifies how fast the optimizer will work relative to the speed of the control algorithm. The speed of the control algorithm is usually specified indirectly by the length of the control horizon, which aims to achieve a steady-state at the end of the horizon. For the optimizer a second horizon is then used, which is significantly longer than the control horizon. 15) Another approach to tune the speed of the optimization is implemented by filtering the trajectory to the optimal steady state by a first-order digital filter. By using a big time constant for this filter, one can slow down the optimizer. This algorithm commonly does not need a second horizon for the optimizer, because filtering a trajectory for the optimizer offers the ability to compute the optimal steady state within the control horizon. 16) As time proceeds, this optimal point is moved to its steady state according to the trajectory specified by the optimizer and its tuning factors. Figure 14.8 clarifies the difference by using a speed factor or a planned optimizer trajectory by first-order filtering. Most commercial MPC packages offer the ability to define optimal steady states for controlled variables and manipulated variables in two different ways, either by defining an optimal value or just by driving the controlled variables and manipulated variables toward their set point ranges defined by the upper or lower limits. The optimization toward one of the limits is implemented by a linear factor where the sign of this factor specifies the direction and the value specifies the importance of the minimization or maximization. Whereas the program packages usually offer either minimization or maximization, a negative factor for a variable with a minimizing algorithm implements a maximization of this variable and vice 14) Looking at even more complex plants, such as a distillation column with side draws, shows how powerful this possibility might be. 15) Generally, the horizon for the optimizer includes only the last point of the horizon, thus the steady state of the plant. This makes sense because the control algorithm already takes care of the dynamic behavior of the plant, including the prevention of
violations within this horizon. The optimizer is then used only to push the steady state to its optimal position, which means that the controller should reach this optimal steady-state point within a given time frame, defined by the speed factor. 16) This is not necessarily the optimal steady state of the plant because the trajectory is cut at the end of the control horizon.
569
570
14 Practical Aspects and Future Trends
y upper CV limit
dynamic optimizing
optimal steady state
lower CV limit
past
future
t
control horizon
current time
optimizing horizon
(a)
optimizer speed defined by speed factor
y upper CV limit
trajectory to optimal steady state by firstorder filtering
dynamic optimizing
optimal state at the end of the control horizon
optimal steady state
lower CV limit
past
current time
future
t
control horizon optimizing horizon
(b)
optimizer speed defined by trajectory planning
Figure 14.8 Optimizer speed, defined by the speed factor or trajectory planning.
versa. The higher the value of this specified factor is, the more important is this variable. The optimizer algorithm then tries to push the variable with a higher optimizing factor to its limit rather than the variable with a lower factor. The linear optimization is usually implemented by a cost function as shown in (14.1): J1 D f 1 C V1 C f 2 C V 2 C . . . )
min
C V1,C V 2,...
,
(14.1)
where f i are the optimizing factors. On the other hand, a specific target for a controlled variable and/or a manipulated variable can also be given, which is implemented by using a quadratic cost
14.3 Implementation of a Predictive Controller
function, as shown in (14.2): J2 D f 1 (C V1 O C V1 )2 C f 2 (C V 2 O C V 2 )2 C . . . )
min
C V1,C V 2,...
,
(14.2)
where f i are the optimizing factors specifying the importance and O C V i are the targets for the given controlled variable. Some MPC packages also offer the ability to specify additional limits for the optimizer which are different from the limits used for the control algorithm. These additional limits make sense in the case of model uncertainties and/or too aggressive tuning of the controller. The presence of noise may lead to unwanted violation of the control limits. If the steady state of a plant is at a user-specified lower or upper limit, noise in the measurement of this variable may lead to small violations of y limit violation control limit
10.0
control back in CV range (with model uncertainties)
9.9 9.8 9.7 9.6
control toward optimal steady state (equal to upper limit)
9.5 9.4 0
2
(a)
4
6
8
10
t [min] 12
10
t [min] 12
without additional limits for optimizer
y control limit
10.0 9.9 9.8
optimizer limit
9.7 9.6 9.5 9.4 0
(b)
2
4
6
8
with additional limits for optimizer
Figure 14.9 The effect without and with additional optimizer limits.
571
572
14 Practical Aspects and Future Trends
this limit. In this case the control algorithm, which is usually specified to act faster than the optimizing algorithm, pushes the controlled variable within its limits. If there are model discrepancies, this might lead to a greater push than necessary and the controlled variable ends up at a point which can be far away from the optimal steady state. Then the optimizer tries to push the controlled variable again to its optimal steady state, which is directly on the upper or lower limit, where a violation by the noise may occur. Figure 14.9a clarifies this behavior without additional limits for the optimizer in the case of noise and model discrepancies. It is clear that this behavior of the plant is not wanted, because of the rapid control moves and a significant gap in the optimal steady state which occurs periodically in this controlled variable. An additional limit for the optimizer can prevent this behavior by moving the optimal steady state slightly away from the control limits. Figure 14.9b shows that in this case there is no violation of the limit and therefore no rapid moves occur anymore. 14.3.3 Signal Scaling and Weighting
The cost function of a multivariable predictive controller is shown in (14.3): 3 2 My n e2i X X 2 JD λ yi 4 eO n (k C d C 1 C n e i jk)5 ei
iD1
C
Mu X iD1
n e iDn e1i
2
λui 4
nu X
3
∆ u2i (k C j 1)5 ,
(14.3)
j D1
where M y is the number of controlled variables and M u is the number of manipulated variables and constant weighting factors are assumed in the control and optimization horizons. According to the cost function for predictive Multi-Input, Multi-Output (MIMO) control (14.3), it is clear that, in contrast to predictive SISO control, the weighting factors λ y i and λ u i cannot be combined in a single tuning parameter because these parameters are essential for tuning the control behavior between different controlled variables and manipulated variables. 17) But the weighting factors also have an important role for basic tuning of the control behavior (see also Volk et al. [11]), depending on the process gains. In general, a smaller process gain leads to significantly slower control behavior than for a process with a larger process gain. 18) Figure 14.10a demonstrates this behavior in the 17) In the SISO case, the first sum in both terms disappears, leaving one single λ y and one single λ u in front of each term. In this case, the two weighting factors can be combined in one factor: λ D λ u /λ y . 18) If the process gain is smaller, the same control behavior of the controlled variable
can be achieved by larger moves of the manipulated variable. Thus, in the quadratic cost function the term penalizing the control increments will be greater, and the control will be slower.
14.3 Implementation of a Predictive Controller Kp
y
Kp
y
573
Kp
Kp
t
t u
u
Kp
Kp
Kp
Kp
t
t
(a)
without adapted scaling
(b)
with adapted scaling
Figure 14.10 Effect with and without scaling adaption in the SISO case.
SISO case, when the process gain of a linear second-order process without dead time (T1 D 1 min, T2 D 10 min, and Td D 0 min) is decreased from 1 to 0.1. (The controller parameters are given in Examples 7.17 and 7.18 in detail.) To achieve the same control behavior as with unity gain, the weighting factor for the control increments (in the SISO case only one weighting factor is necessary) has to be divided by the square of the ratio of the original and the changed value of the gain using the simple formula λ suc D
Ko r i g Km o d
2 .
In the above example, where the process gain has been decreased by a factor of 10, the weighting factor for the control increments has to be decreased by a factor of 100, thus from 0.1 to 0.001. Figure 14.10 demonstrates the result. Of course, the manipulated variable performs much more aggressive moves. In the MIMO case, where each controlled variable and each manipulated variable has its own weighting factor, the scaling becomes even more important. Usually, the off-line design suites included in commercial program packages perform an initial tuning to force the control behavior of each controlled variable to unitary performance. Without such an initial scaling the control performances of the single controlled variables may differ significantly. Figure 14.11 demonstrates this behavior. The parameters of the second-order process without dead time are given in Table 14.1. It can be seen that the gain for the connection from MV1 to both controlled variables has been decreased by a factor of 10, whereas the connection from MV2 to both controlled variables has been increased by a factor of 10. If the controller tuning for this significant change is kept without any change, the control behavior of CV1 becomes much slower, whereas the behavior of CV2 becomes much faster. The scaling forces both control behaviors to their unitary performance. (The controller parameters are given in Example 7.19 in detail.)
574
14 Practical Aspects and Future Trends y 1
y1 scaled y1 unscaled
y2 unscaled y2 scaled
y1 orignal
y2 orignal
0 0
2
4
6
8
10
12
t [min] 20
14
16
14
16 t [min] 20
60 u1 scaled
u
u1 orignal u1 unscaled
u2 orignal
0 0
4
2
6
8
10
12
Figure 14.11 Effect with and without scaling adaption in the MIMO case. Table 14.1 Process for the TITO simulation.
P11 P12 P21 P22
Kp
Original T1 [min] Td [min]
Kp
2.0 1.0 1.0 2.0
10 20 15 5
0.2 0.1 10.0 20.0
0.0 0.0 0.0 0.0
Changed/Modified T1 [min] Td [min] 10 20 15 5
0.0 0.0 0.0 0.0
14.3.4 Handling of Ill Conditions
It might happen in a practical application that a control task becomes infeasible. This may occur, for example, if adjacent tray temperatures in a distillation column or a reactor should be controlled. In many cases (depending on the process) these temperatures act mostly in the same way, according to single manipulated variable movements; thus, these controlled variables are not controllable independently. Usually these cases should be analyzed, and appropriate actions should be taken in the controller design, but this is in most cases not possible, at least if the plant (as usual) acts in a nonlinear way, but the controller is linear and designed for a different working point. To deal with such ill conditions which would lead to an infeasible control problem, commercial program packages use some techniques to convert the control problem to a feasible one. The commonly used techniques either remove illconditioned controlled variables from the control structure completely, or decrease the importance of a controlled variable so that the control problem becomes feasible. Both techniques can be tuned by specified tuning parameters and both approaches lead to similar solutions.
14.3 Implementation of a Predictive Controller
The removal of ill-conditioned controlled variables from the control problem (e.g., implemented by Honeywell’s RMPCT 19)) uses threshold values for each controlled variable. If the singular value of a single controlled variable drops below this threshold, the corresponding controlled variable is removed from the control problem. On the other hand, the decrease of the importance of single controlled variables (e.g., implemented by Aspen Technology’s DMC+ 20)) uses suppression factors for the controlled variables. If an ill-conditioned controlled variable is detected, the importance of this controlled variable will be decreased, depending on the suppression factor, until the control problem becomes feasible again. 14.3.5 Handling of Constraints
One of the most important features of modern APC software suites is the ability to handle constraints. The classical approach in handling constraints distinguishes between hard and soft constraints and set points (Figure 14.12). Hard constraints (Figure 14.12a) are limits that must not be violated in any case. Such a constraint is usually not included in the cost function of a predictive controller, but the cost function is minimized under the given constraint. In practice it is very unusual to give hard constraints for controlled variables, because a hard constraint in a controlled variable may lead to a completely infeasible control problem. 21) On the other hand, hard constraints are usually implemented for the manipulated variables, which are usually limited physically, for example, a valve position, which can move between a fully closed and a fully open position. In such a case it makes no sense for the controller to try to open a valve beyond its fully open position. Often limits are also given for the set points of base layer controllers, for example, the outlet temperature of a furnace is limited by an upper and a lower constraint, given by the maximum allowed coil temperature or a minimum temperature. (At a too low temperature the flame would be extinguished.) Constraints for the maximum allowed manipulated variable movements (per control sampling time) are also very common. These are also treated as hard constraints. Combined with the maximum and minimum allowed absolute values for the manipulated variable, this leads to a funnel, whose apex always starts at the last implemented manipulated variable and an opening is defined by the maximum allowed manipulated variable moves. The funnel then ends at the given upper and lower limits for the manipulated variable (Figure 14.12b). Soft constraints might be violated if it is not possible to keep them within their limits. The implementation of a soft constraint is performed by the terms of the cost function, as shown in (14.3). The error term e n ei (k C d C 1C n e i jk)2 is nonzero 19) RMPCT is an abbreviation of “robust multivariable predictive control technology”. 20) DMC is an abbreviation of “dynamic matrix control”. 21) As a hard controlled variable constraint may lead to an infeasible control problem, most commercial control packages do not even offer the ability to apply hard constraints for controlled variables.
575
576
14 Practical Aspects and Future Trends
y
u
t
t
(a)
(b)
hard constraints y
manipulated variable constraints y
t
(c)
soft constraints
t
(d)
set point
Figure 14.12 Different ways of constraint handling.
in the case of a violation, and zero if the variable is within the limits. Thus, the violation of a soft constraint is treated as a quadratic penalty (Figure 14.12c). The third type of constraint is set points, where a specific value is given for a controlled variable that the controller has to track (Figure 14.12d). The implementation is similar to the implementation of a soft constraint, defined by the quadratic penalty in the cost function. The only difference is that each value which differs from the set point is taken into account. In the case of a feasible solution in a TITO case, the predictive controller would lead to a solution as shown in Figure 14.13a. It is obvious that the only feasible solution is at the intersection point of the two set points (point A in Figure 14.13a). But if the solution is infeasible, for example, if the intersection point of the two set points is not within the given manipulated variable limits, the solution offered by the controller depends on the tuning of the controller, in most cases defined by the weighting factors for the controlled variables. If the weightings for both controlled variables are equal (including the necessary scaling), the solution leads to point B in Figure 14.13b, where the distance of this point to both set points is equal. If the weighting for CV2 is increased, the solution will lead to point C in Figure 14.13c, where the distance of the point to the set point of CV2 is less than the distance to the set point of CV1. Within this scope it might be clear that point D in Figure 14.13d can be achieved by selecting a very high weighting for CV2 and a very low weighting for CV1. But
MV2 upper limit
MV1 upper limit
MV2
MV1 lower limit
MV1 upper limit
MV2
MV1 lower limit
14.3 Implementation of a Predictive Controller
577
MV2 upper limit
CV set 1 po int
CV se 1 tp oin t
2 CV int
2 CV t oin
po set
p se t
A
B
MV2 lower limit
MV2 lower limit
MV1
MV2 MV2 upper limit
infeasible solution with equal weighting MV1 upper limit
MV1 upper limit
MV1 lower limit
MV2
MV1
(b)
feasible solution
MV1 lower Limit
(a)
MV2 upper limit
CV se 1 tp oin t
CV se 1 tp oin t
2 CV t oin
2 CV t oin
p se t
p se t
C D MV2 lower limit
MV2 lower limit
MV1
(c)
infeasible solution with unequal weighting
MV1
(d)
infeasible solution with prioritization
Figure 14.13 Solutions for different weighting and prioritization.
it has to be kept in mind that the weighting factor influences not only the steady state (shown in Figure 14.13), but also the dynamic behavior. Choosing a very high weighting factor for a controlled variable and a very low weighting factor for the other controlled variable would lead to a very fast dynamic control of the higherweighted controlled variable and a very poor dynamic control of the lower-weighted controlled variable, even if the steady state is feasible. This might not be wanted (as generally in most cases); therefore, some controllers also offer the ability to prioritize single controlled variables, offering the ability to make single controlled variables more important than others in the steady state. Thus, point D in Fig-
578
14 Practical Aspects and Future Trends
ure 14.13d can hardly be achieved with an arbitrary weighting, but easily with a higher priority for CV2 than for CV1. The prioritization of controlled variables is a very powerful ability, because it offers the possibility to tune a controller independently for dynamic and static behavior. In many practical applications it is very common that plant constraints are taken into account for the control problem, to have the ability to optimize the plant according to all relevant constraints. For example, usually the temperature profile in a chemical reactor is limited to a maximum temperature to prevent damage to the material. In such a case it is very likely to take these temperatures into account for an APC application, but on the other hand it is clear that such a high temperature limit is much more important than the quality in the outflow of the reactor. 22) But choosing a high weighting for this high temperature limit would always lead to very aggressive controller actions if the temperature reaches this limit, which is not wanted in many cases. Choosing a higher priority for the high temperature limit than for the quality would lead to less aggressive controller actions and also to the desired prevention of the limit violation. On the other hand, considering the prioritization of controlled variables, some controllers also offer the ability to take single controlled variables completely out of the control problem, but keep them for steady-state optimization. The advantage of this feature is that the steady-state optimizer (as mentioned above) runs significantly more slowly than the control algorithm. Using single controlled variables only for the optimization leads to very smooth control behavior, combined with the ability to let the user still change the targets or limits for these controlled variables, which are used only if enough degrees of freedom are available. The results achievable by an algorithm offering the ability to select single controlled variables only for the optimization are very similar to the results that can be achieved by choosing a very low priority for these controlled variables. 14.3.6 Handling of Set Point or Set Range Changes
As explained before, a commonly used technique for commercial predictive controllers is the ability to handle not only set points, but also set ranges. Although the advantages of both techniques are obvious in most cases, a change of the set point or set range may lead to unforeseeable violation of limits in the dynamic control behavior of the controller. If the user changes the set point or set range for a controlled variable, the current measurement of this controlled variable may be outside the desired range. Depending on the tuning, the controller pushes this controlled variable then as fast as possible back into its feasible area, which may lead to unwanted aggressive control. Figure 14.14 demonstrates the control behavior of a controlled variable in the case of a set point and a set range change at the current time point. After the change of the set point (Figure 14.14a), the controller
22) In fact damage to the reactor material is much more expensive than an off-spec production.
14.3 Implementation of a Predictive Controller y
y
t
t
(a)
579
(b)
change of the set point
change of the set range
Figure 14.14 Control behavior with set point or set range change. y
y
t
t
(a)
change of the set point
(b)
change of the set range
Figure 14.15 Control behavior with set point or set range change using a reference trajectory.
is not able to track the new set point fully and therefore tries to push the controlled variable to the new set point, resulting in an unwanted overshoot. 23) In the case of a change in the set range (Figure 14.14b), the controller has to face the same circumstances, and thus may also produce an overshoot above the given high limit. A very commonly used possibility to handle these rapid control actions is the use of reference trajectories. A reference trajectory uses a first-order digital filter to smooth the transition between the old and the new set point or set range with the main intention of providing an aperiodic control behavior. It can be said that the sudden change in a set point or set range is smoothed down to a feasible behavior. Figure 14.15 demonstrates the usage of a trajectory by first-order filtering of the set points (Figure 14.15a) and set ranges (Figure 14.15b). As the reference trajectory is implemented by a first-order filter, the shape of the trajectory can simply be tuned by the settling time or the time constant of the filter. Selecting a smaller time constant results in a faster transition from the old to the new set point or set range. 23) In industry overshoots are commonly unwanted, because an overshoot usually represents a limit violation. An aperiodic control behavior is in most cases the favorite control performance, even if this is slower. 24) This technique has been offered by Honeywell’s RMPCT controller.
580
14 Practical Aspects and Future Trends y
y
t
t
(a)
change of the set point
(b)
change of the set range
Figure 14.16 Control behavior in the case of a change in the set point or set range using a funnel.
A different approach to slow down the control behavior in the case of set point or set range changes is the application of so-called funnels. 24) Figure 14.16 demonstrates the usage of funnels. If the set point is increased, the controller opens a funnel, which starts slightly below the old and slightly above the new set point. The feasible area is within this funnel, which ends after a defined time at the new set point (Figure 14.16a). If both limits of a set range are increased, the controller also opens a funnel, which starts at the old lower limit and slightly above the new upper limit (Figure 14.16b). The funnel can be tuned in different ways, that is, the length and the shape of the funnel can be defined (e.g., it is possible to prevent the controller from opening the funnel above the new upper limit). The advantage of funnels compared with reference trajectories is that the controller has the freedom of how to force the controlled variable to its new set value, because the funnel offers a wider feasible area. Controllers that use a reference trajectory will push the controlled variable to the reference trajectory, even if the controlled variable could achieve the new set value faster. In the case of unmeasured disturbances or model discrepancies, the funnel technique can be a big advantage, because it slows the controller actions. Some controllers also offer the ability to apply reference trajectories or funnels if a measured disturbance enters the process. In this case the controller predicts the effect of this disturbance on the controlled variables and – if necessary – applies a reference trajectory or opens a funnel to force the controlled variables to the (unchanged) set point or set range. 14.3.7 Techniques to Reduce Computational Effort
Nearly all commercially available program packages for multivariable predictive process control offer some techniques to reduce the online computational effort. These techniques include coincidence points and/or the blocking technique introduced in Section 5.4. A controller can apply either coincidence points or the block-
14.3 Implementation of a Predictive Controller
ing technique or both, depending on the provider, and this is more or less based on the philosophy of the package. Whereas applying coincidence points reduces only the computational effort necessary for the prediction of the controlled variables, the blocking technique also reduces the computational effort necessary for the optimization by reducing the order of the optimization problem. Anyhow, at a time when the available computational power is nearly doubling every 2 yr, the techniques to reduce the computational effort of multivariable predictive controllers could be thought negligible. But it has to be kept in mind that the available hardware in an online environment is still very expensive 25) and is not renewed every year. Also, it is very essential for real-time control that the controller applies the computed results shortly after they have been triggered by the DCS, but this usually requires fast hardware. Also, it is very common to run more than one controller per available hardware unit and also the trend is to apply more complex controllers with more variables requiring more computational effort. 14.3.8 Dealing with Inner Loop Performance
As already mentioned, a very common technique for commercial predictive control is to use a cascade structure applying the APC application as a master, writing set points to base layer controllers as slaves. This approach has two main advantages: As the slave controller usually runs significantly faster (most recently base layer controllers run with a sampling time of 1 s, whereas the APC runs with a sampling time of 1 min) fast disturbances entering the process can be compensated for by the base layer control. Especially flow and pressure disturbances can be compensated for by the base layer controllers very fast, because of the fast process behavior of these processes. The base layer controllers perform a basic linearization of the process. Imagine a structure with a heat exchanger where steam is used as the heating medium and the outlet temperature of the medium to be heated has to be controlled. A relation from the valve of the steam flow to the temperature would be very nonlinear because of the valve characteristics. Using a flow controller in the base layer to control the flow of the steam linearizes the process, because a model from the steam flow to the temperature is nearly linear in a wide area if the flow rate of the medium to be heated is constant. A set of simulations may demonstrate the advantage that an underlying slave controller can offer (see also [11]). In Figure 14.17 a process of two serially connected first-order subprocesses has been simulated. The subprocesses and the controller tunings used are shown in Figure 14.17a,b with the only difference being that the 25) Many real-time DCSs available today are based on dedicated hardware, which has to fulfill high expectations regarding availability, reliability, and maintainability and therefore cannot be compared with a conventional PC.
581
582
yr=yr1
(a)
14 Practical Aspects and Future Trends
MPC ne1 = 0 ne2 = 90 nu = 30 λy = 1.0 λu = 0.1
z2 y2 Kp2 = 1 T2 = 60min Td,2 = 60min
Kp1 = 1 T1 = 60min Td,1 = 0min
u1
y1
structure without a slave PID controller
u1=yr2 e Kc = 4 K =1 yr=yr1 MPC u2 p1 TI = 10min T1 = 60min ne1 = 0 - TD = 0min Td,1 = 0min ne2 = 90 nu = 30 λy = 1.0 λu = 0.1
(b)
z1
z2 y2 Kp2 = 1 T2 = 60min Td,2 = 60min
z1 y1
structure with a slave PID controller 1 y1 0
y1
y1
yr1 yr1
y1
y1
yr1
yr1
y1
-1 1000
t 2 y2/u1
y2
1400
t [min]
y2 y2
0 -1
t
1200
u1
u1 1000
1200
1400
t [min]
1000
1200
1400
t [min]
10 u2 0
u1
t
(c) simulation result without a slave PID controller
-10
(d)
simulation result with a slave PID controller
Figure 14.17 Control behavior without and with a slave PID controller. The disturbance is not measured.
first subprocess is controlled by a PID controller in the second case and no further disturbance rejection is performed by the predictive controller. In both cases a stepwise disturbance with the value of 1 enters at the output of the first subprocess (as z2 ) at t D 1000 min and a stepwise disturbance of C1 enters at the output of the whole process (as z1 ) at t D 1250 min. Figure 14.17c shows the simulation result if no slave PID controller is used. The rejection of the disturbance can only be recognized by the model-based predictive controller after the disturbance has passed the second subprocess, which has a long dead time. After this delay the controller rejects the disturbance fast and reliably. Figure 14.17d shows the same simulation with a slave PID controller. The PID controller can reject the disturbance z2 very fast (because of the faster process behavior of the first subprocess P1 having no dead time); thus, the effect of the disturbance at the output y 1 is very low. The disturbance rejection of a stepwise disturbance z1 at the process output is nearly the same in both cases, but the controller action performed by the predictive controller is much more aggressive. However,
14.3 Implementation of a Predictive Controller
these more aggressive moves are not directly applied to the process, but as a set point to the slave PID controller. According to the tuning of the slave controller, the moves in the manipulated variable (e.g., the valve) are much less aggressive (compare u 2 in Figure 14.17d with u 1 in Figure 14.17c). It is seen in Figure 14.17d, that the slave PID controller cannot completely reject the disturbance z1 entering at the output of the first subprocess. The predictive controller does not really need to perform any moves to reject this disturbance, because the underlying slave controller would reject it. But, if the predictive controller recognizes this disturbance, it helps to minimize the effect of this (dynamic) disturbance. To deal with these unnecessary moves, some commercial predictive controllers are able to implement PID controllers into their model structures including a feedback of the so-called inner loop dynamics. Some simulations will demonstrate the advantage of modeling the inner loop dynamics in the controller model. First, let us consider the controller performance without a slave PID controller (Figure 14.18a). The disturbance z2 entering the process at the output of the first subprocess is measured and feed-forwarded to the model-based predictive controller. As soon as the disturbance enters the process at time point t D 1000 min, the model-based predictive controller performs some moves to reject it, before it would appear at the process output y 1 (Figure 14.18c). When the disturbance then reaches the process output y 1 after having passed the second subprocess, the controller knows that this disturbance has been rejected already and will not perform additional actions. 26) The rejection of the disturbance z1 at the whole process output y 1 is the same as in the prior simulations without additional feed-forward of the measured disturbance. In the case of the presence of a slave PID controller and an additional feedback of the measured inner control variable (Figure 14.18b), the slave PID controller will reject the disturbance z2 entering at the first subprocess output y 2 , but also the model-based predictive controller will apply some actions to the set point of the slave PID controller to minimize the dynamic effect of the disturbance. Comparing Figure 14.18d with Figure 14.17 shows that the disturbance rejection with the feedback of the inner loop dynamics of the slave PID controller is slightly faster. It is also observable that the disturbance at the whole process output y 1 caused by a disturbance z2 at the first subprocess output is the smallest in all cases. Again, the disturbance rejection considering the disturbance z1 entering at the whole process output y 1 is nearly the same as in the other cases. In some cases it might not be desired that the model-based predictive controller will perform any actions to help the slave controller to reject the disturbance faster. Of course, in the simulations this effect is greater than in most real applications, because the time constant of both subprocesses is the same. This was desired in the previous simulations to show exactly this control behavior. In most applications the inner loop has much faster dynamics than the outer loop. In such a case the 26) Of course this is valid only for the case when the process and the model are identical. Otherwise an unmeasured disturbance would take place at the process output, forcing the controller to reject it.
583
584
yr=yr1
(a) yr=yr1
14 Practical Aspects and Future Trends
MPC ne1 = 0 ne2 = 90 nu = 30 λy = 1.0 λu = 0.1
z2 K =1 y2 p2 T2 = 60min Td,2 = 60min
z1 y1
structure without a slave PID controller u1=yr2 K =4 Kp1 = 1 MPC e c u TI = 10min 2 T1 = 60min ne1 = 0 - TD = 0min Td,1 = 0min ne2 = 90 nu = 30 λ y = 1.0 λu = 0.1
(b) y1
Kp1 = 1 T1 = 60min Td,1 = 0min
u1
z2 y2 Kp2 = 1 T2 = 60min Td,2 = 60min
z1 y1
structure with a slave PID controller y1 yr1
1 y1 0
yr1
y1
yr1
yr1
y1
y1
-1
t
1000 2 y2/u1 0 -1
y2
t
1200 u1
1400
t [min]
y2
y2 u1 1000
1200
1400
t [min]
1000
1200
1400
t [min]
10 u2 0
u1
t
(c) simulation result without a slave PID controller
-10
(d)
simulation result with a slave PID controller
Figure 14.18 Control behavior with and without a slave PID controller with a measured disturbance.
controller can simply be tuned by the weighting factors not to perform any actions in the case of inner loop disturbances. It should be also mentioned that the controllers which offer the ability to handle inner loop dynamics by modeling the PID loops in the controller model are also able to monitor the output of the slave PID controller (e.g., a valve). This is very useful when the slave PID controller goes to saturation, because in this case the predictive controller can force the slave controller to a controllable range (“antiwindup”). But the observation of the slave controller is also very useful to recognize discrepancies between the slave controller and the measured valve position. It has to be mentioned that the additional modeling of inner loop dynamics makes sense only if the disturbances in the inner loop have a significant influence on the outer loop, thus if the inner loop dynamics and the disturbance rejection by the slave controller are slower than the sampling time of the master predictive controller.
14.4 Future Trends
14.4 Future Trends
Actually there are some enhancements for commercial model-based predictive controllers in development which will negate some of the biggest disadvantages of the packages available today. These disadvantages are mainly: The model building procedure: The commonly used model building procedure is very time consuming and the models achieved are still purely linear. The controllers have to be tuned in a robust way, to negate model discrepancies, caused either by nonlinear effects or by model uncertainties. Linear control algorithms: Most of the model-based predictive controllers available today are still purely linear, that is, not only the model but also the control algorithm is linear. But plants are almost always nonlinear. Robust tuning of the controller would result in slower action. Base layer availability: Nowadays the usual way to implement an APC project is to run the model-based predictive controller on a dedicated computer, which is connected via OPC to the DCS, for example, Shell’s SMOC, Aspen Technology’s DMC+, Honeywell’s Profit Controller (see also [9]), Honeywell’s Profit Suite [7], and IPCOS’s INCA Suite [8]. To keep the bandwidth and the computational effort at an adequate level, the model-based predictive controller usually runs significantly more slowly, than the installed base layer equipment. A future development will therefore be the implementation of MPC algorithms directly into the base layer, where it would benefit not only from the shorter execution period, but also from the higher availability (e.g., [5]; [6]; see also [2]). Performance monitoring: Although the benefits, that an APC can offer are pretty clear, the availability performance of the applications is still not monitored adequately in most cases. This is because sometimes skilled personnel who could monitor the installed applications are not available. On the other hand, the installed APC applications are often very complex, and therefore in many cases it is very difficult to perform adequate monitoring. Some of the upcoming developments will be explained in more detail in the following. 14.4.1 Identification and Testing of the Plant
One of the most time-consuming parts when building an APC application in industry is still the modeling of the process, including the necessary step testing of the plant. As the commercial model-based predictive controller available today uses
585
586
14 Practical Aspects and Future Trends
empirical models, adequate data are essential to achieve a good model (and therefore a good controller). The commonly used technique to achieve good data for identification is manual step testing. The engineer has to plan a sequence of steps which should be applied to the potential manipulated variables of a model-based predictive controller. The application of these steps to the real plant may then – depending on the dynamics of the plant – consume up to several days per manipulated variable, thus several weeks for a complete application, and the engineer probably has to be available 24 h a day and 7 days a week. During the test some special criteria have to be fulfilled, for example, no other plant input should be changed and the plant has to be kept in its steady state. It is very important during a step test that no contrary moves are applied to the plant which would reduce the effect of the given sequence of steps. But although contrary moves reduce the effect of the step tests, the identified model will not take the right effect into account. If a plant is running at its optimal point, a step test may very probably result in an off-spec production or in a reduced throughput; thus it will reduce the benefit of the plant. Of course this is not wanted; therefore, it is always a good idea to reduce the effects of a step test. But to obtain good data, it is also essential to apply adequate big steps. Therefore, the magnitude of the step tests should always be as big as necessary and as small as possible. Anyhow, a step test is still an upset for the plant, followed by some unwanted effects. 14.4.1.1 Automatic Plant Testing A very common upcoming approach is the usage of automatic plant testing tools. Most of the contributors of commercial MPC packages already offer such tools or have an equivalent product in development. The main idea of an automatic plant test is to automate the implementation of step tests. The advantage of automatic testing is as follows:
the implementation of the steps is very accurate in time and amplitude, no other disturbances or contrary steps can be performed if the plant is running in automatic mode, very complex step patterns (e.g., Pseudo-Random Binary Signal (PRBS)) can be applied to the plant without the contribution of the operators. Automatic plant testing also has some more advantages, which are less obvious. For example, the automatic testing tool can also collect the necessary data with higher accuracy than a historical database. Some tools offer online analysis of the data obtained and calculate a model online or provide a report of the quality of the steps performed. An adjustment of the upcoming steps is then the logical follow-up of such online identification and analysis. Also, some tools offer the ability to observe the plant during the test and keep the plant in a given range of controlled variable limits, by modifying the steps or applying contrary moves to the plant. Such tools use MPC with a very rudimentary model of the plant. The steps are then applied by the controller, which will also take care of the potential controlled variables and manipulated variables and their
14.4 Future Trends
limits. In the case of a limit violation, the controller can then reduce the effects of the steps, move some other manipulated variables, change the direction of the steps, or stop the step test to keep the controlled variables within their limits. 14.4.1.2 Simultaneous Plant Testing and Special Test Signals The commonly used patterns for step tests are generally simple. The advantage of these patterns is that they can be performed very simply manually by an engineer or even by the operating personnel, the results are very demonstrative, and a single step test can be performed in a couple of hours (maybe during a normal day shift). On the other hand, such simple step patterns also have some disadvantages; therefore, it is necessary to consider some special circumstances. These disadvantages are mainly that usually the same pattern is used for all potential manipulated variables. As such patterns are, of course, correlated, it is necessary to step only one manipulated variable at the same time and to introduce an adequate break between the steps. These signals usually excite only one frequency or a small frequency band of the plant and thus may offer only a suboptimal empirical model. Because of the small amount of information that such a simple pattern can offer, this information should be as good as possible, but some circumstances (e.g., if the plant is not in the steady state) may prevent good data and therefore sufficient information from being obtained. Thus, the engineer planning the test is well advised to observe the plant and wait for steady-state conditions. But in most project frames waiting time is not allotted because it may enhance the testing time significantly. In theoretical approaches it is well known that it is possible to design special uncorrelated test signals. Such signals approximate a random white noise signal by a series of steps. With several uncorrelated PRBSs a simultaneous change of several manipulated variables is possible. A PRBS or a Pseudo-Random Multilevel Signal (PRMS) uses a series of short and long periods of steps and can thus excite a process in a wide frequency range, which will result in a much better empirical process model. But these special test signals have the disadvantage that they usually cannot be manually applied to the plant. Especially if more than one manipulated variable has to be changed at the same time, an automatic testing tool is necessary. To demonstrate the advantages of automatic testing with uncorrelated PRBSs two tests were applied to a pilot plant using INCA Suite from IPCOS (see [8]). The plant uses a fan and a heater as process input variables (manipulated variables), and the output variables (controlled variables) are the flow measurement (by orifice plate) and the temperature. Figure 14.19 shows a scheme of the plant. The throttle flap can be used as (unmeasured or measured) disturbance, the rotation speed of the fan and the power of the electrical heater are the input variables, and the flow and the temperature at sensor 1 are the output variables. The sampling time was 1 s. A series of manual steps (a more complex test pattern than usual in most industrial applications) was applied. Figure 14.20 shows the manipulated variables and the corresponding response of the plant. The duration of the tests was approximately 1800 s.
587
588
14 Practical Aspects and Future Trends
M
Throttle flap
Fan
Heater
Temperature sensor 1
Temperature sensor 2
Flow sensor
Figure 14.19 Scheme of the laboratory-scale plant. 75 [%] Fan
65
Fan
55
Temp. [°C] 120
Flow [m³/h]
Flow
8 6
100
45
4 80 Temperature
35 25
Heater 0
(a)
250
500
2
Heater 750
1000
1250
input variables
1500
t [s]
60
(b)
0
250
500
750
1000
1250 1500
t [s]
0
output variables
Figure 14.20 Implementation of a series of manual steps for the laboratory-scale plant.
Figure 14.21 shows the step responses of the estimated Finite Impulse Response (FIR) models. FIR models are very often used in identification programs of APC packages. In a second test, two uncorrelated PRBSs were designed for the input variables. Such signals cannot be implemented manually simultaneously; thus, an automatic plant testing tool was used to apply the signal to the plant (in this case INCAtest in INCA Suite was used). Figure 14.22 shows the implemented PRBS and the corresponding unit step response of the plant. It is also obvious, that the time plot of the plant response does not give directly such a demonstrative impression of the plant behavior as the manual step tests could provide. The unit step responses of the estimated FIR process model are shown in Figure 14.23. Comparing this model with the model from the manual step tests, one sees that the model obtained with the PRBS tests is slightly better. Both the high frequencies and low frequencies of the plant are captured much better by the model from the PRBS than from the manual step test. Especially the coupling effects between the heating power and the flow and between the fan speed, and temperature are modeled much better. 14.4.1.3 Closed-Loop Identification A not very well documented feature of future developments in commercial predictive controller suites is closed-loop identification. This topic may include not only the special handling of base layer controllers running in a closed loop (this is al-
14.4 Future Trends
589
Figure 14.21 Unit step responses of the estimated TITO FIR model from the manual step test. Flow [m³/h]
Temp. [°C]
[%] 70
110
Fan
8
Flow
60 6
100
50
4
90 Temperature
40
30
Heater
0
(a)
50
100
150
200
250
input variables
300
350
t [s]
2
80 70
(b)
0
50
100
150
200
250
300
output variables
Figure 14.22 Automatic implementation of a PRBS to the laboratory-scale plant.
ready a commonly used technique), but also the identification of process models from historical plant data without additional testing of the plant. Almost every industrial plant uses long-time storage of historical data. As a lot of plant data are available, the idea is to use these data for building a process model for a model-based predictive controller. But the identification algorithms have to face a number of problems if historical data are used. Almost all these data are compressed, thus not every change is stored, but only if a significant change (e.g., 2% of the measurement range) has occurred. Such compressed data do not cover information about all plant dynamics and static behavior and therefore may not be used for process identification. Another problem is that during normal operation
350
t [s]
0
590
14 Practical Aspects and Future Trends
Figure 14.23 Unit step responses of the estimated TITO model from the PRBS test.
almost always more than one manipulated variable is moved simultaneously (manually, e.g., by the operating personnel), which means that these data are correlated. The algorithms for closed-loop identification have to take all these circumstances into account and the practical usability of these upcoming algorithms will be seen in the future. 14.4.1.4 Achieving Models without Plant Testing Plant simulation is a common technology for the design, training, and testing of plant operation. The simulation tools offer the ability to simulate steady states before the plant is built or to get an impression of the reaction in different situations, for example, with changed operating conditions. In the APC environment such tools are already commonly distributed for real-time optimization (in the stage of the site-oriented APC, see Figure 14.3). Although these tools have been known and used for several years for steady-state operations, they are also able to perform dynamic process simulations. This ability is very useful in the design phase of a plant for designing the basic instrumentation and tuning the base layer controllers. Dynamic plant simulation may also offer new aspects for the design of an APC application. With a dynamic plant simulator it is also possible to achieve a good model for the predictive controller. The input/output process model can be obtained by performing a series of step tests on the physically simulated process model and using
14.4 Future Trends
an identification method, or the simulator derives the linear multivariable model for the predictive controller directly. 27) The advantage of such a model derived from dynamic plant simulation is that no tests on a real plant are necessary and thus no upsets occur. Also, it is very advantageous that different plant states and situations can be tested and therefore a model with a smaller confidence interval can be derived and unwanted disturbances do not enter the plant during the tests. But the technique also has some disadvantages. A dynamic model which gives a good approximation of the plant is essential and the engineering effort to achieve such a model is very high. Also, it is known that the dynamic process simulators available today have restrictions; thus, the dynamic plant model restricts the confidence in the estimated or derived MPC model. 14.4.2 Nonlinear MPC
As described before, dynamic plant simulation is available and has become quite popular, but its role in the APC environment is still very limited (it is used only for real-time optimization or off-line design of APC applications). Therefore, the next logical step is to use these kind of models directly for controller design. This possibility has been prevented so far as these simulators need very high computational effort for prediction. In this frame it has to be kept in mind that the real-time optimizers usually run only once an hour and that the computational effort has no relevance during off-line design. MPC uses iterative optimization to minimize the cost function (considering also constraints). This means that not only one, but several predictions are necessary. The computational effort will rise significantly and maybe prevent an online application. An upcoming feature of APC applications will be the use of dynamic process models for online simulation within the model-based predictive controller and some applications are already available. But the applications available today are mostly limited to some special plant types, such as polymerization plants, and usually run with a long sampling time of 5 min or even more to handle the very high computational effort (see Brempt et al. [3]). It is expected that this technique will be used in the future development of plant control, because the advantages of a nonlinear MPC are straightforward. On the other hand, the available computational power is increasing every year, especially because the common architecture for the online implementation of APC applications uses a conventional PC, which is connected via OPC to the DCS. 28) 27) Usually the vendor of a dynamic process simulator provides the ability for a direct model derivation only for its own specific APC suite. For example, UNISIM from Honeywell can directly derive a model for an RMPCT controller without any further steps. HYSYS from Aspen Technology offers a similar ability for the DMC+ controller.
28) A conventional PC usually offers very high computational speed for low price. On the other hand, dedicated hardware for a DCS is usually subject to slow development and a longer life cycle, both related to the higher demand for reliability and availability.
591
592
14 Practical Aspects and Future Trends
Some applications of the different multimodel, multicontroller techniques and control techniques based on parametric Hammerstein and Volterra models are known from the literature, but practically they are not used as commercial nonlinear MPC products. The reason for this might be that for these techniques empirical models are required. But to achieve a nonlinear model by a step test would require significantly more experiments than to build a linear model. For example, different models have to be built at different working points. But as mentioned before, a step test is always an upset for the plant, and thus is generally unwanted. Increasing the number of step tests can thus prevent the application of nonlinear MPC using empirical models. The trend therefore is to rigorous models which could be achieved only by process knowledge and verification with historical data, consequently requiring significantly lower efforts for plant testing. 14.4.3 Integration of a Predictive Controller into the Base Layer
With increased available computational power not only in a conventional PC, but also within the DCS, a very interesting development is the introduction of MPC algorithms directly into the DCS. This will combine all the advantages of base layer equipment, such as higher availability and reliability and a shorter sampling time, with the enhanced control performance of MPC algorithms, especially for control of processes with a long dead time and processes which are difficult to control. The actual development will provide the user with a highly efficient SISO MPC algorithm, where the user only has to configure the linear process model, for example, by choosing a structure of a set of predefined transfer functions and setting the parameters. The controller tuning itself can then be performed by a single parameter, for example, the weighting factor for the control increments. This is a significant enhancement to the – not physically related – parameters of the most commonly used PID algorithm today. The weighting factor of a model-based predictive controller directly influences the speed of the controller (and also the robustness), whereas the change of any single parameter of a PID controller, as well as the change of the ratio between the PID parameters, may lead to oscillations or another insufficient control performance. It can be stated that the computational power available today inside the DCS hardware is still limited and the computational effort of MPC algorithms is still significantly higher compared with that of a PID algorithm. Therefore, only a limited number of MPC loops may replace the conventional PID loops. Also the life cycle of online equipment is still momentously longer than that of usual computer hardware (life cycles of 20 yr or even more are not unusual), but it is foreseeable that the availability of such SISO model-based predictive controllers can be increased even by partly migration of old online hardware.
14.4 Future Trends
14.4.4 Performance Monitoring
Although the total number of APC applications rises nearly every day, leaving the APC engineer, responsible for the maintenance of the installed applications less time for a single application, adequate monitoring of the installed applications is becoming more and more important. Thus, a tool is desirable which helps the APC engineer to monitor the pool of the installed applications for good performance and for the achievable benefits. Most of the vendors of APC application suites therefore also offer some tools for monitoring APC applications (mostly also able to monitor base layer controllers). The monitoring features of these tools include, at least, the observation of the uptime and the saturation of manipulated variables and controlled variables. Although the uptime is the most constitutive performance factor of an installed APC application, the expressiveness of this factor does not always represent the performance of the controller adequately. For example, if a model-based predictive controller has 10 controlled variables and six manipulated variables, the maximum performance of the controller may generally be achieved only if
the controller is on, none of the manipulated variables are saturated, all controlled variables are running at their optimal steady state, the plant is running at the desired operating point.
The first point is pretty clear, because only a running controller can push the plant into its optimal steady state. On the other hand, a saturated manipulated variable, thus a manipulated variable near its user-given constraint, usually means that the controlled variables cannot reach their optimal steady state. 29) The third point represents the achieved optimal steady state, computed by the plant optimizer, either by the linear or quadratic optimizing feature of the model-based predictive controller or by a plantwide real-time optimizer. Only if the controller can reach and has reached this optimal steady state is the the maximum benefit of the application achieved. The fourth point is not naturally clear. It is based on the fact that the controller and both the linear and the quadratic optimizers are designed only for one operating point: the desired operating point. If the plant is running at a different operating point, the computed optimal steady state might be different from the real optimal steady state, depending on the limitations of the (linear or nonlinear) plant model. The plantwide (nonlinear) real-time optimizers can usually cover a wider range of working points than the optimizer within the model-based predictive controller, which usually uses the linear controller model for the optimization.
29) This is not valid for all cases. For example, if a manipulated variable limit represents a major constraint of the plant, the controller will usually push this manipulated variable to this constraint to achieve the optimal steady state. It is also imaginable that the controlled variables can still reach their optimal steady state if only one or two manipulated variables are saturated.
593
594
14 Practical Aspects and Future Trends
Although nearly all the monitoring tools available today are able to monitor the first three points, the observation of whether the working point is optimal is not always clear and thus generally is not monitored. Thus, the APC engineer has to judge the actual working point and has to decide if a retuning, or maybe also a redesign, of the controller is necessary. Although the steady-state monitoring of an APC application is already commonly available, the future development of the monitoring tools will also take into account the dynamic part of the MPC applications, with special attention to the multivariable relations, such as desired decouplings. The development of the Control Performance Monitoring (CPM), which monitors and supervises single-loop controllers for bad performance of the loop or the actor (e.g., a valve), has resulted in some major achievements in recent years. Nevertheless, there are still some special features regarding the multivariable behavior of a model-based predictive controller that these tools are not yet able to handle. For example, imagine that a multivariable model-based predictive controller controls a binary distillation column with two tray temperatures as controlled variables and with the reflux and a furnace power as manipulated variables. A multivariable control of this column can then lead to a behavior where the tray temperatures are primarily controlled by the reflux, because the influence of the reflux on the tray temperatures is significantly faster than the influence of the furnace power. For example, if the bottom temperature has to be decreased, the controller will firstly increase the reflux much more than necessary, which will also result in a drop of the top temperature. Only after this will the controller decrease the furnace power, and also decrease the reflux. Single-loop CPM will then certify a bad controller performance for the control of the top temperature and of the bottom temperature, because both temperatures have been set up by the corresponding controllers. But in the multivariable case the performance – depending on the task – might be adequate because the model-based predictive controller wants to minimize the dynamic coupling effects of the two tray temperatures. Thus, some special algorithms for performance monitoring of multivariable controllers which can also handle such special multivariable cases are necessary.
14.5 Summary
In this chapter an overview of the current and upcoming techniques of predictive control in industrial environments has been given. The arrangement of APC applications in a common DCS structure and the typical project implementation structure have been shown. The typical features of commercial APC suites have been introduced. An outlook on future trends has also been given. The typical arrangement of APC applications in a common DCS structure is a high-level implementation, where the APC application usually runs with a long sampling time adjusting reference signals of the base layer controllers. The main task of the base layer controllers can be seen as stabilizing or linearizing single
References
loops with fast dynamics of the plant, such as flows, pressures, and temperatures. The task of an APC application is to push the plant to its optimal operating point and to keep it there. To fulfill this task, an APC application can take care of general plant limitations and constraints in a multivariable case, as well as controlling not only measurable signals (e.g., temperatures, pressures), but also unmeasurable, but computable and predictable signals (e.g., product qualities such as concentrations and cumulated tank parameters). The advantages of MPC applications include optimization of a plant in a given control range, as well as taking care of limitations and constraints with different priorities. To achieve this target, some techniques are used, such as signal scaling, handling of ill conditioning, prioritization of signals, and dealing with inner loop performance. Techniques to achieve high robustness and decoupling of multivariable processes complete the feature list. The development of APC applications includes the reduction of the effort for model building by simultaneous plant testing and identification or by model derivation based on physical models, as well as the increase of model quality by introducing nonlinear models for the online implementation of MPC. On the base level, simple MPC algorithms will take place, increasing the controller performance in the case of plants which are difficult to control. On a higher level, CPM tools will help engineers to keep the installed applications in a state of high availability and high performance.
References 1 Bauer, M. and Craig, I.K. (2008) Economic assessment of advanced process control – a survey and framework. Journal of Process Control, 18, 2–18. 2 Blevins, T.L., McMillan, G.K., Wojsznis, W.K., and Brown, M.W. (2003) Advanced Control Unleashed: Plant Performance Management for Optimum Benefit, Research Triangle Park, USA: ISA (Instrumentation Systems and Automation Society). 3 v. Brempt, W., Backx, T., Ludlage, J., v. Overschee, P., d. Moor, B., and Tousain, R. (2001) A high performance model predictive controller: application on a polyethylene gas phase reactor. Control Engineering Practice, 9, 829–835. 4 Dittmar, R. and Pfeiffer, B.M. (2004) Modellbasierte prädiktive Regelung (Model Based Predictive Control), Oldenbourg Verlag, München Wien. 5 Emerson Process Management (2005) DeltaV Predict and DeltaV PredictPro,
6 7 8
9
10
powerful practical model predictive control, Product Data Sheet. Honeywell Process Solutions (2005) Profit loop, Product Information Note. Honeywell Process Solutions (2007) Profit suite solutions, Product Brochure. Ludlage, J. and Backx, T. (1999) A New Generation Model Predictive Control Technology, Proceedings of the 5th International Seminar on Mathematical Simulation in Glass Melting, Horni Becva, Czech Republic, pp. 170–180. Müller, J. (2004) Regeln mit SIMATIC: Praxisbuch für Regelungen mit SIMATIC S7 und SIMATIC PCS7. (Controlling with SIMATIC: Practice book for SIMATIC S7 and SIMATIC PCS7 control systems), Publics Corporate Publishing, Erlangen. Qin, S.J. and Badgwell, T.A. (2003) A survey of industrial model predictive control technology. Control Engineering Practice, 11, 733–764.
595
596
14 Practical Aspects and Future Trends 11 Volk, U., Kniese, D.W., Hahn, R., Haber, R., and Schmitz, U. (2005) Optimized multivariable predictive control of an industrial distillation column considering hard and soft constraints. Control Engineering Practice, 13, 913–927.
12 Wojsznis, W., Mehta, A., Wojsznis, P., Thiele, D., and Blevins, T. (2007) Multiobjective optimization for model predictive control. ISA Transactions, 46, 351– 361.
597
Index – predictive multicontroller 374 a – predictive multimodel control 372 Advanced process control (APC) 554 – predictive multiparameter control 372 Advanced regulatory control (ARC) 554 – predictive nonlinear control 429 Application 497 – predictive on–off control 132, 481 – chemical reactor 528 – process identification 459 – control simulation 508, 539, 544 – temperature control – controller tuning 508, 544 131, 370, 375, 460, 473 – distillate concentration control 501, 508 – two-tank pilot plant 424 – flue gas oxygen concentration – two-tank plant 348 control 529 – wastewater plant 477, 488 – furnace load control 501 – wastewater quality control 477, 488 – gas heated furnace 528 – petrochemical distillation column 499 Computational effort reduction – blocking technique 176, 182–183, 580 – predictive constrained linear MIMO – coincidence points 179, 183, 580 control 498, 515, 527 – cost function 183 – pressure-compensated temperature control 501, 508, 517 Constraint/limit – pressure control 501, 508, 517, 523 – application 503, 518, 529, 541 – real-time control 511, 523, 549 – cost function extension 198 – stripping column 515 – end-point constraint 213 – temperature control 529 – feasible solution 576 – hard constraint 198, 206, 502, 575 – physical constraints 193 c – prioritization 578 Cascade control 581 – soft constraint 198, 503, 518, 575 – application 478, 505, 509 – typical constraint 194 Case study – ammonium concentration control 489 Controlled variable 4 – application 502, 529 – distillate composition control 321 – distillation column 318 – forced heating and free convective d cooling 375 Dead time (time delay) 30 – heat exchanger 131, 362 Decoupling (static) 300 – hot air blower 458 – by a postcompensator 303, 325 – injection molding machine 468 – by a precompensator 301, 323 – level control 348, 426 – by a precompensator and a – linear MIMO predictive control 321 postcompensator 304, 326 – nitrate concentration control 489 Decoupling of a MIMO process 297 – by changing the control error weighting – PFC 437 factors 315 – predictive linearized control 430 Predictive Control in Process Engineering, First Edition. Robert Haber, Ruth Bars, and Ulrich Schmitz. © 2011 WILEY-VCH Verlag GmbH & Co. KGaA. Published 2011 by WILEY-VCH Verlag GmbH & Co. KGaA.
598
Index – by control-error-dependent weighting factors 316 – by slowing the reference signal change 312 – by using a dynamic compensator 308 – using a static compensator 300, 323 Difference operator 38 Disturbance – measurable 29, 36 – unmeasurable 29, 36 Disturbance model 29, 36, 41 – application 504, 519, 533 Disturbance signal – measurable 10 – nonmeasurable 10 Disturbance variable – application 518, 530 e Economic benefit 565 – application 513, 525 f Fusion technique 355 g Gaussian validity function 356 i Impulse response/weighting function 33 l Linear MIMO predictive control – application 498, 515, 527 – controller tuning 294 – cost function 277 – polynomial form (RST) 284 – with matrix inversion (GPC) 278 Linear SISO predictive control – control function 158 – controller tuning 172 – cost function 135, 165, 205 – disturbance feed-forward 188 – disturbance/robustness filter 159 – generalized predictive control (GPC) 135 – multiparametric programming 200 – polynomial RST form 145 – quadratic programming 199 – under constraints 202, 204 – with end-point constraint 213 – with end-point weighting 216
m Manipulated variable 4 – application 502, 517, 529 – future sequence 137 Model – disturbance model 29, 36, 41 – input/output 29 – linear 29 – MIMO 252 – nonlinear 383 – nonparametric 31 – parametric 36 – process model 29 – SISO 29, 136 – state space 43 n Nonlinear predictive control 591 – based on a multicontroller 360 – based on a multimodel 359 – based on a multiparameter model 360 – based on the linearized model 422 – multidimensional iterative optimization 410 – suboptimal (constant control increments) 407 – suboptimal (constant control signal) 406 – using the one-dimensional solution 406 Nonlinear predictive equation – multimodel approach 359 – multiparameter model approach 359 Nonlinear process model – LPV model 354 – multimodel 355 – multiparameter model 358 – with direction-dependent parameters 354 – with signal-dependent parameters 354 Nonparametric model – linear SISO 31 – nonlinear SISO 384 Nonparametric model (linear SISO) 31 – finite impulse response (FIR) 32 – finite step response (FSR) 33 Nonparametric model (nonlinear SISO) – Hammerstein series 384 – Volterra series 384 o On–off control – nonpredictive with hysteresis 105, 480 – nonpredictive without hysteresis 104 – predictive 103
Index p Pairing of controlled and manipulated variables 287 – RGA method 287, 290 Parameter estimation – LS estimation 336 – of predictive equation 335 – of the process model 336 Parametric model – difference equation 37 – linear MIMO 252 – linear SISO 36 – nonlinear SISO 385–386, 388 – pulse-transfer function 37 Parametric model (linear MIMO) – CARIMA matrix fraction model 254 – CARIMA state space model 258 – CARMA matrix fraction model 252 – CARMA state space model 256 Parametric model (linear SISO) – CARIMA (ARIMAX) 51 – CARMA (ARMAX) 41, 48 – incremental 42 – state space model 43 Parametric model (nonlinear SISO) – bilinear 389 – block-orientated 386 – cascade 385 – generalized Hammerstein 387, 389 – linear-in-parameters 388 – NARMAX 390 – parametric Volterra model 389 – simple Hammerstein 385 – simple Wiener 386 PI(D) control 221 PI(D) controller – discretization of continuous form 240 – Kuhn’s T-sum rule 241 – set point weighting 242 – Åström and Hägglund’s tuning rules 242 Prediction – forced response 12, 59, 73, 81, 97, 100, 136, 274 – free response 12, 59, 73, 81, 97, 100, 136, 274 – of disturbance 57, 423 Predictive control – cascade control 581 – controller tuning 17, 151, 566 – cost function 6, 13, 506, 570, 572 – future trends 585 – GPC 138, 278
– implementation 559, 561, 566 – long-range optimal 11 – of linear MIMO processes 251 – of linear SISO processes 135 – of nonlinear SISO processes 406 – one-step-ahead optimal 11 – PFC 437 – practical aspects 553 Predictive equation – based on MIMO 271 – based on the pulse-transfer function 64 – in the case of autoregressive additive noise 74 – in the case of nonautoregressive additive noise 81 – in the presence of measurable disturbance 78 – incremental 397, 405 – nonincremental 392 – of Hammerstein series 392 – of the first-order model 65 – of the generalized Hammerstein model 394, 401 – of the Hammerstein series 398 – of the impulse response model 56 – of the parametric Volterra model 396, 403 – of the second-order model 68 – of the state space model 93 – of the step response model 61 – of the Volterra series 400 – of Volterra series 393 Predictive equation estimation – based on one step ahead 337 – long-range optimal (LRPI) 339 – multistep ahead (MSPI) 344 Predictive functional control (PFC) – constraint handling 454 – of a first-order linear process 443 – of a nonlinear process with signal-dependent parameters 457 – of a process with dead time 449 – of a second-order linear process 446 – of the LPV model 457 – reference trajectory 438 – with disturbance feed-forward 451 Predictive on–off control – gap control 118, 126, 481–482 – set point control 107, 473 – start-up control 112, 473, 475 Predictive on–off control algorithm – limit-violation-time-point-dependent cost function 121
599
600
Index – using genetic optimization 110, 118 – using quasi continuous-time optimization 119 – using the online start-up strategy 124 – using the selection strategy 108 Predictive PI control 222 – long-range horizon algorithm 224 – of a first-order process with dead time 225 – one-step-ahead algorithm 223 Predictive PI(D) control – equivalance with GPC 234 – robust Smith predictor 246 – robustifying filter 245 – set point weighting 243 – structure 222 – tuning 240 Predictive PID control 221, 228 – long-range horizon algorithm 230 – of a second-order process with dead time 231 – one-step-ahead extended horizon algorithm 229 Predictive SISO linear control – cost function 137 – using matrix inversion (GPC) 138 Predictive transformation – by repeated substitution 65 – by solving the Diophantine equation 70, 260, 394 – with filtering of the input and output signals 84 – with the matrix calculation method 88 Process identification 336, 562, 585 – application 504, 531 Process model – application 504, 519, 530
r Receding horizon strategy 10 Reference signal 4, 578 – future values 3 – reference trajectory 579 – set point 578 – set range 578 – set range funnel 580 s Sampling time 30 Scaling of variables 290, 293, 572 Shift operator 32 State space model – linear MIMO 255 – linear SISO 43 State space model (linear SISO) – incremental 43–44 – minimal order 44 – nonincremental 43 – nonminimal order 48 State variable 43 Step response 35 t Three-level control – nonpredictive 489 – predictive 489 Time delay (dead time) 30 w Weighting function/impulse response 33 z Zero-order holding 30