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 FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE F A C U L T Y OF GRADUATE STUDIES (Mechanical Engineering) THE 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 (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 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 Model 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 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. iii Table of Contents Abstract i i Table of Contents iv List of Tables v i i i List of Figures ix Nomenclature xiv Acknowledgment xvi i i Chapter 1 Introduction 1 1.1 Goals of the Research 4 1.2 Scope of the Study 4 1.3 Related Work 6 1.3.1 Networked Control Systems 6 1.3.2 Mode l Predictive Control 9 1.3.3 Stability in Model Predictive Control 12 1.3.4 Remote Monitoring and Supervisory Control 14 1.4 Contributions and Organization of the Thesis 15 Chapter 2 Control Network Architecture and System Modeling 18 2.1 Control Network Architecture 18 2.2 Clock 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 Model Validation 36 2.5 Summary 45 Chapter 3 Predictive Networked Control with Future Input Buffering 47 3.1 The Networked Control Strategy 47 3.1.1 Transparency of Transmission Delays 48 iv TABLE OF CONTENTS 3.1.2 Min imum Effort Estimator 50 3.1.3 Mul t ivar ia te 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 72 Chapter 4 Stability of Predicted-Input Control 73 4.1 The Predictive Control Strategy for Networked Systems - Revisited 73 4.2 State-space M P C formulation 77 4.2.1 The Regulator Problem 77 4.2.2 The Reference Tracking Problem 81 4.3 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 Ma in Stability Results 94 4.4 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 CONTENTS 4.7 Summary 114 Chapter 5 Stability Under Imperfect State Measurements 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 Flow 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 Limitations and Suggested Future Research 184 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 202 B.3.2 Computational Complexity 207 B.4 On-line Traversing of the Binary Search Tree 208 v i i List of Tables 2.1 Comparison of four typical communication networks 27 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 6.1 The types of messages for communication between the middle server and the control server 143 6.2 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 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-l-input system 207 B.4 Pseudocode for traversing and sequential searching of the binary search tree during controller operation 208 v i i i 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 2.4 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 2.5 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 Mode 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 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 41 2.12 Bode plot of the identified transfer function model 41 i x LIST OF FIGURES 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 2.14 Residual analysis for state-space model identification. Horizontal dashed bars indicate 99% confidence levels, (a) Autocorrelation of residuals for state xx; (b) Cross-correlation function between input and residuals from state x , ; (c) Autocorrelation of residuals for state x2; (d) Cross-correlation function between input and residuals from state x2; (e) Autocorrelation of residuals for state x 3 ; (f) Cross-correlation function between input and residuals from state x 3 ; (g) Autocorrelation of residuals for state x4; and (h) Cross-correlation function between input and residuals from state x4 44 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 xx; (b) State x2; (c) State x 3 ; and (d) State x 4 45 3.1 The developed networked control system (NCS) 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 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-to-actuator delay; and (f) Round-trip delay 68 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-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 over different values of future error weighting (Q) 70 x LIST OF FIGURES 3.10 System response subjected to different speed settings under different levels of network delay, (a) rrU = 3 ms; (b) Trtt =11 ms; and (c) Trtt 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 of the M P C policy with future input buffering 76 4.3 Stability boundaries with uhm = 0.20. (a) Stability surface for P0 - 0 .251^ ; (b) Stability surface for PQ - U„; (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 xca = 8 100 4.4 Stability boundaries with u]im - 0.20 and p = 0.99 . (a) Stability surface for PQ = 0.251/^; (b) Stability surface for PQ=Uca; (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 TCA =8 . . . 102 4.5 Controller-to-actuator transmission delay TCA using the intermediate F IFO packet forwarding queue, (a) 1-step delay; (b) 5-step delay; and (c) 9-step delay 103 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 of the cylinder Ph [psi], pressure at the rod-side of the cylinder Pr [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 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) 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 Ph [psi], pressure at the rod-side of the cylinder Pr [psi], and input 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 Ph [psi], pressure at the rod- side of the cylinder Pr [psi], and input current u [mA]). (a) Initial piston position = 5 mm; (b) Initial piston position = 2.5 mm; (c) Initial piston position = - 2 mm; and (d) Initial piston position = - 4 mm 110 x i 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 Ph [psi], pressure at the rod-side of the cylinder Pr [psi], and input current u [mA]). (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 I l l 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 113 5.1 Variation of the maximum Kz on the estimated state plane of xx-x2 with = x4 = 0 under a prediction horizon H = 5 and a terminal weight matrix P0=0-5E/oo 132 5.2 Variation of the maximum KB on the state plane of xx-x2 with JC 3 = x4 = 0 under a prediction horizon H = 5 and a terminal weight matrix P0 = O.SU^ 132 5.3 The effect of P0 and H on stability based on the original model, (a) Maximum bound of Ke; (b) Maximum bound of KB; and (c) Maximum bound of Kz 133 5.4 The effects of P0 and H on stability based on the reduced model of the system, (a) Maximum bound of Ke; (b) Maximum bound of KB; and (c) Maximum bound of Kz 134 6.1 The general infrastructure for collaboration among different research institutions. . 138 6.2 Simplified hardware architecture for web-based remote monitoring and supervisory control of a system 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 x i i 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 M R A F C 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 KP 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) KP; (f) Kf, and (g) KD 176 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) KP; (f) Kf, and (g) KD 177 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) Kp\ (f) Kf, and (g) KD 178 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) Kp\ (f) Kf, and (g) KD 179 B . l A n illustrative example of a partitioned polyhedron with its corresponding binary search tree 203 x i i i Nomenclature Notations R set of real numbers RN vector space of n -tuples over R \\x\\ Euclidean norm of vector x e R" (equivalent to or sjxf + ) \\x\fp norm of l e i " with weight P (equivalent to xTPx or \\Px\\2 in literature) |~-~| nearest integer towards positive infinity |_-J nearest integer towards negative infinity a.fi,bfl denominator and numerator coefficients of a Butterworth filter a,, bt 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 Cc control client node Cs control server node E [ ] expectation (probabilistic) or mean value fs sampling frequency Guy(z~l) discrete-time transfer function from u to y h sampling period H general prediction horizon of a predictive controller Hl minimum prediction horizon of a predictive controller x iv NOMENCLATURE HI maximum prediction horizon of a predictive controller control horizon of a predictive controller h dead-band compensation constant I n identity matrix of size nxn k discrete-time step KB bounding gain of cost evolution Ke upper bounding gain of state estimation error Kz bounding gain of input-state parametric evolution KP proportional gain K, integral gain KD derivative gain m number of system inputs; gradient of a curve rh estimate of clock gradient Mp 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 Ph head-side cylinder pressure Pr 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 tabs absolute clock time f a time-stamps at event a at node C . 1P time at the first peak of a step response X V 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 x v i NOMENCLATURE con undamped natural frequency £ damping ratio Abbreviations C A N Control Area Network C A R T M A Controlled Autoregressive Integrated Moving Average C R C Cycl ic Redundancy Check C S M A / C D Carrier Sense Multiple Access with Coll is ion Detection G P C Generalized Predictive Control IP Internet Protocol I T A E Integral Time Absolute Error L A N Local Area Network L M I Linear Matrix Inequality M P C Model Predictive Control mpQP multi-parametric Quadratic Programming M T U Maximum Transfer Unit N C S Networked Control System(s) N I C Network Interface Card N T P Network Time Protocol P R B S Pseudo-Random Binary Sequence QP Quadratic Programming T C P Transport Control Protocol U D P User Datagram Protocol U T C Coordinated Universal Time W A N Wide Area Network x v i i Acknowledgment I wish to express my sincere appreciation to my supervisor, Prof. Clarence W . de Si lva for his invaluable guidance, persistent advice and strong support throughout the entire process of my graduate studies. I thank him for taking an active interest in my work, his attentiveness and patience in 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 Si lva has unconditionally spent on me. I would also like to thank my previous Master's research supervisor, Prof. Aun-Neow 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. Vinod 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 (UGF) , Ph.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 xv i i i 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 Counci l of Canada - Institute for Fuel Ce l l Innovation through the Research Officer, Dr. George X . Wang. The kind assistance from the department staff; particularly, M s . Lanna Lok, M s . Sheilla Dagta, M s . Chotivan Manglanond, M s . Jan Marsden, M r . Dan Miner, M s . Barb Murray, M r . Alan Steeves, M r . Gord Wright, and M r . Perry Yabuno, is kindly appreciated. Thanks also go to Prof. Elizabeth Croft and her students; namely, Dr. Daniela Constantinescu, M s . Dana Kul ic , M r . Wi l l i am 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. x l x 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 (FMS), and Reconfigurable Manufacturing Systems (RMS) (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 network architecture provides the attractive features of easy installation, 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 (NCS) 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 of 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 network- communication 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 safety- critical 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. Of late, there has System A • Actuator A.2 Process Monitoring Terminal Sensor A.2 Actuator A. 1 Sensor A. 1 Network (Fieldbus, Profibus, ControINet, Ethernet, Wireless) Actuator B . l Controller System B SensorB.l Sensor B.m | Supervisory Computer m a | (—| | Figure 1.1: A generic factory network. 2 CHAPTER 1 INTRODUCTION Controller 1 System Actuator Sensor D/A 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. Whi le 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 (NCS), 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 Model Predictive Control (MPC) . 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 in 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 client- server 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; client- server 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. Uti l iz ing 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 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 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, Xiao, 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 discrete- time 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. Xiao , 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 Yook, 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 (MATI ) , 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 (LQG) 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 (Khal i l , 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 Model 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 in 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 Van Cuawenberghe, 1985), and Generalized Predictive Control (GPC) (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 1 is 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 first- order-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 (LMI) (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 control modeling paradigm (Skogestad and Postlethwaite, 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 QP 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 QP optimization algorithms have been developed. Chisci , et al. (1994) proposed an algorithm for fast online computation of the Generalized Predictive Control (GPC) 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 QP problem into an equivalent linear optimization problem using Newton-Raphson iteration, requiring only a fraction of the QP 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 quasi- infinite 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. On 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. Two suboptimal versions of M P C with relatively modest computational requirements were utilized to validate the idea. Limon 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. Wi th 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 TCP/IP (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 via a C G I interface (Common Gateway Interface). Gu 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 Luo (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. Wi th 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 Lab 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., LabVIEW™ (National Instrument) and WebLab (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. New 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. Wi th regard to the effect of state mismatch in the sensory data estimation on the closed- loop 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 in (Tang and de Silva, 2003a) and accepted for publication in (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 client- server 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 (NCS). 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 in 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 wi l l describe the dual-axis electro-hydraulic manipulator of an industrial fish-processing machine, which forms the main experimental system in this thesis. Model 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 ARCHITECTURE AND SYSTEM MODELING Control Client - PHI lGHzw/ 100Mbps - Win2K w/ RTSS P Intermediate Node A - 2KB buffer queue Control Server -P-200MHz w7 10Mbps -PCL-812 AD/DA Card -WinNTw/RTSS # ^ Intermediate NodeB - 2KB buffer queue Physical System Ethernet Network - Sensor Measurement Internet/External Traffic Flow Figure 2.1: Simplified data flow layout of the developed control network architecture. 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 Sub- system. 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 - lGHz processor running on Windows 2000 with Real-time Sub-system. No data acquisition hardware is required at the control client except for a low cost NIC . 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 in 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 Module I a Shared Memory Area Data Receiver M a i n C l k Sync , 6 Time B a s e 7 / \ " Sensor Reading + Filter 1 Data Sender states .V c T w o r k M ••(/;' // in Servers y orx Data Sender M a i n , C l k Sync^. Time Base ^ G U I 2 Shared Memo )ry Area Controller Data Receiver Clients Trajectory Generator Figure 2.2: Schematic diagram of the end-to-end client-server control network architecture. 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 in 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 time- stamping 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 connection- orientated 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 T C P , 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 (NCS) 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. Clock 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 Clock 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 TMIN, respectively. Lundelius and Lynch (1984) state that i f the requesting node sets its clock according to t = t + ^(TMAX +TMIN), the optimum achievable bound on clock offset is ( l - -^r ) (7 m a x +^ m i n ) for a system with N nodes. It is not as straight forward in 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 (UTC) , 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 in 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, procedure- call, 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 CC denote the control client node requesting the clock time and CS 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 c \N data samples. Let tac (n) be the series of time-stamps when the control client sent the clock n=l N request, tbs(ri)\ be the series of time-stamps when the control server received and c N immediately replied to the clock request, and tc c (n) be the series of time-stamps when the response to the clock request arrived back at the control client. Defining tabs as the absolute time, tfc as the local time of node CC, tfs as the local time of node CS , and assuming both clocks in the control client and server have a linear growing skew to the absolute time, we have t?c=tabs + dCc+pCctabs tiS=tabs+SCs+pCsta (2.1) labs (2-2) where SCc and SCs are clock skews, and pCc and pCs are clock drifts. Combining (2.1) and (2.2) to eliminate tabs, one obtains the following linear relation: t; c — mti * + c (2.3) in which . = §Cs f \ + p C ^ \ + pCc (2.4) and m — l + pLs l + pCc (2.5) Wi th the message transmission times (based on the clock at node CC) from the control client to the control server, and the control server to the control client defined as t%cCs and t%sCc, respectively, it is common in network clock synchronization to assume their mean values to be equal; i.e., E t cscc = 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 CC) from the request is made, up to the time when it is handled by the control server, and is estimated as 1 ^ = ™I('?C(")-£C(")) Z 7 V n=l (2.6) r N C N The data points in the time series tb s (n) and tc c (n) can be written as t^(n) = m(t^(n) + t^) + c and tfc(n) = t^(n) + t ^ + t ^ c respectively. From equation (2.7), we obtain tbs(n) = m{tcac{n) + fl) + c (2.7) (2.8) (2.9) Hence, by fitting a straight line through the data points of plot tbs (n)\ versus t^c (n) 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: m (2.10) where i C c ( D + 0 1 fr(2) + fi 1 t^(N) + Ju_ (2.11) and tCs - r ^ ( l ) tCBS(2) tCbs(N) (2.12) Consequently, using the estimates of m, c and / / from (2.6) and (2.10), the clock reading in 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 min with N chosen to be 100 data sets. The Real-time Sub-system employed here reports time in 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 10 1 7 ticks subjecting (2.12) to numerical errors. 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 in 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 c/ / c f T c c C 0" T TCC C 0" - l ( TnCc c 0" T m a \ 0 1 ) a 0 1_ a V 0 1 ) o (2.13) where c is close to t^c (n). Here, c is set to 10 1 0 . Using this clock synchronization approach, 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 (CAN) PROFIBUS 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 of 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 Mbps, 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 Mbps 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. Wi th 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 (CRC) . 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 in 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 in 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 Coll is ion Detection) specified in the I E E E 802.3 standard ( IEEE 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. Whi le transmitting, i f 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 in 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 in 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 in 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 in 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 in Figure 2.3(b) has been generated between the University of British Columbia ( U B C ) in 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 (NUS) 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 in 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 2.6 : T 2.4 £ 2.2 >, 2 Tj 1.8 Q 1.6 1.4 1.2 1 ; i j ; i ! ! i ; ; i — i — i — i 3 0 - ~ " - r • - i r - 1 - h r ^ — - 0 20 40 60 80 100 120 140 160 180 200 Sample 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 Delay [ms] (a) 150 140 130 120 1/? J3 1 1 0 100 Q 1 1 1 4. f 1 1 1 1 1 1 1 ! — 1 1 1 ^ 1 1 i l 1 1 l + 1 l 1 1 — 1— 1 1 l 1 l i | | l l i l 1 [l l l 1 ill 1444 w I Hlfftf r T 1 > I it 120 100 E CO O O 2 0 20 40 60 80 100 120 140 160 180 200 Sample 70 80 90 100 110 120 130 140 150 Delay [ms] (b) CD O 0 20 40 60 80 100 120 140 160 180 200 Sample 232 234 236 238 240 242 244 246 Delay [ms] (c) Figure 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 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING (a) (b) (c) 2 1.8 1.6 1.4 C to 0.8 0.6 0.4 0.2 0 \ \ / 7 i . . . . . . '4 i l - % - - i - - - r - - - \ : : T T X jr ; %. > i •ft. i i % ' ; —A ' """! ' 1 | i ^ i \ k _ l j \ J . L . . . J . . . V : : \ 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 time [s] 3.5 4 time [s] Figure 2.4: 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 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 in 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 g i l l 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 electro- hydraulic 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 motor- actuated, double-nozzle flapper, and the booster stage consisting of a pressure actuated, spring- centered 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 -42 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 Hz . 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 of 0.025 mm when coupled with a 12-bit analog-to-digital converter. The pressures in the head and rod sides in 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 in the present thesis is model-based, sufficiently accurate parametric model for each axis of the electro-hydraulic manipulator is required. Linear, normalized, discrete-time transfer function and state-space models are acquired through experimental system identification method of correlation analysis (Ljung, 1987). Each axis of the system is excited by injecting a series of Pseudo-Random Binary Sequence (PRBS) 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 of 2048 steps sequence is found to be sufficiently exciting without causing the piston to hit its stroke limits and is used in 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 Ph [psi], and rod- side pressure Pr [psi]. Since the raw sensor readings are rather noisy, the position and pressure measurements are acquired at a sampling frequency of fs = 1000 H z and filtered through a low-pass 5th-order, discrete-time Butterworth filter with a cutoff frequency of 80 Hz , of the form: _ bfo + b n z ' ] +bf2Z~2 +bf^ +bf4z~4 +bf5z'5 •"•filtered , _ i _2 -4 Xraw (^-14) l + aflz +af2z +af3z ' + af4z +af5z ' in which « r i =-3.3780, af2 =4.7518, af3 =-3 .4397, af4 =1.2740, af5 =-0 .1924, bfQ = bf5 = 4 .8944x l0~ 4 , bf] = bf4 = 2 . 4 4 7 2 x l 0 - 3 , and bf2 = bf3 = 4 . 8 9 4 4 x l 0 " 3 . Velocity is estimated from the position measurement through a low-pass filtered, discrete-time differentiator given as (Tafazoli, et al, 1998): 1-z" 1 (±Ts+Tv) + aTs-Tv)z •y (2.15) 36 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING with the sampling interval 7̂ =l/fs, and the filter time constant Tv = 1/500 s. 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, in which afl = -4.8983, af2 = 9.5985 , af3 = -9 .4053, af4 = 4.6085, afS =-0.9033, bf0 = -bfs = 0.9504, bf] =-bf4 =-4 .7522, and bf2 =-bf3 =9.5044. The steady-state operating pressures of the cylinder (with the position 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: The data set in the range of 300-800 samples is used for model building and the set in the range of 900-1700 samples is used for model cross-validation. A gross estimate of the impulse response function, obtained through the covariance function between u and y , is shown in 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 nc - 2 is estimated in (2.16). The next step is to determine the model structure (order) by selecting na and nb 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 in relation to the computational complexity, and the robustness and uncertainties in the model-based feedback controllers. Figure 2.9 shows the best Guy{z ) = z b0+blZ- +- + bHhz- (2.16) l + ojz l+--- + anaz 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 (na +nb +nc). 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 na = 2, nb - 4 and nc = 2, is chosen 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.5620, a2 = 0.5885, b0 =0.007691, bx = 0.01608, b2 = 0.004824, b3 = 0.006505, and b4 = 0.002786. 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, in 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 in controller design. The frequency response of the identified model is given in 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 .66 , a2 = 0.6796, b0= 0.01153, 6, =0.02643, b2 = 0.003392, b3 = -0.01742, and b4 = -0.005612. 38 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 10 r 0 3 a, a -5 llllllllillllll Ill 111 'I llijlJI,l j l l l p II I I i! ll 1:11 II f ' 1 i |" -10 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Sample k G o o u CO o Model CrosszyalidMion. 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 cross- validation. 0.05 0.04 0.03 •° 0.02 3 0.01 0 -0.01 -0.02 © © © © © 0 2 4 6 8 10 12 14 16 18 20 Lags [step] Figure 2.8: Scaled impulse response estimate for transfer function model identification. 39 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING <u o fl ar i 2.5 > &< \no 2 O T3 m e 1.5 i2 "a X u 1 c u ISO en l 0.5 o OH 0 I LJJ I II i II I II II I II i II II II II II i I I 0 5 10 15 20 Total no. of parameters Figure 2.9: Model fitting for transfer function model identification. 19- 0.5 0 9 ? ? 9 ca 9 9 T 9 9 9 n v v ^ Q ( p 9 cp (; -0.5 [ 0.2 10 15 (a) 20 25 Lags [step] £ u 0.1 0 -0.1 -0.2 -0.3. 9 ; ,9 o Q (T) _ i i_ -25 -20 -15 -10 -5 0 (b) 5 10 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 o 00 -0.05 -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 10" Frequency [rad/s] 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-17) where xk e E " is the state vector of the system at time k, uke E m is the control input vector at time k, A s Rnxn, and Be RnXm. The state vector for the present system is defined as follows: x = [xi x2 x3 x 4 f = [ y y Ph Prf (2.18) 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 state- model matrices of (2.17) as 1.06730 -0.10423 0.13156 0.41143" ' 0.00138 " -0.02484 0.89404 -1.51910 0.45326 0.01027 A = , B = -0.00123 0.23267 1.15180 -0.94321 -0.00862 0.30104 0.18348 0.19487 0.28778 -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 1500 2000 (d) 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 MODELING Lags [step] 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 xx; (b) Cross-correlation function between input and residuals from state xx\ (c) Autocorrelation of residuals for state x2; (d) Cross-correlation function between input and residuals from state x 2 ; (e) Autocorrelation of residuals for state x 3 ; (f) Cross-correlation function between input and residuals from state x 3 ; (g) Autocorrelation of residuals for state x4; and (h) Cross-correlation function between input and residuals from state x4. 44 CHAPTER 2 CONTROL NETWORK ARCHITECTURE AND SYSTEM MODELING 0.061 . 1 . , , , , 1 0.15 Figure 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 xx; (b) State x2; (c) State JC3 ; and (d) State x4. 2.5 Summary A control network architecture for networked control systems (NCS) was developed within an Ethernet network. The hardware interconnection and the software entities, particularly the client-server communication framework, were developed and implemented in 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 network. Although plagued with nondeterministic communication delay, packet losses, vacant 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 Model 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 (NCS) , termed "networked control strategies" in this thesis, which wi 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 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING The frequent 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 (NCS) are represented by TSC and TCA, 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 J h * 1 1 I_ Buffer Actuator Node H System 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 "old" 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 ( M P C ) and the model identifier. A t each sampling interval, tsc is determined first. The number of measurements that need to be estimated by the minimum effort estimator to f i l l in the missing sensory data up to the current k -th sampling instant, is determined using TSC 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 of vacant sample or data loss. For better visualization, Figure 3.2 illustrates a simplified example of the basic mechanism of the developed networked control strategy at a particular time step k. Assume that the sensor-to-controller transmission delay (discrete) is tksc =\tsc~\ = 3h and the controller-to- Actuator Node System 1 1—|'""|""T' ,'T""I £-5 | k-3 | ifc-l | k+1 k-A k-2 k k+2 t i m e k-5 \ k-3 | k-1 | k+1 \ k+3 \ k+5 | t i m e k-A k-2 k k+2 k+A k+6 Sensor Node I k-i | k-5 | k-3 \ k'-\ \ t i m e £-8 k-6 k-A k-2 k I k-1 | k-5 \ k-3 \ k-1 | t i m e jfc-8 k-6 k-A k-2 k Control Signal 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* a = |~Tca~| = 47i. A t the time instant k, the sensor node samples the system outputs, combines them into one data packet, time-stamps it, and sends it through the network. Now this data wi 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. Wi th tkca =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 in 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-l)y(k) = B(z-')u(k-l) + ̂ C(z-l)e(k) (3.1) A where u(k)eRm is the control input vector, y(k)e~Rp is the output vector, A(z~l) and C ( z - 1 ) are pxp monic polynomial matrices, B(z~l) is a pxm polynomial matrix, and A = l - z - 1 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 in the predictive control part (see Section 3.1.3). Hence, the online estimation of only one set of model parameters is needed in the indirect adaptive control case (see Section 3.1.4). It is assumed that e(k) is white noise 50 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING giving C ( z _ 1 ) = / , where/, e R'Xl represents an identity matrix. Let the number of delayed or missing sensor data samples at the controller, at the k -th sampling instant be Tkc = \tsc "|. Using (3.1), the estimated value for y(k -Tkc +1) can be determined as: y(k-Tkc+l) = z(Ip-M(z-l))y(k-Tkc) + B(z-l)M(k-T^) (3.2) Define the estimation error as s{k) - y(k)-y(k). Using this estimation error as the correction term, the optimal output estimate is obtained as: y(k- rksc +l) = y{k- tkc +l) + e(k-Tkc) (3.3) Continuing the same way, the delayed output can be estimated up to the k -th instant; i.e., y(k-^c + i) = Hk-Tksc+i) + e(k-^c) for i = l,2 r j c (3.4) where y(k- Tkc +i) = y(k- Tkc + i -1) for i > 1, to replace the unknown values of the output at instant (k-rkc). In the current test system, which is the two-axis electro-hydraulic manipulator of the fish- processing machine (see Section 2.4), A(z~l) is of second degree and B(z~l) is of fifth degree (from the C A R I M A equivalent of (2.16)), with m = 2 and p - 2 ; i.e., A(z~l) = 12 +Aiax2z~1 +A2t2x2z"2 (3.5) B(Z~1) = BQ,2X2+B\,2X2Z~1 + B 2 ,2x2^" 2 + B 3 ,2x22" 3 + B 4 , 2 X 2 ^ " 4 + f i 5 , 2 x 2 Z ~ 5 ( 3 - 6 ) Application of (3.4) yields: ji(fc-4+0 = ( / 2 - A ) i ' ( f c - 4 + ' - i ) + ( ^ i - ^ ) 5 ' ^ - i + * - 2 ) + A2 y(k - Tkc + i - 3) + B0Au(k - Tkc + i -1) + Z?,Aa(& - rkc + i - 2) ^ + B2Au(k - Tkc + / - 3) + B3Au(k - Tkc + i - 4) + J? 4 Aii(jfc - zkc +i-5) + B5Au (k - T)c + i - 6) + e(k - TKC) for i = l,2,...,Tkc with y(k-tkc+i-na) = y(k-Tkc+i-na) for i^na, where na = d e g ( A ( z - 1 ) ) . Here, Au(k-zkc +1), Au(k-rkc + 2), Au(k-1) are 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 of 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 in the present scheme. As indicated in 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 in control signals: Au(k + j) for j = 0,l,...,Hu is sought to continuously minimize the quadratic cost function Vk(Hl,H2,Hu)= X \\y*(k + j\k)-r(k + j)g+^\\^u(k + j-l)fR (3.8) 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. Hx, H2, and Hu are, respectively, the minimum and maximum prediction horizons, and the control horizon, where \<H}<H2 and Hu <H2. The weighting sequence matrices Q and R are diagonal and positive definite. The j -step-ahead outputs need to be predicted for use in the control law. The Diophantine equation: Im=Ekj(z-l)M(z-l) + z-jFf(z-1) (3.9) and (3.1) yield, y(k + j)^Fk{z-')y{k) + E){z-x)B{z-l)Au{k + j-\) + E){z~')e^ + j) (3.10) Note that deg(E*(z"')) = j - l and deg (F*(z - 1 ) ) = d e g ( A ( z - 1 ) ) . N o w y*(k + j\k) 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 _ 1 )y(k) + E) ( z _ 1 )B(z~l )Au(k + j-l) (3.11) 52 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING The second term of ( 3 . 1 1 ) consists of the past (up to time k) and future inputs A M . This term can be separated into two parts by introducing the new Diophantine equation: E) (z~l )B(z~l) = Gk (z'1) + z-jHkj {Z-x) ( 3 . 1 2 ) which yields y*(k + j\k) = G) (z~l )Au(k + j-l) + H) (Z-1 )Au(k - 1 ) + Fk (z~l )y(k) = Gkj(z-l)Au(k + j-l) + Fk ( 3 . 1 3 ) where Fj - Hk(z l)Au(k-l) + Fk(z l)y(k) is the free response term. This term can be easily computed recursively by utilizing ( 3 . 1 ) and ( 3 . 2 ) as Fk+1 = z(I -AA(z~]))Fk +B(z~l)Au(k + j) ( 3 . 1 4 ) with F0 = y(k) and Au(k + j ) = 0 for 7 > 0 . Considering the three prediction horizons Hx, H2, and Hu, where j = H2-H{, the matrix form of the j -step-ahead prediction is obtained as 7- = G H . „ AU„ +F. ' \2u H„ ^* H 12 ( 3 . 1 5 ) where Y = T ... y*(k + H2)T] y*(.k + Hly y*(k + H1+l) AUHu=\Au(k)T Au(k + Y)T ... Au(k + Hu-l)Ty • Hy and G H 12K GH{-\ GH]_2 GH G G H \ ~ H U G GH2-\ GH2-2 G H2~Hu with Gq =0pXm for q < 0 . Using the matrix notation of ( 3 . 1 5 ) , the G P C quadratic cost function can be written as: 53 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING Vk=(GHnAUHu +FHn -r)TQ(GHnAUHu +FHn-r) + AUHuTRAUHu (3.16) in which Q = diag(QvQ2,...,QH2_H]+l) and R = diag(RvR2,...,RHJ. B y performing either quadratic programming or analytical differentiation to minimize Vk with respect to At/^ , the optimal sequence of control actions AUHu are obtained as AUHU =[GH12UTQGHi2u +R]XGHnuTQ{r-FHn) (3.17) In a typical receding-horizon G P C strategy, only Au(k) is extracted from AUHu. However, the present networked control strategy uses all the elements of AUH 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. When the future control signals in AUHu are to be used, the weighting sequences of Q and R cannot be set too high, in order to maintain closed-loop stability. In networked control, it is found that satisfactory performance is achieved only for a certain range of 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 in 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 Tca (Note: sensor-to- controller data packets contain the rca information which is determined by subtracting the time the actuator received a data packet by the time stamped in 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 in 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 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 HU<H2, what is used here is H2=Hu+l, with Hx set to 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 H { 2 and the dynamic matrix G H N have to be dimensionally restructured. The term FHX2 c a n D e e a s i l y restructured by recursively evaluating (3.14). However, the adaptive restructuring of G H I 2 can only be formulated after the order of the plant is determined. Let GQ be the matrix element of system used in the current work has na =deg(A(z l)) = 2, nb =deg(#(z l)) = 5, m = 2 and p = 2. Hence, given that the initial conditions are zero, it can be seen from (3.15) that the vectors gq are the expected output sequence for q = 1,2,...,H2 - 1 when subjected to a unit- impulse response at time k ; i.e., Hk = a + Tka + J3 where rka = \rca ], a is the minimum control horizon required for a pre- Section 3.1.2 that the servo gmq = y(k + q) = (I-Ax)g^ + (AX-A2)gmq_2 +A2g™_3 +BqAux (3.18) where for in —2: Aux=[l O f f o r g j ; ^ , = [ 0 i f for g\; 55 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING and g™=0 for q<0 B =0 for q < Hx - 1 and q>nb=5 3.1.5 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 (RLS) estimator is used in the present work (Ljung, 1987). The algorithm can be written as: 6{k) = 0(k -1) + y(k)Z(kYl W(k)A(k)~l n(k) (3.19) tj(k) = y(k)-Y(k)T0(k-\) (3.20) S(k) = 3(k-l) + y{k)\w(k)A{krxW{k)T -E(k-\)~\ (3.21) where the estimated parameter vector 0 e ja>p(P"fl+"'H+i)) [s f o r m e d as w)=\(Aif . . . Kf (4)T - Kf.- « f . . . K f « Kf (Bit - (Bff- 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-^c-l)7 u{k-zksc-nb-\)T y(k-<-naY u(k-Tksc-\Y The regression matrix W(k)sRp{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(Xp,Xp-\...,X2,X,l) 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 in 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 of 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 of 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., TLimated = ^ ~ ^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, in the particular system used in this study, the following criterion is used for fl = d i a g ( p , , p 2 ) : f 0.200 for r, estimated <10ms 0.100 for 10 ms < T. estimated <20ms A=A> = 0.010 for 20 ms <T / <25ms estimated 0.005 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 rksc 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 H2 and Hu . 8. Restructure and recalculate the free response term FH^ using (3.14) based on Hx, H2, Hu, and the latest estimated system model A ( z _ 1 ) and B(z~~l) • 9. Restructure and re-compute the dynamic matrix G# 1 2 h using (3.18) based on / / , , H2, Hu, and the latest estimated system model A(z~') and Biz'1) • 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 in 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 in 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, in its own memory. New data w i l l overwrite the corresponding old data, based on their individual time step. At 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. Wi th 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. On 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 in 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 kHz . 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 Hz . The computed series of future control actions is sent back to the control server where the buffering process in the actuator module also runs at a rate of 100 H z . The size of each sensor-to- controller 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 high- speed servo systems with sampling and data communication rate of over 1 kHz . 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: B2 = B5 = -1.5620 0 0 -1.6600 "0.01608 0 0 0.02643 ,A2 — B3 = 0.5885 0 "0 0" >Bo = •*1 = 0 0.6796 0 0 0.007691 0 0 0.01153 0.004824 0 0 0.003392 BA -0.006505 0 0 -0.01742 , and -0.002786 0 0 -0.005612 A well-known problem in electro-hydraulic actuators is the phenomenon of dead-band nonlinearity, mainly due to static friction causing backlash behavior in the closed-loop system, which in 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 A v r = - / ; s g n ( y f - , f ) (3.23) 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 in 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 r.m(k) = dnk5+di2k4+di?lk3+di4k2 +di5k + di6 (3.24) where dn,...,di6 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 rim(k) = -djrim(k) = 5dnk4 +4di2k* + 3di3k2 + 2di4k + di5 (3.25) 60 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING r]m(k) = r™ (k) = 20dnk3 + \2di2k2 + 6di3k + 2di4 (3.26) Define ks as the starting time step and ke as the end time step of the i -th segment. Let r^ikj , rl"(ks), and r™(ks) be the imposed end-point conditions at ks, and r™(ke), and r]m(ke) be the imposed end-point conditions at ke. The coefficients dn,...,di6 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: *? *,3 *? K I 3k2 2ks l 0 di2 20k] 12k2 6ks 2 0 0 da kl kl *? K 1 diA nm(K) 5k"e 3k2 l 0 di5 20k] \2k] 6ke 2 0 0 d^. (3.27) 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 in 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 mm (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 in 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 in 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. As 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 in 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 in order. A tracking accuracy of +1.0 mm, although relatively low, is the best that can be achieved by the electro- hydraulic 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 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING 3.3.3 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 in transmission delays reported in the following experimental results. The responses are shown in 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 in 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 (a) (b) | S CO g PL, O CD , , s I O CS 10 5 0 -5 -10 2 1 0 -1 -2 - \ r - \ / - \ i i i (e) ^ (f) 20 0 60 40 20 0 60 40 20 400 600 800 1000 1200 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-to- actuator 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 O -4 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 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING (a) c •is 10 5 0 -5 -10 \ -J - f- - y (b) (c) -3 (d) 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-to- actuator delay; and (f) Round-trip delay. 67 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING (a) (b) (d) G a , , G O U (c) 5 < o ' ^ i f t ' ^ ^ 00 40 20 0 -20 -40 30 20 10 0 20 (e) £ 10 0 30 (f) 1 05 1 0 I I II llllllllllllllllllllllll IN liuilLiLjll JJilk. Ak. i l l i J l id II lJlI,.J 200 400 600 800 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-to- actuator 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-to- actuator delay; and (f) Round-trip delay. 69 CHAPTER 3 PREDICTIVE NETWORKED CONTROL WITH FUTURE INPUT BUFFERING g T3 CD N O 22 20 18 16 14 12 10 8 6 4 2 0 7 : 5 % V f " 1 O.tfTq 12.5% nr.' / / / / / / / / z / 75.0% / / / / p / / / / / / / 0 ^ - ' t 1.0% r ~~~ 0 10 15 Figure 3 packets. 20 25 30 Mean round-trip delay [ms] 8: Comparison of tracking performance over different loss rates of data 30 25 S 20 bp '•3 15 c3 "O CD N '•a 10 o 2 0 0 . 1 0 + ft / > r i_ _ i 1 1 1 1 0.15 ' / C .25 r ^ > : / / 1 0.20 / 1 7 / \ 0.05 / / i / / / 1 / 7 , / 1 / / / --•/---Jf- - 0.04 - 0 10 15 20 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 1 0 M. 5 c o "3 0 o AH .5 i 111 Lfl \ /// y 00 800 900 1000 (a) 1100 1200 1300 Sample k 800 900 1000 1100 1200 1300 Sample k 700 800 (c) 900 1000 1100 1200 1300 Sample k Figure 3.10: System response subjected to different speed settings under different levels of network delay, (a) rrtt =3 ms; (b) rrtt =11 ms; and (c) xm = 21 ms. CD C M o C3 -a CD N O Z 14 12 10 8 6 4 2 0 ! I T R T ; = 21rns y + i I- + / \ / ' ' / ' / / ! TL„ = 11 ms ! ! / : / / 1 ̂ / 1 i •* \ / _<r i i i i i i 5 10 15 20 25 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 (NCS) 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 in the developed networked control strategy, but in a border realm of constrained Model 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 (NCS) in the previous chapter. The specific controller employs Generalized Predictive Control (GPC) 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 (MPC) . 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 (LMI) 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 4 STABILITY OF PREDICTED-INPUT CONTROL k-TR Input Actuator Buffering Nodes u k\k-r Sensor Nodes Communication Network Future Control Controller Sequence (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 Xk+\ - f ( x k > u k ^ (4.1) where xk e R n are the states of the system at time k, uke Rm are the control inputs at time k, and / : RnXm —> Rn. 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 tsc and rca, respectively. A n extended state observer is used in order to f i l l the missing sensor data up to the current sampling time k. The estimated states are given by xk-T,c+i\k-T,c = /(x*-l-rvc+il/fc-r5C+/'M*:-r !C+j) + ^'(3'i-r s. c _ $ k - T s c \ k - r , c - l ) (4-2) for i = l,...,TSC where L ' is the observer gain matrix and yk e Rp are the measured states (output) of the system. The sensor-to-controller delay xsc is determined from the time-stamping 74 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL information embedded in 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 nk = \uak,...,uk+H u ] , where Hu is the length of the control horizon. This is done at each time step k, by optimizing a finite quadratic cost function either of the output reference tracking form given by VHhH2,HSyk'nk)-n min (•\k) yk+H^k rk+Hn H2-\ H.,-1 lk+i\k i=H, i=0 S.t. (4.3) > W G - * / Vi = l,...,H2 V i = 0 , . . . , f f B - l or, the regulator form expressed as mm lk+H2\k H2-\ + lk+i\k Q + y iw 1=0 k+i\k S.t. (4.4) xk+ake^i V i - l , . . . , / f 2 Vi = 0,...,Hu-l where yk = g(xk)e Rp is the output of the system with g : R" -> Rp, rke Rp is the output set-point, Hl is the minimum prediction horizon, H2 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, Hx is assumed to be zero in order to facilitate the analysis. This assumption does not pose any restriction to the generality of the analysis, however, because the term xk (at time step k) is seen as a constant in the optimization process. Optimizing (4.3) or (4.4) yields the optimally predicted future control sequence as 7 1 k ={Uk\k'--'Uk+Hu-\\k } = Mgm™VH2Hu(xk,7rk). In a typical application of M P C , the first control input u*m 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 by retrofitting the actuator with a data buffering mechanism to schedule an appropriate control 75 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL 7t, 'k-T Input Actuator k\k-r ca Buffering Nodes Sensor Nodes Communication Network Future Control Controller Sequence (MPC) X i Figure 4.2: Reduced structure of the N C S for analyzing stability of the M P C policy with future input buffering. input uk+Ak from nk, based on the time-stamps of the data packets. The unconstrained version of this N C S strategy has been benchmarked in 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 in 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. As 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 in 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 Tsc=0; 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 of 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 in 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 in 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 k + i = A x k + B u k (4.5) with AeRnXn and BeRnXm. 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 in this study, the method of multi-parametric Quadratic Programming (mpQP). First, the cost function in (4.4) is expanded into: VH2,HU ( x k ' n k ) ~n(lk) } lk+H2\k + X Xk+i\k n + X i=H„ H„-\r i=0 lk+i\k + U k+i\k (4.6) Horizons H2 and Hu in (4.6) are replaced by a single prediction horizon H by noting that uk+i = 0 for H2> Hu. Using (4.5) recursively, the first term of (4.6) is expressed as 2 2 Xk+H2\k P Xk+H2-\\k ATPA lk+H,Ak u\k\\^AH2-Hu j ' pAH2-Hu (4.7) 77 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL Similarly, the second term of (4.6) is recast into the form H2-l k+i\k lk+H„\k lk+H,Ak lk+H„\k ATQA + ••• + lk+H„\k ulfc|||Atf 2-"«-l) E A " 2 - " „ -1 (4.8) I Q A ' 1=0 Substituting (4.7) and (4.8) into (4.6), and setting H = HU yields the equivalent finite quadratic cost function: min Xk+H\k H-\ 1=0 lk+i\k + u k+i\k S.t. (4.9) xk+ake^i. V / - l , . . . , i / uk+nkeU \/i = 0,...,H-\ which is evaluated over a prediction horizon of length H using a modified terminal weight matrix P0 given as H2-Hu-\ P0 = (AH2~H» )TP(AH2~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 xk in a receding horizon manner, such that Xk+i ~ ^-Xk+i~l + Buk+i-\ = A [Axk+i_2 + Buk+i_2 ] + Buk+i_x (4 .11) i - i •Aixk+Y,AiBuk+i_j_ 7=0 for / = ! , . . . , / / . Define nH = T T uk uk+x u k+H-\ and 78 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL T T xk xk+\ lk+H-l E RnH . For i = H , (4.11) is put into the compact form Xk+H =AHxk+NuiiH (4.12) where N„ = AHlB AB B ->nxmH Util izing (4.11), XH can be reformulated into the following equation as a function of only the current state xk: 0 0 0 0 . ff — I IX I A ( . T | /\1J MJ \J • • • 0 0 I 0 0 0 A B 0 0 A2 xk + AB B 0 AH-1 AH~2B AH3B AH4B nH=Mxxk+MuIIH (4.13) nHxn MuefLnHxmH Considering (4.9), the first term is expressed in terms of (4.12) as P/fc+tf ||p0 ~ xk \A») TPQA» xk+nTH NTUP0NU nH+xTk 2 K ) 7 ^ P0NU nH (4.14) Substitution of (4.13) into the second term of (4.9) yields H-l z 1=0 nH+xTk Z = ** [MZQV*]*k +nH [MTUQMU The third term of (4.9) can then be regrouped in terms of 77H as H\h+i\\R=nHRnH 2MTXQMU n H (4.15) (4.16) ;=o where R = d i a g ( « , . . . , l ? ) e RmHxmH. B y combining (4.14)-(4.16) into (4.9), the following standard QP formulation of the M P C cost function is obtained: in which vH (xk, " k ) =TH {i xlYrxk +^nTHjrnH+ xTkFrnH} Yr=l(AHj P0AH+2MTXQMX Jr = 2NTUP0NU + 2MTUQMU + 2R (4.17) (4.18) (4.19) 79 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL FR=2(AHf P0NU+2MTXQMU (4.20) Note that since the term ^xTkYrxk does not depend on the variable of optimization IIH , it can be ignored in the optimization process. Constraints are incorporated in the M P C optimization of (4.17) through successive row augmentation into a single matrix inequality equation (not L M I ) given as GrnH<Wr+Erxk (4.21) where Gr, Wr and Er are matrices constructed from a particular set of constraints of interest. For instance, for a system subjected to the input constraints - c , < utj < c2 for i = 0,...,H-l and j = l,...,m; Gr, Wr and Er are constructed as G = 1Hm I Hm ) 2HmxHm Wr=[c C2 Cj Er =0e C, G a 2Hm > 2HmXn A n additional state constraint of xk+i <xmax = [sx ••• snf e Rn can be imposed by using (4.11) and row-augmenting these Gr, Wr and Er by the following matrices: a u g B AB 0 B 0 0 AH-3B AH-*B A"^B AH-2B AH-3B AH-4B 0 0 0 0 0 0 B O O AB B 0 •^(H-\)nxHm w = a u g -l)n a u g — ' A T (A2)' .- (A"'1)1 -IT Subsequent input and state constraints can be imposed into the optimization of (4.17) in a similar manner. 80 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL 4.2.2 The Reference Tracking Problem Referring to the M P C policy (4.3) for the reference tracking problem, it is the usual practice in M P C to ignore the terminal cost and substitute uk+i by L\uk+i (= uk+i - uk+i_x) in order to prioritize the tracking performance (clearly, at the cost of degraded stability as a tradeoff) of the system. The L\uk+i formulation corresponds to including an integrator in the control loop (Bemporad, et al, 2002). Assuming that H2-HU=H, the following M P C quadratic cost function is considered now: \H-\ VH (xk, 7tk) = ̂ i'") <j ]T Iyk+i[k -rk+i || + ̂ IAH^-IJ. ||^ (=0 H-\ /=0 s.t. (4.22) yk+nk*Ji V i = l , . . . , / f uk+MeU V i = 0 , . . . , / / - ! Again, the purpose is to transform (4.22) into the standard QP formulation for optimization. The first term of (4.22) can be reduced into the following compact form: H-l z 1=0 X y>c+i\k rk+i = M T yQMy (4.23) where Q = d\ag{Q,...,Q)eRpHxpH and My = | j y m - r k ) ' ••• (yk+H-M-rk+H.x) A M [ + W _ , J 7 and introduce a new, augmented state vector ERn+m+PH _ U s i n g ( 4 n ) a n d c o n s i d e r i n g y k + . = c x k + i Define AIJH - AuTk AuTk+l xk uk-l rk 'k+H-\ with C € Rpxn , Mv is reformulated as: My=NxXs+NAALTH (4.24) where 81 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL N = C CA 0 CB 0 0 0 -Ip 0 H"1 CAH~L X C A B 0 0 0 i=0 0 0 -I, •^pHxn+m+pH NA = 0 CB XCA'B 0 0 CB i=0 H-3 H-\ £ CALB C A B i'=0 i=0 H-2 H-3 X CAB £ CA'J? /=o i=0 0 0 0 0 0 0 0 0 0 CB 0 0 Y^CA'B CB 0 i=0 jj^ pHxmH 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 QP form for the M P C optimization is obtained: V„(**,**) = S H {iXfyX, + ±MITHJyMIH + XTsFyMIH) (4.26) in which Y=2NlxQNx J=2N'AQNA+2R Fy = 2NTXQNA A s in the regulator problem, the term ^XTSY Xs is excluded in the optimization since it is independent of A / 7 H . Similarly, constraints are imposed using successive row augmentation into the same form as (4.21), replacing IIH and xk with MIH and Xs, respectively. (4.27) (4.28) (4.29) 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 xk by establishing a bound on the terminal cost. The levels of projected cost, which depend on the controller-to-actuator delay Tca, are 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. On 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 in 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 xe is stable if, there exists r > 0 for every 7>0, such that if \\xk -xe\ < r, then \ x k + i - x e \ < 7 for Vz > 0. Definition 4.2: An equilibrium point xe is asymptotically stable if it is stable, and in addition, if there exists some r > 0 such that ^xk - are|| < r implies that | | jc j t + / - xe\\ —¥ 0 as i —> «> . Definition 4.3 (cf. Jiang and Wang, 2001): A continuous function V(-):Rn —>R+ is a valid Lyapunov function for system (4.1) if there exist some class /t^-functions yx(), y2(-) and y3(-), and a class / C -function <r(-) such that yl(^x^)<V(x)<y2(^x^) and V(/ ( j r ,M) ) -y (x )<-73( | | j c | | ) + 6T(||M||) for Vjce Rn and V « e Rm. Remark 4.1: The last condition in Definition 4 .3 is equivalent to stating that there exist some 83 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL class /Cx-functions y4(-) and some class /C -function y5() such that ||x||> ^5(||II||) implies V(f(x,u))-V(x) < —y4(||ji:||). Note that this results in an equivalent property i f y4(-) 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 stable in the sense of Lyapunov if there exists a function V(-) : R " —> E + which satisfies the following: 1. There exists a class /Cx -function or(-) such that 0 < ar(|xfc|) <V(xk) for \/xk ^ 0 . 2. There exists a class AZ,-function u(-) such that V(xk+1)-V(xk) <-v(^xk^). 3. V(0) = 0 and V(-) is continuous. Proof: Stability: This proof is by contradiction. Let 7 be any arbitrary point with 7>0. Since V ( ) is continuous, there exists r > 0 such that V(xk) > a(7) for jxk || < r . Presume that the system is unstable. Then there exists some i > 0 such that \\xk+i\\ > 7 and V(xk)<a(7)<a(lxk+i\\)<V(xk+i) This contradicts the hypothesis of V(xk+i)-V(xk) < 0 . Therefore, the system is stable. Convergence: Presume that the condition V(xk+l)-V(xk) <-i>(||xfc||) is true. Wi th V(xk)>0, 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 ) is bounded from below by -V(xk), one has i^L v( Xj+i ) = 0 . Since v(0) = 0 and is continuous, the limit implies that ||xfc+I-|| —> 0 . • 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 itk =\uk\k,—,ukJrli_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 itk = {uk\k,...,uk+H_M} determined under the MPC control law of (4.4) is asymptotically stable in the sense of Lyapunov in the neighborhood I c R " if the following conditions are satisfied: 1. a function V ( - ) : R n x R m H -> E + with V(0,0) = 0 exists such that V(x,n) >«i(||x|) where OCx (•) is a /C„ -function. 2. X exists and contains an open neighborhood of the origin, such that every realization {xk,7ik} of the controlled system with x0eX satisfies xkeX for V £ > 0 and V(xk+l,7ik+l)-V(xk,7tk)<-a2(j(xk,uk)\\) where a2(-) is a /C^-function. 3. a constant r>0 exists for xk e B", such that every realization {xk,nk} of the controlled system with xks Brn satisfies ||^||<flr3(||jct||) where cx3() is a A7X -function. Proof: Stability: Let x0 be an arbitrary point within X. Since V(0,0) = 0 and V(-) is continuous at the origin, there exists a constant rx > 0 and a XT -function /?(•) such that V(x,n) < fi(\\(x,7t)\\) for V x e Br" and Vzre B^m. Since X contains the origin, there exists a constant r2 >0 such that B^ czX. For any e>0, there exists S>0 such that S< min(r , r j , r 2 ) , a3(S)<rx, and f3(S + a3(S)) <ax(e). Now S>0 exists because ax{e) >0 and a3{8) ->0 as S->0, so that /3(S + a3(S)) —> 0 as 8 -> 0 . Suppose | |x 0 | | < ^ ; then ||;r0|| < a 3 ( £ ) and V(x0,7t0) < /?(| |(x 0 , ;r 0) |) < /J ( |x 0 | | + | ; r 0 | ) < ^ + « 3 ( ^ ) ) < a 1 ( f ) In addition, one has for V f c > 0 , since | |x 0 |<<5. Moreover, flf,(|xfe|)<V{xk,nk) for \/k>0. Therefore, it can be established that ax (\\xk ||) < ax (e), which implies that \\xk || <£ for \/k > 0 and V x 0 e . 85 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL Convergence: The condition V(jc,?r) > «r,(j|jc||) includes V(x,7t)>0 for V x and V n \ The condition V(xk+x,nk+x)-V(xk,7ik)<-a2(\\(xk,uk)\\) infers that V(-) decreases along the trajectories of the controlled system that commenced within X. It follows that with xQe X, V(xk,7tk) —>V* as fc-)^, where V* is a non-negative constant. It can be concluded that V(xk+X,7tk+X)-V(xk,nk) - » 0 as £ — > ° o and this implies that «2( | | ( x fc ' M *)| | ) Since a2(-) is a class A7 -function, it follows that j|JC^ || —> 0 and ̂ uk || —> 0 as /c —> <*>. • Hence, in the nominal case, i f the initial optimal sequence of control input 7tQ is feasible, the elements uk+nk of the subsequent sequence of control input nk as computed using the M P C policy of (4.4) or (4.9) are sufficiently stabilizing in the future as long as the time point is within H . In order to analyze the conditions in 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. Definit ion 4.5: A function f is a Lipschitz function if \f(a)-f(b)\ < Lf \a-b\\ for V a e Rc, \/b e R c and c > 1; and Lj- is called the corresponding Lipschitz constant. L e m m a 4.1: The finite quadratic cost function of the receding horizon MPC policy is a valid Lyapunov function. Proof: Assume P0 = Q for brevity and consider the following "optimal" quadratic cost function: H V*H(xk,7ik) = Y, ; = o II * 2 * 2 ||xfc+ilyt + Q Uk+i\k R (4.30) and thus there It should be noted that uk+mk = 0 . Since xk{k = x k , one has VH (xk, nk) > | exists a class /t^ -function y1 (•) such that V*H(xk,nk)>y{\xk\) (4.31) For example, yx <\xk ||) = Kx \xk || where Kx is a non-negative constant. Consider (4.1) and let « k + i = t i ( * k + i ) w i t h $ : R n ^ R m for i = 0,...,H-l. Let Lf, L ^ , L ^ be the Lipschitz constants for / ( • ) , ^ 0 ( ) , 0X(-),..., 0H_X(-), respectively. It follows that 86 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL u k+i\k vk\i\k for i = 0,..., H - 1 . Using this relation, lk+i\k , for i = 1,..., H , can be formed in terms of the current state , as follows: \\f(xl\k > u*m )|| ^ Lf \\xk I + Lf \\u*m I < Lf \xk || + LfL^ \\xk \\ = L\ \\xk || \\f(xk+m>uk+i\k) -Lf xk+\\k +Lf uk+m <LfLljxk\\ + LfL^\\xk\\ = L2\\xk lk+l\k lk+2\k lk+H\k <L lk+H-\\k Uk+H-\\k \\*k\r^f^H < LfLH_, \\x, + LfL, . \xh = L, 'H \\ k in which L, = Lf (1 + ) , L\ = Lf (L\ + ),..., LH=Lf (LH_X + ) . Hence, (4.30) can be bounded from above as follows: lklk + ••• + Xk+H\k Q + k\k R + ••• + U k+H-\\k 2 2 -H\\*k Q+L<k Xk R < xk fi+••• + £„ | | x X + Z ^ | | x J „ + • • • + £* '<PH-\ \\xk\\R <{\ + L\+-- + LH) X K Q+(L^+-- + L< VH-I'WXI<\\R Therefore, there exists a class -function y2 (•) such that V*H{xk,nk)>Y2(\xk\) (4.32) Considering the cost function one step ahead; i.e., VH(xk+l,nk+l), according to Theorem 4.2, it is feasible but not necessarily optimum to use the state and the input that are predicted in the current time step k to arrive at: II * 2 * 2 = VH(xk,7Ik)- * 2 * \\Xk+i\k + Q Uk+i\k R Xk\k Q Uk\k VH(Xk+\>nk+\) = Yu The optimal VH (xk+l, 7tk+l) is then bounded from above as follows: vH(xk+]^M)^yH(xk^k) * 2 * 2 Xk\k Q Uk\k R This result in 87 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL * 2 * 2 * Xk\k Q Uk\k < — R Xk\k VH (Xk+\ • "k+1) - VH (Xk. ) ̂ -1 which means, there exists a class /C^ -function y3(-) such that VH (*k+\. ) - V« (**, Jtk) ^ -7i (||x* ||) (4.33) 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 of the control inputs uk+nk from n*k in the subsequent time steps k + i for i <rca < H - I as applied in the developed N C S buffering strategy. To overcome this, an additional condition is enforced into the M P C policy. Consider the states and control inputs at k and k + TCA. The optimizing nk is found at sample time k . Denote the corresponding cost by VH (xk, n*k) and the optimizing states and the control input sequence, respectively, by Uk\k' uk+\\k' •' Uk+H-\\k xk\k' Xk+\\k> "•' xk+H-l\k' Xk+H\k A t sample time k + TCA, the corresponding control input of nk as computed previously and stored in the buffer, is used. Now use the notation: {uk+Tca\k>uk+Tca+i\k>--->uk+H-M>°'->0} w i t h t h e corresponding cost VH(xk,npre), which 71 pre is formed from the following sequence of states and control inputs: VH(Xk>npre) U k+T,.„+l\k' Uk+H-\\k Xk+Tca\k+Tca> xk+Tca+\\k+rra-' xk+H-\\k+Trn > xk+H\k+tr, The following condition guarantees that the closed-loop N C S is asymptotically stabilizing within TCA by satisfying the second condition of Theorem 4.2: VH (Xk+rca .npre )-VH(xk>*k)^-MYJ Wk (Xk+i > Uk+i) (4.34) ; = o 88 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL where /*e(0,l]; lk+Uk Q + u H-\ k+i\k H-\ vH(xk>7ik)= xk+mk P +Z x*+i*|L + ZlK+iitL ;and (=0 ^H^xk+trn->npre) lk+rrn+H\k+t,, H-l. + Zll* i=0 i=0 k+trn+i\k+tr, + Z II" 1=0 k+zrn+i\k Note that since Wk(xk+i,uk+i) > 0 , by forcing the r r a -s tep cost difference to satisfy )-VH(xk,7tk)<0, (4.34) ensures that VH(xk,7ik) 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 rca 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 Establishing the Bounds Before proceeding to establish a stability condition for N C S with the developed strategy of l|2 future control input buffering, the terminal cost lk+H\k has to be bounded in 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 p quadratic cost VH{xk,nk) is bounded from above and below by UH° and , respectively; i.e., I**lit ^VH(Xk^k)^\\xkfu^ 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 CONTROL VH-(j+\) (xk+(j+W. nk+(j+\) }~\Xk \VpQ _Le H J (4.35) for j = 0,...,H-l. Proof: Considering the lower bound of the cost, one has ^ / ( * * > ^ ) - I K I I ^ b - | x * l l z e +vH-(j+\)(xk+u+w>7tk+u+^ H J (4.36) On the other hand, from the upper bound, one has VH{xk,nk) < l l x - J I ^ giving H \xkfv* ^ \\xkfLQ +VH-(j+\)(xkHj+W>nk+u+i)) resulting in (4.35).1 • H J Lemma 4.2 can only be used when the current state xk 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 VH (xk,nk). The following lemma establishes the bound. L e m m a 4.3: If VH(xk,nk) 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 VH-{j+\)(-Xk+(j+\)\k'nk+(j+\)) - & (4.37) 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 ^ r o m (4-36) is bounded from below or above by Q . For the first condition, considering (4.36) one has & + VH-U+1) (Xk+(j+l)\k . nk+(j+\) )^VH(xk>nk)^& 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, \xk\\LQ ^ n which, by considering VH (xk,nk)< xk 2 ^ and (4.36), can be expanded to the following form: xk fLQ + VH-(j+i) (xk+u+W> nkHj+\) )^VH^xk^k)^ \xk tut ^AUH(L(J) * ) \\xk fLQ ^ & 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 Lemma 4.3 along the state evolution from j = 0 to j = H - 1 until the tightest bound for Xk+H\k i s achieved. However, Lemma 4.3 provides a rather conservative bound. This is elevated by modifying Lemma 4.3 into the following lemma. Definition 4.6: The parameter KH (j) is defined as 0</<./-l KH (') 1 — for7=0 for; > 0 (4.38) Lemma 4.4: If VH(xk,nk) 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 VH-J(xk+j\k.*k+j) ^ KH_j(j)n (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 Lemma 4.2 and Lemma 4.4 to bound the terminal cost in terms of the current state xk. 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 Xk+H\k 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(BTLjB + R)~L BTLj ~}A + Q (4.41) for j=0,...,H-l with 1^ =P0. The computation of the upper bounds Uj° are more tedious. Consider the following equation: lk+jik + u k+M + Xk+j+l\k UH-(j+l) < lk+j\k uH-j (4.42) for j = 0,...,H-1 with U0° =P0. Using a linear state feedback control law of the form uk+j\k = KjXk+j[h and substituting it into (4.5), one obtains *k+j+\\k = (A + BKj)xk+M (4.43) B y substituting (4.43) into (4.42) and equating the matrix weighting of each norm, one obtains: Q + K) RKj + (A + BKj )TU%_u+]) (A + BKj) < £>_. (4.44) It can be observed that (4.44) closely resembles the standard Linear Matrix Inequality (LMI) 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° in 92 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL order to provide the tightest upper bound for VH{xk,nk) through the minimization of the eigenvalue X U^°(LP^) governed by (4.44). However, K: is unknown rendering the direct V J optimization of (4.44) impossible, and this relation has to be restructured. Define Uj=[u$_j) 1 and Kj=KjUj. B y substituting Uj and Kj into (4.44) and then pre- multiplying and post-multiplying by £/J and £7-, respectively, one obtains the following equivalent equation: U'jQUj+K'jRKj+iAUj +BKj)' (AU • + IiKj) < [ / j TT~J-\ or, U'j -(AUj+BKjfU^iAUj+BKjWjQUj-K'jRKj >0 0 0 '(AUj+BKj) or, (AUj+Bkjf U]Q2 R]R2 0 I 0 0 0 I R2kJ (4.45) (4.46) >0 (4.47) Using Schur complements, (4.47) is put into the following L M I equivalent form: AUj+BKj (AUj+BKjf U]Q2 K]R2 R2K, or, o 0 0 I 0 0 0 I v-1 >0 (4.48) In order to minimize the eigenvalue given by X ) j, the following eigenvalue equation is considered (see (A.7) in Appendix A ) : /L/-£/£°(4°) _ 1 >0 (4.49) which has the L M I equivalent of the form (through Schur complements): Ur (4.50) 93 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL A s a result, the series of optimal (minimal) upper bounds Uj° for j = 0,...,H - 1 is computed by optimizing the following eigenvalue problem in the context of L M I : min ^ A * J ' * J (4.51) 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 of L M I conveniently allows further incorporation of 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 Defini t ion 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 decisions must constitute an optimal policy with regard to the state resulting from the first decision. In the context of the present study, Bellman's Principle of Optimality states that from any point on 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 VH(xk>*k) = yH-tca(Xk+Tca>) + Z Wk(**+«• uk+i) (4-52) ; = o where the "truncated" sequences of control inputs are v k + r c a ={uk+Tca\k'•••>uk+H-\\k}e M ( W _ T c a ) m . Consequently, the r c a -s tep cost difference terms in (4.34) can be effectively recast so that all costs are considered from time step k, yielding V H ( x k > a k ) - V H (Xk+Tca >npre) = [VH-Tca ( X k + r c a . Ojfc+r̂ ) - VH (Xk+Tca , 7tpre ) J + £ Wk (Xk+i, Uk+i) (=0 r n W ( 4 - 5 3 ) =\yH (xk+TCa. v k + r c a ) - vH+Tca ( x k + r c a . nk) j + 2. wk (xk+i»«*+«•) i=0 r i T c a ~ l =\yH (xk >*k) - vH+rca (xk> *k) J + Z wk ( x k + i . u k + i ) 1=0 94 where iik = {ukXk,...,uk+H_m,0,...,6\ e CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL j(//+Tca-l)m Theorem 4.3: The NCS-MPC policy with horizon H utilizing the optimal control sequence 7Tpre of the previous time step up to a controller-to-actuator delay of Tca, is asymptotically stabilizing within the region of attraction 7Z if there exists any j such that Cl-M)A^-WJHT >0 (4.54) where ATH«> = 1% - U% + and VJH = max 0.*K:^)-1]*-„_o- + 1 )(H-(j +1))[U$ -L<j]. Proof: From the stability condition (4.34) combining with (4.53), the following is obtained: (1 - fi) £ Wk (xk+i, uk+i) - [VH+Tca (xk ,nk)-VH(xk,nk)]>0 (4.55) i'=0 Since the first left-hand-side term of (4.55) may be expressed as Z W k ^ x k + ^ u k + i ) = VHixk^k)-VH-TcSxk+tca^k+zc)^ it c a n b e bounded from below by i=0 utilizing Lemma 4.2, to bound the costs as VH (xk, nk) > \xk 11^ and H VH-TCA (xk+rca> xk+Tca) < \\xk | | ^ LQ resulting in l|2 II ||2 II i|2 X w * (**+«» «*+.•) >NU " WU-tf =||̂ |U_̂ +Le (4.56) Next, the second left-hand-side term of (4.55) has to be bounded from above. The term >nk) ^H+Tcci(xk>i*k)] i n m e right-hand-side of (4.53) is equivalent to \\xk+H\k p - V T c a ( X k + H \ k > * = °) , which provides the means to bound it from below. Since Xk+H\k>71 ~ 0) — ^T. (Xk+H\k > nk+H)» m e following bound can be enforced: Vff ( * * » w t ) " ^ + r c f l (**' *t) ̂ I* ||po - ^ *k+H ) (4-57) 95 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL or, VH+Tca (xk ^k)~VH(xk^k)^ VT (Xk+H\k . "k+H ) - Xk+H\k (4.58) On the other hand, it can be established that VT (xk+mk,nk+H)< Xk+H\k /A) since VH(xk,7ik)<\\xk\\upb. Consequently, using Lemma 4.5 the upper bound for H [VH+rca (**. "k) - VH (xk> nk)] i s resolved as VH+TrAXk^k)-VH(Xk^k) < Xk+H\k vPb Xk+H\k k+H\k (4.59) < max < I U ° ^ ( ^ S ^ O - 1 l ^ / + i ) ^ - o " + i ) ) h l & f l » - r f " J " >Tca 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 in designing a stable controller are Q , R , H, fi, and P 0 . They w i l l determine the worst-case delay Tca that the controller is able to handle. Other possible parameters that can influence the closed-loop stability of the control strategy developed here include various constraints for input, state and rate. A s discussed in 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 of the M P C optimization is also a factor in 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, in the electro-hydraulic manipulator systems of 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 in 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 112 State constraints of the form ||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 lk+j\k (4.61) The introduction of jj f ° r 0 < j < H - 1 such that UH°-LQh<7JT (4.62) w i l l imply cyt+j\k 2 2 - xk U^-LQ -Yj x T-Yfl' a n d thereby guaranteeing that the intended state constraints xTTx < ?] are complied. Note that Yj is unknown a priori but is a free variable in 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 4 STABILITY OF PREDICTED-INPUT CONTROL Input constraints of the form ui,k+j\k < M L I M for i = \,...,m and 0 < j<H-l are included by augmenting the L M I in (4.51) with the following two L M I s : N j Kj >0 (4.63) ,2 lim (4.64) for 0< j<H-1, where Nj are arbitrary and symmetric matrices and Sj are arbitrary constants in the vicinity of Yj 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 uk+jVc = KjXk+jW and taking the square of the input constraint, arriving at: \U: i,k+j\k KJUJ* U: 2X V Ji ( ~ ~ 1 > < KJU'J2 V ) i yj7J<4m (4.65) The diagonal elements of the rightmost inequality in (4.65) is equivalent to {KJU^K1- y YjTj < ux2im which can be transformed into an equivalent L M I form by introducing a new intermediate matrix 7Vy such that (4.66) where « l i m = diag(t^m , . . . ,ulm) . The L M I form of the left-hand side inequality of (4.66) gives (4.63). The diagonal elements of the right-hand side inequality of (4.66) gives u2 1 Nj: < —=2*- which is a non-convex constraint and can be approximated by linearizing — as 2 7 1 — tr<— with 5: = Yj. As a result, the inequality becomes TV,, < Sj Sj Yj JJ rj ilim , and rearranging it gives (4.64). The state minimum decay rate constraint used here is of the form xk+j+l\k \UP° zp 1 zk+j\k \ P a for 0<j<H-l where / ?e (0 , l ) is the additional tuning UH-j 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 uk+j\k = Kjxk+M t o y i e l d zk+j\k (A+BKj)TU$_u+l)(A+BKj) < P X k+j\k UH-j (4.67) B y comparing the norm weightings of (4.67) and substituting U • = iuj}' •) and K = K fi; J \ J i J J J followed by pre-multiplying and post-multiplying by UT and Uj , one gets (A Uj + BKj )T Uj+l (AUj+ BK j) < pUj (4.68) which has the following L M I equivalent form: - \T p2Uj (AUJ+BKJ) AUJ+BKJ >0 (4.69) 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 in (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 STABILITY OF PREDICTED-INPUT CONTROL Figure 4.3: Stability boundaries with w l i m = 0 . 2 0 . (a) Stability surface for PQ = 0 .251^ ; (b) Stability surface for P0=Uoo; (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 Tca = 8. Figure 4.3(a) shows the stability surface at PQ=0.25Uoo with the input constraint w l i m = 0 . 2 0 (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 P0=Uoo, 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 P0 —> Ux, 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 CONTROL are used, as seen here. This is because, as the terminal weight P 0 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 , P0 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, in 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 PQ = compared to P0 = 0.5011^ and P0 = 0.751/^. 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 worst- case 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, in 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 P0 = 0.25£/„, which is the same value 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 P0=Uoo, as can be observed in figures 4.4(b) and 4.4(c). The drop in the level of worst-case delay due to longer prediction horizon is eliminated, and the overall stability has increased. 101 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL Figure 4.4: Stability boundaries with « l i m =0.20 and p = 0.99 . (a) Stability surface for P0 = 0 .251^ ; (b) Stability surface for P 0 = ; (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 Tca = 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 4 STABILITY OF PREDICTED-INPUT CONTROL (a) zca [ms] 5 (b) rca [ms] (C) Tca [ms] 85 time [seconds] Figure 4.5: Controller-to-actuator transmission delay TCA using the intermediate F IFO 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 in 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 in 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 mpQP 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 in 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 P0 = O.SOU^ . A n input constraint is imposed as -0.20 < u < 0.20. A n 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 in 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 in C++ language) take approximately 180 minutes. The state minimum decay rate constraint is not imposed because it requires the introduction of additional system states in the form of the square of each of the four original system states. This result in a tremendous increase in the computational effort required to generate the mpQP regions as well as the corresponding binary search tree. Wi th 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 in terms of pre- specified 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 in the remaining three states. At 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 PH increases and PR decreases, which is opposite of the experience in the previous test run. After the 4s mark, PH oscillates 105 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL above its steady-state value and PR oscillates below its steady-state value. 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. At 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 in 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. Wi th 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 mm 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 in 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 in the communication path. The packet sequence of a pre-computed future control input is dropped at the intermediate queue, as discussed in 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 in 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 in 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. At 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 P0, 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 of the cylinder PH [psi], pressure at the rod-side of the cylinder PR [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 t l 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) [mm] g io r y [mm/s] 1 Q[ PH 300 [psi] 200 600 PR 500 [psi] 400 U [mA] y [mm] 10 y o [mm/s].10 Jl, Jl . r / l 300 [Psi] 200 600 PR 500 [psi] 400 5 W 0 [mA] 10 15 20 25 30 35 40 45 time [seconds] (a) 10 15 20 25 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 PH [psi], pressure at the rod-side of the cylinder PR [psi], and input current u [mA]). (a) 3 steps of controller-to-actuator delay; and (b) 5 steps of controller-to-actuator delay. 109 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL y [mm] 5 = 0 - • 5 i 10r y o, [mm/sl10_ 400 r P/l 300 [psi] 200 600 Py 500 [psi] 400 5 U o [mA] y [mm] time [seconds] time [seconds] (c) time [seconds] (d) time [seconds] Figure 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 Ph [psi], pressure at the rod-side of the cylinder Pr [psi], and input current u [mA]). (a) Initial piston position = 5 mm; (b) Initial piston position = 2.5 mm; (c) Initial piston position = - 2 mm; and (d) Initial piston position = -A mm. 110 CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL 6 y 4 [mm] Q 10 y [mm/s]10 400 Ph 300 [psi] 200 600 Pr 500 [psi] 400 5 U o [mA] 6 y 4 [mm] Q u 0 I II nil 11I I ll II i inn ii . in mi inn [mA] I III mil mi 1 11 1111 1 mi mi mi mi mi ill (a) 0 | | A ^ A / ^ i ^ w v \ f - r t ) f u 10 y [mm/s]10 400 Pn 300 [psi] 200 600 r Pr 500- [psi] 400 5 ^ m A ^ J i mi MI' II m mini Him i 0 2 4 6 6 4 [mm] g y y OK [mm/s]_lo 400 p 1 h 300 [psi] 200 600 Pr 500 [psi] 400 10 time [seconds] (b) time [seconds] y [mm] [mm/s]10 nw inn • II 10 400 Pn 300 [psi] 200 600 Pr 500 [psi] 400 5 U o [mA] -5, " " V III iniiiiiiiiinii n mi ii i in minnim n inn iminnini lit (C) time [seconds] 10 (d) time [seconds] [mm] y 0 pvyvA~>w*>'-w,̂ A ŵlf' [mm/s]_10' 400 Pfo 300 [psi] 200 600 Pr 500 [psi] 400 5 L f J 4 [mm] ^ 10 j 0 [mm/s]io 400 -f/, 300 [psi] 200 600 PR 500 [psi] 400 5 [mA] ^ iû *̂̂^̂ (e) time [seconds] (f) 6 8 time [seconds] 10 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 PH [psi], pressure at the rod-side of the cylinder PR [psi], and input current u [mA]). (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. Il l CHAPTER 4 STABILITY OF PREDICTED-INPUT CONTROL PR 500 [psi] 400 L 5r winniinnmumMiiMBiiniii 2 4 (g) y [mm] mmnimiinaiiiiiniiimirn »mni 8 1C time [seconds] U [mA] Fi»Hiiiniaiirwniiii!i8;M:iuiHmininmi:niiTiani!i!iiFiinii- n 9 d K (h) time [seconds] y [mm/s]l 4001 [psi] 2001 600 r Pr 500 [psi] 400 5 (i) time [seconds] 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 Ph [psi], pressure at the rod-side of the cylinder Pr [psi], and input current u [mA]). (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. 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 (NCS). The control strategy hones the potential of constrained Model Predictive Control ( M P C ) by buffering the predicted control sequence at the actuator in anticipation of typical data transmission errors associated with N C S . Uti l iz ing 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 in 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 pre- computed 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 Model 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 N C S . 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 in 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 xk e Rn are the states of the system at time k, uke Rm are the control inputs at time k, and / : RnXm -> Rn. The finite receding-horizon cost function of the M P C control policy which is employed in both previous and present chapters is of the following quadratic form (see Section 4.2.1,(4.9)): H-\ VH (Xk , 7lk ) -^ky <j X k + m k + ^ 2 + Q Uk+i\k i=0 1 s.t. (5.2) xk+i\ke^i Vi = l,...,H uk+i\kel/ V / = 0 , . . . , / Y - l in which H is the length of the prediction horizon, Qe RnXn is the state weighting matrix, Re ] R m X m is the input weighting matrix, and P 0 e IR"*" is the terminal weight matrix of the state. The series of optimal control input is given by nk =[uk]k,...,uk+H_m \ = arg™ n VH(xk,nk) 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 nk for use at future time steps to compensate for the transmission errors between the controller and the actuator is stabilizing when the instantaneous state xk 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 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS state is delayed or lost, xk has to be estimated at every time step k using a state observer. Let the estimated state be denoted by xk. Depending on the speed of convergence and accuracy of the adopted state observer, the deviation of jĉ from the actual xk may render the solution to (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 xk and the actual measured state xk 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(xk,uk)-f(xk,uk)\\<Lf \\xk -xk\\ (5.3) where Lf is the bounding Lipschitz constant. Also , 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) yx(-) such that \\xk+1-f(xk,uk)\\<yx(lxk\\) (5.4) for k > 0 . The difference in the future evolution of the actual and the estimated states can be expressed as follows: xk+i ~xk+i = ixk+\ - / (**»u k ) ) + (/(**,uk)- f(xk,uk)) (5.5) 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: \\Xk+\ ~Xk+l\\ ^\\xk+i ~ f(xk.uk)|| + \\f(xk,uk)- f(xk,uk)|| II II ~ II II (5-6) <yx(lxk\\) + Lf\\xk-xk\\ for k > 0 in which ye (•) is a class /Cx -function. Define ye (•) = Ke \\xk || where Ke > 0 , yielding \\Xk+\ ~Xk+l\\- Ke\\Xk\\ (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 Ke and can be used as a measure of error tolerance for maintaining closed-loop asymptotic stability. Note here that a larger Ke is more desirable. 5.2 Stability Basis Stability analysis using Lyapunov's second method is based on the existence of a class /C^-function V(xk) that satisfies the condition V(xk)-V(xk+l)> v(\xk^) as where y(||xj.||) is another class /CI-function (Theorem 4.1). In other words, in order to ensure asymptotic stability, V(xk) should be decreasing with time along the trajectories of the closed- 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 in 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 of future control actions nk = {uMk,...,uk+H\k} a s determined from the M P C control law (5.2), is asymptotically stable i f VH(xk,7ik)—VH (xk+l,7tk+l) > 0 . Wi th the integration of the state observer, the actual measured state xk is not directly available to the M P C controller, thereby making VH(xk,nk) an unknown for A;>0. Instead, the time evolution of the estimated cost V ^ ^ , ^ ) (i.e., the receding horizon cost computed with the estimated state xk 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 horizon H and estimated state xk is asymptotically stable in the sense of Lyapunov if there exists a neighborhood J c E " containing an open neighborhood of the origin such that Proof: Adding and subtracting V^(xk,7tk) to the difference in the estimated costs at the time steps k 118 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS and (k +1), gives VH (Xk ,7tk)-V„ (Xk+l, 7lk+1)j - \VH (Xk+l, 7Zk+]) - V*H (XM, 7lM ) (5.9) 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 of (5.9) and V^(xk,7tk)-V^(xk+i,7rk+l) which can be bounded from below as V*H{xk,nk)-V*H(xk+x,nk+l)>\xkfQ. Since, optimality dictates V*H(xk,nk)<VH(xk,fck) for xk * 0 , and assuming that xk ~ xk, the first term of (5.9) can also be bounded from below as VH (xk>*t) - V*H (xk+i.*k+i) - \\xk||Q . 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 (xk+i —xk+l) in the initial state should be characterized. This characterization is required to facilitate the incorporation of the state estimation error bounding gain Ke into (5.8) through (5.7). This is 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+i=\xL uTk+iJ e R m + n for i = 0,...,H and Zjfc T T T Xk Xk+\ Xk+H T e K ^ X " " - " ) W i t h uk+H = 0 . Consider the linearized version of the discrete, time-invariant model (5.1), as given by xk+\=Axk+Buk (5.10) where AeRnxn and BeRnXm. The finite horizon quadratic cost function of (5.2) can be transformed into the following equivalent M P C optimization problem: 119 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS VH (xk ,nk) = VH(zh)= ™" \zTkJezk s.t. c(zk) = [Aj-AB]zk-vx=0 (5.11) where Je=diag(2Q,2R,2Q,2R,..,2Q,2R,2P0,0)e i&(H+i)(m+"MH+i)(m+n) A , = diag(/,0,...,/,0)s R("+lX«+»)x(ff+l)(m+iO 0 0 0 0 0 0 0 0 0 0 A B 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 0 0 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 R(H+l)(m+n)x(H+\)(m+n) xl 0T o1 jg,(#+l)(m+n) 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 in the following theorem. Theorem 5.1 (Karush-Kuhn-Tucker optimality conditions): Let A? be a vector space and Z a normal space. Let /(•) be a Gateaux differentiable real-valued functional on A?, and C a Gateaux differential mapping from Af into £ . Assume that the Gateaux differentials are linear in their increments. If x* minimizes /(•) subject to a constraint vector function c(x)>0, then there exist Lagrange multipliers X* such that x* and X* satisfy the following system: 120 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Vx£(x*,A*) = 0 ct(x*) = 0 for is £ Ci(x*)>0forieT (5.12) A*>0forieT A*Ci(x*) = 0fov V i 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 in x can be approximated using the mean value theorem given below. Theorem 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))T(a-b)dT (5.13) Proof: see Kreyszig (1999), pg. 445. • Let Xk+i=\x'k+i uTk+i | e E m + " for i = 0,...,H and T Xk Xk+\ "' Xk+H R(H+\)(m+n) ^ e m e jnuiti.paj-ajnetric vectors corresponding to the estimated initial state xk. Uti l izing theorems 5.1 and 5.2, the following lemma, which characterizes the sensitivity of the M P C policy (5.11) to the state estimation error at (k + Y) in 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 Zk+\ zk+\ ^ZxZz x k + \ ~ x k + i (5-14) 121 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS where and v", t + 1C(2jt +,) ^ J / V ^ V ^ ) ) ' d d d r ^1 in which £T = T T T T ' ~T T Xk+\ Zk+\ + T xk+\ zk+\ Xk+\ zk+\ and tjsR (H+1)(m+n) is the 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 , (VH(zk+l)-te(zM)j =0 (5.15) Assuming that V Z w c ( z * + 1 ) e R («+IX«+«MH+IX«+») h a s a f u l l r o w r a m v t h e b a s i s tje R(* + 1X'»+'0 f o r t h e n u l l s p a c e 0 f V Z t + i c(z t + 1 ) can be defined such that VZk+c(zk+l)tj = 0. B y projecting the gradient of the Lagrangian on the null space of V c ( z A + ] ) , (5.15) is obtained as = 0 Let the left-hand-side of (5.16) be equal to the vector function p(zk+i) = (5.16) * % + 1 V s ( z t + 1 ) c ( z * + i ) Define £ - T T Xk+\ zk+\ and i = [xl+i z [ + 1 Using Theorem 5.2, the affine approximation of p(-) for variations of £ is realized as 122 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Pit) ~ P(b = \l Vp(t + T(£ - b)T Of - <?) d r = 0 (5.17) Let £ r = £ + r ( £ - f ) . Partial differentiation of p(£T) in (5.17) with respect to xk+l and zk+l, respectively, yields f1 J o V x 4 + 1 ( v % + I W * * + i > ) V Z i + i ( / V Z i + i V w ( ^ + 1 ) ) " x/t+l x/t+l d r = 0 (5.18) Expand (5.18) and then rearrange to get zk+\ . zk+\ Jo V Z 4 + 1 ( / V Z i + i ^ ( z , + 1 ) ) ' dr Zr J J o Vx t + I c(z* + 1 ) d r fr J (5.19) [x*+i xjt+i ] B y taking the Euclidean norms on both sides of (5.19), and defining Z z and Zx as the upper 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(zk+i) = [A7 -AB]zk+l ~vXk+l a s m (5-H), the gradient V c(z i + 1) becomes a constant matrix, hence, the basis tj for the null space of S7Zk+c(zk+l) • In addition, the other partial differentials in Zx and Z z ; namely, VXk+VZk+iVH(zk+l)eRlH+1Xm+n)*n, VXk+lc(zk+l)e R(H+i*m+»*n, and V ^ V ^ V ^ z ^ e u ( H + l ) i m + n M H + l ) ( m + n ) , are also constant matrices. A s a result, the integrands are constant, rendering Zx and Z z to be constants as given by zx xk+l Zk+l V x c ( z k + \ ) and Z z = . For a particular Try V7 1/ t \ 111 l l r 'r— — 1 - 1 \ < system, there can be several different bases tj that satisfy Vz c(zk+l)q = 0, but any basis q results in the same Zx and Z z . The four partial differentials within Zx and Z z are obtained as 123 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS follows: ) = 2- O T oT ... 0*] T V , 4 + 1 c ( Z j t + 1 ) = f n 0T -AT umxn / l 0T ••• 0T~ T V « t + 1 V l t + 1 V w ( Z j l + 1 ) = 2-diag((fi)1 I,.. • •' ( ^ ) m .•••>Co)ii»- h 0 0 0 • 0 0 0 0 0 0 0 0 • • 0 0 0 0 -A -B K 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 -A -B h o 0 0 0 0 • 0 0 0 0 where Qdiag is a matrix with only the diagonal entries of Q , (Q)jj are the diagonal elements of Q , (R)jj are the diagonal elements of R , and (P0)jj are the diagonal elements of P0 . 5.4 Main Stability Results Referring to Lemma 5.1, the second term VH(xk+l,n:k+])-V^(xk+l,nk+l) in (5.8) can be formulated in 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) in terms of xk+i = xk+i uk+i e R m+n as follows: VH(xk,7tk) = VH(Xk) = XTk+HMpQXk+H + E XLIMQUX, /=0 Zk+i where M P q =diag(P 0 ,0)e M ( m + " ) x ( m + n ) and MQR =diag(Q,R)eR(m+n)x(m+n). 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+\MP0Xk+H+\- xl+H+\M'^Xk+H+\+^(Xk+iMQRXk+i ~ xLiMQRXk+i) 1=1 (5.20) B y defining the state-input estimation error vector as sk+l;=xk+i ~Xk+i f ° r i = 0,...,H , the actual state-input vectors % k + i (optimal but unknown) are removed from (5.20) to yield VH(Xk+l)-VH(Xk+0 H 4+tf+lMP 0Z*+tf+l + /L /+ l M P 0 e *+^ i=l (5.21) H Ek+H+l^P0£k+H+\ + 2^i£k+i^QR£k+i /=! In order to bound VH(xk+l)-VH(xk+\) or equivalently VH(xk+l,nk+l)-VH(xk+i,7ik+l ) in (5.8) from above, % k + i and sk+i have to be bounded first. The following two lemmas formalize the required bounds relative to xk. L e m m a 5.3: If xk cz A? and A? is a bounded space for > 0, then the estimated state-input vectors are bounded by the state xk as Xk+i -Kz Xk\ (5.22) for \/i > 0 where Kz is non-negative. Proof: Assume that the estimated state xk remains within a bounded space A? for Vfc > 0 . Since both xk and xk 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 sk+i are bounded by the state xk according to £k+i -ZxZzKe xk (5.23) for V i > 0 . 125 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Proof: <ZXZZ xk+l xk+l , B y taking the Euclidean norm of sk+i,= / k + i -%k+i one obtains l^^l = \\xk+i ~Xk+i\\ • S i n c e [Xt+i-Xk+i] i s w i t h i n [**+«-**+«]. o n e o b t a i n s and hence, \\£k+i\ ^ \zk+i -Zk+i\• From Lemma 5.2, it is established that zk+l -zk+l giving the bound \\sk+i|| < ZXZZ \\xk+l — | j . It is characterized in (5.7) that \\xk+l - xk+x I < Ke \\xk I and this completes the proof. • The (asymptotic) stabilizing properties of the closed-loop system that arise by 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 xk, is asymptotically stable in the sense of Lyapunov if the state estimation error bounding gain Ke>0 of (5.1) is bounded as 2( M, + 2H M, QR )ZXZZKZ (5.24) and Proof: Klle-^(IKI)2 > 0 (5.25) Proceed from the stability bound of (5.8) given in Lemma 5.1. The second term on the right- hand 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 by 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+\MpnXk+H+lI+ \Xk+H+\Mp£k+H+\ + X QRXk+i I + \\xLiMQR£k+i ) H ^ 2 h + H + i I ||MP0 I \\xk+H+i I + 2 Z lh+«- II\\MQR I Uk+i (5.26) Substitute (5.22) from Lemma 5.3 and (5.23) from Lemma 5.4 into (5.26). One obtains 126 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS <2 <2 M ZxZzKeKz (\\xk\\f + 2H\\MQR\\ZxZzKeKz (\\xk\\) <KB(xk + 2H 2 MQR\\jZxZzKeKz(\\xk (5.27) where KB=2( Mi + 2H MQR ZxZzKeKz (5.28) 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 KB 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 xk and xk (to the optimization problem of (5.11)) has an associated value of KB which is calculated from: KB = ^H^k+l'^k+O ^H^xk+\^nk+\) (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 KB that is possible within the combination spaces of xk and xk while satisfying the asymptotic stability condition of (5.25). Similarly, the input-state parametric evolution bounding gain Kz is determined by searching the space of the estimated state xk (except the origin) that satisfies (5.22). The optimal decision variables for i = 0,...,H from the solution of (5.11) with the initial condition xk, are used to calculate each corresponding Kz using the following equation: K =M^ (5.30) The maximum possible value of Kz is sought. Note that i f the states and the input are unconstrained in the optimization of (5.11), Kz 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 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Since QyO, it is clear from (5.25) in Theorem 5.3 that i f KB=0, VH(xk,iik) 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 Ke 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, in the presence of imperfect state feedback, counter intuitively, increasing H or PQ reduces Ke, thereby reducing the stability tolerance to state estimation errors. A trade-off in 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 Kzmax and Kg m a x 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 of the state estimation error of the developed N C S - M P C control strategy. 1. For a given system model, set Q , JR , P0, and H . 2. Calculate Je, At and AB of the optimization problem (5.11). 3. Compute the gradients and Hessians within (5.14); i.e., VZk+c(zk+x), V * * + 1 V Z * + 1 ^ W , V X 4 + i c ( z t + 1 ) , a n d VZk+VZk+lVH(zk+l). 4. Determine the null space basis tj and find Zx and Zz. 5. Initialize Kz m a x = 0 and KBmax = 0 . 6. Select a state xk within the bounded state-space Af. 7. Optimize (5.11) using xk to find %*k+i for i = 0 , . : . ,H . 8. For each %*k+i> determine Kz = /*k+i /\xk\, and i f Kz > K z m a x , then set K = K Z,max z ' 9. Repeat the steps 6-8 with a new state xk until the entire A? is explored. 10. Select a state xk within the bounded state-space A?. 11. Optimize (5.11) using xk to find x*k+l from the solution. 12. Optimize (5.11) using x*k+] from step 11 to find {xk+x,nk+x). 13. Select a state xk within the bounded state-space A? : 14. Optimize (5.11) using JC^ to find x*k+x from the solution. 15. Optimize (5.11) using x*k+1 from step 14tof ind V^(xk+X,7ik+X). 16. Compute KB=\v^(xk+x,nk+x)-V*(xk+x,7tk+x)\/(\\xk\\f. 17. If KB > KBmax and \\xk fQ - KB (\\xk | |) 2 > 0 , then set KB,max = KB. 18. Repeat the steps 13-17 with a new state xk until the entire Af is explored. 19. Repeat the steps 10-18 with a new state xk until the entire Af is explored. 20. Compute Ke>max with (5.24) using Kz m a x and KB 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 in 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 P0 as fractions of the open-loop infinite weight U„. Note that is attained by solving the discrete Lyapunov equation Uoa=Q+ ATU„A. As discussed in the previous section, the maximum attainable cost evolution bounding gain KB (the higher the better) and the input-state parametric evolution bounding gain Kz (the 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 KB must also satisfy the stability condition (5.25). Figure 5.1 shows the variation of the maximum Kz on the 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 P0 = OSU^. It is observed that although the surface of Kz is not fully symmetric, the low regions of Kz are concentrated approximately along the x 2 -axis while the high regions are along the jq-axis. This is because the system is quite sensitive to variations in Jcj but less sensitive to variations in x2. Figure 5.2 shows the variation of the maximum and stable KB 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 KB 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 , P0 , and H . Figure 5.3(a) shows the maximum tolerable state estimation error (norm of the state vector) Ke in order to maintain closed-loop asymptotic stability under different settings of PQ and prediction horizon values up to 10 steps. The values of Zx and Zz in (5.14) are 3.34 and 10.77, respectively. A t P 0 = 0 . 0 1 £ / r o and H=\, Ke is approximately 0.012, which means that in order for the system to remain stable, the norm of the state estimation error \xk+] - xk+1 | must 130 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS not exceed 1.2% of the norm of the current state 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 in P 0 and more rapidly with the length of the prediction horizon, which is mainly due to the exponential increase in Kz, as shown in Figure 5.3(c). The surge in Kz can be effectively controlled by imposing state and input constraints on the M P C control law, which wi l l also result in tighter bounds for Zx and Zz, thereby increasing Ke. Figure 5.3(b) shows that KB remains approximately at 1, independent of P0, at shorter prediction horizon. Fluctuations of KB are 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 xk 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 = 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). As can be observed from Figure 5.4(b), KB is reduced only by a small margin to approximately 0.52, with less fluctuations at a longer prediction horizon. More importantly, Kz is substantially reduced with a desirable reverse effect from P0 as the prediction horizon is increased, as shown in Figure 5.4(c). The reverse effect from P 0 is desirable because for asymptotic stability, the developed future input buffering N C S technique (see Chapter 4) requires a sufficiently large PQ and a sufficiently long prediction horizon. 1.06730 -0.10423" "0.00138" and B = -0.02484 0.89404 0.01027 131 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS 1 -1 Figure 5.2: Variation of the maximum KB on the state plane of x r x 2 with x3=x4=0 under a prediction horizon H = 5 and a terminal weight matrix 132 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Figure 5.3: The effect of P0 and H on stability based on the original model, (a) Max imum bound of Ke ; (b) Maximum bound of KB; and (c) Max imum bound of Kz. 133 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS Figure 5.4: The effects of P0 and H on stability based on the reduced model of the system, (a) Maximum bound of Ke ; (b) Maximum bound of KB; and (c) Max imum bound of Kz. 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 in 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 in the sensitivity analysis. A n iterative, multi- shooting optimization method is required to continuously adapt to conditions of 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 VH(zk) (5.31) s.t. cs(zk) = Oi andcj-(zk)<0j In order to convert Cj (zk) < Oj to equality constraints, an additional (slack) variable vector peRj is introduced first and then all the constraints are combined to transform (5.31) into the following equivalent problem: minimize VH(zk,p) cs(zk) s.t. &(zk,p) = Cz(.zk) + p (5.32) ••0i+j and p>0j In order to take into account the constraint P>0j, use a differential mapping A4: W —>RJ+ and make the space transformation p = M(p) where /> e IR-7. Let Mp be the square Jacobian matrix of the mapping M(p) with respect to p. Assuming that the inverse ~p = M(p) is defined, the Jacobian and Gram matrices are obtained, respectively, as Ja(p) = M(p)\-=M(p)eRjxj and Gm(p)=Ja(p)JTa(p)s Rjxj. Combining the variables and the constraints for the reduced problem of (5.32), the following equivalent problem with equality constraints only is obtained: 135 CHAPTER 5 STABILITY UNDER IMPERFECT STATE MEASUREMENTS minimize VH(zk,p,p) S.t. 0(zk,p,p) = Cj{zk) + M(p) Another way of introducing slack variables is to let that variable be squared; i.e., p2 e Rj to remove the above-mentioned non-negativeness condition, so that the equivalent optimization problem is given as: minimize VH(zk) s.t. c£ (zk) = 0, and cT (zk ) + p*= Oj 2 - (5-34) However, additional Karush-Kuhn-Tucker optimality conditions have to be considered since the new Lagrangian becomes £{z,X) = VH(z)-ACF(Z) where cAz)- cT(z) + p2 . They are Vz£(z,X) = 0 , Vp£(z,k) = 0, Vx£(z,A) = 0 and c^{z)=0. Another possible alternative of transforming inequality constraints into equality constraints without the use of slack variables is to replace cT(zk)<0j with minjc^(z k),0} =0j, assuming cT(zk) 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 in 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 Model 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. As 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 wi 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 wi 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 wi 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 Ugend: The University of British Columbia, Canada 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 wi l l allow authorized researchers and students to access laboratory equipment located at any of the university departments or organizations, through Virtual Project Stations (VPS). 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 wi 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 A n 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 Web-Server Video- Streaming Server Control Server Process 1: Industrial Robot 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 web- server, 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 PCI board is installed in the video-streaming server. It can capture video signals at a maximum resolution of 640x480 at 30 fps, with a hardware compression that significantly reduces the computational overheads of the video- streaming 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 REMOTE SYSTEM MONITORING LOCAL (LAN) 'INTERNET! WEB-SERVER CONTROL SERVER D Inst. Driver c •a Main O — Control Program | s o U A \ I T C P / U D P ; Data Acquisition/DSP Hardware Client / , Database \ " ~ Apache HTTP Server ( H T M L / C G I / Java Applets) Audio and NTSC video input from cameras "1 4> Physical System (Sensors & Actuators) Video Capture and Encoder (Viduem 1(HX>) MPEG MJPEG H-s6ri VIDEO-STREAMING SERVER REMOTE Middle Server Camera Control Server BUS (RS232) Java-enabled Web-browser Stand Alone C/C++ Programs REMOTE WORKSTATION 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 Per l /CGI (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 (Ko, et al, 2001). Many 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 wi l l free up processing power for high bandwidth control computations, thereby increasing the performance of the control server. On the other hand, the web-server requires a significant amount of processor overhead. As 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 wi 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 Java™ applets (see Section 6.3.4) is then transferred to the user's web-browser (VPS) 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 wi l l then be forwarded to the intended control server for execution. These files wi 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 wi 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 Middle server requests main state changes Middle server requests control server to start sending data 12 13 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. No 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 wi l l 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. As 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 wi 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 of a client is established, the client wi l l be taken off the temporary list and added to the active client database. Then, the middle server wi l l 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 wi l l be forwarded to the control server with message type ID-11. A similar request from any other user type wi l l be rejected and a request denial message wi 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 wi l l 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 wi l l notify the control server to stop sending data updates. Client requests main state changes (ID-105). This request precedes the message type LD- 12 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 of 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 wi 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 wi l l 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 Java™ applet destruction sequence, a disconnection request is sent to the middle server. After receiving the confirmation, the user's V P S applet wi l l 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 wi l l automatically store the newly received identification string for subsequent communication and wi 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 RS-232C 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 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 6.3.4 The User Interface Client The scalability, portability, and platform independence of Java™ 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 Java™, whose programs are compiled to platform-independent codes, and dispersed on the web-server as Java™ applets. When a user is logged on to the web-server through a V P S , the Java™ 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). Two popular commercial solutions are RealSystem Server Professional by RealNetworks (RealNetworks, Inc.) and Windows Media Services by Microsoft Windows Media 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 Java™ Media 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. Java™ Media 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. Java™ Media 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: t y p e d e f s t r u c t { u n s i g n e d l o n g k _ s a m p l e ; / / sample time step s h o r t e n d A l l ; / / terminate execution flag s h o r t c o n t r o l M o d e ; / / current control mode s h o r t p o w e r O n ; / / power on-off state s h o r t c o n v e y o r O n ; / / conveyor on-off state s h o r t . s t a r t S t a t e ; 7 / task run state s h o r t p a d d i n g ; / / data packet byte padding f l o a t K p X , K i X , K d X ; / / PID gains for the X-axis f l o a t K p Y , K i Y , K d Y ; / / PID gains for the Y-axis f l o a t y k X , y k Y ; / / measured position outputs f l o a t y m k X , y m k Y ; / / reference model position outputs f l o a t r k X , r k Y ; / / interpolated quintic trajectory points f l o a t r s p X , r s p Y ; / / position set-points for each axis f l o a t u k X , u k Y ; / / control input currents II Gain settings for a model-referenced fuzzy controller for II each axis (see Chapter 7): f l o a t M R F C g e X , M R F C g d e X , M R F C g u X ; f l o a t M R F C g e Y , M R F C g d e Y , M R F C g u Y ; f l o a t p a X , p a Y ; / / head-side cylinder pressures f l o a t p b X , p b Y ; / / rod-side cylinder pressures } M E S S A G E _ F R O M _ C O N T R O L _ S E R V E R _ T O _ M I D D L E _ S E R V E R ; The message request structure from the middle server to the control server is 76 bytes in size and is composed of: t y p e d e f s t r u c t { u n s i g n e d s h o r t m s g T y p e ; / / message type identifier s h o r t s t a r t S t a t e ; / / task run trigger s h o r t e n d A L L ; / / halt operation trigger 150 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING s h o r t r e s e t ; / / reset trigger s h o r t c o n t r o l M o d e ; / / s e t control mode s h o r t p o w e r O n ; / / power on-off trigger s h o r t c o n v e y o r O n ; / / conveyor on-off trigger s h o r t m a n u a l M o d e ; / / manual manipulation trigger s h o r t r e m o t e R e q u e s t ; / / trigger for staring data stream s h o r t r e m o t e R e q u e s t l n t e r v a l ; / / d a t a streaming rate f l o a t K p X , K i X , K d X ; / / PID gains for the X-axis f l o a t K p Y , K i Y , K d Y ; / / PID gains for the Y-axis II Gain settings for a model-referenced fuzzy controller for II each axis (see Chapter 7): f l o a t M R F C g e X , M R F C g d e X , M R F C g u X ; f l o a t M R F C g e Y , M R F C g d e Y , M R F C g u Y ; f l o a t r s p X , r s p Y ; / / position set-points for each axis } M E S S A G E _ F R O M _ M I D D L E _ S E R V E R _ T O _ C O N T R O L _ S E R V E R ; 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 Java™ 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: t y p e d e f s t r u c t { s h o r t m s g T y p e ; // message type identifier s h o r t c l i e n t I D ; // client identification string s h o r t p o w e r O n ; // power on-off state s h o r t c o n v e y o r O n ; // conveyor on-off state s h o r t s t a r t S t a t e ; // task run state s h o r t c o n t r o l M o d e ; // current control'mode s h o r t K p X , K i X , K d X ; / / PID gains for the X-axis s h o r t K p Y , K i Y , K d Y ; / / PID gains for the Y-axis s h o r t r s p X , r s p Y ; // position set points s h o r t r k X , r k Y ; // current trajectory points s h o r t y k X , y k Y ; // measured position response s h o r t u k X , u k Y ; // control input currents s h o r t p a X , p a Y ; // head-side cylinder pressures s h o r t p b X , p b Y ; // rod-side cylinder pressures II Gain settings for a model-referenced fuzzy controller for 151 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING II each axis (see Chapter 7): s h o r t M R F C g e X , M R F C g d e X , M R F C g u X ; s h o r t M R F C g e Y , M R F C g d e Y , M R F C g u Y ; // performance attributes (rise-time, settling-time, II overshoot, and steady-state error) s h o r t p e r f _ r t , p e r f _ s t , p e r f _ o s , p e r f _ o f ; l o n g k _ s a m p l e ; / / current sample time step } M E S S A G E _ F R O M _ M I D D L E _ S E R V E R _ T O _ R E M O T E _ V P S ; The performance attributes for the model-referenced adaptive controllers as wi 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: t y p e d e f s t r u c t { s h o r t m s g T y p e ; // message type identifier s h o r t c l i e n t I D ; // client identification string s h o r t p o w e r O n ; // power on-off trigger s h o r t c o n v e y o r O n ; // conveyor on-off trigger s h o r t s t a r t S t a t e ; // task run trigger s h o r t c o n t r o l M o d e ; // control mode trigger s h o r t m a n u a l M o d e ; // manual manipulation trigger s h o r t p a d d i n g ; // data packet byte padding s h o r t r s p X , r s p Y ; // position set-points for each s h o r t K p X , K i X , K d X ; / / PID parameters for the X-axis s h o r t K p Y , K i Y , K d Y ; / / PID parameters for the Y-axis II Gain settings for a model-referenced fuzzy controller for II each axis (see Chapter 7) s h o r t M R F C g e X , M R F C g d e X , M R F C g u X ; s h o r t M R F C g e Y , M R F C g d e Y , M R F C g u Y ; } M E S 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, PID servo, PID 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 (GPC) . The 152 CHAPTER 6 INFRASTRUCTURE FOR WEB-BASED REMOTE SYSTEM MONITORING 'H HTML Test Page - Microsoft Internet Explorer File Edit View Favorites Tools Help J j] dSj j Address f7JhUp://arnac mech.ubc.ca/cgi-bin/protect pl?file=ircj Virtual Project Station I r o n B u t c h e r PowerOn* Conveyor Of j Run Stop Disconnect •Performance | Response i Pressure { Rise-time 1.5 iwi-. PnsmM h^mt fc •civ- PmwaM Irymt Settling-time - l - 5.5 Overshoot e.o Offset "a / jjjS,- 1.0 - 8- -. 8- i i i i i i i I I - i % - 1 1 1 1 1 1 1 1 1 1 •Controler Mode— Time [second*] s> 4ao mo KM) M,0 MO Hm* fseooixt*] % PID SKti ftfcSttUft Output l axi; Pm -̂uit* Output I PID-MRFC PID-MRAFC O Auto-Switch U GPC i - : Ag- I a :1 s " § 1/ 8- Ig- 2 _ a s w a— £ 1- *> i i i i i I tt -Mo soo sr.o 1 1 1 MO ~i s WO 4 i i i i i A « 0 S10 MJO WO KO ; Tim* | • i> i. | Manual PID MRFC MRAFC GPC Trajectory K Position ¥ Position J mm mm 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 in Chapter 7. The center-right region of 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 of 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 PID, 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 client- server 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 wi 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 1 ' 7^ UDP/TCP High-level Knowledge Feedback J Intelligent Flexible Production System Controller Data Base Monitoring/Control Knowledge Base Intelligent Preprocessors Level Intermediate-level Information Feedback Workcell-level Information Workcell Controllers Preprocessing of Sensory Data Context Generation Defuzzification Information Preprocessors Level — " s ^ Low-level Sensory Feedback Network Medium Parameter Update Tuning Reference Commands 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 higher- level 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 wi 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 wi 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 web- server 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 ig . 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 PID 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) = -KPY,U-1)+K, (/?(;-' )-y t( Z-') > > -KD(l-z-l)Yx(z-1) (7.1) where, F 5 (z ') is the system output, U(z l) is the control input, R(z l) is the command reference, and K P , K { , and KD are the controller-gain parameters. In order to reduce the Human Expert M R F C Gains M R A F C Gains User Interface Performance Specifier Intelligent Selector • 1 M R A F C Clients Performance Evaluator Attributes Extractor Network i ! I L - J Reference Trajectory i T I M R F C 2L ± PID Controllers Primary Vision Module Actuators Display Server Sensors 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 -Ia sgn(y f -r), where Ia = 2.0 m A , ys is the position response, and r is the reference input. The servo control bandwidth is set at 200 Hz , 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 PID 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 PID controller; i.e., KP, K/, and KD. 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 PID 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 off- tuned 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 M R A F C 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)n, as given by the transfer function: 161 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Ym(s) a% (7.2) R(s) s2 + 2^cons + co2n where 7 m ( ) 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 Hz . Under the run state, the M R A F C updates the PID 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 Hz) , 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., The change in the tracking error is the difference in the tracking error between the current and the previous time steps, as given by: 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. £(k) = ym(k)-ys(k) (7.3) Ae(k) = £(k)-£(k-\) T s (7.4) 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 input r~ Reference Model Direct Controller Physical System Response Fuzzy Knowledge Base and Inference Engine 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. Error, e Change in Tracking Error, Ae Negative Near Zero Positive Negative z, z 2 Zs Near Zero z 8 Target Z 4 Positive Z7 z 6 z 5 Table 7.2: Anticipated corrective action corresponding to each zone. Reference Zone Corrective Action z, Reduce control signal by a large value z 2 Reduce control signal moderately 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 8 Reduce control signal slightly 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 Low), Z E (Zero), P L (Positive Low) , 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 wi 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. Er ror Change in Tracking Error N H N M N L ZE PL P M PH N H NH NH NH NH NM NL ZE N M NH NH NH NM NL ZE PL N L NH NH NM NL ZE PL PM ZE NH NM NL ZE PL PM PH PL NM NL ZE PL PM PH PH P M 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 {tr) is 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 s) is taken to be the time required for the step response to 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)d) is 166 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS computed using cod=f- where tp 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 of 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), IN (In- specification), M G (Marginal), P R (Poor), and V P (Very Poor). Membership functions of IN, 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. p 167 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.4: The six indices of deviation. Performance attributes Notation used in rule base Index of deviation Rise-time (95%) RT RT = 1 - Settling-time (±2% criterion) ST c t _ i S T M 5 1 _ 1 ~ "STT Maximum overshoot OS U i ~ 1 os s Steady-state offset OF OF OF = 1 m OFS Damped natural frequency W D WD Damping ratio DR 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: Typical membership functions used for the consequent variables for M R A F C . The incremental change in the adjustable parameters KP, K,, and KD of the discrete PID 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 PID controller are not identical. Specifically, KP ranges from 0 to 10, Kj ranges from 0 to 1, and KD 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 wi l l allow smoother and rapid convergence of the parameters of the PID 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 Kp while Kj and KD are kept constant. When KP 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. Wi th 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 KP. 170 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.5: The rule base for the M R A F C . Change in controller parameters DKP DKI DKD RT = V P L D LI LI RT = PR SD LI SI RT = M G NC SI SI RT = IN NC NC NC RT = OV SI L D L D ST = V P - LI LI ST = PR - SI SI ST = M G - SI SI ST = IN - NC NC ST = OV - SD L D OS = V P LI SD L D OS = PR SI NC L D OS = M G NC NC SD OS = IN NC NC N C OS = OV SD SI SI OF = V P SI LI - OF = PR NC SI - OF = M G N C NC - OF = IN NC NC - OF = OV N C SD - W D = V P L D SD SI WD = PR L D SD SI WD = M G SD SD SI WD = IN NC N C NC WD = OV LI SI L D DR = V P LI L D LI DR = PR SI SD SI DR = M G NC SD SI DR = IN NC NC NC DR = OV L D SI L D 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. Wi th 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 Takagi- 171 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 - OFF , 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, OS, OF, 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 , OF, 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. Figure 7.11: The antecedent membership functions for the intelligent adaptive control selector. V P -0.5 0 0.5 172 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS Table 7.6: The intelligent selector rule base for adaptive controller switching. / /RT=OV then SWITCH=MRAFC 7/RT=IN then SWiTCH=ALL-OFF / / R T = M G then SWiTCH=MRFC 7/RT=PR then SWiTCH=MRFC 7/RT=VP then SWITCH=MRAFC 7/ST=OV then SWITCH=MRFC 7/ST=IN then SWTTCH=ALL-OFF 7/ST=MG then SWiTCH=MRFC 7/ST=PR then SWITCH=MRFC 7/ST=VP then SWITCH=MRAFC 7/OS=OV then SWITCH=MRFC 7/OS=IN then SWITCH=ALL-OFF 7/OS=MG then SWITCH=MRFC 7/OS=PR then SWiTCH=MRAFC 7/OS=VP then SWiTCH=MRAFC / /OF=OV then SWITCH=MRAFC 7/OF=IN then SWiTCH=ALL-OFF 7/OF=MG then SWITCH=MRAFC 7/OF=PR then SWITCH=MRAFC 7/OF=VP then SWITCH=MRAFC 7/WD=OV then SWITCH=MRAFC 7/WD=IN then SWITCH=ALL-OFF 7/WD=MG then SWITCH=MRFC 7/WD=PR then SWITCH=MRAFC 7/WD=VP then SWITCH=MRAFC 7/DR=OV then SWTTCH=MRAFC 7/DR=IN then SWITCH=ALL-OFF 7/DR=MG then SWITCH=MRFC 7/DR=PR then SWITCH=MRAFC 7/DR=VP 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 con=5.0 rad/s and ^ = 0.91. In order to simulate the change in system dynamics, the parameters of the PID servo controller are deliberately changed. The case studies are conducted with initial PLD settings of KP = 4.3, K, = 0.077 and KD = 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 At the 7,500th time step the parameters are off tuned at KP = 0.1, K, = 0.08 and KD = 30.0, to generate an oscillatory response. Finally, at the 16,500th time step, the parameters are changed to KP = 4.0, Kt = 0.02 and KD = 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 mm 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 PID 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 PID 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 PID 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." No tuning is carried out on the parameters of the local PID controllers. Figure 7.14(b) shows that very good tracking is achieved throughout the experiment and is unaffected by the off-tuning of the PID 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. PID 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 M ) 2 x l 0 4 [mA 2 ] J V x l O 3 [mm 2] 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 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) KP; (f) Kf, and (g) KD. 176 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS M R A F C (a) M R F C O F F 10 (f) (g) - i r i i i - 0.5 1 l 1.5 2 1 2.5 (d) -a (e) 3 & C i — i -10- KP 5r 0 - K, 0.2 r 0.1 - o- 40 r 20- 0'= 0.5 1.5 2.5 0.5 1.5 2.5 0.5 1.5 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) KP; (f) Kf, and (g) KD. 177 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS M R A F O (b) i i I 1 l l l 0.5 1 I 1.5 2 2.5 1.5 2.5 I I ( 1 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) KP; (f) K{; and (g) KD. 178 CHAPTER 7 REMOTE SUPERVISORY CONTROL SYSTEMS (f) 1 I I 0.5 1 1.5 2 2.5 i t i I I (b) § bfi g (c) I a o (d) r (e) (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) KP; (f) Kf, and (g) KD. 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 (NCS), 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 Mode 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 two- tier 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 signal- adaptive 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 in 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 wi 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. Wi th 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 in 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 wi 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 C3 Environment for Small to Medium-sized Enterprises," Integrated Manufacturing Systems, V o l . 5, No. 3, pp. 20-28, 1994. Al-Ghazzawi , A . , E . A l i , A . Nouh, and E . Zafiriou, "On-line Tuning Strategy for Mode 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: Why and How," IEEE Trans. Industrial Electronics, V o l . 49, No. 6, pp. 1189-1201, 2002. Anderson, R.T. and P . Y . L i , "Mathematical Modeling of a Two Spool Flow 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 Server, Available at: http://www.opensource.apple.com/projects/streaming/. 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, Maui , HI , pp. 676-681, 2003. Beldiman, O., G . C . Walsh, and L . Bushnell, "Predictors for Networked Control Systems," Proc. American Control Conference, Chicago, IL, pp. 2347-2351, 2000. Bellman, R . E . , Adaptive Control Processes - A Guided Tour, Princeton University Press, Princeton, N J , 1961. 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 Explici t 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., Englewood- C l i f f s , N J , 1991. Bertsekas, D.P. , Dynamic Programming and Optimal Control, 2nd Edition, Athena Scientific, Belmont, M A , 2000. 186 BIBLIOGRAPHY Bhandari, A . and M . H . Shor, "Access to an Instructional Control Laboratory Experiment through the Wor ld Wide 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 Man's GPC, Prentice-Hall, Inc., Englewood-Cliffs, N J , 1990. Bordons, C. and E.F . Camacho, " A Generalized Predictive Controller for Wide Class of Industrial Processes," IEEE Trans. Control Systems Technology, V o l . 6, No. 3, pp. 372-387, 1998. Boyd, 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 Control, Springer-Verlag, London, U K , 1998. Cena, G . and A . Valenzano, "Achieving Round-Robin Access in Controller Area Networks," IEEE Trans. Industrial Electronics, V o l . 49, No. 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, No. 3, pp. 493-510, 1995. Chen, H . and F. Allgbwer, " A Quasi-Infinite Horizon Nonlinear Model Predictive Control Scheme with Guaranteed Stability," Automatica, V o l . 34, No. 10, pp. 1205-1217, 1998. Chen, T . M . and R . C . Luo, "Remote Supervisory Control of A n Autonomous Mobi le Robot via Wor ld Wide Web," Proc. IEEE Int. Symp. Industrial Electronics, Guimaraes, Portugal, V o l . l , p p . 60-64, 1997. Chisci , L . , A . Garull i , 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, No. 2, pp. 137-160, 1987. Conti , M . , L . Donatiello, and M . Furini, "Design and Analysis of RT-Ring : A Protocol for Supporting Real-time Communications," IEEE Trans. Industrial Electronics, V o l . 49, No. 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, Mau i , HI , pp. 2077-2081, 2003. Cristian, F. , "Probabilistic Clock Synchronization," Distributed Computing, V o l . 3, pp. 146- 158, 1989. 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 . Van Cuawenberghe, "Extended Prediction Self Adaptive Control," Proc. IF AC Symp. Identification and System Parameter Estimation, York , 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, No. 4, pp. 177-189, 1991. de Silva, C . W . , Intelligent Control - Fuzzy Logic Applications, C R C Press, Boca Raton, F L , 1995. de Silva, C . W . , Mechatronics - An Integrated Approach, C R C Press, Taylor and Francis, Boca Raton, F L , 2005. 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, No . 1, pp. 237-256, 1994. Farsi, M . and K . Ratcliff, "Controlling with CANopen [Industrial Control Networks]," IEE Review, V o l . 44, No. 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 Model Predictive Control - A n Overview," European Journal of Control, V o l . 9, pp. 190- 206, 2003. Fletcher, R., Practical Methods of Optimization, 2nd Edition, John Wiley & Sons, Ltd. , New York, N Y , 1987. Fukuda, K . , C-library cddlib Reference Manual, Version 0.93c, 2003, Available at: http://www.ifor.math.ethz.ch/~fukuda/cdd_home/cdd.html. Furuta, K . , A . Sano, and D . Atherton, State Variable Methods in Automatic Control, John Wi ley & Sons, Ltd. , New York, N Y , 1988. Gockenbach, M . S . , "Infeasible Point Methods for Inequality-constrained Nonlinear Programming," Unpublished, 2003. 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 .3BSD," 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 (CSMA/CD) Access Method and Physical Layer Specifications, I E E E Standard 802.3™, 2002. 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, "Minimum 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, No. 2, pp. 265-293, 1988. Kerrigan, E . C . , Robust Constraint Satisfaction: Invariant Sets and Predictive Control, Ph.D. Thesis, Department of Engineering, University of Cambridge, Cambridge, U K , 2000. Kha l i l , H . K . , Nonlinear Systems, 3rd Edition, Prentice-Hall, Inc., Upper Saddle River, N J , 2002. K i m , Y . H . , W . H . Kwon , and Y . I . Lee, " M i n - M a x Generalized Predictive Control with Stability," Computers and Chemical Engineering, V o l . 22, No. 12, pp. 1854-1858, 1998. K o , C . C . , B . M . Chen, S .H. Chen, V . Ramakrishnan, R. Chen, S .Y . Hu , and Y . Zhuang, " A Large-Scale Web-based Virtual Oscilloscope Laboratory Experiment," IEE Engineering Science and Education Journal, V o l . 9, No. 2, pp. 69-76, 2000. K o , C . C . , B . M . Chen, S .Y. Hu, 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, No. 3, pp. 295- 303,2001. Kothare, M . V . , V . Balakrishnan, and M . Morari , "Robust Constrained Model Predictive Control using Linear Matrix Inequalities," Automatica, V o l . 32, No. 10, pp. 1361-1379, 1996. Kouvaritakis, B . , M . Cannon, and J .A. Rossiter, "Who needs QP for Linear M P C anyway?" Automatica, V o l . 38, pp. 879-884, 2002. Kreyszig, E . , Advanced Engineering Mathematics, 8th Edition, John Wiley & Sons, Ltd. , New York , N Y , 1999. Kurose, J.F. and K . W . Ross, Computer Networking - A Top-Down Approach Featuring the Internet, 2nd Edition, Pearson Addison-Wesley, Boston, M A , 2003. Lian , F . - L . , J. Moyne, and D . Tilbury, "Analysis and Modeling of Networked Control Systems: MEVIO Case With Multiple Time Delays," Proc. American Control Conference, Arlington, V A , pp. 4306-4312, 2001. Lian , 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 Lian, F . - L . , J. Moyne, and D . Tilbury, "Network Design Consideration for Distributed Control Systems," IEEE Trans. Control Systems Technology, V o l . 10, No. 2, pp. 297-307, 2002b. L imon 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 imon 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, No. 2, pp. 261-268, 1997. Ljung, L . , System Identification - Theory for the User, Prentice-Hall, Inc., Englewood Cliffs, N J , 1987. Luck, R. and A . Ray, " A n Observer-based Compensator for Distributed Delays," Automatica, V o l . 26, No. 5, pp. 903-908, 1990. Luenberger, D . G . , Optimization by Vector Space Methods, John Wiley & Sons, Inc., New York, N Y , 1969. Lundelius, J. and N . Lynch, " A n Upper and Lower Bound for Clock Synchronization," Information and Control, V o l . 62, No. 2-3, pp. 190-204, 1984. Mayne, D.Q. , J .B. Rawlings, C . V . Rao, and P . O . M . Scokaert, "Constrained Model 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 Control, Ph.D. Thesis, The University of Austin Texas, Austin, T X , 1994. Microsoft Corp., Microsoft Windows Media Technologies, Available at: http://www.microsoft.com/windows/windowsmedia/distribute.asp. M i l l s , D . , "Improved Algorithms for Synchronizing Computer Network Clocks," IEEE/ACM Trans. Networking, V o l . 3, No. 3, pp. 245-254, 1995. Mischalska, H . and D.Q. Mayne, "Robust Receding Horizon Control of Constained Nonlinear Systems," IEEE Trans. Automatic Control, V o l . 38, No. 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, No. 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 of Automatic Control, Lund Institute of Technology, Lund, Sweden, 1998a. 190 BIBLIOGRAPHY Nilsson, J., B . Bernhardsson, and B . Wittenmark, "Stochastic Analysis and Control of Real- time Systems with Random Time Delays," Automatica, V o l . 34, No. 1, pp. 57-64, 1998b. Nunes, G .C . , S. Kinca 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 Control Systems, Prentice-Hall, Inc., Englewood Cliffs, N J , pp. 315- 218,1987. Otanez, P .G . , J.R. Moyne, and D . M . Tilbury, "Using Deadbands to Reduce Communication in 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, Ann 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, No. 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 New Approach to Stability Analysis for Constrained Finite Receding Horizon without End Constraints," IEEE Trans. Automatic Control, V o l . 45, No. 8, pp. 1507-1512,2000. Quanser, Inc., WebLab, Available at: http://www.controlab.com/. Quevedo, D .E . , G . C . Goodwin, and J.S. Welsh, "Minimiz ing Down-Link Traffic in Networked Control Systems via Optimal Control Techniques," Proc. IEEE Conf. on Decision and Control, Mau i , HI, 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, No. 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 via Internet," Proc. IEEE Int. Symp. Computer Aided Control System Design, Kohala, HI , pp. 279-584, 1999. Santos, L . O . and L . T . Biegler, " A Tool to Analyze Robust Stability for Model 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 Mode l Predictive Control (Feasibility Implies Stability)," IEEE Trans. Automatic Control, V o l . 44, No. 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, No . 9, pp. 1453-1464, 2004b. Skogestad, S. and I. Postlethwaite, Multivariable Feedback Control - Analysis and Design, John Wiley & Sons, Ltd. , New York, N Y , 1996. Sugeno, M . , Industrial Applications of Fuzzy Control, Elsevier Science, New York, N Y , 1985. Sun Microsystem, Inc., Java™ Media Framework, Available at: http: //j ava. sun. com/products/j ava-medi a/j mf/ 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, No. 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. 33- 52, 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, No. 2, pp. 60-72, 2002b. Tang, P .L . , C . W . de Silva, and X . G . Wang, "Monitoring and Control of a Wood-Drying 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, New 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, Mau i , HI , 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 Si lva, "Stability and Optimality of Constrained Model Predictive Control with Future Input Buffering in Networked Control Systems," Proc. American Control Conference, Portland, OR, 2005b. 192 BIBLIOGRAPHY Tang, P . L . and C . W . de Silva, "Stability Validation of a Constrained Model 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, "On 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, No. 6, pp. 1241-1251, 1999. Walsh, G .C . , H . Ye , 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, No. 3, pp. 438-446, 2002. Weaver, A . C . and X . Zhang, "Monitoring and Control using the Internet and Java™," Proc. IEEE Industrial Electronics Society, San Jose, C A , pp. 1152-1158, 1999. Xiao , L . , A . Hassibi, and J.P. How, "Control with Random Communication Delays via a Discrete-time Jump System Approach," Proc. American Control Conference, Chicago, IL, V o l . 3, pp. 2199-2204, 2000. Xiao , 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. Yook, 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, Ann 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, No. 1, pp. 84-99, 2001. Zheng, A . , "Robust Stability Analysis of Constrained Model 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, in Boyd, et al. (1994). Note that the symbols used in the appendices do not exactly correspond to the ones used in the body of this thesis. A Linear Matrix Inequality (LMI) is a matrix inequality of the following form: where JC = [X, ••• x J e R " and Mi are symmetric positive definite matrices, which are given. Mult iple 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 in an equivalent L M I form. Specifically, i f J(x)=J(x)T, n M(x) = MQ + YJxiMi>0 (A.1) ;=i K(x) = K(x)T and L(x) are matrices affine in x, and governed by the following pair of quadratic matrix inequalities: K(x)>0 J(x)-L(x)K(x)~1L(x)>0 (A.2) then, by Schur complements, (A.2) is equivalent to the L M I : J(x) L(x) L(x)T K{x) >0 (A3) For example, the well-known Riccati equation of the form ATP + PA + PBRlBTP+ Q<0 (A.4) with Q = QT and R-RT, and P = PT is the unknown variable matrix, can be expressed by 194 APPENDIX A LINEAR MATRIX INEQUALITIES the following L M I : ATP-PA-Q PB BTP R >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 T (A.6) AjP + PAi <0fo r i = l,...m find i f P exists for a given Ai e WXn. 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 ^ *' A (A.7) s.t. Il-E(x)>0 andF(jc)>0 where E(x) and F(x) are affine in 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 cTx x (A.8) 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 X ' A (A.9) s.t. AF(x)-E(x)>0, F(JC) >0 andG(x)>0 such that the maximum generalized eigenvalue of the pair of matrices E(x) and F(JC) is optimized. Here, E(x) = E(x)T, F(x) = F(x)T and G(jc)=G(jc)r are affine functions of JC. 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 \ )} ( A 1 Q ) s.t. F (x) > 0 and G(x)>0 Note that the constraints are convex and the objective function X (F(x),E(x)) 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 l o g d e t E f * ) - 1 s . t .E(x)>OandF(jc )>0 in which E(x) = E(x)T and F(x) = F(x)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, Model 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 mpQP 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 mpQP problem and building of the corresponding binary search tree are also discussed. B.l Preliminaries A s an integral part, mpQP depends on the concept of polyhedral sets (Ziegler, 1995). Some fundamental definitions and concepts of polyhedral sets are given here. Definit ion B . l : A polyhedron is a convex set Q cz Rn given as an intersection of a finite number of closed half-spaces Q = {x e Rn I Qx x < Qc}. Definit ion B.2: A polytope is a bounded polyhedron / ' c t " given as P = {xeRn\Pxx<Pc}. A polytope ^ c l " , P = {xeRn \Pxx <PC} is full dimensional i f Pxx < Pc for 3x e Rn. The same polytope P is normalized i f (Px)i =1 where (Px)i represents the /-th row of the matrix Px. Fundamentally, a polytope P can be described by its bounding vertices (vertex representation) as 197 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING P = \xz x = lLajvj>0^aj^>lLaj=l 7=1 7=1 ( B . l ) where v • is the j -th vertex of P, and nv is the total number of vertices of P. Definit ion B.3: If a linear inequality aTx<b holds for V x e P, it is said to be valid for the polyhedron P. A subset of a polyhedron is called a face of P if it is represented by J7' = Pf]{xeRn \ aT x — b}, for some valid inequality aT x < b. The faces of dimension 0, 1, n-2, and n — l are called vertices, edges, ridges, and facets, respectively. Definit ion B.4: The subspace aTx =b in M " is called a hyperplane. A hyperplane 7/ e R n is said to support a polyhedron P if one of the two closed half-space of 7/ contains P. B.2 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 in (4.17), the standard QP formulation to the M P C cost function is vH(xk,nk)=™nH [\xTkYrxk +\nTHjrnH +xTkFrnH] s.t. GrnH <Wr+Erxk where the IIH T T T Uk Uk+\ "' Uk+H-\ ~\T e RmH is the control input vector to be optimized based on the current state xk. The purpose of reformulating (B.2) into the equivalent mpQP 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*H as an explicit, continuous piecewise affine linear function of xk; i.e., TI*H = g(x) where g : A? — » R m / / within a polyhedral set (state-space) of i ' e E " . Specifically, the polyhedral set A? can be partitioned into i convex polyhedral regions Af{ such that g(x) = H'gx+k'g for V J C S ^ . Before proceeding further, define s = nH+rrlFjxk (B.3) to obtain the equivalent mpQP form of (B.2) as: 198 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING VH(xk,nk)=T s.t. Grs<Wr + Esxk (B.4) in which Es = Er +GrJ~rxFj . Theorem B . l (cf. Bemporad, et al, 2002): Assume Ys >-0. Consider a combination of active constraints GA , WrA and EA, and assume that the rows of GA are linearly independent. Let AfQ be a set of all vectors x, for which such a combination is active at the optimum. Then, s and the associated vector of nonnegative Lagrange multipliers X are uniquely defined afftne functions of x given as: s=Y^(G?)T(GX-l(GrA)TY(WrA+Esx) (B.5) X = - G X ' ( G f f (wrA+E,x) (B.6) over the critical region AfQ. 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 AfQ = {x e Af I R^x < qQ} can be obtained by substituting (B.5) 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 x0, there exists a unique and once continuously dijferentiable function of the s(x) X(x) j where s(x) is a unique isolated minimizer for (B.4), and = -Mo[N0 (B.l) 199 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING where M0 = Ys (Or)' • (Gr)l - \ { G r \ (Bsf ( ^ E S \ ) T ... ( \ ( E , ) J in which (Gr). denotes the i-th row of Gr, (Es). denotes the i-th row of Es, Vt =(Gr).s(x0)-(Wr ).-{Es)., (Wr). denotesthe i-throwofWr, and B s e R m H x n is a null matrix. Proof: see Fiacco (1976). The K K T pair of (B.7) is obtained as: s(x) X(x) = -MQ1N0[X-X0] + s(x0) X(x0) (B.8) Hence, the critical region Af0 = {xe Af I R0x < q0} is defined as the set of x where the solution to (B.8) remains optimal. Af0 is obtained by removing the redundant constraints from a set of inequalities AfR given by AfR=\x^Af GAs(x) < WrA + EAxk, XA (x) > o} (B.9) The set AfR itself is established by substituting s(x) into the inactive constraints ( A ) in (B.4) while maintaining the positivity of ^(x) corresponding to the active constraints ( A ) . Having defined AfQ, the remainder of the state-space Afrest =Af-AfQ can be partitioned by utilizing the following theorem. Theorem B.3 (cf. Bemporad, et al., 2002): Let AfeRn be a polyhedron, and AfQ a polyhedron subset of Af where AfQ 0 . Also let the polyhedral Af[ be represented as: Af^lxe Af Rix>qi RjX <q- for V / < i .>for i = l,...,dim(<7) (B.10) 200 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING A\m(q) and let Afrest — [J Af{. Then, the following conditions apply: (i) Afrest\] Af^= A?, and (ii) 1=1 A'or\A'i = 0 and Af^Af- = 0 forVj'-£ j; i.e., the partitions [Af0,A\,..., AfA{m(q)} form the entire polyhedron Af. Proof: see Bemporad, et al. (2002). • Note that each polyhedral region Af^ is basically bounded by / number of individual T T hyperplanes expressed in the linear equation representation rt x = qt where rx is the / -th row of Rj and ql is the /-th element of qj of (B.10). Neighboring and possibly non-neighboring regions may share the same hyperplanes. The optimal control law I7*H = g(x) corresponding to each partitioned region Afi can be directly determined from (B.3) and (B.8). The mpQP algorithm is then given as follows: 1. Obtain JC 0 by minimizing (B.4) with x as a free variable within a given space JC e Af. 2. Compute s(x0) and A(xQ) from the solution of (B.4) with JC = JC 0 . 3. Determine s(x) and A(x) from (B.8). 4. Define AfR according to (B.9). 5. Obtain AfQ by removing the redundant constraints from AfR. 6. Set Af-^Af^ and define the corresponding control input function g, (x). 7. Define the remaining unexplored region Afrest according to Theorem B.3 . 8. If Afrest ± 0 repeat 1-7 for the remaining unexplored space Afrest; else exit. 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 xk belongs (during real-time controller execution) is required. This is achieved through a binary search tree algorithm and is derived in 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 ( 2 0 0 3 ) . 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 nR number of partitioned regions \A?x,A?2,...,A?nR}e Af, having their corresponding control input functions gx{x), g2(x),..., gnR(x). 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 M P C strategies developed in this thesis rendering a unique control input function to be associated with each partitioned region. Let the nh unique hyperplanes that define the region partitioning be designated as hl:rjx = ql for l = \,...,nh. Define dl(x) = r^x-ql. Let the index representation J7~ of a polyhedral sub-space P(J7") of Af (containing and/or intersecting one or more partitioned regions) indicate a combination of hyperplanes with the sign of d((x). For example, Jf = J means a polyhedral sub-space is located at J 2 ( J C ) > 0 , d5(x)<0, and d6(x)<0. Let the set of polyhedral regions within P(fT) be indexed as the set 2'(Jr) = {i\Afjf)P(Ly~) is full dimensional}. The intended mechanism of the binary search tree for the M P C controller is to evaluate dl(x) = rjrx-qt 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 Af{. Figure B . l shows an illustrative example of an R 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 Nk 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 I2 ={4,5,6} S2={K) ^ ={4} ^ ={5,6} N o No •Zi={5} Z,={6} Jfc, = {hi,lh,h^ ^ ={1,2,3} ^6 = {1} ^6 A?7 T 7 = {2,3} ^7 = {fy A } N, 10 A 7, = {3} ^a Figure B . l : A n illustrative example of a partitioned polyhedron with its corresponding binary search tree. set Uex is used to maintain a list of indices of unexplored nodes. A n unexplored non-leaf node Nk w i l l contain (Tk,jTk) in which J~k is the signed index set of hyperplanes gathered while traversing the search tree from the root node to Nk and Ik = J T ( J ^ ) . It should be noted that T(J U hf) c ( 1 ( J ) n T(hj)). 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+) but i& I(J\}h^, then ^ is divided into two full-dimensional polyhedra by the hyperplane h{ ; i.e., i e T(^7") f l 2~(hf)r\ ZQiT). The same applies with hj. 203 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING The exact Tk can be determined by solving the two Linear Programming (LP) problems of ™n^. dt (x) and ^ dt (x) for each i e I(J) f| T(h^)C\ T(h~). B y examining the signs of the optimal values of these two L P problems, the side of each hyperplane ht a particular region Af{ 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) in 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 in 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 in an exponential manner with the dimension of the system, the horizon length, and the imposed constraints. These numbers can be easily in the order of 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 in 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) in which each cycle requires the optimization of the L P problems of ™^.d,(jc) and ™*^<i z(jt). In order to reduce the computational time as well as the tree depth and hence the total number of nodes for a particular M P C controller, a minimum number of remaining regions A/"MIN(TK) for defining a leaf node is preset (instead of branching the search tree until each leaf node corresponds to one region, as shown in 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/~MIN {TK) 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 a l l p a r t i t i o n e d r e g i o n s i n t o s t r u c t u r e d memory 2 C r e a t e f i l e s f o r temporary s torage o f index se t s Z(h*) a n d Z{hT) 3 f o r (each reg ion) { 4 f o r (each a s s o c i a t i n g hyperplane) { 5 S o r t , index and s t o r e a l l unique hyperp lanes 6 S k i p hyperp lanes t h a t d e f i n e the s t a t e - s p a c e b o r d e r s 7 } 8 } 9 f o r (each unique hyperplane) { 10 f o r (each reg ion) { 11 Compute the index se ts Z{h*) and Z(h[) by s o l v i n g and comparing 12 the s o l u t i o n s to d,(x) and mxf-„d,(x'\ 13 I n c l u d e d s p l i t r e g i o n s i n both index se t s 14 } 15 )' 16 f o r (each unique hyperplane) ( 17 f o r (each reg ion) { 18 A s s o c i a t e each unique hyperp lane wi th i t s d e f i n i n g r e g i o n s 19 } 20 } 21 I n i t i a l i z e the index set of the roo t node w i t h Z{ =( all regions ) 22 I n i t i a l i z e the set o f u n e x p l o r e d nodes as 1/ ={N{) 23 Set /jj =0 and the minimum AC^n(Zk) 24 w h i l e (Af(Z/a)>0) { 25 A r b i t r a r i l y s e l e c t and remove a node fifk from 1/ 26 Determine the set of hyperp lanes c o r r e s p o n d i n g t o the r e g i o n s i n Zk 27 Sor t the hyperp lanes to be c o n s i d e r e d i n a s c e n d i n g n u m e r i c a l o r d e r 28 f o r (each r e m a i n i n g hyperp lane to be c o n s i d e r ) { 29 F i n d the i n t e r s e c t i n g se t s of Z(Jk)[\Zi$) and Z(jrk)C\Z(h[) 30 Determine max (Af{Z{J-k)[]Z(rf)), / ( / ( / ^ n / f / f ) ) ) 31 } 32 S o r t the r e m a i n i n g hyperp lanes i n a s c e n d i n g o r d e r of 33 max (Af{Z(Jk) fl ZQi[)), JV(.Z(Jk) (~| Z(hf))) 34 Determine the hyperp lane c a n d i d a t e s hk ' s w i t h 35 min max <jV{Z(Jk)C\Z(hf)), Af(Z(Jk)T\Z(K[))) from the s o r t e d l i s t 36 f o r (each hyperp lane cand idate ) { 37 f o r (each r e g i o n i n the set Z(Jrk)r\Z~(hf)f)Z(h[)) i 38 F i n d the se ts Zk+= Z{Jk\Jhf) and zk = Z(Jk \JH[) by s o l v i n g and 39 comparing the s o l u t i o n s to a r>d 40 } 41 Rank the hyperp lane c a n d i d a t e s a c c o r d i n g to m a x (jV(Zk), Af (Zk)) 42 } 43 S e l e c t the noda l hyperp lane hk w i t h minmax (A/~(Zk), Af(Zk)) and a s s o c i a t e 4 4 i t w i t h the c u r r e n t node NK 45 C r e a t e 2 c h i l d nodes a n d NK and set the c u r r e n t node NK 4 6 as t h e i r p a r e n t 47 S t o r e the set of r e g i o n s Zk and z~ i n the r e s p e c t i v e c h i l d node 48 i f (yV(Zk+)>Afmia(Zk)) Add the c h i l d node A£ i n t o i/a 4 9 i f (Af{Zk)>Afmi„(Zk)) Add the c h i l d node N~ i n t o l/ex 50 } / / end of while 51 Save the b i n a r y s earch t r e e i n a p r e - s p e c i f i e d t e x t 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 in 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(Tk), respectively. The subsequent entries are the indices of the regions. Each hyperplane is stored in a line in the form rj qt J while each region is stored in the form \Rt qt] where the number after the text " : : R l : R q " indicates the number of rows of [R( q{]. The corresponding control input function is located after each region, in 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. @ / / C o n t r o l l e r parameters : H o r i z o n l e n g t h = 15 :Number o f s t a t e s = 4 :Number o f i n p u t s = 1 :Number o f nodes = 909 :Number o f hyperp lanes = 18896 :Number o f r e g i o n s = 6154 / / Nodes (Depth = 9) : : N 1 : 10440 2 3 6154 1 2 3 4 5 6 7 8 • • • 6150 6151 6152 6153 6154 ::N909: 0 0 0 75 4630 4832 5217 5218 • • • 6062 6063 6066 6067 6068 6077 / / Hyperp lanes : : H 1 : -0 .488419 -0.115701 -0.651252 0.569149 0.031239 ::H18896: -0.352372 -0.175715 0.700649 -0.595020 -0.058510 / / Regions ::R1:Rq24 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 -1.000000 0.000000 0.000000 1.000000 -0.136572 -0.024657 0.717317 -0.682785 0.065461 -0 .334505 0.020349 0.558848 -0.758538 0.055683 : : R 1 : H k -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 : : R 2 : R q l 3 ::R6154:Rq6 0.000000 0.000000 0.000000 -1.000000 1.000000 -0.276432 0.028682 0.582242 -0.764039 0.056276 0.296278 -0.028400 -0.566065 0.768753 -0.056192 ::R6154:Hk 0.000000 -0.000000 -0.000000 0.000000 -0.199999 -0 .00000 0.000000 0.000000 -0.000000 0.199999 206 APPENDIX B MULTI-PARAMETRIC QUADRATIC PROGRAMMING B.3.2 Computational Complexity The complexity of the binary search tree mainly depends on the number of states JC e M.", the number of inputs ueRm, the length of the prediction horizon H, and the number of 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 in the present thesis (see chapters 2 and 4). The minimum number of remaining regions in leaf nodes is set as A/min(2~k) = 100. Input and state constraints are of the forms - c , < ut < c2 and - c 3 < JC, < c 4 , respectively. The binary search trees building algorithm is coded in C/C++ programming language for optimal speed (approximately 30 times faster than the identical algorithm coded in Matlab®) and they are executed on a computer with a Pentium IV 2.2 G H z processor and 1 G B of memory. It can be observed that the number of regions and hyperplanes increase rapidly with the length of 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 mpQP 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-l- input system. Horizon No. of No. of No. of inputs No. of states Time taken length regions hyperplanes constrained constrained 13 1411 4052 1 0 9 mins. 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 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 in which one of them encloses the particular state vector JC . The target region is then determined by sequentially testing each of the remaining regions. Note that the binary search tree is read in advance during controller initialization. Table B.4: Pseudocode for traversing and sequential searching of the binary search tree during controller operation. 1 Read the c u r r e n t s t a t e x 2 I n i t i a l i z e the s t a r t i n g node to the roo t node pj 3 / / Traverse the binary search tree 4 w h i l e (N i s not a l e a f node) { 5 E v a l u a t e the d i s t a n c e dl(x)=r[x-q[ between the n o d a l h y p e r p l a n e and x 6 i f U,(x)>0) 7 Set Nk+] t o the c o r r e s p o n d i n g c h i l d node pj+ 8 e l s e 9 Set pfk+i t o the c o r r e s p o n d i n g c h i l d node N~ 10 } 11 / / Sequential search through the r e m a i n i n g regions 12 f o r (each r e m a i n i n g r e g i o n J\f{Tk) ) { 13 i f (RiX-q^O) i 14 E v a l u a t e d the o p t i m a l c o n t r o l i n p u t f u n c t i o n ]j* = g(x) = Higx+kig 15 break 16 1 17 } 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 Created | 2009-12-22 |
Date Issued | 2009-12-22 |
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 |
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 |
Degree |
Doctor of Philosophy - PhD |
Program |
Mechanical Engineering |
Affiliation |
Applied Science, Faculty of |
Degree Grantor | University of British Columbia |
Graduation Date | 2005-11 |
Campus |
UBCV |
Scholarly Level | Graduate |
URI | http://hdl.handle.net/2429/17124 |
Aggregated Source Repository | DSpace |
Download
- Media
- ubc_2005-105798.pdf [ 15.99MB ]
- 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 | 9 | 6 |
Russia | 5 | 0 |
France | 4 | 0 |
China | 4 | 22 |
Netherlands | 1 | 0 |
City | Views | Downloads |
---|---|---|
Unknown | 5 | 2 |
Penza | 4 | 0 |
Walnut | 2 | 0 |
Ashburn | 2 | 0 |
Irvine | 2 | 0 |
Chengdu | 2 | 0 |
San Francisco | 1 | 0 |
Mountain View | 1 | 2 |
Shanghai | 1 | 0 |
Guangzhou | 1 | 0 |
Washington | 1 | 0 |
Amsterdam | 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
Comment
Related Items
Admin Tools
To re-ingest this item use button below, on average re-ingesting will take 5 minutes per item.
ReingestTo clear this item from the cache, please use the button below;
Clear Item cache