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 ˆ ˆ . ˆ .. ˆ ˆ ˆ ˆ ˆ 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 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 ˆ ˆ 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 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