ABSTRACT Title of dissertation: Access Scheduling and Controller Design in Networked Control Systems Lei Zhang, Doctor of Philosophy, 2005 Dissertation directed by: Assistant Professor Dimitrios Hristu-Varsakelis Department of Mechanical Engineering A Networked Control System (NCS) is a control system in which the sensors and actuators are connected to a feedback controller via a shared communication medium. In an NCS, the shared medium can only provide a limited number of simultaneous connections for the sensors and actuators to communicate with the controller. As a consequence, the design of an NCS involves not only the specifica- tion of a feedback controller but also that of a communication policy that schedules access to the shared communication medium. Up to now, this task has posed a sig- nificant challenge, due in large part to the modeling complexity of existing NCS ar- chitectures, under which the control and communication design problems are tightly intertwined. This thesis proposes an alternative NCS architecture, whereby the plant and controller choose to ?ignore? the actuators and sensors that are not actively com- municating. This new architecture leads to simpler NCS models in which the design of feedback controller and communication polices can be effectively decoupled. In that setting, we propose a set of medium access scheduling strategies and accom- panying controller design methods that address a broad range of stabilization, esti- mation, and optimization problems for a general class of NCSs. The performance of the proposed methods is illustrated through a set of simulations and hardware experiments. ACCESS SCHEDULING AND CONTROLLER DESIGN IN NETWORKED CONTROL SYSTEMS by Lei Zhang Dissertation submitted to the Faculty of the Graduate School of the University of Maryland, College Park in partial fulfillment of the requirements for the degree of Doctor of Philosophy 2005 Advisory Committee: Assistant Professor Dimitrios Hristu-Varsakelis, Chair/Advisor Professor William S. Levine, Dean?s Representative Professor Amr Baz Professor Balakumar Balachandran Associate Professor Jeffrey Herrmann c? Copyright by Lei Zhang 2005 To my mother, Shulan An, and my father, Chongxi Zhang. ii ACKNOWLEDGMENTS I would like to express my sincere appreciation to my advisor, Prof. Dimitrios Hristu-Varsakelis, who has guided me through my four-year Ph.D. research with his patience, vision, and wisdom. Dr. Hristu is never satisfied by mediocre research, he has always encouraged me to challenge myself with perfectionism and persistence. I thank him for helping me understand the essence of scientific research and find the real potential of myself. My thanks also go to my thesis committee members, Prof. William S. Levine, Prof. Balakumar Balachandran, Prof. Amr Baz, and Prof. Jeffrey Herrmann, for their invaluable advice on how to improve my thesis. I must acknowledge the help and support of the following professors, fellow students, and friends: ? Prof. P. S. Krishnaprasad, who taught me geometric control theory in his class ENEE769Q, and inspired many of my research ideas during the spring semester of 2003, while he was serving as my temporary advisor. ? Prof. Stuart. S. Antman, who led me into the magnificent palace of classical mechanics during his class AMSC698P in fall 2002. ? Mr. Cheng Shao who has been my labmate, roommate, and always a friend iii in need. ? My labmates, Mr. Kevin Roy Kefauver, Mr. Philip Yip, and Mr. Harry Kurnianto Himawan for their help and friendship. ? Cheng Shao, Gengsheng Lv, Guojing Tang, Peng Lin, Wei Xi, Fang Rong, Xue Mei, and Wenjing Weng, my eight closest friends in Maryland. I am glad to be part of this fantastic ?gang of nine?. My gratitude to my mother, Shulan An, my father, Chongxi Zhang, and my little sister, Xin Zhang, can not be expressed in words. Their love and support has always been the greatest source of comfort in the thirty year of my life. Last, but not the least, I want to thank my girlfriend, Sha Li, who has accom- panied me through this journey, helped me to have rediscovered myself, and given me the most wonderful time in my life. iv Contents 1 Introduction 1 1.1 Fundamental Issues in NCSs . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Scope and Contributions . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2 Networked Control Systems 10 2.1 A Brief History on NCSs . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1 Time Delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.2 Data Rate Constraints . . . . . . . . . . . . . . . . . . . . . . 16 2.2.3 Quantized Feedback . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.4 Data Packet Dropout . . . . . . . . . . . . . . . . . . . . . . . 19 2.2.5 Medium Access Constraints . . . . . . . . . . . . . . . . . . . 21 3 Medium Access Constraints in NCSs 29 3.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2 Communication Sequence . . . . . . . . . . . . . . . . . . . . . . . . 31 3.3 Effects of Medium Access Constraints . . . . . . . . . . . . . . . . . . 32 v 3.4 The Extended Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.4.1 Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.4.2 Switched System Expression . . . . . . . . . . . . . . . . . . . 35 3.5 A Discrete-time Formulation . . . . . . . . . . . . . . . . . . . . . . . 36 3.6 NCSs with Nonlinear Plants . . . . . . . . . . . . . . . . . . . . . . . 37 4 Static Medium Access Scheduling 39 4.1 Continuous-time Case . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.1.1 Communication Sequences that Preserve Controllability and Observability . . . . . . . . . . . . . . . . 42 4.1.2 Output Feedback Stabilization . . . . . . . . . . . . . . . . . . 46 4.1.3 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.2 Discrete-time Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.2.1 Communication Sequences that Preserve Reachability and Observability . . . . . . . . . . . . . . . . . 51 4.2.2 Choosing Communication Sequences . . . . . . . . . . . . . . 56 4.2.3 Output Feedback Stabilization . . . . . . . . . . . . . . . . . . 58 4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.3.1 Example 1: Continuous-time . . . . . . . . . . . . . . . . . . . 61 4.3.2 Example 2: Discrete-time . . . . . . . . . . . . . . . . . . . . 65 5 Dynamic Medium Access Scheduling 68 5.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 5.2 An Equivalent Switched System . . . . . . . . . . . . . . . . . . . . . 70 5.3 Stable Convex Combinations . . . . . . . . . . . . . . . . . . . . . . . 73 vi 5.4 Dynamic Medium Access Scheduling Policies . . . . . . . . . . . . . . 76 5.5 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6 LQG Control in NCSs 89 6.1 An Equivalent NCS Model . . . . . . . . . . . . . . . . . . . . . . . . 89 6.1.1 Effects of Medium Access Constraints . . . . . . . . . . . . . . 90 6.1.2 The Extended Plant . . . . . . . . . . . . . . . . . . . . . . . 92 6.2 LQG Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . 93 6.3 Communication Sequences that Preserve Stabilizability and Detectability . . . . . . . . . . . . . . . . . . . . . 95 6.3.1 Controllability and Reconstructibility . . . . . . . . . . . . . . 96 6.3.2 Stabilizability and Detectability . . . . . . . . . . . . . . . . . 99 6.4 The LQG Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.4.1 Kalman Filtering . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.4.2 LQ Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 6.4.3 Periodic Riccati Equations . . . . . . . . . . . . . . . . . . . . 104 6.4.4 Convergence of the LQG Controller . . . . . . . . . . . . . . . 106 6.4.5 Remark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.5 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7 NCS Experiments 112 7.1 Experiment Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.1.1 Hardware Configuration . . . . . . . . . . . . . . . . . . . . . 112 7.1.2 Software Configuration . . . . . . . . . . . . . . . . . . . . . . 114 vii 7.2 Experiment 1: Stabilization under Dynamic Medium Access Scheduling . . . . . . . . . . . . . . . . . . . . . . . . 116 7.2.1 Inverted Pendulum Model . . . . . . . . . . . . . . . . . . . . 118 7.2.2 NCS Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 7.2.3 Simulink Implementation . . . . . . . . . . . . . . . . . . . . . 125 7.2.4 Experiment Results . . . . . . . . . . . . . . . . . . . . . . . . 127 7.3 Experiment 2: LQG Control under Static Access Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 137 7.3.1 NCS Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 7.3.2 Simulink Implementation . . . . . . . . . . . . . . . . . . . . . 141 7.3.3 Experiment Results . . . . . . . . . . . . . . . . . . . . . . . . 143 8 Conclusions and Future Work 145 8.1 Opportunities of Future Work . . . . . . . . . . . . . . . . . . . . . . 147 A Calculating the Time-varying Feedback and Observer Gains 151 A.1 Solving for the Gramian Wa(t,t+T) . . . . . . . . . . . . . . . . . . 152 A.1.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 A.1.2 The Gramian ODEs . . . . . . . . . . . . . . . . . . . . . . . 154 A.2 Solving for the Gramian [e?ATTMa(t?T,t)e?AT] . . . . . . . . . . . 156 A.2.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 A.2.2 The Gramian ODEs . . . . . . . . . . . . . . . . . . . . . . . 157 B The Dynamics of a Rotary Inverted Pendulum 159 viii List of Tables 7.1 Parameters of the two pendulum rods. . . . . . . . . . . . . . . . . . 120 7.2 Electro-mechanical parameters of the servo motor the gear set, and the rotary arm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 7.3 Average medium access percentage of two pendulums under the WFD rule. The average shown are taken over time and over three runs of the experiments (5000 data points in each run). . . . . . . . . . . . . 128 7.4 Average dwell-times under the WFD rule and GD rule. The average shown are taken over time and over three runs of the experiments (5000 data points in each run). . . . . . . . . . . . . . . . . . . . . . 137 ix List of Figures 1.1 A control system with a point-to-point wiring configuration. . . . . . 2 1.2 A control system with a decentralized control configuration. . . . . . 3 1.3 A control system with a hierarchical control configuration. . . . . . . 4 1.4 A control system with an NCS configuration: sensors and actuators are connected to the controller via a shared communication medium. 4 2.1 Controller Area Networks (CAN) in automobiles. . . . . . . . . . . . 12 2.2 Generic configuration of an NCS: sensors and actuators of an MIMO plant are connected to a centralized feedback controller via a shared communication medium. . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3 A control system with time delays in its feedback loop. . . . . . . . . 14 2.4 An NCS having data-rate constraints in the communication medium. 17 2.5 An MIMO plant with medium access constraints existing only on the output side. A ZOH is used at the receiving end of the communication medium. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.6 A ?block-diagonal? NCS: a collection of uncoupled continuous linear systems share a communication medium to close their feedback loops. 24 3.1 An NCS having m actuators and p sensors, with medium access con- straints existing on both sensor and actuator sides. . . . . . . . . . . 30 3.2 The extended plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 x 4.1 Output feedback stabilization of an NCS: The controller consists of an observer followed by a time-varying feedback gain K(t). . . . . . . 46 4.2 Output feedback stabilization of an NCS: The controller consists of a discrete-time observer and a time-varying feedback gain K(k). . . . 59 4.3 Simulation results: Stabilization of an NCS using an observer-based continuous-time controller. The plant was an LTI system with two inputs and two outputs. The communication medium provided one input channel and one output channel. The communication sequence ?(t) assigned 30% of the input channel access time to u1 and 70% to u2; while the communication sequence ?(t) assigned 70% of the output channel access time to y1 and 30% to y2. . . . . . . . . . . . . 63 4.4 Simulation results: Stabilization of the same NCS under the same communication sequences and controller as in Fig. 4.3, while a white noise of 0.01W as well as a 0.02s fixed transmission delay was added at each input and output of the plant. . . . . . . . . . . . . . . . . . 64 4.5 Simulation results: Stabilization of an NCS using an observer-based discrete-time controller. The plant was a discrete-time LTI system with two inputs and two outputs. The communication medium pro- vided one input channel and one output channel. . . . . . . . . . . . 67 5.1 An NCS in which the plant?s state information is available, and the controller is constant feedback. . . . . . . . . . . . . . . . . . . . . . . 69 5.2 Simulation results: Stabilization of an NCS using the FD rule. The plant was an LTI system with 2 inputs and 4 outputs. The commu- nication medium provided one input channel and one output channel. 84 5.3 Simulation results: Stabilization of an NCS using the GD rule (?0 = 0.1, ?? = 1). The plant was an LTI system with 2 inputs and 4 outputs. The communication medium provided one input channel and one output channel. . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.4 Simulation results: Stabilization of an NCS using the WFD rule. The plant was an LTI system with 2 inputs and 4 outputs. The communication medium provided one input channel and one output channel. The input u1 was given higher access priority. . . . . . . . . 87 xi 5.5 Simulation results: Stabilization of an NCS using the WFD rule. The plant was an LTI system with two inputs and two outputs. The communication medium provided one input channel and one output channel. The input u2 was given higher access priority. . . . . . . . . 88 6.1 The extended plant under the new NCS formulation. . . . . . . . . . 92 6.2 An NCS stabilized by the LQG controller. . . . . . . . . . . . . . . . 101 6.3 Evolution of tr(P(k)) and tr(K(k)). The P(k) satisfy the Riccati equation (6.17), while K(k) satisfy the backwards Riccati equation (6.21). Both P(k) and K(k) converge to SPPS solutions. . . . . . . . 110 6.4 Simulation Results: Stabilization of an NCS under the LQG con- troller. The plant was a stochastic LTI system with 2 inputs and 2 outputs. The communication medium provided 1 input channel and 1 output channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.1 Hardware configuration of the NCS experiment platform. . . . . . . . 113 7.2 Flow of data and controls in RTLinux [1]. . . . . . . . . . . . . . . . 115 7.3 The SimuLinux-RT real-time control system prototyping environment [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.4 Experiment 1: Stabilizing two rotary inverted pendulums at their unstable equilibria. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 7.5 Configuration of a rotary inverted pendulum: a pendulum rod con- nects with a rotary arm via a hinge, and the rotary arm is driven by a servo motor. Two encoders output the angles of the rotary arm and the pendulum rod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 7.6 NCS configuration of Experiment 1: the plant consisted of two un- coupled rotary inverted pendulums. The two inverted pendulums communicated with a remote controller via a shared RS232 medium. 119 7.7 A simplified model of rotary inverted pendulum. . . . . . . . . . . . . 120 7.8 Simulink implementation of Experiment 1. . . . . . . . . . . . . . . . 125 7.9 The WFD rule switching logic. . . . . . . . . . . . . . . . . . . . . . . 126 xii 7.10 The GD rule switching logic. . . . . . . . . . . . . . . . . . . . . . . . 127 7.11 Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.1, w2 = 0.9. . . . . . . . . . . 129 7.12 Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.1, w2 = 0.9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.13 Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.5, w2 = 0.5. . . . . . . . . . . 131 7.14 Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.5, w2 = 0.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 7.15 Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.9, w2 = 0.1. . . . . . . . . . . 133 7.16 Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.9, w2 = 0.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.17 Experiment data: Evolution of the states under the GD rule with ?0 = 0.05. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.18 Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the GD rule with ?0 = 0.05. . . . . . . . . . . . . . . . . . 136 7.19 NCS configuration of Experiment 2: the plant is a simulated LTI system with 4 inputs and 4 outputs; the plant communicates with an LQG controller via the shared RS232 communication channel. A global clock is used to synchronize the dynamics of the plant and the controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 7.20 Simulink implementation of Experiment 2. . . . . . . . . . . . . . . . 142 7.21 Experiment data: Stabilization of an NCS using LQG controller. The plant was an LTI system with 2 inputs and 2 outputs. The commu- nication medium provided 1 input channel and 1 output channel. . . 144 xiii Chapter 1 Introduction In the last two decades, advances in communication, control, and computation tech- nologies have fueled the rise of a modern control system architecture in which sensors and actuators exchange information with a feedback controller through a shared communication medium. Control systems having this configuration have been termed Networked Control Systems (NCSs). Compared to conventional sys- tem architectures, the advantages of NCSs include reduced system wiring, ease of diagnosis and maintenance, low cost, and increased system flexibility. NCSs are rapidly becoming ubiquitous, and have made inroads in a broad range of applications. Most modern aircrafts are now built with the ?fly-by-wire? [3] tech- nology, which relies on a databus (e.g., MIL-STD-1553 and ARINC-629) to connect various sensors, actuators, and controllers within an airplane. The Controller Area Networks (CAN) are widely used to close a series of important feedback loops in the control systems of modern automobiles. NCSs can also be found in modern factories, where Fieldbuses [4] play an important role to connect physically sep- arated devices in machinery and instruments; in modern office buildings, where special-purpose networks are used to control and monitor various security and en- 1 vironmental functions. More recently, NCSs have become the enabling architecture for many emerging applications which require coordination of significant numbers of spatially distributed sensors and actuators. These include tele-surgery, satellite ar- rays, sensor networks [5], swarms of unmanned aerial and underwater vehicles [6] [7], arrays of micro-valves [8], optical switches [9], RF switches [10], and MEMS-based spatial light modulators [11], to name only a few. The rise of NCSs stems in part from necessity. Traditionally, control systems have been implemented using point-to-point wiring, i.e., each sensor and actuator is connected to a centralized controller (often a micro-processor) via a designated wire (Fig.1.1). This configuration ensures real-time communication between components of a control system. However, as the complexity and scale of a control system increase, point-to-point wiring becomes cumbersome or impractical: the increased wiring burden brings problems involving weight, cost, maintenance, and reliability. At the same time, the microprocessor in which the controller is implemented provides a limited number of input/output (I/O) ports and limited computing capability, so that point-to-point wiring becomes impossible when the number of sensors and actuators is greater than the number of I/O ports or when the computation load needed exceeds the capability of the processor. ....Actuator Actuator Sensor Actuator Actuator Sensor SensorSensor Actuator Sensor Actuator Sensor Plant Controller .... .... .... Figure 1.1: A control system with a point-to-point wiring configuration. 2 An alternative to point-to-point wiring is to introduce additional controllers and allow decisions to be made ?locally?. This idea gave rise to the ?decentralized? (Fig. 1.2) and the ?hierarchical?(Fig. 1.3) control system configurations. Decentral- ized control is well-suited in applications where the plant consists of multiple sub- systems which have little or no coupling with each other. In the cases where control decisions must be made by considering information that is not locally available, one can add controllers to the decentralized configuration, resulting in a hierarchical structure where proper actuation of the plant relies on the intelligence of both local and high-level decision makers. Both the decentralized and hierarchical configura- tions require a certain degree of ?decoupling? in the dynamics of the plant, so that some decisions can in fact be made locally. This is often not the case in modern com- plex systems. Moreover, the introduction of decentralized or hierarchical controllers increases the costs of such systems and creates other design difficulties. Controller Actuator Sensor ActuatorActuator Sensor Sensor Actuator Actuator Sensor Sensor Actuator Sensor Plant .... .... .... .... Controller Controller Controller Figure 1.2: A control system with a decentralized control configuration. The introduction of NCSs (Fig. 1.4) in the 1970s provided a neat solution to the problems highlighted above. In an NCS, the controller is connected to a communi- cation medium that provides access to all the sensors and actuators; the medium is shared by all its users, so that only a limited number of connections can be sup- ported simultaneously. The NCS configuration has proved remarkably flexible, en- abling many novel features in feedback control systems. For example, using wireless 3 Controller Actuator Sensor Actuator Sensor Sensor Actuator Sensor Actuator Sensor Actuator Actuator Sensor Plant .... .... .... .... Controller Controller Controller Controller Controller Controller Figure 1.3: A control system with a hierarchical control configuration. communication, sensors and actuators in an NCS can easily change their locations to form different ad hoc groups that are customized for different tasks. Controller Actuator Actuator Sensor Sensor Actuator Actuator Sensor SensorSensor Actuator Sensor Actuator.... .... Plant Shared Communication Medium Figure 1.4: A control system with an NCS configuration: sensors and actuators are connected to the controller via a shared communication medium. 1.1 Fundamental Issues in NCSs Despite its flexibility and effectiveness, the NCS architecture also introduces new problems which have until recently been beyond the scope of traditional control 4 systems theory. Classical systems theory was developed based largely on the as- sumptions of real-time, unlimited exchanges of data between sensors, actuators, and the feedback controller. However, in an NCS, data exchanges are always subject to various communication constraints. These include [12]: ? Communication delays that arise in the data exchanges between components (e.g., from a controller to an actuator). Depending on the protocol that is used in the communication medium, these delays can be constant, time varying, or randomly distributed. ? Bandwidth limitations that depend on the communication protocol used, the network equipment, andthephysical properties ofthecommunication medium. ? The possibility of data packet loss. Data packet loss can be caused by hardware failure or by the communication protocol (TCP/IP is an well-known example). ? The maximum number of simultaneous medium access channels allowed by the medium. This number could be much smaller than the number of sensors and actuators in the system. This medium access constraint will be the focus of this thesis. These constraints all present potential problems whose effects on closed-loop per- formance and controller design must be understood and dealt with. In Chapter 2, we will give a detailed review of recent theoretical advances in the analysis and de- sign of NCS under the above listed constraints. Furthermore, we remark that, aside from communication medium related constraints, similar limitations on information exchanges within a control system may also arise because of the limited computing capability of the controller or the performance of the sensors and actuators. Thus, the fundamental issues addressed in the study of NCSs in fact concern Feedback 5 Control using Limited Information. This is a relatively new aspect of systems the- ory, which had received little attention before NCSs became a prominent topic of research. In today?s information-centric world, the efforts made in studying the in- terplays between communication and control are likely to continue to contribute in a broad range of problems involving technological, scientific, and social-economical systems. 1.2 Scope and Contributions The aim of this thesis is to explore the design of NCS control and communication policies under the presence of medium access constraints. Specifically, we study NCSs in which the communication medium can only provide a limited number of simultaneous medium access channels. As a consequence, at any one time, only a limited number of actuators and sensors are able to access the communication medium to exchange information with the controller, while others must wait. We address the following basic problems: 1. Schedule the access to a shared communication medium among multiple sensor and actuators. 2. Design feedback controllers that achieve various control objectives (e.g., stabi- lization, estimation) with limited access to the system?s sensors and actuators. In previously proposed NCS architectures, the interaction between control and communication gave rise to models whose complexity made it difficult to design controllers and communication policies. Existing methods only address the design of a controller for a fixed communication sequence or the selection of a stabilizing 6 medium access policy given a controller that was designed in advance without con- sidering communication constraints. The co-design of the controller and the medium access scheduling strategy remains an open problem. Moreover, most previous re- sults only address simple NCS configurations where the plant is block-diagonal [13] or the access constraints only exist on the output side of the plant [14, 15]. This thesis will show that the difficulties encountered in previous works were partly due to the use of a zero order hold (ZOH) at the ?receiving end? of a com- munication medium (i.e., at the plant?s and controller?s input stages). The use of ZOH elements greatly increases the complexity of the closed-loop NCS because it introduces time-varying delays and leads to closed-loop dynamics in which commu- nication and control are tightly coupled (see, for example, the ?extensive form? in [14]). The main contribution of this thesis is to propose an alternative NCS architec- ture, whereby the plant and controller forgo the use of a ZOH and instead choose to ?ignore? (in a manner to be made precise) the actuators and sensors that are not actively communicating. We will show that the new architecture leads to simpler NCS models and elucidates the interaction between medium access scheduling and the dynamics of the underlying plant and controller. Moreover, the new architecture allows one to concurrently design the access scheduling strategy and the feedback controller, and can be used to analyze and design for a more general class of NCSs in which the plant has fully coupled dynamics, and medium access constraints ex- ist in both the input and output stages of the plant. For this new configuration, we will present a set of medium access scheduling policies and accompanying con- troller design methods that address the fundamentals of stabilization, estimation, and optimization in NCSs. 7 1.3 Thesis Outline Chapter 2: We give a brief history of NCSs, and present a detailed literature review of the state of the art in the design and analysis of NCSs under various communication constraints. Chapter 3: We introduce a new NCS protocol, in which the plant and controller forgo the use of ZOHs, and instead choose to ?ignore? the actuators and sensors that are not actively communicating. A pair of ?communication sequences? are used to describe the instantaneous medium access status of the sensors and actuators. We show that, under the new protocol, the effect of medium access constraints can be modeled by cascading the underlying plant with a pair of ?communication sequence matrices?. Chapter 4: We study the stabilization of NCSs under periodic medium ac- cess scheduling. We show that, for continuous-time systems, the controllability and observability of a linear plant can be preserved as long as the communication se- quences grant each input and output a finite interval of medium access during every period; in the discrete-time case, one can always find (via a simple algorithm) peri- odic communication sequences that preserve the reachability and observability of a reversible linear plant. Using these effective communication sequences, an NCS can be exponentially stabilized by an observer-based controller. Chapter 5: We study the stabilization of NCSs under dynamic medium access scheduling strategies. In this case, the communication sequences are determined on- line, based on instantaneous state information of the plant. We present an algorithm that provides a straightforward method for simultaneously determining stabilizing gains and the scheduling policy. We introduce several feedback-based scheduling policies that quadratically stabilize an NCS while achieving various objectives re- 8 lated to the system?s rate of convergence, the priorities of different sensors and actuators, and the avoidance of chattering. Chapter 6: We discuss Kalman filtering and LQ optimal control of a discrete- time NCS under periodic medium access scheduling. We show that these problems can be formulated as a standard LQG problem for an equivalent periodic system. Moreover, there always exist periodic communication sequences that preserve the detectability and stabilizability of the NCS, and thus make it possible to guarantee the existence of a stabilizing LQG controller. Chapter 7: We describe two NCS experiments which were designed to illustrate the design techniques introduced in Chapter 5 and Chapter 6. The communication medium we chose in these experiments was a RS232 serial channel. The medium access scheduling strategies and the accompanying feedback controllers in the exper- iments were designed within the SimuLinux-RT environment and were implemented in the real-time operating system RT-Linux. Chapter 8: We summarize the contributions of the thesis and discuss the pos- sibilities of future research. 9 Chapter 2 Networked Control Systems In this chapter, we first give a brief history of the use of communication networks as part of a control system. We then continue with a literature review of recent theoretical developments concerning the analysis and design of NCSs. 2.1 A Brief History on NCSs The beginnings of NCSs can be traced at least as far back as the 1970s, when the nuclear science community developed a parallel bus protocol called CAMAC [16]. CAMAC allowed a wide range of modular instruments to be interfaced to a stan- dardized backplane called a DATAWAY. All modules could then be controlled by a centralized controller by interfacing the DATAWAY to a computer. In 1973, another bus protocol MIL-STD-1553 was released to meet the needs of aviation electronics (referred to as avionics) applications. MIL-STD-1553 used ?Time Division Multi- plexing (TDM)? to allow data transfers between multiple avionics units over a single communication medium. Using MIL-STD-1553, navigation, weapon control, flight control, and various other avionics subsystems in an airplane were able to share 10 their information without increasing the complexity of wiring. MIL-STD-1553 was used in the U.S. Air Force?s F-16 and the Army?s attack helicopter AH-64A Apache [17]. By the 1980s, engineers had realized that in the light of numerous new func- tionalities added to a control system by the use of shared networks, the reduction or elimination of wiring harnesses was just a convenient by-product. Since then, a number of successful industrial control network protocols have been developed and widely implemented in different industries. The Controller Area Network (CAN) [18] was first developed by Robert Bosch GmbH, Germany in 1986 to connect ECUs (electronic control units) in automobiles. The use of CAN networks in an automobile enabled information exchange between power train and body subsystems such as en- gine, transmission, brake, air-conditioning and lighting (Fig. 2.1). The earliest CAN was based on a non-destructive arbitration mechanism, referred to as CSMA/CR (Carrier Sense, Multiple Access, with Collision Resolution), which would grant bus access to the message with highest priority without delay; there was no central bus master. Today?s CAN can be implemented in topologies which are far more complex than a single data bus. The latest version of CAN (Ver 2.0) uses a multi-master bus configuration, and runs at a baud-rate of up to 1Mbit/s. The first CAN chip was fabricated in 1987 by Intel, and more than 100 million CAN devices were sold in the year 2000. Today, almost every new passenger car manufactured in Europe is equipped with at least one CAN network. CAN is now an international standard (ISO11898), its application is growing from vehicles to factory automation, building automation, and beyond. New generations in the CAN family include DeviceNet and CANopen. Another family of industrial control network is Fieldbus. Fieldbus is a digital, bi-directional, multidrop, serial communication network used to connect isolated 11 Transmission Control Cruise Control Brake Lock Anti? Active Control Suspension Control Climate HVAC Power Window Power Door Lock Dash Board Body BusBusDrive Train Seat Power Control Lighting Control Engine Figure 2.1: Controller Area Networks (CAN) in automobiles. field devices, such as controllers, transducers, actuators and sensors in a machine or instrument. Fieldbuses were first installed in early 1970s; by late 1980s, the most popular field buses in Europe were French FIP (Factory Instrumentation Protocol) and German ProfiBus (Process Field Bus). ProfiBus, for example, is a token-passing network, it allows transfer speed of up to 500Kbit/s and the maximum length of the bus is 1200m [4]. In 1995, after a long wait for the European Fieldbus protocols to be standardized, the American companies decided to define their own field-bus, named the Foundation Fieldbus (FF), which was optimized for the process control industry. In 2000, a comprehensive standard, IEC61158, was finally released to accommodate all field bus systems. Newer members in the Fieldbus family include ControlNet, WorldFIP, P-Net, InterBus, and the family is still growing. Building automation is also an important application area of control networks and has given rise to communication protocols tailored to buildings and large struc- tures. Released in 1995, BACnet (ANSI/ASHRAE135-1995) is ?a data communi- cation protocol for Building Automation and Control Networks. It was designed to control and monitor various equipments such as air-conditioning, lighting, alarm- ing, and elevators in a modern office building. Being a new generation of control network, BACnet is object-oriented. It also provides 35 BACnet services which are standard messages that can be sent across a computer network for monitoring and 12 control of standard objects which specify the functionality of the various hardware connected to the network. A BACnet can be implemented on common local area networks (LAN) such as Ethernet, ARCNET and LonTalk [19] and hence can have rather complex topologies. As a result of the accelerating technological convergence of communications, control, and computing, more recently, standard communication network protocols such as daisy-chained RS232 [20], Ethernet [21], and IEEE802.11 wireless Ethernet [22] are also making their way into the area of control systems. See [22] for a detailed comparison of these network protocols from an NCS perspective and see [21] for performance evaluations of these protocols. 2.2 Literature Review Shared Communication Medium sensor 2 sensor 1 ... sensor p actuator 1 actuator 2 ... Plant actuator m Controller Figure 2.2: Generic configuration of an NCS: sensors and actuators of an MIMO plant are connected to a centralized feedback controller via a shared communication medium. The generic configuration of an NCS is illustrated in Fig. 2.2. As mentioned in Chapter 1, data exchanges between sensors, actuators, and the feedback controller of an NCS are always subject to various constraints that are imposed by the com- 13 munication medium. These constraints often manifest themselves in the forms of: i) time delays, ii) data-rate limit, iii) data-packet dropout, and iv) medium access constraints. The field of NCSs began to draw the attention of academic researchers in the 1990s. Since then, a considerable volume of theoretical tools and results have been produced. In this section, we give a literature review of some of the works most relevant to this thesis. For organizational convenience, these works have been categorized according to the communication constraints they address. 2.2.1 Time Delays An obvious constraint likely to be imposed by the presence of a communication medium is the time delay that occurs between the transmission and reception of a data packet over that medium. Important components that contribute to the time delays in an NCS include preprocessing time, waiting time, transmission time, post- processing time, and et. al. [23]. The effects of all these delay components can be typically captured by the sensor-to-controller delay ?sc and the controller-to-actuator delay ?ca (Fig. 2.3). CommuncationMediumCommuncation Medium Plant sensoractuator Controller ? sc?ca Figure 2.3: A control system with time delays in its feedback loop. In state-space models, time delays in the feedback loop of a control system can be effectively captured by introducing additional states to keep track of the delayed information. This technique is often termed ?state augmentation?(also known as 14 ?state lifting? or ?state extensification?). For example, it is shown [24] that , for a sampled-data control systems with constant feedback and a sample period h, a constant delay ? of (r?1)h < ? < rh (where r ? N) will increase the system order by a factor of r. For scalar linear systems, the relationship between the sampling period and allowable time delay can be illustrated by a stability region plot [25], which can be obtained via analytical or numerical methods. Bounded time-varying delays in a control system?s feedback loop can also be modeled byproper state augmentationto include theplant?s state andallthe delayed control information; the details of this technique is illustrated in [25] and [26]. Also using the augmented state model, some stability and performance analysis tools are given in [27] for MIMO systems having multiple time delays in different feedback loops. In [28], an LQR optimal control problem is formulated and studied based on the same model. A particularly thorough investigation of NCSs with random time delays can be found in [4], where two classes of random delays are identified: independently random delay and Markovian delay. For both cases, it is assumed that a time-stamp is used to mark all transfered data with the time when they were generated, so that the delay is always known to the controller. If the delays are independently random, it is shown that the stability of the closed loop system under linear controller can be checked with a criterion based on Kronecker product; if the random delays are Markovian, then the state of the NCS can be modeled as a Markov chain and the stability of the closed loop system can be checked with a similar criterion. Also in [4], LQG optimal controllers are developed for systems having independently random or Markovian delays, respectively. It is shown that, for both cases, the LQG optimal controller is the combination of an optimal state feedback gain and a Kalman filter, i.e., the separation principle applies. 15 It is possible to compensate known time delays in the feedback loop: if the delays ?sc and ?ca are always known to the controller, the controller can propagate its estimations of the plant?s states (based on a good model of the plant?s dynamics) to the time when the control signals arrive at the actuators. The control signals can then be calculated based on the adjusted state estimation. An example of such a delay compensator is given in [25] for NCSs having fixed transmission delays. Important results on time delays in dynamic systems are recently collected in [29], another good survey on this topic can be found in [30]. 2.2.2 Data Rate Constraints Communication constraints also manifest themselves in the form of data rate limits on the communication medium. The effects of data rate limits on networked control systems have typically been studied from information theoretic perspectives, and the communication medium is often modeled as a coded channel with a bandwidth limit. The work in [31] investigates state estimation in NCSs where the observations are transmitted to an estimator with a finite data rate. The authors introduce a recur- sive coder-estimator scheme, in which the coding decision can be dependent on the whole past history of the observation process, and the estimator can be dependent on the whole sequence of past codewords. Necessary and sufficient conditions are es- tablished for the existence of stable and asymptotically convergent coder-estimator schemes. Under the coder-estimator framework, feedback stabilization under data rate constraint is investigated in [32], where the NCS configuration studied is illus- trated Fig. 2.4. It is shown that, if the plant is a continuous-time LTI system, then memoryless coding and control suffice to ensure the containability of the system, 16 meaning that given small enough initial conditions, the trajectory of the system will lie in an n-dimensional sphere of an arbitrary size. Communication medium with data?rate limit actuator Plant sensor Control codeword decoder Quantizer/ Encoder Controller Codeword?based Figure 2.4: An NCS having data-rate constraints in the communication medium. The work in [33] investigates the stabilizability of infinite-dimensional linear discrete-time plant when the controller receives observation data at a known rate. It is shown that, under a finite horizon cost equal to the m-th output moment, the problem reduces to quantizing the initial output. As the horizon approaches infinity, asymptotic quantization theory can be applied to directly obtain the limiting coding and control scheme. Necessary and sufficient conditions can then be derived for the system to be asymptotically stabilizable in the m-th moment at a given data rate. Under some restrictions on the initial condition distribution, a coding-estimation scheme is presented in [34]; this scheme works for finite dimensional, time-varying nonlinear system that satisfy a Lipschitz-type condition. In [35], a sequential rate distortion function is used to study the achievable per- formance of a discrete-time LQG system having a noisy observation channel with limited bandwidth. By assuming equimemory on the encoder and decoder, it is shown that the separation principle holds (i.e., the encoder-estimator and the con- troller can be designed independently) and the optimal control law can be obtained 17 by solving the Riccati equation for a deterministic counterpart of the original prob- lem. Based on this frame work, one can obtain the minimum data rate that ensures the stability of the closed-loop system. 2.2.3 Quantized Feedback An analog signal must be quantized before being transmitted via a digital commu- nication medium. A quantizer acts as a functional that maps a real-valued function into a piecewise constant function taking on a finite set of values [36]. Effective quantization of sensor and actuator signals can help reduce the sizes of data packets and thus reduce the data-rate in the communication medium. A recursive quantized feedback stabilization policy is presented in [36], in which the sensitivity of a quantizer increases as the system state approaches to zero. It is shown that if a linear system can be stabilized by linear time-invariant feedback, then it can be stabilized by quantized feedback with the presented policy. It is also shown that choices of sampling period are decoupled from the issues regarding the implementation of the quantized feedback control policy. This idea is independently explored in [37]. In [38], it is shown that the coarsest quantizer that quadratically stabilize a SISO discrete-time linear time-invariant system is a logarithmic quantizer, which can be computed by solving an expensive control LQR problem. Moreover, a closed form expression of the smallest logarithmic base can be derived exclusively in terms of unstable eigenvalues of the system. The minimum densities for both sampling and quantization that ensures stability were also discussed. The work in [16] analyzes the effects of a general class of quantizers in the sampled-data system setting, where a weaker notion of stability (similar to ?con- 18 tainability?) of the system is studied. The authors present analytical methods for designing an effective quantizer, a sampled data controller, and to find the bound on the sampling period that guarantee quadratic stability (the weaker notion) of the closed-loop control system at a given decay rate. Related work can also be found in [39], where the worst-case analysis and design of sampled-data control systems was investigated. The problem of jointly optimization of quantization, estimation and control is studied in [40], where the plant to be controlled is modeled as a Hidden Markov chain. Dynamic programming method is used to find the optimal quantization and control scheme that minimize a cost function related to the estimation error, running cost, the communication cost, and delay. The work in [41] shows that, for the scalar case, binary control (a quantization with only two admissible control values) is the most robust control strategy under a time-varying data-rate constraint and asynchronism of sampling and control actu- ation. A control synthesis approach based on binary control is also explored. This approach uses a side channel (whose bandwidth can be arbitrarily low) to adjust the magnitude of the binary control. 2.2.4 Data Packet Dropout In real-world NCSs, data packets transmission between the plant and controller may be ?dropped out? due to network congestion, unreliable hardware, or because of the transmission protocol used (the transmission control protocol (TCP) and the user datagram protocol (UDP) are two well-known examples). Also, sometimes it is desirable to drop ?old? data-packets that fail to arrive in time and use newly- generated data instead. 19 In [25], it is shown that an NCS with data packet dropout can be modeled as an asynchronous dynamical system (ADS) with rate constraints on events [42]. Using that model, one can calculate the minimum transmission rate that guarantees the stability of an NCS whose closed-loop dynamics are stable without the presence of packet dropout. Another possibility for addressing dropped data packets is to model the arrival of data as a random process. For example, the work in [43] studies state estimation of SISO NCSs, in which scalar observations arrive according to a Poisson process; the work in [44] presents a Kalman Filter scheme for MIMO systems in which the arrival of output information (all outputs as a packets) is modeled as a Bernoulli process. These works are generalized in [45] where outputs are divided into two parts each of which can be received or lost by the Kalman Filter independently. In the case when packet dropout also exists in the data transmission from the controller to the actuators, the design of estimator and controller depends strongly on whether the communication protocol includes ?acknowledgment? (ACK) packets that allow the controller to know whether the data was received by the actuator or not. It can be shown that [46], if all successful data transmission is acknowledged, the controller and the estimation can be designed separately, i.e., the separation principle holds. In this case, if the data arrival from the controller to the plant and from the plant to the controller are modeled as i.i.d. Bernoulli, then the relationship between the maximum data packet dropout rate and the stability of a linear NCS under a LQR controller can be related by a condition provided in [46]. The problem of LQG optimal control with a similar NCS setup is discussed in [47]. 20 2.2.5 Medium Access Constraints One of the fundamental communication constraints in a communication network- and indeed the one this thesis focuses on - is that of medium access. It comes about because a communication medium can only provide limited number of simultaneous medium access channels for its users. As a consequence, in an NCS, only limited number of sensors and actuators are allowed to communicate with the controller at any one time. In modern communication networks, medium access constraints are often re- solved via various Medium Access Control (MAC) protocols which define the access scheduling and collision arbitration policies in the network. MAC protocols can be roughly divided into two categories, namely sequential MAC protocols and random MAC protocols. Under sequential MAC protocols, each user of the network accesses the shared medium according to a pre-configured sequence. Under random MAC protocols, every user attempts to access the media whenever it has a packet to trans- mit; if there are other users wanting to access the medium at the same moment, an arbitration policy is used to resolve the packet collision. The advantages ofsequential MAC protocolsarelow latency, bounded time delay, and guaranteed data rate. They are well-suited for those applications where every user in the network has a fixed bit-rate and small data packets. Examples of sequen- tial MAC protocols includes polling, token passing (used in ProfiBus), TDMA(Time Division Multiplexing Access, used in T1 telephone systems and GSM cellular phone systems). On the other hand, random MAC protocols allow real-time medium ac- cess arbitrations based on the priority (importance) of the data packages. These protocols suit well in the applications where users in a network have burst trans- mission and relatively large data packet. The first random MAC protocol, ALOHA, 21 was developed by the University of Hawaii for wireless communication. Successors to the ALOHA protocol are many variations of the Carrier Sense Multiple Access (CSMA) protocol. For example, Carrier Sense Multiple Access/Collision Detec- tion (CSMA/CD) is used in Ethernet and Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) is used in IEEE802.11 Wireless LAN. NCSs with medium access constraints Due to access constraints in the communication medium, the design of an NCS in- volves not only a feedback controller but also a medium access scheduling strategy, which defines the to the MAC protocol implemented in the underlying communica- tion medium. Another related problem is to determine what information the plant or controller should assume when an actuator or sensor losses access to the commu- nication medium. Most previous works (detailed in the next paragraphs) assume that there is a zero order hold (ZOH) implemented at the ?receiving end? of the communication medium (i.e., at the plant?s and controller?s input stages), if a sensor or actuator fails to access the medium, the most recently updated values stored in the ZOH will be used by the plant or the controller. In this thesis, we will intro- duce an alternative way of handling medium access disruptions so that if a senor or actuator is not actively accessing the communication medium, their input to the controller or plant will be ignored. Static medium access scheduling One possible scheduling strategy is to let the medium access of different sensors and actuators follow a pre-defined sequence, termed communication sequence [48]. Medium access scheduling strategies of this kind are often called static scheduling. The work in [48] studies an NCS in which a collection of uncoupled discrete-time 22 linear plants send their sensors? information to a controller via a shared serial com- munication medium. The medium access status of the sensors at each discrete time instance is described by a fixed periodic communication sequence. Assuming ZOH at the receiving side of the communication medium, a state augmentation technique called extensification is used to model the closed loop NCS dynamics under a con- stant feedback gain matrix. It is shown that any periodic communication sequence defines an affine subspace of matrices in an augmented matrix space. Each matrix in this space corresponds to a specific choice of feedback gains. In general, given a periodic communication sequence, a stabilizing feedback gain can not be found analytically and in fact the question of its existence has been proved to be NP-hard [49]. The work in [48] is generalized in [14] where the plant studied is a coupled MIMO system (Fig.2.5). Using the state extensification technique, the closed-loop system is shown to define an affine matrix space of higher dimension. A more general NCS configuration is studied in [50] where the medium access constraints are extended to both sensors and actuators. To account for the effects of ZOHs at both the plant and the controller?s input stages, a higher dimensional state extensification is needed to model the closed-loop dynamics, which again define an affine matrix space. Under this formulation, it is shown that [14, 50], given a periodic communication sequence, the solution fora stabilizing feedback gainmay be obtainedvia a simulated annealing algorithm that seeks to minimize the spectral radius of the closed-loop systems, however the computation cost related to this algorithm is very high, and the existence of a solution is not guaranteed. If the feedback controller of an NCS is given in advance, the problem of design- ing a stabilizing communication sequence is also challenging. Previously proposed methods only handle NCS whose dynamics are ?block-diagonal?, in the sense that 23 Plant Controller ZOH Communication medium ... ... Figure 2.5: An MIMO plant with medium access constraints existing only on the output side. A ZOH is used at the receiving end of the communication medium. the sensors and actuators are connected to uncoupled sub-plants. The work in [13] studies a block-diagonal NCS configuration where a collection of uncoupled contin- uous linear systems share a communication medium to close their feedback loops (shown in Fig. 2.6). It is shown that the existence of a stabilizing communication sequence can be linked a condition that is related to the decay/growth rate of the Lyapunov functions of the closed/open-loop dynamics of these subsystems. ... actuator Plant 1 sensor Controller 1 ... Communication Medium actuator sensor Controller 2 actuator sensor Controller N Plant 2 Plant N ... Figure 2.6: A ?block-diagonal? NCS: a collection of uncoupled continuous linear systems share a communication medium to close their feedback loops. 24 A similar NCS configuration is discussed in [51, 15], it is shown that, depending on the parameters of their dynamics, each subsystem needs to close its feedback loop at a specific rate in order to achieve stability. Based on these rate requirements, the Rate Monotonic (RM) [52] algorithm is then used to schedule the access to the shared communication medium. The idea of RM scheduling is that the subsystem that needs to close its loop at a higher rate obtains higher medium access priority. Under the RM scheduling rule, the schedulability of a set of non-preemptive periodic tasks can be checked by a sufficient condition given in [53]. An effective communication sequence can also be obtained by solving an opti- mization problem that searches over all possible choices of communication sequence over a finite horizon. It is shown [54] that a finite horizon optimal communica- tion sequence can be found by performing backwards recursion of an LQ (Linear Quadratic) cost function combined with tree pruning. The work in [55] uses a sim- ilar optimization setup but the optimal communication sequence is obtained via exhaustive search. Dynamic medium access scheduling Under static scheduling, the controller may not be able to respond quickly to a sensor or actuator that requires immediate attention, and thus an NCS may be less robust when the plant is subject to unpredictable disturbances. Moreover, when implementing a static communication sequence, a global timer is needed to synchronize all the sensors, actuators, and the controller. These restrictions have given rises to research on dynamic medium access scheduling strategies in which the access to the medium is determined ?on-line? based on a feedback-based arbitration policy. Dynamic medium access scheduling policies can be implemented via various random MAC protocols. 25 The ?CLS-?? dynamic access scheduling policy is introduced in [56] for NCSs having block-diagonal configurations. This policy, which seeks to ?Contain Largest State?, is inspired by the ?Clear Largest Buffer? policy originally introduced in [57] for distributed manufacturing system. According to the CLS-? policy, the subsystem whose state is farthest from the origin wins medium medium access; the medium access is re-determined when the norm of the state of that subsystem is driven to a small positive real number ?. It is shown that, by gradually decreasing the value of ?, the NCS can be asymptotically stabilized by the CLS-? policy. The works in [58, 59] proposed the MEF-TOD (Maximum Error First, Try Once Discard) policy which can be used to stabilize a general NCS in which the plant is a coupled MIMO system. According to the MEF-TOD policy, i) at any time, the input or output with the greatest weighted error from its most recently transmitted value win the access of the medium; ii) if an input or output fails to win the competition for the network access, it discards its current value, real-time access arbitration of medium access is always based on real-time value of the inputs and outputs. An important assumption made in the MEF-TOD policy is that, for each sensor and actuator, the maximum interval between its two successful transmission is bounded by a small number, ?m, referred to as the ?Maximum Allowable Transfer Interval? (MATI). Treating the network induced error as a vanishing perturbation, the work in [58] shows that an NCS is asymptotically stable under the MEF-TOD policy if the MATI is less than a given bound, which can be obtained by applying Bellman- Gronwall Lemma [60] to the closed-loop system. This result is extended to nonlinear NCSs in [61]. It is shown [62, 13] that, due to the conservativeness of Bellman- Gronwall Lemma, the bound obtained in [58, 59] on MATI is very conservative. Neither the ?CLS-?? nor the ?MEF-TOD? policy guarantees an upper-bound for the switching rate of medium access. High-speed switching is often impractical in 26 communication networks and may bring undesirable high frequency disturbances in the feedback loop. An effective way to bound the switching rate is to introduce a minimum dwell time ? > 0 and restrict the time interval between any two consec- utive access switches to be no smaller than ? [63]. In Chapter 5 of this thesis, we will introduce a dynamic medium access scheduling policy that ensures a dwell-time between consecutive switches. Relationships with this thesis For NCSs under static access scheduling, previously proposed NCS synthesis meth- ods only allow one to design a controller for a given communication sequence, or to find a stabilizing communication sequence while assuming that the controller was designed without considering communication constraints; the co-design of communi- cation sequence and the feedback controller in NCSs has thus far been a challenging task. When designing a stabilizing communication sequence, it is also often assumed that the plant is block-diagonal, or that the medium access constraints exist only on the output side of the plant, in order to simplify the analysis. When it comes to controller design, the methods introduced in [14] and [48] used simulated annealing algorithm which is complicated and does not guarantee the existence of a solution. In dynamic scheduling of NCSs, most previous results only address simple con- figurations where the plant is block-diagonal [13]; the work in [58] discusses NCSs with coupled plant dynamics, but it is attached to very conservative assumptions on the MATI. In the following chapters, we describe a new model for NCS under medium access constraints. We will show that this new model avoids the complexities in previously proposed NCS models and elucidates the interaction between medium access scheduling and the underlying dynamics of the control system. Based on this 27 new model, we will present a set of theoretical tools that allow one to concurrently design the medium access scheduling strategy (static or dynamic) and the feedback controller that stabilize a general class of NCSs in which the plant has?fully coupled? dynamics and the medium access constraints exist on both input and output side of the plant. 28 Chapter 3 Medium Access Constraints in NCSs The focus of this thesis is NCS design under medium access constraints. As we have already mentioned, previously proposed synthesis methods do not provide a complete solution to the NCS stabilization problem. The difficulties encountered in previous works are partly due to the complexities introduced by assuming zero order holds (ZOHs) at the ?receiving end? of a communication medium. In this chapter, we introduce a new NCS architecture, in which the plant and controller forgo the use of a ZOH, and instead choose to ?ignore? the actuators and sensors that are not actively communicating. This new architecture leads to simpler NCS models and elucidates the interaction between medium access scheduling and the dynamics of the underlying plant and the feedback controller. 29 3.1 Problem Formulation Consider the NCS configuration shown in Fig. 3.1, in which the plant is a linear time-invariant (LTI) system and communication constraints exist on both input and output side of the plant. Let the dynamics of the plant be given by: ?x(t) = Ax(t) +Bu(t), x ? Rn,u? Rm, (3.1) y(t) = Cx(t), y ? Rp, where the state of the plant x = [x1,??? ,xn]T ? Rn consists of n scalar components; the input u = [u1,??? ,um]T ? Rm consist of m scalar components; and the output y = [y1,??? ,yp]T ? Rp consists of p scalar components. Each of the plant?s m scalar inputs receives its control signal ui from a designated actuator; each output yi is measured by a designated sensor. actuator 1 actuator 2 ... actuator m sensor 2 sensor 1 ... sensor p Controller Input Channels Output Channels Shared Communication Medium Plant yp u2 um u1 y1 y2 Figure 3.1: An NCS having m actuators and p sensors, with medium access con- straints existing on both sensor and actuator sides. In the sequel, we will use the terms input channel and output channel to refer to communication links that enable data transmission from controller to actuators 30 and from sensors to controller, respectively, through the communication medium. We assume that the shared communication medium can simultaneously provide w? (1 ? w? < p) output channels and w? (1 ? w? < m) input channels. In such an NCS, only w? of the p sensors can access these channels to communicate with the controller at any one time, while others must wait. Similarly, at the input side of the plant, the controller can only communicate with w? of the m actuators at any one time to update their control signals. It is important to note that the proposed NCS model does not capture settings where sensors and actuators share a single communication channel. However, the results presented in Chapter 4 and Chapter 6 can be modified to apply to those settings. We also remark that the central issue addressed in this thesis is medium access constraints in an NCS. The effects of any other communication constraints, such as data-rate limits, transmission delays, and possible data-packet have been neglected for simplicity. However, the NCS model proposed in this chapter can be augmented to include the effects of other communication constraints. 3.2 Communication Sequence An effective way to model medium access constraints in NCSs is to use the notion of a communication sequence [48, 14], which specifies the order in which the sensors and actuators are to access the communication medium. Let us first consider the output side of the plant. For i = 1,??? ,p, let the binary-valued function ?i(t) denote the medium access status of sensor i at time t, i.e. ?i(t) : R mapsto?{0,1}, where 1 means ?accessing? and 0 means ?not accessing?. The medium access status of the p sensors 31 over time can then be represented by the p-to-w? communication sequence ?(t) = ? ?? ?? ?? ?? ?1(t) ?2(t) ... ?p(t) ? ?? ?? ?? ?? . Definition 3.1. An M-to-N (N < M) communication sequence ? is a map, ?(t) : R mapsto?{0,1}M, satisfying bardbl?(t)bardbl2 = N, ?t. Similarly, at the plant?s input side, we use a binary-valued function ?i(t) to denote the medium access status of actuator i at time t. The medium access status of the plant?s m actuators can then be described by an m-to-w? communication sequence ?(t) with ?(t) = ? ?? ?? ?? ?? ?1(t) ?2(t) ... ?m(t) ? ?? ?? ?? ?? . In the sequel, we will refer to the ? and ? as the ?input? and ?output? commu- nication sequences, respectively. 3.3 Effects of Medium Access Constraints We now go on to investigate the effects of medium access constraints on the dynamics of an NCS. A sensor?s output, say yi(t), is available to the controller only when the sensor i is accessing the communication medium, i.e., ?i(t) = 1. When that is not 32 the case (?i(t) = 0), we let the controller ignore that sensor by assuming a zero output value for its output. Let ?yi(t) denote the output signal that is assumed by the controller for sensor i at time t. The above protocol leads to: ?yi(t) = ?i(t)?yi(t), ?i. To simplify the notation, it is also convenient to define the matrix form of a communication sequence (or the communication sequence matrix). Definition 3.2. Let ?(t) be an M-to-N communication sequence, the ?matrix form? of ?(t), M?(t) , is defined as M?(t) definesdiag(?(t)). Now let ?y(t) denote the output vector that is assumed by the controller at time t, based on the above communication protocol. We thus have ?y(t) = M?(t)?y(t), (3.2) where ?y = [?y1, ?y2,??? , ?yp]T. Similarly, at the plant?s input side, when actuator j loses its access to the com- munication medium, the control signal generated by the controller for that actuator will be unavailable to and hence ignored by that actuator. Instead, the actuator sets uj = 0 until it obtains medium access again. Let ?u = [?u1,????um]T denote the control signals generated by the controller and u(t) denote the input signals actually used by the actuator, we thus have u(t) = M?(t)?u(t). (3.3) 33 3.4 The Extended Plant Combining (3.1), (3.3), and (3.3), we obtain a linear time-varying (LTV) system with ?u as its inputs and ?y as its outputs: ?x(t) = Ax(t) +BM?(t)?u(t), (3.4) ?y(t) = M?(t)Cx(t). The last equations describe the plant from the controller?s point of view. We call (3.4) the extended plant, and note that it incorporates the dynamics of the plant together with the two communication sequences. The block diagram of the extended plant is shown in Fig. 3.2. Plant Controller Extended plant y(t) ?u(t) ?y(t) M?(t)M?(t) u(t) Figure 3.2: The extended plant The properties of the extended plant can be summarized as follows: 1. The extended plant (3.4) is a linear time varying system with a constant A matrix. 2. The extended plant (3.4) has fewer ?effective? inputs and outputs than the original plant (3.1). 3. The state of the extended plant (3.4) coincides with that of the original plant (3.1). Hence the NCS can be stabilized by designing a feedback controller that 34 stabilizes the extended plant (3.4). 3.4.1 Remark Previous works have often assumed that, when a sensor or actuator loses medium access, the latest available values stored in the ZOHs will be fed into the controller or plant. Aside from increasing the system?s complexity by introducing time-varying delays (see, for example, the ?extensive form? in [14] and other similar construc- tions), the use of ZOHs may not necessarily benefit system performance: Consider the scalar system ?x = x+ u stabilized by the feedback law u = ?2x. Suppose that the medium access of u is cut off when x = 1. With a ZOH, the system will then evolve according to ?x = x ? 2 thereafter. When x becomes negative, the control u = ?2 would result in a greater divergence rate than a zero control. In this work, we have chosen to ?ignore? the sensors or actuators that are not actively communi- cating. We have shown that, doing this, the effect of medium access constraints can be captured by simply cascading the original plant with a pair of communication sequence matrices. 3.4.2 Switched System Expression Note that according to Definition 3.1, ?(?) and ?(?) can only take on parenleftbigmw?parenrightbig and parenleftbig p w? parenrightbig possible values, respectively. This makes the extended plant (3.4) essentially a switched system [63] switching between parenleftbigmw?parenrightbig?parenleftbig pw?parenrightbig LTI systems. Using the switched system notation, the extended plant can also be expressed as: ?x(t) = Ax(t) +B?(t)?u(t), (3.5) ?y(t) = C?(t)x(t), 35 where the communication sequences ?(t), ?(t) are now serving as the switching signals of the switched system. Also, (3.5) represents a special class of switched systems because the dynamics A are always constant. In Chapter 5, this property will allow us to develop a group of dynamic medium access scheduling strategies that asymptotically stabilize NCSs under constant feedback gains. 3.5 A Discrete-time Formulation Feedback controllers of modern control systems are often implemented via digital computers, especially when it comes to NCSs. In that setting, the plant?s outputs are sampled periodically by an Analog-to-Digital (A/D) converter; a Digital-to- Analog (D/A) converter is used to convert the digital control signals generated at the controller to analog ones for the actuators. A dynamical system with synchronized D/A and A/D converters at its inputs and outputs is often referred to as a ?sampled- data system?. It is well-known that a sampled-data system can be modeled as a discrete-time dynamical system. Suppose therefore, that the plant in the NCS of Fig. 3.1 is a sampled-data system, and let the dynamics of the plant be given by the discrete-time LTI system x(k + 1) = Ax(k) +Bu(k), x ? Rn,u? Rm, (3.6) y(k) = Cx(k), y ? Rp. Suppose also that data transmissions and receptions via the communication medium only take place at discrete-time instances. Then, the medium access status of the p sensors and m actuators over time can be represented by the discrete-time p-to-w? 36 and m-to-w? communication sequences ?(k) = ? ?? ?? ?? ?? ?1(k) ?2(k) ... ?p(k) ? ?? ?? ?? ?? , and ?(k) = ? ?? ?? ?? ?? ?1(k) ?2(k) ... ?m(k) ? ?? ?? ?? ?? , respectively. Definition 3.3. A discrete-time M-to-N communication sequence ? is a map, ?(k) : Z mapsto?{0,1}M, satisfying bardbl?(k)bardbl2 = N, ?k. Based on the same communication protocols we introduced in Section 3.3, the extended plant to be controlled by the controller is the discrete-time linear time- varying (LTV) system: x(k + 1) = Ax(k) +BM?(k)?u(k), (3.7) ?y(k) = M?(k)Cx(k), where M?(k) defines diag(?(k)), and M?(k) defines diag(?(k)) are the communication se- quence matrices. 3.6 NCSs with Nonlinear Plants Although we will not discuss the design of NCSs with non-linear dynamics, the modeling techniques introduced in this chapter easily extends to those systems. For example, if the plant is described by ?x(t) = f(x(t),u(t),t), (3.8) y(t) = g(x(t),u(t),t), 37 then, under the communication sequences ?(?) and ?(?), the extended plant can be expressed as: ?x(t) = f(x(t),M?(t)?u(t),t), (3.9) ?y(t) = M?(t)g(x(t),M?(t)?u(t),t). 38 Chapter 4 Static Medium Access Scheduling In this chapter, we study the stabilization of NCSs under static medium access scheduling. We show that, in the continuous-time case, the controllability and observability of a linear plant can be preserved under periodic communication se- quences as long as each input and output are granted a finite interval of medium access during every period; in the discrete-time case, there always exist periodic communication sequences (can be found via a simple algorithm) that preserve the reachability and observability of a reversible plant. Using these effective commu- nication sequences, one can easily design observer-based feedback controllers that exponentially stabilize an NCS at an arbitrary decay rate. 4.1 Continuous-time Case We begin with studying static medium access scheduling in continuous-time. Let the plant be the LTI system 39 ?x(t) = Ax(t) +Bu(t), x ? Rn,u? Rm, (4.1) y(t) = Cx(t); y ? Rp. Suppose that the medium access of the actuators and sensors is governed by the m- to-w? input communication sequence ?(t) and the p-to-w? output communication sequence ?(t), respectively. Based on our NCS model from Chapter 3, the dynamics of the extended plant are: ?x(t) = Ax(t) +BM?(t)?u(t), (4.2) ?y(t) = M?(t)Cx(t). For convenience, we re-write the dynamics of the extended plant as ?x(t) = Ax(t) + ?B(t)?u(t), (4.3) ?y(t) = ?C(t)x(t). where ?C(t) defines M?(t)C, ?B(t) defines BM?(t). Without loss of generality, we assume that the plant (4.1) is controllable and observable, i.e., rankparenleftbig[B,AB,??? ,An?1B]parenrightbig = rank ? ?? ?? ?? ?? ? ?? ?? ?? ?? C CA ... CAn?1 ? ?? ?? ?? ?? ? ?? ?? ?? ?? = n. (4.4) 40 Note that, in the presence of medium access constraints, the controllability and observability of the plant may be ?lost? if the communication sequences are not chosen carefully, as would be the case, for example, if one of the inputs never ob- tained medium access. In the continuous-time case, this scenario will turn out to be the only one that we must guard against; on the other hand, the discrete-time case will require a more sophisticated choice of communication sequences, as we shall see in the sequel. In order to stabilize the NCS under consideration, our strategy will be to first find communication sequences which preserve the controllability and ob- servability in the extended plant (4.2), and then design an observer-based feedback controller that will stabilize the extended plant. Before proceeding with our analy- sis, we review several definitions regarding the controllability and observability of LTV systems, such as (4.2). These definitions can be found in most standard linear system theory texts (e.g., [64]). Definition 4.1. The extended plant (4.2) is controllable on [t0,tf] if starting from any initial condition at t0, there exists an input ?u(t) that steers x(t) to zero at tf. Definition 4.2. The extended plant (4.2) is controllable if there exists ? > 0 such that (4.2) is controllable on [t,t+?] for all t. Definition 4.3. The extended plant (4.2) is observable on [t0,tf] if any initial condition at t0 can be uniquely determined from the output ?y(t) on [t0,tf]. Definition 4.4. The extended plant (4.2) is observable if there exist a ? > 0 such that (4.2) is observable on [t,t+?] for all t. 41 4.1.1 Communication Sequences that Preserve Controllability and Observability To investigate the controllability and observability of the extended plant (4.2), we will begin with the worst-case communication condition, where there is only one input channel and one output channel available at the communication medium (i.e., w? = w? = 1). Later we will generalize those results to the general multiple in- put/output channels cases. Let us first study the controllability of the extended plant. Consider the case where w? = 1. Now, ?(t) is an m-to-1 communication sequence. By definition, ?(t) only takes values on the set of m-dimensional standard basis vectors, Em = {e1m,e2m,??? ,emm}, where e1m = [1,0???0]T, e2m = [0,1,0???0]T, ??? emm = [0???0,1]T. Let B = [b1,b1,??? ,bm], then for all t, ?B(t) takes values on a finite set, ?B(t) ?{B1,B2,...,Bm}, where Bi = B?diag(eim) = [0,??? ,0,bi,0,??? ,0], i.e., Bi only retains the ith column of B, and sets all the other columns to zero. Note that the LTV system (4.2) is controllable on [t0,tf] if and only if the controllability Gramian W(t0,tf) = integraldisplay tf t0 ?(t0,t) ?B(t) ?B(t)T?T(t0,t)dt (4.5) is invertible, where ?(t0,t) = eA(t0?t). Inspired by a similar problem studied in [65], 42 we have the following: Theorem 4.1. Suppose that the plant (4.1) is controllable. Let t0 < t1 < ??? < tm = tf, then the m-to-1 communication sequence ?(t) = eim; ti?1 ? t < ti (i = 1,2,???m), (4.6) is such that the extended plant (4.2) is controllable on [t0,tf]. Proof. Under the communication sequence (4.6), the controllability Gramianof (4.2) over [t0,tf] can then be written as W(t0,tf) = integraldisplay t1 t0 ?(t0,t)B1BT1 ?T(t0,t)dt+ integraldisplay t2 t1 ?(t0,t)B2BT2 ?T(t0,t)dt+ (4.7) ???+ integraldisplay tm tm?1 ?(t0,t)BmBTm?T(t0,t)dt. We prove the controllability of the extended plant by contradiction. If the control- lability Gramian (4.7) were not invertible, then there should exit a vector xa negationslash= 0 such that xTaW(t0,tm)xa = 0. This would imply for all i = 1,??? ,m xTa?(t0,t)Bi = 0; ti?1 ? t < ti (4.8) because each integrand in the RHS of (4.7) is symmetric and non-negative definite. Now differentiate both sides of (4.8) for n?1 times with respect to t, and evaluate the resulting equation at t = t0 to obtain xTa[Bi,ABi,??? ,An?1Bi] = 0, ?i = 1,??? ,m. This would imply xTa[B,AB,??? ,An?1B] = 0, meaning that [B,AB,??? ,An?1B] 43 has rank less than n; this contradicts the assumption that (4.1) is controllable. The proof of Theorem 4.1 suggests that the extended plant is controllable on the time interval [t0,tf] if every input obtains some finite amount of medium access during that time interval. This is summarized in the following corollary, whose proof follows easily from that of the previous theorem: Corollary 4.1. Suppose that the plant (4.1) is controllable. If the m-to-1 commu- nication sequence ?(t) satisfies: ? for all i = 1,??? ,m, there exist t0 ? ti1 < ti2 ? tf, such that ?i(t) = 1 for all t ? [ti1,ti2], where ?i(t) is the i-th component of ?(t), then the extended plant (4.2) is controllable on [t0,tf]. The above theorem illustrate the extended plant?s controllability during a time interval [t0,tf]; we now extend it to its controllability for all time. Corollary 4.2. Suppose that the plant (4.1) is controllable, and that T > 0 is a real number. If the m-to-1 communication sequence ?(t) satisfies: 1. ?(t) = ?(t+T), for all t; 2. for all i = 1,??? ,m, there exist 0 ? ti1 < ti2 ? T, such that ?i(t) = 1 for all t ? [ti1,ti2], where ?i(t) is the i-th component of ?(t); then the extended plant (4.2) is controllable on [t,t + T] for all t, and is hence controllable. Proof. Under the given communication sequence ?(?), during each period [t,t+T], each input obtains a chance of medium access. In the spirit of Corollary 4.1, the extended plant is controllable at [t,t+T] for all t. 44 For an NCS with more than one input channels (w? > 1), each possible value taken by ?B(t) will consist of w? columns from B. An argument similar to those in the proof of Theorem 4.1 shows that, the controllability of the plant (4.1) is preserved in the extended plant (4.2), if every input obtains a finite interval of medium access periodically. Lemma 4.1. Suppose that the plant (4.1) is controllable and that T > 0 is a real number. If the m-to-w? (1 ? w? < m) communication sequence ?(?) is T-periodic and gives each of the m actuators a chance to access the communication medium during every period T, i.e., 1. for all t, ?(t) = ?(t+T); 2. for all i = 1,??? ,m, there exist ti1, ti2, such that 0 ? ti1 < ti2 ? T, and ?i(t) = 1 for all t ? [ti1,ti2], where ?i(t) is the i-th component of ?(t); then the extended plant (4.2) is controllable on [t,t + T], for all t, and is hence controllable. Because observability is a dual property of controllability, the results we just proved for controllability can be extended to the following statements regarding the observability of the extended plant. The proofs are straightforward (they follow the ?dual? arguments from the proof of Theorem 4.1) and will not be included here. Lemma 4.2. Suppose that the plant (4.1) is observable and that T > 0 is a real number. if, for all t, the p-to-w? (1 ? w? < p) communication sequence ?(?) is T-periodic and gives each of the p sensors a chance to access the communication medium during every period T, i.e., 1. for all t, ?(t) = ?(t+T); 45 2. for all i = 1,??? ,p, there exist ti1, ti2, such that 0 ? ti1 < ti2 ? T, and ?i(t) = 1 for all t ? [ti1,ti2], where ?i(t) is the i-th component of ?(t); then the extended plant (4.2) is observable on [t,t + T], for all t, and is hence observable. 4.1.2 Output Feedback Stabilization Under periodic communication, the extended plant (4.2) becomes a linear periodic time-varying system. The stabilization of such systems has been extensively studied in the controls literature, see, for example, [66], [67], and [68]. Here we use an observer-based controller described in [64]. From the two lemmas stated in the previous section, we know that the the con- trollability and observability of the plant can be preserved in the extended plant if the communication sequences are chosen properly. Using those ?effective? commu- nication sequences, the extended-plant can be stabilized at an arbitrary decay rate via output feedback. The feedback controller consists of a state observer followed by a time varying feedback gain K(t) (shown in Fig. 4.1). Observer Plant ?u(t) K(t) M?(t)M?(t) u(t) y(t) ?x(t) ?y(t) Figure 4.1: Output feedback stabilization of an NCS: The controller consists of an observer followed by a time-varying feedback gain K(t). 46 Define an observer for the extended plant (4.2) by ??x(t) = A?x(t) + ?B(t)?u(t) +H(t)[?y(t)? ?C(t)?x(t)], (4.9) where ?x is the observer?s state, ?C(t) = M?(t)C, ?B(t) = BM?(t), and H(t) is the time-varying observer gain. Suppose that the extended plant is controlled by the time-varying feedback law: ?u(t) = K(t)?x(t). We then have the following: Theorem 4.2. Let the plant (4.1) be controllable and observable, and the commu- nication sequences ?(t) and ?(t) satisfy the conditions stated in Lemma 4.1 and Lemma 4.2. Then given ? > 0, for any ? > 0 the feedback and observer gains K(t) = ??BT(t)W?1?+?(t,t+T), (4.10) H(t) = [e?ATTM?+?(t?T,t)e?AT]?1 ?CT(t), (4.11) are such that the closed-loop system is uniformly exponentially stable with rate ?, where W?+?(t0,tf) defines integraldisplay tf t0 2e4(?+?)(t0??)eA(t0??) ?B(?) ?BT(?)eAT(t0??)d?, (4.12) M?+?(t0,tf) defines integraldisplay tf t0 2e4(?+?)(??tf)eAT(??t0) ?CT(?) ?C(?)eA(??t0)d?. (4.13) Proof. As defined in [64], the controllability and observability Gramians of the ex- 47 tended plant (4.2) are W(t0,tf) = integraldisplay tf t0 eA(t0??) ?B(?) ?BT(?)eAT(t0??)d?, M(t0,tf) = integraldisplay tf t0 eAT(??t0) ?CT(?) ?C(?)eA(??t0)d?. If the communication sequences ?(t) and ?(t) satisfy the conditions of Lemmas 4.1 and 4.2, the extended plant will be controllable and observable on [t,t +T) for all t. Hence, the Gramians of the extended plant (4.2), W(t,t + T) and M(t ? T,t), are positive definite for all t. Also it is easy to show that, under T-periodic communication sequences, the Gramians W(t,t + T), and M(t?T,t) are both T- periodic in t. Therefore, we can find positive constants ?1 and ?2 such that, for all t, ?1I ?W(t,t +?) ? ?2I, (4.14) ?1I ? ?T(t?T,t)M(t?T,t)?(t?T,t) ? ?2I, (4.15) because ?(t?T,t) = e?AT is constant for all t. Moreover, since ?B(t) is piecewise constant, and it always takes value on a finite set, there exist positive constants ?1, ?2 such that, for all t, ? with t ? ?, integraldisplay t ? bardbl?B(?)bardbl2d? ? ?1 +?2(t??). (4.16) Given (4.14)-(4.16), we can apply Theorem 15.5 in [64] for the extended plant (4.2) to obtain the desired result. 48 4.1.3 Remarks We remark that under the T-periodic communication sequences, ?(t) and ?(t), the feedback and observer gains K(t) and H(t) given in Theorem 4.2 are also T-periodic. Hence, when implementing the proposed observer-based controller, one only needs to calculate H(t) and K(t) for t0 ? t < T + t0, where t0 is the initial time. The Gramians (4.12), (4.13), can be computed by integrating a pair of linear ordinary differential equations (ODEs). In particular, one can show that W?+?(t,t + T) satisfies a differential equation similar to that satisfied by (4.7): d dtW?+?(t,t+T) = (A+ 2(? +?)I)W?+?(t,t+T)+ W?+?(t,t+T)(A+ 2(?+?)I)T ?2 ?B(t) ?BT(t)+ 2e?(A+2(?+?)I)T ?B(t) ?BT(t)e?(A+2(?+?)I)T T. (4.17) The initial condition of W?+?(t,t + T) at t = 0, W?+?(0,T), is obtained by inte- grating the differential equation: d dtW?+?(t,T) = (A+ 2(?+?)I)W?+?(t,T)?2 ?B(t) ?BT(t) + (4.18) W?+?(t,T)(A+ 2(?+?)I)T; (4.19) W?+?(T,T) = 0. (4.20) The matrix M?+?(t?T,t) satisfies a similar differential equation. The detailed derivations of the ODEs satisfied by the Gramians, (4.12) and (4.13), are given in Appendix A. 49 4.2 Discrete-time Case We now revisit static medium access scheduling and the accompanied controller de- sign problem in discrete-time. Recall the discrete time NCS formulation introduced in Chapter 3, where the plant is the discrete-time LTI system x(k + 1) = Ax(k) +Bu(k), x ? Rn,u? Rm, (4.21) y(k) = Cx(k); y ? Rp. Suppose that the medium access of the actuators and sensors is governed by the m-to-w? input communication sequence ?(k) and p-to-w? output communication sequence ?(k), respectively. Then the dynamics of the extended are x(k + 1) = Ax(k) +BM?(k)?u(k), (4.22) ?y(k) = M?(k)Cx(k). Without loss of generality, we assume that the plant (4.21) is reachable and observ- able, i.e., rankparenleftbig[B,AB,??? ,An?1B]parenrightbig = rank ? ?? ?? ?? ?? ? ?? ?? ?? ?? C CA ... CAn?1 ? ?? ?? ?? ?? ? ?? ?? ?? ?? = n. (4.23) Following our analysis for the continuous-time case, in order to stabilize the extended plant, our strategy will be to first find communication sequences which preserve the reachability and observability in the extended plant (4.22), and then 50 design an observer-based feedback controller that stabilizes the extended plant. It will turn out to be the case that designing effective communication sequences is more difficult in discrete-time than in continuous-time; in particular, it will not be sufficient to simply give every sensor and actuator some amount of medium access periodically. Before proceeding, we review some relevant definitions that concern the reachability and observability of discrete-time LTV systems [64]. Definition 4.5. The extended plant (4.22) is reachable on [k0,kf] if given any xf, there exists an input ?u(k) that steers (4.22) from x(k0) = 0 to x(tf) = xf. Definition 4.6. The extended plant (4.22) is l-step reachable if l is a positive integer and (4.22) is reachable on [k,k +l] for any k. Definition 4.7. The extended plant (4.22) is observable on [k0,kf] if any initial condition at k0 can be uniquely determined by the corresponding response ?y(k) for k ? [k0,kf]. Definition 4.8. The extended plant (4.22) is l-step observable if l is a positive integer and (4.22) is observable on [k,k +l] for any k. 4.2.1 Communication Sequences that Preserve Reachability and Observability We continue by studying the reachability of the extended plant. Suppose that x(0) = 0, and let the extended plant (4.22) evolve from k = 0 to k = kf. Then x(kf) = R(0,kf)? bracketleftbigg ?u(0) ?u(1) ??? ?u(kf ?1) bracketrightbiggT , 51 where R(0,kf) = [Akf?1BM?(0),Akf?2BM?(1),??? ,BM?(kf ?1)]. (4.24) The extended plant (4.22) is reachable on [0,kf] if rank(R(0,kf)) = n. Notice that for each k, ?(k) is an m-dimensional vector consisting of w? ones and m?w? zeros. Hence, at each step k, the communication sequence matrix M?(k) has the effect of ?selecting? w? columns from the m columns of the term Akf?k?1B on the RHS of (4.24). The matrix R will have full rank if the kf ?w? columns that M?(k) selects for k = 0,??? ,kf ?1 contain n linearly independent columns. We now prove that if the plant (4.21) is ?reversible? (i.e., A is an invertible matrix), then it is always possible to design a communication sequence ?(?), such that the extended plant is also reachable. Theorem 4.3. Suppose that A is invertible and that the plant (4.21) is reachable. For any integer 1 ? w? < m, there exists an m-to-w? communication sequence ?(?) and an integer kf ? ceilingleftBig n w? ceilingrightBig ? n, such that the extended plant (4.22) is reachable on [0,kf]. Proof. First, consider the worst-case scenario where w? = 1. The theorem holds if it is always possible to design an m-to-1 communication sequence ?(k), such that the sequence M?(k) selects n independent columns (RHS of (4.24)) by picking one column from the term Akf?k?1B at each step k = 0,???kf ?1, where kf ? n2. Let ?i = bracketleftbigg AniB,Ani+1B,??? ,Ani+n?1B bracketrightbigg . The matrix ?i has rank n for all i = 0,???n?1 because A is invertible and the extended plant is reachable. Now let ?0i ,??? ,?n?1i be any n linearly independent columns from ?i and let Li be the set {?0i ,??? ,?n?1i }. Consider the following algorithm 52 1. Let L = L0. 2. Replace ?10 in L by a column from L1, while keeping the rank of L equal to n. Such a replacement can always be found because rank(L1) = n. 3. For i = 2,??? ,n?1, replace ?i0 in L by a column from Li while keeping the rank of L fixed. The resulting matrix L includes one column from each ?i (i = 0,??? ,n ? 1) and has rank n. The above algorithm ensures that it is possible to select n linearly independent columns as long as one can select one column from each ?i. However, on the RHS of (4.24), M?(?) can actually select n columns from each ?i, hence there always exists an M?(?) that selects n independent columns in at most n2 steps. Now consider the less restrictive case w? > 1. The sequence M?(?) can select at least w? independent columns from each ?i (i = 0,1,???). Using a similar algorithm as in the single-channel case (This time, replace w? columns in L at each step while keeping the rank of L equal to n. It is easy to prove that such replacements can always be found because rank(Li) = n.), one can thus design an m-to-w? communication sequence ? such that M?(?) selects n independent columns from the ?i?s for i = 0,1,??? , ceilingleftBig n w? ceilingrightBig ?1 in at most ceilingleftBig n w? ceilingrightBig ?n steps. Remark 4.1. The bound for kf in Theorem 4.3 is conservative. Also notice that for each k, ?(k) can only have parenleftbigmw?parenrightbig possible values. Thus it is possible to find the minimum kf by searching (off-line) over all possible communication sequences ?(?) in the interval k = bracketleftBig 0, ceilingleftBig n w? ceilingrightBig ?n bracketrightBig . We now extend the result in Theorem 4.3 to the ?l-step reachability? of the extended plant (4.22). 53 Definition 4.9. A discrete-time communication sequence ?(?) is called N-periodic if ?(k) = ?(k +N) for all k. Corollary 4.3. Suppose that A is invertible and that the plant (4.21) is reachable. For any integer 1 ? w? < m, there exist integers l,N > 0 and an N-periodic m-to-w? communication sequence ?(?) such that the extended plant (4.22) is l-step reachable. Proof. From Theorem 4.3, there exists an integer kf and a communication se- quence ?(k) such that the extended plant is reachable on [0,kf]. Hence the se- quence M?(k) can select n independent columns from the matrices Akf?k?1B dur- ing k = 0,??? ,kf ? 1. Now let N = kf and extend ?(k) for k ? kf by setting ?(k) = ?(k+N), ?k. Because A is invertible, the N-periodic sequence M?(k) will se- lect n independent columns in every interval k = [jN,(j+1)N?1] (j = 0,1,2???). Now, let l be any integer greater than or equal 2N?1, then for all i ? 0 there always exists an integer j ? 0, such that [jN,(j + 1)N ?1] ? [i,i +l]. Hence the periodic sequence M?(k) will select n independent columns on [i,i+l] for all i. We conclude that the extended plant is l-step reachable under the N-periodic communication sequence ?(k). We now address the observability of the extended plant (4.22). It is easy to show that the extended plant (4.22) is observable on [k0,kf] if the matrix O(k0,kf) = ? ?? ?? ?? ?? M?(0)C M?(1)CA ... M?(kf ?1)CAkf ? ?? ?? ?? ?? (4.25) 54 satisfies rank(O(k0,kf)) = n. (4.26) Notice that, on the RHS of (4.25), at each step k, M?(k) selects w? rows from the term CAk. Then, the duality of reachability and observability leads to the following results. Theorem 4.4. Suppose that A is invertible and that the plant (4.21) is observable. For any integer 1 ? w? < p, there exists a p-to-w? communication sequence ?(?) and an integer kf ? ceilingleftBig n w? ceilingrightBig ?n, such that the extended plant (4.22) is observable on [0,kf]. Corollary 4.4. Suppose that A is invertible and that the plant (4.21) is observable. For any integer 1 ? w? < p, there exist integers l,N > 0 and an N-periodic p-to-w? communication sequence ?(?) such that the extended plant (4.22) is l-step observable. The proofs of Theorem 4.4 and Corollary 4.4 are similar to those in the proofs of Theorem 4.3 and Corollary 4.3, one only need to switch from column manipulations to row manipulations. Remark 4.2. The invertibility of A is necessary if one wants to preserve the reach- ability and observability in the extended plant. A counterexample is: A = ? ?? ?? ? 1 1 1 0 0 0 0 0 0 ? ?? ?? ? , B = ? ?? ?? ? 1 1 1 ? ?? ?? ? . Here, (A,B) is reachable but there is no 3-to-1 communication sequence ?(k) such that the extended plant is reachable on [0,kf], for any kf. Of course, the invertibil- ity of A is guaranteed if A is obtained by discretizing a continuous-time LTI plant. 55 In Chapter 6, we will show that if A is not invertible (thus reachability or observ- ability may be lost), we can still find communication sequences that preserve the stabilizability and detectability in the extended plant. 4.2.2 Choosing Communication Sequences We have shown that, in continuous-time NCSs, an LTI plant?s controllability and observability are preserved in the extended plant if each sensor and actuator obtains some finite amount of medium access during every period of the communication se- quence. However, this is not always sufficient in discrete-time NCSs, as the following examples illustrate Example 4.1. Consider the case when the plant (4.21) has 2 inputs, and the plant?s dynamics are given by A = ? ?? 1 0 0 1 ? ??, B = [b 1,b2] = ? ?? 1 0 0 1 ? ??. Since A is the identity matrix, the reachability testing matrix (4.24) will have the form R(0,kf) = [[b1,b2]M?(0)??? ,[b1,b2]BM?(kf ?2),[b1,b2]M?(kf ?1)]. Then matrix R(0,kf) will have full rank if each of the two inputs, u1, u2, is granted a chance of medium access during the period [0,kf ?1]. 56 Example 4.2. Now consider the case when A = ? ?? 0 1 1 0 ? ??, B = [b 1,b2] = ? ?? 1 0 0 1 ? ??. For this choice of A, B, we have Ab1 = b2, Ab2 = b1. Hence the reachability testing matrix (4.24) will have the form R(0,kf) = [Akf?1[b1,b2]M?(0)??? ,[b2,b1]BM?(kf ?2),[b1,b2]M?(kf ?1)]. If the communication sequence is chosen as the 2-periodic sequence {?(0),?(1),???} = {[1, 0]T,[0, 1]T,[1, 0]T,[0, 1]T,???}. then the matrix R(0,kf) will only consist of b1 or b2 (depending on whether kf is an odd or even number), and hence lose rank. However, if we choose the communication sequence as {?(0),?(1),???} = {[1, 0]T,[1, 0]T,[1, 0]T,[1, 0]T,???}, i.e., only u1 gets medium access, then the matrix R(0,kf) will be full rank. Example 4.3. Now consider the plant whose dynamics are obtained by combining 57 the previous two cases: A = ? ?? ?? ?? ?? 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 ? ?? ?? ?? ?? , B = ? ?? ?? ?? ?? 1 0 0 1 1 0 0 1 ? ?? ?? ?? ?? . Now, neither the communication sequence {?(0),?(1),???} = {[1, 0]T,[0, 1]T,[1, 0]T,[0, 1]T,???}, nor the sequence {?(0),?(1),???} = {[1, 0]T,[1, 0]T,[1, 0]T,[1, 0]T,???}, yields full rank in R(0,kf). In order for R(0,kf) to obtain full rank, one have to stick to one input for more than 1 step and grant both input a chance of medium access. For example, the 3-periodic communication sequence, {?(0),?(1),???} = {[1, 0]T,[1, 0]T,[0, 1]T,[1, 0]T,[1, 0]T,[0, 1]T,???}, will work. 4.2.3 Output Feedback Stabilization It is known that a discrete-time LTV system can be stabilized via output feedback if it is l-step reachable and l-step observable [64]. A controller that guarantees exponential decay rate of the closed-loop system consists of a state observer and a 58 time varying feedback gain K(k) (shown in Fig. 4.2). Observer Plant ?u(k) K(k) M?(k)M?(k) u(k) y(k) ?x(k) ?y(k) Figure 4.2: Output feedback stabilization of an NCS: The controller consists of a discrete-time observer and a time-varying feedback gain K(k). The observer of the extended plant (4.22) is given by the following dynamical system: ?x(k + 1) = A?x(k) + ?B(k)?u(k) +H(k)[?y(k)? ?C(k)?x(k)], (4.27) where ?C(k) defines M?(k)C, ?B(k) defines BM?(k), and ?x is the state estimation generated by the observer. The observer-based feedback law is: ?u(k) = K(k)?x(k). Theorem 4.5. Let the extended plant (4.22) be l-step reachable, l-step observable under the periodic communication sequences ?(k) and ?(k), and suppose that A is invertible. Then given a constant ? > 1 and ? > 1 the feedback and observer gain K(k) = ??BT(k)(A?1)TW?1?? (k,k +l), (4.28) H(k) = [(A?l)TM??(k?l + 1,k + 1)A?l]?1(A?1)T ?CT(k), (4.29) are such that the closed-loop system is uniformly exponentially stable with rate ?, 59 where W??(k0,kf) defines kf?1summationdisplay j=k0 (??)4(k0?j)Ak0?j?1 ?B(j) ?BT(j)(Ak0?j?1)T, M??(k0,kf) defines kf?1summationdisplay j=k0 (??)4(j?kf+1)(Aj?k0)T ?CT(j) ?C(j)Aj?k0. Proof. The reachability and observability Gramians of (4.22) are defined as W(k0,kf) = kf?1summationdisplay j=k0 Akf?j?1 ?B(j) ?BT(j)(Akf?j?1)T, M(k0,kf) = kf?1summationdisplay j=k0 (Aj?k0)T ?CT(j) ?C(j)Aj?k0. If the extended plant (4.22) is l-step reachable and l-step observable under the periodic communication sequences ?(k) and ?(k), then, for all k, the reachability and observability Gramians of (4.22), W(k,k+l) andM(k?l+1,k+1), are positive definite and periodic in k. Hence there exist positive constants ?1,?2 such that ?1I ? A?lW(k,k +l)(A?l)T ? ?2I, (4.30) ?1I ? (A?l)TM(k?l + 1,k + 1)A?l ? ?2I. (4.31) Moreover, since ?B(k) only takes values on a finite set, there exist positive constants ?1, ?2 such that for all k, j, with k ? j + 1 k?1summationdisplay i=j bardbl?B(i)bardbl2bardblA?1(i)bardbl? ?1 +?2(k?j ?1). (4.32) Given (4.30)-(4.32), apply Theorem 29.5 in [64] for the extended plant (4.22) to obtain the desired result. 60 We remark that the feedback and observer gains given in Theorem 4.5 are in- dependent of the system?s state and hence can be calculated off-line according to their update equations. Under N-periodic communication sequences, the feedback and observer gains K(k) and H(k) are also N-periodic. Hence, when implementing the observer-based controller, one only needs to calculate these gains for 0 ? k < N and store them in a time-indexed look-up table. 4.3 Examples In this section, we give two examples that illustrate the medium access scheduling and controller design methods introduced in this chapter. 4.3.1 Example 1: Continuous-time Consider an NCS in which the plant is a 4-th order unstable batch reactor having two inputs and two outputs [69]: ?x = ? ?? ?? ?? ?? 1.38 ?0.2077 6.715 ?5.676 ?0.5814 ?4.29 0 0.675 1.067 4.273 ?6.654 5.893 0.048 4.273 1.343 ?2.104 ? ?? ?? ?? ?? x+ ? ?? ?? ?? ?? 0 0 5.67 0 1.136 ?3.146 1.136 0 ? ?? ?? ?? ?? u, y = ? ?? 1 0 1 ?1 0 1 0 0 ? ??x. The plant is being controlled by a controller via a shared communication medium which has only one input channel and one output channel (i.e., w? = w? = 1). We chose the communication period to be T = 0.5s, and the input and output 61 communication sequences to be ?(t) = ? ??? ??? [1, 0]T : 0 ? t < .3T [0, 1]T : .3T ? t < T , (4.33) and ?(t) = ? ??? ??? [1, 0]T : 0 ? t < .7T [0, 1]T : .7T ? t < T . (4.34) Under these sequences, 30% of the input medium access time was given to u1, 70% was given to u2, the reverse held true for the outputs y1 and y2. For the given ?(t) and ?(t), we calculated the observer and state feedback gains from the formulas of Theorem 4.2 with ? = 1 and ? = .2. We then implemented the observer-based controller to stabilize the batch reactor under limited communica- tion. The plant?s and the observer?s initial conditions were set to x(0) = [10,5,2,1]T and ?x(0) = [10,10,10,10]T, respectively. Fig. 4.3 illustrates the simulation results of the state and error evolutions of the batch reactor under the above communication sequences and controller. To evaluate the robustness performance of this NCS design strategy, we per- formed a second simulation in which we added a white noise of 0.01W and a fixed transmission delay of 0.02 second at each input and output of the plant, and used the same communication sequence and feedback controller as in the previous sim- ulation. Fig. 4.4 illustrates the simulation results of the state and observer error evolution of the closed-loop NCSs under noise and delays. The simulation results showed that the system remained stable in the presence of unmodeled noise and transmission delays. 62 0 1 2 3 4 5?15 ?10 ?5 0 5 10 15 Time (s) x(t) x1(t) x2(t) x3(t) x4(t) (a) State evolution. 0 1 2 3 4 5?12 ?10 ?8 ?6 ?4 ?2 0 2 4 t (s) e(t) e1(t) e2(t) e3(t) e4(t) (b) Observer error evolution, e(t) = x(t)? ?x(t). Figure 4.3: Simulation results: Stabilization of an NCS using an observer-based continuous-time controller. The plant was an LTI system with two inputs and two outputs. The communication medium provided one input channel and one output channel. The communication sequence ?(t) assigned 30% of the input channel access time to u1 and 70% to u2; while the communication sequence ?(t) assigned 70% of the output channel access time to y1 and 30% to y2. 63 0 10 20 30 40 50?25 ?20 ?15 ?10 ?5 0 5 10 15 20 Time (s) x(t) x1(t) x2(t) x3(t) x4(t) (a) State evolution. 0 10 20 30 40 50 ?30 ?20 ?10 0 10 20 30 t (s) e(t) e1(t) e2(t) e3(t) e4(t) (b) Observer error evolution, e(t) = x(t)? ?x(t). Figure 4.4: Simulation results: Stabilization of the same NCS under the same com- munication sequences and controller as in Fig. 4.3, while a white noise of 0.01W as well as a 0.02s fixed transmission delay was added at each input and output of the plant. 64 4.3.2 Example 2: Discrete-time Consider the NCS in which the plant is a 4-th order unstable discrete-time LTI system having 2 inputs and 2 outputs: x(k + 1) = ? ?? ?? ?? ?? 1 1/5 0 0 0 11/4 0 1/5 1 1/5 1/3 3/4 0 ?1 0 1/4 ? ?? ?? ?? ?? x(k) + ? ?? ?? ?? ?? 0 0 1 1 0 0 1 1 ? ?? ?? ?? ?? u(k), y(k) = ? ?? 1 1 0 0 0 0 1 0 ? ??x(k). Suppose that the communication medium connecting the plant and the controller provides only one input channel and one output channel (i.e., w? = w? = 1). Using the algorithm presented in Section 4.2.1, we found that, using the 2-periodic input and output communication sequences {?(0),?(1),???} = {[0, 1]T,[1, 0]T,???}, {?(0),?(1),???} = {[1, 0]T,[0, 1]T,???}, the extended plant is 7-step reachable and 7-step observable. We then design the observer-based output feedback controller described in Sec- tion 4.2.3. The observer gains H(k) and the feedback gains K(k) were calculated from the formulas in Theorem 4.5, where ? and ? were chosen as ? = 2, ? = 1.2. The resulting periodic feedback and observer gains are 65 K(2i) = ? ?? ?6.4042 ?3.9222 ?0.0036 ?0.2097 0 0 0 0 ? ??, K(2i + 1) = ? ?? 0 0 0 0 ?6.4042 ?3.9222 ?0.0036 ?0.2097 ? ??, H(2i) = ? ?? ?? ?? ?? 0 0.1953 0 ?5.3283 0 1.1311 0 2.1968 ? ?? ?? ?? ?? , H(2i+ 1) = ? ?? ?? ?? ?? 0.1963 0 2.6818 0 ?0.1400 0 ?1.1059 0 ? ?? ?? ?? ?? , i ? Z. In this example, the plant and the observer?s initial conditions were set to x(0) = [3,5,7,6]T, ?x(0) = [1,1,3,4]T, respectively. The simulation results on the evolution of the plant?s states and the observer error of the closed-loop NCS are shown in Fig. 4.5, from which we can see that the NCS is effectively stabilized by using the communication sequences and the output feedback controller. 66 0 5 10 15?600 ?400 ?200 0 200 400 600 800 Time (k) X(k) x1(k) x2(k) x3(k) x4(k) (a) State evolution. 0 2 4 6 8 10 12 14?15 ?10 ?5 0 5 10 15 20 25 30 35 Time (k) e(k) e1(k) e2(k) e3(k) e4(k) (b) Observer error evolution, e(k) = x(k)? ?x(k). Figure 4.5: Simulation results: Stabilization of an NCS using an observer-based discrete-time controller. The plant was a discrete-time LTI system with two inputs and two outputs. The communication medium provided one input channel and one output channel. 67 Chapter 5 Dynamic Medium Access Scheduling Static medium access scheduling is easy to implement but it may be less robust when the plant is subject to unpredictable disturbances, because the controller may not be able to respond quickly to a sensor or actuator that requires immediate attention. Moreover, when implementing a static communication sequence, a global timer is needed to synchronize all the sensors, actuators, and the controller. These limitations give rise to the idea of dynamic medium access scheduling, where the medium access of the sensors or actuators is determined on-line based on the real- time information of the plant. In this chapter, we take the advantage of the NCS model introduced in Chapter 3 to study dynamic access scheduling without any requirements on the structure of the plant, other than it being LTI. We present an algorithm for simultaneously de- signing stabilizing gains and communication policies and avoids the computational complexity and limitations associated with previously proposed methods. We in- troduce a set of dynamic access scheduling policies that quadratically stabilize the 68 closed-loop NCS while achieving various objectives related to the system?s rate of convergence, the priorities of different sensors and actuators, and the avoidance of chattering. 5.1 Problem Formulation Plant M?(t) K M?(t) ?u ?x u1 u2 um x1 x2 xn Figure 5.1: An NCS in which the plant?s state information is available, and the controller is constant feedback. Consider the continuous-time NCS shown in Fig. 5.1, where the dynamics of the plant are given by the MIMO LTI system ?x(t) = Ax(t) +Bu(t), x ? Rn,u? Rm. (5.1) For now, we will assume state feedback, meaning that the state x = [x1,??? ,xn]T are available (although not simultaneously) for measurement at the plant?s outputs. Let the medium access status of the actuators and sensors be governed by the m- to-w? input communication sequence ?(t) and the p-to-w? output communication sequence ?(t), respectively. Let ?x = [?x1, ?x2,??? , ?xn]T, denote the output signals that are available to the controller. Based on the NCS model we introduced in 69 Chapter 3, we have ?x(t) = M?(t)?x(t). (5.2) Then the dynamics of the extended plant can be expressed as ?x(t) = Ax(t) +BM?(t)?u(t), (5.3) ?x(t) = M?(t)x(t). We will adopt a constant-gain feedback controller ?u(t) = K ? ?x(t). (5.4) From (5.1)-(5.4), we see that the closed-loop dynamics of the NCS are ?x(t) = (A+BM?(t)KM?(t))x(t). (5.5) The remainder of this chapter will address the following problem: Problem 5.1. Find a feedback gain K and a dynamic medium access scheduling policy [?(t), ?(t)] = [?(x(t)), ?(x(t))], (5.6) such that the closed-loop system (5.5) is asymptotically stable. 5.2 An Equivalent Switched System Under constant feedback, the closed loop NCS (5.5) is essentially a switched system [70, 71, 63], as we will illustrate shortly. Recall [63], that a switched system can be 70 described by a differential equation of the form: ?x(t) = fs(t)(x), (5.7) where {fp : p ?P} is a family of sufficiently regular functions from Rn to Rn that is parametrized by some index set P, and s : R mapsto?P is a piecewise constant function of time, called the switching signal. In the special case where all the fp(?)?s are linear, we obtain a switched linear system: ?x = As(t)x. (5.8) First, consider the general case where the communication medium provides w? (1 < w? < m) input channels and w? (1 < w? < n) output channels. Now ?(t) and ?(t) arem-to-w? andn-to-w? communication sequences, respectively. Forsimplicity, it will be helpful to introduce one additional piece of notation. Let ?(t) be a p-to-w (1 < w < p) communication sequence. Then, ?(t) is an p- dimensional vector that takes parenleftbigpwparenrightbig possible different values. Denote one permutation of the parenleftbigpwparenrightbig different values by braceleftBig ?1, ?2, ??? , ?(pw) bracerightBig . Definition 5.1. The ?scalar form? of the p-to-w communication sequence ?(t) is the map ??(t) : R mapsto? braceleftbigg 1,2??? , parenleftbiggp w parenrightbiggbracerightbigg , such that ?(t) = ???(t),?t. In other words, ??(t) equals i if ?(t) = ?i. Now let the scalar forms of the communication sequences ?(t) and ?(t) be ??(t) 71 and ??(t), respectively, and define the switching signal s(t) as: s(t) = [??(t),??(t)]. Then the closed-loop dynamics of the NCS (5.5) can be described by the following switched system ?x = As(t)x, (5.9) where the switching signal s(t) = [??(t),??(t)] is defined as: s(t) : R mapsto? braceleftbigg 1,2,??? parenleftbiggm w? parenrightbiggbracerightbigg ? braceleftbigg 1,2,??? parenleftbigg n w? parenrightbiggbracerightbigg . Governed by the signal s(t), the system (5.9) switches between parenleftbigmw?parenrightbig?parenleftbig nw?parenrightbigpossible dynamics: As(t) ? braceleftbigg Aij : i = 1,??? , parenleftbiggm w? parenrightbigg ; j = 1,??? , parenleftbigg n w? parenrightbiggbracerightbigg , with Aij = A+BKij, (5.10) where Kij = diag(?i)?K ?diag(?j). In the special case where the communication medium only provides one input channel and one output channel (i.e., w? = w? = 1), the scalar form communication sequences can be defined such that [??,??] = [i,j] corresponds to ? = eim and ? = ejn, where eim and ein denote the i-th standard basis vector in Rm and Rn, respectively. Doing so, Aij denotes the linear system dynamics when actuator i and sensor j are 72 accessing the communication medium. From (5.5), it clear that Aij = A+BKij, (5.11) where Kij = diag(eim)?K ?diag(ejn). Without loss of generality, we will assume w? = w? = 1 in the rest of this chapter. All of the analysis and results that follow apply to the multiple channel case with a few straightforward modifications. 5.3 Stable Convex Combinations Definition 5.2. [72] The switched system (5.9) is said to be quadratically stable if there exists a positive definite quadratic function V(x(t)) = xT(t)Px(t), a posi- tive number ? and a switching rule s(t) such that ddtV(x(t)) < ??xT(t)x(t) for all trajectories x(?) of the system (5.9). Fact 5.1. [70] The switched system (5.9) can be quadratically stabilized under a feedback-based switching rule s(t) if there exist positive real numbers ?ij, i = 1,??? ,m, j = 1,??? ,n, satisfying msummationdisplay i=1 nsummationdisplay j=1 ?ij = 1, (5.12) such that the convex combination of Aij?s, Adefines msummationdisplay i=1 nsummationdisplay j=1 ?ijAij, (5.13) is stable. Proof. We give here a sketch of the proof, as it will be useful in proving subsequence results. For additional details, see [70]. 73 If A is stable, then there exist positive definite matrices P,Q such that ATP +PA = ?Q. (5.14) Hence, for all x(t) negationslash= 0, xT(t)(ATP +PA)x(t) = ?xT(t)Qx(t) < 0. The last equation can be rewritten as summationdisplay i,j ?ijxT(t)(ATijP +PAij)x(t) = ?xT(t)Qx(t) < 0, for all x(t) negationslash= 0. Because ?ij > 0, it follows that, for all x(t) negationslash= 0, there always exist indices i(x) ?{1,???m}, and j(x) ?{1,???n} such that xT(t)(ATi(x)j(x)P +PAi(x)j(x))x(t) < 0. Notice that the Lyapunov function V = xT(t)Px(t) is continuous and piecewise differentiable along trajectories of (5.9). Then between any two consecutive switches d dtV = x T(t)(AT s(t)P +PAs(t))x(t). (5.15) Hence if the switched system is switched according to s(t) = [i(x(t)),j(x(t))], the Lyapunov function V(x(t)) = xT(t)Px(t) will always be decreasing. From Fact 5.1, the stabilizability of the switched system (5.9) relies on the exis- tence of a stable convex combination (5.13). However, if the Aij?s are given and the number of possible dynamics (in our case, m?n) is greater than two, the question 74 of whether such a stable convex combination exists is NP-hard [72]. Fortunately, in an NCS, we also have the freedom to choose the controller in addition to the communication policy, in order to obtain a stable convex combination (5.13). From (5.11), we see that the A matrix in (5.13) can be expressed as Adefines summationdisplay i,j ?ijAij = A+BK, (5.16) where K = ? ?? ?? ?? ?? ?11k11 ?12k12 ??? ?1nk1n ?21k21 ?22k22 ??? ?2nk2n ??? ??? ?m1km1 ?m2km2 ??? ?mnkmn ? ?? ?? ?? ?? , (5.17) and kij is the (i,j) entry of the feedback gain K. Now a feedback gain K that guarantees a stable convex combination (5.13) can be found by the following Algorithm: 1. Choose m?n positive real numbers ?ij?s such that (5.12) is satisfied. 2. Choose a set of desired (stable) eigenvalues for A. 3. Solve the pole-placement problem forK, such thatA = A+BK has the desired eigenvalues, provided that (A,B) is controllable. 4. Solve for K = [kij]m?n from (5.17). Notice that for the same choice of A, different choices of ?ij?s results in different values of the feedback gain K. A larger ?ij leads to a smaller kij. This fact gives us additional freedom in the design of K. By properly choosing the ?ij?s we can 75 make the controller K meet certain optimization or design criteria, for example, maxi,j |kij| < km, where km is the highest gain a controller may provide. 5.4 Dynamic Medium Access Scheduling Policies Assume now that the feedback gain K is designed such that the convex combination A (5.16) is stable. In this section, we introduce a set of dynamic medium access scheduling policies (equivalently, feedback-based switching signals for (5.9)) that quadratically stabilizes the closed-loop NCS (5.5). Definition 5.3. Weighted Fastest Decay* (WFD*) rule: For all t, let the switching signal s(t) be determined by s(t) = argmin i,j ?ijxT(t)[ATijP +PAij]x(t), (5.18) where Aij is defined in (5.11), and P satisfies the Lyapunov equation (5.14). Theorem 5.1. If A is stable, the system (5.9) is quadratically stable under the switching rule WFD*. Proof. Because A is stable, there exist positive definite matrices P, Q such that (5.14) holds. Then, msummationdisplay i=1 nsummationdisplay j=1 ?ijxT(t)[ATijP +PAij]x(t) = ?xT(t)Qx(t). (5.19) Equations (5.21) and (5.19) imply that, for all t, ?s(t)xT(t)[ATs(t)P +PAs(t)]x(t) ??x T(t)Qx(t) m?n . 76 Hence, ?V(x(t)) = xT(t)(ATs(t)P +PAs(t))x(t) ??x T(t)Qx(t) m?n??s(t) ??? ?xT(t)x(t), where ?? defines ?min(Q)m?n?? max , (5.20) and ?min(Q) denotes the smallest eigenvalue of Q, and ?max defines maxi,j ?ij. From (5.18), we see that each ?ij acts as a weight associated with the dynamics Aij. A greater ?ij will result in a greater chance that (5.9) is switched to Aij, all else being equal. Note that Aij corresponds to the NCS dynamics when ui and xj are accessing the communication medium. Hence, the choice of ?ij?s, is akin to assign ?priorities? to every input and output of the NCS. Furthermore, from the gain design algorithm introduced in Section 5.3, we notice that the choice of ?ij?s also affects the value of the feedback gain, K: a greater ?ij will result in a smaller gain kij. In order to decouple the controller design and medium access weighting, we can modify the WFD* rule by replacing ?ij in (5.21) with a different set of weights, wij, (i = 1???m, j = 1???n), this leads to the ?WFD? switching rule. Definition 5.4. Weighted Fastest Decay (WFD) rule: For all t, let the switching signal s(t) be determined by s(t) = argmin i,j wijxT(t)[ATijP +PAij]x(t), (5.21) where Aij is defined in (5.11), P satisfies the Lyapunov equation (5.14), and wij > 0, (i = 1???m, j = 1???n) are real numbers defining the relative weight assigned to 77 the Aij dynamics. Theorem 5.2. If A is stable, the system (5.9) is quadratically stable under the switching rule WFD. Proof. Suppose that the switching signal s(t) of the switched system (5.9) is gov- erned by the WFD rule (5.21). Let the switching signal s?(t) be determined by the WFD* rule (5.18). Then, by the definition of the WFD rule, we have, for all t, ws(t)xT(t)[ATs(t)P +PAs(t)]x(t) ? ws?(t)xT(t)[ATs?(t)P +PAs?(t)]x(t). From the proofs of Theorem 5.1, we know that xT(t)[ATs?(t)P +PAs?(t)]x(t) ????xT(t)x(t). Hence, we have ws(t)xT(t)[ATs(t)P +PAs(t)]x(t) ??ws?(t)??xT(t)x(t), and xT(t)[ATs(t)P +PAs(t)]x(t) ??ws?(t)w s(t) ??xT(t)x(t) ??wminw max ??xT(t)x(t), where wmin = mini,j wij, and wmax = maxi,j wij. As suggested in[70], the following switching ruleensures maximum instantaneous decay of the Lyapunov function V: Definition 5.5. Fastest Decay (FD) rule: 78 For all t, let the switching signal s(t) be determined by s(t) = argmin i,j xT(t)[ATijP +PAij]x(t), (5.22) where Aij is defined in (5.11), and P satisfies the Lyapunov equation (5.14). Theorem 5.3. If A is stable, the system (5.9) is quadratically stable under the switching rule FD. Proof. Under the FD rule, at any time t, system (5.9) is switched to the set of dynamics that gives the fastest decay of V(x(t)). The instantaneous value of ?V (see (5.15)) is, by definition, less than or equal to that when (5.9) is under any other switching rules, including WFD*. Hence, for all t, ?V(x(t)) ? ???xT(t)x(t), where ?? is defined in (5.20). Although Theorems 5.3 and 5.2 provide switching rules (equivalently feedback- based medium access scheduling policies) that guarantee quadratic stability, the medium access switching rate under the FD or WFD rule is not bounded. Under these policies, it is theoretically possible that the medium access is switched for infinitely many times in a finite time interval (?chattering?). High-speed switching is often impractical and may result in undesirable high frequency actuator inputs. One way to bound the switching rate is to introduce a minimum dwell time [63], ? > 0, restricting the time interval between any two consecutive switches to be no smaller than ?. The GD switching rule we will introduce in the next guarantees a dwell time between switchings. The idea is to let the system evolve with one set of dynamics until the decay rate of the Lyapunov function V is less than a certain threshold. Definition 5.6. Guaranteed Dwell-time (GD) rule: 79 Let ?0 be a number satisfying 0 < ?0 < ??, where ?? is defined in (5.20); 1. Denote the current switch time by t0, choose s(t0) according to (5.22); 2. Let s(t) = s(t0) for all t ? [t0,t1), where t1 is the next switch time determined by t1 = inft>t 0 xT(t)(ATs(t0)P +PAs(t0))x(t) ???0xT(t)x(t); (5.23) 3. Repeat from step 1 for t1. Theorem 5.4. If A is stable, the system (5.9) is quadratically stable under the switching rule GD. Moreover, there exists ? > 0, such that the time between any consecutive switches is no less than ?. Proof. The quadratic stability of (5.13) is immediate because, according to the GD rule, ?V < ??0xT(t)x(t) for all t. We only need to prove boundedness of the dwell time. Let t0 and t1 (t0 < t1) be any two consecutive switching times. For t ? [t0,t1), define ?(t) = ?x T(t)(AT s(t0)P +PAs(t0))x(t) xT(t)x(t) , where ?(?) is continuous and differentiable in [t0,t1). LetATs(t0)P+PAs(t0) = ?Qs(t0), then for all t ? [t0,t1) ??(t) = xTRs(t0)x?xTx?xTQs(t0)x?xTSs(t0)x (xTx)2 , (5.24) 80 where Rs(t0) definesATs(t0)Qs(t0) +Qs(t0)As(t0) and Ss(t0) definesATs(t0) +As(t0). Now let ?Q = max i,j r(Qij), ?R = max i,j r(ATijQij +QijAij), and ?S = max i,j r(ATij +Aij), where Qij defines ?(ATijP + PAij), and r(B) denotes the spectral radius of the square matrix B: r(B) defines max i (|?i(B)|). From (5.24), it is easy to verify that for all t ? [t0,t1), |??(t)|? ?R +?Q ??S. Hence, |?(t?1 )??(t0)|? (?R +?Q ??S)(t1 ?t0), where t?1 denotes the instant immediately before the switch taking place at t1. Notice that ?(t0) ? ?? because, at the beginning of each switch, s(t) is determined by (5.22). Also ?(t?1 ) = ?0 according to the GD policy. Hence |?(t?1 )??(t0)|? ?? ??0, and t1 ?t0 ? ? ? ??0 ?R +?Q ??S. (5.25) 81 5.5 An Example We now present an example in which we stabilize an MIMO plant using the dynamic medium access scheduling policies and the controller design algorithm introduced in the previous sections. Consider the NCS in which the plant is the 2-input 4-th order unstable batch reactor[69]: ?x = ? ?? ?? ?? ?? 1.38 ?0.2077 6.715 ?5.676 ?0.5814 ?4.29 0 0.675 1.067 4.273 ?6.654 5.893 0.048 4.273 1.343 ?2.104 ? ?? ?? ?? ?? x+ ? ?? ?? ?? ?? 0 0 5.67 0 1.136 ?3.146 1.136 0 ? ?? ?? ?? ?? u. Suppose that state feedback is available, and that the plant is controlled by a con- stant feedback gain K via a shared communication medium which has only one input and one output channel. The closed-loop NCS is equivalent to a switched system that transitions between eight possible linear dynamics ?x = Aijx, (i = 1,2, j = 1,2,3,4). We chose the weights ?ij to be [?ij] = ? ?? 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8 ? ??, (5.26) and placed the eigenvalues of the convex combination A (see (5.13)) at [?5,?6,?4 ,?3]. Solving the pole-placement problem (5.16) for K, and then solving for K from (5.17), we obtained the feedback gain 82 K = ? ?? 0.7285 ?4.2600 ?1.1423 ?2.9334 15.3458 2.8926 6.9400 ?1.7744 ? ??. We then chose Q = I, and solved for P in the Lyapunov equation (5.14). The resulting P matrix was P = ? ?? ?? ?? ?? 0.4665 ?0.0871 0.2263 ?0.3208 ?0.0871 0.1378 ?0.0348 0.1576 0.2263 ?0.0348 0.1967 ?0.1438 ?0.3208 0.1576 ?0.1438 0.4805 ? ?? ?? ?? ?? . Using the calculated feedback gain K and the matrix P, we first used the FD rule as the medium access scheduling policy. Fig. 5.2 illustrates the evolution of the plant?s state x(t) and the communication sequences under the FD scheduling rule. With the same K and P, we next used the GD rule as the medium access scheduling policy. From (5.20), we calculated ?? = 1. We then chose ?0 = 0.1 in the GD rule. Fig. 5.3 illustrates the plant?s state evolution and the resulting communication sequences under the GD rule. Compared with the results in Fig. 5.2, we see that the GD rule significantly reduced the switch rates in the communication sequences ??(t) and ??(t). Not surprisingly, as a trade-off, the converging rate is slower with the GD rule than with the FD rule. Finally, we used the WFD rule to schedule medium access in the NCS, and demonstrated how the wij?s act as medium access priorities. Initially, we chose [wij] = W1 = ? ?? 1/6 1/6 1/6 1/6 1/12 1/12 1/12 1/12 ? ??. 83 0 0.2 0.4 0.6 0.8 1?10 ?5 0 5 10 15 Time (s) X(t) x1(t) x2(t) x3(t) x4(t) (a) States evolution. 0 0.2 0.4 0.6 0.8 1 1 2 Time (s) ??(t) 0 0.2 0.4 0.6 0.8 1 1 2 3 4 Time (s) ??(t) (b) Evolution of communication sequences ??(t) and ??(t). Figure 5.2: Simulation results: Stabilization of an NCS using the FD rule. The plant was an LTI system with 2 inputs and 4 outputs. The communication medium provided one input channel and one output channel. 84 0 0.2 0.4 0.6 0.8 1?10 ?5 0 5 10 15 Time (s) X(t) x1(t) x2(t) x3(t) x4(t) (a) States evolution. 0 0.2 0.4 0.6 0.8 1 1 2 Time (s) ??(t) 0 0.2 0.4 0.6 0.8 1 1 2 3 4 Time (s) ??(t) (b) Evolution of communication sequences ??(t) and ??(t). Figure 5.3: Simulation results: Stabilization of an NCS using the GD rule (?0 = 0.1, ?? = 1). The plant was an LTI system with 2 inputs and 4 outputs. The communication medium provided one input channel and one output channel. 85 Notice that the first row in [wij] corresponds to the priority of u1, while the second row corresponds to the priority of u2. Thus, by using W1, we assigned to the input u1 a higher access priority than u2. Fig. 5.4 illustrates the the plant?s state evolution and associated communication sequences using the WFD rule with [wij] = W1. The resulting communication sequence in Fig. 5.4 shows that 90.5% of medium access time to the input channel was assigned to u1 under this choice of [wij]. Exchanging the rows of W1, we formed the weight matrix [wij] = W2 = ? ?? 1/12 1/12 1/12 1/12 1/6 1/6 1/6 1/6 ? ??, which give u2 higher priority to access the input communication medium. Fig. 5.5 illustrates the state evolution and associated communication sequences when using the WFD rule with [wij] = W2. This time, 96.5% of the medium access time to the input channel was allocated to u2. 86 0 0.2 0.4 0.6 0.8 1?10 ?5 0 5 10 15 Time (s) X(t) x1(t) x2(t) x3(t) x4(t) (a) States evolution. 0 0.2 0.4 0.6 0.8 1 1 2 Time (s) ??(t) 0 0.2 0.4 0.6 0.8 1 1 2 3 4 Time (s) ??(t) (b) Evolution of communication sequences ??(t) and ??(t). Figure 5.4: Simulation results: Stabilization of an NCS using the WFD rule. The plant was an LTI system with 2 inputs and 4 outputs. The communication medium provided one input channel and one output channel. The input u1 was given higher access priority. 87 0 0.2 0.4 0.6 0.8 1?10 ?5 0 5 10 15 Time (s) X(t) x1(t) x2(t) x3(t) x4(t) (a) States evolution. 0 0.2 0.4 0.6 0.8 1 1 2 Time (s) ??(t) 0 0.2 0.4 0.6 0.8 1 1 2 3 4 Time (s) ??(t) (b) Evolution of communication sequences ??(t) and ??(t). Figure 5.5: Simulation results: Stabilization of an NCS using the WFD rule. The plant was an LTI system with two inputs and two outputs. The communication medium provided one input channel and one output channel. The input u2 was given higher access priority. 88 Chapter 6 LQG Control in NCSs In this chapter, we study state estimation and optimal control of NCSs under the classical LQG (linear quadratic Gaussian) framework. Using existing results on periodic Riccati equations, together with properly chosen periodic communication sequences, we show that the estimation error covariance and the Kalman gain as- sociated with the LQG problem both converge to unique periodic solutions. Fur- thermore, the resulting LQG controller renders both the estimation error dynamics and the closed-loop NCS dynamics asymptotically stable. The LQG design method presented in this chapter avoids the complexity associated with previously proposed models and addresses MIMO NCSs whose dynamics are ?fully coupled?. 6.1 An Equivalent NCS Model In the NCS model presented in Chapter 3, unavailable inputs and outputs are set to zero and are thus effectively ignored by the plant and the controller. In this chapter, we introduce a new NCS model where unavailable outputs and inputs are simply removed from the output and input vectors of the extended plant. This new model 89 will turn out to be equivalent to the one discussed in Chapter 3. This modified model will simplify the solution of the LQG problem, as we will illustrate in Section 6.4.3. A similar technique is mentioned in [73] for multi-rate systems. We begin with a deterministic NCS setting, which will be generalized to the stochastic setting in Section 6.4, whereupon the LQG optimal estimation and control problem will be formulated. Consider the NCS in which the plant is the discrete-time LTI system: x(k + 1) = Ax(k) +Bu(k), (6.1) y(k) = Cx(k), where x = [x1,??? ,xn]T ? Rn, u = [u1,??? ,um]T ? Rm, and y = [y1,??? ,yp]T ? Rp are the plant?s states, inputs, and outputs, respectively. Suppose that the communi- cation medium connecting the plant and the can only accommodate w? (1 ? w? < p) output channels and w? (1 ? w? < m) output channels. Also suppose that the medium access of the actuators and sensors is governed by the m-to-w? input com- munication sequence (see Definition 3.3) ?(k) and p-to-w? output communication sequence ?(k), respectively. 6.1.1 Effects of Medium Access Constraints At the output side of the plant, only w? of the p outputs, y1,y2??? ,yp are granted medium access at any time k, and all other outputs are effectively ignored by the controller. Let the output information received by the controller at time k be de- noted by ?y(k) = [?y1(k), ?y2(k),??? , ?yw?(k)]T. 90 For all k, ?y(k) contains those elements from y(k) for which ?i(k) = 1. To establish the relationship between y(k) and ?y(k), we will make use of the following definition: Definition 6.1. Let ?(k) be an M-to-N communication sequence. Then, for all k ? N, the N ?M matrix ??(k) is obtained by removing the M ?N all-zero rows from the M ?M matrix diag(?(k)). Example 6.1. Let ?(1) = [1,1,0,1]T, then ??(1) = ? ?? ?? ? 1 0 0 0 0 1 0 0 0 0 0 1 ? ?? ?? ? . Using the last definition, we can express ?y(k) as ?y(k) = ??(k)y(k), (6.2) where ?(k) is the output communication sequence. Similarly, at the input side of the plant, only w? of the m inputs, u1,??? ,um, can be updated by the controller at any time k. When an input uj loses its access to the communication medium, the plant ignores that input until the corresponding actuator regains medium access. This is equivalent to setting uj = 0 while ?j = 0. Let ?u(k) = [?u1(k), ?u2(k)??? ,?uw?(k)]T denote the w? update input values to be sent to the plant from the controller at time k. Under the protocol outlined above, u(k) can be expressed as u(k) = ??(k)T ?u(k). (6.3) 91 6.1.2 The Extended Plant Combining (6.1),(6.2), and (6.3), we obtain a new expression of the extended plant: x(k + 1) = Ax(k) +B??(k)T ?u(k), (6.4) ?y(k) = ??(k)Cx(k). Notice that (6.4) is a time-varying system with w? inputs and w? outputs, and it describes the dynamics of the plant from the controller?s point of view. A block diagram of the extended plant is shown in Figure 6.1. This new extended plant formula shouldbe comparedwith theformula (3.7)presented inChapter 3: Equation (6.4) is obtained by removing from ?u and ?y (in (3.7)) the input and output elements that are ignored by the plant and the controller due to their being unavailable. These two extended formulas are essentially equivalent. Extended Plant Plant Controller ??(k)?T? (k) u(k) y(k) ?y(k)?u(k) Figure 6.1: The extended plant under the new NCS formulation. 92 6.2 LQG Problem Formulation We now go on to formulate the main problem we will investigate in this Chapter. Consider the NCS in which the plant is the discrete-time stochastic LTI system: x(k + 1) = Ax(k) +Bu(k) +v(k) (6.5) y(k) = Cx(k) +w(k), k = 0,1,???N ?1, where x ? Rn, u ? Rm, y ? Rp, N ? Z+, and the process noise v(?) and the measurement noise w(?) are each Gaussian i.i.d.. Without loss of generality, we assume that x(0),v(0),???v(N ? 1),w(0),???w(N ? 1) are independent random variables with v(?) ?N(0,G), w(?) ?N(0,Ip?p), where Ip?p is the p ?p identity matrix and G is a positive definite n ?n matrix. We will also assume that the plant?s initial condition x(0) is Gaussian with x(0) ?N(x0,?0). As before, suppose that the communication medium connecting the plant and the controller provides w? (1 ? w? < m) input channels, and w? (1 ? w? < p) output channels. Using the model presented in the previous section with the pair of communication sequences ?(?) and ?(?), we obtain the dynamics of the extended plant: 93 x(k + 1) = Ax(k) +B?T? (k)?u(k) +v(k), (6.6) ?y(k) = ??(k)Cx(k) +??(k)w(k). or, equivalently x(k + 1) = Ax(k) + ?B(k)?u(k) +v(k), (6.7) ?y(k) = ?Cx(k) + ?w(k). where ?B(k) = B?T? (k), ?C = ??(k)C, and ?w(k) = ??(k)w(k). The remainder of this chapter will give solutions to the following problem: Problem 6.1. Design an optimal controller for the extended plant (6.7), such that the quadratic cost function J = E bracketleftBigg xT(N)Qx(N) + N?1summationdisplay k=0 xT(k)Qx(k) + ?uT(k)?u(k) bracketrightBigg (6.8) is minimized. Note that, if ?(?) is determined off-line, ?w(0),??? ?w(N?1),x(0),v(0),???v(N?1) are independent random variables because ?w(k) is a sub-vector of w(k) for all k. Moreover, because of the linearity of ??(k), ?w(k) is also Gaussian with ?w(k) ?N(0,Iw??w?), ?k. Thus Problem 6.1 is essentially a standard LQG problem for the stochastic discrete- time extended plant (6.7). 94 6.3 Communication Sequences that Preserve Stabilizability and Detectability Under periodic communication sequences, ?B(k) and ?C(k) are both periodic as well. The extended plant (6.7) is thus a stochastic periodic linear time-varying (LTV) system. We know [74] that, the stability of such a system under an LQG controller depends on the stabilizability and detectability of its deterministic counterpart, which, in our case, is the extended plant (6.4). Before going further, we review the following relevant concepts for discrete-time LTV systems. Definition 6.2. The system (6.4) is controllable on [k0,kf] if, given any x0, there exists an input ?u(?) that steers (6.4) from x(k0) = x0 to the origin at time kf. We say that (6.4) is l-step controllable (or ?controllable?) if, for any k, there exists a positive integer l such that (6.4) is controllable on [k,k +l]. In discrete-time systems, the dual concept of controllability is reconstructibility. Definition 6.3. The system (6.4) is reconstructible on [k0,kf] if x(kf) can be determined by the corresponding response ?y(k) for k ? [k0,kf]. We say that (6.4) is l-step reconstructible (or ?reconstructible?) if, for any k, there exists a positive integer l such that (6.4) is reconstructible on [k,k +l]. Recall that, controllability and reconstructibility are weaker notions than reach- ability and observability. A linear system is controllable if it is reachable, and is reconstructible if it is observable (see, for example, [64]). In the case where A is invertible, the controllability and reachability of the extended plant (6.4) are equiv- alent, as are observability and reconstructibility. Another pair of dual concepts are stablizability and detectablility. 95 Definition 6.4. A discrete-time linear system is called stabilizable if its uncontrol- lable subspace is asymptotically stable. Definition 6.5. A discrete-time linear system is called detectable if its unrecon- structible subspace is asymptotically stable. 6.3.1 Controllability and Reconstructibility We have shown in Chapter 4 (for an equivalent extended plant expression (4.22)) that, if A is invertible, there always exist periodic communication sequences ?(?) and ?(?) that preserve the reachability and observability of the plant. We will show that these results still hold for the controllability and reconstructibility of our modified NCS model. Moreover, the requirement for A being invertible can be removed. Case 1: ?A? Invertible Let us begin with the case where the matrix A in (6.4) is invertible. Now, con- trollability and reachability are equivalent notions, so are observability and recon- structibility. Let R(0,kf) = [Akf?1B?T? (0),Akf?2B?T? (1),??? ,B?T? (kf ?1)]. (6.9) The system (6.4) is controllable on [0,kf] iff rank(R(0,kf)) = n. Notice that, at each step k, ?T? (k) has the effect of ?selecting? w? columns from the m columns of the term Akf?k?1B on the RHS of (6.9). We are now encountering the same situation in the proof of Theorem 4.3, where we analyzed the reachability of an equivalent extended plant expression (4.22). We can follow the same arguments given in Theorem 4.3 and Corollary 4.3 to arrive at the following: 96 Corollary 6.1. Let A be invertible and the pair (A,B) be controllable. For any integer 1 ? w? < m, there exist integers l,N > 0 and an N-periodic m-to-w? communication sequence ?(?) such that the extended plant (6.4) is l-step controllable. By switching from column manipulations to row manipulations, we obtain the dual result for reconstructibility. Corollary 6.2. Let A be invertible and the pair (A,C) be reconstructible. For any integer 1 ? w? < p, there exist integers l,N > 0 and an N-periodic p-to-w? communication sequence ?(?) such that the system (6.4) is l-step reconstructible. Case 2: ?A? Non-invertible Suppose A contains q (1 ? q < n) zero eigen-values. Then, there exists an invertible matrix L such that L?1AL = ? ?? A1 0 0 A0 ? ??, L?1B = ? ?? B1 B0 ? ??, where A1 is an (n?q)?(n?q) invertible matrix, A0 is a q?q square matrix with only zero eigenvalues, B1 is a (n?q)?m matrix, and B0 is a q?m matrix. Define a new state variable x? = L?1x = ? ?? x1 x0 ? ??, where x1 denotes the (n ? q)-dimensional subspace corresponding to A1, and x0 is the q-dimensional subspace corresponding to A0. Then, under the similarity 97 transformation L, the dynamics of the extended plant (6.4) can be rewritten as ? ?? x1(k + 1) x0(k + 1) ? ?? = ? ?? A1 0 0 A0 ? ?? ? ?? x1(k) x0(k) ? ??+ ? ?? ?B1(k) ?B0(k) ? ?? ?u(k), (6.10) where ?B0 defines B0?T? (k) and ?B1 defines B1?T? (k). In (6.10), the extended plant (6.4) has been decomposed into two uncoupled sub-plants: the (n?p)-dimensional sub-plant with dynamics (A1, ?B1(?)) and state variable x1, and the p-dimensional sub-plant with dynamics (A0, ?B0(?)) and state variable x0. The following is a well-know fact from linear system theory: Fact 6.1. The controllability (or reachability, stabilizability) and reconstructibility (or observability, detectability) of a linear (time-varying) system do not change un- der similarity transformations (i.e., replacing the state variable x with x? = L?1x, where L is an invertible matrix). It should therefore be clear that, in order to study the controllability and recon- structibility of the extended plant (6.4), one only needs to study the controllability and reconstructibility of (6.10). Suppose therefore, that the pair (A,B) is control- lable; then, (A1,B1) must be controllable as well. Moreover, because A1 is invertible, the results we derived for the A-invertible case imply that there exists an integer k1 > 0 and a communication sequence ?(k), for k = [0,k1], such that the pair (A1, ?B1(?)) is controllable in [0,k1]. Hence, for any initial condition, there exist a control sequence ?u(k), for k = [0,k1], that drives the state x1(k) to zero at k = k1. We use that particular communication sequence ?(k) and control sequence ?u(k), for the time interval [0,k1]; after k1, we set ?u(k) to zero and let the communication sequence ?(?) be arbitrary. Then, there must exist kf > k1, such that x0(kf) = 0 because A0 has all zero eigen-values. Also, notice that x1(kf) = 0 as well because 98 no control will be fed into the plant during [k1 + 1,kf]. We have thus constructed a control sequence ?u(k) and a communication sequence ?(k) for the time interval [0,kf], such that the new state variable x? is driven to zero at time kf regardless of initial conditions. This is equivalent to stating that (6.10) is controllable in [0,kf] under the communication sequence ?(k). The above discussion, combined with an argument similar to that in Corollary 4.3, yields the following results, which do not require the invertibility of A. Theorem 6.1. Let the pair (A,B) be controllable. For any integer 1 ? w? < m, there exist integers l,N > 0 and an N-periodic m-to-w? communication sequence ?(?) such that the extended plant (6.4)is l-step controllable. Then the duality of controllability and reconstructibility gives the following Theorem 6.2. Let the pair (A,C) be reconstructible. For any integer 1 ? w? < p, there exist integers l,N > 0 and an N-periodic p-to-w? communication sequence ?(?) such that the system (6.4) is l-step reconstructible. 6.3.2 Stabilizability and Detectability We now generalize the results developed in the previous section, to cover the notion of stabilizability and detectability. Suppose that the pair (A,B) is stabilizable; then, there exist an invertible matrix ?, which transforms the pair (A,B) into its Kalman controllability canonical form: ??1A? = ? ?? Ac A?c 0 A?c ? ??, ??1B = ? ?? Bc 0 ? ??, 99 where (Ac,Bc) and (A?c,0) corresponds to the controllable and uncontrollable sub- spaces of the pair (A,B), respectively. We define the new state variable x?? = ??1x = ? ?? xc x?c ? ??, so that the dynamics of the extended plant (6.4) can be rewritten as ? ?? xc(k + 1) x?c(k + 1) ? ?? = ? ?? Ac A?c 0 A?c ? ?? ? ?? xc(k) x?c(k) ? ??+ ? ?? ?Bc(k) 0 ? ??u(k), (6.11) where ?Bc(k) defines Bc?T? (k). Because (Ac,Bc) is controllable, we know from Theo- rem 6.1 that there exists a periodic communication sequence ?(?) such that the pair (Ac, ?Bc(?)) is also controllable. Moreover, the uncontrollable subsystem A?c is stable because we have assumed the pair (A,B) to be stabilizable. We can thus obtain the following: Theorem 6.3. Suppose the pair (A,B) is stabilizable. For any integer 1 ? w? < m, there exist an integer N > 0 and an N-periodic m-to-w? communication sequence ?(?) such that the pair (A, ?B(?)) is stabilizable. A dual theorem for detectability is the following: Theorem 6.4. Suppose the pair (A,C) is detectable. For any integer 1 ? w? < p, there exist an integer N > 0 and an N-periodic p-to-w? communication sequence ?(?) such that the pair (A, ?C(?)) is detectable. 100 6.4 The LQG Controller With the above results in hand, we can now give a complete solution to Problem 6.1. Note that the extended plant (6.5) is an LTV system. It is well known that (e.g., [75]) the LQG optimal controller for an LTV system, such as the extended plant (6.7), consists of two parts (Fig. 6.2): 1. A Kalman filter that provides the optimal state estimate ?x(k) based on the outputs ?y(?). 2. The LQ gain L(k), obtained by solving an LQR (linear quadratic regulator) problem for the the extended plant (6.7)?s deterministic counterpart, (6.4). Kalman Filter Plant ?u(k) ?L(k) ??(k)??(k) u(k) y(k) ?x(k) ?y(k) Figure 6.2: An NCS stabilized by the LQG controller. The separation principle ensures that the two sub-problems can be solved inde- pendently. The resulting optimal control law ?u? is: ?u?(k) = ?L(k)?x(k). 6.4.1 Kalman Filtering The optimal estimator for the extended plant (6.7) is the discrete-time Kalman filter, which can be described with the following recursive algorithm, starting with 101 initial conditions ?x(0) = ?x0, ?(0) = ?0. 1. Time update ?x(k?) = A?x(k?1) + ?B(k?1)?u(k?1), (6.12) P(k) = A?(k ?1)AT +G, (6.13) where ?x(k?) is the prediction of the state variable x(k) before the measure- ment of ?y(k), and P(k) is the variance of the prediction error: ?x(k?) defines E[x(k)|?y(0)????y(k?1)], P(k) defines E[(x(k)? ?x(k?))(x(k)? ?x(k?))T]. 2. Measurement update H(k) = P(k)?CT(k)( ?C(k)P(k)?CT(k) +I)?1, (6.14) ?x(k) = ?x(k?) +H(k)(?y(k)? ?C(k)?x(k?)), (6.15) ?(k) = (I ?H(k) ?C(k))P(k), (6.16) where ?x(k)is the estimation of state variable x(k) conditioned on the mea- surements ?y(0)????y(k), ?(k) is the covariance of the estimation error: ?x(k) defines E[x(k)|?y(0)????y(k)], ?(k) defines E[(x(k)? ?x(k))(x(k)? ?x(k))T]. 102 From (6.13), (6.16), and (6.14), it is easy to verify that the sequence P(?) satisfies the time varying discrete time Riccati equation P(k + 1) =AP(k)AT +G? AP(k) ?CT(k)[I + ?C(k)P(k)?CT(k)]?1 ?C(k)P(k)AT. (6.17) Let e(k) denote the ?one-step prediction? error, e(k) = x(k)? ?x(k?). We have e(k + 1) = (A??(k) ?C(k))e(k) +v(k)??(k)w(k), and E[e(k + 1)] = (A??(k) ?C(k))E[e(k)], (6.18) where ?(k) = AH(k) is termed the ?Kalman gain?. The error equation (6.18) is stable if A??(k) ?C(k) is stable. 6.4.2 LQ Regulator The LQ optimal gain L(k) is obtained by solving an LQR problem for the extended plant (6.7)?s deterministic counterpart, (6.4). The gain matrix L(k) satisfies the equation: L(k) = ( ?BTK(k + 1) ?B(k) +I)?1 ?B(k)TK(k + 1)A, (6.19) and the symmetric positive semidefinite matrix K(?) satisfies the backwards Riccati equation 103 K(N) =Q, (6.20) K(k) =ATK(k + 1)A+Q? ATK(k + 1) ?B(k)( ?BT(k)K(k + 1) ?B(k) +I)?1 ?BT(k)K(k + 1)A. (6.21) With state feedback, the closed loop dynamics of the system (6.4) under the LQR optimal gain L(k) are: x(k + 1) = (A? ?B(k)L(k))x(k). (6.22) The closed loop system is stable if (A? ?B(k)L(k)) is stable. 6.4.3 Periodic Riccati Equations Because of the periodicity imposed by the communication sequences ?(?) and ?(?), ?B(?), ?C(?) are periodic as well; hence, the Riccati equations, (6.17) and (6.21), both become Discrete-time Periodic Riccati Equations (DPREs). DPREs have been extensively studied in the 80s and early 90s (see [74, 73, 76] and the references therein). We go on to review some fundamental results from [74]. Definition 6.6. [74] A Discrete-time Periodic Riccati Equation (DPRE) is a dif- ference equation of the form P(k + 1) = A(k)P(k)AT(k) +B(k)B(k)T? (6.23) A(k)P(k)CT(k)[I +C(k)P(k)CT(k)]?1C(k)P(k)AT(k), where A(k) : Z mapsto? Rn?n, B(k) : Z mapsto? Rn?m, C(k) : Z mapsto? Rp?n and A(?), B(?), and 104 C(?) are T-periodic. Theorem 6.5. ([74], Theorem 5) Consider the Kalman gain, K(k) = A(k)P(k)CT(k)(C(k)P(k)CT(k) +I)?1, associated with any symmetric positive semidefinite solution P(?) of (6.23). If (A(?), B(?)) is stabilizable and (A(?), C(?)) detectable, then the corresponding closed-loop matrix ?A(?) = A(?)?K(?)C(?) is exponentially stable. In the last theorem, the exponential stability of a time varying matrix A(?) is to be understood as the exponential stability of the associated LTV system with the dynamics x(k + 1) = A(k)x(k). Theorem 6.6. ([74], Theorem 6) There exists a unique Symmetric Periodic Positive Semidefinite (SPPS) solution ?P(?) of the DPRE (6.17) and ??A(?) = A(?)? ?K(?)C(?) is asymptotically stable iff (A(?),B(?)) is stabilizable and (A(?),C(?)) is detectable, where ?K(?) is the Kalman gain associated with ?P(?). Theorem 6.7. ([74], Theorem 7) Suppose that (A(?), B(?)) is stabilizable and (A(?), C(?)) detectable. Then, every symmetric and positive semidefinite solution of the DPRE converges to the unique SPPS solution. The above results give a necessary and sufficient condition (Theorem 6.6) for the existence and uniqueness of an SPPS solution as well a stability condition (Theorem 6.5) for the closed-loop system. An asymptotic convergence theorem (Theorem 6.7) is provided to guarantees the convergence of a solution to the unique SPPS solution. It is also shown that the closed-loop system is asymptotically stable under the SPPS solution. 105 6.4.4 Convergence of the LQG Controller Theorems 6.3, 6.4 combined with the facts we reviewed in Section 6.4.3 and applied to the DPREs (6.17) and (6.21), imply the following: Theorem 6.8. Suppose that, for the extended plant (6.7), 1. the communication sequence ?(?) is N-periodic, and the pair (A, ?C(?)) is de- tectable; 2. the pair (A,g) is stabilizable, where G = ggT is the variance of the noise term v(k) in (6.5); then, starting from any positive definite initial conditions, as k ? ?, the Riccati equation associated with the Kalman filter (6.17) converges to a unique N-periodic solution ??(k). Moreover, the Kalman filter?s one-step prediction error dynamics (6.18) are exponentially stable. Theorem 6.9. Suppose that, for the extended plant (6.7), 1. the communication sequence ?(?) is N-periodic, and the pair (A, ?B(?)) is sta- bilizable; 2. the pair (A,qT) is detectable, where Q = qqT is the weight matrix in the quadratic cost function (6.8); Then, starting from any positive definite initial conditions, as k ? ?, the Riccati equation associated with the LQ regulator (6.21) converges to a unique N-periodic solution ?K(k). Moreover, the closed-loop dynamics (6.22) under the LQ regulator are exponentially stable. 106 6.4.5 Remark The matrices ?B(k) and ?C(k) are N-periodic under N-periodic communication se- quences ?(?) and ?(?). Hence, if the extended plant (6.7) is stabilizable and de- tectable, the optimal feedback gain L(k) in (6.19) and the optimal observer gain H(k) in (6.14) will also converge to unique periodic solutions, for all initial condi- tions. One can therefore construct a sub-optimal LQG controller by implementing the two periodic solutions. By virtue of Theorem 6.6, we know that both the Kalman filter?s one-step prediction error dynamics (6.18) and the closed-loop dynamics (6.22) are asymptotically stable under this sub-optimal controller. 6.5 An Example We simulated a 4-th order unstable stochastic LTI plant with 2 inputs and 2 outputs. The dynamics of the plant were of the form (6.5), with A = ? ?? ?? ?? ?? 1 1/5 0 0 0 11/4 0 1/5 1 1/5 1/3 3/4 0 ?1 0 1/4 ? ?? ?? ?? ?? ,B = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 ? ?? ?? ?? ?? , C = ? ?? 1 1 0 0 0 0 1 0 ? ??. The process noise v(?) and the measurement noise w(?) satisfied v(?) ? N(0,4I4?4) and w(?) ?N(0,I2?2). The plant was controlled remotely via a shared communica- tion medium which had only one input and one output channel (i.e., w? = w? = 1). Using the algorithm introduced in Section 4.2.1, we found that the extended plant 107 is stabilizable and detectable under the 2-periodic input and output communication sequences {?(0),?(1),???} = {[0, 1]T,[1, 0]T,???}, and {?(0),?(1),???} = {[0, 1]T,[1, 0]T,???}. We formulated the LQG problem described in Section 6.4, where Q = 25I4?4 and the initial conditions were x(0) = [100,50,7,6]T, ?x(0) = [1,1,3,4]T, and ?(0) = 4I4?4. The simulation results illustrate what was developed earlier in this chapter: the solution of the periodic Riccati equation (6.17), which is associated with the Kalman filter error covariance, converged to a 2-periodic SPPS solution ?P(?) in 5 steps; the solution of the periodic backwards Riccati equation (6.21), which is associated with the LQ optimal gain, converged to a 2-periodic SPPS solution ?K(?) in 15 steps. The evolutions of tr(P(k)) and tr(K(k)) are shown in Fig. 6.3. Finally, the SPPS solutions to the Riccati equations (6.17) and (6.21) were ?P(2i) = ? ?? ?? ?? ?? 8.92 1.15 5.00 ?0.40 1.15 267.59 ?21.96 ?105.34 5.00 ?21.96 14.12 10.06 ?0.40 ?105.34 10.06 46.61 ? ?? ?? ?? ?? , ?P(2i+ 1) = ? ?? ?? ?? ?? 9.53 ?17.70 9.01 7.29 ?17.70 71.87 ?29.46 ?27.60 9.01 ?29.46 23.52 13.57 7.29 ?27.60 13.57 15.79 ? ?? ?? ?? ?? , 108 ?K(2i) = ? ?? ?? ?? ?? 456.09 62.55 12.61 34.65 62.55 79.70 0.33 ?7.34 12.61 0.33 28.10 7.54 34.65 ?7.34 7.54 45.73 ? ?? ?? ?? ?? , ?K(2i+ 1) = ? ?? ?? ?? ?? 496.33 284.55 11.30 39.56 284.55 715.87 3.60 53.81 11.30 3.60 27.98 6.83 39.56 53.81 6.83 43.83 ? ?? ?? ?? ?? , for i ? Z+. Using the solutions for ?P(?) and ?K(?), the Kalman filter and LQ regulator were constructed based on the formulas in Sections 6.4.1, 6.4.2. The state evolution of the closed-loop system is shown in Fig. 6.4(a). The evolution of the Kalman filter?s one-step prediction error, e(k), is shown in Fig. 6.4(b). 109 0 10 20 30 40 500 200 400 600 800 1000 1200 1400 k tr(P(k)) tr(K(k)) Figure 6.3: Evolution of tr(P(k)) and tr(K(k)). The P(k) satisfy the Riccati equa- tion (6.17), while K(k) satisfy the backwards Riccati equation (6.21). Both P(k) and K(k) converge to SPPS solutions. 110 0 10 20 30 40 50?600 ?400 ?200 0 200 400 600 k X(k) x1(k) x2(k) x3(k) x4(k) (a) State evolution. 0 10 20 30 40 50?200 ?100 0 100 200 300 k e(k) e1(k) e2(k) e3(k) e4(k) (b) Evolutions of Kalman filter?s one-step prediction error e(k) = x(k)??x(k?). Figure 6.4: Simulation Results: Stabilization of an NCS under the LQG controller. The plant was a stochastic LTI system with 2 inputs and 2 outputs. The commu- nication medium provided 1 input channel and 1 output channel. 111 Chapter 7 NCS Experiments In this chapter, we describe two NCS experiments which were designed to illustrate the design techniques introduced in this thesis. The first experiment exercised our dynamic medium access scheduling policies with a constant feedback controller; the second experiment used a static medium access strategy and an LQG controller. 7.1 Experiment Platform We begin with a general description of the hardware and software configurations of our experiment platform. This platform provided a friendly NCS design and rapid prototyping interface, and can be used for implementing various medium access scheduling strategies and controller design methods that are proposed in this thesis. 7.1.1 Hardware Configuration The hardware configuration of the experiment platform is depicted in Fig. 7.1. It consisted of two personal computers, henceforth referred to as PC1 and PC2, which were connected to each other via a RS232 serial communication channel. The two 112 PCs were equipped with Intel Pentium-4 CPUs running at 1GHz, and had 1G byte RAM each. PC1 was also equipped with a data acquisition (DAQ) card which could be used to connect the sensors and actuators of a physical plant to the computer. The DAQ card used in the experiment platform (a MultiQ-PCI by Quanser Consult- Figure 7.1: Hardware configuration of the NCS experiment platform. ing Inc.) provided sixteen 14-bit A/D input channels and four D/A output channels with a conversion time of 17?s. It also had six 24-bit encoder input and forty-eight digital I/O channels. The DAQ card could communicate with its host PC via the PCI interface running at 33MHz. In an NCS experiment involving a physical plant, the outputs of the plant?s sensors were first sampled by PC1 via the DAQ card. Then, following a user- specified medium access scheduling strategy, those outputs were sent to PC2, over a RS232 serial channel. Using the output information it receives from PC1, the controller running in PC2 calculated the control signals needed by the plant; then, 113 those control signals were sent to PC1, over the RS232 channel, again following a user-specified medium access scheduling strategy. The control signals were finally applied to the appropriate actuator of the plant via the DAQ card. 7.1.2 Software Configuration RTLinux The operating systems used in both PC1 and PC2 were Real-Time Linux (RTLinux). It works by treating the ?usual? Linux kernel as a task executing under a small real- time OS kernel. In RTLinux, all interrupts are initially handled by the real-time kernel and passed to the Linux task only when there are no real-time tasks to run. Thus, Linux is the idle task for the real-time kernel, executing only when there are no real-time tasks to run. The Linux task can never block interrupts or prevent itself from being preempted. The technical key to all this is a software emulation of interrupt control hardware. When Linux tells the hardware to disable interrupts, the real-time kernel intercepts the request, records it, and returns to Linux. Linux is never allowed to really disable hardware interrupts. No matter what state Linux is in, it cannot add latency to the real-time system interrupt response time [1]. A diagram that illustrates the block level design of RTLinux is shown in Fig. 7.2. The kernel version of the RTLinux OS that was used in the experiment platform we developed was Linux2.2.14-rtl2.3. SimuLinux-RT The controller and medium access scheduler design interface used in the experiment platform was the SimuLinux-RT environment, developed by Quanser Consulting Inc. and Mathworks Inc.. SimuLinux-RT is a hard real-time control system rapid- 114 Figure 7.2: Flow of data and controls in RTLinux [1]. prototyping environment that runs ?on top of? RTLinux, Matlab-Simulink, and Realtime-Workshop. As illustrated in Fig. 7.3, when designing a control system in SimuLinux-RT, the system is first modeled in Simulink. After the modeling is completed, the Realtime- Workshop is used to first generate the necessary C codes based on the Simulink model, and then compile that codes into executable binary programs that runs in RTLinux [2]. The SimuLinux-RT environment allows the user to examine real-time data in virtual scopes and to record the time histories of model variables. Moreover, some design parameters, such as feedback gains and constants, can be adjusted on-line in the Simulink model without interrupting the real-time process. 115 12345267 Generate C codes Compile to real-time executable 891051112239 131415716171418 System Modeling 1914611159105111223920219156952022232642425 891051112239202191569520 8262326424 PC Run real-time executable Interrupts Data Acquisition Figure 7.3: The SimuLinux-RT real-time control system prototyping environment [2]. 7.2 Experiment 1: Stabilization under Dynamic Medium Access Scheduling Using the infrastructure described in Section 7.1, we first built an NCS in which the plant consisted of two rotary inverted pendulums. The pendulums shared a RS232 communication medium to communicate with a remote feedback controller. The goal of this experiment was to stabilize the two pendulums at their unstable equilibria using the dynamic medium access policies and controller design methods discussed in Chapter 5. The experiment setup is shown in Fig. 7.4. As shown in Fig. 7.5, the actuator in each inverted pendulum was a servo motor 116 Figure 7.4: Experiment 1: Stabilizing two rotary inverted pendulums at their un- stable equilibria. which drove the pendulum rod via a set of gears and a rotary arm. The input voltages applied to the two servo motors were denoted u1 and u2. Each inverted pendulum was equipped with two sensors which measured the angles of the rotary arm ? and the pendulum rod ?, with ? = 0 corresponding to the upright position. Fig. 7.6 depicts the NCS configuration of this experiment: the two inverted pen- dulums shared a RS232 communication medium to communicate with the controller running in PC2. The medium access constraints were such that, at any one time, only one of the two actuators was able to receive control updates from the controller; furthermore, only one of the two pendulums could transmit their states, x1 or x2 to the controller. As will be shown shortly, the dynamics of each rotary inverted pendulum can be 117 (a) Assembly schematic. (b) Photo. Figure 7.5: Configuration of a rotary inverted pendulum: a pendulum rod connects with a rotary arm via a hinge, and the rotary arm is driven by a servo motor. Two encoders output the angles of the rotary arm and the pendulum rod. described by a 4-dimensional state-space model, with states (?,?, ??, ??). However, the encoders of each inverted pendulum only provided the angles ? and ?. In order to retrieve ?? and ?? from ? and ?, we implemented a series of software differentiators in the (?state reconstruction? block of Fig. 7.6) to reconstruct the full states x1 and x2 of the two pendulums. 7.2.1 Inverted Pendulum Model Fig. 7.7 depicts a simplified model of the rotary inverted pendulum. The pendulum rod is considered a point mass m, the length of the pendulum is denoted by l, and the radius of the rotary arm is denoted by r. The moment of inertia of the rotary 118 DAQ RS232 RS232PC1 RS232 RS232 Controller Pendulum1 Pendulum2 PC2 State reconstruction Figure7.6: NCS configuration of Experiment 1: the plant consisted of two uncoupled rotary inverted pendulums. The two inverted pendulums communicated with a remote controller via a shared RS232 medium. arm, gears, and motor about the rotary axis of the arm are represented by a single rotary disc with an equivalent moment of inertia J. The rotation of the rotary arm is driven by a geared servo motor (Fig. 7.5), which provides the torque T. It can be shown (see Appendix B) that the linearized dynamics of the rotary inverted pendulum in Fig. 7.7 can be described by the following LTI system: ? ?? ?? ?? ?? ?? ?? ?? ?? ? ?? ?? ?? ?? = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 0 ?mrgJ ?K2gKmKbRmJ 0 0 gJ+mr2lJ K2gKmKbrJRml 0 ? ?? ?? ?? ?? ? ?? ?? ?? ?? ? ? ?? ?? ? ?? ?? ?? ?? + ? ?? ?? ?? ?? 0 0 KmKg JRm ?KmKgrJRml ? ?? ?? ?? ?? u (7.1) 119 Figure 7.7: A simplified model of rotary inverted pendulum. Parameter Symbol Rod 1 Rod 2 Units Pendulum Length lp = 2?l 0.399 0.267 m Pendulum Weight m 0.1529 0.1064 kg Table 7.1: Parameters of the two pendulum rods. The parameters of the servo plant and the two pendulum rods are given in Table 7.2 and Table 7.1. Using these parameters, we obtained the dynamics of the two rotary inverted pendulums: Parameter Symbol Value Units Motor Torque Constant Km 0.00767 Nm/amp Motor Back EMF Constant Kb 0.00767 V/(rad/sec) Armature Resistance Rm 2.6 ? Arm Length r 0.210 m Internal Gear Ratio Kgi 14:1 - External Gear Ratio Kge 5:1 - Gear Ratio Kg = Kgi ?Kge 70:1 - Servo Plant Equivalent Inertia J 0.004 kgm2 Table 7.2: Electro-mechanical parameters of the servo motor the gear set, and the rotary arm. 120 Pendulum 1 (longer rod): ?x1 = A1x1 +B1u1 = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 0 ?65.4 ?27.6 0 0 141.1 34.8 0 ? ?? ?? ?? ?? x1 + ? ?? ?? ?? ?? 0 0 51.5 ?64.8 ? ?? ?? ?? ?? u1 Pendulum 2 (shorter rod): ?x2 = A2x2 +B2u2 = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 0 ?54.6 ?27.6 0 0 159.3 43.5 0 ? ?? ?? ?? ?? x2 + ? ?? ?? ?? ?? 0 0 51.5 ?81.0 ? ?? ?? ?? ?? u2 Hence, the dynamics of the plant of the NCS was described by the LTI system: ?x = ? ?? A1 A2 ? ??x+ ? ?? B1 B2 ? ??u, where x = ? ?? x1 x2 ? ??, and u = ? ?? u1 u2 ? ??. 121 7.2.2 NCS Design We let the controller for the pair of pendulums be made of two uncoupled constant feedback gains ?u = ? ?? K1 K2 ? ?? ?x. Using our results from Chapter 5, the closed-loop NCS can be modeled as a switched system that switches between four possible dynamics: ?x = As(t)x; As(t) ?{Aij : i = 1,2; j = 1,2}. (7.2) where A12 = A21 = ? ?? A1 A2 ? ??, A11 = ? ?? A1 +B1K1 A ? ??, A 22 = ? ?? A2 A2 +B2K2 ? ??. However, observe that one should never switch to theA12 andA21 dynamics because, in these two cases, the feedback loops of both pendulums are open. Since the open- loop dynamics, A1 and A2, are both unstable, it is always better for one feedback loop to be closed. Thus our switching policy only allowed (7.2) to switch between A11 and A22. Note that, by ruling out A12 and A21, the input communication sequence (see definition in Chapter 5) ?(t) and the output communication sequence ?(t) will be identical at all times, i.e., ?(t) = ?(t), ?t. To simplify the notation, we defineA1 definesA11 andA1 definesA22. Now the closed-loop 122 NCS is equivalent to ?x = As(t)x; As(t) ?{Ai : i = 1,2}. (7.3) Wechose ?1 = ?2 = 0.5anddenoted theconvex combination ofthetwo dynamics by A = ?1A1 +?2A2 = ? ?? A1 + 0.5B1K1 A2 + 0.5B2K2 ? ??. Based on the controller design method from Chapter 5, we obtained the following feedback gains, K1 = [8.94, 66.83, 6.27, 9.64], K2 = [8.94, 56.51, 5.94, 6.98], which were designed such that the eigenvalues of the convex combination A were placed at [?115.53, ?3.88?2.78i, ?4.3, ?144.88, ?4.08?3.03i, ?4.52]. In this experiment, we studied the stabilization of the system under both the WFD and the GD rules. For the two-pendulum system, the WFD rule was: Weighted Fastest Decay (WFD): ??(t) = ??(t) = arg min i=1,2 wixT(t)[ATi P +PAi]x(t), ?t (7.4) In the last expression, x(t) = [x1(t), x2(t)]T, wi > 0 is the medium access priority of pendulum i, the ?bar? notation denotes the scalar form of a communication sequence (see Definition 5.1). The matrix P is obtained by solving the Lyapunov equation ATP +PA = ?I. 123 The resulting P was the block diagonal matrix P = ? ?? P1 P2 ? ?? with P1 = ? ?? ?? ?? ?? 2.19 4.34 0.60 0.57 4.34 30.71 3.68 3.60 0.60 3.68 0.50 0.48 0.57 3.60 0.48 0.47 ? ?? ?? ?? ?? , P2 = ? ?? ?? ?? ?? 2.17 3.34 0.53 0.33 3.34 21.71 2.75 1.80 0.53 2.75 0.42 0.27 0.33 1.80 0.27 0.18 ? ?? ?? ?? ?? . The GD scheduling rule for this NCS can be expressed as follows: Guaranteed Dwell-time (GD): Let ?0 be a number satisfying 0 < ?0 < ??, where ?? defines ?min(Q)2?? max = 12?0.5 = 1. (7.5) 1. Denote the current time by t0, choose ?(t0) and ??(t0) according to ??(t0) = ??(t0) = arg min i=1,2 xT(t0)[ATi P +PAi]x(t0). (7.6) 2. Let ??(t) = ??(t0) and ??(t) = ??(t0) for all t ? [t0,t1), where t1 is the next switch time determined by t1 = inf t>t0 xT(t)(ATs(t0)P +PAs(t0))x(t) ???0xT(t)x(t). (7.7) 124 3. Repeat from step 1 for t1. 7.2.3 Simulink Implementation Figure 7.8: Simulink implementation of Experiment 1. The Simulink implementation of this experiment is shown in Fig. 7.8. At PC1, the outputs ?, ? of each pendulum were first measured by the DAQ card, then angular velocities, ?? and ??, are obtained by differentiating the angles in software. The transfer functions of the differentiators were chosen as s/(0.05s+1). The WFD and GD access scheduling rules were implemented in the scheduler block, which generated the communication sequences ? and ? based on the feedback from the states, x1 and x2. According to the communication sequence ?(t), one of the state variables, x1 and x2, was selected and sent to the controller via the RS232 channel, as was the value of ?(t) itself. At PC2, the plant?s outputs and the communication sequence were first sent to the ?select x? block, which calculated ?x1 and ?x2 based on the communication sequence and the states x1 and x2. The control signals ?u1 125 and ?u2 were then calculated by multiplying ?x1 and ?x2 with the feedback gains K1 and K2. Depending on the value of the communication sequence, one of the control signals, ?u1 and ?u2 , was selected and sent to PC1 via the RS232 channel according to the communication sequence. In order to account for the time delays in the RS232 channel, we also transmitted the communication sequence ? back from the controller (PC2) to the plant (PC1) via the RS232 channel. By doing so, the control signal and the input communication sequence could be synchronized. Figure 7.9: The WFD rule switching logic. The switching logic of the scheduler under the WFD rule is shown in Fig. 7.9, in which, the output of the scheduler is a binary valued signal with ?1? meaning ??(t) = ??(t) = 1, i.e., pendulum 1 should access the medium, and ?0? meaning ??(t) = ??(t) = 2, i.e., pendulum 2 should access the medium. Also in this subsystem, V1 = xT(t)(AT1P +PA1)x(t) V2 = xT(t)(AT2P +PA2)x(t) The switching logic of the scheduler under the GD rule is implemented via a D flip-flop with asynchronous clear(CLR). The detailed diagram of the GD scheduling 126 logic is shown in Fig. 7.10 in which V1 = xT(t)(AT1P +PA1)x(t) V2 = xT(t)(AT2P +PA2)x(t) e = ??0xT(t)x(t) Figure 7.10: The GD rule switching logic. 7.2.4 Experiment Results Each run of the experiment was performed as follows: i) start the real time code in PC1 and PC2, ii) hold the two pendulum rods at their up-right position, iii) release the two pendulum rods to let the controller ?take over?. After a transient period of 5 second, states of the two pendulums and the communication sequence began to be recorded. The system sampling rate was set at 0.005 sec, and the experiment was stopped when 5000 data points (corresponding to 25 sec) were collected. WFD Rule We first used the WFD medium access scheduling rule and experimented with three different choices of medium access priorities (w1, w2). The experiment data plotted 127 in Fig. 7.11 and Fig. 7.12 illustrate the evolution of the states and the communication sequence when the access priorities were chosen as w1 = 0.1 and w2 = 0.9; in Fig. 7.13 and Fig. 7.14, the priorities were chosen as w1 = w2 = 0.5; in Fig. 7.15 and Fig. 7.16, we chose w1 = 0.9 w2 = 0.1. Each curve was plotted based on the data collected in a 5 sec time window, corresponding to 1000 data points. From these data, it is clear that, i) the two inverted pendulums were effectively stabilized by the controller and the accompanying WFD switching rule, and ii) the medium access percentage of each pendulum could be adjusted by changing their medium access priorities. Table 7.3 gives the average medium access percentages under different choices of access priorities; each number was calculated based on the data collected from three runs of the experiment (5000 data points in each run). w1 = 0.1 w1 = 0.5 w1 = 0.9 w2 = 0.9 w2 = 0.5 w2 = 0.1 Medium access percentage of Pendulum 1 28.28% 48.64% 64.89% Medium access percentage of Pendulum 2 71.72% 51.36% 35.11% Table 7.3: Average medium access percentage of two pendulums under the WFD rule. The average shown are taken over time and over three runs of the experiments (5000 data points in each run). GD Rule We then used the GD medium access scheduling rule while choosing ?0 = 0.05. The plots in Fig. 7.17 and Fig. 7.18 illustrate the state evolution and the communication sequence generated (in a 5 sec time window, 1000 data points) under the GD rule. The communication sequence in Fig. 7.18 is to be compared with those in the WFD rule cases, where the ?(t) switches much more frequently. Table 7.4 compares the average dwell-time of the GD rule and the WFD rule. 128 25 26 27 28 29 30?0.05 0 0.05 Pendulum 1 angles (rad) ?1 ?1 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 1 angular velocities (rad/s) d?1/dt d?1/dt (a) 25 26 27 28 29 30?0.05 0 0.05 Pendulum 2 angles (rad) ?2 ?2 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 2 angular velocities (rad/s) d?2/dt d?2/dt (b) Figure 7.11: Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.1, w2 = 0.9. 129 25 26 27 28 29 300.5 1 1.5 2 2.5 Time (s) ??(t)=??(t) Communication sequence Figure 7.12: Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.1, w2 = 0.9. 130 25 26 27 28 29 30?0.05 0 0.05 Pendulum 1 angles (rad) ?1 ?1 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 1 angular velocities (rad/s) d?1/dt d?1/dt (a) 25 26 27 28 29 30?0.05 0 0.05 Pendulum 2 angles (rad) ?2 ?2 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 2 angular velocities (rad/s) d?2/dt d?2/dt (b) Figure 7.13: Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.5, w2 = 0.5. 131 25 26 27 28 29 300.5 1 1.5 2 2.5 Time (s) ??(t)=??(t) Communication sequence Figure 7.14: Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.5, w2 = 0.5. 132 25 26 27 28 29 30?0.05 0 0.05 Pendulum 1 angles (rad) ?1 ?1 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 1 angular velocities (rad/s) d?1/dt d?1/dt (a) 25 26 27 28 29 30?0.05 0 0.05 Pendulum 2 angles (rad) ?2 ?2 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 2 angular velocities (rad/s) d?2/dt d?2/dt (b) Figure 7.15: Experiment data: Evolution of the states under the WFD rule. The access priorities were chosen as w1 = 0.9, w2 = 0.1. 133 25 26 27 28 29 300.5 1 1.5 2 2.5 Time (s) ??(t)=??(t) Communication sequence Figure 7.16: Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the WFD rule. The access priorities were chosen as w1 = 0.9, w2 = 0.1. 134 25 26 27 28 29 30?0.1 ?0.05 0 0.05 0.1 Pendulum 1 angles (rad) ?1 ?1 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 1 angular velocities (rad/s) d?1/dt d?1/dt (a) 25 26 27 28 29 30?0.1 ?0.05 0 0.05 0.1 Pendulum 2 angles (rad) ?2 ?2 25 26 27 28 29 30 ?0.2 0 0.2 Time (s) Pendulum 2 angular velocities (rad/s) d?2/dt d?2/dt (b) Figure 7.17: Experiment data: Evolution of the states under the GD rule with ?0 = 0.05. 135 25 26 27 28 29 300.5 1 1.5 2 2.5 Time (s) ??(t)=??(t) Communication sequence Figure 7.18: Experiment data: Evolution of the communication sequence (??(t) = ??(t)) under the GD rule with ?0 = 0.05. 136 Each number in this table was calculated based on the data collected from three runs of the experiment (5000 data points in each run). It can be seen that, compared with the WFD rule, the GD rule effectively increased the average dwell-time of the NCS. Average dwell-time (s) WFD (w1 = w2 = 0.5) 0.047 GD (?0 = 0.05) 0.115 Table 7.4: Average dwell-times under the WFD rule and GD rule. The average shown are taken over time and over three runs of the experiments (5000 data points in each run). 7.3 Experiment 2: LQG Control under Static Access Scheduling In a second experiment, we set out to stabilize an MIMO plant via a shared RS232 channel by using static medium access scheduling and the LQG controller presented in Chapter 6. The NCS configuration of this experiment is shown in Fig. 7.19, where the plant was a discrete time 8-th order LTI system with 4 inputs, 4 outputs, and subject to additive Gaussian noise. The medium access constraints in this NCS were designed such that, at any one time, only one of the inputs and one of the outputs were allowed to access the shared communication medium. This time, the dynamics oftheplant were simulated inPC1, andtheLQGcontroller was implemented inPC2. The controller consisted of a periodic Kalman filter and a periodic LQ regulator. In order to synchronize the dynamics of the plant and the controller, a global clock was generated at PC1 and also sent to PC2 via the RS232 channel. 137 RS232 RS232 PC1 RS232 RS232 Kalman FilterPC2 Simulated Plant LQ Gains Global Clock Figure 7.19: NCS configuration of Experiment 2: the plant is a simulated LTI system with 4 inputs and 4 outputs; the plant communicates with an LQG controller via the shared RS232 communication channel. A global clock is used to synchronize the dynamics of the plant and the controller. The LTI plant simulated in PC1 was x(k + 1) = Ax(k) +Bu(k) +v(k), y(k) = Cx(k) +w(k), 138 with A = ? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? 3 ?1 0 0 0 0 ?1 1.5 0 3 ?2 0 0 ?2 1.5 0 0 0 1 ?1 ?1 0.5 0 0 ?1 0 0 1 0.5 0 0 ?1 2 0 0 ?1 ?0.5 0 0 2 0 0 ?1 2 2 ?0.5 0 0 0 ?3 4 0 0 4 ?1.5 0 ?3 2 0 0 0 0 2 ?1.5 ? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? , B = ? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? 1 0 0 ?1 0 1 ?1 0 0 ?1 1 0 ?1 0 0 1 2 0 0 ?1 0 2 ?1 0 0 ?1 2 0 ?1 0 0 2 ? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? , C = ? ?? ?? ?? ?? 1 0 0 ?1 2 0 0 ?1 0 1 ?1 0 0 2 ?1 0 0 ?1 1 0 0 ?1 2 0 ?1 0 0 1 ?1 0 0 2 ? ?? ?? ?? ?? . The random disturbances, v(?) and w(?), are designed to be Gaussian i.i.d., with v(?) ? N(0,I8?8) and w(?) ? N(0,I4?4). The updates of the plant and controller were synchronized by the global clock signal whose frequency was set at 10 Hz. 7.3.1 NCS Design We designed an LQG controller to minimize the quadratic cost function: J = E[xT(N)Qx(N) + N?1summationdisplay k=0 xT(k)Qx(k) + ?uT(k)?u(k)] (7.8) 139 with Q = 4I8?8. The plant dynamics (A,B,C) were chosen such that the obvious ?round-robin? communication sequences ??(?) = 1,2,3,4,1,2,3,4??? and ??(?) = 1,2,3,4,1,2,3,4??? would not preserve the stabilizability and detectability of the plant. Based on the algorithms introduced in Section 4.2.1, the input and output communication se- quences were chosen as the 5-periodic sequences ??(?) = ??(?) = 2,4,3,1,1,2,4,3,1,1,??? (7.9) At each time k, the controller performs the following LQG control algorithm: 1. Kalman filter time update: ?x(k?) = A?x(k?1)+ ?B(k?1)?u(k?1) (7.10) 2. Kalman filter measurement update: ?x(k) = ?x(k?) +H(k)(?y(k)? ?C(k)?x(k?)) (7.11) 3. Feedback computation: ?u(k) = ?L(k)x(k) (7.12) The periodic time-varying gains H(k)?s and L(k)?s were computed off-line by solving their associated Riccati equations (see Section 6.4). Because the extended plant was both stabilizable and detectable under the periodic communication se- quences (7.9), H(k) and L(k) each converged to a steady-state solution with a 140 period of 5 steps. The periodic gains we calculated were, for i ? Z: H(5i) = [0.2578,0.2604,0.0091,?0.0940,0.1872,?0.0187,?0.1794,?0.2735]T , H(5i + 1) = [?0.0879,0.2756,?0.1118,?0.1894,0.3805,0.2214,?0.1695,0.2031]T , H(5i + 2) = [?0.2439,0.0842,0.0380,0.0512,?0.1018,?0.0750,?0.0671,0.3014]T , H(5i + 3) = [?0.0198,?0.2497,?0.0027,?0.0168,0.0343,0.0078,0.3803,0.0770]T , H(5i + 4) = [0.2418,0.0791,?0.0754,?0.1145,0.2266,0.1509,?0.0497,?0.1898]T . L(5i) = [3.6090,1.4186,?0.1438,?0.0271,?0.0184,?0.1428,0.6527,1.6510], L(5i + 1) = [0.5889,3.1470,?0.0080,?0.0689,?0.0682,?0.0070,1.5464,0.2793], L(5i + 2) = [?0.0675,0.7660,0.0221,0.0109,0.0099,0.0232,0.8818,?0.0183], L(5i + 3) = [?3.8455,?4.7714,1.8934,?0.1303,?0.1064,1.8501,?1.9300,?1.7821], L(5i + 4) = [2.6672,2.8737,?0.0655,0.0110,0.0124,?0.0659,1.1564,1.4160]. 7.3.2 Simulink Implementation The Simulink implementation of our second experiment is illustrated in Fig. 7.20. In order to synchronize the controller and the plant, a global clock signal ,?CLK?, was generated at the plant side and was sent to the controller over the communication medium. At the plant side, ?CLK? triggered the updates of the output communica- tion sequence ?(?) and the LTI plant. At the controller side, ?CLK? triggered the updates of the Kalman Filter, LQ regulator, and the input communication sequence ?(?). Based on the output communication sequence ? generated at PC1, at each 141 sigma y ~y select System Clock ~u rho u Select In1Out1 RS232 in 1 In1 Out1 RS232 in In1Out1 RS232 Out1 In1 Out1 RS232 Outu y Plant ^x(k) rho ~u LQ gain sigma ~y ~u rho ^x(k) Kalman Filter Demux Demux CLKrho Comm. Sequence1 CLK Sigma Comm. Sequence ~y~u rho_in CLK CLK Sigma Sigma RS232 115,200bps ~y sigma ^x(k) CLK RS232 115,200bps ~u ~u Figure 7.20: Simulink implementation of Experiment 2. time step, one of the 4 outputs of the plant was selected (by the ?select? block) and sent to the controller. The output communication sequence was also sent to the controller from the PC1 via the RS232 channel. From the output ?y and the output communication sequence, the LQG controller calculated the optimal control ?u and transmitted it to the plant. The input communication sequence ? was generated at the controller side and was used to calculate the LQ gains. As Experiment 1, we ac- counted for the transmission delays in the RS232 channel by sending ? back to PC1 in order to synchronize the control signal and the input communication sequence. The sampling periods of the real-time code running in PC1 and PC2 were both set to 0.005 second; the period of the global update clock, ?CLK?, was set to 0.1 second. The reason for doing so was to account for the delays caused by the RS232 channel and the computation times needed by the controller and the simulated plant (we measured that, the total delays was up to 8 times of the sampling period of the real-time code). 142 7.3.3 Experiment Results We set the initial condition of the plant at x(0) = [15,50,7,6,100,20,4,3]T, and the initial condition of the Kalman filter at ?x(0) = [1,1,3,4,1,1,0,0]T. Fig. 7.21(a) shows the state evolution of the NCS under the selected communication sequences and the LQG controller. It can be seen that, after an initial transient process of about 15 steps (1.5 sec), the state of the plant was effectively attenuated, and remained stable afterwards. The evolution of the Kalman filter estimation error is shown in Fig. 7.21(b). 143 0 5 10 15 20 25 30 35 40 45 50?10000 ?5000 0 5000 k X(k) (a) States evolution. 0 5 10 15 20 25 30 35 40 45 50?400 ?300 ?200 ?100 0 100 200 300 400 500 k e(k) (b) Evolution of the Kalman filter?s one-step prediction error e(k) = x(k)? ?x(k?). Figure 7.21: Experiment data: Stabilization of an NCS using LQG controller. The plant was an LTI system with 2 inputs and 2 outputs. The communication medium provided 1 input channel and 1 output channel. 144 Chapter 8 Conclusions and Future Work This thesis studied networked control systems (NCSs) in which the sensors and actuators of an MIMO plant communicate with a feedback controller via a network or other shared communication medium. The medium can only provide a limited number of simultaneous access channels, so that the plant?s sensors and actuators must be scheduled to gain access to the shared medium. The fundamental point made in this thesis is that, in an NCS, the sensors and actuators that are not actively accessing the communication medium should be ignored by the controller and the plant. Doing so has the effect of greatly simplifying matters by decoupling the selection of communication policies from that of controllers. In this spirit, an MIMO plant with medium access constraints at its inputs and outputs can be effectively modeled by an ?extended plant? which is constructed by cascading the plant dynamics with a pair of time-varying matrix operators that encode the medium access policy governing controller-plant communication. The extended plant has fewer effective input and output ports than the original plant, and describes the ?image? of the original plant viewed over the communication medium. Moreover, the state of the extended plant coincides with that of the plant, 145 hence the problem of stabilizing an MIMO plant under medium access constraints can be solved by designing a feedback controller that stabilizes the extended plant. Our results show that: ? If the plant is a continuous-time LTI system, the controllability and observ- ability of the plant can be preserved if the communication sequences grant each sensor and actuator some finite amount of medium access periodically; ? If the plant is a reversible (A invertible) discrete-time LTI system, there always exist periodic communication sequences that preserve the reachability and observability of the plant; ? If the plant is an irreversible (A not invertible) discrete-time LTI system, there always exist periodic communication sequences that preserve the controllabil- ity (or stabilizability) and reconstructibility (or detectability) of the plant. Such communication sequences can be obtained via the algorithm presented in Sec- tion 4.2.1, and enable the solution of state estimation and feedback control of NCSs when combined with the controller design tools introduced in Chapters 4 and 6. Furthermore, for continuous-time NCSs in which all states can be measured (although not simultaneously), we have proposed a class of ?dynamic? scheduling policies that decide on-line (based on state feedback) which sensors and actuators should be granted access. These policies are accompanied by a design method for computing stabilizing feedback control gains, based on solving a standard pole placement problem. The proposed feedback-based scheduling policies also allow one to assign different medium access priorities to different inputs and outputs and to ensure a minimum dwell-time between each change in medium access. 146 8.1 Opportunities of Future Work In designing periodic communication sequences, in this thesis, we have been guided by the requirement that they must preserve the controllability (or reachability, sta- bilizability) and observability (or reconstructibility, detectability) of the plant. Al- though we have proved the existence of such sequences, their design requires further investigation. In fact, it is easy to show that the number of communication se- quences satisfying our requirements guideline is infinite; it is thus important to study optimal communication sequence design, which involves both the choice of communication period (i.e., the length of ?T?) and that of the communication pat- tern (e.g., choice between ?122,122,...? and ?112,112,...?). The communication sequence design problem becomes particularly interesting when the plant is subject to random disturbances. In that case, choices of communication sequence will affect the optimal control cost and the variance of the state estimation. The methods introduced in [54] and [55] show that an optimal communication sequence that min- imize an LQ cost in a finite horizon can be found via exhaustive search or dynamic programming. However, the problem of designing optimal periodic communication sequences over an infinite time horizon is still open. Furthermore, if an NCS?s feedback controller has been designed in advance, one can treat the choices of communication sequences as inputs to the closed-loop sys- tem; these inputs take values on a finite set. Thus, an optimal communication sequence may be obtained by solving an optimal control problem (finite or infi- nite horizon) via the Maximum Principle (continuous-time) or Dynamic Program- ming (discrete-time). In both cases, the resulting optimal communication sequences should yield a feedback-based switching law. This sequence design method may also reveal some fundamental rules that have yet been discovered for dynamic medium 147 access scheduling. Throughout this thesis, we have assumed that the number of input and output channels (i.e., ?w?? and ?w??) are fixed. However, in a real-world NCS, the commu- nication medium may be shared by the inputs and outputs jointly. Thus, one may need to determine (either off-line or on-line) how many channels should be assigned to the inputs versus the outputs. Furthermore, many communication protocols, such as CAN and TCP/IP, are essentially serial, and provide only one physical channels to all users. It is thus important to study the case where a single communication channel is shared by both inputs and outputs of the plant. Using the theory de- veloped in Chapter 4, one can easily find a communication sequence that preserves the controllability (reachability, stabilizability) and observability (reconstructibility, detectability) of the plant. However, a scenario worth studying involves a plant which is subject to random disturbances and modeling uncertainties. In that case, more medium access granted to the inputs yields a lower control cost, while more medium access granted to the outputs yields smaller state estimation covariance. The dynamic access scheduling and controller design schemes introduced in Chapter 5 can not be used to stabilize an NCS if the inputs and outputs share a single communication channel. This is because the controller uses a constant feedback gain; when the shared channel is used to transmit an input, no output information can be used to calculate the control, therefore the input to the plant is constantly zero. In that case, it might be desirable to let the controller have a ?state? (i.e., be a dynamical system) that retains certain information from the plant. In the dynamic scheduling policies introduced in Chapter 5, one has the freedom to choose the parameters ?ij?s, and wij?s. The choice of ?ij affects the value of the (i,j) entry of the feedback gain matrix K, while the wij affects the medium access priorities of the i-th inputs and the j-th outputs. It would be interesting to 148 investigate how these parameters could be chosen to meet various design criteria, e.g., system trajectory bound, avoidance of actuator saturation, or minimizing the feedback gain. One limitation of our proposed dynamic scheduling policies is that they all re- quire real-time state information of the plant which is not always available in real- world NCSs. A straightforward extension is to address the output feedback case, where the plant output is y(t) = Cx(t), with C a p-by-n matrix (p < n). In this case, an observer may be used to reconstruct the state at either the plant or the controller side of the communication medium. For that purpose, it will be necessary to develop theoretical results on the stability of NCSs having this config- uration. Moreover, in this thesis, we have only discussed dynamic access scheduling in continuous-time. Most NCSs operate in discrete-time (under the sampled-data configuration); it would thus be useful to find the discrete-time counterpart of the NCS design method developed in Chapter 5. The results presented in [77] and the references therein may be a useful starting point in studying quadratic stability of a discrete-time switched system. In Chapters 4 and 5, we have addressed the NCS design problem in the classical system theoretical framework where stability is the only design objective. The modern view of control sees feedback as a tool for uncertainty management [78], it is necessary to re-examine the NCS design problem from the modern robust control view point. The LQG design method developed in Chapter 6 gives a good starting point for H2 synthesis of NCSs; it is also desirable to investigate NCS design (both the communication sequence and the controller ) in the H? framework. This thesis did not address transmission delays in the communication medium. If the transmission delays are always known to the controller, it may be possible to design a model-based predictor (e.g., the one introduced in [25]) that compensates 149 for the delay. The case where the delays are random and not known by the controller is more complex and requires further study. Finally, it is worth studying the controllability and observability of a non-linear NCS using the extended plant formulation introduced in Section 3.6. In that case, the analytical method introduced in the proof of Theorem 4.1 may be a good starting point. 150 Appendix A Calculating the Time-varying Feedback and Observer Gains In Chapter 4, we show that designing the feedback controller that exponentially stabilize the continuous time extended plant (4.2) involves calculating periodic time varying gains having the forms of K(t) = ??BT(t)W?1a (t,t+T), (A.1) H(t) = [e?ATTMa(t?T,t)e?AT]?1 ?CT(t), (A.2) where the two Gramians Wa and Ma are defined as follows [64] Wa(t0,tf) defines integraldisplay tf t0 2e4a(t0??)eA(t0??) ?B(?) ?BT(?)eAT(t0??)d?, (A.3) Ma(t0,tf) defines integraldisplay tf t0 2e4a(??tf)eAT(??t0) ?CT(?) ?C(?)eA(??t0)d?. (A.4) In this appendix, we derive the ordinary differential equations (ODEs) that are are needed for calculating these gains. With these ODEs, the gains can be calculated 151 numerically off-line using standard ODE solvers (e.g., Matlab ?ode45?), and then stored in a time-indexed look-up table (since both gains are T-peridic) when the system is running. A.1 Solving for the Gramian Wa(t,t + T) A.1.1 Preliminaries To solve for the Gramian Wa(t,t + T), it is helpful to first study the derivative of the controllability Gramian of the extended plant (4.2) during the time period [t,t + T]. The controllability Gramian of the extended plant (4.2) during [t0,tf], denoted W(t0,tf), is defined as follows: W(t0,tf) = integraldisplay tf t0 ?(t0,?) ?B(?) ?BT(?)?T(t0,?)d?, (A.5) where ?(t0,?) is the transition matrix of the extended plant (4.2), defined as ?(tf,t0) = eA(tf?t0). (A.6) Note that W(t,t +T) = integraldisplay t+T t ?(t,?) ?B(?) ?BT(?)?T(t,?)d? = ?(t,t0)? integraldisplay t+T t ?(t0,?) ?B(?) ?BT(?)?T(t0,?)d? ??T(t,t0), (A.7) where t0 could be any real number. It is well known that the transition matrix ?(t,t0) satisfies d dt?(t,t0) = A??(t,t0). (A.8) 152 Hence we have d dtW(t,t +T) = AW(t,t +T) +W(t,t +T)A T + ?(t,t0)[?(t0,t+T) ?B(t +T) ?BT(t +T)?T(t0,t +T) (A.9) ??(t0,t) ?B(t) ?BT(t)?T(t0,t +T)]?T(t,t0). Remark A.1. To obtain the above equation, we need to use the following fact: ?For an integrable function f(?), ddt integraltextt+Tt f(?)d? = f(t+T)?f(t)?. Based on the spirit of Lemma 4.1, we will always let communication sequence ?(?) be T-periodic. Therefore ?B(t) is also T-periodical, then the above reduce to d dtW(t,t +T) = AW(t,t +T) +W(t,t +T)A T + ?(t,t +T) ?B(t) ?BT(t)?T(t,t+T)? ?B(t) ?BT(t). (A.10) Using the fact that for the extended plant, ?(t,t + T) = e?AT, we can further reduce the above ODE to d dtW(t,t +T) = AW(t,t+T) +W(t,t +T)A T +e?AT ?B(t) ?B(t)Te?ATT ? ?B(t) ?B(t)T. (A.11) Equation (A.11) is the ODE satisfied by the controllability Gramian W(t,t+T). In order to solve it numerically, we also need to know the initial conditions of the matrix valued function W(t,t +T) at t = 0, which is W(0,T). W(0,T) can be calculated in two ways. First, it is easy to prove that (Ex.9.4 in 153 [64]) W(t,T) satisfies the following ODE d dtW(t,T) = A(t)W(t,T)? ?B(t) ?BT(t) +W(t,T)AT(t), (A.12) withW(T,T) = 0. We can then integrate the above ODE backwards to findW(0,T) (the Matlab function ?ode45? can do this job). An alternative way is to observe that d dtW(0,t) = ?(0,t) ?B(t) ?BT(t)?T(0,t) (A.13) = e?At ?B(t) ?BT(t)e?At. (A.14) Using W(0,0) = 0, we can then can obtain W(0,T) by integrating the above ODE for t ? [0,T]. A.1.2 The Gramian ODEs Now, let?s return to the problem of calculating the Gramian Wa(t,t + T). By definition, Wa(t0,tf) = integraldisplay tf t0 2e4a(t0??)eA(t0??) ?B(?) ?BT(?)eAT(t0??)d? = 2 integraldisplay tf t0 e(A+2aI)(t0??) ?B(?) ?BT(?)e(A+2aI)T(t0??)d?. Define Aa = A + 2aI, we see that Wa(t0,tf) is nothing but two times the con- trollability Gramian (A.11) defined based on the new dynamics Aa instead of A. To clarify notation, we will now add a subscript to the controllability Gramian W(t0,tf), denoting which dynamics it is referred to, e.g., W(t0,tf)Aa meaning that the controllability Gramian (A.11) is calculated based on Aa. Hence the above 154 analysis gives Wa(t0,tf) = 2W(t0,tf)Aa. (A.15) Differentiating the above equation, and applying the ODEs given in (A.11), we obtain the ODE satisfied by the Gramian Wa(t,t+T). d dtWa(t,t+T) = 2 d dtW(t,t +T)Aa = 2(AaW(t,t +T)Aa +W(t,t +T)AaATa ? ?B(t) ?BT(t) +e?AaT ?B(t) ?BT(t)e?ATaT). The above then reduces to d dtWa(t,t +T) = AaWa(t,t +T)+Wa(t,t +T)A T a ?2 ?B(t) ?BT(t) + 2e?AaT ?B(t) ?BT(t)e?ATa T, (A.16) which is the ODE we need for calculating the Gramian Wa(t,t+T). To solve for the initial condition of Wa(t,t + T) at t = 0, i.e., Wa(0,T), which equals to 2W(0,T)Aa , we can directly use the ODEs we developed for W(t,T) of W(0,t) and obtain the following: d dtWa(t,T) = AaWa(t,T)?2 ?B(t) ?BT(t) +Wa(t,T)ATa, (A.17) Wa(T,T) = 0. (A.18) 155 or alternatively, d dtWa(0,t) = 2e ?Aat ?B(t) ?BT(t)e?ATa t, (A.19) Wa(0,0) = 0. (A.20) A.2 Solvingfor the Gramian [e?ATTMa(t?T,t)e?AT] A.2.1 Preliminaries Again, to solve for the Gramian [e?ATTMa(t?T,t)e?AT], it is helpful to first study the observability Gramian of the extended plant (4.2). The observability Gramian M(t0,tf) of the extended plant is defined as M(t0,tf) = integraldisplay tf t0 ?T(?,t0) ?CT(?) ?C(?)?(?,t0)d?, (A.21) and for the extended plant (4.2), ?(tf,t0) = eA(tf?t0). Then Ma(t0,tf) = integraldisplay tf t0 2e4a(??tf)?T(?,t0) ?CT(?) ?C(?)?(?,t0)d?. (A.22) To simplify notation, we define N(t0,tf) defines ?T(t0,tf)M(t0,tf)?(t0,tf) (A.23) = integraldisplay tf t0 ?T(?,tf) ?CT(?) ?C(?)?(?,tf)d?, (A.24) and, imitating the definitions of Wa, we also define 156 Na(t0,tf) defines ?T(t0,tf)Ma(t0,tf)?(t0,tf) (A.25) = integraldisplay tf t0 2e4a(??tf)?T(?,tf) ?CT(?) ?C(?)?(?,tf)d?. (A.26) Based on the above definition, the Gramian [e?ATTMa(t ? T,t)e?AT] can be ex- pressed as follows e?ATTMa(t?T,t)e?AT = Na(t?T,t). (A.27) Using the fact that ddt integraltexttt?T f(?)d? = f(t)?f(t?T) , and similar techniques used in Section A.1.1, we obtain that d dtN(t?T,t) = ?A TN(t?T,t)?N(t?T,t)A + ?CT(t) ?C(t)?e?ATT ?CT(t) ?C(t)e?AT. (A.28) A.2.2 The Gramian ODEs Again, define Aa = A+2aI. It is easy to prove that the Gramian matrix Na(t0,tf) is nothing but 2times thematrixN(t0,tf), calculatedbased onAa (denoted N(t0,tf)Aa), i.e., Na(t0,tf) = 2N(t0,tf)Aa. (A.29) Then using the result in (A.28) we obtain d dtNa(t?T,t) = ?Aa TNa(t?T,t)?Na(t?T,t)Aa + 2 ?CT(t) ?C(t)?2e?ATa T ?CT(t) ?C(t)e?AaT. (A.30) 157 which is the ODE we need to calculate Na(t?T,t). In order to obtain the initial condition of Na(t?T,t) at t = 0, i.e., Na(?T,0), we can integrate the ODE satisfied by Na(?T,t). Using the definitions of Na(t0,tf) the following ODE can be easily obtained d dtNa(?T,t) = ?A T aNa(?T,t)?Na(?T,t)Aa + 2 ?C T(t) ?C(t), Na(?T,?T) = 0. (A.31) Alternatively, Na(?T,0) can also be obtained by integrating backwards the ODE satisfied Na(t,0): d dtNa(t,0) = ?2e ATa T ?CT(t) ?C(t)eAaT, Na(0,0) = 0. (A.32) 158 Appendix B The Dynamics of a Rotary Inverted Pendulum Consider the simplified model of the rotary inverted pendulum shown in Fig. 7.7 (b). The kinetic energy of the pendulum and the rotary arm are given by: KEpendulum = 12m[(r??cos? +l ??)2 + (l??sin?)2 + (r??sin?)2], (B.1) KEarm = 12J ??2. (B.2) The potential energy of the system is given by PE = PEpendulum = mglcos?. (B.3) Since we are considering the case when ? is very small, we omit the the terms 159 associated with sin?2, then the Lagrangian of the system can be expressed as: L = KEpendulum +KEarm ?PE, (B.4) = 12(mr2 +J)??2 + 12ml2 ??2 +mrlcos??? ???mglcos?. (B.5) Using the Lagrangian formulation we obtain the following differential equations ml2?? +mrlcos????mglsin? = 0, (B.6) mrlcos ?? + (mr2 +J)???mrlsin?sin???2 = T. (B.7) Linearize theabove differential equationabouttheequilibrium point [?,?, ??, ??]T = [0,0,0,0]T, we obtain the linear model of the rotary inverted pendulum. ? ?? ?? ?? ?? ?? ?? ?? ?? ? ?? ?? ?? ?? = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 0 ?mrgJ 0 0 0 gJ+mr2lJ 0 0 ? ?? ?? ?? ?? ? ?? ?? ?? ?? ? ? ?? ?? ? ?? ?? ?? ?? + ? ?? ?? ?? ?? 0 0 1 J ? rlJ ? ?? ?? ?? ?? T. (B.8) In the servo plant, the arm is drive by an electrical DC motor via a gear box. The equations that govern a DC-motor are V = IRm +Kb?m, (B.9) Tm = KmI, (B.10) in which Rm is the motor?s armature resistance, Kb is the motor?s back EMF con- stant, Km is the torque constant, Tm is the torque produced by the motor at its shaft, ?m is the angular velocity of the motor shaft, u is voltage applied to the 160 motor, I is the motor?s current. Denote the gear ratio by Kg, we also have ?m = Kg ??, (B.11) T = KgTm. (B.12) Hence the relation between T and u can be expressed as T = KmKgR m u? KmKbK 2 g Rm ??. (B.13) We thus obtain the dynamics of a rotary inverted pendulum ? ?? ?? ?? ?? ?? ?? ?? ?? ? ?? ?? ?? ?? = ? ?? ?? ?? ?? 0 0 1 0 0 0 0 1 0 ?mrgJ ?K2gKmKbRmJ 0 0 gJ+mr2lJ K2gKmKbrJRml 0 ? ?? ?? ?? ?? ? ?? ?? ?? ?? ? ? ?? ?? ? ?? ?? ?? ?? + ? ?? ?? ?? ?? 0 0 KmKg JRm ?KmKgrJRml ? ?? ?? ?? ?? u. (B.14) 161 Bibliography [1] Victor Yodaiken. The RTLinux manifesto. Available on-line at http:// www. fsmlabs.com /the-rtlinux-manifesto.html. [2] SimuLinux-RT User?s Guide, version 1.2.0. Quanser Consulting, Inc., 2000. [3] R. P. G. Collinson. Fly-by-wire flight control. Computing & Control Engineering Journal, 10(4):141?152, August 1999. [4] J. Nilsson. Real-Time Control Systems with Delays. PhD thesis, Department of Automatic Control, Lund Institute of Technology, Lund, Sweden., 1998. [5] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci. A survey on sensor networks. IEEE Communication Magazine, 40(8):102?114, September 2002. [6] E. W. Justh and P. S. Krishnaprasad. Equilibria and steering laws for planar formations. Systems and Control Letters, 52(1):25?38, May 2004. [7] E. Fiorelli, N.E. Leonard, and et. al. Multi-AUV control and adaptive sampling in Monterey Bay. In Proceedings of IEEE Autonomous Underwater Vehicles 2004: Workshop on Multiple AUV Operations (AUV04), Sebasco, ME, June 2004. 162 [8] J. Santini, M. Cima, and R. Langer. A controlled release microchip. Nature, 397:335?338, 1999. [9] L.Y. Lin, E. L. Goldstein, and R. W. Tkach. Free-space micromachined optical switches for optical networking. Quantum Electronics, 5:4?9, 1999. [10] S. Lucyszyn. Review of radio frequency microelectromechanical systems tech- nology. In IEE Proceedings of Science, Measurement, and Technology, volume 151, pages 93?103, March 2004. [11] J. J. Bernstein, M. R. Dokmeci, G. Kirkos, A.B. Osenar, J. Peanasky, and A A. Pareek. Mems tilt-mirror spatial light modulator for a dynamic spectral equalizer. Journal of Microelectromechanical Systems, 13(2):272 ?278, April 2004. [12] D. Hristu-Varsakelis. Feedback control with communication constraints. In D. Hristu-Varsakelis and W. S. Levine, editors, Handbook of Networked and Embedded Control Systems. Birkhauser, 2005. [13] D. Hristu-Varsakelis. Feedback control systems as users of a shared network: Communication sequences that guarantee stability. In Proceedings of the 40th IEEE Conference on Decision and Control, volume 4, pages 3631?6, 2001. [14] D. Hristu and K. Morgansen. Limited communication control. Systems and Control Letters, 37(4):193?205, July 1999. [15] Michael S. Branicky, Stephen M. Phillips, and Wei Zhang. Scheduling and feedback co-design for networked control systems. In Proceedings of the 38th IEEE Conference on Decision and Control, pages 1211?1217, December 2002. 163 [16] Hideaki Ishii and Bruce A. Francis. Limited Data Rate in Control Systems with Networks. Springer, 2002. [17] Condor Engineering. Mil-std-1553 tutorial. Available on-line at http:// www. condoreng. com/ support / downloads /tutorials/MIL-STD-1553Tutorial.PDF. [18] M. Farsi, K. Ratcliff, and M. Barbosa. An overview of controller area network. Computing & Control Engineering Journal, 10(3):113?120, August 1999. [19] H.M. Newman. BACnet - the new standard protocol. Electrical Contractor, pages 119?122, September 1997. [20] Dimitrios Hristu. Optimal control with limited communication. PhD thesis, Devision of Engineering and Applied Science, Harvard University, 1999. [21] F. Lian, J. Moyne, and D. Tilbury. Performance evaluation of control networks: Ethernet, controlnet, and devicenet. IEEE Control Systems Magazine, pages 66?83, February 2001. [22] H. Ye, G. Walsh, and L. Bushnell. Wireless local area networks in the man- ufacturing industry. In Proceedings of American Control Conference, pages 2363?67, June 2000. [23] Feng-Li Lian, James Moyne, and Dawn Tilbury. Network design considera- tion for distributed control systems. IEEE Transactions on Control System Technology, pages 297?307, March 2002. [24] K. J. ?Astr?om and B. Witternmark. Computer Controlled Systems: Theory and Design. Prentice Hall, Upper Saddle River, NJ, 2nd edition, 1990. 164 [25] Wei Zhang, Michael S. Branicky, and Stephen M. Phillips. Stability of net- worked control systems. IEEE Control Systems Magazine, pages 84?99, Febru- ary 2001. [26] Yoram Halevi and Asok Ray. Integrated communication and control systems: Part i- analysis. Journal of Dynamic Systems, Measurement, and Control, pages 367?373, December 1988. [27] F. Lian, J. Moyne, and D. Tilbury. Analysis and modeling of networked control systems: MIMO case with multiple time delays. In Proceedings of the American Control Conference, pages 4306?4312, 2001. [28] F. Lian, J. Moyne, and D. Tilbury. Optimal controller design and evaluation for a class of networked control systems with distributed constant delays. In Proceedings of the American Control Conference, pages 3009?3014, June 2002. [29] Nejat Olgac. Special issue - time delay in dynamic systems. Journal of Dynamic Systems, Measurement, and Control, June 2003. [30] Keqin Gu and Silviu lulian Niculescu. Survey on recent results in the stability and control of time-delayed systems. Journal of Dynamic Systems, Measure- ment, and Control, pages 158?165, June 2003. [31] W.S. Wong and R.W. Brockett. Systems with finite communication bandwidth constraints. i. state estimation problems. IEEE Transactions on Automatic Control, 42(9):1294?9, September 1997. [32] W.S. Wong and R.W. Brockett. Systems with finite communication bandwidth constraints. ii. stabilization with limited information feedback. IEEE Transac- tions on Automatic Control, 44(5):1049?1053, May 1999. 165 [33] Girish N. Nair and Robin J. Evans. Stabilization with data rate limited feed- back: tightest attainable bounds. Systems and Control Letters, 41:49?56, 2000. [34] Girish N. Nair and Robin J. Evans. State estimation via a capacity-limited communication channel. In Proceedings of the 36th Conference on Decision and Control, pages 866?871, December 1997. [35] Sekhar Tatikonda, Anant Sahai, and Sanjoy Mitter. Control of LQG systems under communication constraints. In Proceedings of the 37th Conference on Decision and Control, pages 1165?1170, December 1998. [36] R.W. Brockett and D. Liberzon. Quantized feedback stabilization of linear sys- tems. IEEE Transactions on Automatic Control, 45(7):1279?1289, July 2000. [37] B. Hu, Z.Feng, and A. N. Michel. Quantized sampled-data feedback stabi- lization for linear and nonlinear control systems. In Proceedings of the 38th Conference on Decision and Control, pages 4392?4397, December 1998. [38] Nicola Elia and Sanjoy K. Mitter. Stabilization of linear systems with lim- ited information. IEEE Transactions on Automatic Control, 46(9):1384?1400, September 2001. [39] Pierre T. Kabamba and Shinji Hara. Worst-cased analysis and design of sampled-data control systems. IEEE Transactions on Automatic Control, pages 1337?1357, September 1993. [40] John S. Baras, Xiaobo Tan, and Wei Xi. Jointly optimal quantization, es- timation, and control of hidden markov chains. In Proceedings of the 42nd Conference on Decision and Control, pages 1098?1103, December 2003. 166 [41] Keyong Li and John Baillieul. Robust quantization for digital finite commu- nication bandwidth (dfcb) control. IEEE Transactions on Automatic Control, 49(9), September 2004. [42] Arash Hassibi, Stephen P. Boyd, andJonathanP. How. Control of asynchronous dynamical systems with rate constraints on events. In Proceedings of the 38th Conference on Decision and Control, pages 1345?1351, December 1999. [43] M. Micheli and M. I. Jordan. Random sampling of a continuous-time stochastic dynamical system. In Proceedings of 15th International Symposium on the Mathematical Theory of Networks and Systems (MTNS), University of Notre Dame, South Bend, Indiana, August 2002. [44] B. Sinopoli, L. Schenato, and et. al. Kalman filtering with intermittent obser- vation. In Proceedings of the 42nd Conference on Decision and Control, pages 701?08, December 2003. [45] X. Liu and A. Goldsmith. Kalman filtering with partial observation losses. In Proceedings of the 43rd Conference on Decision and Control, December 2004. [46] O. C. Imer, S. Yuksel, and T. Basar. Optimal control of dynamical systems over unreliable communication links. In Proceedings of the 6th IFAC Symposium on Nonlinear Control Systems, September 2004. [47] Babak Azimi-Sadjadi. Stability of networked control system in the presence of packet losses. In Proceedings of the 42nd Conference on Decision and Control, pages 676?681, December 2003. [48] R. W. Brockett. Stabilization of motor networks. In Proceedings of the 34th IEEE Conference on Decision and Control, pages 1484?8, December 1995. 167 [49] V. Blondell and J Tsitsiklis. NP hardness of some linear control design problem. SIAM Journal on Control and Optimization, 35(6):2118?2127, November 1997. [50] D. Hristu. Stabilization of LTI systems with communication constraints. In Proceedings of the American Control Conference, pages 2342?6, 2000. [51] Wei Zhang. Stability Analysis of Networked Control Systems. PhD thesis, Department of Electrical Engineering and Computer Science, Case Western Reserve University, May 2001. [52] C. L. Liu and J.W. Layland. Scheduling algorithm for multiprogramming in a hard-real time environment. Journal of the ACM, 20(1):46?61, January 1973. [53] L. Sha, X. Liu, M. Caccamo, and G. Buttazzo. Online control optimization using load driven scheduling. In Proceedings of the 39th Conference on Decision and Control, pages 4877?4882, December 2000. [54] B. Lincoln and B. Bernhardsson. Efficient pruning of search trees in LQR control of switched linear systems. In Proceedings of the 39th IEEE Conference on Decision and Control, pages 1828?1833, December 2000. [55] H. Rehbinder and M. Sanfridson. Scheduling of a limited communication chan- nel for optimal control. In Proceedings of the 39th IEEE Conference on Decision and Control, pages 1011?1016, December 2000. [56] D. Hristu-Varsakelis and P.R. Kumar. Interrupt-based feedback control over a shared communication medium. In Proceedings of the 41st IEEE Conference on Decision and Control, pages 3223?8, 2002. 168 [57] J. Perkins and P.R. Kumar. Stable distributed real-time scheduling of flexi- ble manufacturing / assembly / disassembly systems. IEEE Transactions on Automatic Control, 34(2):139?48, February 1989. [58] Gregory Wash, Hong Ye, and Linda Bushnell. Stability analysis of networked control systems. IEEE Transactions on Control Systems Technology, 10(3):438? 46, May 2002. [59] Gregory Walsh and Hong Ye. Scheduling of networked control systems. IEEE Control Systems Magazine, pages 57?65, February 2001. [60] Hassan K. Khalil. Nonlinear systems. Prentice Hall, 2nd edition, 1996. [61] Gregory Walsh et al. Asymptotic behavior of nonlinear networked control sys- tems. IEEE Transactions on Automatic Control, 46(7):1093?97, July 2001. [62] Hong Ye. Research on Networked Control Systems. PhD thesis, Department of Mechanical Engineering, University of Maryland at College Park, 2000. [63] D. Liberzon and A. S. Morse. Basic problems in stability and design of switched systems. IEEE Control Systems Magazine, 19(5):59?70, October 1999. [64] Wilson J. Rugh. Linear System Theory. Prentice Hall, 2nd edition, 1996. [65] S. Nudehi and R. Mukherjee. Controllability and observability enhancement through switching: application to vibration control. In Proceedings of the 42th IEEE Conference on Decision and Control, pages 5753?5758, December 2003. [66] P. T. Kabamba. Monodromy eigenvalue assignment in linear periodic systems. IEEE Transactions on Automatic Control, AC-31(10):950?952, October 1986. 169 [67] H. Al-Rahmani and G. Franklin. Linear periodic systems: Eigenvalue assign- ment using discrete periodic feedback. IEEE Transactions on Automatic Con- trol, 34(1):99?103, January 1989. [68] P. Montagnier and R. J. Spiteri. A Gramian-based controller for linear periodic systems. IEEE Transactions on Automatic Control, 49(8):1380?1385, August 2004. [69] M. Green and D. J. N. Limebeer. Linear Robust Control. Prentice Hall, 1995. [70] Eric Feron. Quadratic stabilization of switched systems via state and output feedback. Technical Report CICS-P-468, Center for Intelligent Control Systems, MIT, 1996. [71] M. S. Branicky. Multiple lyapunov functions and other analysis tools for switched and hybrid systems. IEEE Transactions on Automatic Control, 43(4):475 ? 482, April 1998. [72] M. Wicks, P. Peleties, and R. DeCarlo. Switched controller synthesis for the quadratic stabilization of a pair of unstable linear system. European Journal of Control, 4:140?147, 1998. [73] S. Bittanti, P. Colaneri, and G. De Nicolao. The periodic riccati equation. In S. Bittanti, A. J. Laub, and J. C. Willems, editors, The Riccati Equation, Berlin, 1991. Springer. [74] S. Bittanti, P. Colaneri, and G. De Nicolao. The difference periodic riccati equation for the periodic prediction problem. IEEE Transactions on Automatic Control, 33(8):706?712, August 1988. 170 [75] D. P. Bertsekas. Dynamic Programming and Optimal Control. Athena Scientific, Belmont, Massachusetts, 2nd edition, 2000. [76] S. Bittanti, P. Colaneri, and G. Guardabassi. Periodic solutions of periodic riccati equations. IEEE Transactions on Automatic Control, AC-29(7):665? 667, July 1984. [77] Guisheng Zhai. Quadratic stabilizability of discrete-time switched systems via state and output feedback. In Proceedings of the 40th Conference on Decision and Control, pages 2165 ? 2166, December 2000. [78] R.M. Murray, K.J. ?Astr?om, S.P. Boyd, R.W. Brockett, and G. Stein. Future directions in control in an information-rich world. IEEE Control Systems Mag- azine, pages 20?33, April 2003. 171