NETWORK-ENABLED MONITORING AND STABLE CONTROL OF DYNAMIC SYSTEMS by POI L O O N T A N G B . Eng. (Hons.), Mechanical Engineering, University of Malaya, 1998 M . Eng., Mechanical Engineering, The National University of Singapore, 2001 A THESIS SUBMITTED IN PARTIAL F U L F I L M E N T OF T H E REQUIREMENTS FOR T H E DEGREE OF D O C T O R OF PHILOSOPHY in T H E F A C U L T Y OF G R A D U A T E STUDIES (Mechanical Engineering) T H E UNTVERSITY OF BRITISH C O L U M B I A July 2005 © Poi Loon Tang, 2005 Abstract The integration of computers, communication, and control in modern distributed systems such as intelligent transit systems and industrial facilities has garnered a great deal of attention in recent years. This thesis presents an investigation into basic research, technology development, and implementation of monitoring and control strategies for networked-enabled dynamical systems. In view of the hierarchical nature of these systems, the thesis focuses on two important system layers; namely, networked control systems within the direct-control (servo) layer, and remote monitoring and supervisory control within the supervisory-layer. In the present work, a networked control system ( N C S ) comprises the traditional components of a control system such as a plant, sensors, actuators, controllers, and signal conditioning and modification devices, but may be geographically distributed and linked through a communication network. In particular, in an N C S , the traditional feedback control loops are closed through a real-time communication network. A primary objective of the present thesis is to investigate, analyze, develop, implement and test stable control strategies to overcome the transmission problems between sensors, actuators, and controllers in an N C S ; specifically, non-deterministic delay, losses, vacant sampling, and mis-synchronization of data/information. The term networked control is used in this thesis to mean the control of a networked system, and a networked system with a controller as an integral part is an N C S . In this thesis, a new networked control strategy is developed which takes advantage of the potential capability of constrained M o d e l Predictive Control ( M P C ) to compensate for anticipated data transmission problems. The constructive and computationally inexpensive strategy, which is developed here, uses predictions of future control actions and estimations of possibly erroneous sensory signals, to maintain good performance and stability of a closed-loop N C S , through an innovative method of information buffering. Network and computational loads are effectively minimized by incorporating variable prediction horizons. Performance is further improved through adaptive weight sequencing enhancements. The analytical issues of system stability of the new networked control strategy are rigorously treated in the thesis. The analysis is carried out in two stages. In the first stage, prefect state measurement is assumed to develop the necessary and sufficient conditions for guaranteeing closed-loop asymptotic stability while utilizing predicted future control actions ii ABSTRACT that are suboptimal. Stability is achieved in the sense of Lyapunov by imposing a terminal cost and bounding it without end constraints, and projecting the instantaneous states to the terminal states. Feasibility, which in turn implies stability, is proven in the context of this suboptimal control strategy. The stability surfaces generated from the resulting theorems are particularly useful as design guidelines to determine the effective worst-case delay that can be sustained by the networked control strategy. The second stage of stability analysis assumes imperfect state measurement with the purpose of determining the amount of deviation between the actual states and the estimated states that can be sustained in stable manner by the developed networked control strategy. This is accomplished by establishing bounds for the evolution of future inputs and states, employing the concept of perturbation sensitivity in nonlinear programming, and based on Lyapunov's second method. The theorems that result from the second analytical stage serve as a precise criterion in the design of extended state observers for compensating possible transmission problems between sensors and controllers of a networked system. The functionality of a networked control system may be further enhanced by integrating the capability of remote monitoring and supervisory control into the upper layers of the hierarchy of the system. A s a contribution in this direction, a framework for developing a universal and scalable network infrastructure for web-based monitoring and supervisory control of dynamic systems is developed in the present work. Practical implementation of this framework is detailed, using a low cost and flexible two-tier client-server architecture, where a user is able to remotely carry out a variety of tasks including system operation, experimentation, process monitoring and supervision, task scheduling, system reconfiguration and tuning, control, and safety/emergency routines, through a web-browser interface. A single web-server provides smooth information flow using a robust and intelligent scheduling scheme. The flexibility and modularity of the developed network architecture provide the rationale for further incorporation of a multi-layered intelligent supervisory control structure with the objective of on-line improvement of the performance of a process. A remote supervisor, which incorporates knowledge-based decision making, continuously monitors the performance of the process to infer the best adaptive controller (and the best tuning actions, i f needed) for the process under the existing conditions. The strategies of networked-enabled monitoring and feedback control, as developed i n the present work have been implemented on an industrial fish-processing machine using an Ethernet communication network. The developed and analyzed technologies are thoroughly evaluated and validated through experimentation under a variety of operating conditions in real-time, and are demonstrated to be practical, beneficial, and technically sound. iii Table of Contents Abstract ii Table of Contents iv List of Tables viii List of Figures ix Nomenclature xiv Acknowledgment xviii Chapter 1 Introduction 1 1.1 Goals of the Research 4 1.2 Scope of the Study 4 1.3 Related W o r k 6 1.3.1 Networked Control Systems 6 1.3.2 M o d e l Predictive Control 9 1.3.3 Stability in M o d e l Predictive Control 12 1.3.4 Remote Monitoring and Supervisory Control 14 1.4 Contributions and Organization o f the Thesis Chapter 2 Control Network Architecture and System Modeling 15 18 2.1 Control Network Architecture 18 2.2 C l o c k Synchronization Algorithm 22 2.2.1 Existing Algorithms 22 2.2.2 Approach 23 2.3 Characteristics of Ethernet Communication 26 2.4 Modeling of the Electro-hydraulic Manipulator 33 2.4.1 System Overview 33 2.4.2 System Identification and M o d e l Validation 36 2.5 Summary Chapter 3 3.1 45 Predictive Networked Control with Future Input Buffering 47 The Networked Control Strategy 47 3.1.1 48 Transparency of Transmission Delays iv TABLE OF CONTENTS 3.1.2 M i n i m u m Effort Estimator 50 3.1.3 M u l t i v a r i a t e Predictive Control 52 3.1.4 Variable Prediction Horizon 54 3.1.5 Online Parameter Adaptation 56 3.1.6 Adaptive Weighting Sequences 57 3.1.7 Actuator Buffering 58 3.2 Implementation Issues 59 3.3 Real-time Experimental Evaluation 61 3.3.1 Nominal Network Load 61 3.3.2 Variable Network Load 62 3.3.3 Packet Loss 63 3.3.4 Effect of Weighting Sequence 63 3.3.5 Driving Bandwidth of the System 64 3.4 Summary Chapter 4 Stability of Predicted-Input Control 72 73 4.1 The Predictive Control Strategy for Networked Systems - Revisited 73 4.2 77 4.3 4.4 State-space M P C formulation 4.2.1 The Regulator Problem 77 4.2.2 The Reference Tracking Problem 81 Stability Analysis 83 4.3.1 Preliminaries 83 4.3.2 Maintaining Feasibility with Suboptimal M P C 88 4.3.3 Establishing the Bounds 89 4.3.4 Computing the Lower and Upper Bounds 92 4.3.5 M a i n Stability Results 94 Evaluation of the Stability Boundaries 96 4.4.1 Imposing Constraints 97 4.4.2 Stability Surfaces of the N C S 99 4.5 Implementation Issues 102 4.6 Real-time Experimental Evaluation 104 4.6.1 Stability Evaluation under Transmission Delay 105 4.6.2 Stability Evaluation under Packet Loss 106 v TABLE OF 4.7 Summary Chapter 5 Stability Under Imperfect State Measurements CONTENTS 114 115 5.1 Problem Description 116 5.2 Stability Basis 118 5.3 Sensitivity of State Estimation Errors 119 5.4 M a i n Stability Results 124 5.5 Evaluation of Stability Boundaries 129 5.6 Extension to M P C with Inequality Constraints 135 5.7 Summary 136 Chapter 6 Infrastructure for Web-based Remote System Monitoring 137 6.1 Infrastructure Overview 138 6.2 Hardware Networking 139 6.3 Client-Server Software Architecture 140 6.3.1 The H T T P Server and User Authentication 142 6.3.2 User Scheduling and Data F l o w Management 143 6.3.3 Camera Control Server 148 6.3.4 The User Interface Client 148 6.3.5 Audio and Video Feedback 149 6.4 A Practical Demonstration 150 6.5 Summary 154 Chapter 7 Remote Supervisory Control Systems 155 7.1 Hierarchical Control Architecture 156 7.2 Distributed Client-Server Supervisory Control Architecture 158 7.3 Model-Referenced Fuzzy Control 162 7.4 Model-Referenced Adaptive Fuzzy Control 166 7.5 Intelligent Switching of Adaptive Controllers 171 7.6 Experimental Case Studies 173 7.7 Summary 180 Chapter 8 Conclusion 181 8.1 Primary Contributions 181 8.2 184 Limitations and Suggested Future Research Bibliography 186 vi TABLE OF CONTENTS Appendix A Linear Matrix Inequalities 194 Appendix B Multi-parametric Quadratic Programming 197 B.l Preliminaries 197 B.2 The M p Q P Algorithm 198 B.3 Off-line Binary Search Tree Algorithm 201 B.3.1 Methodology B.3.2 Computational Complexity B.4 On-line Traversing of the Binary Search Tree 202 207 208 vii List of Tables 2.1 Comparison of four typical communication networks 5.1 The algorithm for determining the stable upper bound of the state estimation error of the developed N C S - M P C control strategy 129 The types of messages for communication between the middle server and the control server 143 The types of messages for communication between the middle server and the user interface applet 145 6.3 The command strings for camera manipulation 148 7.1 Zone polarities of the model tracking response 164 7.2 Anticipated corrective action corresponding to each zone 164 7.3 The M R F C rule base 166 7.4 The six indices of deviation 168 7.5 The rule base for the M R A F C 171 7.6 The intelligent selector rule base for adaptive controller switching 173 7.7 Desired performance attributes 174 7.8 Performance comparison among the four different adaptive states 175 B. 1 Pseudocode for building the binary search tree of an M P C controller 205 B.2 A n excerpt from the text format for saving a binary search tree of an M P C controller 206 Comparison of the computation time requirements for building binary search trees subjected to different complexities of an M P C controller for a 4-states-l-input system 207 Pseudocode for traversing and sequential searching of the binary search tree during controller operation 208 6.1 6.2 B.3 B.4 viii 27 List of Figures 1.1 A generic factory network 2 1.2 Additional redundancy in a fault-tolerant system 3 2.1 Simplified data flow layout of the developed control network architecture 19 2.2 Schematic diagram of the end-to-end client-server control network architecture.. . 20 2.3 Communication delay in Ethernet networks, (a) Within a L A N ; (b) Between the University of British Columbia and the University of Toronto; and (c) Between the University of British Columbia and the National University of Singapore. . . . 31 Sine wave tracking in Ethernet networks (circles - transmitted; and solid-squares - received), (a) Direct transfer within a L A N ; (b) Using data "juggling" between intermediate nodes; and (c) Loop transfer with remote echo server at the National University of Singapore 32 The Intelligent Iron Butcher, (a) A view of the entire machine; and (b) Close-up view of the electro-hydraulic manipulator 34 2.6 Schematic diagram of the electro-hydraulic manipulator 35 2.7 Pretreated input and position data collected for transfer function model identification. Figure shows the region used for correlation analysis and model cross-validation 39 2.8 Scaled impulse response estimate for transfer function model identification 39 2.9 M o d e l fitting for transfer function model identification 40 2.10 Residual analysis for transfer function model identification. Grey enclosures correspond to a confidence level of 99%. (a) Correlation function of residuals from output; and (b) Cross-correlation function between input and residuals from output 40 Transfer function model cross-validation through comparison of predicted scaled output of the model (thin-line) with the measured scaled output (thick-line) in the region indicated in Figure 2.7 41 Bode plot of the identified transfer function model 41 2.4 2.5 2.11 2.12 ix LIST OF 2.13 2.14 FIGURES Pretreated state response data collected for the state-space model identification. (a) Position response; (b) Velocity response; (c) Head-side pressure; and (d) R o d side pressure 43 Residual analysis for state-space model identification. Horizontal dashed bars indicate 99% confidence levels, (a) Autocorrelation of residuals for state (b) Cross-correlation function between input and residuals from state (c) Autocorrelation of residuals for state x ; 2 between input and residuals from state x ; x; x x,; (d) Cross-correlation function (e) Autocorrelation of residuals for 2 state x ; (f) Cross-correlation function between input and residuals from state x ; 3 3 (g) Autocorrelation of residuals for state x ; 4 and (h) Cross-correlation function between input and residuals from state x 44 4 2.15 State-space model cross-validation through comparison of simulated scaled response of the model (thin-line) with the measured scaled response (thick-line), (a) State x ; (b) State x ; (c) State x ; and (d) State x 45 3.1 The developed networked control system ( N C S ) 48 3.2 A n illustrative example of the developed networked control strategy 49 3.3 System responses under a fixed network loading, (a) Position response (solid actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-to-actuator delay; and (f) Round-trip delay 65 3.4 Effect of the round-trip delay on the tracking performance 66 3.5 System responses under variable network loading, (a) Position response (solid actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-to-actuator delay; and (f) Round-trip delay 67 System responses under a 7.5% data loss rate, (a) Position response (solid - actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-to-actuator delay; and (f) Round-trip delay 68 System responses under a 12.5% data loss rate, (a) Position response (solid actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-to-actuator delay; and (f) Round-trip delay 69 3.8 Comparison of tracking performance over different loss rates of data packets. . . . 70 3.9 Comparison of tracking performance weighting (Q) 70 x 3.6 3.7 2 3 4 over different values of future error x LIST OF 3.10 FIGURES System response subjected to different speed settings under different levels o f network delay, (a) r = 3 ms; (b) T =11 ms; and (c) T s 21 ms 71 3.11 Achievable system speed under different levels of network delay 71 4.1 Simplified architecture of the developed N C S strategy 74 4.2 Reduced structure of the N C S for analyzing stability o f the M P C policy with future input buffering 76 rU 4.3 rtt Stability boundaries with u hm (b) = 0.20. (a) Stability surface for P - 0 . 2 5 1 ^ ; 0 Stability surface for P - U„; Q rtt (c) Comparison o f relative stability over different terminal weights for a horizon length o f 25; and (d) Comparison of relative stability over different terminal weights at x ca 4.4 Stability boundaries with u ]im - 0.20 Q stability over different (d) 4.5 100 and p = 0.99 . (a) Stability surface for P = 0.251/^; (b) Stability surface for P =U ; Q =8 ca (c) Comparison o f relative terminal weights for a horizon length o f 25; and Comparison of relative stability over different terminal weights at T = 8 . . . 102 CA Controller-to-actuator transmission delay T CA using the intermediate F I F O packet forwarding queue, (a) 1-step delay; (b) 5-step delay; and (c) 9-step delay 4.6 103 State responses and input under 6 levels of controller-to-actuator delay. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the headside of the cylinder P [psi], pressure at the rod-side of the cylinder P [psi], and h r input current u [mA]). (a) Delay free; (b) 1-step delay; (c) 3-step delay; (d) 6step delay; (e) 10-step delay; and (f) 14-step delay 108 4.7 Effect o f controller-to-actuator delay on the integrated absolute state regulation error, (cross - position; circle - velocity; square - head pressure; triangle - rod pressure; and plus - average) 109 4.8 State response curves and input under input disturbances. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P [psi], pressure at the rod-side of the cylinder P [psi], and input h r current u [mA]). (a) 3 steps of controller-to-actuator delay; and (b) 5 steps of controller-to-actuator delay 109 4.9 Asymptotic stability under 5 steps of controller-to-actuator delay and different initial conditions. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P [psi], pressure at the rodh side of the cylinder P [psi], and input current u [mA]). (a) Initial piston position r = 5 m m ; (b) Initial piston position = 2.5 m m ; (c) Initial piston position = - 2 m m ; and (d) Initial piston position = - 4 mm 110 xi LIST OF FIGURES 4.10 State response curves and input at 3 steps of controller-to-actuator delay under 9 levels of data packet loss rate. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P h [psi], pressure at the rod-side of the cylinder P [psi], and input current u [mA]). r (a) 10% loss rate; (b) 20% loss rate; (c) 30% loss rate; (d) 40% loss rate; (e) 50% loss rate; (f) 60% loss rate (g) 70% loss rate; (h) 80% loss rate; and (i) 90% loss rate Ill 4.11 Effective mean delay of data packet loss. (Each set corresponds to the pre-set queuing delay. The numbers on top of each bar in parenthesis indicate the maximum instantaneous delay recorded during experiment) 113 4.12 Effect of data packet loss rate and controller-to-actuator delay on the asymptotic convergence of the position state of the system 5.1 Variation of the maximum K z on the estimated state plane o f x -x x 2 113 with = x = 0 under a prediction horizon H = 5 and a terminal weight matrix 4 P =0-5E/oo 132 0 5.2 Variation of the maximum K B on the state plane of x -x x 2 with JC = x = 0 under 3 4 a prediction horizon H = 5 and a terminal weight matrix P = O.SU^ 132 0 5.3 The effect of P and H on stability based on the original model, (a) M a x i m u m 0 bound of K ; (b) M a x i m u m bound of K ; and (c) M a x i m u m bound of K e 5.4 B z 133 The effects of P and H on stability based on the reduced model o f the system, 0 (a) M a x i m u m bound of K ; e (b) M a x i m u m bound of K ; B and (c) M a x i m u m bound of K 134 z 6.1 The general infrastructure for collaboration among different research institutions. . 138 6.2 Simplified hardware architecture supervisory control of a system for web-based remote monitoring and 139 6.3 System component interaction and information flow 141 6.4 User interface applet for the Intelligent Iron Butcher 153 7.1 A n intelligent hierarchical structure for monitoring and control of a plant 156 7.2 Adaptive control of a remote plant through a communication network 158 7.3 The developed architecture for networked intelligent supervisory control 159 7.4 The basic control structure of the M R F C 163 xii LIST OF FIGURES 7.5 The typical response profile of reference model tracking 163 7.6 Membership functions of the antecedent variables for M R F C 165 7.7 Membership functions of the consequent variable for M R F C 165 7.8 Typical membership functions used to represent the index of deviation for MRAFC 168 7.9 Typical membership functions used for the consequent variables for M R A F C . . . . 168 7.10 Response profiles for various levels of K P 170 7.11 The antecedent membership functions for the intelligent adaptive control selector.. 172 7.12 System response without adaptation, (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response; (c) Tracking error; (d) Control input; (e) K ; (f) Kf, and (g) K 176 System response with M R A F C . (a) Adaptation state; (b) Position response (solidline: actual response; dashed-line: reference model response; (c) Tracking error; (d) Control input; (e) K ; (f) Kf, and (g) KD 177 System response with M R F C . (a) Adaptation state; (b) Position response (solidline: actual response; dashed-line: reference model response; (c) Tracking error; (d) Control input; (e) Kp\ (f) Kf, and (g) KD 178 System response with automatic intelligent switching, (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response; (c) Tracking error; (d) Control input; (e) Kp\ (f) Kf, and (g) K 179 A n illustrative example of a partitioned polyhedron with its corresponding binary search tree 203 P 7.13 D P 7.14 7.15 D B.l xiii Nomenclature Notations R set of real numbers R vector space of n -tuples over R \\x\\ Euclidean norm of vector x e R" (equivalent to N or sjxf + \\x\f norm of l e i " with weight P (equivalent to x Px |~-~| nearest integer towards positive infinity |_-J nearest integer towards negative infinity a.fi,bfl denominator and numerator coefficients of a Butterworth filter a,, b denominator and numerator coefficients of a transfer function model A, B state-space representation of a system c(-) vector of constraint functions c general constant; intercept of curve c estimate of the clock intercept c scaling constant p t T C control client node C control server node E[] expectation (probabilistic) or mean value f sampling frequency c s s G (z~ ) discrete-time transfer function from u to y h sampling period H general prediction horizon of a predictive controller l uy H l minimum prediction horizon of a predictive controller xiv ) or \\Px\\ in literature) 2 NOMENCLATURE maximum prediction horizon of a predictive controller HI control horizon of a predictive controller dead-band compensation constant h I identity matrix of size nxn n k discrete-time step K B bounding gain of cost evolution K upper bounding gain of state estimation error K bounding gain of input-state parametric evolution K proportional gain K, integral gain K derivative gain m number of system inputs; gradient of a curve rh estimate of clock gradient M maximum overshoot of a step response n number of system states; number counter N total number of elements in a set or series P number of system outputs P head-side cylinder pressure P rod-side cylinder pressure P terminal weight matrix of a predictive controller Po modified terminal weight matrix of a predictive controller Q state or error weighting matrix of a predictive controller r,R reference input (set-point) R input weighting matrix of a predictive controller t continuous time abs absolute clock time f time-stamps at event a at node C . e z P D p h r t a P 1 time at the first peak of a step response XV NOMENCLATURE rise-time of a step response settling-time of a step response sampling interval velocity filter time constant input vector of a system open-loop infinite weight matrix satisfying a discrete Lyapunov equation M P C cost function evaluated over a prediction horizon of length a state vector of a system piston position piston velocity response of reference model actual measured response of a system clock skew tracking error, estimation error vector of Lagrange multipliers maximum eigenvalue of a matrix mean message transmission time estimate of mean message transmission time series (set) of control input signals control input vector over a prediction horizon of length H clock drift controller-to-actuator message transmission delay at time step k minimum message transmission time/delay maximum message transmission time/delay round-trip message transmission time/delay sensor-to-controller message transmission delay at time step k damped natural frequency xvi NOMENCLATURE co undamped natural frequency £ damping ratio n Abbreviations CAN Control Area Network CARTMA Controlled Autoregressive Integrated M o v i n g Average CRC C y c l i c Redundancy Check CSMA/CD Carrier Sense Multiple Access with Collision Detection GPC Generalized Predictive Control IP Internet Protocol ITAE Integral Time Absolute Error LAN L o c a l Area Network LMI Linear Matrix Inequality MPC M o d e l Predictive Control mpQP multi-parametric Quadratic Programming MTU M a x i m u m Transfer Unit NCS Networked Control System(s) NIC Network Interface Card NTP Network Time Protocol PRBS Pseudo-Random Binary Sequence QP Quadratic Programming TCP Transport Control Protocol UDP User Datagram Protocol UTC Coordinated Universal Time WAN W i d e Area Network xvii Acknowledgment I wish to express my sincere appreciation to my supervisor, Prof. Clarence W . de Silva for his invaluable guidance, persistent advice and strong support throughout the entire process of my graduate studies. I thank h i m for taking an active interest in my work, his attentiveness and patience i n editing all my publications, and continuously giving kind encouragement to keep me motivated. I am greatly indebted for the countless opportunities and career building experiences he had given me. These include, to name a few, offering to supervise me, funding me to attend conferences and workshops, recommendation for scholarships, and providing the opportunity to take a leadership role in organizing a conference. The aforementioned words are simply insufficient to justify the amount of time and effort Prof, de Silva has unconditionally spent on me. I would also like to thank my previous Master's research supervisor, Prof. A u n - N e o w Poo of the National University of Singapore, for his constant support and for introducing me to and arranging my prior research attachment with Prof, de Silva. It has been a great honor to have Prof. Madan M . Gupta from the University of Saskatchewan, as the external examiner of my doctoral thesis. I would also like to express my gratitude to, Prof. Victor C M . Leung and Prof. Mohamed S. Gadala, who have kindly served as my university examiners. M y cordial appreciation goes to the members of my research committee, Prof. Elizabeth A . Croft and Prof. Farrokh Sassani, for their constructive comments and suggestions. This thesis would not have attained its final state without the positive feedback and invaluable suggestions I received from other faculty members, particularly the late Prof. Dale B . Cherchas and late Prof. V i n o d J. M o d i , who were members of the research committee, and Prof. Yusuf Altintas and Prof. Ian Yellowley, during our annual graduate research seminars. Their kind support is gratefully acknowledged. Generous financial support during the course of my research has been provided through various sources. These include the various scholarships from the University of British Columbia in the form of University Graduate Fellowships ( U G F ) , P h . D . Tuition Fee Awards, and International Partial Tuition Scholarships; research assistantships and equipment funding from the Natural Sciences and Engineering Research Council ( N S E R C ) of Canada and the xviii ACKNOWLEDGMENT Canada Foundation for Innovation (CFI) through Prof, de Silva as the Principal Investigator; and supplemental stipend during the initial phase of the research from the National Research Council of Canada - Institute for Fuel C e l l Innovation through the Research Officer, Dr. George X . Wang. The kind assistance from the department staff; particularly, M s . Lanna L o k , M s . Sheilla Dagta, M s . Chotivan Manglanond, M s . Jan Marsden, M r . Dan Miner, M s . Barb Murray, M r . A l a n Steeves, M r . Gord Wright, and M r . Perry Yabuno, is kindly appreciated. Thanks also go to Prof. Elizabeth Croft and her students; namely, D r . Daniela Constantinescu, M s . Dana K u l i c , M r . W i l l i a m Owen, and M r . Tao Sang, for the morning meetings, paper discussions, and especially the constructive criticisms on my seminar dry runs that have greatly improved my presentation style and skills. I would like to take this opportunity to thank my research group members, close colleagues and friends; especially, Dr. Yang Cao, M r . Tao Fan, M r . Richard McCourt, M r . Y i n g Wang, M r . Duminda Wijewardene, M r . Kenneth Wong, and M r . Jason J. Zhang, for extending their help whenever they were needed, and making my journey at the University of British Columbia a very memorable and enjoyable one. A s a personal note, I would like to thank my family for their constant support. Above all, I wish to express my exceptional appreciation to my mother, for her continuous love, support, and encouragement throughout my life. To her, I dedicate this thesis. xlx Chapter 1 Introduction The maturity, robustness, and wide availability of the technology of high-speed networks and communication, particularly the Internet, have many positive implications. For example, these features have propelled the recent advances in the manufacturing environment, such as Flexible Manufacturing Systems ( F M S ) , and Reconfigurable Manufacturing Systems ( R M S ) (Abdullah and Chatwin, 1994); notably the integration of computer, communication and control into different levels of factory automation and information processing. For example, an integrated system of workcells might include processing tools (e.g., manipulators, grippers, and positioners) with associated component controllers, supervisory controllers, tasks allocators, and intelligent monitoring devices. The communication medium is the backbone of such an advanced manufacturing environment. A modern and automated factory environment has to be efficient, flexible, modular, and reliable, with fast and convenient accessibility and exchange of information through a common networked communication medium. A unified architecture provides the attractive features of easy installation, network maintenance and reconfiguration of various entities of a plant, in addition to reducing the setup and maintenance costs. In particular, it has the advantage of reducing system wiring and maintenance costs by coexisting with an office network. Furthermore, by incorporating additional tools for fault sensing, detection and diagnosis, the health of the system can be monitored and resolved (Lian, et ai, 2001, Tang, et al, 2002) from various locations of the network. Hazardous production facilities can be insolated from densely populated areas. Furthermore, engineers, managers, operators, and consultants can work together in a coordinated, interactive, and efficient manner without being physically present at one location. Modern large-scale industrial systems such as high-speed paper production machines, power generation plants, food processing and packaging operations, and petrochemical processing facilities consist of an array of distributed sensors, actuators, and controllers, which are interconnected through a common network medium or bus. There is an emerging need for 1 CHAPTER 1 INTRODUCTION distributed and smart sensors and actuators with network communication capability as well as wireless access to reduce expensive and tedious equipment wiring. Figure 1.1 shows a rather generic representation of a factory with two systems, both having a series of actuators and sensors connected to the factory network. This type of control systems falls into the class of Networked Control Systems ( N C S ) where control loops are closed through a real-time communication network. Specifically, an N C S is a system consisting of the traditional components of a control system such as a plant, sensors, actuators, controllers, and signal conditioning and interfacing hardware and software, which are all connected through a common communication network. It follows that a primary defining feature o f an N C S is that information; e.g., reference inputs, plant outputs, and control inputs, is exchanged among the control system components (sensors, controllers, actuators, etc.) using a common networkcommunication medium. There is also an emerging interest in implementing remote feedback control over the Internet. For example, as shown in Figure 1.2, additional redundancy in safetycritical or fault-tolerant systems can be achieved by using network-based redundant controllers to keep a system running, should the local controllers malfunction. Different types of control networks such as the C A N (Controller Area Network), FieldBus, Profibus, LonWorks and Modbus have been around for over two decades. O f late, there has System A • Sensor A.2 Actuator A. 1 Actuator A.2 Sensor A. 1 Process Monitoring Terminal Network (Fieldbus, Profibus, ControINet, Ethernet, Wireless) Actuator B . l Controller SensorB.l System B m a Sensor B.m | Supervisory Computer | (—| | Figure 1.1: A generic factory network. 2 CHAPTER 1 INTRODUCTION System Actuator D/A Controller 1 Sensor A/D Controller 2 Communication Module T 1 Wired / Wireless Communication Module Controller 3 Figure 1.2: Additional redundancy in a fault-tolerant system. been much interest in using Ethernet as a control network. Ethernet is not originally designed for real-time control. However, the popularity and versatility of the Internet has resulted in a steady development and improvement of Ethernet technology. A s a result, Ethernet is fast becoming an attractive option to replace other control networks that are low bandwidth, high cost, propriety and aging. Besides, Ethernet is cost effective and widely deployed. It can share the same office network, and the same communication medium can be used for factory floor monitoring, diagnostics, and implementing feedback control loops. W h i l e it has well-known advantages, implementing feedback control over Ethernet network, as with other control networks, presents the fundamental challenge of overcoming the unavoidable delays in data transmission between the various distributed N C S devices, due to the limited bandwidth and overhead in the communicating nodes and in the network itself. The performance, stability in particular, of a control system can be significantly degraded by the presence of communication delays. Furthermore, the packet-switching nature of the Ethernet causes the delay to be non-deterministic. There are also the frequent occurrence of data loss, vacant sampling, and mis-synchronization of sampled data depending on the type of transport protocol used in the data communication. 3 CHAPTER 1 INTRODUCTION 1.1 Goals of the Research From the perspective of feedback control, the main challenge in the development of an N C S would be to overcome the adverse effects of inevitable time delays that incur by the communication network. The network-induced delays are time-varying and possibly stochastic. A control system with such varying and unpredictable delays w i l l no longer be amenable to techniques of deterministic and time-invariant systems. The main objective of the research reported in this thesis is not to redesign the communication protocol for reducing the transmission delay. Instead, it is to treat the network protocol and traffic as given conditions, and formulate robust feedback control strategies to realize good performance in a high bandwidth distributed N C S , by explicitly taking into account the crucial time delays and other network-control issues. The design and critical analysis, particularly the conditions for maintaining asymptotic stability, of feedback control strategies for N C S w i l l be given primary attention in the thesis. The issues of N C S architecture and infrastructure development for practical implementation and experimental investigation also w i l l be treated. A parallel objective of this study is to investigate the suitability of the Ethernet network, which is cost effective and widely deployed, for implementing networked control systems. Real-time experimental benchmarking of the developed N C S strategies w i l l be carried out on an industrial application within an Ethernet network. Within the theme of N C S , a parallel objective of the thesis is the development of a universal, reconfigurable and scalable network architecture, both hardware and software, for web-based remote monitoring and supervisory control of dynamic systems such as industrial plants, research facilities, and academic laboratories. This w i l l be followed by further incorporation of a multi-layered intelligent supervisory control structure with the objective of on-line improvement of the performance of a system. A full-scale implementation of the developed approach w i l l be made on the industrial application used for benchmarking the N C S . 1.2 Scope of the Study The scope of the present study includes two main areas: networked control systems ( N C S ) , and remote monitoring and supervisory control. In the area of N C S , a novel control solution is developed for a networked system, based on the potential framework of unconstrained and constrained M o d e l Predictive Control ( M P C ) . The idea is to render the dynamics of network 4 CHAPTER 1 INTRODUCTION transmission "transparent" by incorporating a carefully devised strategy of pre-computing, buffering and sequencing the future control efforts at the actuators in order to anticipate for any transmission problems i n the data streams between controllers and actuators. Compensation for transmission "errors" in the sensory data is achieved through a modified form of state or output estimators. Various enhancements to the basic framework of the developed N C S - M P C strategy is investigated and implemented. These enhancements are meant to directly or indirectly reduce the network congestion, reduce the computation load of the controller, adapt to time varying dynamics of the system, and increase the operating range of the control system. Closed-loop stability and optimality of the developed N C S - M P C buffering and estimation strategy are given rigorous treatment in this study. The approach is to divide the stability analysis into two stages. The first stage assumes perfect state measurements of the estimated sensory data and focuses on establishing stability conditions for the buffering future control efforts within the M P C policy. Global closed-loop asymptotic stability in the sense of Lyapunov is guaranteed for the controller, by bounding the projected receding horizon costs by lower- and upper-bounding terms using a predetermined terminal cost. Stability theorems are developed, which provide a suboptimal measure for the controller in real-time, which is sufficient to estimate the worst-case transmission delay that can be handled by the developed control buffering strategy. The second analytical stage assumes imperfect state measurement of sensory data, which results in a robust stability problem with state mismatch. The problem then reduces to the following: given the set of parameters for a stable M P C policy as obtained from the first stage, determine the upper bound of the norm of the state estimation error (between the actual and the estimated states) for further maintaining the asymptotic stability of the system. Within the context of realizing the Ethernet network as a platform for N C S , a new clientserver N C S architecture is developed around a dual-axis electro-hydraulic manipulation system of an industrial fish-processing machine. This development includes the hardware setup; clientserver communication protocols; multi-process and shared memory area communication and scheduling; and implementation of a robust clock synchronization algorithm. The real-time implementation of M P C on the servo systems of an industrial machine requires a fast quadratic optimization algorithm. Here, an off-line multi-parametric Quadratic Programming (mpQP) method is adopted. This requires a state-space partitioning algorithm and a binary search tree construction algorithm. Utilizing the networked client-server control architecture as developed here, real-time experimental evaluation of the developed N C S - M P C buffering and estimation 5 CHAPTER 1 INTRODUCTION strategy is carried out with regard to tracking performance, effectiveness in handling various transmission problems, and validation of the stability theorems established in the research. In the second closely-related research area of remote monitoring and supervisory control, a framework for developing a universal and scalable network infrastructure for web-based monitoring and supervisory control of dynamic systems is investigated and developed. The developed infrastructure employs a low cost and flexible (reconfigurable) two-tier client-server architecture where a user is able to remotely carry out a variety of tasks including system operation, experimentation, process monitoring and supervision, task scheduling, system reconfiguration and tuning, control, and safety/emergency routines, through a web-browser interface. A single web-server together with a mediating server provides smooth information flow using a robust and intelligent scheduling scheme. The flexibility and modularity of the developed network architecture form the rationale for further incorporation into it a multilayered intelligent supervisory control structure with the objective of on-line improvement of the performance of a process. A remote supervisor, which incorporates knowledge-based decision making, continuously monitors the performance of the process to infer the best adaptive controller for the process under existing conditions. Full-scale implementation of the developed approach is made on the same industrial fish-processing machine as before, and is used to demonstrate the application of the developed technologies in an industrial environment for process monitoring and supervisory control. 1.3 Related Work Four main research aspects have to be investigated in order to achieve the objectives of the thesis. They are: networked control systems (NCS), model predictive control ( M P C ) , stability of model predictive control, and remote monitoring and supervisory control. The following sections survey some pertinent work that has been carried out in the past in these areas. 1.3.1 Networked Control Systems The research of N C S may be considered to focus in two general directions. One direction involves the development of robust communication protocols to ensure constant delay or minimum jitter in the data stream (Farsi and Ratcliff, 1998, Tovar and Vasques, 1999, X i a o , et al, 2001, Cena and Valenzano, 2002, Almeida, et al, 2002, Conti, et al, 2002). Under these 6 CHAPTER 1 INTRODUCTION conditions, a controller can be designed without considering the dynamics of the network. The second direction in N C S research assumes the particular communication protocol as given, without any modification, and focuses on the development of feedback control methodologies to realize good performance. This latter direction is taken in the present research. Halevi and Ray (1988) have considered a continuous-time plant and discrete-time controller to analyze an integrated communication and control system (ICCS) using a discretetime approach. They have studied a clock-driven controller with mis-synchronization between the plant and the controller. The system was represented by an augmented state vector, consisting of past values of the plant and the controller. This has resulted in a less complex finite-dimensional, time-varying discrete time model as compared to a continuous model with time-varying delays. However, their work is limited to transmission delays that are smaller than the sampling period. Luck and Ray (1990) made a closed-loop N C S time-invariant by introducing buffers at the controller and actuator inputs. A linear time-invariant model was derived by setting the buffer size longer than the worst-case delay. A n advantage of this method is that it handles transmission delays that are longer than the sampling interval of the controller. However, the buffering process requires unnecessarily large data packets, which increase the network traffic, and in turn causes longer delays than necessary. The most effective way to minimize the effect of time delay on the performance of an N C S is to reduce network traffic (Otanez, et al, 2002b). Zhang, et al. (2001) looked into the stability of an N C S using the concepts of stability regions and hybrid systems. System models with packet dropout and multiple packet transmission were developed as asynchronous dynamical systems. The stability of an N C S with packet losses was analyzed by Azimi-Sadjadi (2003) but a delay-free network was assumed, which in fact defeated the purpose of the analysis. X i a o , et al. (2000) proposed to model an N C S as a "stochastic hybrid system" where the random communication delays would be modeled as finite-state Markov chains. Although the method is promising in that it can handle randomness in the delay, it has the limitation of assuming narrowly-bounded delay. The bound on the probability of packet losses was not addressed. In order to minimize the effect of transmission delays on an N C S , several ideas have been explored with the objective of reducing or optimizing the network traffic. A common approach in this regard is to introduce estimators or predictors at the communication nodes. This is a form of data queuing, as proposed for example by Chan and Ozgiiner (1995), where queues are located at the sensor output and the controller input. A probabilistic state predictor is located 7 CHAPTER 1 INTRODUCTION before the controller to estimate delayed sensor data. Otanez, et al. (2002a) devised a procedure to effectively reduce network traffic, where an adjustable deadband on the rate of change of a measured signal was used to determine the frequency of data transmission, while employing a simple controller such as proportional-integral (PI) or proportional-integral-derivative (PID), and a deadbeat compensator. However, the method unnecessarily introduces state uncertainty to the system, thereby reducing the stability boundary as well as the operating bandwidth of the system. It is also is not suitable, however, for high bandwidth systems where the dynamics can change quite rapidly. A similar approach has been investigated by Y o o k , et al. (2000) where each communicating node is retrofitted with an estimator. In this method, the states of each node would only be broadcasted when the estimated states differed from the actual measured states by a pre-specified tolerance, thereby limiting the network utilization. In addition, the network delay was assumed to approach zero, which is somewhat unrealistic. Consequently, the performance degradation caused by network delays could not be overcome. Quevedo, et al. (2003) minimized the network bandwidth by using a finite-set constraint for all control inputs as well as supplying control increments on an as-needed basis. In order to improve the performance of an N C S , Beldiman, et al. (2000) developed two structures of predictor to estimate the system outputs between successive transmission intervals. However, the delay in control actions was not addressed. In Walsh, et al. (1999, 2002), a continuous plant and a continuous controller have been considered. The control network, shared by other nodes, has been inserted between only the sensor nodes and the controller. They have introduced the notion of maximum allowable transfer interval ( M A T I ) , which supposes that successive sensor messages are separated by at most the M A T I . The goal is to find that value of M A T I , which would guarantee the desired performance and stability of the N C S . Considerable amount of work has been done within the framework of optimal control, where a specific cost function is minimized. Nilsson, et al. (1998a, 1998b) proposed an optimal stochastic control strategy for networks with random delay. A few delay scenarios were studied, including both deterministic and stochastic transmission. It was found that by incorporating time-driven sampling together with an event-driven controller and actuator, a Linear Quadratic Gaussian ( L Q G ) controller could guarantee system stability, as long as the network delay was shorter than one sampling interval. The limitation to cases where the network delay is within one sampling interval renders the method less useful. Lian, et al. (2002a) designed an optimal controller for an N C S that was capable of compensating for 8 CHAPTER 1 INTRODUCTION multiple time delays. The key was to use a delay transformation procedure, which mapped the N C S model to a standard system model with delayed states. Sinopoli, et al. (2004a, 2004b) in a sequence of work introduced the idea of discrete-time Kalman filtering with intermittent observation in order to overcome data losses in a communication channel. The dependence of the expected estimation error covariance on the loss probability and the system dynamics was studied. In (Sinopoli, et al, 2004a) it was shown that the separation principle (Khalil, 2002) of optimal control would hold in the presence of data losses. The analysis was done using an L Q G problem in discrete time. Some ad-hoc approaches have also been introduced. For example, Tipsuwan and Chow (2003) adopted a gain scheduling scheme on the controller parameters to maintain the system performance based on a Quality-of-Service (QoS) measurement, depending on the level of network traffic. This method is only able to handle small delay conditions and has a very limited range of operation. Furthermore, an additional middleware is required to monitor and measure the network QoS which may not be practical in some factory networks. 1.3.2 Model Predictive Control M o d e l Predictive Control ( M P C ) being able to incorporate various forms of constraints (on inputs, outputs, states, and so on), is applicable to multivariable control problems in their original form, and more importantly able to explicitly predict the system outputs or states at future time steps. These attractive features of M P C render it a viable control scheme for consideration i n the current research and development of robust feedback control strategies for Networked control Systems (NCS). The term M P C generally denotes a collection of controllers, which determine the control effort by minimizing a cost function (usually quadratic) in a receding horizon manner using an explicit model while satisfying some imposed constraints. Physical limitations of the system; e.g., valve saturations, may be represented by an input constraints. The state constraints are imposed for states or outputs that may not have set-points, but are required to remain within certain limits during the intended system operation. Early forms of M P C were developed for the industrial sector, specifically the chemical processing industry, with such names as Dynamic Matrix Control (Cutler and Ramaker, 1980), Extended Prediction Self-Adaptive Control (De Keyser and V a n Cuawenberghe, 1985), and Generalized Predictive Control ( G P C ) (Clarke, et al, 1987). The purpose of the present section is not to review the entire history of 9 CHAPTER 1 INTRODUCTION M P C but to focus on the distinct contributions that have been made that are of particular relevance to the thesis, and more recent advancements, particularly on stability analysis. Modifications have been made to the basic M P C with adaptive capability to cope with time-varying dynamics of a system. The transfer function variant of M P C ; i.e., G P C is 1 distinctly suited for adaptive approaches. Bordons and Camacho (1998) reformulated the G P C algorithm to provide a direct relation between the parameters of G P C and the system to be controlled. Besides providing intuitive tuning means for plant operators, this formulation enables easy incorporation of higher level adaptive algorithms; e.g., model-referenced adaptive control (Astrom and Wittenmark, 1995). However, it is only useful in systems that exhibit firstorder-plus-dead-time dynamics. A similar approach of mapping the design parameters to the controller parameters has been proposed by Al-Ghazzawi, et al. (2001). This approach is more practical than the previous one in that the desired closed-loop performance in time-domain is directly related to the parameters of the controller. Using Laguerre and subspace identification, Huzmezan and Dumont (2000) replaced the norm of indirect adaptive algorithm of identifying the system parameters prior to control law redesign with fast least squares computation and simple algebraic manipulation. The resulting low dimensional formulations allow efficient implementation of direct adaptive M P C on high-order multivariable systems. Alternative formulations based on Linear Matrix Inequality ( L M I ) (see Appendix A ) have also been explored in order to deal with uncertainty in modeling that is lacking in typical Quadratic Programming (QP)-based M P C design. Kothare, et al. (1996) introduced a new technique to recast robustness properties of unconstrained and constrained M P C in the framework of L M I . This was done by employing the robust (Skogestad and Postlethwaite, control modeling paradigm 1996) of either polytopic model or structured feedback uncertainty model. Robust stability was guaranteed by first assuming an upper bound for the M P C cost function with infinite prediction horizon prior to synthesizing the M P C control law. K i m , et al. (1998) proposed a similar approach but in the realm of G P C where the G P C problem was formulated as a min-max problem of minimizing the cost function while suppressing the maximum effect of disturbances. The stabilizing settings of the influential ' In this thesis, the standard term Generalized Predictive Control (GPC) is used to denote a variant of Model Predictive Control (MPC) where the formulation is done in the transfer function (s-domain) form (Camacho & Bordons, 1998). Unless stated otherwise, the GPC problem is generally unconstrained. On the other hand, MPC is the term that is commonly used for the "equivalent" state-space formulation and generally involves some form of constraints. 10 CHAPTER 1 INTRODUCTION control parameters were obtained by solving a compact set of L M I s . In terms of computation speed, there is generally little or no gain in LMI-based optimization compared to QP-based optimization. Hence both approaches are limited to relatively low speed systems. The digital control of high speed servo systems requires small sampling intervals. The use of traditional Q P methods (Fletcher, 1987) to optimize the M P C cost function can be rather slow and besides feasibility of the solution may not be guaranteed, making these methods ineffective in high-speed servo implementations. Fast Q P optimization algorithms have been developed. Chisci, et al. (1994) proposed an algorithm for fast online computation of the Generalized Predictive Control ( G P C ) optimization problem by simply transforming the G P C formulation to a condensed form using linear and hyperbolic polynomial rotation. Kouvaritakis, et al. (2002) proposed an alternative method of transforming the Q P problem into an equivalent linear optimization problem using Newton-Raphson iteration, requiring only a fraction of the Q P computation time. In this method, the convergence to a solution is guaranteed, and complexity of the problem only increases linearly with the number of constrained control moves. Significant amount of work has been done in multi-parametric Quadratic Programming (mpQP) where all the heavy computational load is brought off-line leaving simple functional evaluation during online optimization (Bemporad, et al, 2000, 2001, 2002, Pistikopoulos, 2002, T0ndel, 2003). It is found that the space of the state variables can be partitioned into polyhedral regions where the optimal control effort of each region is given as a linear function of the state variables. This method is employed in the implementation of the constrained M P C optimization in the present thesis. Further investigation, enhancement, and issues encountered in the implementation of the algorithm are addressed in Chapter 4 and Appendix B . Another popular trend in M P C research concerns nonlinear M P C . Developments in this realm can be quite valuable since practical systems are inherently nonlinear and since there is a fundamental need to operate a system over a broad range of operating conditions. Although a robust linear M P C scheme is capable of handling nonlinear systems, the existing robust linear M P C (Kothare, et al, 1996) may be conservative or computationally intractable. In addition, nonlinear M P C has the potential of achieving better closed-loop performance. Findeisen, et al. (2003) looked into a different formulation of nonlinear M P C including output and state feedback, which allows the direct use of nonlinear models for prediction. Stability and robustness properties have also been established. Nevistic and Primbs (1996) extended the converse Hamilton-Jacobi-Bellman approach to create various categories of nonlinear systems 11 CHAPTER 1 INTRODUCTION in which a deeper understanding into the properties of nonlinear M P C has been gained. Simulated evaluations and comparison have been carried out and potential issues have been explored on nonlinear M P C in comparison to M P C with feedback linearization. A quasiinfinite horizon nonlinear M P C has been proposed by Chen and Allgower (1998) where the input profile needs to be determined online only for a finite horizon. In this method, a terminal state penalty term has been added to the finite horizon M P C cost function to guarantee asymptotic stability. 1.3.3 Stability in Model Predictive Control The slow adoption of M P C in the early years is mainly due to the lack of a solid theoretical foundation, specifically on stability analysis. This has motivated researchers to dedicate considerable attention to this topic in recent years. A key reference on the subject of stability in discrete-time M P C is the paper by Keerthi and Gilbert (1988). The pioneering work proved that the M P C cost function is a valid Lyapunov function for establishing closed-loop stability of M P C for a class of time-varying discrete-time systems. In order to guarantee closed-loop stability, various modifications to the M P C formulation have been explored (Mayne, et al, 2000); e.g., terminal equality constraint, terminal inequality constraint, terminal constraint set, and terminal cost function. Due to the feasibility problem in the method introduced by Keerthi and Gilbert (1998) requiring an exact solution at every sampling period, Michalska and Mayne (1993) proposed to replace the terminal (state) equality constraint with terminal (state) inequality constraint and employ a local asymptotically stabilizing controller within the positively invariant set of the inequality constraint. O n the other hand, the M P C problem with terminal equality constraint is proved to be useful in the stabilization of systems when continuous feedback controllers fail (Meadows, 1994). In general, however, since typical M P C only utilizes the first control effort, imposing of terminal constraints is rather "artificial" (Kothare, et al, 1996). Bitmead, et al (1990) proposed to impose a terminal cost to the M P C problem instead of terminal constraints. It was argued that by using a finite horizon Fake Algebraic Riccati Equation ( F A R E ) to solve the weight matrix of the imposed terminal cost, infinite horizon Linear Quadratic stability was obtainable. However, the constraint handling capability of M P C was not retained in the formulation. Improvements have been made by Rawlings and Muske (1993) to formulate the M P C problem, which permits the integration of input and state 12 CHAPTER 1 INTRODUCTION constraints. The underlying idea is to keep on-line a finite number of decision variables in the optimization problem that is solved. Primbs and Nevistic (2000) proposed a systematic approach of analyzing stability of the constrained M P C problem with terminal cost. Sufficient stability conditions can be obtained by bounding the terminal cost and relating the final state to the current state, with the knowledge of the upper and the lower bounds of the M P C cost function. Due to the systematic layout of this approach, it is used as the basis for analyzing close-loop stability of the random time-delayed N C S - M P C strategy developed in this study (see Chapter 4). Following the work of Michalska and Mayne (1993), significant advancement has been made in using a sequence of sets as stabilizing constraints (terminal constraint set) by means of set invariance theory (Kerrigan, 2000). Scokaert, et al. (1999) relaxed the computation problems in optimal M P C with a terminal constraint by establishing conditions under which suboptimal M P C is stabilizing. They proved that under mild conditions, feasibility rather than optimality was sufficient for stability. T w o suboptimal versions of M P C with relatively modest computational requirements were utilized to validate the idea. L i m o n Marruedo, et al. (2002a) combined terminal constraint and terminal cost to enlarge the domain of attraction of linear M P C , without increasing the prediction horizon. W i t h the terminal cost as the Lyapunov function, the formulation converted the terminal region with a sequence of contractive control invariant sets which in turn converted the terminal constraint to a contractive terminal constraint. The formulation for nonlinear discrete-time system with bounded additive uncertainties is given in (Limon Marruedo, et ah, 2002b). Other approaches have also been investigated, which are not in the mainstream. Stability of constrained M P C with model uncertainty was investigated by Zheng (1999) by posing the M P C problem as a convex optimization problem involving L M I . Costa and do V a l (2003) proposed a method of ensuring stability of a nonlinear system controlled by M P C without imposing any terminal cost or terminal constraint. The positive definiteness of the cost function was also relaxed by only requiring "detectability" of the nonlinear system under control as well as the cost function. It was found that for a sufficiently long prediction horizon, the M P C control law was exponentially stabilizing i f there would exist a uniform upper bound on the cost function. Nunes, et al. (2003) looked into characterizing the stability properties of unconstrained multivariable G P C using polynomial operators and coprime matrix factorizations resulting in a numerical solution of the closed-loop poles of the system. The parameters of the controllers could then be tuned accordingly, to obtain a stable system where the poles of the system would 13 CHAPTER 1 INTRODUCTION be within a unit circle. However, extending this method to constrained problems may present difficulties. 1.3.4 Remote Monitoring and Supervisory Control Tang, et al. (2002) have proposed an approach for remote monitoring of machines within a group of distributed and networked production plants using an existing extensible T C P / I P (Transmission Control Protocol/Internet Protocol). Their work focused on vibration monitoring of precision machines where vibration signals or signatures gathered from accelerometers that are mounted on the machine, were transmitted to a remote client. The client was able to monitor and control the machine through a web-browser v i a a C G I interface (Common Gateway Interface). G u and de Silva (1997) developed an open-architecture robot controller for coordination of various components of a robotic workcell when carrying out workcell tasks. The system possessed the capabilities of low level, direct, manipulator control; process monitoring; kinematic transformation; and intelligent decision making; and incorporated a graphical user interface. Chen and L u o (1997) designed a remote supervisory control architecture, which combined a computer network and an autonomous mobile robot. A n authorized user was able to directly control the mobile robot remotely using a web-browser and obtain video feedback captured by a C C D camera, which was mounted on the robot. Due to the advancements of the Internet technology, recent years have also seen the introduction of tools that facilitate web-based academic research and teaching (Bhandari and Shor, 1998, Rohrig and Jochheim, 1999, K o , et al, 2000, 2001). Virtual laboratories facilitate students and research personnel to conduct experiments remotely through the Internet from anywhere and anytime. The concept is especially useful in situations where the laboratory resources are rather limited and costly but are regularly needed to serve a large number of users. W i t h virtual laboratories, globally located collaborating institutes are able to share resources and expertise, resulting in clear economic advantages as well. In this manner, domain experts can divide their attention rather efficiently. With the objective of permitting experiments to be conducted through the Internet, Bhandari and Shor (1998) developed a distance learning application at the Control Engineering Laboratory of Oregon State University. Experiments were easily accessible for students using a Java™-enabled web-browser within the campus or even from home. Several German universities are pursuing concepts of distance education, as applied to laboratory experiments. Rohrig and Jochheim (1999) developed a network of remotely accessible laboratories called Virtual L a b using a client-server 14 CHAPTER 1 INTRODUCTION architecture. Active and simultaneous interaction between students or researchers participating in a particular experiment was a key focus of the reported work. K o , et al. (2000, 2001) have demonstrated the practicality and feasibility of implementing web-based laboratory experiments by successfully opening their experiments to over 1000 engineering students and later to the general public. A robust, general methodology has been presented. Several commercial products exist; e.g., L a b V I E W ™ (National Instrument) and W e b L a b (Quanser), which provide monitoring and control of experimental apparatus remotely over the Internet. However, these products require one dedicated web-server to be associated with each process, which permits only one user to access the process at a given time. This limits the level of cooperation between the users who are associated with the specific process. In addition, such products are not cost effective since a sufficiently powerful server has to be installed for each process. This is the case because the entire computational load associated with data communication, user access, program timing and scheduling, and low-level control is handled by that same computer. It is also difficult to maintain a unified user access and the needed security level for all the available processes within a local establishment. 1.4 Contributions and Organization of the Thesis The main contributions of this thesis are outlined below. 1. A n original feedback control strategy based on the theory of model predictive control ( M P C ) is developed for networked control systems (NCS). The strategy predicts future control efforts and buffers them at the actuator in anticipation for data transmission problems between the controller and the actuators, while using an extended estimator to compensate for data transmission problems in the sensory information stream. This is an innovative and successful attempt to overcome problems of network delay and losses in the control effort, in the context of an N C S . The effectiveness of the developed N C S strategy is demonstrated through implementation on an industrial machine (two-axis electro-hydraulic manipulator of a fish-processing machine) through an Ethernet network, and carrying out rigorous real-time experimentation. 2. N e w stability theorems in the sense of Lyapunov are established in detail, with analytical proofs, and experimentally validated for the developed N C S - M P C strategy. The originality of this work lies in the analysis of feasibility, stability and optimality of using the sequences of future control effort in constrained M P C . The established results form a 15 CHAPTER 1 INTRODUCTION useful tool to design an N C S - M P C controller with proper parameter settings that w i l l maintain stability within a predetermined worst-case delay between the controller and the actuators. 3. W i t h regard to the effect of state mismatch in the sensory data estimation on the closedloop stability of the N C S - M P C system, an analysis is carried out to determine the upper bound of the norm of estimation error up to which stability is maintained. This stability bound which is indirectly related to the worst-case delay between the sensors and the controller proves to be a useful guideline in the design of any form of estimator for the developed N C S strategy. 4. A low cost, universal and scalable two-tier client-server network infrastructure (including hardware and software) for remote monitoring and supervisory control of industrial systems is established. User scheduling and data flow management methodology is developed. The practicality of the developed web-based architecture is demonstrated through implementation and experimentation on an industrial fish-processing machine. 5. The development of a networked, multi-layered, modular, and intelligent supervisory control structure is presented. Real-time implementation of the architecture shows that the incorporation of a knowledge-based autonomous supervisor for the lower-level local and remote adaptive controllers is vital in improving the system performance. The research and development that leads to the summarized contributions are presented in the subsequent chapters of the thesis in sufficient detail. The organization of these chapters is as follows. Chapter 2 presents the preliminary work necessary for the study of an N C S , which includes the development of a robust control network architecture within an Ethernet network, an accurate clock synchronization algorithm, characterization of network transmission properties, and modeling and identification of the experimental platform. Chapter 3 describes the constructive N C S control strategy, which is central to the present investigation. The formulation of the strategy, which is based on multivariable predictive control, is detailed. In this chapter, only the unconstrained case is considered in order to focus on the underlying mechanics of the strategy. It is shown that the developed strategy renders transparent the dynamics of data transmission. Real-time experimental evaluation and performance benchmarking results are then presented and discussed. The central work from this chapter has been published i n (Tang and de Silva, 2003a) and accepted for publication i n (Tang and de Silva, 2005a). Chapter 4 focuses on analyzing the asymptotic stability of the developed N C S - M P C 16 CHAPTER 1 INTRODUCTION strategy, with the buffering of future predicted control effort. The analysis is accomplished in a broader realm of constrained M P C with equivalent state-space formulation. Perfect state measurement or estimation of sensor data is assumed. Validation of the developed stability results is carried out through computer simulation and experimentation. The main contribution of this chapter are reported in (Tang and de Silva, 2005b) and expected to be published in (Tang and de Silva, 2005c). Further stability analysis of the developed N C S - M P C strategy is presented in Chapter 5 in which the main consideration is the effect of imperfect state measurement from the estimator on the closed-loop stability. The problem formulation and characterization using the concept of sensitivity in nonlinear programming, leading to the main stability bounds, are carefully laid out. After having resolved, with thorough analysis, simulation, and experimentation, the problems incurred in the data transmission at the low-level feedback control of a networked control system, the benefits of incorporating monitoring, diagnostic, and supervisory control capabilities into the system architecture is investigated. Chapter 6 provides the framework for infrastructure development for web-based monitoring of a remote system. This includes the hardware commissioning and networking, and the software development of a two-tiered clientserver communication architecture. The practicality of the developed and implemented infrastructure is demonstrated on an industrial machine. This work has been published in (Tang, et al, 2002c) and (Tang, et al, 2002d), and submitted for publication in (Tang and de Silva, 2005d). Chapter 7 presents a new scheme for remote supervisory control of plant and the associated client-server network architecture, which has been developed in the present work. The scheme uses a remote knowledge-based supervisor to autonomously supervise both local and remote intelligent model-referenced adaptive controllers. The performance of the developed scheme is then evaluated through implementation on an industrial fish-processing machine and subsequent experimental case studies. The various control techniques developed in this chapter have been published, in part, in (Tang, et al, 2002a), (Tang, et al, 2002b), and (Tang and de Silva, 2003b). The most recent work has been submitted for publication in (Tang and de Silva, 2005d). Chapter 8 concludes the thesis by summarizing the overall research that has been carried out, indicating some limitations of the work, and suggesting possible directions for future research in the area. 17 Chapter 2 Control Network Architecture and System Modeling The main objective of this chapter is to present the preliminary work that is essential in the investigation of Networked Control Systems ( N C S ) . A general architecture for a networked control system w i l l be constructed using the Ethernet communication network. This is a practical architecture for implementing low-level control loops. It facilitates real-time experimental evaluation of system performance, stability in particular, which w i l l be carried out in chapters 3 and 4, and also serves as the basic building block for remote monitoring and supervisory control, which w i l l be explored i n chapters 6 and 7. A n important element of any N C S setup is an accurate clock synchronization algorithm for establishing a common time reference for various interacting nodes (devices) across the communication network. The adopted algorithms and issues relating to clock synchronization w i l l be explored in Section 2.2. Next, some insight into the data transmission characteristics of the Ethernet network w i l l be provided. Section 2.4 w i l l describe the dual-axis electro-hydraulic manipulator of an industrial fish-processing machine, which forms the main experimental system in this thesis. M o d e l parameters of the electro-hydraulic manipulator w i l l be identified experimentally using a time-domain correlation method for input-to-output and input-to-state responses. 2.1 Control Network Architecture The simplified data flow architecture of the networked control system, when performing real-time experiments, is shown in Figure 2.1. This setup is connected to a general office Ethernet-based local area network (Kurose and Ross, 2003). Each node; i.e., control server, control client, and intermediate nodes, are connected to the building server room which house Ethernet switches. These switches direct data between all the nodes connected to them and to the outside world though an Internet backbone. The performance of a particular network can 18 CHAPTER 2 CONTROL NETWORK Control Server -P-200MHz w7 10Mbps -PCL-812 AD/DA Card -WinNTw/RTSS ^ Control Client - PHI l G H z w / 100Mbps - Win2K w/ RTSS P AND SYSTEM Intermediate Node A - 2KB buffer queue Simplified MODELING Physical System Sensor Measurement # Intermediate NodeB - 2KB buffer queue Internet/External Traffic Flow Ethernet Network Figure 2.1: architecture. ARCHITECTURE data flow layout of the developed control network differ significantly depending on the type of interconnecting hardware between the nodes; e.g., between hubs and switches. The network control strategies developed in chapters 3 through 5 of this thesis are intended for general packet data networks. The physical system is directly connected to the control server, which hosts a 12-bit data acquisition board (PC-LabCard P C L 812) and is connected to the Ethernet network through a lOBaseT network interface card (NIC). It consists of a Pentium-200 M H z processor running on Windows N T with Real-time Subsystem. This control server handles sensor data sampling and control signal buffering. The feedback control strategies developed in the present work are implemented at the control client. The control client has a higher processing power with a P I I I - l G H z processor running on Windows 2000 with Real-time Sub-system. N o data acquisition hardware is required at the control client except for a low cost N I C . Although a 100BaseT N I C is used in the control client, the bottleneck is at the control server, which has lOBaseT N I C . In order to evaluate the effectiveness of the developed networked control strategies under various types of network behavior, two intermediate nodes are introduced between the control server and the client. These two nodes contain 2 kilobyte buffer queue and have external traffic flowing during experimental studies, to simulate the bandwidth consumption by other equipment that share the same Ethernet network. This external traffic flow is simply induced by running any of the widely available Point-to-Point (P2P) file-sharing programs. In addition, the 19 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING data packets traveling between the control server and client are "juggled" between the two intermediate nodes. This closely represents data hopping in routers and switches i n wide area networks. It is to be noted that exact network utilization is not strictly managed. Similar data hopping behavior can be simulated using a store-and-forward queuing algorithm located at the control server. In case the control server is not suitable to run this algorithm (e.g., due to low computational power), it can be located at one of the intermediate nodes. The main objective here is to test the performance of the network control strategies under severe network conditions that may be experienced in large-scale local- or wide-area industrial networks with potentially noisy and long data lines. The control server and client are implemented in multiple independent processes as shown in Figure 2.2. The number in each block represents the priority level of the corresponding process. Inter-process communication is carried out through a common, shared memory area. A t the control server, the processes are of minimal functionality since most of the high computational tasks are located at the remote control client. The shared memory area of the Physical System Advantech P C L 8 1 2 D A Q Actuator M o d u l e I a Data Receiver Sensor Reading + Filter 1 Shared M e m o r y Area Main / Clk Sync, 6 Time Base \ " .V c T w o r k states Main Data Sender 7 M ••(/;' // in , C l k Sync^. Data Sender Time Base ^ GUI y Servers orx Clients 2 Data Receiver Shared Memo)ry A r e a Controller Trajectory Generator Figure 2.2: architecture. Schematic diagram of the end-to-end client-server control network 20 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING control server contains the variables to store filtered sensor readings, control inputs, time stamping information of the control inputs, time base for clock offset, and execution states of the system (e.g., start, stop, hold, and ready). The process module for sensor reading and filtering runs at a pre-specified interval at the highest priority. It triggers the data sender to time-stamp, and sends the sensor data packet as soon as a sensor measurement is ready. The data receiver is an event-driven process. Whenever a data packet is received, the data receiver time-stamps it and stores it in a buffer in the shared memory area awaiting retrieval by the actuator module. The actuator module, running at a pre-specified interval, reads and sorts the control inputs from the shared memory area before clearing the buffer and writing the appropriate control inputs to the data acquisition board. It should be noted that the data reading buffer i n the shared memory area discussed here is not the actuator buffer of future control inputs of the network control strategy developed in this thesis. The present buffer is implemented merely to handle situations when more than one data packet is received between the intervals of the actuator module process. The G U I (Graphical User Interface) process allows basic operator interaction to the control system. The main process coordinates the execution and hand-shaking among the running processes. Similar role is performed by the corresponding processes on the remote control client. Control laws are implemented in the controller process. The clock synchronization and time base process pairs are implemented to maintain an identical time reference between the servers and clients, which is vital in timestamping of data packets and feedback control. This is further discussed in the next section. U D P (User Datagram Protocol) protocol is adopted for all data communication activities between the control server and the client, except for exchanging the execution states of the system where T C P (Transport Control Protocol) protocol is used. T C P is a connectionorientated protocol and provides reliable point-to-point data transfer. Data delivery is ensured using flow control, sequence numbering, retransmission, and timer. In addition, T C P also provides congestion control by regulating the rate at which data is injected into the network. However, the throughput of such a regulated network is unsuitable for real-time feedback control of servo systems. U D P , on the other hand, eliminates the overheads associated with TCP, making it a much preferred transmission protocol for feedback control. It is a connectionless service, which sends independent data packets (datagrams) from one node to another. Hence, data packets can be "pumped" as frequently as possible to the network, but at the cost of some data getting lost and not reaching the destination. A l l control and 21 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING communication modules are coded and compiled in Microsoft Visual C++ using standard A N S I C/C++ language. 2.2 Clock Synchronization Algorithm In distributed systems, each node has its own internal clock, and typically these clocks are neither identical nor synchronous. This leads to a fundamental problem in distributed systems where it is crucial to accurately determine the time and the order of the occurring events. The time accuracy is even more crucial in asynchronous networked control systems ( N C S ) with sub-millisecond timing requirements. Before proceeding, the definitions of three pertinent terms are given. First, clock skew is defined as the instantaneous difference between the recorded time and the actual absolute time. The instantaneous difference between the time readings of any two clocks is termed clock offset. C l o c k drift occurs in a crystal-based clock, i f the counting frequency varies (drifts), causing a timing error in the particular clock and generates a diverging clock skew and clock offset. Since an N C S setup involves a finite number of pre-determined nodes, it is particularly important to determine the clock offsets between the nodes and make corrections for clock drifts. 2.2.1 Existing Algorithms C l o c k synchronization, in typical network setups, is based on message passing. The clock requests are sent back-and-forth between communicating nodes with the requesting node adjusting its own clock relative to the responding node. In a synchronous system where the bounds for the drift rate of clocks, the maximum message transmission delay, and the time to execute each step of a process are known, the clocks can be easily synchronized based on the maximum and minimum message transmission delays, denoted by r m a x and T , MIN respectively. Lundelius and L y n c h (1984) state that i f the requesting node sets its clock according to t = t + ^(T MAX +T ), MIN a system with N the optimum achievable bound on clock offset is ( l - - ^ r ) ( 7 max + ^ i ) for m n nodes. It is not as straight forward i n asynchronous systems where the message transmission is not bounded from above. Assuming the round-trip delay (i.e., the time instant from clock request until the instant the requesting node receives back the response from the opposite node) can be equally split, 22 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Cristian (1989) proposed the use of a time server to synchronize asynchronous systems. W i t h the time server connected to an absolute time source of Coordinated Universal Time ( U T C ) , the requesting node can simply advance or lapse its clock by half of the round trip time. This method is plausible only i f the observed round-trip delays between the requesting clients and the time server are sufficiently short compared to the required clock accuracy. The Berkeley algorithm (Gusella and Zattai, 1989) uses a coordinator node that periodically polls the clocks from the other nodes within a distributed system. The coordinator node then computes the required clock adjustment using a method similar to Cristian's algorithm, and forwards it to the corresponding node. It is claimed that any occasional readings associated with larger times than the nominal round-trip delay can be eliminated, and the scheme is able to achieve a synchronized accuracy of approximately 20-25 ms. Since the algorithms of Cristian and Berkeley are intended only for the Intranet network, M i l l s (1995) proposed the Network Time Protocol (NTP) service to handle large networks (Internet) with large and variable message delays. N T P uses a network of servers arranged i n a hierarchical tree, with the primary server connected directly to the U T C source and the user nodes functioning as the servers at the lowest level of the tree (i.e., at the leaves). N T P servers are synchronized with each other in one of the following three modes: multicast, procedurecall, and symmetric. Within a high-speed L A N (Local Area Network) with small delay, multicasting is used. A n algorithm similar to that of Cristian is used in the procedure-call mode. In the symmetric mode, timing information is retained as part of an association between servers and is used when the highest level of clock accuracy is required. This higher accuracy is obtained by enforcing double message exchange pairing, resulting in four time-stamps. 2.2.2 Approach A s indicated before, N C S requires synchronized clocks with sub-millisecond accuracy, which is not achievable using the existing clock synchronization algorithms discussed above. In this thesis, the algorithm proposed by Nilsson (1998), which allows off-line or on-line clock corrections, is adopted. In the present study, the clock of the control server node w i l l be used as the reference time, and on this basis a control client node initiates the clock synchronization algorithm to readjust its clock. Let C C and C S denote the control client node requesting the clock time denote the responding control server node. Three series of time-stamp data are 23 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING collected by the control client sending the clock time request messages to the control server, and the control server responds by a replying message to the control client, repeated over N data samples. Let t c (n) a request, t (ri)\ N \ N c be the series of time-stamps when the control client sent the clock n=l be the series of time-stamps when the control server received s b c immediately replied to the clock request, and t N (n) c c be the series of time-stamps when the response to the clock request arrived back at the control client. Defining t abs time, tf as the local time of node C , c tf as the absolute as the local time of node C , and assuming both s C and S clocks in the control client and server have a linear growing skew to the absolute time, we have (2.1) t? =t + d c+p ct c C C abs abs ti =t +S +p t S Cs Cs abs where S Cc and S are clock skews, and p Cs and p Cc (2.2) to eliminate t abs (2-2) l a Cs are clock drifts. Combining (2.1) and , one obtains the following linear relation: abs t; c (2.3) — mt * + c i in which . = Cs f \ + p C ^ (2.4) § \ + p Cc and l+ p Ls m— l+ (2.5) p Cc W i t h the message transmission times (based on the clock at node C ) from the control client to C the control server, and the control server to the control client defined as t% cCs and t% respectively, it is common in network clock synchronization to assume their mean values to be equal; i.e., E tsc c c , sCc = jl for n e [ l , . . . , A / ] . Since the time at which the control server handles a particular clock request is unknown to the control client, jl can be used as a 24 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING measure for the time duration (based on clock at node C ) from the request is made, up to the C time when it is handled by the control server, and is estimated as 1 ^ = (2.6) ™I('? (")-£ (")) n=l C C Z 7 V r N The data points in the time series t (n) s b and t C c t^(n) = m(t^(n) N (n) c + t^) can be written as +c (2.7) and tfc(n) = t^(n) + t ^ + t ^ c (2.8) = m{t {n) + fl) + c (2.9) respectively. From equation (2.7), we obtain t (n) s b c c a Hence, by fitting a straight line through the data points of plot t s b (n)\ versus t^ (n) c N its gradient m and intercept c can be determined, which are estimates for m and c , respectively. Here, the least squares line fitting algorithm (Ljung, 1987) is employed which is given as: (2.10) m where i C (D+0 c 1 fr(2) + 1 t^(N) fi (2.11) u_ +J and t Cs - r^(l) t (2) C S B t (N) C s b (2.12) Consequently, using the estimates of m, c and / / from (2.6) and (2.10), the clock reading i n 25 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODEUNG the control server can be transformed to the clock reading in the control client through (2.3). Since the smallest sampling period used in this study is 1 ms and the computers used have relatively low clock drift rates, clock synchronization is done off-line at an interval of 10 m i n with N chosen to be 100 data sets. The Real-time Sub-system employed here reports time i n 100 ns clock ticks since 12:00 a.m. of January 1, 1601. A t the current time of writing this thesis, the clock tick readings are in the order of 1 0 ticks subjecting (2.12) to numerical errors. 17 This can be overcome by finding a time base in which all subsequent clock readings would be subtracted for the purpose of reducing the order of the data values. The time base is set as the smaller clock value between the control server and the control client, through the time base process pairs i n Figure 2.2. However, the resulting clock tick readings and c are still significantly greater than m which can cause a singularity in the matrix inverse of (2.12). This can be resolved by introducing a scaling constant c into (2.12) such that (2.12) becomes f c/ / c m T \ c a C 0" 0 1 ) T T C c C 0" 0 1_ C a -l ( T Cc n V a c 0" 0 1 ) T o (2.13) where c is close to t^ (n). Here, c is set to 10 . Using this clock synchronization approach, c 10 a synchronized clock accuracy of 1 pis is achieved. 2.3 Characteristics of Ethernet Communication Control networks can be grouped into two main categories; namely, cyclic service network, and random access network. P R O F I B U S (Process Fieldbus), ControlNet, FTP (Factory Instrumentation Protocol), and S A E token ring are cyclic service networks while Ethernet and DeviceNet ( C A N ) are random access networks. In cyclic service networks, the nodes are arranged logically into a ring and messages are transmitted in a cyclic order with deterministic behavior, because the maximum waiting time before sending a message is governed by the token rotation time. A token is passed from one node to a predetermined successive node. Only the node with the token is permitted to transmit messages within a limited number of data frames. In random access networks, the C S M A (Carrier Sense Multiple Access) protocol is usually used to regulate the network usage. A node listens (carrier sensing) to the channel before attempting to transmit its message. If the node detects that another node is transmitting a message, it waits for a random amount of time before attempting to retransmit its message. This 26 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Table 2.1: Comparison of four typical communication networks. Ethernet ControlNet DeviceNet PROFIBUS (CAN) Data rate (Mbps) 10/100/1000 5 0.5 0.0096-12 Max. length (m) 100 1000 100 100-1200 Overhead per message (bytes) 38 7 5.9 9 Min. transfer unit (bytes) 46 7 8 0 Max. transfer unit (bytes) 1500 504 8 32-244 Max. number of nodes 00 99 64 32 Deterministic? No No Yes Yes random waiting time is the main reason for the non-deterministic nature o f random access networks. Table 2.1 gives a basic comparison of four typical communication networks. Although, originally, Ethernet is not intended as a control network, it is the most widely deployed L A N (Local Area Network) technology due to its low cost and rapid technological advancement. Data can be transmitted at differently rates; most common are 10 M b p s , 100 Mbps, and 1000 Mbps, which are among the fastest for communication networks. The maximum cable length between two nodes without repeaters is 100 m (40 k m with fiber optics). The allowable data rate for P R O F I B U S depends on the maximum cable length, and it ranges from 9.6 kbps for 1200 m to 12 M b p s for 100 m. Although Ethernet has the longest overhead per message, performance is not affected due to its relatively high data rates. The maximum transfer unit ( M T U ) of Ethernet is 1500 bytes making it ideal for large-scale centralized control networks with a large amount of information per sample. W i t h 8 bytes M T U , DeviceNet is particularly suitable for short messaging networks. A message larger than an M T U is fragmented into multiple packets, which pose a challenge for N C S . For example, a set of sensor readings may be fragmented into multiple packets, arriving at the controller node at different times. In terms of the total number of nodes that can be connected within a control network, the Ethernet has practically no limit, rendering it well suited for long-distance remote control. Various types of Ethernet have the same frame structure (for an individual data packet) which comprises 6 fields; namely, preamble field, destination address, source address, type field, data field, and cyclic redundancy check ( C R C ) . The function of the preamble field is to 27 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING "wake up" and alert the receiving node of an incoming data packet. The destination and source address field contains the unique 6 bytes physical L A N address of the target and transmitter nodes. The type of network-layer protocol is specified i n the type field. The data field is the location where the IP datagram (actual message) resides and the size of the field is variable from 46 to 1500 bytes. The field is padded with additional filler data i f the IP datagram is smaller than 46 bytes. If the datagram is larger than 1500 bytes, it has to be fragmented into additional data packets. The receiving node uses the C R C field to check for bit errors i n the datagram. The Ethernet is based on the decentralized and multiple access protocol called C S M A / C D (Carrier Sense Multiple Access with Collision Detection) specified i n the I E E E 802.3 standard ( I E E E Computer Society, 2002). The nodes within the network have no explicit coordination with each other. Before attempting to transmit a data packet, a node senses (through its line voltage level) whether the network channel is busy or idle. If the channel is busy, it waits until it senses that the channel is idle before starting to transmit the data packet. W h i l e transmitting, if the node senses that some other node is also transmitting (collision), it aborts the transmission of the data packet and transmits a 48-bit jamming signal. The node goes into a random waiting phase (exponential back-off phase) before attempting to retransmit the same data packet again. Such mechanism of the C S M A / C D protocol results i n the nondeterministic nature of Ethernet transmission. The nondeterministic effect of C S M A / C D between communicating nodes is overcome with the use of switched Ethernet i n most modern facilities as compared to the use of legacy hubs or coaxial bus (10base2). However, although network efficiency is increased, switching Ethernet transmission is still nondeterministic because the switches are subjected to packet queuing within a limited buffer and packets are dropped when the buffer overflows. Ethernet-based discrete-time control networks are plagued with the following four classes of problems: • Nondeterministic communication delay. Communication delay is composed of processing delay caused by the time needed for destination determination and bit error checking, queuing delay due to a data packet waiting to be transmitted onto the network link, store-and-forward delay due to the time required to "push-out" all the bits of a data packet into the network link, and propagation delay due to the travel time of the data packet along the network link. It is also be caused by the type of transport protocol used; 28 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING e.g., T C P may initiate a resend i f the data packet is lost or corrupted. • Packet losses. Packet losses are caused by the dropping of data packets from a finite queue i n communication nodes when the queue is full. Data packets can also be lost, or rather unusable, from noisy network cabling which leads to data corruption. • Vacant sampling. Vacant sampling is classified as the situation where no data packet is received within a sampling interval due to loss or delay. • Mis-synchronized (out-of-order) data arrival. Data mis-synchronization occurs when the time sequence according to which data packets received is not the same as the time sequence in which they are transmitted. Figure 2.3 shows the typical data communication delay of Ethernet networks. A histogram distribution is also shown on the side of each plot. Data are transmitted by U D P stream sockets locally via Ethernet and remotely through the Internet. The datagram size is 528 bytes per data packet, and transmitted at 200 ms intervals over 200 samples (Note: The 200 ms interval used here is not meant to be realistic but to give a general picture of the problem at hand. The transmission rate should be consistent with the sampling time that w i l l be used in real-time feedback control (on the order of l-10ms)). The information given i n Figure 2.3(a) has been generated between two nodes from a L A N hopping between 6 nodes. The mean communication delay is 1.362 ms with 0.173 ms standard deviation. N o packet loss is recorded. The information i n Figure 2.3(b) has been generated between the University of British Columbia ( U B C ) i n Vancouver and the University of Toronto in Toronto, Canada. The data packets transited 14 node hops along the route resulting in 72.207 ms mean delay with a standard deviation of 7.886 ms and 12 % packet loss rate which are indicated by the vertical falling signals down to the horizontal axis. Figure 2.3(c) is based on information exchange between U B C and the National University of Singapore ( N U S ) in Singapore over 20 node hops and reaching a mean delay of 239.157 ms with a standard deviation of 3.204 ms. A total of 15 % of the transmitted packets are lost. Clearly, the incurred communication delay increases with the distance between the source computer and the destination computer. Although there is variation in the transmission delay, its distribution is concentrated within a narrow band, as can be seen from the histograms. Figure 2.4 shows the Ethernet transmission characteristics for tracking a 1 H z sine wave of 1 unit magnitude. Data packets of 32 bytes each are transmitted at an interval of 4 ms using the U D P protocol. The response between two directly connected nodes is shown i n Figure 2.4(a). 29 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Obviously, no data packet is lost and the recorded mean delay is 0.459 ms. Figure 2.4(b) shows the tracking response obtained within a L A N setup where data packets are "juggled" between two intermediate nodes as discussed in Section 2.1. Each data packet is juggled 10 times before being directed to the target node. Mean delay of 11.790 ms with minimal data packet loss (<1%) is observed. Frequent vacant sampling and simultaneous data arrival are also observed. Next, an echo server is setup at N U S . The sine wave transmitter and receiver nodes are located locally at U B C . A l l data packets transmitted to the echo server are echoed back to the receiver. The resulting severe response is shown in Figure 2.4(c), which has a mean delay of 840.5 ms and a data packet loss rate of 34.4 %. The delay grew with time until the wave on the receiving end lagged approximately one complete cycle behind the source. This is mostly due to the limited storage space in the queuing buffers along the traversed nodes. In general, the communication delay depends on the number of nodes traversed, speed of each segment, size of data packets, network load, amount of congestion in the network traffic, size of queuing buffer on each traversed node, and the communication protocol of each node. In addition, it can be observed that the number of data packet losses increases with the distance between the two communicating nodes. 30 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 3 2.8 : i ; i 2.6 j ; ! ! ; ; 2.4 T £ 2.2 i — 2 >, Tj i — i — i i 1.8 Q • - i 1 1.6 1.4 r- ~ " - r - hr ^— - 3 0 - 1.2 0 1 20 40 60 80 100 120 140 160 180 200 1 1.2 1.4 1.6 1.8 2 2.2 2.4 Sample 2.6 3 2.8 Delay [ms] (a) 150 1 1 140 130 l 120 1/? J3 1 1 0 100 Q 1 4. 1 1 i 1 + 1 1 l 1 1 l 1 l 1 l l l [l 1 l f 1 1 0 T 1 20 40 60 1 !— 1 1 — 1 l l 1444 r 1 i i 1 > 100 ^ 1 100 1 1 | | E CO O ill w 80 1— 120 1 I 120 I Hlfftf 140 160 it180 O 2 200 70 80 90 100 110 Sample 120 130 140 150 Delay [ms] (b) CD O 0 20 40 60 80 100 120 140 160 180 200 232 Sample 234 236 238 240 242 244 246 Delay [ms] (c) Figure 2.3: Communication delay in Ethernet networks, (a) W i t h i n a L A N ; (b) Between the University of British Columbia and the University of Toronto; and (c) Between the University of British Columbia and the National University of Singapore. 31 CHAPTER 2 CONTROL 2 \ 1.6 C (a) to ARCHITECTURE AND SYSTEM MODELING \ 1.8 1.4 NETWORK 7 / XT jr i \: % 0.8 —A | 0.6 0.4 _l 0.2 J. L 0.2 0.3 0 0 : %. > •ft. i ; ; 0.1 T . . . . . . '4 i l - % - - i - - - r - - - i ^ j i i ' """! 'i '1 \ k \ . . . J . . . V 0.4 : : \ 0.5 0.6 0.7 0.8 0.9 1 time [s] (b) (c) 3.5 4 time [s] Figure 2.4: Sine wave tracking i n Ethernet networks (circles - transmitted; and solidsquares - received), (a) Direct transfer within a L A N ; (b) Using data "juggling" between intermediate nodes; and (c) Loop transfer with remote echo server at the National University of Singapore. 32 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 2.4 Modeling of the Electro-hydraulic Manipulator This section describes the key experimental platform that is employed for real-time experimental evaluation and technological demonstration of the networked control and supervisory control strategies, and the remote monitoring architecture developed in the succeeding chapters. It is an industrial fish-processing machine (Tafazoli, et al., 1998, de Silva, 2005), known as the "Intelligent Iron Butcher," developed in the Industrial Automation Laboratory of the University of British Columbia to automate the head cutting i n fish, which is the first primary stage in the canning process. The goal is to realize fast and accurate cuts so as to minimize the wastage of useful meat and consequently to increase the recovery and throughput. 2.4.1 System Overview The industrial fish-processing machine, as shown in Figure 2.5(a), operates using an ac motor-powered reciprocating, logic-driven indexing conveyor system to accurately move the fish from the feeder end to the vision module and the cutter assembly of the machine in an intermittent manner. The cutter assembly, as the crucial component of the machine shown as a close-up view in Figure 2.5(b), consists of a two-axis orthogonal electro-hydraulic planar manipulator on which a pneumatically operated heavy-duty guillotine blade is mounted. There are two vision sub-systems, each consisting of a C C D camera, a frame grabber, and an image processor. The first vision-based feature extraction sub-system is located just before the cutter assembly to analyze the geometry of each fish, particularly the position of the gill with respect to the reference frame of the cutter assembly, in order to determine the optimal X - Y positioning coordinates for moving the cutter blade. The motion command is streamed to the hydraulic manipulator in the form of a step input, for each cut. The second vision sub-system is located beyond the cutter assembly to inspect the quality of a cut, and it feeds the extracted information to the hierarchical supervisory controller of the machine for product quality assessment and for automatic tuning and performance enhancement of the machine (see Chapter 7). The main experimental focus in the present work is accurate control of the electrohydraulic positioning system of the cutter assembly. The cutter assembly consists of two orthogonal prismatic axes ( X and Y axis). Each axis is actuated by a hydraulic cylinder as shown in the schematic representation in Figure 2.6. The hydraulic pistons have a maximum 33 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Figure 2.5: The Intelligent Iron Butcher, (a) A view of the entire machine; and (b) Close-up view of the electro-hydraulic manipulator. 34 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Power Block i Note: X Gage Pressure Transducers Figure 2.6: Schematic diagram of the electro-hydraulic manipulator. stroke of 50.0 mm, and the fluid flow within the cylinder is controlled using a flow-controlled servo-valve, which has two stages; namely, the pilot stage which consists of a torque motoractuated, double-nozzle flapper, and the booster stage consisting of a pressure actuated, springcentered valve module with double spool configuration (Anderson and L i , 2002). The differential pressure from the pilot is applied across both spools of the boost stage and is balanced by the centering springs. This produces a spool position proportional to the differential pressure and therefore to the input current. The input current ranges between - 4 2 m A to +42 m A . A custom built voltage-to-current converter is used to convert command voltages from the data acquisition board to input current within the pre-specified range. The operating bandwidth of this manipulator is estimated at 30 H z . 35 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING Linear magnetostrictive displacement transducers are used for absolute position sensing of the hydraulic cylinders. They have a resolution o f 0.025 m m when coupled with a 12-bit analog-to-digital converter. The pressures i n the head and rod sides i n each hydraulic cylinder are measured using gage fluid pressure transducers. The force applied to the blade assembly can be deduced from the chamber pressures of the cylinder. 2.4.2 System Identification and Model Validation Since the networked control strategy investigated i n the present thesis is model-based, sufficiently accurate parametric model for each axis o f the electro-hydraulic manipulator is required. Linear, normalized, discrete-time transfer function and state-space models are acquired through experimental system identification method o f correlation analysis (Ljung, 1987). Each axis o f the system is excited by injecting a series o f Pseudo-Random Binary Sequence ( P R B S ) current input u into the servo-amplifier of each axis. A choice of |M| = 7 m A at a P R B S step interval of 10 ms over a duration o f 2048 steps sequence is found to be sufficiently exciting without causing the piston to hit its stroke limits and is used i n the model identification procedure. The responses of the system recorded at 10 ms sampling intervals are the piston position y [mm], piston velocity y [mm/s], head-side pressure P [psi], and rodh side pressure P [psi]. Since the raw sensor readings are rather noisy, the position and pressure r measurements are acquired at a sampling frequency o f f = 1000 H z and filtered through a s low-pass 5th-order, discrete-time Butterworth filter with a cutoff frequency o f 80 H z , of the form: _ bo + b f •"•filtered n ' z , l+az fl in b which fQ =b « r i =-3.3780, a = 4.8944xl0~ , b f2 4 f5 estimated f] from ] _ i f2Z~ +b 2 +a z f2 +b z~ 4 f4 +a z f3 =4.7518, =b f^ +b _2 a '+a z f4 = 2 . 4 4 7 2 x l 0 , and b - 3 f4 f2 the position measurement through f5 (^-14) raw X +a z ' f5 =-3.4397, f3 +b z' 5 -4 a f4 =b =1.2740, a =-0.1924, f5 = 4 . 8 9 4 4 x l 0 " . Velocity is 3 f3 a low-pass filtered, discrete-time differentiator given as (Tafazoli, et al, 1998): 1-z" (±T +T ) s v + 1 aT -T )z s •y (2.15) v 36 CHAPTER 2 CONTROL with the sampling interval 7^ =l/f , s NETWORK ARCHITECTURE AND SYSTEM MODELING and the filter time constant T = 1/500 s. v The collected raw response data are pretreated to remove the high frequency disturbances beyond the frequency range of interest for the dynamics of the system, and also to remove the low frequency disturbances such as drift and steady-state offset. Drift is removed by passing the response data through a high-pass 5th-order Butterworth filter of the same structure as (2.14) with 0.5 H z cut-off frequency, i n which a f4 b f2 = 4.6085, a fS =-0.9033, b f0 a fl = -b fs = -4.8983, = 0.9504, a = 9.5985 , a f2 f3 b =-b f] f4 = -9.4053, =-4.7522, and =-bf =9.5044. The steady-state operating pressures of the cylinder (with the position 3 and velocity at the origin) are 265.8 psi for the head-side, and 474.2 psi for the rod-side. In order to obtain normalized models of the system, the pretreated responses as well as the input data are scaled accordingly (to facilitate controller design and analysis, and to eliminate the need for agreement of units). The scaling for the input, position, velocity, and pressure data are 42 m A , 25 mm, 200 mm/s, and 500 psi, respectively. Transfer Function Model Identification Figure 2.7 shows the pretreated data set (before scaling) for the current input and the position response, as collected from the X-axis of the electro-hydraulic manipulator. It is used for discrete-time transfer function modeling of the following A R X (AutoRegressive external input) model: G {z uy b +b 0 )=z +- + b z- lZ Hh l + ojz +--- + a z (2.16) l na The data set i n the range of 300-800 samples is used for model building and the set i n the range of 900-1700 samples is used for model cross-validation. A gross estimate o f the impulse response function, obtained through the covariance function between u and y , is shown i n Figure 2.8. It is observed that there is a lag of 2 sample intervals before a positive response is noted. Accordingly, a time delay of n - 2 is estimated i n (2.16). The next step is to determine c the model structure (order) by selecting n a and n b that w i l l provide a "good" model fit, without arriving at a model order that is too high that would unnecessarily complicate the subsequent usage of the model; particularly i n relation to the computational complexity, and the robustness and uncertainties in the model-based feedback controllers. Figure 2.9 shows the best 37 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING fit loss function criterion, in terms of the percentage of unexplained output variance (the ratio between the prediction error variance and the output variance, expressed as a percentage) calculated using the cross-validation data set, for different total number of parameters (n +n +n ). a b c Only the model that has the best fit for the given total number of parameters is shown. In the present study, a total of 8 parameters, with n = 2, n - 4 and n = 2, is chosen a b c after taking into consideration the high computational requirements of the model predictive control ( M P C ) approach for N C S . The resulting parameters of the A R X model of (2.16) for the X-axis of the electro-hydraulic manipulator are: a = - 1 . 5 6 2 0 , { a = 0.5885, b =0.007691, 2 0 b = 0.01608, b = 0.004824, b = 0.006505, and b = 0.002786. x 2 3 4 The resulting model is cross-validated through residual analysis (Figure 2.10), and comparison of predicted and measured output responses (Figure 2.11). Figure 2.10(a) shows the correlation function of residuals (prediction errors) from the output response, which is reasonably within a 99 % confidence level. In Figure 2.10(b), a clear negative correlation at lag 2, i n agreement with the model, is observed in the cross-correlation function between the input and the output response. Figure 2.11 shows that the predicted output response from the identified model is able to sufficiently capture the dynamics of the measured output responses although the model seems to have a smaller gain, which can be easily compensated i n controller design. The frequency response of the identified model is given i n Figure 2.12, indicating a smooth stable model with an evidently low open-loop gain. Similarly for the Y-axis of the electro-hydraulic manipulator, the following parameters of the A R X model are obtained: a, = - 1 . 6 6 , a = 0.6796, 2 b = 0.01153, 0 6, =0.02643, b = 0.003392, b = -0.01742, and b = -0.005612. 2 3 4 38 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 10 llllllllillllll r 0 3 a, a -5 -10 Ill 0 200 400 600 o llijlJI,l ' 1 i jlllp |" 800 1000 1200 1400 1600 1800 2000 Sample k Model G 111 'I II I I i! ll 1:11 II f Cross yalidMion. z o u CO o 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Sample k Figure 2.7: Pretreated input and position data collected for transfer function model identification. Figure shows the region used for correlation analysis and model crossvalidation. 0.05 0.04 © 0.03 © •° 3 © 0.02 © 0.01 0 © -0.01 -0.02 Figure 2.8: identification. 0 2 Scaled 4 impulse 6 8 10 12 14 response estimate for 16 18 20 Lags [step] transfer function model 39 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING ari <u o fl > 2.5 \no &< 2 O me T3 enl i2 "a X u c u ISO 1.5 1 0.5 o OH 0I 0 LJJ I II i II 5 I II II I II i II II II II II i I I 15 20 Total no. of parameters 10 Figure 2.9: M o d e l fitting for transfer function model identification. 190.5 9 ? ? 9 ca 9 9 T 0 -0.5 Q (p 9 p c (; [ 10 15 20 25 Lags [step] (a) 0.2 £ u 999nv v^ 0.1 9 0 -0.1 ; ,9 Q (T) o -0.2 -0.3. -25 _i -20 -15 -10 -5 0 (b) 5 10 i_ 15 20 25 Lags [step] Figure 2.10: Residual analysis for transfer function model identification. Grey enclosures correspond to a confidence level of 99%. (a) Correlation function of residuals from output; and (b) Cross-correlation function between input and residuals from output. 40 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 0.05 e o 3 O T3 -0.05 o 00 -0.15 300 400 500 600 700 800 Sample k Figure 2.11: Transfer function model cross-validation through comparison of predicted scaled output of the model (thin-line) with the measured scaled output (thick-line) in the region indicated in Figure 2.7. 3 10 10 10 10" Frequency [rad/s] 10 10 10 10 Frequency [rad/s] Figure 2.12: Bode plot of the identified transfer function model. 41 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING State-space Model Identification The experimental evaluation of the networked control strategies developed in this study also requires a discrete-time state-space model of the electro-hydraulic manipulator, of the form: x k+i = A x k + B u k (- ) 2 where x e E " is the state vector of the system at time k, u e k at time k, k As R , nxn and Be R . nXm E m 17 is the control input vector The state vector for the present system is defined as follows: x = [xi x 2 x 3 x f=[y 4 y P Pf h (2.18) r The experimental identification of a normalized state-space model for the X-axis is carried out using a similar correlation analysis as before. Figure 2.13 shows the collected four pretreated state responses data (before scaling). The data set between 200 and 800 sample steps is used for modeling, and the resulting model is cross-validated with the data set between 1000 and 1400 sample steps. A black-box discrete-time state-space model is estimated using a standard prediction error, maximum likelihood method based on iterative minimization of a loss function criterion similar to that used in the transfer function modeling. The Matlab® System Identification toolbox is employed to facilitate the model estimation giving the statemodel matrices of (2.17) as A = 1.06730 -0.10423 0.13156 -0.02484 0.89404 -1.51910 0.45326 -0.00123 0.23267 1.15180 -0.94321 0.30104 0.18348 0.19487 0.28778 0.41143" ' 0.00138 " , B = 0.01027 -0.00862 -0.02929 The eigenvalues of this open-loop model are located at 0.7457+J0.3394 and 0.9547+J0.0791. Figure 2.14 shows the autocorrelation of the state residuals (prediction errors) and the cross-correlation between the input and the state residuals for each of the four states. The horizontal dashed bars indicate a confidence level of 99 %. Although acceptable, some correlation is observed for most of the states. This is inevitable for a relatively low-order four state model fitted to represent a nonlinear system. It is evident that the internal immeasurable states are neglected. In order to reaffirm that the identified model is sufficient to capture the 42 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING dynamics of the system, the state responses of the model are compared with the actual measured state responses, as illustrated in Figure 2.15. 5 ""0 500 1000 (d) 1500 2000 Sample k Figure 2.13: Pretreated state response data collected for the state-space model identification, (a) Position response; (b) Velocity response; (c) Head-side pressure; and (d) Rod-side pressure. 43 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM Lags [step] MODELING Lags [step] Figure 2.14: Residual analysis for state-space model identification. Horizontal dashed bars indicate 99% confidence levels, (a) Autocorrelation of residuals for state x ; (b) Cross-correlation function between input and residuals from state x \ x (c) x Autocorrelation of residuals for state x ; (d) Cross-correlation function between 2 input and residuals from state x ; (e) Autocorrelation of residuals for state x ; 2 function 3 (f) Cross-correlation between (g) Autocorrelation of residuals for state x ; between input and residuals from state input 4 and residuals from state x ; 3 and (h) Cross-correlation function x. 4 44 CHAPTER 0.061 . 1 . , , 2 , CONTROL , NETWORK ARCHITECTURE AND SYSTEM MODELING 0.15 1 Figure 2.15: State-space model cross-validation through comparison of simulated scaled response of the model (thin-line) with the measured scaled response (thickline), (a) State x ; (b) State x ; (c) State JC ; and (d) State x . x 2 3 4 2.5 Summary A control network architecture for networked control systems ( N C S ) was developed within an Ethernet network. The hardware interconnection and the software entities, particularly the client-server communication framework, were developed and implemented i n detail. The integration of a precise off-line clock synchronization algorithm based on message passing and least-square line fitting would allow real-time implementation of feedback control strategies on high-speed servo systems over a communication nondeterministic communication delay, packet network. losses, vacant Although plagued with sampling, and data mis- synchronization, Ethernet has proved to be a viable communication network for control 45 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING applications. The inner working of a fish-processing machine which is the key experimental evaluation platform in this study was described with the emphasis of the electro-hydraulic manipulator sub-system. Sufficiently accurate discrete-time transfer function and state-space models of the manipulator were identified. 46 Chapter 3 Predictive Networked Control with Future Input Buffering Distributed control networks encounter non-deterministic delays in data communication between sensors, actuators, and controllers including direct feedback control and higher-level supervisor control. This chapter presents a novel strategy, which extends the M o d e l Predictive Control ( M P C ) algorithm to compensate for these data-transmission delays. In this context, the communication lines between the sensors and the controller, and the controller and the actuators are considered. The strategy developed in this chapter incorporates a minimum effort estimator to estimate the missing or delayed sensor data, and a variable horizon, adaptive predictive controller to predict the required future control actions to drive the plant to track a desired reference trajectory. Action buffers are introduced at the actuators to sequence the future control actions. The developed scheme is implemented on the dual-axis hydraulic position system of the industrial fish-processing machine, which was described in Chapter 2. The present chapter focuses on developing control strategies for networked control systems ( N C S ) , termed "networked control strategies" in this thesis, which w i l l render the network transmission delays transparent to feedback controller design. The chapter is organized as follows. The next section focuses on the development of a novel control strategy based on efficient estimation and an extension of the multivariable predictive control problem. Section 3.2 addresses the implementation issues of real-time networked control. The performance and effectiveness of the developed strategy is evaluated in detail in Section 3.3, where key experimental results are presented and discussed. 3.1 The Networked Control Strategy The transmission delay incurred in a communication network can fluctuate somewhat randomly depending on the nature and the level the information transmission activity and the level of congestion in the network at that particular time. This causes difficulty in representing the delay with a simple and deterministic model that can be used in feedback controller design. 47 CHAPTER The frequent 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING and unpredictable occurrence of data losses and vacant sampling further complicate the problem. The strategy developed in this chapter simplifies the design of a feedback controller by requiring only a model of the system under control, excluding the communication network. Specifically, no prior information of the transmission characteristics of the network is required. 3.1.1 Transparency of Transmission Delays Figure 3.1 gives a simplified schematic diagram of the networked control strategy developed here. It consists of a plant (the system under control), and the sensor and controller nodes, which are located at a remote site, and connected through a network to an M P C controller module located at a local monitoring and control station. The data transmission delays of sensor-to-controller segment and controller-to-actuator segment of the networked control system ( N C S ) are represented by T SC and T , CA respectively. In this approach, it is assumed that the sensor node, the actuator node, and the controller have an identical sampling period (sampling interval) h . The internal clocks of the three nodes are synchronized using the clock synchronization algorithm presented in Section 2.2.2. The sensor node samples the outputs (responses), combines them into one data packet, and Input Buffer J * Actuator Node h H 1 1 System I_ Sensor Node Communication Network Figure 3.1: The developed networked control system (NCS). 48 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING then transmits the data packet to the controller node. Each data packet is "time-stamped" so that the delay information can be extracted at the controller node so as to indicate how " o l d " the received measurement is. A t the controller, the received sensory data are stored in a shared memory (or, a database). This stored data history is used by the model predictive controller (MPC) and the model identifier. A t each sampling interval, t sc of is determined first. The number measurements that need to be estimated by the minimum effort estimator to fill in the missing sensory data up to the current k -th sampling instant, is determined using T SC and the "age" of the latest sensor data. Then the output of the estimated system is updated into the shared memory. Besides using in the subsequent computations of control actions, the predicted output can be used in the next sample instant i f there is an event o f vacant sample or data loss. For of better visualization, Figure 3.2 illustrates a simplified example of the basic mechanism the developed networked control strategy at a particular time step k. Assume that the sensor-to-controller transmission delay (discrete) is t k sc =\t ~\ = 3h sc Actuator Node and the controller-to- Sensor Node System 1 1—|'""|""T' 'T""I , time £-5 | k-3 | ifc-l | k+1 k-A k-2 k k+2 k-5 \ k-3 | k-1 | k+1 \ k+3 \ k+5 | t i m e k-A k-2 k k+2 Control Signal k+A k+6 I k-i £-8 | k-5 | k-3 \ k'-\ \ k-6 k-A k-2 I k-1 | k-5 \ k-3 \ k-1 | jfc-8 k-6 k-A k-2 time k time k Response Figure 3.2: A n illustrative example of the developed networked control strategy. 49 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING actuator transmission delay (discrete) is r* = |~T ~| = 47i. A t the time instant k, the sensor a ca node samples the system outputs, combines them into one data packet, time-stamps it, and sends it through the network. N o w this data w i l l take some time (3/z) to reach the controller, so at the same instant k, the controller w i l l need to predict the 3 missing sensor data values up to time k. Using the past and predicted responses, the controller w i l l then calculate the current and future control signals. Based on the current transmission delays information, which is known from the "age" the latest received data, the required prediction horizon is deduced. W i t h t k ca =4h, the prediction horizon is set to 6 steps ahead (see Section 3.1.4 for the factors involved in deciding the lengths of prediction horizons). So, the current and the 6 future control signals w i l l be time-stamped and transmitted to the actuator node. Meanwhile, at the same instant, the buffer before the actuator would contain a string of control signals that had arrived earlier. These 6 predicted control inputs (indicated by hatched columns i n the figure) were predicted at time k - 4 . Accordingly, at this instant, the control action corresponding to the discrete time step k is selected from the string and sent to the actuator. This cycle is repeated at every sampling interval. 3.1.2 Minimum Effort Estimator A minimum effort estimator similar to that in (Kaynak, et al., 1991) is used to estimate the delayed or missing sensor data. It is a polynomial type estimator and employs a multivariable input-output model of the C A R E V I A (Controlled-Auto-Regressive-Integrated-Moving-Average) form (Clarke, et al., 1987): A(z- )y(k) = B( -')u(k-l) l z where u(k)eR m C ( z ) are pxp - 1 A =l - z - 1 + ^C(z- )e(k) A (3.1) l is the control input vector, y(k)e~R p is the output vector, A(z~ ) and monic polynomial matrices, B(z~ ) is a pxm l l polynomial matrix, and is the difference operator. Note that this model represents the plant under control, and does not include any dynamics incurred by the communication network. The C A R I M A model is chosen to coincide with the prediction model used i n the predictive control part (see Section 3.1.3). Hence, the online estimation of only one set of model parameters is needed i n the indirect adaptive control case (see Section 3.1.4). It is assumed that e(k) is white noise 50 CHAPTER giving C ( z ) = / 3 PREDICTIVE , where/, e R' _ 1 NETWORKED CONTROL WITH FUTURE INPUT BUFFERING represents an identity matrix. Let the number of delayed or Xl missing sensor data samples at the controller, at the k -th sampling instant be T k Using (3.1), the estimated value for y(k -T c = z(I -M(z- ))y(k-T ) k l c = \t "|. sc +1) can be determined as: k y(k-T +l) c + B(z- )M(k-T^) k p Define the estimation error as s{k) - y(k)-y(k). (3.2) l c Using this estimation error as the correction term, the optimal output estimate is obtained as: y(k- r +l) = y{k- k sc t +l) + e(k-T ) k (3.3) k c c Continuing the same way, the delayed output can be estimated up to the k -th instant; i.e., + i) = Hk-T +i) y(k-^ where y(kinstant + e(k-^ ) k c T +i) = y(k- for i = l,2 c sc rj (3.4) c T + i - 1 ) for i > 1, to replace the unknown values of the output at k k c c (k-r ). k c In the current test system, which is the two-axis electro-hydraulic manipulator of the fishprocessing machine (see Section 2.4), A(z~ ) is of second degree and B(z~ ) is of fifth degree l l (from the C A R I M A equivalent of (2.16)), with m = 2 and p - 2 ; i.e., A(z~ ) = 1 +A z~ l B(Z~ ) = BQ,2X2 \,2X2Z~ 1 +B +A 1 2 1 + B iax2 2,2x2^" 2 + B z" (3.5) 2 2t2x2 3,2x22" 3 + B 4,2X2^" 4 + f i 5,2x2Z~ ( - ) 5 3 6 Application of (3.4) yields: ji(fc-4+0 = ( / - A ) i ' ( f c - 4 + ' - i ) + ( ^ i - ^ ) 5 ' ^ - i + * - 2 ) 2 + A y(k - T + i - 3) + B Au(k - T + i -1) + Z?,Aa(& - r k 2 k c 0 + i - 2) k c c + B Au(k - T + / - 3) + B Au(k - T + i - 4) + J? Aii(jfc - z k 2 k c 3 +i-5) k c 4 ^ c + B Au (k - T) + i - 6) + e(k - T ) K 5 for i = l,2,...,T k c n =deg(A(z )). -1 a c with Here, C y(k-t +i-n ) k c Au(k-z k a = y(k-T +i-n ) k +1), Au(k-r c k c c + 2), a Au(k-1) for i^n , a are where calculated at previous time steps, by the predictive controller discussed in the next section. 51 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 3.1.3 Multivariable Predictive Control Once the delayed or missing system responses are estimated, the next step of the networked control strategy that is develop here is to predict the required k -step-ahead future control signals that w i l l drive the system to track a desired trajectory. A n extension to the multivariable Generalized Predictive Control or G P C (Zelinka, 1997; Camacho and Bordons, 1998) is used for this purpose. The derivation o f the G P C algorithm is outlined now to set the groundwork for the development of the variable predictive horizon and adaptive extension, which are required i n the present scheme. A s indicated i n the previous section, the C A R I M A system model (3.1) is adopted. Here an optimal set of current and future changes i n control signals: Au(k + j) for j = 0,l,...,H is sought to continuously minimize the quadratic cost u function X \\y*(k + j\k)-r(k V (H ,H ,H )= k l 2 u + j)g+^\\^u(k + j-l)f (3.8) R where y*(k + j\ k) is the j -step-ahead predicted system outputs based on the history up to the time instant k, and r(k + j) are the desired (reference) future trajectories. H , H , and H x 2 u are, respectively, the minimum and maximum prediction horizons, and the control horizon, where \<H <H } 2 and H <H . The weighting sequence matrices Q and R are diagonal and u 2 positive definite. The j -step-ahead outputs need to be predicted for use i n the control law. The Diophantine equation: I =E j(z- )M(z- ) k l + z- Ff(z- ) l j m (3.9) 1 and (3.1) yield, y(k + j)^F {z-')y{k) k + E){z- )B{ - )Au{k x l z + j-\) + E){z~')e^ + j) Note that deg(E*(z"')) = j - l and d e g ( F * ( z ) ) = d e g ( A ( z ) ) . N o w y*(k + j\k) -1 -1 (3.10) is found by taking the expected value of (3.10) and using the fact that e(k) is zero-mean white noise (E[e(fc)] = 0);thus, y*(k + j\k) = F? ( z )y(k) + E) ( z )B(z~ )Au(k + j-l) _ 1 _ 1 l (3.11) 52 CHAPTER The second term of 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT consists of the past (up to time k) and future inputs (3.11) AM. BUFFERING This term can be separated into two parts by introducing the new Diophantine equation: E) (z~ )B(z~ ) = G (z' ) + z- H j l l k 1 j k {-) x (3.12) Z which yields y*(k + j\k) = G) (z~ )Au(k + j-l) + H) ( - )Au(k l 1 Z = G j(z- )Au(k k where Fj - H (z k )Au(k-l) F (z~ )y(k) k l (3.13) + j-l) + F l k + F (z l -1) + )y(k) k l is the free response term. This term can be easily computed recursively by utilizing ( 3 . 1 ) and ( 3 . 2 ) as F = z(I -AA(z~ ))F k ] +1 +B(z~ )Au(k k l + j) (3.14) with F = y(k) and Au(k + j ) = 0 for 7 > 0 . Considering the three prediction horizons 0 H , and H , where j = H -H , 2 u 2 H, x the matrix form of the j -step-ahead prediction is obtained as { 7- = G'H. „ AU„ H„ +F. ^* H H \2u (3.15) 12 where Y = y*(.k + H y y*(k + H +l) T l 1 AU =\Au(k) Au(k + Y) T T 2 ... Au(k + H -l) y T Hu ... y*(k + H ) ] T u and Hy H -\ G { GH G H H -\ 2 q pXm G _ H] 2 G \ ~ H H U G G 12K G with G =0 • H -2 G 2 G 2~ u H H for q < 0 . Using the matrix notation of (3.15), the G P C quadratic cost function can be written as: 53 CHAPTER V =(G AU k Hn 3 PREDICTIVE NETWORKED +F Hu -r) Q(G AU Hn in which Q = diag(Q Q ,...,Q _ ) 2 H2 WITH FUTURE +F -r) T Hn v CONTROL Hu v 2 BUFFERING + AU RAU (3.16) T Hn Hu and R = diag(R R ,...,R J. H]+l INPUT H Hu B y performing either quadratic programming or analytical differentiation to minimize V with respect to At/^ , the k optimal sequence of control actions AU Hu H AU =[GH QG R] G T U In are obtained as 12U X Hi2u + Q{r-F ) (3.17) T Hnu Hn a typical receding-horizon G P C strategy, only Au(k) is extracted from However, the present networked control strategy uses all the elements of AU H AU . Hu to compensate for delayed or missing control signals in the controller-to-actuator communication lines. These current and future control signals w i l l be time-stamped and transmitted back to the actuator node. W h e n the future control signals i n AU Hu are to be used, the weighting sequences of Q and R cannot be set too high, i n order to maintain closed-loop stability. In networked control, it is found that satisfactory performance is achieved only for a certain range o f weighting sequences depending on the level of network congestion (see Section 3.4). 3.1.4 Variable Prediction Horizon In order to reduce network traffic and the controller computation load, the number of future steps of a control signal should be as few as possible. A s a result, the size of the data packets traveling from the controller back to the actuators w i l l be reduced as well, since larger data packets consume more network bandwidth, resulting i n longer transmission delays. This objective is achieved by varying (minimizing) the prediction horizon of the G P C strategy. The required number of future control steps is determined by the variable prediction horizon, which is in turn determined from the "latest" known controller-to-actuator delay T ca controller data packets contain the r ca (Note: sensor-to- information which is determined by subtracting the time the actuator received a data packet by the time stamped i n that particular data packet, at the actuator node and then passed on to the sensor node to be sent back to the controller node). It should be noted that the size of the sensor-to-controller data packets is fixed since they only carry information of sensor readings, time-stamps and some required states of the system. This 54 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING is i n contrast to the size of the controller-to-actuator data packets, which is variable, depending on the length of control horizon as discussed in the following. In the variable horizon strategy introduced here, the control horizon is varied as H k = a + T + J3 where r k k a a = \r ca ], a is the minimum control horizon required for a pre- specified tracking performance, and j3 is set as a step ahead safety measure to compensate for vacant sampling or sudden continuous loss of data packets. Through the experimental work carried out on an Ethernet network in this study, it is found that setting 1 < /? < 5 is sufficient. The value of /? can be changed accordingly to characterize a particular type of network without affecting the performance of the control strategy. This is because the performance w i l l improve with a longer prediction horizon. The only concern is the extra computation load for the control computer. Noting that H <H , U 2 what is used here is H =H +l, 2 with H set to u x the physical dead-time of the system. Without loss of stability, H can be set to 1 (Clarke, et ] al, 1987). Every time the prediction horizons are varied, the free response term F dynamic matrix G H N have to be dimensionally restructured. The term c FH a H n Q and the 2 D e X2 restructured by recursively evaluating (3.14). However, the adaptive restructuring of only be formulated after the order of the plant is determined. Let G { G H I 2 e a s i ly can be the matrix element of Section 3.1.2 that the servo system used i n the current work has n =deg(A(z )) = 2, n =deg(#(z )) = 5, m = 2 and l l a b p = 2. Hence, given that the initial conditions are zero, it can be seen from (3.15) that the vectors g q are the expected output sequence for q = 1,2,...,H - 1 when subjected to a unit2 impulse response at time k ; i.e., g m q = y(k + q) = (I-A )g^ x + (A -A )g _ m X 2 q 2 +A g™_ 2 3 +B Au q x (3.18) where for in —2: Au =[l x Offorgj; ^,=[0 i f for g\; 55 CHAPTER 3 PREDICTIVE NETWORKED g™=0 for CONTROL WITH FUTURE INPUT BUFFERING q<0 and B =0 for q < H - 1 and q>n =5 x 3.1.5 b Online Parameter Adaptation Since the generalized predictive controller is a model-based approach, an up-to-date model of the system is required to permit good prediction and control. Because the system may be nonlinear and time varying as well, an online model identifier is used to determine a model of the system. The normalized-gain version of the recursive least squares ( R L S ) estimator is used in the present work (Ljung, 1987). The algorithm can be written as: 6{k) = 0(k - 1 ) + y(k)Z(kY W(k)A(k)~ n(k) l (3.19) l tj(k) = y(k)-Y(k) 0(k-\) (3.20) T S(k) = 3(k-l) + y{k)\w(k)A{kr W{k) x -E(k-\)~\ T where the estimated parameter vector 0 e ja>p(P" +"'H+i)) [ f fl w)=\(Aif ... Kf Kf (4) (Bit - - T (Bff- s Kf.- o r m (3.21) e d as «f ... Kf « K f - K) The subscripts represent the order coefficients, and the superscripts represent the column number. The regression vector is formed as 9(k) = [-y(k-^ -l) y(k-<-n Y 7 c a u(k-T -\Y k sc u{k-z -n -\) k T sc The regression matrix b W(k)sR p{pna+m{nh+mp in (3.19)-(3.21) is constructed from the regression vector (p(k) through the following Kronecker product: Y(k) = Q{k)®I- (3.22) 56 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING The weighting matrix A(k) >- 0 is chosen as A(k) = dmg(X ,X -\...,X ,X,l) p p 2 and the updating step size y(k) = 1 - X, where 0 < X < 1 is a pre-specified forgetting factor. In the present strategy of networked control, the R L S estimator uses delayed, actual data (not the predicted values) from the sensors and the controller, which are stored i n the shared memory. Thus it is assumed that the dynamic characteristics of the system under control do not change during a worst-case delay. If the nominal model of the system is unknown, a small yet sufficient excitation signal is injected into the system during startup so that the model would converge to the actual system dynamics before control is initiated. 3.1.6 Adaptive Weighting Sequences It is found experimentally (see Section 3.3.4, Figure 3.9) that, depending on the level of network load (delay), relatively accurate trajectory tracking is achievable by the present networked control strategy, only within a certain narrow range o f weighting sequences R and Q of the G P C quadratic cost function (3.8). Generally, higher weighting sequences provide better tracking at low network loads, but lower weighting provides satisfactory tracking at high network load. In order to maintain good tracking throughout a wider range of network delays, the developed control scheme is further enhanced by incorporating a weight-scheduling algorithm. The weighting sequences are continuously modified online as a function o f network delay. Since the network delay can significantly fluctuate from sample to sample, the delay level is estimated using an exponential-weighted-moving-average ( E W M A ) algorithm; i.e., Limated T = ^ ~ ^e\Lated + ^Lasured • T h e v a l u e ^ = 0.125 is recommended (Kurose and Ross, 2003). The crossing points for weight scheduling have to be determined through experiments. For example, i n the particular system used i n this study, the following criterion is used for fl = d i a g ( p , , p ) : 2 f 0.200 0.100 A=A> = 0.010 0.005 for r,estimated <10ms for 10 ms < T.estimated < 2 0 m s for 20 ms <Testimated <25ms for r.estimated > 25 ms / 57 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING The program steps for the developed G P C strategy are summarized below: 1. Read packets of sensor data that arrived within the previous time step, i f any. 2. Scale the input signals. 3. Update the history of system outputs replacing previously predicted values with actual data. 4. Determine the latest r k sc from the difference in the current time k and the time-stamp of the latest-received data packet. 5. Estimate the missing or delayed system outputs up to the k -th time step using (3.7). 6. Update the reference trajectory vector r(k + j). (Quintic polynomial reference trajectory is used here). 7. Determine the currently required prediction horizons H and H . 8. Restructure and recalculate the free response term F ^ using (3.14) based on H , 2 H u x H, 2 H , and the latest estimated system model A ( z ) and B(z~~ ) • _ 1 l u 9. Restructure and re-compute the dynamic matrix G # 12h using (3.18) based on / / , , H, 2 H , and the latest estimated system model A ( z ~ ' ) and Biz' ) • 1 u 10. Update the average transmission delay and then schedule the correct weighting sequences Q and R . 11. Compute the current and future changes in control actions using (3.17). 12. Scale the control action values. 13. Update the history of control actions for use i n step 5. 14. Send the strings of future control actions to individual or grouped actuators. 15. Wait until the next sampling interval and repeat steps 1-12. 16. In addition, the online system model estimator (3.19)-(3.21) runs i n the background. 3.1.7 Actuator Buffering The strings of future control actions computed by the G P C strategy are sent to the actuators over the communication network. These control actions are buffered at the actuator node, i n its own memory. N e w data w i l l overwrite the corresponding old data, based on their individual time step. A t the sampling instant k of the actuator node, the "future" control signal that is received at the previous sampling instant (which now becomes the current control signal) w i l l 58 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING be used to actuate the system. W i t h such a control scheme, the system would be made deterministic because its inputs and outputs are neither varying nor delayed. Such a buffering mechanism for control actions can be easily embedded on-board within the housing of the distributed actuators with built-in network connection ports. It should be noted that with sensory data estimation and actuator buffering, the developed network control strategy treats the event of out-of-order data the same as the event of vacant sampling or packet losses. This is because at a particular time instant, older data that arrive at the controller is used to replace the data histories for use in prediction and estimation. O n the other hand, older data that arrive at the actuator w i l l be discarded i f newer data are available. This is true as long as the sequential (back-to-back) occurrences of out-of-order data, vacant sampling, or packet losses, are within the worst case delay (measured i n sample steps). 3.2 Implementation Issues The predictive networked control strategy developed in this chapter is implemented on the electro-hydraulic manipulator of the fish-processing machine, using the developed control network architecture, as discussed in Section 2.1. Referring to Figure 2.2, sensor reading and filtering are done at a rate of 1 k H z . The system outputs are filtered using a 5th-order Butterworth filter with a cutoff frequency of 80 H z according to (2.14). Sensor readings are sent to the control client at a rate of 100 H z or in 10 ms intervals. This is a relatively low sampling rate for a servo system. Yet it is chosen because as the sampling rate gets higher, the network traffic load becomes heavier, and the possibility of more contention time or data loss increases in a bandwidth-limited network resulting in longer data transmission delays (Lian, et al., 2002b). Computation at the control client is carried out at a sampling rate of 100 H z . The computed series of future control actions is sent back to the control server where the buffering process i n the actuator module also runs at a rate of 100 H z . The size of each sensor-tocontroller data packet is 34 bytes and the size of each controller-to-actuator data packet varies from a minimum of 46 bytes (with one step-ahead prediction) depending on the instantaneous length of the prediction horizon, with each additional step requiring 16 bytes. Although such an overhead is small in the current setup with a 10Mbps (i.e., a "theoretical" limit of 1.25 Mbytes/second throughput) network, it w i l l become significant when control is scaled to highspeed servo systems with sampling and data communication rate of over 1 k H z . Note that the main purposes here is to study the effectiveness of the developed control strategy under various 59 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING levels of delay relative to the sampling time of a system. Although the two axes of the electro-hydraulic positioning system are dynamically similar and not dynamically coupled to a considerable degree, the G P C controller is still formulated as a 2-input, 2-output multivariable system to illustrate the generality of the developed strategy. The nominal parameters of the C A R E V I A model (3.1) from the combined A R X model of each axis identified in Section 2.4.2 are obtained as: -1.5620 B = 0 -1.6600 "0.01608 0 0 2 B = 0 0.02643 0 3 0 -0.005612 "0 0.6796 0.004824 B = 0 0 >o = 0" B 2 -0.002786 5 0.5885 ,A — 0 0 0 0 B 0 0 0.01153 -0.006505 0 0 -0.01742 A 0.003392 0.007691 •*1 = , and A well-known problem i n electro-hydraulic actuators is the phenomenon of dead-band nonlinearity, mainly due to static friction causing backlash behavior in the closed-loop system, which i n turn causes limit-cycling or hunting at steady-state. Specifically, the hydraulic piston falls into a static friction regime when it stops as the direction of motion reverses. In order to overcome this static friction breakaway force, the actuator control current has to be increased beyond a certain threshold (Tafazoli, et al, 1998). Here, the steady-state position tracking error is reduced by adding a dead-band compensation term of the form (3.23) Avr=-/;sgn(yf-,f) to the control actions given by the m -input, where I™ = 2.0 m A . The desired reference trajectory is generated using a quintic (5th-order) polynomial i n order to achieve smooth trajectories in position, velocity and acceleration. The piston reference position for the z'-th segment of the m -th input reference quintic trajectory is written as . (k) = d k +d k +d k +d k m 5 r where d ,...,d n i6 n 4 3 i2 i?l +d k + d 2 i4 i5 (3.24) i6 are the quintic spline coefficients determined from the end-point conditions of the particular segment. The first and the second derivatives of (3.24) are r (k) = - jr (k) m i m d i = 5d k 4 n +4d k* + 3d k 2 i2 i3 + 2d k + d i4 i5 (3.25) 60 CHAPTER 3 PREDICTIVE r] (k) = NETWORKED r™ (k) = 20d k m CONTROL + \2d k 3 INPUT BUFFERING + 6d k + 2d 2 n WITH FUTURE i2 i3 (3.26) i4 Define k as the starting time step and k as the end time step of the i -th segment. Let r^ikj s e rl"(k ), and r™(k ) r] (k ) be the imposed end-point conditions at k . The coefficients d ,...,d s m e s be the imposed end-point conditions at k , and r™(k ), s e e n i6 , and are found by solving (3.24)-(3.26) using the 6 end-point conditions. This is easily done by first combining (3.24)-(3.26) into the following matrix form: *, *? K I 3k 2k l 0 2 0 0 K 1 d d l 0 d 0 0 d^. 3 *? 2 20k] 12k 2 s 6k s kl 5k" 3k *? kl 2 e 20k] \2k] 6k e 2 i2 d (3.27) a iA n (K) m i5 Equation (3.27) is then solved using Gauss elimination method (Kreyszig, 1999). 3.3 Real-time Experimental Evaluation Experiments are conducted to evaluate the performance of the system under different network conditions. The key experimental results are shown i n this section. Since the two axes of the hydraulic positioning system of the industrial fish-processing machine are dynamically similar, only the results from the X-axis are given here so that the key features of the results can be emphasized. 3.3.1 Nominal Network Load Figure 3.3 shows the response of the system under a fixed network load with the number of data "juggle" between the intermediate nodes set to 15 for each direction. The weighting sequences are set as Q = diag(0.10,0.10) and R = diag(0.20,0.20). It is observed that the tracking is almost perfect, having a maximum tracking error of 1.0 m m (Figure 3.3(b)) with the round-trip delay fluctuating between 20 to 60 ms or 2 to 6 times the sampling interval. This relatively high transmission delay is mainly resulted from the data "juggle" between the intermediate nodes. Direct transmission between two nodes w i l l have low delay i n the order of 61 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 5 ms. However, it must be stressed that the purposed here is to test the capability of the proposed network control strategy under severe network congestion. Long as well as noisy transmission lines i n industrial networks can be the factors that impose such high network load. It must also be scalable for application to high-speed servo systems. The recorded control input signal shows the actual values sequenced by the actuator buffer. Figure 3.4 illustrates the extent of round-trip delay that can be tolerated by the networked control strategy developed here. The tracking error in terms of I A E (integral-absolute-error), which is normalized with respect to a local (non-networked) direct G P C controller, is plotted against the round-trip delay. It is observed that the position tracking is satisfactory for a "mean" round-trip delay of up to approximately 35 ms (indicated by dot-circle markers). Note that with a time delay range (horizontal lines) as high as 90 ms, the control system remains stable; i.e., within the physical limit of the hydraulic piston. A s a comparison, the tracking errors of the local direct G P C controller, when used as a remote controller (without estimation or actuator buffering), are included in the figure (solid-circle markers). In this case the control system is found to be stable only up to a mean delay of 5 ms, which is smaller than one sampling interval (10 ms). 3.3.2 Variable Network Load In order to evaluate the ability of the control system to adapt to sudden changes in network behavior, the system is subjected to a few levels of transmission delay as shown i n Figure 3.5. The network traffic is varied at every 200 samples. This can be achieved by varying the juggling of the data packets between the two intermediate nodes (see Figure 2.1) or by changing the number of external data transfers in all communication nodes including the control server and client. Tracking performance is unaffected when the transmission delay level changes as long as it is within the worst-case delay that can be handled by the control strategy (approximately 90 ms round-trip delay). Some justification regarding the recorded tracking performance is i n order. A tracking accuracy of +1.0 mm, although relatively low, is the best that can be achieved by the electrohydraulic system under study. Similar tracking performance is obtained by previous researchers using a non-networked, observer-based friction compensating control strategy on the same machine (Tafazoli, 1998, Figure 18). i 62 CHAPTER 3.3.3 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING Packet Loss The feasibility of the developed control strategy is demonstrated under conditions of high network congestion, where data packets can be lost. In particular, under U D P transport protocol, data packets are dropped at one of the intermediate nodes. Both sensor-to-controller and controller-to-actuator data packets are dropped according to a memoryless exponential distribution, typically used in Internet queuing models (Bertsekas and Gallager, 1991). In order to specifically evaluate the performance of the developed control strategy during packet losses, data "juggling" is not performed, resulting in the noted decrease i n transmission delays reported in the following experimental results. The responses are shown i n figures 3.6 and 3.7 for 7.5% and 12.5% loss probability, respectively. The vertical lines in figures 3.6(a), 3.6(c), 3.7(a), and 3.7(c) indicate the instances of feedback (sensor) data loss and the loss of control signals. Note that even though an identical loss rate is set for the data packets of both sensor-to-controller and controller-to-actuator communication, the data packets of the control signal lose more frequently. This is because these data packets are larger than those for the sensor signals. Larger data packets get discarded more easily at the intermediate buffer, and are easily corrupted since Ethernet transmission is a serial connection. Tracking performance is still good (comparable to cases with no loss) at a loss probability of 7.5% and a round-trip delay between 8 to 20 ms (Figure 3.6(b)). However, the system starts to oscillate vigorously at a loss rate of 12.5% (Figure 3.7(c)) but still manages to settle back and track the reference trajectory at some regions. Figure 3.8 shows the tracking error over different levels of loss probability as a function of the mean round-trip delay. Again, the tracking error is normalized with respect to a local direct G P C controller. Tracking is generally unaffected up to a loss rate of 5.0% when the mean round-trip delay is under 20 ms. The system becomes unstable (hitting the physical limits of the hydraulic cylinder) when the loss rate exceeds 12.5%. 3.3.4 Effect of Weighting Sequence Figure 3.9 shows the influence of the future error weighting sequence Q , which is used in the G P C cost function. The "normalized" tracking error in terms of I A E is plotted against the mean round-trip delay. Each line corresponds to a different set of values of the weighting sequence, from 0.01 to 0.25. It is found that in the low network delay region (under 15 ms mean round-trip delay), higher weighting provides better tracking. In the high network delay 63 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING region, lower weighting gives lower tracking error. This is because at low or negligible delay, a low weighting sequence causes sluggish response. Such sluggishness actually proves useful i n stabilizing the system during high network loads because sensor values w i l l only differ slightly between each sample due to the slow dynamics of the closed-loop system. A s discussed in Section 3.1.6, a simple gain scheduling routine can be used to maintain close tracking throughout a wider range of network delay. 3.3.5 Driving Bandwidth of the System The driving bandwidth of the networked control strategy developed here is evaluated under three levels of network delay with mean network transmission delay values of 3 ms, 11 ms, and 21 ms, respectively. Figure 3.10(a)-(c) shows the position response for each of the mean transmission delay values under 6 settings of maximum velocities; i.e., 6.25 mm/s, 7.50 mm/s, 9.38 mm/s, 12.50 mm/s, 18.75 mm/s, and 37.50 mm/s. Figure 3.11 is a plot of normalized tracking error (IAE) versus the maximum velocity of the reference trajectory, which summarizes the response curves in Figure 3.10. Each line corresponds to a different mean network transmission delay value (3 ms, 11 ms, and 21 ms). It is observed that the tracking error increases with delay, but the working range of the system can be increased by actively moving the velocity constraints according to the level of network congestion. 64 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 10 5 (a) | S CO g PL, - \ 0 -5 \ - -10 / \ i i i 800 1000 1200 r - 2 O CD (b) , , s I O CS 1 0 -1 -2 20 0 60 (e) ^ 40 20 0 60 (f) 40 20 400 600 1400 1600 1800 Sample k Figure 3.3: System responses under a fixed network loading, (a) Position response (solid - actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-toactuator delay; and (f) Round-trip delay. 65 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING o b 0) Ml a o T3 <0 N -4 O 0 0 20 40 60 80 100 Round-trip delay [ms] Figure 3.4: Effect of the round-trip delay on the tracking performance. 66 CHAPTER 10 5 c (a) •is 0 3 PREDICTIVE NETWORKED -J CONTROL WITH FUTURE INPUT \ - -5 -10 BUFFERING y - f- (b) (c) (d) -3 S (e) (f) 600 800 1000 1200 1400 1600 1800 Sample k Figure 3.5: System responses under variable network loading, (a) Position response (solid - actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-toactuator delay; and (f) Round-trip delay. 67 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING (a) (b) 40 (c) G 20 a , , 0 5 < o ' ^ i f t ' ^ ^ G -20 O U -40 I II llllllllllllllllllllllll IN I 30 (d) 00 20 10 0 20 (e) £ 10 liuilLiLjll JJilk. Ak. i l l i 0 30 (f) 1 0 5 1 0 200 J lid 400 600 II 800 lJlI,.J 1000 1200 1400 1600 1800 Sample k Figure 3.6: System responses under a 7.5% data loss rate, (a) Position response (solid - actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-toactuator delay; and (f) Round-trip delay. 68 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING (a) (b) (c) (d) & (e) (f) 200 400 600 800 1000 1200 1400 1600 1800 Sample k Figure 3.7: System responses under a 12.5% data loss rate, (a) Position response (solid - actual output, dashed - desired trajectory); (b) Tracking error; (c) Actual control signal sent to actuator; (d) Sensor-to-controller delay; (e) Controller-toactuator delay; and (f) Round-trip delay. 69 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 22 20 18 12 / / 8 / / / / / 75.0% / z / p / 4 / / / 6 / / / 0 ^ 2 0 nr.' / / 10 O / / g 14 CD N V 12.5% 16 T3 7:5% f " 1 O.tfTq t - ' 1.0% r ~~~ 0 Figure 3 8: packets. 15 10 20 25 30 Mean round-trip delay [ms] Comparison of tracking performance over different loss rates of data 30 0.10 + 25 1 1 1 1 ft C.25 />r S 20 i_ bp '•3 15 c3 "O : / o 2 1 0.20 / '•a 10 / / 1 CD N _i r ^ > / 0.15 ' / \ i / / / 1 / / --•/---Jf- 0 0 10 15 0.05 7, / / 1 7 20 / / - 0.04 - 25 30 35 Mean round-trip delay [ms] Figure 3.9: Comparison of tracking performance over different values of future error weighting (g). 70 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 20 15 6 M. c o i 1 0 "3 o 111 Lfl\ /// 5 0 y AH .5 800 00 900 1000 1100 1200 1300 800 900 1000 1100 1200 Sample k (a) 700 800 1300 Sample k 900 1000 1100 1200 1300 Sample k (c) Figure 3.10: System response subjected to different speed settings under different levels of network delay, (a) r = 3 ms; (b) r =11 ms; and (c) x = 21 ms. rtt rtt m 14 T ! 12 I RT; i + / ' ' / 10 CD C M o C3 -a / 8 ! 6 ! : I\ ' ! TL„ = 11 ms / / 1^ / 1 / 4 i Z •* \ / _<r 2 0 / + / CD N O = 21rns y 5 10 15 20 25 i i i i i i 30 35 40 Maximum velocity [mm/s] Figure 3.11: Achievable system speed under different levels of network delay. 71 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 3.4 Summary A new feedback control strategy intended for networked control systems ( N C S ) was developed and implemented. Its performance was rigorously tested using an electro-hydraulic servo positioning system of an industrial fish-processing machine as the controlled plant. The control strategy uses an estimator to estimate missing or delayed sensor data, and employs a multivariable predictive controller to compute future control actions well in advance. The current work is thought to be the first investigation into the solution of network transmission problems, specifically time delay, in "control signals" between the controller and the actuators of a networked control system. A s parallel contribution, the variable horizon extension to G P C has proven to be a viable improvement to the current strategy by reducing the network load as well as the computational load. The developed control strategy for networked systems was able to handle various types of network behavior including delay levels of up to 9 times the sampling interval, vacant sampling, out-of-order data, and data loss rates up to 12.5%. In addition, the strategy was able to adapt to variable network loading while optimizing the size of data packets to minimize the network traffic. Since the developed control strategy does not require network transmission characteristics or dynamics, its use is not limited to Ethernet networks. The next two chapters w i l l investigate the conditions of maintaining closed-loop asymptotic stability i n the developed networked control strategy, but i n a border realm of constrained M o d e l Predictive Control which is a superset of G P C . 72 Chapter 4 Stability of Predicted-Input Control The present chapter investigates the stability characteristics of the predictive control strategy developed for a networked control system ( N C S ) in the previous chapter. The specific controller employs Generalized Predictive Control ( G P C ) with buffering of the future control sequence to overcome the transmission problems in the controller-to-actuator lines. The main focus of the present chapter is to determine the conditions under which the stability of the developed control strategy with input prediction is guaranteed in a broader realm of constrained model predictive control ( M P C ) . The next section briefly reintroduces the essential structure of the developed N C S strategy in the constrained state-space M P C setting and formulates the stability problem of specific interest in this chapter. Section 4.2 casts the M P C problem into a standard Quadratic Programming problem. Section 4.3 presents the main contribution of the chapter, specifically the development of the asymptotic stability conditions in the presence of buffered optimal input signals. The usage of the stability results in generating stability boundaries, which provide a tool for the design of the N C S - M P C controller, is investigated in Section 4.4. Some issues related to the practical implementation of the developed controller are discussed in Section 4.5. Section 4.6 verifies the developed stability results, through real-time implementation on an electro-hydraulic manipulator system of a fish-processing machine. The concepts and algorithm development of Linear Matrix Inequalities ( L M I ) and multi-parametric Quadratic Programming (mpQP) which are vital for the analysis and real-time implementation of the developed controller, are provided in Appendix A and Appendix B . 4.1 The Predictive Control Strategy for Networked Systems - Revisited Since the communication delay between network nodes (sensors, actuators and controllers) is non-deterministic, as a result of random and frequent occurrence of data losses and vacant sampling, it is anticipated that the design of a feedback control solution for a networked system 73 CHAPTER k-T Input Buffering R Actuator Nodes 4 STABILITY OF PREDICTED-INPUT u k\k-r CONTROL Sensor Nodes Communication Network Future Control Sequence Controller (MPC) 'k-T Figure 4.1: Simplified architecture of the developed N C S strategy. (termed a "networked control strategy" in this thesis) requires no prior knowledge of the transmission dynamics. The model used here is the discrete-time representation of the system under control, given by k+\ - X where x e R k and / : R n x u are the states of the system at time k, u e k —> R . nXm (4.1) f( k> k^ n R are the control inputs at time k, m Figure 4.1 shows a simplified architecture of the networked control strategy or simply the N C S strategy as developed in this thesis. The physical system consisting of sensor nodes and actuator nodes is connected to the controller through a communication medium. A l l the nodes are set to a common sampling interval h with a synchronized clock (see Section 2.2). The sensor-to-controller and controller-to-actuator communication delays are represented by t sc and r , ca respectively. A n extended state observer is used in order to fill the missing sensor data up to the current sampling time k. The estimated states are given by k-T, +i\k-T, x c for i = l,...,T = c /( *-l-r +il/fc-r +/' *:-r +j) + ^'(3'i-r . x M vc 5C !C s _ c $k-T where L ' is the observer gain matrix and y e R p SC (output) of the system. The sensor-to-controller delay x k sc s c \k-r, -l) c (4-2) are the measured states is determined from the time-stamping 74 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL information embedded i n the latest sensor packet received from the sensor node. The key to the developed strategy is the use of an M P C policy, which is a form of receding horizon optimal control law, to pre-compute a string of optimal future control input sequence n = \u ,...,u k ak k+H u ] , where H is the length of the control horizon. This is done at each u time step k, by optimizing a finite quadratic cost function either of the output reference tracking form given by H -\ H.,-1 2 min (•\k) H H ,HS k' k)-n V y h n 2 yk+H^k k+Hn k+i\k r l i=H, i=0 (4.3) S.t. >W -*/ Vi = l,...,H G 2 Vi = 0,...,ff -l B or, the regulator form expressed as H -\ 2 mm + k+H \k l 2 k+i\k l Q + y iw k+i\k 1=0 (4.4) S.t. k+ak ^i x e Vi-l,...,/f Vi = where y = g(x )e k k R p 2 0,...,H -l u is the output of the system with g : R" -> R , p set-point, H is the minimum prediction horizon, H l 2 re R p k is the output is the tracking error or state prediction horizon, P is the terminal weight matrix, and Q and R are the weighting sequence matrices (P >- 0 , Q>~0 and Z? >- 0 ) . In the sequel, H is assumed to be zero i n order to facilitate the x analysis. This assumption does not pose any restriction to the generality of the analysis, however, because the term x (at time step k) is seen as a constant in the optimization process. k Optimizing 7 1 k (4.3) or (4.4) yields the optimally predicted future { k\k'--' k+H -\\k = U control sequence as U u } = Mg ™V (x ,7r ). m H2Hu control input u* m k k In a typical application of M P C , the first is used. In the developed N C S strategy, however, the subsequent control sequence is employed depending on the level of transmission delay. This is accomplished b y retrofitting the actuator with a data buffering mechanism to schedule an appropriate control 75 CHAPTER 7t,'k-T Input Buffering Actuator Nodes 4 STABILITY OF PREDICTED-INPUT k\k-r CONTROL Sensor Nodes ca Communication Network Future Control Sequence Controller (MPC) Xi Figure 4.2: Reduced structure of the N C S for analyzing stability of the M P C policy with future input buffering. input u k+Ak from n , based on the time-stamps of the data packets. k The unconstrained version of this N C S strategy has been benchmarked i n Chapter 3 and shown to perform well, producing good results. Besides being able to cope with transmission delays, the control strategy is also able to compensate for various levels of packet losses and vacant sampling. Further modifications have been made to the developed strategy i n order to enhance its performance. These include a scheme where the prediction horizon and the control horizon are variable, for reducing network traffic and computation load, and gain scheduling of the weighting matrices of the cost function to dampen the system under high network loads, thereby extending the working range of the closed-loop system. In addition, the developed strategy of control input buffering has the potential of reducing the utilized network bandwidth (or, network utilization) by lowering the frequency of data transmission, without limiting the operation bandwidth of the system under control. A s the next step of the control strategy development, conditions are established to ensure closed-loop stability of the system. According to the Principle of Separation (Furuta, et al., 1988), the controller and the estimator (observer) of a closed-loop system may be designed and/or analyzed separately without one influencing the performance or stability of the other. Therefore, the main issue that is sought to be resolved i n this chapter is whether the pre- 76 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL computed and buffered string of optimal control input sequence is still feasible and optimal at the future sampling instant of the actuator. It is assumed that T =0; sc i.e., perfect state measurements are available to the M P C controller. Figure 4.2 shows the reduced structure of N C S strategy that w i l l be analyzed. The conditions whereby the stability o f the closed-loop N C S is guaranteed need to be established. This is accomplished here based on the Lyapunov stability theory. The extension of the analysis for the case of imperfect state measurements is addressed in Chapter 5. 4.2 State-space MPC Formulation A preliminary formulation of the M P C policy i n the state-space form is required for carrying out further analysis. The following two sub-sections formulate the M P C policy as a regulator problem and a reference tracking problem. These formulations are also useful i n the experimental implementation of the developed control strategy. Here, the linearized discrete, time-invariant model of (4.1) is considered, which is given as x with AeR and nXn k i + = A x k + B u k (4.5) BeR . nXm 4.2.1 The Regulator Problem The M P C formulation requires the recasting of (4.4) into a compact form that is solvable using either classical Quadratic Programming (QP) methods or, as adopted i n this study, the method of multi-parametric Quadratic Programming (mpQP). First, the cost function i n (4.4) is expanded into: H„-\ r H ,H V 2 x U Horizons H 2 u k+i ( k ' k ) ~n(lk) } n and H k+H \k l 2 X i=H„ + k+i\k X X i=0 + n + Uk+i\k k+i\k l (4.6) i n (4.6) are replaced by a single prediction horizon H by noting that u = 0 for H > H . Using (4.5) recursively, the first term of (4.6) is expressed as 2 u 2 k+H \k X 2 2 k+H -\\k X P 2 k+H,Ak \k\\^ H -H l A PA T u A 2 u j' (4.7) H -H pA 2 u 77 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL Similarly, the second term of (4.6) is recast into the form H -l 2 k+i\k k+H„\k k+H„\k l + ••• +k+H„\klfc||| tf -"«-l) l l A QA T u A 2 E A " 2 - " „ -1 (4.8) k+H,Ak l I ' Q A 1=0 Substituting (4.7) and (4.8) into (4.6), and setting H = H yields the equivalent finite quadratic U cost function: H-\ min k+H\k k+i\k X l 1=0 + uk+i\k (4.9) S.t. k+ak ^i. V/-l,...,i/ u eU \/i = x e k+nk 0,...,H-\ which is evaluated over a prediction horizon of length H using a modified terminal weight matrix P given as 0 H -H -\ 2 P = (A ~ » H2 0 H ) P(A ~ ) T H2 u + Hu £ (A'/fiA'' >~ 0 (4.10) (=0 The cost function (4.9) can then be transformed into the standard Q P form by the continuous substitution of (4.5), which has been brought back to being pivoted at the initial state x k in a receding horizon manner, such that k+i ~ ^- k+i~l X X B k+i-\ + u = A [Ax _ k+i + Bu _ 2 k+i 2 ]+ Bu _ k+i x (4.11) i-i •A x +Y,A Bu _ _ i i k k+i j 7=0 for / =!,...,//. Define n = H T u k T u k+x uk+H-\ and 78 CHAPTER T k x T k+\ E R l k+H = X where N„ = A B OF PREDICTED-INPUT CONTROL (4.12) k+N ii AHx ->nxmH AB B Hl STABILITY . For i = H , (4.11) is put into the compact form nH k+H-l x 4 u H Utilizing (4.11), X H can be reformulated into the following equation as a function of only the current state x : k I 0 0 0 0 0 A B 0 0 0 0 BMJ 0\J . ff — I AIX IxA(. +T | AB /\1J 2 k H-1 A ~B H A A B 2 • • • 0 0 n =M x +M II H x k u (4.13) H A B H3 H4 nHxn M efL nHxmH u Considering (4.9), the first term is expressed in terms of (4.12) as x +n T \A») P A» T P/fc+tf ||p ~ k x Q 0 k N PN n +x T U H 0 2K) ^ H PN 7 T U k 0 U n H (4.14) Substitution of (4.13) into the second term of (4.9) yields H-l z Z = ** [ ZQV*]*k +H M [M QM n T U U n T H+x k 2M QM T X U 1=0 nH (4.15) The third term of (4.9) can then be regrouped in terms of 77 as H (4.16) H\h \\ = H H ;=o n +i where R = d i a g ( « , . . . , l ? ) e R . Rn R B y combining (4.14)-(4.16) into (4.9), the following mHxmH standard Q P formulation of the M P C cost function is obtained: v in which =T ( k, " ) x H r Y =l(A j H r H T T 0 + 2M QM X T U U U Fn } T H 0 J = 2N P N U k P A +2M QM H r r +^n j n + x T {i lY x x H k X + 2R k r H (4.17) (4.18) (4.19) 79 CHAPTER 4 F =2(A f r (4.20) T 0 U X U does not depend on the variable of optimization II T k CONTROL P N +2M QM H R Note that since the term ^x Y x STABILITY OF PREDICTED-INPUT k H , it can be ignored i n the optimization process. Constraints are incorporated i n the M P C optimization of (4.17) through successive row augmentation into a single matrix inequality equation (not L M I ) given as (4.21) G n <W +E x r where G , W and E r r r H r r k are matrices constructed from a particular set of constraints of interest. For instance, for a system subjected to the input constraints - c , < u < c for i = 0,...,H-l tj 2 and j = l,...,m; G , W and E are constructed as r r r Hm I Hm W =[c C r 2 E Cj <x k+i a > 2HmXn = [s max 2Hm C, G =0e r A n additional state constraint of x ) 2HmxHm 1 G = x ••• s f eR n n can be imposed by using (4.11) and row-augmenting these G , W and E by the following matrices: r r r B 0 0 0 0 0 AB B 0 0 0 0 •^(H-\)nxHm aug H-3 B A H-2 B A A A H-* A"^B B H-3 H-4 B w A B B O AB O B 0 -l)n = aug -IT A T aug — ' (A )' 2 .- (A"' ) 1 1 Subsequent input and state constraints can be imposed into the optimization of (4.17) i n a similar manner. 80 CHAPTER 4.2.2 4 STABILITY OF PREDICTED-INPUT CONTROL The Reference Tracking Problem Referring to the M P C policy (4.3) for the reference tracking problem, it is the usual practice i n M P C to ignore the terminal cost and substitute u b y L\u k+i (= u k+i k+i - u _ ) in k+i x order to prioritize the tracking performance (clearly, at the cost o f degraded stability as a tradeoff) of the system. The L\u k+i formulation corresponds to including an integrator i n the control loop (Bemporad, et al, 2002). Assuming that H -H =H, 2 the following M P C U quadratic cost function is considered now: \H-\ H-\ V (x , 7t ) = ^i'") <j ]T Iy H k k k+i[k || + ^ IAH^-IJ. ||^ -r k+i (=0 /=0 s.t. (4.22) yk+nk*Ji V i = l,...,/f u eU Vi = 0,...,//-! k+M Again, the purpose is to transform (4.22) into the standard Q P formulation for optimization. The first term of (4.22) can be reduced into the following compact form: H-l z X y>c+i\k 1=0 k+i r = M QM (4.23) T y y where Q = d\ag{Q,...,Q)eR and pHxpH Define AIJ k - Au T H k-l x with C € R u pxn k r Au T k k+l 'k+H-\ M =|jy -r )' AM[ y + W _,J m _ +P (y - -r . ) k+H M k+H x and introduce a new, augmented state vector 7 n+m H ER ••• k U s i n g ( 4 n )a n d c o n s id e r i g n y k + . cx = k + i , M is reformulated as: v M =N X +N ALT y x s A H (4.24) where 81 CHAPTER 0 C CA N 4 0 CB 0 -Ip STABILITY OF PREDICTED-INPUT 0 0 0 0 CONTROL •^pHxn+m+pH = H"1 CA ~ H L X C A 0 -I, 0 0 0 0 0 0 0 0 0 0 0 0 B 0 i=0 0 CB CB XCA'B i=0 N A jj^ pHxmH = H-3 £ CA B H-\ L C i'=0 H-2 i=0 H-3 X CAB /=o £ i=0 A CB B 0 0 Y^CA'B CB 0 CA'J? i=0 Furthermore, the second term of (4.22) is recast as H-l (4.25) i=0 where R = diag(R,...,R)<= D mHxmH . B y combining (4.23)-(4.25) with (4.22), the following standard Q P form for the M P C optimization is obtained: V„(**,**) =S H {iXfyX, + ±MI J MI + T H y H X F MI ) T s y H (4.26) in which Y=2N QN (4.27) J=2N' QN +2R (4.28) l x A x A F = y A s in the regulator problem, the term ^X Y T S 2N QN (4.29) T X X A is excluded in the optimization since it is s independent of A / 7 . Similarly, constraints are imposed using successive row augmentation H into the same form as (4.21), replacing II H and x k with MI H and X , respectively. s 82 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL 4.3 Stability Analysis The approach adopted here to analyze the stability of the developed system with future control input buffering, originates from the work of Primbs and Nevistic (2000) where the terminal states x k + H are related to the current states x k by establishing a bound on the terminal cost. The levels of projected cost, which depend on the controller-to-actuator delay T , are ca essentially bounded by predetermined upper and lower bound terms. Stability is achieved without end constraints. It is known that stability particularly concerns the problem of regulation of a closed-loop system. O n the other hand, the problem of reference tracking is usually analyzed in the context of performance. Hence, the stability analysis given here is focused on the M P C policy of ( 4 . 9 ) . 4.3.1 Preliminaries In this section, the basis of stability analysis in the sense of Lyapunov is reviewed and then formulated i n the context of M P C . Next, a valid Lyapunov function is identified, in order to establish the conditions under which the closed-loop N C S is guaranteed to be asymptotically stable in the sense of Lyapunov. A n y function / : R~° —» R~° is termed a class / C -function i f it is continuous, strictly increasing, and f(0) = 0. The same function is termed a class /C^-functions i f it also satisfies f(s) —>°° as s— Definition 4.1: An equilibrium point x e that if \\x -x \ k < r, then \ x e k + i is stable if, there exists r > 0 for every 7>0, - x \ < 7 for Vz > 0. e Definition 4.2: An equilibrium point x e is asymptotically stable if it is stable, and in addition, if there exists some r > 0 such that ^x - ar || < r implies that ||jc k e jt+/ Definition 4.3 (cf. Jiang and Wang, 2001): A continuous function - x \\ —¥ 0 as i —> «> . e V(-):R —>R n + Lyapunov function for system (4.1) if there exist some class /t^-functions y (-), 3 and a class such / C -function <r(-) V ( / ( j r , M ) ) - y ( x ) < - 7 3 ( | | j c | | ) + 6T(||M||) for Vjce R such n that and V « e y (), x y (^x^)<V(x)<y (^x^) l 2 is a valid y (-) 2 and and R. m Remark 4.1: The last condition in Definition 4 . 3 is equivalent to stating that there exist some 83 CHAPTER y (-) class /C -functions 4 x 4 STABILITY and some class /C -function y () OF PREDICTED-INPUT CONTROL such that ||x||> ^ (||II||) implies 5 5 < —y (||ji:||). Note that this results in an equivalent property i f y (-) V(f(x,u))-V(x) 4 4 is merely required to be continuous and positive definite. Having provided these definitions, a theorem is given next, which states the fundamental conditions for asymptotic stability in the sense of Lyapunov's second method. Theorem 4.1; The system under control of (4.1) is asymptotically Lyapunov if there exists a function V(-): R " —> E stable in the sense of which satisfies the following: + 1. There exists a class /C -function or(-) such that 0 < ar(|x |) <V(x ) 2. There exists a class AZ,-function 3. V(0) = 0 and V(-) is continuous. x fc k u(-) such that V(x )-V(x ) k+1 for \/x ^0. k <-v(^x ^). k k Proof: Stability: This proof is by contradiction. Let 7 be any arbitrary point with 7>0. continuous, there exists r > 0 such that V(x ) > a(7) k Since V ( ) is for jx || < r . Presume that the system is k unstable. Then there exists some i > 0 such that \\x \\ > 7 and k+i V(x )<a(7)<a(lx \\)<V(x ) k k+i k+i This contradicts the hypothesis of V(x )-V(x ) k+i < 0 . Therefore, the system is stable. k Convergence: Presume that the condition V(x )-V(x ) k+l <-i>(||x ||) is true. W i t h k fc V(x )>0, k taking the sum from k to k + i gives k+i -V(^)<V(^ .)-V(^)<-X+ |) y +( j=k k+i Since v{ Xj ) is non-negative and i^L v( Xj +i ) is bounded from below by -V(x ), k one has ) = 0 . Since v(0) = 0 and is continuous, the limit implies that ||x -|| —> 0 . • fc+I Having established the basis of asymptotic stability in the sense of Lyapunov from Theorem 4.1, the next step is to establish that the system (4.1) using a finite sequence of future control actions it =\u \ ,—,u _ \ } k k k kJrli X k determined under the M P C control law of (4.4) is 84 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL asymptotically stable. Definition 4.4: For V r > 0 and V n > 1, the set is defined as B? := j j c e f " : ||x|| < r} . Theorem 4.2 (cf. Sockaert, et al, 1999): The system under control of (4.1) using a finite sequence of future control actions it = {u \ ,...,u _ } k k k k+H determined under the MPC control M law of (4.4) is asymptotically stable in the sense of Lyapunov in the neighborhood I c R " if the following 1. conditions are satisfied: V(-):R xR a function n -> E m H + with V(0,0) = 0 exists such that V(x,n) >«i(||x|) where OC (•) is a /C„ -function. x 2. X exists and contains an open neighborhood of the origin, such that every {x ,7i } k of the controlled k system with x eX V(x ,7i )-V(x ,7t )<-a (j(x ,u )\\) k+l 3. k+l k k 2 k satisfies 0 x eX for V £ > 0 and k where a (-) is a k realization /C^-function. 2 a constant r>0 exists for x e B", such that every realization {x ,n } of the controlled k system with x s B k n r k k satisfies ||^||<flr3(||jc ||) where cx () is a A7 -function. t 3 X Proof: Stability: Let x be an arbitrary point within X. Since V(0,0) = 0 and V(-) is continuous at 0 the origin, there exists a constant r > 0 and a XT -function /?(•) such that V(x,n) < fi(\\(x,7t)\\) x for V x e B " and Vzre B^ . m r Since X contains the origin, there exists a constant r > 0 such 2 that B^ czX. For any e>0, there exists S>0 such that S< m i n ( r , r j , r ) , a (S)<r , 2 3 and x f3(S + a (S)) <a (e). N o w S>0 exists because a {e) >0 and a {8) - > 0 as S->0, so that 3 x x 3 /3(S + a (S)) —> 0 as 8 -> 0 . Suppose ||x || < ^ ; then ||;r|| < a ( £ ) and 3 0 0 V(x ,7t ) 0 0 3 < /?(||(x ,;r )|) < / J ( | x | | + | ; r | ) < ^ + « ( ^ ) ) < a ( f ) 0 0 0 0 3 1 In addition, one has for V f c > 0 , since ||x |<<5. Moreover, 0 flf,(|x |)<V{x ,n ) fe k k for \/k>0. Therefore, it can be established that a (\\x ||) < a (e), which implies that \\x || <£ for \/k > 0 and V x e x k x k 0 . 85 CHAPTER Convergence: condition 4 STABILITY OF PREDICTED-INPUT The condition V(jc,?r) > «r,(j|jc||) includes V(x,7t)>0 V(x ,n )-V(x ,7i )<-a (\\(x ,u )\\) k+x k+x k k 2 k CONTROL for V x and V n \ The infers that V(-) decreases along the k trajectories o f the controlled system that commenced within X. It follows that with x e X, Q V(x ,7t ) k —>V* as k fc-)^, V(x ,7t )-V(x ,n ) k+X k+X k where V* is a non-negative constant. It can be concluded that - » 0 as £ — > ° o and this implies that «2(||( fc' *)||) x k M Since a (-) 2 is a class A7 -function, it follows that j|JC^ || —> 0 and ^u || —> 0 as /c —> <*>. • k Hence, i n the nominal case, i f the initial optimal sequence of control input 7t is feasible, Q the elements u of the subsequent sequence of control input n as computed using the M P C k+nk k policy o f (4.4) or (4.9) are sufficiently stabilizing i n the future as long as the time point is within H . In order to analyze the conditions i n which the developed N C S - M P C control policy is asymptotically stable, a suitable candidate for the Lyapunov function needs to be identified. Definition 4.5: A function \/b e R c f is a Lipschitz function if \f(a)-f(b)\ < L \a-b\\ for V a e R , c f and c > 1; and Lj- is called the corresponding Lipschitz constant. L e m m a 4.1: The finite quadratic cost function Lyapunov of the receding horizon MPC policy is a valid function. Proof: Assume P = Q for brevity and consider the following "optimal" quadratic cost function: 0 H V* (x ,7i ) H It should be noted that u k + x ;=o * 2 k+i\k R U Q = 0 . Since x k+mk 2 II * = Y, || fc+ilyt k (4.30) = x , one has V (x , n ) > | k{k k H k k and thus there exists a class /t^ -function y (•) such that 1 V* (x ,n )>y{\x \) H k k (4.31) k For example, y <\x ||) = K \x || where K is a non-negative constant. Consider (4.1) and let x « k + i = t i ( * k Lipschitz + i ) w k i t h constants x $ : R n k ^ R x m for i = 0,...,H-l. for / ( • ) , ^ ( ) , 0 (-),..., 0 X Let L , f 0 _ (-), H X L ^ , respectively. L ^ be the It follows that 86 CHAPTER uk+i\k formed i n terms of the current state CONTROL k+i\k , for i = 1,..., H , can be l , as follows: \\f( l\k > *m )|| ^ L \\x I + L \\u* I < L \x || + L L^ \\x \\ = L\ \\x || x k+l\k l u f k f \\f( k+m> k+i\k) -Lf k+\\k Lf x k+2\k STABILITY OF PREDICTED-INPUT for i = 0,..., H - 1 . Using this relation, k\i\k v l 4 u k+H\k <L l x k+H-\\k in which L , = L (1 + f ),..., f f k <LfL jx \\ k+m l < L L _, U ) , L\ = L (L\ + f u + k+H-\\k l m f + L L^\\x \\ k f \\x, + LfL, \\*k\r^f^ H H H 2 k = L,'H \\ k h (L _ + f k = L \\x k . \x H L =L k ) . Hence, (4.30) can be X bounded from above as follows: klk l + ••• +k+H\k X Q + k\k R 2 + ••• +Uk+H-\\k 2 < x +••• + £„ | | x XQ+<k Z ^ | | xkJ „ + • • • + £* -H\\*k '<PH-\ +L X k fi R <{\ + L\+-- + L ) H X K +(L^+-- +L Q < \\ k\\ x R VH-I'W I<\\R X -function y (•) such that Therefore, there exists a class 2 V* {x ,n )>Y (\x \) H k k 2 (4.32) k Considering the cost function one step ahead; i.e., V (x ,n ), H k+l according to Theorem 4.2, it k+l is feasible but not necessarily optimum to use the state and the input that are predicted i n the current time step k to arrive at: X 2 I* = Yu \\ k+i\k X H( k+\> k+\) V n Q + 2 * k+i\k R U * = V (x ,7I )- k\k H k k 2 X * k\k U Q The optimal V (x , 7t ) is then bounded from above as follows: H k+l k+l H( k ]^M)^y ( k^k) v x x + H * 2 k\k Q X * 2 k\k R U This result i n 87 CHAPTER H ( k+\ V X • "k+1) - H STABILITY 2 * k\k ) ^ -1Q ( k. OF PREDICTED-INPUT 2 * k\k X X V 4 < U — CONTROL * k\k X R which means, there exists a class /C^ -function y (-) such that 3 H (*k+\. (4.33) ) - V« (**, Jt ) ^ -7i (||x* ||) V k According to Definition 4.3, the combination of (4.31)-(4.33) is sufficient to conclude that (4.30) and thus (4.4) and (4.9) are valid Lyapunov functions. 4.3.2 • Maintaining Feasibility with Suboptimal M P C Under less than nominal conditions, Theorem 4.2 alone is not sufficient to ensure the feasibility o f the control inputs i <r u from n* i n the subsequent time steps k + i for k+nk k < H - I as applied i n the developed N C S buffering strategy. T o overcome this, an ca additional condition is enforced into the M P C policy. Consider the states and control inputs at k and k + T . The optimizing n is found at sample time k . Denote the corresponding cost by CA k V (x , n* ) and the optimizing states and the control input sequence, respectively, by H k k k\k' k+\\k' U •' u k\k' k+\\k> x k+H-\\k U "•' X k+H-l\k' k+H\k x X A t sample time k + T , the corresponding control input of n CA as computed previously and k stored in the buffer, is used. N o w use the notation: 71 pre w { k+T \k> k+T i\k>---> H-M>°'-> } u u u ca ca+ 0 i t h t h e corresponding cost V (x ,n ), H k+ k pre which is formed from the following sequence of states and control inputs: U k+T,.„+l\k' k+H-\\k U H( k> pre) V X n k+T \k+T > k+T +\\k+r -' X ca k+H-\\k+T x ca ca > x ra rn k+H\k+t , x r The following condition guarantees that the closed-loop N C S is asymptotically stabilizing within T CA by satisfying the second condition of Theorem 4.2: H ( k+r V X . pre )- H( k>*k)^-MY n ca V k ( k+i > k+i) x W J X U (4.34) ;=o 88 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL /*e(0,l]; where k+Uk l Q + uk+i\k H-\ k mk H( k> k)= v x + H-\ +Z*+i*|L ZlK+iitL x x 7i P + (=0 H-l. ^H^ k+t -> pre) x k+r +H\k+t,, n l rn rn + Zll*k+t +i\k+t , rn r i=0 Note that since W (x ,u ) k k+i k + Z II"k+z +i\k rn 1=0 > 0 , by forcing the r - s t e p cost difference k+i ra )-V (x ,7t )<0, H ;and i=0 (4.34) ensures that V (x ,7i ) k H k k to satisfy w i l l decrease along the trajectories of the closed-loop system. The design parameter ju is introduced to reduce the effect of model uncertainty and disturbances. Specifically, the smaller the /n, the less conservative the system, which is more desirable. The controller-to-actuator delay r ca is another design parameter, which specifies the worst-case delay the N C S strategy has to handle. Although the introduction of (4.34) into the M P C policy causes the controller to be suboptimal, feasibility is still maintained, which implies that asymptotic stability is still achieved. 4.3.3 E s t a b l i s h i n g the B o u n d s Before proceeding to establish a stability condition for N C S with the developed strategy of future control input buffering, the terminal cost l|2 k+H\k l has to be bounded i n order to formulate the cost reduction terms of (4.34). This follows directly from Primbs and Nevistic (2000). The procedure is outlined here for completeness. Assume that the finite horizon p quadratic cost V {x ,n ) H k k is bounded from above and below b y U ° and H p , respectively; i.e., I**lit ^ H( k^k)^\\ kfu^ V X x Then, the cost at any time step ahead can be bounded from above by the following lemma. L e m m a 4.2: The j -step ahead finite horizon quadratic cost function (4.9) of the MPC policy is bounded from above as 89 CHAPTER 4 STABILITY OF PREDICTED-INPUT H-(j+\) ( k+(j+W. k+(j+\) }~\ k V for j = x n X CONTROL (4.35) \ Q _ e H J p V L 0,...,H-l. Proof: Considering the lower bound of the cost, one has ^/(**>^)-IKII^b -| *llze H J On the other hand, from the upper (4.36) H-(j+\)( k+u+w> k+u+^ x +v x bound, 7t one has V {x ,n ) H k <llx-JI^ k giving H \ kf * ^ \\ kf Q +VH-(j+\)( kHj+W> k+u+i)) x x v x resulting in (4.35). n L H • 1 J L e m m a 4.2 can only be used when the current state x k is known. In cases when JC^. is unknown, this j -step ahead cost has to be determined from the ratio of the upper bound of the cost V (x ,n ). H k k The following lemma establishes the bound. L e m m a 4.3: If V (x ,n ) H k k is bounded from above by an arbitrary constant Q, then the j - step ahead finite horizon quadratic cost function (4.9) of the MPC policy is bounded from above as (4.37) VH-{j+\)(- k+(j+\)\k' k+(j+\)) - & X n for j = 0, ...,H — 1 with A(-) as the maximum eigenvalue of a matrix. Proof: The are two conditions to arrive at (4.37); i.e., whether f x ^ ^ g ^ below or above by r o m (4-36) is bounded from Q . For the first condition, considering (4.36) one has & + H-U+1) ( k+(j+l)\k . k+(j+\) V X n )^ H( k> k)^& V x n The superscripts to the lower- and upper- bounding terms indicate the terminal weight of interest. 90 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL yielding (4.37). For the second condition, one has A, \ k\\ Q x L which, by considering V (x ,n )< H k fQ + x L k H-(j+i) ( k u+W> V x + x k 2 k kHj+\) n ^ n ^ and (4.36), can be expanded to the following form: )^ H^ k^k)^ V x \ k tut x ^A H( J) U L( * ) \\ k f Q x L ^ & arriving at (4.37) as well. This completes the proof. The bound on the terminal state x k + m k • can then be obtained by recursively applying L e m m a 4.3 along the state evolution from j = 0 to j = H - 1 until the tightest bound for i k+H\k X s achieved. However, Lemma 4.3 provides a rather conservative bound. This is elevated by modifying L e m m a 4.3 into the following lemma. Definition 4.6: The parameter K (j) is defined as H for =0 7 0</<./-l H (') 1 — for; > K Lemma 4.4: If V (x ,n ) H k k 0 (4.38) is bounded from above by an arbitrary constant Q, then the j - step ahead finite horizon quadratic cost function (4.9) of the MPC policy is bounded from above as H-J( k \k.* j) V x +j k+ ^ K _j(j)n H (4.39) Proof: This follows directly from Lemma 4.3 by direct substitution of (4.38) over j = 0,..., H -1. • It should be noted that the value of Q is unknown. The need for this value can be removed by combining L e m m a 4.2 and L e m m a 4.4 to bound the terminal cost i n terms of the current state x . k Lemma 4.5: If the finite horizon cost function (4.9) of the MPC policy is optimal, then the terminal cost is bounded from above as: 91 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL (4.40) Proof: Combining (4.35), (4.38) and (4.39), the terminal cost is bounded as: l|2 k+H\k X for j = 0,...,H-1. Since j is arbitrary, by using the j that gives the minimum cost, one obtains the tightest upper bound, arriving at (4.40). 4.3.4 • Computing the Lower and Upper Bounds The global lower bounds L - are computed by using the unconstrained M P C policy, by iteratively solving the following Riccati difference equation: Lj - LjB(B LjB + R)~ B Lj T for j=0,...,H-l with 1^ L ~}A + Q T (4.41) =P . 0 The computation of the upper bounds Uj° are more tedious. Consider the following equation: + uk+M k+jik l for j = 0,...,H-1 u j\ k+ k = KjX j k+ [h with U ° =P . 0 0 + k+j+l\k X < k+j\k (4.42) l H-(j+l) U H-j u Using a linear state feedback control law of the form and substituting it into (4.5), one obtains *k+j+\\k = (A + BKj)x k+M (4.43) B y substituting (4.43) and the matrix each norm, one obtains: Q into + K)(4.42) RKj + (A equating + BKj ) U%_ (Aweighting + BKj) <of£>_. (4.44) T u+]) It can be observed that (4.44) closely resembles the standard Linear Matrix Inequality ( L M I ) form through Schur complements (see Appendix A on the basic theory of L M I ) . The objective here is the following: given A, B , Q , and R , compute the minimum upper bounds Uj° i n 92 CHAPTER 4 STABILITY OF PREDICTED-INPUT order to provide the tightest upper bound for V {x ,n ) H eigenvalue X U^°(L ^) V Uj=[u$_j) through the minimization of the k governed by (4.44). However, K: P optimization k CONTROL is unknown rendering the direct J of 1 (4.44) impossible, and and Kj=KjUj. this relation B y substituting Uj has to and Kj be restructured. Define into (4.44) and then pre- multiplying and post-multiplying by £/J and £7-, respectively, one obtains the following equivalent equation: +BKj)' TT~J-\ (AU • + IiKj) < [ / j U'jQUj+K'jRKj+iAUj or, or, U'j -(AUj+BKjfU^iAUj+BKjWjQUj-K'jRKj (AUj+Bkjf U]Q R]R 2 2 (4.45) >0 0 0 0 I 0 0 0 I (4.46) '(AUj+BKj) >0 (4.47) Rk 2 J Using Schur complements, (4.47) is put into the following L M I equivalent form: (AUj+BKjf AU BKj j+ R K, 2 U]Q 2 K]R 2 0 0 o I 0 0 0 I or, >0 (4.48) v-1 In order to minimize the eigenvalue given by X ) j, the following eigenvalue equation is considered (see (A.7) in Appendix A ) : /L/-£/£°(4°) >0 _1 (4.49) which has the L M I equivalent of the form (through Schur complements): (4.50) Ur 93 CHAPTER 4 STABILITY OF PREDICTED-INPUT A s a result, the series of optimal (minimal) upper bounds Uj° for j = 0,...,H CONTROL - 1 is computed by optimizing the following eigenvalue problem i n the context of L M I : min ^ (4.51) * J ' * J A s.t. (4.48) and (4.50) In the present study, this L M I optimization is carried out using the Matlab® L M I Toolbox. The flexibility o f L M I conveniently allows further incorporation o f various constraints into the problem without altering the original problem structure (i.e., (4.48) and (4.50) are kept unaltered). This is further discussed in Section 4.4.1. 4.3.5 Main Stability Results Definition 4.7 (The Principle of Optimality) (cf. Bellman, 1961): An optimal policy has the property that whatever the initial state and the initial decision are, the remaining must constitute an optimal policy with regard to the state resulting from the first decisions decision. In the context of the present study, Bellman's Principle of Optimality states that from any point o n an optimal trajectory, the remaining trajectory is optimal for the corresponding problem initiated at that point. Hence, the finite horizon quadratic cost is equivalent to =y V ( k>*k) x H +Z -t ( k T >) X H ca + ca k(**+«• (4-52) k i) W u + ;=o where v k+r the M { k+T \k'•••> k+H-\\k} = c a "truncated" u u e ca sequences ( W _ T c a ) m of control inputs are . Consequently, the r - s t e p cost difference terms i n ca (4.34) can be effectively recast so that all costs are considered from time step k, yielding V H ( x k > a = [ H-T k ) - H V ( k r V ( k+T + n ca Ojfc+r^ ) - . X ca > pre) X c a V H , 7t (X k+Tca pre ) J + £ W (X , k k+i U ) k+i (=0 r n =\y H ( k+T . x r =\y (k x H v Ca >*k) k -Hr + c a - ) v H+Tca ( k r i ( > *) J + x v + r ca k k x + Tca ~ c a W . ( 2. j + k) n k w 4 - 5 3 ) ( +i»«*+«•) x k i=0 l Z k w ( k+i. x u k + i ) 1=0 94 CHAPTER kXk k+H STABILITY OF PREDICTED-INPUT ca m Theorem 4.3: The NCS-MPC policy with horizon H utilizing the optimal control sequence of the previous time step up to a controller-to-actuator 7T pre CONTROL j(//+T -l)m where ii = {u ,...,u _ ,0,...,6\e k 4 delay of T , is asymptotically ca stabilizing within the region of attraction 7Z if there exists any j such that Cl-M)A^-W >0 J where HT (4.54) A «> = 1% - U% + T H and V 0.*K:^)-1]*-„_o- (H-(j = max J H +1))[U$ +1) -L<j]. Proof: From the stability condition (4.34) combining with (4.53), the following is obtained: (1 - fi) £ W (x , u ) - [V k k+i k+i (x ,n )-V (x ,n )]>0 H+Tca k k H k (4.55) k i'=0 Since Z the first x term of (4.55) = Hi k^k)- H-T S k+t ^k z )^ V k^ k+^ k+i) W left-hand-side u x V it x c ca + c c may a n b e be expressed as bounded from below by i=0 utilizing H-T V Lemma x ( k+r > x CA 4.2, ) X bound Q < \\x | | ^ k+Tca ca to l|2 w * (**+«» «*+.•) costs as V (x , n ) > \x 11^ H k k k and H resulting in L k the II ||2 II >NU " WU-tf i|2 =||^|U_^ e (4.56) +L Next, the second left-hand-side term o f (4.55) has to be bounded from above. The term > k) ^H+T ( k>i*k)] n \\ k+H\k p x - T V k+H\k> X i x cci 71 ( k H\k>* X c a + ~ 0) — ^T. = °) n m e X n w + of (4.53) is equivalent to , which provides the means to bound it from below. Since ( k+H\k > k+H)» Vff ( * * » t ) " ^ r right-hand-side c f l m (**' * t ) ^ e following bound can be enforced: I* ||p - ^ o *k+H ) (4-57) 95 CHAPTER or, HT ( k ^k)~ H( k^k)^ V + x ca V V x 4 STABILITY OF PREDICTED-INPUT ( k+H\k . "k+H ) X T O n the other hand, it can be established that V V (x ,7i )<\\x \\ p . H k k k u Consequently, b using Lemma ,n )< k+mk 4.5 (4.58) k+H\k X (x T CONTROL k+H\k/A) k+H the X upper since bound for H [ H r (**. "k) - H ( k> k)] V V + x n i s ca resolved as H+T A k^k)- H( k^k) V X V X r < k+H\kPb X v k+H\k X (4.59) k+H\k < max ° ^ ( ^ S ^ O - 1 l ^ / + i ) ^ - o " + i ) ) h l & f l » - r f " J <IU " > ca T Hence, (4.56) and (4.59) provide the bounds to establish (4.54), which guarantee asymptotic stability. • The preceding theorem is particularly useful as a design guide for the developed N C S control strategy. The parameters involved i n designing a stable controller are Q , R , H, and P . They w i l l determine the worst-case delay T 0 ca fi, that the controller is able to handle. Other possible parameters that can influence the closed-loop stability o f the control strategy developed here include various constraints for input, state and rate. A s discussed i n Section 4.4.1, the constraints are formulated and incorporated into the L M I (4.51), which modify the p upper bounds of the finite horizon quadratic cost Uj° accordingly. It should be noted that the computational speed o f the M P C optimization is also a factor i n deciding the prediction horizon H. 4.4 Evaluation of the Stability Boundaries This section illustrates the use of the main stability theorem, as developed in the present chapter, i n the electro-hydraulic manipulator systems o f the fish-processing machine (see Chapter 2). The effect of various design parameters, particularly, the desired worst-case delay, 96 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL the length of the prediction horizon, the terminal cost weighting, and the constraints, on the stability boundaries of the closed-loop system are evaluated numerically based on the linear model of the system as given in (2.17). Before proceeding further, the means of imposing constraints on the controller has to be addressed. 4.4.1 Imposing Constraints Three common forms of constraints are state constraints, input constraints, and state minimum decay rate constraints. In terms of the stability of interest i n this chapter, these constraints directly affect the tightness of the upper bounds Uj° for j = 0,..., H - 1 of the finite horizon cost function of the M P C policy. A more relaxed upper bound Uj° and hence providing a wider stability range, is achieved by imposing constraints with a narrower range. This is true as long as the feasibility of the solution of the M P C optimization is maintained through a given state trajectory. II State constraints of the form 112 ||x|| < 7] are enforced by augmenting the eigenvalue minimization of (4.51) with the following L M I : >0 (4.60) for 0 < j < H - 1 . L M I (4.60) is obtained by first considering (4.42) which gives (4.61) k+j\k l The introduction of jj f ° 0 < j < H - 1 such that r UH°-L <7JT (4.62) Q h will imply 2 yt+j\k c - k x U^-LQ 2 -Yj x T-Yfl' a n d thereby guaranteeing that the intended state constraints x Tx < ?] are complied. Note that Yj is unknown a priori but is a T free variable i n the L M I optimization of (4.51). Through Schur complements, one can easily transform (4.62) into its L M I equivalent of (4.60). 97 CHAPTER Input constraints of the form i,k+j\k <M u L I M 4 STABILITY OF PREDICTED-INPUT for i = \,...,m and 0 < j<H-l CONTROL are included by augmenting the L M I i n (4.51) with the following two L M I s : N Kj j >0 (4.63) ,2 lim for 0< j<H-1, where Nj (4.64) are arbitrary and symmetric matrices and Sj constants i n the vicinity of Yj are arbitrary are the diagonal elements of N •. L M I s (4.63) and (4.64) are constructed by assuming the linear state feedback control law u = KjX j k+jVc and taking k+ W the square of the input constraint, arriving at: KJUJ* \U: i,k+j\k The diagonal {KJU^K - elements y YjTj < u 1 2 x im of the rightmost U: X 2 V ( ~ ~ 1 > < KJU'J yj7J<4 Ji V )i 2 inequality in (4.65) (4.65) m is equivalent to which can be transformed into an equivalent L M I form by introducing a new intermediate matrix 7V such that y (4.66) where « = diag(t^ ,...,ul ) l i m m . The L M I form of the left-hand side inequality of m (4.66) gives (4.63). The diagonal elements of the right-hand side inequality of (4.66) gives u Nj: < —=2*- which is a non-convex constraint and can be approximated by linearizing 2 2 — Sj 7 1 tr<— with 5: = Yj. A s a result, the inequality becomes TV,, < Sj Yj i lim 1 — as rj , and JJ rearranging it gives (4.64). The state k+j+l\k \U ° x P minimum zp 1 decay k+j\k \ z P a rate constraint for 0<j<H-l used here is of the form where / ? e ( 0 , l ) is the additional tuning H-j U 98 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL parameter for specifying the speed of the closed-loop response (Kothare, et al, 1996). In order to transform this constraint into its L M I equivalent, again, assume the linear state feedback law k \k = j k+M u K x t o +j y i e l d k+j\k (A+BKj) U$_ X z (A+BKj) T < P u+l) k+j\k (4.67) H-j U B y comparing the norm weightings of (4.67) and substituting U • = iuj}' J followed by pre-multiplying and post-multiplying by U T (A Uj + BKj ) U (AUj+ T j+l \ J •) i and K J =K J fi J ; and Uj , one gets BK j) < pUj (4.68) which has the following L M I equivalent form: p Uj 2 - \T (AUJ+BKJ) >0 (4.69) AUJ+BKJ for j = 0 , . . . , H -1, and can be incorporated into the L M I eigenvalue optimization of (4.51) for the purpose of obtaining the upper bounds Uj° for j = 0 , . . . , H -1 to evaluate asymptotic stability using Theorem 4.3. 4.4.2 Stability Surfaces of the NCS The stability boundaries of the N C S - M P C control strategy as developed in this thesis and implemented on the electro-hydraulic manipulator system, is investigated in this section. The weighting matrices are chosen as Q = diag(l, 10,0.001,0.001) and i f = 100. Here, ju is set at 0.90 i n (4.54) while the stability boundaries are considered with various values of terminal weights P 0 as fractions of the open-loop infinite weight I / M which is obtained by solving the discrete Lyapunov equation £/„ = Q + A U„A. Although according to Theorem 4.3 stability is guaranteed for "any" j > 1 that renders (4.54) to be positive definite, a stability metric is introduced to determine the relative degree of stability of a particular setting. This relative degree of stability is expressed as the ratio of the number j to the length of the prediction horizon minus one. 99 CHAPTER 4 Figure 4.3: Stability boundaries with w l i m P = 0 . 2 5 1 ^ ; (b) Stability surface for P =U ; Q 0 oo STABILITY =0.20. OF PREDICTED-INPUT (a) CONTROL Stability surface for (c) Comparison of relative stability over different terminal weights for a horizon length of 25; and (d) Comparison of relative stability over different terminal weights at T ca Figure 4.3(a) shows the stability surface at w lim =0.20 = 8. P =0.25U Q with the input oo constraint (scaled), and the state constraint terms set to T = diag(l, 1,1,1) and 7 = 1. The system is unstable with a short prediction horizon. When the length of the prediction horizon is increased beyond 11, the closed-loop stability is maintained. Stability can be achieved for a shorter prediction horizon with a higher terminal weight of P =U , 0 oo as shown in Figure 4.3(b). However, for a particular stabilizing prediction horizon, the worst-case controller-to-actuator delay that can be tolerated is lower. Although intuitively, the stability increases as P —> U , 0 x it is not the case in the presence of delay when the future control inputs in the buffered sequence 100 CHAPTER 4 STABILITY OF PREDICTED-INPUT are used, as seen here. This is because, as the terminal weight P 0 CONTROL increases beyond a certain value, the terminal cost tends to dominate the optimization (minimization) and leads to a solution that is more suboptimal. So, in order to maintain stability of the closed-loop N C S , P 0 has to be an intermittent value relative to U„. This effect can be reduced by introducing an additional constraint on the minimum decay rate of the states, i n order to modify the speed of response of the closed-loop system. Figure 4.3(c) shows the relative stability of the closed-loop system under various levels of terminal weights at a fixed prediction horizon of 25. Again, note the lower degree of stability when P = Q compared to P = 0.5011^ and P = 0.751/^. 0 0 Stability can be maintained only up to a controller-to-actuator delay of 18. This phenomenon can be overcome by introducing a state minimum decay rate constraint into the control optimization. The effect of terminal weights on the closed-loop stability at a required worstcase delay of 8 is shown in Figure 4.3(d). Obviously, in order to maintain stability, a longer prediction horizon is required for lower terminal weights. The fluctuations in the plots are due to numerical errors in the computation, particularly, i n the optimization of the L M I s . It should not be of any concern because Theorem 4.3 only requires j > 1 for closed-loop stability. Figure 4.4 shows the stability boundaries with p = 0.99 and all the remaining parameters set as before. Figure 4.4(a) shows the stability surface at P = 0.25£/„, which is the same value 0 as used in Figure 4.3(a). Comparing figure 4.4(a) with 4.3(a) it can be seen that, the relative degree of stability has decreased as a result of introducing the state minimum decay rate constraint. However, a significant improvement is achieved when P =U , 0 oo as can be observed i n figures 4.4(b) and 4.4(c). The drop i n the level of worst-case delay due to longer prediction horizon is eliminated, and the overall stability has increased. 101 CHAPTER 4 Figure 4.4: Stability boundaries with « l i m STABILITY 0 (d) 0 over different terminal CONTROL =0.20 and p = 0.99 . (a) Stability surface for P = 0 . 2 5 1 ^ ; (b) Stability surface for P = stability OF PREDICTED-INPUT weights for ; (c) Comparison of relative a horizon length Comparison of relative stability over different terminal weights at T of ca 25; and = 8. 4.5 Implementation Issues In order to evaluate the responses of the controlled system using a pre-computed control input signal, an intermediate node for data packet forwarding is incorporated into the transmission path between the controller and the actuator. The function of this intermediate node is to regulate the desired data transmission characteristics. It uses a first-in-first-out (FIFO) queuing policy to consistently simulate various levels of delay. The delay level is varied by changing the length of the queue. Hence, when the intermediate node receives a data packet 102 CHAPTER (a) z (b) r [ms] (C) T [ms] 85 ca ca ca [ms] 4 STABILITY OF PREDICTED-INPUT CONTROL 5 time [seconds] Figure 4.5: Controller-to-actuator transmission delay T CA using the intermediate F I F O packet forwarding queue, (a) 1-step delay; (b) 5-step delay; and (c) 9-step delay. from the controller, it stacks the data packet on its queue, and then the oldest data packet is forwarded to the actuator. Figures 4.5(a), 4.5(b), and 4.5(c) show the dynamics of the controller-to-actuator data transmission of the specified 1-step, 5-step, and 9-step delay, respectively. Note that the sampling interval used here is 10 ms. The loss of data packets is simulated by dropping off entries of the queue according to a memoryless exponential distribution typically used in network queuing models (Bertsekas and Gallager, 1991). A t most, only one selected data packet is dropped at each sampling interval. The transmission of sensory data (states) from the sensor to the controller is done through a direct connection with no loss and negligible delay. The constrained M P C control scheme requires the solution of the optimal quadratic cost function (4.4) or (4.9) at every sampling interval. Since the present real-time servo system with a sample interval of 10 ms is relatively fast, solving (4.4) or (4.5) using traditional quadratic programming (QP) methods is inefficient, and feasible solutions throughout the evolution of the state trajectory are not guaranteed. Computational time is further increased, in an exponential manner, due to the introduction of additional constraints and the length of the prediction horizon. In addition, feasibility of the solution cannot be guaranteed a priori. Here, an offline multi-parametric Quadratic Programming (mpQP) method is adopted i n order to achieve fast online optimization of the quadratic cost function of M P C . This method explores 103 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL the state-space of a given system, and partitions the space into polyhedral regions of continuous and piecewise linear control laws of the constrained M P C problem. After that, an online binary search tree is built in order to efficiently determine which region, and hence which control law, a particular state belongs. The online binary search tree is built by systematically and sequentially sorting each region according to the direction of each hyperplane (the borders of the regions) on which it resides within the state-space. In typical applications of constrained M P C , which uses the first optimal control input sequence at every sampling interval, there exist multiple regions with identical control laws. These regions can be grouped together thereby decreasing the number of unique regions, and consequently reducing the computational effort while traversing the search tree. However, this is not the case i n the present application because subsequent control input signals are utilized as well, rendering each initial region unique. It is found that since the search tree building algorithm requires a significant amount of time, a remedy for speeding up the algorithm would be to reduce the depth of the search tree by increasing the number of regions left at leaf nodes. This significantly reduces the time for search tree building. After traversing the binary search until a particular leaf node is reached, a sequential search is carried out online until the terminal region is reached, where the corresponding control law is calculated. Although in the offline stage, the algorithms for m p Q P state-space partitioning and search tree building are rather tedious, complex, and consume a significant amount of computational time and memory, the speed advantage gained during online execution is essential, especially i n the applications of high-speed servo systems of industrial machinery. The basic concept of mpQP and the detailed design work for the algorithms to generate off-line and traverse on-line the corresponding binary search trees are presented in Appendix B . 4.6 Real-time Experimental Evaluation In the experiment outlined now, the length of the prediction horizon is set to 15 with a terminal weight of P = O.SOU^ . A n input constraint is imposed as -0.20 < u < 0.20. A n 0 additional constraint is imposed on the velocity state as -0.10 < y < 0.10 in order to reduce the speed of response of the closed-loop system, thereby, increasing the stability of the system under control. This results i n a total of 3890 polyhedral regions within the normalized unity state-space consisting of 11604 hyperplanes. When the number of remaining regions to be 104 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL explored at the leaf nodes is set to 100 regions, the resulting binary search tree contains 441 nodes with a tree depth of 8 layers. The partitioning of regions (using Matlab® M u l t i parametric Toolbox) and the generation of the binary search tree (coded and compiled i n C++ language) take approximately 180 minutes. The state minimum decay rate constraint is not imposed because it requires the introduction of additional system states i n the form of the square of each of the four original system states. This result i n a tremendous increase in the computational effort required to generate the m p Q P regions as well as the corresponding binary search tree. W i t h a prediction horizon of 15 steps, the size of each data packet from the controller to the actuator is 270 bytes. 4.6.1 Stability Evaluation under Transmission Delay The state response curves and the corresponding control input signal for a positioning operation starting from an initial piston position of 5 mm are shown in Figure 4.6. Over the experiment duration of 10 s, six levels of controller-to-actuator delay expressed i n terms of prespecified sample steps, are included for comparison. The graphed input current is the actual sequenced value used at a particular sampling instant. Under delay free conditions, as shown in Figure 4.6(a), the settling time is approximately 1 s with all four controlled states converging to the origin of equilibrium. Figures 4.6(b) and 4.6(c) show that similar responses are obtained with minor increases in the settling time of the piston position state y , under 1 and 3 sample steps of controller-to-actuator delay. In Figure 4.6(d) where the controller-to-actuator delay is set to 6 sample steps, y converges to the origin very slowly, settling at approximately 7.8 s, and a low level of continuous ringing follows. Constant cyclic responses are also observed i n the remaining three states. A t a controller-to-actuator delay of 10 sample steps (Figure 4.6(e)), y does not converge asymptotically and the pressure states exhibit saw-tooth cyclic responses. Severe jumps are observed for the corresponding input current. Since the selected system is open-loop stable, only asymptotic convergence to the origin of one or more states can be used to represent stability. Hence, due to the non-convergence of the piston position state, the responses as obtained in figures 4.6(e) and 4.6(f) are categorized as asymptotically unstable. Under 14 sample steps of controller-to-actuator delay, as shown in Figure 4.6(f), the piston position state diverges slowly with time up to the 4 s mark, as P increases and P H decreases, R which is opposite of the experience in the previous test run. After the 4s mark, P oscillates H 105 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL above its steady-state value and P oscillates below its steady-state value. R Figure 4.7 shows the overall effect of the controller-to-actuator delay using our M P C scheme with future control input buffering on the integrated absolute state regulation error. The curve marked with " x " indicates that the piston position state ceases to converge asymptotically after 10 sample steps of delay. The integrated absolute state regulation error for the two pressure states (plots indicated by a "square" and a "triangle") as well as the average error (the curve indicated by a "+" sign) increases with the controller-to-actuator delay. A drastic increase, which indicates divergence, is observed at 14 sample steps of delay. The ability of the developed networked control scheme to maintain asymptotic stability subjected to input disturbances, is tested and shown in Figure 4.8. The electro-hydraulic manipulator is set at an initial position of 5 mm. A t every 6 s interval starting from the 8 s mark, an input pulse of 10 m A magnitude and 0.1 s duration is applied to the system i n alternating directions. Figures 4.8(a) and 4.8(b) show the resulting state response curves under 3 sample steps and 5 sample steps of controller-to-actuator delay, respectively. In both cases, asymptotic convergence is maintained under input disturbances, although the system responses become more sluggish as the controller-to-actuator delay increases. Figure 4.9 shows that asymptotic stability is maintained with various initial conditions for the piston position under 5 sample steps of controller-to-actuator delay. W i t h an initial position of 5 mm, the system settles after 5 s while it settles at 1.5 s with an initial position of 2.5 mm. The piston settles back at the origin after 2 s under an initial position of - 2 mm, and an initial position of - 4 m m requires a duration of approximately 7 s for the system to settle. It is noted from the input current plots that a greater control effort is required to move the manipulator in the positive direction than i n the negative direction. 4.6.2 Stability Evaluation under Packet Loss N o w the asymptotic state convergence with the developed networked controller is experimentally analyzed in the presence of packet losses i n the communication path. The packet sequence of a pre-computed future control input is dropped at the intermediate queue, as discussed i n Section 4.5. Figure 4.10 shows the state response curves and the input signal of the system at a fixed 3 sample steps of controller-to-actuator delay and various levels of data packet loss rate at 10% increments. The vertical lines below each input current plot indicate the 106 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL instances where data packets are lost. Generally, the settling time of the piston position state increases as the data packet loss rate increases. It is also observed that the fluctuation i n the input current increases as the data packet loss rate increases. However, asymptotic convergence is maintained until a data loss rate of 90% is reached. This seems somewhat unreal but the "effective" mean delay that corresponds to the 90% data loss rate is only approximately 10.5 sample steps, as shown i n Figure 4.11. Furthermore, Figure 4.11 shows the mean effective delay of corresponding data packet loss rate for a pre-set queuing delay of 1 to 6 sample steps. The numbers in parentheses on top of each bar represent the maximum delay experienced at the actuator. A s intuitively clear, the higher the data packet loss rate, the further w i l l the mean effective delay deviate from the pre-set queuing delay. The combined effect of data packet loss and controller-to-actuator transmission delay on the asymptotic convergence, and hence stability of the system, is shown in Figure 4.12. Here, only the integrated absolute regulating error of the piston position state is used as an indicator of the state convergence. It is observed that stability is maintained for all data loss rates up to a controller-to-actuator delay of 4 sample steps. A t 5 sample steps of delay, asymptotic convergence is guaranteed only up to a data loss rate of 60%. This limit on the data loss rate for asymptotic convergence reduces to 50% at 6 sample steps of delay. This verifies that as long as the prediction horizon is sufficiently long and with an appropriate terminal weight P, 0 asymptotic stability is guaranteed using a pre-computed control input sequence as long as the "effective" delay is within the pre-designed sample step value, regardless of the dynamics of packet loss, vacant sampling, and out-of-order data arrival. 107 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL y [mm] (e) time [seconds] (f) time [seconds] Figure 4.6: State responses and input under 6 levels of controller-to-actuator delay. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side o f the cylinder P H [psi], pressure at the rod-side of the cylinder P R [psi], and input current u [mA]). (a) Delay free; (b) 1-step delay; (c) 3-step delay; (d) 6-step delay; (e) 10-step delay; and (f) 14-step delay. 108 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL o tl m u "o 1/3 < -a so Controller-to-actuator delay [steps] Figure 4.7: Effect of controller-to-actuator delay on the integrated absolute state regulation error, (cross - position; circle - velocity; square - head pressure; triangle rod pressure; and plus - average) y [mm] [mm] g io 10 r y y o [mm/s]. [mm/s] [ 10 1Q P 300 [psi] 200 r H / l 300 [Psi] 600 200 600 P 500 [psi] 400 P 500 [psi] 400 R R 5 U Jl, [mA] W Jl. 0 [mA] 10 15 20 25 30 35 40 45 10 15 20 25 time [seconds] (a) 30 35 40 45 time [seconds] (b) Figure 4 . 8 : State response curves and input under input disturbances. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P [psi], pressure at the rod-side o f the cylinder P [psi], and input H R current u [mA]). (a) 3 steps of controller-to-actuator delay; and (b) 5 steps of controller-to-actuator delay. 109 CHAPTER y [mm] 4 STABILITY OF PREDICTED-INPUT CONTROL 5= 0 •5i 10r y o, [mm/sl _ 10 400 P/l [psi] r 300 200 600 Py 500 [psi] U 400 5 o [mA] time [seconds] time [seconds] y [mm] time [seconds] (c) Figure 4.9: (d) time [seconds] Asymptotic stability under 5 steps of controller-to-actuator delay and different initial conditions. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P h [psi], pressure at the rod-side of the cylinder P [psi], and input current u [mA]). (a) Initial piston position r = 5 mm; (b) Initial piston position = 2.5 mm; (c) Initial piston position = - 2 mm; and (d) Initial piston position = -A mm. 110 CHAPTER 6 y STABILITY OF PREDICTED-INPUT CONTROL 6 4 [ m m ] g y 4 [ m m ] 4 Q 10 y OK [mm/s]_ 400 y ol [mm/s] 400 Ph 300 [psi] 200 600 Pr 500 [psi] 400 5 U o [ m A ] I 1 0 p h 1 300 [psi] 200 600 Pr 500 [psi] 400 u II nil 11II I ll II i (a) 6 y inn ii . in mi inn 10 IIII mil 1 11 mi time [seconds] 1 1 1 1 1mi mi mimi ill mi time [seconds] (b) y 4 [ m m ] 0 [ m A ] [ m m ] Q 10 y 0 ||A^A/^i^wv\f-rt)f u [mm/s] [mm/s] 400 Pn 300 [psi] 200 600 r Pr 500[psi] 400 5 1 0 1 0 ^ ^ 400 Pn 300 [psi] 200 600 P r J i mi MI' II m 0 2 m A mini Him i 4 6 nw • inn II 10 ""V 500 [psi] 400 5 U o [ m A ] -5, III iniiiiiiiiinii n mi ii i in minnim n inn iminnini lit 10 time [seconds] time [seconds] (d) (C) J [ m m ] [ m m ] 4 ^ 10 y 0 pvy A~>w*>'-w,^A^ ' [mm/s]_' 400 Pfo 300 [psi] 200 600 Pr 500 L f v j 0 [mm/s] 400 -f/, 300 [psi] 200 600 P 500 wlf 0 1 o i R [psi] 400 5 [psi] 400 5 [ m A ] ^ iu^^*^^^ 6 time [seconds] (e) (f) 8 10 time [seconds] Figure 4.10: State response curves and input at 3 steps of controller-to-actuator delay under 9 levels of data packet loss rate. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P [psi], pressure H at the rod-side of the cylinder P [psi], and input current u [mA]). (a) 10% loss rate; R (b) 20% loss rate; (c) 30% loss rate; (d) 40% loss rate; (e) 50% loss rate; (f) 60% loss rate (g) 70% loss rate; (h) 80% loss rate; and (i) 90% loss rate. Ill CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL P 500 [psi] 400 L R 5r U winniinnmumMiiMBiiniii 2 [mA] mmnimiinaiiiiiniiimirn »mni 8 4 1C Fi»Hiiiniaiirwniiii!i8;M:iuiHmininmi:niiTiani!i!iiFiiniin time [seconds] 9 d K (h) (g) time [seconds] y [mm] y [mm/s] l 4001 [psi] 1 200 600 r P r 500 [psi] 400 5 time [seconds] (i) Figure 4.10 cont.: State response curves and input at 3 steps of controller-to-actuator delay under 9 levels of data packet loss rate. (From top to bottom: piston position y [mm], piston velocity y [mm/s], pressure at the head-side of the cylinder P [psi], h pressure at the rod-side of the cylinder P [psi], and input current u [mA]). (a) 10% r loss rate; (b) 20% loss rate; (c) 30% loss rate; (d) 40% loss rate; (e) 50% loss rate; (f) 60% loss rate (g) 70% loss rate; (h) 80% loss rate; and (i) 90% loss rate. 112 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL Figure 4.11: Effective mean delay of data packet loss. (Each set corresponds to the pre-set queuing delay. The numbers on top of each bar in parenthesis indicate the maximum instantaneous delay recorded during experiment). Figure 4.12: Effect of data packet loss rate and controller-to-actuator delay on the asymptotic convergence of the position state of the system. 113 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL 4.7 Summary This chapter studied the stability of a newly-developed and optimal control strategy for Networked Control Systems ( N C S ) . The control strategy hones the potential of constrained M o d e l Predictive Control ( M P C ) by buffering the predicted control sequence at the actuator i n anticipation of typical data transmission errors associated with N C S . Utilizing the second method of Lyapunov, the controller was shown to be feasible and asymptotically stable. A stability theorem was developed, which provided a suboptimal measure for the controller i n real-time, and was adequate to estimate the worst-case transmission delay that can be handled by the developed control buffering strategy. Although, under non-nominal conditions, the precomputed control actions are sub-optimal, they are still feasible, and therefore stabilizing. The stability conditions, as governed by the theorem, were validated through real-time implementation on an electro-hydraulic servo system of an industrial processing machine, through an Ethernet network. The developed theorem was provided as a design criterion to set the parameters of the controller. Besides the transmission delay, the developed strategy has the capability of compensating for data losses, vacant sampling, and out-of-order data, without modification. 114 Chapter 5 Stability Under Imperfect State Measurements Pre-computing and buffering of future optimal control input sequences are fundamental to the developed networked feedback control strategy, which is based on M o d e l Predictive Control ( M P C ) . The conditions for maintaining closed-loop asymptotic stability of this control system have been established in the sense of Lyapunov, in the previous chapter. B y relying on the Principle of Separation (Furuta, et al, 1988), perfect state measurement under conditions of zero sensor-to-controller delay has been assumed in the previous analysis. The present chapter extends the stability analysis to include imperfect state measurements from a state observer (estimator), which is incorporated before the M P C controller to estimate delayed or missing sensor data (see Figure 4.1). The level of state estimation error (difference between estimated and actual states of the system) that can be sustained under the conditions set for stable future control input buffering without losing global closed-loop stability, is investigated. The analysis given here is an extended version of the work by Santos and Biegler (1999), which analyzed robust stability of an M P C controller with model mismatch by imposing terminal state constraints. In accordance with the analysis of the previous chapter, a terminal weight is incorporated into the M P C cost function without any end constraints, in order to determine the degree of state estimation error that can be sustained, with guaranteed closed-loop asymptotic stability in the sense of the second method of Lyapunov. The established stability bound for the state estimation errors w i l l provide a key reference to the design of robust state observers for NCS. The next section introduces the preliminary concepts of the stability problem that is under study and establishes an upper-bound gain for the state estimation error. Section 5.2 describes the basis of Lyapunov stability in the context of the analysis presented in Chapter 4 and identifies the conditions to guarantee closed-loop asymptotic stability in the presence of state mismatch. The sensitivity of the finite-horizon quadratic optimization of the M P C policy, to state estimation errors, is investigated in Section 5.3. Section 5.4 presents the development 115 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS which leads to the main stability results of the present analysis, and synthesizes the overall algorithm for determining the upper bound of the state estimation error. The developed stability theorems are then used to determine the state error bound of the N C S - M P C control strategy as implemented i n Section 5.5 on the electro-hydraulic servo manipulator. Section 5.6 describes the possible improvements to the M P C policy in order to increase the degree of state estimation error while maintaining global asymptotic stability. 5.1 Problem Description Consider the discrete-time, state-space model of the system under control, as given by where x e R n k and / : R nXm are the states of the system at time k, u e R m k are the control inputs at time k, -> R . The finite receding-horizon cost function of the M P C control policy which n is employed i n both previous and present chapters is of the following quadratic form (see Section 4.2.1,(4.9)): H-\ V H (X , 7l ) -^ y k k k <j X k + m k + 2 ^ i=0 Q 1 + k+i\k U s.t. (5.2) k+i\k ^i Vi = l,...,H u \ el/ V/= 0,...,/Y-l x e k+i k in which H is the length of the prediction horizon, Qe R nXn Re ] R m X m is the state weighting matrix, is the input weighting matrix, and P e IR"*" is the terminal weight matrix of the 0 state. The series of optimal control input is given by n =[u ,...,u _ k k]k k+H m \ = arg™ n V (x ,n ) H k k with the measured instantaneous state JC^ as the starting state of the quadratic programming problem. It has been established in the previous chapter that buffering the sequences of n for k use at future time steps to compensate for the transmission errors between the controller and the actuator is stabilizing when the instantaneous state x k is measured perfectly and directly from the sensor without network transmission between the sensor and the controller. In the case where the sensor readings are transmitted over a communication network and when the actual 116 CHAPTER state is delayed or lost, x k 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS has to be estimated at every time step k using a state observer. Let the estimated state be denoted by x . Depending on the speed of convergence and accuracy of k the adopted state observer, the deviation of jc^ from the actual x may render the solution to k (5.2) infeasible or suboptimal, which may eventually lead to instability of the developed N C S M P C control strategy. The main objective here is to determine an upper bound for the magnitude of deviation between the estimated state x and the actual measured state x k k for maintaining closed-loop asymptotic stability. The following analysis assumes that the state observer employs the model (5.1) of the system in its estimation, and the evolution of this model between the estimated state and the actual state is Lipschitz (see Definition 4.5), such that \\f(x ,u )-f(x ,u )\\<L k where L f k k k \\x -x \\ f k (5.3) k is the bounding Lipschitz constant. A l s o , assume that the difference between the evolution of the measured actual state and the state trajectory obtained from the model (5.1) of the system, is bounded by a class /C^-function (see Section 4.3.1) y (-) x such that \\x -f(x ,u )\\<y (lx \\) k+1 k k x (5.4) k for k > 0 . The difference i n the future evolution of the actual and the estimated states can be expressed as follows: k+i ~ k+i = i k+\ - / ( * * » u ) ) + (/(**,u )- x x x k k f(x ,u )) k (5.5) k Taking the norm of (5.5) and substituting (5.3) and (5.4), the norm of the future evolution of the state estimation error can be bounded as: \\ k+\ ~ k+l\\ X X ^\\ k i ~ f( k.u )|| x k II <y (lx \\) x + \\f(x ,u )- x + II + k k ~ II f(x ,u )|| k k k (5-6) II L \\x -x \\ f k k for k > 0 i n which y (•) is a class /C -function. Define y (•) = K \\x || where K > 0 , yielding e x e \\ k+\ ~ k+l\\X X e\\ k\\ K X e k e (-) 5 7 117 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS It follows that (5.7) governs the future evolution of the state estimation error through an upper bounding gain K and can be used as a measure of error tolerance for maintaining closed-loop e asymptotic stability. Note here that a larger K is more desirable. e 5.2 Stability Basis Stability analysis using Lyapunov's second method is based on the existence o f a class /C^-function y(||xj.||) V(x ) that satisfies the condition V(x )-V(x )> k k v(\x ^) as k+l where k is another class /CI-function (Theorem 4.1). In other words, i n order to ensure asymptotic stability, V(x ) should be decreasing with time along the trajectories of the closedk loop system. In the context of receding horizon M P C , the finite quadratic cost function (5.2) is a candidate Lyapunov function (Theorem 4.3). It has been established i n the second condition of Theorem 4.2 that, with perfect state measurement, the system represented by the model (5.1), when subjected to a finite sequence determined V (x ,7i )—V from H k k state x k H the (x ,7t ) k+l k+l of future control actions M P C control law (5.2), is n = {u ,...,u \ } k Mk k+H asymptotically a s k stable if > 0 . W i t h the integration of the state observer, the actual measured is not directly available to the M P C controller, thereby making V (x ,n ) H k unknown for A ; > 0 . Instead, the time evolution o f the estimated cost V ^ ^ , ^ ) receding horizon cost computed with the estimated state x k k an (i.e., the as its initial optimization condition) has to be considered, along the closed-loop system trajectories. The following lemma establishes the bound for the main stability criteria. L e m m a 5.1: The system under control described by model (5.1) using a finite sequence of future control actions from the MPC control policy (5.2) with prediction estimated state x k neighborhood is asymptotically stable in the sense of Lyapunov horizon H and if there exists a J c E " containing an open neighborhood of the origin such that Proof: A d d i n g and subtracting V^(x ,7t ) k k to the difference in the estimated costs at the time steps k 118 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS and (k +1), gives V H (X ,7t )-V„ k (X , k k+l 7l )j k+1 - \V H (X , k+l 7Z ) - V* (X , k+] H 7l M (5.9) ) M This estimated cost difference can be bounded from below by bounding the first and the second terms on the right-hand side of (5.9) from below and above, respectively. Consider the first term o f (5.9) and V^(x ,7t )-V^(x ,7r ) k k k+i V* {x ,n )-V* (x ,n )>\x f . H k k H k+x k+l k which can be bounded k+l from below as Since, optimality dictates V* (x ,n )<V (x ,fc ) Q H k k H k k for x * 0 , and assuming that x ~ x , the first term of (5.9) can also be bounded from below as k k k H ( k>*t) - *H ( k+i.*k+i) - \\ k||Q V x V x x . resulting in (5.8). • Before proceeding to establish an upper bound on the second term of (5.8), the sensitivity of the M P C optimization problem (5.2) at time step (k + 1), to a deviation (x k+i —x ) in the k+l initial state should be characterized. This characterization is required to facilitate the incorporation of the state estimation error bounding gain K into (5.8) through (5.7). This is e accomplished in the next section. 5.3 Sensitivity of State Estimation Errors In order to characterize the sensitivity of the M P C optimization of (5.2), it is necessary to reformulate (5.2) into an equivalent multi-parametric form whereby both inputs and state trajectories for \/i = 0,...,H become decision variables. Here, only equality constraints are considered. Possible extension to include inequality constraints is addressed in Section 5.6. Define Xk =\ L T Zjfc u J x Xk T Xk+\ eR T +i k+i T T Xk+H for m + n e K^X""-") W ith u k+H i = 0,...,H and = 0 . Consider the linearized version of the discrete, time-invariant model (5.1), as given by k+\=Ax +Bu x k where AeR nxn and BeR . nXm k (5.10) The finite horizon quadratic cost function o f (5.2) can be transformed into the following equivalent M P C optimization problem: 119 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS V (x ,n ) = V (z )= ™" \z J z H T k k H k h e k (5.11) s.t. c(z ) = [Aj-A ]z -v =0 k B k x where J =diag(2Q,2R,2Q,2R,..,2Q,2R,2P ,0)e e i&( )( "MH i)(m n) H+i 0 A , = diag(/,0,...,/,0)s + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0 0 0 0 0 0 0 0 0 0 0 0 T + R("+lX«+»)x(ff+l)(m+iO 0 xl m+ (H+l)(m+n)x(H+\)(m+n) R jg,(#+l)(m+n) o 1 The first order necessary and sufficient condition for a local minimum of a general convex constrained optimization problem (including (5.2) and (5.11)) is given i n the following theorem. T h e o r e m 5.1 (Karush-Kuhn-Tucker optimality conditions): Let A? be a vector space and Z a normal space. Let /(•) be a Gateaux differentiable Gateaux differential mapping from Af into £ . linear in their increments. c(x)>0, If x* minimizes then there exist Lagrange multipliers /(•) real-valued functional on A?, and C a Assume that the Gateaux differentials are subject to a constraint vector function X* such that x* and X* satisfy the following system: 120 CHAPTER 5 STABILITY V £(x*,A*) UNDER IMPERFECT STATE MEASUREMENTS =0 x c (x*) = 0 for is £ t (x*)>0forieT (5.12) Ci A*>0forieT A* (x*) = 0fov V i Ci where the Lagrangian £(x,X) = / ( J C ) - ^ ^ C , - ( X ) , c (x) is the i-th function of c(x), A\ is the { i i -th element of vector A, £ is the set of equality constraints, and T is the set of inequality constraints. Proof: see Luenberger (1969), pp. 249-250. • The variations of the optimality conditions (5.12) to a deviation i n x can be approximated using the mean value theorem given below. T h e o r e m 5.2 (Mean Value Theorem): Suppose that a and b are numbers and that the continuous-time function /(•) has continuous first partial derivatives at [a,b]. Then f(a)-f(b) = \\f(b + t(a-b)) (a-b)dT (5.13) T Proof: see Kreyszig (1999), pg. 445. Let Xk X =\x' k+i Xk+\ "' u T T k+i • k+i | eE m + ^ (H+\)(m+n) Xk+H " R for e m i = 0,...,H and jnuiti.paj-ajnetric vectors corresponding to e the estimated initial state x . Utilizing theorems 5.1 and 5.2, the following lemma, which k characterizes the sensitivity of the M P C policy (5.11) to the state estimation error at (k + Y) i n the form of a bound, can be deduced. L e m m a 5.2 (cf. Santos and Biegler, 1999): There exists a bound, governed by the deviation on the initial state conditions, on the solution to the convex optimization problem o f (5.11) such that k+\ Z k+\ z ^xz Z Z x k \~ k i x + + (5-14) 121 CHAPTER 5 STABILITY UNDER IMPERFECT where STATE MEASUREMENTS dd v", C(2jt ,) t+1 + ^1 ^ J / V ^ V ^ ) ) ' and T in which £ = k+\ T k+\ + T k+\ X T Z x T T k+\ z dr T ' ~T k+\ and tjsR is the (H+1)(m+n) k+\ X z basis for the null space of the gradient of the constraint matrix function V c(Zfc ). +1 Proof: Consider the first two Karush-Kuhn-Tucker ( K K T ) optimality conditions of (5.12) in Theorem 5.1 for the equality constrained M P C optimization of (5.11) at (k + 1), combined in a vector form as (V (z )-te(z )j V, Assuming that tje R(* X'»+'0 V Z w c(z* + 1 o rt h en u l l s p a k+l M ) e R(«+IX«+«MH+IX«+») +1 f H c e 0 fV Zt+i c(z t+1 h a =0 s a (5.15) f u l l r o w r a m v t h e b a s i s ) can be defined such that V c(z )tj Zk+ B y projecting the gradient o f the Lagrangian on the null space o f V c(z k+l A + ] = 0. ) , (5.15) is obtained as =0 (5.16) Let the left-hand-side of (5.16) be equal to the vector function p(z ) = *% + 1 V (z s t + 1 ) k+i c Define £- T k+\ X T k+\ z and i = [xl +i z[ + 1 Using Theorem (z*+i) 5.2, the affine approximation of p(-) for variations of £ is realized as 122 CHAPTER 5 STABILITY Pit) ~ P(b = \l Vp(t UNDER IMPERFECT b) T + T(£ - STATE MEASUREMENTS Of - <?) d r = 0 (5.17) Let £ = £ + r ( £ - f ) . Partial differentiation of p(£ ) i n (5.17) with respect to x T r and z , k+l k+l respectively, yields V f x (v% 4 + 1 + I W** i>) V + (/V Z i + i Z i + i V (^ ))" w x + 1 1 /t+l x /t+l dr =0 Jo (5.18) Expand (5.18) and then rearrange to get V k+\ . k+\ z z Z 4 + 1 (/V Z i + i ^(z, + 1 ))' dr Jo Zr dr Jo V x c(z* ) t+I +1 fr J [ *+i x (5.19) x jt+i ] J B y taking the Euclidean norms on both sides of (5.19), and defining Z and Z as the upper z x bounds to the norms of the first and the second integrands of (5.19), respectively, one obtains (5.14). • When the linearized model of the system (5.10) is used and the M P C cost function is quadratic and subjected to c(z ) = [A -A ]z k+i 7 B ~ v k+l a (5-H), the gradient V s m Xk+l becomes a constant matrix, hence, the basis tj for the null space of S7 c(z ) Zk+ the other partial differentials i n Z x V c(z )e Xk+l k+l R( * »* , H+i m+ and Z ; namely, i+1 • In addition, k+l V V V (z )eR *, lH+1Xm+n) z and V ^ V ^ V ^ z ^ e u n c(z ) Xk+ ( H + l ) i m + n M H + l ) ( m + n ) Zk+i H k+l n , are also constant matrices. A s a result, the integrands are constant, rendering Z and Z to be constants as given x Try by z V7 k+l x 1/ t \ Zk+l x V\ c (< x z k + 111 l and l r '— r z — 1 Z = - 1 . F o r a particular z \) system, there can be several different bases tj that satisfy V z c(z )q = 0, but any basis q k+l results in the same Z and Z . The four partial differentials within Z and Z are obtained as x z x z 123 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS follows: ) = 2- V, V« t + 1 V l t + 1 V ( w Z j l + 1 4 + 1 c( Z j t + 1 ...0*] 0 ••• 0 ~ -A T 0 T n o T T mxn u / T T T T l ) = 2-diag((fi) ,.. • •' ( ^ ) m.•••>Co)ii»- 1I h 0 0 0 • 0 0 0 0 0 0 0 0 • • 0 0 0 0 K 0 • 0 0 0 0 0 • 0 0 0 0 -B • 0 0 0 0 • 0 0 0 0 -A where Q f )= O -B 0 0 0 0 0 -A 0 0 0 0 0 0 0 0 0 0 0 0 -A • 0 ho -B 0 0 0 is a matrix with only the diagonal entries of Q , (Q)jj are the diagonal elements of diag Q , (R)jj are the diagonal elements of R , and (P )jj are the diagonal elements of P . 0 0 5.4 Main Stability Results V (x ,n: )-V^(x ,n ) Referring to L e m m a 5.1, the second term H k+l k+] k+l i n (5.8) can be k+l formulated i n terms of the estimated states and their corresponding estimation errors from k to k + H hy first recasting the finite horizon quadratic cost function of the M P C policy (5.2) i n terms of x = k+i e R m+n k+i k+i x u V (x ,7t ) H k k as follows: =V ( ) =XkH pX H T H Xk + E M + Q k+ XLIMQUX, Zk+i /=0 where M P q =diag(P ,0)e M 0 ( m + " ) x ( m + n ) and M =diag(Q,R)eR . (m+n)x(m+n) QR Then, the difference between the costs from the initial estimated and actual states at (k +1) is obtained as: 124 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS M/* i)-^V/*+i) + H = xl+H+\ P Xk H+\0 (5.20) xl+H+\ '^Xk+H+\+^(Xk+i QRXk+i M M + M ~ xLi Q X i) M R k+ 1=1 B y defining the state-input estimation error vector as s ;=x k+l actual state-input vectors % k + i k+i ~Xk+i f ° r i = 0,...,H , the (optimal but unknown) are removed from (5.20) to yield H(Xk+l)- H(Xk+0 V V H (5.21) 4+tf l P Z*+tf+l + / L / + l P * + ^ M M + 0 e 0 i=l H k+H+l^P k+H+\ E + 2^i k+i^QR k+i £ £ 0 £ /=! In order to bound V (x )-V (x +\) H k+l H or equivalently k V (x ,n )-V (x ,7i H k+l k+l H k+i k+l ) in (5.8) from above, % k + i and s k+i have to be bounded first. The following two lemmas formalize the required bounds relative to x . k L e m m a 5.3: If x cz A? and A? is a bounded space for > 0, then the estimated state-input k vectors are bounded by the state x as k Xk+i - z K (5.22) k\ X for \/i > 0 where K is non-negative. z Proof: Assume that the estimated state x remains within a bounded space A? for Vfc > 0 . Since both k x k and x k are governed by the model (5.1) of the system, it may be concluded that (5.22) always exists. • L e m m a 5.4: The state-input estimation error vectors s k+i are bounded by the state x k according to k+i -Z Z K £ x for z e x k (5.23) Vi>0. 125 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Proof: B y taking the Euclidean norm of s ,= / k+i [Xt+i-Xk+i] \\£ i\ ^ \z k+ k+i giving \\x k+l k+x s w i t h -Z \• i [**+«-**+«]. n o n e o b k+i t a i n k+i bound \\s || < Z Z k+i X Z \\x k+l — ~Xk+i\\ • | j . It z k+l is <Z Z -z X x Z x k+l k+l characterized in stabilizing properties n c e , (5.7) that • k (asymptotic) i k+l I < K \\x I and this completes the proof. e S and hence, s F r o m Lemma 5.2, it is established that k+i the -x The i one obtains l^^l = \\x -% k + i of the closed-loop system that arise b y implementing a state observer to estimate the states of the system are established below. Theorem 5.3: The system under control as described by model (5.1) using a finite sequence of future control actions from the MPC control policy (5.2) with a prediction horizon of H and estimated state x , is asymptotically k error bounding gain K >0 stable in the sense of Lyapunov if the state estimation of (5.1) is bounded as e ( 2 (5.24) M, + 2H M,QR )Z Z K X Klle-^(IKI) and Z Z (5.25) 2>0 Proof: Proceed from the stability bound o f (5.8) given i n Lemma 5.1. The second term on the righthand side of (5.8) is equivalent to (5.21). In order to establish an upper bound for this second term, (5.21) has to be bounded from above. The following bound is obtained b y taking the Euclidean norm on both sides of (5.21) and dropping the second term of (5.21): VH(Xk+i)-VH(Xk+i) - \ k+H+\Mp Xk+H+lI £ \Xk+H+\Mp£k+H+\ + n +X QRXk+i I + \\xLi QR£k i M + (5.26) ) H ^ 2 h + H + i I || P I \\x H i I + Z lh+«- II\\ QR I Uk+i 2 M 0 k+ M + Substitute (5.22) from L e m m a 5.3 and (5.23) from Lemma 5.4 into (5.26). One obtains 126 CHAPTER <2 M ZZKK x <2 z e 5 STABILITY UNDER IMPERFECT (\\x \\f + 2H\\M \\Z Z K K z k QR x z e STATE MEASUREMENTS (\\x \\) z k (5.27) + 2H M \\jZ Z K K (\\x QR z e z k 2 <K (x B x k where K =2( Mi B + 2H M ZZKK QR x z e (5.28) z thus arriving at (5.24). B y combining (5.27) and (5.8), the asymptotic stability condition of (5.25) is established. • The cost evolution bounding gain K B is determined by searching and comparing the spaces of the actual and the estimated states (except the origin) that satisfy (5.25) and (5.27). The rationale is that each pair of initial states x k (5.11)) has an associated value of K B = (to the optimization problem of k which is calculated from: B K and x ^H^k+l'^k+O ^H^ k+\^ k+\) x n (5.29) in accordance with (5.27). Hence, the maximum upper bound to condition (5.27) (less conservative) is achieved by determining the maximum value of K B combination spaces of x k and x k that is possible within the while satisfying the asymptotic stability condition of (5.25). Similarly, the input-state parametric evolution bounding gain K z searching the space of the estimated state x k optimal decision variables condition x , k (except the origin) that satisfies (5.22). The for i = 0,...,H from the solution of (5.11) with the initial are used to calculate each corresponding K z K The maximum possible value of K z is determined by using the following equation: =M^ (5.30) is sought. Note that i f the states and the input are unconstrained in the optimization of (5.11), K z is unbounded and may assume a substantially large value depending on the configuration of the M P C control policy (see Section 5.5). 127 CHAPTER Since QyO, 5 STABILITY UNDER IMPERFECT STATE it is clear from (5.25) in Theorem 5.3 that i f K =0, B MEASUREMENTS V (x ,ii ) H k k is guaranteed to be decreasing with time along the trajectory of the closed-loop system, thereby ensuring asymptotic stability. It is observed from (5.24) that the state estimation error bounding gain K e is poorly governed. According to the established results for stability of M P C (Keerthi and Gilbert, 1988, Rawlings and Muske, 1993, Mayne, et al, 2000, Tang and de Silva, 2005b, 2005c), closed-loop stability can be improved by increasing the prediction horizon H and the terminal weight matrix P 0 . Absolute stability can be achieved with an infinite prediction horizon. However, i n the presence of imperfect state feedback, counter intuitively, increasing H or PQ reduces K , e thereby reducing the stability tolerance to state estimation errors. A trade-off i n the design of the M P C controller is required. The severity of this effect is further explored numerically in the following section. The overall off-line algorithm for determining the stable upper bound of the state estimation error for a given system and parameters of the developed N C S - M P C control strategy is synthesized in Table 5.1. The multiple optimizations of (5.11) to search for K zmax Kg m a x and can be rather computationally intensive. The computing load can be decreased by reducing on the resolution of the search space. 128 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Table 5.1: The algorithm for determining the stable upper bound o f the state estimation error of the developed N C S - M P C control strategy. 1. For a given system model, set Q , JR , P , and H . 2. Calculate J , A 3. Compute the gradients 0 e V * * * V + 1 Z t + 1 and A of the optimization problem (5.11). B ^ W , V and Hessians within (5.14); i.e., X 4 + i c(z t + 1 ),and Zk+ Zk+l H Determine the null space basis tj and find Z and Z . 5. Initialize K 6. Select a state x within the bounded state-space Af. 7. Optimize (5.11) using x to find %* 8. For each x = 0 and K Zk+ k+x V V V (z ). 4. z m a x V c(z ), k+l z = 0. Bmax k k K %*k+i> k+i for i = 0 , . : . , H . determine K = /* z /\x \, k+i k and i f K > K z z m a x , then set =K Z,max z' 9. Repeat the steps 6-8 with a new state x until the entire A? is explored. 10. Select a state x within the bounded state-space A?. 11. Optimize (5.11) using x to find x* 12. Optimize (5.11) using x* 13. Select a state x within the bounded state-space A? : 14. Optimize (5.11) using JC^ to find x* 15. Optimize (5.11) using x* 16. Compute 17. If K > K 18. Repeat the steps 13-17 with a new state x until the entire Af is explored. 19. Repeat the steps 10-18 with a new state x until the entire Af is explored. 20. Compute K k k k k+l k+] from the solution. from step 11 to find {x ,n ). k+x k+x k k+x k+1 B from the solution. from step 1 4 t o f i n d V^(x ,7i ). k+X k+X K =\v^(x ,n )-V*(x ,7t )\/(\\x \\f. B k+x k+x k+x k+x k and \\x f - K (\\x ||) > 0 , then set K , 2 Bmax k Q B k B max = K. B k k e>max with (5.24) using K z m a x and K B m a x . 5.5 Evaluation of Stability Boundaries The stability boundaries of the N C S - M P C control strategy with imperfect state estimation as applied to the electro-hydraulic manipulator system of the fish-processing machine (see Chapter 2) is investigated in this section. The effect of various design parameters, especially the terminal weight matrix and the prediction horizon, on the level of state estimate error that can be tolerated to maintain closed-loop asymptotic stability is evaluated based on the 4-state-l- 129 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS input model of the electro-hydraulic manipulator as given in (2.17). A s i n Section 4.4.2, the weighting matrices are chosen as Q = diag(l, 10,0.001,0.001) and /? = 100. The upper stable bound on state estimation error is evaluated using the developed algorithm (Table 5.1) with various lengths of prediction horizon H and various values of terminal weights P as fractions 0 of the open-loop infinite weight U„. Lyapunov equation U =Q+ Note that is attained by solving the discrete A U„A. T oa A s discussed i n the previous section, the maximum attainable cost evolution bounding gain K B (the higher the better) and the input-state parametric evolution bounding gain K (the z lower the better) depends on the configuration of a particular system and the M P C controller. A s these gains are nonlinearly related to the states, the location where the maximum occurs also varies and has to be searched exhaustively. In addition, the maximum K B must also satisfy the stability condition (5.25). Figure 5.1 shows the variation of the maximum K on the z normalized state plane of the first two estimated states of the system (i.e., position and velocity of the hydraulic piston) while the pressure states are kept at the origin (equilibrium). The length of the prediction horizon is set to H = 5 and the terminal weight matrix is set to P = OSU^. 0 is observed that although the surface of K z is not fully symmetric, the low regions of K z It are concentrated approximately along the x - a x i s while the high regions are along the jq-axis. 2 This is because the system is quite sensitive to variations i n Jcj but less sensitive to variations i n x. 2 Figure 5.2 shows the variation of the maximum and stable K B on the normalized state plane of the first two states of the system with the pressure states fixed at the origin. The settings are identical to those in Figure 5.1. It is observed that the maximum and stable K B does not vary with the location of the states but rather depends on the parameters of the M P C controller; i.e., A , B , Q , R , P , and H . 0 Figure 5.3(a) shows the maximum tolerable state estimation error (norm of the state vector) K e in order to maintain closed-loop asymptotic stability under different settings of P Q prediction horizon values up to 10 steps. The values of Z x respectively. A t P = 0 . 0 1 £ / 0 r o and H=\, K e and Z z and i n (5.14) are 3.34 and 10.77, is approximately 0.012, which means that i n order for the system to remain stable, the norm of the state estimation error \x k+] - x 1| k+1 must 130 CHAPTER 5 STABILITY UNDER IMPERFECT not exceed 1.2% of the norm of the current state STATE MEASUREMENTS Note that this percentage is given relative to a normalized system and the norm of the combined states. If the velocity and the two pressures of the cylinder are measured perfectly, then the maximum tolerable error in the position of the piston is 0.6 mm. The error tolerance decreases with the increase i n P and 0 more rapidly with the length of the prediction horizon, which is mainly due to the exponential increase i n K , as shown i n Figure 5.3(c). The surge in K z z can be effectively controlled by imposing state and input constraints on the M P C control law, which w i l l also result in tighter bounds for Z and Z , x z thereby increasing K . e Figure 5.3(b) shows that K B remains approximately at 1, independent of P , at shorter prediction horizon. Fluctuations of K 0 are B observed for longer prediction horizons because future state predictions within the M P C policy are governed by the system model (see (4.11) in Section 4.2.1). When the prediction is moved farther into the future, the state evolution diverges further from the initial state x k causing the optimization of the M P C problem to be more sensitive. It is found that the 4-state model of the electro-hydraulic manipulator system is itself too "sensitive" to state variations. This is mainly due to the fact that the states corresponding to the pressures of the cylinder are not directly controllable. B y reducing the order to a 2-state model with position and velocity state feedback; i.e., A = 1.06730 -0.10423" -0.02484 0.89404 and B = "0.00138" 0.01027 and keeping the controller settings as before, a higher stability tolerance of the state estimation error is achieved. This is shown in Figure 5.4(a). A s can be observed from Figure 5.4(b), K B is reduced only by a small margin to approximately 0.52, with less fluctuations at a longer prediction horizon. M o r e importantly, K z effect from P as the prediction horizon is increased, as shown i n Figure 5.4(c). The reverse 0 effect from P is substantially reduced with a desirable reverse 0 is desirable because for asymptotic stability, the developed future input buffering N C S technique (see Chapter 4) requires a sufficiently large P and a sufficiently long Q prediction horizon. 131 CHAPTER 5 STABILITY UNDER IMPERFECT 1 Figure 5.2: x =x =0 3 4 MEASUREMENTS -1 Variation of the maximum K B under a prediction horizon STATE on the state plane of x x H =5 r and a terminal weight 2 with matrix 132 CHAPTER Figure 5.3: The effect of P 0 5 and H STABILITY UNDER IMPERFECT MEASUREMENTS on stability based on the original model, (a) M a x i m u m bound of K ; (b) M a x i m u m bound of K ; of K. e STATE B and (c) M a x i m u m bound z 133 CHAPTER Figure 5.4: The effects of P 0 5 STABILITY UNDER IMPERFECT MEASUREMENTS and H on stability based on the reduced model of the system, (a) M a x i m u m bound of K ; (b) M a x i m u m bound of K ; e bound of STATE B and (c) M a x i m u m K. z 134 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS 5.6 Extension to MPC with Inequality Constraints The upper bound of the state estimation error that can be tolerated i n order to maintain closed-loop asymptotic stability of the developed N C S - M P C control strategy, may be improved by imposing state and input inequality constraints to the M P C optimization problem of (5.2) or equivalently (5.11). The analysis of the sensitivity of the state estimation errors, as carried out in Section 5.3 is only feasible for cases with equality constraints. A difficulty arises when inequality constraints have to be imposed i n the sensitivity analysis. A n iterative, multi- shooting optimization method is required to continuously adapt to conditions o f active and inactive constraints. Alternatively, it is possible to convert all the inequality constraints into equivalent equality constraints and carry out the sensitivity analysis as before. One approach for converting inequality constraints into equality constraints is to introduce slack variables (Evtushenko and Zhadan, 1994). Consider the general constrained M P C optimization problem with i equality constraints and j inequality constraints, as given by: minimize V (z ) H k (5.31) s.t. c (z ) = O andcj-(z )<0j s k i k In order to convert Cj (z ) < Oj to equality constraints, an additional (slack) variable vector k peR j is introduced first and then all the constraints are combined to transform (5.31) into the following equivalent problem: minimize V (z ,p) H k (5.32) s(z ) c s.t. &(z ,p) = k k ••0 Cz(.z ) + p i+j and p>0j k In order to take into account the constraint P>0j, use a differential mapping A4: W —>R J and make the space transformation p = M(p) where /> e IR- . Let M 7 p matrix of the mapping M(p) defined, the J (p) = M(p)\- Jacobian a eR =M(p) jxj + be the square Jacobian with respect to p. Assuming that the inverse~p= M(p) is and Gram matrices and G (p)=J (p)J (p)s m a T a are R . jxj obtained, respectively, as Combining the variables and the constraints for the reduced problem o f (5.32), the following equivalent problem with equality constraints only is obtained: 135 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS V (z ,p,p) minimize k H S.t. 0(z ,p,p) = k Cj{z ) + M(p) k Another way of introducing slack variables is to let that variable be squared; i.e., p e R 2 j to remove the above-mentioned non-negativeness condition, so that the equivalent optimization problem is given as: minimize V (z ) H k 2 s.t. c (z ) = 0, and c (z ) + p*= Oj £ k T (5-34) k However, additional Karush-Kuhn-Tucker optimality conditions have to be considered since the new Lagrangian becomes £{z,X) = V (z)-ACF(Z) H where cAz)- . They are c (z) + p 2 T V £(z,X) z = 0 , V £(z,k) p = 0, V £(z,A) x = 0 and c^{z)=0. Another possible alternative of transforming inequality constraints into equality constraints without the use of slack variables is to replace c (z )<0j T k with minjc^(z ),0} k =0j, assuming c (z ) T k is continuously differentiable (Gockenbach, 2003). 5.7 Summary This chapter investigated the effect of imperfect state measurements on the closed-loop asymptotical stability of the N C S - M P C strategy as developed i n the previous chapters. The maximum deviation of the estimated state from the actual state that can be tolerated by the system to maintain stablity was derived by utilizing Lyapunov's second method and the concept of sensitivity analysis of the underlying optimization problem of the M P C control policy. The stability boundaries subjected to different configurations of the N C S - M P C control strategy was evaluated numerically on the electro-hydraulic manipulator of the fish-processing machine. The developed stability theorem provides a useful and binding design criterion for further development of robust state observers to compensate for network transmission problems between sensors and the controller. 136 Chapter 6 Infrastructure for Web-based Remote System Monitoring In the previous chapters, various issues of data transmission for feedback control of a networked system have been resolved thorough analysis, computer simulation, and experimentation. In this context a novel control strategy based on constrained M o d e l Predictive Control with future input buffering and long-range estimators has been developed and implemented. The functionality of a large-scale networked system can be further enhanced by incorporating higher layers having monitoring, diagnostic and supervisory capabilities. A s an important contribution in this direction, the present chapter gives a framework for developing a universal and scalable network infrastructure for web-based monitoring and supervisory control of dynamic systems. Practical implementation of this framework is detailed, using a low cost and flexible two-tier client-server architecture, where a user is able to remotely carry out a variety of tasks including system operation, experimentation, system monitoring and supervision, task scheduling, system reconfiguration, control, and safety/emergency routines, through a web-browser interface. A single web-server provides smooth information flow using a robust and intelligent scheduling scheme. Techniques of web-based monitoring and supervision w i l l be subjected by and large to the same critical data transmission problems as for feedback control, which degrade the performance of the system. However, these issues w i l l not be addressed in the present thesis but left for possible future work. Section 6.1 gives an overview of the intended application of the developed web-based remote monitoring infrastructure. The interconnection and implementation of networking hardware are discussed in Section 6.2. Section 6.3 details the software development for the system architecture, which includes the various servers, data flow management, user scheduling and authentication, and remote graphical interface. Section 6.4 demonstrates the applicability of the approach using the industrial fish-processing machine (see Chapter 2). 137 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING 6.1 Infrastructure Overview The application framework of the research presented in this thesis focuses on the development of a universal network architecture, including both hardware and software, which can be used for web-based monitoring and supervisory control of industrial production facilities and for use in research and academic environments. In particular, the developed technology is implemented to establish a web-based research infrastructure between several collaborating research institutions under the umbrella of the N U S / U B C Applied Science Research Centre (www.researchcentre.apsc.ubc.ca), which w i l l create a working model to carry out full scale trail runs. The initial collaborators are the Faculty of Applied Science at the University of British Columbia and the faculties of Engineering and Science at the National University of Singapore, particularly in conjunction with the departments of Electrical and Computer Engineering and Mechanical Engineering, and their respective industrial partners and research institutes. A conceptual structure of collaboration is depicted in Figure 6.1. This arrangement Singapore Institute of Manufacturing Technology, Singapore The National University of Singapore, Singapore Riih.il 2 Faculty of Applied Science The University of British Columbia, Canada Ugend: VPS: Vinmi Proj=a sniipn Figure 6.1: The general infrastructure for collaboration among different research institutions. 138 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING w i l l allow authorized researchers and students to access laboratory equipment located at any of the university departments or organizations, through Virtual Project Stations ( V P S ) . A V P S is basically a workstation with network (or modem) connection and a web-browser installed in it. It can access an experimental setup (or, industrial machine) for a variety of purposes such as performance monitoring, supervisory control, execution of pre-programmed experiments, and manually changing the system states (i.e., virtual pushing of system buttons). When low-level control laws and a higher supervisory level of a system have to be executed from a V P S , it w i l l be necessary to download, compile and run a set of dedicated program codes on the V P S . For example, in (Overstreet and Tzes, 1999) the controller is compiled as a D L L (Dynamic Linked Library). 6.2 Hardware Networking An objective of the current application is to utilize existing computer network technologies, which are cost effective and widely available in most corporate and educational institutions, to implement the developed infrastructure (Figure 6.1). The infrastructure is designed to perform optimally with a Fast Ethernet (100Base-T) backbone where each network Remote Workstation Control Server Process 1: Industrial Robot Web-Server VideoStreaming Server Process 2: Fish Processing Machine Camera (Pan/Tilt/ Zoom) + Microphone Figure 6.2: Simplified hardware architecture for web-based remote monitoring and supervisory control of a system. 139 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING device only needs a low cost Network Interface Card (NIC). Figure 6.2 shows a simplified hardware architecture, which is connected to two industrial systems or experimental setups (a fish-processing machine and an industrial robot). Each setup is directly connected to its individual control server, which handles basic networked communication between the system and the web-server, data acquisition, sending of control signals to the system, and the execution of low level control laws. Each control server contains one or more data acquisition boards, which have analog-to-digital conversion ( A D C ) , digital-to-analog conversion ( D A C ) , digital I/O capabilities, and frame grabbers for image processing. In this two-tier client-server architecture, the web-server provides secured single point access to all the systems within an establishment. A l l the control servers are setup such that they can communicate with only the web-server. A n y data received by a control server, which are not transmitted from the webserver, w i l l be ignored. Video cameras and microphones are located at strategic locations to capture live audio and video signals allowing the remote user to view and listen to a system facility, and to communicate with local research personnel. The camera selected in the present application is the Panasonic Model K X D P 7 0 2 color camera with built-in pan, tilt and 21x zoom, which can be controlled through a standard RS-232C communication protocol. Multiple cameras can be daisy-chained to the video-streaming server. For capturing and encoding the audio-video ( A V ) feed from a camera, the Winnov Videum 1000 P C I board is installed in the video-streaming server. It can capture video signals at a maximum resolution of 6 4 0 x 4 8 0 at 30 fps, with a hardware compression that significantly reduces the computational overheads of the videostreaming server. Each A V capture board can support only one A V input; hence, multiple boards have to be installed. 6.3 Client-Server Software Architecture Figure 6.3 shows the interaction of the system components and associated information flow. The control servers may run different types of operating systems. In particular, the control server of the fish-processing machine (Figure 6.2) runs Microsoft Windows N T 4.0 with Service Pack 6. In order to facilitate real-time processing and control in this NT-based system, Venturcom's R T X (Real-Time extension) software is installed on the control server, allowing direct access to legacy data acquisition boards. This provides high-performance, deterministic, real-time and non-real-time processing within the control server. The web-server runs on 140 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED LOCAL (LAN) REMOTE SYSTEM 'INTERNET! MONITORING REMOTE Java-enabled Web-browser WEB-SERVER REMOTE WORKSTATION C O N T R O L SERVER D Inst. Driver Main Control Program Apache H T T P Server (HTML/CGI/ Java Applets) c •a O — |s A \ ITCP/UDP; Client / , Middle Server Database \ " ~ o U Camera Control Server B U S (RS232) Data Acquisition/DSP Hardware Audio and NTSC video input from cameras "1 Physical System (Sensors & Actuators) Stand Alone C/C++ Programs Video 4> Capture and Encoder (Viduem MPEG MJPEG H-s6ri 1(HX>) VIDEO-STREAMING SERVER Figure 6.3: System component interaction and information flow. Microsoft Windows 2000 Professional operating system with open-source Apache H T T P Server supporting P e r l / C G I (Common Gateway Interface) and l a v a ™ Applets (Deitel and Deitel, 1999). Microsoft Windows 2000 Professional is used as well on the video-streaming server in view of specific requirements of the A V capture device. The control server handles data acquisition and low-level control. It sends data and receives commands from the web-server through an Ethernet network. Up-to-date system responses and states are transmitted in real time to the web-server. A l l external communications with a remote V P S are handled by the web-server. This two-tier structure is similar to the Double Client-Server Structure proposed in ( K o , et al, 2001). M a n y advantages can be gained by using such a configuration. In particular, since individual web servers running on each 141 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING system (on the control server) are not required, this will free up processing power for high bandwidth control computations, thereby increasing the performance of the control server. O n the other hand, the web-server requires a significant amount of processor overhead. A s indicated earlier, it is possible to run a different operating system on each control server depending on the particular application. The overall security and user accesses can be better managed by using a single web-server allowing only single point access. A s needed depending on the type of service that is requested, both U D P (User Datagram Protocol) and T C P (Transmission Control Protocol) are implemented for client-server communication. T C P guarantees a reliable bi-directional transfer of data. If a data packet is delayed or damaged, it w i l l effectively stop traffic until either the original data packets or the backup data packets arrive. Hence, T C P is used during monitoring and when experiments are performed. However, when real-time controllers are executed remotely, a high rate of data transfer is required without creating extra overheads in the transmission. This is achieved using U D P , which ensures a more consistent sampling rate with reduced fluctuations (Munir and Brook, 2001). Referring to Figure 6.3, the web-server contains three main programs; specifically, the H T T P server with embedded C G I modules and Java™ Applets; the middle server, which is mainly responsible for scheduling the communication data between the users and the control servers; and the camera control server, which moves the physical orientation of the cameras according the user commands. 6.3.1 The HTTP Server and User Authentication The H T T P server is the main access portal to all the systems in a particular facility. It provides the main webpage for the user to log on to the facility and then to the particular system of interest. User authentication is of utmost importance in a typical establishment in order to ensure that only authorized personnel can access a specific equipment or system. Different levels of access have to be available because different modes of operation are required. The lowest level of access would correspond to a guest who is only allowed to view the live A V streams without access to the functionality of any laboratory/system equipment. The second level of access is for normal users who are allowed to conduct manually preprogrammed experiments. Only one user is allowed to conduct an experiment at a given time, and the other users who are logged on to the same experiment w i l l only be able to monitor 142 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING the system data, and initiate discussions on the white board. A higher level of security access is required for implementing new control laws either locally or remotely. In the present setup, user access is controlled by utilizing C G I user authentication scripts (uncompiled programs) written in Perl scripting language. A user is required to log on with a pre-registered username and password. This is cross-checked with the user database and the proper level of access is granted to the requesting user. The corresponding user interface in the form of J a v a ™ applets (see Section 6.3.4) is then transferred to the user's web-browser ( V P S ) for display and subsequent interaction. The entire history of user access is logged for purposes of activity tracking. Information on active users, identified through their unique Internet Protocol ID, with their corresponding levels of access, is particularly stored for usage scheduling and data flow management by the middle server, as discussed in the next section. C G I scripting is also used for allowing the users to upload specific files to the server, which w i l l then be forwarded to the intended control server for execution. These files w i l l include such information as, details of the system configuration, desired trajectories that have be tracked by the system, and control laws such as the rule base of a fuzzy controller. Clearly, these files have to be in a pre-specified format or protocol so that the intended system w i l l not be damaged due to incorrect reading of the details in the files. In order to safeguard against improper file generation by the user, a file evaluation parser is incorporated to validate incoming files. 6.3.2 User Scheduling and Data Flow Management The middle server is implemented in modules with each module dedicated to a specific system. It is programmed in C++ programming language using a standard networking A P I (Application Program Interface). The main purpose of the middle server is to act as a strict "mediator" between the user (Java™ applet interface) and a system (control server) unifying Table 6.1: The types of messages for communication between the middle server and the control server. Message ID Description 11 Middle server requests parameter changes 12 Middle server requests main state changes 13 Middle server requests control server to start sending data 143 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING access control and keeping unnecessary computational load from the control server. A list of active users is kept in the middle server. Since only one authorized user is allowed to change the parameters of a system at a given time, the middle server is responsible for granting this access and keeping track of the duration for which the particular user is allowed to be in control. The middle server also manages the data flow between the user and the systems. Table 6.1 gives the three basic message types with their corresponding message identification string between the middle server and the control server. In the communication between the middle server and the control server, the middle server acts as a client. N o authentication is required for the message exchange between these two servers. This is true because both servers are fully under the control of the designer, and the control server only accepts data from the middle server, which resides on a unique IP and port number. In addition, the message structure is kept confidential (see Section 6.4 for the custom message structure used in the fish-processing machine.) The details of the message types of Table 6.1 are given below: • Middle server requests parameter changes (ID-11). When the message receiver at the control server receives this request from the middle server, it updates with these new values the local variables that are stored in a shared memory area. These parameters include the various parameters/gains of the implemented controllers, reference trajectories, and the instantaneous set points, should the system be manipulated manually by the user. • Middle server requests main state changes (ID-12). Upon receiving this request from the middle server, the control server is triggered to change the main states of the system. Some of the more common states among different systems are the main power to devices such as motors, pumps and conveyors (switched through a digital power relay circuitry); start or stop trigger for running some tasks; triggering a reset in counters or axis homing; and triggering of different controller modes. • Middle server requests control server to start sending data (ID-13). This request is made as the first user is logged on, when the particular system is first in the idle state. Then the control server starts sending system monitoring data to the middle server at the requested time interval. The data updates will in turn be sent to the appropriate V P S . The different types of message exchange between the user interface applet (as a client) and the middle server are given in Table 6.2. A s the behavior of a user is unpredictable, it is important to impose additional precautions in mediating the communication between a user and 144 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING Table 6.2: The types of messages for communication between the middle server and the user interface applet. Message ID Description 101 Client requests connection 102 Client acknowledges connection request approval 103 Client requests parameter changes 104 Client requests disconnection 105 Client requests main state changes 106 Client sends keep-alive flag 201 Middle server approves connection request 202 Middle server confirms parameter change 203 Middle server forwards system updates 204 Middle server confirms disconnection from client 205 Middle server assigns superuser status to client 401 Middle server denies connection request 402 Middle server denies parameter change request the system of interest. The main message types implemented in the present work are discussed below: • Client requests connection (ID-101). When this request is received by the middle server, it first determines the level of access which the requesting V P S client is granted, by cross checking with the active user list from the C G I user authentication scripts. If the user has the highest level of access and i f there is no other active user of the same access level for the particular system, the user is granted the superuser status permitting full control of the system. The user is sent a unique identification string for use in subsequent communications and then is put on a temporary list, waiting for acknowledgement. Similar action is taken if there is already a superuser connected to the system or i f the requesting client has a lower level of access, except a randomly generated unique identification string is sent to the V P S . If the total number of preset clients is already logged on to the system, the requesting client w i l l be rejected with a warning message appearing on the client's V P S . • Client acknowledges connection request approval (ID-102). When a client V P S sends 145 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING an acknowledgement of its connection request, the middle server first checks the client's identification string and IP with the temporary list to avoid any ill-intentioned client from trying to bypass the initial user authentication step. When the authenticity o f a client is established, the client w i l l be taken off the temporary list and added to the active client database. Then, the middle server will request the control server to start sending system monitoring data (with message LD-13) i f the control server is not already doing so. The frequency in which the data is updated to the client can be set by the requesting client or be made adaptive according to the current Internet congestion level. Client requests parameter changes (ID-103). Upon receiving this request from the client, the middle server determines i f the requesting client has the superuser status. If affirmative, the request will be forwarded to the control server with message type ID-11. A similar request from any other user type w i l l be rejected and a request denial message w i l l be sent to the client with the message type ID-401. Client requests disconnection (ID-104). A client disconnecting from the system has to be removed from the client database and its place is made available to a new client. If the disconnecting client is a superuser and there exist other user(s) with the same level of access, the "oldest" user will be promoted to the superuser status and sent the unique superuser identification string triggering the user's V P S to enable system manipulation interfaces. The client database in the middle server is then updated accordingly. If the requesting client is the only client for the particular system, the middle server will notify the control server to stop sending data updates. Client requests main state changes (ID-105). This request precedes the message type LD12 given above. The middle server verifies the user status and i f the user has the highest level of access it forwards the request to the control server. Client sends keep-alive flag (ID-106). In order to prevent cases where a client connection is unintentionally lost, for example, due to crashing o f the V P S or an unforeseen fault in the client's communication network, the V P S of each client automatically sends a message with a keep-alive flag, to the middle server at a pre-specified interval. A countdown timer is maintained for each active client connection in the middle server. Each countdown timer w i l l be reset to a preset value (1 minute in the present implementation) upon receiving a keep-alive message from the corresponding client. The client will be removed from the client database i f the corresponding timer lapses. There is 146 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING also the possibility of a user becoming idle over a long period of time. This hogs the available connection space as well as the data transmission bandwidth. This can be avoided by implementing a countdown timer at the V P S and requiring the user to depress a refresh button to maintain an uninterrupted session. • Middle server approves connection request (ID-201). This message is sent by the middle server upon receiving a positive client request (through message ID-101). In return, the client acknowledges the approval in this tried-and-true three way handshake. The system manipulation interface on the client's V P S is enabled i f it is granted the superuser status. • Middle server confirms parameter changes (ID-202). A n authorized user invoking changes in the system parameters is given confirmation, once accomplished, by the middle server in the form of visual feedback on the status window in the user's V P S . • Middle server forwards system updates (ID-203). Upon receiving periodic data updates from a particular system, the middle server forwards the data to the corresponding set of active clients. When the client's V P S receives this message, the textual and graphical interfaces are updated accordingly. • Middle server confirms disconnection from client (ID-204). Whenever a client "properly" disconnects from a system, whether manually or automatically through the J a v a ™ applet destruction sequence, a disconnection request is sent to the middle server. After receiving the confirmation, the user's V P S applet will be safely terminated, particularly freeing up memory and destroying all opened network sockets. • Middle server assigns superuser status to client (ID-205). When a client is notified that its usage status has been upgraded to superuser, the client's V P S will automatically store the newly received identification string for subsequent communication and w i l l enable the system manipulation interface. • Middle server denies connection request (ID-401). This message notifies a requesting user to try again later because the server is busy or the user quota has been filled. • Middle server denies parameter change request (ID-402). Users without the appropriate access level are denied their request to change the parameters of a system. The message types mentioned above are embedded within two fixed message structures for communication between the users' V P S and the middle server, and between the middle server and the control server of a particular system. These message structures are formed differently with different packet sizes depending on the configuration of a particular system. The message 147 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING structures implemented for the fish-processing machine are discussed in Section 6.4. 6.3.3 Camera Control Server For security purposes, Java™ applet technology prohibits a client applet from communicating with any network device other than the network device (web-server) which the applet is retrieved from. Consequently, in order to manipulate the video cameras (pan, tilt and zoom) from the V P S sites of the users, the camera control server has to be implemented on the web-server computer, as indicated in Figure 6.3. Coded in the C++ programming language, the camera control server manages camera motion commands as requested by authorized users. A s the video cameras are physically connected to the computer through R S - 2 3 2 C communication links (serial ports), the camera control server interprets a client's request and sends the appropriate motion control signal to the intended camera. Table 6.3 summarizes the available commands for camera motion. Table 6.3: The command strings for camera manipulation. Command 6.3.4 Description 0x07 Auto focus mode 0x08 Manual focus mode 0x20 Pan camera to the left 0x21 Pan camera to the right 0x22 Tilt camera up 0x23 Tilt camera down 0x24 Move zooming lens to wide 0x25 Move zooming lens to telephoto 0x26 Move focusing lens to far 0x27 Move focusing lens to near 0x39 Move the camera to home position The User Interface Client The scalability, portability, and platform independence of J a v a ™ allow remote monitoring and control applications, in the form of applets, to run on any web-browser, eliminating the need to develop custom communicating software (Weaver and Zhang, 1999). The 148 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING communication between the web-server and a remote V P S is achieved by using J a v a ™ , whose programs are compiled to platform-independent codes, and dispersed on the web-server as J a v a ™ applets. When a user is logged on to the web-server through a V P S , the J a v a ™ applets are automatically loaded into the V P S (client), and a temporary communication socket is created between the V P S and the web-server. This client-server communication is established for the entire session until the user logs out or the network connection is terminated. User-' interface applets are designed based on the intended operation of a particular system and varies from one system to another. Section 6.4 describes the user interface applet that is implemented on the fish-processing machine. Stand alone C/C++ programs are also used in some highly specific operation modes of a particular system. Examples include the implementation of remote, time-critical, low-level control algorithm, or custom supervisory controllers. These programs have very specific functions and can only be implemented by administrators of the system who possess a detailed internal knowledge of the developed infrastructure, particularly, the communication protocols, the electrical hardware (sensors, actuators, etc.), and the functional bandwidth of the system. 6.3.5 Audio and Video Feedback Section 6.2 introduced the use of color cameras and microphones, which are connected to audio-visual ( A V ) capturing boards. These input devices are installed in the video-streaming server to provide live audio and video feedback to the V P S (see Figure 6.3). T w o popular commercial solutions are RealSystem Server Professional by RealNetworks (RealNetworks, Inc.) and Windows M e d i a Services by Microsoft Windows M e d i a Technologies (Microsoft Corp.). However, these two solutions incur a significant delay (approximately 20 seconds) from live to view due to their buffering and intelligent transmission features. Hence, in line with the objective of platform independency, the current implementation has adopted J a v a ™ M e d i a Framework by Sun (Sun Microsystem, Inc.) to provide A V streaming to the Internet. It uses Real-Time Protocol (RTP) to transmit live A V feeds, resulting in minimal latency (live to view in less than 1 second) and low utilization of the transmission bandwidth. J a v a ™ M e d i a Framework can be easily embedded in Java™ applets, and it provides the option to distribute the A V streams through multicasting, unicasting or video conferencing modes. J a v a ™ M e d i a Framework can also work together with Darwin Streaming Server, an open source streaming solution from Apple Computer, Inc., to broadcast A V streams to the Internet. 149 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING 6.4 A Practical Demonstration The remote web-based monitoring technology as well, which is developed in the present work, is implemented and tested on the industrial fish-processing machine (see Chapter 2). For this particular 2-axis test system, the communication message structures between the control server and the middle layer are formed using ( u n s i g n e d ) s h o r t (2 bytes), ( u n s i g n e d ) l o n g (4 bytes) and f l o a t (4 bytes) variable types. The message structure that is transmitted from the control server to the middle server has a size of 120 bytes and is constructed as follows: typedef struct k_sample; // sample short endAll; // terminate short controlMode; // current short powerOn; // power short conveyorOn; // conveyor startState; 7/ task run data packet unsigned short } { long . // time step execution control flag mode on-off state on-off state state short padding; float KpX, KiX, KdX;// PID gains for the X-axis float KpY, KiY, KdY;// PID gains for the Y-axis float ykX, ykY; // measured position float ymkX, // reference model float rkX, // interpolated float rspX, // position float ukX, // control II Gain settings II each axis ymkY; rkY; rspY; ukY; for a model-referenced (see Chapter byte padding outputs position quintic set-points input fuzzy outputs trajectory for each points axis currents controller for 7): float MRFCgeX, MRFCgdeX, MRFCguX; float MRFCgeY, MRFCgdeY, MRFCguY; float paX, paY; // head-side float pbX, pbY; // rod-side cylinder cylinder pressures pressures MESSAGE_FROM_CONTROL_SERVER_TO_MIDDLE_SERVER; The message request structure from the middle server to the control server is 76 bytes in size and is composed of: typedef struct unsigned { short msgType; // message short startState; // task run short endALL; // halt operation type identifier trigger trigger 150 CHAPTER 6 } INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING short reset; // reset short controlMode; // set short powerOn; // power short conveyorOn; // conveyor short manualMode; // manual short remoteRequest;// trigger short remoteRequestlnterval;// float KpX, K i X , K d X ; / / PID gains for the X-axis float KpY, K i Y , K d Y ; / / PID gains for the Y-axis II Gain settings II each axis for trigger control on-off trigger on-off trigger manipulation for trigger staring data a model-referenced (see Chapter mode data stream streaming fuzzy rate controller for 7): float MRFCgeX, MRFCgdeX, MRFCguX; float MRFCgeY, MRFCgdeY, MRFCguY; float rspX, rspY; // position set-points for each axis MESSAGE_FROM_MIDDLE_SERVER_TO_CONTROL_SERVER; For the communication between the middle server and the V P S units of the clients, the message structures contain variables of type s h o r t and l o n g ( i n t in Java). Variables from the control server with significant decimal values are scaled accordingly to type s h o r t to compensate for the different byte ordering methods used in J a v a ™ and C/C++ languages. The size of the message structure for sending information to a remote V P S is 74 bytes. The message structure is formed as follows: typedef struct { short msgType; // message short clientID; // client short powerOn; // power short conveyorOn; // conveyor short startState; // task short controlMode; // current control'mode short KpX, KiX, KdX;// PID gains for the X-axis short KpY, KiY, KdY;// PID gains for the Y-axis short rspX, short rkX, short type identification on-off position rkY; // current ykX, ykY; // measured short ukX, ukY; // control short paX, paY; // head-side short pbX, pbY; // rod-side II Gain settings for a model-referenced string state on-off run // rspY; identifier state state set points trajectory points position response input currents cylinder cylinder fuzzy pressures pressures controller for 151 CHAPTER 6 II axis (see Chapter MRFCgeX, MRFCgdeX, MRFCguX; short MRFCgeY, MRFCgdeY, MRFCguY; // performance attributes overshoot, and (rise-time, steady-state short perf_rt, long k_sample; MONITORING 7): short II } each INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM settling-time, error) perf_st, // perf_os, current perf_of; sample time step MESSAGE_FROM_MIDDLE_SERVER_TO_REMOTE_VPS; The performance attributes for the model-referenced adaptive controllers as w i l l be discussed in the next chapter are computed at the middle server. The message structure that is formed by the V P S for requesting changes through the middle server having 44 bytes each is as follows: typedef } struct { short msgType; // message short clientID; // short powerOn; / / power short conveyorOn; // conveyor short startState; // task short controlMode; // control short manualMode; / / manual short padding; // short rspX, // position short KpX, KiX, KdX;// PID parameters for the X-axis short KpY, KiY, KdY;// PID parameters for the Y-axis II Gain settings II each axis rspY; client data for a model-referenced (see Chapter type identifier identification on-off trigger on-off run string trigger trigger mode trigger manipulation packet byte padding set-points fuzzy trigger for controller each for 7) short MRFCgeX, MRFCgdeX, MRFCguX; short MRFCgeY, MRFCgdeY, MRFCguY; MES S A G E _ F R O M _ R E M O T E _ V P S _ T 0 _ M I D D L E _ S E R V E R ; Figure 6.4 shows the developed Java™ interface applet on the V P S of the Intelligent Iron Butcher. The buttons for connection to the system and changing the main states of the system; specifically, the power trigger, the conveyor trigger, the task run trigger, and the task stop trigger, are located in the upper region. The left pane displays the performance attributes of the system and the radio buttons for changing the controller modes. Five controller modes are implemented; namely, P I D servo, P I D under supervision of Model-Referenced Fuzzy Control ( M R F C ) , PLD under supervision of Model-Referenced Adaptive Control ( M R A F C ) , intelligent auto-switching of adaptive controllers, and Generalized Predictive Control ( G P C ) . The 152 CHAPTER 6 INFRASTRUCTURE 'H HTML Test Page - Microsoft Internet Explorer File Edit View Favorites Tools Help J j] dSj FOR WEB-BASED REMOTE SYSTEM MONITORING j Address f7JhUp://arnac mech.ubc.ca/cgi-bin/protect pl?file=ircj Virtual Project Station Iron Butcher PowerOn* Conveyor Of j Run Stop •Performance Rise-time Disconnect | Response i Pressure { fc•civ- PmwaM Irymt iwi-. PnsmM h^mt 1.5 - Settling-time l- 5.5 Overshoot e.o / "a Offset 1.0 jjjS,8- i i i •Controler Mode— SKtiftfcSttUftOutput % PID I PIDM - RFC i PIDM - RAFC O Auto-Switch I a :1 " U G PC : i i i Time [second*] i I I -. -i l tt i i -Mo i 1 1 4ao 1 1 1 1 KM) Hm* fseooixt*] 1 1 M,0 1 i S10 MJO Tim* | • i> i. | i i WO i mo 1 MO axi; Pm^-uit* Output Ig2 _ sa— £ 1/ s *> s> 8- Ag- § 8%- i soo i I sr.o Manual PID MRFC MRAFC GPC Trajectory K Position ¥ Position 1 a w 11 MO 1 ~i WO s A 4 Jm m mm «0 i KO ; Manual :|?Conveyor ON ^Process running... Applet TestApplet started lip Internet Figure 6.4: User interface applet for the Intelligent Iron Butcher. development of the remote supervisory controllers is presented i n Chapter 7. The center-right region o f the applet is reserved for graphical displays. The user w i l l be able to tab between different views such as the implemented position responses and pressure responses. Additional graphical information; for example, the planar motion o f the manipulator, or the block diagrams, can be easily added to this region. The lower region contains tabbed panes for manipulating the parameters of the system. They include manually moving the manipulator, changing the parameters of the P I D , M R F C , M R A F C , and G P C controllers, and uploading and 153 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING running custom trajectories. The lowest region of the interface applets is reserved for providing text response for the user. 6.5 Summary Practical methodology for developing a network infrastructure for remote web-based monitoring and intelligent supervisory control of a physical system was presented in this chapter. The procedure included the identification of the line of hardware components as required to establish the interconnectivity between a web-server, a video-streaming server, cameras, microphones, control servers, and the physical machineries or systems. The application software, which has been either adopted or developed in house for the multi-level client-server communication structure between various local hardware components and remote virtual project stations, was described. The industrial fish-processing machine described in Chapter 2 was used as an application example, representing the system to be monitored and controlled. Such implementations are equally useful in industrial facilities, research facilities, and academic laboratories for remote testing and experimentation. 154 Chapter 7 Remote Supervisory Control Systems The flexibility and modularity of the network architecture, which was developed in the previous chapter, form the rationale for incorporation of a multi-layered intelligent supervisory control structure with the objective of on-line improvement of the performance of a remote plant. The scheme, as developed in the present chapter, integrates a supervisor into the remote plant, and the supervisor employs knowledge-based decision making to continuously monitor the performance of the plant. The performance metrics deduced from observation of the plant response under controlled conditions are then used to infer the best adaptive controller for the plant under an existing condition. A knowledge-based system that incorporates both human expertise and analytical knowledge regarding the plant and the controllers is developed. A client-server supervisory control architecture for networked-assisted controller switching for the remote plant is developed. Switching has to be done in such a manner that the transition from one controller to another takes place in a smooth manner. Proper design of the intelligent switching system is a key to achieving this objective. A full-scale implementation of the developed approach is made on the industrial fish-processing machine (see Chapter 2), which is the experimental platform for this thesis, and is used to demonstrate the application of the developed system in an industrial environment for system monitoring and supervisory control. In this chapter, first the development of the distributed client-server supervisory control architecture is presented. Specifically, Section 7.1 introduces the intelligent hierarchical control architecture of the industrial fish-processing machine. The newly developed distributed clientserver supervisory control architecture of the machine is described in Section 7.2. The subsequent two sections discuss the design procedure used to establish two knowledge-based model-referenced adaptive controllers. A n intelligent switching strategy to maintain optimal on-line performance of the system is developed in Section 7.5. Finally, experimental case studies are presented to evaluate the performance of the developed strategy. • 155 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS 7.1 Hierarchical Control Architecture A networked control configuration can improve the performance, flexibility, and efficiency of an industrial plant or system. The capability of web-based monitoring w i l l allow remote adjustment of the basic operation conditions and parameters (e.g., machine throughput, on-off switching, controller selection, and operation timing) of the system. In view of the network connectivity of the developed web-based monitoring infrastructure (see Chapter 6), particularly for use with a production facility like the fish-processing machine, an intelligent hierarchical structure (de Silva, 1995) as shown in Figure 7.1 can be employed for its monitoring and control. Each level of the system structure can be implemented on one or more networked Material Supply Information Production Demands Expertise J 1' Intelligent Flexible Production System Controller High-level Knowledge Feedback 7^ Workcell-level Information Monitoring/Control Knowledge Base Data Base Intelligent Preprocessors Level UDP/TCP Intermediate-level Information Feedback Workcell Controllers Preprocessing of Sensory Data Context Generation Defuzzification Information Preprocessors Level Parameter Update Tuning Reference Commands Low-level Sensory Feedback — "s^ Network Medium Primary Camera Thickness Sensor Load Sensor Secondary Inspection Camera Conveyor Control Hydraulic Controls Fish Processing Machine Level Figure 7.1: A n intelligent hierarchical structure for monitoring and control of a plant. 156 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS computers, and the communication between different layers may be achieved through an Ethernet backbone. In the present context, each layer is implemented as the server to its succeeding lower layer, and as a client to its preceding upper layer. Referring to Figure 7.1, the component layer of the fish-processing machine, which is the lowest layer, consists of various sensory and actuation components. It also contains low-level feedback controllers for direct or local control using information from the sensory components. The high-resolution information from the sensors is processed at the information preprocessor layer, which is the intermediate layer, to generate context information that can be used by the upper layer (intelligent preprocessor layer). This upper layer includes the workcell controller, which performs higherlevel control tasks than those of the component-level controllers; in particular, component coordination, generation of reference signals to drive the components, downloading of component-task programs, and monitoring the workcell components. A s well, some intelligent control activity w i l l prove useful in this intermediate layer. The context information for the knowledge system of this layer, for both workcell and the intelligent preprocessor, may come from preprocessed sensory information and also from upper layers and the operator interfaces. The intelligent preprocessor is mainly used for presenting compatible low-resolution information (high-level knowledge) for the upper layers of the control hierarchy. The top layer; i.e., the intelligent flexible production system controller, handles such activities like task planning, procedural decomposition, subtask allocation, and overall system monitoring. Its knowledge system may have to deal with qualitative, incomplete, imprecise, or vague information and may encounter unplanned and unfamiliar situations. The fish-processing machine layer, the information preprocessor layer, the intelligent preprocessor layer, and the workcell controllers are shown as control servers in figures 6.1 and 6.2. They can be implemented in a single computer or distributed over several computers. The flexible production system controller is represented as the web-server where it has access to all the information gathered from other lower level systems. Using a remote V P S , an authorized operator or a plant manager can gain access to all the information in the production facility, and w i l l be able to input material-supply information, production demands, supplementary expertise for the intelligent preprocessor, and so on, thereby facilitating improved decision making. In order to take advantage of computationally powerful V P S units for implementing complex control laws, thereby relaxing the computation load of the local control server and also providing the capability of remote intervention by experts, the direct controllers of the 157 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS VIRTUAL PROJECT STATION (Remote Supervisory Control System) N E T W O R K i i Direct Controller Physical System Figure 7.2: Adaptive control of a remote plant through a communication network. components of the fish processing machine can be executed remotely from a V P S , thus closing the feedback loop through a communication network. The local control server and the webserver are required only to transmit real-time sampled sensory data to the V P S , and receive control signals from the V P S to be passed to the system actuators. This approach has been thoroughly investigated in chapters 2 to 5. A n alternative control approach that may be implemented on the developed network infrastructure consists of high-level adaptive controllers running on the V P S units to supervise or optimize the low-level controllers of the components on line, as shown in F i g . 7.2. A distributed client-server supervisory control architecture has been developed and is presented next. 7.2 Distributed Client-Server Supervisory Control Architecture The developed system architecture takes advantage of the common availability of an Ethernet backbone in modern industrial settings to implement a remote supervisory control system for real-time monitoring and control of a process such as the fish-processing machine. Figure 7.3 shows the architecture of the developed networked intelligent client-server supervisory control system. Two discrete-time proportional-integral-derivative (PID) controllers are used for servo-level feedback control. The P I D controllers implemented here are of the velocity-feedback form (Ogata, 1987), as given by the z-transform relation 158 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS ( U(Z- ) = 1 -K Y,U- )+K, 1 /?(;-' )-y ( -') t Z >> (7.1) -K (l- - )Y (z- ) l P D 1 z x where, F ( z ' ) is the system output, U(z ) is the control input, R(z ) is the command l l 5 reference, and K P ,K { , and K D are the controller-gain parameters. In order to reduce the Human Expert MRFC Gains MRAFC Gains Performance Specifier User Interface Display Intelligent Selector 1 • MRAFC Performance Evaluator Clients Attributes Extractor i Network ! i Reference Trajectory T MRFC PID Controllers Primary Vision Module Actuators I L-J I 2L ± Sensors Server Secondary Vision Module Electro-hydraulic Manipulator Figure 7.3: The developed architecture for networked intelligent supervisory control. 159 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS steady-state hunting effect caused by stick-slip friction, which is typically present in hydraulic actuators, a dead-band compensation term is added to (7.1). It is of the form -I a sgn(y f -r), where I = 2.0 m A , y is the position response, and r is the reference input. The servo control a s bandwidth is set at 200 H z , which is sufficient for the relatively slow manipulations that are carried out. The dynamics of the electro-hydraulic manipulator frequently change due to the nonlinear friction in the sliding carriages and wear and tear of the fluid seals. This causes the servo controllers to run out of tune, thereby degrading the system performance. In order to compensate for such unacceptable dynamics, the servo controllers have to be constantly tuned. This may be achieved by either tuning the reference trajectories that are fed into the servo controller (signal adaptation), or tuning the parameters of the servo controllers (parameter adaptation). Referring to Figure 7.3, in the signal adaptive scheme, a Model-Referenced Fuzzy Controller ( M R F C ) is implemented locally outside the servo loop. In order to force the response of the manipulator to a desired reference trajectory, the M R F C uses both the instantaneous tracking error and the change in tracking error, to determine the necessary change in the reference command, which is the input to the P I D controller. This determination is made by using a fuzzy rule base, which is further elaborated in Section 7.3. In the knowledge-based parameter adaptive scheme, the Model-Referenced Adaptive Fuzzy Controller ( M R A F C ) , is used to modify the parameters of the P I D controller; i.e., K/, and K . D K, P Since M R A F C is situated remotely over an Ethernet network, the computational requirement of the local controllers is eased, and some flexibility is provided to introduce or remove additional features to or from the architecture without having to shutdown the plant. The information used by M R A F C is preprocessed by the "attribute extractor" and the "performance evaluator." The attribute extractor extracts the performance attributes from the position response. Six commonly used step input attributes are adopted here. They are rise-time (95%), settling-time (±2%), maximum overshoot, steady-state offset, damped natural frequency, and damping ratio. In the performance evaluator, these attributes are compared with the operator-specified attributes (specified as a "desired" reference model in the performance specifier) to derive the corresponding six deviation indices, which are then used by M R A F C to deduce the required levels of tuning in the P I D parameters. The M R A F C algorithm is further investigated in Section 7.4. 160 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS It is found that although M R F C is capable of achieving near perfect trajectory tracking, it works well when the low-level servo controller is only mildly out-of-tune from the desired dynamics (Tang, et al, 2002a, 2002b). On the other hand, while M R A F C is more appropriate for fast and coarse tuning of servo controllers, with the objective of bringing a severely offtuned controller to converge to a set of pre-specified performance characteristics, it is unable to achieve perfect trajectory tracking. A compromise would be to make use of both M R F C and MRAFC in the supervisory architecture, switching them on and off under appropriate conditions. In the present work, an intelligent selector is developed to switch between M R F C and M R A F C , or to turn both of them off, depending the performance of the servo loop. This intelligent selector uses similar information as M R A F C in its decision making scheme, as discussed in Section 7.5. The intelligent supervisory control scheme is implemented as a client-server architecture. The servo controller, the trajectory generator, and the M R F C are implemented as the server with listening ports for connecting incoming remote clients. The intelligent selector, the M R A F C , the attribute extractor, the performance evaluator, and the human expert interface are implemented as remote client modules. In normal operation, the automated server can run servo controllers without intervention from any remote clients. The plant operator has the option of engaging the remote clients at anytime. System responses as well as critical system states; e.g., performance metrics and production throughput, are readily accessible though an on-line display interface. Basic operator interventions include manually switching between M R F C , M R A F C , and ail-off modes, or engaging the intelligent selector back to automatic operation. A s discussed in the following sections, the inputs and outputs of both M R F C and M R A F C must be normalized or scaled appropriately using pre-specified gains. Additional autonomous supervisors can be incorporated to adaptively modify these gains under real-time operation. However, in the present study, the gains are selected intuitively by the human expert and conditionally scheduled, in order to keep the focus on remote intelligent switching of the adaptive schemes. The performance specifier module allows the operator to set the desired performance attributes and the parameters of the reference model. Here, the reference model is a damped simple oscillator with damping ratio £ and natural frequency Q) , as given by the n transfer function: 161 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Y (s) a% R(s) s + 2^co s + co m where 7 ( ) m 2 (7.2) 2 n n is the output of the reference model. For implementation, (7.2) can easily be transformed into the equivalent difference equation. The sampling rate for M R F C is selected to be equal to the servo loop rate, while data are sent to the clients at a rate of 50 H z . Under the run state, the M R A F C updates the P I D parameters once for every full step response that is detected. Similarly, the intelligent selector runs whenever a new step input is detected. When using the U D P transmission protocol, the issues that may affect the system performance include the data transmission delay, mis-synchronization of data, and data losses. Due to the nature of the current supervisory scheme, these issues are not critical, particularly since data are streamed at a relatively low frequency (50 H z ) , and the attribute extractor needs only to acquire information from a series of buffered data (response history) before making that information available to the M R A F C , the intelligent selector, or the human expert. Switching commands and parameter updating are done at even a slower rate. In this manner, the stability of the servo loops can be maintained. 7.3 Model-Referenced Fuzzy Control The Model-Referenced Fuzzy Control ( M R F C ) is an extension to the technique proposed in (Lian, 1997). This is a signal adaptation scheme, which works by modifying the reference command into a servo controller according to the tracking error and the change in the tracking error. The tracking error is taken as the difference between the response of the reference model and the actual position response of the system; i.e., £(k) = y (k)-y (k) m s (7.3) The change in the tracking error is the difference in the tracking error between the current and the previous time steps, as given by: Ae(k) = £(k)-£(k-\) T (7.4) s The basic structure of the M R F C control scheme is illustrated in Figure 7.4. It should be noted that this M R F C technique is independent of the type of direct digital controller that is used in controlling the system, as no parameter adaptation is needed. 162 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS The two measurements £(k) and As(k) are used as the antecedent variables for the fuzzy inference engine. The antecedents are multiplied by appropriate gains so as to fall in the range between - 1 and 1. This normalization is done in order to facilitate the design of the fuzzy inference engine. The gain values of the tracking error and the change in the tracking error are chosen as 1.5 and 0.1, respectively. The correction term for the reference input signal, or the change in the reference command, forms the fuzzy consequent variable. The fuzzy rule base is designed by carefully evaluating a step response trajectory in the case when the M R F C is expected to behave properly. A unique pattern can be established by Reference Model Reference input r~ Direct Controller Fuzzy Knowledge Base and Inference Engine Response Physical System Ae l-z- 1 T, Figure 7.4: The basic control structure of the M R F C . Figure 7.5: The typical response profile of reference model tracking. 163 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS examining how the polarities and the magnitudes of the tracking error and the change in the tracking error vary along the transient response of the system under control. A typical response characteristic for a step input is sketched in Figure 7.5. The response profile in Figure 7.5 is separated into eight zones which are denoted by Z\, Z2, Z3, ... and Z%. Note that these zones follow a cyclic pattern with decreasing area (between the response profiles of the system and the reference model) until the steady-state is reached. The polarities of the tracking error and its rate of change are found to vary from zone to zone. They are categorized in Table 7.1. The control objective is to ideally reach the null value for both fuzzy antecedent variables. In Table 7.1, the system response approaches perfect tracking of the reference model in clockwise cycles (Z\—>Z2—>Z?,—>...—>Zg). From experience and control knowledge, one can determine proper corrective actions for various reference zones. A simple corrective set of rules is given in Table 7.2. The fuzzy resolution (i.e., the number of fuzzy states used) of the corrective action can be improved to generate a more detailed fuzzy rule base, resulting in a smoother control action. Table 7.1: Zone polarities of the model tracking response. Change in Tracking Error, Ae Error, e Negative Near Zero Positive Negative z, z Zs Near Zero z Target Z 4 Positive Z7 z z 5 8 2 6 Table 7.2: Anticipated corrective action corresponding to each zone. Reference Zone Corrective Action z, Reduce control signal by a large value z Reduce control signal moderately 2 Z3 Reduce control signal slightly z 4 Increase control signal slightly z 5 Increase control signal moderately z 6 Increase control signal slightly Zy No change in control signal z Reduce control signal slightly 8 164 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Each of the two antecedent variables assumes 7 fuzzy states: N H (Negative High), N M (Negative Medium), N L (Negative L o w ) , Z E (Zero), P L (Positive L o w ) , P M (Positive Medium), and P H (Positive High), represented by triangular membership functions symmetrically spaced along the normalized universe of discourse. Figure 7.6 shows the membership functions of the antecedent variables as used in the present study, where the universe of discourse is normalized between -1 and 1. The fuzzy consequent variable also assumes 7 fuzzy states with triangular membership functions, and is also normalized between - 1 and 1, as illustrated in Figure 7.7. This fuzzy output is scaled appropriately so that it is smooth and sufficiently significant with the ability to alter the course of the actuators while avoiding any chattering in the response. A scaling constant of 12 provides a good overall performance in the current application. Since both antecedent variables have 7 fuzzy states each, there w i l l be a maximum total of 49 fuzzy rules. These rules are given in Table 7.3. In order to reduce the real-time computational load, the M R F C rule base is transformed into a look-up table. The antecedent variables are divided into a resolution of 0.05. A fast bi-section algorithm is used to search the table entries, and a bilinear interpolation is used to yield the fuzzy output. Figure 7.7: Membership functions of the consequent variable for M R F C . 165 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.3: The M R F C rule base. Change in Tracking E r r o r Error NH NM NL ZE PL PM PH NH NH NH NH NH NM NL ZE NM NH NH NH NM NL ZE PL NL NH NH NM NL ZE PL PM ZE NH NM NL ZE PL PM PH PL NM NL ZE PL PM PH PH PM NL ZE PL PM PH PH PH PH ZE PL PM PH PH PH PH 7.4 Model-Referenced Adaptive Fuzzy Control The remote Model-Referenced Adaptive Fuzzy Control scheme uses the indices of deviation from the performance evaluator and the reference model from the performance specifier to make tuning decision on the parameters of the local servo controllers. The attribute extractor (see Figure 7.3) is used for extracting the performance attributes from the responses of both the system and the reference model, when subjected to the same input. Six basic control engineering performance attributes are extracted using simple numerical search algorithms, which involve finding the points of zero crossing of the first derivative of a step response. These attributes are rise time (95%), settling time (±2%), maximum overshoot, steady-state offset, damped natural frequency, and damping ratio. It is convenient to choose these performance attributes not only because they make the rule base for adaptation easy to develop, but also because of the fact that they are well known to control engineers. The rise time {t ) is r taken to be the time it takes for the response to reach 95% of the final steady state value, for the very first time. The setting time (t ) is taken to be the time required for the step response to s settle within ± 2 % of its final value. The maximum overshoot ( M ) is computed as the difference between first peak value of the step response (at the point of first zero crossing of the first derivative of the step response) and the steady-state value, expressed as a fraction of the latter. The offset is the difference between the response at steady-state and the desired value, non-dimensionalized with respect to the desired value. The damped natural frequency (<i) ) is d 166 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS computed using co =f- where t p d p is the time at the first peak of the response. The damping ratio ( £ ) is determined according to the formula = — — ^ — , which uses the well-known relationship between the damping ratio and the fractional overshoot, based on the step response of a simple oscillator. It should be noted that the process of extracting the performance attributes involves locating the maxima and minima of a response profile, which is susceptible to measurement noise and local disturbances. This can be overcome by filtering the stream of feedback data. The performance evaluator, in Figure 7.3, is used for computing the index o f deviation (degree of deviation) of the performance of the system with respect to the reference model. The index is computed by taking the ratio of the features of the two responses as follows. If the adaptation goal is to make the attribute value of the system small, then we use: Deviation_Index = 1 - (Model_Feature/System_Feature), and i f the goal is to make the feature value large, we use: Deviation_Index = 1 - (System_Feature/Model_Feature). This gives a normalized range between 0 and 1 for the index. Close agreement between the reference model and the system corresponds to a small positive index of deviation. The larger the value of the index of deviation, the poorer the tracking performance. If the index value is negative, this corresponds to better than desired performance, and is "better than the specification" and denoted as an "over-specification." For some performance attributes, a check has to be made to determine i f the system value is zero, in order to avoid division by zero. If the check is positive, then an "over-specification" is assigned with a default negative value for the particular index. Table 7.4 gives the six indices of deviation. These can be taken to represent the experience of an expert. The fuzzy rule base that is employed here has the indices of deviation as its antecedent variables. The numerical values of the indices of deviation are fuzzified into membership functions of five different fuzzy states, and are represented by O V (Over-specified), I N (Inspecification), M G (Marginal), P R (Poor), and V P (Very Poor). Membership functions of I N , M G , and P R are triangular shaped while O V and V P are asymmetric polynomial curves. Figure 7.8 illustrates an example of the membership functions used in the present application. 167 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.4: The six indices of deviation. Performance attributes Notation used in rule base Rise-time (95%) RT Settling-time (±2% criterion) ST Index of deviation RT = 1 - Maximum overshoot 1 _ OS U Steady-state offset _ i ct 5 OF Damped natural frequency WD Damping ratio DR ~ i ST M ~ "STT 1 os 1 OF = 1 s OF m OF WD S d r = i - ^ 0 0.2 0.4 0.6 0.8 1 Figure 7.8: Typical membership functions used to represent the index of deviation for M R A F C . Figure 7.9: MRAFC. Typical membership functions used for the consequent variables for The incremental change in the adjustable parameters K , P K,, and K D of the discrete P I D controller are used as the consequent (action) variables of the fuzzy inference engine. Each action variable has 5 possible fuzzy states over a normalized universe of discourse between -1 and 1. They are symbolically represented by L D (Large Decrement), S D (Small Decrement), N C (No Change), SI (Small Increment), and L I (Large Increment). Figure 7.9 shows the five 168 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS membership functions that are used for the consequent variables. The three intermediate membership functions are of triangular shape, while the two end membership functions are of trapezoidal shape. Trapezoidal shaped membership functions are used to provide a stronger tuning action when the deviation between the desired and the actual responses is high. The parameter ranges of the P I D controller are not identical. Specifically, K P Kj ranges from 0 to 1, and K D ranges from 0 to 10, ranges from 0 to 80. Hence, the normalized outputs of the fuzzy inference engine should be scaled accordingly. Depending on the required sensitivity or the rate of adaptation, each consequent variable can be multiplied by a constant gain before adding to the actual value. In the present study, the gains are made to be linearly proportional to the Integral Time Absolute Error (ITAE) between the desired and the actual step responses. This w i l l allow smoother and rapid convergence of the parameters of the P I D controller. In other words, a large tuning action is required when the controller is severely out-of-tune, causing a large deviation in the actual response of the system from the desired one. On the other hand, when the controller is moderately out-of-tune, then just minor adjustments of the tuning parameters would suffice. In order to avoid "over-tuning," a neutral zone is specified, where the deviation between the desired and the actual responses of the system is negligible, from the viewpoint of the type of operation of the system. The fuzzy rule base for M R A F C is derived by observing the characteristic mapping between the antecedent and consequent variables. The trend of each antecedent variable (performance attribute) is observed by systematically varying the particular consequent variable while keeping the others fixed. Figure 7.10 shows the response profiles for various levels of K p while Kj and K D are kept constant. When K P is increased, there occur distinct increments in rise-time and damping ratio, and decrements in maximum overshoot and damped natural frequency. However, settling-time and steady-state offset do not have a polarized behavior in this case. Hence, their effect is ignored in the rule-base. For the other two consequent variables, the trends are obtained in a similar manner. W i t h six indices of deviation, a total of 30 linguistic rules are used in remote M R A F C tuning of the servo controllers. The resulting rule base is given in Table 7.5. Note that the suffix " D " in each parameter of the controller denotes an "incremental change." The composition rule of inference is utilized for decision making (inference) in the present study (de Silva, 1995). The developed rule base is realistic, accurate and uncoupled, and these characteristics can significantly improve the 169 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS computational efficiency of the scheme (de Silva, 1991). Figure 7.10: Response profiles for various levels of K. P 170 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.5: The rule base for the M R A F C . RT = V P RT = PR RT = M G RT = IN RT = OV ST = V P ST = PR ST = M G ST = IN ST = OV OS = V P OS = PR OS = M G OS = IN OS = OV OF = V P OF = PR OF = M G OF = IN OF = O V WD = V P W D = PR WD = M G W D = IN WD = OV DR = V P DR = PR DR = M G DR = IN DR = OV Change in controller parameters DKP DKI DKD LD LI LI SD LI SI NC SI SI NC NC NC SI LD LD LI LI SI SI SI SI NC NC SD LD LI SD LD SI NC LD NC NC SD NC NC NC SD SI SI SI LI NC SI NC NC NC NC NC SD LD SD SI LD SD SI SD SD SI NC NC NC LI SI LD LI LD LI SI SD SI NC SD SI NC NC NC LD SI LD 7.5 Intelligent Switching of Adaptive Controllers A n intelligent selector is incorporated into the distributed supervisory control structure to autonomously choose the best adaptive controller under a given performance condition. Its objective is to ensure that an acceptable performance of the system is maintained throughout the entire course of operation of the electro-hydraulic manipulator, particularly resulting in low tracking error and reduced control energy. Fuzzy logic is used for generating the decisions of intelligent switching. W i t h the option of switching between M R F C , M R A F C , or keeping both off, the action variables of the rule base are selected to have the three states: A L L - O F F , M R F C , and M R A F C . Here, the Takagi171 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Sugeno-Kang (Sugeno, 1985) method of fuzzy inference is used where the implication method is multiplication. The action variables have a constant membership function with 0 for A L L O F F , 1 for M R F C , and 2 for M R A F C . This allows smooth switching between the three states. The antecedent variables for the rule base are selected to be the six indices of deviation: R T , ST, O S , O F , W D , and D R , computed by the performance evaluator (see Figure 7.3). Similar to their representation in M R A F C , the indices of deviation are fuzzified into membership functions of five primary fuzzy states: O V (Over-specified), I N (In-specification), M G (Marginal), P R (Poor), and V P (Very Poor). The membership functions are arranged as in Figure 7.11. In the development of the rule base, priorities have to be established for each index of deviation and it should be known under what circumstances a particular adaptive controller is best suited. When the indices of deviation are in-specification, neither the M R F C nor the M R A F C is required. When R T , O F , W D or D R is over-specified, M R A F C is switched on to tune the servo controller. M R A F C is not required in the case of over-specification of the maximum overshoot index; i.e., with an overdamped response, which can be corrected by M R F C . It should be noted that steady-state offset cannot be corrected by M R F C . Then, retuning of the servo controllers would be required. The 30 linguistic rules developed for switching the adaptive controllers in the present application are given in Table 7.6. Using the weighted average defuzzification technique, the crisp output of the intelligent selector is set to lie between 0 and 2. A l l adaptive controllers are switched off when the fuzzy output is lower than 0.8. M R F C is switched on between 0.8 and 1.3. M R A F C is switched on when the fuzzy output value is above 1.3. It is cautioned that the system responses under M R F C should not be used for M R A F C tuning, because in that case the performance features cannot be correctly extracted. VP -0.5 0 0.5 Figure 7.11: The antecedent membership functions for the intelligent adaptive control selector. 172 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.6: The intelligent selector rule base for adaptive controller switching. //RT=OV 7/RT=IN //RT=MG 7/RT=PR 7/RT=VP 7/ST=OV 7/ST=IN 7/ST=MG 7/ST=PR 7/ST=VP 7/OS=OV 7/OS=IN 7/OS=MG 7/OS=PR 7/OS=VP //OF=OV 7/OF=IN 7/OF=MG 7/OF=PR 7/OF=VP 7/WD=OV 7/WD=IN 7/WD=MG 7/WD=PR 7/WD=VP 7/DR=OV 7/DR=IN 7/DR=MG 7/DR=PR 7/DR=VP then SWITCH=MRAFC then SWiTCH=ALL-OFF then SWiTCH=MRFC then SWiTCH=MRFC then SWITCH=MRAFC then SWITCH=MRFC then SWTTCH=ALL-OFF then SWiTCH=MRFC then SWITCH=MRFC then SWITCH=MRAFC then SWITCH=MRFC then SWITCH=ALL-OFF then SWITCH=MRFC then S W i T C H = M R A F C then S W i T C H = M R A F C then SWITCH=MRAFC then SWiTCH=ALL-OFF then SWITCH=MRAFC then SWITCH=MRAFC then SWITCH=MRAFC then SWITCH=MRAFC then SWITCH=ALL-OFF then SWITCH=MRFC then SWITCH=MRAFC then SWITCH=MRAFC then SWTTCH=MRAFC then SWITCH=ALL-OFF then SWITCH=MRFC then SWITCH=MRAFC then SWTTCH=MRAFC 7.6 Experimental Case Studies A n experimental investigation is carried out on the electro-hydraulic manipulator of the Intelligent Iron Butcher (see Chapter 2) in order to evaluate the performance under controller switching as provided by the intelligent supervisory system. Four representative results are given here. In the present case, the parameters of the reference model are set such that the desired performance attributes are approximately given as in Table 7.7, corresponding to co =5.0 rad/s and ^ = 0.91. In order to simulate the change in system dynamics, the n parameters of the P I D servo controller are deliberately changed. The case studies are conducted with initial PLD settings of K P = 4.3, K, = 0.077 and K D = 2.2, which provide good tracking. 173 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.7: Desired performance attributes. Performance Attributes Desired Value Rise time [s] 0.60 Settling time [s] 0.80 Maximum overshoot [%] 0.20 Steady-state offset [mm] 0.0005 Damped natural frequency [rad/s] 4.0 Damping ratio 0.90 A t the 7,500th time step the parameters are off tuned at K P = 0.1, K, = 0.08 and K D = 30.0, to generate an oscillatory response. Finally, at the 16,500th time step, the parameters are changed to K P = 4.0, K t = 0.02 and K D = 10.0, which results in an over-damped response. Since the dynamics of the two axes of the electro-hydraulic manipulator are similar, only the responses of the X-axis are reported here. Each axis is subjected to a series of square wave input of amplitude 5.0 m m and a cyclic period of 10 seconds. This closely resembles the reference input provided by the primary vision module during the normal operation of the machine, as indicated in Section 2.4.1. It has been shown in (Tang, et al, 2002b) that M R F C and M R A F C are able to cope with any random form of step commands, and not necessarily limited to a square wave excitation, during the tuning cycle; Figure 7.12 shows the system response when both adaptive controllers are switched off with only the local P I D servo controller running. Figure 7.12(b) shows the position response of the reference model and the actual measured position of the manipulator. The tracking error between the responses of the reference model and the system is illustrated in Figure 7.12(c). The control input generated by the servo controller is shown in Figure 7.12(d). Note that the steady-state fluctuations are caused by the deadband compensator, which is incorporated to overcome the stick-slip friction in the hydraulic slip rings and in the slider guideways. These fluctuations are not noticeable in Figure 7.12(b). The response curves serve as a reference for benchmarking of the adaptive controllers. The system response under constant M R A F C adaptation is shown in Figure 7.13. It is observed that the adaptive controller is able to quickly tune the P I D parameters under dynamic variations, and bring the system to closely track the reference model. Figures 7.13(e)-7.13(g) 174 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS show that the three P I D parameters converge to the correct values under both under-damped and over-damped offset conditions. Figure 7.14 illustrates the response of the system when the M R F C reference command adaptation is "always on." N o tuning is carried out on the parameters of the local P I D controllers. Figure 7.14(b) shows that very good tracking is achieved throughout the experiment and is unaffected by the off-tuning of the P I D parameters (see Figures 7.14(e)7.14(g)). This is clearly reflected in Figure 7.14(c). However, such perfect tracking is only achieved with a drastic increase in control energy, as noted from Figure 7.14(d). Table 7.8 compares the difference in sum square change in control input and tracking error obtained for the four case studies conducted. The total control energy with M R F C is found to be over 6 times larger than that without adaptation (Figure 7.12(d)), and nearly 3 times larger than with M R A F C tuning. Figure 7.15 shows the response of the system under automatic switching of adaptive controllers. The switching states are indicated in Figure 7.15(a). The intelligent selector is switched on at the end of the first half-cycle. In the middle of the 3rd-cycle, the M R F C is switched on upon detecting degraded tracking, and as a result the tracking error is quickly reduced to almost zero. The intelligent selector turns on the M R A F C upon detecting a large change in the system response dynamics. P I D tuning is then carried out to quickly reduce the tracking error up to the middle of 9th-cycle where the intelligent selector decides to switch to M R F C , thereby providing near perfect tracking. This tracking is much closer than what is achievable under fixed M R F C or fixed M R A F C . This is because the M R F C works very accurately only when the servo controller is not significantly off-tuned. The control energy in the present case is nearly 2 times lower than that for constant M R F C . Table 7.8: Performance comparison among the four different adaptive states. £(A ) xl0 2 4 M [mA ] 2 J V x l O 3 [mm ] PID only 4.638 28.674 PID with M R A F C 8.073 12.024 PID with M R F C 26.854 0.691 PID with Auto-Switching 15.060 9.245 2 175 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Time steps x 10 Figure 7.12: System response without adaptation, (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response); (c) Tracking error; (d) Control input; (e) K ; (f) Kf, and (g) K . P D 176 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS MRAFC (a) MRFC - OFF 10 (d) i r i i i 0.5 1 1.5 2 2.5 l - 1 -a 3 & C i—i K -105r 0.5 1.5 2.5 00.2 r 0.5 1.5 2.5 0.5 1.5 P (e) K, (f) 0.1 o40 r (g) 200'= 2 2.5 4 Time steps x 10 Figure 7.13: System response with M R A F C . (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response); (c) Tracking error; (d) Control input; (e) K ; (f) Kf, and (g) K . P D 177 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS MR AFO i i I 1 l l 0.5 1 1.5 I l 2 2.5 (b) II ( 1 1.5 2.5 1.5 2.5 1.5 2.5 1.5 2.5 1.5 2 2.5 4 Time steps x 10 Figure 7.14: System response with M R F C . (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response); (c) Tracking error; (d) Control input; (e) K ; (f) K ; and (g) K . P { D 178 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS 1 I 0.5 i (b) (c) (d) 1 t I 1.5 2 i I 2.5 I § bfi g I a o r (e) (f) (g) Time steps x 10 Figure 7.15: System response with automatic intelligent switching, (a) Adaptation state; (b) Position response (solid-line: actual response; dashed-line: reference model response); (c) Tracking error; (d) Control input; (e) K ; (f) Kf, and (g) K . P D 179 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS 7.7 Summary A distributed networked intelligent supervisory control strategy was developed by employing a client-server architecture, which made the strategy modular. It provided high flexibility for the control structure with the ability to switch on any module as desired. The Ethernet protocol used in the present work also enabled easy real-time monitoring of the system performance in addition to on-line remote intervention by a human expert, to affect the machine states and configuration. The developed system was implemented for use with an industrial fish-cutting machine, which has an integral electro-hydraulic manipulator. The incorporation of an intelligent selector for adaptive control proved vital in improving the performance of the electro-hydraulic manipulator over a period of time, as shown through comprehensive experimentation. The selector was able to carry out autonomous switching of a locally implemented signal adaptive controller and a remotely implemented parameter adaptive controller. 180 Chapter 8 Conclusion This thesis has investigated the analysis, development, and implementation of stable feedback control systems and remote monitoring and supervisory control systems for plants that are linked and accessed through a communication network. In a framework of networked control systems ( N C S ) , where the plant, controllers, sensors, actuators, and human interface points may all be distributed and networked, various solutions have been developed and tested under realistic practical conditions and on an industrial machine. A l l aspects of theory, analysis, system architecture, software, hardware, system development, and practical implementation have been covered in the thesis. The primary research contributions made in this thesis are summarized in the next section. The subsequent section identifies the limitations of the current work, and presents some possible improvements and further research directions within the theme of network-based control. 8.1 Primary Contributions One original contribution of this thesis is the adoption of the theory of M o d e l Predictive Control ( M P C ) in the realm of Networked Control System (NCS) to address the shortcomings of other possible networked feedback control strategies. A new technique called N C S - M P C strategy has been developed, which predicts erroneous sensor data and, more importantly, predicts, buffers and schedules future control actions in advance. This approach has been demonstrated to be a viable solution for Networked Control Systems in the pursuit of concurrently overcoming the four key problems associated with unreliable network data communication: nondeterministic delay, packet losses, vacant sampling, and mis-synchronized data arrival. A main advantage of the developed strategy is the inherent transparency of the complicated dynamics of data transmission to the control synthesis. In fact, the developed strategy is documented as the first practical and successful attempt in handling data communication problems in the control action signals between the controller and the actuators of a networked plant. 181 CHAPTER 8 CONCLUSION The "fixed" optimal control structure of the basic unconstrained model predictive control policy has been enhanced in this research, for adapting to dynamic changes within a physical system and data transmission. A n online routine of linear model identification, which utilizes the delayed system responses, has been incorporated into the control system, for catering to time-varying dynamics of the plant. Both the prediction horizon and the size of the data packets transmitted over the network have been made variable, and this flexibility has shown to be able to reduce the network traffic and the computational load of the control algorithm. In addition, active scheduling of the penalty functions of the control law, as incorporated in the developed technique, is a practical scheme to improve the working range of the controller in terms of the level of data transmission delay. The feasibility, high performance, and effectiveness of the developed N C S - M P C control strategy have been demonstrated in the present work through implementation on an industrial fish-processing machine and rigorous real-time experimentation. In order to further investigate and substantiate the viability of the developed N C S - M P C strategy, asymptotic stability analysis in the sense of Lyapunov was conducted by including critical details and in the broader domain of constrained optimal predictive control. The analysis was divided into two major parts. The first part dealt with the case of perfect data feedback and focused on the stability, optimality and feasibility of utilizing pre-computed future control actions. The approach introduces a terminal cost, which is governed by a terminal weight to the finite horizon cost function with a lower and an upper bound. The careful design of the terminal weight is the key to guaranteeing asymptotic stability of the closed-loop system. Stability theorems were developed and analytically proved in this context, and were experimentally validated. In this manner, the developed theorems were demonstrated also as a practical tool for the proper design of a stable N C S - M P C strategy. A s a sequel to the stable control system configurations as developed in the first part of the analysis, the second part of the stability analysis concerned the determination of the maximum allowable deviation between the actual and the estimated states to maintain closed-loop asymptotic stability. This has been achieved in the thesis by utilizing the concept of sensitivity, particularly perturbation analysis of nonlinear programming, on the developed equality constrained N C S - M P C control policy. In contrast to the results obtained in the first part, it was established that the same conditions that are desirable in sustaining stability with buffered future control actions, have an undesirable effect in the presence of state estimation errors. Consequently, a design trade-off is required in the overall implementation of the developed 182 CHAPTER 8 CONCLUSION networked control solution. The results established from this analysis are particularly useful as a design criterion for further development of robust state observers. In various stages of the present development of the unconstrained and constrained stable N C S - M P C control strategy, experimental validation was conducted on a newly developed control network architecture within an Ethernet network. A n algorithm was developed for process scheduling with accurate clock synchronization, and was integrated into this architecture, to make it more flexible and practical, as demonstrated. The practical usage of multi-parametric Quadratic Programming has also been a key to the successful implementation of constrained optimal predictive control on high-speed servo systems since these systems allow insufficient time for the operation of traditional iterative optimization methods. On a parallel front, a universal, web-based remote monitoring and supervisory control architecture for a distributed multi-systems domain has been established in this thesis. The twotier client-server model as developed is low-cost, scalable and easily reconfigurable, which caters to variable domain size and interaction. The full functionally of the developed architecture was demonstrated through its implementation on an industrial fish-processing machine. The developed architecture is useful in providing remote world-wide access to equipment of scarce availability, remote management of production facilities, and process tuning and configuration by remotely located human experts. The hardware simplicity and software flexibility have made the architecture open for further development and advancement. The remote and distributed intelligent supervisory control architecture, as developed in this thesis, is a novel design for systems with time-varying dynamics. A local and fast signaladaptive model-referenced fuzzy control technique was adopted to assist the servo-loop controllers in providing almost error free tracking capability under nominal situations. In the event of change in the system dynamics, a remote knowledge-based model-referenced adaptive control technique, as implemented in the system, is capable of tuning the servo-loop controllers based on a set performance metrics. A high-level remote intelligent supervisor was designed and implemented to actively switch between the modes of operation of the local and remote adaptive controllers, and the servo-loop controllers. Experimental investigation has shown that the developed system has the capability to minimize the control effort while maintaining adequate tracking accuracy. In summary, the present thesis represents a useful contribution, not only towards the advancement of the challenging and practical research i n networked control systems and remote monitoring and supervisory control, but also to fundamental research in stable model 183 CHAPTER 8 CONCLUSION predictive control. Although, the communication network of implementations in this thesis is the commonly available Ethernet network, the developed feedback and supervisory control strategies are easily applicable to other control networks. The contributions made in this thesis are by no means exhaustive. The next section identifies some limitations of the developments of the thesis and suggests possible enhancements and alternative approaches that may be investigated. 8.2 Limitations and Suggested Future Research The control strategy for networked systems, as analyzed, developed, and implemented in this thesis assumes that a linear model of the plant is sufficient, which is an inherent assumption in model predictive control. A natural extension to the research is to investigate the use of a nonlinear model for the plant. Conditions for maintaining closed-loop asymptotic stability has been analyzed but they are limited to a linear, nominal model without taking into account modeling errors in the form of model uncertainty and robustness to external or internal disturbances. Robustness to modeling errors and disturbances may be considered in a future investigation. Furthermore, an analytical performance measure has to be established, which w i l l provide further guidelines for practical design and implementation of the developed control strategy. There is also the subject of model identification using delayed and distributed system responses, which has not been investigated in the present work. Since pre-computation of future control actions, although sub-optimal, was proven to be feasible with guaranteed asymptotic stability, the strategy has the potential for further enhancement to reduce the data transmission frequency to some level below the sampling frequency of the system. This w i l l clearly reduce the network utilization and traffic, also leading to lower transmission delay. Although the conditions for maintaining stability in the presence of state estimation errors in the sensory feedback data was studied in the thesis, important issues related to the design of practical and robust state observers to compensate for network transmission problems between a sensor and a controller was not the main focus. State observers that are robust, high precision, able to accommodate rapidly changing system dynamics, and with long-range estimation capability to compensate for successive loss or delay of sensory data, are crucial for wide practical implementation of the developed N C S technologies. W i t h regard to general applicability, the networked control strategy that was developed in this thesis is limited to systems with a single, centralized controller which requires an enormous 184 CHAPTER 8 CONCLUSION communication bandwidth to transmit process parameters and other data to the control point. However, many existing industrial systems; e.g., power systems, are decentralized which partition control algorithms into multi-node processing. Investigation of the adaptability of the developed strategy, along with the required modifications, to decentralized systems would be an appealing future endeavor. This may include the development of a robust scheduling and timing algorithms to provide seamless execution of the control algorithms. In the present thesis, all the communicating nodes within the control loop; i.e., sensors, controllers, and actuators, were assumed to be simultaneously running at the same sampling interval, in a synchronous manner. A s the complexity of the considered system grows, the proper synchronization and scheduling of events between all the nodes may be hard to achieve. Advantages may be gained by investigating into event-driven or asynchronous networked control systems. In the present work, only a single data packet is assumed to be transmitted from a node i n a given sampling interval. It is useful to look into solutions when multiple packets of sensor and actuator data are transmitted at each sampling interval. These prospective investigations w i l l provide means to develop more sophisticated networked control systems with multi-rate, asynchronous sampling. Practical implementation and thorough testing have to be conducted in order to demonstrate that the developed networked control strategy is applicable to communication networks other than the Ethernet. Wireless Ethernet has been gaining much attention recently due to the introduction of smart sensor networks. The utilization of wireless communication in the feedback control loop w i l l further complicate already problematic transmission of existing wired networks. Control solutions are particularly needed to overcome noisy and low-energy wireless transmission. The present research on web-based remote monitoring and supervisory control may be broadened to incorporate further functionality to the developed architecture. Some useful functionalities that may be explored are: incorporating a unified method for defining the desired task that needs to be carried out by a particular system; incorporating a remote interface to allow transparent tele-operation of the system; and developing a graphical design tool for quick setup of an interface and communication sockets for additional systems. Message compression and encoding should be implemented as well to reduce the transmission bandwidth. 185 Bibliography Abdullah, H . A . and C . R . Chatwin, "Distributed C 3 Environment for Small to Medium-sized Enterprises," Integrated Manufacturing Systems, V o l . 5, N o . 3, pp. 20-28, 1994. A l - G h a z z a w i , A . , E . A l i , A . Nouh, and E . Zafiriou, "On-line Tuning Strategy for M o d e l Predictive Controllers," Journal of Process Control, V o l . 11, pp. 265-284, 2001. Almeida, L . , P. Pedreiras, and J . A . G . Fonseca, "The F T T - C A N Protocol: W h y and H o w , " IEEE Trans. Industrial Electronics, V o l . 49, N o . 6, pp. 1189-1201, 2002. Anderson, R . T . and P . Y . L i , "Mathematical Modeling of a T w o Spool F l o w Control Servovalve using a Pressure Control Pilot," ASME Journal of Dynamic Systems, Measurement, and Control, V o l . 124, pp. 420-427, 2002. Apple Computer, Inc., Darwin Streaming http://www.opensource.apple.com/projects/streaming/. Server, Available at: Astrom, K . J . and B . Wittenmark, Adaptive Control, 2nd Edition, Addison-Wesley Publishing, Inc., Reading, M A , 1995. Azimi-Sadjadi, B . , "Stability of networked control systems in the presence of packet losses," Proc. IEEE Conf. on Decision and Control, M a u i , H I , pp. 676-681, 2003. Beldiman, O., G . C . Walsh, and L . Bushnell, "Predictors for Networked Control Systems," Proc. American Control Conference, Chicago, I L , pp. 2347-2351, 2000. Bellman, R . E . , Adaptive Princeton, N J , 1961. Control Processes - A Guided Tour, Princeton University Press, Bemporad, A . , F . Borrelli, and M . Morari, "Optimal Controllers for Hybrid Systems: Stability and Piecewise Linear Explicit Form," Proc. IEEE Conf. on Decision and Control, Sydney, Australia, pp. 1810-1815,2000. Bemporad, A . , K . Fukuda, F . D . Torrisi, "Convexity Recognition of the Union Polyhedra," Computational Geometry - Theory and Application, V o l . 18, pp. 141-154, 2001. Bemporad, A . , M . Morari, V . Dua, and E . F . Pistikopoulos, "The Explicit Linear Quadratic Regulator for Constrained Systems," Automatica, V o l . 38, pp. 3-20, 2002. Bertsekas, D . P . and R. Gallager, Data Networks, 2nd Edition, Prentice-Hall, Inc., EnglewoodC l i f f s , N J , 1991. Bertsekas, D . P . , Dynamic Programming Belmont, M A , 2000. and Optimal Control, 2nd Edition, Athena Scientific, 186 BIBLIOGRAPHY Bhandari, A . and M . H . Shor, "Access to an Instructional Control Laboratory Experiment through the W o r l d W i d e Web," Proc. American Control Conference, Philadelphia, P A , pp. 1319-1325, 1998. Bitmead, R . R . , M . Gevers, and V . Wertz, Adaptive Optimal Control - The Thinking GPC, Prentice-Hall, Inc., Englewood-Cliffs, N J , 1990. Man's Bordons, C . and E . F . Camacho, " A Generalized Predictive Controller for W i d e Class of Industrial Processes," IEEE Trans. Control Systems Technology, V o l . 6, N o . 3, pp. 372-387, 1998. B o y d , S., L . E l Ghaoui, E . Feron, and V . Balakrishnan, Linear Matrix Inequalities in System and Control Theory, Society for Industrial and Applied Mathematics, Philadelphia, P A , 1994. Camacho, E . F . and C . Bordons, Model Predictive 1998. Control, Springer-Verlag, London, U K , Cena, G . and A . Valenzano, "Achieving Round-Robin Access in Controller A r e a Networks," IEEE Trans. Industrial Electronics, V o l . 49, N o . 6, pp. 1202-1213, 2002. Chan, H . and U . Ozgiiner, "Closed-loop Control of Systems over a Communication Network with Queues," International Journal of Control, V o l . 62, N o . 3, pp. 493-510, 1995. Chen, H . and F. Allgbwer, " A Quasi-Infinite Horizon Nonlinear M o d e l Predictive Control Scheme with Guaranteed Stability," Automatica, V o l . 34, N o . 10, pp. 1205-1217, 1998. Chen, T . M . and R . C . L u o , "Remote Supervisory Control of A n Autonomous M o b i l e Robot via W o r l d W i d e W e b , " Proc. IEEE Int. Symp. Industrial Electronics, Guimaraes, Portugal, V o l . l , p p . 60-64, 1997. Chisci, L . , A . Garulli, and G . Zappa, "Fast Parallel Algorithms for Predictive Control," Proc. Int. Conf. Control, Coventry, U K , V o l . 2, pp. 1248-1253, 1994. Clarke, D . W . , C . Mohtadi, and P.S. Tuffs, "Generalized Predictive Control - Part I and II," Automatica, V o l . 23, N o . 2, pp. 137-160, 1987. Conti, M . , L . Donatiello, and M . Furini, "Design and Analysis of R T - R i n g : A Protocol for Supporting Real-time Communications," IEEE Trans. Industrial Electronics, V o l . 49, N o . 6, pp. 1214-1226, 2002. Costa, E . F . and J.B.R. do V a l , "Stability of Receding Horizon Control of Nonlinear Systems," Proc. IEEE Conf. on Decision and Control, M a u i , H I , pp. 2077-2081, 2003. Cristian, F., "Probabilistic Clock Synchronization," Distributed 158, 1989. Computing, V o l . 3, pp. 146- Cutler, C . R . and B . C . Ramaker, "Dynamic Matrix Control - A Computer Control Algorithm," Proc. Automatic Control Conference, San Francisco, C A , 1980. De Keyser, R . M . C . and A . R . V a n Cuawenberghe, "Extended Prediction Self Adaptive Control," Proc. IF AC Symp. Identification and System Parameter Estimation, Y o r k , U K , pp. 1317-1322, 1985. 187 BIBLIOGRAPHY de Silva, C . W . , " A n Analytical Framework for Knowledge-Based Tuning of Servo Controllers," Engineering Applications of Artificial Intelligence, V o l . 4, N o . 4, pp. 177-189, 1991. de Silva, C . W . , Intelligent Control - Fuzzy Logic Applications, 1995. de Silva, C . W . , Mechatronics Raton, F L , 2005. C R C Press, B o c a Raton, F L , - An Integrated Approach, C R C Press, Taylor and Francis, B o c a Deitel, H . M . and P.J. Deitel, Java™ - How To Program, 3rd Edition, Prentice-Hall, Inc., Upper Saddle River, N J , 1999. Evtushenko, Y . G . and Zhadan, V . G . , "Stable Barrier-Projection and Barrier-Newton Methods in Nonlinear Programming," Optimization Methods and Software, V o l . 3, N o . 1, pp. 237-256, 1994. Farsi, M . and K . Ratcliff, "Controlling with C A N o p e n [Industrial Control Networks]," IEE Review, V o l . 44, N o . 5, pp. 229-231, 1998. Fiacco, A . V . , "Sensitivity Analysis for Nonlinear Programming using Penalty Methods," Mathematical Programming, V o l . 10, pp. 287-311, 1976. Findeisen, R., L . Imland, F. Allgower, and B . A . Foss, "State and Output Feedback Nonlinear M o d e l Predictive Control - A n Overview," European Journal of Control, V o l . 9, pp. 190206, 2003. Fletcher, R., Practical Methods of Optimization, Y o r k , N Y , 1987. 2nd Edition, John W i l e y & Sons, L t d . , N e w Fukuda, K . , C-library cddlib Reference Manual, Version http://www.ifor.math.ethz.ch/~fukuda/cdd_home/cdd.html. 0.93c, 2003, Available Furuta, K . , A . Sano, and D . Atherton, State Variable Methods in Automatic W i l e y & Sons, Ltd., N e w York, N Y , 1988. Gockenbach, M . S . , "Infeasible Point Programming," Unpublished, 2003. Methods for at: Control, John Inequality-constrained Nonlinear G u , J . H . and C . W . de Silva, "Client-Server Architecture for Implementing Real-time Robot Control in Industrial Processes," Proc. 2nd Asian Control Conference, Seoul, South Korea, V o l . 3, pp. 259-262, 1997. Gusella, R. and S. Zatti, "The Accuracy of Clock Synchronization Achieved by T E M P O in Berkeley U N I X 4 . 3 B S D , " IEEE Trans. Software Engineering, V o l . 15, pp. 847-853, 1989. Halevi, Y . and A . Ray, "Integrated Communication and Control Systems: Part I - Analysis," ASME Journal of Dynamic Systems, Measurement, and Control, V o l . 110, pp. 367-373, 1988. Huzmezan, M . and G . A . Dumont, "Direct Adaptive Predictive Control using Subspace Identification in Laguerre Domain in the Presence of Constraints," Proc. IEEE Mediterranean Conference, Patras, Greece, 2000. 188 BIBLIOGRAPHY I E E E Computer Society, Carrier Sense Multiple Access with Collision Detection Access Method and Physical Layer Specifications, I E E E Standard 8 0 2 . 3 ™ , 2002. (CSMA/CD) Jiang, Z . - P . and Y . Wang, "Input-to-State Stability for Discrete-time Nonlinear Systems," Automatica, V o l . 37, pp. 857-869, 2001. Kaynak, O., H . Hashimoto, and P. Lewis, " M i n i m u m Effort Control of a Servo System," Proc. IEEE Int. Conf. Industrial Electronics, Control, and Instrumentation, Kobe, Japan, V o l . 1, pp. 755-759, 1991. Keerthi, S.S. and E . G . Gilbert, "Optimal Infinite-Horizon Feedback Laws for a General Class of Constrained Discrete-time Systems: Stability and Moving-Horizon Approximations," Journal of Optimization Theory and Applications, V o l . 57, N o . 2, pp. 265-293, 1988. Kerrigan, E . C . , Robust Constraint Satisfaction: Invariant Sets and Predictive Control, P h . D . Thesis, Department of Engineering, University of Cambridge, Cambridge, U K , 2000. K h a l i l , H . K . , Nonlinear 2002. Systems, 3rd Edition, Prentice-Hall, Inc., Upper Saddle River, N J , K i m , Y . H . , W . H . K w o n , and Y . I . Lee, " M i n - M a x Generalized Predictive Control with Stability," Computers and Chemical Engineering, V o l . 22, N o . 12, pp. 1854-1858, 1998. K o , C . C . , B . M . Chen, S . H . Chen, V . Ramakrishnan, R. Chen, S . Y . H u , and Y . Zhuang, " A Large-Scale Web-based Virtual Oscilloscope Laboratory Experiment," IEE Engineering Science and Education Journal, V o l . 9, N o . 2, pp. 69-76, 2000. K o , C . C . , B . M . Chen, S . Y . H u , V . Ramakrishnan, C D . Cheng, Y . Zhuang, and J.P. Chen, " A Web-based Virtual Laboratory on a Frequency Modulation Experiment," IEEE Trans. Systems, Man, and Cybernetics - Part C: Applications and Reviews, V o l . 31, N o . 3, pp. 295303,2001. Kothare, M . V . , V . Balakrishnan, and M . Morari, "Robust Constrained M o d e l Predictive Control using Linear Matrix Inequalities," Automatica, V o l . 32, N o . 10, pp. 1361-1379, 1996. Kouvaritakis, B . , M . Cannon, and J . A . Rossiter, " W h o needs Q P for Linear M P C anyway?" Automatica, V o l . 38, pp. 879-884, 2002. Kreyszig, E . , Advanced Engineering Mathematics, Y o r k , N Y , 1999. 8th Edition, John Wiley & Sons, L t d . , N e w Kurose, J.F. and K . W . Ross, Computer Networking - A Top-Down Approach Internet, 2nd Edition, Pearson Addison-Wesley, Boston, M A , 2003. Featuring the L i a n , F . - L . , J. Moyne, and D . Tilbury, "Analysis and Modeling of Networked Control Systems: MEVIO Case W i t h Multiple Time Delays," Proc. American Control Conference, Arlington, V A , pp. 4306-4312, 2001. L i a n , F . - L . , J. Moyne, and D . Tilbury, "Optimal Controller Design and Evaluation for a Class of Networked Control Systems with Distributed Control Delays," Proc. American Control Conference, Anchorage, A K , V o l . 4, pp. 3009-3014, 2002a. 189 BIBLIOGRAPHY L i a n , F . - L . , J. Moyne, and D . Tilbury, "Network Design Consideration for Distributed Control Systems," IEEE Trans. Control Systems Technology, V o l . 10, N o . 2, pp. 297-307, 2002b. L i m o n Marruedo, D . , T. Alamo, and E . F . Camacho, "Enlarging the Domain of Attraction of M P C Controller using Invariant Sets," Proc. IFAC 15th Triennial World Congress, Barcelona, Spain, pp. 1-10, 2002a. L i m o n Marruedo, D . L . , T. Alamo, and E . F . Camacho, "Stability Analysis of Systems with Bounded Additive Uncertainties Based on Invariant Sets: Stability and Feasibility of M P C , " Proc. American Control Conference, Anchorage, A K , pp. 364-369, 2002b. L i n , F . - L . , "Fuzzy Adaptive Model-Following Position Control for Ultrasonic Motor," IEEE Trans. Power Electronics, V o l . 12, N o . 2, pp. 261-268, 1997. Ljung, L . , System Identification N J , 1987. - Theory for the User, Prentice-Hall, Inc., Englewood Cliffs, Luck, R. and A . Ray, " A n Observer-based Compensator for Distributed Delays," V o l . 26, N o . 5, pp. 903-908, 1990. Luenberger, D . G . , Optimization Y o r k , N Y , 1969. Automatica, by Vector Space Methods, John W i l e y & Sons, Inc., N e w Lundelius, J. and N . Lynch, " A n Upper and Lower Bound for Clock Synchronization," Information and Control, V o l . 62, N o . 2-3, pp. 190-204, 1984. Mayne, D . Q . , J . B . Rawlings, C . V . Rao, and P . O . M . Scokaert, "Constrained M o d e l Predictive Control: Stability and Optimality," Automatica, V o l . 36, pp. 789-814, 2000. Meadows, Jr., E . S . , Stability and Continuity of Nonlinear Model Predictive Thesis, The University of Austin Texas, Austin, T X , 1994. Microsoft Corp., Microsoft Windows Media Technologies, http://www.microsoft.com/windows/windowsmedia/distribute.asp. Control, P h . D . Available M i l l s , D . , "Improved Algorithms for Synchronizing Computer Network Clocks," Trans. Networking, V o l . 3, N o . 3, pp. 245-254, 1995. at: IEEE/ACM Mischalska, H . and D . Q . Mayne, "Robust Receding Horizon Control of Constained Nonlinear Systems," IEEE Trans. Automatic Control, V o l . 38, N o . 11, pp. 1623-1633, 1993. Munir, S. and W . J . Brook, "Internet Based Teleoperation using Wave Variables with Prediction," Proc. IEEE/ASME Int. Conf. Advanced Intelligent Mechatronics, Como, Italy, pp. 43-51,2001. National Instruments Corp., LabVIEW™, Available at: http://www.ni.com/labview/. Nevistic, V . and J . A . Primbs, Constrained Nonlinear Optimal Control - A Converse HJB Approach, Technical Memorandum, N o . C I T - C D S 96-021, California Institute of Technology, Pasadena, C A , 1996. Nilsson, J., Real-time Control Systems with Delays, Ph.D. Dissertation, Department Automatic Control, Lund Institute of Technology, Lund, Sweden, 1998a. of 190 BIBLIOGRAPHY Nilsson, J., B . Bernhardsson, and B . Wittenmark, "Stochastic Analysis and Control of Realtime Systems with Random Time Delays," Automatica, V o l . 34, N o . 1, pp. 57-64, 1998b. Nunes, G . C . , S. K i n c a l , and O . D . Crisalle, " A Polynomial Perspective on the Stability of Multivariable Predictive Controllers," Computers and Chemical Engineering, V o l . 27, pp. 1097-1111,2003. Ogata, K . , Discrete-time 218,1987. Control Systems, Prentice-Hall, Inc., Englewood Cliffs, N J , pp. 315- Otanez, P . G . , J.R. Moyne, and D . M . Tilbury, "Using Deadbands to Reduce Communication i n Networked Control Systems," Proc. American Control Conference, Anchorage, A K , V o l . 4, pp. 3015-3020, 2002a. Otanez, P . G . , J.T. Parrott, J.R. Moyne, and D . M . Tilbury, "The Implications of Ethernet as a Control Network," Proc. Global Powertrain Conference, A n n Arbor, M I , pp. 1-9, 2002b. Overstreet, J . W . and A . Tzes, " A n Internet-based Real-time Control Engineering Laboratory," IEEE Control Systems Magazine, V o l . 19, N o . 5, pp. 19-34, 1999. Pistikopoulos, E . N . , V . Dua, N . A . Bozinis, A . Bemporad, and M . Morari, "On-line Optimization via Off-line Parametric Optimization Tools," Computers and Chemical Engineering, V o l . 26, pp. 175-185, 2002. Primbs, J A . and V . Nevistic, " A N e w Approach to Stability Analysis for Constrained Finite Receding Horizon without End Constraints," IEEE Trans. Automatic Control, V o l . 45, N o . 8, pp. 1507-1512,2000. Quanser, Inc., WebLab, Available at: http://www.controlab.com/. Quevedo, D . E . , G . C . Goodwin, and J.S. Welsh, " M i n i m i z i n g D o w n - L i n k Traffic in Networked Control Systems v i a Optimal Control Techniques," Proc. IEEE Conf. on Decision and Control, M a u i , H I , pp. 1200-1205, 2003. Rawlings, J . B . and K . R . Muske, "The Stability of Constrained Receding Horizon Control," IEEE Trans. Automatic Control, V o l . 38, N o . 10, pp. 1512-1516, 1993. RealNetworks, Inc., Available at: http://www.realnetworks.com/index.html. Rohrig, C . and A . Jochheim, "The Virtual Lab for Controlling Real Experiments v i a Internet," Proc. IEEE Int. Symp. Computer Aided Control System Design, Kohala, H I , pp. 279-584, 1999. Santos, L . O . and L . T . Biegler, " A T o o l to Analyze Robust Stability for M o d e l Predictive Controllers," Journal of Process Control, V o l . 9, pp. 233-246, 1999. Scokaert, P . O . M . , D . Q . Mayne, and J . B . Rawlings, "Suboptimal M o d e l Predictive Control (Feasibility Implies Stability)," IEEE Trans. Automatic Control, V o l . 44, N o . 3, pp. 648-654, 1999. Sinopoli, B . , L . Schenato, M . Franceschetti, K . Poolla, and S.S. Sastry, "Time Varying Optimal Control with Packet Losses," Proc. IEEE Conf. on Decision and Control, Atlantis, Paradise Island, Bahamas, V o l . 2, pp. 1938-1943, 2004a. 191 BIBLIOGRAPHY Sinopoli, B . , L . Schenato, M . Franceschetti, K . Poolla, M . I . Jordan, and S.S. Sastry, "Kalman Filtering with Intermitted Observation," IEEE Trans. Automatic Control, V o l . 49, N o . 9, pp. 1453-1464, 2004b. Skogestad, S. and I. Postlethwaite, Multivariable John W i l e y & Sons, Ltd., N e w York, N Y , 1996. Sugeno, M . , Industrial Applications Feedback Control - Analysis and Design, of Fuzzy Control, Elsevier Science, N e w Y o r k , N Y , 1985. Sun Microsystem, Inc., Java™ http: //j ava. sun. com/products/j ava-medi a/j mf/ Media Framework, Available at: Tafazoli, S., C . W . de Silva, and P . D . Lawrence, "Tracking Control of an Electro-hydraulic Manipulator in the Presence of Friction," IEEE Trans. Control Systems Technology, V o l . 6, N o . 3, pp. 401-411, 1998. Tang, K . Z . , K . K . Tan, C . W . de Silva, T . H . Lee, and S.J. Chin, "Monitoring and Suppression of Vibration in Precision Machines," Journal of Intelligent and Fuzzy Systems, V o l . 11, pp. 3352, 2002. Tang, P . L . , A . N . Poo, and C . W . de Silva, "Knowledge-based Extension to Model-Referenced Adaptive Control with Application to an Industrial Process," Journal of Intelligent and Fuzzy Systems, V o l . 10, pp. 159-183, 2002a. Tang, P . L . , C . W . de Silva, and A . N . Poo, "Intelligent Adaptive Control in an Industrial Fish Cutting Machine," Trans. IEE Control Theory and Applications, V o l . 93, N o . 2, pp. 60-72, 2002b. Tang, P . L . , C . W . de Silva, and X . G . Wang, "Monitoring and Control of a W o o d - D r y i n g K i l n via Virtual Project Stations," Proc. IEEE Int. Symp. on Intelligent Control, Vancouver, Canada, pp. 568-573, 2002c. Tang, P . L . , C . W . de Silva, and X . G . Wang, "Intelligent Monitoring and Control of Industrial Processes through the Internet," Proc. ASME IMECE Symp. on Intelligent Systems, N e w Orleans, L A , V o l . 2,2002d. Tang, P . L . and C . W . de Silva, "Ethernet-based Predictive Control of an Industrial Hydraulic Machine," Proc. IEEE Conf. on Decision and Control, M a u i , H I , pp. 695-700, 2003a. Tang, P . L . and C . W . de Silva, "Ethernet-based Intelligent Switching of Controllers for Performance Improvement in an Industrial Plant," Proc. ASME IMECE Symp. on Intelligent Systems, Washington, D C , V o l . 2, 2003b. Tang, P . L . and C . W . de Silva, "Compensation for Transmission Delays in an Ethernet-based Control Network using Variable-Horizon Predictive Control," IEEE Trans. Control Systems Technology, 2005a. (In Press) Tang, P . L . and C . W . de Silva, "Stability and Optimality of Constrained M o d e l Predictive Control with Future Input Buffering in Networked Control Systems," Proc. American Control Conference, Portland, O R , 2005b. 192 BIBLIOGRAPHY Tang, P . L . and C . W . de Silva, "Stability Validation of a Constrained M o d e l Predictive Networked Control System with Future Input Buffering," ASME J. Dynamic Systems, Measurement, and Control, 2005c. (Under review) Tang, P . L . and C . W . de Silva, " A Reconfigurable System Architecture for Web-based Monitoring and Intelligent Supervisory Control of Dynamic Processes," IFAC J. Control Engineering Practice, 2005d. (Under review) Tipsuwan, Y . and M . - Y . Chow, " O n the Gain Scheduling for Networked PI Controller Over IP Network," Proc. IEEE/ASME Int. Conf. Advanced Intelligent Mechatronics, Kobe, Japan, pp. 640-645, 2003. T0ndel, P., Constrained Optimal Control via Multiparametric Quadratic Programming, Ph.D. Thesis, Department of Engineering Cybernetics, Norwegian University of Science and Technology, Tronheim, Norway, 2003. Tovar, E . and F . Vasques, "Real-time Fieldbus Communications using Profibus Networks," IEEE Trans. Industrial Electronics, V o l . 46, N o . 6, pp. 1241-1251, 1999. Walsh, G . C . , H . Y e , and L . Bushnell, "Stability Analysis of Networked Control Systems," Proc. American Control Conference, San Diego, C A , pp. 2876-2880, 1999. Walsh, G . C . , H . Y e , and L . Bushnell, "Stability Analysis of Networked Control Systems," IEEE Trans. Control Systems Technology, V o l . 10, N o . 3, pp. 438-446, 2002. Weaver, A . C . and X . Zhang, "Monitoring and Control using the Internet and J a v a ™ , " Proc. IEEE Industrial Electronics Society, San Jose, C A , pp. 1152-1158, 1999. X i a o , L . , A . Hassibi, and J.P. H o w , "Control with Random Communication Delays via a Discrete-time Jump System Approach," Proc. American Control Conference, Chicago, I L , V o l . 3, pp. 2199-2204, 2000. X i a o , L . , M . Johansson, H . Hindi, S. Boyd, and A . Goldsmith, Joint Optimization of Communication Rates and Linear Systems, Technical Report, Information System Laboratory, Stanford University, 2001. Y o o k , J . K . , D . M . Tilbury, H . S . Wong, and N . R . Soparkar, "Trading Computation for Bandwidth: State Estimators for Reduced Communication in Distributed Control Systems," Proc. Japan-USA Symp. Flexible Automation, A n n Arbor, M I , 2000. Zelinka, P., "Multivariable Predictive Control," Proc. IFAC New Trends in Design of Control Systems, Smolenice, Slovak Republic, pp. 175-181, 1997. Zhang, W . , M . S . Branicky, and S . M . Phillips, "Stability of Networked Control Systems," IEEE Control System Magazine, V o l . 21, N o . 1, pp. 84-99, 2001. Zheng, A . , "Robust Stability Analysis of Constrained M o d e l Predictive Control," Journal of Process Control, V o l . 9, pp. 271-278, 1999. Ziegler, G . M . , Lectures on Polytopes, Springer-Verlag, New York, N Y , 1995. 193 Appendix A Linear Matrix Inequalities The basics of Linear Matrix Inequalities (LMIs) and some standard optimization problems based on L M I s are briefly presented here. A n elaborate treatment of the theory and application of L M I s can be found, for example, i n Boyd, et al. (1994). Note that the symbols used i n the appendices do not exactly correspond to the ones used in the body of this thesis. A Linear Matrix Inequality ( L M I ) is a matrix inequality of the following form: n M(x) = M + Y x M >0 Q J i i (A.1) ;=i where JC = [X, ••• x J e R " and M are symmetric positive definite matrices, which are i given. Multiple L M I s can be assembled diagonally into a single L M I . The main advantage of the L M I representation and hence its wide acceptance stems from the ability to represent nonlinear convex inequalities i n an equivalent L M I form. Specifically, i f K(x) = K(x) T J(x)=J(x) , T and L(x) are matrices affine i n x, and governed by the following pair o f quadratic matrix inequalities: K(x)>0 J(x)-L(x)K(x)~ L(x)>0 (A.2) 1 then, by Schur complements, (A.2) is equivalent to the L M I : J(x) L(x) L(x) K{x) T >0 (A3) For example, the well-known Riccati equation of the form A P + PA + PBR B P+ T with Q = Q and R-R , T T and P = P l T T Q<0 (A.4) is the unknown variable matrix, can be expressed by 194 APPENDIX A LINEAR MATRIX INEQUALITIES the following L M I : A P-PA-Q PB T BP R T >0 (A.5) The standard LMI-based problems can be classified into four categories; namely, the L M I feasibility problems, the eigenvalue problems, the generalized eigenvalue problems, and the convex problems. A n L M I feasibility problem involves, given the L M I M(x) > 0 , determining i f a point x* satisfies M(x*) > 0. For example, from the basic inequality of Lyapunov stability: P>0 (A.6) T AjP + PA < 0 f o r i = l,...m i find i f P exists for a given A e W . Xn i A n eigenvalue problem is a convex optimization of the maximum eigenvalue A of a matrix subjected to constraints of the L M I form, specifically: min ^ *' s.t. Il-E(x)>0 (A.7) A where E(x) and F(x) andF(jc)>0 are affine i n JC. Equivalently, (A.7) can be expressed as an optimization of a linear function subject to an L M I constraint given as: m i n cx T (A.8) x s.t.M(jc)>0 Here, M(JC) is a symmetric matrix that depends affinely on the optimization of variable JC , and c is the coefficient vector of the appropriate length. The generalized eigenvalue problems have the general form: min i ' s.t. AF(x)-E(x)>0, X A F(JC) > 0 andG(x)>0 such that the maximum generalized eigenvalue of the pair of matrices E(x) optimized. Here, E(x) = E(x) , T F(x) = F(x) T (A.9) and F(JC) is and G(jc)=G(jc) are affine functions of JC. r 195 APPENDIX A LINEAR MATRIX INEQUALITIES The problem of (4.9) can be written in the equivalent form: ™? I(F(x),E(x)) x,X \ )} s.t. F (x) > 0 and G(x)>0 ( Note that the constraints are convex and the objective function X (F(x),E(x)) A 1 Q ) is quasi- convex, rendering (A. 10) a quasi-convex optimization problem. The last class of LMI-based problems, although less common, is the convex problems which have the form min x logdetEf*)s.t.E(x)>OandF(jc)>0 in which E(x) = E(x) T and F(x) = F(x) 1 T are affine in x . The above LMI-based problems can be readily and efficiently solved in polynomial time using methods similar to those used in related optimal programming; e.g., the ellipsoid algorithm, and the interior point method. Reducing a general problem to an LMI-based optimization problem can be considered equivalent to "solving" that original problem, even though a so-called "analytic solution" to the problem may not exist. Standard control engineering problems that can utilize the advantages of L M I include: multi-criterion Linear Quadratic Gaussian control law, M o d e l Predictive Control, robust identification, system realization, interpolation problems involving scaling, synthesizing % 2 and Ti^ output feedback control laws, and multi-objective output feedback control law. 196 Appendix B Multi-parametric Quadratic Programming The key to successful real-time implementation of the constrained state-space M P C policies as developed in the present thesis is the ability to formulate the M P C problems as a multi-parametric Quadratic Programming (mpQP) problem. This allows the computationally intensive operation of M P C optimization to be brought off-line, leaving simple and fast arithmetic computations during real-time operation. This appendix provides a brief introduction to m p Q P and the succeeding off-line and on-line algorithms for building and evaluating binary search trees from the prior results generated by the mpQP algorithm. Some enhancements that improve the computational efficiency of the algorithm for building the binary search trees are carried out. The off-line computation requirement for solving the m p Q P problem and building of the corresponding binary search tree are also discussed. B.l Preliminaries A s an integral part, m p Q P depends on the concept of polyhedral sets (Ziegler, 1995). Some fundamental definitions and concepts of polyhedral sets are given here. Definition B . l : A polyhedron is a convex set Q cz R n number of closed half-spaces Q = {x e R P = B.2: A polytope of a finite polyhedron given as for 3x e R. I Q x < Q }. n Definition given as an intersection x is a c bounded /'ct" {xeR \P x<P }. n x c A polytope ^ c l " , P = {xeR n \P x x <P } C The same polytope P is normalized i f (P ) x matrix P . x Fundamentally, a polytope P i is full dimensional i f P x < P x =1 where (P ) x i c n represents the /-th row of the can be described by its bounding vertices (vertex representation) as 197 APPENDIX B P = \xz MULTI-PARAMETRIC = x QUADRATIC PROGRAMMING (B.l) lL j j> ^ j^>lL j= a v 0 7=1 a a l 7=1 where v • is the j -th vertex of P, and n is the total number of vertices of P. v Definition B.3: If a linear inequality a x<b holds for V x e P, it is said to be valid for the T polyhedron P. A subset of a polyhedron \ a x — b}, for some valid inequality J ' = Pf]{xeR 7 n n-2, is called a face of P if it is represented by a x < b. The faces of dimension T and n — l are called vertices, edges, ridges, and facets, respectively. Definition B.4: The subspace a x =b in M " is called a hyperplane. A hyperplane T said to support a polyhedron B.2 0, 1, T P if one of the two closed half-space of 7/ contains 7/ e R n is P. The M p Q P Algorithm The potential of reformulating the M P C optimization problem with quadratic cost function and linear constraints as an mpQP problem was recognized by Bemporad, et al. (2002). A s given i n (4.17), the standard Q P formulation to the M P C cost function is v (x ,n )=™ [\x Y x n H k k s.t. G n r where the II T k U H H T k+\ "' U +\n j n T H k r T k H r +x F n ] T H k r H <W +E x r T r k ~\T k+H-\ e U R is the control input vector to be optimized mH based on the current state x . The purpose of reformulating (B.2) into the equivalent m p Q P k form, where both the input and state variables are treated as optimization variables, is to establish an algorithm to express the optimal control input vector II* as an explicit, H continuous piecewise affine linear function of x ; i.e., TI* = g(x) where g : A? — » R k within m / / H a polyhedral set (state-space) o f i ' e E " . Specifically, the polyhedral set A? can be partitioned into i convex polyhedral regions Af such that g(x) = H' x+k' { g g for V J C S ^ . Before proceeding further, define s = n +r Fjx l H r k (B.3) to obtain the equivalent mpQP form of (B.2) as: 198 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING V (x ,n )=T H s.t. in which E = E +G J~ Fj r r (B.4) k G s<W r + Ex r s k . x s k r Theorem B . l (cf. Bemporad, et al, 2002): Assume Y >-0. Consider a combination of active s constraints G , W A A r and E , and assume that the rows of G A A are linearly independent. Let Af be a set of all vectors x, for which such a combination is active at the optimum. Then, s Q and the associated vector of nonnegative Lagrange multipliers X are uniquely defined afftne functions of x given as: s=Y^(G?) (GX- (G ) Y(W E x) T l A T X= - (B.5) A r r + GX'(Gff s (w +E,x) A r (B.6) over the critical region Af . Q Proof: This follows directly from the first order Karush-Kuhn-Tucker ( K K T ) optimality conditions (see Bemporad, et al., 2002). • A compact representation of Af = {x e Af I R^x < q } can be obtained by substituting (B.5) Q Q into the inequality constraints of (B.4) and enforcing nonnegativeness of (B.6), arriving at the following theorem. Theorem B . 2 (cf. Fiacco, 1976): For the problem (B.4), in the neighborhood of the vector of parameter values x , there exists a unique and once continuously dijferentiable function of the 0 s(x) X(x) j where s(x) is a unique isolated minimizer for (B.4), and = -Mo N [ 0 (B.l) 199 APPENDIX B s (Or)' Y where M = • QUADRATIC PROGRAMMING (G )l r -\{G \ r 0 (B f (^E \) s in which (G ). r V =(G ).s(x )-(W t MULTI-PARAMETRIC r 0 r ... T S denotes the i-th row of G , r ).-{E )., (W ). denotesthe s r (\(E,)J (E ). denotes the i-th row of s i-throwofW , r and B e R m H x n s E, s is a null matrix. Proof: see Fiacco (1976). The K K T pair of (B.7) is obtained as: s(x) = -MQ N [X-X ] 0 X(x) s(x ) 0 + 1 0 (B.8) X(x ) 0 Hence, the critical region Af = {xe Af I R x < q } is defined as the set of x where the solution 0 0 0 to (B.8) remains optimal. Af is obtained by removing the redundant constraints from a set of 0 inequalities Af given by R Af =\x^Af G s(x) <W A R A r + E x, X (x) > o} A (B.9) A k The set Af itself is established by substituting s ( x ) into the inactive constraints ( ) i n (B.4) A R while maintaining the positivity of ^ ( x ) corresponding to the active constraints ( ) . A Having defined Af , the remainder of the state-space Af Q rest =Af-Af Q can be partitioned by utilizing the following theorem. T h e o r e m B . 3 (cf. Bemporad, et al., 2002): Let AfeR n polyhedron subset of Af where Af Q Af^lxe Af 0 . Also let the polyhedral R x>q i i be a polyhedron, and Af Q a Af[ be represented as: .>for i = l,...,dim(<7) RjX <q- for V / < i (B.10) 200 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING A\m(q) — [J Af . Then, the following conditions apply: (i) Af \] Af^= A?, and (ii) and let Af rest { rest 1=1 A' r\A'i o = 0 and Af^Af- = 0 forVj'-£ j; i.e., the partitions [Af ,A\,..., 0 Af } A{m(q) form the entire polyhedron Af. Proof: see Bemporad, et al. (2002). • Note that each polyhedral region Af^ is basically bounded b y / number o f individual T T hyperplanes expressed i n the linear equation representation r x = q where r t t x is the / -th row of Rj and q is the /-th element of qj of (B.10). Neighboring and possibly non-neighboring l regions may share the same hyperplanes. The optimal control law I7* = g(x) H corresponding to each partitioned region Af can be directly determined from (B.3) and (B.8). The m p Q P i algorithm is then given as follows: 1. Obtain JC by minimizing (B.4) with x as a free variable within a given space JC e Af. 2. Compute s(x ) and A(x ) from the solution of (B.4) with JC = JC . 3. Determine s(x) and A(x) from (B.8). 4. Define Af according to (B.9). 5. Obtain Af by removing the redundant constraints from Af . 6. Set Af-^Af^ and define the corresponding control input function g, (x). 7. Define the remaining unexplored region Af 8. If Af 0 0 Q 0 R Q R rest rest according to Theorem B . 3 . ± 0 repeat 1-7 for the remaining unexplored space Af ; else exit. rest After partitioning a predefined polyhedral state-space into separate regions where each region corresponds to a linear control input function, a fast and efficient algorithm to pinpoint the region to which a particular state x k belongs (during real-time controller execution) is required. This is achieved through a binary search tree algorithm and is derived i n the next section. B.3 Off-line Binary Search Tree Algorithm Due to the convexity of the partitioned polyhedral regions, an off-line binary search tree can be built so that during run-time, a given particular state JC^ can be efficiently associated 201 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING with its corresponding region and hence the control input function by just traversing the branches of the search tree. Each branching node w i l l only require evaluating one linear inequality associated with one of the unique hyperplanes that define the region. The algorithm for building the binary search tree in this thesis is based on the algorithm proposed in T0ndel (2003). Enhancements have been made to the original algorithm mainly to improve the computational speed, better memory management, and lower memory requirements for both off-line and on-line execution. B.3.1 Methodology Consider n number R of partitioned corresponding control input functions g {x), x regions \A? ,A? ,...,A? }e x g (x),..., 2 g (x). 2 nR Af, nR having their In the conventional M P C policy when the first optimal input sequence is used, there may be more than one region having the same control function. However, subsequent future control input sequences are used in the MPC strategies developed in this thesis rendering a unique control input function to be associated with each partitioned region. Let the n h partitioning be designated as h :rjx l index representation =q l unique hyperplanes that define the region for l = \,...,n . h J7~ of a polyhedral sub-space Define d (x) = r^x-q . l P(J7") of l Af (containing Let the and/or intersecting one or more partitioned regions) indicate a combination of hyperplanes with the sign of d (x). ( J (JC)>0, 2 For example, Jf = d (x)<0, and d (x)<0. 5 6 indexed as the set 2'(J ) r = {i\Af f)P( y~) j L J means a polyhedral sub-space is located at Let the set of polyhedral regions within P(fT) be is full dimensional}. The intended mechanism of the binary search tree for the M P C controller is to evaluate d (x) l = rj x-q r t at each node to determine its sign for a given x& Af. Based on the signs of each node, the tree is traversed from the root node to an eventual leaf node which is associated to a particular region Figure B . l shows an illustrative example of an R Af . { state-space with 6 partitioned regions. The corresponding desired binary search tree is also shown with a total of 11 tree nodes and a tree depth of 3 layers. Designate N k as a node of the tree where k is the node number (not the sample time). A 202 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING = {l,-,6} = 0 I ={4,5,6} S ={K) ^ ={1,2,3} 2 2 A? ^ ^ ={5,6} ={4} ^6 = {1} 7 ^6 No No N, 10 Z,={6} •Zi={5} Jfc, = ex N k 7 = {3} of a partitioned polyhedron with its is used to maintain a list of indices of unexplored nodes. A n unexplored non-leaf node w i l l contain (T ,jT ) k k in which J~ is the signed index set of hyperplanes gathered while k traversing the search tree from the root node to N k T(J A, ^a {hi,lh,h^ Figure B . l : A n illustrative example corresponding binary search tree. set U 7 T = {2,3} ^7 = {fy A } U hf) c ( 1 ( J ) n T(hj)). and I k = J T ( J ^ ) . It should be noted that The following lemma distinguishes the difference between the two sets. L e m m a B . l (cf. T0ndel, 2003, pg. 71) : If ie Z(J)[\l(h+) divided into two full-dimensional i e T(^7") f l 2~(hf)r\ ZQiT). polyhedra The same applies with by but i& I(J\}h^, then ^ the h ; hyperplane { is i.e., hj. 203 APPENDIX B The exact T k t PROGRAMMING can be determined by solving the two Linear Programming (LP) problems of ™ ^. d (x) and ^ n MULTI-PARAMETRIC QUADRATIC d (x) for each i e I(J) f| T(h^)C\ T(h~). B y examining the signs of the t optimal values of these two L P problems, the side of each hyperplane h a particular region Af t { belongs to or intersects can be determined. A n optimal value of zero indicates that the hyperplane is one of the faces of the polyhedral region. It should be noted that each hyperplane has its own "sense" of ' + ' and ' - ' directions independent of the states x . In the present thesis, the L P problems are solved using C-Library cddlib (Fukuda, 2003) i n C++ programming language, which implements a dual simplex method. The algorithm for building the binary search tree is given in Table B . l in pseudocode form. y l / ' Q denotes the number of elements i n a set. The memory requirement for this algorithm is large since each node and each hyperplane needs to store its associated regions. The number of regions and hyperplanes of an M P C controller typically grows i n an exponential manner with the dimension of the system, the horizon length, and the imposed constraints. These numbers can be easily i n the order o f thousands for a low order system (see Section B.3.2) requiring hundreds of Megabytes of memory. In order not exceed the capacity of the random access memory ( R A M ) of the computer, without adversely affecting the computation speed, the less frequently accessed variables are stored i n a binary file while the frequently accessed variables; e.g., _Zjf, are allocated memory dynamically on an as needed basis. It can be observed from the binary search tree building algorithm that it contains two most computationally intensive double loops (lines 9-15 and 36-42) i n which each cycle requires the optimization o f the L P problems of ™^.d,(jc) and ™*^<i (jt). In order to reduce the computational time as well as the z tree depth and hence the total number of nodes for a particular M P C controller, a minimum number o f remaining regions A/" (T ) MIN K for defining a leaf node is preset (instead of branching the search tree until each leaf node corresponds to one region, as shown i n Figure B . l ) . During run-time of the real-time controller, a sequential search (see Section B.4) is carried out to find the target region (and hence the control input function) after traversing the search tree and reaching a leaf node. In the present work, the worst case sequential search time is less than the sampling period of the M P C controller (using a Pentium III 1 G H z processor) i f A/~ {T ) MIN K is set below 250 regions. 204 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING Table B . l : Pseudocode for building the binary search tree of an M P C controller. 1 Load 2 Create 3 for 4 a l l partitioned files (each for Sort, 6 Skip 7 } 9 for 10 unique (each the 13 the that 15 )' for 17 (each for 18 unique (each n d Z{hT) hyperplanes the Z{h*) state-space a n d Z(h[) borders by solving and comparing -„d,(x'\ mxf and in hyperplane) region) both index sets each ( { unique hyperplane with its defining regions } } 21 Initialize the index 22 Initialize the set 23 Set 24 while =0 /jj and the Arbitrarily Determine 27 Sort 28 for 29 30 select the (each remaining the } 32 Sort 33 the max 37 38 to region the in } 43 Select the nodal the child 1/ to the ascending consider) regions numerical in Z k order { Z(jr )C\Z(h[) and k / ( / ( / ^ n / f / f ) ) ) in ascending order of h ' s from a the sorted Z(J )r\Z~(hf)f)Z(h[)) i r set l i s t { k and z k to h k = Z(J by solving and >d according with \JH[) k ar candidates node with k minmax to m a x (jV(Z ), k (A/~(Z ), Af(Z )) k k Af (Z )) k and associate N K n d N K and set the current node N K parent set of k mia regions k 50 (Af{Z )>Af „(Z )) } / / end of while 51 Save the the nodes (yV(Z )>Af (Z )) k be in k hyperplane current + i f from k k 42 i f k Af(Z(J )T\Z(K[))) solutions hyperplane the { Z(J )[\Zi$) candidates k the the Store to of Z += Z{J \Jhf) sets } their sets candidate) Rank as { corresponding considered hyperplanes 41 2 fif node k 40 Create a hyperplane hyperplane (each with be hyperplane comparing i t Z =( all regions ) ={N ) k hyperplanes k Find 39 1/ k the (each for n <jV{Z(J )C\Z(hf)), min max for with as fl ZQi[)), JV(.Z(J ) (~| Z(hf))) k 35 node nodes (Af{Z{J- )[]Z(rf)), remaining Determine root AC^ (Z ) intersecting max (Af{Z(J ) the a n d remove of hyperplanes Determine 31 set the Find of unexplored { a 26 set of minimum (Af(Z/ )>0) 25 4 9 a { d,(x) regions 20 48 Z(h*) { unique define sets to split Associate 19 47 memory sets } 16 46 index { index solutions Included 14 45 a l l hyperplane) region) Compute 12 44 of hyperplane) and s t o r e hyperplanes (each for 11 36 structured { associating index into storage } 8 34 regions temporary region) (each 5 for mi k binary search Z k a n d z~ in the respective Add the child node A£ into Add the child node N~ into tree in a pre-specified child node i/ a l/ text ex format 205 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING Table B . 2 shows an excerpt from the text format for saving the binary search tree of an M P C controller used i n this thesis. Each node is stored in a line where the first 4 numerical entries are the corresponding nodal hyperplane, the 2 child nodes, and the number of regions Af(T ), respectively. The subsequent entries are the indices of the regions. Each hyperplane k is stored i n a line i n the form rj the number after the text q J while each region is stored i n the form \R t q ] where t t indicates the number of rows o f [R q ]. The "::Rl:Rq" ( corresponding control input function is located after each region, i n the form { H' k'„ |. Table B . 2 : A n excerpt from the text format for saving a binary search tree of an M P C controller. @// Controller :Horizon / / 15 of :Number of inputs :Number of nodes :Number of hyperplanes :Number of regions Nodes states (Depth 10440 ::N909: 0 0 2 3 0 75 = 4 = = = 1 909 = = 18896 6154 9) 6154 1 4630 2 3 4 4832 5 6 5217 7 8 5218 • • • 6150 6151 6152 6153 6154 • • • 6062 6063 6066 6067 6068 6077 Hyperplanes ::H1: -0.488419 ::H18896: / / = :Number ::N1: / / parameters length -0.115701 -0.352372 -0.651252 -0.175715 0.569149 0.700649 0.031239 -0.595020 -0.058510 Regions ::R1:Rq24 0.000000 1.000000 0.000000 -1.000000 0.000000 0.000000 0.000000 -0.136572 -0.024657 -0.334505 0.020349 1.000000 0.000000 0.717317 0.558848 1.000000 -0.682785 -0.758538 0.065461 0.055683 ::R1:Hk -3.127023 -0.740758 -4.169526 3.643878 0.000000 -1.912031 -0.570619 -2.999832 3.044070 0.000000 2.683680 0.291840 1.710521 -0.410551 0.000000 2.987808 0.331897 1.966618 -0.538040 0.000000 0.000000 -1.000000 1.000000 ::R2:Rql3 ::R6154:Rq6 0.000000 0.000000 -0.276432 0.296278 0.028682 -0.028400 0.582242 -0.764039 0.056276 -0.566065 0.768753 -0.056192 -0.000000 0.000000 -0.199999 ::R6154:Hk 0.000000 -0.000000 -0.00000 0.000000 0.000000 -0.000000 0.199999 206 APPENDIX B B.3.2 MULTI-PARAMETRIC QUADRATIC PROGRAMMING Computational Complexity The complexity of the binary search tree mainly depends on the number of states JC e M.", the number o f inputs ueR , m the length of the prediction horizon H, and the number o f imposed constraints. Table B.3 shows a simple comparison of the time required to build the binary search trees subjected to different lengths of prediction horizon and state-input constraints, for controlling one axis of the electro-hydraulic manipulator system of the fish processing machine, which is experimental platform used i n the present thesis (see chapters 2 and 4). The minimum number of remaining regions i n leaf nodes is set as A/ (2~ ) min Input and state constraints are of the forms - c , < u < c t 2 k = 100. and - c < JC, < c , respectively. The 3 4 binary search trees building algorithm is coded i n C/C++ programming language for optimal speed (approximately 30 times faster than the identical algorithm coded i n Matlab®) and they are executed on a computer with a Pentium I V 2.2 G H z processor and 1 G B o f memory. It can be observed that the number of regions and hyperplanes increase rapidly with the length o f the prediction horizon and more rapidly with the number of imposed constraints. Computation time increases exponentially with the number of regions and hyperplanes. Hence, although able to achieve very fast on-line optimization of the M P C control policy, the concept of partitioning the state-space using the method of m p Q P and then constructing a binary search tree may not be attractive for higher order servo systems. Table B . 3 : Comparison of the computation time requirements for building binary search trees subjected to different complexities of an M P C controller for a 4-states-linput system. Horizon length 13 No. of regions 1411 No. of hyperplanes 4052 No. of inputs constrained 1 No. of states constrained 0 Time taken 15 1589 4274 1 0 12 mins. 10 2271 13009 1 1 2hrs. 10 3115 14194 1 2 4 hrs. 13 10358 51106 1 2 13 firs. 18 52948 65512 1 2 15 days 9 mins. 207 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING B.4 On-line Traversing of the Binary Search Tree Table B . 4 gives the pseudo-coded on-line algorithm for arriving at the right optimal control input function for a given state vector JC . The binary search tree is first traversed from the root node to a leaf node containing a set of regions i n which one of them encloses the particular state vector JC . The target region is then determined by sequentially testing each o f the remaining regions. Note that the binary search tree is read i n advance during controller initialization. Table B . 4 : Pseudocode for traversing and sequential searching o f the binary search tree during controller operation. 1 Read 2 Initialize the 3 / / 4 while current Traverse is Evaluate 6 if 7 binary not the a x node to the search leaf distance root node pj tree node) { d (x)=r[x-q l between [ the nodal hyperplane and x U,(x)>0) Set N k+] to the corresponding child node pj+ pf to the corresponding child node N~ else 9 Set 10 } 11 / / 12 for 13 k+i Sequential if 14 (each search through remaining (RiX-q^O) Evaluated 15 region the J\f{T ) k remaining regions ) { i the optimal control input function ]j* = g(x) = H x+k i i g g break 1 16 17 state starting the (N 5 8 the } 208
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Network-enabled monitoring and stable control of dynamic...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Network-enabled monitoring and stable control of dynamic systems Tang, Poi Loon 2005
pdf
Page Metadata
Item Metadata
Title | Network-enabled monitoring and stable control of dynamic systems |
Creator |
Tang, Poi Loon |
Date | 2005 |
Date Issued | 2009-12-23T00:56:05Z |
Description | The integration of computers, communication, and control in modern distributed systems such as intelligent transit systems and industrial facilities has garnered a great deal of attention in recent years. This thesis presents an investigation into basic research, technology development, and implementation of monitoring and control strategies for networked-enabled dynamical systems. In view of the hierarchical nature of these systems, the thesis focuses on two important system layers; namely, networked control systems within the direct-control (servo) layer, and remote monitoring and supervisory control within the supervisory-layer. In the present work, a networked control system (NCS) comprises the traditional components of a control system such as a plant, sensors, actuators, controllers, and signal conditioning and modification devices, but may be geographically distributed and linked through a communication network. In particular, in an NCS, the traditional feedback control loops are closed through a real-time communication network. A primary objective of the present thesis is to investigate, analyze, develop, implement and test stable control strategies to overcome the transmission problems between sensors, actuators, and controllers in an NCS; specifically, non-deterministic delay, losses, vacant sampling, and mis-synchronization of data/information. The term networked control is used in this thesis to mean the control of a networked system, and a networked system with a controller as an integral part is an NCS. In this thesis, a new networked control strategy is developed which takes advantage of the potential capability of constrained Model Predictive Control (MPC) to compensate for anticipated data transmission problems. The constructive and computationally inexpensive strategy, which is developed here, uses predictions of future control actions and estimations of possibly erroneous sensory signals, to maintain good performance and stability of a closed-loop NCS, through an innovative method of information buffering. Network and computational loads are effectively minimized by incorporating variable prediction horizons. Performance is further improved through adaptive weight sequencing enhancements. The analytical issues of system stability of the new networked control strategy are rigorously treated in the thesis. The analysis is carried out in two stages. In the first stage, prefect state measurement is assumed to develop the necessary and sufficient conditions for guaranteeing closed-loop asymptotic stability while utilizing predicted future control actions that are suboptimal. Stability is achieved in the sense of Lyapunov by imposing a terminal cost and bounding it without end constraints, and projecting the instantaneous states to the terminal states. Feasibility, which in turn implies stability, is proven in the context of this suboptimal control strategy. The stability surfaces generated from the resulting theorems are particularly useful as design guidelines to determine the effective worst-case delay that can be sustained by the networked control strategy. The second stage of stability analysis assumes imperfect state measurement with the purpose of determining the amount of deviation between the actual states and the estimated states that can be sustained in stable manner by the developed networked control strategy. This is accomplished by establishing bounds for the evolution of future inputs and states, employing the concept of perturbation sensitivity in nonlinear programming, and based on Lyapunov's second method. The theorems that result from the second analytical stage serve as a precise criterion in the design of extended state observers for compensating possible transmission problems between sensors and controllers of a networked system. The functionality of a networked control system may be further enhanced by integrating the capability of remote monitoring and supervisory control into the upper layers of the hierarchy of the system. As a contribution in this direction, a framework for developing a universal and scalable network infrastructure for web-based monitoring and supervisory control of dynamic systems is developed in the present work. Practical implementation of this framework is detailed, using a low cost and flexible two-tier client-server architecture, where a user is able to remotely carry out a variety of tasks including system operation, experimentation, process monitoring and supervision, task scheduling, system reconfiguration and tuning, control, and safety/emergency routines, through a web-browser interface. A single web-server provides smooth information flow using a robust and intelligent scheduling scheme. The flexibility and modularity of the developed network architecture provide the rationale for further incorporation of a multi-layered intelligent supervisory control structure with the objective of on-line improvement of the performance of a process. A remote supervisor, which incorporates knowledge-based decision making, continuously monitors the performance of the process to infer the best adaptive controller (and the best tuning actions, if needed) for the process under the existing conditions. The strategies of networked-enabled monitoring and feedback control, as developed in the present work have been implemented on an industrial fish-processing machine using an Ethernet communication network. The developed and analyzed technologies are thoroughly evaluated and validated through experimentation under a variety of operating conditions in real-time, and are demonstrated to be practical, beneficial, and technically sound. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Collection |
Retrospective Theses and Dissertations, 1919-2007 |
Series | UBC Retrospective Theses Digitization Project |
Date Available | 2009-12-22 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0080703 |
URI | http://hdl.handle.net/2429/17124 |
Degree |
Doctor of Philosophy - PhD |
Program |
Mechanical Engineering |
Affiliation |
Applied Science, Faculty of Mechanical Engineering, Department of |
Degree Grantor | University of British Columbia |
Graduation Date | 2005-11 |
Campus |
UBCV |
Scholarly Level | Graduate |
Aggregated Source Repository | DSpace |
Download
- Media
- [if-you-see-this-DO-NOT-CLICK]
- ubc_2005-105798.pdf [ 15.99MB ]
- [if-you-see-this-DO-NOT-CLICK]
- Metadata
- JSON: 1.0080703.json
- JSON-LD: 1.0080703+ld.json
- RDF/XML (Pretty): 1.0080703.xml
- RDF/JSON: 1.0080703+rdf.json
- Turtle: 1.0080703+rdf-turtle.txt
- N-Triples: 1.0080703+rdf-ntriples.txt
- Original Record: 1.0080703 +original-record.json
- Full Text
- 1.0080703.txt
- Citation
- 1.0080703.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Country | Views | Downloads |
---|---|---|
United States | 19 | 6 |
China | 13 | 22 |
Russia | 9 | 0 |
France | 4 | 0 |
Canada | 3 | 0 |
United Kingdom | 1 | 0 |
Indonesia | 1 | 0 |
Netherlands | 1 | 0 |
City | Views | Downloads |
---|---|---|
Penza | 6 | 0 |
Ashburn | 6 | 0 |
Unknown | 6 | 3 |
Mountain View | 6 | 2 |
Shanghai | 5 | 0 |
Shenzhen | 4 | 22 |
Saint Petersburg | 2 | 0 |
Vancouver | 2 | 0 |
Chengdu | 2 | 0 |
Irvine | 2 | 0 |
Walnut | 2 | 0 |
Hefei | 1 | 0 |
Buffalo | 1 | 0 |
{[{ mDataHeader[type] }]} | {[{ month[type] }]} | {[{ tData[type] }]} |
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0080703/manifest