Control of Dead-time Processes (Advanced Textbooks in Control and Signal Processing) [1st Edition.] 1846288282, 9781846288289, 9781846288296

This text introduces the fundamental techniques for controlling dead-time processes from simple monovariable to complex

437 48 4MB

English Pages 488 [474] Year 2007

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Control of Dead-time Processes (Advanced Textbooks in Control and Signal Processing) [1st Edition.]
 1846288282, 9781846288289, 9781846288296

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Advanced Textbooks in Control and Signal Processing

Series Editors Professor Michael J. Grimble, Professor of Industrial Systems and Director Professor Michael A. Johnson, Professor Emeritus of Control Systems and Deputy Director Industrial Control Centre, Department of Electronic and Electrical Engineering, University of Strathclyde, Graham Hills Building, 50 George Street, Glasgow G1 1QE, UK

Other titles published in this series: Genetic Algorithms K.F. Man, K.S. Tang and S. Kwong Neural Networks for Modelling and Control of Dynamic Systems M. Nørgaard, O. Ravn, L.K. Hansen and N.K. Poulsen Fault Detection and Diagnosis in Industrial Systems L.H. Chiang, E.L. Russell and R.D. Braatz Soft Computing L. Fortuna, G. Rizzotto, M. Lavorgna, G. Nunnari, M.G. Xibilia and R. Caponetto Statistical Signal Processing T. Chonavel Discrete-time Stochastic Processes (2nd Edition) T. Söderström Parallel Computing for Real-time Signal Processing and Control M.O. Tokhi, M.A. Hossain and M.H. Shaheed Multivariable Control Systems P. Albertos and A. Sala Control Systems with Input and Output Constraints A.H. Glattfelder and W. Schaufelberger Analysis and Control of Non-linear Process Systems K. Hangos, J. Bokor and G. Szederkényi Model Predictive Control (2nd Edition) E.F. Camacho and C. Bordons Digital Self-tuning Controllers V. Bobál, J. Böhm, J. Fessl and J. Macháˇcek Principles of Adaptive Filters and Self-learning Systems A. Zaknich Control of Robot Manipulators in Joint Space R. Kelly, V. Santibáñez and A. Loría Robust Control Design with MATLAB® D.-W. Gu, P.Hr. Petkov and M.M. Konstantinov Modeling and Control of Discrete-event Dynamical Systems B. Hrùz and M.C. Zhou Publication due September 2007 Robotics B. Siciliano and L. Sciavicco Publication due October 2007

J.E. Normey-Rico and E.F. Camacho

Control of Dead-time Processes

123

J.E. Normey-Rico, Dr. Eng. Departamento de Automação e Sistemas Universidade Federal de Santa Catarina 88040-900 Florianópolis-SC Brazil

E.F. Camacho, Dr. Eng. Departamento de Ingeniería de Sistemas y Automática Universidad de Sevilla Camino de los Descubrimientos, s/n 41092 Sevilla Spain

British Library Cataloguing in Publication Data Normey-Rico, J. E. Control of dead-time processes. - (Advanced textbooks in control and signal processing) 1. Automatic control I. Title II. Camacho, E. F. 629.8 ISBN-13: 9781846288289 Library of Congress Control Number: 2007926808 Advanced Textbooks in Control and Signal Processing series ISSN 1439-2232 ISBN 978-1-84628-828-9 e-ISBN 978-1-84628-829-6 Printed on acid-free paper © Springer-Verlag London Limited 2007 MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc., 3 Apple Hill Drive, Natick, MA 01760-2098, USA. http://www.mathworks.com Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms of licences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers. The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant laws and regulations and therefore free for general use. The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made. 987654321 Springer Science+Business Media springer.com

To Ana, Luiza and Eugˆenio

To Janet

Series Editors’ Foreword

The topics of control engineering and signal processing continue to flourish and develop. In common with general scientific investigation, new ideas, concepts and interpretations emerge quite spontaneously and these are then discussed, used, discarded or subsumed into the prevailing subject paradigm. Sometimes these innovative concepts coalesce into a new sub-discipline within the broad subject tapestry of control and signal processing. This preliminary battle between old and new usually takes place at conferences, through the Internet and in the journals of the discipline. After a little more maturity has been acquired by the new concepts then archival publication as a scientific or engineering monograph may occur. A new concept in control and signal processing is known to have arrived when sufficient material has evolved for the topic to be taught as a specialised tutorial workshop or as a course to undergraduate, graduate or industrial engineers. Advanced Textbooks in Control and Signal Processing are designed as a vehicle for the systematic presentation of course material for both popular and innovative topics in the discipline. It is hoped that prospective authors will welcome the opportunity to publish a structured and systematic presentation of some of the newer emerging control and signal processing technologies in the textbook series. Dead time is often present in control systems as computational or informational delay but in most cases it is very small and is neglected. The physical process under control can also contain dead time and when this is significant then the control engineer will find that it may be harder to stabilise the closed-loop system, that robustness margins are reduced and that the time-domain performance deteriorates too. Dead time is widely found in the process industries when transporting materials or energy. It is in this application domain that first-order-plus-dead-time (FOPDT) and secondorder-plus-dead-time (SOPDT) models are commonly used to describe scalar (SISO) and multivariable (MIMO) systems in the extensive published literature.

viii

Series Editors’ Foreword

The problem of control design for processes with dead time is similarly long-standing. Solutions to this often begin from a FOPDT or SOPDT model and many industrial PID control design methods try to accommodate the presence of dead time. The advent of the Smith Predictor (1958) provided the industrial control engineer with another tool to tackle the control of processes where the presence of dead time was impairing closed-loop performance. The idea of trying to predict future process outputs and incorporate these predictions into the control system was given concrete form in 1978 with the publication of Richalet’s Model Predictive Heuristic Control algorithm. The key attraction of this idea was the potential ability to accommodate and manage control within the process constraints. The Model Predictive Control paradigm was further elaborated by techniques like Generalised Predictive Control (1987) and Dynamic Matrix Control (1988); although it is less remarked upon, these methods naturally and straightforwardly incorporated dead-time representation into their process models and consequently, deadtime compensation into the resulting control algorithm. The Model Predictive Control paradigm has also generated an extensive book, journal and conference paper literature. Thus, there are the industrial dead-time control tools in PID control, the Smith Predictor and Model Predictive Control all of which have an extensive literature and industrial knowledge base. It therefore seems very timely to have a textbook that: • • • • •

revises the physical origins of dead time in industrial processes; summarises the fundamentals of tools for dead-time process control; presents these tools in a common notational framework; explores the interplay between the various control methods; and exploits the connections revealed to produce enhanced or improved control design techniques for the control of dead-time processes.

This entry to the Advanced Textbooks in Control and Signal Processing series, written by Julio Normey-Rico and Eduardo Camacho, treats most of the items in this agenda and has every prospect of becoming a standard textbook for the modern design of control algorithms for processes with dead time. The book can usefully be considered to have a tripartite structure: The first group of chapters − 1 to 4 − covers an introduction, review of the physical origins of dead time in processes, the identification of process models for systems with dead time and finally the design of PID controllers for dead-time processes. These chapters provide a link with classical industrial control approaches. The book then quite naturally leads into a group of chapters − 5 to 8 − constructed around various aspects of the Smith Predictor. Following the in-depth analysis of the Smith Predictor presented in Chapter 5, subsequent chapters examine Smith Predictor design for stable, unstable and discrete systems. It is from the latter that the dead-time compensator (DTC) idea emerges.

Series Editors’ Foreword

ix

The third and final group of chapters − 9 to 14 − tackles the Model Predictive Control approach to dead-time compensation. These chapters range from the fundamentals of GPC and DMC in Chapter 9, through to approaches to multivariable systems in Chapters 11 and 12, whilst Chapters 13 and 14 introduce nonlinear systems applications and the authors’ thoughts on “prediction for control”. The industrial control engineer or the applications-oriented control academic who is constructing a collection of textbooks on applicable advanced control methods will find this new book a very useful and insightful addition to their library. The volume makes an ideal companion to the successful series volume Model Predictive Control by E.F. Camacho and C. Bordons (Springer, 2004 (second edition)) and is also usefully complemented by the series textbooks: Control Systems with Input and Output Constraints by A.H. Glattfelder and W. Schaufelberger (Springer, 2003), and Receding Horizon Control by W.H. Kwon and S. Han (Springer, 2005). Control of Dead-time Processes is a very welcome addition to the Advanced Textbooks in Control and Signal Processing series.

Industrial Control Centre Glasgow, Scotland, U.K. December 2006

M.J. Grimble M.A. Johnson

Preface

Dead times, or time delays, are found in many processes in industry. In fact, most tuning methods for PID controllers used in industry consider dead times as an integral part of process dynamics models. Dead times are mainly caused by the time required to transport mass, energy or information, but they can also be caused by processing time or by the accumulation of time lags in a number of simple dynamic systems connected in series. For processes exhibiting dead time, every action executed in the manipulated variable of the process will only affect the controlled variable after the process dead time. Dead times produce a decrease in the system phase and also give rise to a non-rational transfer function of the system, making them more difficult to analyse and control. Because of these characteristics dead-time control problems have attracted the attention of engineers and researchers who have developed a special type of controller: dead-time compensator (DTC), which incorporates a prediction of the process output. The first DTC was the Smith predictor, developed in 1957 and since then, important efforts of research have been carried out in the field. In spite of these efforts, several problems still remain open and every year many papers are written that tackle different aspects of dead-time process control. Predictions are also used by model predictive controllers (MPC), which can also be used to deal with processes exhibiting dead time. Recent reports indicate that dead-time compensators and model predictive controllers are two of the most popular advanced control technologies used in industry. This book presents the main techniques related to this area of control engineering. The problem of controlling dead-time processes is studied using classical PID controllers, dead-time compensators and model predictive control techniques. Although these latter two approaches were developed with different objectives in mind, the resulting controller is based on a predictor in both cases. The characteristics of the predictor structure will define the performance and robustness indices of the closed loop. This book is oriented

xii

Preface

toward analysing these controllers as well as to studying the effects of the predictor on the closed loop. The major goal of this book is to show how the results of the two approaches mentioned above can be used and combined to obtain more efficient and robust controllers for processes exhibiting dead times. A dead-time compensating interpretation of model predictive controllers is used to understand the effect of dead time on MPC. This approach allows the use of specific DTC robust tuning methodologies for improving the performance of MPC when controlling dead-time systems. The book starts with the more simple continuous time solutions in the single input single output case and continues towards more complex ones such as MPC strategies in the discrete and multivariable domain. A basic knowledge of linear systems and classical control design is necessary to follow the first chapters, while basic knowledge of sample data control theory is needed for the second part of the book. All the control strategies presented are illustrated by simulation or in pilot plants and real industrial applications. The book contains research results of the authors and other researchers as well as teaching material used by the authors in their control courses. The book can be used to introduce control of dead-time processes as part of an advanced control course for undergraduates. On the whole, it can be used for a postgraduate course on control of processes exhibiting dead time. The book has a practical orientation and is also suitable for process engineers. The book is accompanied by a website (www.das.ufsc.br/∼julio/deadtimebook and www.esi.us.es/eduardo/deadtimebook), which contains lecture slides, worked examples, MATLAB codes and related material such as papers by the authors, links and so on.

Florianopolis, ´ Seville, 12-2006

Julio Elias Normey-Rico Eduardo F. Camacho

Acknowledgements

The authors would like to thank a number of people who in various ways have made this book possible. Firstly, we thank Janet Buckley, who corrected the English. Our thanks also go to Amparo Nu´ nez, ˜ Carlos Bordons, Daniel Limon, ´ Daniel R. Ram´ırez, Teodoro Alamo, Fernando Dorado, Bismark Torrico, Marcus Americano da Costa, Manuel Gil Ortega, Manuel Ruiz Arahal, Augusto Bruciapaglia, Mirko Fiacchini and Guilherme Raffo, for their help in preparing some examples and revising the manuscript. Our thanks also go to our colleagues and friends from our departments. Part of the material included in the book is the result of research work funded by CAPES-Brazil and CYCIT-Spain. We gratefully acknowledge these institutions for their support. Finally, both authors thank their families for their support, patience and understanding of family time lost during the writing of the book.

Contents

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxiii 1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Some Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Difficulties in Controlling Dead-time Systems . . . . . . . . . . . . . . . 1.3 Historical Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Outline of Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 1 3 4 7

2

Dead-time Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Dead-time Systems: Some Case Studies . . . . . . . . . . . . . . . . . . . . . 2.1.1 A Heated Tank with a Long Pipe . . . . . . . . . . . . . . . . . . . . 2.1.2 Variable Dead Time: Temperature Control at a Solar Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.3 High-order Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.4 Control Level in an Evaporator Section of a Sugar Factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.5 Traffic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Dynamic Behaviour of Dead-time Systems . . . . . . . . . . . . . . . . . . 2.2.1 Representation of Dead Time in the Frequency Domain 2.2.2 Polynomial Approximations of Dead Time . . . . . . . . . . . 2.2.3 Discrete Representation of Dead Time . . . . . . . . . . . . . . . 2.2.4 State-space Representation of Dead-time Systems . . . . . 2.3 Simple Models for Typical Dead-time Systems . . . . . . . . . . . . . . 2.3.1 Linear Models Close to an Operating Point . . . . . . . . . . . 2.4 Analysis of Modelling Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Modelling Error Representation . . . . . . . . . . . . . . . . . . . . . 2.4.2 Modelling Errors in Dead-time Processes . . . . . . . . . . . . . 2.5 Dead-time Uncertainties and Delay Margin . . . . . . . . . . . . . . . . . 2.6 Control Problems Associated with Dead Times . . . . . . . . . . . . . . 2.7 A Predictor-based Solution: The Smith Predictor . . . . . . . . . . . . 2.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9 9 9 11 12 16 17 19 19 21 25 28 31 32 39 39 41 45 46 48 50

xvi

Contents

2.9 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51 52

3

Identification of Dead-time Processes . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Step Impulse Response-based Methods . . . . . . . . . . . . . . . . . . . . . 3.2.1 Graphical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Two-point and Three-point Methods . . . . . . . . . . . . . . . . . 3.2.3 Area-based Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.4 Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Least Squares and Related Methods . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 The Least Squares Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Choice of Input Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Recursive Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 Dead-time Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.5 Effect of Random Disturbances . . . . . . . . . . . . . . . . . . . . . . 3.3.6 Practical Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Varying Dead Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55 55 56 57 59 63 66 67 68 70 71 73 77 80 81 82 83 83

4

PID Control of Dead-time Processes . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.2 Can PID Be Used to Control Simple Dead-time Processes? . . . 86 4.3 PID for Dead-time Processes: The Prediction Approach . . . . . . 91 4.3.1 The Equivalent Controller of the SP . . . . . . . . . . . . . . . . . . 91 4.3.2 PID Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 4.3.3 Internal Model Control Interpretation . . . . . . . . . . . . . . . . 93 4.3.4 Pole Placement Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.3.5 Pole-zero Cancellation Analysis . . . . . . . . . . . . . . . . . . . . . 95 4.4 Robust PID Tuning for Dead-time Processes . . . . . . . . . . . . . . . . 97 4.4.1 Tuning for the Dominant Dead-time Case . . . . . . . . . . . . 98 4.4.2 Tuning for Standard and Parallel PIDs . . . . . . . . . . . . . . . 100 4.4.3 Two-degree-of-freedom PID . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.4.4 Integrative Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.4.5 Lag-dominant Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 4.4.6 Robustness Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.4.7 Simple Tuning Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4.4.8 Achievable Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.5 Analysis of Other Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 4.5.1 The Ziegler−Nichols Tuning Method . . . . . . . . . . . . . . . . 117 4.5.2 The Cohen−Coon Tuning Method . . . . . . . . . . . . . . . . . . . 118 4.5.3 The S-IMC Tuning Method . . . . . . . . . . . . . . . . . . . . . . . . . . 119 4.6 Comparative Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

Contents

4.7 Case Study: Temperature Control in a Ceramic Dryer . . . . . . . . 4.7.1 Process Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.2 Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Case Study: Mobile Robot Path Tracking . . . . . . . . . . . . . . . . . . . . 4.8.1 Synchro-Drive Steering Angle Model . . . . . . . . . . . . . . . . 4.8.2 Path Tracking with the PID Controller . . . . . . . . . . . . . . . 4.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xvii

122 122 123 125 126 127 128 129 129

5

The Smith Predictor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.1 The Smith Predictor Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.1.1 Closed-loop Properties of the SP . . . . . . . . . . . . . . . . . . . . . 132 5.1.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.2 Advantages and Drawbacks of the Smith Predictor . . . . . . . . . . 137 5.2.1 Reference Tracking and Disturbance Rejection . . . . . . . . 137 5.2.2 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.2.3 The Smith Predictor for General Unstable Plants . . . . . . 145 5.2.4 The Smith Predictor for Integrative Processes . . . . . . . . . 146 5.3 The Two-degree-of-freedom SP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 5.3.1 General Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 5.3.2 Tuning of the 2DOF-SP for the FOPDT Model . . . . . . . . 154 5.3.3 Predictive PI Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 5.3.4 Robust Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 5.3.5 Case Study: Air Flow Control System . . . . . . . . . . . . . . . . 157 5.4 When to Use a DTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 5.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 5.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

6

Dead-time Compensators for Stable Plants . . . . . . . . . . . . . . . . . . . . 165 6.1 A Simple Robust Solution: The Filtered SP . . . . . . . . . . . . . . . . . . 165 6.1.1 Case Study: Temperature Control at a Pilot Plant . . . . . . 169 6.2 The SP with a Modified Fast Model . . . . . . . . . . . . . . . . . . . . . . . . 172 6.3 Improving the Disturbance Rejection Capabilities . . . . . . . . . . . 177 6.3.1 The DTC With a Feedforward Action . . . . . . . . . . . . . . . . 177 6.3.2 The Disturbance Observer DTC . . . . . . . . . . . . . . . . . . . . . 181 6.4 IMC Interpretation of the DTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

xviii

Contents

7

Dead-time Compensators for Unstable Plants . . . . . . . . . . . . . . . . . . 191 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 7.2 DTC for Unstable Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 7.3 Using a Modified Fast Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 7.3.1 The Modified Fast Model for the Integrative Case . . . . . 194 7.3.2 The Modified Fast Model for the First-order Unstable Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 7.3.3 Implementation Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 7.3.4 Simple Tuning for the IPDT Model . . . . . . . . . . . . . . . . . . 197 7.3.5 Robust Tuning for the IPDT Model . . . . . . . . . . . . . . . . . . 198 7.4 The Filtered Smith Predictor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 7.4.1 Tuning for the Integrative Case . . . . . . . . . . . . . . . . . . . . . . 204 7.4.2 Tuning for the First-order Unstable Plant . . . . . . . . . . . . . 206 7.5 Rejecting Disturbances with Feedforward Action . . . . . . . . . . . 206 7.5.1 The Disturbance Observer Approach . . . . . . . . . . . . . . . . 207 7.5.2 Special Solutions for Integrative Processes . . . . . . . . . . . 213 7.6 Achievable Robustness for Unstable Plants . . . . . . . . . . . . . . . . . 221 7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 7.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 7.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8

Discrete Dead-time Compensators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 8.2 Discrete and Sampled-data Systems . . . . . . . . . . . . . . . . . . . . . . . . 230 8.2.1 Basic Concepts and Notations . . . . . . . . . . . . . . . . . . . . . . . 230 8.2.2 General Design Considerations . . . . . . . . . . . . . . . . . . . . . . 232 8.3 Direct Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 8.3.1 Direct Synthesis for Dead-time Processes and IMC . . . . 234 8.3.2 Dead-beat Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 8.3.3 The Dahlin Algorithm: The Lambda Controller . . . . . . . 236 8.4 DTC for Discrete Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 8.4.1 Closed-loop Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 8.4.2 A Particular Design Case: The Discrete DO-DTC . . . . . . 238 8.4.3 Case Study: Supply-chain Management . . . . . . . . . . . . . . 241 8.5 DTC for Sampled-data Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 8.5.1 Discretisation of the Continuous DTC . . . . . . . . . . . . . . . . 244 8.5.2 Direct Discrete Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 8.5.3 Robustness Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 8.6 Sampling Time Choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 8.6.1 Sampling Time Choice and Robustness . . . . . . . . . . . . . . . 259 8.6.2 A Procedure for Sampling Time Choice . . . . . . . . . . . . . . 259 8.7 Implementation Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 8.8 Case Study: Temperature Control . . . . . . . . . . . . . . . . . . . . . . . . . . 265 8.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

Contents

xix

8.10 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 8.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 9

Model Predictive Control of Dead-time Processes . . . . . . . . . . . . . . 271 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 9.2 MPC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 9.2.1 MPC Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 9.2.2 MPC Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 9.3 GPC for Dead-time Processes: A DTC Approach . . . . . . . . . . . . 281 9.3.1 Model Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 9.3.2 The Case with T = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 9.3.3 The Case with T = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 9.3.4 GPC for SOPDT models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 9.4 Classical Representation of DMC . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 9.4.1 Computing the Predictions . . . . . . . . . . . . . . . . . . . . . . . . . . 298 9.4.2 Minimisation of J . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.4.3 Prediction at t + d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.5 MPC and Dead Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 9.6 Dead-time Problems in MPC Algorithms . . . . . . . . . . . . . . . . . . . 304 9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 9.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 9.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

10 Robust Predictive Control of Dead-time Processes . . . . . . . . . . . . . . 309 10.1 Robustness Analysis of the Basic GPC . . . . . . . . . . . . . . . . . . . . . . 309 10.1.1 Analysis of Fr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 10.1.2 Comparative Analysis Between GPC and SP . . . . . . . . . . 314 10.2 Improving Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 10.2.1 GPC with the T -polynomial . . . . . . . . . . . . . . . . . . . . . . . . . 317 10.2.2 GPC with Q-parametrisation . . . . . . . . . . . . . . . . . . . . . . . . 319 10.2.3 Comparing GPC and DTC Robustness . . . . . . . . . . . . . . . 322 10.2.4 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 10.3 A DTC-based GPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 10.3.1 The Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 10.3.2 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 10.3.3 The Effect of Controller Parameters . . . . . . . . . . . . . . . . . . 329 10.4 Case Study: A Solar-powered Air Conditioning Plant . . . . . . . . 332 10.4.1 Plant Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 10.4.2 Control Strategy and Model Identification . . . . . . . . . . . . 333 10.4.3 SPGPC Tuning and Results . . . . . . . . . . . . . . . . . . . . . . . . . . 336 10.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 10.6 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 10.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

xx

Contents

11 Multivariable Dead-time Compensation . . . . . . . . . . . . . . . . . . . . . . 343 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 11.2 Basic Concepts and Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 11.3 Closed-loop MIMO Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . 345 11.4 Multivariable Dead-time Compensators . . . . . . . . . . . . . . . . . . . . 348 11.4.1 The Single Dead-time Case . . . . . . . . . . . . . . . . . . . . . . . . . . 348 11.4.2 Multiple Dead-time Case: The Simplest Solution . . . . . . 351 11.4.3 Multiple Dead-time Case: An Improved Fast Model . . . 354 11.4.4 The General Multiple Dead-time Case . . . . . . . . . . . . . . . . 358 11.4.5 Summary of the Design Procedure . . . . . . . . . . . . . . . . . . . 363 11.5 Analysis of GMDC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 364 11.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 11.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 11.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 12 Robust MPC for MIMO Dead-time Processes . . . . . . . . . . . . . . . . . . 375 12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 12.2 The MIMO Discrete Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 12.3 DTC Interpretation of the MIMO-GPC . . . . . . . . . . . . . . . . . . . . . . 379 12.4 The MIMO-DTC-GPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 12.5 Robustness Analysis of MIMO Controllers . . . . . . . . . . . . . . . . . . 388 12.5.1 MIMO Uncertainty Representation . . . . . . . . . . . . . . . . . . 388 12.5.2 MIMO Robustness Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 392 12.5.3 MPC Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 12.5.4 Improving Robustness of the MIMO-DTC-GPC . . . . . . . 395 12.6 Implementation Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 12.7 Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 12.7.1 Heavy Oil Fractionator Control . . . . . . . . . . . . . . . . . . . . . . 398 12.7.2 Mobile Robot Path Tracking . . . . . . . . . . . . . . . . . . . . . . . . . 401 12.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 12.9 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 12.10Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 13 Control of Nonlinear Dead-time Processes . . . . . . . . . . . . . . . . . . . . 409 13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 13.2 Constraints in Process Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 13.3 DTC for Constrained Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 13.3.1 MPC and Constrained Dead-time Processes . . . . . . . . . . 413 13.4 Nonlinear Processes and Dead-time . . . . . . . . . . . . . . . . . . . . . . . . 417 13.4.1 Nonlinear Process Models . . . . . . . . . . . . . . . . . . . . . . . . . . 417 13.5 The DTC Algorithm and Nonlinear Processes . . . . . . . . . . . . . . . 420 13.6 Nonlinear MPC and Dead-time Processes . . . . . . . . . . . . . . . . . . . 421 13.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 13.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 13.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426

Contents

xxi

14 Prediction for Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 14.2 Optimal Predictors: Closed-loop Analysis . . . . . . . . . . . . . . . . . . . 430 14.3 Integrating Predictions and Control . . . . . . . . . . . . . . . . . . . . . . . . 433 14.3.1 A Classical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 14.3.2 A Quasi-optimal Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 14.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 14.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 14.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 A

Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 A.1 Derivation of the Predictions in GPC . . . . . . . . . . . . . . . . . . . . . . . 445 A.2 Deriving the GPC Equivalent Controller . . . . . . . . . . . . . . . . . . . . 446 A.3 Derivation of the Predictions in DMC . . . . . . . . . . . . . . . . . . . . . . 448 A.4 The MIMO-GPC Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

Glossary

Notation A(·) boldface upper case letters denote matrices A(·) italic and upper case letters denote polynomials b boldface lower letters indicate vectors Symbols t

time instant (expressed in units of time or number of sampling times) s complex variable used in Laplace transform backward shift operator z −1 z forward shift operator and complex variable used in Ztransform mij element ij of matrix M vi ith-element of vector v (·)T transpose of (·) diag(x1 , · · · , xn ) diagonal matrix with diagonal elements equal to x1 , . . . , xn |(·)| absolute value of (·) v2Q vT Qv l norm of v vl v∞ infinity norm of v I identity matrix of appropriate dimensions ˆ· expected value xˆ(t + j|t) expected value of x(t + j) with available information at instant t △ = 1 − z −1 increment operator det(M) determinant of matrix M min J(x) the minimum value of J(x) for all values of x ∈ X x∈X

xxiv

Glossary

Model Parameters and Variables u(t) input variables at instant t y(t) output variables at instant t x(t) state variables at instant t q(t) disturbance variables at instant t yp (t) output variable of the predictor structure at instant t d dead time of the process expressed in sampling time units L dead time of the process expressed in time units Acronyms 2DOF Two Degrees of Freedom ARIMA Auto-Regressive Integrated Moving Average CARIMA Controlled Auto-Regressive Integrated Moving Average CRHPC Constrained Receding Horizon Predictive Control DMC Dynamic Matrix Control DO-DTC Disturbance Observer Dead-time Compensator DTC Dead-time Compensator DTC-GPC Dead-time Compensator Generalized Predictive Controller DTC-VPC Dead-time Compensator Volterra Predictive Controller EPSAC Extended Prediction Self-Adaptive Control FIR Finite Impulse Response FOPDT First-order Plus Dead Time FSP Filtered Smith Predictor GMDC Generalized Multi-dead-time Compensator GMVC Generalized Minimum Variance Controller GPC Generalized Predictive Control IMC Internal Model Control IPDT Integrative Plus Dead Time

Glossary

LQG Linear Quadratic Gaussian LSE Least Squares Estimator LTR Loop Transfer Recovery MAC Model Algorithmic Control MIMO Multi-input Multi-output MPC Model Predictive Controller NMPC Nonlinear Model Predictive Controller MPC Model Predictive Control OP Optimal Predictor PI Proportional-Integrative Controller PD Proportional-Derivative Controller PID Proportional-Integrative-Derivative Controller RLSE Recursive Least squares Estimator SISO Single-input Single-output SOPDT Second-order Plus Dead Time SOPIDT Second-order Integrative Plus Dead Time SP Smith Predictor V-MPC Volterra Model Predictive Controller

xxv

1 Introduction

Many processes in industry, as well as in other areas, exhibit dead times in their dynamic behaviour. In fact, most of the tuning methods for PID controllers used in industry consider dead times as an integral part of process dynamics models. Dead times are mainly caused by information, energy or mass transportation phenomena, but they can also be caused by processing time or by the accumulation of time lags in a number of simple dynamic systems connected in series. For processes exhibiting dead time, every action executed in the manipulated variable of the process will only affect the controlled variable after the process dead time. Because of this, analysing and designing controllers for dead-time systems is more difficult.

1.1 Some Examples Dead times are present almost everywhere. Consider, for example, the central heating system of a building. The boiler is usually located in the basement and linked to all rooms by pipes that transport hot water. When the gas valve position is increased, the temperature of the water inside the boiler starts to rise; however, it is necessary to wait a certain amount of time for this heated water to reach the rooms. This dead time is due to the time taken for the hot water to be transported from the central heater to the rooms and depends on the distance and the flow values. Another introductory example of dead time being an important part of the dynamics of a process is the case of a manufacturing supply chain. In such a process, the stock level of the supply chain depends on the factory starts and the demand. The control problem is to maintain the stock level within certain pre-specified values and, at the same time, to provide smooth operation; in other words, rapid changes in the stock and factory starts are undesirable. The dead time here has an important influence and is caused by the time needed by the product orders to be processed and delivered.

2

1 Introduction

Dead times are also inevitable in communication systems. An example of this is the remote control of vehicles, such as a the Lunokhod 1 lunar robot. Lunokhod 1 was designed to operate for 90 days while being guided in realtime by a five person team at the Deep Space Center near Moscow, Russia, [43]. It was the first remote-controlled roving robot on the Moon, brought down on the moon by the Soviet Luna 17 spacecraft on 17 November 1970. Lunokhod 1 toured the lunar Mare Imbrium (Sea of Rains) for 11 months and was one of the greatest successes of the Soviet lunar exploration programme [73]. When it was necessary to transmit instructions from the earth platform to the mobile robot a dead time composed of the time taken by the signal to travel from the earth to the moon and vice versa had to be taken into account in the communications system. Here, the dead time depends on the velocity of the signal and the distance between the earth and the moon, as shown in Fig. 1.1. moon

signal

earth

signal

Fig. 1.1. Scheme of the communication system

Another simple and common example of dead-time systems can be found in traffic systems. Consider a queue of cars at a traffic light. Movement is started by the first car in the queue after the light changes to green. Suppose that the driver of the first car presses the accelerator as soon as he (she) sees the light turning green. If we neglect the driver reaction time, the speed of the first car, which can be represented by a first-order model, will increase as the step response of a first-order system. Consider that the following car tries to maintain the same speed as the first one and accelerates proportionally to the speed difference between the cars. This chain-reaction process continues through to the last car in the queue, which will start moving after a perceivable dead time. In this case, the dead time depends on the number of cars in the queue. In fact, this is an apparent dead time caused by the accumulative effect of time lags of several dynamic systems. Dead times are also an important part of the dynamics of many processes in the chemical industry, where analysers that need a certain amount of time to process an analysis are used as part of the control loop. This is the case, for instance, in reactors where the outlet concentration of product has to be controlled and analysers are used to obtain a measurement of the desired process variable.

1.2 Difficulties in Controlling Dead-time Systems

3

1.2 Difficulties in Controlling Dead-time Systems Processes with significant dead times are difficult to control using standard feedback controllers mainly because of the following: (a) the effect of the disturbances is not felt until a considerable time has elapsed, (b) the effect of the control action takes some time to be felt in the controlled variable and (c) the control action that is applied based on the actual error tries to correct a situation that originated some time before. These difficulties can also be explained in the frequency domain: The dead time introduces an extra decrease in the systems phase, which may cause instability. A simple example illustrates these difficulties. Consider the central heater with a long dead time previously described. Figure 1.2 shows typical behaviour of a system of this type, where T is the temperature measured by a sensor located in the room and V represents the gas valve position in the central heater.

10

T(%) and V(%)

8

6

4

2

0 0

output control 2

4

6 time

8

10

12

Fig. 1.2. Step response of a dead-time system. Increments in the temperature and the valve position of the simulated process

A proportional + integral (PI) controller can be used to obtain an off-set free closed-loop system. Figure 1.3 shows the closed-loop behaviour of the system when a change of 1% is introduced at the set-point. A small integral action and controller gain are necessary to obtain nonoscillatory behaviour in this control system (the details of the design of the PI controller are given in Example 4.1). Note that the settling time in this case is much greater than in the open-loop one. This is the price to be paid for a zero steady-state error and a nonoscillatory closed-loop response. If the

4

1 Introduction

Tr(%) and T(%)

1 0.8 0.6 0.4 open−loop closed−loop set−point

0.2 0 0

2

4

6 time

8

10

2

4

6 time

8

10

12

1

V(%)

0.8 0.6 0.4 0.2 control

0 0

12

Fig. 1.3. Closed-loop temperature response and control action for the PI controller, reference and open-loop response

gain of the controller is increased to obtain a faster closed-loop response, the obtained behaviour is very oscillatory, as can be seen in Fig. 1.4. Dead time has two important effects on the closed-loop system. The first one is the physical constraint that does not allow the temperature to react until L periods of time after the change in the valve position. Nothing can be done about this. The second effect is the deterioration of the closed-loop transient after the dead time. Some improvements can be made here. In fact, there has been a significant quantity of research over the last 50 years oriented at controlling dead-time systems.

1.3 Historical Perspective Many processes in industry are controlled by the proportional + integral + derivative (PID) controllers. When the process exhibits a dead time, the tuning of the PID is difficult and the performance of the closed-loop limited. Because of this, many efforts have been dedicated to the study and derivation of better tuning rules for PID controllers when controlling processes with dead time. The most popular tuning rules for processes with small dead times were proposed by Ziegler and Nichols [141]. Later, several authors proposed new tuning rules to be used with stable or unstable processes with a

1.3 Historical Perspective

5

Tr(%) and T(%)

2 1.5 1 open−loop closed−loop set−point

0.5 0 0

5

10

15 time

20

25

5

10

15 time

20

25

30

2

V(%)

1.5 1 0.5 0 0

control 30

Fig. 1.4. Closed-loop temperature response and control action for the PI controller (solid lines), reference (dashed-dotted lines) and open-loop response (dashed lines)

dead time. See the book of Astrom ¨ and H¨agglund for an excellent presentation and review of some of these methods [4]. In general, for processes that can be modelled with simple transfer functions plus a dead time, a reasonable compromise between robustness and performance can be obtained by the correct tuning of PID controllers. However, when a high performance is desired and/or the relative dead time is very large, a predictive control strategy must be used [4]. Predictor based control structures have been used in many control applications. The performance of the closed-loop system can be improved by using a predictor structure in two main cases: (i) when the process has a significant dead time and (ii) when the future reference is known. In the first case, the main objective of the predictor is to eliminate the effect of the dead time on the closed-loop system. In the second case, the predictive controller allows for the anticipation of the control action. In both cases, the predictive strategy includes a model of the process in the structure of the controller. The first dead-time compensation algorithm appeared in 1957 in a paper by Smith [125]. This control algorithm, which became known as the Smith predictor (SP), contained a dynamic model of the dead-time process and it can, in a certain sense, be considered as the first model predictive control algorithm. After this, two other important predictors were proposed: The analytical predictor (AP) [30] and the optimal predictor (OP) [39]. Optimal predictors

6

1 Introduction

were used in the context of model predictive control (MPC). While SPs are used to compensate pure dead time, OPs are usually employed to predict the future behaviour of the plant in a multistep ahead receding horizon. OPs do not explicitly appear in the resulting MPC structure, although it has been shown that the MPC structure is equivalent to an OP plus a primary controller [11]. Over the past 20 years, numerous extensions and modifications of the SP (also called dead-time compensator, DTC) have been proposed in order to: (a) improve the regulatory capabilities of the SP for measurable or unmeasurable disturbances, (b) to allow its use with unstable plants or (c) to facilitate the tuning in industrial applications. An excellent review of the SP and its modifications can be found in [99] and some comparative results of the different versions of the SP are presented in [77, 81]. The extension of the SP for multivariable systems with multiple delays is discussed in [1, 92, 91, 100, 9, 47, 33]. Because of implementation problems, only the discrete versions of the dead-time compensators are used in practice. Some of the particular properties of the digital version of the SP are discussed in [101, 40, 130]. The OP has been defined in the optimal control domain, that is, combined with optimal controllers. Over the last few decades, several strategies based on OP have been proposed, ranging, from the more simple general minimum variance controller, GMVC [20] to the more sophisticated generalised predictive controller, GPC [22]. The use of the OP in these controllers is based on its optimal properties, that is, the OP can generate the best prediction of the output of the plant in an open-loop configuration when deterministic and random disturbances are taken into account. In order to implement a predictive control structure, a model is used to predict the future plant outputs. The control action is computed with this information using different types of algorithms, for example, classical PI or PID controllers as in the Smith predictor, or optimal control as in model based predictive controllers. One common characteristic of all the predictor based controllers is that the structure of the predictor is computed in order to predict the open-loop behaviour of the plant without taking into account that the predictor works in a closed-loop structure. In some cases (as in the Smith or analytical predictors), the prediction of the output of the plant is computed using an open-loop model of the process. In the optimal approach, the structure of the predictor is defined by stochastic considerations (normally the plant output is affected by white or coloured noise) and the expected value is taken as the best prediction of the output of the plant. Although open-loop predictors are used, the performance of the complete control structure should be analysed. Two important aspects have great influence in the development of a predictive controller: (i) The performance of the closed loop in the presence of noise or disturbances and (ii) the robustness of the closed-loop system when model uncertainties are considered.

1.4 Outline of Chapters

7

In this book, the performance and robustness of different controllers for the case of dead-time systems are analysed using a predictor based approach. Some comparative results are presented to show the advantages and draw backs of each structure and tuning rules are also derived to be used in practical applications.

1.4 Outline of Chapters The book aims to show the problems associated with the control of deadtime processes, from the simple SISO case using industrial PID controllers to more complex situations where MPC strategies are used to control MIMO delayed processes. In order to best achieve this objective, the book has been organised as follows. Chapter 2 begins by presenting some examples of processes with dead times. The dynamic behaviour and the representation in the time and frequency domain of these processes are also presented in this chapter. Polynomial approximations of the dead time usually considered when using simple controllers are explained. Finally, the problems associated with the control of dead-time systems are presented. Chapter 3 analyses the problems of identifying dead-time processes. Some parametric model identification techniques are presented. Two sets of methods are revised: Heuristic methods based on the continuous impulse or step response and the least squares and related discrete methods. Chapter 4 is dedicated to the analysis and design of PID controllers for SISO dead-time processes. Some important tuning rules are described and the advantages and limitations of the use of these controllers are pointed out. A predictor-based interpretation of PIDs is given and a method for tuning the controller, even for large dead times, is presented. Some interesting real applications are shown at the end of the chapter. Chapter 5 analyses the Smith predictor properties, in order to describe the improvement in performance that can be obtained when compared to a PID controller. Simple tuning procedures are given and the limitations of the Smith predictor structure are explained. Chapter 6 deals with the analysis, design and tuning of dead-time compensators for stable processes. Some of the most important modifications presented in the literature are described. In all cases an evaluation of the controllers is presented considering the performance and robustness of the closed-loop system. The dead-time compensators for integrative and unstable plants are analysed in Chap. 7. As in Chaps. 5 and 6, special attention is paid to the simple tuning procedures of DTCs for industrial processes. In Chap. 8 the discrete implementation of the dead-time compensators is analysed. Problems such us the appropriate selection of the sampling time are discussed. This chapter also includes experimental results.

8

1 Introduction

Chapter 9 introduces the properties of model predictive control when applied to dead-time processes. The advantage of model predictive control is that it can cope with dead time and the constraints in the design of the optimal control law. The chapter briefly analyses the most outstanding MPC algorithms and, because of their popularity, generalised predictive controller (GPC) and dynamic matrix control (DMC) are treated in detail. It is shown that these controllers can be represented with a dead-time compensator structure and the properties of this representation are analysed. The effect of dead time on the robustness of predictive controllers is analysed in Chap. 10. The performance and robustness of the GPC is compared to the DTCs analysed in Chaps. 5 to 8. The comparison is used to introduce a new controller, the dead-time compensator generalised predictive controller DTC-GPC. This algorithm has most of the advantages of the GPC and DTC for controlling dead-time processes. The ideas of the dead-time compensators are generalised to the MIMO case in Chap. 11. The design of these MIMO-DTCs are analysed. The difficulties associated with tuning the fast model and primary controller of multidead-time processes are presented. Chapter 12 extends the dead-time compensator generalised predictive controller to the MIMO case, showing that the proposed controller can be used for controlling stable or unstable MIMO processes with multiple dead times. A robustness analysis is presented for the definition of the tuning rules. Some simulation and experimental results validate the proposed controller. Nonlinear and constrained cases are studied in Chap. 13 using an extension of the ideas of the linear unconstrained case. Some results of nonlinear MPC, used to control dead-time-free processes, are used in the dead-time case. The final chapter, Chap. 14, gives a more general formulation of the problem of prediction in closed-loop configurations. Some new problems are pointed out for future research, examples and new ideas are given and some still challenging open problems are presented. Simulation examples and some experimental results illustrate the main concepts in each chapter.

2 Dead-time Processes

Dead times appear in many processes in industry and in other fields, including economical and biological systems. They are caused by some of the following phenomena: (a) The time needed to transport mass, energy or information; (b) the accumulation of time lags in a great number of low-order systems connected in series; and (c) the required processing time for sensors, such as analysers; controllers that need some time to implement a complicated control algorithm or process. Dead times introduce an additional lag in the system phase, thereby decreasing the phase and gain margin of the transfer function making the control of these systems more difficult. This chapter gives an introduction to the modelling, analysis and control of dead-time systems. Several ideas will be introduced and will be discussed in the following chapters.

2.1 Dead-time Systems: Some Case Studies In this first section, some examples of dead-time systems are presented. These examples come from different fields and show that dead times are present almost everywhere. 2.1.1 A Heated Tank with a Long Pipe Consider a water heater system such as the one shown in Fig. 2.1. The water is heated in the tank using an electric resistor and driven by a pump along a thermally insulated pipe to the output of the system. The control input is the power W at the resistor and the plant output is the temperature T at the end of the pipe. A linear model of the process can be obtained using a simple step-test identification procedure close to an operation point W0 , T0 . When a positive step is applied at W , the temperature inside the tank starts to

10

2 Dead-time Processes

Fig. 2.1. A heated tank and a long pipe

increase. As the pipe is full of water at the initial temperature T0 , this change is not immediately perceived at the output and it is necessary to wait until the hot water reaches the end of the pipe before it is noticed. Thus, after a dead time, defined by the flow and the length of the pipe, the output temperature T starts to rise with the same dynamics as the temperature inside the tank. When a constant flow of water F is used, the dead time L can be estimated using F and the volume of the pipe V as V . F Figure 2.2 shows the behaviour of T when a step is applied at W . In this simulated situation, the power W (dashed line) changes from 40% to 50% at t = 1 and the temperature (solid line) increases from 55% to 65%. Note that the temperature inside the tank Ti (dotted-dashed line) starts rising at t = 1 s, while the temperature at the end of the pipe only reacts at t = 6 s, thus, there is a dead time of 5 s due to the time needed for mass transportation. Therefore, it is possible to relate the two temperatures Ti (t) = T (t + 5). Suppose now that a linear model is used to represent the dynamic relationship between the variations on Ti (∆Ti ) and the variations on W (∆W ). The transfer function between ∆Ti and ∆W is given by L=

G(s) =

∆Ti (s) ⇒ ∆Ti (s) = G(s)∆W (s). ∆W (s)

If a generic dead time L is considered, and the Laplace transform is used (L{x(t + L)} = eLs L{x(t)}), it follows that ∆Ti (s) = eLs ∆T (s) ⇒ ∆T (s) = ∆Ti (s)e−Ls . Thus

∆T (s) = G(s)e−Ls ∆W (s)

L > 0,

which is the linear model most used to represent the behaviour of dead-time processes.

Temperature (%)

2.1 Dead-time Systems: Some Case Studies

11

65

60 T Ti

55 0

2

4

6

8

10 time

12

14

16

18

20

control (%)

50

45

40 0

power 2

4

6

8

10 time

12

14

16

18

20

Fig. 2.2. Step response of the system: Ti (dotted-dashed line), T (solid line) and W (dashed line)

2.1.2 Variable Dead Time: Temperature Control at a Solar Plant The transportation of fluids is a very common dead-time process in industry. An interesting dead-time control example is the temperature control in a distributed solar collector field such as the ACUREX field of the Solar Energy Platform in Almer´ıa (Spain). A schematic diagram of the field is given in Fig. 2.3. Solar radiation is used to heat oil inside a long pipe that passes through the focal point of a set of solar collectors with parabolic mirrors. The heated oil is then pumped to a storage tank. The objective of the control system is to maintain the outlet oil temperature at a desired level in spite of disturbances such as changes in the solar irradiance level (caused by daily variations and passing clouds), the mirror reflectivity or the inlet oil temperature. Since solar radiation cannot be controlled, this can only be achieved by adjusting the flow of the oil and the daily solar power cycle characteristic is such that the oil flow has to change substantially during operation. This leads to significant variations in the dynamic characteristics of the field such as the response rate and the dead time, which cause difficulties in obtaining adequate performance over the operating range with a fixed parameter controller. Some of the plant operating modes require the temperature of the oil entering the top of the thermal storage tank to be controlled. The considerable length of the pipe joining the output of the collector field to the top of the

12

2 Dead-time Processes SOLAR ARRAYS

POWER CONVERSION SYSTEM

PUMP INTERMEDIATE BUFFER

THERMAL STORAGE TANK

Fig. 2.3. Schematic diagram of the ACUREX field

tank introduces a large dead time within the control loop, which depends on the value of the flow. The plant can be described by a set of nonlinear distributed parameter equations describing energy and mass balance [16, 12]. Thus, the dead time in this process is also caused by the effect of the distributed dynamics. The dynamic behaviour of the process can be seen in Fig. 2.4 for a sequence of steps in the control action. Both the outlet temperature of the collector field and the inlet temperature at the top of the storage tank are shown. As can be seen, a varying dead time is present in this process because the dead time, as in the previous example, is a function of the oil flow (see Exercise 2.1). For example, at low temperature close to 225◦ C the flow is around 8 l/s and the dead time is small while when the system is operating around 255◦ C, the corresponding flow is approximately 3 l/s and the dead time increases. 2.1.3 High-order Systems In many cases dead time is caused by the effect produced by the accumulation of a large number of low-order systems. Consider, for instance, a set of n equal cylinder atmospheric tanks as shown in Fig. 2.5. In this system the output flow of tank i (FiO ) feeds tank i + 1; that is, the input flow of tank i + 1 is F(i+1)I = FiO . When the tank levels are close to an operating point the

2.1 Dead-time Systems: Some Case Studies 275.0 265.0

outlet loop temperature

255.0

temperature (C)

245.0 235.0 225.0 215.0 205.0 inlet tank temperature 195.0 185.0 11.0

11.5

12.0

12.5

13.0 13.5 14.0 local time (hours)

14.5

15.0

15.5

Fig. 2.4. Behaviour of the outlet and inlet tank temperatures

F 1I

............ H1

............ H2

F 2O

......

............ Hn F nO

Fig. 2.5. A series of tanks

16.0

13

14

2 Dead-time Processes

dynamic behaviour of the level in each tank Hi can be modelled by a linear system A

dHi = FiI − FiO , dt FiO = KHi ,

where A is the area of the base of the tank and K is a constant that depends on the tank characteristics. Thus, the transfer function relating the input flow in tank i and its level is Hi (s) =

1/K FiI (s), Ts + 1

For tank 1 H1 (s) =

T = A/K.

1/K F1I (s), Ts + 1

and for tank 2 H2 (s) =

1/K 1/K 1/K F2I (s) = F1O (s) = KH1 (s). Ts + 1 Ts + 1 Ts + 1

Then, using the expression of H1 (s) it follows H2 (s) =

1 1/K 1/K F1I (s) = F1I (s). Ts + 1 Ts + 1 (T s + 1)2

If this procedure is applied recursively the transfer function (P (s)) relating F1I (s) with the level in tank n (Hn (s)) is Hn (s) = P (s)F1I (s) =

Ke F1I (s), (T s + 1)n

Ke = 1/K.

As a numerical example, consider the step response of a system with n = 8, K = 2 and T = 1 s. In this case P (s) =

0.5 . (s + 1)8

Figure 2.6 shows the dynamic behaviour when a change of 20% in the level variation is desired (from 60% to 80%). As can be seen, an apparent dead time of approximately 2 s appears in the step response of the system. The MATLAB code for this example is: MATLAB code for the computation of P (s) and the step response % data n=8; Ke=1/2; T=1; % transfer function Pb=tf(1,[T 1]);P=Ke*Pb ˆ n; % step response from operating point 60%, input 40% y0=60;u0=40;[y,t]=u0*step(P); y=y0+y;plot(t,y);

2.1 Dead-time Systems: Some Case Studies

15

Level (%)

80 75 70 65 Level

60 0

5

10

15

20

25

time

control (%)

70 60 50 40 30 0

control 5

10

15

20

25

time

Fig. 2.6. Step response of the level of the 8th tank

We can generalise the previous analysis for any process having N firstorder elements in series, each having a time constant L/N [30]. That is, the resulting transfer function (a unitary gain is considered for simplicity) is G(s) =

1 (1 +

L N N s)

.

Changing the value of N from 1 to ∞ the response shifts from exact firstorder to pure dead time (equal to L) e−Ls = lim

N →∞

1 (1 +

L N N s)

.

When one time constant is much larger than the others (as in many processes), the smaller time constants work together to produce a lag that acts as pure dead time. In this situation the dynamical effects are mainly due to this larger time constant. It is therefore possible to approximate the model of a very high-order, complex, dynamic process with a simplified model consisting of a first-order process combined with a dead-time element. This type of model is analysed in detail in Sect. 2.3. Several industrial processes have the “dead-time effect” produced by the accumulation of a great number of low-order systems. An interesting case is presented in the following example.

16

2 Dead-time Processes STEAM

EVAPORATORS

LT

LC

LC

BUFFER 1

JUICE

LC

LC

LC

FC

BUFFER 2

Fig. 2.7. Structure of the evaporator unit

2.1.4 Control Level in an Evaporator Section of a Sugar Factory The first stage in sugar production is the extraction of sucrose from beets or cane after which a juice with impurities is obtained. These impurities must be removed before pure sucrose can be crystallised. The purified juice contains less than 20% solids, and consequently the juice must be concentrated by evaporating as much water as possible. Later, sugar is crystallised from the concentrated juice by continuing to evaporate water in vacuum pans. Finally, this sugar is dried and packed. Evaporation is the stage in which the water contained in a juice with low sugar concentration is eliminated in order to obtain a juice with a higher sugar concentration. Evaporation can be carried out in one or several evaporators. When working with high flows and the cost of the steam is high, a chain of evaporators is usually used. In this configuration, the product to be concentrated passes in series from one evaporator to the next. The steam produced in the evaporating process of one of the evaporators is used for heating the next one; only the first evaporator receives steam directly from the boiler. This is known as a multiple effect system. This configuration requires decreasing pressures in order to have decreasing boiling points. The advantage of this multiple stage system is basically the more efficient use of the steam. Consider the arrangement shown in Fig. 2.7. This configuration presents four evaporators. An important control objective in this configuration is to stabilise the level of the buffer tank at the inlet of juice [89]. To achieve this, the extraction flow is controlled at the last stage. The process presents a large dead time because there are four evaporators between the actuating point and the controlled level. Note that changes in the extraction flow cause a variation in the tank level after modifying all the intermediate stages, as each stage has a local control. Furthermore, the storage tank has integral dynamics. Thus, it is possible to describe the dynamic behaviour of the level as a slow process with integral action. Figure 2.8 shows the evolution of the level of the storage tank when a step change in the flow juice from

2.1 Dead-time Systems: Some Case Studies

17

40% to 45% has been applied at t = 100 s. Although the complete model of the evaporator unit is a complex nonlinear system, a simple model can be used to approximate the behaviour close to the operating point using an integrator, a velocity gain and a dead time. 50 Level Level (%)

45 40 35 30 0

500

1000

1500

time 48

control (%)

46 44 42 40 control 38 0

500

1000

1500

time

Fig. 2.8. Step response of the buffer tank 1 level

2.1.5 Traffic Systems Consider a queue of cars at a traffic light as in Fig. 2.9. After the light changes to green the first car in the queue will start to move. A simple model can be obtained considering that each driver will try to follow the speed of the car in front (the first car will try to follow the desired speed v0 ). Consider also that the drivers use a proportional control law dvi (t) = K[vi−1 (t) − vi (t)] dt

i = 1, 2, 3, . . . , N.

Applying Laplace transforms sVi (s) = K[Vi−1 (s)−Vi (s)] ⇒ (1+s/K)Vi (s) = Vi−1 (s),

i = 1, 2, . . . , N.

This can be considered as a series of first-order system transfer functions: 1 Vi (s) = G(s) = . Vi−1 (s) 1 + s/K

18

2 Dead-time Processes

V3

V2

V1

Fig. 2.9. A queue of cars without reaction time

speed (km/h)

60

40 V 20

V

0

0 0

7

5

10

15

20

25

30

35

40

30

35

40

with reaction time Lr=1

speed (km/h)

60

40 V 20

0 0

V

0

7

5

10

15

20 25 time (seconds)

Fig. 2.10. The step response of a queue of seven cars. Case without reaction dead time and with reaction dead time

As in the case of the level in the set of tanks VN (s) =

1 V0 (s), (1 + s/K)N

the speed of the last car reacts with an apparent dead time caused by the accumulative effect of the N time constants. Figure 2.10a shows the speed behaviour of a queue of 7 cars, where K = 0.5 and v0 is a step of 50 km/h applied at t = 5 s. Note that the speed of the last car exhibits a dead time of approximately 5 s. A more complete model can also consider that each driver has a “reactiondead time” given by Lr , therefore

2.2 Dynamic Behaviour of Dead-time Systems

Vi (s) =

e−Lr s Vi−1 (s), 1 + s/K

19

i = 1, 2, 3, ..., N.

Therefore, the behaviour of the last car is determined by the combination of N real dead times and an apparent dead time caused by the N time constants e−N Lr s V0 (s). (1 + s/K)N

VN (s) =

Figure 2.10b shows the speed behaviour of the same situation as in Fig. 2.10a but considering a reaction dead time of 1 s (Lr = 1) in each car model. As can be seen in the figure, the effective dead time of the last car in the queue is approximately 12 s while the real dead time caused by the reaction of the drivers is 7 s. The additional 5 s are due to the accumulative effect of the set of first-order systems.

2.2 Dynamic Behaviour of Dead-time Systems The effect of dead time is easy to understand in the continuous time domain; however, for the analysis and design of control systems it is sometimes necessary to use a frequency response or a discrete representation of the process. 2.2.1 Representation of Dead Time in the Frequency Domain Consider the linear model of a pure dead time L given by G(s) = e−Ls with L > 0. The frequency response is obtained by computing G(jω) = e−jωL for ω ∈ R, ω > 0. The gain and phase lags of G are given by | G(jω) |=| e−jLω |= 1,

ϕG(jω) = ϕe−jLω = −ωL ∀ ω > 0.

(2.1)

Note that, as the magnitude is equal to one, the dead time will only affect the phase diagram. The frequency response of a dead-time system can also easily be deduced from Fig. 2.11 where a sine wave of period Tp and the same signal delayed by L are shown. It can be seen that the amplitude of the delayed signal is equal to the amplitude of the original signal, thus the gain for all frequencies is one. The phase can easily be computed as φ=−

L 2π = −ωp L. Tp

Consider the normalised frequency ωn = ωL, where L is given in seconds, ω in rad/s and ωn in rad. Figure 2.12a illustrates a normalised phase diagram showing the value of the phase for different

20

2 Dead-time Processes 1.5

1

signals

0.5

0 L −0.5

−1 input output −1.5 0

1

2

3

4

5 time

6

7

8

9

10

Fig. 2.11. A sine wave and the same signal delayed by L

frequencies. Note that φ = −ωn ; that is, the relationship is linear and has an exponential shape in the logarithmic scale of the graphics. Example 2.1: Consider a second-order system with a variable dead time such that 1 e−Ls ; L ∈ {0, 0.1, 1}. P (s) = (1 + s)2 The phase of the dead-time-free system φ → −180◦ when ω → ∞. Note that with a small value of the dead time L = 0.1 this value is almost reached at ω ≈ 5 rad/s. In Fig. 2.12b the phase diagram with the variable dead time is shown for L = 0, L = 0.1 and for L = 1. Note the fast decrease of the phase for high values of L. The MATLAB code for this example is: MATLAB code to compute the phase % data T=1;K=1;L1=0;L2=.1;L3=1; % phase without dead time [m,phg,w]=bode(K,[T*T 2*T 1]); % dead-time phase phd1=-L1*w*180/pi; phd2=-L2*w*180/pi; phd3=-L3*w*180/pi; % total phase ph1=phg+phd1; ph2=phg+phd2; ph3=phg+phd3; % plot semilogx(w,ph1,w,ph2,’--’,w,ph3,’-.’); legend(’L=0’,’L=0.1’,’L=1’);

2.2 Dynamic Behaviour of Dead-time Systems

21

(a)

dead−time phase

0 −100 −200 −300 −2

−1

10

0

10

1

10

10

normalized frequency (b)

phase of G(s)

0

L=0 L=0.1 L=1

−100

−200

−300 −2 10

−1

10

0

10 frequency

1

10

2

10

Fig. 2.12. (a) Phase diagram of the dead-time factor e−Ls . (b) Phase diagram of P (s) = 1 e−Ls in Example 2.1 for different values of L (1+s)2

Example 2.2: Consider a heated tank such as the one shown in Fig. 2.1 repre5 e−s = G(s)e−s . The frequency response is sented by the model P (s) = 1+2s obtained by computing 5 ; |P (jω)| =  1 + (2ω)2

ϕP (jω) = −arctan(2ω) − ω.

It is possible to see the effect of the dead time on the phase of the system. As can be seen in Fig. 2.13 the effect of dead time on the phase decreases the phase margin (PM) of the system. In this particular case, the phase margin of the system without dead time is positive while that with dead time is negative, which shows the important negative effect of dead time on stability. 2.2.2 Polynomial Approximations of Dead Time In the frequency domain dead time can be directly represented, thus frequency methods of analysis and design can be used without approximations in dead-time processes. However, because the transfer function of a dead time is not rational, when pole-zero representations are needed, as in rootlocus or pole-placement methods, polynomial approximations of dead time are used.

22

2 Dead-time Processes 1

magnitude

10

0

10

−1

10

−2

10

−1

0

10

1

10

10

frequency 0

phase

G(s)

−100

P(s)

PM>0

−200

−300 −2 10

PM 2 but has an undesirable negative response caused by the zero introduced at s = 0.5. 2.2.3 Discrete Representation of Dead Time There are some cases where, because of the nature of the process, the model description can be made directly in the discrete time domain. In this type

26

2 Dead-time Processes

of process, time is a discrete variable; that is, if a signal x2 (t) is obtained by delaying x1 (t) the relationship is given by x2 (t) = x1 (t − d), where both t and d are integer multiples of a certain period of time that we call sampling time. In this book we use the variable t to represent time for continuous systems (t ∈ R). For discrete systems (t ∈ Z) represents the number of sampling instants. The real time instant for discrete systems is therefore, tTs where Ts is the sampling time. As an example consider the dynamic model of a manufacturing supply chain, where the time is measured in days [119]. The dead time is an important part of the dynamic model of this process. A simple model for this system is y(t) = y(t − 1) + Ku(t − d − 1) − q(t),

(2.2)

where y is the stock level, u represents the factory starts, q is the demand and t is expressed in days. In this model K is the factory production yield and d the delay time of the factory. Ideally K = 1 but in practice it could assume different values because of a mistake in estimating the quantity of material u arriving from the factory on the correct day. Applying the Z transform, the representation of this model is given by Y (z) =

1 Kz −1 −d z U (z) − Q(z), 1 − z −1 1 − z −1

(2.3)

that is, the model shows integral behaviour with a dead time. Another case where discrete models of dead time may be important is when digital equipment is used to control continuous time systems. This is a very common situation because, in practice, on many occasions controllers are implemented using microprocessors. For the analysis and design of these discrete controllers two different approaches can be made: (i) Using a continuous design and then computing a discrete approximation of the continuous controller or (ii) using a direct discrete design based on the discrete representation of the continuous process. In the latter case, it is always necessary to use a discrete model of the dead time. Consider that the dynamic behaviour of the process is described by the continuous transfer function P (s) = G(s)e−Ls ,

(2.4)

where G(s) is the dead-time-free part of the process and L is the effective dead time and a sampling period Ts . A discrete description of the process is given by (2.5) P (z) = Z{Bo (s)P (s)},

2.2 Dynamic Behaviour of Dead-time Systems

27

where P (z) is the discrete transfer function relating the Z transform of the sampled output of the process and the Z transform of the discrete input that passes through a zero-order hold block (Bo (s)). First suppose that Ts is chosen as an integer submultiple of L, that is, an integer d exists such that L = dTs . In this case the discrete model can be computed as P (z) = G(z)z −d , (2.6) where G(z) represents the discrete dead-time-free dynamics of the process and d represents the dead time, that is the dead time L is represented by d samples e−Ls → z −d

L = dTs , and

G(z) = Z{Bo (s)G(s)}. It is clear that in general the real dead time L will not be a multiple of Ts ; thus, L = dTs + δL,

−Ts /2 ≤ δL ≤ Ts /2,

where δL is the error introduced by the discrete representation of dead time. This error can be neglected when δL 0 is the equivalent time constant of the plant and Kp is the static gain. L > 0 is the equivalent dead time.

2.3 Simple Models for Typical Dead-time Systems

35

This model is, perhaps, the one most commonly used in industry and it is also the basis for most of the classical PID tuning rules. Figure 2.21 shows the step response of this model. Note that the step response has a nonnull derivative in the first instant after the dead time (see Fig. 2.21).

2

input and output

1.5

1

0.5

0

output control

0

5

10

15

20

25

time

Fig. 2.21. Unitary step response of the FOPDT model



When it is desirable to represent a smoother step response in the first part of the transients or an oscillatory step response, a second-order process with a dead time is used P (s) =

Kp e−Ls Kp e−Ls = , s2 (1 + T1 s)(1 + T2 s) 1 + 2ξs ωn + ω 2

(2.14)

n

where Kp , T1 , T2 , ξ, ωn and L are real numbers. As in the FOPDT model Kp is the static gain and L > 0 the equivalent dead time. T1 > 0 and T2 > 0 are time constants of the plant in the case of a nonoscillatory response while ξ ∈ (0, 1) (the damping coefficient) and ωn > 0 (the natural frequency) are used when the process exhibits an oscillatory step response. Figure 2.22 shows the step response of this type of model for both cases. Integrative Models with Dead Time When the process exhibits integrative behaviour, two simple models can be used, the integrative-plus-dead-time (IPDT) model and the second-orderintegrative-plus-dead-time (SOIPDT) model

36

2 Dead-time Processes 2.5

input and output

2

1.5

1

0.5

nonoscillatory control oscillatory

0 0

5

10

15

20

25 time

30

35

40

45

50

Fig. 2.22. Unitary step response of the nonoscillatory and oscillatory SOPDT model



The IPDT model is represented by P (s) =



Kv −Ls e , s

(2.15)

where L > 0 is the equivalent dead time and Kv is the velocity gain. As in the stable case, a SOIPDT model is used to represent a smoother step response in the first part of the transients P (s) =

Kv e−Ls , s(1 + T s)

(2.16)

where the new parameter T > 0 is the equivalent time constant of the nonintegrative part of the plant. Figure 2.23 shows the step response of these two models. Open-loop Unstable Model with a Dead Time In some situations the process can exhibit unstable behaviour that can be represented by Kp −Ls e P (s) = , (2.17) 1 − Ts where L > 0 is the equivalent dead time and Kp and T > 0 are used to describe the increasing exponential process output. Figure 2.24 shows the step response of this model.

2.3 Simple Models for Typical Dead-time Systems

37

10 9 8

input and output

7 6 5

IPDT output control SOIPDT output

4 3 2 1 0 0

2

4

6

8

10 time

12

14

16

18

20

Fig. 2.23. Unitary step response of the IPDT and SOIPDT models 10 9 8

input and output

7 6 5

output control

4 3 2 1 0 0

1

2

3

4

5 time

6

7

8

9

10

Fig. 2.24. Step response of the unstable model with a dead time

The following example illustrates how these simple models can represent the dynamics of a high-order process in the step test (see also Exercises 2.7 and 2.8).

38

2 Dead-time Processes

Example 2.6: Consider: (i) an FOPDT model with Kp = 1, T = 1.5 and L = 10.5, and the “real” process P (s) =

e−10s , (1 + s)(1 + .5s)(1 + .25s)(1 + .125s)

(2.18)

(ii) an IPDT model with Kv = 2 and L = 6.7, and the “real” process P (s) =

2e−5s . s(1 + s)(1 + 0.5s)(1 + 0.1s)

(2.19)

Figure 2.25 shows the step responses of the models and the processes in order to appreciate how the dead time represents the effect of the high-order dynamics. The input is a unitary step applied at t = 0. stable process 1 output

0.8 0.6 0.4 0.2

process model

0 0

2

4

6

8

10

12

14

16

18

20

integrative process 15 process model output

10

5

0 0

5

10

15

time

Fig. 2.25. Step response of the “real” processes an models

In these simple models the relationship between the dead time and the time constant associated with the dead-time-free part of the process is an important measurement of the process characteristics. Thus, usually, the dead time is normalised. Dead time can be normalised in different ways. The most common way is the normalised dead time (τ ) defined as τ=

L , L+T

0 ≤ τ ≤ 1,

(2.20)

2.4 Analysis of Modelling Errors

39

using the time constant and dead time of the FOPDT model. Note that deadtime-dominant processes have a value of τ close to 1 and processes with τ close to 0 are lag dominant. A rule of thumb is to consider a process to be dead-time-dominant when τ > 2/3 (L > 2T ). Normally, τ is used to define the difficulties associated with the control design of a given process (greater values of τ mean more difficulties) and it is also usually called the “controllability ratio”. The previous models are normally obtained using some measurement from the output of the real process or using some simplifications in a complex set of differential equations that describe the process dynamics. Therefore, it is necessary to study how to represent the modelling errors introduced in the determination of the process model.

2.4 Analysis of Modelling Errors Many approximations are made when modelling a process: high-order dynamics are neglected, nonlinear dynamics are represented by linearised equations, etc. As the model is an approximation of the real process, an analysis of the modelling errors is necessary if a robust controller is to be designed. 2.4.1 Modelling Error Representation Modelling errors can be represented in a parametric form or in the frequency response domain. In this book, the second approach is used based on the results of [70, 124] To account for model uncertainty we will assume that the process is described by a family of transfer functions in such a way that the magnitude and phase of P (jω) can vary in a disk with radius ∆P (ω), as shown in Fig. 2.26 [70]. Thus, each model P (s) in the family can be written in the frequency domain as P (jω) = Pn (jω) + ∆P (jω),

| ∆P (jω) |≤ ∆P (ω)

∀ω ≥ 0,

where Pn (jω) is the nominal model and ∆P (jω) is defined as the additive description of the modelling errors. Equivalently P (jω) = Pn (jω)(1 + δP (jω)),

| δP (jω) |≤ δP (ω)

∀ω ≥ 0,

where δP (jω) is a multiplicative description of the modelling errors and δP (jω) =

∆P (jω) , Pn (jω)

δP (ω) =

∆P (ω) | Pn (jω) |

∀ω ≥ 0.

This type of uncertainty model is usually called “unstructured description” (additive or multiplicative) because it is not linked to the variation of specific parameters (gain, dead time, etc.) and it is specially suitable to describe

40

2 Dead-time Processes

Imag Real

P( jw )

P( jw ) Fig. 2.26. Model uncertainty in the frequency domain

the typical unmodelled dynamics found in industrial processes. However, it must be noted that when considering disks to represent the uncertainty bound of the plant we are including some other plants not present in the original uncertainty set. ∆P (ω) and δP (ω) are the bounds for the additive and multiplicative uncertainties, respectively. Also, it is possible to write ∆P (jω) = ∆A ∆P (ω);

δP (jω) = δI δP (ω).

The phase of ∆A and δI can vary arbitrarily but | ∆A |≤ 1 and | δI |≤ 1. The uncertainty usually increases with frequency and δP (ω) can exceed 1 at high frequencies, as shown in the following examples. This is reasonable because, in practice, models tends to describe the low frequency behaviour well, but become inaccurate for high frequency inputs [70]. Note that if one plant in the family has a pole at s = jω1 in the imaginary axis | P (jω1 ) |= ∞ ⇒ ∆P (ω1 ) = ∞ ⇒ δP (ω1 ) = ∞.

Thus the additive and multiplicative uncertainty are unsuitable for describing sets of plants where poles can cross the imaginary axis. Therefore, all the plants in the family should have the same number of poles on the right side of the s-plane [70, 124]. This condition is considered valid in all the robustness analysis of this book. Furthermore, in this book, we use the multiplicative uncertainty for the analysis of robustness in most of cases. Typical simple transfer functions are used to represent the bound for the multiplicative uncertainty

Tδ s + r0 , (Tδ /r∞ )s + 1 where r0 is the relative uncertainty at steady state, 1/Tδ is approximately the frequency at which the relative uncertainty reaches 100% and r∞ is the δP (s) =

2.4 Analysis of Modelling Errors

41

relative uncertainty at high frequencies. In some situations a more complex δP (s) is necessary. In practice, we start using a simple weight and then, if necessary, try a higher-order transfer function. 2.4.2 Modelling Errors in Dead-time Processes In the dead-time process case, uncertainties can be associated with the error in the estimation of the dead time L and to the simplifications used to approximate the dead-time-free dynamics of the process by a transfer function. This analysis can be made for the general case but in this chapter the attention is focussed on the case where the nominal models are the simple firstorder-plus-dead-time and integrative-plus-dead-time transfer functions, as they are the most widely used in industry. It is shown that the main factor affecting frequency domain uncertainties is dead-time-estimation error. The following types of uncertainties will be considered: • • • •

Errors in the estimation of the gains Kp or Kv ; errors in estimating the dead time; errors in estimating the dominating time constant in the stable case; unmodelled dynamics. As is customary in literature, poles and zeros that are faster than the dominant pole are approximated by a first-order model with an equivalent time constant Tu , smaller than the dominant T [4].

These considerations are related to the most common effects found in industrial processes. Thus, for the stable case the “real” process (P (s)) and the model (Pn (s)) are represented by P (s) = e−Ls

K , (1 + sT )(1 + sTu )

Pn (s) = e−Lns

Kn 1 + sTn

and for the integrative case by P (s) = e−Ls

K , s(1 + sTu )

Pn (s) = e−Ln s

Kn , s

where from now on the suffix n is used to represent the nominal value of a parameter or a model. In the following, a frequency analysis of the multiplicative error is presented for errors in all the parameters (see also Exercise 2.10). The effect of each type of modelling error can be seen in [70, 124]. Stable Models Using the transfer functions of P (s) and Pn (s) for the stable case, the general expression of δP (s) is

42

2 Dead-time Processes

δP (s) =

Kn e−Ln s Ke−Ls (1+sT )(1+sTu ) − 1+sTn Kn e−Ln s 1+sTn

=

K (1 + sTn )e−(L−Ln )s − 1. Kn (1 + sT )(1 + sTu )

Using a parametrisation of the models with the value of the nominal dead time, the error can be written as δP (jωn ) = (1 + δK)

1 1 + jωn Tn′ e−jωn δL − 1, 1 + jωn (Tn′ + δT ) 1 + jωn Tu′

where ωn = ωLn , L′ = L/Ln , T ′ = T /Ln , Tu′ = Tu /Ln , Tn′ = Tn /Ln and T ′ = T /Ln . The incremental (or relative) errors are δL′ = δL =

L − Ln , Ln

δT ′ = δT =

T − Tn , Tn

δK =

K − Kn . Kn

To combine the effects of the errors, some assumptions are made: (i) deadtime-dominant processes are considered, thus L ≥ T and (ii) the neglected dynamics represented by Tu are considered at high frequencies if compared to T . Figure 2.27 shows the shape of δP for the case Tn′ = 0.5, Tu = 0.2 and δL = 30%. The following cases are considered: δT = 0.1, δK = 0.1 (solid line), δT = 0.1, δK = 0.2 (dashed line), δT = 0.2, δK = 0.1 (dotted line) and δT = 0.2, δK = 0.2 (dashed-dotted line). Several conclusions can be derived from these curves (see also Exercises 2.10 and 2.11): • • •

The error in the gain has an important effect on the multiplicative errors at low frequencies but almost no effect at medium and high frequencies; from medium to high frequencies the curves are dominated by the deadtime error; the maximum value of the error (δPmax ) is always near 2. Note that if only δL is considered δPmax = 2.

Thus, special attention must be paid to the dead-time-estimation error in this type of process. The following MATLAB code is used for the computation of δP (s).

2.4 Analysis of Modelling Errors

43

0

magnitude

10

δT=0.1, δK=0.1 δT=0.1, δK=0.2 δT=0.2, δK=0.1 δT=0.2, δK=0.2

−1

10

−2

−1

10

10

0

10 normalised frequency

1

10

2

10

Fig. 2.27. Multiplicative modelling error in the general case for stable processes: Tn′ = 0.5, Tu = 0.2 and δL = 30% MATLAB code for the computation of δP (s) % define errors dL=0.3; Tn=0.5; Tu=Tn/5; dK=[.1 .2]; dT=[.1 .2]; n=0; % loop for jj=1:2 dt=dT(jj); for kk=1:2 dk=dK(kk);n=n+1;ww=logspace(-2,2,300); for i=1:300 w=ww(i); % error e=(1+dk)*((1+w*j*Tn)/((1+w*j*(Tn+dt))*(1+w*j*Tu))); deltaP(n,i)=abs(e*exp(-w*j*dL)-1); end; end; end;

Integrative Models In this case the general expression of δP (s) is

δP (s) =

K e−Ls s(1+sT − e−Ln s Ksn u)

e−Ln s Ksn

= e−(L−Ln)s

K 1 − 1. Kn 1 + sTu

44

2 Dead-time Processes

0

magnitude

10

δK=0.1, T´ =0.5 u

δK=0.2, T´ =0.5 u

δK=0.1, T´u=1 δK=0.2, T´ =1 u

−1

10

−2

10

−1

10

0

10 normalised frequency

1

10

2

10

Fig. 2.28. Multiplicative modelling error in the general case for integrative processes for a dead-time error of 30%

Using the same parametrisation as in the stable case, the error can be written as 1 e−jωn δL − 1. δP (jωn ) = (1 + δK) 1 + jωn Tu′ Here, only one assumption is made: The dead time is considered such that L ≥ Tu . Using this condition, two situations are simulated: Tu = 0.5 and Tu = 1. Figure 2.28 shows the shape of δP for a dead-time error of 30%. The following cases are considered: δK = 0.1, Tu′ = 0.5 (solid line), δK = 0.2, Tu′ = 0.5 (dashed line), δK = 0.1, Tu′ = 1 (dotted line) and δK = 0.2, Tu′ = 1 (dashed-dotted line). Again, the maximum error here is almost defined by the errors in the dead time, while the error in the gain and Tu are more important at low and medium frequencies. Note that the effect of Tu is more important here than in the stable case. This can be explained because an integrative process can be interpreted as a lag-dominant stable e−Ls ∼ e−Ls process where 1+sT = sT if T >> L. Furthermore, note that as Tu increases, the maximum value of δP (jω) decreases and the frequency at which this maximum occurs also decreases. The previous analysis allows us to conclude that the errors in the estimation of dead time can have a great effect on the unstructured description of the modelling errors of the process. If the dead time is dominant, or at least important, this error will be responsible for driving the closed-loop system

2.5 Dead-time Uncertainties and Delay Margin r ( t)

+ _

45

y ( t)

P(s)

Fig. 2.29. Closed-loop system

to instability. In the next section, and also in the following chapters, this problem is discussed in detail.

2.5 Dead-time Uncertainties and Delay Margin Because of the important effect of errors in dead-time estimation on robustness, it is usual to define the delay margin of the system as the largest variation in the dead time that can occur in the process P (s) before the closedloop system in Fig. 2.29 becomes unstable. Using the Nyquist diagram of the system under study, if the Nyquist curve intersects the unitary circle at frequencies ωi with the corresponding phase margin φi , then the delay margin Dm is defined as

 φi Dm = min . i ωi The following example illustrates the importance of the Dm . Example 2.7: Consider two systems with open-loop transfer function Pi (s) such that Pi (s) =

Ki , s(1 + sTi )

i = 1, 2,

where Ki is tuned to achieve at ωi = 1/Ti a phase margin of 45◦ ( π4 rad) and a gain margin of ∞. As the value of the phase of Pi (jω) is −135◦ ( −3π 4 rad) at ωi , it is easy to compute the value of Ki to achieve the specifications √ Ki = 1 ⇒ Ki = 2ωi . | Pi (jωi ) |= √ 2ωi Thus, as these two systems have the same phase margin and gain margin, the same robustness characteristics are expected. Now, consider that a dead time e−Li s has been neglected in the modelling procedure. What is the maximum value of the neglected dead time Li that can be considered without loosing closed-loop stability? Or equivalently, what is the value of the Dm of these two systems? Using the definition of Dm , it follows that

46

2 Dead-time Processes

πTi i = 1, 2. 4 Therefore, the system with higher bandwidth (small value of Ti ) becomes unstable with a small value of the dead time. Theoretically, as Ti can be as small as desired, an infinitesimal value of Li could drive the closed-loop system to instability even when the phase margin is 45◦ and the gain margin is ∞. This analysis can also be made using a time domain approach. In previous cases, the bandwidth of the closed-loop system is related to ωi , thus to Ti . It is clear then that if T1 is smaller than T2 a small value of L can be considered dominant for system 1 and not for system 2. Thus, it is expected that in case 1 the effect of the dead time will be more important. Even when L is precisely known, the controller design for dead-time processes is not easy. The following section presents the main difficulties of this problem and also indicates a way to deal with it. Dmi =

2.6 Control Problems Associated with Dead Times As has been previously mentioned, dead times cause a deterioration of the closed-loop response because of the negative effect on the phase of the system. To illustrate this effect, consider the following example. Example 2.8: A second-order-plus-dead-time model is considered to be the process model of the heated tank with the long pipe presented in Sect. 2.1.1 P (s) =

1 e−Ls (1 + 1.5s)(1 + 0.4s)

(2.21)

First, it is assumed that L = 0; that is, the temperature sensor is located in the tank. A simple proportional integral PI controller C(s) = Kc TiTs+1 is can be tuned for this process to obtain a step response with an overshoot of less than 5% and faster than the open-loop one. Using a root locus diagram and a pole placement of the dominant poles the following tuning is chosen: Ti = 1.2, Kc = 1. Figure 2.30 (solid line) shows the response obtained for a unitary step applied at t = 1 (dotted line). Consider now that the temperature sensor is located at the end of the pipe causing a dead time L = 1.5. There are two main effects caused by the dead time on the closed-loop response: (a) The dead time also appears in the plant output closed loop (the controller cannot avoid this); (b) the response of the closed-loop after the dead time also deteriorates (something can be done about this). Notice that with the same parameters the PI now gives a very oscillatory response as can be seen in Fig. 2.30 (dashed line) and it is necessary to use a high value of Ti and/or a lower Kc to avoid oscillations. In this case the PI is

2.6 Control Problems Associated with Dead Times

47

output, set−point

2

1 y (L=0,K =1,T =1.2) c

0

i

y (L=1.5,Kc=1,Ti=1.2) y (L=1.5,Kc=0.3,Ti=1.2)

−1 0

1

2

3

4 time

5

6

7

8

4

control action

u (L=0,K =1,T =1.2) c

i

3

u (L=1.5,Kc=1,Ti=1.2)

2

u (L=1.5,Kc=0.3,Ti=1.2)

1 0 −1 0

1

2

3

4 time

5

6

7

8

Fig. 2.30. Step response and control action for Kc = 1 and Ti = 1.2 with L = 0; Kc = 1 and Ti = 1.2 with L = 1.5 and Kc = 0.3 and Ti = 1.2 with L = 1.5

re-tuned with Kc = 0.3 and Ti = 1.2. Note that the oscillations disappear and the price for this is a slower step response (dashed-dotted line in Fig. 2.30); that is, even considering the dead time and knowing its value, the controller cannot give a good closed-loop response. This can also be interpreted using the frequency domain approach. For the chosen tuning parameters of the PI controller, the open-loop transfer function is given by C(s)P (s) =

Kc (1 + 1.2s)e−Ls . 1.2s(1 + 0.4s)(1 + 1.5s)

The phase margin PM and cross-over frequency (w) of the system are shown in Fig. 2.31 for the previous cases. Note that with L = 0 the system has a PM∼ = 70◦ and w = w1 > 0.7 rad/s. When L = 1.5 the PM∼ = 5◦ , giving a poor damped closed-loop system. To obtain a nonoscillatory response, gain Kc has to be decreased until a PM> 60◦ is obtained, which causes a smaller value of the cross-over frequency w2 < w1 . This new value of w ∼ = 0.25 rad/s gives a slower transient after the dead time and is the result of the phase introduced by the dead time. Notice that a PID could be used to improve the performance obtained by the PI for the case of this small dead time. This is expected because a PID controller can be interpreted as a led-lag controller where the derivative action is tuned to advance the phase of the open-loop

48

2 Dead-time Processes

0

magnitude

Kc=1

↓w1

10

Kc=0.3

↑w

2

−2

10

−1

0

10

10

1

10

0

phase

−50 −100

↓K =0.3,L=1.5,PM>60 c ↓K =1,L=0,PM>60 c

−150 −200

K =1,L=1.5,PM 0 that drives the closed-loop system to instability.

2.10 Exercises

53

2.10. Analyse the multiplicative modelling error in the general case presented in Sect. 2.4.2. Consider different intervals for the variation of Tn , Tu′ , δL, δT and δK. Verify the importance of the dead-time-estimation error. Compare to the case where only dead-time errors are considered. Analyse the effects on the frequency ωmax where δPmax is achieved. Show that as δL increases δPmax increases and ωmax decreases. Compute an uncertainty bound for the two cases. 2.11. Analyse the modelling error for the following processes and models. In each case compute the maximum error and the corresponding frequency. Use normalised graphics. •



(a) P (s) = (b) P (s) =

2.2e−5s (1+5s)(1+s)3 1.1e−4s (1+3s)s and

and Pn (s) = Pn (s) =

2e−7s (1+6s) .

e−6.5s s .

2.12. Using simulation, analyse the behaviour of the controller in Example 2.9 for an error in the dead time of 10% and 30%. Try to re-tune the primary controller to improve performance.

3 Identification of Dead-time Processes

This chapter deals with the identification of dead-time systems. The most popular methods used in practice to obtain an input−output model of a dead-time process are presented.

3.1 Introduction System identification deals with the problem of building mathematical models of dynamical systems based on data observed from the system. It is an alternative procedure for obtaining a model when it is not possible to find a set of differential equations that describes the dynamic behaviour of the process. The identification of a system model from real data involves three basic steps [62]: • •



The data record. In this first step an experiment must be defined, which means defining which signals are to be measured and which types of inputs are the most appropriate to apply to the process. The definition of the set of models. In this step a set of candidate models (or model structures) are to be defined. It is the most important step. There are two basic cases: 1) Grey box identification, when we have some information about the model structure based on physical information and the objective is to find the model parameters using physical interpretation. 2) Black box identification, when no information about the physical process is used and only the parameters are used to adjust the model fit to the observed data. The determination of the best model in the set, based on the available data. This step includes an assessment of model quality, which consists of checking how the models perform when they attempt to reproduce real data. This is usually done by minimising a criterion that measures how well the model fits the available data.

56

3 Identification of Dead-time Processes

After executing the previous three steps we arrive at a particular model, the one in the set that best describes the data according to the chosen criterion. The final step consists of validating this model. This implies assessing how the model relates to observed data and to its intended use. If the model does not pass the validation test the various steps of the procedure must be revised. The model can fail because the set of models is not appropriate or the criterion not well chosen or also because the data set is not rich enough. Different types of models can be used to represent a dead-time process for identification purposes. In this chapter only the linear input−output models represented by transfer functions are considered, both in the continuous and discrete cases. Some identification methods require to drive the process to a steady state and the use of specific test signals have to be carried out off-line. Other methods can be carried out online while the process is operating and do not require the injection of specific process excitation. The objective of this chapter is to introduce the most popular identification methods and how they are used to identify dead-time processes. Two sets of methods are presented: (i) the methods based on the continuous impulse or step response of the plant and (ii) the least squares and related discrete methods. Readers who wish to broaden their knowledge on this topic should refer to the references given in the Further Reading section.

3.2 Step Impulse Response-based Methods The identification of dead times using real data is not a simple task. The test most used in industry for identifying the model of a stable process is the step test because it allows the simple FOPDT and SOPDT models normally used for tuning PID controllers to be determined. Also, an equivalent impulse test, which has the same properties, can be used for integrative processes. When the process exhibits a dead time L the output remains constant during L units of time after the application of the step input. However, because of the measurement noise, the plant output will not be constant. A simple, but not very efficient, procedure to obtain L consists of previously determining the band noise (Bn ) during normal operation of the process. Then, after the step input has been applied, the output is monitored until it leaves this band and the time measured is used to compute L. This procedure, as well as the rest of identification methods that are presented in this chapter, needs an input signal (in this case a step ∆U ) with a good signal-noise factor (i.e. ∆U > 20Bn ). More complex methods measure several points or characteristics of the step or impulse response of the process to compute the model parameters, including dead-time estimation. Because of the noise, more robust results can be obtained by methods that take into account many points such as the one based on the computation of the area under the step response of the process.

3.2 Step Impulse Response-based Methods

57

45 (t2,YF) YF

y and u

40

y u

35 (t1,YI)

YI

30 UI

25 0

UF

t0

10

20

30

40

50

time

Fig. 3.1. Identification of Kp , L and T in a step test

3.2.1 Graphical Methods Graphical methods are very simple procedures for obtaining the parameters of simple transfer function models based on the step or impulse response. First consider that an FOPDT model P (s) =

Kp −Ls e 1 + Ts

is used. Thus, we have performed the first two steps of the identification procedure (model structure and test definitions). The third step consists of the determination of the parameters Kp , T and L that best fit the data. Figure 3.1 shows the plant output and the control action for a step of amplitude UF − UI applied at t = t0 close to an initial operating point (UI , YI ). The output goes from the initial steady state YI to the final steady state YF . A tangent is drawn to the curve at the point with maximum slope and the crossing points are determined with the line y(t) = YI and with the line that gives the new steady state y(t) = YF (points (t1 , YI ) and (t2 , YF ) in Fig. 3.1 respectively). Thus, L, T and Kp are given by

L = t1 − t 0 ,

T = t2 − t1 ,

Kp =

∆Y YF − YI . = UF − UI ∆U

(3.1)

The steps of the identification procedure are: •

Step 1: In steady state, determine the band noise (Bn ) of the signal and select an input step ∆U with a good signal-noise factor.

58

• • •

3 Identification of Dead-time Processes

Step 2: Apply the step input at t0 and record the values of the plant output until the system reaches the steady state condition again. Step 3: Determine ∆Y , t1 and t2 . Step 4: Compute Kp , T and L using Equations (3.1).

This method can also be applied to an integrative process with a transfer function Kv −Ls e P (s) = s considering a pulse input of adequate amplitude and length instead of a step input (see Exercises 3.1 and 3.2). Note that if a step input is applied to this process the output is not bounded. In some situations, when a stable process is lag-dominant (T >> L), the behaviour close to an operating point can be successfully approximated by an integrative model. Note that if T >> L we can approximate T s + 1 ∼ = T s; thus P (s) =

Kv −Ls Kp −Ls ∼ Kp −Ls e e e = , = 1 + Ts Ts s

K

where Kv = Tp . The model is then a two-parameter model. This model is used in the famous tuning method of PID controllers proposed by Ziegler and Nichols [141], which is presented in Chap. 4. To identify the parameters Kv and L from the step response shown in Fig. 3.1, the following procedure is used. L is computed in the same way as in the previous model and Kv is the slope of the tangent to the curve at the point with maximum slope. In this identification method L is used not only to model the real dead time of the plant but also to take into account its high-order dynamics. The following example illustrates how these simple models can represent the dynamics of a high-order process. Example 3.1: The transfer function P (s) =

5e−10s (1 + 2s)(1 + .5s)(1 + .2s)(1 + .1s)

(3.2)

is used to represent the dynamic behaviour of the process shown in Fig. 3.2. The output is the temperature T of product C at the tank output while the controlled variable is the steam flow in the heat-exchanger. We will compute an FOPDT model to represent this process using the step-test graphical identification method. The step response of the process (y(t)) is shown in Fig. 3.3 by solid lines. The input increment is in this case ∆U = 27 − 25 = 2 and the obtained output variation is ∆Y = 40 − 30 = 10. The step input is applied at t0 = 2 and the tangent at the point of maximum slope of y(t) gives t1 = 12.6 and t2 = 14.9. Thus the identified parameters are L = 12.6 − 2 = 10.6,

T = 14.9 − 12.6 = 2.3,

Kp =

10 = 5. 2

3.2 Step Impulse Response-based Methods product A

59

steam

product B heat exchanger product C tank

TT

Fig. 3.2. Temperature control in a mix process

42 t2=14.9

40 38

y and u

36 34

y ym u

32 30 t1=12.6

28 26 24 0

t0=2

5

10

15 time

20

25

30

Fig. 3.3. Step responses of the process and model

To compare the model to the process, the same step input is applied to it. Figure 3.3 shows the model output ym (t) (dashed line). Note that the FOPDT model is a good approximation of the process for the step-response experiment. 3.2.2 Two-point and Three-point Methods In the two-point and three-point methods the process parameters can be obtained by measuring some particular points in the step response of the process. As in the graphical methods, a step of amplitude UF − UI is applied at t = t0 close to an initial operating point (UI , YI ). The output goes from the initial steady state YI to the final steady state YF .

60

3 Identification of Dead-time Processes

63.2%

45

YF

y and u

40

23.8% YI

y u

35 t1

30

25 0

t2 UF

UI

t0

10

20

30

40

50

time

Fig. 3.4. Identification of Kp , L and T in a step test measuring 2 points

To identify an FOPDT model two times are measured: t1 , the time when the output reaches 28.3 % of the final change in the steady-state value YF −YI , and t2 , when the output reaches 63.2 % of YF − YI . Using these values, the process parameters are given by ∆Y YF − YI , = UF − UI ∆U T = 1.5(t2 − t1 ), L = 1.5[(t1 − t0 ) − 31 (t2 − t0 )].

Kp =

The values obtained by this procedure are similar to the ones computed with the graphic approach (see Exercise 3.3) . Figure 3.4 illustrates the determination of these parameters. The identification procedure is the same as in the method based on the tangent but steps 3 and 4 use the new measurements and formulas. As pointed out in Chap. 2, in some cases a second-order model with a dead time Kp e−Ls (3.3) P (s) = (1 + T1 s)(1 + T2 s) is preferred to obtain a better approximation of the transient response in the first part of the curve after the dead time. In this case four parameters have to be identified and a three-point method is used. First, Kp is computed as in the FOPDT case. Next, the real response is compared to the analytical one

 T2 e−(t−L)/T2 − T1 e−(t−L)/T1 y(t) = YI + Kp ∆U 1 + . T1 − T2

(3.4)

3.2 Step Impulse Response-based Methods

61

Three points of the process step response are measured during the transient t = ti ,

y(ti ) = Yi ,

i = 1, 2, 3.

Finally, substituting (ti , Yi ) in Equation (3.4) three nonlinear equations are obtained relating L, T1 and T2 with the measured data. Thus, L, T1 and T2 are computed solving these equations numerically (Exercise 3.4 proposes an analysis of this case). In all the previous methods, the models were obtained using measurements from the output of the process without considering noise. In general, methods based on the measurement of particular points in the step response of the real process are not robust to measurement noise. This is particularly important in the case of the dead time L, because an error in the estimation of L may cause poor closed-loop performance or further instability. In practice, noise can be reduced by statistical averaging. For instance, collecting data for multiple step inputs and performing averaging computations to estimate the parameters. Another important aspect is to prefilter the data in such a way that an important part of the noise is eliminated. The following example illustrates these points (see also Exercises 3.5 and 3.6). Example 3.2: Consider the process P (s) =

1.5e−12s . (1 + 2s)4

(3.5)

An FOPDT model is computed to represent this process using the two-point identification method. The step response of the process (y(t)) is shown in Fig. 3.5 by a solid line where a noise signal has been added to the output. From the step response, an approximate value of the equivalent time constant T can be computed. Note that y(t) goes, approximately, from 30 to 33 in 15 s. Thus, using the fact that this time is approximately three time constants gives T ∼ = 5s. A low pass filter can be used to eliminate noise without affecting the process dynamics F (s) =

1 , Tf s + 1

Tf = T /10 = 0.5s.

The filtered output yf (t) is shown in Fig. 3.5. The model can be computed with yf (t) shown in Fig. 3.6. The measurement of the final value gives YF = 32.95, while YI = 30.05 is the initial value. Two horizontal lines at 28.3% and 63.2% of the final change in the steadystate value YF − YI are drawn and t1 = 20 and t2 = 23 are obtained. Thus Kp =

32.95 − 30.05 = 1.45, 2

T = 1.5(23 − 20) = 4.5,

and using t0 = 2 gives L = 1.5[(20 − 2) − 13 (23 − 2)] = 16.5. The response of the model ym (t) is shown by a dotted line in Fig. 3.6.

62

3 Identification of Dead-time Processes 34

y and u

32 30

y u

28 26 24 0

10

20

30 time

40

50

60

34

yf and u

32 30

yf u

28 26 24 0

10

20

30 time

40

50

60

Fig. 3.5. Step response of the “real” process: output y(t) and filtered output yf (t)

Note that the model captures the gain with a small error and that the dead time and the dominant time constant successfully represent the first part of the step response.

33.5 33 32.5

y and ym

32 t2=23

31.5 31 30.5

t1=20

30 29.5 0

10

20

30 time

40

50

Fig. 3.6. Parameter identification using two points

60

3.2 Step Impulse Response-based Methods

63

More involved methods for process model identification can be used to obtain small errors in the estimation of the parameters. This point is discussed in the next section. 3.2.3 Area-based Methods As pointed out, better results can be obtained if we use methods that take into account more data, such as the ones that compute the area under the step or impulse response of the process. K e−Ls

p Consider that an FOPDT model P (s) = 1+sT is used to represent the process behaviour. A step change in the control action, from an initial value UI to a final value UF is applied at t = 0. Consider that YI and YF are the initial and the final operation points of the process output, respectively, thus the process is open-loop stable. If an FOPDT model is used the time response of output y(t) can be written as

y(t) = YI

∀t < L,

y(t) = YI + Kp (1 − e

(3.6) − t−L T

)∆U,

∆U = UF − UI

∀t ≥ L,

(3.7)

and the steady state relationship as YF = YI + Kp ∆U.

(3.8)

From Equation (3.8) it is easy to compute the value of Kp . In practice a mean value of YF and YI must be used to avoid the errors introduced by noise YI =

1 δt



ta

YF =

y(t)dt

ta −δt

1 δt



tb +δt

y(t)dt,

(3.9)

tb

when ta is chosen before the application of the step input and tb after the process achieves the new steady state point at YF ; δt > 0 defines the interval used to compute the mean values. Then, Kp is estimated as Kp =

YF −YI . ∆U

(3.10)

To estimate L and T the incremental output δy(t) = YF − y(t) is used δy(t) = Kp ∆U δy(t) = Kp e

− t−L T

∀t < L, ∆U

∀t ≥ L.

Computing the area under δy(t) from 0 to a time τ > L  τ τ −L δy(t)dt = Kp ∆U (L + T − T e− T ). Aτ = 0

(3.11) (3.12)

(3.13)

64

3 Identification of Dead-time Processes

Thus, using Equation (3.13) for τ → ∞, it is possible to compute  ∞ δy(t)dt = Kp ∆U (L + T ) = Kp ∆U Tar , A∞ =

(3.14)

0

where Tar is known as average residence time. Now if τ = T + L = Tar , it follows that  Tar δy(t)dt = Kp ∆U (L + T − T e−1 ) = A∞ − Kp ∆U T e−1 . (3.15) A0 = 0

Using Equations (3.14) and (3.15) and the values of Kp and ∆U T = (A∞ − A0 )

e , Kp ∆U

L=

A∞ − T. Kp ∆U

(3.16)

In practice the procedure has the following steps: • • • • • • •

Step 1: While in steady state, determine the band noise (Bn ) of the signal and select an input step ∆U with a good signal-noise factor. Step 2: Apply the step input and record the values of the plant output until the system again reaches the steady state condition at t = tb . Step 3: Using Equations (3.9) and (3.10) compute YF and Kp . Step 4: Compute δy(t) and the area A∞ using tb instead of ∞ as the final time of the interval. Step 5: Compute Tar using Equation (3.14). Step 6: Compute A0 using Equation (3.15). Step 7: Compute T and L using Equations (3.16).

This procedure is less sensitive to the measurement noise and allows better values of the parameters to be computed. Example 3.3: Figure 3.7 shows a gas fire boiler where the gas valve position V2 is used to control the temperature T of the water. The transfer function e−5s is used to represent the relationship between the variaP (s) = (1+3s)(1+s) tions in V2 and T when the flow of water is constant. A step is applied to the incremental input from 0 to 1 at t = 0, as shown in Fig. 3.8. A noise signal is added to the output of the plant in order to test the accuracy of the identification. The signal to noise relationship s/n is 10. The solution can be improved if the method is applied using more than one set of data. Using different values of the final time tf , a set of values are obtained for each parameter. The mean value of this set is used as the identified parameter. Applying the method described the following values are computed: L = 6, T = 2.85, Kp = 0.97. The step response of the model (ym (t)) is shown in Fig. 3.8 by dashed lines. The MATLAB code for this example is:

3.2 Step Impulse Response-based Methods

65

V1 water

TT

gas V2

Fig. 3.7. Gas fire boiler

1

y and ym

0.8

0.6 y y

m

0.4

0.2

0

−0.2 0

2

4

6

8

10 time

12

14

16

18

20

Fig. 3.8. Step response of the process (solid line) and the identified model (dashed line) using the area method (incremental variables) MATLAB code for the area method % simulates the process with Simulink file sim(’ExperimentAreaMethod’) % obtained data: y and tout; computes Kp (use average value) n=size(y,1); yoo=sum(y(n-9:n))/10; Kp=yoo/U0; % computation of L and T (3 sets of data) for ii=1:3 n0=n-60-ii; dy=yoo*ones(n,1)-y; X=dy(n0)/yoo; % considers only positive X while X < 0; n0=n0-1;X=dy(n0)/yoo; end; n00=n0;TAU=tout(n00); % computes the integrals dI=dy(1)*tout(1); for i=2:n00;dI=dI+dy(i)*(tout(i)-tout(i-1));end;Y1=dI/yoo; Le= (Y1+TAU*((1-X)/(log(X))))/(1+(1-X)/(log(X))); Te=(Le-TAU)/(log(X));Lee(ii)=Le;Tee(ii)=Te; end; % mean values Lem=mean(Lee); Tem=mean(Tee);

66

3 Identification of Dead-time Processes

More complex methods can give better results than those obtained by the area method and can also be applied to high-order systems [134]. The idea is also based on the results of the integrals, but n-order-integrals must be applied and several points in the step response are considered to obtain a sufficient number of equations for computing all the model coefficients. Then, the parameters can be estimated using, for instance, the least squares error method combined with the instrumental variable method [134]. 3.2.4 Model Validation The model validation uses a criterion based on the quadratic index: 1 Ip = tfin − tini



tfin

tini

[y(t) − ym (t)]2 dt,

where tini and tfin are, respectively, the initial and final time of an experiment where the process and model are submitted to the same input signal. It is advisable to use different data to perform the identification and the validation. These two sets of data are known as the identification and validation sets. The following example illustrates this procedure. Example 3.4: Consider a set of five atmospheric tanks connected in series as the one presented in Sect. 2.1.3 where F(i+1)I = FiO . The level of the fifth tank H5 is controlled using the input flow of the first tank F1I . A nonlinear model is used to simulate the dynamic behaviour of each tank: A

 dHi = FiI − K Hi . dt

A noise signal has been added to the output to simulate the real measurement. The response of the process (y(t)) is shown in Fig. 3.9a for a step change in the flow from 35% to 50% at t = 20 and from 50% to 30% at t = 100. The first step response is used for the model identification using an FOPDT model and the two-point identification method (see Fig. 3.9b). The validation uses the data from the second change in the set-point (see Fig. 3.9.c). As can be seen, there is an error in the estimation of the process gain because of the nonlinear characteristic of the process. The MATLAB code for this example, which calculates the value of Ip , is given in the following.

3.3 Least Squares and Related Methods

67

y[cm], u[%]

(a) experiment (2 steps) 100

y u

80 60 40 0

20

40

60

80

100

120

140

160

180

200

(b) identification (first step)

y [cm]

120

YF=100

100

t2=39.5

80 60 40 0

Y =49 I

10

63.2%

O

23.8%

O t1=32 20

30

40

50

60

70

80

90

100

(c) validation (second step)

m

y, y [cm]

100

y y

80

m

I =136

60

p

40 80

100

120

140 time

160

180

200

Fig. 3.9. Step response of the “real” process, identification and validation MATLAB code for model validation % simulates the process with Simulink file sim(’NnonLinearTanks’) % graphical computation of parameters t0=20;t1=32;t2=39.5;YF=100;YI=49;DeltaU=15; % model parameters kp=(YF-YI)/deltaU; T=1.5*(t2-t1); L=1.5*((t1-t0)-(1/3)*(t2-t0)); % model validation using Simulink sim(’NnonLinearTanksValidation’) % computes Ip dT=t(1500)-t(800);e=y(800:1500)-ym(800:1500); Ip=(1/dT)*e’*e;

3.3 Least Squares and Related Methods The method most used for the identification of the parameters of discrete transfer function models is the least squares estimator (LSE) based on the idea of linear regression. These identification algorithms can be carried out in an online manner.

68

3 Identification of Dead-time Processes

3.3.1 The Least Squares Algorithm Consider the discrete model A(z −1 )y(t) = z −d B(z −1 )u(t − 1) + e(t),

(3.17)

where t ∈ Z, A(z −1 ) and B(z −1 ) are polynomials in z −1 A(z −1 ) = 1 + a1 z −1 + a2 z −2 + ... + ana z −na , B(z −1 ) = b0 + b1 z −1 + b2 z −2 + ... + bnb z −nb , and e(t) is a white noise. The process model is related to the transfer function model by B(z −1 )z −1 −d z . P (z) = G(z)z −d = A(z −1 ) We are interested in determining the model parameters ai , bi and dead time d. First consider that d, na and nb are known. The solution of the case where d has to be identified is presented later. With these assumptions, the model is given by y(t) = −a1 y(t−1)−a2 y(t−2)−. . .−ana y(t−na)+b0 u(t−d−1)+b1u(t−d−2)+. . . +bnb u(t − d − nb − 1) + e(t), which can be written in a vector form as y(t) = φT (t)θ + e(t), where φT (t) = [ −y(t − 1) . . . −y(t − na) u(t − d − 1) . . . u(t − d − nb − 1) ] is the n × 1 regression vector and θ = [ a1 a2 . . . ana b0 b1 . . . bnb ]T is the 1 × n parameter vector and n = na + nb + 1. Consider that the initial time is t = 0 and a sequence of outputs y(t) for t = 1, 2, . . . , N are computed. Thus y(t) = φT (t)θ + e(t),

t = 1, 2, . . . , N.

This can be written as Y = Φθ + ǫ, where

Y = [ y(1) y(2) . . . y(N ) ]T , Φ(t) = [ φ(1) φ(2) . . . φ(N ) ]T ,

3.3 Least Squares and Related Methods

69

ǫ = [ e(1) e(2) . . . e(N ) ]T . Thus ǫ = Y − Φθ.

ˆ using The objective is to compute an estimation of the vector parameters (θ) T the data y(t) and φ (t), such that the identification error e(t) = y(t) − yˆ(t) is minimised. The least squares estimator is defined as the vector θˆ that minimises the quadratic error V (θ) = ǫT ǫ = (Y − Φθ)T (Y − Φθ), V (θ) = YT Y − θT ΦT Y − YT Φθ + θT ΦT Φθ. Making the gradient of V (θ) equal zero −2ΦT Y + 2ΦT Φθ = 0.

If ΦT Φ is not singular, θˆ is given by

θˆ = (ΦT Φ)−1 ΦT Y. Notice that Φ depends on past inputs and outputs and that this condition can be fulfilled if the input signal sequence is adequately chosen in such a way that the obtained φ vectors are linearly independent. This point is analysed in detail in the following section. The following example illustrates the application of the LSE to a simple case. Example 3.5: Consider that a second-order model with a dead time of five samples y(t) = −a1 y(t − 1) − a2 y(t − 2) + b0 u(t − 5 − 1) is used to identify the process behaviour. In this case, na = 2, nb = 0 and d = 5. Suppose that the following data has been obtained using a unitary step at t = 0 in u(t) at the operating point (0, 0) u(t) = 0

∀t < 0, y(t) = 0

y(6) = 0.65,

u(t) = 1

∀t ≥ 0,

t = 0, 1, ...5,

y(7) = 0.85,

y(8) = 0.92.

For this case the regression vector is φ(t) = [ −y(t − 1) −y(t − 2) u(t − 5 − 1) ]T , and the parameter vector is

70

3 Identification of Dead-time Processes

θ = [ a1 a2 b0 ]T . The matrix Φ is computed using the data from t = 5 to t = 8 ⎡ ⎤ ⎤ ⎡ 0 0 0 0 ⎢ 0 ⎢ 0.65 ⎥ 0 1⎥ ⎥ ⎥ Φ=⎢ Y=⎢ ⎣ −0.65 0 1 ⎦ , ⎣ 0.85 ⎦ , −0.85 −0.65 1 0.92

giving

θˆ = [ −0.3077 −2.013 0.65 ]T . This gives the following model y(t) = −0.3077y(t − 1) − 2.013y(t − 2) + 0.65u(t − 6), which gives the same output as the process up to t = 7 for a step input. If the amount of data is increased a better model can be obtained. This is analysed in the following. 3.3.2 Choice of Input Sequence To obtain a small error in the estimation of the model parameters, the input signal and the experiment must verify some special properties. The input signal must be “rich in frequencies”, which means that the input−output data will be collected by exiting the process in a wide range of frequencies. Furthermore, the length of the experiment must be great enough to generate the necessary data. In practice, pseudo random binary sequences (PRBS) are normally used as input signals. They are sequences of width modulated rectangular pulses with a spectrum rich in frequencies. Their spectrum approximates the white noise spectrum very well, especially when the length of the sequence is large enough. The MATLAB code u = idinput(N,’prbs’,[0 B],[Umin, Umax]) generates a PRBS with length N, where B is such that the signal is constant over intervals of length 1/B and Umin and Umax defines the minimum and maximum values of u. Some practical recommendations for the choice of the input sequence and the test length are [54]: •

The maximum duration of a pulse must be greater than the rise time of the process plus the dead time in order to allow for the correct identification of the static gain.

3.3 Least Squares and Related Methods



The length of the test must be at least equal to the length of the sequence. To avoid tests of extremely long duration it is possible to choose the frequency of the PRBS (fb ) as a sub-multiple of the sampling frequency fs fb =



71

1 fs = , k kTs

k = 2, 3, ...

The magnitude of the PRBS must be small when compared to the input process signals to maintain the process close to the operating point. However, the signal to noise ratio must be chosen as high as possible. If, because of the process and/or noise characteristics, the signal to noise relation is small, the length of the test must be increased.

Following the previous recommendations and considering white noise disturbances the least squares estimator gives a correct estimation of the parameters. However, the practical implementation is not carried out using the procedure presented but by considering a recursive computation. 3.3.3 Recursive Least Squares One of the advantages of the identification procedure based on the least squares estimator is that it can be used recursively because the parameter vector estimated at time t can be computed as a function of the parameter vector estimated at t − 1. Consider the estimation at t computed as ˆ = (ΦT (t)Φ(t))−1 ΦT (t)Y(t), θ(t) where the regression matrix can be written as Φ(t) = [ φ(1) φ(2) . . . φ(t − 1) φ(t) ]T =

Φ(t − 1) φT (t)



and the output vector is written as Y(t) = [ y(1) y(2) . . . y(t − 1) y(t) ]T = [ YT (t − 1) y(t) ]T . Defining

Γ(t) = (ΦT (t)Φ(t))−1

it is possible to write T  Φ(t − 1) Φ(t − 1) , φT (t) φT (t)



Φ(t − 1) T −1 Γ (t) = Φ (t − 1) φ(t) = ΦT (t − 1)Φ(t − 1) + φ(t)φT (t), φT (t) Γ−1 (t) = ΦT (t)Φ(t) =

Γ−1 (t) = Γ−1 (t − 1) + φ(t)φT (t).

72

3 Identification of Dead-time Processes

ˆ Using these recursive relations in the computation of θ(t)



Y(t − 1) T T ˆ , θ(t) = Γ(t)Φ (t)Y(t) = Γ(t) Φ (t − 1) φ(t) y(t) or equivalently



ˆ = Γ(t) ΦT (t − 1)Y(t − 1) + φ(t)y(t) , θ(t) ˆ = Γ(t)[Γ−1 (t − 1)θ(t ˆ − 1) + φ(t)y(t)]. θ(t)

Using

Γ−1 (t − 1) = Γ−1 (t) − φ(t)φT (t),

ˆ and substituting in the equation of θ(t)    ˆ = Γ(t) Γ−1 (t) − φ(t)φT (t) θ(t ˆ − 1) + φ(t)y(t) θ(t)

gives

ˆ = θ(t ˆ − 1) + Γ(t)φ(t)[y(t) − φT (t)θ(t ˆ − 1)]. θ(t) Defining the adaptation gain Ω(t) as Ω(t) = Γ(t)φ(t) and the estimation error ee (t) as ˆ − 1) ee (t) = y(t) − φT (t)θ(t gives ˆ = θ(t ˆ − 1) + Ω(t)ee (t). θ(t) This expression has a simple interpretation as a proportional feedback controller. For instance, when the estimation error at t − 1 is small, the estiˆ will be mated value of the parameters is good and so the modification in θ(t) small. Remarks [62, 71, 54]: 1. Because each new measure represents a smaller proportion of the total number of measures as times grows and therefore less and less weight to the new prediction errors, the recursive least square algorithm has a decreasing adaptation gain. A modification of the recursive form of Γ−1 allows a variable adaptation gain to be obtained Γ−1 (t) = λ(t − 1)Γ−1 (t − 1) + φ(t)φT (t), 0 < λ(t) ≤ 1,

Γ(0) > 0,

where λ(t) can be adjusted to modify the gain.

3.3 Least Squares and Related Methods

73

2. When the gain increases with time, the weight on past data decreases. Because of this, λ(t) is known as the forgetting factor. This type of procedure is appropriate for slow time varying parameter systems. 3. For simplicity, in the examples of this chapter only a constant forgetting factor λ(t) = λ will be used as a tuning parameter. The algorithm is executed recursively using the following: • • •

Step 1: Initialisation of θˆ and Γ and definition of λ. Step 2: With the past data form φ. Step 3: For each loop compute the “new values” with the “old data” X=

[Γ/λ]φ , 1 + φT [Γ/λ]φ

θˆnew = θˆold + X[y(t) − φT θˆold ], Γnew = [I − XφT ][Γold /λ]. 3.3.4 Dead-time Identification In the previous description of the recursive least squares estimator (RLSE) algorithm, a known dead time has been considered. This is not the case in many situations in practice where d has to be estimated together with ai and bi . To obtain an estimation of the dead time d based on the different RLSE approaches can be taken. One approach consists of defining the degree of the B(z −1 ) polynomial long enough to capture the dead time. Note that an equivalent plant model can be defined with d = 0 and with a B(z −1 ) polynomial with a fairly high degree. After the identification of B(z −1 ) the dead time can be estimated using the first coefficients of this polynomial with bi = 0,

i = 0, 1, 2, ..., n0 ⇒ dˆ = n0 + 1.

In this case the degree of B(z −1 ) (nb) in the RLSE must be chosen to capture the dead time and also the dynamics of the dead-time-free process. Thus, normally nb > dmax + 2 where dmax is the maximum of the expected dead time. If some information of the dead-time variation is known, for example an interval of variation d ∈ [dmin , dmax ] d = dmin is used in the model of the RLSE and nb is chosen as nb > dmax − dmin + 2. After identification, if the first coefficient(s) of B(z −1 ) are null, the value of d in the model of the RLSE is increased and a new identification is performed.

74

3 Identification of Dead-time Processes cooling water LC

reflux overhead CC

feed

Fig. 3.10. Overhead control composition on a distillation column

It is clear that when the measurements are corrupted by noise, the first coefficients of B(z −1 ) will not be zero. A rule of thumb is to use the ratio between the coefficients to determine if a certain bi must be considered zero. For example if the RLSE has been applied using d = dmin and the obtained b0 and b1 are such that b0 < 0.15b1, the dead time is increased by one d = dmin + 1 and a new identification test is performed to verify if the new model is better than the previous one [54]. In general if bi < 0.15bk+1 ,

i = 0, 1, 2, ..., k ⇒ d = dmin + k + 1.

The following example illustrates this procedure. Example 3.6: Figure 3.10 shows the schematic diagram of the overhead composition control in a distillation column. The reflux (u(t)) is used to control the overhead composition (y(t)). The following model is used to represent the process behaviour: y(t) = −ay(t − 1) + b0 u(t − d − 1) = −0.9y(t − 1) + 0.1u(t − 4). The model parameters a = 0.9, b0 = 0.1 and d = 3 must be identified. An a priori estimation of the dead time is considered and it is assumed that dˆ = 2 for considering the model y(t) = −ˆ ay(t − 1) + ˆb0 u(t − 3) + ˆb1 u(t − 4), where two coefficients in B(z −1 ) have been defined in order to determine a possible error in the dead time. Using these data, a recursive least squares algorithm is used. In the example, the noise/signal factor is 0.1 and the forgetting factor is 0.99.

3.3 Least Squares and Related Methods

75

y (−), ym (−−) output

1 0.5 0

a

0 1

500

1000

1500

500

1000

1500

500

1000

1500

1000

1500

0.5 0 0 0.2

b0

0.1 0

b1

−0.1 0 0.2 0.1 0 0

500 samples

Fig. 3.11. Plant and model output and parameter identification. Case d = 2

Figure 3.11 shows the evolution of the plant output (y(t)), model output (ym (t)) and estimated parameters when the dead time of the model is set to dˆ = 2. As can be seen, parameter ˆb0 goes to zero and ˆb1 goes to 0.1, which implies that the dead time of the process is greater than 2. Note that ˆb1 = 0.1 identifies the static gain. In the second experiment the model in the identification is changed, using dˆ = 3. The results of the new experiment are shown in Fig. 3.12. Note that now ˆb0 goes to 0.1 and ˆb1 goes to zero. Thus, the dead time of the model is correct and ˆb0 identifies the static gain. The MATLAB code used for the least square algorithm for this example is (see the whole file of the example in the website of the book): MATLAB code for the RLSE % recursive part of the algorithm for k=d+3:max(size(y)) % process simulation y(k)=ap(1)*y(k-1)+bp*u(k-dp-1)+rui*(rand(1)-0.5); % RLSE part: la=lambda; Ga=Gamma; th=theta fi=[y(k-1);u(k-1-d);u(k-2-d)]; X=(Ga/la)*fi/(1+fi’*Ga*fi/la); th=th+l*(y(k)-fi’*th); Ga=(I-X*fi’)*Ga; Ga=Ga/la; a(k)=th(1); b0(k)=th(2); b1(k)=th(3); end;

76

3 Identification of Dead-time Processes y (−), ym (−−) output

1 0.5 0

a

0 1

200

400

600

800

1000

1200

1400

1600

200

400

600

800

1000

1200

1400

1600

200

400

600

800

1000

1200

1400

1600

200

400

600

800 samples

1000

1200

1400

1600

0.5 0 0 0.2

b0

0.1 0

b1

−0.1 0 0.2 0.1 0 0

Fig. 3.12. Plant and model output and parameter identification. Case d = 3

A different solution for the problem of dead-time estimation consists of the combination of the RLSE and an optimisation procedure. Having a value of the expected dmin and dmax , the RLSE algorithm is applied in parallel to a set of dmax −dmin +1 models, all having the same A(z −1 ) and B(z −1 ) polynomial orders but with different dead times di = dmin + i,

i = 0, 1, 2, ..., (dmax − dmin ).

Comparing the error between the output of models and the real process a performance index is computed for each model Ipi =

t=N 1  | y(t) − yˆi (t) |2 , N t=1

where yˆi (t) is the output of the i model. The best model is chosen as that which gives the lowest Ipi . The dead time of the best model is then considered as the best estimation of the dead time. The following example illustrates this procedure. Example 3.7: Using the same process, the same A(z −1 ) and B(z −1 ) as in Example 3.6, five dead-time models are used for identification di = i,

i = 0...5

3.3 Least Squares and Related Methods

77

0.251 0.2508 0.2506 0.2504

Ip

0.2502 0.25 0.2498 0.2496 0.2494 0.2492 0.249 0

0.5

1

1.5

2 2.5 3 model dead−time

3.5

4

4.5

5

Fig. 3.13. Ip (d) for d ∈ [0, 5]

and the performance index is computed for each model. Figure 3.13 shows the results obtained. As can be seen the minimum of the function Ip (d) is obtained close to the correct value d = 3. This can also be done using a nonlinear optimisation problem (the function Ip (d) is nonlinear) in parallel with the identification algorithm. A dead time is proposed and the rest of the parameters are obtained with the RLSE, Ipi is computed and the optimiser defines the successive changes in the dead time in order to minimise the index. To have an initial estimation of d these RLSE based methods are combined with step or impulse response methods that allow a first approximation of the dead time to be determined. 3.3.5 Effect of Random Disturbances The plant measured output is generally contaminated by noise. These disturbances cause errors in the determination of the model parameters. This type of error is called the “bias” of parameters. The least squares estimator only gives an unbiased estimation if the disturbance is a white noise. To show this, consider the expressions of the estimated vector of parameters θˆ = (ΦT Φ)−1 ΦT Y and the real output vector Y = Φθ + ǫ. Substituting Y in the expression of θˆ gives

78

3 Identification of Dead-time Processes

θˆ = (ΦT Φ)−1 ΦT [Φθ + ǫ], θˆ = (ΦT Φ)−1 ΦT Φθ + (ΦT Φ)−1 ΦT ǫ, θˆ = θ + (ΦT Φ)−1 ΦT ǫ. ΦT ǫ and ΦT Φ can be written as ΦT ǫ =

N 

φ(t)e(t),

t=1

ΦT Φ =

N 

φ(t)φT (t).

t=1

Thus θˆ = θ +



−1   N N 1  1  T φ(t)φ (t) φ(t)e(t) . N t=1 N t=1

To obtain θˆ = θ when N → ∞ we compute lim

N →∞



−1 N 1  T φ(t)φ (t) , N t=1

which is not singular because we suppose that the system is correctly excited. Thus, θˆ = θ will be obtained if   N 1  lim φ(t)e(t) = E{φ(t)e(t)} = 0, N →∞ N t=1 that is, the expected value of φ(t)e(t) must be zero. Note that φ(t) is a function of the past disturbance values e(t − k) and thus, this condition is equivalent to E{e(t − k)e(t)} = 0, k = 1, 2, ... This condition is only true in the case in which e(t) is a white noise. The white noise assumption is normally not true in practice, where the disturbances can be better represented using a model q(t) = C(z −1 )e(t), where C(z −1 ) is a polynomial C(z −1 ) = 1 + c1 z −1 + c2 z −2 + ... + cnc z −nc .

3.3 Least Squares and Related Methods

79

Thus, the real process is more adequately represented by a model that includes this more complex model of disturbances A(z −1 )y(t) = z −d B(z −1 )u(t − 1) + C(z −1 )e(t).

(3.18)

Using this new model, it is possible to formulate a new least squares estimator called the “extended least squares estimator” that allows a white estimation error to be obtained. For this new model y(t) = −a1 y(t−1)−a2 y(t−2)−. . .−ana y(t−na)+b0 u(t−d−1)+b1u(t−d−2)+. . . +bnb u(t − d − nb − 1) + e(t) + c1 e(t − 1) + . . . + cnc e(t − nc),

which can be written in a vector form as

y(t) = φT0 (t)θ + e(t), where φ0 (t) = [ −y(t − 1) . . . −y(t − na) u(t − d − 1) . . . u(t − d − nb − 1) e(t − 1) . . . e(t − nc) ]T ;

and

θ = [ a1 . . . ana b0 . . . bnb c1 . . . cnc ]T .

This equation can be solved using the least squares estimator if the values of the disturbance e(t − k) (k = 1, 2, ...) are available. Using an estimation of the parameters θˆ = [ a ˆna ˆb0 . . . ˆbnb cˆ1 . . . cˆnc ]T , ˆ1 . . . a an estimation of e(t) can be computed as ˆna y(t − na) − ˆb0 u(t − d − 1) − . . . e(t) = y(t) + a ˆ1 y(t − 1) + . . . + a and using

−ˆbnb u(t − d − nb − 1) − cˆ1 e(t − 1) − . . . − cˆnc e(t − nc), φ(t) = [ −y(t − 1) . . . −y(t − na) u(t − d − 1) . . .

gives or equivalently

u(t − d − nb − 1) eˆ(t − 1) . . . eˆ(t − nc) ]T ˆ eˆ(t) = y(t) − φT (t)θ, y(t) = φT (t)θˆ + eˆ(t).

This equation is equivalent to the one used in the least squares estimator with white noise disturbance as the effect of the previous disturbances has been eliminated. Thus, with this modification the estimator gives a solution without bias. Note that entire the analysis presented for the RLSE is valid for this new problem only by tacking into account that the number of parameters is increased.

80

3 Identification of Dead-time Processes

3.3.6 Practical Aspects Some practical rules can help to improve the results of the identification experiment [54, 62]. •

Elimination of the DC component. The models used to represent the process behaviour were obtained by considering incremental signals and linear behaviour close to an operating point. Therefore, as in the step test method, the DC components corresponding to the operating point must be eliminated from the data before the application of the RLSE estimator. When these DC components are stationary they can be eliminated by subtracting the mean value from the data. When they are not stationary, incremental filtered signals (uf (t), yf (t)) are computed from the original data (u(t), y(t)) using yf (t) =





1 − z −1 y(t), 1 − af z −1

uf (t) =

where af is the tuning parameter (normally af ∈ [0, 0.5]). Scaling inputs and outputs. Note that the values of y(t) and u(t) are used in Φ(t) and this matrix defines the gain of the RLSE algorithm. Thus, if the values of y(t) and u(t) are very different, the identifier matrix gain is unbalanced and the convergence of ai and bi will also be very different. The scaling can be carried out making all the variables less than 1 in magnitude, which implies dividing each variable by the maximum expected or allowed change [124]. This can change the identified static gain and a correction must be made. Coping with integrative processes. If the process has integrative action and this is known a priori, it is possible to reduce the order of the model considering P (z) = If a new input uf (t) uf (t) =



1 − z −1 u(t), 1 − af z −1

P ′ (z) . z−1

1 u(t) 1 − z −1

is used to carry out the identification, only the parameters of P ′ (z) are identified. Note that this is equivalent to the impulse application in the step-response method. Selection of na, nb and nc. In the literature there are some methods to choose model complexity, which are associated to na, nb and d [54, 62]. Here, only some practical rules are given. In most cases in industry, loworder models are used (na ≤ 3). Typically na = 2 and nc = na are used. The relationship between nb and the dead time has been discussed in Sect. 3.3.4. We consider here that d is known; in this case nb must be chosen such that nb ≥ d + 2 because at least two coefficients are necessary to

3.4 Varying Dead Times

81

l S f(t)

TT

Fig. 3.14. Fluid transportation with variable flow



identify the fractional dead time (see Sect. 2.2.3). In practice nb = 2 is a good starting value. Model validation. The model validation can use the same criterion and the same recommendations relative to the data as in the step response methods.

3.4 Varying Dead Times In practice, there are several industrial processes where the dead time is caused by the time taken to transfer material to the position of the sensor. In these cases, the dead time depends inversely on the transportation velocity. Thus, the measurement of this velocity can be used to estimate the dead time of the model. Consider the case where a heated fluid is pumped through a pipe of length (l) and section (S) as in Fig. 3.14. The pump imposes a flow f (t) inside the pipe. In steady state conditions, the residence time of the fluid within the pipe is given by tr = l/v, v being the constant fluid velocity (v = f /S). In this case, the dead time can easily be estimated using L = tr . In cases where the flow values change during the process operation, the distance x covered by the fluid in a certain period of time tx is given by  tx v(t)dt. (3.19) x= 0

Thus, the value of the residence time has to be obtained by using it as an upper limit in the integration of the fluid velocity in order to obtain the length of the pipe:  tr l= v(t)dt (3.20) 0

allowing the dead time L = tr to be obtained. In practice, when the flow is measured online, Equation (3.20) can be used to estimate L. The implementation of this expression is made in the discrete domain as follows.

82

3 Identification of Dead-time Processes

We will suppose that the flow values change at each sampling time Ts but that Ts is chosen in such a way that f (t) ∼ = f (kTs ),

t ∈ [kTs , (k + 1)Ts ),

which is a reasonable hypothesis in practice if Ts is correctly chosen. Thus, an approximation can be made to estimate the transport dead time of the system as an integer multiple n of the sampling time. At each sampling time kTs (k ∈ Z) the distance dxk that can be covered by the fluid during one sample (Ts ) with corresponding flow f (kTs ) is given by Ts f (kTs ) . dxk = S Using a discrete-time approximation of Equation (3.20) which accounts for different values of the flow during different sampling intervals, the value of n can be computed at each sampling as follows t

1 l= v(t)dt = S t−tr 

i=n Ts  f [(k − i)Ts ]. f (t)dt ∼ = S i=0 t−tr



t

(3.21)

Note that computing l in Equation (3.21) can be done by adding a backward sequence of flows until Equation (3.21) holds. This essentially means checking when enough fluid has been pumped to fill up the pipe. Thus, the dead time of the process can be estimated by the following relation L = nTs .

(3.22)

In this computation, an error of Ts /2 can be generated. In general the obtained n is such that n >> 1, thus this error can be neglected. This dead-time-estimation algorithm is quite easy to use because: (i) the digital implementation of the dead-time estimator in Equations (3.21-3.22) is very simple and does not need any tuning parameter, and (ii) only the values of l and S need be measured or estimated in the real process. The same idea as this estimator can be used in other cases where an available signal gives information about the process dead time. This type of algorithm can not only be used for identification purposes but also in a adaptive control structure [75]. For example, in the Smith predictor controller presented in Chap. 5, the dead-time model used in the predictor can be adjusted online during operation.

3.5 Summary This chapter presents a review of the most popular methods to identify dead-time processes. The step and impulse response methods are the most widely used in practice to obtain continuous models, while the recursive

3.7 Exercises

83

least squares estimator is applied when discrete models are used. Details of how to identify unknown and variable dead times are given.

3.6 Further Reading The identification of FOPDT and SOPDT models from step and impulse responses has been studied in several books [14, 4] and papers [66, 107, 46] from different points of view and by different methods. A good review and a general method for the identification of any order process based on the step response is presented in [134]. For details and further studies on discrete identification methods, including the least squares estimator, we refer to the excellent books of Ljung [62] and Landau and Zito [54].

3.7 Exercises 3.1. Using a pulse input of amplitude δp and length τp determine the formulas to compute the parameters of the model P (s) = Ksv e−Ls using the graphical method in Sect. 3.2.1. 3.2. Apply the results of the previous exercise to P (s) =

2e−5s s(1+2s)(1+s) .

3.3. Identify an FOPDT model for the process in Example 3.1 using the twopoint method. Compare the results with the ones in Example 3.1. Repeat the identification using noise in the simulations. 3.4. Create a MATLAB code for the three-point identification method. 3.5. Repeat Exercise 3.2 considering a measurement perturbed by noise. Apply several pulses and compute an average of the obtained parameters. Compare the average model to the one obtained in Exercise 3.2. 3.6. Consider the data generated by the MATLAB code: % process unitary step response at t=0 p=tf(1,[1 3 3 1]); t=0:.1:10; [y,t]=step(p,t); dead=zeros(1,20);yd=[dead y’]; td=0:.1:12; dim=max(size(td)); r = 0.1.*rand(dim,1); yp=yd+r’;

Identify a model using the two-point method and a low pass filter F (s) =

1 0.2s + 1

at the process output. Compare the results with the ones in Exercise 3.5 using the index  tf 1 [y(t) − ym (t)]2 dt Ip = tf − ti ti where ti and tf are, respectively, the initial and final time of the experiment.

84

3 Identification of Dead-time Processes

3.7. Repeat Exercise 3.6 using the three-point method and compare the results. 3.8. Using the RLSE MATLAB code in the book website identify an FOPDT model and a SOPDT model for the process in Exercise 3.2. Use two different methods to estimate the dead time and compare the results. 3.9. Repeat the previous exercise for the process P (s) =

1.2e−8s (1+s)2 (1+5s) .

4 PID Control of Dead-time Processes

This chapter presents methods for the analysis and design of PID controllers for dead-time processes. It also introduces some basic concepts related to process control that are used in the following chapters.

4.1 Introduction PID controllers are widely used in all types of industries. In process control, more than 95% of the control loops are PID [4, 127]. In multivariable advanced control, as in model predictive control, the strategies are hierarchically organised in such a way that PIDs are used in the lower level and the multivariable predictive algorithm generates their set-points. This is due to the fact that PIDs allow, with a simple feed-back algorithm, steady state offsets to be eliminated and reasonable closed-loop performance to be achieved in several simple processes. PIDs are nowadays integrated in distributed systems and have several sophisticated functions added to the basic algorithm, such as feedforward action, automatic tuning, etc. Several works have reported that poor tuning and configuration errors are commonly found in the industrial application of PIDs [4, 127]. Because of this, new studies and tuning procedures have been developed in recent years for PID algorithms. In particular, and because of their importance for the process industry, several methods have considered a process representation using low-order linear models with a dead time. This chapter presents some of these methods. The chapter begins by showing why PID controllers can be used to control simple dead-time processes. After this a predictor based tuning method is presented. Some traditional tuning rules are studied in the sequence and finally some real time applications are presented.

86

4 PID Control of Dead-time Processes

r(t) + _

e (t)

u( t) +

PID

q (t) +

P(s)

y (t)

Fig. 4.1. Control system with a PID controller

4.2 Can PID Be Used to Control Simple Dead-time Processes? As has been shown in Chap. 2, an efficient way of to controlling a deadtime process is using a predictor based control structure. It is a known fact that PID controllers are commonly used to control dead-time processes with reasonable success, at least in some cases. To understand the importance of PIDs for controlling for dead-time processes, it is useful to interpret PIDs as predictive controllers. The control action of an ideal standard1 PID controller u(t) can be computed as  de(t) 1 t ], (4.1) e(τ )dτ + Td u(t) = Kc [e(t) + Ti 0 dt where e(t) = r(t) − y(t) is the error between the reference (r(t)) and output (y(t)) signals (see Fig. 4.1). Kc is the proportional gain, Ti is the integral time and Td the derivative time. The transfer function of this controller is C(s) =

U (s) 1 = Kc (1 + + Td s). E(s) Ti s

(4.2)

The PD action can be viewed as a linear prediction of the error in t + Td using the information in t (from now on denoted as eˆ(t + Td | t)) uP D (t) = Kc [e(t) + Td

de(t) ] = Kc eˆ(t + Td | t), dt

(4.3)

that is, eˆ(t + Td | t) is computed using the first two terms of the series expansion of e(t + Td ) (see Fig. 4.2). The standard formula of PID is not the only way to implement the control algorithm; other PID structures can also be used such as the series form with transfer function C(s) = kc

(1 + TI s) (TD s + 1), TI s

(4.4)

or the parallel form described by 1

We adopt the PID classification of standard, series and parallel used by Astro¨ m and H¨agglund [4].

4.2 Can PID Be Used to Control Simple Dead-time Processes?

87

e (t)

e (t)

e ( t +T d ) e^( t +T d | t )

t

t +T d

t

Fig. 4.2. Interpretation of derivative action as linear prediction

^ ^r ( t +T D ) e ( t +T D ) r(t) k c (1+ T I s ) + 1 +T D s _ TI s ^y ( t +T D )

q (t) + +

P(s)

y (t)

1 +T D s

Fig. 4.3. Prediction in the PID controller

C(s) = KP +

KI + KD s s

(4.5)

depending on the specific application or the hardware of the industrial controller to be used [4]. Consider the PID in the series form controlling a dead-time process P (s) = G(s)e−Ls . The diagram in Fig. 4.1 is equivalent to the scheme shown in Fig. 4.3. From this scheme, the input signal to the PI controller e˜(t) is dy(t) dr(t) − y(t) − TD , dt dt which can be considered as the predicted error e˜(t) = r(t) + TD

e˜(t) = eˆ(t + TD ) = rˆ(t + TD ) − yˆ(t + TD ) if the approximation in Equation (4.3) is used. If the derivative time is chosen equal to the dead time (TD = L), the PI controller will see a prediction of the error at t + L. When this prediction introduces a small error, eˆ(t + TD ) ∼ = e(t + TD ), the PI controller can be tuned for the dead-time-free process. This condition is only satisfied when the variation of e(t) is smooth in the interval (t, t + TD ). In terms of dead time, the previous situation is obtained when the dead time L is smaller than the dominant time constant of the closed-loop T0 .

88

4 PID Control of Dead-time Processes

This interpretation clearly shows the importance of the correct tuning of the derivative action of the PID controller when the process dynamics exhibits a dead time. In this case, when correctly tuned, this “predictive action” may improve the performance obtained with a PI controller. The three ideal representations of the PID controller given in Equations (4.2), (4.4) and (4.5) cannot be implemented in practice, because the degree of the numerator is higher than the degree of the denominator (C(s) is improper). A low pass filter is normally used in the derivative action to make it proper. For example, for the standard form, the transfer function of this part of the controller is D(s) Kc (Td s) , (4.6) D(s) = αTd s + 1 where α ∈ (0, 1). For industrial controllers, the value of α normally varies between 0.05 and 0.5. This parameter can be used to adjust the attenuation of noise and also the robustness of the closed loop, as will be seen later. The filter can also be considered as a filter in cascade with the PID controller to give a proper transfer function C(s) =

Kc (1 +

1 Ti s

+ Td s)

αTd s + 1

.

(4.7)

For the series form the transfer function is C(s) = kc

(1 + TI s) TD s + 1 TI s αTD s + 1

(4.8)

and for the parallel form C(s) = KP +

KD s KI + . s αKD s + 1

(4.9)

Note that the tuning of the different actions (P, I or D) must take into account the definition of each structure. An example will be used to illustrate the effect of the derivative action. Example 4.1: Consider the control system of the heated tank in Fig. 4.4. The temperature is measured at two points at different distances from the tank output. The controller can use the signal from point A or point B by changing the switch. The dynamics relating the control action U and the temperature 1 e−Ls . In position A the can be modelled with an FOPDT model P (s) = 1+1.5s dead time L is 0 and in position B the dead time L is 0.5. Consider first the case of L = 0 and a PI controller with tuning TI = 1.5, kc = 2.5. The closedloop response has no overshoot and a settling time ts ∼ = 3 s (see the dashed lines in Fig. 4.5). If the second sensor is used, the dead time changes to L = 0.5; the closedloop response with the PI has oscillations and a long settling time (see the solid lines in Fig. 4.5). This effect is caused by the dead time.

4.2 Can PID Be Used to Control Simple Dead-time Processes?

89

F W

F TT

TT

u

A

B

TC

output and set−point

Fig. 4.4. Heated tank control system

1.5 1 0.5 0 0

y for L=0.5 y for L=0 set−point 1

2

3

4

5 time

6

7

8

9

10

4

control action

3 2 1 0 −1 0

u for L=0.5 u for L=0 1

2

3

4

5 time

6

7

8

9

10

Fig. 4.5. Closed-loop step response and control action for the PI in Example 4.1. Dead times L = 0 and L = 0.5

To improve the performance obtained with the PI for case L = 0.5, the derivative action of the PID can be tuned to predict the error in t + L. Several methods can be used to tune TD and some of them will be discussed later. In this case, a small value of TD is considered to observe the effect on the closedloop. The PID is used in series form with a low pass filter in the derivative action with α = 0.1. Maintaining the original tuning of the PI (TI = 1.5, kc = 2.5) and using TD = 0.18, the step response can be improved, as shown by the solid lines in Fig. 4.6. Note that (i) a smaller overshoot and settling time than in the PI case is obtained and (ii) the price to pay for this faster response is a higher value of the control action in the transient. The linear approximation used by the PID controller to predict the future error is only valid for small dead times and slow variations of the output signal; that is,

4 PID Control of Dead-time Processes

output and set−point

90

1.5 1 y for TD=0.18

0.5

y for TD=0.5 0 0

set−point 1

2

3

4

5 time

6

7

8

9

10

25 u for TD=0.18

control action

20

u for TD=0.5

15 10 5 0 −5 0

1

2

3

4

5 time

6

7

8

9

10

Fig. 4.6. Closed-loop step response and control action for the case L = 0.5 with the PID in Example 4.1: TD = 0.18 and TD = 0.5

it depends on the velocity of the closed-loop response. If, the value of TD in the example is increased, the closed-loop behaviour may deteriorate because the prediction error increases. For example, if TD = 0.5, which is the dead time and in theory the derivative action should approximate the dead time, the response shown in Fig. 4.6 is too oscillatory. It is clear that better tuning of the PID can be achieved to improve the response obtained. The objective of the example is to show that the derivative action can be used, if properly tuned, to improve performance. This simple example also confirms the difficulties associated with the tuning of PID controllers for dead-time processes and illustrates the robustness problems related to errors in modelling the dead time. These aspects will be discussed in detail in the following sections, but it is important to note that the difficulty associated to tuning the derivative action is, perhaps, one of the most important reasons why operators switch it off in many cases [4]. Dead times impose limits on performance that must be considered when controlling a dead-time process. An analysis of these limitations based on the ideal solution of prediction is presented in the next section.

4.3 PID for Dead-time Processes: The Prediction Approach

r(t) + _

C e (s) + _

C (s)

q (t) + + P(s)

91

y (t)

G n (s)- P n (s) Fig. 4.7. Equivalent diagram of the SP

4.3 PID for Dead-time Processes: The Prediction Approach In Chap. 2 it was shown that the SP can achieve excellent responses for a dead-time process because the predictor eliminates the effect of the dead time on the closed-loop characteristic equation. Thus, in the following, a method based on the prediction ideas is used to derive a PID tuning rule to control dominant-dead-time processes. 4.3.1 The Equivalent Controller of the SP The SP controller presented in Chap. 2 is shown in Fig. 4.7. Using this block diagram, an equivalent controller Ce (s) can be computed. In this structure Ce (s) is C(s) . (4.10) Ce (s) = 1 + C(s)[Gn (s) − Pn (s)]

The order of Ce (s) depends on the order of Gn (s), which normally defines the order of the primary controller C(s). Note that Ce (s) is not a rational function because Pn (s) has a dead time. Consider a process model described by   Kp e−Ls Kp Pn (s) = Gn (s) = 1 + Ts 1 + Ts and the primary controller as C(s) =

K1 (1 + T1 s) , T1 s

which is enough to fit the closed-loop behaviour of the dead-time-free process. The PI can be tuned by cancelling the open-loop model pole (T1 = T ). The characteristic equation is given by 1 + C(s)Gn (s) = 1 +

1 K1 Kp =1+ , Ts T0 s

and the closed-loop transfer function is

T0 =

T , K1 Kp

92

4 PID Control of Dead-time Processes

Y (s) C(s)Gn (s) −Ls 1 = e e−Ls . = R(s) 1 + C(s)Gn (s) 1 + T0 s T0 can be used as a tuning parameter to define the closed-loop performance. The equivalent controller is given by Ce (s) =

1+

K1 (1+T s) Ts K1 Kp −Ls ) T s (1 − e

=

K1 (1 + T s) . T s + K1 Kp (1 − e−Ls )

(4.11)

This controller has integral action (note that s = 0 is a root of the denominator T s + K1 Kp (1 − e−Ls )) and can be approximated by a PID if the dead time is substituted by a polynomial approximation. 4.3.2 PID Approximation If a P11 (s) Pad´e approximation of dead time is used in Equation (4.11), 1−sL/2 P11 (s) = 1+sL/2 , it follows that Ce (s) = Ce (s) =

K1 (1 + T s) T s + K1 Kp (1 −

1−sL/2 1+sL/2 )

K1 (1 + T s)(1 + 0.5Ls) T s(1 + 0.5Ls +

K1 Kp L ) T

=

=

K1 (1 + T s) , sL T s + K1 Kp 1+sL/2

K1 (1 + T s)(1 + 0.5Ls) T s(1 +

0.5Ls K K L 1+ 1 T p

)(1 +

K1 Kp L ) T

(4.12) .

(4.13)

Ce (s) can be made equal to a series PID controller with a filter in the derivative action kc (1 + TI s)(1 + TD s) , (4.14) Ce (s) = TI s(1 + αTD s) where TI = T, TD = 0.5L and 1 T 1 α= . , kc = = L K1 Kp L (L + T0 )Kp 1 + 1+ T T

0

Ideally, the closed-loop time constant T0 can be tuned arbitrarily. However, in reality, the limit in performance that can be achieved depends on the approximation used to obtain controller Ce (s). Some important characteristics of this design must be pointed out and are analysed in the following: • •

This PID tuning can be derived using the internal model control approach; the PID obtained can be considered as the result of a pole placement design based on the approximated model of the process Pm (s) =



Kp (1 − sL/2) , (1 + T s)(1 + sL/2)

(4.15)

the PID obtained cancels the process pole at s = −1/T , thus, this tuning has the same advantages and drawbacks of a pole-zero cancellation based approach.

4.3 PID for Dead-time Processes: The Prediction Approach

r(t) + _

G c (s)

q (t) + u( t ) + P(s) P m (s)

93

y (t)

_

+

Fig. 4.8. IMC control structure

4.3.3 Internal Model Control Interpretation Internal model control (IMC) [113, 70] is a model based design control method. The idea of IMC is shown in Fig. 4.8. As can be seen, the method uses a model of the process Gm (s) and a primary controller Gc (s) internally. It is clear that the SP can be considered a particular case of the IMC for the case of dead-time processes (see Exercise 4.3). As in the SP, if Pm (s) = P (s), that is perfect modelling is considered, Gc (s) can be chosen as Gc (s) = P −1 (s) to achieve perfect set-point tracking. To increase robustness, a low pass filter ∗ (s) of P −1 (s) must F (s) is included in Gc . Furthermore, an approximate Pm be used when the exact inverse does not exist (for example, in the case of dead times). Note that the IMC structure can be also transformed into a unitary feed-back structure with an equivalent controller CIMC (s). Thus, using ∗ (s) gives Gc (s) = F (s)Pm CIMC (s) =

∗ F (s)Pm (s) . ∗ (s)P (s) 1 − F (s)Pm m

In the case of the FOPDT model, the dead time is approximated by e−Ls ≈ Using F (s) =

1 1+sTf

, Pm (s) =

CIMC (s) =

1 − 0.5Ls . 1 + 0.5Ls

Kp 1−0.5Ls 1+sT 1+0.5Ls

∗ (s) = and Pm

(4.16) 1+sT Kp

, CIMC (s) is

1 + sT 1 + 0.5Ls T , (Tf + L)Kp sT 1 + 0.5Tf L s Tf +L

which is the same series PID controller derived with the SP if T0 = Tf . Table 4.1 shows IMC tuning. 4.3.4 Pole Placement Design If the Pad´ee approximation P11 (s) is used to approximate dead time in the process model

94

4 PID Control of Dead-time Processes Table 4.1. PID tuning based on the IMC approach Controller

kc

Series PID

T Kp (L+Tf )

Pm (s) =

TI TD T L/2

α Tf L+Tf

Kp (1 − sL/2) , (1 + T s)(1 + sL/2)

(4.17)

a proper series PID controller that cancels the two poles of Pm (s) is Cx (s) =

kx (1 + T s)(1 + 0.5Ls) , T s(1 + 0.5αLs)

(4.18)

where the values of kx and α (0 < α < 1) can be used to define the desired closed-loop transfer function. For a fast response without overshoot, a double pole in s = −1/T0 is chosen. Due to the cancellation, the closed-loop transfer function is Kp kx

1−0.5Ls

Cx (s)Pm (s) T s(1+0.5αLs) = H(s) = K k 1−0.5Ls 1 + Cx (s)Pm (s) 1 + pT x s(1+0.5αLs) =

αLT 2 2Kp kx s

1 − 0.5Ls , + ( KpTkx − L/2)s + 1

which should be equal to the desired closed-loop transfer function Hd (s) = 1−sL/2 (T0 s+1)2 . Thus αLT = T02 , 2Kp kx



T − L/2 Kp kx



= 2T0 .

Solving these two equations, the gain is kx =

2T , (L + 4T0 )Kp

and the relationship between the parameter α and T0 is α=

4T02 . (L + 4T0 )L

(4.19)

The difference between this controller and the IMC equivalent controller is the final gain kx , which is computed for a different closed-loop poles. Exercise 4.4 analyses the complete computation of the controller parameters and compares the tuning with the IMC one. For typical values of T0 this solution

4.3 PID for Dead-time Processes: The Prediction Approach

95

gives approximately the same performance as the one derived in the IMC tuning. However, when these two methods are used to derive a tuning rule for integrative processes, the pole placement approach gives better results (see Sect. 4.4.4 and Exercise 4.4). It is important to note that because of the pole-zero cancellation used in the two designs, the disturbance rejection response will be poor if the cancelled pole is slow in comparison to the desired closed-loop ones. This is analysed in the following. 4.3.5 Pole-zero Cancellation Analysis Pole-zero cancellation of slow dynamics must be avoided when the disturbances enter at the process input. In the previous cases, for the proposed PID tuning, the transfer functions relating the reference and the disturbance and the output are C(s)P (s) kc Kp (1 + TD s)e−Ls Y (s) , = = R(s) 1 + C(s)P (s) sT (1 + αTD s) + kc Kp (1 + TD s)e−Ls sT Kp (1 + αTD s) P (s) e−Ls Y (s) = = , Q(s) 1 + C(s)P (s) 1 + sT sT (1 + αTD s) + kc Kp (1 + TD s)e−Ls (the analysis is valid for the two cases as kc can be equal to kx , thus we use C(s) to represent the controller) and thus, the open-loop pole at s = −1/T (s) is always a closed-loop pole of YQ(s) . Consider that the dead time is L 3T0 ). As has been mentioned, this problem almost disappears when the time constant is not dominant. Furthermore, the advantage of this approach is that the tuning is also valid for bigger L/T relationships if T0 is appropriately tuned. This

output and set−point

4.4 Robust PID Tuning for Dead-time Processes

97

1 0.8 0.6 0.4

y for T0=1

0.2

y for T0=1.5 set−point

0 0

5

10

15 time

20

25

30

2

control action

1.5 1 0.5 u for T0=1

0 −0.5 0

u for T0=1.5 5

10

15 time

20

25

30

Fig. 4.10. Closed-loop response for Example 4.2 (case L = 2) for the predictor based PID for T0 = 1.5 and T0 = 1

is illustrated considering a greater dead time (L = 2) in the process and tuning the PID with a big value of T0 . Now using T0 = 1.5 and T0 = 1 and the same MATLAB code gives, in both cases, TI = 1.5 and TD = 1. T0 = 1.5 gives kx = 0.375 and α = 0.5625, while T0 = 1 gives kx = 0.5 and α = 0.3333. The obtained closed-loop responses are shown in Fig. 4.10, where now the disturbance is applied at t = 15. Note that in this case, the setpoint and disturbance rejection responses have similar settling times. In this case T0 dominates the closed-loop response. If small values of T0 are used, the obtained responses are too oscillatory. As can be seen, the predictor approach gives a PID tuning with satisfactory closed-loop responses for dominant-dead-time processes, although it has some tuning limitations in the case of lag-dominant processes. Moreover, the previous development does not consider the case of integrative processes. Thus, in the following section the method for tuning a PID controller for dead-time processes based on the previous ideas is completed. The analysis considers not only the closed-loop performance but also robustness.

4.4 Robust PID Tuning for Dead-time Processes The previous method based on the idea of prediction is the base of the tuning rules derived in this section. The tuning rules are derived for the dif-

98

4 PID Control of Dead-time Processes

ferent PID structures. For the case of open-loop-stable processes with dominant dead time, a two degree of freedom structure is presented. Later, the results are extended to integrative and lag-dominant processes and finally, robust tuning of the three cases is presented. 4.4.1 Tuning for the Dominant Dead-time Case In the analysis of this section the process is modelled by P (s) =

Kp e−Ls , (1 + T s)

L ≥ 2T,

and the PID controller is initially in the series form C(s) =

kc (1 + T s)(1 + 0.5Ls) . T s(1 + 0.5αLs)

(4.20)

The closed-loop specifications consider a nominal set-point response and a nominal disturbance rejection without oscillations and small overshoot (less than 10%). Furthermore, robust stability is desired when considering modelling errors, principally in the estimation of the dead time. Finally, the closed-loop response should be as fast as possible taking the previous specifications into account. To achieve this, kc and α are designed for a double pole at s = −1/T0 using the approximate model of the process; this means, in the ideal case, a closed-loop response without overshoot for all values of T0 . If the process is equal to the model, this tuning guarantees quick responses without oscillations and governed by s = −1/T0 real poles. Using the relationship between T0 and α (Equation (4.19)) it is possible to relate T0 to L L T0 = [(α2 + α)1/2 + α] . 2 This is an important property of the closed-loop system obtained. The tuning can be parameterised with L; that is, the nominal performance is always the same in an L-scaled time. Note that when the dead time is dominant, there is not much interest in speeding up the closed-loop response because (a) it would have little effect in the overall time response (including the dead time) and (b) a less robust closed-loop system would be obtained. Low values of α mean that closed-loop poles are allocated in a region of the complex plane where the Pad´e approximation of the dead time is not valid. In these cases, errors between the model and the process are important and the time response has high frequency components that generate oscillations. This means that the system performance is limited by model errors and that this effect is important for small α values. This problem is similar to that of high-order plants modelled with low-order models, where closedloop poles must be allocated considering unmodelled dynamics.

4.4 Robust PID Tuning for Dead-time Processes

99

output and set−point

1.5 1 0.5

y for α=0.1 y for α=0.3 y for α=0.5 set−point

0 −0.5 0

50

100

150

time

control action

2.5 2 1.5 1

u for α=0.1 u for α=0.3 u for α=0.5

0.5 0 0

50

100

150

time

Fig. 4.11. System responses in closed-loop of Example 4.3 with the proposed PID for α = 0.1, α = 0.3 and α = 0.5

In actual practice, dynamics model errors and parameter estimation uncertainties must be considered. As is shown in the following sections, parameter α is related to controller robustness and must be tuned using a compromise between performance and robustness. The following example illustrates the effect of α on performance. Example 4.3: Consider the process P (s) and the model Pn (s) P (s) =

e−9.7s , (1 + s)(1 + .5s)(1 + .25s)(1 + .125s)

Pn (s) =

e−10s . 1.5s + 1

We will analyse the effect of α on the closed-loop response. The controller parameters TI = 1.5 and TD = 5 are the same in all cases. Three different values of α are used: [0.1; 0.3; 0.5] and the corresponding controller gains are computed as kc = [0.166; 0.1086; 0.0829]. Figure 4.11 shows the closed-loop response of the system for the three cases. In the simulations, a step change of the set-point from 0 to 1 is applied at t = 5 and a step disturbance of −0.8 is introduced at t = 75. Note that the best disturbance rejection response is obtained with α = 0.3, which corresponds approximately to T0 = 0.4L. As can be seen, if α grows the response is too sluggish because the filter of the PID is dominant. At the other extreme, for a small value of α the response is too oscillatory. It is clear then that α should be used as a parameter to achieve a good compromise between performance and robustness. Thus, the final tuning will be defined after the robustness analysis.

100

4 PID Control of Dead-time Processes

In practice, the implementation of the PID can be carried out using different structures and not only the series form derived in this section. Thus in the following section the relationships between the series form and some of the other structures are presented. 4.4.2 Tuning for Standard and Parallel PIDs The series PID C(s) =

kc (1 + T s)(1 + 0.5Ls) T s(1 + 0.5αLs)

is equivalent to C(s) =

kc [1 + (T + 0.5L)s + 0.5LT s2] . T s(1 + 0.5αLs)

It can be compared to the standard PID with a reference filter C(s) = Kc (1 +

1 1 + Td s) , Ti s 1 + sTf

which is equivalent to C(s) =

K c 1 + T i s + T i T d s2 . Ti s(1 + sTf )

Thus, the standard tuning is

Kc =

kc (T + 0.5L) , T

Ti = T + 0.5L,

Td =

0.5T L , T + 0.5L

Tf = 0.5αL.

For the parallel PID with a low pass filter C(s) = (KP +

1 KI + KD s) s 1 + sTF

the relationships are

KP =

kc (T + 0.5L) , T

KI =

kc , T + 0.5L

KD = 0.5Lkc ,

TF = 0.5αL.

Exercise 4.5 proposes the analysis of the other configurations. In some cases, the set-point response can have a bigger overshoot than that desired, principally if the process allows for low values of α and a faster disturbance response. In these cases a reference filter can be used to improve the set-point response without changing the regulatory capability of the controller. This is analysed in the following.

4.4 Robust PID Tuning for Dead-time Processes

r(t)

F (s)

+ e (t) _

C (s)

u( t) +

q (t) +

P(s)

101

y (t)

Fig. 4.12. Two-degree-of-freedom PID

4.4.3 Two-degree-of-freedom PID After defining α, the closed-loop poles of the transfer functions Y (s)/R(s) and Y (s)/Q(s) are fixed. However, the zeros of these two transfer functions are different. Normally, when the PID is tuned to achieve a fast disturbance rejection response without oscillations and small overshoot, a high overshoot is observed in the set-point response. This overshoot is caused by the zeros of the controller that also have the effect of speeding up the step response. Note that the zeros of the PID only appear at the transfer function Y (s)/R(s). Thus, when the closed-loop specification requires a nominal set-point response with a small overshoot, a two-degree-of-freedom controller must be used. This can be achieved using an independent reference filter or a PID with weighting gains in the proportional and derivative actions. This PID controller is called a two-degree-of-freedom PID (2DOF-PID). In the standard form with a low pass filter the 2DOF-PID computes U (s) as U (s) = Kc [(bR(s) − Y (s)) +

U (s) = −Kc [1 +

1 E(s) + Td s(cR(s) − Y (s))] , Ti s 1 + Tf s

1 Y (s) 1 R(s) + Td s] + Kc [b + + cTd s] , Ti s 1 + Tf s Ti s 1 + Tf s

(4.21)

(4.22)

where b ≥ 0 and c ≥ 0 define the set-point weighting. This controller acts as a normal PID for changes in the disturbance and adds a reference filter for the set-point changes, as shown in Fig. 4.12. The equivalent C(s) and F (s) for this scheme are

C(s) =

K c 1 + T i s + T i T d s2 , Ti s(1 + sTf )

F (s) =

1 + bTi s + cTi Td s2 . 1 + T i s + T i T d s2

Note that the filter cancels the two zeros introduced by the PID controller and allocates another two zeros that allow the overshoot and rise time of the setpoint response to be adjusted. These filters can also be derived for the series and parallel PIDs (see Exercise 4.6) but, for simplicity, only this structure is used in the analysis.

102

4 PID Control of Dead-time Processes

Note that when b = c = 1, no reference filter is used and if c = 0 the derivative action acts only on the disturbance rejection response. This is a common choice in practice to avoid strong variations in the control action when a change in the set-point is introduced. Thus, after the selection of α, b and c are defined to change the zeros of the final Y (s)/R(s). The desired overshoot and rise time are obtained using values of b and c that allocate the closed-loop zeros in an adequate position. If a five parameter PID cannot be used (some industrial PIDs do not allow b and c to be selected) a simple filter F (s) =

1 + βTr s 1 + sTr

can be selected, where Tr = L/2 is chosen in order to eliminate the effect of the dominant zero (note that the two zeros are at s = −1/T and s = −2/L) introduced by the controller and β > 0 is tuned for a compromise between overshoot and rise time. In general, values of b, c and β ∈ (0.2, 0.6) give good results for many cases. In practice, the tuning of these parameters is simple and intuitive. If the PID does not allow the use a reference filter the solution is to tune α for a compromise between disturbance rejection and set-point responses. The following example illustrates the use of the 2DOF structure. Example 4.4: Consider the plant P (s) simulated using a four-order system e−12s e−10s plus a dead time P (s) = (1+s) 3 (5s+1) and the model Pn (s) = 1+6s . The closed-loop response must have almost no overshoot. Two PIDs are tuned using Pn (s); PID1 without the reference filter and PID2 with the reference filter. A high value of α must be chosen in PID1 to avoid the overshoot. Using α = 0.5, the results are shown in Fig. 4.13 (solid lines). As can be seen, the settling time of the response deteriorates using a high value of α. The MATLAB code for the computation of the controller is: MATLAB code for the PID design % model data and alpha Kp=1; T=6; L=12; alpha=0.5; % Series PID parameters TI=T; TD=0.5*L; T0=(sqrt(alpha*alpha+alpha)+alpha)*L/2; kc=(2*T)/((4*T0+L)*Kp); % Controller transfer function num=conv([TI 1],[TD 1]); den=conv([TI 0],[alpha*TD 1]); C=tf(kc*num,den);

To improve the response, the second controller (PID2) uses a small value of α. The tuning is done by decreasing α until faster disturbance rejection without many oscillations is obtained. For the example, α = 0.3 was chosen. In the second step the reference filter is tuned. In this case, only the proportional action is weighted, thus c = 1. The value of b is used to eliminate the overshoot of the set-point response. A small value of b gives a sluggish response

output and set−point

4.4 Robust PID Tuning for Dead-time Processes

103

1 0.8 0.6 0.4

y for α=0.5 y for α=0.3, b=0.8 set−point

0.2 0 0

20

40

60

80

100 time

120

140

160

180

200

control action

2 1.5 1 0.5 0 0

u for α=0.5 u for α=0.3, b=0.8 20

40

60

80

100 time

120

140

160

180

200

Fig. 4.13. Results for Example 4.4 with PID1 (α = 0.5) and PID2 (α = 0.3, b = 0.8)

and b = 0.8 is selected to obtain the same overshoot as that obtained with PID1. The MATLAB code for the computation of the filter is: MATLAB code for the reference filter design % define b and c b=0.8; c=1; % Filter nf=[0.5*c*T*Le b*(T+0.5*Le) 1]; df=conv([T 1],[Le/2 1]); F=tf(nf,df);

The closed-loop response obtained with PID2 is shown in Fig. 4.13. Note that the performance with the PID with the filter is better than that obtained with the PID without the filter, mainly in the disturbance rejection response. The method described can only be applied to stable processes. However, with a simple modification, the results can be extended to the integrative case. This is discussed in the following section. 4.4.4 Integrative Processes Dead time and integrative behaviour make PID tuning more difficult. Special tuning rules must be derived for this case if a performance similar to that in the stable case is desired. Here, the idea is to maintain the simplicity of the tuning method and prediction approach. To use the results of the stable case, a three-step based method is given.

104

4 PID Control of Dead-time Processes

r (t)

+ e (t)

F '(s)

C '(s)

_

u( t) + + _

q (t) +

P(s)

y (t)

Ko

Fig. 4.14. Integrative process controlled by Ko gain and PID with reference filter

Step 1: Stabilisation In the first step, a proportional control Ko (see Fig. 4.14) is tuned. This transforms integrative system dynamics into a stable process. Due to the system dead time, Ko must be carefully chosen in order to avoid oscillatory responses in the inner closed-loop. Using the same dead-time approximation as in −Ls is modelled with the stable case, the process P (s) = Kv es Pi (s) =

Kv (1 − 0.5Ls) . s(1 + 0.5Ls)

(4.23)

From the root locus diagram, it is possible to calculate Ko such that the inner closed-loop has poles with a damping of 0.75 (to generate responses with and the new less than 5% overshoot). Thus, the Ko final value is Ko = K0.5 vL transfer function between u′ (t) and y(t) in Fig. 4.14 (with dead-time approximation) is given by P2 (s) =

1

Kv (1−0.5Ls) s(1+0.5Ls) Kv (1−0.5Ls) + Kos(1+0.5Ls)

=

2Kv L(1 − 0.5Ls) . 1 + 1.5Ls + L2 s2

(4.24)

Step 2: PID Stable Design In the second step, the PID controller C ′ (s) is tuned using the same pole-zero cancellation procedure as presented for the stable case. However, a standard filtered formulation is needed as the series PID does not allow complex zeros C ′ (s) = Kc′ (1 + C ′ (s) =

1 1 + Td′ s)( ), Ti′ s 1 + Tf′ s

(4.25)

Kc′ 1 + Ti′ s + Ti′ Td′ s2 . Ti′ s(1 + sTf′ )

To obtain the same type of open-loop transfer function as in the stable case C ′ (s)P2 (s) = K the following values are selected

1 − 0.5Ls , s(1 + 0.5γLs)

4.4 Robust PID Tuning for Dead-time Processes

• • • •

105

Ti′ = 1.5L, Td′ = 2L/3, Tf′ = 0.5γL, with γ > 0, K=

2Kc′ Kv L . Ti′

In this case γ has the same effect as α in the stable case. If K has the same value as the corresponding gain in the stable case (K = 4T02+L ), the tuning gives the same approximated closed-loop transfer function with a double pole in s = −1/T0 K=

2Kc′ Kv L 2 2Kc′ Kv L = . = ′ Ti 1.5L 4T0 + L

Thus Kc′ =

1.5 1 Kv 4T0 + L

(4.26)

and the corresponding γ T0 = 0.5L[γ + (γ 2 + γ)1/2 ] = Lf (γ).

(4.27)

Note that this is the same expression as obtained in the stable case. Again, a new parameter (γ) defines robustness characteristics of the system. Step 3: Reference Filter As in the stable case, a reference filter is necessary to attenuate the overshoot of the set-point response. It is clear that the scheme presented in Fig. 4.14 used for the derivation of the PID controller can be transformed into the scheme of Fig. 4.12. The relationships between F ′ (s), Ko , C ′ (s), C(s) and F (s) are given by C(s) = Ko + C ′ (s),

F (s) =

F ′ (s)C ′ (s) , C(s)

where it can be observed that C(s) is also a PID controller as desired. Filter F (s) is easily tuned directly after the computation of C(s), as in the stable case. The structure in Fig. 4.14 could be inconvenient for implementation, not in computer dedicated systems but in industrial ones. The final 2DOF-PID controller with parameters Kc , Ti , Td , Tf , b, c is then equivalent to the pair C(s) = Kc (1 + F (s) =

1 1 + Td s)( ), Ti s 1 + Tf s

1 + bTi s + cTi Td s2 . 1 + T i s + T i T d s2

(4.28) (4.29)

106

4 PID Control of Dead-time Processes Fw Fw

W water

RF FC

TT steam

Fig. 4.15. Temperature control in a boiler with a cascade configuration

The parameters Kc , Ti , Td , Tf can be computed using the relationships Kc = Kc′ + Ko , Ti = (1 +

Ko ′ )T , Kc′ i

Tf = Tf′ = 0.5γL, Td =

Kc′ Td′ + Ko Tf′ Kc′ + Ko

(4.30) .

(4.31)

These parameters can be related to the tuning parameter γ substituting Kc′ , Ti′ , Td′ , Tf′ and Ko

 1 3 Kc = 1+ , Ti = 2L[f (γ) + 1], 2Kv L 4f (γ) + 1

 L 4 + γ(4f (γ) + 1) γL Td = . , Tf = 8 f (γ) + 1 2 b > 0, c > 0 are chosen, as in the stable case, to allocate the closed-loop zeros rs of the system. As in the stable case a simple filter F (s) = 1+βT 1+Tr s can be used, with correct tuning of Tr and β. The following example illustrates the tuning procedure and the effect of the reference filter. Example 4.5: Consider the process in Fig. 4.15 where a cascade control scheme is used. A steam-flow control (F C in Fig. 4.15) is used to maintain the steam flow at the desired value. A PID controller must be designed to control the outlet temperature of the water T . The control action of the PID is the reference signal RF for the local steam-flow controller. The transfer function between the steam-flow reference and the tempera2e−5s . An IPDT model with ture has been computed as P (s) = s(1+s)(1+.5s)(1+.1s) Kv = 2 and L = 6.7 was used to approximate P (s) and to tune the PID. The tuning was done as follows. First γ = 0.2 was chosen for a good disturbance rejection response maintaining b = c = 1 (the reference is not filtered). Next, b and c were used to obtain a small overshoot in the step response. The starting point was b = c = 0.5. Using simulation, the final tuning was b = 0.43 and c = 0.5. The performance of the closed-loop system is shown in Fig. 4.16 both for the case with b = c = 1 and those with b = 0.43, c = 0.5. In the simulations, a unitary step is applied at the set-point at t = 10 and a −0.05 step

output and set−point

4.4 Robust PID Tuning for Dead-time Processes

107

y for γ=0.2 y for γ=0.2, b=0.43, c=0.5 set−point

1.5 1 0.5 0 0

10

20

30

40

50 time

60

70

80

90

100

0.4 u for γ=0.2 u for γ=0.2, b=0.43, c=0.5

control action

0.3 0.2 0.1 0 −0.1 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 4.16. System responses in the closed loop for the PID without the reference filter and with the reference filter for Example 4.5

disturbance is introduced at t = 50 s. Note that with b = c = 1 the set-point response has a high overshoot because of the effect of the zeros. The effect of the parameter γ and the reference filter for this case is qualitatively the same as in the stable case. However, the effect is observed for all values of γ (see Exercise 4.7). The two tuning rules derived consider the extreme cases of the deadtime-dominant stable processes (L >> T ) and the integrative processes. The lag-dominant-stable case is analysed in the following. 4.4.5 Lag-dominant Processes To complete the analysis of the tuning of the PID controller, the case of lagdominant processes is considered; that is, when T >> L. As mentioned, for stable processes, the proposed PID cancels the process pole at s = −1/T . (s) . Thus, s = −1/T is also a closed-loop pole of the transfer function YQ(s)

(s) In the nominal case, the approximate closed-loop transfer function YQ(s) will have three poles: A double pole at s = −1/T0 and a single pole at s = −1/T . When the process is not lag-dominant, the dominant closed-loop poles at s = −1/T0 cannot be selected to be faster than the open-loop pole in order to maintain robustness. However, if T >> L the closed-loop poles can be faster than −1/T . Therefore, when T >> L the closed-loop pole at

108

4 PID Control of Dead-time Processes

s = −1/T will produce a sluggish disturbance rejection response. The suggested solution for this case is to use an integrative model for the PID tuning. In this case, the following approximation is used

P (s) =

Kv e−Ls Kp e−Ls ∼ Kp e−Ls = , = Ts + 1 Ts s

Kv = Kp /T, T >> L.

Thus, the PID tuning is defined with Kv and L. This allows the proposed method for all processes modelled by FOPDT or IPDT models and for every relationship L/T to be used. The following example illustrates tuning for a lag-dominant process. Example 4.6: Consider the process P (s) = •



e−s 1+8s

and two PID controllers:

PID1 (stable-predictor-based-tuning) This controller uses the parameters of the stable model: Kp = 1, T = 8 and L = 1. Thus TI = T = 8, TD = L/2 = 0.5. α = 0.26 is used for a fast set-point response giving kc = 6. As the overshoot is small, the filter is not used, thus b = c = 1. PID2 (integrative-predictor-based-tuning) In this case the controller is tuned using the parameters for the integrative model: Kv = Kp /T = 1/8 and L = 1. γ = 0.26 and a reference filter with b = c = 0.6 are used to obtain a set-point response similar to the previous one.

The performance of the closed-loop system for the two controllers is shown in Fig. 4.17. In the simulations, a unitary step is applied at the setpoint at t = 10 and a step disturbance of amplitude 2 is introduced at t = 20 s. As can be seen, the disturbance rejection response of the PID with the integrative-predictor-based-tuning (solid lines) is much better than the PID with the stable-predictor-based-tuning (dashed lines). However, as expected, the set-point response is similar. To complete the analysis, the same case is analysed for different T /L relationships, to define when to use the integrative model to tune PID controller. Normalising the models with the dead time: T ′ = T /L, s′ = Ls, it follows that ′



e−s e−s , P = , P1 = 2 1 + s′ T ′ s′ T ′ where the effect of T ′ can be studied. Figure 4.18 shows two situations: Case 1 for T ′ = 4 and case 2 for T ′ = 2. PID1 is tuned using the parameters for stable models and PID2 is tuned using the parameters for the integrative case. In the simulations, a step disturbance of amplitude 2 is introduced at t = 5 s. As can be seen, in case 1, the disturbance rejection response of the PID with the integrative-predictor-based-tuning (solid lines) is much better than the one obtained with the PID with the stable-predictor-based-tuning (dashed lines). However, for case 2 the performance is similar. Thus, the recommendation

4.4 Robust PID Tuning for Dead-time Processes

109

output and set−point

1.5

1

0.5 y for stable−PID y for integ−PID set−point

0 0

5

10

15

20

25 time

30

35

40

45

50

25 u for stable−PID u for integ−PID

control action

20 15 10 5 0 −5 0

5

10

15

20

25 time

30

35

40

45

50

Fig. 4.17. System responses in the closed loop for the stable-predictor-based-tuning (dashed lines) and for the integrative-predictor-based-tuning (solid lines)

is to use the tuning rule based on the integrative model for stable processes with T /L > 2. This simulation result can be analysed using the closed-loop relationship derived previously. Notice that the faster response without oscillations, obtained in all the examples of the previous section, gives approximately T0 = 0.5L. As the pole at s = −1/T0 is a double pole, the approximate equivalent time constant of the closed-loop response is Teq ∼ = 1.5T0 = 0.75L. Thus, the effect of the time constant T should be considered important when 2Teq < T < 3Teq → 1.5 < T /L < 2.25, which gives a value of T /L close to the one obtained in the simulations. From these results, it can be concluded that the proposed PID tuning can give good results if a reasonably closed-loop time response is required. If a high performance is required (a small closed-loop time response) the approximation used for dead-time modelling is no longer valid and performance deteriorates. In practice, the error in the dead-time approximation is not the only difference between the real plant and its model. Thus, in order to guarantee

4 PID Control of Dead-time Processes

u (case T/L=2)

y (case T/L=2)

u (case T/L=4)

y (case T/L=4)

110

0.4 0.2 0 0

y for stable−PID y for integ−PID set−point 5

10

15

20

25

time 0

u for stable−PID u for integ−PID

−2 −4 0

5

10

15

20

25

time 1 y for stable−PID y for integ−PID set−point

0.5 0 0

5

10

15

20

25

time 0

u for stable−PID u for integ−PID

−2 −4 0

5

10

15

20

25

time

Fig. 4.18. System responses in the closed loop for the stable-predictor-based-tuning (dashed lines) and for the integrative-predictor-based-tuning (solid lines): Case 1 with T /L = 4 and case 2 with T /L = 2

robustness, other effects such as unmodelled dynamics and errors in the determination of the gain and time constant must be considered in the controller design procedure. This will be analysed in the following section in a unified study of stable and integrative processes. 4.4.6 Robustness Analysis The robust stability of the closed loop can be analysed in a simple way taking into account that P (s) belongs to a family of linear models described as P (s) = Pn (s) + ∆P (s) = Pn (s)(1 + δP (s)). The nominal model is represented by Pn (s) and ∆P (s) (δP (s)) is an additive (multiplicative) description of the modelling errors. The following hypotheses are made: (i) All the plants have the same number of poles on the right side of the s-plane and (ii) ∆P (ω) and δP (ω) are the bounds for the additive and multiplicative uncertainties, respectively. A general condition for robust stability [124] of the closed-loop is analysed and then the results are applied to the PID controller. Consider the characteristic closed-loop equation 1 + C(s)P (s) = 1 + C(s)(Pn (s) + ∆P (s)) = 0, where C(s) is the controller in cascade with the process (see Fig. 4.12). A polar diagram of the system is shown in Fig. 4.19.

4.4 Robust PID Tuning for Dead-time Processes

111

Imag -1

Real

B

C ( jw )[ P n ( jw )+

P( jw )]

A

C ( jw ) P n ( jw )

Fig. 4.19. Polar diagram for robust stability study of PID

First, the polar diagram of C(jω)Pn (jω) is computed. Consider that the controller stabilises the nominal plant and that the −1 point is not encircled by C(jω)Pn (jω). In the diagram, the distance between C(jω)Pn (jω) and the −1 point is represented, for each frequency, by | −1 − C(jω)Pn (jω) |=| 1 + C(jω)Pn (jω) | . This distance can be used as a measure of the closed-loop robustness. Now suppose that the modelling error is known and that the polar diagram for C(jω)(Pn (jω) + ∆P (jω)) can be computed as shown in Fig. 4.19. If the −1 point is not encircled by the new diagram, then the real system is stable and the distance between real and nominal curves (represented by | C(jω)∆P (jω) |, see points A and B in the diagram) is smaller than | 1 + C(jω)Pn (jω) | for all frequencies. This can be expressed as follows | C(jω)∆P (jω) |> T and a general integrative process P2 (s) given by e−Ls e−Ls , L/T = 10, P2 (s) = 1 + sT s and assume a 30% dead-time-estimation error. The PID tuning is defined for three different values of α and γ. To analyse the robustness condition the frequency has been normalised, ωn = Lω. Figures 4.20 and 4.21 show the exact values of dPe (ωn ) and dPi (ωn ) computed with Equation (4.34) for these three cases. In each figure, the modelling error δP (ωn ) is depicted (solid line) to show the robust tuning of the controller. Note that the condition dP (ω) >| δP (ω) | is approximately valid, for α > 0.2 in the stable case and for γ > 0.3 in the integrative case. With this method, it is possible to tune the α (γ) parameter. P1 (s) =

4.4 Robust PID Tuning for Dead-time Processes

113

1

10

dPe(α=0.3) dPe(α=0.4) dPe(α=0.5)

magnitude

|δP|

0

10

−1

10

−1

0

10

10 normalised frequency

1

10

Fig. 4.20. Exact dPe (ωn ) for α = 0.2, α = 0.3 and α = 0.4 and modelling error for Example 4.7 1

10

dPi(γ=0.3) dPi(γ=0.4) dPi(γ=0.5)

magnitude

|δP|

0

10

−1

10

−1

10

0

10 normalised frequency

1

10

Fig. 4.21. Exact dPi (ωn ) for γ = 0.3, γ = 0.4 and γ = 0.5 and modelling error for Example 4.7

As α (γ) also defines the closed-loop performance, it is possible to choose its value in order to guarantee a closed-loop frequency response module (the inverse of dP (ω)) with the desired characteristics. Using these results and the performance analysis of the previous sections, it is possible to conclude that a good compromise between performance and robustness is obtained using α ∈ [0.3, 0.4] and γ ∈ [0.4, 0.5].

114

4 PID Control of Dead-time Processes 4

3.5

Maximum sensitivity

3

2.5

2

1.5

1

0.5

0 0

0.1

0.2

0.3

0.4

0.5 α

0.6

0.7

0.8

0.9

1

Fig. 4.22. Maximum sensitivity for different values of α

Another way to define robustness when modelling errors are not estimated is by using the maximum sensitivity Ms defined as Ms = max |1 + C(jω)Pn (jω)|−1 . ω

Note that C(jω)Pn (jω) is tangent to a disc centred on the −1 point with a radius of 1/Ms . Values between 1.5 and 2.5 are normally used. In the proposed controller α (γ) defines the value of Ms that can be computed using the tuning formulas. Figure 4.22 shows the relationship between Ms and α. Note that it is possible to tune Ms between values normally used. For example, if α = 0.3 Ms ≈ 1.8, which is a good the value for an initial tuning of the controller. 4.4.7 Simple Tuning Rules The final tuning of the controller will depend on the particular situation. If possible, the best compromise between performance and robustness should be obtained by tuning α or γ using some knowledge of the real process and the uncertainties. However, it is important to note that, in practice, when only poor information about the uncertainties is available, a simple tuning rule must be used. For practitioners, this rule should be a good starting point in a real time tuning procedure. Using the previous arguments, α = 0.3 and γ = 0.5 are chosen, as they offer delay margins greater than 30% of the nominal dead time and a closedloop response with small overshoot. Table 4.2 show the tuning for the filtered standard 2DOF-PID

4.4 Robust PID Tuning for Dead-time Processes

115

Table 4.2. Filtered standard PID parameters: (A) Tuning for T < 2L. If L >> T the reference filter is, in general, not necessary. (B) Tuning for integrative processes and stable processes with T ≥ 2L. Case

Kc

Ti

Td

0.35(L+2T ) Kp L

T + L/2

LT L+2T

Model

(A)

Kp 1+sT

(B)

Kv s

e−Ls

e−Ls

C(s) =

0.9 LKv

Tf

b

c

0.15L 0.8 1

3.37L 0.44L 0.25L 0.5 0.5

Kc 1 [1 + + Td s], 1 + sTf Ti s

where the set-point weighting parameters b and c are also recommended. These tuning rules allow a good compromise between performance and robustness to be obtained even in the case of dominant-dead-time systems. These conclusions contradict the “common rule” that states that PID controllers cannot be used to control dead-time-dominant processes. Thus, to complete this study, an analysis of the performance achievable with PID is presented. 4.4.8 Achievable Performance The analysis of the achievable performance is based on a study of the modelling errors and the model assumptions used to tune the controller. As has previously been explained, the dead-time-estimation error is the most important model uncertainty for this type of system. Thus, the following analysis assumes that modelling errors are only caused by dead-time approximation. In this case, we are interested in the relationship between the real dead time L and the achievable performance, measured for instance with T0 and the overshoot of the closed-loop response. Consider the open-loop-stable case. The process is represented by P (s) = Kp e−Ls 1+sT

and the model is Pe (s) =

Kp (1−0.5Ls) (1+sT )(1+0.5Ls) .

C(s) is the PID controller.

The open-loop transfer function of the system for the real plant and for the model using stable-predictive-based tuning are C(s)P (s) =

2 1 + 0.5Ls −Ls e , Lg(α)s 1 + 0.5αLs

C(s)Pe (s) =

1 − 0.5Ls 2 , Lg(α)s 1 + 0.5αLs

where g(α) = 2f (α) + 1 and f (α) = [α + (α2 + 0.5α)1/2 ]. Using a normalised frequency ωn = Lω it follows that

116

4 PID Control of Dead-time Processes

C(jωn )P (jωn ) =

1 + 0.5jωn −jωn 4 , e g(α)jωn 1 + 0.5αjωn

C(jωn )Pe (jωn ) =

1 − 0.5jωn 2 . g(α)jωn 1 + 0.5αjωn

Note that C(jωn )P (jωn ) and C(jωn )Pe (jωn ) have the same module for all frequencies and that the difference in the phases is independent of the controller parameters: δφ(jωn ) = φ(C(jωn )P (jωn )) − φ(C(jωn )Pe (jωn )) = 2tan−1 (0.5ωn ) − ωn . (4.39) The controller tuning defines the phase margin (φm ) for the nominal system but the real phase margin depends on the phase error. As deterioration in the performance can be directly associated to the phase margin, this error can be computed. Consider, for instance, the case of a α = 0.3, which gives a phase margin of approximately 63◦ and an error of δΦ = 1.6◦ at the frequency ωn0 = 0.7. This value of α defines the achievable T0 for the specified situation and thus, the closed-loop characteristics. For this case T0 ∼ = 0.46L, where T0 gives a good impression of the maximum value of the speed of the closed-loop response of the system maintaining an overshoot close to 10%. In conclusion, we can expect a closed-loop system with a small overshoot and almost no oscillations if the closed-loop time constant is maintained close to 0.5L. Now, consider the other extreme case, when uncertainties in the determination of the dead time and in the other parameters of the model are more important than those caused by the polynomial approximation of e−Ls . In this case, the robust tuning of the controller is not limited by the polynomial approximation. In this situation, even a controller using an exact model of the dead time, e−Ls (for example, the SP), would have to be detuned in order to maintain closed-loop stability. Thus, the disadvantages of the PID would be attenuated. Kp e−Ls with an error in the estiConsider, for example, a process P (s) = 1+sT mation of the dead time ∆L = 20%. Using again the normalised frequency, the difference between the phase of the model with dead time Ln and the process is given by δΦ = −δLωn where δL = ∆L/Ln = 0.2. For the frequency ωn0 = 0.7, the error in the phase is δΦ ≈ 8◦ ; that is, more than five times the error obtained in Equation (4.39). Thus, the error between the real dead time and the two models is similar, principally for the range of frequencies in which the closed-loop system operates. In a case like this, the robust tuning of the controller is defined by the uncertainties in the dead time and not because of the dead-time approximation. In these situations, if correctly tuned, the PID could achieve a reasonable performance.

4.5 Analysis of Other Methods

117

This analysis allows an important conclusion to be reached: The advantages of using of a more sophisticated controller for a process with a dominant dead time are more closely related to errors in the estimation of the dead time than to the absolute value of this parameter. A complete study of this subject is presented in Chap. 5 after the development of the dead-timecompensator controllers. The presented tuning method is not the only one that can be used with dead-time processes. The next section presents some well known tuning methods for PID controllers. The most important characteristics of each one will be analysed in order to evaluate their use for processes with dead time. Moreover, a comparative analysis with the proposed method is presented.

4.5 Analysis of Other Methods Most PID tuning rules were developed considering a dead time in the process model. Although, in many cases the solution is only valid for some particular values of the relationship between the dead time and the dominant time constant of the process. Thus, the application of these controller tuning methods must take into account the specifications and type of model used by each method. In this analysis three methods have been selected that are commonly used in practice: The Ziegler−Nichols tuning rule, the Cohen−Coon method and a simple tuning derived from the IMC approach, called simple-IMC (S-IMC). 4.5.1 The Ziegler−Nichols Tuning Method The most famous tuning method for PID controllers, the Ziegler−Nichols rule (ZN), was developed using simulations with different systems where the equivalent dead time L and time constant T satisfy L/T < 1, that is, lagdominant systems. The control objective was to attempt a quarter amplitude decay ratio in the step disturbance response. Thus, it is no surprise if a poor performance is obtained when the ZN method is used in a set-point tracking test or when controlling a dead-time-dominant process. There are two Ziegler−Nichols methods for tuning a PID in the standard form. The first one, known as the open-loop ZN method or the reaction curve method, assumes that the open-loop step response of the plant can be modelled by ae−Ls , (4.40) P (s) = sL The parameters for a standard form of the PID are given in Table 4.3. The second ZN method, known as the closed-loop ZN method, uses only a closedloop experiment with a proportional gain Kc (that is, Ti = ∞ and Td = 0) where Kc is increased until the process starts a nondamped oscillation. When

118

4 PID Control of Dead-time Processes Table 4.3. Ziegler−Nichols tuning rule 1 Controller Kc Ti Td Standard PID 1.2/a 2L L/2

this occurs the gain is Kc = K0 defined as the ultimate gain and the period of the oscillations obtained is named the ultimate period T0 . Thus, the tuning of the standard PID is given in Table 4.4. The ZN rules give poor performance Table 4.4. Ziegler−Nichols tuning rule 2 Controller Kc Ti Td Standard PID 0.6K0 0.5T0 0.125T0

when the process exhibits a significant dead time. If an FOPDT model is used P (s) =

Kp e−Ls , 1 + Ts

(4.41)

L to analyse the possiit is possible to use the relative dead time τ = L+T bility of obtaining good performance with a ZN-PID controller. As shown in [4] and illustrated in the examples of this section, the ZN method only allows reasonable performance when τ < 0.4, that is, for integrative and lagdominant dead-time processes.

4.5.2 The Cohen−Coon Tuning Method Another well known method in industry is the Cohen−Coon method. This method is based on an FOPDT model and uses a dominant pole placement procedure. The three closed-loop poles, one real and two complex, are located the same distance from the origin. The damping of the complex poles is used to achieve a disturbance response with a quarter amplitude decay ratio and the distance to the origin is computed to minimise the integrated error (IE) to a step disturbance [24]. For a standard form of the PID, the parameters K L are given in Table 4.5, where the normalised gain a is given by a = Tp . A Table 4.5. Cohen−Coon tuning rule Controller Standard PID

Kc 1.35 (1 a

+

Ti 0.18τ 1−τ

)

2.5−2τ 1−0.39τ

Td L

0.37(1−τ ) L 1−0.81τ

comparative analysis with the ZN method shows that for small values of τ

4.5 Analysis of Other Methods

119

the tuning rules are similar but the Cohen−Coon method (CC) gives lower values of Ti when τ increases. This allows for better closed-loop responses in these cases [4]. However, as with the ZN method, this tuning also gives poor performance for dominant stable dead-time systems. Both the CC and ZN rules give high overshoot in the set-point response. This can easily be avoided by using a reference filter as shown in the following examples. 4.5.3 The S-IMC Tuning Method The simple-IMC [123] is derived from the IMC tuning rule with a modification to improve the disturbance rejection response for lag-dominant plants. Two different values of TI are used in the controller: One for the deaddominant process case and the other for the lag-dominant case. For this controller tuning, a process is considered lag-dominant when T > 8L. The transfer function used to approximate the dynamic behaviour of the process can be an FOPDT or an SOPDT model. A PI is derived for the FOPDT model and a PID for the SOPDT model. K e−Ls Considering the SOPDT model P (s) = (1+sTp1 )(1+sT2 ) and a desired −Ls

e that is, a closed-loop time constant equal closed-loop system H(s) = 1+sL to the dead time, the derived PID is

CS−IMC (s) =

(1 + sTI )(1 + sT2 ) , sTI (1 + 0.1T2 s)

with TI = min(T1 , 8L),

kc =

1 1 . 2L Kp /T1

When an FOPDT model is used, T2 = 0 (a PI controller). For integrative processes, T1 → ∞ and Kv = Kp /T1 are used in the formula. The S-IMC tuning rule is given in Table 4.6. Because of the conservative tuning T0 = L, this PID Table 4.6. S-IMC tuning rule Controller

kc

Series PID

1 1 2L Kp /T1

TI

TD

min(T1 , 8L) T2

controller offers smooth closed-loop responses but a good robustness index. Exercise 4.8 proposes a further analysis of this case.

120

4 PID Control of Dead-time Processes

4.6 Comparative Examples In this section some simulation examples dealing with the previous PID tuning rules are presented in order to compare their performance when controlling processes with different values of τ . −5s

2e Example 4.8: Consider the process P (s) = s(1+s)(1+.5s)(1+.1s) and the IPDT model with Kv = 2 and L = 6.7. Four PID controllers are tuned: PID1 is tuned using the integrative-predictor-based method (γ = 0.4, b = c = 0.4), PID2 with the ZN method, PID3 with the CC method and PID4 with the S-IMC method. The performance of the closed-loop system for the four controllers is shown in Fig. 4.23. In the simulations a unitary step is applied at the set-point at t = 10 and a −0.05 step disturbance is introduced at t = 100 s. As has been explained, the CC and ZN methods are only for disturbance rejection res1 . ponse, thus, a reference filter is used in these two controllers: F (s) = 10s+1 Without this filter these controllers impose a high overshoot in the set-point response. As can be seen, the disturbance rejection response of the ZN-PID and CCPID are the fastest. These controllers have some oscillations in the set-point response. S-IMC-PID has a sluggish response both for set-point tracking and disturbance rejection. Finally, the integrative-predictor-based PID (predictorPID) is that which offers a compromise between the two situations. Robustness is analysed simulating the same situation with a dead time L = 6 in the process. The performance of the closed-loop system for the four controllers is shown in Fig. 4.24. As expected, the S-IMC-PID is the most robust and the integrative-predictor-based PID again offers the best compromise between set-point tracking and disturbance rejection.

Example 4.9: Plant P (s) is simulated using a four-order system plus a dead −Ls time than can assume different values: P (s) = (1+s)e 3 (5s+1) , L = 5 in the first case and L = 15 in the second. For the PID tuning an open-loop identification is performed to obtain three models for L = 5

P1 (s) =

0.167e−7s , s

P2 (s) =

e−7s , 1 + 6s

P3 (s) =

e−6s (1 + 1.5s)(1 + 5.5s)

e−17s , 1 + 6s

P3 (s) =

e−16s . (1 + 1.5s)(1 + 5.5s)

and three models for L = 15 P1 (s) =

0.167e−17s , s

P2 (s) =

Four PID controllers are tuned: PID1 is tuned using Table 4.2 (with b = 1), PID2 with the ZN method, PID3 with the S-IMC method with model P3 (s) and PID4 with the S-IMC method with model P2 (s). A reference filter F (s) = 1 2s+1 is used in the ZN-PID.

4.6 Comparative Examples

121

output and set−point

1.5 1 0.5 predictor−PID ZN−PID CC−PID S−IMC−PID

0 −0.5 0

20

40

60

80

100 time

120

140

160

180

200

control action

0.1

0.05 predictor−PID ZN−PID CC−PID S−IMC−PID

0

−0.05 0

20

40

60

80

100 time

120

140

160

180

200

Fig. 4.23. System responses in the closed loop for the predictor-PID, ZN-PID, CC-PID and S-IMC-PID for Example 4.8 (case L = 5)

The results obtained for a step change in the set-point applied at t = 5 and a −0.5 step disturbance introduced at the input of the plant at t = 75 are shown in Fig. 4.25 for the case L = 5. As expected, the ZN-PID gives a poor performance, as the rule does not consider the case L > T . The S-IMCPID based on the SOPDT model and the S-IMC-PID based on the FOPDT model have qualitatively a similar response; the derivative action has little effect in this case. The stable-predictor-based PID gives the best set-point and disturbance responses. In the second case the four controllers are re-tuned using the new value of L = 15. The results in Fig. 4.26 show that the performance is again better for stable-predictor-based PID than for the others. Note that the advantages of the predictor based tuning are more evident for large dead times. These comparative examples show that: (i) If the set-point and the disturbance rejection responses have to attempt some kind of specification, a 2DOF-PID controller is needed; (ii) dominant dead time causes deterioration of the responses of the closed-loop system for several well known PID tuning rules; and (iii) the method based on the predictor approach gives good results for the three cases: dominant lag, integrative processes and dominantdead-time processes. In the following section two designs of PID controllers for real processes are presented. The first case analyses the temperature control of a ceramic

122

4 PID Control of Dead-time Processes

output and set−point

1.5 1 0.5 predictor−PID ZN−PID CC−PID S−IMC−PID

0 −0.5 0

20

40

60

80

100 time

120

140

160

180

200

control action

0.15 0.1 0.05 predictor−PID ZN−PID CC−PID S−IMC−PID

0 −0.05 0

20

40

60

80

100 time

120

140

160

180

200

Fig. 4.24. System responses in the closed loop for the predictor-PID, ZN-PID, CC-PID and S-IMC-PID for Example 4.8 (case L = 6)

dryer and the second tackles the path tracking of a mobile robot. Experimental results illustrate the performance of the PIDs in these two cases.

4.7 Case Study: Temperature Control in a Ceramic Dryer This example presents the analysis and design of a temperature control in an industrial dryer of a ceramic process. The objective is to obtain a closed-loop response of the temperature without oscillations and with an overshoot of less than 10% for the entire operating range. The disturbance rejection response must not have any oscillations either. These conditions allow for high quality material and minimise the gas consumption of the dryer. The proposed solution is a two-degree-of-freedom robust PID that has been applied to the real process. 4.7.1 Process Description The ceramic process production can be divided into six steps. First, the different elements are mixed with water to produce the ceramic mass that is immediately ground. After achieving the desired granularity, it passes through an atomisation process where part of the water is eliminated. In the third step, the pieces are formed using a press. Next, the pieces pass though a

output and set−point

4.7 Case Study: Temperature Control in a Ceramic Dryer

123

1 0.8 0.6 predictor−PID ZN−PID S−IMC−PID−SOPDT S−IMC−PID−FOPDT

0.4 0.2 0 0

50

100

150

time

control action

2 1.5 1 predictor−PID ZN−PID S−IMC−PID−SOPDT S−IMC−PID−FOPDT

0.5 0 0

50

100

150

time

Fig. 4.25. Results for the four PID tunings for Example 4.9 with L = 5

dryer, are enamelled and then go to the furnace to be baked. The ceramic pieces obtained are finally packed. In this process, the dryers used before the enamel and furnace stages have a very important function that consists of giving the material a desired level of humidity. The pieces that are enamelled with poor conditions of humidity do not have the desired visual and mechanical properties. The typical dryers use hot air to eliminate the excess of water contained in the ceramic pieces. The dryer used in this application is a vertical dryer that uses a flux of hot air in the reverse direction to the flow of the material. The hot air is produced by a natural gas heater and it is mixed with the recirculated air controlled by a fan. To obtain the desired humidity of the pieces, the temperature inside the dryer must be controlled. To do this, the flow of gas feeding the heater can be manipulated, always maintaining the correct air−gas relationship. The temperature is measured using a thermopair. The controller installed in the dryer is a PID. Figure 4.27 shows a scheme of the system. 4.7.2 Controller Design In normal situations the dryer operates close to a temperature of 150◦ C but in certain cases lower temperatures are used, thus the controller must be designed to obtain the desired performance within the range 100◦C−160◦ C. A −Li s ie was used to identify the dynamic behaviour of stable model P (s) = K1+sT i

4 PID Control of Dead-time Processes

output and set−point

124

1 0.8 0.6 predictor−PID ZN−PID S−IMC−PID−SOPDT S−IMC−PID−FOPDT

0.4 0.2 0 0

50

100

150 time

200

250

300

control action

2 1.5 1 predictor−PID ZN−PID S−IMC−PID−SOPDT S−IMC−PID−FOPDT

0.5 0 0

50

100

150 time

200

250

300

Fig. 4.26. Results for the four PID tunings for Example 4.9 with L = 15

GAS HEATER HUMID AIR SPAN

SPAN hot air material entry

Fig. 4.27. Ceramic dryer scheme

the dryer in the range of operation. Several step tests were performed close to the maximum temperature of operation (160◦C), near the minimum (100◦C) and in the middle of the range (130◦C). The set of models was grouped in three representative FOPDT transfer functions

P1 (s) =

0.84e−154s , 1 + 70.2s

P2 (s) =

0.91e−148s , 1 + 66.5s

P3 (s) =

1.02e−157s . 1 + 109.4s

4.8 Case Study: Mobile Robot Path Tracking

125

3

10

dP (α=0.3) dP (α=0.15) |δ P|

2

10

magnitude

1

10

0

10

−1

10

−2

10

−2

10

−1

0

10

1

10

10

frequency

Fig. 4.28. Dryer controller. Robust analysis for the worst modelling error and different values of α −153s

thus, the tuning The nominal model was defined as Pn (s) = 0.92e 1+82s parameters used to define the PID controller are L = 153, T = 82, Kp = 0.92. As the model uncertainties were estimated in this case, the error δP (ω) was computed and used to adjust dP (ω) and to tune α. Figure 4.28 shows δP (ω) for the worst case and also dP (ω) for different values of α. From the results of Fig. 4.28 α = 0.3 was chosen because a nonoscillatory response is desirable. The reference filter was defined with b = 0.8 and c = 0. The performance of the closed-loop system for the proposed 2DOF-PID tuning is shown in Fig. 4.29 close to the operating point of 110◦ C. Changes in the set-point were applied and a disturbance was also introduced by changing the manual position of the traps used to control the humid air exhaust. As can be seen, the controller performs well.

4.8 Case Study: Mobile Robot Path Tracking The predictor-based PID was used to control a Nomad 200 mobile robot in the Departamento de Ingenier´ıa de Sistemas y Autom´atica at Seville University. This robot has a synchro-drive type locomotion system consisting of three drive-wheels with turning speeds and orientations that vary simultaneously. Figure 4.30 shows the synchro-drive configuration and the steering angle δ referenced to the global axis. The robot provides a position estimation system based on odometry. The objective is to drive the robot along a desired path using the steering angle as a control variable.

126

4 PID Control of Dead-time Processes

output and set−point

130 temperature set−point 120

110

100 50

100

150

200

250

300

350

400

time

control action

70

60

50 valve aperture 40 50

100

150

200

250

300

350

400

time

Fig. 4.29. System responses in closed loop with the proposed PID close to the operating point 110◦ C yglobal xl δ yg

yl

xg

xglobal

Fig. 4.30. Global reference frame for the mobile robot Nomad 200

4.8.1 Synchro-Drive Steering Angle Model The mobile robot steering angle δ must follow a steering angle reference δr defined by an approximation point located at a fixed distance along the path (see points M and M ′ in Fig. 4.31). The steering velocity reference δ˙r has been chosen as the control variable, and a constant linear velocity V of the mobile robot has been used. The model of the robot for the steering angle is given by a kinematic equation and nonlinear dynamics related to a rate limiter in the ˙ steering velocity. Thus, the steering velocity δ(t) follows its reference with

4.8 Case Study: Mobile Robot Path Tracking

127

δr2 δ2 M'

M

yglobal δr δ1 1

xglobal Fig. 4.31. Approximation points and their respective reference steering angles in two different positions

nonlinear dynamics. When a change in δ˙r occurs, the steering velocity has a dead time of approximately L = 0.2 s and is limited by the maximum acceleration (δ¨max ) produced by the steering motors. 4.8.2 Path Tracking with the PID Controller The control structure used for testing the behaviour of the robust tuned PID in the Nomad 200 mobile robot is shown in the block diagram of Fig. 4.32. The reference steering angle δr is computed in the approximation point block from the robot position (xg , yg ) and the points that define the path. In order to tune the proposed PID, a linear model of the process is needed. The linear model has been obtained from the hypothesis that increments in the reference steering velocity are small and the dynamics of the rate limiter block are not present. In this case the model can be simplified by an integra−0.2s tive process with dead time given by Pi (s) = e s . Then, for the mobile robot, the reduced model was defined with Kv = 1, L = 0.2 s. In this particular case, the value of γ has been chosen equal to 0.5, which provides robust tuning of the controller in order to take into account the model uncertainties. Note that many simplifications have been made to obtain the simple IPDT model. For the experimental tests, the controller parameters have been chosen as follows: The linear velocity V = 0.4m/s (90% of the maximum robot velocity), δ¨max = 30 degrees/s2 and the sampling time Ts was chosen equal to 0.2 s. Figure 4.33 shows the performance of the proposed controller. In order to test the robustness of the defined tuning, a different real dead time was used in the experiment. The initial position for the mobile robot was x0 = 0.6, y0 = 1.13 and orientation δ0 = 0 (parallel to the xg -axis). Note that

128

4 PID Control of Dead-time Processes

x g ,y g , angle Approximation Point

Mobile Robot

2DOF -PID u( t)

angle

ref . angle

Fig. 4.32. Block diagram of the proposed PID controller implemented in the mobile robot for path tracking 5.5

5

4.5

4

y (m)

3.5

3

2.5

2

1.5

1

0.5 0.5

1

1.5

2

2.5 x (m)

3

3.5

4

4.5

Fig. 4.33. Reference (continuous line) and real trajectory (“o” line) of the mobile robot with real dead time 1.4L

the reference path chosen has small curvatures that make it more difficult to follow the reference. Figure 4.34 shows the control action. Note the satisfactory performance obtained in the reference tracking (see Fig. 4.33) even though the linear velocity V is 90% of the Nomad’s top velocity and the reference steering angle δr changes continuously.

4.9 Summary This chapter shows how to use PID controllers when applied to dead-time processes. The use of the PID is introduced from a predictive point of view showing that this controller can be considered as a second-order linear approximation of an ideal dead-time compensator. Based on this approach, a robust tuning procedure has been developed both for the stable and the integrative case. Several examples, a comparative analysis and experimental results are used to illustrate the properties of the controller. The main conclusion of this chapter is that, even for dominant-dead-time processes, it is possible to tune the PID controller to achieve a performance

4.11 Exercises

129

pid

300

200

Control

100

0

−100

−200

−300

0

5

10

15

20 time

25

30

35

40

Fig. 4.34. Steering velocities δ˙r (continuous line) and δ˙ (dashed line) with real dead time 1.4L

that is directly related to the polynomial approximation of the dead time implicitly used in the algorithm. This achievable performance has also been analysed and computed for these processes, showing that a closed-loop time constant T0 = L/2 can be achieved with a good robustness if the PID is correctly tuned.

4.10 Further Reading The analysis and design of PID controllers, both for stable and integrative processes with dead time, has been exhaustively studied in literature. An excellent review of several of these methods and a complete study of PID controllers is presented in the book of Astrom ¨ and H¨agglund [4]. An interesting study of PID controllers from the IMC approach is also given in [70]. Another book is especially dedicated to PID controllers [121]. The original tuning rules of ZN and CC can be found in [141, 24]. The advantages and drawbacks of these controllers are analysed in [4]. The SIMC tuning is presented in detail in [123].

4.11 Exercises 4.1. Repeat the design of the PID controller in Sect. 4.3 using the predictor 1 . Comapproach but with a different approximation of the dead time: 1+Ls pare the results with those in Sect. 4.3. 4.2. Consider the process represented by P (s) =

5 (1+s)8 .

Compute model

130

4 PID Control of Dead-time Processes

Kp −Ls e 1 + sT for this process. Tune a PID controller with the IMC method. Compare the closed-loop behaviour of the system for three different values of Tf using a change in the set-point and a step disturbance. 4.3. Find the equivalence between SP and IMC controllers for a dead-time process. 4.4. For the PID controller derived with the pole placement design, analyse the relationship between α and T0 . Compute the closed-loop poles for the IMC tuning and analyse the relationship between α and T0 for this case. For which values do the tuning rules show a similar performance? Consider the integrative design in Sect. 4.3.4. Repeat the PID design using the IMC tuning for the second step. Compare the results to those in Sect. 4.3.4. 4.5. Derive the relationship between the parameters of the series PID controller in Sect. 4.4.2 and the standard and parallel PIDs with the filter in the derivative action. 4.6. Derive the 2DOF-PID structures for the series and parallel configurations. 4.7. Analyse the effect of γ on the overshoot of the closed-loop response using the PID derived in Sect. 4.4.4 for integrative processes. 4.8. Derive the S-IMC tuning. Consider a process P (s) and a series PID con1 troller C(s). Impose a closed-loop system with transfer function 1+sT e−Ls 0 and compute C(s) for a SOPDT model in P (s). Derive the PID approximating e−Ls = 1 − Ls. Analyse the effect of the TI selection for a process with L = 10T1 , L = T1 and T1 = 10L. 4.9. For Exercise 4.2 compute the loop transfer function C(s)P (s) and evaluate the PM and GM for the real process and for the model. Interpret the closed-loop responses obtained using the frequency responses. 2 4.10. Consider the process 1+sT e−Ls where L ∈ (5, 8) and T ∈ (1, 2). Compute the modelling error δP and tune a robust PID controller. For the tuning, consider a graphical analysis and compute α in order to obtain a minimum distance of 0.4 between | δP | and dP . Simulate the closed-loop responses.

4.11. Repeat Exercise 4.10 for process (0.2, 0.25).

K −Ls s e

where L ∈ (10, 12) and K ∈

5 The Smith Predictor

Chapter 4 shows how PID controllers can be designed to approximate the predictor based solution for controlling dead time processes. The limitations in the performance of PID for dead-time-dominant processes are described. This following chapter is dedicated to one of the most popular dead-time compensating methods called the Smith predictor. It is the best known and most widely used algorithm for dead-time compensation in industry. The main advantages and drawbacks of the SP will be discussed in detail and some tuning methods will be analysed. Some extensions and modifications of the SP will be presented in Chaps. 6 and 7.

5.1 The Smith Predictor Revisited The structure of the SP, shown in Fig. 5.1, can be divided into two parts: The primary controller C(s) and the predictor structure. The controller C(s) is typically a PID but can also be a higher-order controller. The predictor is composed of a model of the plant without dead time (Gn (s)), also known in the literature as the fast model, and a model of the dead time e−Ln s . Thus, the complete process model is Pn (s) = Gn (s)e−Ln s . The fast model Gn (s) is used to compute an open-loop prediction. To consider the modelling errors, the difference between the output of the process and the model including dead time is added to the open-loop prediction, as can be seen in the scheme of Fig. 5.1. If there are no modelling errors or disturbances, the error between the current process output and the model output will be null and the predictor output signal yp (t) will be the dead-time-free output of the plant. Under these conditions, C(s) can be tuned, at least in the nominal case, as if the plant had no dead time. Three fundamental characteristics of the SP must be analysed when considering perfect modelling [47], that is, when P (s) = Pn (s),

G(s) = Gn (s),

L = Ln .

132

5 The Smith Predictor q (t) r (t) + _

y (t)

+ C (s)

P(s) ^y (t+ L n ) G n (s)

y p (t)

e -Lns + +

y^(t)

+

_ e p (t)

Fig. 5.1. The Smith predictor controller

5.1.1 Closed-loop Properties of the SP The Smith predictor structure for the nominal case (no modelling errors) has three fundamental properties: Property 1: Dead-time Compensation The dead time is eliminated from the closed-loop characteristic equation. From Fig. 5.1, it is easy to see that if q(t) = 0 and G(s)e−Ls = Gn (s)e−Ln s , the error signal ep (t) is zero. Under this condition yp (t) = yˆ(t + Ln ) and the characteristic equation is 1 + C(s)Gn (s) = 0.

(5.1)

Compare this equation to the dead-time dependant one obtained in the PID case, 1 + C(s)Gn (s)e−Ln s = 0, where the extra phase introduced by dead time reduced the phase margin. Property 2: Prediction The feedback signal yp (t) produced by the predictor in Fig. 5.1 anticipates the system output for changes in the set-point, although this is not the case for disturbances. First consider q = 0 and a given reference r, then Yp (s) = Gn (s)U (s) = eLn s Pn (s)U (s) = eLn s Y (s),

(5.2)

yp (t) = yˆ(t + Ln ).

(5.3)

Now, note that when r(t) and q(t) are not null Yp (s) = P (s)U (s) + P (s)Q(s) + Gn (s)U (s) − Pn (s)U (s) = Gn (s)U (s) + Pn (s)Q(s).

Adding and subtracting Gn (s)Q(s) gives Yp (s) = Gn (s) [U (s) + Q(s)] − Gn (s)Q(s) + Pn (s)Q(s),

5.1 The Smith Predictor Revisited

u( t ) +

r(t) +

e (t)

_

+ _ C '(s)

C (s)

+

G n (s)

q (t)

133

y (t) P(s)

P n (s)

_

+

Fig. 5.2. Equivalent control structure of the Smith Predictor

Yp (s) = eLn s Y (s)−Pn (s)eLn s Q(s)+Pn (s)Q(s) = eLn s Y (s)+Pn (s)[Q(s)−eLn s Q(s)].

This is equivalent to yp (t) = yˆ(t + Ln ) + Pn (s) [q(t) − q(t + Ln )] ,

(5.4)

where the notation Pn (s) [q(t) − q(t + Ln )] indicates the inverse Laplace transform of

Pn (s) Q(s) − Q(s)eLn s .

This type of notation is used in this book for simplicity. Note that for slow changes in the disturbance q(t) ≃ q(t + Ln ) and yp (t) is a good prediction of yˆ(t + Ln ), but if q(t) changes rapidly then the disturbance cannot be eliminated from the feedback signal yp (t). Property 3: Ideal Dynamic Compensation The structure of the SP implicitly factorises the plant into two parts: Gn (s), which, in some cases, can be invertible and e−Ln s , which is non-invertible due to the dead time1 . Using this idea and considering that an “ideal” controller (one with infinity gain) may be applied, it follows that (see Fig. 5.2) C ′ (s) =

C(s) = (Gn (s))−1 . 1 + C(s)Gn (s)

(5.5)

Considering P (s) = Pn (s), the following “ideal” output is obtained   y(t) = r(t − Ln ) + Pn (s) [q(t) − q(t − Ln )] = r(t − Ln ) + Pn (s) − e−Ln s Pn (s) q(t). (5.6)

Note that the “ideal” transfer function between the reference and the output is a simple delay. Although this ideal controller cannot be used in practice, it shows what could be achieved with the SP and gives an upper limit of performance for the closed-loop. Even in the ideal case, if a disturbance is The inverse of a dead time e−Ls is eLs , which corresponds to a time advance that cannot be carried out. 1

134

5 The Smith Predictor

applied at t = 0, it is necessary to wait until t = 2Ln to notice the effect of the controller on the output. Note that the direct effect of the disturbance on the output is Pn (s)q(t) = Gn (s)e−Ln s q(t) (see Fig. 5.2 and Equation (5.6)) that has a dead time Ln . The remaining part, −e−Ln s Pn (s) = −e−Lns e−Lns Gn (s), is the effect of the controller with a dead time 2Ln . Furthermore, from t = 0 to t = Ln the response obtained is an open-loop type of behaviour. These three characteristics of the SP allow a better performance to be obtained than with a PID controller when controlling a dead-time process. The difference in the performance is more evident when the dead time is dominant. In general, the improvement in the set-point tracking is more noticeable than in the disturbance rejection response. The following examples illustrate these properties. 5.1.2 Examples Example 5.1: Consider a process represented by the transfer function P (s) = e−Ls (1+1.5s) . Two different dead times are considered to show the improvement in the closed-loop response obtained by the SP: L1 = 2 and L2 = 10. A PID controller and an SP are computed for these processes. The PID controller is tuned using the stable predictor based tuning procedure explained in Chap. 4 without set-point weighting. The parameters are obtained from Table 4.2. The SP uses a PI primary controller given by C(s) = Kc

1 + Ti s . Ti s

Ti is chosen equal to the process time constant (Ti = 1.5) and Kc , to obtain a dominant closed-loop time constant at Tcl = 0.3. Thus

 Kc 1 + C(s)G(s) = 1 + =0 ⇒ Kc = 5. 1.5s s=−1/0.3 The results obtained are shown in Fig. 5.3 for the case L = L1 = 2. In the simulations, a step change of the set-point from 0 to 1 is applied at t = 5 and a step disturbance of 0.5 is introduced at t = 20. As can be seen, the set-point response of the SP is faster and has no oscillations. The disturbance rejection response of the SP is also better than that of the PID but the difference is not as important. The following MATLAB code is used for the computation of the controller parameters and for simulation in Simulink .

5.1 The Smith Predictor Revisited

135

output and set−point

1.5

1

0.5 y for PID y for SP set−point

0 0

5

10

15

20

25

30

35

time 6

control action

u for PID u for SP 4

2

0 0

5

10

15

20

25

30

35

time

Fig. 5.3. System responses in the closed loop for L = 2 with the PID and SP of Example 5.1 MATLAB code for Example 5.1 % process data Lre=2; denpe=[1.5 1]; numpe=1; % FOPDT model for tuning the PID and SP Le=2; kp=1; T=1.5; % PID tuning alfa1=0.3; T0=(sqrt(alfa1*alpha1+alfa1)+alfa1)*Le/2; TI=T; TD=0.5*Le; kx=(2*T)/((4*T0+Le)*kp); numCe=kx*conv([T 1],[Le/2 1]); denCe=conv([T 0],[alfa1*Le/2 1]); % SP primary controller kc=5; Ti=1.5; % Call simulation tsim=35; tstep=5; tper=20; sim(’simulationPIDvPSexample51’);

A similar simulation experiment is repeated for the case L = L2 = 10 using a new tuning for the PID (changing L in the MATLAB code) and for the primary controller of the SP: Ti = 1.5 and Kc = 1. Obviously, the dead time in the prediction model is changed. The results obtained are shown in Fig. 5.4. The results are qualitatively the same but the differences in the disturbance rejection response are more appreciable. In reality, a dead-timeestimation error always exists, thus, the previous simulation is repeated with

136

5 The Smith Predictor

u

y and r

real dead−time 10 1.5 1 0.5 0 0

y for PID y for SP set−point 50

1.5 1 0.5 0 0

100

150

u for PID u for SP 50

100

150

u

y and r

real dead−time 11 1.5 1 0.5 0 0

y for PID y for SP set−point 50

1.5 1 0.5 0 0

100

150

u for PID u for SP 50

100

150

time

Fig. 5.4. System responses in the closed loop for real dead time L = 10 and real dead time L = 11 with the PID and SP in Example 5.1

a 10% dead-time error (the process dead time is set to 11 s). Figure 5.4 shows that the SP shows better performance even in this case. The SP can also give better results than a PID when the model dead time is used to represent part of the high-order dynamics of the process. The following example illustrates this case (see also Exercise 5.1). Example 5.2: Consider the process P (s) = e−17s 1+6s

e−15s (1+s)3 (5s+1) .

For control purposes

is used. The PID controller is tuned using Table the model Pn (s) = 1 4.2 with b = c = 0 and the SP is tuned with Gn (s) = 1+6s . The PI primary controller is tuned for a double closed-loop pole at s = −0.5 of the deadtime-free system, thus Ti = 10/3 and Kc = 5. The simulation test consists of a step change of the set-point from 0 to 1 at t = 10 and a step disturbance of 0.5 introduced at t = 100. Figure 5.5 shows that the SP offers better performance. The price to be paid for this improved performance is a high control action at the set-point transients. The previous analysis may lead to the conclusion that it is possible to tune the primary controller C(s) as if the plant had no dead time and to speed up the transients of the time response arbitrarily. However, then the closed-loop system would become unstable for small differences between the model and

5.2 Advantages and Drawbacks of the Smith Predictor

137

output and set−point

1.5

1

0.5 y for PID y for SP set−point

0 0

20

40

60

80

100 time

120

140

160

180

200

6

control action

u for PID u for SP 4

2

0 0

20

40

60

80

100 time

120

140

160

180

200

Fig. 5.5. System responses in the closed loop with the PID and SP for Example 5.2

the real process. Two other problems of the original structure proposed by Smith must also be pointed out: The disturbance rejection properties of the closed-loop system cannot be arbitrarily defined and the controller cannot be used with unstable open-loop processes. These fundamental points are discussed in the next section.

5.2 Advantages and Drawbacks of the Smith Predictor This section analyses the SP taking into account the following fundamental issues: • • • •

The reference tracking and disturbance rejection responses. The robustness. The case of general unstable processes. The particular case of integrative processes.

5.2.1 Reference Tracking and Disturbance Rejection To understand how the SP performs at the set-point and disturbance rejection responses, the closed-loop transfer functions of the structure in Fig. 5.1 are computed in the nominal case (P (s) = Pn (s))

138

5 The Smith Predictor

Y (s) C(s)Pn (s) = , R(s) 1 + C(s)Gn (s)

(5.7)

  Y (s) 1 + C(s)(Gn (s) − Pn (s)) C(s)Pn (s) = Pn (s) 1 − = Pn (s) . Q(s) 1 + C(s)Gn (s) 1 + C(s)Gn (s) (5.8) Using the previous transfer functions it must be noted that: •



If C(s) is tuned to define the disturbance rejection dynamics then it is not possible to attain the desired set-point response. This is a common problem of all one-degree-of-freedom structures, not just a drawback of the SP. Note that as C(s) is the only degree of freedom, it is not possible (s) (s) and YR(s) . to arbitrarily define YQ(s) The poles of P (s) cannot be eliminated from the disturbance rejection transfer function, except for a pole at s = 0. Equation (5.6) clearly shows this, even in the ideal case (C(s) → ∞), Pn (s) appears in the expression of y(t), but when Pn (s) has a pole at s = 0, Pn (s)[1 − e−Ln s ] does not. Note that [1 − e−Ln s ] is zero for s = 0, thus the root of the numerator cancels the root of the denominator. In the nonideal case, notice that Pn (s) is a factor in Equation (5.8) and its (s) denominator will appear in the denominator of YQ(s) even when C(s) cancels the plant poles. A complete demonstration of this property is given in Chap. 6. This has a fundamental consequence: If the poles of P (s) are (s) slower than the defined closed-loop poles of YR(s) , they will dominate the disturbance rejection response and it will not be possible to speed up these transients. In practice this is only a problem when the dead time is small because in other cases the closed-loop poles are, in general, very close to the open-loop ones, as is seen in this chapter.

The ideas are illustrated by the following example. The example considers a simple first-order plus dead time process where the primary controller is tuned to improve the closed-loop disturbance rejection response. Example 5.3: Consider the bottom concentration control in the distillation column shown in Fig. 5.6. The steam flow (u) is the control action and the bottom concentration (y) is the controlled variable. In the ideal situation both the process and the model are represented by the transfer functions: P (s) = e−5s 1 Pn (s) = (1+1.5s) (Gn (s) = (1+1.5s) ). A PI primary controller is used in the SP: is C(s) = Kc 1+T Ti s . Initially, the tuning of the PI is given by Kc = 1, Ti = 1.5, which gives a characteristic equation

1 + C(s)Gn (s) = 1 + and a nominal closed-loop transfer function

1 =0 1.5s Y (s) R(s)

=

1 −5s . 1+1.5s e

5.2 Advantages and Drawbacks of the Smith Predictor

139

feed

Steam u

LC

bottom

CC

y

output and set−point

Fig. 5.6. Schematic diagram of the bottom concentration control in a distillation column

1 0.8 0.6 0.4

y (Kc=1, Ti=1.5)

0.2

y (Kc=6, Ti=0.5) set−point

0 0

5

10

15

20

25

30

35

time

u (Kc=1, Ti=1.5)

control action

6

u (Kc=6, Ti=0.5) 4 2 0 0

5

10

15

20

25

30

35

time

Fig. 5.7. System responses in the closed loop with the proposed SP for Example 5.3

The results obtained are shown in Fig. 5.7 (dashed lines). In the simulations, a step change of the set-point from 0 to 1% is applied at t = 5 and a feed step disturbance of −0.1 is introduced at t = 15. As can be seen, both the set-point and the disturbance rejection responses are smooth and slow.

To speed up the transients the same model, but with a different tuning of the primary controller, can be used in the SP. Consider that a smaller Ti and a greater Kc are used to change the closed-loop poles. Using Kc = 6 and

140

5 The Smith Predictor

Ti = 0.5 the new characteristic equation is 1 + C(s)Gn (s) = 1 +

6(1 + 0.5s) = 0, 0.5s(1 + 1.5s)

which gives two new closed-loop poles at s = −2 + 2j, s = −2 − 2j, which should give a faster response with an overshoot of less than 5%. The results obtained are shown in Fig. 5.7 by solid lines, where an undesired overshoot is observed in the set-point response. This effect is caused by the position of the zero of the PI that appears in the closed-loop transfer function Y (s) 0.5s + 1 e−5s = R(s) 1 + 0.5s + 0.125s2 and can be attenuated using a reference filter, as in the PID case of Chap. 4. Note that, although the disturbance response has been accelerated, it is not possible to obtain a faster response than the open-loop one because, as has been explained, the pole of P (s) appears in the closed-loop transfer func(s) . tion YQ(s) This example also illustrates the disturbance rejection response in a deadtime system. After the disturbance has been applied at t = 15, it is necessary to wait 5 s (L = 5) for the output to react and 5 s more for the effect of the control action to appear at the output. During the latter 5 s the response is the open-loop one. After this time, 10 s or 2L, the controller drives the output to the reference. That is, even if we use an ideal controller that drives the output to the desired value instantaneously, the “ plant reaction” will start 2L s after the application of the disturbance. In the previous example a pair of arbitrary closed-loop poles are defined without considering the possible model uncertainties. In practice these modelling errors have to be taken into account, as will be analysed in the next section. 5.2.2 Robustness In the real case there are modelling errors, thus Pn (s) = P (s). Consider, as in Chap. 4, a family of plants P (s) such that P (s) = Pn (s)[1 + δP (s)] = Pn (s) + ∆P (s) and | δP (jω) |≤ δP (ω)

ω>0

The characteristic equation is given by 1 + C(s)[Gn (s) + P (s) − Pn (s)] = 1 + C(s)[Gn (s) + ∆P (s)].

(5.9)

5.2 Advantages and Drawbacks of the Smith Predictor

141

If C(s) stabilises Gn (s), the condition for the closed-loop robustness of the SP is that, for all frequencies and for all plants in the family, the distance between C(jω)Gn (jω) and the −1 point in the Nyquist diagram (| 1 + C(jω)Gn (jω) |) is greater than | C(jω)∆P (jω) |. This gives δP (ω) < dP (ω) =

| 1 + C(jω)Gn (jω) | | C(jω)Gn (jω) |

∀ω > 0.

(5.10)

Function dP (ω) is the upper bound of the multiplicative modelling error of the plant to guarantee stability and it can be used as a measure of the con(s) troller robustness. Note that when the closed-loop transfer function YR(s) is defined, dP (ω) is also fixed. Thus, if C(s) is chosen for a high performance C(s)Pn (s) ( 1+C(s)G with large bandwidth) then robustness will be poor (small van (s) lues of dP (ω) at these frequencies); so, if C(s) is not appropriately chosen, small uncertainties may drive the system to instability, as pointed out by Palmor [97]. (s) It is now clear that the closed-loop poles of YR(s) cannot be arbitrarily defined but the robustness condition must be used to impose an upper limit on the closed-loop performance. This expression can be compared to the robustness index of the PID derived in Chap. 4. Here, dP (ω) is a rational function because the predictor has eliminated the dead time. This, in general, allows a better trade-off to be achieved between robustness and performance than in the PID case. The robust closed-loop characteristics of a dead-time system controlled by an SP have some particularities that are analysed in the following using several examples. Three types of model uncertainties are considered: Unmodelled dynamics, gain-estimation errors and dead-time-estimation errors. The examples analyse the robustness of the SP when a high-order system with dead time is controlled using an FOPDT model as a nominal plant. The plant has the following transfer function P (s) =

Ke−Ls (1 + T1 s)(1 + T2 s)(1 + T3 s)(1 + T4 s)

and the model for the predictor is Pn (s) =

Kn e−Ln s , (1 + Tn s)

Gn (s) =

Kn . (1 + Tn s)

SP and Unmodelled Dynamics In the first case Ln is used to model the high-order dynamics of the process and K and L do not change. −Ls

e . The paExample 5.4: Consider the plant P (s) = (1+s)(1+.5s)(1+.25s)(1+.125s) rameters of the FOPDT model are chosen as Ln = 10.5 and Kn = 1 and C(s)

5 The Smith Predictor

output and set−point

142

1 0.8 0.6

y for T =1.1

0.4

y for T =1.5

0.2

y for T =1.8

n n n

set−point

0 0

10

20

30

40

50 time

60

70

80

90

100

control action

1 0.8 0.6 0.4

u for T =1.1

0.2

u for T =1.5

n n

u for T =1.8

0 0

n

10

20

30

40

50 time

60

70

80

90

100

Fig. 5.8. System responses in the closed loop with the SP Example 5.4

is a PI controller. Note that this dominant-dead-time process is used in the examples of Chap. 4 to show the possible performance achieved with the PID controller and the same model is also used for the tuning. The fast model is chosen with three different values: Tn = 1.1, Tn = 1.5 and Tn = 1.8, thus an error in the modelling of the dominant process dynamics is introduced. The PI is tuned so that the nominal closed-loop pole is in the same position as the open-loop one, thus: Kc = 1, Ti = Tn . Figure 5.8 shows the plant output and control action in the three situations for a step change of the set-point from 0 to 1 at t = 10 and a step disturbance of −0.1 introduced at t = 60. Note the improvement in the performance if compared to the PID case. For this case the modelling error does not present stability problems although the responses obtained are not as ideal as those presented in Chap. 2 where perfect modelling is considered (see changes in the control action of between 20 and 30 s in Fig. 5.8). Note that the effect of the modelling error appears in the control action only ten seconds after the change in the set-point. This is the minimal dead time between L and Ln . The effect of control action oscillation appears at the output only ten seconds later. From this example we can conclude that the proposed SP tuning copes with the unmodelled dynamics, maintaining a good performance.

output and set−point

5.2 Advantages and Drawbacks of the Smith Predictor

143

1

0.5

y for K=1 y for K=1.2 y for K=0.8 set−point

0 0

10

20

30

40

50 time

60

70

80

90

100

control action

1.5

1

0.5 u for K=1 u for K=1.2 u for K=0.8

0 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 5.9. System responses in the closed loop with the proposed SP for Example 5.5

SP and Gain Estimation Errors In this new set of simulations only gain variations are considered. −10s

Ke and an Example 5.5: Consider the process P (s) = (1+s)(1+.5s)(1+.25s)(1+.125s) SP based on the FOPDT with parameters Ln = 10.5, Tn = 1.5 and Kn = 1. The primary controller is a PI tuned with Kc = 1, Ti = Tn . Here, K = 1.2, K = 1 and K = 0.8 are used to evaluate the effect of the gain-estimation error. Figure 5.9 shows the plant output and control action in the three situations under the same simulation conditions as in Example 5.4. Note that the 20% gain-estimation error does not cause instability for the proposed tuning. However, the set-point response is deteriorated in the first part of the transients. An underestimation of K (K = 1.2, Kn = 1) causes an overshoot, while if K < Kn (K = 0.8, Kn = 1) a sluggish response is obtained. This result can be interpreted using the error signal between the model and the process. Because of dead time (in this case 10 s) between t = 20s and t = 30s, both the model and the process are in open-loop. The primary controller gives a constant control action in accordance with the model static gain, thus the output goes to a wrong value. After the dead time, at t = 30s, the error between the model and the process arrives at the controller and the control action drives the output to the correct value. Note

144

5 The Smith Predictor

output and set−point

1.5

1 y for L=10 y for L=12 y for L=8 set−point

0.5

0 0

10

20

30

40

50 time

60

70

80

90

100

control action

1.5

1

0.5

u for L=10 u for L=12 u for L=8

0 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 5.10. System responses in the closed loop with the proposed SP for Example 5.6

that the closed-loop response seems to be a sequence of open-loop responses converging on the set-point. This overshoot (or undershoot) of the step closed-loop response will always appear when a gain-estimation error is introduced. The effect of this error on the rejection of step disturbances has the same characteristics because disturbance rejection is an open-loop type response during the first part of the transients. SP and Dead-time-estimation Errors This last situation is caused by dead-time-estimation errors; thus, in this new set of simulations only this type of parameter variation is considered. Example 5.6: To illustrate the effect of dead-time-estimation errors, cone−Ls with sider the plant with transfer function P (s) = (1+s)(1+.5s)(1+.25s)(1+.125s) L = 12, L = 10 and L = 8. The FOPDT model parameters are chosen as Ln = 10.5, Tn = 1.5 and Kn = 1. The PI primary controller is tuned with Kc = 1, Ti = Tn . Figure 5.10 shows the plant output and control action for the same simulation conditions as in Fig. 5.8. Note that the 20% dead-timeestimation error causes unstable behaviour. The deterioration of the transients has a similar shape to that in the gain-estimation error case. An underestimation of L causes an overshoot, while if L < Ln an undershoot is observed. This result can be interpreted using the same error signal analysis

5.2 Advantages and Drawbacks of the Smith Predictor

145

2

10

dP(ω) |δ P(ω)| (L=10, K=1.2) |δ P(ω)| (L=12, K=1)

1

magnitude

10

0

10

−1

10

−2

10

−1

10

0

10 frequency

1

10

2

10

Fig. 5.11. Robustness index dP (ω) (solid line) and modelling error for cases: (a) L = 10 and K = 1.2 (dashed line) and (b) L = 12 and Kp = 1 (dashed-dotted line)

as in the previous case. The effect of the dead-time error is not symmetric (see the Further Reading section for some references that analyse this point). To justify the responses obtained under these conditions, the magnitudes of the modelling error | δP (jω) | and dP (ω) are plotted in Fig. 5.11 for Ln = 10.5, Kn = 1 and two process cases: (a) L = 10 and K = 1.2 and (b) L = 12 and Kp = 1. In the first case, the closed-loop system is stable, confirming the simulation results. In the second case, the closed-loop system is unstable because dP (ω) has smaller values than the modelling error for some frequencies. Note that the error considered in the dead time produces loss of robustness. This error produces a significant change in | δP (jω) | in the medium frequencies, as explained in Chap. 2. This implies that the SP controller cannot be tuned in real applications without primarily considering dead-time uncertainties. 5.2.3 The Smith Predictor for General Unstable Plants As pointed out in the previous analysis, the poles of P (s) cannot be eliminated from the disturbance rejection transfer function (Equation 5.8) except for a pole at s = 0. This has a very important consequence: The SP cannot be used with general unstable plants that possess pole(s) with Re(s) > 0. Equation (5.7) shows that the reference tracking can be obtained even in the unstable case, as C(s) can be chosen to stabilise Gn (s). However, the

146

5 The Smith Predictor

output and set−point

1.5 1 0.5 0 −0.5 −1 0

output set−point 1

2

3

4

5 time

6

7

8

9

control action

6

10

u

4 2 0 −2 0

1

2

3

4

5 time

6

7

8

9

10

Fig. 5.12. System responses in the closed loop with the proposed SP and an unstable process (Example 5.7) (s) always has unstable poles. The following example iltransfer function YQ(s) lustrates this situation.

Example 5.7: In this example an unstable process is considered: P (s) =

e−s s−1

−s

1 e (Gn (s) = s−1 ). A simple PI and the model for the predictor is Pn (s) = s−1 controller with Kc = 6 and Ti = 1 allocates the poles at s = −2 and s = −3 (s) for the nominal transfer function YR(s) . Under these conditions, the closedloop behaviour of the system is shown in Fig. 5.12 for a change in the setpoint from 0 to 1 at t = 1 and a −0.1 step disturbance at t = 5. Note that the set-point response is fast and has a small overshoot but the step disturbance applied at t = 5 drives the system to instability, while the control action achieves a constant value after t = 7.

5.2.4 The Smith Predictor for Integrative Processes Integrative processes are a special case of unstable plants. In this case, the SP gives a stable closed-loop if the controller is properly implemented. Consider that C(s) stabilises Gn (s) and gives a closed-loop with unitary gain; thus Ne (s) C(s)Gn (s) = , 1 + C(s)Gn (s) De (s) where De (s) has all its roots with Re(s) < 0 and Ne (0) = De (0).

5.2 Advantages and Drawbacks of the Smith Predictor

q (t) r (t) + _

+

+

C (s)

_

+

147

y (t) P(s)

G n(s)- P n(s)

C eq (s) Fig. 5.13. Equivalent structure of the Smith predictor

The disturbance to the output transfer function is then 

Y (s) Ne (s) −Ln s = Pn (s) 1 − e , Q(s) De (s)

(5.11)

which has a root at s = 0 in the numerator and denominator. Note that Pn (s) has a pole at s = 0 and

 Ne (s) −Lns e lim 1 − = 0. s→0 De (s) This can eliminate the pole at s = 0, avoiding closed-loop instability. Assume now a step disturbance and that Pn (s) = Pes(s) , where Pe (s) is −Ln s (s) stable and Pn (s) = Ge (s) e s . To reject the disturbance, the gain of YQ(s) must be zero. This gain cannot be computed directly because the cancellation causes an indetermination. Thus, the analysis can be made using the equivalent structure in Fig. 5.13. The internal model principle states that in order to reject a step disturbance the equivalent cascade controller, Ceq (s) in Fig. 5.13, must have integral action (a pole at s = 0) and the closed-loop system must be stable. In this case Ceq (s) is Ceq (s) =

C(s) 1 + C(s)(Gn (s) − Pn (s))

that is, the primary controller has a feedback block H(s) = Gn (s) − Pn (s). Computing the static gain of H(s) for the SP, it follows that

 1 − e−Ln s lim H(s) = lim Ge (s) (5.12) = Ln Ge (0) = 0, s→0 s→0 s that is, even if C(s) has integral action, the equivalent controller Ceq (s) will not have the pole at s = 0 as desired and, in consequence, will not reject the step disturbances. Note that C(s) has integral action lim C(s) =

s→0

Kc , s

5 The Smith Predictor

output and set−point

148

1 0.8 0.6 0.4 0.2

output set−point

0 0

50

100

150

time 0.3

control action

u 0.2 0.1 0 −0.1 0

50

100

150

time

Fig. 5.14. System responses in the closed loop with the proposed SP and an integrative process (Example 5.8)

lim Ceq (s) = lim

s→0

s→0



Kc s

1 + H(0) Ksc



= lim

s→0

 Kc 1 , = s + Kc H(0) H(0)

that is, in the steady state Ceq (s) acts as a proportional controller. Moreover, the gain of Ceq (s) depends on the value of Ln and the steady state value of the output will be a function of the dead time. The following example illustrates this situation. Example 5.8: Consider a plant with transfer function P (s) = 2e−5.1s s

2e−5s (1+.1s)s

and a

2 s ).

(Gn (s) = In this case, as the plant control model given by Pn (s) = has integral action, a proportional primary controller allows an offset free setpoint response. However, if a step disturbance is to be rejected, a PI controller seems to be necessary. In this case, the control parameters Kc = 0.25 and Ti = 8 are chosen so as to obtain a double pole at s = −0.25 for the nominal (s) transfer function YR(s) ; thus 8s + 1 8s + 1 = . 8s 32s The closed-loop behaviour of the system is shown with these conditions in Fig. 5.14 for a change in the set-point from 0 to 1 at t = 10 and a −0.05 step disturbance at t = 75. Note that the set-point response is as expected, although, because of the model uncertainties and the position of the zero of C(s) = 0.25

5.3 The Two-degree-of-freedom SP

149

the PI, an overshoot appears. However, the controller is not able to reject the step disturbance. The final value of the output can be computed using the gain of Ceq (s). Consider that Pn (s) =

Pe (s) s

Pe (0) = 0.

Thus lim

s→0

Y (s) Pn (s) Pe (s) 1 = lim = lim = lim . Q(s) s→0 1 + Pn (s)Ceq (s) s→0 s + Pe (s)Ceq (s) s→0 Ceq (s)

In this example Ceq (s) =

1+

8s+1 32s 8s+1 2 −5.1s ) 32s s (1 − e

=

32s 8s+1

1 . + 2s (1 − e−5.1s )

It follows that lim Ceq (s) = lim

s→0

s→0 32s 8s+1

1 +

2 s (1



e−5.1s )

=

1 1 = . 2(5.1) 10.2

Thus, the steady state value of y(t) is y∞ = 1 − 0.05(10.2) = 0.49; that is, the controller is not able to cancel the step disturbance, as can be seen in Fig. 5.14. As explained previously, this implies that the SP controller cannot be used, at least in its original form, with integrative processes. Because of the problems illustrated in the previous examples, over the last twenty years several authors have proposed special tuning procedures or modified versions of the SP (see the Further Reading section and the references of Chaps. 6 and 7 for a list of these works). In the following sections some of these problems are addressed: A 2DOF SP is presented and a robust tuning is considered. These solutions are given for one of the most important cases in the process industry: Open-loop stable-dead-time processes. An analysis of some modified structures of the SP is given in Chaps. 6 and 7.

5.3 The Two-degree-of-freedom SP As pointed out in Example 5.3, when the primary controller is tuned to accelerate the closed-loop disturbance rejection response, the set-point tracking response is deteriorated. This effect is caused by the position of some of the zeros of the reference to the output closed-loop transfer function, which are introduced by the primary controller. As these zeros do not appear in the disturbance rejection transfer function, their effect can be attenuated using a reference filter. The same process and controller as in Example 5.3 are used to illustrate this solution.

150

5 The Smith Predictor

q (t)

r (t) F (s)

+ _

+ _ v( t)

y (t)

+ C (s)

P(s)

+

G n(s)- P n(s)

H(s)

Fig. 5.15. Structure of the two-degree-of-freedom Smith predictor

Example 5.9: Consider once more the same process, model, controller and simulation conditions as in Example 5.3. With the last PI tuning, Kc = 6 and Ti = 0.5, the closed-loop set-point response presents an undesirable overshoot, which can be attenuated using a reference filter, as shown in the scheme of Fig. 5.15. In this example a first-order filter can be used to cancel the zero introduced by the PI and to allocate a nondominant zero. This can be done with a filter 1 + sβTi , F (s) = 1 + sTi where β is chosen to allocate the zero with a module greater than the module of the dominant closed-loop poles. For this case, β = 0.4 satisfies the condition. The improved response, shown in Fig. 5.16 with solid lines, is compared to the one obtained in Example 5.3 without the filter (dashed lines). Note also that the control action obtained is smoother. The pair of controllers C(s) and F (s) can be implemented using set-point weighting, as for the 2DOF-PID presented in Chap. 4. In general, when it is necessary to achieve a good performance, both for set-points and disturbances, the two-degree-of-freedom control structure shown in Fig. 5.15 is always necessary. Note that this controller is the same as the simple one presented by Smith [125] with a filter (F (s)) for the reference signal r. Equations (5.8) and (5.10) are still valid for this scheme and the new reference to the output transfer function is F (s)C(s)Pn (s) Y (s) = . R(s) 1 + C(s)Gn (s)

(5.13)

From now on, this controller will be called the two-degree-of-freedom deadtime compensator (2DOF-DTC) and, as will be seen in Chap. 7, with appropriate tuning this scheme can also be used with integrative processes. The tuning of C(s), Gn (s) and F (s) is discussed in the following. 5.3.1 General Tuning The tuning procedure consists of defining the primary controller C(s) to achieve the highest bandwidth for the nominal disturbance response main-

output and set−point

5.3 The Two-degree-of-freedom SP

151

1 0.8 0.6 0.4 y with filter y without filter set−point

0.2 0 0

5

10

15

20

25

30

35

time

u with filter u without filter

control action

6 4 2 0 0

5

10

15

20

25

30

35

time

Fig. 5.16. System responses in the closed loop with the proposed SP without the filter and with the filter for Example 5.9

taining the robustness condition given by Equation (5.10). For this computation, a nominal model Pn (s) and an estimation of the modelling errors δP (s) are necessary. After this, as a second step F (s) can be defined to improve the closed-loop set-point response. In general, C(s) includes an integrator (or two) in order to cope with step (ramp) disturbances and step (ramp) changes at the set-point, which are the most common input signals in practice. There is no best procedure to obtain the parameters of the primary controller because, as in other controllers, the best choice depends on the defined set of control specifications and also on the process model. As the robustness analysis has been presented in the frequency domain, it would seem to be obvious to use a frequency tool for the computation of C(s) and F (s). A case study is presented in the following example to show this general procedure. Because of the practical importance, tuning rules are derived next for the simple model Pn (s) = practitioners.

Kp e−Ls 1+T s ,

which can be useful for

Example 5.10: Consider the heat exchanger of Fig. 5.17 where the aim is to control the output temperature T of the water using valve V1 that manipulates its input flow (FW ). The steam temperature (TS ) and steam flow (FS ) in the heat exchanger are maintained at an operating point defined by an independent controller.

152

5 The Smith Predictor Ts Fs

Fw

steam

V1 water Fs

TT

Fig. 5.17. Steam-water heat exchanger

Thus, in this system T is the process variable, V1 the manipulated variable and TS and FS are disturbances. The behaviour of this process close to the operating point can be represented by T (s) Kp = P (s) = e−Ls , V1 (s) (1 + sT1 )(1 + sT2 ) where the temperature is in ◦ C and the valve aperture V1 a %. As the flow of the water changes, the system dead time (L) is variable. For this example, T1 = 1 min, T2 = 2 min, Kp = −12◦C/% and L ∈ (5, 6) min. The objective of this problem is to design a fixed controller with the structure of Fig. 5.15 able to cope with variable dead time, reject step variations in the steam temperature and follow step changes at the set-point with an overshoot of less than 10%. The speed of the closed-loop responses has to be defined considering the robustness conditions imposed by dead-time variations. For the design of the controller, we will use a frequency approach combined with the root-locus design. The nominal dead time is Ln = 5.5 min = 330 s. The fast model Gn is chosen as Gn (s) =

−12 . (1 + 60s)(1 + 120s)

The modelling error in this case is given by δP (jω) = e−j∆Lω − 1,

∆L ∈ (−30, 30).

The SP must be tuned for    1 + C(jω)Gn (jω)  1 = | δP (jω) |<  C(jω)Gn (jω)  | M (jω) |

∀ω > 0.

Thus, the inverse of the modulus of the modelling error, em (ω) =| [δP (jω)]−1 | imposes an upper frequency boundary for the modulus of M (jω). This boundary sets the limits imposed by the modelling error and is used to tune the controller. Figure 5.18 shows em (ω). In the same figure a first-order transfer function M ∗ (s) = 1+T1m s has been tuned for two values of Tm to show the limit in the bandwidth imposed by the modelling error. Tm = 22 was chosen to make | M (jω) | tangent to em (ω). As the process model is of second-order

5.3 The Two-degree-of-freedom SP

153

2

10

1

magnitude

10

0

10

−1

10

|M(w)| for Tm=22 |M(w)| for Tm=32 |H(w)| em(w)

−2

10

−3

10

−2

−1

10

10

0

10

frequency

Fig. 5.18. Inverse of the modelling error of the steam-water heat exchanger and M ∗ (jω)

and an integrator is necessary in C(s) to cope with step disturbances, a PID is selected as a primary controller. The tuning of the PID is carried out using the nominal dead-time-free system and considering robustness and performance specifications. The PID is defined in the pole-zero form C(s) =

Kc (s − z1 )(s − z2 ) , s(s − p)

and p = −0.2 is set as a low pass filter for the realisability of the controller. The zeros are initially located at s = −0.2 in order to (i) obtain a faster response than the open-loop one, and (ii) take into account the limit imposed by the modelling error. With these data in the simulation environment, the tuning of the controller gain and the final position of the zeros are defined to obtain a closed-loop frequency response without peaks and to satisfy the robustness conditions. The obtained solution is z1 = −0.02, z2 = −0.027 and Kc = −0.73. As the PID has been tuned to obtain a smooth response the reference filter is not necessary. Figure 5.18 shows the modulus of the obtained closed-loop transfer function | H(ω) |. Simulation results under two different dead-time conditions are shown in Fig. 5.19. The simulated situation changes the set-point temperature from 50◦ C to 55◦ C (at t = 100 s) and then from 55◦ C to 45◦ C (at t = 2000 s). A change in the steam temperature is also simulated by introducing a step disturbance at the process input at t = 4000 s. As can be observed, the performance obtained is within the specifications. The MATLAB code for the robustness analysis is:

154

5 The Smith Predictor real dead−time 5 min 70

60 y, u, r

temperature valve set−point

50

40 0

1000

2000

3000

4000

5000

6000

real dead−time 6 min 70

60 y, u, r

temperature valve set−point

50

40 0

1000

2000

3000 time

4000

5000

6000

Fig. 5.19. Reference, temperature and valve aperture for Example 5.10. First case: Real dead time 5 min. Second case: Real dead time 6 min MATLAB code for Fig. 5.18 % data Tm1=22; Tm2=32; DL=30; ww=logspace(-3,2,300); % controller denc=[1 0.2 0]; numc=-0.73*conv([1 0.027],[1 0.02]); % process denp=conv([30 1],[60 1]); nump=-12; % loop for i=1:300 w=ww(i); deltaP(i)=abs(exp(-30*j*w)-1); e(i)=1/deltaP(i); M1(i)=1/abs(1+Tm1*j*w);M2(i)=1/abs(1+Tm2*j*w); C(i)=(polyval(numc,j*w))/(polyval(denc,j*w)); P(i)=(polyval(nump,j*w))/(polyval(denp,j*w)); H(i)=abs(C(i)*P(i))/abs(1+C(i)*P(i)); end

5.3.2 Tuning of the 2DOF-SP for the FOPDT Model The dynamic behaviour of many processes in industry can be approximated by an FOPDT model Kp e−Ls . Pn (s) = 1 + Ts

5.3 The Two-degree-of-freedom SP

155

The following analysis is specifically focused on the tuning rules for this case. This assumption allows the results of this chapter to be compared to several works where this model is used to derive the tuning rules of other dead-time compensators. The tuning rules can be reduced to: • •

K

Choose Gn (s) = 1+Tp s . Choose C(s) = kc (1 + sT1 i ). By making Ti = T , the characteristic equation is 1 + C(s)Gn (s) = 1 +





kc Kp . sTi

Define a closed-loop time constant T0 and compute kc = Choose F (s) =

Ti Kp T0 .

1+sT0 1+sT1 .

With this choice, the closed-loop transfer functions are given by

 e−Ls Y (s) Kp e−Ls Y (s) e−Ls = , = 1− , R(s) 1 + T1 s Q(s) 1 + Ts 1 + T0 s

(5.14)

which shows that the nominal set-point response (defined by parameter T1 ) has been decoupled from the disturbance response (defined by parameter T0 ). As a measure of controller robustness dP (ω) =| 1 + jωT0 |

(5.15)

is used, showing that T0 also defines the robust stability and can be chosen to achieve a good compromise between robustness and disturbance rejection. Note also that T0 and T1 have a clear physical meaning and can easily be used by practitioners. It is clear that small values of T0 will cause faster disturbance responses and, at the same time, a less robust behaviour of the closed-loop. The proposed controller has five parameters (Kp , T, L, T1 and T0 ) to be tuned, the same as the two-degree-of-freedom PID presented in Chap. 4. Thus, this controller combines simplicity and performance in the control of dead-time processes. 5.3.3 Predictive PI Controller In the dominant-dead-time case the closed-loop response will also be dominated by the dead time and it is not necessary to speed it up. A simple tuning can be used T0 = T1 = T ⇒ Kc = 1/Kp ,

Ti = T.

The controller is called predictive-PI (PPI, [41]). Note that the simple tuning rule (only three parameters are tuned) eliminates the zero of the reference filter and gives a fixed robustness index.

156

5 The Smith Predictor 1

10

0

magnitude

10

−1

10

−2

10

−1

10

0

1

10 normalised frequency

10

Fig. 5.20. Tuning of T0′ for robust stability. dP for T0′ = 0.4 (dashed line), T0′ = 0.69 (solid line), T0′ = 0.9 (dashed-dotted line) and modelling error (thick line)

It is clear that when the modelling errors can be estimated, robust tuning of the controller is the most appropriate solution. This is discussed in the next section. 5.3.4 Robust Tuning For processes with dominant dead time, robust tuning of the 2DOF-DTC can be obtained taking only dead-time-estimation errors into account. Notice that under these circumstances, the error in the dead time dominates the other sources of errors as shown in Chap. 2. In this case, the robustness stability of the controller is defined by the condition dP (ω) >| 1 − e−∆Ljω |

∀ω.

(5.16)

When the maximum value of the dead-time-estimation error ∆Lmax is known, a simple tuning rule for a robust stable controller can be defined by choosing T0 in such a way that the right part of the Equation (5.16) intersects the left part of the same equation for ∆L = ∆Lmax . This is approximately obtained for T0 = 0.69∆Lmax. Defining a normalised frequency ωn = ∆Lmax ω, the expressions dP (ωn ) =| 1 + jωn (T0 /∆Lmax ) | and | δP (jω) |=| 1 − e−jωn | are compared for different values of T0′ = T0 /∆Lmax , as shown in Fig. 5.20. The tangent condition is then obtained T0 = 0.69∆Lmax.

(5.17)

5.3 The Two-degree-of-freedom SP

157

Note that for a defined T0 this relationship allows the maximum admissible error in the dead-time estimation (∆Lmax ) to be computed. Although this tuning rule does not consider errors in the estimation of the gain and equivalent time constant of the process, it introduces a small error when the dead time is dominant, as explained in Chap. 2. In practice, robust stability is not sufficient and robust performance is desired. In this case, a greater value of T0 must be used in order to obtain a lower oscillation response when the model differs from the real process. To define the robust performance for the disturbance response a simple rule can be used. For example, a factor of 0.5 can be applied to the robust stability condition dP (ω) > 2 | 1 − e−∆Ljω |→

| 1 − e−∆Ljω | < 0.5 dP (ω)

∀ω.

(5.18)

Using the same procedure as in Equation (5.17), the condition for the robust performance is (5.19) T0 = 1.7∆Lmax . A rule of thumb for tuning the reference filter is to choose T1 ∈ [T, T0 ]. Table 5.1 shows the suggested tuning rule and the following case study illustrates the tuning procedure (see also Exercises 5.9 and 5.10). Table 5.1. Robust tuning of the 2DOF-SP using T0 = 1.7∆Lmax Predictor model Controller Filter Kp e−Ls 1+sT

Kc (1+Ti s) Ti s

Kc Ti

(1+T0 s) T 1+T1 s Kp T0

T1

T T1 ∈ [T, T0 ]

5.3.5 Case Study: Air Flow Control System The air flow control system shown in Fig. 5.21 consists of a long tube in which the air flow is controlled by varying the angular speed of a small fan situated at one end of the tube. At the other end, a small turbine is used to generate a voltage proportional to the flow. The system also allows some perturbations to be introduced and the system dynamics to be changed by operating a manual mechanism in the middle of the tube. Both in the fan and in the turbine, an electronic system is used to provide a voltage proportional to the flow between 0 and 5 V. This system is used to simulate the control of cold air in a central air conditioner system. The control algorithm can be implemented using a real-time control structure and a data acquisition system. In the experiments, step tests have been used for model identification by using the curve reaction method proposed in Chap. 3. Although the system

158

5 The Smith Predictor

AIR FLOW

FAN V

FT

TURBINE

power supply

Manual Mechanism Fig. 5.21. Air flow control system

presents nonlinear behaviour, a simple model can be obtained by experimental step tests close to the middle of the operating range (0 − 5 V) P (s) =

1.02e−8.2s , (1 + 1.7s)

(5.20)

Because of poor information about the uncertainties, the proposed controller was tuned for a 30% dead-time-estimation error, thus, using the tuning rule: T0 = 1.7∆Lmax gives T0 = 4.1 s. T1 was chosen as T1 = T = 1.7 s. The controller obtained is then

Pn (s) =

e−8.2s , 1 + 1.7s

C(s) =

0.41(1 + 1.7s) , 1.7s

F (s) =

1 + 4.1s . 1 + 1.7s

The experimental results for some changes in the set-point and a perturbation introduced at t = 70 s are shown in Fig. 5.22. As can be seen, the controller performs well even when the flow is below or above the operating point of 2.5 and the gain and dead time of the process are different to those the model.

5.4 When to Use a DTC DTC structures are more complex and require more knowledge for tuning than traditional PIDs. Is the more complex design and tuning when compared to PID compensated for by better performance and robustness? There is a tendency to think that DTC should be used when the dead time of the process is dominant. In this section we will discuss these points and show that the improvement obtained with a DTC has more to do with the error in the estimation of the dead time than with the absolute value of the dead time. First consider that the process can be modelled by an FOPDT transfer function. In this case, a PI controller allows a desired performance to be obtained for the dead-time-free model of the process . Furthermore, a PID can be tuned considering that the derivative action copes with the dead time and

5.4 When to Use a DTC

159

4.5 plant output 4 set−point

3.5

SIGNALS (volts)

3 control action 2.5 2 1.5 1 0.5 0 0

10

20

30

40 50 60 TIME (seconds)

70

80

90

100

Fig. 5.22. Responses of the air flow control system with the 2DOF-DTC

the proportional and integral actions with the dead-time-free model of the process. If a high-order model with a dead time is necessary to describe the dead-time-free behaviour of the process, a high-order primary controller is needed in the DTC and a high-order traditional controller (no longer a PID) also has to be used. In these cases, it is clear that limitations on the performance of the PID are due to the order model and not to the dead time. For the FOPDT process, an ideal solution is obtained with the SP and a PI primary controller. When modelling errors are considered, mainly in the dead time, the controller has to be detuned to improve robustness, as has been shown in this chapter. The PID also has to be tuned to maintain robustness. The PID can be analysed as an SP with a dead-time model computed using a Pad´ee approximation, as shown in Chap. 4. This is equivalent to considering a nominal model Pn1 (s) =

Kn (1 − 0.5Ln s) . (Tn s + 1)(1 + 0.5Ln s)

In the SP the nominal model is Pn2 (s) = Consider that the real plant is

Kn e−Ln s Tn s + 1

160

5 The Smith Predictor

magnitude

case 1 0

10

−2

10

−1

0

10

10

1

10

magnitude

case 2 0

10

−2

10

−1

0

10

10

1

10

magnitude

case 3 0

10

−2

10

−1

0

10

10 frequency

1

10

Fig. 5.23. Modelling error | ∆P (jω) | for the PID (dashed lines) and SP (solid lines). Case 1 with L = 1.1Ln , case 2 with L = 1.4Ln and case 3 with L = 1.8Ln

P (s) =

Kn e−Ls , Tn s + 1

that is, only dead-time-estimation errors are considered | ∆P (jω) |P ID =| P (jω) − Pn1 (jω) |, | ∆P (jω) |SP =| P (jω) − Pn2 (jω) | . These two errors can be compared using a normalised frequency ωn = Ln ω for different dead time errors. Figure 5.23 shows three cases: Case 1 with L = 1.1Ln , case 2 with L = 1.4Ln and case 3 with L = 1.8Ln. Note that as the error increases the difference between the curves goes to zero at higher frequencies. Using the robust tuning rule of the 2DOF-SP that defines the closed-loop time constant T0 as T0 = 1.7∆Lmax it is possible to derive the cut frequency of the closed-loop system as ωc = Using the normalised frequency

1 1 = . T0 1.7∆Lmax

5.5 Summary

ωcn =

161

Ln 1 = . 1.7∆Lmax 1.7δLmax

For the situations analysed: Case 1 has δLmax = 0.1, case 2 has δLmax = 0.4 and case 3 has δLmax = 0.8, giving ωcn1 = 5.88,

ωcn2 = 1.47,

ωcn3 = 0.73.

Analysing the results in Fig. 5.23 it is possible to conclude that: • • •

In case 1, the difference between the two modelling errors in the range [0, 5.88] is important, and the SP can be tuned to offer a better trade-off between performance and robustness. In case 3 the difference between the two modelling errors in the range [0, 0.73] is almost zero, and the PID can be tuned to offer almost the same trade-off between performance and robustness as the SP. Case 2 shows an intermediate situation.

These results are obtained independently from the nominal value of the dead time, thus, for small modelling errors, the DTC will offer a better solution even for small dead times. It is not possible to derive a general formula for all types of processes to compare the PID and SP using a trade-off between performance and robustness. However, it must be clear that the improvement in performance obtained with a dead-time compensating controller is associated with the dead-time-estimation error and not with the absolute value of the dead time. Finally, for small modelling errors, the advantages of the DTC are more appreciable when the dead time is dominant.

5.5 Summary The SP is a simple and effective controller for dead-time processes. The main advantages and limitations of the SP are the following: • • • •

It eliminates the effect of the dead time in the nominal set-point response. A good trade-off between robustness and performance can be obtained by appropriate tuning of the primary controller. It cannot be used with integrative and unstable processes. The disturbance rejection response cannot be faster than that of the openloop. This can be important when the dead time is nondominant.

The Smith predictor can offer better responses than a PID controller, mainly in the case where the dead time is dominant and well known. These advantages are more evident when high-order models are used. In general, the improvement of the performance compensates for the increase in the tuning complexity.

162

5 The Smith Predictor

The simple PPI is easy to tune and appropriate when the process exhibits a dominant dead time and the FOPDT model adequately represents the process dynamics. The PPI allows reasonably robust performance if the deadtime-estimation error is under 70% of the ratio T /L (see Exercise 5.7). In other cases, more complex models can be used and a robust tuning of the 2DOF-SP should be defined.

5.6 Further Reading Much research has been carried out on the Smith predictor. The practical stability is analysed in [97] and [100] to show that if the primary controller is not properly tuned, the SP may be unstable when a small mismatch in the dead time is considered, in spite of having good values of gain margin and phase margin for the ideal system. The three fundamental properties of the SP are presented in [47], while in [70] the authors discuss some of the “myths” of SP, pointing out that the SP does not in any way increase sensitivity to modelling errors; that is, the primary controller defines the robustness of the closed-loop. In the same work an IMC tuning of the SP is proposed, taking into account robust performance. Different types of tunings of the parameters of the SP are proposed in [117] and [56] for robustness improvement. The idea of the “ideal” controller has been discussed in the context of internal model control (IMC) [35]. The limitations imposed by the dead time in the process control are presented in [45]. An analysis of the asymmetry of the dead-time-estimation error effect on performance and stability is made in [59, 46, 96]. The PPI controller was proposed by H¨agglund [41]. The 2DOF-SP has been introduced in an unified approach also valid for integrative processes in [84]. Good reviews of several methods including some comparative analysis are presented in [99, 77, 81].

5.7 Exercises 5.1. Consider the process P (s) and model Pn (s) represented by P (s) =

5 , (1 + s)8

Kp −Ls e . 1 + sT

Tune a PPI controller and compare the results with the PID controller using the results of Exercise 4.2. Compare the closed-loop behaviour of the system using a change in the set-point and an input step disturbance. 5.2. Analyse the robustness of the controllers in the previous exercise. Retune the SP using the general method considering the modelling error. Compare the results with Exercise 5.1. Use a 2DOF-SP if necessary.

5.7 Exercises

163

5.3. For the same process as in Exercise 5.1, identify a second-order model plus a dead time. Retune the SP for this case. Compare the results with Exercises 5.1 and 5.2. 5.4. Compute the real closed-loop transfer functions for the 2DOF-SP when P (s) = Pn (s). (jω) 5.5. Analyse the shape of | YR(jω) | using a parametrised set of curves for the worst cases ∆L = ∆Lmax and ω ′ = ∆Lmax ω. Relate the tuning of T1 to the overshoot and the attenuations of the oscillations.

5.6. Repeat the analysis of the disturbance rejection capabilities of the SP (Sect. 5.2.1) for the general case where Y (s) = P1 (s)U (s) + P2 (s)Q(s). −Ls

5.7. Consider the process represented by P (s) = Ke 1+T s and the model K −Ln s . Compute the delay margin for the PPI tuning as a function of 1+sT e the ratio T /L. Compute also the relationship between ∆Lmax and T /L for the robust performance tuning suggested for the 2DOF-SP. −5s

−5.5s

e e 5.8. For the process P (s) = (1+s)(1+2s) and the model Pn (s) = 1+2.5s consider a 20% error in the dead-time estimation and a 10% error in the gain estimation. Tune a PID with the rule in Table 4.2 and a robust DTC. Compare the closed-loop set-point, disturbance and frequency responses of the two controllers. Use the results in Sect. 5.4 for the frequency domain comparisons. −Ls

5.9. Consider the process P (s) = e1+s in three different situations. Case (a) L = 3, ∆Lmax = 1; case (b) L = 10, ∆Lmax = 1.5 and case (c) L = 15, ∆Lmax = 3 (note that each case has a different relative dead-time-estimation −Ln s error). Consider an SP with model Pn (s) = e 1+s , with Ln = 3 in case (a), Ln = 10 in case (b) and Ln = 15 in case (c). Tune the controller for the three cases using the robust performance rule. Verify that the proposed tuning satisfies the specifications in all cases. Analyse the effect of T1 . −Ls

1.1e 5.10. The process is simulated using P (s) = (1+0.5s) 2 (0.2s+1) for the cases (a) L ∈ [2, 4], (b) L ∈ [8.5, 11.5] and (c) L ∈ [12, 18]. The model in the predictor is −Ln s Pn (s) = e 1+s , with Ln = 3.3 in case (a), Ln = 10.3 in case (b) and Ln = 15.3 in case (c). Repeat the study of the previous exercise.

6 Dead-time Compensators for Stable Plants

Chapter 5 shows how to use and tune the SP controller to control dead-time processes. The limitations in the performance of the SP are shown. This chapter presents modifications to the SP that have been proposed in the literature and are suitable for open-loop-stable processes. The integrative and unstable cases are presented in Chap. 7. The results of this chapter summarise part of the research that has been carried out in the last few years to improve the performance of the SP. An analysis of these controllers is presented using an approach that considers the set-point and disturbance rejection responses and robustness. Some controllers that are simple to implement and tune are also analysed because they are important in practice.

6.1 A Simple Robust Solution: The Filtered SP As shown in the examples of Chap. 5, dead-time errors can drive the SP to instability. A simple analysis of the block diagram of the SP in Fig. 5.1 shows that when dead-time errors are considered, the errors between the real and the predicted outputs are fed back to the controller in a “ periodic” way. Note that after the change in the set-point is applied at t = t0 , the error between the real output and the predicted one (ep (t) = y(t) − yˆ(t)) will be zero until the instant t = t0 + x where x =min(Ln , L). This signal is then fed back to the controller and its reaction will be perceived at ep (t) after only x s. This error may cause closed-loop instability, but on the other hand, if this error is not fed back to the controller, the disturbances will not be rejected. Thus, the effect of the dead-time-estimation error can be interpreted as the addition of the nominal response plus a periodic disturbance with a period approximately equal to min(Ln , L) (see for instance, the results in Fig. 5.10). A simple solution to this problem is to use a filter Fr (s) with unitary static gain (Fr (0) = 1), as shown in Fig. 6.1 [76]. The filter should be designed to attenuate the oscillations in the plant output especially at the frequency

166

6 Dead-time Compensators for Stable Plants

q (t) r (t) + _

+ C (s)

y (t) P(s)

+

y^ ( t + L n ) e -Lns

G n (s) y p (t)

^y ( t )

+ +

+ _

F r (s)

e p (t)

Fig. 6.1. Structure of the filtered SP (FSP)

where the uncertainty errors are important. This can be done by a low pass filter that, as will be shown, increases the robustness of the controller. The robust stability condition for the SP is δP (ω) < dPSP (ω) =

| 1 + C(jω)Gn (jω) | | C(jω)Gn (jω) |

∀ω, > 0.

(6.1)

while, using the new structure (the FSP) we have the new condition δP (ω) < dPFSP (ω) =

| 1 + C(jω)Gn (jω) | | C(jω)Gn (jω)Fr (jω) |

∀ω > 0.

(6.2)

Comparing Equations (6.1) and (6.2) dPFSP (ω) =

dPSP (ω) . | Fr (jω) |

(6.3)

That is, if the filter Fr (s) is low pass it can be used to improve the robustness of the system at the desired frequency region. Equation (6.3) shows that dPFSP (ω) can be increased arbitrarily at medium and high frequencies using an adequate Fr (s). Note that if there are no disturbances (q(t) = 0), the nominal performance of the closed-loop system is not modified by the inclusion of Fr (s); when the process and plant model are equal, the signal error ep (t) = y(t) − yˆ(t) is zero, so the filter has no effect on the closed loop. This is an important property of the FSP controller. It must be noted, however, that the nominal disturbance to the output closed-loop transfer function is modified by the inclusion of the filter. In general, after the inclusion of the filter, the response will be slower (s) is than the nominal one. Note that the new YQ(s)   Y (s) Fr (s)C(s)Gn (s) −Ls = Gn (s)e−Ls 1 − e , Q(s) 1 + C(s)Gn (s) so Fr (s) will produce slower transients than those obtained with the SP. The properties of the FSP suggest the following two-step general procedure for tuning the controller:

6.1 A Simple Robust Solution: The Filtered SP

167

q (t) r (t)

1 1+ sT

+ _

Kc

y (t)

+ P(s) y^(t+ L ) G n (s)

y^(t)

e -Ls

+ _

F r (s)

e p (t)

Fig. 6.2. Simple structure of the filtered PPI

• •

Compute C(s) (and a reference filter F (s) when necessary) in order to obtain the desired closed-loop performance for the nominal plant. Estimate the uncertainties of the plant and compute the filter Fr (s) in order to obtain robust stability or robust performance. The filter Fr (s) can be defined using known filter design techniques.

The idea of the FSP can be applied to the PPI to reduce the number of tuning parameters. In this case, filter Fr (s) can be defined as a first-order filter with only one parameter (the time constant Tf ) related to Ln Fr (s) =

1 1 = 1 + sTf 1 + sǫLn

ǫ > 0,

where the fourth parameter ǫ can be tuned in order to obtain the desired performance and robustness. When the frequency of the oscillations in the output response is considered, a simple tuning can be derived for the first-order filter. Using the cutfrequency of the filter as 1/3 of the frequency of these oscillations, Tf can be chosen as Tf = Ln /2 (ǫ = 0.5). This choice gives a good solution for deadtime errors of up to 30% (see Exercise 6.1). For implementation purposes a simplification in the block diagram of Fig. 6.1 can be used for the FPPI. C(s) is a PI controller with Ti = T and Kc = 1/Kp and the equivalent controller in the IMC form is C ′ (s) =

Kc T Ts+1 C(s) s = = Kc , T s+1 Kp 1 + C(s)Gn (s) 1 + Kc T s T s+1

1 and, including a reference filter F (s) = 1+sT , the block diagram of the controller is drawn as in Fig. 6.2. To illustrate the effects of Fr (s) on the closedloop system the case analysed in Example 5.6 is considered.

Example 6.1: Consider the same plant, nominal model and controller parameters as in Example 5.6. Using the previous analysis, the filter is defined 1 as Fr (s) = 1+0.5L , that is Tf = 0.5Ln = 5.25. Also in this case, the mons delling error for L = 9 and Kp = 0.8 and L = 12 and Kp = 1.2 and dP (ω)

168

6 Dead-time Compensators for Stable Plants 2

10

dP |δ P|(K=0.8, L=9) |δ P| (K=1.2, L=12)

1

magnitude

10

0

10

−1

10

−2

10

−1

0

10

10 frequency

1

10

2

10

Fig. 6.3. Modelling error for L = 9 and Kp = 0.8 and for L = 12 and Kp = 1.2. dP (ω) for the FPPI-based control system; Example 6.1

are compared (see Fig. 6.3). Note that with the defined filter, the closed-loop system is stable in both cases. To illustrate the effect of the filter on the time domain, the behaviour of the PPI and FPPI are compared in Fig. 6.4, where a step change in the reference is performed at t = 5. Figure 6.4 shows the closed-loop performance of the PPI and the FPPI when L = 12 and Kp = 1.2. As can be seen, the response of the FPPI is stable but the PPI is unstable (the simulation for this controller was stopped at t = 65). This analysis shows that it is possible to solve the robustness problems associated with the SP and at the same time use a simple tuning rule for most industrial plants, such as the PID tuning rules. Table 6.1 shows the complete tuning for the identified FOPDT model. Table 6.1. Suggested FPPI parameter values Model Kp 1+sT

Kc Ti L Tf

e−Ls 1/Kp T L 0.5L

To illustrate the results that can be obtained using this simple DTC, the FPPI was tested at a pilot plant and compared to the basic PPI.

6.1 A Simple Robust Solution: The Filtered SP

169

2

output

1.5

y (PPI) y (FPPI) set−point

1 0.5 0 0

10

20

30

40

50

60

70

40

50

60

70

time 3

control action

u (PPI) u (FPPI) 2

1

0 0

10

20

30 time

Fig. 6.4. Behaviour of the FPPI and the PPI for Example 6.1. Case L = 12, Kp = 1.2

6.1.1 Case Study: Temperature Control at a Pilot Plant The pilot plant is used as a test bed for control strategies that can be implemented on an industrial SCADA connected to it. This plant is basically a system using water as the working fluid, in which various thermodynamic processes with interchanges of mass and energy can take place. It essentially consists of a tank with internal heating, a series of input−output pipes and a recirculation circuit with a heat exchanger. A diagram of the plant showing its main elements is given in Fig. 6.5. It has a feed circuit with two input pipes (cold water and hot water) with pneumatic valves for regulating the input flows and a thermally insulated tank with a 15 KW electric resistance for heating. The hot water in the tank can be cooled by sending cold water through the cooling circuit, composed of a centrifugal pump that circulates the hot water from the bottom of the tank through a tube bundle heat exchanger, returning at a lower temperature to the top. To control the installation there is a distributed control system composed of a controller and a supervisor connected by a local data highway. The former is in charge of carrying out the digital control and analogue routines whilst the latter acts as a programming and communications platform with the operator. The control algorithms, in this case the PPI and FPPI, will be implemented on this distributed control system. The digital implementation

170

6 Dead-time Compensators for Stable Plants Hot water Cold water

FT1

FT2

TT1

V4

TT2

V5

Heat exchanger TT4

PT1 LT1

V8

TT5

Tank Heater

FT3

Pump TT3

Waste

Fig. 6.5. Diagram of the pilot plant

of the controller was carried out by direct discretisation of the continuous control law and the sampling time was chosen as Ts = 1 s. The heat exchanger can be considered to be an independent process within the plant. The exchanger reduces the temperature of the recirculated water driven by the pump by using a constant flow of cold water. The method of controlling the output temperature T T4 is to vary the flow of the recirculated water using valve V8 ; thus, the desired temperature is obtained by variations in the flow. In brief, the heat exchanger is no more than a tube bundle with hot water inside that exchanges heat with the external cold water. Thus, it can be considered as being made up of a large number of firstorder elements that together act as a first-order system with pure dead time. The T T4 -V8 system will be approached by a transfer function of this type. Using several identification step tests working close to 35◦ C, the nominal model for the transfer function T T4 (s)/V8 (s) was chosen as Pn (s) =

0.11e−14s . 1 + 6s

Using Table 6.1 the control parameters are Kc = 1/Kp = 1/0.11 ∼ = 9, T i = T = 6 s, L = 14 s and Tf = 0.5L = 7 s. As the real process is nonlinear the effect of the parameter uncertainties is important. Several tests were performed to appreciate the differences between the performance of the PPI and the FPPI. In Fig. 6.6 the plant output and the control action are shown for both controllers when a disturbance in the cold water is introduced (the flow of cold water is stopped for three seconds). As can be seen in Fig. 6.6, the temperature T T4 has very oscillatory and poorly damped behaviour for

6.1 A Simple Robust Solution: The Filtered SP

171

39

38

PLANT OUTPUT

37

36

35

34

33

32 0

50

100

150

100

150

TIME(s)

95

CONTROL ACTION

90

85

80

75

70

65

60 0

50

TIME(s)

Fig. 6.6. Plant output and control action for the PPI (dashed lines) and FPPI (solid lines) controllers. Cold water flow disturbance

the PPI case (dashed line). Further note that the FPPI controller allows a welldamped time response (solid line). In order to illustrate the effect on the stability of the filter, changes in the temperature set-point were performed (first from 33◦ C to 35◦ C and then from 35◦ C to 33◦ C), using the PPI controller as shown in Fig. 6.7a. As can be seen, the closed-loop time response is very oscillatory and poorly damped. Then, at t = 460 s the filter is connected and the temperature reaches the desired set-point with a well damped transient. This experimental example confirms some of the conclusions of the analysis made in previous sections and shows the simple tuning procedure and the good compromise between the robustness and the performance of the FPPI. The simple design of Fr (s) in the FPPI does not allow the disturbance rejection response of the SP to be improved as the open-loop poles are main(s) . The elimination of the opentained in the closed-loop transfer function YQ(s) (s) loop poles from the closed-loop transfer function YQ(s) can also be achieved using the FPPI structure but with different tuning of filter Fr (s) (see Exercise 6.3). However, improvement in the disturbance rejection response causes a robustness deterioration. A modified SP can also be used to cope with this situation, as analysed in the next section.

172

6 Dead-time Compensators for Stable Plants 36

35.5

PLANT OUTPUT

35

34.5

34

33.5

33

32.5

32 0

100

200

300 TIME(s)

400

500

600

Fig. 6.7. Plant output for a change in the set-point using the PPI controller up to t = 460 and using the FPPI controller from t = 460 to the end

6.2 The SP with a Modified Fast Model As has been pointed out in the original structure proposed by Smith, the disturbance rejection properties of the closed-loop system cannot be arbitrarily defined as the open-loop poles are also closed-loop poles of the transfer (s) . This fact can be seen if the equivalent controller in Fig. 5.13 is function YQ(s) computed Ceq (s) =

C(s) C(s) = , 1 + C(s)H(s) 1 + C(s)[Gn (s) − Pn (s)]

and the fast model Gn (s) is chosen as Pn (s)eLs

C(s) . 1 + C(s)Gn (s)(1 − e−Lns )

Ceq (s) = Note that using C(s) = Ceq (s) =

Nc (s) Dc (s) ,

Gn (s) =

Np (s) Dp (s) ,

Nc (s)Dp (s) , Dc (s)Dp (s) + Nc (s)Np (s)(1 − e−Ln s ) N

(s)

that is, Dp (s) is a factor of the numerator Neq (s) of Ceq (s) = Deq and the eq (s) controller has zeros in the same position as the plant poles. This is true even in the case where C(s) cancels the plant poles. Note that if its numerator is chosen as Nc = Dp (s)Nc′ (s),

6.2 The SP with a Modified Fast Model

r (t) F (s)

+

+

_

_ v( t)

q (t)

+ C (s)

173

P(s)

+

y (t)

G m (s)- P n(s)

H(s)

Fig. 6.8. 2DOF-DTC with a modified fast model

then Ceq (s) =

Dp (s)Nc′ (s)Dp (s) , Dc (s)Dp (s) + Dp (s)Nc′ (s)Np (s)(1 − e−Ln s )

Ceq (s) = Thus

Dp (s)Nc′ (s) . Dc (s) + Nc′ (s)Np (s)(1 − e−Ln s ) ′ Neq (s) = Dp (s)Neq (s).

As the disturbance enters at the plant input, these zeros are poles of the (s) closed-loop transfer function YQ(s) Pn (s) Y (s) = = Q(s) 1 + Pn (s)Ceq (s) 1+ =

Np (s)e−Ln s Dp (s) Neq (s)Np (s)e−Ln s Dp (s)Deq (s)

Deq (s)Np (s)e−Ln s . ′ (s)N (s)e−Ln s ] Dp (s)[Deq (s) + Neq p

(6.4)

To avoid this cancellation between the zeros of Ceq (s) and the poles of Pn (s) a modified dead-time-free model (Gm (s)) can be chosen, Gm (s) = Pn (s)eLn s in such a way that H(s) = Gm (s) − Pn (s) does not have the poles of Pn (s). This scheme is shown in Fig. 6.8. A simple way to obtain this condition is using Gm (s) =

Nm (s) , Dp (s)

Nm (s) = Np (s),

and selecting Nm (s) in such a way that the following conditions are verified: H(s) |s=sj = 0

∀sj / Dp (sj ) = 0.

(6.5)

When these conditions are satisfied Ceq (s) will not cancel the poles of Pn (s). The equivalent controller Ceq (s) must have integral action if an off-set free closed-loop system is desired. This can be obtained using an integral action in C(s) and imposing (6.6) H(s) |s=0 = 0.

174

6 Dead-time Compensators for Stable Plants

Note that C(s) must be tuned to “control” the new fast model Gm (s). In general, this tuning is more complicated than the original case because to satisfy the conditions in H(s) the fast model normally includes zeros on the right side of the s-plane. To illustrate the previous analysis, consider the simple plant model and the fast model Pn (s) =

e−Ls , 1 + sT

Gm (s) =

Nm . 1 + sT

The conditions (6.5) and (6.6) are fulfilled if

Nm (s) − e−Ls



s=sj

= 0,

sj = 0, sj = −1/T.

The simplest Nm (s) that satisfies the conditions is Nm (s) = 1 + sT1 with T1 chosen for Nm (−1/T ) − eL/T = 1 − T1 /T − eL/T = 0, giving T1 = (1 − eL/T )T, that is, Gm (s) has a positive zero that goes to zero if L >> T (T1 → −∞). A direct consequence of the new fast model and primary controller is a negative effect on robustness. If C(s) is a PI tuned for a pair of fast poles in −1/T0, the new dP (ω) is given by      1 + C(jω)Gm (jω)   (1 + jωT0 )2      = dP (ω) =  C(jω)Gn (jω)   1 + jωTi 

and as T0 Lq . In this case is not possible to compute the inverse of e(Lq −L)s and the feedforward controller is Cf f (s) =

Gq (s) , G(s)

and the final transfer function is Y (s) = e−Lq s Gq (s)[1 − X(s)e−(L−Lq )s ]. Q(s)

(6.8)

Note that even in this case the solution is better than the one obtained when the feedforward action is not used. To show this, compare the trans(s) fer function YQ(s) in Equation (6.8) with the one without the feedforward action

 Y (s) C(s)Gn (s) −Ls −Lq s =e e Gq (s) 1 − . (6.9) Q(s) 1 + C(s)Gn (s) The term e−Lq s Gq (s) on the right side of the two equations is the same. The second term on the right side (the term between brackets) is different. First note that the dead time of this term in Equation (6.8) is L − Lq , while in Equation (6.9) it is L. That is, the dead time has been reduced in Lq . Secondly, the dynamics of this term in Equation (6.8) is given by X(s), C(s)Gn (s) . In general X(s) can be while in Equation (6.9) it is given by 1+C(s)G n (s) chosen to have a faster response than

C(s)Gn (s) 1+C(s)Gn (s) .

It is clear that in the two cases analysed, the advantage of this solution is less important when Lq → 0. The following example illustrates the use of the DTC with feedforward action. Example 6.3: Consider the plant in Fig. 6.12. In this process, the fluid comes into Tank 1 where it is heated using an electrical resistor. Power P of the resistance is controlled with voltage V . The temperature of the input fluid is T1 and the flow is constant and equal to F1 . The heated fluid is then mixed with a second fluid in Tank 2 that is located at a certain distance from Tank 1. This new fluid comes into Tank 2 with temperature T3 and flow F2 . The temperature of the obtained fluid T4 is measured at the end of the pipe. The objective of this process is to control T4 acting on the power P . The input temperatures T1 and T3 are considered to be disturbances and T2 is not measured. A model for this process is obtained by identifying the open-loop responses around an operating point defined by F1 = F2

180

6 Dead-time Compensators for Stable Plants TT

TT T1

T3

Tank 1 F1

F1

T2

resistor

F2

actuactor V

TT Tank 2

T4

Fig. 6.12. The thermal process with fluid mixture

T4 (s) = G2 (s)e−L2 s {0.5T3(s) + G1 (s)e−L1 s [T1 (s) + K0 V (s)]}, where G1 (s) =

0.5 , (1 + 5s)

G2 (s) =

L1 = 7,

1 , (1 + 2s)

K0 = 2,

L2 = 5,

and all the time constants and dead times are in seconds. Two different DTC will be designed, with and without the feedforward action. Furthermore, to show the improvement in the closed-loop response obtained with the feedforward action, the analysis will consider the two disturbances that enter at different points of the process. The input−output models, relating V , T1 and T3 to T4 are e−12 T4 (s) = Pn (s) = , V (s) (1 + 5s)(1 + 2s) T4 (s) 0.5e−12 = Pnq1 (s) = , T1 (s) (1 + 5s)(1 + 2s) T4 (s) 0.5e−5 = Pnq2 (s) = . T3 (s) (1 + 2s) Pn (s) is used to compute the primary controller C(s). In this case, a PID is used in the pole-zero form C(s) =

Kc (s − z1 )(s − z2 ) , s(s − p)

and p = −5 is set as a low pass filter for the realisability of the controller. The zeros are initially located between the open-loop poles in order to obtain

6.3 Improving the Disturbance Rejection Capabilities

181

a faster response than the open-loop one. Using the root-locus diagram the obtained solution is z1 = −0.4, z2 = −0.45 and Kc = 12. The feedforward controller for the disturbances in T1 is very simple in this case as the disturbance enters at the process input. Thus Cf f 1 (s) =

Pnq1 (s) = 0.5 Pn (s)

For the disturbances in T3 the ideal controller is Cf f 2 (s) =

Pnq2 (s) = 0.5(1 + 5s)e5s , Pn (s)

which is not realisable. Adding a low pass filter and eliminating e5s the controller is 0.5(1 + 5s) . Cf f 2 (s) = 1 + 0.5s Simulation results with and without the feedforward controllers are shown in Fig. 6.13 for an ideal case where no modelling errors are considered and when some modelling errors are introduced: 5% error in the estimation of K0 and 10% error in the estimation of L1 and L2 . The simulation considers a +5 step disturbance in T1 at t = 10 and a −2 step disturbance in T3 at t = 100. The simulations show the improvement in the disturbance rejection responses. In the nominal case for disturbance T1 a total rejection is achieved, while for disturbance T3 the effect of dead time of G2 is eliminated and a faster rejection is obtained. Figure 6.13 also shows that the improvement obtained with the feedforward action is appreciable even in the modelling error case. The simulations also show that the controller reacts without dead time that has been compensated and has higher values during the transients. The structure analysed in this section cannot be used in all situations because the disturbance is not always measurable. However, the idea can be used to improve the controller using an estimation of q(t). In this case, the controller is composed of a disturbance observer and a feedforward controller. One advantage of this approach is that the controller can easily be tuned to reject other types of disturbances and not only steps. An analysis of the disturbance observer is presented in the following. 6.3.2 The Disturbance Observer DTC For clarity, the following analysis will consider the system model Y (s) = P (s)(U (s) + Q(s)) where an input disturbance is used. However, the formulation of the controller can be made for the general case (see Exercise 6.6). In this case, the disturbance can be computed ideally as Q(s) = P −1 (s)Y (s) − U (s)

182

6 Dead-time Compensators for Stable Plants

control action

output

case L1=7, L2=5, K0=2 4 2 0 −2 0

100

150

50 100 case L =7.7, L =5.5, K =2.1

150

4 2 0 −2 0

50

100

150

8 6 4 2 0 −2 −4 0

50

100

150

8 6 4 2 0 −2 −4 0

50

control action

output

1

2

0

time

Fig. 6.13. Output temperature and control action for the DTC with the feedforward action (solid lines) and without the feedforward action (dashed lines). Example 6.3

and then used in a feedforward controller. This ideal solution is not realisable as P −1 (s) contains a term eLs , thus a delayed disturbance is computed e−Ls Q(s) = G−1 (s)Y (s) − e−Ls U (s),

(6.10)

−Ls ˆ Q(s) = V (s)[G−1 U (s)] n (s)Y (s) − e

(6.11)

that is, in the ideal case the delayed disturbance e−Ls Q(s) can be estimated. ˆ The estimated delayed disturbance Q(s) can be computed using the model Gn (s) and a filter V (s) that gives a proper and stable V (s)G−1 n (s)

and allows a feedforward action to be implemented to design the disturbance rejection characteristics of the closed-loop system. The complete controller must also include another degree of freedom to define the set-point response, giving the 2DOF dead-time compensator based on a disturbance observer (DO-DTC) as shown in Fig. 6.14a. The nominal transfer functions between the reference, the disturbance and the output of this system are given by (see Exercise 6.6) Y (s) = F (s)Gn (s)e−Ls , R(s)

Y (s) = Pn (s)[1 − V (s)e−Ls ]. Q(s)

(6.12)

6.3 Improving the Disturbance Rejection Capabilities

r( t ) F(s)

+

q( t ) +

+

u( t )

183

y(t) P(s)

_ _

+ Gn -1(s)

e -Ls

V(s)

(a)

r (t)

F (s) G n(s) + V(s)

V(s) _

G n(s)[1-V(s) e -Ls ]

q (t) u( t) + + P(s)

y (t)

(b) Fig. 6.14. Control structure of the DO-DTC: (a) Structure for analysis, (b) structure for implementation

When modelling errors are considered (P (s) = Pn (s)[1 + δP (s)], | δP (jω) |≤ δP (ω)) the characteristic equation is 1+

V (s) Pn (s)δP (s) = 1 + V (s)e−Ln s δP (s) = 0. Gn (s)

Thus, the robust stability of the closed-loop system is defined by δP (ω) < dP (ω) =

1 |V (jω)|

∀ω ∈ [0, ∞].

(6.13)

Equations (6.12) and (6.13) show that the controller has decoupled the setpoint tracking and the disturbance rejection responses, and that only V (s) defines the robust stability. Thus, V (s) is tuned for a compromise between robustness and disturbance rejection response and F (s) for a desired setpoint tracking behaviour. Note that for a fast disturbance rejection response V (s) must be 1 at high frequencies, while V (s) must be close to 0 at the frequencies where the model uncertainties are important. On the other hand, to reject the disturbances in the steady state V (0) = 1. The structure in Fig. 6.14a is not appropriate for implementation so a modified scheme must be used, as is shown in Fig. 6.14b. In this new structure it is clear that if G−1 n (s) has poles on the right side of the s-plane, V (s) has to be designed to eliminate these poles from the controller. This condition is achieved if V (s) has the same zeros as Gn (s) on the right side of the splane. Furthermore, for the implementation, V (s) must guarantee that GVn(s) (s) is proper. Thus, the relative degree of V (s) (the degree of the denominator

184

6 Dead-time Compensators for Stable Plants

minus the degree of the numerator) must be same as the relative degree of Gn (s). This structure also shows that the equivalent controller Ceq (s) has, at least, integral action (1 − V (s)e−Ln s = 0 for s = 0); thus the closed-loop system tracks step changes at the reference. The settling time and overshoot of the set-point response can be modified with an appropriate choice of F (s) which must be proper. To reject the disturbances of the form s1m in the steady state the numerator of Np (s) [1 − V (s)e−Ls ] (6.14) Pn (s)[1 − V (s)e−Ls ] = Dp (s) must have m roots in s = 0. This implies ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩

(1 − V (s)e−Ls )|s=0 = 0, − V (s)e−Ls )|s=0 = 0, .. .

d ds (1

dm−1 dsm−1 (1

(6.15)

− V (s)e−Ls )|s=0 = 0,

where m is the order of the disturbance (1 for steps, 2 for ramps, etc). Consider, for instance, an FOPDT model of the process and a step dis1 will be enough to satisfy turbance. Because m = 1, a simple V (s) = 1+T vs the conditions. In this case, the solution obtained is the same as the 2DOF-SP controller derived in Chap. 5 when T0 = Tv (see Equation (5.14)). However, in the case where a ramp disturbance is considered (m = 2) a second-order V (s) must be used. Moreover, 1 − V (s)e−Ln s must have two roots at s = 0, which implies [1 − V (s)e−Ln s ] |s=0 = 0 → V (0) = 1, d[1 − V (s)e−Ln s ] dV (s) |s=0 = 0 → |s=0 = Ln . ds ds The simplest V (s) is 1 + βs V (s) = . (1 + sTv )2 To satisfy the previous conditions, β = 2Tv + Ln and Tv is the tuning parameter. Tv is tuned for a trade-off between performance and robustness. Note that dP (ω) for this controller is defined by    (1 + sTv )2    dP (ω) =  1 + sβ 

Thus, this approach allows a more general solution that can be applied to every process model and every type of disturbance. This controller also allows independent tuning of V (s) and F (s). Furthermore, this structure can

6.4 IMC Interpretation of the DTC

185

be used for other types of disturbances, for example sinusoidal signals. If q(t) = sin(ω0 t), then the condition that V (s) must satisfy is (1 − V (s)e−Ls )|s=jω0 = 0,

(1 − V (s)e−Ls )|s=−jω0 = 0.

The following example illustrates the design of the DO-DTC for the case of ramp disturbances and Exercises 6.8 and 6.9 analyse the sinusoidal case. Example 6.4: Consider the process P (s) =

e−5s (1+s)3

and the model Pn (s) =

e−6s (1+2s) . The closed-loop system must follow

step changes at the set-point with a settling time similar to that of the open-loop and it must also reject ramp disturbances. To reject the ramps, V (s) should have order 2. In this case the corresponding V (s) is given by V (s) =

βs + 1 (L + 2Tv )s + 1 (6 + 2Tv )s + 1 = = . 2 2 (Tv s + 1) (Tv s + 1) (Tv s + 1)2

In this case, to maintain the open-loop settling time in the closed-loop response, F (s) = 1. Initially the tuning parameter Tv = 3 is chosen, based on the dead time of the model Tv = L/2. As can be seen in Fig. 6.15, the plant output can follow the reference in spite of the disturbances. To illustrate the effect of Tv , a different value is used in the following simulations (Tv = 2). As can be seen in Fig. 6.15, the closed-loop system has a faster response but some oscillations appear because of the effect of the model uncertainties. The MATLAB code for the example is: MATLAB code for the Example 6.4 % process data Lp=5; denpe=[1 3 3 1]; numpe=1; % model data L=6; denp=[2 1]; nump=1; % case 1: call Simulink model Tv=3; numV=conv([6+2*Tv 1],[2 1]); denV=[Tv*Tv 2*Tv 1]; sim(’simulationDTCexample64’); % case 2: call Simulink model Tv=2; numV=conv([6+2*Tv 1],[2 1]); denV=[Tv*Tv 2*Tv 1]; sim(’simulationDTCexample64’);

6.4 IMC Interpretation of the DTC As has been pointed out, the SP can be considered as a particular case of the IMC. The modified versions of the SP presented in the previous sections such as the FSP, FPPI, the 2DOF-DTC and the DO-DTC can also be represented as a two-degree-of-freedom IMC. A two-degree-of-freedom internal model control structure is shown in Fig. 6.16 [70]. Note that the DO-DTC described in the previous section has exactly the same structure if

186

6 Dead-time Compensators for Stable Plants

u and q

y and r

case Tv=3 1 0 −1 −2 0

y r 50

100

150

200

250

300

350

400

450

5 0 −5 0

500

u q 50

100

150

200

250 300 case T =2

350

400

450

500

u and q

y and r

v

1 0 −1 −2 0

y r 50

100

150

200

250

300

350

400

450

5 0 −5 0

500

u q 50

100

150

200

250 time

300

350

400

450

500

Fig. 6.15. Plant output, reference, disturbance and control action for the DO-DTC for Tv = 3 and Tv = 2. Example 6.4 q (t) r (t)

Q r(s)

+

u( t)

+

y (t)

P(s)

+

_

P n (s)

_

+

Q d(s)

Fig. 6.16. Structure of the two-degree-of-freedom IMC

Qr (s) = F (s),

Qd (s) =

V (s) . Gn (s)

Furthermore, as in the DO-DTC, Qd (s) defines the robust stability and the disturbance rejection and Qr (s) defines the set-point response in the IMC. The tuning of Qd (s) and Qr (s) is done using optimal procedures considering a defined type of input signals r(t) and q(t). A brief analysis of the IMC tuning is presented in the following. Consider that the process and model are equal (Pn (s) = P (s)). Thus, the error between the reference and the output is given by

6.4 IMC Interpretation of the DTC

187

E(s) = R(s) − Y (s) = [1 − P (s)Qd (s)]P (s)Q(s) − [1 − P (s)Qr (s)]R(s). The tuning of Qd (s) and Qr (s) can be derived using a reference weighting ωr and a disturbance weighting ωq to define the H∞ performance objectives [70] min || [1 − P (s)Qd (s)]P (s)ωq ||∞ ,

s = jω, ω > 0,

Qd

min || [1 − P (s)Qr (s)]ωq ||∞ ,

s = jω, ω > 0.

Qr

To consider the robustness, the condition for robust stability must be satisfied || P (s)Qd (s)δP (s) ||∞ < 1,

s = jω, ω > 0.

(6.16)

This problem can be solved using an optimisation algorithm. However, instead of the H∞ optimal solution, which is difficult to implement in industrial practice, a nonoptimal two step design method is normally used. The controllers are defined by ˜ d (s), Qd (s) = Fd (s)Q ˜ r (s). Qr (s) = FR (s)Q ˜ d (s) and Q ˜ r (s) are computed without taking model uncerIn the first step Q tainties into account and in the second step filters FR (s) and Fd (s) are used to improve robustness sacrificing performance. This trade-off design procedure achieves a nonoptimal solution that gives good results in practical applications [70]. Consider, for instance, the simple case of an FOPDT model P (s) = −Ls Kp e 1+sT and an IMC tuning with Qr (s) = Qd (s), a step set-point and a ˜ r (s) = 1+sT and a filter FR (s) = 1 gives step disturbance. Choosing Q Kp λs+1 e−Ls Y (s) = , R(s) 1 + λs

 Y (s) e−Ls e−Ls = 1− , Q(s) 1 + λs 1 + λs where the tuning of λ allows a trade-off between performance and robustness to be obtained. Note that this solution corresponds to the use of a PI controller in the SP T . λ is tuned using Equation (6.16) structure with Ti = T and Kc = λK p    δP (s)     1 + sλ  < 1. ∞

188

6 Dead-time Compensators for Stable Plants

6.5 Summary In this chapter several DTC structures for stable processes are considered. The FPPI is easy to tune and is recommended mainly if the process exhibits a dominant dead time, that is L >> T . Its tuning rules are conservative but robust as they allow very high dead-time errors. Manual tuning is also simple in this controller because the filter time constant has a very intuitive effect on the closed-loop response. The DTC with a modified fast model is only recommended when the dead time is not dominant, because in other cases the disturbance rejection is not appreciably improved. The feedforward controller should be used when the disturbances are measurable. It is a very efficient method to minimise the effect of the disturbances on the process output. Finally, for the general case both the DO-DTC and the 2DOF-FSP offer a good trade-off between performance and robustness.

6.6 Further Reading Several modifications in the SP structure have been suggested in the literature. The SP with a modified fast model is presented in [135] and some analysis of this structure is presented in [99]. The FPPI controller is proposed in [76] and is used to control a process with variable dead time in [75]. The 2DOF-DTC is introduced in a unified approach that is also valid for integrative processes in [84]. The disturbance observer approach is presented in [140] and also analysed in [139, 138, 130]. Other solutions that are similar to the disturbance observer approach can be found in [99] and the references therein. The IMC design is analysed in [70]. A good review of several methods including some comparative analysis is presented in [99, 77, 81].

6.7 Exercises 6.1. Compare the FPPI tuning with the general robust tuning of the 2DOF-SP in Chap. 5. Compute the delay margin of the FPPI and the maximal admissible value of the dead-time-estimation error for the performance index used in the 2DOF-DTC. −15s

6.2. Consider a high-order process with a dead time P (s) = 1.5e (2s+1)5 . Obtain an FOPDT model for P (s) an tune the PPI and FPPI controllers. Evaluate the robustness if a 15% dead-time-estimation error is assumed. 6.3. Consider the FSP structure. Design a filter Fr (s) in order to eliminate (s) . First, anathe open-loop poles from the closed-loop transfer function YQ(s) lyse the general condition and then compute Fr (s) for the case of an FOPDT

6.7 Exercises

189

model. Compare the improvement in the disturbance rejection response and the robustness deterioration with the DTC based on the modified fast model. Also compare the tuning procedure and the implementation. 6.4. Analyse the effect of the robustness filter in the FPPI controller for different L/T relationships and different parameter tuning. Consider the cases 1 and L/T = 2, L/T = 5 and L/T = 10. Study the filters Fr1 (s) = 1+sT f Fr2 (s) =

1+sT 1+sTf

.

6.5. Using the DTC with a modified fast model tune a PI primary controller to obtain a closed-loop disturbance response faster than the open-loop pole one (allocate a pair of fast poles at −1/T0). Verify that this is simple to obtain for small values of the dead time, but that when T1 increases (large values of L), it is more difficult to satisfy the desired conditions. Apply the results to e−5s e−s , (b) P1 (s) = 1+0.5s . Analyse the the following two cases: (a) P1 (s) = 1+0.5s robustness. (s) (s) 6.6. Derive the transfer functions YR(s) and YQ(s) for the DO-DTC when Y (s) = P (s)[U (s) + Q(s)]. Repeat the analysis for the general case where the process model is given by Y (s) = Pu (s)U (s) + Pq (s)Q(s). Use the ideas of the feedforward controller.

6.7. Consider the same process and model as in Exercise 6.2 and a sinusoidal disturbance q(t) = sin(0.5t) acting at the process input. Assume that q(t) is measurable. Compute a DTC with a feedforward action. Compare the results with a simple FPPI. 6.8. For the same case as in Exercise 6.7, consider that q(t) is not measurable. Compute a DO-DTC to reject q(t). Compare the results with those of Exercise 6.7. 6.9. Repeat the design of Exercise 6.8 considering that the disturbance is q(t) = 0.2 + sin(0.5t).

7 Dead-time Compensators for Unstable Plants

This chapter presents a generalisation of dead-time compensator controllers for the case of unstable processes. Internal stability and disturbance rejection problems are tackled and solved using appropriate structures and implementations.

7.1 Introduction In Chaps. 5 and 6 several structures and tuning rules of dead-time compensators were analysed for the control of open-loop-stable processes. As was pointed out in Chap. 2, there are some cases where the process exhibits integrative or unstable open-loop behaviour and a dead time. Some batch chemical reactors and heating boilers are examples of these types of processes that can be found in industry. This type of behaviour is also found in other areas, such as the manufacturing supply chain presented in Chap. 2. The original SP and some of the modified solutions presented in Chaps. 5 and 6 cannot be used with integrative or unstable plants because in the form presented they do not give a stable closed-loop system or they do not reject step disturbances. These two drawbacks of the SP will be discussed in this chapter, and the details and several tuning methods will be analysed. The unstable general case is studied and some particular solutions for the integrative case are presented, because this type of process is commonly found in practice and has received the most attention from researchers in recent years. The results presented summarise part of the research carried out over the last few decades. Robustness and performance issues are considered in this chapter similarly to in the previous chapters.

192

7 Dead-time Compensators for Unstable Plants

7.2 DTC for Unstable Processes As mentioned in Chap. 5, the original structure of the SP cannot be used to control unstable plants for the following reasons: • •

If the process has a pole p such that Re(p) > 0, the SP gives an internally unstable closed-loop system. For the particular case of integrative processes, the SP does not reject step disturbances at the plant input. In this case, internal instability can be avoided by proper implementation of the controller.

The closed-loop transfer functions of the SP in the nominal case are repeated here C(s)Pn (s) Y (s) = , (7.1) R(s) 1 + C(s)Gn (s)

 1 + C(s)Gn (s)(1 − e−Ln s ) Y (s) = Pn (s) . (7.2) Q(s) 1 + C(s)Gn (s) Using the previous transfer functions and assuming that • •

Gn (s) has at least one pole p such that Re(p) > 0, and it is possible to find C(s) to stabilise Gn (s); that is, the roots of 1 + C(s)Gn (s) = 0 are in the left part of the s-plane.

(s) Then, YQ(s) has, at least one pole on the right part of the s-plane. This property can be shown using the results of Chap. 6 (Sect. 6.2). Except (s) for a pole at s = 0, the poles of Pn (s) are always poles of YQ(s) , even in the case where C(s) cancels the poles of Pn (s). Thus, the poles p of Gn (s), such that Re(p) > 0, cannot be eliminated from the disturbance rejection transfer function. The integrative case is special in that at s = 0, 1−e−Lns = 0. Thus, internal instability is avoided if the controller is properly implemented. However, as was shown in Chap. 5, the SP does not reject the step disturbances because the equivalent controller has no integral action. To solve these problems it is possible to consider different approaches. All of them eliminate the open-loop unstable poles from the transfer function Y (s) Q(s) and guarantee the rejection of step disturbances in the steady state. In this chapter the following solutions will be presented:

• • •

A DTC with a modified fast model instead of the one used in the SP. A DTC based on the structure of the FSP with appropriate tuning of the robustness filter. A series of modified structures of the SP based on the idea of a feedforward controller based on an estimated value of the disturbance.

7.3 Using a Modified Fast Model

193

Because of the importance in practice, special attention is paid to some solutions that are only valid for integrative processes. As in the case of stable processes, the controllers will consider a 2DOF structure and the tuning will take into account the robustness of the closed-loop system.

7.3 Using a Modified Fast Model The same idea as used in the stable case to eliminate the slow open-loop poles (s) can be used here. Consider the of the process from the transfer function YQ(s) structure in Fig. 6.8, where Pn (s) is the plant model and Gm (s) is the fast model. Consider also that the fast model is different to the dead-time-free model Gm (s) = Gn (s). Pn (s) = Gn (s)e−Ln s , The new transfer function

Y (s) Q(s)

is given by

 Y (s) C(s)Gn (s)e−Ln s = Pn (s) 1 − , Q(s) 1 + C(s)Gm (s)

(7.3)

where, as in the stable case, Gm (s) can be chosen with the same denominator N (s) as Gn (s) = Dpp (s) and with a modified numerator Gm (s) =

Nm (s) . Dp (s)

Nm (s) is designed in order to •

eliminate the unstable poles of Dp (s) in 6, this is equivalent to

Y (s) Q(s) .

H(s) |s=p = [Gm (s) − Pn (s)] |s=p = 0 •

As has been shown in Chap.

∀p / Dp (p) = 0, Re(p) > 0;

reject steps in q(t). This is achieved using an integral action in C(s) and computing Nm (s) to verify the condition H(s) |s=0 = 0.

The complete tuning of the DTC must consider the complete model of the process to design the rest of the degree-of-freedom in C(s) and the reference filter F (s). Also, the implementation of H(s) cannot be achieved by the cancellation of unstable roots. In the following, the tuning and implementation are analysed. Because of the practical importance the analysis is made in detail for the integrative case and for a first-order unstable model.

194

7 Dead-time Compensators for Unstable Plants

7.3.1 The Modified Fast Model for the Integrative Case As has been pointed out, the integrative case is very important in practice. Consider that the process can be described by the model Ge (s) −Lns e , s where Ge (s) is a stable transfer function. In this case Gm (s) can be chosen as Pn (s) =

Gm (s) = Ge (s)

N (s) , s

where N (s) will be tuned to obtain: 

N (s) − e−Ln s = 0. lim Ge (s) s→0 s

(7.4)

With this condition and a primary controller with integral action the step disturbances will be rejected in the stable closed-loop system. Equation (7.4) gives the following conditions: N (0) = 1,

dN (s) |s=0 = −Ln . ds

(7.5)

The more simple solution for this problem is N (s) = 1 − Ln s, thus Gm (s) = Ge (s)

1 − Ln s s

(7.6)

will be used in the controller. The final tuning is then defined by the correct choice of C(s) and F (s) for the given process. Also in this case, the final solution is clearly more involved than in the stable case because C(s) must be tuned to control a dead-time-free model with an integrator and a zero on the right part of the s-plane. A general tuning will consider the faster disturbance rejection closed-loop response maintaining the robustness conditions. In a second step, F (s) is designed to improve the set-point response. This is analysed in Sect. 7.3.4. 7.3.2 The Modified Fast Model for the First-order Unstable Case If a simple unstable process model is considered Pn (s) =

Ke−Lns , Ts − 1

T > 0,

the modified fast model Gm (s) can be chosen as Gm (s) = K

Tm s + 1 , Ts − 1

7.3 Using a Modified Fast Model

195

which gives an H(s) with a zero at s = 0. Tm is computed in order to obtain H(s) = Gm (s) − Pn (s) without a pole at s = 1/T . As H(s) = K

Tm s + 1 Ke−Lns 1 =K [Tm s + 1 − e−Lns ] − Ts − 1 Ts − 1 Ts − 1

the cancellation of the root at s = 1/T is obtained if [Tm s + 1 − e−Ln s ] |s=1/T = 0. This condition is equivalent to Tm = −T (1 − e−Ln/T ), which gives a fast model Gm (s) with a pole and a zero located on the right half plane (note that Tm < 0). The tuning of the primary controller for this new fast model is more difficult than for the original fast model without the zero. Exercises 7.1 and 7.2 analyse tuning the primary controller for this case and the following example illustrates the computation of H(s) and Gm (s). Example 7.1: Consider the same process and model as in Example 5.7 in e−s e−s , Pn (s) = s−1 . As in this case, K = 1, T = 1, Ln = 1; Chap. 5: P (s) = s−1 thus Tm = −(1 − e−1 ) = e−1 − 1, giving H(s) =

1 [(e−1 − 1)s + 1 − e−s ], s−1

which has numerator and denominator with a root at s = −1. This cancellation must be eliminated for the implementation of H(s), as will be discussed in the next section. The tuning of C(s) must consider the new model Gm (s) =

(e−1 − 1)s + 1 , s−1

which has a pole at s = 1 and a zero at s = 1−e1 −1 . It is simple to extend this analysis to an n-order process with only one pole on the right side of the s-plane. Considering that Pn (s) =

Ge (s)e−Ln s , Ts − 1

T > 0,

where Ge (s) is stable, the fast model is given by Gm (s) = Ge (s) and

Tm s + 1 Ts − 1

196

7 Dead-time Compensators for Unstable Plants

Ge (s) [Tm s + 1 − e−Lns ], Ts − 1

H(s) =

where Tm has the same value as in the first-order case. 7.3.3 Implementation Issues

In the proposed controller the implementation of the inner loop must be made in order to have a stable H(s) = Gm (s) − Gn (s)e−Ln s , otherwise the scheme shown in Fig. 6.8 is not internally stable. Note that there is a pole-zero cancellation at the unstable poles in H(s). This pole-zero cancellation cannot be eliminated by the use of polynomial division because the numerator of H(s) is a nonrational expression. A solution for this problem consists of the derivation of a nondynamical form of the inner loop [99]. This derivation cannot be achieved using the transfer function approach as the final control law has no poles. Because of this, a state representation of Pn (s) is used dx = Ax(t) + Bu(t − Ln ), dt y(t) = Cx(t),

(7.7)

where A, B, C are matrices of proper dimensions and Pn (s) = C(sI − A)−1 Be−Ln s . Defining Gm (s) as Gm (s) = Ce

−ALn

−1

(sI − A)

B−



Ln

Ce−Aτ Bdτ

0

the inner loop is given by H(s) = Gm (s) − Pn (s) = Ce

−ALn

−1

(sI − A)

−1

B − C(sI − A)

Be

−Ln s





Ln

Ce−Aτ Bdτ,

0

which has a zero at s = 0 as desired. Consider the mathematical equality Ce−ALn



0

eτ (sI−A) Bdτ = Ce−ALn (sI − A)−1 B − C(sI − A)−1 Be−Ln s ,

−Ln

then H(s) is computed as H(s) = Ce

−ALn



0

−Ln

e

τ (sI−A)

Bdτ −



0

Ln

Ce−Aτ Bdτ.

7.3 Using a Modified Fast Model

197

Applying the inverse Laplace Transformation, the output signal of the inner loop (v(t)) is obtained as   0

v(t) = Ce−ALn

−Ln

e−Aτ Bu(t + τ )dτ −

Ln

Ce−Aτ Bdτ u(t).

(7.8)

0

Because of the finite limits of the integrals, the right side of Equation (7.8) has no singularities. Thus, the implementation is made without the pole-zero cancellation. Example 7.2: Consider the same process and model of Example 7.1. In this case, the state-space representation has the following matrices: A = 1,

B = 1,

C = 1,

and as Ln = 1 the implementation of v(t) is given by

 1   0 e−τ u(t + τ )dτ − e−τ dτ u(t) v(t) = e−1 −1

0

or equivalently v(t) = e−1



0

1

eτ u(t − τ )dτ − 1 − e−1 u(t).

This solution considers that the controller will be implemented in analogue equipments. This is not the case in practice, as the real time implementation is carried out using digital discrete platforms. If a discrete implementation is used, the discrete representation of H(s) = Gm (s) − Gn (s)e−Ln s is a rational function H(z) = Gm (z) − Gn (z)z −d, where d is the number of samples that represents the dead time. Thus, in this case, the pole-zero cancellation is solved directly and the implementation is easier. This point will be analysed in detail in Chap. 8. 7.3.4 Simple Tuning for the IPDT Model As in the stable case, because of the practical importance, tuning rules will be derived for the simple integrative-plus-dead-time model (IPDT) Pn (s) = Kv e−Ln s , which is the simple model most used in industry to describe ins tegrative processes. For this case, the fast model and the primary controller are

198

7 Dead-time Compensators for Unstable Plants

Gm (s) =

Kv (1 − Ln s) , s

C(s) = kc (1 +

1 ), sTi

and, for the closed-loop transfer function between the disturbance and the output, a double pole in s = −1/T0 is defined. This gives the following parameters: • •

Ti = 2T0 + Ln , 0 +Ln kc = Kv2T (T0 +Ln )2 .

To decouple the disturbance rejection and set-point responses, a filter is defined as (1 + sT0 )2 . F (s) = (1 + sTi )(1 + sT1 ) With this choice the closed-loop transfer functions are given by 

Y (s) e−Lns Y (s) Kv e−Ln s e−Ln s (1 + s(Ln + 2T0 )) = , = (7.9) 1− R(s) 1 + T1 s Q(s) s (1 + T0 s)2 and

   (1 + jωT0 )2  .  dP (ω) =  1 + jω(Ln + 2T0 ) 

(7.10)

That is, the parameter T1 defines the set-point response and T0 defines the disturbance response as well as the robust stability. The same conclusions about the compromise between performance and robustness of the controller derived for stable processes are valid for this case. The proposed controller has four parameters (Kv , Ln , T1 and T0 ), and when a model of the process is obtained experimentally, only two parameters (T0 and T1 ) need to be tuned. When the real process has high-order dynamics, a second-order model −Ln s Kv (1−Ln s) ve can be used Pn (s) = Ks(1+sT ) . In this case Gm (s) = s(1+sT ) and C(s) can be chosen as a PID controller. The same tuning procedure as in the previous case allows a closed-loop system with a double pole at s = −1/T0 to be obtained. Exercise 7.3 proposes the derivation of the PID tuning in this case. 7.3.5 Robust Tuning for the IPDT Model A study similar to the stable case is done here, again considering the multiplicative representation of the modelling errors. The robust stability of the controller is defined by the condition    (1 + jωT0 )2   ∀ω, | δP (jω) |< dP (ω) =  (7.11) 1 + jω(Ln + 2T0 ) 

As in Chap. 2, three types of uncertainties will be considered: (i) Errors in estimating the dead time, (ii) errors in the velocity gain Kv and (iii) unmodelled dynamics (that is, G(s) = 1/s). The real plant is then given by

7.3 Using a Modified Fast Model

P (s) =

199

K e−Ls s(1 + sTu )

and the model used in the control algorithm is given by Pn (s) = Kv s−1 e−Lns . The error in the velocity gain only affects the curve at very low frequencies where dP (ω) has very high values. Therefore, the error in the velocity gain will be neglected in the following analysis. That is, consider K = Kv , thus, using the multiplicative error defined in Chap. 2 with a normalised frequency (Tu′ = Tu /Ln , ωn = ωLn , δL = ∆L/Ln ) δP (jωn ) =

1 e−jωn δL − 1, 1 + jωn Tu′

Then, Equation (7.11) is written as        (1 + jωn T0′ )2  1 −jωn δL   δL + Tu′ (1 + 2T0′ )

or equivalently β=

T02 > L − Ln + Tu . Ln + 2T0

200

7 Dead-time Compensators for Unstable Plants 2

10

1

magnitude

10

0

10

−1

10

|δPn| dP (T´ =1) n

0

dPn (T´0=3) dPn (T´0=5)

−2

10

−2

−1

10

10

0

10 normalized frequency

1

10

2

10

Fig. 7.1. Analysis of Equation (7.13) for different values of T0′ ; δ = 0.2 and Tu′ = 0.05

Note that even if the velocity gain is not exactly known the value of δP remains practically unchanged at the frequencies analysed, as was shown in Chap. 2. To simplify the tuning rule, an analysis of the expression L−Ln +Tu can be carried out, taking into account the estimation error of both the dead time and the unmodelled dynamics. In practice, the nominal dead time Ln is defined so as to not only represent the real dead time of the plant but also the high-order dynamics. Assuming that the estimated dead time is Le and the estimated time constant of the nonintegrative part of the process dynamics is Te , a good approximation for Ln is Le + Te . Thus L − Ln + Tu = L − Le + Tu − Te , that can be considered dominated by the error in the estimation of the dead time, because for dominant-dead-time processes L−Le >> Tu −Te . Thus the maximum dead-time-estimation error is used to tune the robust condition β = ∆Lmax ⇒ T0 = β[1 + (1 + Ln /β)1/2 ]. Thus, it follows that    T0 = ∆Lmax 1 + 1 + Ln /∆Lmax .

(7.14)

If the controller must be chosen for robust performance specifications, β should be chosen greater than ∆Lmax . As a general tuning rule, the value of β ′ can be between 1.5δPn0 and 2δPn0 if a small overshoot time response is desired. If the same idea of the stable case is used and a factor of two is

7.3 Using a Modified Fast Model

201

Table 7.1. Robust tuning of the 2DOF-DTC with the modified fast model. β between 1.5 and 2 times ∆Lmax + Tu T0

Model Fast Model Kv e−Ln s s

Kv (1−Ln s) s

β[1 +



1+

Kc Ln 0 +Ln ] Kv2T β (T0 +Ln )2

Ti 2T0 + Ln

considered, the robust performance can be defined using β = 2∆Lmax and T0  Ln (7.15) T0 = 2∆Lmax 1 + 1 + 2∆Lmax Remarks: (i) With this tuning rule the parameter T0 depends on the estimation error of the equivalent time constant of unmodelled dynamics, on the dead time and on the estimation error of the dead time. (ii) The tuning rule takes into account the unmodelled dynamics in a very simple manner. (iii) It is important to note that in some particular cases the unmodelled dynamics impose harder restrictions on the parameters of the controller than the dead-time error. In these cases the complete expression β = ∆L + ∆Tu must be computed. This is the case when Te is not negligible if compared to Le and the variations on the high-order dynamics of the process are important. Table 7.1 shows the suggested tuning rule. Figure 7.2 shows the tuning for the robust stability and robust performance conditions for a particular situation where δL = 0.2, Tu′ = 0.05 and two different gain-estimation errors: Case 1 with δK = 0.1 and case 2 with δK = 0.2. Using the complete formula gives β ′ = 0.25 for the robust stability and β ′ = 0.5 for the performance case. Note that the error in the gain has very little influence on the solution obtained. The MATLAB code for this analysis is: MATLAB code for the robustness analysis % process data dL=0.20;dK=[.1 .2];tu=.05;DL1=dL+Tu;DL2=2*DL1; % tuning T01=DL1*(1+sqrt(1+1/DL1));T02=DL2*(1+sqrt(1+1/DL2)); % loops for kk=1:2 dk=dK(kk); ww=logspace(-2,2,300); for i=1:300; w=ww(i); deltaP=abs(((1+dk)/(1+w*j*tu))*exp(-w*j*dL)-1); dP1(i)=abs((1+j*w*T01)ˆ 2/((1+j*w*(1+2*T01)))); dP2(i)=abs((1+j*w*T02)ˆ 2/((1+j*w*(1+2*T02)))); end end

An example is presented to illustrate the tuning procedure and the closedloop responses obtained.

202

7 Dead-time Compensators for Unstable Plants 1

10

magnitude

dP (stability) dP (performance) |δ P| (δK=0.1) |δ P| (δK=0.2)

0

10

−1

10

−2

10

−1

10

0

10 normalised frequency

1

10

2

10

Fig. 7.2. Modelling error for 10% error in the gain (dashed line), 20% error in the gain (dotted line) and robustness index dP for the case of robust stability (solid line) and robust performance (dotted-dashed line)

Example 7.3: Consider a high-order plant with an integrator and long dead time 0.2e−Ls P (s) = , s(0.7s + 1)(0.6s + 1)(0.4s + 1)(0.1s + 1) where L can vary in the interval [12, 18] and a 10% gain estimation error is assumed. In this case an identification step test of the process gives the model −16.8s , where the nominal dead time Ln has been computed Pn (s) = 0.2 s e as 15 + 1.8, which are the values of the real dead time plus the time constant of the first-order representation of the nonintegrative part of the process. In this example Lmax = 18, Lmin = 12 and Tu = 1.8, Ln = 16.8, thus Lmax − Ln + Tu = Lmin − Ln + Tu = 3. The same values are obtained considering Le = 15, Te = 1.8. The maximum dead-time error is Lmax − Le = 3 and assuming that Tu − Te ∆L + Tu . > δL + Tu′ → 2 + Tr′ 2Ln + Tr As in Sect. 7.3.5, a parameter β can be defined for robust stability (β = ∆Lmax + Tu ) or for robust performance (β = 2(∆Lmax + Tu )) and the tuning of Tr as β Tr > , 1 − 2Lβn where Tu is again, in this case, the equivalent time constant of the unmodelled dynamics. Finally, the controller gain Kc is Kc =

1 . Tr Kv

This controller presents the same advantages of the FPPI presented in the stable case, because just like a PID controller it has only three tuning parameters: Kv , Kc and Ln . In manual tuning, when the evaluation of the modelling error is not possible the practical rule is to chose Tr similar to the equivalent time constant of the nonintegrative part of the process. Table 7.3 shows the suggested tuning rule. The disadvantage of this controller, if compared to the 2DOF-DTC analysed in previous sections, is that Tr also affects the disturbance rejection response and the robustness of the controller and therefore it does not allow the set-point and disturbance response to be decoupled. Furthermore, this controller cannot improve its disturbance rejection when the plant has very long dead times, as is shown in the comparative example presented in the following. Example 7.5: Consider the buffer tank level control of the evaporator unit shown in Fig. 7.10 (the process is presented in Chap. 2). The transfer function between the manipulated flow and the level is

218

7 Dead-time Compensators for Unstable Plants STEAM

EVAPORATORS

LT

LC

LC

BUFFER 1

JUICE

LC

LC

LC

FC

BUFFER 2

Fig. 7.10. Evaporator unit: Buffer tank level control

P (s) =

e−20s . s(0.9s + 1)(0.5s + 1)(0.3s + 1)(0.1s + 1))

In this example the DTC with a modified fast model (F-DTC) and the Matauˇsek and Mici´c DTC (MM-DTC) are compared. Using an identification step test the equivalent time constant is computed as Teq = 1.8; the equivalent dead time is L = 21.8 and the velocity gain is 1. −21.8s The nominal model is Pn (s) = e s . It is assumed that there is a 10% deadtime-estimation error and a 5% velocity gain-estimation error. As the deadtime error is dominant, for robust performance β is chosen as β = 2∆Lmax = 4. For the F-DTC this gives T0 = 14.16 and for the MM-DTC the parameters are K0 = 0.0229 and Kc = 0.2271. T1 = 5 is chosen for the F-DTC. The behaviour of the output of the plant is shown in Fig. 7.11 for two cases: (1) The nominal case, that is, the real dead time L = 20 and the real velocity gain is 1.0, and (2) the case where the real dead time L = 18 and the real velocity gain is 1.05. The set-point is changed from 0 to 2 at t = 5 and a −0.05 step disturbance is added at t = 100 s. In case 1 the modified DTC rejects the disturbance better. Also note that the set-point responses are equivalent. The robustness of the controllers is compared in case 2. As expected, both controllers have a stable response with a small overshoot. Even in this case the F-DTC has faster disturbance rejection. This superior performance of the F-DTC is more evident for long dead times [79]. The controller presented in this section uses both the simplest model and the simplest controllers C(s) and M (s). Using high-order models and/or controllers, the results obtained in this section can be improved. Several authors have proposed solutions using these more complex models (see the Further Reading section for some references). The following section presents a brief summary of these methods.

7.5 Rejecting Disturbances with Feedforward Action

219

case 1: L=20, K=1 r, y

2 y (F−DTC) y (MM−DTC)

1 0 0

50

100

150

200

250

300

350

u

1 u (F−DTC) u (MM−DTC)

0.5 0 0

50

100

150 200 case 2: L=18, K=1.05

250

300

350

r, y

2 y (F−DTC) y (MM−DTC)

1 0 0

50

100

150

200

250

300

350

u

1 u (F−DTC) u (MM−DTC)

0.5 0 0

50

100

150

200

250

300

350

time

Fig. 7.11. Response of the F-DTC and the MM-DTC. Set-point shown by dotteddashed lines. Example 7.5

The Improved Solutions −Ln s

Maintaining the simplest model Pn = Kv es and using a PI controller in C(s) and a PD controller in M (s), the closed-loop performance can be improved. The tuning of C(s) and M (s) can follow several approaches. For example, C(s) and M (s) can be, respectively, tuned for a desired gain margin and a phase margin of loops 1 + C(s)Pn (s) and 1 + M (s)Pn (s) (see Exercises 7.9 to 7.12). Moreover, the set-point response can be improved if a reference filter is included in the controller. This solution obviously increases the design and tuning complexity. In several cases, the behaviour of the real process can better be represen−Ln s ve ted using an SOIPDT model Pn = Ks(1+sT ) [49]. This model will give better results than the one based on the first-order model only when T is not negligible when compared to Ln . However, it must be noted that using a secondorder model it is possible to obtain a small modelling error and therefore to improve the robustness of the controller. In this case, M (s) is a PD controller while C(s) is a PI or a PID with set-point weighting. The tuning can be done, for example, using the same frequency approach as in the simplest case. The following example illustrates this case.

220

7 Dead-time Compensators for Unstable Plants −Ls

e Example 7.6: Consider the process P = s(1+10s)(1+s)(1+0.5s)(1+0.25s) with two different dead times. In case 1: L = L1 = 5 and in case 2: L = L2 = 30. The first-order models are defined as

Pn1 =

e−16.8s , s

Pn2 =

e−41.8s , s

Pn4 =

e−31.66s . s(1 + 10.14s)

and the second-order models as Pn3 =

e−6.66s , s(1 + 10.14s)

As can be seen, the dead time is only dominant in case 2. A dead-time estimating error of 20% and a gain estimating error of 5% are also considered. Two different tunings for C(s) and M (s) are considered. •

DTC1 uses first-order models and C(s) = Kc ,

M (s) = K0

Td s + 1 . 0.1Tds + 1

φm = 60◦ , Am = 2 are used for tuning M (s) (see Exercise 7.9) obtaining Td = 0.45L,



K0 =

0.8 . LKv

Kc is tuned using the robustness analysis of the simplest case considering β = L − Le + Tu − Te . Note that in case 1 the error in the estimation of Tu is of the same order as the error in the dead time. It is assumed that Tu − Te = 1.5 for the tuning of the DTC1. Thus, using the formula for robust performance gives β = 2(1+1.5) = 5 in case 1 and β = 2(6+1.5) = 15 in case 2. The second controller, DTC2, uses the second-order models, C(s) = Kc

Tc s + 1 , 0.1Tcs + 1

M (s) = K0

Td s + 1 0.1Tds + 1

and a tuning based on a pole-zero cancellation [49]. Thus, Tc = T and Td = T . Gains Kc and K0 are chosen, respectively, for a desired φm of the loop transfer functions C(s)Pn (s) and M (s)Pn (s) C(s)Pn (s) =

Kv e−Ln s Kc , 0.1T s + 1 s

K0 Kv e−Ln s . 0.1T s + 1 s Note that the solution is the same for the two loops. If the filter of the derivative action is neglected, the loop transfer functions are the same as the one obtained when Pn = Ksv and M (s) = K0 . Thus, using φm = 60◦ to tune the gain, the obtained Kc = K0 is M (s)Pn (s) =

7.6 Achievable Robustness for Unstable Plants

Kc = K0 =

221

1 . 2Kv Ln

The MATLAB code for the controller tuning is: MATLAB code for the controller tuning (case L = 5) % IPDT model data Ln1=16.8;DLmax=1;Kv=1;deltaKv=.05;DTmax=1.5 % tuning C and M for DTC1 beta=2*(DLmax+DTmax);Tr=beta/(1-beta/(2*Ln1));Kc=1/(Tr*kv); K0=0.8/(Ln1*kv);Td=0.45*Ln1;numM1=K0*[Td 1];denM1=[0.1*Td 1]; % SOIPDT model data Ln2=6.66;Kv=1;T=10.14; % tuning C and M for DTC2 K0=0.5/(Ln1*kv);Td=T; ;numM2=K0*[Td 1];denM2=[0.1*Td 1]; Kc=0.5/(Ln1*kv);Tc=T; ;numC2=Kc*[Tc 1];denM=[0.1*Tc 1];

The closed-loop behaviours of DTC1 and DTC2 are first compared for case 1. The simulation considers a step change (from 0 to 2) of the set-point at t = 10 and a −0.05 step disturbance at t = 150. The closed-loop responses obtained with the DTC1 (Td = 7.56, K0 = 0.0476, Kc = 0.172) and the DTC2 (Tc = Td = 10.14, Kc = K0 = 0.075) are shown in Fig. 7.12 without considering modelling errors and when the real dead time is L = 6 and the real gain is 1.05. As can be seen, the DTC2 has a better closed-loop response. Here it is possible to see the effect of the time constant T of the second-order model, which has a non negligible value when compared to Ln . A new situation is simulated for case 2 (L = L2 = 30): A step change (from 0 to 2) of the set-point at t = 10 and a −0.05 step disturbance at t = 500. Initially, the DTC1 was tuned with β = 15, giving Td = 18.81, K0 = 0.019, Kc = 0.0547. The obtained disturbance rejection response was twice superior to the one with the DTC2, which, in this case gives a slow response with the proposed tuning parameters: Tc = Td = 10.14, Kc = K0 = 0.0158. Thus, β = 30 was used in the DTC1, giving Td = 18.81, K0 = 0.019, Kc = 0.0214. This case is shown in Fig. 7.13 for the nominal dead time and gain and for the real dead time, L = 36, and the real gain, 1.05. Note that the advantages of the DTC2 disappear and DTC1 shows better performance. This is the effect of the dominant dead time. Tuning can be improved if the pole-zero cancellation is avoided in M (s) and also if a 2DOF-PID is used in C(s). Moreover, other procedures can be used to tune C(s) and M (s). See the Further Reading section for some references.

7.6 Achievable Robustness for Unstable Plants This section analyses the bound on the robustness conditions of unstable processes with a dead time. As will be shown, because of the unstable characteristics of the process, robustness cannot be increased arbitrarily. This result

222

7 Dead-time Compensators for Unstable Plants case: L=5, K=1 r, y

2

0 0

u

y (DTC1) y (DTC2)

1

1.5 1 0.5 0 −0.5 0

50

100

150

200

250

300

350

u (DTC1) u (DTC2) 50

100

150 200 case: L=6, K=1.05

250

300

350

r, y

2

0 0

u

y (DTC1) y (DTC2)

1

1.5 1 0.5 0 −0.5 0

50

100

150

200

250

300

350

u (DTC1) u (DTC2) 50

100

150

200

250

300

350

time

Fig. 7.12. Response of the DTC1 (IPDT model and P/PD controller) and the DTC2 (SOIPDT model and PD/PD controller) for case 1, L = 5. Example 7.6

is valid for all the structures analysed in this chapter for controlling unstable processes; however, for clarity, the FSP will be used in the following. K Assume that the process model is Gn (s) = Ge (s) T s−1 , where Ge (s) is stable and has unitary static gain and T > 0. Consider that the nominal closedloop transfer function can be chosen as a stable transfer function with unitary gain C(s)Gn (s)e−Ln s Y (s) = = Gd (s)e−Ln s ; R(s) 1 + C(s)Gn (s) that is, the dead-time-free system can be stabilised with C(s) and Gd (0) = 1. When necessary, a reference filter can be used to attenuate the effect of the controller zeros. As has been pointed out, the disturbance rejection is defined by Hq (s) =



Y (s) = P (s) 1 − Gd (s)e−Ln s Fr (s) , Q(s)

and Fr (s) must be computed so as to have a zero at s = 0 in Hq (s) in order to reject step disturbances and cancel the pole at s = 1/T of Pn (s). Additionally, Fr (s) can be designed as Fr (s) =

1 + sa 1 , Gd (s) (1 + sT0 )2

7.6 Achievable Robustness for Unstable Plants

223

0.6 0.4 0.2 0 −0.2 0

u

r, y

u

r, y

case: L=30, K=1 2 1 0 −1 0

2 1 0 −1 0

0.6 0.4 0.2 0 −0.2 0

y (DTC1) y (DTC2) 100

200

300

400

500

600

700

800

900

1000

u (DTC1) u (DTC2) 100

200

300

400 500 600 case: L=36, K=1.05

700

800

900

1000

y (DTC1) y (DTC2) 100

200

300

400

500

600

700

800

900

1000

u (DTC1) u (DTC2) 100

200

300

400

500 time

600

700

800

900

1000

Fig. 7.13. Response of the DTC1 (solid line) and the DTC2 (dashed line) for case 2, L = 30

where T0 is the tuning parameter and a has to verify (see Sect. 7.4.2) a = T [(1 + T0 /T )2 eLn/T − 1]. Here, we assume that Gd (s) has no zeros in the right half plane. The tuning parameter is T0 and it has to be selected for a compromise between robustness and performance. The robustness of the controller can be analysed using dP (ω) =

| (1 + jωT0 )2 | >| δP (jω) | . | 1 + jωa |

This expression shows that higher values of T0 gives higher values of dP (ω), however, in this case, because of the unstable characteristics of the process, robustness cannot be increased arbitrarily. This is an expected result because certain feedback action is needed to maintain stability and thus, the detuning of the controller (with high values of T0 ) has a limit. Note that a also increases with T0 and may reach high values, principally when Ln /T >> 1; thus, dP (ω) cannot be increased arbitrarily. In the case where only dead-time errors are considered (δP (jω) = 1 − ejω∆L ) the analysis of the maximum admissible modelling errors can be made as follows. Using the normalised frequency ωn = ωLn , it follows that

224

7 Dead-time Compensators for Unstable Plants

(a) magnitude

0

10

dP1(T´0=2) dP2(T´0=10) −2

dP3(T´0=90)

10

dPmax −2

−1

(b) δ Lmax

10

0

10

1

10 normalized frequency

2

10

10

1

0.5

0 0

0.2

0.4

0.6

0.8

1 T/Ln

1.2

1.4

1.6

1.8

2

Fig. 7.14. Robust stability analysis for unstable plants (δP (jωn ) shown by thick line)

δP (jωn ) = 1 − ejωn δL and dP (ωn ) = where T0′ = T0 /Ln , a′ = a/Ln and

| (1 + jωn T0′ )2 | , | 1 + jωn a′ | ′

a′ = T ′ [(1 + T0′ /T ′ )2 e1/T − 1].

The shape of | δP | and dP for different values of T0′ are shown in Fig. 7.14a. The robust stability condition can be obtained tuning T0′ until the two curves are tangent. Note that the intersection point is in the region where the two curves are almost linear and that, for these frequencies, the effect of T0′ on robustness is saturated. At these frequencies we can approximate | δP (jωn ) |∼ =| jωn δL |= ωn δL.

As ωn T0′ >> 1 and ωn a′ >> 1 it follows that

| (jωn T0′ )2 | dP (ωn ) ∼ . = | jωn a′ | Noting that for the previous situations T ′ /T ′ + 1 ∼ = T ′ /T ′ 0

0

7.7 Summary

225

′ 2 ′ (T ) T′ 0 ⇒ dP (ωn ) ∼ a′ ∼ = ωn 1/T ′ = dPmax (ωn ). = e1/T ′ T e This gives an approximate upper bound for the maximum of the deadtime-estimation error

T′ δLmax ∼ = 1/T ′ , e which shows the limitation imposed by the dead time and the unstable time constant of the system. Fig. 7.14 (part (a)) shows that when high values of T0′ are used, the linear part of dP is equal to the bound obtained. This bound is independent of T0 . Figure 7.14b shows this bound for different values of the relative unstable time constant. Note that for T /Ln = T ′ = 0.2 (an unstable dead-time-dominant system), the closed-loop system can be unstabilised with an infinitesimal value of δL. On the other hand, if T /Ln = T ′ >> 1, the stability can be achieved for high values of the dead-time uncertainties.

7.7 Summary Several structures and tuning rules have been analysed for controlling integrative and unstable processes with a dead time. Some of the approaches analysed in previous sections arrive at similar results (and in some cases at the same result) if the same process model and the same set of specifications are defined. Two aspects must be considered in the design: (a) Model selection and (b) tuning and practical implementation. •



In the analysis of integrative processes, the selection of the nominal model depends on the relationship between T , the time constant representing the dynamics of the nonintegrative part of the process and L. If the process exhibits a dominant dead time, that is L >> T , the simple IPDT model can be used. In other cases, when T is nonnegligible, better results will be obtained using an SOIPDT. In practice, unstable processes with a dead time are not as common as the integrative one. The simple unstable first-order model can generally be used in this case. The tuning of the controller for all cases is simpler with the structure of the DO-DTC, which also gives the best results. The analogue implementation of this controller is, however, more complicated than the Matauˇsek and Mici´c and derived controllers. Thus, if the controller must be implemented on an analogue platform, these latter controllers can be used. Finally, when a discrete platform is used, the DO-DTC is again the best option. Moreover, the disturbance observer approach is easy to analyse and tune because of the decoupling properties of its structure. This controller is also used in Chap. 8 to develop a discrete 2DOF-DTC and several examples and experimental results are presented.

226

7 Dead-time Compensators for Unstable Plants

Finally, as in the stable case, two important aspects must be commented on: (1) The problems caused by a wrong estimation of the dead time are not symmetric, and positive estimation errors will cause different closed-loop response deterioration to negative errors; (2) the performance and robustness of the DTCs can be compared to the traditional PID controller. When the dead time is estimated with a small error, the DTC clearly allows better performance. However, when the DTC has to be detuned to maintain robustness, the use of this type of controller is less advantageous. We can conclude that the DTCs originally designed to control stable deadtime processes can be modified to control integrative and unstable plants. We have shown that in the cases where the plant can be modelled by simple models, a good compromise between performance and robustness can be obtained using simple controllers and tuning rules. The implementation of the controllers is, in general, based on discrete platforms, thus in the next chapter this point is analysed.

7.8 Further Reading The modified dead-time compensator with a modified fast model was originally presented in [135]. An analysis of its properties and some improvements in the tuning were presented in [99, 79]. A modified SP for integrative processes based on a different structure was introduced in [5]. The simplest controller based on the estimation of the disturbance was first analysed in [67], while the PD controller in the disturbance estimator structure was presented in [68]. Modified versions of this structure were presented in [53, 48, 18, 42] where some of the tunings derived in this chapter are described. Two-degree-of-freedom control strategies for integrating processes were proposed in [140, 138] based on the disturbance observer approach. Other solutions using a similar approach for the unstable process case were presented in [61, 63]. A good review of several methods including a comparative analysis is presented in [99, 77, 81].

7.9 Exercises 7.1. Consider the structure of the dead-time compensator with a modified s+1 and Tm = −T (1−e−Ln/T ). If a PI primary fast model, with Gm (s) = K TTms−1 i s) , the closed-loop poles are the roots of controller is used, C(s) = kc (1+T sTi Kkc (1 + sTi )(1 + sTm ) + sTi (T s − 1) = 0 or

[Ti Tm +

T Ti 2 Ti ]s + [Tm + Ti − ]s + 1 = 0. kc K kc K

Find the conditions in kc and Ti for (a) closed-loop stability and (b) a pair of stable closed-loop real poles at s = −1/T0. Using K = 1, L = 2 and T = 4,

7.9 Exercises

227

is it possible to tune a PI controller for a given T0 ? Which is the smallest T0 (Tmin ) for this case? 7.2. In the previous exercise, choose T0 < Tmin . If possible, use a PID primary controller to achieve the desired poles. 7.3. For the structure of the dead-time compensator with a modified fast −Ln s ve model, consider a more complex model Pn (s) = Ks(1+sT ) . Compute the corresponding fast model Gm and tune the primary controller for this case. Analyse the robustness and performance using the process of Example 7.3. −3s

7.4. For the unstable process P (s) = 0.2 es−1 tune an FSP in order to have a stable response and to reject step disturbances when considering a 5% deadtime-estimation error. Analyse the internal stability and find the conditions in Gn (s) − Pn (s)Fr (s) and C(s). 7.5. Analysis of the feedforward action. Consider the process represented by Y (s) = P (s)[U (s) + Q(s)], where U (s) is the control action and Q(s) is a step −5.3s and the model disturbance. Assume that the real process is P (s) = 0.21es 0.2e−5s . Tune a dead-time compensator with a modified fast model Pn (s) = s for robust performance. Consider that Q(s) is measurable and compute a feedforward controller. Compare the closed-loop behaviour to one without the feedforward controller. 7.6. Repeat the analysis of the previous exercise for the case Y (s) = P1 (s)U (s) −6s −5.3s and P2 (s) = 0.1es . +P2 (s)Q(s), where P1 (s) = 0.21es 7.7. For the process in Example 7.3, assume that it is possible to measure the step disturbances. Using a feedforward controller design a DTC and compare it with the simple case. Repeat the previous exercise for the case of the model Ke−Ls Pn (s) = s(1+sT ). 7.8. Consider the modified SP shown in Fig. 7.8 and the DO-DTC structure. Find the relationships between V (s), F (s) and M (s), C(s). and 7.9. Using the Matauˇsek and Mici´c structure with C(s) = Kc TiTs+1 is Td s+1 M (s) = K0 0.1Td s+1 , compute Ti and Kc for a double pole in s = −1/T0 for the transfer function Y /R. Include a set-point weighting in the PI implementation  1 t e(τ )dτ ] u(t) = Kc [br(t) − y(t) + Ti 0 and analyse the effect of b ∈ [0.4, 0.6]. Tune M (s) using Am and φm specifications for the inner loop 1 + M (s)Pn (s) = K0

Td s + 1 Kv e−Ln s = 0. 0.1Tds + 1 s

228

7 Dead-time Compensators for Unstable Plants

Use typical values for these parameters: Am ∈ [1.7, 1.85, 2.0] and φm ∈ [50◦ , 55◦ , 60◦ ] and obtain the values of Td and K0 numerically (note that it is simpler to derive a tuning using normalised values, use ωn = Ln ω). 7.10. The robustness analysis of the controller in the previous exercise can be performed using | δP (ω) |< dP (ω). If all the tuning parameters vary simultaneously, the robust tuning is somewhat complicated. A simple way to take into account the robustness is to define a fixed Am and φm and tune T0 to achieve a trade-off between performance and robustness. Consider the same process, model and controller C(s) = Kr as in Example 7.5. Tune M (s) to achieve φm = 60◦ , Am = 2 and compare this to the previous solutions. Note the improvement in the disturbance rejection response. 7.11. Using the robustness condition derived in Sect. 7.5    1 + M (jω)Pn (jω)   | δP (jω) |< dP (ω) =  Ceq (jω) + M (jω) 

and the FOPDT model, analyse the robustness for the following combinations of M (s) and C(s) controllers for the same set of specifications φm = 60◦ , Am = 2: • • •

With C(s) and M (s) proportional controllers, with C(s) a P and M (s) a PD controller, with C(s) a PI and M (s) a PD controller. −Ln s

−Ls

7.12. Consider the process P (s) = K e s and the model Pn (s) = Kv e s . Using the Matauˇsek and Mici´c structure with the PD controller compute the delay margin for the cases where the tuning is defined by φm = 60◦ , Am = 2 and φm = 50◦ , Am = 1.7. Considering Kv = 1 and the cases Ln = 5, 10, 20, compare the set-point and disturbance responses of the two tunings with the simple case of Sect. 7.5.2 when the dead-time-estimation error is 20%. −Ln s

e 7.13. Consider the process Pn (s) = Kv s(T s+1) with Ln = 6, Kv = 0.3 and T = 1. Tune a PID with set-point weighting in C(s) and a PD controller in M (s). Compare the set-point responses for the cases b = 0.4, b = 0.5, b = 0.6 and b = 0.7.

8 Discrete Dead-time Compensators

This chapter tackles the analysis, design and tuning of discrete DTCs. It also introduces some basic concepts of digital control used in the following chapters.

8.1 Introduction Although DTC appeared in the mid 1950s, their implementation with analogue control equipment was very difficult and DTCs were not used in industry until digital control took over in the 1980s. In spite of the fact that all these algorithms are implemented on digital platforms, most works analyse only the continuous case (see the set of references cited in Chaps. 5 to 7). An analysis of the stability of the sampled-data DTC was presented in [101] and after this only a few works have analysed the discretisation or the direct discrete design of the DTCs (see, for example, [77, 40]). Moreover, the dead-time compensation ideas can be applied to areas other than the traditional continuous processes such as, for instance, dynamic systems directly described in the discrete time domain. In these cases, the design of the controller is carried out using only discrete time tools. The discrete versions of the SP and its modifications are the most well known and used dead-time compensating structures in practice. However, two other important predictors have been proposed in the discrete domain: The analytical predictor (AP) [30] and the optimal predictor (OP) [39]. The AP can be considered as a particular case of the OP, which is presented in Chap. 9 in the MPC context. As will be shown in Chap. 9, the structure of this predictor can be analysed using the same block diagram of the filtered SP as that presented in Chap. 6. This chapter is devoted to analysing the discrete versions of the structures presented in Chaps. 5, 6 and 7 for stable, integrative and unstable processes. The following sections tackle the analysis and design of discrete DTCs and show applications for continuous and discrete processes. In the first part

230

8 Discrete Dead-time Compensators

r(kT s )

F ( z)

+ _

C ( z)

u( kT s ) +

q (kT s ) +

y(kT s )

P( z)

Fig. 8.1. Discrete control system for a discrete process

of the chapter the problems associated to the digital implementation of DTCs are presented. Two-degree-of-freedom solutions are analysed which, as in the continuous case, can also be tuned taking into account the performance and robustness of the closed-loop. As a particular solution, the scheme of the DO-DTC presented in Chaps. 6 and 7, both for stable and integrative processes, is analysed in greater detail. A procedure to choose the sampling time taking into account the performance and robustness of the closed-loop system is also presented. Some simulated and experimental results are used to illustrate the solutions presented.

8.2 Discrete and Sampled-data Systems As has been pointed out, all DTCs analysed in the previous chapters can be represented as general 2DOF controllers. Thus, the general properties of these controllers can be applied to DTC design. 8.2.1 Basic Concepts and Notations A discrete time controller can be used to control discrete time dynamic processes or continuous processes. In the first case, both the process and the controller are described in the discrete time domain. A simple block diagram of such a system is shown in Fig. 8.1. In this diagram all the inputs and outputs of the different blocks are discrete signals defined only for the sampling instants t = kTs , where Ts is the sampling time and k ≥ 0 is an integer. The process and controller are represented by transfer functions in the Z domain. One example of such a system is the control of the stock level in a manufacturing supply chain, such as the one presented in Chap. 1 (this process is discussed in detail later in this chapter). The discrete process model has an input−output representation of the form Y (z) = P (z)[U (z) + Q(z)], (8.1) where Y (z) is the output, U (z) the input and Q(z) the disturbance. Because of the dead time P (z) = G(z)z −d , where d is the number of samples corresponding to the dead time. A general analysis should consider a more complex model such that

8.2 Discrete and Sampled-data Systems

231

q (t) r (kT s )

F (z )

+ _

u( kT s ) C (z )

ZOH

+ + u( t)

y (t) P(s)

y (kT s )

Ts

Fig. 8.2. Discrete control system for a continuous process

Y (z) = Pu (z)U (z) + Pq (z)Q(z), with Pu (z) = Pq (z). However, conceptually, this case does not add any new issues. Thus, in the following, Equation (8.1) will be used. In the second situation, the discrete controller is applied to a continuous process, as shown in Fig. 8.2. In this structure the controller uses discrete time signals, while the input and output of the process are continuous signals.1 Therefore, two interfacing units are necessary: A sampler, which transforms the continuous signal into a discrete one, and a hold for transforming the discrete signal to a continuous one [118, 34]. An antialiasing filter is normally used before the sampler to avoid the aliasing effect. Furthermore, an adequate number of bits in the analogical/digital and digital/analogical converters must be used to avoid the problems generated by quantisation [4, 118, 34, 54]. These points are not dealt with in this book. As in the previous chapters, the dynamic behaviour of the continuous process can be described by the following model Y (s) = P (s)[U (s) + Q(s)],

(8.2)

where U (s) is the control input, Q(s) is the disturbance and Y (s) is the plant output. P (s) = G(s)e−Ls , where G(s) is the dead-time-free part of the process and L is the effective dead time. The diagrams in Figs. 8.1 and 8.2 can be equivalent if a discrete model of the dynamics between the input of the hold and the output of the sampler is obtained. This model can be derived by computing P (z) as the Z transform of the process plus the antialiasing filter, the sampler and the zero-order hold blocks. In this representation, Q(z) is such that P (z)Q(z) represents the effect of the real disturbance q(t) on the sample output data y(kTs ). The sampler is described by y(kTs ) = y(t), 1

t = kTs ,

k = 0, 1, 2, ...

In this chapter we use t to represent the continuous time (t ≥ 0, t ∈ R) and kTs to represent the discrete time (k ≥ 0, k ∈ Z).

232

8 Discrete Dead-time Compensators

Normally, the dynamics of the sampler in series with the antialiasing filter are included in the model of P (s). The zero-order hold (ZOH) maintains the value of the input u(kTs ) during the sampling period u(t) = u(kTs )

∀t ∈ [kTs , (k + 1)Ts ).

The transfer function of the ZOH (H0 (s)) is represented by 1 − e−sTs , s and it is assumed that the antialiasing filter is adequately chosen so as to be able to work with ω ∈ [0, π/Ts ] and to eliminate the higher frequency bands. The discrete representation of the plant with the hold and the sampler is computed as H0 (s) =

P s (z) = Z{L−1 {H0 (s)P (s)}},

where Z{L−1 {X(s)} means the Z transform of the sampled impulse response of X(s). In the frequency domain P s (jω) =

1 − e−jωTs P (jω) jωTs

∀ω ∈ [0, π/Ts ].

8.2.2 General Design Considerations A discrete synthesis procedure can be used when a DTC has to be applied to a discrete time system. On the other hand, the design of a discrete DTC for a continuous process can be made using two different approaches: • •

Computing a discretisation of the continuous controller obtained using some of the procedures explained in Chaps. 5 to 7, or by applying a direct discrete design method using a discrete representation of the process.

The performance of the controller will depend not only on the sampling time choice but also on the discretisation method used to transform the original differential equation (of the plant or of the controller) into a discrete model [40]. In fact, the most important characteristics of the continuous DTC can be maintained in the discrete case if the sampling time is very small compared to the dominant time constant of the process. However, in practice, the real time implementation of the controller may have time constraints and the sampling time must be chosen greater than the ideal theoretical value affecting the closed-loop performance and robustness of the system, especially in the case of dead-time systems.

8.3 Direct Synthesis

r (kT s ) F (z )

+ _

C (z )

q (kT s ) + +

233

y (kT s ) P( z )

S( z ) y p (kT s )

+ +

F r ( z)

Fig. 8.3. Unified representation of the discrete DTC’s

For the analysis of the properties of the discrete DTC we propose a unified representation of DTCs. If we analyse the DTC structures presented in Chaps. 5 to 7 it is possible to conclude that • •

the general primary controller has a two-degree-of-freedom structure, with the reference signal r(kTs ) and the predictor signal yp (kTs ) as inputs; the predictor signal is computed using the values of the output and input of the plant in such a way that in the nominal case yp (kTs ) = yˆ[(k + d)Ts ].

Thus, in the discrete domain, it is possible to represent the DTCs by drawing a general block diagram, as shown in Fig. 8.3, where blocks Fr (z) and S(z) represent the predictor structure and blocks C(z) and F (z) represent the twodegree-of-freedom primary controller. We will refer to this structure as a unified dead-time compensator (UDTC). It is easy to show that the discretised versions of the SP and its modifications can be represented by this general structure (see Exercise 8.1). Because of its characteristics, the UDTC structure can be used to compute a controller taking into account the ideas discussed in Chaps. 5 to 7 aiming at increasing robustness, coping with unstable plants, improving the disturbance rejection properties, or decoupling the set-point and disturbance responses. The discrete dead-time compensation scheme can also be derived using a direct synthesis approach, as will be shown in the following section.

8.3 Direct Synthesis Direct synthesis consist of computing the controller transfer function to make the closed-loop transfer function equal to a desired and, to a certain extent, arbitrary transfer function. The algorithm has the same structure as an IMC as will be seen in the sequel. Consider a plant P (z) = G(z)z −d with a primary controller C(z) and a unit feedback structure. Suppose that we have a desired closed-loop transfer function Pd (z). Then

234

8 Discrete Dead-time Compensators

Pd (z) =

C(z)P (z) . 1 + C(z)P (z)

Solving for C(z) C(z) =

1 Pd (z) . P (z) 1 − Pd (z)

(8.3)

It would seem that by computing C(z) as in Equation (8.3) any arbitrary closed-loop transfer function may be obtained. There are, however, a few limitations to this: •





Controller realisability conditions. For the controller to be realisable, the relative degree of the desired closed-loop transfer function cannot be smaller that the relative degree of the plant transfer function. Furthermore, the desired closed-loop transfer function dead time cannot be smaller than the plant dead time because otherwise the controller would need to anticipate the future, which is obviously impossible. Controller stability condition. The desired closed-loop transfer function should include all zeros of the plant which are outside the unit circle because otherwise these zeros will have to be cancelled by the controller poles resulting in an unstable controller. Internal stability condition. All unstable poles of the plant should be zeros of 1 − Pd (z) because otherwise they would have to be zeros of the controller, resulting in an “unstable” zero-pole cancellation and, therefore, internal instability.

8.3.1 Direct Synthesis for Dead-time Processes and IMC As was mentioned previously, the direct synthesis method can be easily interpreted as an IMC controller. Let us consider a plant P (z) = G(z)z −d and a desired transfer function Pd (z) = Gd (z)z −d. The direct synthesis controller is given by 1 Gd (z) . C(z) = G(z) 1 − Gd (z)z −d Let us suppose that C(z) is realised by using a primary controller C1 (z) and a feedback H(z) controller. That is C(z) =

Gd (z) 1 C1 (z) . = G(z) 1 − Gd (z)z −d 1 + C1 (z)H(z)

If we make C1 (z) = Gd (z)/G(z), then H =−

Gd (z)z −d Gd (z)z −d =− = −G(z)z −d , C1 (z) Gd (z)/G(z)

which is equivalent to the IMC structure.

8.3 Direct Synthesis

235

A discrete SP tuned for a desired Gd (z) gives the same solution. In this case, the SP primary controller is CSP (z) =

1 Gd (z) . G(z) 1 − Gd (z)

Using the expression of the equivalent controller of the SP Ceq (z) =

CSP (z) , 1 + CSP (z)G(z)(1 − z −d )

and substituting CSP (z) in the last expression gives Ceq (z) =

1 Gd (z) . G(z) 1 − Gd (z)z −d

8.3.2 Dead-beat Controller The objective of a dead-beat controller is to achieve the best possible step response. This means that after a time period equal to the plant dead time, the 1 output should reach the set-point and remain there. That is, Pd (z) = z−(d+r) , where r is the relative degree of the plant dead-time-free model. The dead-beat controller is described by C(z) =

z −(d+r) 1 . P (z) 1 − z −(d+r)

0.1 z −5 . The desired Example 8.1: Consider the plant described by P (z) = z−0.9 −6 transfer function is Pd (z) = z and the corresponding dead-beat controller is given by z − 0.9 z −6 1 − 0.9z −1 . C(z) = = −5 −6 0.1z 1 − z 0.1(1 − z −6 )

The corresponding SP primary controller is CSP (z) =

1 10(z − 0.9) z −1 , = G(z) 1 − z −1 z−1

which is a PI controller that cancels the plant pole and uses a high gain. The dead-beat controller provides an ideal set-point tracking response. However, the resulting control structure in not very robust and modelling errors, especially in the dead time, may cause instability or a significant degradation of control performance. In practice, it may be more robust to specify a less demanding closed-loop performance as is the case of the Dahlin controller.

236

8 Discrete Dead-time Compensators

8.3.3 The Dahlin Algorithm: The Lambda Controller A very popular dead-time compensation algorithm was proposed by Eric Dahlin in 1968 [26]. The algorithm is known today as Lambda tuning or the Dahlin controller. It was mainly used in the pulp and paper industry in the 1970s and was made possible by the increasing use of minicomputer-based control systems. The algorithm was developed in the discrete time domain but it can also be used in the continuous time domain. The Dahlin controller is based on a direct control synthesis and can, therefore, be interpreted as an IMC controller (or a DTC when controlling a dead-time process). It uses a tuning parameter (λ) which allows a less demanding closed-loop structure than the dead-beat controller to be imposed. The algorithm considers the plant to be an FOPDT model and makes the closed loop behave like an FOPDT system with unit static gain. That is, −1

−d . When the plant is given by P (z) = Pd = (1−λ)z 1−λz −1 z direct synthesis controller is

C(z) =

K(1−a)z −1 −d 1−az −1 z

the

1 − az −1 1−λ . −1 K(1 − a) 1 − λz − (1 − λ)z −(d+1)

Notice that the Dahlin controller corresponds to an IMC with a primary (1−λ)(1−az −1 ) K(1−a)(1−λz −1 )

controller equal to CIMC = troller CSP =

(1−λ)(1−az −1 ) K(1−a)(1−z −1 )

or an SP with a PI primary con-

where λ adjusts the controller gain.

8.4 DTC for Discrete Processes Consider a discrete dynamic process represented by Y (z) = P (z)[U (z) + Q(z)] and the structure of the UDTC of Fig. 8.3. Note that the results obtained are valid for all the DTCs studied because they can all be represented by the UDTC structure. We will analyse the controller design considering a defined set of specifications for the closed-loop system. 8.4.1 Closed-loop Analysis The closed-loop behaviour of the UDTC is defined by the transfer functions from the reference to the output (Hr (z)) and from the disturbance to the output (Hq (z)) F (z)C(z)P (z) , Hr (z) = 1 + C(z)[P (z)Fr (z) + S(z)]

8.4 DTC for Discrete Processes

Hq (z) =

237

P (z)[1 + C(z)S(z)] . 1 + C(z)[P (z)Fr (z) + S(z)]

As in Chap. 2, we consider that the process is described by a family of transfer functions P (z) in such a way that the magnitude and phase of P (jωTs ) can vary in a disk with radius ∆P (ωTs ) and that the different models are linked in frequency. Thus, each P (z) in the family can be written as P (z) = Pn (z)[1 + δP (z)], where Pn (z) = Gn (z)z −dn is the nominal model, dn is the nominal dead time and δP (z) is the multiplicative modelling error represented in the frequency domain as

δP (jωTs ) =

P (ejωTs ) − Pn (ejωTs ) ≤ δP (ωTs ) Pn (ejωTs )

∀ω ∈ [0, π/Ts ].

Nominal stability is defined by the characteristic equation 1 + C(z)[Pn (z)Fr (z) + S(z)] = 0, while in the real case 1 + C(z)[Pn (z)(1 + δP (z))Fr (z) + S(z)] = 0, which, as in the previous chapters, allows a robustness condition to be computed based on the multiplicative error δP (z). In the frequency domain δP (ωTs ) < dP (jωTs ) =

| 1 + C(ejωTs )[Pn (ejωTs )Fr (ejωTs ) + S(ejωTs )] | | Gn (ejωTs )C(ejωTs )Fr (ejωTs ) |

∀ω ∈ [0, π/Ts ],

(8.4)

that can be reduced to δP (ω) < dP (jω) =

| 1 + C(ejω )[Pn (ejω )Fr (ejω ) + S(ejω )] | | Gn (ejω )C(ejω )Fr (ejω ) |

∀ω ∈ [0, π],

(8.5) where there is no explicit dependence on Ts . Condition (8.5) depends on the parameter tuning and must be computed for each particular DTC structure. For example, if a filtered SP structure is used then S(z) = Gn (z) − Pn (z)Fr (z) and Hr (z) =

F (z)C(z)Pn (z) , 1 + C(z)Gn (z)

238

8 Discrete Dead-time Compensators

q (kT s ) r (kT s ) F ( z)

+ _

u( kT s )

+ +

z -dn _

+

y (kT s )

P( z ) G n-1 (z)

V( z ) Fig. 8.4. Discrete DO-DTC. Structure for analysis

Hq (z) =

Pn (z)[1 + C(z)(Gn (z) − Fr (z)Pn (z))] . 1 + C(z)Gn (z)

Thus, C(z), Fr (z) and F (z) are used to obtain the desired Hq (z) and Hr (z) and to satisfy δP (ω) < dP (ω) =

| 1 + C(ejω )Gn (ejω ) | | Gn (ejω )C(ejω )Fr (ejω ) |

∀ω ∈ [0, π].

(8.6)

Note that Fr (z) only affects Hq (z) and the robustness condition, while F (z) only affects Hr (z). Thus, the analysis and tuning in the discrete domain follow the same procedure as used in the continuous case. The next section illustrates the tuning procedure for a particular control structure: The discrete DO-DTC. 8.4.2 A Particular Design Case: The Discrete DO-DTC As has been shown in Chaps. 6 and 7 a control structure that includes a disturbance observer is an appropriate solution, both for stable and unstable processes with a dead time. Thus, in this chapter this controller is used to analyse the discrete design and implementation in detail. Control Structure A discrete DO-DTC is shown in Fig. 8.4. The control structure is the same as the one used in the continuous controller. Thus, the nominal closed-loop transfer functions are (see Exercise 8.1) Hr (z) = F (z)Gn (z)z −dn ,

Hq (z) = Pn (z)[1 − V (z)z −dn ],

(8.7)

and the robustness condition is δP (ω) < dP (jω) =

1 |V (jω)|

∀ω ∈ [0, π].

(8.8)

8.4 DTC for Discrete Processes

r ( kT s ) F ( z ) G n( z ) + _ V( z )

u( kT s ) q ( kT s ) + + P( z ) - dn

V( z ) G n( z )[1 - V( z ) z ]

239

y ( kT s )

Fig. 8.5. Discrete DO-DTC. Structure for implementation

These relationships show that, as in the continuous case, the controller has decoupled the set-point tracking and the disturbance rejection responses, and that the robust stability condition only depends on V (z). Thus, V (z) is tuned for a compromise between robustness and disturbance rejection response and F (z) for a desired set-point tracking. Note that for a fast disturbance rejection response V (z) must be one at high frequencies, while V (z) must be very small at the frequencies where the model uncertainties are important. On the other hand, to reject the disturbances in the steady state, V (1) = 1. The complete tuning analysis is discussed in the following section for both stable and unstable cases. As in the continuous case, the modified scheme shown in Fig. 8.5 is used for implementation. The equivalent 2DOF controller is Ceq (z) =

V (z) , Gn (z)[1 − V (z)z −dn ]

Feq (z) =

F (z)Gn (z) . V (z)

Control Tuning For the control tuning, the following specifications are considered: (i) Internal stability; (ii) set-point tracking; (iii) steady state rejection of disturbances; (iv) robustness. Internal stability: The internal stability is obtained if V (z) is designed to avoid cancellation between the poles and zeros of Ceq (z) and Pn (z) which are outside the unitary circle.2 This conditions are fullfilled if V (z) is designed for: • •

a stable Gn (z)[1 − V (z)z −dn ] and V (z) Gn (z)[1−V (z)z −dn ] without poles at the zeros of Pn (z) outside the unitary circle.

This is obtained using V (z) having the same zeros outside the unitary circle as Gn (z) and such that the numerator of [1 − V (z)z −dn ] cancels the poles of Pn (z) outside the unitary circle. Note that these are the same conditions as in the continuous case. 2

We say that a pole or a zero is outside the unitary circle when their modulus is greater or equal to 1.

240

8 Discrete Dead-time Compensators

Robustness and disturbance rejection: To reject disturbances of the form Q(z) 1 = (z−1) n in the steady state, the numerator of Pn (z)[1 − V (z)z −dn ] =

Np (z) [1 − V (z)z −dn ] Dp (z)

(8.9)

must have m roots in z = 1, where m = m1 + m2 . m1 is the order of the disturbance (1 for steps, 2 for ramps, etc.) and m2 is the number of effective integrators of the plant (defined as the difference between the number of roots in z = 1 of Dp (z) and Np (z)). This implies ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩

(1 − V (z)z −dn )|z=1 = 0. − V (z)z −dn )|z=1 = 0. .. .

d dz (1

dm−1 dz m−1 (1

(8.10)

− V (z)z −dn )|z=1 = 0.

To reject a sinusoidal disturbance of frequency ω0 , 1 − V (z)z −dn must have roots at z = e−jω0 Ts and z = ejω0 Ts . As in the stable case, the numerator of V (z) is used to obtain these conditions, while the denominator of V (z) is used to set the robustness conditions. Note that the denominator of V (z) is the numerator of dP (ω) (see Equation (8.8)). Finally, as Ceq (z) must be proper, this is equivalent to GVn(z) (z) being proper; the relative degree of V (z) should be the same as that of Gn (z). Set-point tracking: The desired Hr (z) = Gr (z)z −dn can be computed tuning Gr (z) F (z) in Equation (8.7) as F (z) = G . After the definition of V (z), the den (z) sired transfer function of the equivalent reference filter (for implementation purposes) is

Feq (z) =

Gr (z) , V (z)

which is proper and stable. The following example illustrates the computation of V (z). Example 8.2: Consider the second-order stable model without zeros at z = 1 Gn (z) =

a0 z + a1 , z 2 + b1 z + b2

a1 = −a0 ,

(8.11)

where Gn (z) has relative degree 1 and thus V (z) has relative degree 1. In general: αm−1 z m−1 + αm−2 z m−2 + ... + α0 . (8.12) V (z) = (z − zv )m

8.4 DTC for Discrete Processes

241

As Gn (z) is stable, m2 = 0, m = m1 and α0 , ...,αm−1 and zv must be defined to satisfy Equation (8.10). If the disturbance is a step (m = m1 = 1) then V (z) =

α0 , z − zv

and as V (1) = 1, α0 = 1 − zv ; zv is a free parameter (0 < zv < 1). zv can be used to define the compromise between robustness (increasing zv ) and a faster disturbance rejection response (decreasing zv ). Note that zv can be related to the time constant of the filter V (s) in the continuous controller analysed in Chaps. 6 and 7. When the disturbance is a ramp (m = m2 = 2) V (z) =

α0 + α1 z , (z − zv )2

with V (1) = 1 and dV (z) −dn + (−dn )z −dn −1 V (z) |z=1 = 0, z dz giving dV (z) |z=1 = dn . dz After some manipulations α1 (1 − zv ) − 2(α0 + α1 ) = dn (1 − zv )3 , α1 + α2 = (1 − zv )2 . Making x = 1 − zv , α0 and α1 are given by α0 = dn x2 + 2x, α1 = x2 − α0 , where zv is the free tuning parameter. 8.4.3 Case Study: Supply-chain Management Efficient supply chain management (SCM) has become a real imperative for many modern-day enterprises [122]. Because of this, inventory management in supply chains has received considerable attention in recent years and automatic control-based approaches have recently been proposed to deal with the kinds of problems that appear in supply chain management [119]. In these approaches, demand is treated as an exogenous disturbance signal and its effects on inventories must be properly rejected by the control system.

242

8 Discrete Dead-time Compensators

One of the most important dynamic characteristics of the supply chain management process is that there is a significative dead time between the control action (factory starts) and the controlled variable (the stock level), and furthermore, the actual value of this dead time is variable or difficult to estimate. The other important characteristic is that it presents integrative behaviour. A simple model of a manufacturing supply chain will be used [119] y(k) = y(k − 1) + Ku(k − d − 1) − q(k),

(8.13)

where y is the stock level, u is the factory starts and q is the demand, with k the discrete time (days). K is the factory production yield and d is the dead time of the factory. The control problem is to maintain y(k) within some prespecified levels and to provide smooth operation; in other words, rapid changes in inventory and factory starts are undesirable. In the computation of this model, gain and dead-time errors must be considered. The gain error is caused by wrong estimation of the quantity of material that will arrive from the factory on the right day, while the deadtime error is normally associated to the difference between the predicted day of reception of material from the factory and the actual arrival date. Thus, using the nominal gain Kn and nominal dead time dn , it follows that −d−1 z −dn −1 and P = Kz Pn = Kn1−z −1 1−z −1 . Thus, | δP (z) | is given by     K d−d n − 1 z ∀ω ∈ [0, π], z = ejω . (8.14) |δP (z)| =  Kn The nominal parameters are dn = 4 and Kn = 1; there is a 25% dead-timeestimation error (1 day) and a 10% gain-estimation error. In this case study, the disturbance demand signal is q(k) = 2 sin(2πk/120), to simulate the effect of periodic changes caused by seasonality. This problem can be solved using a discrete DTC that must be designed to reject sinusoidal disturbances and to maintain a robust performance with a smooth operation. A DO-DTC will be used and only filter V (z) will be designed because the set-point tracking is not considered in the problem. For disturbance rejection purposes 1 − V (z)z −dn = 0,

z = z0 = ejω0 , z = z1 = e−jω0 ,

ω0 =

2π . 120

For internal stability V (1) = 1, and for realisability, the relative degree of V (z) is 1. A suitable filter V (z) is

8.4 DTC for Discrete Processes

V (z) =

243

α0 + α1 z + α2 z 2 , (z − zv )3

where the parameters must verify

α0 + α1 + α2 = (1 − zv )3 ,

α0 + α1 z0 + α2 z02 = z04 (z0 − zv )3 ,

α0 + α1 z1 + α2 z12 = z14 (z1 − zv )3 .

This set of equations is solved for each tuning of zv in order to obtain robust behaviour. The following MATLAB code is used for the computation of zv and the robustness analysis. MATLAB code for the supply chain problem % process and disturbance data dn=4;d=5;Kn=1;K=1.1;z0=exp(j*pi/60);z1=exp(-j*pi/60); % Computation of V for a given zv zv=0.85; A=[1 1 1; 1 z0 z0*z0; 1 z1 z1*z1]; B=[(1-zv)ˆ 3; (z0-zv)ˆ 3*z0ˆ 4; (z1-zv)ˆ 3*z1ˆ 4]; a1=inv(A)*B; a=real(a1); numV=[a(3) a(2) a(1)]; denV=conv(conv([1 -zv],[1 -zv]),[1 -zv]); % Robustness analysis ww=logspace(-3,log10(pi),300); for i=1:300 w=ww(i); zt=exp(j*w*(d-dn)); z=exp(j*w); deltaP(i)=abs(K*zt/Kn-1); dP(i)=abs(polyval(denV,z)/polyval(numV,z)); end;

Figure 8.6 shows the modelling error δP (ω) for the worst case d = 5 and K = 1.1 (solid line) and dP (ω) for two different tunings: zv = 0.85 (dashed-dotted line) and zv = 0.9 (dashed line). The filter pole (zv ) is made equal to 0.9 because a smooth response is desired. Note that for zv = 0.85, dP (ω) is close to δP (ω) at high frequencies. With this value, the equivalent controller Ceq (z) of the DO-DTC is computed for the implementation, avoiding the pole-zero cancellation at z = 1 Ceq (z) =

0.7125z 6 − 1.3527z 5 + 0.6436z 4 . z 6 − 1.55z 5 + 0.6175z 4 + 0.0034z 3 + 0.0034z 2 − 0.7091z + 0.6436

The following MATLAB code is used for computation of Ceq (z). MATLAB code for the computation of Ceq (z) % uses data from V(z) and Pn(z) Zd=[1 zeros(1,dn)]; X1=conv(Zd,denV); x=size(X1,2)-size(numV,2); X2=[zeros(1,x) numV]; X=X1-X2; X3=deconv(X,[1 -1]); % Controller num. and den. denC=Kn*X3; numC=conv(Zd,numV);

244

8 Discrete Dead-time Compensators

0

magnitude

10

−1

|δ P| dP (zv=0.85)

10

dP (zv=0.9) −2

10

−1

0

10

10 frequency

Fig. 8.6. Modelling error δP (ω) for d = 5 (dn = 4) and K = 1.1 (Kn = 1); dP (ω) for zv = 0.85 and for zv = 0.9

The simulation results are shown in Fig. 8.7 for the nominal case and for the case d = 5 and K = 1.1. The amplitude of the disturbance is 6 and it is applied at k = 100. Note that the controller rejects the disturbance for the nominal case and in the presence of modelling errors.

8.5 DTC for Sampled-data Processes The design of a discrete DTC for a continuous process can be made using two different approaches: (a) Computing a discretisation of the continuous controller obtained with some of the methods presented in Chaps. 5 to 7, or (b) using a direct discrete design. These two procedures are analysed in the following. 8.5.1 Discretisation of the Continuous DTC As has been mentioned, most of the DTCs proposed in the literature are formulated in the continuous time domain. The simplest way to implement these controllers on digital platforms is to use a discretisation procedure. The original structure of the controller is maintained, an appropriate sampling time is chosen and equivalent discrete models of the different blocks are computed. Finally, a code is created to be implemented on the digital system.

8.5 DTC for Sampled-data Processes

245

output

15 y for d=4, K=1 y for d=5, K=1.1

10 5 0 0

50

100

150

200

250

300

50

100

150

200

250

300

100

150 time

200

250

300

disturbance

5 0

control action

−5 0 5 0 −5 0

u for d=4, K=1 u for d=5, K=1.1 50

Fig. 8.7. Closed-loop responses for d = 4 and K = 1, and for d = 5 and K = 1.1

To implement the continuous control law on a digital computer it is necessary to approximate the derivatives of the differential equations of the continuous control law. The simplest and most used approximations are the Euler forward difference, the Euler backward difference and Tustin’s formula. In the Euler forward difference method the derivative of a given signal x(t) is approximated using x((k + 1)Ts ) − x(kTs ) dx ∼ , = D(kTs ) = dt Ts

(8.15)

where Ts is the sampling time and k is a positive integer. This leads to the following relationship between the complex variables s and z in the transfer functions of the controllers s=

z−1 . Ts

(8.16)

In the Euler backward difference method, the derivative of a given signal x(t) is approximated using x(kTs ) − x((k − 1)Ts ) dx ∼ , = D(kTs ) = dt Ts giving s=

z−1 . zTs

(8.17)

(8.18)

246

8 Discrete Dead-time Compensators MATERIAL

F AIR

HT ...................................................... SPEED

Fig. 8.8. Humidity control in an atomiser

Finally, in Tustin’s method the derivative of a given signal x(t) is approximated using dx ∼ x(kTs ) − x((k − 1)Ts ) , = D(kTs ) = −D((k − 1)Ts ) + 2 dt Ts giving s=2

z−1 . (z + 1)Ts

(8.19)

(8.20)

Note that while Tustin’s method and the Euler backward method map the left side of the s-plane into the unit circle in the z-plane, the Euler forward difference method does not. This means that the approximated discrete controller is not guaranteed to preserve stability in the Euler forward difference method [118]. Other approximations, as for instance pole-zero matching, can be used by following the same procedure. In practice, all the approximation methods tend to perform well for a sufficiently short sampling time and one or another might perform better in a given situation where the sampling time has to be chosen longer due to design or cost constraints [118]. With these approximations, an analogue controller with transfer function C(s) can be replaced by the equivalent C(z) where s is substituted by one of the previous expressions. For the same sampling interval, the controller obtained with Tustin’s method tends to track the analogue controller output more accurately at the sample times, although the obtained controller is of the same order as the other two approximations [118]. In general, Tustin’s method is the most used first-order approximation method in practice. In the following, some examples using different approximations are presented and the problems associated with the discretisation method and the sampling time choice are illustrated. Example 8.3: The transfer function between the humidity (H) and the air −4s flow (F ) in the atomiser shown in Fig. 8.8 is P (s) = e1+s . An SP with a PI primary controller is used to control H. The PI is tuned using the simple rule

8.5 DTC for Sampled-data Processes

247

Ti = T = 1 and Kc = 1/Kp = 1. Two discrete DTCs are computed for this example using a sampling time Ts = 0.2: DTC-Tustin using Tustin’s approximation and DTC-forward using the forward differences method. Note that the sampling time is 1/5 of the dominant closed-loop time constant, which is, in this case, the same as the open-loop one. As the dead time is a multiple of Ts , the discrete representation of e−4s is z −4/0.2 = z −20 . This gives the z−1 z−1 following transfer functions. For DTC-Tustin s = 2 0.2(z+1) = 10 z+1 , thus Pn1 (z) = z −20

1 1+

10(z−1) z+1

C1 (z) = For DTC-forward s =

z−1 0.2

=

0.0909(z + 1)z −20 , z − 0.8182

1.1(z − 0.8182) . z−1

= 5(z − 1), thus

Pn2 (z) = z −20

0.2z −20 1 = , 1 + 5(z − 1) z − 0.8

z − 0.8 . z−1 The closed-loop behaviour for the system controlled with the SP continuous implementation, DTC-Tustin and DTC-forward without modelling errors is shown in Fig. 8.9. For the simulation, a 1.0 step change is performed at t = 2. The same figure also shows the reference signal by dotted lines. As can be seen, the discretised controllers have closed-loop performance similar to the SP and only a small difference is appreciated. Note that this difference has the same shape as that observed in the examples of Chap. 5 where modelling errors are considered. In fact, because the DTC is a model-based controller, the observed effect is caused by the modelling error introduced by the discretisation of the controller. The control signal is applied to the process through a zero-order hold. Thus, if a discrete model is used to describe the behaviour of the process with the sampler and zero-order hold, the nominal transfer function obtained is C2 (z) =

Pn3 (z) = Z{L−1 {H0 (s)Pn (s)}} =

1 − a −20 z , z−a

a = e−0.2/1 = 0.8182,

1 − 0.8182 −20 z , z − 0.8182 which is different from the model used in DTC-Tustin and DTC-forward. This explains the responses obtained. To illustrate the effect of the process model in the DTC, the same simulation is repeated using Pn3 (z) on the DTCforward but maintaining the same primary controller C2 (z). The behaviour of this new control system (DTC-ZOH) is compared to the SP in Fig. 8.10. As can be observed, the closed-loop responses cannot Pn3 (z) =

8 Discrete Dead-time Compensators

output and set−point

248

1 0.8 0.6 y for SP y for DTC−Tustin y for DTC−forward set−point

0.4 0.2 0 0

5

10

15

time

control action

1 0.8 0.6 0.4 u for SP u for DTC−Tustin u for DTC−forward

0.2 0 0

5

10

15

time

Fig. 8.9. Process output and control action for SP, DTC-Tustin and the DTC-forward. Example 8.3

be distinguished. This effect, introduced by the extra modelling error in the discretisation of the controller, can produce instability in some cases, as is illustrated in the following example. Example 8.4: Consider the control problem analysed in Example 6.4 (Chap. e−5s 6), where the process is described by P (s) = (1+s) 3 and the model is −6s

e . The closed-loop system was designed to reject step and ramp Pn (s) = (1+2s) disturbances. The controller based on a disturbance observer (presented in Example 6.4) was

V (s) =

(2Tv + 6)s + 1 . (Tv s + 1)2

Here we will use tune this controller with Tv = 3.2. Using Tustin’s approximation with a sample time Ts = 0.25 (approximately 1/20 of the closed-loop equivalent time constant) a discrete DTC was computed. To obtain the transfer functions for the discretised controller we use the following MATLAB z−1 code, which is equivalent to substituting s = 2 (z+1)T in Pn (s) and V (s). s

output and set−point

8.5 DTC for Sampled-data Processes

249

1 0.8 0.6 0.4 y for SP y for DTC−ZOH set−point

0.2 0 0

5

10

15

time

control action

1 0.8 0.6 0.4 0.2

u for SP u for DTC−ZOH

0 0

5

10

15

time

Fig. 8.10. Process output and control action for the PPI and the DTC-ZOH. Example 8.3 MATLAB code to compute V (z) and Pn1 (z) % Process Data num=[1]; den=[2 1]; gain=1; L=6; integ=0; % Sampling and dead time Ts=.25; d=round(L/Ts); [Nd,Dd]=discTUSTIN(num,den,gain,Ts,integ); % Controller Tv=3.2; numV=conv([2 1],[2*Tv+6 1]); denV=conv([Tv 1],[Tv 1]); gainV=1; integ=0; [numVd,denVd]=discTUSTIN(numV,denV,gainV,Ts,integ);

The obtained transfer functions are Pn1 (z) =

0.0588(z + 1)z −24 , z − 0.8824

0.1416z 2 + 0.002827z − 0.1388 . z 2 − 1.85z + 0.8553 The closed-loop behaviour of the system controlled with the continuous DTC (solid lines) and the discrete DTC (dashed lines) without errors in the estimation of the dead time is shown in Fig. 8.11. For the simulation, the disturbance is a sequence of steps and ramps and the set-point does not change (see the dotted lines in the figure). Notice that the closed-loop responses of the continuous controller and the discrete DTC are almost indistinguishable. V (z) =

250

8 Discrete Dead-time Compensators case L=5 1

y and r

0.5 0 y (continuous) y (DTC−Tustin) set−point

−0.5 −1 0

50

100

150

200

250

300

350

400

u and q

5 u (continuous) u (DTC−Tustin) disturbance

0

−5 0

50

100

150

200 time

250

300

350

400

Fig. 8.11. Process output and control action for the continuous and discrete controllers in the nominal case. Example 8.4

Maintaining the simulation conditions and the controller tuning, the real dead time of the process is set to 5.75 (a 15% dead-time error) in the results shown in Fig. 8.12. Note that in this case the discretised controller cannot maintain closed-loop stability although the continuous controller has a response similar to the nominal one. Also notice that the sampling time is very small, approximately 1/60 of the settling time of the closed-loop response. This example shows that the discretisation may give undesirable results in some cases, even for small values of Ts . Two possible solutions can be used in this situation. The first one is to use even smaller values of the sampling time. The second one consists of the use of a different discretisation method for the process model. In this case, the same modification of the controller as in the previous example can be made, considering the exact discretisation of the continuous model of the plant containing a zero-order hold. The new discrete model of the plant is Pn2 (z) = Z{L−1 {H0 (s)Pn (s)}} = Pn2 (z) =

1 − a −24 z , z−a 0.1175 −24 z , z − 0.8825

but the same V (z) is used in the simulations.

a = e−0.25/2 = 0.8825,

8.5 DTC for Sampled-data Processes

251

case L=5.75 1

y and r

0.5 0 y (continuous) y (DTC−Tustin) set−point

−0.5 −1 0

50

100

150

200

250

300

350

400

u and q

5 u (continuous) u (DTC−Tustin) disturbance

0

−5 0

50

100

150

200 time

250

300

350

400

Fig. 8.12. Process output and control action for the continuous and discrete controllers in the 15% dead-time-uncertainty case. Example 8.4

The behaviour of this new control system (DTC-ZOH) is compared in Fig. 8.13 to the continuous controller where L = 5.75 is used in the real process. As can be observed, the closed-loop responses cannot be distinguished. The performance of the DTC-ZOH is better than the one obtained with the DTC with Tustin’s discretisation. Of course, using a small enough value of Ts the situations analysed in the examples can be avoided but for practical reasons this is not always possible. 8.5.2 Direct Discrete Design The second approach to design discrete DTCs is based on a discrete model of the continuous process and uses the same procedure as in the discrete process case. From a synthesis point of view, there is no difference between the two solutions if it is assumed that they use the same process model, including uncertainties, and the same control structure. That is, all the results of Sect. 8.2 are valid for this case. However, there is a fundamental difference in the computation of the nominal model and in the model of the uncertainties; this will depend on the sampling time and on the discretisation procedure. The synthesis procedure consists of defining Ts , computing Pn (z) and δP (z) and finally tuning the predictor and primary controller of the UDTC. The following section analyses the computation of Pn (z) and δP (z) and deals with the robustness condition.

252

8 Discrete Dead-time Compensators case L=5.75 1

y and r

0.5 0 y (continuous) y (DTC−ZOH) set−point

−0.5 −1 0

50

100

150

200

250

300

350

400

u and q

5 u (continuous) u (DTC−ZOH) disturbance

0

−5 0

50

100

150

200 time

250

300

350

400

Fig. 8.13. Process output and control action for the continuous controller and the DTC-ZOH in the 15% dead-time-uncertainty case. Example 8.4

8.5.3 Robustness Analysis As pointed out in Sect. 8.2, in the continuous process case, the frequency domain representation of the process plus the sampler and the hold is P s (jω) =

1 − e−jωTs P (jω) jωTs

∀ω ∈ [0, π/Ts ].

The nominal model (Pn (z)) will depend on the method used to compute the controller. In the case where a direct discrete design is used, Pn (z) is computed using a ZOH discretisation. If a discretised method is applied, then, Pn (z) is obtained substituting s by its approximation in Pn (s), as in the examples of Sect. 8.5. Thus, the modelling error is obtained as δP (jω) =

1−e−jωTs jωTs

P (jω) − Pn (ejωTs ) Pn (ejωTs )

∀ω ∈ [0, π/Ts ],

which clearly depends on the modelling error of P (s), on the nominal model selection and on the sampling time Ts . Note that, for a given sampling time, important variations in the modelling error can be observed depending on the discretisation procedure. The following example illustrates this result.

8.5 DTC for Sampled-data Processes

253

Example 8.5: Consider the control problem analysed in Example 8.3 where three different discrete nominal models are used in the controller. The modelling error is analysed using these models: Pn1 (z) obtained with Tustin’s method (DTC-Tustin), Pn2 (z) obtained with Euler’s forward method (DTCforward) and Pn3 (z) obtained with the ZOH method (DTC-ZOH) δP (jω) =

1−e−jωTs jωTs

P (jω) − Pni (ejωTs ) Pni (ejωTs )

i = 1, 2, 3,

e−4s 0.0909(z + 1) −20 , Pn1 (z) = z , 1+s z − 0.8182 0.2 −20 1 − 0.8182 −20 Pn2 (z) = z z , Pn3 (z) = . z − 0.8 z − 0.8182 P (s) =

The MATLAB code for this case is:

MATLAB code to compute δP (jω) % Process Data and Sampling L=4; T=1; Ts=0.2; Ln=4; % Loop ww=logspace(-2,log10(pi/Ts),300); for i=1:300 % delta P for each case w=ww(i);zt=exp(j*w*Ts); numPc=1-1/zt;denPc=j*w*Ts*(1+j*w*T); Pc(i)=(numPc/denPc)*exp(-j*w*L);a=exp(-Ts/T); numPd=1-a; denPd=zt-a; Pd(i)=(numPd/denPd)*exp(-j*w*Ln); deltaPz(i)=abs(Pc(i)-Pd(i))/abs(Pd(i)); numPt=0.0909*(zt+1); denPt=zt-0.8182; Pt(i)=(numPt/denPt)*exp(-j*w*Ln); deltaPt(i)=abs(Pc(i)-Pt(i))/abs(Pt(i)); numPe=0.2;denPe=zt-0.8; Pe(i)=(numPe/denPe)*exp(-j*w*Ln); deltaPf(i)=abs(Pc(i)-Pe(i))/abs(Pe(i)); end

Figure 8.14 shows the modelling error for DTC-Tustin, DTC-forward and DTC-ZOH. As can be seen the modelling errors introduced by Euler’s and Tustin’s discretisation are greater than those obtained with the ZOH method. Note that this result was expected because in the real process a ZOH block is used to compute the discrete control actions. A discrete bound for δP (jω) can be computed as δP (jω) ≤ δP s (ejωTs ) In this case a representation of the form

∀ω ∈ [0, π/Ts ].

254

8 Discrete Dead-time Compensators

0

magnitude

10

−1

10

−2

10

|δ P| (ZOH) |δ P| (Tustin) |δ P| (forward)

−3

10

−1

10

0

10 frequency

1

10

Fig. 8.14. Modelling error for DTC-Tustin, DTC-forward and DTC-ZOH

δP s (ejωT s ) ≥

P s (ejωTs ) − Pn (ejωTs ) , Pn (ejωTs )

i = 1, 2, 3,

is obtained and δP s (ejωT s ) is used for the robust tuning of the discrete controller. It is interesting to compute the sampling time Ts in order to obtain a simple representation of δP s (ejωT s ) using the ZOH discretisation procedure, both for Pn (s) and P (s). In this case, if Ts is adequately chosen, only a small error is introduced in the approximation. An equivalent discrete model P s (z) is computed for each process model P (s) in the family of continuous processes. Then, defining a nominal model Pn (z) P s (z) = Pn (z)[1 + δP s (z)]. This model approximation will depend on Ts . For the particular case of dead-time systems, where the dead-time-estimation error (∆L) is the most important model uncertainty, the sampling time choice should be related to ∆L. The maximum value of the modelling error of a dead-time system δP (jω) is obtained close to the frequency π/∆Lmax (see the analysis of the modelling error in Chap. 2). Thus, to capture the dynamics of the modelling error in this bandwidth, the sampling time has to be defined as π/Ts ≥ π/∆Lmax .

This indicates that the sampling time must always be less than or equal to the maximum dead-time-estimation error

8.5 DTC for Sampled-data Processes

255

CC

Cb C ai

CT C bi Fig. 8.15. Concentration control in a reactor

Ts ≤ ∆Lmax . This result is also in accordance with the normal procedure usually adopted in practice: Choosing Ts to obtain π/Ts larger than the bandwidth over which good performance is desired. Notice that all the tuning rules derived in Chaps. 5 to 7 for robust performance give a bandwidth smaller than π/∆Lmax . The following example illustrates the previous analysis (see also Exercise 8.4). Example 8.6: The dynamic behaviour between the output concentration Cb and the input flow F in the reactor shown in Fig. 8.15 is described by P (s) =

1.1(1 − 0.5s)e−Ls . (1 + 0.5s)(1 + s)

The dead time varies with the flow, thus, L ∈ [6, 8] and ∆Lmax = 1. An −8s FOPDT nominal model is chosen as Pn (s) = e1+s . A discrete nominal model −d

is computed: Pn (z) = (1−a)z with a = e−T /Ts , d = L/Ts . T and L are, z−a respectively, the time constant and dead time of the FOPDT nominal model. Two multiplicative modelling errors are computed using δPc (jω) =

1−e−jωTs jωTs

P (jω) − Pn (ejωTs ) Pn (ejωTs )

and another one using δPd (jω) =

P s (ejωTs ) − Pn (ejωTs ) Pn (ejωTs )

and varying the sampling time as Ts = ∆Lmax Ts′ ,

Ts′ = [0.25 0.5 1 2].

256

8 Discrete Dead-time Compensators |δ Pd| |δ Pc|

0

Ts = 0.25→

magnitude

10

Ts = 2↑

−1

10

−2

10

−1

0

10

10

1

10

frequency

Fig. 8.16. Modelling errors δPc (jω) and δPd (jω). Example 8.6

Note that L/Ts is an integer in all the cases. When the dead time is not a multiple of Ts , the approximation presented in Chap. 2 is used. Exercise 8.4 analyses this case. Figure 8.16 shows the modelling error δPc (jω) (solid lines) and δPd (jω) (dashed lines) for the different sampling times. As can be seen, for Ts < ∆Lmax , the differences between δPc (jω) and δPd (jω) only appear at very high frequencies where the robustness index of the controller is very high. On the other hand, when Ts > ∆Lmax , the difference is very noticeable from low frequencies. Notice also that the relation between Ts and the process dominant time constant T has little influence on the error in the important range of frequencies, even in the case where Ts /T is greater than one. The sampling time choice and the discretisation procedure also affect the robustness index of the controller. Note that the general dP (ω) of the UDTC is

dP (ω) =

| 1 + C(ejωTs )[Pn (ejωTs )Fr (ejωTs ) + S(ejωTs )] | | Gn (ejωTs )C(ejωTs )Fr (ejωTs ) |

∀ω ∈ [0, π/Ts ],

(8.21) which depends on the nominal model Pn (z), on Ts and on the controller defined by C(z), Fr (z), S(z) and F (z). The following examples illustrate this analysis. Example 8.7: Consider the control problem analysed in Example 8.3. The robust stability condition for the discretised SP controller is the same as the filtered SP with Fr (z) = 1 derived in Sect. 8.4.1. For DTC-Tustin

8.5 DTC for Sampled-data Processes

257

1

10

magnitude

dP (forward) dP (Tustin)

0

10

−1

0

10

1

10 frequency

10

Fig. 8.17. Robustness indices dP1 (ω) and dP2 (ω) for Example 8.7

Gn1 (z)C1 (z) = and for DTC-forward

Ts (z + 1) , 2(z − 1)

Gn2 (z)C2 (z) = giving, respectively, for Ts = 0.2    1.1ejωTs − 0.9  , dP1 (ωTs ) =  0.1(ejωTs + 1) 

Ts , z−1

  jωT  e s − 0.8  . dP2 (ωTs ) =   0.2

Figure 8.17 shows dP1 (ω) (dashed line) and dP2 (ω) (solid line). As can be seen, for this sampling time DTC-Tustin has better robustness than DTCforward, dP1 (ω) > dP2 (ω). The robustness analysis of these controllers can be made using this result and the modelling error obtained in Example 8.4. Note that the robust stability condition is satisfied in both cases. Example 8.8: Consider the control problem analysed in Example 8.4. The robust stability condition for the discretised DO-DTC is | δPi (jωTs ) |< dPi (ωTs ) =

1 , | Vi (jωTs ) |

(8.22)

where i = 1 is for DTC-Tustin and i = 2 for DTC-ZOH. As in Example 8.3, V (z) is the same in the two DTCs (V1 (z) = V2 (z)) and the two controllers

258

8 Discrete Dead-time Compensators

0

magnitude

10

−1

10

|δ P| (ZOH) |δ P| (Tustin) dP −1

10

0

10 frequency

1

10

Fig. 8.18. Robustness index and modelling errors for DTC1 and DTC2. Example 8.8

have the same dP (ωTs ). Thus, the difference in the performance observed in Figs. 8.12 and 8.13 is due to the different nominal model used in the controllers. Figure 8.18 shows dP (ωTs ) and the modelling error for DTC-Tustin and for DTC-ZOH. As can be seen, the extra modelling error introduced by Tustin’s discretisation caused the closed-loop instability; the inequality in Equation (8.22) is not verified for DTC-Tustin. Note that, in the cases studied, the effect of discretisation on the process model used in the predictor structure is more important than that on the filter V (z).

8.6 Sampling Time Choice In the previous analysis, the effect of the sampling time on the robustness of the closed-loop system has been a posteriori. In practice, sampling time selection is one of the first steps of discrete control design; thus, general rules have to be used, such as considering Ts in such a way that π/Ts is greater than the desired bandwidth of the closed-loop system. The choice of Ts has an important effect on the performance and robustness of a control system. High values of Ts may drive the closed-loop system to instability. On the other hand, small values of Ts may not be attainable and give rise to numerical problems. Therefore, from a practical point of view, it is of interest to find the highest value of Ts that allows a good compromise between performance and robustness to be maintained.

8.6 Sampling Time Choice

259

8.6.1 Sampling Time Choice and Robustness In the discrete DTC approach the following conclusions can be derived when controlling a continuous process: • •



If the controller is obtained through the discretisation of a continuous DTC, the robust stability condition must be tested before controller implementation. If it is violated, a smaller Ts must be used. If a direct design is used, Ts will define the achievable closed-loop response. If a correct model of the uncertainties is computed, it could be possible to tune the DTC for a stable closed-loop operation, even in the case where an important model uncertainty is introduced by the Ts choice. In many cases, this can be achieved with a poor closed-loop performance, although this can be difficult, or in some cases impossible, if the process is open-loop unstable (see Exercises 8.5 and 8.6). If the loss in performance is to be avoided, it is important to measure the effect of Ts on the closed-loop response of the system. This is analysed in the following section.

8.6.2 A Procedure for Sampling Time Choice The effect of Ts can be observed both in the modelling error δP (jω) and in the measurement of controller robustness dP (jω). As δP (jω) and dP (jω) have a very strong dependence on the dead-time-estimation error, it is reasonable to relate Ts to ∆L. This has been done in the previous sections, showing that when Ts < ∆Lmax the extra modelling error introduced by discretisation can be neglected in the range of frequencies of interest. The analysis of the previous section does not consider the deterioration in the performance of the closed-loop system with the definition of Ts . In this section, the effect of Ts on the performance is analysed and a rule of thumb is given. Consider the case where an FOPDT model of the process is used to tune the DTC. In this case, it is possible to obtain a disturbance to the output transfer function given by 1 e−Ln s ], 1 + sT0 1 − z0 −dn Hq (z) = Pn (z)[1 − ], z z − z0

Hq (s) = Pn (s)[1 −

where T0 is the tuning parameter and z0 = e−Ts /T0 . Consider that T0 is tuned for a desired trade-off between performance and robustness for the continuous case. To compare the performance of the two controllers, we compute the integral quadratic error  ∞ y 2 (t)dt I= 0

260

8 Discrete Dead-time Compensators

where a unitary step disturbance is applied at t = 0. The index of the discrete controller Id depends on Ts . We can vary Ts such that 0 < Ts ≤ ∆Lmax and compare Id to Ic , the integral quadratic error of the continuous system. Using Id = 1.1Ic , we compute Ts for different dead-time errors (see Exercise 8.7). Table 8.1 gives a simple rule of thumb for the choice of Ts when the deadtime-estimation error is available or can be estimated. Table 8.1. A rule of thumb for the choice of Ts ∆Lmax 0-17% 17%-45% 45%-82% 82%-100%

Maximum sample time Ts = ∆Lmax Ts = ∆Lmax /2 Ts = ∆Lmax /3 Ts = ∆Lmax /4

The following example illustrates this procedure. Example 8.9: In this example, the direct discrete design and the discretised control law of the DO-DTC are compared to the continuous solution. The plant model is P (s) =

Ke−Ls . (s + 1)(0.5s + 1)(0.25s + 1)(0.125s + 1)

(8.23)

For control tuning purposes, an FOPDT model is defined as Gn (s) =

1 , 1.5s + 1

Ln = 10.

(8.24)

The system must reject step disturbances in the steady state and must be robust against up to a 20% error in the estimation of dead time and up to a 10% error in the estimation of the gain (K ∈ [0.9; 1.1] and L ∈ [8; 12]). The structure of the DO-DTC for the sampled-data system is shown in Fig. 8.19. In this case F (z) = 1, as the specifications do not consider changes in the set-point. Initially, the sampling time must be defined. Using the error in the dead time (±20%, ∆Lmax = 2) and the rule given in the previous section, it follows that Ts = 0.5∆Lmax = 1s. With this value of Ts the two controllers are computed. As has been discussed, the nominal model Pn (z) is computed using a ZOH discretisation for the two cases. Thus, Gn (z) =

0.4866 , dn = 10. z − 0.5134

8.6 Sampling Time Choice

261

q (t)

r(kT s )

u( kT s )

F ( z)

+ _

+ + P(s) u( t) + G n-1 ( z ) z- dn _

y( t )

ZOH

y(kT s )

V( z) Fig. 8.19. Control structure of the sampled-data disturbance observer DTC

Using the results in Sect. 8.4.2, the filter V (z) must be chosen with a relative degree equal to the relative degree of Gn (z) and with one tuning parameter. The simplest solution is V (z) = for the direct discrete design and V (s) =

1 − zv z − zv 1 1 + sTv

for the continuous controller. To maintain robust stability, | δP (jω) | and dP (ω) are computed for the two controllers. Figure 8.20 shows, for the two cases, | δP (jω) | for K = 1.1 and L = 12, and dP (ω) for Tv = 4 and zv = 0.78. In the discrete case, the modelling error is computed using P (z) as the ZOH discretisation of P (s). The tuning was defined to obtain a similar distance between the modelling error and the robustness index in both cases. A discretised controller is computed based on the continuous V (s) using Tustin’s method, V (z) =

0.111z + 0.111 . z − 0.777

(8.25)

This V (z) has relative degree 0; thus, for this particular case a first-order filter F (z) is necessary to give a proper V (z)/Gn (z). A fast low pass filter is then designed as 0.7 , z − 0.3

(8.26)

0.0777z + 0.0777 . (z − 0.777)(z − 0.3)

(8.27)

F (z) = and the new V (z) is V (z) =

262

8 Discrete Dead-time Compensators

magnitude

continuous case

0

10

|δ P| dP

−1

10

−2

10

−1

0

10

10

magnitude

discrete case

0

10

|δ P| dP

−1

10

−2

10

−1

0

10

10 frequency

Fig. 8.20. Tuning of Tv and zv . Modelling error and robustness index. K = 1.1 and L = 12. Example 8.9

The continuous controller, the discretised one and the one obtained by the direct design method are compared for the case K = 1.1 and L = 12 in the following simulations, where a step disturbance q = 1 is introduced at the process input at t = 5. Figure 8.21 shows the output y(t) and the control action u(t) for the three controllers respectively. As expected, the performance of the three controllers is similar. In the previous sections some of the drawbacks of the discrete DTC when it is used to substitute a continuous controller have been analysed. In the following, a very important advantage of the discrete DTC related to implementation issues is presented.

8.7 Implementation Issues Flexibility, low cost and simplicity in the implementation of complex control algorithms are some of the advantages of discrete controllers. For the particular case of the DTC, the digital implementation of the controller has some special advantages related to the polynomial representation of dead time. As has been pointed out in Chaps. 6 and 7, there are some situations where it is necessary to cancel the roots of some polynomials and pseudopolynomials for the implementation of the DTC. This is particulary impor-

8.7 Implementation Issues y (continuous) y (Tustin) y (discrete)

1

output

263

0.5

0

−0.5 0

10

20

30

40

50

60

70

80

100

u (continuous) u (Tustin) u (discrete)

0 control action

90

−0.5

−1

−1.5 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 8.21. Plant output and control action for the continuous, Tustin’s and discrete controllers. Example 8.9

tant to avoid internal instability when controlling unstable dead-time processes. Consider, for instance, a DTC with a modified fast model controlling an unstable plant. The implementation of the minor loop must be made to have a stable H(s) = Gm (s) − Gn (s)e−Ls in order to obtain internal stability. No “pole-zero” cancellation at the unstable poles of Gn (s) may take place. If a discrete implementation is used, the discrete representation of H(s) is a rational function H(z) = Gm (z) − Gn (z)z −dn . Note that, for this case, H(z) = S(z) in the UDTC structure. Considering, as in Chap. 7, that Gn (z) =

Np (z) , Dp (z)

Gm (z) =

Nm (z) , Dp (z)

gives H(z) =

1 Nm (z)z dn − Np (z) . [Nm (z) − Np (z)z −dn ] = Dp (z) z dn Dp (z)

Nm (z) is designed for [Nm (z)z dn − Np (z)] = 0

∀z

/

Dp (z) = 0,

| z |≥ 1.

264

8 Discrete Dead-time Compensators

Thus, in this case, the pole-zero cancellation is solved by directly dividing the polynomials [z d Nm (z) − Np (z)] and Dp (z). This procedure can be applied both in the direct design approach or in the discretisation of a continuous controller. The next example illustrates this procedure. Example 8.10: Consider the case of an IPDT process. In this case Gn (s) =

Kv , s

Gm (s) = Kv

Using the simple approximation s = (dn integer) Gn (z) = Thus, H(z) =

Kv Ts , z−1

z−1 Ts

1 − Ln s Kv = − Kv Ln . s s and considering that Ln = dn Ts

Gm (z) =

Kv Ts − Kv Ts dn . z−1

Kv Ts Kv Ts [1 − dn (z − 1) − z −dn ] = [−dn z dn+1 + (dn + 1)z dn − 1]. z−1 (z − 1)z dn

Dividing −dn z dn+1 + (dn + 1)z dn − 1 by (z − 1) gives −dn z dn+1 + (dn + 1)z dn − 1 = −dn z dn + z dn−1 + z dn−2 + . . . + z 1 + 1, z−1 thus, H(z) = Kv Ts [−dn +

dn 

z −i ],

i=1

or, equivalently,

H(z) = −Kv L + Kv Ts

dn 

z −i .

(8.28)

i=1

As can be seen, the output signal v(kTs ) of H(z) is a linear combination of the current and past control actions, v(kTs ) = −Kv Lu(kTs ) + Kv Ts

dn  i=1

u[(k − i)Ts ].

(8.29)

Compare this result to the one in Equation (7.8); the integral has been approximated by a sum. This procedure can be applied in all the structures presented in Chaps. 6 and 7 that need a cancellation of roots in a transfer function. Exercises 8.9 and 8.10 analyse some of these cases.

8.8 Case Study: Temperature Control

265

8.8 Case Study: Temperature Control To illustrate the application of the direct discrete design of the disturbance observer approach, the temperature control of a pilot plant of the Departamento de Automac¸a˜ o e Sistemas shown in Fig. 8.22 is presented. In the plant the inlet water is driven by pump B1 from the storage tank TA to the heated tank T1 . There, the water is heated with an electric heater and goes through a long pipe to the second tank T2 where the temperature sensor is located. The flow is maintained at a desired value by valve F Y1 . A manual valve VM can also be used to change the operating conditions of tank T2 . All the instrumentation and control devices are connected by a F ieldbus network to the SCADA that runs in a PC. In this type of application, where the network is used for control and supervisory tasks, the sampling time is a very important design parameter and cannot be chosen smaller than a given value. The model of the process relating the power heating to the outlet temperature has been obtained using some step tests in the range of operation of the process giving several FOPDT transfer functions. The the nominal model has been chosen as 0.7 −12s e , 6s + 1 where the time constants are in minutes. The error in the estimation of the parameters of P (s) was estimated as 10%, so the controller was tuned using this information. Following the procedure presented in the previous sections the sampling time was set as Ts = 1min. The discrete nominal model is P (s) =

Pn (z) = and a first-order V (z) is designed, V (z) =

0.1075z −12 , z − 0.8465 0.565 . z − 0.435

In this case the reference filter F (z) is not used. The experimental tests with this controller are shown in Fig. 8.23a. When t ∈ [0, 50] min, the ambient temperature is almost constant and the temperature reaches the desired value although the set-point response has an overshoot. Then, in the interval t ∈ [50, 100] min, the ambient temperature is decreasing (almost like a ramp) so the temperature cannot reach the desired set-point although the control action is always increasing (see Fig. 8.23a). To test the disturbance rejection caused by changes in the flow, a step of 10% of the nominal value was applied at t = 95 min. Note that the controller rejects the step disturbance. In order to obtain a better set-point response and to reject the ramp disturbances caused by the ambient temperature, the controller has been recalculated using a different process model

266

8 Discrete Dead-time Compensators

Fig. 8.22. Pilot plant

0.7 e−10s (5s + 1)(3s + 1) and a ramp model of the disturbances. This gives P (s) =

Pn (z) =

0.0196z + 0.0164 z −10 , z 2 − 1.5353z + 0.5866

and the new V (z) is of second-order,

0.54z − 0.52 . (z − 0.845)2 A reference filter is now used to attenuate the overshoot, V (z) =

F (z) = 3.7539

(z − 0.845)2 . (z − 0.92)2

This new controller is applied to the process. The test was performed in the morning when the ambient temperature rose steadily. As can be seen in Fig. 8.23b the performance of the controller is improved. It now rejects the disturbance and has a better set-point response.

8.9 Summary Three main ideas were discussed in this chapter: (i) The analysis and design of a discrete DTC based on a discrete model of the process use the same con-

8.9 Summary 18

36

34

Reference

16

14 Current (mA)

32 Temperature (C)

267

30 Ouput

28

12

10

8 26

6 24 0

150

100 Time (min)

50

4 0

200

150

100 Time (min)

50

200

(a) Temperature and control action 19

34

18

33

17

32

16 Current (mA)

Temperature (C)

35

31

30 29

15 14

13

28

12

27

11

26

10

25 0

100

50

150

9 0

100

50

150

Time (min)

Time (min)

(b) Ramp disturbance rejection Fig. 8.23. Experimental tests

cepts and procedures as in the continuous case. (ii) The computation of the discrete nominal model and uncertainties model depends on the sampling time and discretisation method chosen. (iii) Special attention must be paid to the modelling error introduced by the discretisation when the design procedure is obtained from the discretisation of a continuous controller. A safe procedure to design the controller should have, as a first step, an analysis of the modelling error. An adequate bound for this error must be computed before the controller tuning. Some guidelines for choosing the sampling time are also given in this chapter.

268

8 Discrete Dead-time Compensators

8.10 Further Reading This chapter presents some results related to the analysis and design of discrete and sample-data controllers. A complete study of the discretisation of analogue controllers and of the analysis, synthesis and implementation of discrete controllers can be found in [4, 118, 34, 54, 70]. The unified dead-time compensator structure has been presented in [77]. In [130] the structure of the discrete disturbance observer DTC is analysed for stable and integrative processes. The analysis of the sampling time effect on the robustness is also presented in this paper. Discrete processes are uncommon in the classical DTC literature. In particular, the supply chain management problem has been analysed using other discrete control approaches [131, 105, 10]. The modelling of this process is analysed in [28] and [119].

8.11 Exercises 8.1. Compute the representation of the discretised Smith predictor using the structure of the unified dead-time compensator. Repeat the exercise for the dead-time compensator with a modified fast model, for the Matauˇsek and Mici´c controller and for the DO-DTC. 8.2. Implement the discretised version of the controller in Example 5.4. Use two different discretisation methods and two different sampling times. Compare the results. 8.3. Repeat Exercise 8.2 for the controller in Example 7.6. 8.4. Repeat the analysis in Example 8.5 for the following processes and models: 1.1e−L1 s , (1 + s)(1 + 0.5s)(1 + 0.25s)(1 + 0.125s) e−12s Pn1 (s) = , 1 + 1.5s 1.1e−L2s P2 (s) = , (1 + s)3 e−6s Pn2 (s) = , 1 + 2s P1 (s) =

(8.30) (8.31) (8.32) (8.33)

where L1 ∈ [10, 14] and L2 ∈ [4, 6] and ∆Lmax1 = 2 and ∆Lmax2 = 1. Notice also that the relation between Ts and the process dominant time constant T have small influence on the error in the important range of frequencies, even in the case where Ts /T is greater than one. Repeat this for the case when the nominal dead time is not a multiple of Ts .

8.11 Exercises

269

−3s

e 8.5. Consider the process P (s) = (1+s) 3 . Compute a model and tune a filtered Smith predictor to obtain a robust performance behaviour for 20% dead-time-estimation error. Using Tustin’s discretisation and Ts = 1.5 compare the continuous and discrete controllers. Maintaining the sampling time change the controller tuning to obtain a better response with the discrete controller.

8.6. Repeat the previous exercise for the process P (s) = differences to the previous solution.

e−3s s(1+s)3 .

8.7. Using the results in Sect. 8.6.2 and the process P (s) = integral quadratic error 

2e−6s s+1

Explain the

compute the



y 2 (t)dt

I=

0

when a unitary step disturbance is applied at t = 0 and T0 = 2. Using different sampling times and a ∆Lmax = 2, verify the rule of thumb. 8.8. For the processes in Example 8.5 and Exercise 8.4, compute a discrete DTC based on the direct design method computing Ts with the results of Sect. 8.6.2. Compare the results to a continuous controller. 8.9. Consider a discretised filtered Smith predictor for a first-order unstable process with a dead time. Compute the blocks Fr (z) and S(z) solving the cancellation of the unstable root. Write a code to be implemented in a computer. 8.10. Repeat Exercise 8.8 for the IPDT case.

9 Model Predictive Control of Dead-time Processes

The formulation and final control law of two of the more popular MPC algorithms, dynamic matrix control (DMC) and generalised predictive controller (GPC), are specially analysed in this chapter. The analysis is made for the case of dead-time processes and some particular properties of the control structures are studied and compared to those obtained in Chaps. 5 to 8 with the use of DTCs. The study is performed for the basic unconstrained SISO algorithm and some of the extensions and generalisations are presented in the following chapters.

9.1 Introduction MPC has emerged as a powerful practical control technique during the last two decades. It is one of the few advanced control techniques that have had a significant impact on industrial process control. Perhaps the main reason for this success is that MPC can deal with many situations: It can be applied to single-input-single-output (SISO) and multi-input-multi-output (MIMO) systems, the feedback and feedforward actions can be included in a straightforward manner in the MPC, the input and output constraints can be included in the formulation of the control law through online optimisation and it also intrinsically compensates the dead times of the process. Furthermore, as has been pointed out in the previous chapters, DTCs can also be used to control delayed systems including feedforward actions. Thus, the principal advantage of MPC strategies is that they can compute an optimal control action taking constraints into account. This chapter analyses the structure of MPC when controlling dead-time processes. It shows that GPC and DMC are equivalent to a 2DOF-DTC. Some examples studying the behaviour of these two controllers when controlling dead-time processes are then presented to motivate the robustness analysis presented in the following chapters.

272

9 Model Predictive Control of Dead-time Processes

9.2 MPC Overview The term model predictive control does not designate a specific control strategy but a very ample range of control methods that make explicit use of a model of the process to obtain the control signal by minimising an objective function. The principal ideas of the predictive control family are [15]: • • •

Explicit use of a model to predict the process output at future time instants (horizon). Calculation of a control sequence minimising an objective function. Receding strategy, so that at each instant the horizon is displaced towards the future, which involves the application of the first control signal of the sequence calculated at each step.

The differences between the various MPC algorithms are the model used to represent the process and the noises and the cost function to be minimised. Several applications of predictive control have been reported in the literature, not only in the process industry but also in specific research applications [57, 60, 19, 109, 111]. These applications show the capacity of MPC to achieve highly efficient control systems able to operate over long periods of time with hardly any intervention. MPC presents a series of advantages over other methods, amongst which the following stand out: • • • • • • • •

It is particularly attractive for users with only a limited knowledge of control because the concepts are very intuitive. It can be used to control a great variety of processes, ranging from those with relatively simple dynamics to other more complex ones, including systems with long dead time, nonminimum phase and unstable ones. The multivariable case can easily be dealt with. It intrinsically compensates for dead times. It introduces feedforward control in a natural way to compensate for measurable disturbances. Its extension to the treatment of constraints is conceptually simple and these can be systematically included during the design process. It is very useful when future references are known. It is a totally open methodology based on certain basic principles that allow for future extensions.

In practice, MPC has proved to be a reasonable strategy for industrial control, and several reports indicate that it is the most used advanced control technology in industry [127]. 9.2.1 MPC Strategy The methodology of all the controllers belonging to the MPC family is characterised by the following strategy (see Fig. 9.1):

9.2 MPC Overview

273

u(t+k|t) u(t)

^y(t+k|t) y(t) N

t-1

t

t+1

...

t+k

...

t+N

Fig. 9.1. The MPC idea

1. The future outputs for a defined horizon N , called the prediction horizon, are predicted at each instant t using the process model. These predicted outputs yˆ(t + k | t) 1 for k = 1 . . . N depend on the known values up to instant t (past inputs and outputs) and on the future control signals u(t + k | t), k = 0 . . . N − 1, which are to be sent to the system and to be calculated. 2. The set of future control signals is calculated by optimising a determined criterion in order to keep the process as close as possible to the reference trajectory w(t + k) (which can be the set-point itself or a close approximation of it). This criterion usually takes the form of a quadratic function of the errors between the predicted output signal and the predicted reference trajectory. The control effort is included in the objective function in most cases. An explicit solution can be obtained if the criterion is quadratic, the model is linear and there are no constraints, otherwise an iterative optimisation method has to be used. Some assumptions about the structure of the future control law are also made in some cases, such as that it will be constant from a given instant. 3. The control signal u(t | t) is sent to the process whilst, the next control signals calculated are neglected, because at the next sampling instant y(t+1) will already be known, and step 1 will be repeated with this new value and all the sequences will be brought up to date. Thus the u(t + 1 | t + 1) is calculated (which in principle will be different to u(t + 1 | t) because of the new information available) using the receding horizon concept. The basic structure shown in Fig. 9.2 is used in order to implement this strategy. A model is used to predict the future plant outputs, based on past 1

In this chapter we use a discrete time representation of the plant and the controller and we use t to represent the discrete time. The notation indicates the value of the variable at instant t + k calculated at instant t.

274

9 Model Predictive Control of Dead-time Processes

Control action

Process

Control action

Plant output

Model

Control Computation

Model output

Constraints Reference

Fig. 9.2. Basic structure of MPC

and current values and on the proposed optimal future control actions. These actions are calculated by the optimiser taking into account the cost function (where the future tracking error is considered) as well as the constraints. 9.2.2 MPC Elements All the MPC algorithms possess common elements and different options can be chosen for each one of these elements, which gives rise to different algorithms. These elements are • • •

the prediction model, the objective function, and the procedure to obtain the control law.

The Prediction Model The process model plays a decisive role in the controller because it is necessary to calculate the predicted output at future instants yˆ(t+k | t). The model can be divided into two parts: The actual process model and the disturbances model. Both parts are needed for the prediction. Process Model Various discrete models can be used to represent the process behaviour. Only some of them are mentioned here. •

Step response. This model considers the relationship between inputs and outputs of a stable system using a truncated response given by y(t) = y0 +

N  i=1

gi △ u(t − i) = y0 + G(z −1 )(1 − z −1 )u(t),

(9.1)

9.2 MPC Overview

275

where gi are the sampled output values for the step input and △u(t) = u(t) − u(t − 1). This model is used by DMC and its variants. The value of y0 can be taken to be 0 without loss of generality, so that the predictor will be N  gi △ u(t + k − i | t), yˆ(t + k | t) = i=1



This method is widely accepted in industrial practice because it is very intuitive and clearly reflects the influence of each manipulated variable on a determined output. Another great advantage of this method is that no prior information about the process is needed, so that the identification process is simplified and at the same time it allows complex dynamics such as nonminimum phase or dead times to be described with ease. Transfer function. The model is given by the transfer function G = Ng /Dg so that the output is given by Dg (z −1 )y(t) = Ng (z −1 )u(t)

with Ng and Dg polynomials in z −1 . It is considered from now on that the process cannot have an instantaneous response, thus the model can be rewritten as A(z −1 )y(t) = B(z −1 )u(t − 1), where A(z −1 ) = 1 + a1 z −1 + a2 z −2 + · · · + ana z −na ,

B(z −1 ) = b0 + b1 z −1 + b2 z −2 + · · · + bnb z −nb .

This consideration is reasonable in practice because, in general, there exists a dead time of one sample between the application of the control action and the measurement of its effect on the plant output. Thus, the prediction is given by yˆ(t + k | t) =

B(z −1 ) u(t + k − 1 | t), A(z −1 )

k = 1, 2, ..., N.

This representation is also valid for unstable processes and has the advantage that it only needs a few parameters, although a priori knowledge of the process is fundamental in the case of model identification, especially of the order of the A and B polynomials. Disturbance Model Several models can be used to describe the disturbances, that is, the differences between the measured output and the one calculated by the process model. In practice, step or ramp models are usually used and are also considered as particular cases of the disturbance model. When nondeterministic

276

9 Model Predictive Control of Dead-time Processes

disturbances are considered, such as random changes occurring at random instants, the auto-regressive and integrated moving average (ARIMA) model is widely used. This is given by n(t) =

C(z −1 )e(t) , D(z −1 )(1 − z −1 )

where e(t) is a white noise of zero mean and the polynomials C and D are used to describe the stochastic characteristics of n(t). The use of different models for processes and disturbances are illustrated in the next examples. Example 9.1: Consider the dynamic model of a manufacturing supply chain such as the one presented in Sect. 2.2.3 y(t) = y(t − 1) + u(t − 5) − q(t),

(9.2)

(1 − z −1 )y(t) = u(t − 5) − q(t),

(9.3)

where the time is measured in days. This autoregressive model relates the stock level y with the factory starts u and the demand q. In this system u is the control action and q the disturbance. This model can be written using the transfer function approach as

where it can be seen that A(z −1 ) = 1 − z −1 , B(z −1 ) = 1 and the dead time is d = 4 days. In many practical situations the demand can be predicted to a certain level p(t) and some types of deterministic signals are used to represent this part of the demand. In this example the following sinusoidal demand is used p(t) = 2 sin

2πt 2πt + 2 sin , 7 120

which represents weekly and annual oscillations of the demand. Because part of the actual demand is not correctly predicted, a simple model q(t) = p(t) + n(t) can be used, where n(t) is the error in the prediction. This term is a stochastic variable with zero mean and has little correlation with the rest −1 of the variaT (z ) bles. It is reasonable to consider signals of the form n(t) = D(z −1 ) e(t), with e(t) a white noise signal. For this example, the following description was obtained [119] using typical real data 0.84721(z − 0.6703)(z − 0.6538)(z − 0.6376)(z − 0.6065) T (z −1 ) = . D(z −1 ) (z − 0.8607)(z − 0.8395)(z − 0.2231)(z − 0.1353)(z − 0.08208) Thus, the complete model (process + disturbances) used to compute the predictions shows an integral behaviour with a dead time and two types of disturbances, a deterministic one and a stochastic one.

9.2 MPC Overview

277

Example 9.2: Consider a set of eight tanks connected in series, such as that in Fig. 2.5 of Chap. 2. A unitary step change in the input flow is applied close to the operation point. The values of the variation of the level of the last tank are used to obtain the first 30 coefficients of the step-response model (with a sample time of 0.5 s) g = [0, 0, 0, 0, 0.004, 0.017, 0.048, 0.107, 0.204, 0.346, 0.533, 0.762, 1.024, 1.309, 1.605, 1.901, 2.188, 2.458, 2.704, 2.925, 3.119, 3.286, 3.427, 3.545, 3.642, 3.721, 3.784, 3.834, 3.873, 3.904]. The disturbances are modelled as the difference between the plant output yr (t) and the model output y(t) n(t) = yr (t) − y(t)

and it is considered that the future values of the disturbance are equal to n(t). Thus, the model used for the computation of the predictions is yˆ(t + k | t) =

30  i=1

gi △ u(t + k − i | t) + yr (t) −

30  i=1

gi △ u(t − i | t).

Free and Forced Response A typical characteristic of most MPCs is the use of free and forced response concepts. The idea is to express the control sequence as the addition of the following two signals u(t) = uf (t) + uc (t). Signal uf (t) corresponds to the past inputs and is kept constant and equal to the last value of the manipulated variable in future time instants. That is uf (t − j) = u(t − j), for j = 1, 2, . . . uf (t + j) = u(t − 1), for j = 0, 1, 2, . . . Signal uc (t) is made equal to zero in the past and equal to the next control moves in the future. That is uc (t − j) = 0, for j = 1, 2, . . . uc (t + j) = u(t + j) − u(t − 1), for j = 0, 1, 2, . . . The prediction of the output sequence is divided into two parts: One of them (yf (t)), the free response, corresponds to the prediction of the output when the process manipulated variable is made equal to uf (t) and the other, the forced response (yc (t)), corresponds to the prediction of the process output when the control sequence is made equal to uc (t). The free response corresponds to the evolution of the process due to its present state, while the forced response is due to the future control moves.

278

9 Model Predictive Control of Dead-time Processes

The Objective Function The various MPC algorithms propose different cost functions for obtaining the control law. The general aim is that the future output (y) on the considered horizon should follow a determined reference signal (w) and, at the same time, the control effort (△u) necessary for doing so should be penalised. The general expression for such an objective function is

J=

N2 

j=N1

δ(j)[ˆ y (t + j | t) − w(t + j)]2 +

Nu  j=1

λ(j)[△u(t + j − 1)]2 .

(9.4)

In some methods the second term, which considers the control effort, is not taken into account, whilst in others the values of the control signal (not its increments) also appear directly. In the cost function it is possible to consider the following: •





Parameters: N1 and N2 are the minimum and maximum cost horizons and Nu is the control horizon, which does not necessarily have to coincide with the maximum horizon. The interpretation of N1 and N2 is rather intuitive. They mark the limits of the instants in which it is desirable for the output to follow the reference. Thus, when a value of N1 is taken, it is because errors in the N1 − 1 first instants are unimportant. This will lead to a smooth process response. Note that in processes with a dead time d there is no reason for N1 to be less than d because the output will not begin to evolve until instant t + d. Also if the process is nonminimum phase, this parameter will allow the first instants of the inverse response to be eliminated from the objective function. The coefficients δ(j) and λ(j) are sequences that consider the future behaviour; usually constant values or exponential sequences are considered. Reference trajectory: One of the advantages of predictive control is that if the future evolution of the reference is known a priori, the system can react before the change has effectively been made, thus avoiding the effects of delay on the process response. The future evolution of reference r(t + k) is known beforehand in many applications, such as robotics, servos or batch processes; in other applications a noticeable improvement in performance can be obtained, even though the reference is constant by simply knowing the instant when the value changes and getting ahead of this circumstance. In the minimisation of equation (9.4), the majority of methods usually use a reference trajectory w(t+k), which does not necessarily have to coincide with the real reference but may include a reference filter. Constraints: In practice all processes are subject to constraints. The actuators have a limited field of action as well as a determined slew rate, as is the case of the valves. Constructive, safety or environmental reasons or even the sensor scopes themselves can cause limits in the process

9.2 MPC Overview

279

variables such as levels in tanks, flows in piping or maximum temperatures and pressures; moreover, the operational conditions are normally defined by the intersection of certain constraints for basically economic reasons, so that the control system will operate close to the boundaries. All of this makes it necessary to introduce constraints in the function to be minimised. Many predictive algorithms intrinsically take into account constraints normally defined as bounds in the amplitude and in the slew rate of the control signal and limits in the output umin ≤

u(t)

≤ umax

dumin ≤ u(t) − u(t − 1) ≤ dumax ymin ≤ y(t) ≤ ymax

∀t ≥ 0,

∀t ≥ 0, ∀t ≥ 0.

If these constraints are added to the objective function, the minimisation becomes more complex so that the solution cannot be obtained explicitly unlike in the unconstrained case. The following example illustrates the definition of the parameters of the MPC and the consideration of the constraints. Example 9.3: Consider a gas fire boiler such as the one presented in Chap. 3. The transfer function relationship between the changes in the gas valve −3s position V [%] and the temperature T [◦ C] is considered as P (s) = 1.2e 1+1.2s where the time constants are in minutes. The valve position can vary between 0 and 100% and has a slew-rate of 20%/s. On the other hand the temperature must be maintained between 70◦ C and 90◦ C. The sampling time Ts = 0.2 min gives a dead time d = 15. Thus the horizons for the MPC are chosen as N1 = 16,

N2 = 31,

Nu = 5

in order to take into account the dead time and a window N2 − N1 equivalent to 1.5 time constants of the open-loop response. In this example δ(t) = 1 and λ(t) = λ is used as a tuning parameter. MPC has to solve the minimisation of J for these horizons and weighting factors considering the following set of constraints 0% ≤ u(t) ≤ 100% −20%/s ≤ u(t) − u(t − 1) ≤ 20%/s 70o C ≤

y(t)

≤ 90o C

∀t ≥ 0, ∀t ≥ 0, ∀t ≥ 0.

Obtaining the Control Law In order to obtain values u(t + k | t) it is necessary to minimise function J of Equation (9.4). To do this the values of the predicted outputs yˆ(t + k | t)

280

9 Model Predictive Control of Dead-time Processes

are calculated as a function of past values of inputs and outputs and of future control signals, making use of the model chosen and substituted in the cost function, thus leading to an expression whose minimisation leads to the desired values. An analytical solution can be obtained for the quadratic criterion if the model is linear and there are no constraints, otherwise an iterative method of optimisation should be used. Whatever the method, obtaining the solution is not easy because there will be Nx = N2 − N1 + 1 independent variables, value that may be high (in the order of 10 to 30). In order to reduce the degrees of freedom a certain structure may be imposed on the control law. This can be done, for instance, using the control horizon concept (Nu ), which consists of considering that after a certain interval Nu < N2 there is no variation in the proposed control signals, that is △u(t + j − 1) = 0,

j > Nu ,

which is equivalent to giving infinite weights to the changes in the control from a certain instant. As has previously been indicated, an explicit solution does not exist in the presence of constraints, so that quadratic programming methods have to be used. However, an explicit solution does exist for certain types of constraints, for example, when the condition that the output attain the reference value at a set instant is imposed; this method is used in constrained receding horizon predictive control (CRHPC) [23], which is very similar to GPC and which guarantees stability results. Several algorithms that use these ideas have been proposed. Roughly they can be classified in two main groups. In the first one we find algorithms derived in industry, like DMC [25] and model algorithm control (MAC) [110]. In these controllers the prediction is based on step or impulse response models of the plant and the disturbances are considered as the difference between the real and predicted outputs [55]. The other class of MPC has mainly been derived in academia based on the ideas of adaptive control, and the algorithms were initially not related to the previous group [27]. In this second group of algorithms, in which GPC [22] and extended prediction selfadaptive control (EPSAC) [50] are included, CARIMA (controlled autoregressive integrated moving average) models are used to represent the plant and disturbances and the predictions of the output are computed using optimal predictors. As representatives of these two groups DMC and GPC are, perhaps, the most popular predictive algorithms and in the last two decades several papers have analysed their performance and robustness [55, 69, 22, 21, 114, 137, 2]. However, in spite of the fact that these controllers can cope with processes with dead time, most of the above papers do not pay sufficient attention to the robustness problems caused by errors in the estimation of dead time. As has been pointed out in the previous chapters, dead-time uncertainties are one of the most characteristic types of high-frequency unmodelled dynamics and have a dangerous influence on the closed-loop stability. Thus, in this

9.3 GPC for Dead-time Processes: A DTC Approach

281

chapter a special analysis of the effect of dead time on the control formulation of GPC and DMC is performed. Here the SISO unconstrained case is presented and in the following chapters more complex cases are analysed.

9.3 GPC for Dead-time Processes: A DTC Approach The GPC minimises a multistage cost function that can be rewritten as J=

N2 

j=N1

δ(j)[ˆ y (t + j | t) − w(t + j)]2 +

Nu  j=1

λ(j)[△u(t + j − 1)]2 ,

(9.5)

where yˆ(t+ j | t) is an optimum j-step ahead prediction of the system output in data up to time t, N1 and N2 are the minimum and maximum costing horizons, Nu is the control horizon, δ(j) and λ(j) are weighting sequences, and w(t + j) is a future set-point or reference sequence. The objective of predictive control is to compute the future incremental control sequence △u(t), △u(t + 1),... in such a way that the future plant output y(t + j) is driven close to w(t + j). This is accomplished by minimising J, using an optimal predictor to compute yˆ(t + j | t). To minimise J the predictions yˆ(t + j | t) are first expressed as a function of the past data (previous values of the control action and the plant output) and the future control actions △u(t + j − 1). Then, J can be considered as a function of the future control sequence and minimisation is accomplished in order to obtain the optimal value. The horizons and weighting factors are the tuning parameters. Without loss of generality and because of the dead-time characteristics of the process, horizons N1 and N2 are computed as N1 = d+1 and N2 = N +d. This implies considering the first value of yˆ(t + j | t) at j = d + 1, which is related to the control action up to time t. Also, for simplicity, in this analysis the number of tuning parameters is reduced, choosing Nu = N2 − d = N . 9.3.1 Model Considerations The model used by GPC to compute the predictions is a CARIMA model given by [39] A(z −1 )y(t) = z −d B(z −1 )u(t − 1) +

T (z −1 )e(t) , D(z −1 )△

where △(z −1 ) = 1 − z −1 , d is the dead time, e(t) is a white noise and P (z) = G(z)z −d =

B(z −1 )z −1 −d z . A(z −1 )

(9.6)

282

9 Model Predictive Control of Dead-time Processes

The polynomials T (z −1 ) and D(z −1 ) represent the stochastic characteristics of the noise and because they are difficult to estimate in practice, it is a common choice to use T (z −1 ) = 1 and D(z −1 ) = 1 in order to obtain the basic algorithm of the GPC [15]. As will be discussed later the T (z −1 ) polynomial is often used as a design parameter in a second step of the tuning procedure in order to improve the robustness of the controller. Thus, in this section the analysis will be divided into two parts. First the analysis is carried out with T (z −1 ) = 1 and D(z −1 ) = 1 and then the effect of T (z −1 ) and D(z −1 ) on the controller will be studied. 9.3.2 The Case with T = 1 First consider T (z −1 ) = 1 and D(z −1 ) = 1. In order to compute the optimal prediction of the output of the plant a recursive procedure is used. Consider an equivalent model of the system in Equation (9.6) ˜ −1 )y(t) = z −d B(z −1 ) △ u(t − 1) + e(t), A(z

(9.7)

where ˜ −1 ) = A(z −1 )(1 − z −1 ) = 1 − a A(z ˜1 z −1 · · · − a ˜na+1 z −na−1 = 1 − (1 − a1 )z −1 − (a1 − a2 )z −1 · · · − ana z −na−1 . Using this model, y(t + 1) is given by y(t + 1) =

na+1  i=1

a ˜i y(t + 1 − i) +

nb+1  i=1

bi−1 △ u(t − d − i + 1) + e(t + 1). (9.8)

The best expected value of y(t+1) computed with the data up to t, y(t+1 | t), must consider that the future value of the noise e(t + 1) is zero. This gives the optimal prediction as yˆ(t + 1 | t) =

na+1  i=1

a ˜i y(t + 1 − i) +

nb+1  i=1

bi−1 △ u(t − d − i + 1).

(9.9)

This procedure can be applied recursively to compute all the predictions yˆ(t + i | t) on the desired horizon. Note that all the predicted values are computed based on y(t), y(t − 1), y(t − 2), . . . As has been mentioned, because of the process dead time, yˆ(t + d + 1 | t) is the first prediction to be considered on the cost horizon to compute the control action. In order to study the effect of the dead time in the controller it is interesting to compute the optimal predictions in two steps: From t + 1 to t + d and from t + d + 1 to t + d + N . Thus, as in the DTC case, the predicted value of the plant output at t + d can be used to compute the control action.

9.3 GPC for Dead-time Processes: A DTC Approach

283

The Prediction up to t + d The previous procedure is the simplest and most intuitive way to compute the predictions. However, in this section a compact relation will be used, based on polynomial properties. Consider the Diophantine equation ˜ −1 )Ej (z −1 ) + z −j Fj (z −1 ), 1 = A(z

(9.10)

where Ej (z −1 ) has degree j − 1 and Fj (z −1 ) has degree na. The Diophantine equation can be solved recursively and it corresponds to the successive steps ˜ −1 ). Using Equations (9.7) and (9.10) the prediction at in dividing 1 by A(z t + j (j = 1 . . . d) is [22] yˆ(t + j | t) = Fj (z −1 )y(t) + B(z −1 )Ej (z −1 ) △ u(t − d + j − 1) or equivalently yˆ(t + j | t) = Fj (z −1 )y(t) + [1 − Fj (z −1 )z −j ]G(z)u(t − d + j). The following example illustrates the computation of the predictions. Example 9.4: Consider the discrete model with a small dead time 0.1z −2 , z − 0.9 thus, a = 0.9, b = 0.1 and d = 2. From the Diophantine equation P (z) =

F2 (z −1 ) = [1 + a + a2 ] − [a + a2 ]z −1 = 2.71 − 1.71z −1, bE2 (z −1 ) = b[1 + (1 + a)z −1 ] = 0.1[1 + 1.9z −1] = 0.1 + 0.19z −1,

yˆ(t + 2 | t) = [2.71 − 1.71z −1]y(t) + [0.1 + 0.19z −1][u(t − 1) − u(t − 2)], yˆ(t + 2 | t) = [2.71 − 1.71z −1]y(t) + 0.1u(t − 1) + 0.09u(t − 2) − 0.19u(t − 2). The MATLAB code for this computation is: MATLAB code: Diophantine equation from 1 to N % Input data: A, N, d N=2;A=[1 -0.9];d=2; [E,F]=diophantine(A,N,d);

Having obtained the values of yˆ(t + j | t) up to time t + d it is necessary to compute the predictions used in the objective function.

284

9 Model Predictive Control of Dead-time Processes

The Predictions from t + d + 1 to t + d + N In order to compute the control action it is necessary to determine the predictions from d + 1 to d + N because they are used in the minimisation of J. Thus, considering Equation (9.9) and that yˆ(t+ d+ j − 1 | t), yˆ(t+ d+ j − 2 | t), ..., yˆ(t+ d+ j − na− 1 | t) are known, the best expected value for yˆ(t+ d+ j | t) can be computed as follows yˆ(t + d + j | t) = (1 − a1 )ˆ y (t + d + j − 1 | t) + (a1 − a2 )ˆ y (t + d + j − 2 | t) + . . . +ana yˆ(t + d + j − na − 1 | t) + b0 △ u(t + j − 1) + . . . + bnb △ u(t + j − 1 − nb). If this predictor equation is applied recursively for j = 1, 2, . . . , N we obtain ⎡ ⎢ ⎢ ⎢ ⎣

yˆ(t + d + 1 | t) yˆ(t + d + 2 | t) .. . yˆ(t + d + N | t)





⎥ ⎢ ⎥ ⎢ ⎥ = G⎢ ⎦ ⎣ ⎡

⎢ ⎢ +S ⎢ ⎣



△u(t) △u(t + 1) .. . △u(t + N − 1)

yˆ(t + d | t) yˆ(t + d − 1 | t) .. .



⎥ ⎢ ⎥ ⎢ ⎥ +H⎢ ⎦ ⎣

△u(t − 1) △u(t − 2) .. . △u(t − nb)



⎤ ⎥ ⎥ ⎥ ⎦

⎥ ⎥ ⎥, ⎦

(9.11)

y ˆ = G u + H u1 + S y1 ,

(9.12)

yˆ(t + d − na | t)

where G, H and S are constant matrices of dimension N × N , N × nb and N × na + 1 respectively, (see Appendix A.1 for details). Note that yˆ(t + d − j | t) = y(t + d − j) if d − j ≤ 0 j ∈ [1, na]. In the following we consider d > na. Equation (9.11) can be written in a vector form as follows

where ⎡ ⎢ ⎢ u=⎢ ⎣

△u(t) △u(t + 1) .. . △u(t + N − 1)



⎥ ⎥ ⎥, ⎦



⎢ ⎢ u1 = ⎢ ⎣

△u(t − 1) △u(t − 2) .. . △u(t − nb)



⎥ ⎥ ⎥, ⎦



⎢ ⎢ y1 = ⎢ ⎣

yˆ(t + d | t) yˆ(t + d − 1 | t) .. .



⎥ ⎥ ⎥. ⎦

yˆ(t + d − na | t) (9.13) fr = H u1 + S y1 corresponds to the free response of the system that is the output that would be obtained if the control signal were kept constant (△u(t + i) = 0 ∀i ≥ 0). These predictions are now used in the minimisation of J.

9.3 GPC for Dead-time Processes: A DTC Approach

285

The Minimisation Procedure If y ˆ is introduced in Equation (9.5), J is a function of y1 , u, u1 and the refeT rence sequence w = [w(t + d + 1), w(t + d + 2), ..., w(t + d + N )] J = (G u + H u1 + S y1 − w)T Qδ (G u + H u1 + S y1 − w) + uT Qλ u, (9.14) where Qδ and Qλ are the diagonal N xN weighting matrices with elements δ(j) and λ(j), respectively. Although, in practice, the most common choice is to set δ(j) and λ(j) constants on the horizon, there are some works where some special functions are used to compute these parameters in order to obtain some special characteristics of the closed-loop [85]. In practice, the values of δ(j) and λ(j) must be normalised in order to obtain a correct weighting of the different errors and control actions. After some manipulations J is written as J = uT (Qλ + GT Qδ G)u + 2(H u1 + S y1 − w)T Qδ G u +(H u1 + S y1 − w)T Qδ (H u1 + S y1 − w).

(9.15)

Minimising J with respect to u leads to Mu = P0 y1 + P1 u1 + P2 w, where M = GT Qδ G + Qλ and P2 = GT Qδ are of dimension N × N , P0 = −GT Qδ S of dimension N ×(na+1) and P1 = −GT Qδ H of dimension N × nb. In a receding horizon algorithm only the value of △u(t) is computed, so if m is the first row of matrix M−1 , △u(t) is given by △u(t) = m P0 y1 + m P1 u1 + m P2 w.

(9.16)

Thus, the control increment △u(t) can be written as △u(t) = ly1 yˆ(t + d | t) + ... + lyna+1 yˆ(t + d − na | t) + lu1 △ u(t − 1) +lu2 △ u(t − 2) + ... + lunb △ u(t − nb) +

N 

fi w(t + d + i),

(9.17)

i=1

where m P0 = [ly1 ly2 ...lyna+1 ], m P1 = [lu1 lu2 ...lunb ] and m P2 = [f1 f2 ...fN ]. The coefficients lyi , lui , fi are functions of ai , bi , N, δ(i) and λ(i). A block diagram interpretation of the control law is useful to understand the controller properties.

286

9 Model Predictive Control of Dead-time Processes

w (t+d+1) f1

u( t)

w (t+d+2)

+

f2

w (t+d+ N )

(1- z-1) -1 -1

lu 1z +...+ lu nb z

.... fN

ly1 +

y( t )

Process

-nb

ly2

....

ly na +1

^y ( t+d/ t) ^y ( t+d-1/ t)

Optimal Predictor

^y ( t+d-na/ t)

Fig. 9.3. Control Scheme of the GPC

w (t)

q (t) F (z )

+ _

+ +

C (z )

y (t) P( z ) ^ y(t) z -d

G n (z ) y p (t) optimal predictor

+ +

+ _

F r ( z)

e p (t)

Fig. 9.4. Equivalent DTC structure for the GPC

The Control Scheme The general GPC control scheme is shown in Fig. 9.3. The values yˆ(t+d | t), ..., yˆ(t+d−na | t) are obtained using the optimal predictor procedure previously explained. If the predictions up to t+ d are related to y(t) and u(t), the block diagram of the whole control system is drawn as shown in Fig. 9.4, where Gn (z)z −d is the process model and C(z), F (z) and Fr (z) can be obtained using some manipulations (see Appendix A.2 for details)

C(z) = −

ly1 + ly2 z −1 + ... + lyna+1 z −na , (1 − z −1 )(1 − lu1 z −1 − lu2 z −2 − ... − lunb z −nb ) F (z) = −

Fr (z) =

f1 z d+1 + f2 z d+2 + ... + fN z d+N , ly1 + ly2 z −1 + ... + lyna+1 z −na

ly1 Fd (z −1 ) + ly2 Fd−1 (z −1 ) + ... + lyna+1 Fd−na (z −1 ) . ly1 + ly2 z −1 + ... + lyna+1 z −na

(9.18)

(9.19)

(9.20)

9.3 GPC for Dead-time Processes: A DTC Approach

287

This shows that the primary controller has the same order as the process model and the reference filter cancels the zeros of C(z). As can be seen, the obtained control structure is equivalent to the digital version of the twodegree-of-freedom dead-time compensator presented in Chap. 8, although in this case the filter Fr (z) used to correct the error between the real output and the prediction is not free but a function of the plant parameters A and d and the tuning parameters λ and N . The primary controller in this case is tuned using an optimal procedure and not a classical method although the same pair C(z), F (z) may be used in both controllers. It should be noted that the structure in Fig. 9.4 is only valid for analysis purposes but cannot be used for implementation for unstable processes. The following example illustrates this analysis for a simple FOPDT system. Example 9.5: Consider the water heater in Fig. 9.5 where two temperature sensors are used at different distances from the tank output. The transfer

F

Tank TT

TT F

W

Pump

Fig. 9.5. A heated tank with two temperature sensors in the pipe

function between the input power W and the output temperature T is given −Ls by P (s) = e1+2s . The dead time is L = 0.4 for the first position and L = 4 for the second one. A comparative study between a GPC and a discrete DTC (a 2DOF discrete SP) will be made. The model used by the GPC is obtained by the discretisation of P (s) using a zero-order hold and a sampling time of −d Ts = 0.2. The obtained discrete transfer function is P (z) = 0.095z z−0.905 , where d = 2 for the first case and d = 20 for the second dead time. A GPC has been tuned in order to obtain a closed-loop response both with a small overshoot and faster than the open-loop one. The following parameters were chosen: λ = 1 and N = 15. The future reference is unknown thus, the numerator of F (z) is a constant lr [15]. This choice gives the following values for the equivalent controller ly1 = −3.7003,

ly2 = 2.8683,

The MATLAB code for this example is:

lr = 0.832.

288

9 Model Predictive Control of Dead-time Processes MATLAB code: Computing controller parameters % model and controller tuning % F with numF,denF and C with numC,denC N=15;Nu=N;lambda=1;delta=1; numpd =[0, 0.095];denpd=[1,-0.905];na=1;nb=0;d=2; A = denpd; B = numpd(2:end); [numF,denF,numC,denC]=gpc2dof(A,B,d,N,Nu,lambda,delta); % computes the lyi and lr coefficients for i=1:na+1; ly(i)=numC(i); end; lr=numF(1);

The closed-loop behaviour for the system controlled by the GPC for the case d = 2 and without modelling errors is shown in Fig. 9.6. For the simulation, at t = 4 s a 0.5 step change in the set-point is performed. Also, a 0.1 step disturbance has been applied at the process output and input, respectively, at t = 26 s and t = 40 s. The same figure also shows in dashed lines the closed-loop performance obtained by the SP for the same simulation conditions, where the following PI primary controller C(z) and reference filter F (z) were tuned C(z) =

3.70 − 2.87z −1 , 1 − z −1

F (z) =

0.83 . 3.70 − 2.87z −1

Note that this 2DOF controller is almost the same as the equivalent controller of the GPC. Because of this, the two controlled systems have almost the same set-point tracking characteristics. However, the DTC rejects the output disturbance better, while the GPC rejects the input disturbance faster. That is, the predictor structure affects the regulatory capabilities of the controller. To complete the example the second value of the dead time d = 20 is used. With this new dead time and no modelling errors the same closedloop set-point response is expected to be obtained after the dead time if the controller tuning is maintained. Figure 9.6 shows the closed-loop behaviour of the GPC and DTC for the same simulation test as in the previous case. Note that the differences in the disturbance rejection responses are more appreciable in this case, that is, when the dead time increases the effect of the predictor structure on the closed-loop response is more important. The previous analysis is also valid for an n-order model of the process and it is not a special case of the transfer function representation of the plant. This point is analysed in more detail in subsequent chapters. Practical Implementation The control law can be computed using the step and free response of the system [15]. In this case, the prediction is considered as y ˆ = Gu + fr . The control law is then

(9.21)

9.3 GPC for Dead-time Processes: A DTC Approach

289

r, y

case d=2 0.6 0.4 0.2 0 0

↑output q(t) 10

20

30

↑input q(t) 40

y (SP) y (GPC) 50

60

u

1

−1 0

r, y

u (SP) u (GPC)

0

0.6 0.4 0.2 0 0

10

20

30 case d=20 ↑output q(t)

10

20

30

40

50

↑input q(t) 40

60

y (GPC) y (SP) 50

60

u

1 u (GPC) u (SP)

0 −1 0

10

20

30 time

40

50

60

Fig. 9.6. Process output and control action for the SP and GPC in the nominal case for d = 2 and d = 20 in Example 9.5

u(t) = (GT Qδ G + Qλ )−1 GT Qδ (fr − w)

(9.22)

although only the first element of u(t) is applied. Note that the free response fr is computed using the past values of the control action and the predicted yˆ(t + d | t), thus the effect of the predictor on the control law can be interpreted through its influence on fr . The following example illustrates the use of this type of implementation. Example 9.6: Consider the process analysed in Example 9.5 for the long dead−20 time case L = 4. The discrete process model is P (z) = 0.095z z−0.905 . As P (z) is stable, the controller can be implemented using the block diagram shown in Fig. 9.4 or using the forced and free response. In the latter case the free response and the first row k of matrix (GT Qδ G + Qλ )−1 GT Qδ have to be computed. For the tuning parameters Qδ = I, Qλ = 0.5I and N = 8; k is given by k = [0.1224, 0.1810, 0.1961, 0.1844, 0.1582, 0.1260, 0.0930, 0.0620]. Assuming that the future reference is equal to the current reference r(t), it follows that

290

9 Model Predictive Control of Dead-time Processes

w = [1, 1, 1, 1, 1, 1, 1, 1]T r(t), and the free response is computed using recursively the following equation fr (t+j) = 1.905fr (t+j−1)−0.905fr(t+j−2)+0.095△u(t+j−21),

j = 1 . . . 28

using fr (t) = y(t), fr (t − 1) = y(t − 1) and △u(t + j − 21) = 0 for j > 20. Thus, fr is given by fr = [fr (t + 21), fr (t + 22), . . . fr (t + 28)]T . The algorithm executes the following steps: • • • •

Step 1: Compute vector k. Step 2: Read the plant output y(t). Step 3: Compute the free response fr . Step 4: Compute the control action: u(t) = u(t − 1) + k(w − fr ).

• •

Step 5: Apply the control action u(t). Step 6: Go to step 2.

Another important property of the GPC should be pointed out. It is well known that the GPC algorithm can be applied to unstable processes. Now, if the structure of Fig. 9.4 is used, it is possible to conclude (as in the DTC) that the internal stability of the closed-loop system depends on the structure of the predictor. Thus, internal stability is independent of the choice of the controller parameters N, λ and δ if they are chosen to stabilise the dead-timefree system. On the other hand, remember that the SP, which has the same structure as the GPC but uses Fr (z) = 1, cannot deal with unstable plants. Analysis of Internal Stability There are several ways to show that the system controlled by the GPC is internally stable if the primary controller C(z) stabilises the dead-time-free system. Here, the structure of the optimal predictor can be made equivalent to the one in the unified discrete dead-time compensator of Chap. 8, where the prediction is given by yp (t) = Fr (z)y(t) + S(z)u(t),

(9.23)

For the GPC the equivalent block S(z) is given by S(z) = Gn (z) − Pn (z)Fr (z) = Gn (z)(1 − z −d Fr (z)) z −1 B(z −1 ) (1 − z −d Fr (z −1 )). = A(z −1 )

(9.24)

9.3 GPC for Dead-time Processes: A DTC Approach

291

It is simple to show that every root of A(z −1 ) is a root of 1 − z −dFr (z −1 ) (see Exercise 9.6). Thus, the unstable roots of A(z −1 ) do not appear in the final expression of S(z −1 ). Then, the internal stability is guaranteed if the primary controller C(z) stabilises the dead-time-free system. This is an important conclusion because the optimal predictor used in the GPC is defined using open-loop considerations and it allows the GPC to have an internally stable closed-loop when controlling unstable processes. Thus, one can conclude that the structure of Fr (z) is responsible for this important property of the GPC. These results are quite interesting because they allow the analysis of the GPC using the classical approach and contribute to a better understanding of the qualities and drawbacks of the GPC. Improving the Disturbance Rejection Capability As was mentioned in Chaps. 5 to 8 the disturbance rejection capability of a dead-time compensator system can be improved using a feedforward action when measurable disturbances are considered. In the GPC the feedforward control can be introduced in a natural way using a modified model [15] A(z −1 )y(t) = z −d B(z −1 )u(t − 1) + z −dv Bv (z −1 )v(t) +

T (z −1 )e(t) , (9.25) D(z −1 )△

where dv is the dead time associated to the measurable disturbance v(t) and Bv (z −1 ) = bv0 + bv1 z −1 + bv2 z −2 + ... + bvnb z −vnb . Thus, the predictions are y ˆ = G u + fr + Hv v,

(9.26)

where the additional term Hv v that has been included considers the future values of the measurable disturbances: T

v = [△v(t + 1) △ v(t + 2) . . . △ v(t + N )] ,

(9.27)

and the free response fr also depends on the past values of the measurable disturbances. Thus the following compact expression can be used y ˆ = G u + fr′ , fr′

(9.28)

where = fr + Hv v corresponds to the new free response. With this formulation the optimisation procedure can be performed using the same approach as in the case where v = 0, simply using as a free response the process response due to initial conditions (including external disturbances) and future “known” disturbances [15] (Exercise 9.7 suggests the study of this problem). The general case (with a complete CARIMA model of the disturbances, T = 1 and D = 1) is now analysed to complete the results of this section.

292

9 Model Predictive Control of Dead-time Processes

9.3.3 The Case with T = 1 For this analysis all the previous considerations are maintained and only a different pair of polynomials T (z −1 ), D(z −1 ) are used to describe the noise. First, notice that if D = 1 it is possible to define A′ (z −1 ) = A(z −1 )D(z −1 ), ′ −1 B (z ) = B(z −1 )D(z −1 ) and to solve the prediction equation with these two new polynomials. Thus, as D can be absorbed in polynomials A and B, in the following analysis it will be considered that D = 1. Now, when T (z −1 ) = 1 it is possible to compute the optimal prediction using the following procedure, which is similar to the one used with T (z −1 ) = 1. Consider the Diophantine equation [15] ˜ −1 )Ej (z −1 ) + z −j Fj (z −1 ) T (z −1) = A(z or equivalent by ˜ −1 )Ej (z −1 ) = T (z −1 ) − z −j Fj (z −1 ), A(z

(9.29)

where Ej (z −1 ) has degree j − 1 and Fj (z −1 ) has degree na. Considering the system Equation (9.6) at t + j ˜ −1 )y(t + j) = B(z −1 ) △ u(t − d + j − 1) + T (z −1 )e(t + j). A(z Multiplying the previous equation by Ej (z −1 ) and using Equation (9.29) T (z −1)y(t + j) = Fj (z −1 )y(t) + B(z −1 )Ej (z −1 ) △ u(t − d + j − 1)+ +T (z −1)Ej (z −1 )e(t + j) or equivalent by

y(t + j) =

B(z −1 )Ej (z −1 ) Fj (z −1 ) y(t) + △ u(t − d + j − 1) + Ej (z −1 )e(t + j). T (z −1 ) T (z −1 ) F (z −1 )

B(z −1 )E (z −1 )

j In this equation the polynomial divisions Tj(z−1 ) and can be T (z −1 ) −1 considered as polynomials in z with degree ∞. Thus y(t + j) is computed with past values of y(t) and past and future control actions. The disturbance terms

Ej (z −1 )e(t + j) are all in the future, as Ej (z −1 ) has degree j − 1. As the best expected value for the future disturbances is zero, the best prediction of y(t + d) is

yˆ(t + j | t) =

B(z −1 )Ej (z −1 ) Fj (z −1 ) y(t) + △ u(t − d + j − 1). T (z −1) T (z −1 )

9.3 GPC for Dead-time Processes: A DTC Approach

293

Using z −j Fj (z −1 ) B(z −1 ) B(z −1 )Ej (z −1 ) = 1 − , ˜ −1 ) T (z −1 ) T (z −1 ) A(z

 Fj (z −1 ) z −j Fj (z −1 ) B(z −1 ) yˆ(t + j | t) = y(t) + 1 − u(t − d + j − 1). T (z −1 ) T (z −1 ) A(z −1 ) Considering the model G(z) =

yˆ(t + j | t) =

B(z −1 )z −1 A(z −1 ) ,

it follows that

 z −j Fj (z −1 ) Fj (z −1 ) y(t) + 1 − G(z)u(t − d + j), T (z −1 ) T (z −1 )

which is the same expression as the one obtained in the case with T (z −1 ) = 1 with a different filter Fj′ (z −1 ) =

Fj (z −1 ) . T (z −1 )

Thus, using the same procedure as in the case where T (z −1 ) = 1, the relations between the control action and the predictions can be computed. Moreover a 2DOF structure can be obtained, where the blocks C(z) and F (z) depend on λ, N and T (z −1 ). Therefore, also in this case the structure of the DTC again appears in the GPC. It can be shown that the polynomial T (z −1 ) only has an effect on the robustness and disturbance rejection response of the closed-loop system [15, 115]. In the nominal case and without noise or disturbances the predictions are the same as in the case with T (z −1) = 1 and the final control action u(t) has no dependence on T (z −1). On the other hand, in the presence of disturbances or model uncertainties, T (z −1) acts as a filter that could be used to suppress the effects of the modelling errors, mainly at high frequencies. This property has been used by several authors to propose tuning rules for the T -polynomial where T (z −1 ) is not used to model the stochastic characteristic of the disturbances but as a filter to improve robustness. This point is analysed in detail in Chap. 10, where the obtained relations will be used to perform a closed-loop evaluation of the GPC and to compare it to the DTC analysed in Chaps. 5 to 8 when controlling dead-time processes. The following section illustrates these results. 9.3.4 GPC for SOPDT models Although the FOPDT transfer function is the process model most widely used in practice, there are some situations where a second-order model plus a dead time is used [30, 4]

294

9 Model Predictive Control of Dead-time Processes w( t +d+1) f1 u( t )

w( t +d+2) f2 w( t +d+ N)

(1- z-1) -1

+

. . . fN

lu 1 z -1 ly1

+

ly2

y(t) Process

^ y ( t +d/ t ) ^ y ( t +d-1/ t ) ^ y ( t +d-2/ t )

Optimal Predictor

ly3

Fig. 9.7. Control scheme for a second-order process with a dead time

P (s) =

k(1 + βs)e−Ls , 1 + α1 s + α2 s2

where k, β, α1 , α2 , L are real numbers. This model allows an oscillatory step response to be represented and it is useful, for instance, when a controller in a cascade structure is used. Moreover, nonminimum phase behaviour can be represented by this model. The corresponding discrete model is A(z −1 )y(t) = z −dB(z −1 )u(t − 1) + n(t),

(9.30)

where n(t) is a disturbance and A(z −1 ) = 1 + a1 z −1 + a2 z −2 and B(z −1 ) = b0 + b1 z −1 . Note that the FOPDT model is obtained if α2 = β = 0. If the GPC is computed for this model using T = 1, the following control law is obtained △u(t) = ly1 yˆ(t + d | t) + ly2 yˆ(t + d − 1 | t) + ly3 yˆ(t + d − 2 | t) +lu1 △ u(t − 1) +

N 

fi w(t + d + i).

(9.31)

i=1

The final control structure for this case is shown in Fig. 9.7. The diagram in Fig. 9.7 is equivalent to the one in Fig. 9.4 with C(z) = − F (z) =

ly1 + ly2 z −1 + ly3 z −2 , (1 − z −1 )(1 − lu1 z −1 )

f1 z d+1 + ... + fN z d+N , ly1 + ly2 z −1 + ly3 z −2

showing that the GPC is equivalent to an optimal predictor plus a 2DOF PID controller.

9.3 GPC for Dead-time Processes: A DTC Approach

295

V1 water

TC

FC gas V2

Fig. 9.8. Cascade control structure for the temperature control in a gas fire boiler

Note that for dead-time-free systems the controller is equivalent to a simple 2DOF-PID where the parameters are chosen using an optimal criterion. This analysis leads to a very interesting conclusion: For the nominal case, as Fr (z) has no effect on the closed-loop set-point response, an SP plus a PID controller and a reference filter can be always tuned to obtain exactly the same set-point performance as the GPC. It is also clear that the disturbance rejection responses are not the same. This point is analysed in detail in Chap. 10 but here an example is used to illustrate these properties. Example 9.7: Figure 9.8 shows a cascade control structure where a GPC and a DTC are used in the external loop of a temperature control (TC) in a gas fire boiler. In this configuration the GPC and the DTC give the set-point to a continuous PI controller in the internal loop (FC), which is responsible for operating the gas flow acting on valve V2 . It is assumed that the water flow controlled by V1 is constant. Consider the closed-loop response of the inner loop to have a small overshoot. A second-order model is used to represent the relation between the set-point of the PI and the process variable T e−5s . 2s2 + 2s + 1 Using a sampling time Ts = 0.2 and a ZOH gives P (s) =

0.0093 + 0.0087z −1 . 1 − 1.8006z −1 + 0.8187z −2 The GPC is computed with N = 15, λ = 1 and assuming that the future reference is equal to the current one. Thus, the following PID controller and reference filter are obtained P (z) = z −25

C(z) =

19.6998 + 32.8221z −1 + 13.9406z −2 , 1 − 0.9z −1 − 0.1z −2

296

9 Model Predictive Control of Dead-time Processes

0.6 ↑output q(t)

↑input q(t)

r, y

0.4 0.2

y (GPC) y (SP)

0 0

10

20

30

40

50

60

1

u

0

−1 u (GPC) u (SP) −2 0

10

20

30 time

40

50

60

Fig. 9.9. Process output and control action for the SP and the GPC in the nominal case for Example 9.7. Set-point shown by dashed-dotted lines

F (z) =

0.8183 . 19.6998 + 32.8221z −1 + 13.9406z −2

The closed-loop behaviour for the system controlled by the GPC and a DTC with the primary controller obtained is shown in Fig. 9.9. For the simulation, at t = 20 samples a 0.5 step change in the set-point is performed and a 0.1 step disturbance is applied at the process output and input, respectively, at t = 130 samples and t = 200 samples. Notice that the two controlled systems have the same set-point tracking capabilities, the DTC rejects the output disturbance better, while the GPC rejects the input disturbance faster. That is, the results obtained in Example 9.5 are repeated here. The previous study dealt with the GPC that can be considered as an MPC algorithm representing the group of controllers that use an autoregressive model representation. Similar results will be obtained if other algorithms with these characteristics are used. To complete the analysis of this chapter and to show the generality of the results, the same study is performed in the next section with the DMC that represents the other group: Algorithms that use finite impulse response (FIR) models to compute the predictions of the output of the plant.

9.4 Classical Representation of DMC

297

9.4 Classical Representation of DMC The DMC strategy uses the same cost function as GPC and has the same objectives but the predictions of the output of the plant are computed using a step-response model yˆ(t + k | t) =

∞  i=1

gi △ u(t + k − i) + n ˆ (t + k | t).

The disturbance prediction n ˆ (t + k | t) is considered constant along the horizon and equal to the difference between the process and model output n ˆ (t + k | t) = n ˆ (t | t) = y(t) − yˆ(t | t).

Using these two expressions and separating the future control actions gives yˆ(t + k | t) = −

∞  i=1

k  i=1

gi △ u(t + k − i) +

gi △ u(t − i) =

k  i=1

∞ 

i=k+1

gi △ u(t + k − i) + y(t)

gi △ u(t + k − i) + f (t + k),

where f (t + k) is the free response of the system, that is, the part of the response that does not depend on the future control actions and is given by f (t + k) = y(t) +

∞  i=1

(gk+i − gi ) △ u(t − i).

(9.32)

If the process is asymptotically stable, the coefficients gi of the step response tend to a constant value after M sampling periods, so it can be considered that i > M, gk+i − gi ≈ 0,

and therefore:

yˆ(t + k | t) =

k  i=1

gi △ u(t + k − i) + y(t) +

M  i=1

(gk+i − gi ) △ u(t − i). (9.33)

Notice that if the process is not asymptotically stable, then M does not exist and f (t + k) cannot be computed (although a generalisation exists in the case of the instability being produced by pure integrators). The step response is the same as in the GPC case, but in this case a certain number of gi = 0 will be obtained as the dead time is not separated from the rest of the model. Thus, using a prediction horizon and a control horizon, the minimisation of J is accomplished using the predicted values. In order to compare the results to the ones in the GPC analysis, without loss of generality, the same horizons as in that case are considered.

298

9 Model Predictive Control of Dead-time Processes

9.4.1 Computing the Predictions Once again, it is interesting to formulate the DMC in order to explicitly see the effect of the dead time on the controller and to evaluate the effect of the dead time on the closed-loop behaviour. The first output to be used in the optimisation is yˆ(t + d + 1 | t) and, because of the dead time, g1 = g2 = . . . = gd = 0, it is possible to write yˆ(t + d | t) = y(t) + (gd+1 − g1 ) △ u(t − 1) + . . . + (gN +d − gN ) △ u(t − N ), which can be written as (see Appendix A.3) y(t) = yˆ(t + d | t) − (gd+1 − g1 ) △ u(t − 1) − . . . − (gN +d − gN ) △ u(t − N ). Substituting y(t) in the expressions of yˆ(t + d + i | t) gives y ˆ = G u + H u1 + S y1 ,

(9.34)

where T

y ˆ = [ˆ y(t + d + 1 | t) . . . yˆ(t + d + N | t)] ,

u = [△u(t) △ u(t + 1) . . . △ u(t + N − 1)]T , T

u1 = [△u(t − 1) △ u(t − 2) . . . △ u(t − N )] , y1 = yˆ(t + d | t). In this equation S is a unitary vector of dimension N × 1 and G, H are constant matrices of dimension N × N ⎡ ⎤ ⎡ ⎤ 0 ... 0 gd+1 1 ⎢ gd+2 ⎥ ⎢ ⎥ g ... 0 d+1 ⎢ ⎥ ⎢1⎥ ⎢ ⎥ ⎢ ⎥ . . . . . .. .. . . .. ⎥ , G=⎢ S = ⎢ .. ⎥ , ⎢ ⎥ ⎢ ⎥ ⎣ gd+N −1 gd+N −2 ... 0 ⎦ ⎣1⎦ gd+N gd+N −1 ... gd+1 1 ⎡

⎢ ⎢ H=⎢ ⎣

(gd+2 − gd+1 ) (gd+3 − gd+1 ) .. .

(gd+3 − gd+2 ) (gd+4 − gd+2 ) .. .

⎤ ... (gd+N +1 − gd+N ) ... (gd+N +2 − gd+N ) ⎥ ⎥ ⎥. .. .. ⎦ . .

(gd+N +1 − gd+1 ) (gd+N +2 − gd+2 ) ... (gd+2N − gd+N )

Note that the first nonnull element of G is gd+1 and its value is the same as the first step-response coefficient of a dead-time-free system with the same dynamics. The free response of the system is given by fr = H u1 + S y1 and matrix G is the same as in the GPC algorithm. Thus, the obtained predictions are used in the minimisation of J.

9.4 Classical Representation of DMC

299

f1 y ( t) f2

(1- z -1 ) -1

+

Process

lu 1 z-1 + ...+ lu N z- N

. . .

Predictor

ly

fN

Fig. 9.10. Control scheme of the DMC

9.4.2 Minimisation of J The prediction equation and the cost function equation have the same expressions as in the GPC case. Thus, using the same procedure and nomenclature, the optimal control action △u(t) is computed as △u(t) = ly yˆ(t + d | t) + lu1 △ u(t − 1) + lu2 △ u(t − 2) + ... + luN △ u(t − N ) +

N 

fi w(t + d + i),

(9.35)

i=1

where coefficients ly, lui and fi are functions of the parameters of A(z −1 ), B(z −1 ), λ and N (see Exercise 9.10). Figure 9.10 shows the equivalent control scheme. As in GPC, the previous structure is useful for analysis and, in practice, the control law is computed using the step and free response of the system. In this case the prediction is y ˆ = G u + fr ,

(9.36)

and the final control law, with matrix gain K, is T

u = (GT G + Qλ )−1 G (fr − w) = K(fr − w).

(9.37)

Note that this is the same result as obtained for the GPC although the free responses are computed in a different way. To complete the analysis of the controller, the prediction in t + d is computed as a function of the current values of the plant inputs and outputs. 9.4.3 Prediction at t + d The original prediction is considered for the case of a system with a dead time

300

9 Model Predictive Control of Dead-time Processes ∞ 

yˆ(t + d | t) =

i=1

gi △ u(t + d − i) + y(t) −

∞  i=1

gi △ u(t − i)

(9.38)

and using gi = 0 for i = 1 to i = d it follows that ∞ 

yˆ(t + d | t) =

i=d+1

gi △ u(t + d − i) + y(t) −

∞ 

i=d+1

gi △ u(t − i) (9.39)

or, equivalent by yˆ(t + d | t) =

∞  i=1

Considering yˆo (t) =

gd+i △ u(t − i) + y(t) −

∞ 

i=1

model follows

∞  i=1

gd+i △ u(t − d − i). (9.40)

gd+i △ u(t − d − i) the open-loop response of the

yˆ(t + d | t) = yˆo (t + d) + y(t) − yˆo (t).

(9.41)

In practice the sums are truncated, but the structure of the predictor is the same and can be written using the back shift operator as

yˆo (t) = z −d (1 − z −1 )

M 

gd+i z −i u(t) = PDMC (z)u(t) = z −d GDMC (z)u(t),

i=1

yˆ(t + d | t) = GDMC (z)u(t) + y(t) − PDMC (z)u(t). Thus, the structure in Fig. 9.10 can be drawn as the 2DOF-DTC shown in Fig. 9.4 for the GPC with Fr (z) = 1. In this particular case the two-degree-offreedom primary controller is

C(z) =

(1 −

z −1 )(1

F (z) =

− lu1

z −1

ly , − lu2 z −2 − ... − luN z −N )

f1 z d+1 + f2 z d+2 + . . . + fN z d+N . ly

(9.42)

(9.43)

Some particularities of C(z) and F (z) must be noted: The order of C(z) is not related to the plant order model and only depends on the control horizon N . As in GPC, C(z) includes an integrator, thus the controller allows an offset-free closed-loop behaviour. Contrary to the GPC case, filter F (z) does not cancel the zeros of C(z) and, when the reference is known, F (z) is a simple gain.

9.4 Classical Representation of DMC

301

room T

air heater F gas valve

Fig. 9.11. A central air heater of a building

In this case, assuming that GDMC (z) gives the same response as the deadtime-free model of the process, the DMC has the same predictor structure as the SP. In practice this is only obtained when very high values of M are used. The following example illustrates these results. Example 9.8: Consider the central heater of a building shown in Fig. 9.11. A control system is used to maintain the desired temperature in the room. This control system measures the temperature at the room and acts on the air flow (F ) and the gas valve of the heater. Suppose that F is constant. Because of the distance between the heater and the room there is a long dead time in the behaviour of the temperature when a change in the gas valve of the heater is applied. The model relating the variations in the gas valve position and the room temperature is considered to be e−7s . 1 + 2s + s2 Two algorithms will be used for the controller: A DMC and a discrete SP. The sampling time Ts is chosen as 0.2. First, the SP is defined using a PID as primary controller. The PID is tuned to cancel the poles of the plant, giving P (s) =

1.0 − 1.6375z −1 + 0.6703z −2 . 1 − z −1 For the simulation, at t = 10 samples a 0.5 step change in the temperature set-point is performed and a 0.1 step disturbance is applied to the process output at t = 150 samples. This disturbance can simulate, for instance, the opening of a window in the room. The reference signal is obtained from the set-point using a first-order-reference filter C(z) = 2.3

0.3z −1 . 1 − 0.7z −1 For the DMC the coefficients gi are obtained from the step response of P (s). Because of the dead time 80 coefficients were used. Note that almost F (z) =

302

9 Model Predictive Control of Dead-time Processes

0.6

r, y

0.4 0.2 y (SP) y (DMC)

0 0

20

40

60

80

100

120

140

160

180

200

u

0.5

0

u (SP) u (DMC) −0.5 0

20

40

60

80

100 120 time (samples)

140

160

180

200

Fig. 9.12. Process output and control action for the SP and DMC in the nominal case for Example 9.8. Set-point shown by dashed-dotted lines

half of the gi are zero. The tuning of the horizons and λ was done to achieve a closed-loop response similar to the one obtained with the SP. The following values were obtained λ = 4, N1 = 1, N2 = 60 and Nu = 3. The MATLAB code for the computation of the matrices G and K is: MATLAB code for G and K % input data d=35;num=[zeros(1,d) [0.0350 0.0307]]; den=[1 -1.6375 0.6703 zeros(1,d-1)]; % step response P=tf(num,den,1); N=80;g=step(P,N); p=60;m=3;G=zeros(p,m);G(:,1)=g(1:p); % computes G for i=2:m ga=[zeros(1,i-1) g(1:p-i+1)’];G(:,i)=ga’; end; % computes K lambda=4; K=inv(G’*G + lambda*eye(m))*G’;

Figure 9.12 shows the closed-loop behaviour of the DMC (solid line) and SP (dashed line) for the simulation test when the model is equal to the process. Note that both the disturbance rejection performance and the set-point tracking of the two controllers are similar. Also note that these results are

9.5 MPC and Dead Times

u( t)

w (t) Optimisation

Process

303

y (t)

Predictor

y p (t) Fig. 9.13. General control structure of the MPC for dead-time processes

equivalent to the ones obtained by the GPC study; thus they are not dependent on the model characteristics of the particular MPC algorithm.

9.5 MPC and Dead Times The previous analysis allows several important properties of the MPC algorithms to be shown when controlling dead-time processes. The principal conclusion that must be made is that a dead-time compensator structure is intrinsically computed in the MPC control law and that this property allows these algorithms to be compared to the DTC. Simply, it is possible to say that every linear MPC can be posed as a 2DOF-DTC where the primary controller is computed using an optimisation procedure. The prediction structure of this internal DTC is defined by the process and disturbances model and does not depend on the optimisation procedure, even in the case when constraints are considered (this point will be analysed in the following chapters). A simple block diagram of the MPC that illustrates this idea is shown in Fig. 9.13. The prediction yp (t) can be computed using recursive state space models, finite impulse response models or transfer function models. Different disturbance models and approaches can be used to correct the ideal predicted value of the output of the plant. In all cases, the computation of yp (t) is composed of the addition of the output of the dead-time-free ideal model (ˆ y(t + d | t)), and a correction based on the actual plant output y(t) and the predicted output yˆ(t | t) that passes through a filter, as is shown in Fig. 9.14. As has been shown in Chap. 5 and discussed here, for a given primary controller and perfect modelling, the set-point closed-loop response does not depend on the characteristics of the predictor. However, the disturbance rejection response and the robustness are not the same, as they depend on the filter block of the predictor of the MPC. Thus, the disturbance rejection response and the robustness will be affected by the dead time of the process. An analysis of this point is discussed in detail in next chapter and some examples are presented in the following section to motivate the study.

304

9 Model Predictive Control of Dead-time Processes

u( t )

Dead-time-free model

^ y ( t +d| t ) Dead-time model

y ( t)

+ _

+ +

Filter

yp ( t ) Predictor Fig. 9.14. General control structure of the predictor of a MPC

Finally, some comments relating the constrained case have to be given. When the MPC algorithm is computed considering the constraints, the minimisation of J does not give an explicit solution such as the one presented in this chapter. However, the control structure is the same and the effect of the predictor structure on the controller can be interpreted using the same approach. The analysis of this case is more profoundly dealt with in the following chapters.

9.6 Dead-time Problems in MPC Algorithms To illustrate the previous study the same comparative examples presented in the previous sections are analysed here for the modelling error case. Example 9.9: Consider the same process model and controller tuning as in the water heater of Example 9.5. In this example it is shown that for the nominal case and for the two dead-time cases the GPC and the DTC give the same set-point tracking, also that the DTC rejects the output disturbance better while the GPC rejects the input disturbance faster. Dead-time estimation errors will now be considered, that is, the dead time of the predictor model will be maintained and the dead time of the process will be changed. First consider the case d = 2. In the following simulations, a 100% deadtime uncertainty is considered (two samples) without changing the tuning of the controllers presented in Example 9.5. The behaviour of the two control systems is compared in Fig. 9.15. As can be observed, the SP presents a better performance than the GPC. In a second simulation the dead time d = 20 is used. With this new process dead time and maintaining the simulation conditions and controller tuning, a 10% dead-time uncertainty is considered (two samples). The obtained results are also shown in Fig. 9.15. As expected, the DTC maintains stability because, as demonstrated in Chap. 5, the modelling error δP (jω) as well as dP (ω) do not depend on the absolute value of

9.6 Dead-time Problems in MPC Algorithms

305

r, y

case d=2 0.6 0.4 0.2 0 0

↑output q(t) 10

20

30

y (GPC) y (SP)

↑input q(t) 40

50

60

u

1 u (GPC) u (SP)

0 −1

r, y

0 0.6 0.4 0.2 0 0

10

20

30 case d=20

↑output q(t) 10

20

30

40

50

y (GPC) y (SP)

↑input q(t) 40

60

50

60

u

1 u (GPC) u (SP)

0 −1 0

10

20

30 time

40

50

60

Fig. 9.15. Process output and control action for the SP and the GPC for the case of a dead-time-estimation error of two samples in Example 9.9

the dead time. Thus, as the dead-time uncertainty is, in this case, the same as in the previous situation (two samples), the SP shows a stable behaviour. This is not the case of the GPC that drives the system to instability (note that, for clarity, the simulation was stopped before the final time), although is has a nominal closed-loop performance similar to that of the SP. That is, the GPC is sensitive to the nominal dead time and its robustness is clearly dead-time dependent. This example, showing that a simple DTC may provide a better compromise between performance and robustness than the predictive controller, motivates the analysis of the GPC operations when they are used to control dead-time processes. As will be demonstrated in the next chapter, its tuning may be improved taking advantage of the understanding of the effect of the dead time on the controller. Example 9.10: To compare the DMC with the SP the same process and controller tuning as in Example 9.8 are considered. In the nominal case of this example it was shown that the two controllers have similar nominal performance. To analyse the robustness, a 20% error in the dead-time estimation is assumed. Figure 9.16 shows the new closed-loop behaviour of the DMC (solid

306

9 Model Predictive Control of Dead-time Processes 0.8

r, y

0.6 0.4 0.2 y (SP) y (DMC)

0 0

50

100

150

200

250

300

350

400

450

500

u

0.5

0

u (SP) u (DMC) −0.5 0

50

100

150

200 250 300 time (samples)

350

400

450

500

Fig. 9.16. Process output and control action for the SP and the DMC in the real case for Example 9.10. Set-point shown by the dashed-dotted line

line) and SP (dashed line) for the change in the set-point at t = 10 only. Note that the DMC cannot maintain the closed-loop stability but the SP gives a stable closed-loop system. The same conclusions as in the previous example can be derived from this case, although it must be noted that larger dead-time errors are needed to drive the DMC to instability.

9.7 Summary This chapter has presented a special analysis of predictive controllers when controlling dead-time processes. The main conclusion of the analysis is that a dead-time compensation structure can be considered explicitly in the computation of the free response of the MPC strategy. As one of the main differences between the different MPC algorithms is the free response computation, this analysis shows how this affects the behaviour and the robustness of the closed-loop system in the special case of dead-time processes. The study shows why the closed-loop system controlled by an MPC has different robustness when d changes. This characteristic can be associated with the properties of the Fr (z) filter of the predictor structure. These analytical relations allow the comparative simulation examples presented in this chapter to be understood. If two different MPC algorithms can be tuned to

9.9 Exercises

307

achieve the same nominal performance for set-point tracking in a dead-time process, then they have the same primary controller in the predictor-based structure. On the other hand, the robustness and the disturbance rejection is clearly predictor-dependent, that is, the predictor structure inside the controller is responsible for the obtained trade-off between disturbance rejection and robustness. The obtained relations will be used to perform a comparative analysis of the MPC and the DTC. Note that it is enough to consider only one MPC algorithm in this study because the previous analysis showed that a modification in the prediction structure of one of the controllers can allow the structure of the other to be obtained. In fact, in the normal procedure used in practice the only difference between these algorithms is the free response computation. The GPC approach allows stable, integrative and unstable processes with a dead time to be studied. Thus, in the next chapter the robustness properties and tuning procedure of the GPC are analysed and compared to the DTC with the aim of finding a solution to the problem of controlling plants with dominant dead times using predictive controllers and achieving a desired performance and robustness.

9.8 Further Reading The chapter only presents a brief revision of the principal concepts of MPC. A complete study of these controllers can be found in [65, 15, 115]. The relations between optimal controllers and dead-time compensators were first analysed in the 1980s [103, 98, 8] for stable processes and minimum variance controller (MVC) or generalised-MVC (GMVC) algorithms. The generalisation of these results and the study of GPC as an optimal predictor plus a primary controller are presented in [13, 14, 85, 74]. In [13] the structure is used to propose a self-tuning controller while in [85, 74] the robustness is discussed. Optimal predictors were also combined with other optimal controllers like extended prediction self adaptative control [50] and extended horizon adaptive control [6]. The effect of the T -polynomial on the controller structure of the GPC is studied in [21] and discussed later in several books [15, 115]. The simple case analysis of the GPC as a DTC with a PID controller is presented in [86]. DMC is presented in [25] and analysed in several works [55, 15, 115]. The special study of the dead-time effects on DMC are presented in [120].

9.9 Exercises 9.1. Derive the general expression of Fr (z −1 ) for an FOPDT process with A(z −1 ) = 1 − az −1 .

308

9 Model Predictive Control of Dead-time Processes

9.2. Using the same process as in Example 9.5, tune a DMC in order to obtain a similar nominal performance to the GPC case. Also, compute a discrete dead-time compensator with disturbance observer controller using the results in Chap. 8. Compare the obtained results to the ones in Example 9.5 for the same cases. −6s

5e 9.3. Consider the process represented by P (s) = s(1+s) . Compute a discrete model for this process and find the equivalent classical structure of the GPC for this case, obtaining the blocks C(z) and F (z).

9.4. Repeat Exercise 9.3 for the particular case of a double integrator process −5s with a dead time P (s) = e s2 . 9.5. Using a similar analysis to the GPC case, compute the structure of the DMC for an FOPDT and an SOPDT stable process. 9.6. Show that S(z −1 ) = Gn (z −1 )(1 − z −d Fr (z −1 )) is a polynomial. Com˜ −1 )Ej (z −1 ) + z −j Fj (z −1 ) to show that putes z −d Fr (z −1 ) and use 1 = A(z −1 every root of A(z ) is a root of (1 − z −d Fr (z −1 )). 9.7. Consider the model used in Sect. 9.3.2 in the case of measurable disturbances for the particular process Y (s) =

1 1 −3s e−5s U (s) + e Q(s). (s + 1)(2s + 1) s+1

Compute the GPC control law for this case and compare with the DTC with a feedforward action. 9.8. The results presented in Sect. 9.3.4 allow the primary PI or PID controller of a DTC to be computed using an optimisation procedure. Create a code for the computation of the PID controller using a 2DOF structure for the PID such as the one presented in Chap. 4. 9.9. Consider an FOPDT stable process with unitary static gain, time constant T and dead time L = nT , with n > 1 an integer and the particular choice of the sampling time Ts = 0.1T . For this case, compute the parameters of the PI primary controller in the classical equivalent structure of the GPC for the following set of tunings: (a) N = 15 and λ ∈ (0.1, 1), (b) N = 10 and λ ∈ (0.1, 1), (c) N = 5 and λ ∈ (0.1, 1). For each case plot the values of the PI gains as functions of λ. 9.10. Following the same procedure as in the GPC case compute the relationships between ly, lui and fi and the model coefficients.

10 Robust Predictive Control of Dead-time Processes

Chapter 9 has shown that an MPC controller when used to control a deadtime process can be interpreted as a DTC. In this chapter, this property will be used to perform a robust analysis of the GPC and to derive robust tuning procedures. A DTC based MPC controller especially appropriate for controlling dead-time processes is also introduced. For clarity, in the first part of the analysis only open-loop-stable processes are considered and the T -polynomial of the GPC is set to 1. This configuration is called the “basic” GPC. In the second part of the analysis the T polynomial of the GPC and the predictor filters of the DTC are introduced to improve robustness and unstable processes are also considered.

10.1 Robustness Analysis of the Basic GPC The robustness analysis of the GPC follows the same procedure used in the DTC approach. The study of the control system is made using the block diagram of Fig. 10.1, which is the same as the one used in the DTC approach if the reference trajectory w(t) is equal to the current reference r(t). The set-point nominal performance is given by w (t)

q (t) F (z )

+ _

+ +

C (z )

y (t) P( z ) ^y ( t ) G n (z )

y p (t) optimal predictor

z + +

+

-d

F r ( z)

Fig. 10.1. Block diagram of the GPC

_ e p (t)

310

10 Robust Predictive Control of Dead-time Processes

Hr (z) =

F (z)C(z)Gn (z)z −dn . 1 + C(z)Gn (z)

As has been shown in Chap. 9, the coefficients of C(z) depend on the values of N and λ, although it is not easy to relate the poles and zeros of the controller to the tuning parameters. However, it is possible to assume that a desired set of closed-loop poles are obtained at Hr (z). For robustness analysis purposes the plant is represented by the transfer function P (z) P (z) = Pn (z) + ∆P (z) = Pn (z)[1 + δP (z)], where Pn (z) = Gn (z)z −dn is the nominal model and δP (z) are the modelling errors. Using the block diagram of Fig. 10.1 and the results of Chap. 8, the robustness condition can be stated as | δP (z) |< dP (z) =

| 1 + C(z)Gn (z) | , | C(z)Gn (z)Fr (z) |

z = ejω

∀ω ∈ [0, π].

(10.1) Thus, the robustness and performance of the GPC can be related by substituting Hr (z) in the last expression and using | e−jωdn |= 1 | δP (z) |< dP (z) =

1 | F (z) | , | Hr (z) | | Fr (z) |

z = ejω

∀ω ∈ [0, π].

(10.2) This equation shows that once N and λ have been defined the robustness of the GPC is a function of the filter Fr (z) that has been calculated in Chap. 9 as

Fr (z) =

ly1 Fdn (z −1 ) + ly2 Fdn −1 (z −1 ) + ... + lyna+1 Fdn −na (z −1 ) . ly1 + ly2 z −1 + ... + lyna+1 z −na

(10.3)

This shows that the dead time has an important effect on the robustness of the controller. Note that •

in Equation (10.2) | 1 + C(z)Gn (z) | | F (z) | = | Hr (z) | | C(z)Gn (z) |

• •

does not depend on dn as | z |=| e−jωdn |= 1 ∀ ω ∈ [0, π]; Fr (z) is dn -dependent. Note that dn defines the elements in the numerator of Fr (z) and consequently the robustness of the controller; for a given model Gn (z), different values of dn give different dP (z).

Consider, for instance, that the modelling error is only caused by a deadtime-estimation error ∆d = d − dn . Thus δP (ω) =| e−j∆dω − 1 |

∀ω ∈ [0, π].

10.1 Robustness Analysis of the Basic GPC

311

Note that for a fixed ∆d, the modelling error is independent of dn , while dP (ω) is a function of dn . Thus, contrary to a DTC, the GPC will have different robustness characteristics for different nominal dead times. The following example illustrates this analysis. Example 10.1: Consider the process model and controller used for the water heater of Examples 9.5 and 9.9. The controller was tuned with N = 15, λ = 1 and the nominal model Pn (z) =

0.095z −1z −dn 0.095z −dn = . z − 0.905 1 − 0.905z −1

Two different dead times, dn = 2 and dn = 20, were considered. In this case A(z) = 1 − az −1 and the general expression for Fj (z −1 ) is easy to compute recursively giving Fj (z −1 ) = [1 + a + a2 + . . . + aj ] − [a + a2 + . . . + aj ]z −1 ,

and Fr (z) is obtained by substituting Fj (z −1 ) in Equation (10.3). The magnitude of Fr (z) is shown in Fig. 10.2a for dn = 2 and dn = 20. As can be seen, Fr (z) is a high pass filter and, as dn increases | Fr (ω) | increases, principally at medium and high frequencies, causing a lower dP (ω). This explains why in Example 9.9 (i) the GPC could not maintain closed-loop stability for dn = 20 when a 10% error in the estimation of d was considered (two samples); (ii) the closed-loop was stable for a 100% dead-time-estimation error in the case dn = 2. Figure 10.2b shows the magnitude of dP (ω) for both cases and the modelling error for ∆d = 2 | δP (jω) |=| e−2jω − 1 |

∀ω ∈ [0, π],

which is the same for the two cases, as it does not depend on the nominal dead time. As can be seen, dP (ω) with dn = 20 is smaller than dP (ω) with dn = 2 for all frequencies. This result is not only valid for this particular example (see Exercise 10.1). In fact, this characteristic is also valid for other cases as will be analysed in the following section. 10.1.1 Analysis of Fr The condition

| Fr (ejω ) |> 1

∀ω ∈ [0, π]

cannot be proved analytically for a general process but is illustrated for some important cases. In most cases, it is possible to verify the condition | Fr (ejω ) |> 1 for ω ∈ [ω0 , π], ω0 > 0, when ω0 is always smaller than the minimal frequency where the modelling errors caused by the dead time are important.

312

10 Robust Predictive Control of Dead-time Processes

magnitude

|Fr| (dn=2) |Fr| (dn=20)

0

10

−2

magnitude

10

−1

0

10

10

0

10

dP (d =2) n

dP (d =20) n

−1

10

|δ P| −2

10

−1

0

10

10 frequency

Fig. 10.2. Magnitude of Fr (z), dP (ω) and modelling error for Example 10.1

Typical process models are •



k(1+βs)e−Ls 1+α1 s+α2 s2 N (s)e−Ls (1+sT )n ,

a second-order model with a dead time: P (s) = a high-order model with a dead time: P (s) =

where k, β, α1 , α2 , L are real, n is an integer and N (s) a real polynomial of degree m < n. The second-order model will normally be used when the plant has an oscillatory open-loop time response or when nonminimum phase behaviour has to be modelled. Even if the real plant has more complex dynamics, the nominal plant (for the purpose of tuning the controller) is represented by one of the previous models. Notice that this is a normal procedure in the process industry [54]. Furthermore, it is assumed that sampling time Ts is chosen in such a way that (i) it verifies the condition stated in Chap. 8, Ts < ∆Lmax , in order to have a negligible modelling error caused by discretisation, and (ii) the poles of the model have a positive real part, avoiding the ringing effect. Moreover, a zero-order holder based discretisation method is used to compute model Pn (z). | Fr (ejω ) | is analysed for the three different cases, considering two different values of the dead time in each example. One case is presented in detail in this section and the other two cases are suggested as Exercises 10.2 and 10.3.

10.1 Robustness Analysis of the Basic GPC

313

Example 10.2: Robustness analysis for a second-order nonminimum phase model. Consider the model P (s) =

e−Ls (−1.5s + 1) (s + 1)(3s + 1)

and a sampling time Ts = 0.1. The corresponding discrete model is P (z) = The MATLAB function

z −dn (−0.0452z −1 + 0.0483z −2) . 1 − 1.8721z −1 + 0.8752z −2

[numpd,denpd,dn,na,nb] = discretisation(numc,denc,L,Ts) can be used for this purpose. L can assume two different values: L = 1 and L = 2, thus, for L = 1, dn = 10 and for L = 2, dn = 20. Polynomials A(z −1 ) and B(z −1 ) are given by A(z −1 ) = 1 − 1.8721z −1 + 0.8752z −2, B(z −1 ) = −0.0452z −1 + 0.0483z −2.

The robustness analysis is made in five steps: • •

• • •

Step 1: Solve the Diophantine equation for i = 1 to dn to obtain Fi (z −1 ). Step 2: Tune the GPC. In this example N = 15, λ = 0.5 are chosen. Compute the primary controller C(z −1 ) and coefficients lyi for i = 1 . . . na + 1. In this example na = 2 and the values obtained are ly1 = 26.2190, ly2 = −43.1921, ly3 = 18.2277.

Step 3: Compute Fr (z −1 ) using Equation (10.3). Step 4: Compute dP (ω). Step 5: Analyse | Fr (jω) | and dP (ω) in the frequency domain.

The MATLAB code for steps 1-3 is:

MATLAB code to compute Fr (z) % data for case L = 1 N=15;lambda=0.5;delta=1; A=[1 -1.8721 0.8752];B=[0 -0.0452 0.0483];dn=10; % Solves the diophantine equation [E,F] = diophantine(A,dn,0); % Computes C(z) and F(z) [numF,denF,numC,denC]= gpc2dof(A,B,dn,N,Nu,lambda,delta); % computes the lyi coefficients for i=1:na+1 ly(i)=numC(i); end; % computes the denominator and numerator of filter Fr Df=numC(1:na+1); Nf=ly(1)*F(dn,:); for i=2:na+1 Nf=Nf+ly(i)*F(dn-i+1,:); end

314

10 Robust Predictive Control of Dead-time Processes 1

10

|Fr| (L=1) magnitude

|Fr| (L=2)

0

10

−2

10

−1

0

10

10

magnitude

dP (L=1) dP (L=2) 0

10

−1

10

−2

10

−1

0

10

10 frequency

Fig. 10.3. Magnitude of Fr (z) and dP (ω) for L = 1 (solid lines) and for L = 2 (dashed lines)

The file that computes the whole example can be downloaded from the book website. Figure 10.3 shows the magnitude of | Fr (ω) | and dP (ω) for L = 1 (solid lines) and for L = 2 (dashed lines). As can be seen, | Fr (ω) |> 1 for all frequencies in both cases but has higher values for the case of a higher dead time. In consequence, the robustness is worse for case L = 2. This analysis allows the simulation results obtained in the comparative study of the DTC and the GPC in Chap. 9 to be justified. This comparison is performed analytically in the next section. 10.1.2 Comparative Analysis Between GPC and SP Consider that the GPC and a 2DOF discrete SP (2DOF-DSP) are represented by the block diagram of Fig. 10.1 where, for the 2DOF-DSP, Fr (z) = 1. Also consider that the primary controller (given by F (z) and C(z)) in the GPC structure is the same as in the 2DOF-DSP structure. This can be done by first computing the GPC equivalent controller and then tuning the primary controller of the 2DOF-DSP with the obtained values. With this choice, the GPC and the 2DOF-DSP have the same set-point nominal performance because the nominal transfer function between the reference and the output is independent of Fr (z)

10.1 Robustness Analysis of the Basic GPC

Hr (z) =

315

F (z)C(z)Gn (z)z −dn 1 + C(z)Gn (z)

and it is the same for both controllers. dP (ω) can be computed as dP (ω) =

| 1 + C(z)Gn (z) | , | C(z)Gn (z)Fr (z) |

z = ejω

∀ω ∈ [0, π].

Thus, the robustness of the GPC (defined by dPGPC (ω)) and of the 2DOFDSP (defined by dPSP (ω)) can be compared for the same choice of C(z) and F (z) dPSP (ω) ∀ω ∈ [0, π]. (10.4) dPGPC (ω) = | Fr (ejω ) |

On the other hand, the disturbance rejection transfer function Hq (z) is Fr (z) dependent

 Fr (z)C(z)Gn (z)z −dn Hq (z) = Gn (z)z −dn 1 − . 1 + C(z)Gn (z)

This implies, as in the DTC analysis of Chaps. 5 to 8, that when the disturbance rejection response is improved robustness is deteriorated and vice versa. Thus, the polynomial Fr (z) can be used to compare the robust stability and disturbance rejection properties of each closed-loop system. Note that when | Fr (ω) |> 1, the GPC is less robust than the 2DOF-SP and that the robustness of the 2DOF-SP does not depend on the value of the model dead time. In general, if for a given Gn (z) and dn the 2DOF-SP is more robust than the GPC, then it will also be more robust for all models having the same Gn (z) and greater dead times. Note that in the tuning procedure of the GPC, dn does not affect the computation of the primary controller, so for a given N , λ and δ the GPC will lose the stability easily for greater values of the dead time and the same values of the uncertainties. This result explains the simulations of Chap. 9 and shows that a simple Smith predictor structure can obtain a better compromise between robustness and performance than a controller based on the optimal predictor. This result is equivalent to the one obtained in the LQG/LTR problem where, in general, the best closed-loop robust behaviour cannot be obtained using an optimal state estimator and the Kalman filter has to be detuned in order to increase robustness. Here, the Smith predictor allows better closedloop robust conditions, although the open-loop output prediction is not optimal. The following example illustrates the results of this section. Example 10.3: Figure 10.4 shows a scheme of the film press stage in paper production. The transfer function between the press actuator and the meae−Ls sure of the paper thickness is given by P (s) = (1+s) 3 . The dead time de-

316

10 Robust Predictive Control of Dead-time Processes PRESS REEL

DRYING SECTION

STEAM

Fig. 10.4. Film press stage in paper production

pends on the speed of the machine; for the maximum speed the dead time is L1 = 0.4 and for the minimum speed the dead time is L2 = 5. The GPC is tuned with N = 15, λ = 0.5 and a sampling time Ts = 0.2. The nominal model is A(z) = 1 − 2.4562z −1 + 2.011z −2 − 0.5488z −3, B(z) = 0.0011 + 0.004z −1 + 0.0009z −2. The nominal dead time for case 1 is dn1 = 2 and for case 2 dn2 = 25. The dead-time-estimation error is considered as ∆L = 0.2 (∆d = 1) for both cases. An SP is tuned using the same primary controller as in GPC. Figure 10.5 shows the simulation results for case 1 for a change in the set-point from 0 to 0.5 at t = 30 samples and a 0.5 step input disturbance applied at t = 100 samples. The real dead time is d = 3. Note that the closed-loop performance of the GPC and the SP is similar. In the second simulation (dn = 25 and d = 26) the closed-loop performance of the SP is similar to the previous case but the closed-loop system with the GPC becomes unstable. These results can be explained by analysing the robustness of the controllers and the modelling error. Figure 10.6 shows the magnitude of Fr (ω) and dP (ω) for dn = 2 and for dn = 25. Also, the modelling error for ∆d = 1 is shown. Note that for dn = 25, dP (ω) 1 for medium and high frequencies; (ii) the robustness index is smaller for the case L = 5; (iii) | Fr (ω) |< 1 for low frequencies for the case L = 5. −Ls

e 10.3. For the process P (s) = (1+2s) 4 , tune a GPC with N = 15, λ = 10 and a sampling time Ts = 0.5. L can take two different values: L = 4 and L = 15. Compute | Fr (ω) | and dP (ω) for L = 4 and for L = 15. Show that | Fr (ω) |> 1 for all frequencies and the robustness index is smaller for the case L = 15.

10.4. Consider the two cases studied in Exercises 10.2 and 10.3. Try to improve the controller robustness using different values of λ and N . 10.5. Consider the same process and GPC as in Exercise 10.2 for L = 1 for a 20% dead-time-estimation error. Using the primary controller of the GPC compute a discrete SP. Perform a robustness analysis, computing dP (ω) for the GPC and SP and comparing to the modelling error. Simulate the closedloop system using L = 1 and L = 1.2 for the process dead time. Compare the performance of the two controllers and confirm the conclusions of the robustness analysis. 10.6. Consider the same process and GPC as in Exercise 10.3 for L = 15 and a 15% dead-time-estimation error. Repeat the analysis of Exercise 10.5. 10.7. Using the same model as in Exercise 10.1 and a T -polynomial T (z −1 ) = 1 − at z −1 , analyse the effect of at on the controller coefficients lyi . Simulate some cases using different values of at . 10.8. Compute the relationships between the block diagrams in Figs. 10.7 and 9.4.

10.7 Exercises

341

1 10.9. Consider the process P (s) = s+1 e−2s and the GPC tuning with Ts = 0.1, λ = 1 and N = Nu = 15. Consider the T -polynomial T (z −1 ) = (1 − 0.8z −1 )n . Show that the robustness index of the controller increases when n changes from 1 to 2 but decreases when n changes from 2 to 3.

10.10. Compute the transfer function between the disturbance and the output for the GPC with the Q-parametrisation and for the filtered discrete SP. Compare the two expressions. Which is the Qp (z −1 ) that must be used to achieve the same transfer function in the two cases? −td s

k0 e 10.11. For the process P (s) = 1+k 2 it is assumed that k0 , k1 , k2 and td 1 s+k2 s can vary, respectively, in the following intervals (4.4, 5.7), (3.5, 4.6), (4.5, 5.5) and (0.8, 1.2). The model used in the predictor is given by the discretisation of the nominal plant with k0 = 5, k1 = 4, k2 = 5 and td = 1. The parameters of the GPC controller are chosen as N = 15, δ = 1, λ = 3. Tune a PID controller and a DTC using the results in Chaps. 4 and 5. Compare with the GPC solution. Analyse the case when the real plant has the following parameters: k0 = 5.61, k1 = 3.6, k2 = 4.68 and td = 1.2. 1 e−5s and the GPC tuning with 10.12. Consider the process P (s) = s+1 Ts = 0.2, λ = 1 and N = Nu = 10. Consider a 20% dead-time-estimation error and a 10% gain-estimation error. Compute the modelling error and tune the robustness filter of the DTC-GPC. Show that the robustness index of the controller increases when the order of the filter increase.

10.13. Repeat the previous exercise for the unstable process P (s) =

1 −s . s−1 e

11 Multivariable Dead-time Compensation

This chapter presents the control of processes with multiple inputs and outputs and multiple dead times. It introduces the multivariable dead-time compensation by extending the ideas presented in Chaps. 5 to 7. Some basic concepts of multivariable control needed to understand parts of this chapter are described here. The reader is referred to other textbooks where these concepts are described in more depth.

11.1 Introduction Most industrial plants have many variables that have to be controlled (plant outputs or controlled variables) and many variables to control the plant behaviour (plant inputs or manipulated variables). If one manipulated variable only affects the corresponding controlled variable, the input−output relationship can be considered as a single-input−single-output (SISO) plant. In this case, the control design can be made using a SISO controller. In many cases, when one of the manipulated variables changes, it not only affects the corresponding controlled variable but also upsets the other controlled variables. These interactions between process variables may result in poor performance of the control process or even in instability. When the interactions are not negligible, the plant must be considered to be a process with multiple inputs and outputs (MIMO) instead of a set of SISO processes. MIMO models and MIMO design control methods must be used to improve the closed-loop performance of the process. There is a great variety of processes whose dynamics can be adequately represented by multivariable transfer functions having dead times. Some important processes in this category are distillation columns, extraction and absorption processes, heat exchangers, reactors, dryers, etc. The control problems associated with MIMO systems with dead times are more difficult than in the SISO case because interaction effects are added to

344

11 Multivariable Dead-time Compensation

dead-time effects and impose harder limits on the performance of the closedloop system. To approach the control of dead-time MIMO processes, an extension of DTC and MPC studied in Chaps. 5 to 10 can be used. This chapter introduces the compensation of multidelayed processes using continuous MIMO dead-time compensators, while the MPC approach is studied in the following chapters. First, in the next section, some basic concepts of MIMO systems are introduced. Then, the analysis and design of the MIMO-DTC is presented, from the simplest single dead-time case to the general multideadtime system. Several examples are used to illustrate the results.

11.2 Basic Concepts and Notation For the analysis of MIMO systems the process will be represented by an n×m matrix transfer function P(s) Y(s) = P(s)U(s), where U(s) is an m×1 vector and Y(s) is an n×1 vector. U(s) and Y(s) are the Laplace transform of the inputs u(t) and outputs y(t) vectors, respectively. Each element of P(s) is a SISO proper transfer function pij (s) given by

pij (s) = gij (s)e−Lij s =

Npij (s)e−Lij s , Dpij (s)

i = 1, 2, ..., n; j = 1, 2, ..., m.

That is, each SISO input−output relationship is represented using the concepts introduced in Chap. 2. This is not the most general form of describing a MIMO system with dead times, however, in normal engineering practice, the usual model procedure is to carry out input and output measurements to obtain an approximate model of the process in the transfer function form [1]. It is considered that P(s) is strictly proper and causal, that is, all pij (s) are strictly proper and causal [70]. Furthermore • •

the poles of P(s) are the roots of the polynomial π(s), where π(s) is the least common denominator of all nonidentically zero minors of all orders of P(s); and the zeros of P(s) are the roots of the polynomial ξ(s), where ξ(s) the greatest common divisor of the numerators of all order-r-minors of P(s), where r is the normal rank of P(s), provided that these minors have the same denominator π(s).

Note that MIMO systems can have poles and zeros at the same locations. Using these definitions, a MIMO system is stable if all roots of π(s) are in the open left half s-plane.

11.3 Closed-loop MIMO Relationships

Example 11.1: Consider the process ⎡ ⎢ P(s) = ⎢ ⎣

1 1+2s

0.5 1+2s

2 −1 1+10s 1+5s

345



⎥ ⎥. ⎦

The minors of order 1 are the elements themselves and the minor of order 2 is 1 −2 − 15s −1 2 0.5 = . − 1 + 2s 1 + 5s 1 + 2s 1 + 10s (1 + 2s)(1 + 5s)(1 + 10s) Thus, the least common denominator is π(s) = (1 + 2s)(1 + 5s)(1 + 10s) and the poles are s = −1/2, s = −1/10 and s = −1/5. The normal rank of P(s) is 2. Thus, to compute the zeros, the numerators of the minors of order 2 must be used. In this case, the only minor of order 2 has a numerator ξ(s) = −2 − 15s. thus, the zero of P(s) is s = −2/15, although none of the elements of P(s) have a zero. The interpretation of the MIMO zero is similar to the SISO case. A SISO transfer function is zero at the value of the zero s = z0 . In the MIMO case there is a direction v in the space of inputs such that for the value of the zero P(s = z0 )v = 0. In the example the direction is given by the vector v = [1 − 2]T . The dead time of the MIMO system cannot be defined as in the SISO case because, in general, the elements of the i row of P(s) have different dead times. Note that for the i-output yi (t) = gi1 (s)u1 (t − Li1 ) + gi2 (s)u2 (t − Li2 ) + .... + gim (s)um (t − Lim ) (11.1) different dead times relate the m inputs to the output. However, an effective dead time of the i-output can be computed considering the minimal dead time Li = min(Lij ) of the i-output, that is, the j

smallest of the Lij for j = 1, ..., m. Note that, if a step signal is applied simultaneously in all the inputs, the output will only change after Li seconds.

11.3 Closed-loop MIMO Relationships A basic closed-loop MIMO system is shown in Fig. 11.1. In this block diagram, Pq (s) represents the relationship between the disturbances and the

346

11 Multivariable Dead-time Compensation q( t )

P q(s) e (t)

+

r( t )

F (s)

+

u( t )

C (s)

P(s)

_

y( t )

+

Fig. 11.1. MIMO representation of the control system

output, C(s) is a MIMO cascade controller and F(s) is a MIMO reference filter. The signal relationships are Y(s) = P(s)U(s) + Pq (s)Q(s), U(s) = C(s)E(s), E(s) = [F(s)R(s) − Y(s)], where Q(s) is an mq × 1 vector and E(s) is an n × 1 vector. Q(s) and E(s) are the Laplace transforms of the disturbance vector q(t) and the error vector e(t), respectively. From now on it is considered that the system has the same number of inputs and outputs (m = n). This simplifies the analysis of the closed-loop system. Note that in practice in most cases, the number of inputs and outputs in a feedback control scheme are equal [1]. The case of dead-time compensation of MIMO nonsquare systems with multiple time delays is analysed in [108]. Operating with these equations, the closed-loop relationships can be obtained (the dependence on s is omitted for clarity) Y = PC E + Pq Q, Y = PC(FR − Y) + Pq Q, (I + PC)Y = PCFR + Pq Q, Y = (I + PC)−1 PCFR + (I + PC)−1 Pq Q, Using the same procedure U = C(I + PC)−1 FR − C(I + PC)−1 Pq Q.

11.3 Closed-loop MIMO Relationships

347

It must be noted that, if (I + PC)−1 exists, equivalent expressions can be obtained using the equalities (I + PC)−1 PC = PC(I + PC)−1 , C(I + PC)−1 = (I + CP)−1 C, I − (I + PC)−1 PC = (I + PC)−1 , which can be used to simplify the closed-loop relationships of the system. The closed-loop system is considered internally stable if all four matrix transfer functions (I + PC)−1 PCF, C(I + PC)−1 F,

(I + PC)−1 Pq , C(I + PC)−1 Pq

are stable. As in the SISO case, if P(s), F(s), C(s) and Pq (s) are stable the condition for the internal stability is that the solutions of the equation Ec (s) = det(I + P(s)C(s)) = 0 are all in the open left half s-plane. This equation is the characteristic equation of the MIMO system [70]. As can be seen, the previous results are conceptually the same as the stability conditions imposed for the SISO case. However, the computation and tuning of the controllers is difficult, especially when the process exhibits dead time. The following example illustrates this problem (see Exercise 11.1). Example 11.2: Consider the same process as in Example 11.1 with a dead time in each gij (s) ⎤ e−s 0.5e−2s ⎢ 1 + 2s 1 + 2s ⎥ ⎢ ⎥ ⎢ ⎥ P(s) = ⎢ ⎥. ⎢ ⎥ ⎣ 2e−1.5s −e−s ⎦ ⎡

1 + 10s 1 + 5s

Assume that Q(s) = 0 and a simple diagonal proportional controller

 k1 0 C(s) = 0 k2 is used together with a filter F(s) = I. Thus, the closed-loop system is represented by Y = (I + PC)−1 PCR, where

348

11 Multivariable Dead-time Compensation

⎤ k1 e−s 0.5k2 e−2s 1 + ⎢ 1 + 2s 1 + 2s ⎥ ⎢ ⎥ ⎥ ⎢ I + PC = ⎢ ⎥, ⎢ ⎥ ⎣ 2k e−1.5s −s ⎦ k2 e 1 1− 1 + 10s 1 + 5s and the characteristic equation is ⎡

    0.5k2 e−2s 2k1 e−1.5s k1 e−s k2 e−s Ec (s) = 1 + 1− − = 0. 1 + 2s 1 + 5s 1 + 2s 1 + 10s The final closed-loop matrix transfer function is given by k2 e−s −0.5k2 e−2s 1 − ⎢ 1 + 5s 1 + 2s 1 ⎢ ⎢ (I + PC)−1 PC = ⎢ Ec (s) ⎢ ⎣ −2k1 e−1.5s k1 e−s 1+ 1 + 10s 1 + 2s ⎡

k1 e−s 1 + 2s

⎤⎡ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎦⎣

2k1 e−1.5s 1 + 10s

⎤ 0.5k2 e−2s 1 + 2s ⎥ ⎥ ⎥ ⎥. ⎥ ⎦ k2 e−s 1 + 5s

Note that the dead time of one loop affects the stability of the other and this complicates the controller design. Thus, the use of a MIMO dead-timecompensator controller (MIMO-DTC) can, in this case, offer an additional advantage: The elimination of the dead time from the loop interaction. The next section analyses the design of this type of controller.

11.4 Multivariable Dead-time Compensators The analysis of the control of MIMO processes with dead time is first analysed for the simplest single-dead-time case (i.e. equal dead time for all transfer matrix entries) and then generalised. For clarity, all the illustrative examples and analytical computations of this section are derived for a 2 × 2 matrix transfer function and consider a simple diagonal PID primary controller. 11.4.1 The Single Dead-time Case Consider that the stable process is such that the elements of P(s) are pij (s) = gij (s)e−Ls , where L is the single dead time. In this case P(s) can be represented by P(s) = e−Ls G(s) = G(s)e−Ls , where G(s) is the fast model of the plant with elements gij (s). For this case, the simple MIMO-DTC shown in Fig. 11.2 is proposed. In

11.4 Multivariable Dead-time Compensators

349

q( t )

P q(s) +

+

r( t )

F (s)

u( t )

C (s) _

P(s)

y( t )

+

G n(s)- P n(s)

yp( t )

+

+

Fig. 11.2. MIMO representation of the DTC for processes with a single dead time

this structure C(s) is the MIMO primary controller, F(s) is a matrix reference filter, and Pn (s) = Gn (s)e−Ln s is the model of the process. Assuming that the model is perfect, the predicted signal Yp (s) is given by Yp = PU + Pq Q + GU − PU = Pq Q + GU,

(11.2)

Yp = Pq Q + GU = Pq Q + GC(FR − Yp ), (I + GC)Yp = Pq Q + GCFR, Yp = (I + GC)−1 Pq Q + (I + GC)−1 GCFR. Now using Y = Pq Q + PU = Pq Q + PC(FR − Yp ) gives Y = Pq Q + PCFR − PC[(I + GC)−1 Pq Q + (I + GC)−1 GCFR], and using

I − (I + GC)−1 GC = (I + GC)−1 ,

the relationship between the inputs and outputs is given by Y = PC(I + GC)−1 FR + [I − PC(I + GC)−1 ]Pq Q

(11.3)

or equivalent by Y = GC(I + GC)−1 FRe−Ls + [I − GC(I + GC)−1 e−Ls ]Pq Q,

(11.4)

which has the same form as in the SISO case. Note that the most important properties of the SISO SP are maintained in this structure. Consider the nominal case and that F = I; note that the filter does not affect the predictions or the closed-loop stability.

350



11 Multivariable Dead-time Compensation

Property 1: Dead-time-free characteristic equation The controller eliminates the dead time from the closed-loop characteristic equation. Note that there is no dead time in det(I + GC) = 0.



Property 2: Output prediction For changes in the set-point, the feedback signal yp (t) produced by the predictor anticipates the system output. Note that from Equation (11.2) when Q = 0 Yp = GU = eLs PU = eLs Y, thus yp (t) = y(t + L).



Property 3: Ideal decoupled dynamic compensation The controller factorises the plant into two parts: G that is invertible and Ie−Ls that is the non-invertible part due to the dead time P = GIe−Ls . Furthermore, as the primary controller approaches the ideal solution with infinite gains GC(I + GC)−1 e−Ls → GC(GC)−1 e−Ls = Ie−Ls , the closed-loop relationship between the reference and the output in Equation (11.3) is given by Y = Re−Ls ,

(11.5)

that is yi (t) = ri (t − L),

i = 1, 2, . . . , n.

All the drawbacks of the SP are also present for the MIMO case as will be analysed later in this chapter. The following example illustrates the use of the MIMO-SP (see Exercises 11.2 and 11.3). Example 11.3: Consider the same process as in Example 11.1 with a single dead time L = 5 ⎡ 1 0.5 ⎤ 1+2s

P(s) = e

−5s

⎢ ⎢ ⎣

1+2s

2 −1 1+10s 1+5s

⎥ ⎥. ⎦

If the model is equal to the process and the same proportional controller as in Example 11.2 is used, the characteristic equation is the determinant of

11.4 Multivariable Dead-time Compensators

k1 ⎢ 1 + 1 + 2s ⎢ ⎢ I + GC = ⎢ ⎢ ⎣ 2k

0.5k2 1 + 2s



1

1 + 10s

1−

k2 1 + 5s

351



⎥ ⎥ ⎥ ⎥, ⎥ ⎦

which has no dead times. If very high gains are used, it is possible to approximate I + GC with GC to obtain a closed-loop given by Y = PC(I + GC)−1 FR ∼ = PC(GC)−1 R = e−Ls GCC−1 G−1 R = e−Ls I R. That is



⎢ Y(s) = ⎢ ⎣

e−5s

0

0 e−5s



⎥ ⎥ R(s), ⎦

which is, a decoupled closed-loop system with a simple dead time in each element of the diagonal. In general, the dead times of the elements of P(s) are different and a more complex solution must be used. This multiple dead-time case is analysed in the following. 11.4.2 Multiple Dead-time Case: The Simplest Solution The same control structure as in the previous section can be used to extend the solution for the general multiple dead-time case. Even in the case where each pij (s) has a different dead time, the same fast model G can be used to eliminate the dead times from the closed-loop characteristic equation. In this case the nominal closed-loop equation is the same as in the previous case Y = PC(I + GC)−1 FR + [I − PC(I + GC)−1 ]Pq Q.

(11.6)

Thus, the characteristic equation has no dead times. However, the other two properties of the SP are no longer valid. For the output prediction property, the feedback signal yp is given for the i-output by ypi (t) = gi1 u1 (t) + gi2 u2 (t) + .... + gim um (t),

(11.7)

which is different from the predicted value of the output yi (t + Li ) because, in general, the elements of the i row of P(s) have different dead times. Note that ypi (t) = yi (t + Li ) only if Lij = Li for all j. If a dead-time matrix L is defined with elements e−Lij , the plant model Pn cannot be computed as LGn or Gn L. Note that if an ideal controller with high gains is used and the reference filter is F = I, the closed-loop relationship between Y(s) and R(s) is again:

352

11 Multivariable Dead-time Compensation

Y = PG−1 R = LR,

(11.8)

that is, the obtained solution has coupling effects between the different outputs and also: yi (t) = ri (t − Li ). Thus, ideal decoupled dynamic compensation is not fulfilled either. In spite of this, the MIMO-DTC computed with this fast model allows higher gains of the primary controller and better closed-loop performance than when it is not included in the controller. The following example illustrates this situation. Example 11.4: Consider a 2 × 2 generic stable model P(s) with elements pij (s) = gij (s)e−Lij s , −1

For this case G plicity)

i = 1, 2,

j = 1, 2.

(s) is given by (the dependence on s is not written for simG−1 =



1 ⎣ Dtg

g22 −g12 −g21 g11

⎤ ⎦

(Dtg = g11 g22 − g12 g21 ) and the final ideal closed-loop transfer function is PG−1

PG−1

⎡ ⎤ g e−L11 s g12 e−L12 s 1 ⎣ 11 ⎦ g22 = g11 Dtg −L21 s −L22 s g21 e g22 e

⎡ g g e−L11 s − g21 g12 e−L12 s 1 ⎣ 22 11 = Dtg g22 g21 e−L21 s − g21 g22 e−L22 s

 − g12 , − g21

− g11 g12 e−L11 s + g11 g12 e−L12 s g21 g12 e−L21 s − g11 g22 e−L22 s



⎦.

Note that the final ideal closed-loop relationships are coupled and also that yi (t) cannot be computed as the delayed reference, as in the case of a single dead time. To show that even with these two drawbacks the MIMO-DTC is useful, consider the distillation column shown in Fig. 11.3. The model was derived by Wood and Berry [136] and is given by ⎤ 12.8e−s −18.9e−3s ⎢ 1 + 16.7s 1 + 21s ⎥ ⎥ ⎢ P(s) = ⎢ ⎥, ⎣ 6.6e−7s −19.4e−3s ⎦ 1 + 10.9s 1 + 14.4s ⎡

⎤ 3.8e−8.1s ⎢ 1 + 14.9s ⎥ ⎥ ⎢ Pq (s) = ⎢ ⎥, ⎣ 4.9e−3.4s ⎦ 1 + 13.2s ⎡

where y(s) = P(s)u + Pq (s)q, y = (y1 y2 )T and u = (u1 u2 )T . The manipulated variables are the reflux flow rate (u1 ) and the reboiler steam flow rate (u2 ). The controlled variables are the overhead and bottom product

11.4 Multivariable Dead-time Compensators

353

cooling water LC

reflux overhead y1

CC

u1 feed ( q )

Steam u2

bottom

y2

CC

Fig. 11.3. Water-methanol distillation column

mole fraction methanol (y1 and y2 , respectively). The disturbance is the feed flow rate (q). The fast model is designed as ⎤ ⎡ 12.8 −18.9 ⎢ 1 + 16.7s 1 + 21s ⎥ ⎥ ⎢ G(s) = ⎢ ⎥, ⎣ −19.4 ⎦ 6.6 1 + 10.9s 1 + 14.4s and the primary controller is a diagonal matrix of PIs ⎤ ⎡ k1 (1+T1 s) 0 T1 s ⎥ ⎢ C(s) = ⎣ ⎦. k2 (1+T2 s) 0 T2 s

The tuning of the PIs is based on the SISO ideas presented in Chap. 5. Integral time Ti is chosen equal to the time constant of element ii. Gain ki is chosen proportional to the inverse of the gain of element ii. Thus

xi , Kii and xi is tuned by simulations. The chosen values for the PIs in the MIMODTC are Ti = Tii ,

k1 = 0.62,

T1 = 16.7,

while in the diagonal PI controller

ki =

k2 = −0.41,

T2 = 14.4,

354

11 Multivariable Dead-time Compensation

output

0.5

0 y (MIM0−DTC) y (MIM0−PI)

−0.5 0

20

40

60

80

100

120

140

180

200

u (MIM0−DTC) u (MIM0−PI)

0.4 control action

160

0.3 0.2 0.1 0 −0.1 0

20

40

60

80

100 time

120

140

160

180

200

Fig. 11.4. Plant output and control action for the multivariable PI controller and for the MIMO-DTC for Example 11.4. Set-points shown by dashed-dotted lines

k1 = 0.31,

T1 = 16.7,

k2 = −0.15,

T2 = 14.4.

Figure 11.4 shows the closed-loop responses for the multivariable PI controller and for the MIMO-DTC for a set-point change close to the operating point. The set-point signals are shown by dashed-dotted lines. For the simulations a change in the set-point of 0.75 mole fraction percent methanol in overhead composition is applied at t = 10 and a 0.1 feed flow rate disturbance is applied at t = 100. Note that the MIMO-DTC gives better responses than the simple MIMO-PI, allowing a faster response, less oscillations and better decoupling. However, the responses obtained can be improved if the interactions are attenuated. The previous choice of the fast model gives a dead-time-free characteristic equation that simplifies stability analysis but does not offer the best closedloop performance because of the coupling effects between the outputs. From a control point of view it is more interesting to derive a dead-time compensation structure in order to obtain a closed-loop system satisfying more than one of the SP properties. This is analysed in the following sections, first for the most favourable situation and then for the general case. 11.4.3 Multiple Dead-time Case: An Improved Fast Model From a dead-time point of view, the most favourable situation for control purposes is obtained when all the input−output pairs have been chosen with

11.4 Multivariable Dead-time Compensators

355

the minimal dead time. This implies that the effective dead time of each output, Li = min(Lij ), is equal to the dead time of the diagonal element: j

Li = min(Lij ) = Lii j

∀i, j.

Note that, using a SISO interpretation, for each output yi (t) it is possible to consider ui (t) as the control input and uj (t), j = i as a measurable disturbance. If Li = Lii , every action in ui (t) will affect yi (t) before the “disturbances”, which is the best situation according to the analysis of the feedforward action in the SISO-DTC analysed in Chap. 6. Consider the diagonal matrix of dead times L with elements e−Li in the main diagonal. Gf (s) is the fast model of the plant, having the same elements of P(s) but with different dead times (gij e−θij s ) θij = Lij − Li ,

i = 1, ..., n; j = 1, ..., n,

(11.9)

that is, Gf (s) has no dead times in its diagonal elements. Assuming that the model is perfect, that there are no disturbances and the control structure in Fig. 11.2 is used with Gn (s) = Gf (s), the relationship between the references and outputs is given by Y = P(I + Gf C)−1 CFR and

(11.10)

Yp = Gf U = L−1 PU = L−1 Y.

Thus, the predictions ypi are given by ypi (t) = yi (t + Li ),

i = 1, ..., n,

(11.11)

and thus, yi (t) gives the prediction of the i-output in t + Li , verifying the output prediction property. Note that Gf is not dead-time free so it is clear that the new characteristic equation has dead times (property 1 is not valid for this general case). This seems to be a drawback but, as will be shown later in the examples, this choice can improve controller performance. The analysis of the ideal decoupled dynamic compensation is made, as in the single dead-time case, using the ideal controller concept. Suppose that a primary controller with very high gains is allowed. Thus (I + Gf C)−1 C → (Gf C)−1 C = Gf −1 ,

(11.12)

which gives an ideal set-point response Y = P(Gf )−1 R = LGf (Gf )−1 R = LR.

(11.13)

Note that this is the best achievable response, a pure minimal dead-time response for each input−output relationship. In practice (Gf )−1 cannot be

356

11 Multivariable Dead-time Compensation

proper or cannot be computed because of right half plane zeros. Here, these problems are not taken into account, only dead times are considered as the noninvertible part of the model. Thus, the proposed fast model allows the output prediction property and the ideal dynamic compensation property of the SP to be extended to the MIMO case. A 2×2 plant is used in the next example to illustrate this solution and to compare it with the previous case. Example 11.5: Consider the distillation column model in Example 11.4. This model verifies the condition Li = Lii . Thus, using the procedure proposed, the fast model is designed as ⎤ −18.9e−2s 12.8 ⎢ 1 + 16.7s 1 + 21s ⎥ ⎥ ⎢ Gf (s) = ⎢ ⎥. ⎣ 6.6e−4s −19.4 ⎦ 1 + 10.9s 1 + 14.4s ⎡

The PIs are tuned as in the Example 11.4 but using higher gains to show the decoupling effect. This controller, called MIMO-DTC2, is compared to the previous solution, called MIMO-DTC1, which uses the same PIs. The final values for the PIs in the MIMO-DTCs are k1 = 1.17,

T1 = 16.7,

k2 = −0.77,

T2 = 14.4.

Figure 11.5 shows the closed-loop responses for the MIMO-DTC2 (solid lines) and for the MIMO-DTC1 (dashed lines) for a step change close to the operating point. The reference signals are shown by dashed-dotted lines. For the simulations, a change in the set-point of 0.75 in y1 is applied at t = 5 and a change in the set-point of 0.2 in y2 is applied at t = 30. Note that the MIMODTC2 gives better responses than the MIMO-DTC1, allowing a slightly faster response but a much better decoupling. The differences between these two cases are more evident if the dead times and the difference between the dead times in one row increases. If the same process is considered with response L11 = 11,

L12 = 23,

L21 = 17, L22 = 13,

and the same tunings of the PIs are used, the MIMO-DTC2 maintains good performance, while the MIMO-DTC1 has poor closed-loop behaviour. Figure 11.6 shows the closed-loop responses for the MIMO-DTC2 (solid lines) and for the MIMO-DTC1 (dashed lines) for the same change in the set-point in y1 as in the previous case. These differences in the responses are due to the better prediction signal yp generated by the fast model Gf that allows each output to follow the delayed reference. The MATLAB code for the longdead-time case of the example is:

11.4 Multivariable Dead-time Compensators

357

output

0.5

0 y (MIM0−DTC2) y (MIM0−DTC1)

−0.5 0

10

20

30

40

60

u (MIM0−DTC2) u (MIM0−DTC1)

0.8 control action

50

0.6 0.4 0.2 0 −0.2 0

10

20

30 time

40

50

60

Fig. 11.5. Plant output and control action for MIMO-DTC2 and MIMO-DTC1 in Example 11.5. Set-points shown by dashed-dotted lines MATLAB code for the tuning in Example 11.5 % process P K11=13.5;K12=-18.9;K21=6.6;K22=-19.4;T11=16.7;T12=21; T21=10.9;T22=14.4;L11=11;L12=23;L21=17;L22=13; % process Pq Kp1=3.8;Kp2=4.9;Tp1=14.9;Tp2=13.2;Lp1=8.1;Lp2=3.4; % model Km11=12.8;Km12=-18.9;Km21=6.6;Km22=-19.4;Tm11=16.7;Tm12=21; Tm21=10.9;Tm22=14.4;Lm11=11;Lm12=23;Lm21=17;Lm22=13; % fast model Gf Kf11=12.8;Kf12=-18.9;Kf21=6.6;Kf22=-19.4;Tf11=16.7;Tf12=21; Tf21=10.9;Tf22=14.4;Lf11=0;Lf12=12;Lf21=4;Lf22=0; % fast model G Kg11=12.8;Kg12=-18.9;Kg21=6.6;Kg22=-19.4;Tg11=16.7;Tg12=21; Tg21=10.9;Tg22=14.4;Lg11=0;Lg12=12;Lg21=4;Lg22=0; % PI descentralised controllers Ti1=Tm11;Ti2=Tm22;Kc1=15/Km11;Kc2=15/Km22; % Simulation sim(’columns’)

However, it is important to note that these two solutions allow, in the nominal case, high gains in the primary controller without causing instability. This is achieved because both Gf and G are invertible due to the dead time,

358

11 Multivariable Dead-time Compensation 1.5

output

1 0.5 0 −0.5

y (MIM0−DTC2) y (MIM0−DTC1)

−1 0

10

20

30

40

60

u (MIM0−DTC2) u (MIM0−DTC1)

0.8 control action

50

0.6 0.4 0.2 0 −0.2 0

10

20

30 time

40

50

60

Fig. 11.6. Plant output and control action for MIMO-DTC2 and for MIMO-DTC1 in Example 11.5 with long dead times. Set-points shown by dashed-dotted lines

i.e. the inverse has no predictions (we say that a transfer function H(s) has predictions if it has a factor eLs with L > 0 in at least one element). The ideal situation generated by the definition of Gf allows a performance bound for the achievable response with the MIMO-DTC to be defined [45]. The minimal response time to set-point changes (the lowest response bound) for P(s) is L(s) defined as a diagonal matrix with elements e−Li s . Note that it is physically impossible to obtain a better response than the one defined by L(s), that is, a set-point response that has no dynamics and only the minimal dead time of each output. In the general case, the process model cannot verify the condition Li = Lii for all i. In these cases the design procedure is more involved, as is shown in the next section. 11.4.4 The General Multiple Dead-time Case Consider a process such that the minimal dead time in each row is not in the diagonal element. Using the Gf as in the previous section P = Gf L leads to a noninvertible fast model; that is, (Gf (s))−1 has predictions. Note that in this case, at least one of the elements in the diagonal of Gf (s) has a dead time. A 2×2 plant is used in the next example to illustrate this property.

11.4 Multivariable Dead-time Compensators

359

Example 11.6: Consider a 2 × 2 fast model with elements gij e−θij . The determinant of Gf (s) is det(Gf ) = g11 e−θ11 s g22 e−θ22 s − g12 e−θ12 s g21 e−θ21 s , which has a minimal dead time θmin = min [θ21 + θ12 , θ11 + θ22 ] . Thus

⎡ ⎤ g22 e−θ22 s −g12 e−θ12 s 1 ⎣ ⎦ Gf −1 (s) = det(Gf ) −θ21 s −θ11 s −g21 e g11 e

has predictions at least in one element. Note that the dead time of each element can be computed as −θij + θmin which is a positive value for at least one element. A simple, but not always viable, solution for this case is to rearrange P (by row or column interchanges only) into a matrix with the shortest dead time in each row appearing in the main diagonal [45]. This rearrangement is called the “rearrangement test”. If P(s) satisfies the rearrangement test, then the solution is to design Gf (s) as in the previous section so as to follow the output prediction property and, automatically, the ideal decoupled dynamic compensation property. Note that this rearrangement consists in the selection of the input−output pairs (ui , yi ) in such a way that they exhibit the minimal possible dead time. If P(s) does not satisfy the rearrangement test then there are two possible solutions: • •

Design the controller to satisfy the output prediction and ideal decoupled dynamic compensation properties for all the outputs including additional dead times in the system. Design the controller to emphasise the performance of some outputs (the most important ones) at the expense of others (the less important ones).

Both solutions are based on the generalised multi-dead-time compensator (GMDC) shown in Fig. 11.7 [47]. In this structure, as in the previous case, C(s) and F(s) represent the MIMO primary controller and Pn (s) is the plant model. Gf (s) is the fast model of the plant having the same elements of P(s) but with different dead times (gij e−θij s ). However, in this new controller a new block has been added, D(s), which is a diagonal matrix with elements e−Di s . The design of D(s) and Gf (s) depends on the desired objectives, as is analysed in the following section.

360

11 Multivariable Dead-time Compensation

q (t) P q (s) r (t)

F (s)

u( t)

+ _

C (s)

+

D(s)

P(s)

y (t)

+

G f(s)- P n (s)D(s) y p (t)

+ +

(a)

q (t)

C '(s) r (t) F (s)

+ + _

_

C (s)

D(s)

G f(s)

u( t)

P q (s) + +

P(s)

y (t)

P n (s)D(s) y p (t) _

+

(b) Fig. 11.7. MIMO representation of the GMDC. (a) Normal representation. (b) IMC representation

Design for the Output Prediction and Ideal Decoupled Dynamic Compensation Properties In the GMDC, D can be used to add dead times in the product PD in order to have a “new” process model that satisfies the rearrangement test. D must add the minimal possible dead time in each row in order to obtain this condition. After this operation, it is possible to compute Gf (s) following the same procedure as in the previous section but using PD instead of P PD = Ld Gf ,

(11.14)

where Ld is a diagonal matrix of dead times with elements e−Ldi s with Ldi = min(Lij + Di ). The fast model Gf (s) is then computed with elements j

gij e−θij s ,

θij = Lij − Ldi .

Thus, by including some additional dead times it is possible to obtain a closed-loop system with better decoupling characteristics. The new predicted values are

11.4 Multivariable Dead-time Compensators

ypi (t) = yi (t + Ldi )

361

i = 1, 2, ..., n.

Assuming that the model is perfect the relationship between the inputs and outputs for this new structure can be computed as in the single-dead-time case using PD instead of P and Gf instead of G (see Equation (11.3)) Y = PDC(I + Gf C)−1 FR + [I − PDC(I + Gf C)−1 ]Pq Q.

(11.15)

Considering the ideal situation of very high gains || C ||→ ∞, the relationship between R and Y is (for F = I) Y = PDGf −1 R = Ld R,

(11.16)

which is a decoupled closed-loop system. As in the previous section, it is possible to define some performance bounds for the achievable response with the GMDC [45, 47]. Note that in this case, the minimal response time to set-point changes for P(s)D(s) is the lower response bound Ld (s). Note that the dead times included by D do not deteriorate the best achievable decoupled response of the system. To understand this point, define the minimal decoupled response time to set-point changes for P that is given by the smallest delay in the rows of the diagonal matrix Lb (s) Lb (s) = P(s)(Gf (s))−1 with elements e−Lbi s where the Lbi are chosen as small as possible such that Gf (s) does not have predictions. Lb (s) is defined as the decoupling response bound of the system. In the case of PD the diagonal matrix is Ld (s) Ld (s) = P(s)D(s)(Gf (s))−1 with elements e−Ldi s where the Ldi are chosen as small as possible such that Gf −1 does not have predictions. Now, if D is chosen as a diagonal matrix with the smallest possible dead times such that PD passes the rearrangement test Ld (s) = Lb (s), which means that with this choice of D, even adding dead times to the original system, the best decoupled response of P is retained [45]. When a decoupled response is desired and the additional dead times are not large, this solution can be the most appropriate. In other cases, a different D(s) can be used, which gives the best possible solution for a defined output (or group of outputs) and allows some coupling between the others. This solution is interesting when the delays needed to extend the output prediction and ideal decoupled dynamic compensation properties are considered to be too long.

362

11 Multivariable Dead-time Compensation

Design to Improve the Performance of Some Outputs In this case, the way to tune the controller depends on the characteristics of the process and there is no unique solution for all cases. In this design, only the ideal decoupled dynamic compensation is satisfied and the output prediction property is valid only for some particular outputs. An example is presented to illustrate the procedure. Example 11.7: Consider the open-loop-stable process ⎤ ⎡ g11 e−7s g12 e−s ⎦, P(s) = ⎣ −10s −s g21 e g22 e

where the dead times are in seconds. There are several possibilities to choose Gf (s). The simplest one is obtained by factorising the minimal dead time in each row ⎡ ⎤ g11 e−6s g12 ⎦ Gf1 (s) = ⎣ −9s g21 e g22

to satisfy only the output prediction property. Note that Gf1 −1 has predictions because the determinant of Gf1 det(s) = g11 e−6s g22 − g21 e−9s g12 = [g11 g22 − g21 e−3s g12 ]e−6s

has the factor e−6s . Thus, it is not possible to increase the controller gain to decouple the closed-loop response. The second solution uses D to impose the output prediction and ideal decoupled dynamic compensation properties ⎤ ⎡ ⎤ ⎡ 1 0 g11 e−7s g12 e−7s ⎦, ⎦, PD(s) = ⎣ D(s) = ⎣ 0 e−6s g21 e−10s g22 e−7s giving



Gf2 (s) = ⎣

g11 g21 e

−3s

g12 g22



⎦,



Ld (s) = ⎣

e−7s

0

0

−7s

e



⎦,

and an ideal decoupled response with a dead time L = 7 for both outputs. In this case, the cost of the decoupled solution is the dead-time increment of six seconds in the response of y2 . If this dead-time increment is considered too high because y2 is the most important output, a coupled solution can be used computing Gf to satisfy the ideal decoupled dynamic compensation and the output prediction property for y2 only. Using D = I and

11.4 Multivariable Dead-time Compensators



Gf3 (s) = ⎣

g11 g21 e

−9s

g12 g22

363

⎤ ⎦

when the controller gain is high enough, the closed-loop system achieves the partially decoupled response Y(s) = P(s)G−1 f (s)R(s) given by g11 g22 e−7s − g21 g12 e−10s ⎢ ⎢ g11 g22 − g21 g12 e−9s P(s)G−1 f (s) = ⎣ 0 ⎡

⎤ −g11 g12 e−6s + g12 g11 g11 g22 − g21 g12 e−9s ⎥ ⎥. ⎦ −s e

Note that, in this case, the minimal possible dead time is obtained for y2 and that it is decoupled from y1 . However, this solution deteriorates the response of y1 . 11.4.5 Summary of the Design Procedure The most appropriate tuning of the MIMO-DTC depends on the characteristics of the process and there is no unique solution that can be applied in all cases. The design of the controller can be made as follows: •





Step 1: Verify that the plant passes the rearrangement test. If the answer is YES, define D(s) = I and go to Step 5 (in this case the output prediction and the ideal decoupled dynamic compensation properties will be satisfied). Step 2: Is a decoupled response desirable even if the dead times are increased? If the answer is YES for ALL the outputs, go to Step 4. If the answer is YES for SOME outputs, go to Step 3. If the answer is NO, define D(s) = I and go to Step 6 (in this last case, only the output prediction property will be satisfied. In this case, if the gains of the primary controller are increased the closed-loop system will become unstable). Step 3: Create a partition of P(s) separating the most important outputs from the others ⎤ ⎡ P1 (s) ⎦. P(s) = ⎣ P2 (s)

Design D(s) such that the important part of P(s) passes the rearrangement test ⎡ ⎤ P1 D(s) ⎦, PD(s) = ⎣ P2 D(s)

364

11 Multivariable Dead-time Compensation

obtaining the correspondent Gf (s) ⎡

Gf (s) = ⎣

• •

Gf1 (s) Gf2 (s)



⎦,

and go to Step 7 (this design gives the best possible solution for a defined set of outputs and allows some coupling between the others. This solution is of interest when the delays needed to extend the output prediction and ideal decoupled dynamic compensation properties are considered to be too long). Step 4: Design D(s) such that P(s) passes the rearrangement test (in this case the output prediction property and the ideal decoupled dynamic compensation will be satisfied). Step 5: Rearrange PD(s) such that Lii = Li = min Lij j



∀i, j.

Step 6: Using matrix PD(s) with elements gij e−(Lij +Di )s , compute Gf (s) with elements gij e−(Lij +Di −Li )s .



Step 7: Design the primary controller C(s) and F(s) to obtain a desired performance and robustness. For example, C(s) can be a diagonal matrix of PI controllers tuned using classical procedures [47]. However, the tuning of these PIs can also follow several methods proposed in the literature for the design of PID controllers for MIMO plants [64, 32, 44].

The MIMO-DTC derived from the original SP has the same characteristics of the SISO version: (i) The tuning of the reference filter must be used to obtain a 2DOF based performance, (ii) It cannot be used with integrative or unstable processes, and (iii) The tuning of the primary controller should take into account the modelling errors. The analysis of these three cases can be derived with the generalisation of the SISO analysis of Chap. 5, as presented in the following section.

11.5 Analysis of GMDC Characteristics For the analysis of GMDC characteristics, the solution that extends the output prediction and ideal decoupled dynamic compensation properties of the SP is used; that is, P (or PD) passes the rearrangement test. A diagonal of PID controllers is also used in C. The GMDC in Fig. 11.7 is, in fact, a 2DOF controller. A diagonal reference filter F can be used, for example, to attenuate the overshoot of the set-point

11.5 Analysis of GMDC Characteristics

365

response of some of the outputs. The design of these filters can be made approximately, as in the SISO case, considering the effect of the zeros of the primary controller on the selected output. Exercise 11.7 illustrates this case. The case of integrative processes can be analysed as in the SISO case computing the equivalent controller Ceq = (I + CH)−1 C to verify whether the integrative properties of the primary controller are maintained. Assume that Gf is computed to satisfy the output prediction and the ideal decoupled dynamic compensation properties, thus, the elements of the inner-loop H = Gf − Pn are hij (s) = gij (s)[e−θij s − e−Lij s ]. If one of the elements of Gf has integral action, the corresponding element in H verifies hij (0) = h0 = 0, as was shown in Chap. 5. If these nonnull elements are symmetrically distributed in H, then Ceq will lose its integrative action. In this situation, a step input disturbance acting on the output that has the integral dynamics cannot be rejected. A 2 × 2 system is used to illustrate this situation. In steady state, C is a diagonal of integrators and H is a constant matrix ⎡ ⎤ ⎤ ⎡ ⎡ ⎤ k1 0 h1 h2 k1 /s 0 1 ⎦, ⎦, ⎦= ⎣ Hss = ⎣ Css = ⎣ s 0 k2 h3 h4 0 k2 /s ⎡

I + Css Hss = ⎣

Thus

(I + Css Hss )−1 =

1 + k1 h1 /s k2 h3 /s

⎡ ⎤ s + k1 h1 k1 h2 1 ⎦. ⎦= ⎣ s k2 h3 s + k2 h4 1 + k2 h4 /s k1 h2 /s





s ⎣ (s + k1 h1 )(s + k2 h4 ) − k1 h2 k2 h3

s + k2 h4 −k1 h2 −k2 h3 s + k1 h2



⎦.

If (I + Css Hss )−1 has s as a factor, then it cancels the integrator of the primary controller and Ceqss = (I + Css Hss )−1 Css loses its integrative action. This condition is satisfied if h1 = 0 and/or h4 = 0 or if h2 = 0 and h3 = 0. If only h2 = 0 or h3 = 0 the controller maintains its integral action. The following example illustrates this situation. Example 11.8: The level and temperature control in the three-stage evaporator process shown in Fig. 11.8 is described by

366

11 Multivariable Dead-time Compensation

JUICE LC

Fj

LC

LC

TT

V2

LT

Fs

Fo

Evaporators

STEAM

TANK

Fig. 11.8. Level and temperature control in a three-stage evaporator system

3.5e−s ⎢ s ⎢ P(s) = ⎢ ⎣ 2e−7s 1 + 1.5s ⎡

⎤ −e−5s 1 + 2s ⎥ ⎥ ⎥, −5s ⎦ −e 1 + 3.2s

⎤ 3.5e−3s ⎥ ⎢ s ⎥ ⎢ Pq (s) = ⎢ ⎥, ⎣ −4.5e−2s ⎦ 1 + 2s ⎡

where y1 (t) and y2 (t) are the level and temperature in the storage tank, respectively and u1 (t) and u2 (t) are the juice and steam flows, respectively. The input disturbance is the output flow in the tank. This model verifies the condition Li = Lii . Thus, the fast model is designed as ⎤ −e−4s ⎢ 1 + 2s ⎥ ⎢ ⎥ Gf (s) = ⎢ ⎥. ⎣ 2e−2s −1 ⎦ 1 + 1.5s 1 + 3.2s ⎡

3.5 s

The PIs are tuned with k1 = 0.14,

T1 = 10,

k2 = −0.2,

T2 = 3.2.

Figure 11.9 shows the closed-loop responses for the GMDC for a set-point change close to the operating point. The reference signals are shown by dashed-dotted lines. For the simulations, a change in the set-point of 0.75 in y1 is applied at t = 5 and a 0.05 step disturbance is applied at t = 50. Note that the disturbance cannot be rejected. This can be solved using a filter, as in the SISO case, which gives a zero static gain for the inner loop H. The filter Fr , which is a diagonal matrix, is included in the controller acting on the error between the process and the model, as in the SISO case. Figure 11.10 shows this structure for the more general case where D is also included. Note that for this new controller, called filtered MIMO-DTC, the inner loop is H = Gf − Fr Pn = (I − Fr L)Gf ,

11.5 Analysis of GMDC Characteristics

367

output

1 y

1

0.5

y2

0 0

10

20

30

40

50

60

70

80

90

100

0.15 u1

control action

0.1

u

2

0.05 0 −0.05 −0.1 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 11.9. Plant output and control action for the GMDC for a integrative process. Set-points shown by dashed-dotted lines q( t )

P q(s) +

r( t )

F (s)

+

u( t )

C (s)

D(s)

_

P(s)

y( t )

+

G f(s)- F r (s) P n(s)D(s)

yp( t )

+

+ F r (s)

Fig. 11.10. Filtered MIMO-DTC

where I − Fr L is diagonal. Thus, if there is an integral action in the i output, the i element of Fr must be computed to obtain a zero static gain in 1−

Fri (s) −Li s e . s

This condition is obtained by the same procedure as in the SISO case, using a filter Fri (s) =

(2T0i + Li )s + 1 , (T0i s + 1)2

368

11 Multivariable Dead-time Compensation 1.5 y

1

y

2

output

1

0.5

0 0

10

20

30

40

50

60

70

80

90

100

0.15 u1

control action

0.1

u

2

0.05 0 −0.05 −0.1 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 11.11. Plant output and control action for the MIMO-DTC for an integrative process with the filter. Set-points shown by dashed-dotted lines

where T0i is the tuning parameter. Also, the implementation must avoid the pole-zero cancellation. Example 11.9 illustrates this controller design. Example 11.9: Consider the process in Example 11.8, where g11 (s) has an integral behaviour. Using the dead time Li = 1 and a tuning parameter T0i = 0.2 for the filter, gives Fr1 (s) =

1.4s + 1 . (0.2s + 1)2

The second output does not show an integrative behaviour, thus, Fr2 (s) = 1. Figure 11.11 shows the closed-loop responses for the filtered MIMO-DTC for the same situation as in Fig. 11.9. Note that the disturbance is now rejected. The same procedure can be used to show that an unstable open-loop process cannot be controlled with the GMDC (see Exercise 11.8). This is equivalent to the closed-loop internal stability analysis. This case can be solved using the filtered MIMO-DTC if Fr is appropriately tuned and the controller is implemented without pole-zero cancellations. The MATLAB code for Example 11.9 is:

11.5 Analysis of GMDC Characteristics

369

MATLAB code for Example 11.9 % call model and process modelEVAPORATORS; % call MIMO PI controller and filter F and Fr controllerEXAMPLE119; % simulation parameters tsim=100;tref1=5;tref2=1000;tper1=50;tper2=1000; % simulation sim(’simulationEXAMPLE119’); % plot h=subplot(2,1,1);plot(t,y1,t,y2,’--’); h=subplot(2,1,2);plot(t,u1,t,u2,’--’);

In the analysis of the previous sections, the model in the GMDC was considered equal to the real process. In practice, this rarely occurs and if the primary controller is not correctly tuned, the closed-loop system may become unstable. The following example illustrates this case. Example 11.10: Consider the distillation column of Example 11.4 with the same tuning of C and Gf as in Example 11.5. The behaviour of the output of the plant for the nominal case was analysed in Example 11.5 to show the almost completely decoupled responses. If the PI gains are increased and a reference filter is used, the closed-loop performance can be improved without having a strong control action for the step changes of the set-point. In this case, the parameters are tuned as k1 = 1.95,

T1 = 16.7,

k2 = −1.28,

T2 = 14.4.

A reference filter F (s) is included in the y1 set-point F (s) =

1 . 0.3s + 1

The closed-loop response is shown in Fig. 11.12 for the same simulation test as in Example 11.5. To check the robustness errors in the estimation of the plant parameters are considered. The real process is considered to be ⎤ 14e−1.2s −18.9e−3s ⎢ 1 + 16.7s 1 + 21s ⎥ ⎢ ⎥ P(s) = ⎢ ⎥. ⎣ 6.6e−6s −19.4e−3.9s ⎦ 1 + 12s 1 + 14.4s ⎡

The same changes in the set-point and disturbances as in the previous case are used. Figure 11.13 shows that the behaviour of the system has an unstable response (solid lines in the figure). A simple solution for the stabilisation of the closed-loop responses in the MIMO-DTC consists of the generalisation of the low pass filter Fr (s) used in the SISO case for simple stable processes.

370

11 Multivariable Dead-time Compensation 0.8

output

0.6 y

1

0.4

y

2

0.2 0 0

10

20

30

40

50

60

0.8 u

1

control action

0.6

u2

0.4 0.2 0 −0.2 0

10

20

30 time

40

50

60

Fig. 11.12. Plant output and control action in the nominal case for a fast behaviour. Filtered set-points by dashed-dotted lines

Here a rule of thumb is to choose a diagonal filter Fr (s) with first-order filters in the diagonal elements Fii (s) =

1 . 1 + sTf i

The time constant Tf i is chosen equal to half of the dead time of the ii element: Tf i = Lii /2. To show the improvement in robustness of this solution, the filter is used together with the previous PI’s tuning and with the same modelling errors. As can be seen in Fig. 11.13 (dashed lines) the filter stabilises the responses.

11.6 Summary In the previous sections and examples, some of the advantages of the use of MIMO-DTCs and some of the difficulties associated with the tuning of these controllers have been shown. The analysis of these cases suggests that the same ideas as those presented in the SISO case to cope with unstable processes and to improve robustness can be used for tuning the filtered MIMO-DTC. However, as the tuning of the primary controller is not easy and, in practice, some other problems may appear (such as input constraints, for example) the complete robust tuning of the filters and the solutions for

11.7 Further Reading

371

y1

1 0.5

u1

y2

0 −0.5 0 1.5 1 0.5 0 −0.5 0 1

10

20

30

40

50

60

10

20

30

40

50

60

10

20

30

40

50

60

10

20

30 time

40

50

60

0.5 0

u2

−0.5 0 0.5 0 −0.5 0

Fig. 11.13. Plant output and control action in the case of modelling errors. GMDC (solid lines), filtered MIMO-DTC with the stabilising filters (dashed lines). References are shown by dashed-dotted lines

the case of unstable processes are derived in the discrete framework of the MIMO-MPC. In this case, the primary controller is computed using the minimisation of a cost function that allows the inclusion of constraints and gives better decoupled responses. Chap. 12 shows that the structure of these predictive controllers is almost the same as the one analysed here and tackles the main drawback of the use of the MIMO-DTC, that is, the tuning of the primary controller.

11.7 Further Reading For the general concepts on MIMO control systems see [70, 124]. The extension of the original idea of the SP to MIMO plants with a single delay was presented in the early 1970s [1] and some years later extended to the multiple dead-time case by Ogunnaike and Ray [92, 91]. After this, several papers dealt with the problem of the design of MIMO-DTC or analysed the stability problems associated with the multi-dead-time process [92, 100, 9, 47, 33]. Perhaps the clearest generalisation of the SP to the MIMO case is the one presented in Jerome and Ray [47], which was used to present most of the results of the first part of the chapter. The general multi-delay compensator is also presented in [47]. A study of multivariable nonsquare systems with multiple dead times is presented in [108]. The analysis of the limits imposed

372

11 Multivariable Dead-time Compensation

by the dead time on the closed-loop performance of the system is discussed in [45]. The complete analysis with the details and formal demonstrations of the results of this chapter can be found in [1, 45, 47].

11.8 Exercises 11.1. Consider the processes P1 (s) in Example 11.1 and P2 (s) in Example 11.2: (a) Tune a proportional diagonal controller C(s) for P1 (s) in order to achieve the fastest responses without oscillations. (b) Use C(s) to control P2 (s). Analyse the closed-loop poles in both cases. (c) Compute the maximal values of the gains of C(s) in both cases. 11.2. Analyse the three properties of the MIMO-SP used in the distillation column of Example 11.4. Compute the closed-loop transfer function and simulate the closed-loop system to observe the behaviour of yp . 11.3. Design a MIMO-SP for the Shell fractionator described by the following model ⎤ ⎡ 4.05e−27s 1.77e−28s 5.88e−27s ⎡ ⎤ ⎤ ⎢ ⎥⎡ Y1 (s) ⎢ 1 + 50s 1 + 60s 1 + 50s ⎥ U1 (s) ⎥⎢ ⎢ ⎥ ⎥ ⎢ −18s −14s −15s ⎥ ⎢ ⎢ ⎥ ⎥ ⎢ 5.72e 6.9e 5.39e ⎥⎢ ⎢ ⎢ Y2 (s) ⎥ = ⎢ ⎥ U (s) ⎥ ⎢ ⎥ ⎢ 1 + 50s 1 + 60s 1 + 40s ⎥ ⎢ 2 ⎥ , ⎣ ⎦ ⎦ ⎢ ⎥⎣ ⎥ ⎢ U3 (s) Y3 (s) ⎦ ⎣ 4.38e−20s 4.42e−22s 7.2 1 + 33s 1 + 44s 1 + 19s where U1 (s), U2 (s) and U3 (s) correspond to the top draw, side draw and bottom reflux duties and Y1 (s), Y2 (s) and Y3 (s) correspond to the top end point composition, side end point compositions and bottom reflux temperature, respectively. Compare the performance to a diagonal of PID controllers both for the set-point and disturbance responses. Note that the advantages of MIMO-SP over MIMO-PID are more evident in the set-point than in the disturbance responses. 11.4. Using the procedures presented in Sect. 11.4.4, design two MIMODTCs for the processes ⎤ 2e−4s −2e−2s ⎢ 1 + s 1 + 3s ⎥ ⎢ ⎥ ⎢ ⎥ P1 (s) = ⎢ ⎥, ⎢ ⎥ ⎣ 0.5e−3s −e−2s ⎦ ⎡

1 + 4s

1 + 5s

⎤ 2e−4s −2e−2s ⎢ 1 + s 1 + 3s ⎥ ⎢ ⎥ ⎢ ⎥ P2 (s) = ⎢ ⎥. ⎢ ⎥ ⎣ 0.5e−8s −e−2s ⎦ ⎡

1 + 4s

1 + 5s

11.8 Exercises

373

Illustrate by simulations the advantages and draw backs of each design. Consider three possible cases: (a) Both outputs are important, (b) y1 is more important that y2 and (c) y2 is more important that y1 . 11.5. Consider the process ⎤ e−2s e−5s ⎥ ⎢ 1 + 3s s ⎢ ⎥ ⎥ ⎢ P1 (s) = ⎢ ⎥. ⎥ ⎢ ⎣ 0.5e−7s −e−6s ⎦ 1 + 1.5s 1 + 3.5s ⎡

Design a GMDC for decoupling characteristics and analyse the disturbance rejection capabilities of the controller. 11.6. Repeat the analysis of Sect. 11.5 for integrative processes considering a 3 × 3 plant. What are the conditions for rejecting input step disturbances in this case? 11.7. For the GMDC in Exercise 11.5, tune the PID controllers to accelerate the closed-loop responses. Observe the effect of the PID tuning on the setpoint transients and tune a reference filter to improve these responses. 3.5 . 11.8. Consider the process in Example 11.8 with a different g11 (s) = 1−s Compute the transfer function between an input disturbance and Y(s), and show that the closed-loop system cannot be stabilised. Simulate the closedloop system to confirm the results. Design a filter to solve this problem using the ideas in Example 11.9 and the results of Chap. 7.

11.9. Make an analysis of the modelling error in the closed-loop responses of the GMDC using the process in Exercise 11.3. Consider (a) dead-time variations, (b) gain variations, and(c) time constant variations. Are the effects qualitatively the same as in the SISO case?

12 Robust MPC for MIMO Dead-time Processes

This chapter shows how to design and analyse MIMO-MPC for processes with multiple dead times. The results obtained in the SISO-case for the DTCGPC are generalised. Some fundamental concepts of robust multivariable control needed to understand parts of this chapter are described here. The reader is referred to other textbooks where these concepts are described in more depth.

12.1 Introduction As pointed out in Chap. 11, multivariable systems with multiple delays are often difficult to control using conventional SISO controllers. Because of this, several works have recently proposed different strategies that outperform classical controllers. In particular, MPC is one of the most interesting approaches for solving the problems associated with MIMO delayed processes because it not only allows for coping with multiple dead times but also for including constraints in the formulation of the controller. The advantages of the DTC-GPC derived in Chap. 10 depend on the robustness properties of the predictor structure of the DTC and the optimal procedure used by the GPC to compute the primary controller. The properties of the SISO-DTC are extended to MIMO plants. The closed-loop structure of the MIMO-GPC can be interpreted as an MIMO-DTC and, using this, the robust controller proposed in Chap. 10 (DTC-GPC) can be extended to the MIMO case. It is shown that the MIMO-DTC-GPC has advantages over the traditional MIMO-GPC: it has better robustness for the same performance, using a multivariable prefilter to improve robustness is as simple as in the SISO case, and the tuning of the controller can be performed in two steps. This chapter starts by deriving the MIMO discrete model of the process and the MIMO predictive controller. After this, the robustness analysis is presented.

376

12 Robust MPC for MIMO Dead-time Processes

12.2 The MIMO Discrete Model Consider the multivariable discrete description of a process to be given by a MIMO n × m transfer function P(z −1 ) y(t) = P(z −1 )u(t), −1

(12.1)

−1

where each element pij (z ) of P(z ) is a SISO transfer function and the variables y(t) and u(t) are the n × 1 output and the m × 1 input vectors. The variables are sampled at t = kTs , where k is a positive integer and Ts is the sampling time. This model is obtained from the MIMO continuous model P(s) presented in Chap. 11. Each element pij (z −1 ) can be derived from the element pij (s) with a zero-order hold discretisation method. In general, when the process exhibits input−output dead times, each element pij (z −1 ) has a dead time dij ; that is, the dead time of the transfer function between the j-input and i-output expressed as a number of sampling times. Thus ′ z −1 Bij (z −1 ) −dij z , (12.2) pij (z −1 ) = Aij (z −1 ) ′ where Bij (z −1 ) and Aij (z −1 ) are polynomials in the backshift operator, as in the SISO case. The effective dead time of each output is given, as in the continuous case, by the minimal dead time of the elements of a row. Thus, the effective dead time of the i output is

di = min[dij ], j

which allows the MIMO model to be described as P(z −1 ) = D(z −1 )G(z −1 ), where G(z −1 ), with elements gij (z −1 ), is the matrix transfer function without the common dead times and: • • • •

D(z −1 ) is a polynomial diagonal matrix with elements z −di , where di is the minimum dead time of row i of P(z −1 ); G(z −1 ) = A−1 (z −1 )B(z −1 )z −1 ; A(z −1 ) is a diagonal polynomial matrix with elements Ai (z −1 ) equal to the least common multiple of the denominators (Aij (z −1 )) of the corresponding row of matrix P(z −1 ); B(z −1 ) is a polynomial matrix with elements Bij (z −1 ) such that gij (z −1 ) =

z −1 Bij (z −1 ) , Ai (z −1 )

(12.3)

that is, gij (z −1 ) are the SISO transfer functions without the common delay di of the corresponding output. The polynomials Ai and Bij are given by

12.2 The MIMO Discrete Model

377

Ai (z −1 ) = 1 + ai1 z −1 + ai2 z −2 + ... + ainai z −nai , ij −1 −nbij −2 Bij (z −1 ) = bij . + bij + ... + bij 0 + b1 z 2 z nbij z

Note that the first dij − di coefficients of the polynomials Bij (z −1 ) are null, because the differences between the dead time of the element and the minimal dead time have been absorbed in these polynomials. In this sense G(z −1 ) has the same interpretation as Gf (s) in the GMDC presented in Chap. 11. As explained in Chap. 11, in some situations additional dead times can be included in order to obtain better decoupling characteristics. In these cases, the additional dead-time matrix Da (z −1 ) is a polynomial diagonal matrix with elements z −dai computed to obtain PDa , which passes the rearrangement test. The model used for the prediction structure of the controller is, then, the “new” process PDa . From now on, to simplify the notation, P(z) is used to represent the discrete process including the additional dead times. From this representation the predictor in the controller is expected to give a prediction of the output of the plant with the minimum dead time of each row. If other properties of the predictor structure are looked for, a different structure of the model can be used, as in Chap. 11. However, in this chapter, without loss of generality, the entire analysis is carried out for a plant that passes the rearrangement test. The following example illustrates the results of this section. Example 12.1: Consider the small signal model of a stirred tank reactor (Fig. 12.1) described by the following transfer matrix (the time constants are expressed in minutes) ⎤ ⎡ −0.24s 5e−0.24s e   ⎢ 1 + 0.7s 1 + 0.3s ⎥

Y1 (s) ⎥ U1 (s) ⎢ , =⎢ ⎥ Y2 (s) ⎣ e−0.09s 2e−0.09s ⎦ U2 (s) 1 + 0.5s 1 + 0.4s where the manipulated variables U1 (s) and U2 (s) are the feed flow rate and the flow of coolant in the jacket, respectively. The controlled variables Y1 (s) and Y2 (s) are the effluent concentration and the reactor temperature, respectively. Using a sampling time Ts = 0.03 min and a ZOH discretisation we compute the discrete models pij (z −1 ) to obtain ⎤ ⎡ 0.0420z −1 0.4758z −1 −8 −8 z z

 ⎢ 1 − 0.9580z −1  ⎥ 1 − 0.9048z −1 y1 (t) ⎢ ⎥ u1 (t) =⎢ . ⎥ y2 (t) ⎦ u2 (t) ⎣ 0.0582z −1 −1 0.1445z z −3 z −3 1 − 0.9418z −1 1 − 0.9277z −1

The dead times in this case are caused by measurement effects and are equal for all the gij (s) of each row. The dead time in the output temperature y2 (t)

378

12 Robust MPC for MIMO Dead-time Processes Feed

Reactor Coolant Effluent

Fig. 12.1. Stirred tank reactor

is caused by the time necessary to transport the fluid to the sensor. The dead time in the concentration y1 (t) is caused by the transportation effect and the time required by the analyser. The minimal dead times are d1 = 8,

d2 = 3,

and the matrix fraction description can be obtained by making matrix A(z −1 ) equal to a diagonal matrix with diagonal elements equal to the least common multiple of the denominators of the corresponding row of the transfer function, resulting in  1 − 1.8629z −1 + 0.8669z −2 0 A(z ) = , 0 1 − 1.8695z −1 + 0.8737z −2 

0.0420 − 0.0380z −1 0.4758 − 0.4559z −1 . B(z −1 ) = 0.0582 − 0.0540z −1 0.1445 − 0.1361z −1 −1

The MATLAB code used for this computation is (see the website of the book for the functions disc.m and prep.m): MATLAB code for the computation of D, A and B % inputs, outputs and sampling m=2; n=2; Ts=0.03; % dead times Dcont=[0.24 0.24 0.09 0.09]; % numerator and denominator matrices matconN=[1;5;1;2]; matconD=[0.7 1;0.3 1;0.5 1;0.4 1]; % discretisation MIMO [matN,matD,Ddisc]=disc(matconN,matconD,T,Dcont,n,m); % computes A B and D [A,B,nbb,D]=prep(matN,matD,Ddisc,n,m);

12.3 DTC Interpretation of the MIMO-GPC

379

12.3 DTC Interpretation of the MIMO-GPC In this section it is shown that the DTC analysis of the GPC presented in the SISO case in Chaps. 9 and 10 can be generalised for the MIMO case. The MIMO-GPC algorithm [15] consists of applying a control sequence that minimises a multistage cost function of the form J=

N2 

k=N1

|| y ˆ(t + k | t) − w(t + k) ||2Q1 +

N3 

k=1

|| △u(t + k − 1) ||2Q2 , (12.4)

where N1 and N2 are the minimum and maximum costing horizons, Q1 and Q2 are positive definite weighting matrices, N3 is the control horizon, w(t+j) is a future set-point or reference sequence and y ˆ(t + k | t) is the optimum kstep ahead prediction of the system output on data up to time t. The weighting norm is computed as || X ||2Q1 = XT Q1 X. This cost function is the generalisation of the one used in Chap. 9 for the SISO case. However, in general, as a consequence of the different dead times of each output of the system the horizons must be taken independently for each input and output. Thus, Ni1 , Ni2 are used for output i and Nj3 is used for the j input. Moreover, scaling the model is very important to obtain a proper matrix weight selection [124]. Note that if the model is not scaled, the errors and the control actions in the cost function are not comparable in magnitude and therefore the tuning of Q1 and Q2 is more difficult. The scaling can be done making all the variables less than 1 in magnitude, which means dividing each variable by the maximum expected or allowed change [124]. In the following, the model represented by P(z −1 ) is considered to be scaled. As in the SISO case, a CARIMA model of the process and the disturbances is used to compute the predictions of the output of the plant [15] A(z −1 )y(t) = D(z −1 )B(z −1 )u(t − 1) +

1 T(z −1 )e(t), △

(12.5)

where T(z −1 ) is an n x n monic polynomial matrix representing the colouring polynomials of the noise, the operator △ is defined as △ = 1 − z −1 and the variable e(t) is the n x 1 noise vector. As mentioned, in general T(z −1 ) is chosen equal to the identity matrix because of the difficulties in the identification of the characteristics of the noise and in the correct tuning of the elements of this matrix. The effect of T(z −1 ) on the controller for the MIMO case has the same properties as in the SISO case and can be used to improve robustness. However, this analysis is not dealt with here because we derive a different and simpler way to improve the robustness of the controller. As the matrix A(z −1 ) is diagonal, independent Diophantine equations can be used to obtain the optimum prediction of each output, thus the following one output m input CARIMA model is used [15]

380

12 Robust MPC for MIMO Dead-time Processes

Ai (z −1 )yi (t) = z −di Bi (z −1 )u(t − 1) +

1 e(t), △

(12.6)

where e(t) is assumed to be white noise and Bi = [Bi1 Bi2 ...Bim ]. The polynomial identity 1 = Eik (z −1 ) △ Ai (z −1 ) + z −k Fik (z −1 )

(12.7)

allows the optimal prediction of yˆi (t + k | t) to be computed as in the SISO case yˆi (t + k | t) = Fik (z −1 )yi (t) + z −di Eik (z −1 ) △ Bi (z −1 )u(t − 1),

(12.8)

where Eik (z −1 ) is of order k − 1 and Fik (z −1 ) of order nai . The Diophantine equation can also be solved using the original model without extracting the minimal dead time and the least common multiple of the denominators of each row [14]. However, the procedure presented here allows a simpler interpretation of the results. As pointed out, these predictions, from k = Ni1 to k = Ni2 , are used in the minimisation of J. As in the SISO case, the minimum horizon is normally chosen equal to the minimum delay plus one, that is, Ni1 = di + 1. Here the maximum horizon of each output will be considered as Ni2 = di + N0i . As in the SISO case, the predictions can be computed separately, from k = 1 to k = di and from k = di +1 to k = di +N0i for each i. We first consider the relationship between the predictions from k = di + 1 to k = di + N0i to the predictions up to k = di . For the i output, using the same procedure as in Sect. 9.3.2 ⎡ ⎤ ⎡ ⎤ yˆi (t + di + 1 | t) uf 1 ⎢ yˆi (t + di + 2 | t) ⎥ ⎥

⎢ ⎢ ⎥ ⎢ uf 2 ⎥ ⎢ ⎥ = Hi1 Hi2 · · · Him ⎢ .. ⎥ .. ⎣ ⎦ ⎣ . ⎦ . yˆi (t + di + N0i | t) ⎡



⎢ ⎢ + Hpi1 Hpi2 · · · Hpim ⎢ ⎣

up1 up2 .. . upm

uf m





⎥ ⎢ ⎥ ⎢ ⎥+⎢ ⎦ ⎣

S1 S2 .. . SN0i

⎤⎡ ⎥⎢ ⎥⎢ ⎥⎢ ⎦⎣

yˆi (t + di | t) yˆi (t + di − 1 | t) .. . yˆi (t + di − nai | t)

where the future control actions are given by

uf j = [△uj (t) △ uj (t + 1) · · · △ uj (t + N uj )]T ,



⎥ ⎥ ⎥ , (12.9) ⎦

N uj = max(N0i − dij ), i

and the past control actions are upj = [△uj (t − 1) △ uj (t − 2) · · · △ uj (t − nbij )]T .

12.3 DTC Interpretation of the MIMO-GPC

381

Matrix Si is 1 × nai , Hij is N0i × N uj and Hpij is N0i × nbij . This procedure can be applied to all the outputs to obtain a vectorial expression y ˆ = Huf + Hp up + Sˆ yd , where

(12.10)

y ˆ = [ˆ y1 , y ˆ2 , · · · , y ˆn ]T ,

uf = [uf 1 , uf 2 , · · · , uf m ]T , up = [up1 , up2 , · · · , upm ]T ,

yd1 , y ˆd2 , · · · , y ˆdn ]T . y ˆd = [ˆ The elements of H, Hp and S are real numbers. Because of the independence between the predictions S is a block-diagonal matrix, each block being of dimension N0i × nai . The following example illustrates the computation of the predictions. Example 12.2: Consider P(z) with minimal dead times d1 = 2 and d2 = 1 0.1z −1 −2 ⎢ 1 − 0.9z −1 z ⎢ P(z) = ⎢ ⎣ 0.2z −1 z −2 1 − 0.7z −1 ⎡

⎤ −0.3z −1 −3 z ⎥ 1 − 0.8z −1 ⎥ ⎥. ⎦ −1 −0.2z −1 z 1 − 0.6z −1

The least common multiples of the denominators are A1 (z −1 ) = (1 − 0.9z −1) (1 − 0.8z −1 ) and A2 (z −1 ) = (1 − 0.7z −1)(1 − 0.6z −1). The corresponding numerators are B11 (z −1 ) = 0.1(1 − 0.8z −1), B21 (z −1 ) = 0.2(z −1 − 0.6z −2),

B12 (z −1 ) = −0.3(z −1 − 0.9z −2 ), B22 (z −1 ) = −0.2(1 − 0.7z −1 ).

The model for y1 (t) is A1 (z −1 )y1 (t) = z −2 [B11 (z −1 )u1 (t − 1) + B12 (z −1 )u2 (t − 1)], (1 − 0.9z −1)(1 − 0.8z −1)y1 (t) = z −2 [0.1(1 − 0.8z −1 )u1 (t − 1) −0.3(z −1 − 0.9z −2 )u2 (t − 1),

y1 (t) = 1.7y1 (t − 1) − 0.72y1(t − 2) + 0.1u1 (t − 3) − 0.08u1 (t − 4) −0.3u2 (t − 4) + 0.27u2(t − 5). The predictions of y1 (t), from t + d1 + 1 = t + 3 onwards, are computed using the following equation recursively (for k = 1, 2, . . . , N01 )

382

12 Robust MPC for MIMO Dead-time Processes

yˆ1 (t+2+k | t) = 1.7ˆ y1 (t+2+k−1 | t)−0.72ˆ y1(t+2+k−2 | t)+0.1u1 (t+k−1) −0.08u1(t + k − 2) − 0.3u2 (t + k − 2) + 0.27u2 (t + k − 3) as a function of yˆ1 (t + 2 | t),

yˆ1 (t + 1 | t),

and the future and past control actions. In this example we consider N01 = 2 and compute yˆ1 (t + 3 | t) and yˆ1 (t + 4 | t) yˆ1 (t + 3 | t) = 1.7ˆ y1 (t + 2 | t) − 0.72ˆ y1 (t + 1 | t) + 0.1u1 (t) − 0.08u1(t − 1) −0.3u2 (t − 1) + 0.27u2(t − 2), yˆ1 (t + 4 | t) = 1.7ˆ y1 (t + 3 | t) − 0.72ˆ y1 (t + 2 | t) + 0.1u1 (t + 1) − 0.08u1(t) −0.3u2(t) + 0.27u2(t − 1). Substituting yˆ1 (t + 3 | t) in the last equation gives yˆ1 (t + 4 | t) = 2.89ˆ y1(t + 2 | t) − 1.944ˆ y1(t + 1 | t) + 0.1u1(t + 1) + 0.09u1 (t) +0.136u1(t − 1) − 0.3u2 (t) − 0.24u2(t − 1) + 0.459u2(t − 2). The vector of past control actions is up = [u1 (t − 1)

u2 (t − 1)

u2 (t − 2)]T ,

and the vector of future control actions is uf = [u1 (t)

u1 (t + 1)

u2 (t)]T , ⎡

⎤ u1 (t) yˆ1 (t + 3 | t) 0.1 0 0 ⎣ u1 (t + 1) ⎦ = yˆ1 (t + 4 | t) 0.09 0.1 −0.3 u2 (t) ⎡ ⎤  u (t − 1)

 

−0.08 −0.3 0.27 ⎣ 1 yˆ1 (t + 2 | t) 1.7 −0.72 + u2 (t − 1) ⎦ + . 0.1360 −0.24 0.459 2.89 −1.944 yˆ1 (t + 1 | t) u2 (t − 2)





We now derive the control action using the same ideas as in the SISO case. The output prediction affecting the objective function can be expressed using the system free response fr y ˆ = Huf + fr ,

fr = Hp up + Sˆ yd .

(12.11)

The optimum of Equation (12.4) can be expressed as [15] u = K(w − fr ), where w represents the future reference and K is given by

(12.12)

12.3 DTC Interpretation of the MIMO-GPC

K = (HT Q1 H + Q2 )−1 HT Q1 .

383

(12.13)

Because of the receding control strategy, only △u(t) is needed at instant t. Thus only the first m rows of K (defined as Km ) have to be computed. Km has Nw columns, where Nw = N01 + N02 + . . . + N0n , which corresponds to the number of variables in the horizon [15]. Now, using the expression of fr in Equation (12.11), it follows that △u(t) = Km w − Km Hp up − Km Sˆ yd .

(12.14)

The block diagram representation of the computation of the control action is shown in Fig. 12.2, which is a generalisation of the SISO case. Km S is a block-diagonal matrix where each Lyi element in the diagonal is a 1 × nai vector Lyi = [lyi1 lyi2 . . . lyinai ].

q (t) w

Km

+ + +

+

1 1- z-1

P q(z )

u( t) P( z )

+ +

y (t)

K m H pz( z -1 )

Predictor y p(t)

Km S

y d(t)

Fig. 12.2. Block diagram of the computation of the MIMO-GPC

Using this property, it is possible to compute an equation for each control action from the block diagram as △ui (t) = Hpzi (z −1 ) △ u(t) + lyi1 yˆi (t + di | t) + lyi2 yˆi (t + di − 1 | t) + . . . +lyinai yˆi (t + di − nai | t) +

N0i 

fi wi (t + di + k),

k=1

where Hpzi (z −1 ) is a polynomial matrix of proper degree (see Appendix A.4). Note that this expression has the same form as the one obtained in the SISO case. Now, to derive the relationships between this structure and the predictions up to the dead times, the Diophantine equations are used. We will compute the sum

384

12 Robust MPC for MIMO Dead-time Processes

Θ=

na i +1  k=1

lyik yˆi (t + di − k + 1 | t) = lyi1 yˆi (t + di | t) + lyi2 yˆi (t + di − 1 | t) + . . . +lyinai yˆi (t + di − nai | t)

in an equivalent form. Using Equation (12.8), each yˆi (t + di − k + 1 | t) can be substituted to obtain Θ=

na i +1 

lyik Fi(di −k+1) yi (t) + Bi z −1

k=1

na i +1  k=1

lyik z −k+1 Ei(di −k+1) △ u(t)

and using Eik = gives nai +1

Θ=



lyik Fi(di −k+1) yi (t)+

k=1

1 − z −k Fik △Ai

nai +1 Bi z −1  lyik [1−z −di +k−1 Fi(di −k+1) ]z −k+1 △u(t) △Ai k=1

(for clarity, the dependence of the polynomials on z −1 is omitted). It is possible to simplify the expressions using nai +1 Bi z −1  lyik z −k+1 △ u(t) = Nci Gi u(t), △Ai k=1

na i +1 

lyik Fi(di −k+1) yi (t) = Nf ri yi (t),

k=1

nai +1 Bi z −1  lyik z −di Fi(di −k+1) △ u(t) = Nf ri Gi z −di u(t), △Ai k=1

where the polynomials Nci , Nf ri are Nci =

na i +1 

lyik z

−k+1

;

Nf ri =

k=1

na i +1 

lyik Fi(di −k+1) .

k=1

Using Nf i =

N0i 

fi z t+di +k

k=1

the control action is written as

△ui (t) = Hpzi △ u(t) + Nci Gi u(t) + Nf ri Gi z −di u(t) + Nf i wi (t),

12.3 DTC Interpretation of the MIMO-GPC

385



Nf ri △ui (t) = Hpzi △ u(t) + Nci Gi u(t) + [yi (t) − Pi u(t)] + Nf i wi (t). Nci This last expression can be written as △ui (t) = Hpzi △ u(t) + Nci ypi (t) + Nf i wi (t), where the prediction signal ypi is ypi = Gi u(t) +

Nf ri [yi (t) − Pi u(t)], Nci

or equivalently ypi = Gi u(t) + Ff ri [yi (t) − Pi u(t)]. This equation has the same form as the one obtained in the SISO case. The block diagram representation of the computation of the prediction is shown in Fig. 12.3. Using this procedure for all the outputs, the predictor vector yp

y i( t ) +

u (t) z - di

G i( z ) + +

y pi ( t )

_

F ri ( z )

Predictor

Fig. 12.3. Block diagram of the computation of the optimal predictions

can be put in a vectorial form ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ yp1 (t) u1 (t) y1 (t) u1 (t) ⎢ yp2 (t) ⎥ ⎢ u2 (t) ⎥ ⎢ y2 (t) ⎥ ⎢ u2 (t) ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ .. ⎥ = G(z −1 ) ⎢ .. ⎥ +Fr (z −1 ) ⎢ .. ⎥ −Fr (z −1 )P(z −1 ) ⎢ .. ⎥ , ⎣ . ⎦ ⎣ . ⎦ ⎣ . ⎦ ⎣ . ⎦ ypn (t) um (t) yn (t) um (t)

yp = G(z −1 )u(t) + Fr (z −1 ) y(t) − P(z −1 )u(t) ,

−1

−1

(12.15)

where Fr (z ) = diag(Fri (z )), y(t) is the vector of outputs and u(t) the vector of inputs. This equation shows that the relationships between inputs, outputs and the optimal predictions are an extension of the ones obtained for the SISO case. To complete the analysis, using △ui (t) = Hpzi (z −1 ) △ u(t) + Nci (z −1 )ypi (t) + Nf i (z −1 )wi (t)

386

12 Robust MPC for MIMO Dead-time Processes

q (t) r (t) F (z )

P q (z ) +

u( t)

+

C (z )

_

P( z )

y (t)

+

G n (z )- F r(z )P n (z ) y p (t)

+

+

F r ( z)

Fig. 12.4. Control Scheme of the multivariable GPC

for i = 1, 2, . . . , m, gives △u(t) = Hpz (z −1 ) △ u(t) + Nc (z −1 )yp (t) + Nf (z −1 )w(t),

I − Hpz (z −1 ) △ u(t) = Nc (z −1 )yp (t) + Nf (z −1 )w(t),

(12.16)



−1

−1 △u(t) = I − Hpz (z −1 ) Nf (z −1 )w + I − Hpz (z −1 ) Nf (z −1 )yp (t), (12.17) giving the expressions of the reference filter and feedback controller as

−1 Nf (z −1 ), F(z −1 ) = (1 − z −1 )−1 I − Hpz (z −1 )

−1 C(z −1 ) = (1 − z −1 )−1 I − Hpz (z −1 ) Nc (z −1 ).

(12.18)

A complete control structure for a general process is shown in the block diagram of Fig. 12.4. In this diagram, as in the MIMO-DTC analysis, an external disturbance q(t) is included and the complete process model is y(t) = P(z)u(t) + Pq (z)q(t), where Pq (z) is the disturbance transfer function matrix. From this figure it is easy to see that for the MIMO case the final control law is again composed of an optimal predictor plus a 2DOF primary controller. Note that the prediction at yp (t) is computed using a dead-time-free open-loop model of the plant and the correction is given by the difference between the prediction at time t and the real output y(t) passing through a diagonal filter Fr . Thus the MIMO-GPC is, in fact, equivalent to an MIMO dead-time compensator DTC like the generalisation of the Smith predictor [125] for the MIMO case [47, 9].

12.4 The MIMO-DTC-GPC

387

As in the SISO case, matrix T of the CARIMA model may be used to modify the characteristics of Fr although there are no systematic procedures to design such polynomials in the MIMO case. In this analysis, the obtained structure allows a simple interpretation of the problems associated with the tuning of the polynomial matrix T(z −1 ) in the MIMO case. Using a diagonal T(z −1 ) and the SISO analysis, each element of Fr (z −1 ) is modified by each element of T(z −1 ) but as the primary controller is also T-dependent, the tuning procedure is not straightforward [82, 83]. The previous analysis allows the same modification of the MIMO-GPC to be used as in the SISO case: The filtered Smith predictor is used instead of the optimal predictor in the structure of Fig. 12.4 to improve the robustness of the GPC. This new controller is analysed in the following sections.

12.4 The MIMO-DTC-GPC A new MIMO-MPC controller can be defined using a modification in the predictor structure of the MIMO-GPC. This modification is simple to introduce by making the filter Fr a free tuning parameter. This new controller is called a MIMO dead-time compensator-based generalised predictive controller (MIMO-DTC-GPC). Note that if Fr is equal to the identity matrix this controller is equivalent to the MIMO-SP presented in Chap. 11 with a primary controller tuned using the minimisation of J. When filter Fr is tuned following the ideas of the MIMO-DTC (presented in Chap. 11) to improve the robustness or to cope with unstable processes, the MIMO-DTC-GPC has two important advantages: • •

The primary controller is designed with optimal cost considerations with the possibility of considering the operating constraints that allow better performance to be obtained than when using the MIMO-DTC. The structure and tuning of the predictor allows a more robust controller to be obtained than the MIMO-GPC.

The following example illustrates the use of the MIMO-DTC-GPC. Example 12.3: Consider the distillation column model presented in Example 11.4 with matrix transfer function P(s) ⎤ 12.8e−s −18.9e−3s ⎢ 1 + 16.7s 1 + 21s ⎥ ⎥ ⎢ P(s) = ⎢ ⎥, ⎣ 6.6e−7s −19.4e−3s ⎦ 1 + 10.9s 1 + 14.4s ⎡

where y(s) = P(s)u(s). Using a sampling time Ts = 0.5 and a ZOH discretisation we compute the discrete models pij (z −1 ) to obtain

388

12 Robust MPC for MIMO Dead-time Processes

⎤ 0.3776z −1 −0.4447z −1 −6 −2 z z ⎥ ⎢ 1 − 0.9705z −1 1 − 0.9765z −1 ⎥ ⎢ P(z) = ⎢ ⎥. ⎦ ⎣ 0.2959z −1 −1 −0.6621z −14 −6 z z 1 − 0.9552z −1 1 − 0.9659z −1 ⎡

The minimal dead times are d1 = 2 and d2 = 6 and the least common multiples of the denominators are A1 (z −1 ) = 1−1.9470z −1+0.9477z −2,

A2 (z −1 ) = 1−1.9210z −1+0.9226z −2.

The corresponding numerators are B11 (z −1 ) = 0.3776 − 0.3687z −1,

B12 (z −1 ) = −0.4447 + 0.4316z −1,

B21 (z −1 ) = 0.2959 − 0.2858z −1,

B22 (z −1 ) = −0.6621 + 0.6324z −1.

A MIMO-DTC-GPC is designed for this process making Fr = I in the MIMOGPC and maintaining the same primary controller tuned with a common prediction horizon of 30 and a control horizon of 10 for all the variables. The weighting matrices were chosen to be Q1 = I and Q2 = 2I. In the simulations, a 0.75 change in the set-point of y1 and a 0.2 change in the set-point of y2 are applied at t = 10 and t = 30 min respectively. The responses of the system can be appreciated in Fig. 12.5. As can be seen, the system has a better response (faster and less coupled) than the MIMO-DTC of Chap. 11 (see Examples 11.5 and 11.10). This improved response is due to the more complex but better tuned primary controller. A general analysis of the robustness and performance as well as the implementation issues of the MIMO-DTC-GPC are presented in the following sections (see also Exercise 12.2).

12.5 Robustness Analysis of MIMO Controllers The study of the robustness of the MIMO-GPC and MIMO-DTC-GPC is made using a generalisation of the robustness analysis of the SISO case. The most important concepts of the robustness analysis of a MIMO system are introduced and the reader is refered to other books for a complete study of this subject. 12.5.1 MIMO Uncertainty Representation In our input−output approach, the modelling error in an MIMO system is considered to be the combined effect of the modelling errors of each of the elements of P(z); that is, each pij (z) is considered, as in Chap. 8

12.5 Robustness Analysis of MIMO Controllers

389

r1, y1

1 y

0.5

1

r 0 0 0.5

1

10

20

30

40

50

60 u

u1

1

0

r2, y2

−0.5 0 0.5

10

20

30

40

50

60

y2

0

r

2

−0.5 0 0.5

10

20

30

40

50

60

u2

u2 0 −0.5 0

10

20

30 time

40

50

60

Fig. 12.5. Responses with the MIMO-DTC-GPC of Example 12.3

pij (z) = pnij (z) + ∆pij (z) = pnij (z)(1 + δpij (z)),

z = ejω , ω ∈ [0, π/Ts ],

where Ts is the sampling period and: z = ejω , ω ∈ [0, π/Ts ],

| ∆pij (z) |= ∆Aij ∆pij (ω),

z = ejω , ω ∈ [0, π/Ts ],

| δpij (z) |= δIij δpij (ω),

where | ∆Aij |≤ 1, | δIij |≤ 1 and ∆P ij (ω), δP ij (ω) defines the frequency variations as in Chap. 2. These individual modelling errors can be transformed into an additive unstructured multivariable description of the uncertainties. Thus, the real plant P is in a vicinity of the nominal plant Pn , that is P(z) = Pn (z) + ∆P(z).

(12.19)

In general, ∆P(z) can be written as [124] ∆P(z) = W2 (z)∆(z)W1 (z),

σ(∆(z)) ≤ 1

∀ω ∈ (0, π/Ts ) (12.20)

(or equivalently ∆(z)∞ < 1) where, for this case, ∆(z) is a full matrix, σ(X) denotes the maximum singular value of X and W1 (z) and W2 (z) are two stable matrix transfer functions that characterise the spatial and frequency structure of the uncertainty. Figure 12.6 shows the block diagram of an MIMO control system with the representation of the plant and the model uncertainties. Remarks [70, 124]:

390

12 Robust MPC for MIMO Dead-time Processes

W1 (z ) r (t) F (z )

+ _

u( t)

C (z )

( z ) W2 (z ) x( t) P( z )

+ +

y (t)

Fig. 12.6. Control of a multivariable process with uncertainties



• • • •

This type of uncertainty description is quite conservative because it spreads the uncertainty (which might be caused by a single parameter or a single transfer matrix element) over the whole transfer matrix before defining a magnitude bound. To avoid the conservatism it is necessary to define some structure of the uncertainties in such a way that only the real modelling errors are included in the MIMO description. The robustness analysis can be made using an unstructured or structured uncertainty. The description of the uncertainties in Equation (12.20) can also be used to represent input, output and multiplicative uncertainties with an appropriate definition of W1 (z) and W2 (z). The use of the maximum singular value of ∆(z) as a bound allows the generalisation of the frequency description of the uncertainties used in the SISO case. In the SISO case we can consider the gain of P (z) for a given frequency as | P (ejω ) | and | ∆P (ejω ) | represents the maximum of the gain error for each frequency. This can also be represented as | ∆P (ejω ) |=

| ∆P (ejω )U (ejω ) | , | U (ejω ) |

which does not depend on the input amplitude or on the input direction because u(t) is scalar. In the MIMO case, the equivalent gain is || P(ejω )U(ejω ) ||2 , || U(ejω ) ||2

which does not depend on the amplitude of the input but on its direction. Thus, the maximum singular value is a bound for the maximum gain in all possible directions: σ(∆P) = max U=0

|| ∆PU ||2 = max || ∆PU ||2 . ||U||=1 || U ||2

12.5 Robustness Analysis of MIMO Controllers

391

Because of this, the ∞-norm is known as the induced 2-norm [124]. The following example illustrates the results of this section. Example 12.4: Consider the reactor model presented in Example 12.1 and an error in the estimation of the dead time caused by the variation of the fluid transportation time. This dead-time variation affects both the temperature and the concentration outputs. Thus, the process can be represented by e−L1 s

 ⎢ 1 + 0.7s Y1 (s) ⎢ =⎢ Y2 (s) ⎣ −L2 s e 1 + 0.5s ⎡

⎤ 5e−L1 s 

1 + 0.3s ⎥ ⎥ U1 (s) . ⎥ ⎦ U2 (s) 2e−L2 s 1 + 0.4s

where L1 = 0.24 + ∆L and L2 = 0.09 + ∆L (we have the same dead-time variation in both the outputs). In the discrete representation we obtain d1 = 8 + ∆d and d2 = 3 + ∆d. The discrete process can be described as ⎡

P(z) = ⎣

z

−d1

0

⎤ 0.0420z −1 0.4758z −1 0 ⎢ 1 − 0.9580z −1 1 − 0.9048z −1 ⎥ ⎥ ⎦⎢ ⎢ ⎥ ⎣ 0.0582z −1 0.1445z −1 ⎦ z −d2 1 − 0.9418z −1 1 − 0.9277z −1 ⎤



and considering the nominal model Pn (z) with nominal dead times d1n = 8 and d2n = 3, the modelling error ∆P(z) = P(z) − Pn (z) is ⎡

∆P(z) = ⎣

z

⎤ 0.4758z −1 0.0420z −1 −z 0 ⎢ 1 − 0.9580z −1 1 − 0.9048z −1 ⎥ ⎥ ⎦⎢ ⎥, ⎢ ⎦ −1 −1 −3 ⎣ −d2 0.1445z 0.0582z −z 0 z 1 − 0.9418z −1 1 − 0.9277z −1 ⎡ −∆d ⎤ z −1 0 ⎦ Pn (z). ∆P(z) = ⎣ −∆d 0 z −1

−d1

−8





Using ∆P(z) = W2 (z)∆(z)W1 (z) and defining W1 (z) = Pn (z) and W2 (z) = (z −∆d − 1)I a multiplicative output uncertainty representation is obtained P(z) = [I + (z −∆d − 1)I∆(z)]Pn (z), P(z) = [I + δP (z)∆I ]Pn (z), where ∆I is diagonal and δP (z) is a bound for the scalar modelling error z −∆d − 1.

392

12 Robust MPC for MIMO Dead-time Processes W1 ( z)

(z)

u

W2 ( z)

x

(z)

u

M' ( z)

x M ( z) (b)

(a)

Fig. 12.7. General M − ∆ structure for robustness analysis of a multivariable system

12.5.2 MIMO Robustness Analysis The robustness analysis is based on the block diagram of Fig. 12.6, which can be transformed into a new diagram for the analysis of the closed-loop stability such as the one shown in Fig. 12.7 where M is the equivalent plant for the analysis of robustness. The equivalence of these two diagrams can be obtained as follows. First consider the diagram in Fig. 12.6 for the case where the reference signal is zero. The transfer function between signals X and U is computed as U = −CY = −C(X + Pn U) = −CX − CPn U, U + CPn U = −CX, (I + CPn )U = −CX, U = −(I + CPn )−1 CX = −C(I + Pn C)−1 X. Now, considering the equivalent diagram in Fig. 12.7a M′ = −C(I + Pn C)−1 and from Fig. 12.7b M = W1 M′ W2 = −W1 C(I + Pn C)−1 W2 . Now, using the MIMO robust stability theorem [124] and assuming that plant M and perturbation ∆ are stable and that ∆ is a full perturbation, the closed-loop system of Fig. 12.7b is stable for all perturbations ∆ (σ(∆) ≤ 1) if and only if σ(M(ejω )) < 1

∀ω ∈ [0, π/Ts ]

(12.21)

or equivalently σ(M(ejω ))σ(∆(ejω )) < 1

∀ω ∈ [0, π/Ts ], ∀∆.

(12.22)

12.5 Robustness Analysis of MIMO Controllers

W 1 (z ) r (t) F (z )

+ _

C (z )

u( t)

393

W2 (z )

( z)

+ P( z )

x( t) y (t)

+

G n (z )- F r(z )P n (z ) +

y p (t)

F r ( z)

+ Fig. 12.8. GPC structure for robustness analysis

In the case where the information of uncertainties allows a structured ∆ (a diagonal matrix for example) to be computed, the condition in Equation (12.21) will be necessary but not sufficient and the obtained result will be conservative. The question is whether we can take advantage of the fact that ∆ is structured to obtain a robust stability condition that is tighter than Equation (12.21). In this case a necessary and sufficient condition can be obtained using the structured singular value µ of matrix M [124]. This structured singular value allows the structure of ∆ to be considered. For the case of a block diagonal ∆ with σ(∆) ≤ 1 the robust stability is obtained if and only if µ(M(ejω )) < 1

∀ω ∈ [0, π/Ts ]

(12.23)

or equivalently µ(M(ejω ))σ(∆(ejω )) < 1

∀ω ∈ [0, π/Ts ], ∀∆.

(12.24)

We will see now how this analysis can be applied to the MIMO-MPC controllers. 12.5.3 MPC Robustness The results of this section are derived using the same approach as in the SISO case. First consider the MIMO-GPC analysed in the previous sections. It is assumed that it is possible to tune the MIMO-GPC in such a way that the feedback controller C(z) and the reference filter F(z) in Fig. 12.8 allow a desired nominal set-point performance. Using the block diagram of Fig. 12.8 and assuming that P = Pn , it is possible to analyse the closed-loop stability using the characteristic equation det(I + CGn ) = 0.

(12.25)

394

12 Robust MPC for MIMO Dead-time Processes

This means (as in the SISO case) that the nominal closed-loop stability is independent of the nominal matrix of delays Dn and that the feedback signal yp anticipates the plant output y(t) yp (t) = Gn (z)u(t). However, when considering the uncertainties yp (t) = Gn (z)u(t) + Fr (z)x(t). Therefore, it is possible to draw a new diagram for the analysis of the closed-loop stability such as the one shown in Fig. 12.7. In this case, M is computed as follows. Consider r(t) = 0 U = −C(Gn U + Fr X) = −CGn U − CFr X, (I + CGn )U = −CFr X, U = −(I + CGn )−1 CFr X = −C(I + Gn C)−1 Fr X, M′ = −C(I + Gn C)−1 Fr , M = W1 M′ W2 = −W1 C(I + Gn C)−1 Fr W2 , or equivalently M = −W1 M0 Fr W2 ,

−1

where M0 = C(I + Gn C) is stable because C(z) stabilises Gn (z). Now, using Equation (12.21) and that σ(X.Y) ≤ σ(X)σ(Y) it is possible to write σ(M) ≤ σ(M0 )σ(Fr )σ(W1 )σ(W2 ).

(12.26)

Thus, for given uncertainty matrices W1 , W2 and a defined set of controller parameters (horizons and weighting matrices) the robustness of the controller is defined by σ(Fr ). For the MIMO-GPC, as Fr is diagonal the singular values are the magnitude of the elements of the diagonal σi (Fr (ejω )) =| Fri (ejω ) |,

(12.27)

so, the robustness characteristics of the MIMO-GPC are defined by the shape of the scalar functions Fri (ejω ). As has been shown in Chap. 9 for SISO plants | Fri (ejω ) |≥ 1

∀ω ∈ [ω0i , π/Ts ],

12.5 Robustness Analysis of MIMO Controllers

395

where [ω0i , π/Ts ] is the range of frequencies where the model uncertainties are important for most dead-time processes. Thus σ(Fr )(ejω ) ≥ 1

∀ω ∈ [ω0 , π/Ts ],

ω0 = max ω0i . i

(12.28)

This condition shows that the MIMO-GPC is less robust than the MIMODTC-GPC when using a simple filter Fr = I. Moreover, Fr can be used as a design parameter, as is shown in the following. 12.5.4 Improving Robustness of the MIMO-DTC-GPC As shown in Chap. 10, a low pass filter can be used in the DTC-GPC structure in order to improve the robustness of the controller. The idea used in the SISO case can be extended in a straightforward manner to the MIMO-DTC-GPC using a multivariable diagonal filter Fr with elements Fri (z). Tuning the Filter Using Unstructured Uncertainties First suppose that ∆ is a full matrix. If Fr is chosen to verify σ(Fr (ejω ))
> 0

x

(a) y reference path ∆θ

(b)

x

Fig. 12.15. Approach paths

Here, the approaching paths have been computed using the pure pursuit strategy. At each sampling instant, a circumference is traced between the present robot position and a lookahead point located at a predefined distance on the reference path. This circumference must be tangent to the robot heading and its curvature is chosen as a reference for the predictive controller. The lookahead [94] distance can be fixed but can also be changed on-line, de-

12.7 Case Studies

405

pending on several dynamic parameters such as robot velocity or reference path curvature [95]. The final model is a multivariable one-input/two-output system where the mobile robot curvature has been chosen as the control variable and the robot’s heading and local position are the controlled variables. Although the system should have a single input and a single output (note that y(t) = (V Ts /2)θ(t)), it has been noticed that the system performance is much better when two outputs (θ(t) and y(t)) are considered. This is because the approach path depends on the robot heading. Thus, an error in θ(t) leads to badly fitted approach trajectories. On the other hand, if the error in y(t) were not penalised, the robot would not be able to approximate the desired global path. 0.1 rad, 0.1 m and 1 m−1 are considered, respectively, the maximum values in the heading error, position error and control action. Thus, the scaled CARIMA model can be represented by the matrix transfer function

 

 1 10V Ts z −d 1 1 θ(t) e(t). (12.37) = V Ts γ(t − 1) + −1 −1 2 y(t) (1 − z ) (1 − z ) 1 2 As can be seen, the SISO models relating the input γ to the heading θ and the position y have the same dynamics and a different static gain. The prediction equations are ˆ ˆ ˆ θ(t+ j | t) = 2θ(t+ j − 1 | t)− θ(t+ j − 2 | t)+ 10V Ts △γ(t+ j − d− 1), (12.38)

yˆ(t+j | t) = 2ˆ y(t+j −1 | t)− yˆ(t+j −2 | t)+5(V Ts )2 △γ(t+j −d−1). (12.39) Because of the integrative dynamics of the process Fr (z) has to be designed to reject step input disturbances. As the process has the same dead time for all the outputs, the filter is chosen using the procedure explained in Sect. 10.3.2 for integrative processes with tuning parameter β (see Equation (10.24)). Experimental Results Figure 12.16 shows the experimental test. The controller parameters have been chosen as follows: N = 10, Q1 = diag(0.5I; I), Q2 = 50I, Ts = 0.2s, β = 0.7, look ahead = 0.6 meters and V = 0.1 m/s. In this case, it is assumed that the error in the dead time is 0.4 s (two sampling periods). Figure 12.16 shows the reasonably good performance of the proposed controller, in spite of the error in the dead-time estimation. Note also that the reference path chosen has a small radius of curvature, which makes path reference following more difficult.

406

12 Robust MPC for MIMO Dead-time Processes experimental results 8

7

6

y(meters)

5

4

3

2

1

0 0

starting point

0.5

1

1.5

2

2.5 x(meters)

3

3.5

4

4.5

5

Fig. 12.16. Mobile robot path-tracking for the SPGPC. Path reference shown by dashed line

12.8 Summary The analysis presented in this chapter shows that the good properties of the dead-time compensators and the generalised predictive controller can be used simultaneously in a new predictive algorithm: MIMO DTC based GPC. The advantages of this new control strategy are that (i) it offers a better compromise between robustness and performance than the DTC and GPC, (ii) the tuning procedure is simple, and (iii) it can be applied to stable and unstable MIMO processes with dead times. As will be shown in the next chapter, these ideas can be extended to control constrained and nonlinear processes with dead times.

12.9 Further Reading The derivation of the MIMO discrete model of the process and the MIMO predictive controller is presented in [15, 82]. We refer the reader to the excellent books of Morari and Zafiriou [70] and Skogestad and Postlethwaite [124] for the MIMO control concepts and the robust stability analysis. Methods for scaling the model are also presented in [124]. The analysis of the predictor structure of the MIMO-GPC and the robust tuning of the filters is presented in [82]. Some MPC applications to mobile robots can be found in [38, 88, 87].

12.10 Exercises

407

12.10 Exercises 12.1. Tune a MIMO-DTC-GPC for the evaporation process in Example 11.8. Compare the MIMO-DTC-GPC to the MIMO-DTC. 12.2. Consider the MIMO controller for the Wood and Berry distillation column. Using simulations analyse the robustness of the MIMO-DTC, MIMOGPC and MIMO-DTC-GPC in Examples 12.3 and 11.5. Use Fr to improve the robustness of the controllers. 12.3. Compute a left matrix fraction description for the heavy oil fractionator model. 12.4. In the heavy oil fractionator the upper reflux duty (Q(s)) is an unmeasurable disturbance. The model for this disturbance is ⎡ ⎤ 1.44e−27s ⎢ 1 + 40s ⎥ ⎥ ⎤ ⎢ ⎡ ⎢ ⎥ Y1 (s) ⎢ −15s ⎥ ⎢ ⎥ 1.83e ⎣ Y2 (s) ⎦ = ⎢ ⎥ U (s). ⎢ 1 + 20s ⎥ Y3 (s) ⎢ ⎥ ⎢ ⎥ ⎣ 1.26 ⎦ 1 + 32s

Analyse the closed-loop responses of the MIMO-DTC-GPC and MIMO-GPC for a step change in Q(s).

12.5. For the heavy oil fractionator model and the Wood and Berry distillation column analyse the effect of the controller parameters Ni and Wi on robustness. Try to improve the robustness using these parameters. Consider the dead-time estimation case. Compare with the SISO case. 12.6. Consider the Wood and Berry distillation column model and the MIMODTC-GPC in Example 12.3. Using λ = 0.2 simulate the closed-loop system and analyse the decoupling characteristics. Consider the real process with the following dead times: L12 = 3.1 and L21 = 7.5. Analyse the robustness. Tune the robustness filter to obtain a stable closed-loop system. 12.7. Consider the mobile robot path tracking problem of Sect. 12.7.2. Tune a different set of parameters and analyse the performance and robustness.

13 Control of Nonlinear Dead-time Processes

This chapter is dedicated to showing that the techniques described in the previous chapters can also be used to control nonlinear dead time processes, including the constrained case.

13.1 Introduction Although industrial processes are, in general, nonlinear, most control design techniques, including DTC and MPC applications, are based on the use of linear models. Linear models provide good results when the plant is operating in the neighbourhood of the operating point. In the process industries, the objective is to keep the process around the stationary state rather than perform frequent changes from one operation point to another and, therefore, a precise linear model is sufficient. There are, however, some situations where this is not so. On the one hand, there are processes for which the nonlinearities are so severe (even in the vicinity of steady states) and so crucial to closed-loop stability that a linear model is not sufficient. On the other hand, there are some processes that experience continuous transitions (startups, shutdowns, etc.) and are away from a steady-state operating region a great deal of time or, even, processes that are never in steady-state operation, as in the case of batch processes where the whole operation is carried out in transient mode. For these processes a linear control law would not be very effective and so nonlinear controllers are essential for improved performance or stable operation. Needless to say, the nonlinear control problem is more difficult to solve than the linear one. Furthermore, the control problem becomes aggravated if the process exhibits a significant dead time. A particular type of nonlinearity is caused by the limits on the actuator range and/or process variables. These types of nonlinearities are present everywhere. Only a few of the existing control techniques, as is the case of MPC, consider constraints. As will

410

13 Control of Nonlinear Dead-time Processes

be shown in this chapter, DTC structures can also incorporate constraints to some extent. This chapter is dedicated to showing how to implement predictive controllers for nonlinear and constrained dead-time processes.

13.2 Constraints in Process Control In the previous chapters the control problem was formulated by considering all signals to possess an unlimited range. This is not very realistic because, in practice, all processes are subject to constraints. Actuators have a limited range of action and a limited slew rate, as is the case of control valves limited by a fully closed and fully open position and a maximum slew rate. Constructive or safety reasons as well as the sensor range cause bounds in process variables, as in the case of levels in tanks, flows in pipes, and pressures in deposits. Furthermore, in practice, the operating points of plants are determined to satisfy economic goals and lie at the intersection of certain constraints. The control system normally operates close to the limits and constraint violations are likely to occur. The control system must anticipate constraint violations and correct them in an appropriate way, especially for long-range predictive control. Although input and output constraints are basically treated in the same way, as is shown in this chapter, the implications of the constraints differ. Output constraints are mainly used because of safety reasons and must be controlled in advance as output variables are affected by process dynamics. Input (or manipulated) variables can always be kept within bounds by the controller by clipping the control action to a value satisfying amplitude and slew rate constraints. The constraints acting on a process can originate from amplitude limits in the control signal, slew rate limits of the actuator and limits on the output signals and can be, respectively, described by U ≤ u(t) ≤ U ∀t ≥ 0, u ≤ u(t) − u(t − 1) ≤ u ∀t ≥ 0, y ≤ y(t) ≤ y ∀t ≥ 0. For an m-input n-output process with constraints acting over a receding horizon N , these constraints can be expressed as 1 U ≤ T u + u(t − 1) 1 ≤ 1 U , 1 u ≤ u ≤ 1 u, 1 y ≤ Gu + fr ≤ 1 y. where u, G and fr are the vector of future control moves, the step matrix response and the free response defined in Chap. 9 respectively. Matrix l is

13.3 DTC for Constrained Processes

r (t)

+ _

q (t) + C (s)

+

y (t)

P(s) e -Lns

G n (s) +

y p (t)

411

+

+ _

F r (s)

Fig. 13.1. DTC including saturations

formed by N m×m identity matrices and T is a lower triangular block matrix whose nonnull block entries are m× m identity matrices [15]. The constraints can be expressed in condensed form as Ru ≤ r + Vfr ,

(13.1)

where R, r and V are obtained manipulating the previous equations.

13.3 DTC for Constrained Processes One of the advantages of DTC is that some of the process constraints can be, to some extent, taken into account. This is the case with saturation in the input and output signals, as shown in Fig. 13.1. Saturation is included in the model of the plant at the input and output of the fast model. All the other blocks are the same as in the unconstrained case, which corresponds to the filtered Smith predictor. Note than in the nominal case (no modelling error and no disturbances), two fundamental properties of the SP hold for this structure: 1) The dead time will be eliminated from the main feedback loop, 2) The SP prediction yp (t) coincides with the system output at t + L. The structure shown in Fig. 13.2 is used for implementation. The design of Gn (s)−Pn (s)Fr (s) follows the same steps as in the unconstrained case. The following example illustrates the use of this controller. Example 13.1 Figure 13.3 shows a steam-water heat exchanger. The steam flow is used to control the output temperature T , which can vary between the input water temperature Ti and the steam temperature Tt . The input signal to the steam valve can also vary between 0% and 100%. A linear model is used 2e−5s to describe the dynamics of the process P (s) = (s+1) 3 . The linear model is scaled giving normalised intervals for the variations of the input and output u ∈ [−0.5, 0.5],

y ∈ [−0.5, 0.5].

412

13 Control of Nonlinear Dead-time Processes

r (t)

F (s)

+ _

process

q (t) + C (s)

+

y (t)

P(s)

G n (s)- P n (s) F r (s) + y p (t)

+

F r (s)

Fig. 13.2. DTC including saturations. Structure for implementation TT water

V

steam

TT

Fig. 13.3. Steam-water heat exchanger

The DTC with the model saturations is implemented with the structure shown in Fig. 13.2, which corresponds to a saturated filtered Smith predictor (FSPSAT). An FSP is also used to compare the results. −7s For FSP tuning, an FOPDT model is used in the predictor Pn (s) = 2e 2s+1 . −35

A discrete implementation is used with Ts = 0.2, giving Pn (z) = 0.19z z−0.905 . A PI primary controller is tuned as C(s) = 2 z−0.905 . The robustness filter is z−1 0.1 chosen as Fr (s) = z−0.9 in order to obtain a robust behaviour when deadtime-estimation errors are considered. Figure 13.4 shows the set-point, output temperature and input flow for a sequence of changes in the set-point and a change in the input temperature for the FSP and for the FSPSAT for the case L = 5. To compare the responses, the input and output of the FSP are allowed to vary outside the defined interval, although these values cannot be achieved in the real process. As can be seen, the FSPSAT controller performance is similar to the unconstrained case. To show the effect of the modelling errors, Fig. 13.5 shows the same experiment for the case where L = 4. As can be seen in the figures, the controller maintains stability. The example shows that, even in the case of including constraints in the inputs and outputs, the controller maintains the robustness properties (see Exercise 13.2).

13.3 DTC for Constrained Processes

413

r, y

1 0

r, y, u

−1 0 1

y (FSP) set−point 50

100

150

200

250

300

0 u (FSP)

r, y

−1 0 1

50

100

150

200

0 −1 0

250

300

y (FSPSAT) set−point 50

100

150

200

250

300

u

1 0 u (FSPSAT) −1 0

50

100

150 time

200

250

300

Fig. 13.4. Closed-loop responses for the FSP and FSPSAT. Case L = 5.

13.3.1 MPC and Constrained Dead-time Processes One of the main advantages of MPC is that constraints can be explicitly taken into account. Consider the objective function used in Chap. 9 J = (w − y ˆ)T Q1 (w − y ˆ) + uT Q2 u,

(13.2)

where Q1 and Q2 are weighting matrices penalizing the tracking errors and control effort respectively. If the prediction equation y ˆ = Gu + fr is introduced in Equation (13.2), the constrained MPC can be expressed as 1 T u Hu + bT u + f0 , 2 s. t. Ru ≤ r + Vfr ,

min u

(see Equation (13.1)) and H = 2(GT Q1 G + Q2 ), b = 2(GT Q1 (fr − w)),

f0 = fr T Q1 fr + wT Q1 w − 2wT Q1 fr .

(13.3) (13.4)

414

13 Control of Nonlinear Dead-time Processes

r, y

1 0

u

−1 0 1

y (FSP) set−point 50

100

150

200

250

300

0 u (FSP)

r, y

−1 0 1

100

150

200

0 −1 0 1

u

50

250

300

y (FSPSAT) set−point 50

100

150

200

250

300

0 u (FSPSAT) −1 0

50

100

150 time

200

250

300

Fig. 13.5. Set-point, plant output and control action for the FSPSAT. Case L = 4.

The implementation of a constrained MPC requires a quadratic programming (QP) problem to be solved; that is, an optimisation problem with a quadratic objective function and linear constraints. The optimum of a QP problem is reached for a set of active constraints (the set may be empty) and for all points in the free response space with the same set of active constraints, the solution is an affine function of the free response. Notice that the term f0 is a quadratic function of the process free response fr and that vector b depends, in an affine way, on the free response. Let us consider all points in the free response space where the optimisation problem is feasible and let us denote its solution by u∗ . There are two possible situations for these points: The solution is either inside the polytope defined by the constraints or at its boundary. Let us define set Ω0 as those points in the free response space where the solution of the MPC optimisation problem lies inside the polytope defining the constraints. For all points contained in Ω0 , the solution of the MPC optimisation problem is equivalent to the unconstrained minimisation of function (13.3) of which the solution is u∗ = −H−1 b = 2H−1 GT Q1 (w − fr ),

that is, u∗ is an affine function of the free response fr for all points in Ω0 . Let us now suppose that the solution lies at the boundary of the polytope.

13.3 DTC for Constrained Processes

q

constraints

u( t)

w Optimisation

fr

415

Process

Free response

y (t)

Predictor

y p (t) Fig. 13.6. MPC structure for the constrained case

Define by Ωp the region in the free response space such that the solution of the MPC optimisation problem lies in a set of constraints denoted by p (one of the multiple combinations of constraints that can be active). The rows of R for a particular set of active constraints can be reordered in such a way that the constraint matrix R can be partitioned as 



R u = r1 r R1 r = 1 with 1 , R= R2 u < r2 r2 R2 where R1 is an m1 × n matrix and r1 is an m1 vector. It is assumed that m1 < n and that rank(R1 ) = m1 . If this is not the case, keep the maximal set of linearly independent active constraints to form R1 . The MPC optimisation problem for points in Ωp is equivalent to 1 T u Hu + bT u + f0 , u 2 s. t. R1 u = r1 .

min

p The solution of this problem takes the form [15] u = Kw w + Kfp fr + K p ; that is, for all points in region Ωp (those points where the optimum lies in the active sets of constraints defined by R1 u = r1 ) the controller is an affine function of the free response fr and future reference w. It should be pointed out that all MPC control structures described in previous chapters are the same as in the constrained case, the only difference being that the primary controller turns out to be a piecewise affine system. The effect of the predictor structure can be interpreted using the same approach. Figure 13.6 shows the scheme of the controller for this case. As can be seen in the figure, the predictor on the DTC-MPC approach only affects the computation of the free response. Thus, qualitatively, the influence of the internal dead-time compensation structure of the MPC is the same as in the unconstrained case. Notice that if the MPC solution does not breach any constraints in the vicinity of the process operating point, the results described in previous chapters are valid close to the operating point. In any case,

416

13 Control of Nonlinear Dead-time Processes

r, y

nominal case 0.6 0.4 0.2 0 0 0.1 u

0

y (GPC) y (DTC−GPC) 5

10

15

20

25

30

35

40

15

20 real case

25

30

35

40

15

20

25

30

35

40

15

20 time

25

30

35

40

u (GPC) u (DTC−GPC)

−0.1

r, y

0 0.6 0.4 0.2 0 0

u

0.1 0

5

10

y (GPC) y (DTC−GPC) 5

10

u (GPC) u (DTC−GPC)

−0.1 0

5

10

Fig. 13.7. Plant output and incremental control action for the GPC and DTC-GPC. Set-point shown by dashed-dotted lines

the predictor properties are still valid. The following example illustrates this analysis. Example 13.2 In this example a GPC and a DTC-GPC are compared when controlling a dead-time process with modelling errors and constraints. The process is simulated using the transfer function P (z) =

K(1−a)z −d z−a

with dif−3

ferent values of a, K and d. The model in the controller is Pn (z) = 0.25z z−0.75 . The incremental control action is constrained in the interval (−0.1; 0.1). The controllers are tuned using N = 10 and λ = 2 under these conditions. No robustness filters are used. The simulation test consists of a change in the set-point from 0 to 0.5. Figure 13.7 shows the responses for the nominal case (a = 0.75, K = 1 and d = 3) and for the real case (a = 0.78, K = 1.1 and d = 1). As can be seen in the simulations, both controllers have the same nominal performance but the GPC exhibits an oscillatory response when the model is different from the process. On the other hand, the DTC-GPC has a good response in both cases in spite of the constraints imposed on the incremental control action. This confirms the previous analysis; the properties of the predictor structure of the DTC-GPC are maintained in the constrained case.

13.4 Nonlinear Processes and Dead-time

417

13.4 Nonlinear Processes and Dead-time In general, industrial processes are nonlinear but, as has been shown in this book, most DTC and MPC applications are based on the use of linear models. There are two main reasons for this: On one hand, the control of a linear process is relatively easy and, on the other hand, linear models provide good results when the plant is operating in the neighbourhood of the operating point. If this is not the case, nonlinear models must be used. The control of nonlinear systems is more complex, especially when the nonlinear process exhibits a dead time, because the difficulties of handling dead times have to be added to the difficulties of controlling nonlinear processes. 13.4.1 Nonlinear Process Models Models can be classified into first-principle models, derived from the physiochemical laws governing the relationship amongst their variables, or empirical models, derived from data obtained from the process. In the latter case, a mathematical structure is imposed and the model parameters are determined from the data. A major mathematical obstacle to a complete theory of nonlinear processes is the lack of a superposition principle for nonlinear systems. Because of this, the determination of models from process input/output data becomes a very difficult task. The number of plant tests required to identify a nonlinear plant is much greater than that needed for a linear plant. In an ideal situation, if the plant is linear, only a step test has to be performed in order to know the step response of the plant. Because of the superposition principle, the response to a different size step can be obtained by multiplying the response to the step test by the ratio of both step sizes. This is not the case for nonlinear processes where tests with many different size steps must be performed to get the step response of the nonlinear plant. If the process is multivariable, the difference in the number of tests required is even greater. Input−output Models The nonlinear discrete-time models used for control can be viewed as mappings between those variables that are available for predicting system behaviour up to the current time and those to be predicted at or after that instant. This kind of model can be represented as a nonlinear autoregressive moving average model with exogenous input (NARMAX) which, for singleinput single-output processes, is given by the general equation y(t) = Φ[y(t−1), . . . , y(t−ny ), u(t−d−1), . . . , u(t−d−nu ), e(t), . . . , e(t−ne +1)], (13.5)

418

13 Control of Nonlinear Dead-time Processes

where Φ is a nonlinear mapping, y is the output, u is the input, d is the dead time and e is the noise input. The suitability of this model depends on the choice of function Φ and the order parameters. Notice that this equation covers a wide range of descriptions, depending mainly on function Φ. Different choices of this function give rise to certain models able to provide attractive formulations for predictive control [15]. The most popular models are the Volterra and the related models described next. Volterra Models If only Finite Impulse Response (FIR) models are considered (equivalent to ny = 0 in Equation (13.5)) and Φ is restricted to analytic functions, it follows that this function will exhibit a Taylor series expansion which defines the class of discrete-time Volterra models. These models are analogous to the continuous time Volterra models with the convolution integrals replaced by discrete convolution sums. The model response is given by y(t) = y0 + y1 (t) + y2 (t) + y3 (t) + . . . yn (t), where the first term is an offset and the second is given by y1 (t) =

∞  i=0

h1 (i)u(t − i),

which corresponds to the linear convolution model used in many linear MPC strategies (such as MAC or DMC) and the higher-order terms are given by y2 (t) =

∞  ∞  i=0 j=0

y3 (t) =

∞  ∞  ∞  i=0 j=0 l=0

yn (t) =

∞ 

i1 =0

...

∞ 

in =0

h2 (i, j)u(t − i)u(t − j),

h3 (i, j, l)u(t − i)u(t − j)u(t − l),

hn (i1 , . . . , in )u(t − i1 ) . . . u(t − in ).

Second-order Volterra models are the most popular. In this particular case, and when the infinite terms are truncated to finite values, the process model is given by y(t) = y0 +

N  i=0

h1 (i)u(t − i) +

M  M  i=0 j=0

h2 (i, j)u(t − i)u(t − j),

(13.6)

which corresponds to the widely used linear convolution model with the nonlinearity appearing as an extra bilinear term.

13.4 Nonlinear Processes and Dead-time

419

The number of parameters needed to define a Volterra model is usually large. The dynamic order of the structure has to be chosen in relation to the settling time of the process. Since the settling time is typically 10 to 50 times the sampling time, a realistic choice of the order lies between 10 and 50, which gives rise to a great number of parameters. This order can be reduced by the use of a parametric Volterra model that also considers past output values y(t) = y0 +

Ny  i=1

a(i)y(t − i) +

N1  i=1

b1 (i)u(t − i) +

N2  N2  i=1 j=1

b2 (i, j)u(t − i)u(t − j).

(13.7) This additional linear output feedback helps reduce the dynamic order compared to the basic model. Two special subclasses of the basic model are employed, which reduce the complexity of the basic Volterra approach and have a reduced number of parameters. These are the Hammerstein and Wiener models. Hammerstein models belong to the family of block-oriented nonlinear models built from the combination of linear dynamic models and static nonlinearities. They consist of a single static nonlinearity g(.) connected in cascade to a single linear dynamic model defined by a transfer function H(z −1 ). Wiener models can be considered as the duals of the Hammerstein models, since they are composed of the same components connected in reverse order [15]. In the input−output models, dead time can be included in the model delaying the plant input or plant output. State Space Models The linear state space model can be extended to include nonlinear dynamics. The following state space model can be used to describe a nonlinear plant x(t + 1) = f (x(t), u(t)),

(13.8)

y(t) = g(x(t)), where x(t) is the state vector and f and g are generic nonlinear functions. Notice that the same equation can be used for monovariable and multivariable processes. Notice also that this model can easily be derived from the differential equations that describe the model (if known) by converting them into a set of first-order equations. Dead time can be modelled either as part of the state, as indicated in Sect. 2.2.4, or included in the input by using u(t − d) in Equation (13.8).

420

13 Control of Nonlinear Dead-time Processes

q (t) r(t) + _

NLC

y (t)

Nonlinear Process

e - Lns _

NLM y p (t)

+ +

F r (s)

+ e p (t)

Fig. 13.8. The NDTC scheme

13.5 The DTC Algorithm and Nonlinear Processes In principle there is nothing to be said against using the DTC structures introduced in previous chapters in nonlinear dead-time processes. The basic structure of the nonlinear DTC (NDTC) is shown in Fig. 13.8. Note that 1) the control structure is the same as in the linear case and 2) in the predictor model, the fast model used in the linear case has been substituted by a nonlinear fast model; that is, the dead-time-free part of the plant model. If there are no modelling errors the dead time will be kept out of the feedback loop allowing higher gain controllers. Note that in the nominal case (no modelling error and no disturbances), the three fundamental properties of the SP hold for this structure 1) The dead time will be eliminated in the main feedback loop. 2) The SP prediction yp (t) coincides with the system output at t + L. 3) If the inverse of the fast model of the plant exists and is used as a primary controller, the plant output corresponds to the input delayed by L. Even in the case where simple primary controllers are used in the NDTC structure, the controller can improve the closed-loop performance. Furthermore, the robustness filter Fr (s) has the same interpretation as in the linear case. This is illustrated by the following example. Example 13.3 This example presents the application of NDTC to the control problem of the continuous stirred tank reactor with Van der Vusse reactions (CSTR-VV). The isothermal Van de Vusse reaction system involves series and parallel reactions between the feed product A and the obtained product B, as shown in Fig. 13.9. The equations that govern the system inside the reactor are F dCa = −k1 Ca − k3 Ca2 + (Cai − Ca ) , dt V dCbi F = k1 Ca − k2 Cbi − Cbi . dt V

(13.9)

The desired output is the concentration of B, Cbi [mol/l], Ca and Cai are the concentrations of A [mol/l] in the reactor and in the feed respectively. The manipulated input is the dilution rate F [l/min], V is the constant reactor

13.6 Nonlinear MPC and Dead-time Processes

421

CC

Cb C ai

CT C bi Fig. 13.9. The CSTR-VV with an analyser

volume (l), and the rate constants are given by k1 = 5/6 1/min, k2 = 5/3 1/min, k3 = 1/6 mol/(l min) [7]. A dead time between the reactor output concentration Cbi and the real measured value at the analyser Cb , which is located at a distance l from the reactor is considered as t0 = tt + ta , where ta is the time taken by the analyser to give the value of the measured concentration and tt is the effective transport dead time because of the distance l. Thus, the model of the dead-time nonlinear process has two parts: The nonlinear dynamics of the reactions and the measurement dead time. The dead time will be considered to be variable between 0.54 min and 0.9 min due to the flow and analysis time variations. For the simulations, a series of changes in the concentration set-point are considered, varying the concentration output between 0.65 mol/l and 1.25 mol/l. Two cases are analysed. In the first case, no modelling errors are considered. In the second case, the dead time of the model is 0.9 min and the dead time of the process is 0.54 min. The NDTC is implemented as shown in Fig. 13.8. In this case, a simple PI is used as primary controller although other more complex algorithms can be used. The PI is C(s) = 2.25 + 125 s . 1 The robustness filter is a simple low pass filter Fr (s) = 1+0.015s . The results obtained by the use of this controller are shown in Fig. 13.10. As can be seen, the controller gives good responses even in the dead-time modelling error case. As in the linear case, the filter improves the robustness of the controller (see Exercise 13.6).

13.6 Nonlinear MPC and Dead-time Processes It is evident that the main advantage of NMPC over to MPC is the possibility of dealing with nonlinear dynamics. There is nothing in the basic concepts of MPC against the use of a nonlinear model, therefore, the extension of MPC ideas to nonlinear processes is straightforward, at least conceptually. However, this is not a trivial matter and there are many difficulties derived from the use of this kind of model.

422

13 Control of Nonlinear Dead-time Processes

Cb

nominal case 1 0.5 0

0.2

0.4

0.6

0.8

1

0.2

0.4

0.6

0.2

0.4

0.6

0.8

1

0.2

0.4

0.6

0.8

1 time

1.2

1.4

1.6

1.8

2

1.4

1.6

1.8

2

1.2

1.4

1.6

1.8

2

1.2

1.4

1.6

1.8

2

F

50

Cb

0 0

0.8 1 1.2 dead−time error case

1 0.5 0

F

50

0 0

Fig. 13.10. Output concentration and input flow for the NDTC. Set-point shown by dashed-dotted lines

The main one is solving the optimisation problem, which, on many occasions, results in a nonconvex optimisation problem. Another difficulty is the study of stability and robustness, which is more complex in the case of nonlinear systems, especially if the process has a dead time. The optimisation problem is often solved using sequential quadratic programming (SQP) techniques. SQP is an iterative technique in which the solution at each step is obtained by solving an approximation to the nonlinear problem in which the objective is replaced by a quadratic approximation and the nonlinear constraints are replaced by linear approximations. The dead time has little influence on the difficulty of the computational problem but the stability problem, as in the linear case, is aggravated by dead times. The use of the DTC-MPC structure helps to increase performance and robustness of the controller. The DTC-based NMPC (DTC-NMPC) has the structure shown in Fig. 13.11. As can be seen in the figure the prediction computation is the same as in the linear case but considers the nonlinear discrete model of the process to carry out the predictions of the dead-timefree model. The discrete filter Fr (z) is a low pass filter and can be tuned as in the linear case to improve the robustness of the controller. Finally, the

13.6 Nonlinear MPC and Dead-time Processes

constraints r(t)

Nonlinear Optimization

423

q (t) u( t )

y (t)

Nonlinear Process

^ y (t+ d ) Dead-time-free discrete model y p(t)

z -d

^ y (t) + _

+ +

F r (z)

e p(t)

Fig. 13.11. Control structure of the DTC-NMPC

optimisation is carried out by considering both the nonlinear model of the process and the constraints. The following example illustrates the use of the DTC-NMPC. Example 13.4 This example presents the application of the DTC-NMPC to the CSTR-VV presented in Example 13.3. The optimisation procedure in the MPC algorithm is carried out using a second-order Volterra model of the reactor. For the nonlinear predictions, a simple discrete model is obtained using the Euler forward difference method presented in Chap. 8 Ca (t + 1) = Ca (t) − Ts k1 Ca (t) − k3 Ts Ca (t)2 + (Cai (t) − Ca (t)) Cbi (t + 1) = Cbi (t) + Ts k1 Ca (t) − k2 Ts Cbi (t) − Ts Cbi (t)

Ts F (t) , V

Ts F (t) . V

1−fr The robustness filter is Fr (z) = 1−f −1 . rz The Volterra model is obtained from the nonlinear model using the following steps: 1) Compute a Taylor expansion at an operating point; 2) obtain a Carleman linearisation [116] of the system; 3) discretise the model; 4) obtain the Volterra coefficients in Equation (13.7). In this case, the operating point is F0 = 0.5717 l/min, Ca0 = 3.0007 and Cb0 = 1.1172. In order to obtain the control values, it is necessary to obtain the predicted values of the outputs as a function of the past inputs and outputs and the future control signal. The prediction equations to compute the model predictive control for the SISO case can be written as follows

y = Gu + c + f , c = Hupast + d + g.

(13.10)

In Equation (13.10) all the elements for the prediction are presented. The vector of predicted system outputs y depends both of past plant inputs c and future inputs that will be given during the control horizon. The vector of future control actions is u, which is the vector that has to be calculated, and f

424

13 Control of Nonlinear Dead-time Processes

is a vector containing all the quadratic terms of future control actions. This is the term giving the nonlinear characteristic to the optimisation problem. On the other hand, the entire past history of the dynamic is contained in c whose dependence of past input and outputs of the system is explained through the past control actions upast , prediction error d, and the quadratic past inputs g. Considering p and m as the prediction horizon and control horizon, respectively, y, c, f, d, g are p x 1, u is m x 1, upast is N1 x 1, G is p x m and H is p x N1 . The prediction error d is calculated as the difference between the measured value of the process output and predicted model output at each sample time and it is considered constant for the rest of the prediction horizon. The computation of the elements in vectors f and g is done through a proper partition of the quadratic terms. The rearrangement is as follows: The crossed future−future and future−past control action terms will be included in f. On the other hand g will account only for past−past input terms. An iterative algorithm is proposed to obtain an approach to the optimisation problem that arises while dealing with V-MPC and DTC-VPC [31]: • •

Step 1: Set i = 1. Step 2: Calculate c and u solving the least squares control problem in Equation (13.11). c = Hupast + d + g u = (GT G)−1 GT (s − c − f )



(13.11)

Step 3: Determine whether the condition to end the iteration process is met: |ui (k) − ui−1 (k)| ≤ ∆, (13.12) where ∆ is the desired tolerance. If the condition is achieved, then u(k) = ui (k). If not, recalculate f using ui (k) for present and future values of the input. Set i = i + 1, and return to step 2.

Two controllers are used. The first one is a Volterra-based model predictive controller V-MPC with a nonlinear model including the nominal dead time; that is, the nominal dead time (d = 3 samples) is included in the Volterra model delaying the model output. The second controller uses a DTC based Volterra model predictive controller DTC-V-MPC. In this controller, the nonlinear optimisation uses a predicted signal obtained from the nonlinear DTC structure (see Fig. 13.1). The following tuning parameters are used, both in V-MPC and DTC-VPC: N1 = 20, N2 = 20, p = 15, m = 5, Ts = 0.18 min and λ = 0.5. In this example, the simulations consider both the set-point tracking and the disturbance rejection responses of the process. Several changes in the setpoint are considered varying the concentration output between 0.65 [mol/l]

13.7 Summary

425

V−MPC y (d=3) y (d=5)

concentration

1.2 1.1 1 0.9 0.8 0.7 0

0.5

1

1.5

2

2.5

60

input flow

u (d=3) u (d=5) 40

20

0 0

0.5

1

1.5

2

2.5

time

Fig. 13.12. Concentration and flow for the V-MPC. Set-point shown by dashed-dotted lines.

and 1.25 [mol/l]. The disturbances are considered as changes of 10% in the input concentration (Cai ∈ (9, 11) [mol/l]). Figure 13.12 shows the closed-loop responses in two cases, when the dead time of the process is d = 3 and when it is d = 5. As can be seen, the controller cannot maintain stability when d = 5. Note that the dynamic behaviour for the concentration increments is different to the concentration decrements. Figure 13.13 shows the same experiment for the DTC-V-MPC with Fr (z) = 1. In this case, the controller maintains stability and gives a good response even in the case of error in the dead time. Thus, the example shows that the robustness properties of the linear DTC-MPC controller can be extended to the nonlinear case. Although the V-MPC has a nonlinear model of the reactor including the dead time to compute the predictions, it has poor robustness. Thus, the same conclusions as in the linear case are obtained: The MPC is improved with the DTC structure (see Exercise 13.8).

13.7 Summary This chapter has presented a brief analysis of predictive controllers for nonlinear dead-time processes. The main conclusion of the analysis is that a deadtime compensation structure can be used in the computation of the nonlinear

426

13 Control of Nonlinear Dead-time Processes DTC−V−MPC y (d=3) y (d=5)

concentration

1.2 1.1 1 0.9 0.8 0.7 0

0.5

1

1.5

2

2.5

60

input flow

u (d=3) u (d=5) 40

20

0 0

0.5

1

1.5

2

2.5

time

Fig. 13.13. Concentration and flow for DTC-V-MPC. Set-point shown by dasheddotted lines.

free response of the MPC strategy to improve the performance and robustness of the NMPC. The same conclusions are obtained when the nonlinear model is introduced in the DTC structure. Some examples illustrate that the principal properties of the predictor and the robustness filter Fr (z) are valid for the nonlinear case.

13.8 Further Reading The chapter only presents a brief revision of the principal concepts of nonlinear models and NMPC. The reader is referred to other books for a broader study of these subjects. A study of NMPC can be found in [65, 15, 115]. Nonlinear models for predictive control are presented in [15]. The Volterra and related models are extensively discussed in [31].

13.9 Exercises 13.1. In the tank temperature control analysed in Example 7.4, the control action is not limited. Suppose now that u can vary in [0, 1] and the same simulation test as in Example 7.4 is considered. Analyse the behaviour of the

13.9 Exercises

427

controller for the IPDT and SOIPDT models with and without the inclusion of the saturations in the process model. 13.2. Repeat the analysis of Example 13.1 for a different sequence of changes in the set-point and external disturbances. Retune the primary controller and filter to improve performance. 13.3. Consider the distillation column model and MIMO-DTC controller presented in Chap. 11 (Example 11.5). Suppose that the manipulated variables are now limited: u1 ∈ [−0.2, 0.2] and u2 ∈ [−0.1, 0.1] and the same experiment as in Example 11.5 is considered. Analyse the behaviour of the MIMODTC with and without the inclusion of the saturations in the fast model. 13.4. Consider the concentration control in the CSTR-VV presented in Example 13.3. Try to improve the controller performance of the NDTC using a different primary controller. Try a high-order linear controller and also a nonlinear control law. 13.5. Identify a linear model for the CSTR-VV close to the operating point Cb = 1. Use a second-order model with a dead time. Compute a family of linear models to represent the different dynamics obtained. With this set of linear models tune a DTC to have a robust behaviour also considering 20% dead-time-estimation error. Test the controller with the linear models and then with the nonlinear one. Find the interval of safe operation of the linear DTC. Compare to the results in Example 13.3. 13.6. Consider the control problem in Example 13.3. Analyse the effect of the robustness filter Fr (z). Show that if Fr (z) = 1 the closed-loop performance is poor when modelling errors are considered. 13.7. In the CSTR-VV control of Example 13.3 the input saturation (F ∈ [0, 100%]) has not been considered in the controller design. Propose a NDTC with saturation and tune the controller for this case. Use a simulation test that imposes flow values close to the saturation limits. 13.8. Analyse the effect of the robustness filter in Example 13.4. Consider a bigger dead-time-estimation error and tune a new filter to improve the robustness.

14 Prediction for Control

Predictors are designed to produce good predictions in the belief that an optimal predictor embedded in the control system will produce the best closedloop. The best predictor is not the one that produces the best predictions but the one that produces the best closed-loop responses. That is, predictors should be designed as a means and not as an end in themselves. In this chapter, we have gathered these ideas under the name of “prediction for control” to show how predictors should be considered and designed as a further component of the control structure.

14.1 Introduction The control of processes with a significant dead time requires the use of a predictor within the control structure. These predictors are designed to produce good, in some cases optimal, predictions. This is carried out in an openloop fashion in the belief that an optimal predictor plus an optimal controller will produce the “best” results. However, this is not necessarily true and, as is shown in this chapter, optimal open-loop predictors will not produce the best results when incorporated in a closed-loop control structure. The best predictor is not the one that produces the best predictions but the one that produces the best closed-loop responses. In spite of the open-loop definition of the predictors, the performance and robustness of the complete control structure should be analysed. In the comparative analysis presented in Chaps. 9 and 10 we show that the Smith predictor (a non stochastic predictor) has similar closed-loop performance to and better robustness than the optimal predictor used in MPC in the presence of disturbances and parameter uncertainties. This result is in some ways equivalent to the one obtained in the LQG/LTR problem (or in the identification/adaptation problem) where, in general, the best closed-loop robust behaviour cannot be obtained using an optimal state estimator (an optimal identifier) and the Kalman filter (the identifier) must

430

14 Prediction for Control

be detuned in order to increase robustness [124, 36, 37]. In this case, the Smith predictor allows better closed-loop robust conditions although the open-loop output prediction is not optimal. Furthermore, in the class of optimal controllers (GPC, minimum variance controllers, etc.) optimisation is achieved in two steps. First the prediction of the output of the plant is computed using an open-loop model of the plant. Then, using the obtained predictor structure, the control law is computed by the optimisation of a defined cost function. As will be shown in this chapter, this type of procedure does not allow an optimal closed-loop performance.

14.2 Optimal Predictors: Closed-loop Analysis As has been mentioned, several optimal controllers use optimal predictors in their structure. Here we analyse the GPC presented in Chap. 9, which minimises a multistage cost function of the form J=

N2 

j=N1

δ(j)[ˆ y (t + j | t) − w(t + j)]2 +

N 2 −d j=1

λ(j)[△u(t + j − 1)]2 , (14.1)

If the control weighting factor is set to zero and δ(j) = 1, the minimisation of N the cost function should give a closed-loop output with minimum 1 [ˆ y (t + j | t) − w(t + j)]2 . In the particular case where the horizon of prediction is set to 1, the GPC is equivalent to minimum variance control [39]. However, the real error between the reference and the output must be analysed to evaluate the performance of the closed-loop. It is presumed that prediction yˆ(t + j | t) is computed using an optimal predictor which considers the stochastic properties of the disturbances. One should expect that using this type of control the ISE of the error will be minimum because the quadratic error is minimised at each sample. However, as is shown in the following counterexample, this is not true. Example 14.1: A counterexample The model of the plant is given by the discretisation of a first-order system P (z) = G(z)z −d =

bz −1 z −d , 1 − az −1

where the nominal values of the parameters are: dn = 10, an = 0.9 and bn = 0.1. The GPC controller is computed first using N = 1, λ = 0 and δ = 1. As was shown in Chap. 9, the equivalent primary controller of the GPC is, for this case, a PI controller. The performance of this control system is then compared to a structure composed of a Smith predictor using the same primary PI controller.

14.2 Optimal Predictors: Closed-loop Analysis

431

Several simulation tests are performed using these two controllers with an ARIMA model of noise n(t) n(t) = with e(t) white noise. • • •

T (z −1 ) 1 + at z −1 e(t) = e(t) D(z −1 ) 1 − z −1

Case 1 considers w(t) = 0, no deterministic disturbances and an exact model of the plant and disturbances with at = 0.6. Case 2 considers a change in the set-point from 0 to 1 at t = 0, a −50% step disturbance at the input of the plant at t = 30 and with an exact model of the plant and disturbances. Case 3 considers the same simulation conditions as in Case 2 but using a Tr real disturbance different to the model, n(t) = D e(t) with r Dr (z −1 ) = (1 + 0.4z −1)(1 − z −1 ),



Tr (z −1 ) = 1 + 0.8z −1 .

Case 4 considers the same simulation conditions as in Case 2 but using a real plant with b = 0.1037 and a = 0.8869.

The ISE index was computed in all the cases and the results obtained are given in Table 14.1 Table 14.1. ISE for the GPC and SP Cases ISEGPC Case 1 3.88 Case 2 17.17 Case 3 16.57 Case 4 unstable

ISESP 3.87 15.92 14.68 15.93

Note that in the ideal case where no changes in the set-point or load disturbances are considered both controllers have the same performance, but in all the other real cases, even when the model of the plant and disturbances are the same as the real plant and disturbances, the SP performs better than the GPC. From this example we can conclude the following: • • •

The procedure used in the GPC (and also in other optimal controllers), which considers two optimal designs in separate steps (optimal predictor plus optimal controller) is not optimal. As the solution of the problem gives a minimum of the predicted quadratic error at each sample but not a minimum of the real ISE index, the use of an optimal predictor in the closed-loop configuration is not appropriate. The use of the correct polynomials in the optimal predictor does not guarantee the minimal ISE in the closed-loop.

432

14 Prediction for Control

case 1

0.2 0

case 2

−0.2 0 1.5

case 3

20

30

40

50

60

10

20

30

40

50

60

10

20

30

40

50

60

10

20

30 time

40

50

60

1 0.5 0 0 1.5 1 0.5 0 0 2

case 4

10

0 −2 0

Fig. 14.1. Closed-loop performance of the GPC (dashed lines) and SP (solid lines) for the four cases



As analysed in Chap. 10 the performance of the GPC is less robust than the SP. Note that for Case 4 where a small modelling error is considered, the GPC becomes unstable, while the SP has a good performance.

The behaviour of the closed-loop system is shown in Fig. 14.1 for the four cases. The previous results are valid not only for the case of λ = 0 and N = 1, but also for other cases. Using N = 10 and λ = 1, the behaviour of the GPC is compared to the SP using a PI primary controller. The noise is generated by the same model as in the previous example. In this counterexample, the error in the SP again has lower ISE than in the GPC. The ISE values vary with the model of the disturbances but the results are qualitatively the same for all cases (see Exercise 14.1). As explained in Chap. 10 the robustness of the GPC can be improved by the use of filters in the definition of the prediction model. In this approach, the controller is first computed using T = 1 and D′ = 1 and then the filter T is modified to increase the robustness; that is, the polynomial T is not related to the characteristics of the noise and so the prediction is not optimal. Furthermore, the choice of an appropriate filter to increase the robustness of the GPC results in complex controllers.

14.3 Integrating Predictions and Control

433

These counterexamples suggest that it is necessary to analyse the closed loop of the predictor-based structures in a more general way. In this new approach, the design of the predictor and the primary controller must be made in one step, considering the effects of the choice of the predictor structure and the control law on the closed-loop system. The guidelines of this new approach called “prediction for control” will be dealt with in the next section.

14.3 Integrating Predictions and Control All the DTC structures analysed so far produce a prediction of the process output from the past input and output process data and can be represented by the block diagram of Fig. 14.2 which is the unified discrete dead-time compensator presented in Chap. 8. The predictor is described by blocks S(z) and Fr (z), while F (z) and C(z) correspond to the primary controller. The control r (kT s ) F (z )

+ _

C (z )

q (kT s ) + +

y (kT s ) P( z )

S( z ) y p (kT s )

+ +

F r ( z)

Fig. 14.2. DTC general control structure

problem is to design blocks S(z), Fr (z), F (z) and C(z) in order to obtain the desired closed-loop behaviour. The closed-loop behaviour is usually specified by a) the reference tracking capability, b) the ability to reject stochastic and deterministic disturbances and c) robustness. In most cases the shape or at least some properties of the reference and disturbances are specified. The closed-loop control design consists of finding the transfer function of primary controller and predictor blocks S(z), Fr (z), F (z) and C(z) in such a way that the closed-loop control specifications are fulfilled. This is a very complex problem for which a general solution has not yet been found. Some approximated and heuristic ways of solving the problem are described in the following sections. 14.3.1 A Classical Solution The classical solution consists of using the approach of the UDTC analysed in Chap. 8. The transfer functions from the reference and disturbances to the output are

434

14 Prediction for Control

Y (z) F (z)C(z)P (z) = Hr (z) = , R(z) 1 + C(z)(P (z)Fr (z) + S(z)) Y (z) P (z)(1 + C(z)S(z)) = Hq (z) = . Q(z) 1 + C(z)(P (z)Fr (z) + S(z))

(14.2) (14.3)

The frequency robustness bound is given by dP (ω) =

| 1 + C(z)(Pn (z)Fr (z) + S(z)) | , | Pn (z)C(z)Fr (z) |

z = ejω , ω ∈ [0, π] .

(14.4)

As in the UDTC, transfer functions Fr (z) (the robustness filter) or Gm (z) (the fast model) must be defined in such a way that S(z) = Gm (z) − Pn (z)Fr (z),

(14.5)

is stable even when the process is open-loop unstable. This can be achieved using the DTC method of the modified fast model (or of the filtered SP) where the numerator of Gm (z) (Fr (z)) is chosen such that the unstable roots of the denominator of S(z) are eliminated. For example, if the modified fast model approach is used, the controllers C(z), F (z), Fr (z) and Gm (z) can be tuned as follows: •





• •

If we have an integrative or unstable plant, Fr (z) is chosen as a low pass filter in order to improve robustness. Normally Fr (z) can be chosen as 1−β ν Fr (z) = ( 1−βz −1 ) , 0 < β < 1 and ν ≥ 1. If we have a stable plant, Fr (z) can be tuned after C(z) and F (z) has been chosen as the final stage of the design procedure. Next, Gm (z) is chosen to have the same unstable poles as P (z), and with a numerator such that S(z) is stable and guarantees internal stability. In the general case, Gm (z) depends on the chosen Fr (z) (the coefficients of the numerator of Gm (z) are functions of β and ν). When the plant is stable, one can choose Gm (z) = Pn (z)z d , S(z) = Pn (z)(z d − Fr (z)) = Gn (z) − Pn (z)Fr (z) and therefore Gm (z) can be chosen independently of Fr (z). In this case, the solution is the same as the FSP solution. Permanent regime conditions are imposed in the next step. If step disturbances are to be rejected, S(z) should be zero for z = 1 and the primary controller C(z) should have integral action. Stability and permanent regime conditions allow Gm (z) (and therefore S(z)) to be defined. Once Gm (z) has been determined, the remaining degree-of-freedom of C(z) and filter F (z) are chosen for the desired closed-loop behaviour. This can be done using pole placement or frequency domain techniques. Finally robustness is analysed by tuning β and ν using an estimation of the uncertainties (δP (jω)) and condition | δP (jω) |< dP (ω). If this condition does not hold, β or ν are increased and Gm (z), C(z) and F (z) are computed again.

14.3 Integrating Predictions and Control

435

It is obvious that the final result of this tuning procedure does not have to be optimal but, as will be seen in the following examples, the obtained controller outperforms the controller obtained when using an “optimal” openloop predictor and controller. Example 14.2: The following oscillatory second-order system with a dead time is considered 1 e−4s , P (s) = 1 + m 1 s + m 2 s2 with m1 = 0.7418, m2 = 0.1484 poles at p = −2.5 ± 0.7j in the nominal case (time is considered to be measured in seconds). Estimation errors for the dead time, gain and poles are 5%, 5% and 10%, respectively. The sampling time is chosen to be 1/5 of the inverse of the real part of the system pole Ts = 0.2(1/2.5) = 0.08 s (note that Ts < ∆Lmax ). The closed-loop response should have a low overshoot for changes in the set point and stability should be maintained in spite of the system parameter estimation errors. In this case, the plant is stable and Gm (z) can be chosen as Gm (z) = Pn (z)z d . Therefore, Fr (z) does not affect the primary controller. Because the system is of order 2, an order 2 primary controller with integral action is chosen. The final controller C(z) is a PID that can be tuned to attain a small overshoot. The closed-loop poles are chosen as approximately z = 0.8 + 0.2j. Therefore C=

9.6z 2 − 14.46z + 5.56 . z 2 − 0.863z − 0.137

The reference filter is chosen as a unit static gain low band pass filter cancelling the zeros introduced by the controller W =

0.6968 . 9.6z 2 − 14.46z + 5.56

The tuning of Fr (z) is done to achieve the robustness condition, computing δP (jω) for various processes with parametric uncertainties included in the bands previously defined. For this example, good results are obtained with (see Exercise 14.2) 0.3 . Fr (z) = z − 0.7

The resulting closed loop is compared to the one obtained by using a GPC computed for a similar nominal closed-loop response (N = 10 and λ = 1.5 are used). A step change in the set-point from 0 to 1 at t = 5, a −0.5 input load disturbance at t = 30 and a 0.4 output load disturbance at t = 60 are applied in the simulations. An integrated white noise is added to the system output. The GPC is computed using the “true” polynomials that describe the noise. As can be seen in Fig. 14.3 (Case 1), both systems have a very similar response for changes in the set-point. However, the DTC has a better load disturbance

436

14 Prediction for Control

y (case 1)

1.5

1

0.5 y(GPC) y(DTC)

0 0

10

20

30

40

50

60

70

80

90

100

y (case 2)

1.5

1

0.5 y(GPC) y(DTC)

0 0

10

20

30

40

50 time

60

70

80

90

100

Fig. 14.3. Comparison of GPC and DTC: Nominal case and modelling errors case

rejection capability for the output disturbance. The index ISE for the GPC is ISEGPC = 75.26 and for the proposed controller ISEDTC = 75.98, which shows that the nominal behaviour is almost the same for both controllers. To illustrate the robustness different system parameters are used: Gain 1.1, m2 = 0.14, m1 = 0.75 and a dead time of 4.2 s. The results can be seen in Fig. 14.3 (case 2). As can be seen, the GPC become unstable while the proposed controller maintains stability (the control actions are omitted for clarity). The robustness of the GPC may be improved by using a different T -polynomial (i.e. detuning the optimal filter) but, as explained in Chap. 10, this would also result in poorer disturbance rejection capabilities; that is, the proposed controller to allows similar nominal performance to the GPC but with better robustness characteristics. Example 14.3: Consider the dead-time-unstable plant described by P (z) =

z −d , z − 1.1

where it is supposed that the nominal dead time is dn = 2 and that it may vary between d = 1 and d = 4. The closed loop should follow step changes at the reference with an overshoot of less than 5% while maintaining robust stability. In this example we use the discrete FSP control approach where the filter Fr (z) should be chosen as Fr (z) =

f1 z + f2 , z−β

14.3 Integrating Predictions and Control

437

y, r

nominal case 1.5 1 0.5 0 0

50

100

150

100

150

100

150

100

150

0.2 u

0 −0.2 0

50 case d=4

y, r

2 1 0 0

50

u

0.2 0 −0.2 0

50 time

Fig. 14.4. GPC responses (dashed lines) and robust controller responses (solid lines) for the nominal case and dead-time-modelling-error case. Set-point shown by dashed-dotted lines

where β is the robust tuning parameter and f1 , f2 must be tuned for a stable S(z) with zero static gain. This gives a unique f1 , f2 for each β choice. As in the modified fast model approach, β is chosen to satisfy | δP (jω) |< dP (ω). 1 and C(z) The fast model is, in this case, equal to Pn (z)z dn , Gn (z) = z−1.1 is a PI controller to obtain a pair of real poles at approximately z = 0.86. The reference filter is used to attenuate the overshoot of the set-point response by changing the position of the zero of Hr (z). This gives C(z) =

0.37(z − 0.95) , z−1

F (z) =

5 z − 0.92 8 z − 0.95

To maintain the robustness β = 0.92 is chosen. This gives f1 = 1.378, f2 = −1.298 (see Exercise 14.3). The control law can be implemented by using the block diagram shown in Fig. 14.2 (see Exercise 14.4). The closed-loop behaviour obtained with this controller is compared to that obtained with a GPC tuned with N = 15 and λ = 500 in Fig. 14.4. At t = 5 a step change of 1 is applied to the reference and a load disturbance of 0.2 is applied at t = 40 samples. The controllers have been designed for similar disturbance rejection behaviour, as can be seen in Fig. 14.4, showing the responses obtained when no modelling errors are considered. Note that the robust design has better set-point response and that the effect of the

438

14 Prediction for Control

integrated white noise is the same in both controllers. When modelling errors are considered (d = 4) the robust design is able to maintain stability, while the GPC becomes unstable. Thus, the robust controller has better set-point response and better robustness for similar disturbance rejection capability. 14.3.2 A Quasi-optimal Solution Let us consider a cost function used by MPCs J=

d+N 

j=d+1

δ(j)[ˆ y (t + j | t) − w(t + j)]2 +

N  j=1

λ(j)[△u(t + j − 1)]2 .

(14.6)

Consider predictions made as yˆ(t + j | t) = Sj (z −1 ) △ u(t + j − d − 1) + Frj (z −1 )y(t).

(14.7)

As seen in Chap. 9, when using MPC the predicting polynomials are computed in order to obtain the best open-loop predictions; that is, the predictions are made to be the expected values of the signals. A different approach is used here: closed-loop predictions. From a control point of view, we are not as interested in producing the best predictions as in obtaining predictions that will produce the best closed-loop results. That is, the polynomials Sj (z −1 ) and Frj (z −1 ) are computed to minimise a index J while maintaining stability for the considered modelling error bounds min J(u, Frj , Sj ).

u,Frj ,Sj

(14.8)

The solution of this type of problem would allow the “best” prediction + control structure that verifies specifications to be obtained. However, the problem is too difficult to solve and only approximate solutions such as the one given by the so-called randomised algorithms [132, 129] can be obtained. Random search algorithms have been used in different control problems [51, 128]. It will be shown here that these algorithms can also be applied to the prediction + control problem. We will consider that the plant belongs to a family of plants G(x) parameterised in x and that the controller belongs to a family of controllers C(y) parameterised in y. The objective is to find a controller C(y0 ) that is able to control almost every plant in the family reasonably well. In the case of prediction + control the structure of Fig. 14.2 will be used. A set of specifications and the orders of F (z), C(z), S(z) and Fr (z) will be defined. The objective of the algorithm is to find the coefficients of the four transfer functions in order to fulfill the specifications. In order to do this, the algorithm chooses m random samples of plants in family G(x) and n samples of controllers in family C(y). The algorithm computes the cost function for each controller-plant pair and checks the robustness conditions. A behaviour index (Φij ) is computed for each pair (Gi , Cj ),

14.3 Integrating Predictions and Control

439

taking into account performance and robustness. When the indices have been computed for the m plants and a given controller j, the average value of the index corresponding to controller j (Φ∗j ) is computed. Finally, and after computing the m × n combinations, the best of all the average indices (Φ∗ ) and the corresponding controller is obtained. In order to apply this procedure, it is necessary to define the following items: • • • •

A normalised cost function (taking values in the interval [0, 1]); the controller and plant parameter variation range; a procedure to evaluate the cost function; the number of plants m and number of controllers n that should be used by the randomised algorithm.

It is clear that the merit of the solution depends on the number of samples. When the number of samples increases, the probability of finding a solution closer to the optimal solution also increases. One interesting feature of this type of algorithm is that the values of m and n can be chosen to guarantee the merit of the approximate solution. The values of m and n depend on three factors: • • •

A confidence parameter γ ∈ (0, 1) that considers the algorithm failure possibility. A precision parameter ǫ ∈ (0, 1) that considers the differences between the real minimum and the obtained approximated minimum. The level parameter α ∈ (0, 1) that considers that by choosing a random controller it will have a better response than the one found so far. Parameters ǫ, γ and α can be chosen as indicated in [132, 133]   1 4n ln(2/γ) , m ≥ 2 ln . n≥ α 2ǫ γ

(14.9)

As can be seen, smaller values of α, γ and ǫ result in higher values of m and n. However, it should be noted that m and n do not grow in an exponential way. The procedure is illustrated by the following example. Example 14.4: Consider a plant that can be described by a model of the type P (z) =

(1 − a)bz −1 −d z , 1 − az −1

where the parameters take values in the following intervals a ∈ [0.85, 0.95],

b ∈ [0.8, 1.2],

d ∈ [8, 12].

This situation is very common in practice, where different first-order linear models are used to represent the model dynamics at different operating points. Stochastic disturbances are also considered.

440

14 Prediction for Control

The control specifications require the controller to stabilise all plants in the family and to minimise the process output variance. The plant is stable and the structure of Fig. 14.2 can be chosen. This structure is composed of a low pass filter for Fr (z), a PI controller for C(z) and S(z) = Gn (z) − Pn (z)Fr (z). The plant nominal model is chosen as Pn (z) =

0.1z −1 z −10 . 1 − 0.9z −1

The general form for C(z) and Fr (z) is

  1 − nf z −1 1 − df Fr (z) = , 1 − nf 1 − df z −1

C(z) =

Kc (1 − ac z −1 ) , 1 − z −1

where ac ∈ [−1, 1],

Kc ∈ [0.02, 0.5],

df ∈ [0.5, 1].

To make Fr (z) low pass it is necessary that df > nf . Note that for this case F (z) is not used as there are no reference tracking specifications. The algorithm should compute the values of the four parameters Kc , ac , nf , df to obtain the minimum variance while maintaining robust stability. The cost function Y (p) is defined as a function of the parameter vector p (p = [Kc , ac , nf , df ]T ) as follows: • •

Y (p) = 1, if the closed-loop system is unstable; J Y (p) = 1+J , if the closed-loop system is stable.

Function J is computed as the output variance divided by the input variance J=

σy2 1 = 2 σ 2π



π

−π

| H(ejω ) |2 dω,

(14.10)

where H(z −1 ) is the transfer function from the disturbance to the output. Notice that this is the particular case posed by Equation (14.6) with λ = 0, δ = 1 and a horizon of 1. The algorithm is applied for the following values: ǫ = 0.05 and γ = α = 0.01. From these values the values m = 2453 and n = 528 are obtained and the final solution given by the randomised algorithm is p = [3.45, 0.81, 0.76, 0.75]T . This solution is compared to the one obtained by a GPC with N = 5, λ = 2, δ = 1 and using the same predictor polynomials used to generate the noise. Both systems are simulated for the nominal case and for a process with a = 0.95, d = 8 and b = 1.1. A −0.4 step input disturbance is applied at t = 10 and a 0.4 step output disturbance is applied at t = 70 samples. A stochastic −1 disturbance is applied using a model given by n(t) = 1+0.5z 1−z −1 e(t) with e(t) white noise.

14.3 Integrating Predictions and Control

441

nominal case

u

y, r

1 0 −1 0

20

40

60

80

120

140

160

180

200

1 0 −1 −2 0

20

40

60

80 100 120 d=8, a=0.95, b=1.1

140

160

180

200

−1 0

20

40

60

80

100

120

140

160

180

200

1 0 −1 −2 0

20

40

60

80

100 time

120

140

160

180

200

100

u

y, r

1 0

Fig. 14.5. Behaviour of the closed loop with a GPC (dashed lines) and with a random controller (solid lines)

Figure 14.5 compares the behaviour of both controllers. As can be seen, the behaviour the controllers is similar for the nominal case, both for deterministic and stochastic disturbances. Note that the GPC is successful in rejecting the input disturbance but has less success with the output disturbance. The ISE is computed for both controllers giving ISEGPC = 7.32 and ISErand = 7.33. However, when modelling errors are considered, the system controlled by the GPC becomes unstable, while the controller that uses predictors designed using closed-loop characteristics maintains stability. The solution found by the randomised algorithm can be evaluated by computing dP (ω) and | δP (jω) | for various processes of the family, as shown in Fig. 14.6. As can be seen, the system is stable for all cases. Notice that, for this simple case, a solution similar to the one found in this section can be obtained by using the methods described in previous chapters. However, for higher-order models the exact solution becomes too complex and randomised algorithms are a good alternative.

442

14 Prediction for Control

0

10

−1

10

dP(ω) |δP(jω)| −2

10

−1

10

0

10

1

10

Fig. 14.6. dP (ω) and | δP (jω) | for various processes of the family

14.4 Summary This chapter has shown that the predictors designed to produce optimal open-loop predictions are not optimal when operating in the closed loop. Furthermore, structures based on the Smith predictor offer more robust controllers and similar nominal performance even when the process exactly matches the situation required by the GPC. The lesson learned is that the best predictor is not the one that produces the best predictions but rather the best closed-loop response; that is, predictors should be designed as an integral part of the controller in order to produce better closed-loop response. We have called this procedure prediction for control. The solution is extremely difficult to find, however, some approximate solutions are described in the chapter.

14.5 Further Reading Studies of the performance and robustness of optimal predictor based controllers have been presented in recent years [21, 23, 137], etc., but the influence of the predictor structure on robustness is only discussed in [85, 74, 80, 78]. Randomised algorithms are presented in [132]. The prediction for control approach was presented in [74].

14.6 Exercises 14.1. Consider the same process and controller as in Example 14.1. Analyse the ISESP and ISEGPC for different tunings: N = 10, λ = 2; N = 5, λ = 5;

14.6 Exercises

443

N = 2, λ = 20. Perform a set of simulations for each case considering the nominal case and the modelling error case. 14.2. Analyse the robustness of the controller in Example 14.2. Tune different filters to observe the effect on the closed-loop performance. 14.3. Compute the modelling error for Example 14.3 and a bound δP (ω). Analyse the robustness for different values of β. Show that β = 0.92 gives robust stability for ∆d = 2. 14.4. Compute the equivalent block S(z) for the controller in Example 14.3. Write the corresponding computer code for the controller implementation. 14.5. Consider the same dead-time-free process as in Example 14.3 and a dead time d = 10. Analyse the tuning of the controller for this case. Are the differences between the GPC and the robust controller qualitatively the same as in Example 14.3? −5s

(1−0.5s)e 14.6. For the process P (s) = (1+s) 3 (1+2s) design a GPC and a predictor-based controller using another methodology. Try a new idea! Compare the results.

A Appendix

A.1 Derivation of the Predictions in GPC In the optimal predictor used in the GPC the predictor equation gives y ˆ = G u + H u1 + S y1 , where



⎢ ⎢ G=⎢ ⎣

G has elements gj = −

j 

g1 g2 .. .

0 g1 .. .

... ... .. .

0 0 .. .

gN gN −1 ... g1

ai gj−i +

i=1

j−1 

bi ,



⎥ ⎥ ⎥. ⎦ j = 1, ..., N,

(A.1)

(A.2)

(A.3)

i=0

where gj = 0 if j ≤ 0. H has elements hij computed using h1,j = bj ,

hij = −

i−1 

j = 1, ..., nb,

a ˜k h(i−k)j + h1(i+j−1) ,

i = 2, ..., N ; j = 1, ..., nb,

k=1

where hij = 0 if i > N or j > nb, a ˜i are the coefficients of A˜ = (1 − z −1 )A and a ˜k = 0 if k > na + 1. S has elements sij computed as follows aj , s1j = −˜

j = 1, 2, . . . , na + 1,

446

A Appendix

sij =

na+1 

s1k s(i−k)j ,

i = 2, ..., N ; j = 1, ..., na + 1,

k=1

where sij = 0 if i < 0 or j < 0 and s0j = 1, si0 = 1.

A.2 Deriving the GPC Equivalent Controller To derive the 2DOF structure, the control law in Equation (9.17) is written as +[1 − lu1 z −1 − lu2 z −2 − ... − lunb z −nb ] △ u(t) = ly1 yˆ(t + d | t) +ly2yˆ(t + d − 1 | t) + ... + lyna+1yˆ(t + d − 1 − na | t) + Using

N 

fi w(t + d + i). (A.4)

i=1

Dc′ (z −1 ) = [1 − lu1 z −1 − lu2 z −2 − ... − lunb z −nb ]

and Nf (z) =

N 

fi z d+i ,

i=1

it follows that

Dc′ (z −1 ) △ u(t) = ly1 yˆ(t + d | t)

+ly2 yˆ(t + d − 1 | t) + ... + lyna+1 yˆ(t + d − 1 − na | t) + Nf (z)w(t).

(A.5)

The predictions can be substituted with yˆ(t + d | t) = Fd (z −1 )y(t) + B(z −1 )z −1 Ed (z −1 ) △ u(t), yˆ(t + d − 1 | t) = Fd−1 (z −1 )y(t) + B(z −1 )z −2 Ed−1 (z −1 ) △ u(t), .. .

yˆ(t + d − na | t) = Fd−na (z −1 )y(t) + B(z −1 )z −na−1 Ed−na (z −1 ) △ u(t). The right side of Equation (A.4) is written as [ly1 Fd (z −1 ) + ly2 Fd−1 (z −1 ) + . . . + lyna+1 Fd−na (z −1 )]y(t) +B(z −1 )z −1 [ly1 Ed (z −1 ) + ly2 z −1 Ed−1 (z −1 ) + . . . +lyna+1 z −na Ed−na (z −1 )] △ u(t) + Nf (z)w(t), or in a compact form

A Appendix

na+1 

lyi Fd−i+1 (z

−1

i=1



) y(t) + B(z −1 )z −1

na+1  i=1

447

lyi z −i+1 Ed−i+1 (z −1 ) △ u(t)

+Nf (z)w(t). Using the equalities Ed−i+1 (z −1 ) =

B(z

−1

)z

−1

1 − z −(d−i+1) Fd−i+1 (z −1 ) , △A(z −1 )

na+1 

lyi z −i+1 Ed−i+1 (z −1 )

i=1

=

na+1   B(z −1 )z −1  −i+1 −(d−i+1) −1 1 − z ly z F (z ) i d−i+1 △A(z −1 ) i=1

and considering

P (z −1 ) =

B(z −1 )z −1 z −d = z −d G(z −1 ), A(z −1 )

Nc (z −1 ) = − Nf r (z −1 ) =

na+1 

na+1 

lyi z −i+1 ,

i=1

lyi Fd−i+1 (z −1 ),

i=1

Equation (A.5) is written as

Dc′ (z −1 ) △ u(t) = Nf r (z −1 )y(t) 

G(z −1 ) P (z −1 ) −1 −1 Nc (z ) − Nf r (z ) △ u(t) + Nf (z)w(t), + △ △

(A.6)

or equivalently 

P (z −1 ) G(z −1 ) ′ −1 −1 −1 Nc (z ) − Nf r (z ) △ u(t) Dc (z ) + △ △ = Nf r (z −1 )y(t) + Nf (z)w(t).

The equivalent controller Ceq (z Ceq (z

−1

)=

−1

) is Nf r (z −1 ) △

Dc′ (z −1 ) +

(A.7)

G(z −1 ) Nc (z −1 ) △



P (z −1 ) Nf r (z −1 ) △

,

448

A Appendix

Ceq (z −1 ) =

1+

Nf r (z −1 ) Dc′ (z −1 )△ G(z −1 ) Nc (z −1 ) P (z −1 ) Nf r (z −1 ) △ Dc′ (z −1 ) − △ Dc′ (z −1 )

.

This can be written as Ceq (z) =

C(z)Fr (z) , 1 + C(z)G(z)[1 − z −d Fr (z)]

with

C(z) = −

ly1 + ly2 z −1 + ... + lyna+1 z −na , (1 − z −1 )(1 − lu1 z −1 − lu2 z −2 − ... − lunb z −nb ) F (z) = −

Fr (z) =

(A.8)

f1 z d+1 + f2 z d+2 + ... + fN z d+N , ly1 + ly2 z −1 + ... + lyna+1 z −na

ly1 Fd (z−1) + ly2 Fd−1 (z−1) + ... + lyna+1 Fd−na (z−1) . ly1 + ly2 z −1 + ... + lyna+1 z −na

(A.9)

(A.10)

A.3 Derivation of the Predictions in DMC The predictions are computed as yˆ(t + 1 | t) = g1 △ u(t) + y(t) + (g2 − g1 ) △ u(t − 1) + (g3 − g2 ) △ u(t − 2) + . . . + (gN+1 − gN ) △ u(t − N ), yˆ(t + 2 | t) = g2 △ u(t) + g1 △ u(t + 1) + y(t) + (g3 − g1 ) △ u(t − 1) +(g4 − g2 ) △ u(t − 2) + . . . + (gN+2 − gN ) △ u(t − N ), .. . yˆ(t + d | t) = g1 △ u(t + d − 1) + g2 △ u(t + d − 2) + . . . + gd △ u(t) + y(t) +(gd+1 − g1 ) △ u(t − 1) + . . . + (gN+d − gN ) △ u(t − N ), yˆ(t + d + 1 | t) = g1 △ u(t + d) + g2 △ u(t + d − 1) + . . . + gd+1 △ u(t) + y(t) +(gd+2 − g1 ) △ u(t − 1) + . . . + (gN+d+1 − gN ) △ u(t − N ), yˆ(t + d + 2 | t) = g1 △ u(t + d + 1) + . . . + gd △ u(t + 2) + gd+1 △ u(t + 1) + gd+2 △ u(t) + y(t) + (gd+3 − g1 ) △ u(t − 1) + . . . +(gN+d+2 − gN ) △ u(t − N ), .. . yˆ(t + d + N | t) = g1 △ u(t + d + N − 1) + . . . + gd △ u(t + N ) + . . . + gd+N △ u(t) + y(t) + (gd+N+1 − g1 ) △ u(t − 1) + . . . +(g2N+d − gN ) △ u(t − N ).

A Appendix

449

Thus ⎡



yˆ(t + 1 | t) .. .

⎤ ⎡ ⎤ ⎡ ⎥ ⎢ △u(t − 1) △u(t) ⎥ ⎢ ⎥ ⎢ ⎢ △u(t − 2) ⎥ ⎢ △u(t + 1) ⎥ ⎢ yˆ(t + d | t) ⎥

⎥ ⎥ •⎢ ⎥ = G• ⎢ ⎢ +H ⎥ +S• y(t) , ⎢ ⎥ ⎢ .. . ⎢ yˆ(t + d + 1 | t) ⎥ . ⎦ ⎣ ⎦ ⎣ . . ⎥ ⎢ ⎥ ⎢ .. △u(t − N ) △u(t + N − 1) ⎦ ⎣ . yˆ(t + d + N | t) (A.11) where G• , H• and S• are matrices of dimensions (N + d) × N , (N + d) × N and N × 1, respectively, computed as ⎡

g1 g2 .. .

0 g1 .. .

⎢ ⎢ ⎢ ⎢ ⎢ • gd−1 G =⎢ ⎢ gd ⎢ gd+1 gd ⎢ ⎢ . .. ⎣ .. . gd+N gd+N −1 ⎡

(g2 − g1 ) (g3 − g1 ) .. .

... ... .. .

0 0 .. .

... g1 ... g2 . .. . .. ... gd+1



⎡ ⎤ 1 ⎢1⎥ ⎢ ⎥ ⎢ .. ⎥ ⎢.⎥ ⎢ ⎥ • ⎥ S =⎢ ⎢1⎥, ⎢1⎥ ⎢ ⎥ ⎢.⎥ ⎣ .. ⎦ 1

⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎦

(g3 − g2 ) (g4 − g2 ) .. .

⎢ ⎢ ⎢ ⎢ ⎢ • (gd+2 − g2 ) H =⎢ ⎢ (gd+1 − g1 ) ⎢ (gd+2 − g1 ) (g d+3 − g2 ) ⎢ ⎢ .. .. ⎣ . . (gd+N +1 − g1 ) (gd+N +2 − g2 )

... (gN +1 − gN ) ... (gN +2 − gN ) .. .. . . ... ... .. . ...



⎥ ⎥ ⎥ ⎥ ⎥ (gN +d − gN ) ⎥ ⎥. (gN +d+1 − gN ) ⎥ ⎥ ⎥ .. ⎦ . (g2N +d − gN )

This expression is not of interest for the case of dead-time processes; thus, the particularities of the model will be used to derive the predictions needed for the computation of J. As the first output to be used in the optimization is yˆ(t + d + 1 | t) and, because of the dead-time, g1 = g2 = . . . = gd = 0, it is possible to write yˆ(t + d | t) = y(t) + (gd+1 − g1 ) △ u(t − 1) + . . . + (gN +d − gN ) △ u(t − N ). As a recursive relation is desired y(t) is obtained from the previous equation as a function of yˆ(t + d | t)

450

A Appendix

y(t) = yˆ(t + d | t) − (gd+1 − g1 ) △ u(t − 1) − . . . − (gN +d − gN ) △ u(t − N ), and substituting y(t) in the expressions of yˆ(t + d + i | t) gives yˆ(t + d + 1 | t) = gd+1 △ u(t) + yˆ(t + d | t) + (gd+2 − gd+1 ) △ u(t − 1) + . . . + (gd+1+N − gd+N ) △ u(t − N ), yˆ(t+d+2 | t) = gd+1 △u(t+1)+gd+2 △u(t)+yˆ(t+d | t)+(gd+3 −gd+1 )△u(t−1) + . . . + (gd+2+N − gd+N ) △ u(t − N ), ...

yˆ(t + d + N | t) = gd+N △ u(t + N − 1) + . . . + gd+1 △ u(t) + yˆ(t + d | t) +(gd+3 − gd+1 ) △ u(t − 1) + . . . + (gd+2N − gd+N ) △ u(t − N ). In a vectorial form y ˆ = G u + H u1 + S y1 .

(A.12)

A.4 The MIMO-GPC Structure The term on the past control actions Hpup in Equation (12.14) is ⎤ ⎤⎡ ⎡ Hp11 Hp12 · · · Hp1m up1 ⎢ Hp21 Hp22 · · · Hp2m ⎥ ⎢ up2 ⎥ ⎥ ⎥⎢ ⎢ ⎥ ⎢ .. ⎥ , ⎢ .. .. .. .. ⎦ ⎣ ⎣ . . ⎦ . . . upm HpN0i 1 HpN0i 2 · · · HpN0i m where the past control actions are given by

upj = [△uj (t − 1) △ uj (t − 2) · · · △ uj (t − nbij )]T , upj = [z −1 z −2 · · · z −nbij ]T △ uj (t) = zTpj △ uj (t).

Multiplying each Hpij by zTpj gives a polynomial matrix Hpzij . Thus, for each input i the relationship between the control action at t and the past control actions is written as △ui (t) = Hpzi (z −1 ) △ u(t), where Hpzi (z −1 ) is obtained by multiplying Km by the i row of Hpz .

References

1. G. Alevisakis and D. Seborg. An extension of the Smith predictor to multivariable linear systems containing time delays. Int. Journal of Control, 3:541–551, 1973. 2. P. Ansay and V. Wertz. Model uncertainties in GPC: A systematic two-step design. In Proc. of the ECC 97, Brussels, July 1997. 3. L.V.R. Arruda, R. Luders, ¨ W.C. Amaral, and F.A.C Gomide. An object-oriented environment for control systems in oil industry. In Proceedings of the 3rd Conference on Control Applications, Glasgow, UK, pp. 1353–1358, 1994. 4. K.J. Astrom ¨ and T. H¨agglund. PID Controllers: Theory, Design and Tuning. Instrument Society of America, 1995. 5. K.J. Astrom, ¨ C.C. Hang, and B.C. Lim. A new Smith predictor for controlling a process with a integrator and long dead time. IEEE Trans. on Automatic Control, 39(2):343–345, 1994. 6. New York B.E. Mc Graw-Hill. Extended horizon adaptive control. In Proc. 9th IFAC World Congress, Budapest, Hungary, 1984. 7. B. Wayne Bequette. Process Dynamics: Modeling, Analysis, and Simulation. Prentice Hall, New Jersey, 1st edition, 1998. 8. L.G. Bergh and J.F. MacGregor. Constrained minimum variance controllers: Internal model structure and robustness properties. Ind. Eng. Chem. Res., 26:1558– 1564, 1987. 9. A. Bhaya and C.A. Desoer. Controlling plants with delay. Int. J. Control, 41:813– 830, 1985. 10. M.W. Braun, D.E. Rivera, M.E. Flores, W.M. Carlyle, and K.G. Kempf. A model predictive control framework for robust management of multi-product, multiechelon demand networks. Annual Reviews in Control, 27:229–245, 2003. 11. E.F. Camacho. Constrained generalized predictive control. IEEE Trans. on Automatic Control, 38:327–332, February 1993. 12. E.F. Camacho, M. Berenguel, and F.R. Rubio. Advanced Control of Solar Plants. Springer, Berlin, 1997. 13. E.F. Camacho and C. Bordons. Implementation of self tuning generalized predictive controllers for the process industry. Int. Journal of Adaptive Control and Signal Processing, 7:63–73, 1993. 14. E.F. Camacho and C. Bordons. Model Predictive Control in the Process Industry. Springer, Berlin, 1995.

452

References

15. E.F. Camacho and C. Bordons. Model Predictive Control. Springer, Berlin, 2004. 16. E.F. Camacho, F.R. Rubio, and J.A. Gutierrez. Modelling and simulation of a solar power plant with a distributed collector system. In Int. IFAC Symp. on Power Systems Modelling and Control Applications, pp. 11.3.1–11.3.5., Brussels, September 1988. 17. T.L. Chia and C.B. Brosilow. Modular multivariable control of a fractionator. Hydrocarbon Processing, pp. 61–66, 1991. 18. I.-L. Chien, S.C. Peng, and J.H. Liu. Simple control method for integrating processes with long deadtime. Journal of Process Control, 12(3):391–404, 2002. 19. D.W. Clarke. Application of generalized predictive control to industrial processes. IEEE Control Systems Magazine, 122:49–55, 1988. 20. D.W. Clarke and P.J. Gawthrop. Self tuning control. IEE-D, 123:633–640, 1979. 21. D.W. Clarke and C. Mohtadi. Properties of generalized predictive control. Automatica, 25(6):859–875, 1989. 22. D.W. Clarke, C. Mothadi, and P.S. Tuffs. Generalized predictive control. Part I: The basic algorithm. Part II: Extensions and interpretations. Automatica, 23(2):137–160, 1987. 23. D.W. Clarke and R. Scattolini. Constrained receding-horizon predictive control. Proceedings IEE, 138(4):347–354, 1991. 24. G. Cohen and G. Coon. Theoretical consideration of retarded control. In Trans. ASME, pp. 827–834, 1975. 25. C.R. Cutler and B.L. Ramaker. Dynamic matrix control - A computer control algorithm. In AIChE 86th National Meeting, Houston, TX, 1988. 26. E.B. Dahlin. Designing and tuning digital controllers. Instruments and Control Systems, 41:77–83, 1968. 27. A. Datta and J. Ochoa. Adaptive internal model control: Design and stability analysis. Automatica, 32(2):261–266, 1996. 28. J. Dejonckheere, S.M. Disney, M.R. Lambrecht, and D.R. Towill. Transfer function analysis of forecasting induced bullwhip in supply chains. International Journal of Production Economics, 78:133–144, 2002. 29. J. Delgado and C. Bordons. Modelado y simulaci´on de una planta solar de climatizaci´on (in Spanish). PFC, ESI, Seville University, 2000. 30. P. Deshpande and R. Ash. Elements of Computer Process Control. ISA, USA, 1981. 31. F.J. Doyle, R.K. Pearson, and B.A. Ogunnaike. Identification and Control Using Volterra Models. Springer, Berlin, 2001. 32. C.G. Economou and M. Morari. Internal model control 6: Multiloop design. Ind. Eng. Chem. Process Des. Dev., 25:411–419, 1986. 33. W. Feng. On practical stability of linear multivariable feedback systems with time delays. Automatica, 27:389–394, 1991. 34. A. Feurer and G.C. Goodwin. Control System Fundamentals: Chapter 12. CRC Press, 2000. 35. C.E. Garcia and M. Morari. Internal model control 1: A unified review and some new results. Ind. Eng. Chem. Process Des. Dev., 21:308–316, 1984. 36. M. Gevers. Connecting identification and robust control: A new challenger. In Plenary lecture, 9th IFAC Symp. on Identification and System Parameter Estimation, pp. 1–10, Budapest, 1991. 37. M. Gevers. Idenfication for control. Annual Reviews in Control, 20:95–106, 1996. 38. J. Gomez-Ortega ´ and E.F. Camacho. Neural network MBPC for mobile robots path tracking. Robotics and Computer Integrated Manufacturing Journal, 11(4):271– 278, December 1994.

References

453

39. G. Goodwin and K. Sin. Adaptive Filtering Prediction and Control. Prentice Hall, Englewood Cliffs, NJ, 1984. 40. S.M. Guo, W. Wang, and L.S. Shieh. Discretisation of two degree-of-freedom controller and system with state, and output delays. IEE Proceedings. Control Theory and Applications, 147(1):87–96, January 2000. 41. T. Hagglung. An industrial dead-time compensating PI controller. Control Engineering Practice, 4(6):749–756, 1996. 42. C.C. Hang, Q-G. Wang, and X-P. Yang. A modified Smith predictor for a process with an integrator and long dead time. Ind. Eng. Chem. Res., 42:484–489, 2003. 43. B. Harvey. The New Russian Space Programme: From Competition to Collaboration. John Wiley and Sons, Chichester, England, 1996. 44. W.K. Ho, T.H. Lee, and O.P. Gan. Tuning of multiloop PID controllers based on gain and phase margin specifications. Ind. Eng. Chem. Res., 36:2231–2238, 1997. 45. B. Holt and M. Morari. Design of resilient processing plants. V: The effect of dead time on dynamics resilience. Chem. Eng. Science, 40(7):1229–1237, 1985. 46. A. Ingimundarson and T. H¨agglund. Robust tuning procedures of dead-time compensating controllers. Control Engineering Practice, 9:1195–1208, 2001. 47. N.F. Jerome and W.H. Ray. High performance multivariable control strategies for systems having time delays. AIChE Journal, 32(6):914–931, 1986. 48. I. Kaya. Obtaining controller parameters for a new PI-PD Smith predictor using auto tuning. J. of Process Control, 13:465–472, 2003. 49. I. Kaya. Two-degree-of-freedom IMC structure and controller design for integrating processes based on gain and phase-margin specifications. IEE Proc. Control Theory Appl., 151(4):401–407, 2004. 50. R.M.C. De Keyser and A.R. Van Cuawenberghe. Extended prediction selfadaptive control. In IFAC Symposium on Identification and System Parameter Estimation, York, UK, pp. 1317–1322, 1985. 51. P.P. Khargonekar and A. Tikku. Randomized algorithms for robust control analysis have polynomial complexity. In Proc. Conf. on Decision and Control, USA, December 1996. 52. B. Kouvaritakis, J.A. Rossiter, and A.O.T. Chang. Stable generalized predictive control. IEE-D, 139:349–362, 1992. 53. H. Kwak, S. Whan, and I-B. Lee. Modified Smith predictor for integrating processes: comparisons and proposition. Ind. Eng. Chem. Res., 40:1500–1506, 2001. 54. I.D. Landau and G. Zito. Digital Control System. Spinger, Berlin, 2006. 55. J.H. Lee, M. Morari, and C.E. Garcia. State space interpretation of model predictive control. Automatica, 30(4):707–714, 1994. 56. T.H. Lee, Q.G. Wang, and K.K. Tan. Robust Smith predictor controller for uncertain delay systems. AIChE Journal, 42(4):1033–1040, 1996. 57. M.A. Lelic and P.E. Wellstead. Generalized pole placement self tuning controller. Part 1: Basic algorithm. International J. of Control, 46(2):547–568, 1987. 58. F. Leonard. Delay approximation comparison in a CACSD context. In Proceedings of IFAC-Workshop on Linear Time Delay Systems (LDTS’98), pp. 99–104, Grenoble, France, July 1998. 59. D. Limon-Marruedo, J.E. Normey-Rico, D.J. Pagano, and J. Aracil. Stability of saturated dead-time compensating PI controllers for uncertain dead-time systems. In Proceedings of ECC99, Germany, August 1999. 60. D.A. Linkers and M. Mahfonf. Advances in Model-Based Predictive Control, chapter Generalized Predictive Control in Clinical Anaesthesia. Oxford University Press, 1994.

454

References

61. T. Liu, T. Cai, Y.Z. Gu, D.Y., and W.D. Zhang. New modified Smith predictor scheme for integrating and unstable processes with time delay. IEE Proc. Control Theory Appl., 152(2):238–246, 2005. 62. L. Ljung. System Identification. Theory for the User. Prentice Hall, Englewood Cliffs, NJ, 1987. 63. X. Lu, Y.-S. Yang, Q.-G. Wang, and W.-X. Zheng. A double two-degree-offreedom control scheme for improved control of unstable delay processes. J. of Process Control, 15(5):605–614, 2005. 64. W. Luyben. Simple method for tuning SISO controllers in multivariable systems. Ind. Eng. Chem. Process Des. Dev., 25:654–660, 1986. 65. J.M. Maciejowski. Predictive Control with Constraints. Prentice Hall, Harlow, 2001. 66. R. Mamat and P.J. Fleming. Method for on-line identification of a first order plus dead-time process model. Electronic Letters, 31(15):1297–1298, 1995. 67. M.R. Matauˇsek and A.D. Mici´c. A modified Smith predictor for controlling a process with a integrator and long dead time. IEEE Trans. on Automatic Control, 41(8):1199–1203, August 1996. 68. M.R. Matauˇsek and A.D. Mici´c. On the modified Smith predictor for controlling a process with a integrator and long dead-time. IEEE Trans. on Automatic Control, 44(8):1603–1606, 1999. 69. M. Morari. Advances in Model-Based Predictive Control, chapter Model Predictive Control: Multivariable Control Technique of Choice in the 1990s? Oxford University Press, 1994. 70. M. Morari and E. Zafiriou. Robust Process Control. Prentice Hall, Englewood Cliffs, NJ, 1989. 71. L. Moreno, S. Garrido, and C. Balaguer. Ingenieria de Control. Ariel Ciencia, 2003. 72. W.L. Nelson. Continuous steering-function control of robot carts. IEEE Trans. on Industrial Electronics, 36(3):330–337, August 1989. 73. R. Nemiroff and J. Bonnell. NASA web site. http://www.astronet.ru, 2005. 74. J.E. Normey-Rico. Predicci´on para Control. PhD thesis, Escuela Sup. de Ingenieros, Univ. de Sevilla, 1999. 75. J.E. Normey-Rico, C. Bordons, M. Berenguel, and E.F. Camacho. A robust adaptive dead-time compensator with application to a solar collector field. In Proceedings of IFAC-Workshop on Linear Time Delay Systems (LDTS’98), pp. 105–110, Grenoble, France, July 1998. 76. J.E. Normey-Rico, C. Bordons, and E.F. Camacho. Improving the robustness of dead-time compensating PI controllers. Control Engineering Practice, 5(6):801– 810, 1997. 77. J.E. Normey-Rico and E.F. Camacho. Dead-time compensators: A unified approach. In Proceedings of IFAC-LDTS’98, pp. 141–146, Grenoble, France, July 1998. 78. J.E. Normey-Rico and E.F. Camacho. Prediction for control. In Proceedings of IFAC Conference on System Structure and Control (SSC’98), pp. 209–215, Nantes, France, July 1998. 79. J.E. Normey-Rico and E.F. Camacho. Robust tuning of dead-time compensators for processes with an integrator and long dead time. IEEE Trans. on Automatic Control, 44(8):1597–1603, August 1999. 80. J.E. Normey-Rico and E.F. Camacho. Robustness effects of a prefilter in Smith predictor based generalised predictive controller. IEE Proceedings, Control Theory and Applications, 146:179–185, 1999.

References

455

81. J.E. Normey-Rico and E.F. Camacho. Smith predictor and modifications: A comparative study. In Proceedings of ECC99, Germany, August 1999. 82. J.E. Normey-Rico and E.F. Camacho. Multivariable generalised predictive controller based on the Smith predictor. IEE Proceedings, Control Theory and Applications, 147:538–546, 2000. 83. J.E. Normey-Rico and E.F. Camacho. Robust design of GPC for processes with time delay. International Journal of Robust and Nonlinear Control, 10:1105–1127, 2000. 84. J.E. Normey-Rico and E.F. Camacho. A unified approach to design dead-time compensators for stable and integrative processes with dead-time. IEEE Trans. on Automatic Control, 47(2):299–305, February 2002. 85. J.E. Normey-Rico, E.F. Camacho, and C. Bordons. Robustness analysis of generalized predictive controllers for industrial processes. In Proceedings of the 2nd Portuguese Conference on Automatic Control, pp. 309–314, Porto, Portugal, 1996. 86. J.E. Normey-Rico, E.F. Camacho, and J. Gomez-Ortega. ´ Robustez e predic¸ao em controladores preditivos generalizados. In Proceedings of CBA’98, pp. 157–162, Uberlandia, Brazil, September 1998. 87. J.E. Normey-Rico, J. Gomez-Ortega, ´ I. Alcala-Torrego, and E.F. Camacho. Low time-consuming implementation of predictive path-tracking control for a synchro-drive mobile robot. In Proceedings of IEEE 5th Inernational Workshop on Advanced Motion Control (AMC 98), pp. 350–355, Coimbra, Portugal, June 1998. 88. J.E. Normey-Rico, J. Gomez-Ortega, ´ and E.F. Camacho. A Smith predictor based generalized predictive controller for mobile robot path tracking. Control Engineering Practice, 7:729–740, 1999. 89. J.E. Normey-Rico, A. Merino, S. Cristea, and C. de Prada. Robust dead-time compensation of a evaporation process in sugar production. In Proc. of the XVI IFAC World Congress, Prague, 2005. 90. A. Nu´ nez-Reyes, ˜ J.E. Normey-Rico, C. Bordons, and E.F. Camacho. A Smith predictive based MPC in a solar air conditioning plant. Journal of Process Control, 15:1–10, 2005. 91. B.A. Ogunnaike, J.P. Lemaire, M. Morari, and W.H. Ray. Advanced multivariable control of a pilot scale distillation column. AIChE Journal, 29(4):632–642, 1983. 92. B.A. Ogunnaike and W.H. Ray. Multivariable controller design for linear systems having multiple time delays. AIChE Journal, 25:1043–1060, 1979. 93. B.A. Ogunnaike and W.H. Ray. Process Dynamics, Modeling, and Control. Oxford University Press, 1994. 94. A. Ollero and O. Amidi. Predictive path tracking of mobile robots. aplications to the CMU Navlab. In Proc. IEEE Fifth Int. Conf. on Advanced Robotics, pp. 1081–1086, Pisa, 1991. 95. A. Ollero, A. Garc´ıa-Cerezo, and J.L. Mart´ınez. Fuzzy supervisory path tracking of mobile robots. In Proc. First IFAC Int. Workshop, Hampshire, 1993. 96. D. Pagano, J.E. Normey-Rico, and A.L.D. Franco. Stability analysis of a modified Smith predictor for integrative plants with dead-time and saturations. In Proceedings of the 40th IEEE-CDC, pp. 1855–1860, Orlando, FL, December 2001. 97. Z.J. Palmor. Stability properties of Smith dead time compensator controller. Int. J. Control, 32:937–949, 1980. 98. Z.J. Palmor. Properties of optimal stochastic control systems with dead-time. Automatica, 18:107–116, 1982.

456

References

99. Z.J. Palmor. The Control Handbook. Time Delay Compensation: Smith Predictor and its Modifications. CRC Press and IEEE Press, 1996. 100. Z.J. Palmor and Y. Halevi. On the design and properties of multivariable dead time compensators. Automatica, 19:255–264, 1983. 101. Z.J. Palmor and Y. Halevi. Robustness properties of sampled-data systems with dead time compensators. Automatica, 26:637–640, 1990. 102. Z.J. Palmor and D.V. Powers. Improved dead time compensator controllers. AIChE-Journal, 31:215–221, 1985. 103. Z.J. Palmor and R. Shinnar. Design of sampled data controllers. Ind. Eng. Chem. Process Des. Dev., 18:8–30, 1979. 104. J.R. Partington. Some frequency-domain approaches to the model reduction of delay systems. In IFAC Workshop on Time Delay Systems. Rocquencourt (France), 2003. 105. E. Perea-Lopez, B.E. Ydstie, and I.E. Grossmann. A model predictive control strategy for supply chain optimization. 27(8-9):1201–1218, 2003. 106. D.M. Prett and M. Morari. Shell Process Control Workshop. Butterworths, 1987. 107. G.P. Rangai and P.R. Krisshnaswamy. Estimating second-order dead time paramenters from underdamped process transients. Chemical Engineering Science, 51(7):1149–1155, 1996. 108. A.S. Rao and M. Chidambaram. Smith delay compensator for multivariable non-square systems with multiple time delays. Computers and Chemical Engineering, 30:12431255, 2006. 109. J. Richalet. Industrial applications of model based predictive control. Automatica, 29(5):1251–1274, 1993. 110. J. Richalet, A. Rault, J.L. Testud, and J. Papon. Algorithm control for industrial processes. In Proc. 4th IFAC Symp. on Identification and System Parameter Estimation, Tbilisi, USSR, 1976. 111. J. Richalet, A. Rault, J.L. Testud, and J. Papon. Model predictive heuristic control: Application to industrial processes. Automatica, 14(2):413–428, 1978. 112. J.P. Richard. Time-delay systems: An overview of some recent advances and open problems. Automatica, 39:1667–1694, 2003. 113. D.E. Rivera, M. Morari, and S. Skogestad. Internal model control 4. PID controller design. Ind. Eng. Chem. Process Des. Dev., 25:252–265, 1986. 114. B.D. Robinson and D.W. Clarke. Robustness effects of a prefilter in generalized predictive control. Proceedings IEE, Part D, 138:2–8, 1991. 115. J.A. Rossiter. Model-Based Predictive Control: A practical Approach. CRC Press, 2003. 116. W.J. Rugh. Nonlinear System Theory. The Volterra/Wiener Approach. The John Hopkins University Press, Baltimore, MD, 1981. 117. C. Santacesaria and R. Scattolini. Easy tuning of Smith predictor in presence of delay uncertainty. Automatica, 29:1595–1597, 1993. 118. M.S. Santina, A.R. Stubberud, and G.H. Hostetter. Control System Fundamentals: Chapter 11. CRC Press, 2000. 119. J.D. Schwartz and D.E. Rivera. Control relevant demand modeling for supply chain management. In Proceedings of 14th IFAC Symposium on System Identification (SYSID 2006). Newcastle, Australia, 2006. 120. C. Sheffer-Dutra. Controle Predictivo Multiobjetivo. PhD thesis, Universidade Federal de Santa Catarina, 2002. 121. G.J. Silva, A. Datta, and S.P. Bhattacharyya. PID Controllers for Time Delay Systems. Birkhauser, Basel, 2004.

References

457

122. D. Simchi-Levi, P. Kaminsky, and E. Simchi-Levi. Managing the Supply Chain. McGraw-Hill, New York, 2004. 123. S. Skogestad. Simple analytic rules for model reduction and PID controller tuning. J. of Process Control, 13:291–309, 2003. 124. S. Skogestad and I. Postlethwaite. Multivariable Feedback Control. Analysis and Design. Wiley, New York, 2005. 125. O.J.M. Smith. Closed control of loops with dead time. Chem. Eng. Progress, 53:217–219, 1957. 126. O.J.M. Smith. Feedback Control Systems. Mc Graw-Hill, New York, 1958. 127. H. Takatsu, T. Itoh, and M. Araki. Future needs for the control theory in industries-report and topics of the control technology survey in the japanese industry. Journal of Process Control, 8(5-6):369–374, 1998. 128. R. Tempo, E.W. Bai, and F. Dabbene. Probabilistic robustness analysis: Explicit bounds for the minimum number of sampling points. In Proc. Conf. on Decision and Control, USA, December 1996. 129. R. Tempo, G. Calafiore, and F. Dabbene. Randomized Algorithms for Analysis and Control of Uncertain Systems. Spinger, London, 2005. 130. B.C. Torrico and J.E. Normey-Rico. 2DOF discrete dead-time compensators for stable and integrative processes with dead time. Journal of Process Control, 15:341–352, 2005. 131. S. Tzafestas, G. Kapsiotis, and E. Kyriannakis. Model-based predictive control for generalized production planning problems. Comput. Ind., 34(2):201–210, 1997. 132. M. Vidyasagar. Nonlinear Modeling, chapter Statistical Learning in Control and Matrix Theory, pp. 177–207. John Willey, New York, 1996. 133. M. Vidyasagar. Randomized algorithms for robust controller synthesis using statistical learning theory. Automatica, 37(10):1515–1528, 2001. 134. Q.G. Wang and Y. Zhang. Robust identification of continuos systems with dead time from step responses. Automatica, 37:377–390, 2001. 135. K. Watanabe and M. Ito. A process-model control for linear systems with delay. IEEE Trans. on Automatic Control, 26(6):1261–1269, 1981. 136. R.K. Wood and M.W. Berry. Terminal composition control of a binary distillation column. Chem. Eng. Science, 28(1):707–721, 1973. 137. T. Yoon and D. Clarke. Observer design in receding-horizon control. Int. Journal of Control, 2:171–191, 1995. 138. Q.-C. Zhong and H.X. Li. Control of integral processes with dead time. Part 3: Dead-beat disturbance response. IEEE Trans. on Automatic Control, 48(1):153 –159, 2003. 139. Q.-C. Zhong and L. Mirkin. Control of integral processes with dead time. Part 2: Quantitative analysis. IEE Proc. Control Theory Appl., 149(4):291–296, 2002. 140. Q.-C. Zhong and J.E. Normey-Rico. Control of integral processes with dead time. Part 1: Disturbance observer-based 2DOF control scheme. Control Theory and Applications, IEE Proceedings, 149(4):285–290, July 2002. 141. J.G. Ziegler and N.B. Nichols. Optimum settings for automatic controllers. Trans. ASME, 64:759–768, 1942.

Index

2DOF Controller, 140, 364 IMC, 185 PID, 101, 103 SP, 149

Cost Function, 285, 379, 430 Horizon, 282 CRHPC, 279 Cut frequency, 159

Achievable Performance, 115 Response, 361 Antialiasing filter, 231

Dahlin controller, 235 Damping coefficient, 35 Dead-beat controller, 235 Dead-time, 15 Approximation, 159 Compensation, 132, 159 Dominant process, 97 Effective, 345 Equivalent, 35 Estimation error, 41, 144, 416 Free, 355 Free model, 386 Identification, 73 Model, 131 Multiple, 344, 351 Normalised, 39 Variable, 11 Decoupled dynamic compensation, 350 Decoupling, 361 Delay margin, 45 Derivative action, 88 Filter, 88 Diophantine equation, 379 Direct Discrete design, 232 Synthesis, 233 Discrete

Bandwidth, 46 Batch processes, 278 Bias, 77 Block diagram, 346 CARIMA Model, 281, 379, 411 Ceramic dryer, 122 Characteristic equation, 350 Closed-loop Predictor, 48 Time constant, 115 Constraints, 278, 411, 414 Hard, 399 Control Effort, 273, 278 Horizon, 278 Law, 279 Controllability ratio, 39 Controllable canonical form, 30 Controller Implementation, 196, 208, 238, 262 Controller coefficients, 285

460

Index

Dead time, 25 Model, 68, 376 Signals, 25 State-space representation, 31 System, 230 Discretisation, 244 Distillation column, 400 Disturbance Estimator, 177, 181 Model, 274, 275 Observer, 238 Rejection, 95, 137, 172, 177, 181, 203, 206, 239, 396 Response, 236 DMC, 271, 418 Dominant Dead-time process, 156 Pole, 41 Time constant, 41 DTC, 271 DTC-NMPC, 421 Dynamic compensation, 134 Euler approximation, 244 Extended least squares estimator, 79 Fast model, 131, 172, 193, 353, 355, 435 Feedforward controller, 177, 181, 206 Filtered Smith predictor, 165, 412 FOPDT model, 35, 58, 59, 118, 119, 144, 154, 167, 412 Forgetting factor, 72 FPPI controller, 167 Free response, 380, 414 Frequency response, 21 Future control signals, 273 Gain margin, 45 GPC, 430, 432 High-order system, 15 Hold, 27, 230 Horizon, 285, 379 Prediction, 273 Receding, 272 Identification Black box, 56 Dead-time, 73

Grey box, 56 Nonlinear, 417 IMC, 92, 185, 359 Tuning, 119 Impulse response, 56 Incremental model, 33, 63 Input Dead time, 30 Sequence, 69 Sequence choice, 71 Integral time, 353 Integrative process, 17, 45, 58, 103, 148, 194, 203, 213, 365, 405 Internal stability, 192, 196, 203, 206, 347, 435 IPDT Model, 36, 117, 197, 210, 213 ISE, 432 Lag-dominant process, 58, 97, 117 Lambda controller, 235 Least squares estimator, 69 Linear Convolution, 418 Prediction, 87 Linearisation, 33 Lookahead, 405 MAC, 418 Manufacturing supply chain, 26, 241 Matrix transfer function, 348, 377 Maximum Dead-time-estimation error, 201 Sensitive, 114 Slope, 58 MIMO Primary controller, 359, 364 System, 271, 344 Uncertainty representation, 389 MIMO-DTC, 348, 375, 386, 387 MIMO-DTC-GPC, 387, 394, 398, 400 MIMO-GPC, 375, 386, 387, 394, 400 MIMO-IMC, 398 Minimal dead time, 359 Mobile robot, 125, 401 Model validation, 67 Modelling error, 40, 110, 141, 252, 388 Additive, 40 Multiplicative, 40

Index Modified fast model, 172, 193 MPC, 271, 278, 418 Multiple dead times, 379 Multiplicative Modelling error, 43 Uncertainty bound, 110 Multivariable transfer matrix, 344 MVC, 430 NARMAX models, 418 Natural frequency, 35 NDTC, 421 Noise Band, 58 Filter, 61 White, 68, 77, 276, 282 Nominal Model, 40, 159, 389 Nonlinear models Discrete, 417 Hammerstein, 419 State space models, 419 Volterra, 418 Wiener, 419 Nonlinear processes, 409, 417 Nonsquare systems, 346 Normalised frequency, 42 Nyquist criterion, 110 Nyquist diagram, 141 Objective function, 272, 278 Open-loop predictor, 48 Operating point, 32, 59, 63, 417 Optimal predictor, 380 Optimisation, 414 Pad´e approximation, 21, 92 Parallel PID, 87 Path tracking, 125, 401 Phase margin, 21, 45, 115, 215 PI controller, 50, 149 PID controller Series, 87, 100, 119 Simple tuning rules, 114 Tuning, 154 PID controllers Analysis, 85 Pole, 345 Pole-zero cancellation, 92, 196, 233

461

Polynomial approximations, 21 Polynomial matrix, 377, 379 PPI controller, 167 PRBS, 71 Amplitude, 71 Frequency, 71 Predicted control reference, 273 Prediction, 132, 281, 349, 351, 380 Horizon, 278 Model, 274 Predictive PI controller, 156 Primary controller, 386 Pulse duration, 71 Quadratic Cost, 278 Index, 66 Programming, 414 Sequential programming, 422 Ramp disturbance, 185 Random disturbances, 77 Reaction curve, 117 Rearrangement test, 359, 377 Recursive least squares, 72 Reference Filter, 101, 103, 149 Tracking, 137 Trajectory, 278 Regression vector, 68 Residence time, 63 Response Forced, 277 Free, 277, 297 Robust Control, 122 Performance, 201 PID tuning, 98 Stability, 198, 238, 393, 394 Robustness, 110, 137, 141, 156, 159, 165, 172, 198, 203, 206, 215, 236, 238, 251, 252, 258, 279, 369, 388, 394, 416, 432 Robustness filter, 396, 435 Sampled-data systems, 230 Sampler, 27, 230 Sampling time, 231, 258 Choice, 258

462

Index

Saturations, 412 Set-point response, 236 Single dead-time, 348 Singular value, 393 Sinusoidal disturbance, 185, 244 SISO system, 271, 345 Smith predictor, 48, 131, 432 Drawbacks, 137 Equivalent controller, 91 Properties, 132 Structure, 50, 132 Tuning, 154 SOIPDT Model, 36, 210, 213 Solar plant, 11, 332 SOPDT Model, 35, 59, 119 Square systems, 346 Stability, 349 Robust, 110, 140, 184, 215, 221, 327, 389 Stable process, 32 Standard PID, 87, 117, 118 State space model, 28 Static gain, 15, 35 Steady state, 56 Step Disturbance, 185 Response, 56 Test, 32 Step test, 58 Structured

Singular value, 393 Uncertainties, 395 Sugar production, 16 Tank reactor, 377 Taylor series expansion, 21, 33 Temperature control, 122 Test signals, 56 Time constant, 15, 353 Equivalent, 35 Transfer function, 275 Tustin approximation, 244 Uncertainties Additive, 391 Multiplicative, 391 Unstructured, 395 Unmodelled dynamics, 42, 45, 142, 199 Unstable Model, 36 Processes, 140, 192, 194, 206, 397 Variable adaptation gain, 72 Velocity gain, 17 Weighting Factor, 430 Norm, 379 Zero, 345 Ziegler−Nichols, 58 ZOH discretisation, 252, 376