Networked Control Systems

Size: px
Start display at page:

Download "Networked Control Systems"

Transcription

1 Networked Control Systems Simulation & Analysis J.J.C. van Schendel DCT Traineeship report March till June 2008 Coaches: Supervisor TU/e: Prof. Dr. D. Nesic, University of Melbourne Dr. M. Tabbara, University of Melbourne Dr. Ir. M. Heemels Eindhoven University of Technology Department of Mechanical Engineering Control Systems Technology Group Eindhoven, October 2008

2 Traineeship project: Networked Control Systems Simulation and Analysis Jozef (Jos) Johannes Cornelis van Schendel Studentno Voorterweg TR Eindhoven The Netherlands Department of Electrical and Electronic Engineering The University of Melbourne Victoria 3010 Australia Department of Mechanical Engineering Technische Universiteit Eindhoven 5600 MB Eindhoven The Netherlands

3 Abstract The area of Networked Control Systems (NCS) is attracting more and more attention in recent years. The potential applications of NCS are numerous, because it makes the design and implementation of control systems possible with reduced complexity and low costs. Moreover, its flexibility is large as adding or removing network nodes can be done relatively easy. Although the area of NCS is researched extensively, most of the work only discusses the theoretical proof and analysis of stability, without much emphasis on experimental validation. Here, the theoretical results will be compared with results from simulations in Matlab and experiments with a network-in-the-loop setup. Therefore, the focus of this study will be on programming, simulating and analyzing different scheduling protocols on the NCS. This study examines stability of NCS with different protocols in a more practical way. To do this, the most important scheduling protocols are programmed in Matlab and Xcode (C language). Because the round-robin (RR) and random protocol are relatively easy to implement in real systems, they are studied in more detail and used to experiment with a physical network-in-the-loop setup. Six other protocols are only simulated in Matlab Simulink and the results are compared with the results from the literature. The particular network-in-the-loop setup at hand consists of five computers (known as nodes), which act as two sensors, two actuators and one controller that communicate over a wireless network. To validate the different models, the network-in-the-loop experiments are compared with the Simulink simulations and previous studies. In this comparison the maximum allowable transfer interval (MATI) is a key parameter. This maximum time between two arrived data transmissions at the controller node, is the parameter with respect to which the closed loop system remains stable when control and sensor signals are transmitted over the network. Using MATI makes it possible to evaluate, analyze and compare the results from theory, Matlab Simulink simulations and experiments with network-in-the-loop.

4 Contents 1 Introduction to Networked Control Systems 5 2 Plant model and scheduling protocols Batch Reactor Scheduling protocols Round-robin protocol Random protocol Introduction to MATI and MTI Networked Control System code NCS code structure Determination of the transmission intervals Implementation of the system equations Bonjour networking UDP broadcasting Network configuration Data packet collisions Computer connected to multiple networks Wireless network host Contents of data packets Dealing with data packet dropouts Networked Control System stability NCS results from theory Network-in-the-loop experiments Network-in-the-loop with round-robin scheduling Network-in-the-loop with random scheduling Network-in-the-loop on slower network (RR) Matlab Simulink simulation Simulink simulation with round-robin protocol Simulink simulation with random protocol Simulated protocols Network-in-the-loop and Simulink comparison

5 4.4.1 Network-in-the-loop and Simulink: round-robin Network-in-the-loop and Simulink: random Evaluation of theoretical NCS framework Round-robin protocol comparison Random protocol comparison Conclusion and future work 41 A Matlab and Xcode files 44 A.1 Scheduling Protocols A.1.1 Round-robin scheduling Matlab file A.1.2 Random scheduling Matlab file A.1.3 Try-once-discard scheduling Matlab file A.1.4 Modified try-once-discard scheduling Matlab file A.1.5 Modified round-robin scheduling Matlab file A.1.6 Constant penalty scheduling Matlab file A.1.7 Estimated error order scheduling Matlab file A.1.8 Lag first order scheduling Matlab file A.2 State-space description of batch reactor A.3 Matlab file to run Poisson Simulink model A.4 Matlab files to run Gaussian Simulink model A.5 NCS program code A.5.1 Main A.5.2 Config A.5.3 Controller A.5.4 System A.5.5 Scheduling protocol A.5.6 Round-robin Scheduling A.5.7 Random Scheduling

6 List of Figures 2.1 Scheduling of 2 outputs with zero-order hold ŷ update User Interface of NCS program while master Network with five nodes Flowchart of NCS code Results from network-in-the-loop with round-robin (0.03s time-out) Results from network-in-the-loop with round-robin (0.04s time-out) Results from network-in-the-loop with round-robin and dropouts Results from network-in-the-loop with random (κ (0, 100/3000)) Results from network-in-the-loop with random (κ (0, 100/5000)) Results from network-in-the-loop with RR on slower network Matlab Simulink model of the NCS Results from Simulink with round-robin protocol Results from Simulink with random protocol Compare results from RR protocol Compare results from random protocol A.1 User Interface of NCS program with node

7 List of Tables 4.1 Summary of MATI bounds Results from network-in-the-loop with round-robin scheduling Results from network-in-the-loop with random scheduling Results from Matlab Simulink Summary of MATIs for the simulated protocols Compare RR scheduling Compare random scheduling Compare MATIs from theory with MTI from NCS experiment (RR) Compare maximum transfer intervals from theory and experiments

8 Chapter 1 Introduction to Networked Control Systems Networked Control Systems (NCS) are a type of distributed control systems in which sensors, actuators and controllers are interconnected by a shared band-limited digital communication network. This means that the control loops are closed through a real-time network and the control and feedback signals are exchanged among the system s components in the form of information packets. A typical NCS consists of one or more of the following basic elements: sensor actuator controller communication network. The first three elements are often referred to as nodes. The most important feature of a communication network is that it enables us to connect these nodes over long distance (wireless or wired), which reduces the complexity and costs in designing and implementing the control system. Moreover, modifying or upgrading the system by adding sensors, actuators or controllers can be done relatively easy. The potential applications of NCS are numerous and cover a wide range of industries, such as the automobile, process and aeroplane industries. However, the insertion of the communication network in the feedback control loop introduces also negative effects and limitations, which can degrade the performance and even destroy the stability of the closed-loop system. For example, a network causes time-delays in control loops and possible packet losses. Depending on the application, time-delays could impose severe degradation of the performance of the system, as discussed in [10]. Also, the problem of arbitrating access of different nodes on the network becomes an issue, motivating the discussion of the scheduling of nodes and the design and analysis of scheduling protocols suitable for NCS applications. 5

9 In this study an experimental setup of a networked control system is designed and tested for different scheduling protocols on a wireless network. The aim is to identify and characterize properties of the network that influence the control loop and make comparisons with the existing theoretical results in the literature. To make this possible without using an actual real plant, the designed NCS is tested on a linearized model of the unstable batch reactor case study, which is discussed in many previous works, such as [1] and [8]. Moreover, this report will show a practical evaluation of NCS designs using simulations and analysis of Matlab Simulink models and network-in-the-loop experiments. Outline of report This report is divided into six chapters and an appendix. Chapter 1: An introduction to networked control systems (NCS) is presented and the challenges, limitations and possible applications for networks are outlined. Moreover, the goal of this study is described shortly. Chapter 2: The plant model and scheduling protocols used in the experiments with networkin-the-loop (real NCS), the existing theory and the set up of the Matlab Simulink simulations are described. Two scheduling protocols are considered and analyzed in detail: round-robin and random. This analysis is done using the so-called maximum allowable transfer interval (MATI) and the maximum transfer interval (MTI), which are introduced at the end of this chapter. Chapter 3: In this chapter the NCS program code used for the experiments with networkin-the-loop is clarified. First the global structure of the program is mentioned and visualized by a flowchart. After that, each program element is described in detail to clarify how it is programmed. Also some problems that were faced during the experiments with network-in-the-loop are mentioned and their solutions are given. Chapter 4: The theoretical results from the literature and the results from the experiments with network-in-the-loop and simulations in Matlab of the two different protocols are described and visualized. To do this, the resulting system state responses, system state norms and probability density functions of the time between transmissions (transfer intervals) are plotted and the performance data is collected in tables. Moreover, six other protocols are analyzed by simulations in Matlab and their algorithms and results will be presented towards the end of the chapter. This chapter ends with a comparison of the network-in-the-loop experiments and the Matlab simulations to check their resemblance. Chapter 5: In this chapter a comparison is made between the MATIs found in the theory and the MTIs from the experiments with the network-in-the-loop. To do this, both the round-robin and random protocol are treated separately. Chapter 6: The final chapter consist of conclusions from the findings and comparisons in the previous chapters. Some possible topics for future studies are mentioned as well. 6

10 Chapter 2 Plant model and scheduling protocols The network in a NCS is the infrastructure that allows two or more nodes to communicate with each other. The access for each node to the network is regulated by providing a set of rules for communication, called protocols. The protocol determines at each transmission time, which node gets access to the network. In this chapter, the round-robin and random scheduling protocols will be described. Also, an important network parameter called the maximum allowable transfer interval (MATI) will be clarified. This parameter plays a key role in this study, because the stability boundary of networked control systems is based on the MATI. However, it is not possible to determine the MATI for the experiments with the network-in-the-loop. That is why an other approximation of the MATI is used and is called the maximum transfer interval (MTI). But first, we will start by explaining the details of the plant model that will be controlled in the NCS, namely the batch reactor as also used in [2] and [8]. 7

11 2.1 Batch Reactor Instead of using an actual physical plant, we use a linearized model of an unstable batch reactor that is simulated in real-time and can be actuated and observed. The model is used in many NCS stability studies before and finds its origin in [9]. It is a two-input-two-output system that can be written as: ẋ P = A P x P + B P u y = C P x P, [ ] where x P is the state of the system and C P =, A P = , B P = (2.1) The system is controlled by a proportional-integral controller which is prescribed by the following state-space equations ẋ C = A C x C + B C y u = C C x C + D C y, (2.2) where x C is the controller state and [ ] [ A C =, B 0 0 C = 1 0 ] [ 2 0, C C = 0 8 ] [ 0 2, D C = 5 0 In the presence of a network and an associated scheduling protocol, y and u cannot be continuously transmitted between the plant and controller. The network causes the next limitations: transmissions occur only at specific transmission instants t i only one signal is allowed to be transmitted onto the network at a given transmission instant t i. Let ŷ and û denote the networked versions for y and u, respectively, which are available to and maintained by the devices that compute the control law and actuate the plant. With zero-order hold sampling, ŷ and û are held constant between transmission instants and updated with components of u and y as those become available during transmission. With this, we can rewrite (2.1) and (2.2) between transmissions as ẋ P = A P x P + B P û ẋ C = A C x C + B C ŷ y = C P x P u = C C x C + D C ŷ (2.3) ŷ = 0 û = 0 8 ].

12 Now, we only have to explain how ŷ and û are updated at transmission instants t i. Typically, when node j (say corresponding to signal y j ) gets access to the network, then ŷ j (t + i ) = y j(t i ) while û(t + i ) = u(t i) and ŷ l (t + i ) = y l(t i ) for l j as these nodes do not get access. This can be expressed nicely in terms of the error that a network induces compared to the network-free system, which is defined as e = ( ey e u ) = ( ŷ y û u ). (2.4) For example, let e y,j = ŷ j y j. Ignoring the effects of quantization and delay, if the jth component of y is transmitted at the ith transmission instant we have ŷ j (t i ) := y j (t i ) e y,j (t i ) := 0. (2.5) The update of ŷ with a certain scheduling protocol (round-robin, Section 2.2.1) is visualized in Figure 2.1. It is clear that components of e are reset or experience jumps at transmissions instants. Hence, in general the new value of the error e from (2.4) can be described by a jump equation, also referred to as a scheduling protocol, at each transmission instant t i and with a scheduling function h of the form e(t + i ) = h(i, e(t i)). (2.6) Assuming that only the two outputs are transmitted over the network (and thus e u = 0), the NCS with error and state equations is obtained and prescribed by (2.6) and ẋ P = A P x P + B P u y = C P x P ŷ = 0 ẋ C = A C x C + B C y + B C e y u = C C x C + D C y + D C e y (2.7) which can be written as ż = [ ẋ ė ] [ A11 A = 12 A 21 A 22 ] [ x e ], (2.8) where state x = [x p x c ] T, error e = e y, z = [x e] T and [ ] [ AP + B A 11 = P D C C P B P C C BP D, A B C C P A 12 = C C B C ], A 21 = [ C P 0 ] A 11, A 22 = [ C P 0 ] A 12. These equations are implemented in Matlab (Appendix A.2) and describe how the state x and error e evolve between transmissions. 9

13 Figure 2.1: Scheduling of 2 outputs with zero-order hold ŷ update 2.2 Scheduling protocols In the previous section it is assumed only the two outputs are transmitted over the network. To assign network access to the two nodes measuring these signals, a scheduling protocol is needed. For instance, the protocol determines which output ŷ j is set to its actual value and which one remains the same. There are two types of protocols that are considered in the literature: static and dynamic. For a NCS with l nodes a static protocol assigns access to the network in a predetermined and cyclic manner. In this case, access to the network does not depend on the values of the error signal at transmission times, so the scheduling function h is independent of the error ( static, if you like). On the other hand, dynamic protocols first take measurements of the error every transmission time and then use this error to compute which node gets access to the network based on an algorithm. In this study, the static round-robin (RR) protocol and a stochastic random protocol are used to experiment with the network-in-the-loop setup and are simulated in Matlab and the results are analyzed later on by using the MATI and the MTI. An introduction to these two analysis parameters will be given in Section 2.3. Moreover, to show the working principle of dynamic protocols, some dynamic schedulers will be described later on in this study Round-robin protocol An example of a static protocol is the round-robin (RR) scheduling algorithm, which is used in the Token Ring and Token Bus network protocols and is often employed as a protocol for time-sharing operating systems. Each node of the network is assigned a unique index and the nodes are scheduled in a fixed order of index. Let there be l > 1 nodes in the NCS and let the protocol grant access to the network to node i 1,..., l at t si+jl for all j N, that is e i (t + s i+jl ) = 0, where e i reflects the error corresponding to node i s signal. Thus, in terms of NCS scheduling, the protocol map h from equation (2.6) has no dependence on state and is prescribed by: h(i, e) = (I (i))e, (2.9) 10

14 where (i) = diagδ 1 (i)i n1,..., δ l (i)i nl, with n i the number of signals corresponding to node i and 1 if i = k + jl for some j N δ k (i) = (2.10) 0 otherwise. It was established in [2] that the round-robin protocol is a uniformly globally exponentially stable (UGES) protocol, as defined below. Definition 1 (UGES protocols): A protocol as in (2.6) is said to be UGES if there exist a Lyapunov function W : N R ne R 0, a 1, a 2 > 0 and a real number ρ [0, 1) such that for all i N and all e R ne : Random protocol a 1 e W (i, e) a 2 e, (2.11) W (i + 1, h(i, e)) ρw (i, e). (2.12) An example of a protocol, where the nodes are scheduled in a stochastic manner, is the random scheduling protocol. The node to be scheduled is chosen randomly from the available nodes. This algorithm is prescribed by: where (i) = diagδ 1 (i)i n1,..., δ l (i)i nl and h(i, e) = (I (i))e, (2.13) δ k (i) = 1 if k = ki 0 otherwise. (2.14) where k i is randomly picked from 1,..., l at transmission time t i with all equal probabilities. 11

15 2.3 Introduction to MATI and MTI Another parameter in the stability analysis of NCS is the maximum allowable transfer interval (MATI), usually referred to as τ. Often the MATI is used in the literature as follows: as long as the transmission times are smaller than the MATI, then the NCS is stable in a suitable sense. In other words, the MATI is introduced to place an upper bound on the time between transmissions of information from sensor node to controller and controller to actuator to still guarantee stability. There are several methods to determine lower bounds on the true MATI. For instance in [2], where Nesic and Teel show that L p stability of the system is preserved if the transmission intervals are smaller than 1 L ln ( L + γ ρl + γ ), (2.15) where ρ [0, 1) characterizes the stability properties of the protocol (as in Definition 1) and it typically depends on the number of nodes l in the network. L characterizes the possible growth of the error e between the actual values of inputs and outputs and their last transmitted values over the network. Finally, γ is the L p disturbance gain that captures robustness properties of the system without the network. For more details, see [2]. The stability of NCS is largely determined by the scheduling protocol used and by the maximum transfer interval between any two transmissions in the network. That is why in the continuation of this study, the different protocols that are simulated in Matlab and used to experiment with network-in-the-loop will be analyzed on stability in terms of the MATI. However, it is not possible to determine one MATI from the experiments with network-in-the-loop. That is why we introduce a new parameter: the MTI (maximum transfer interval). The MTI is the maximal time between two succeeded transmissions that results from an experiment on the network-in-the-loop. Hence, the MTI is not the maximum allowed time between two transmissions, but the maximum time resulting from one experiment with network-in-the-loop. So, the MTI for an experiment that results in an unstable NCS forms an upper bound on the MATI. 12

16 Chapter 3 Networked Control System code Communication networks can be designed and programmed in many different ways and codes. In this study the used program language is Xcode, Apple s premiere development environment for Mac OS X. The Xcode suite includes most of Apple s developer documentation and a program used to construct graphical interfaces (Figure 3.1) and it supports Objective-C source code. Xcode is a flexible tool that provides different ways to customize the development process and makes it suitable for many different applications. In this chapter the NCS program structure and the most important program elements will be discussed. The complete code can be found in Appendix A.5. Figure 3.1: User Interface of NCS program while master 13

17 3.1 NCS code structure For this NCS study five Mac computers are available: two act as sensors and send one of the outputs y 1 or y 2, two act as actuators and receive one of the inputs u 1 or u 2 and one acts as controller (master node) and contains the plant and controller models. The network is sketched in Figure 3.2. With the five nodes, the NCS code has the following global communication structure that is clarified in the flowchart in Figure 3.3 and in the next sections of this chapter in more detail: The system state is initialized and each node starts advertising its service using Bonjour networking (as explained in Section 3.4). The master node discovers all available nodes and broadcasts to all to be ready. Each node executes the scheduling protocol (except for the random protocol, which is executed by the master only) and decides which node j gets access to the network. Node j broadcasts its data. The master node records the time between the current and the previous transmission and updates the system equations. In a real system, the computers that are sensors would be connected to sensors that measure the real plant and the computers that are actuators would be actuating the real plant. One possibility for simulating this is making sure that every computer contains a copy of the plant that is simulated and synchronized with all the other plants. The other possibility is to do what is done here: the computers do not actually send real data, but the master node runs the entire simulation and waits for the nodes on the network to send and receive messages (without real data) before resetting the components of the error to zero. This will guarantee realistic transmission times. Figure 3.2: Network with five nodes 14

18 Figure 3.3: Flowchart of NCS code 15

19 3.2 Determination of the transmission intervals In this study, one of the key parameters is the transmission interval (also known as transfer interval). This parameter is for example used to calculate the MATI and the MTI and is equal to the time between two consecutive arrivals of data packets from two consecutive scheduled nodes at the master node. Therefore, the i th transmission interval is calculated by τ i = t i+1 t i. Hence, in the setup of Figure 3.2, the transmission interval is determined by the master node that stores the time that a data packet from the scheduled node arrives and subtracts this time from the time that a packet from the next scheduled node arrives. The arrival times are determined by a standard command in Xcode. 3.3 Implementation of the system equations As discussed in [1] and Section 2.1, equations (2.8) and (2.6), the linearized model of the controlled batch reactor is described by the following system equations: ż(t) = Az(t) t [t i, t i+1 ] z(t + i ) = h(i, z(t i)), (3.1) where A is the system matrix containing the plant and controller dynamics of the batch reactor (see Appendix A.2), t is the continuous time, t i the transmission times, z is the state [x e] T and h(i, z) equals the scheduling protocol function. The set of equations in (3.1) can be solved for each discrete time step using (3.2): z(t + i+1 ) = h(i + 1, exp(a(t i+1 t i ))z(t + i )). (3.2) However, computing this numerical integration for each sampling period will take a lot of time, especially calculating the exponential term. To shorten the numerical integration time and decrease the data size and memory usage, an alternative formula is used and (3.2) is rewritten as: z(t i+1 ) = exp(aε) k z(t + i ), where ε τ i, k = τ i ε, τ i = t i+1 t i. (3.3) The exponential term exp(aε) in equation (3.3) is constant and pre-computed with parameter ε = When (3.3) is implemented in a loop that computes z(t i+1 ) in k steps, the computation of the exponential term and the numerical integration is faster. 16

20 3.4 Bonjour networking In the NCS program each node runs the same scheduling protocol that computes which node should be scheduled. But what happens if that computed node is not available, for example because it broke down? This kind of situations can be avoided by checking whether or not the node is available for scheduling. A way of introducing this is by implementing Bonjour networking (also known as zero-configuration networking). This enables automatic recovery of available computers, devices and services on Internet Protocol (IP) networks, without the need to enter IP addresses or configure Domain Name System (DNS) servers. In order to provide true zero-configuration experience, the devices must be able to: Allocate IP addresses without a Dynamic Host Configuration Protocol (DHCP) server. Translate between names and addresses without a DNS server. Locate or advertise services without using a directory server. When the Bonjour networking is implemented in the network code, each node will advertise his services (sensor or actuator) and the master node will be able to see all available and advertising nodes on the local network. These available nodes will be shown in a list, which is updated frequently. The advertising of the nodes will be done using the User Datagram Protocol (UDP, see Section 3.5). Although UDP does not guarantee reliability or ordering in the way most other protocols do (like Transmission Control Protocol (TCP)), avoiding the overhead of checking whether every packet actually arrives makes UDP faster and more efficient for applications that do not need guaranteed delivery such as these advertisements. Moreover, UDP is compatible with packet broadcast (sending to all on local network), which makes it ideal for the advertising service. But why use Bonjour? On local area networks (LANs) there are still some problems using IP. Many networks have become reliant on protocols that require no system administration. While IP has emerged as a unifying protocol for wide area networks and the internet, it is not a universal standard on local networks, especially small networks like the one used in this study. These networks do not often have dedicated address and name servers (DHCP and DNS) or a real system administrator. More and more of these small networks are being set up and most users do not want to configure subnet masks or DNS servers and need to be able to plug in a printer or such without taking too much time trying to get the configuration right. The capability that Bonjour provides is the ability to discover available services and choose one from a list, instead of having to know each service s name or IP address in advance. 17

21 For this application the zero-configuration networking is ideal, because the addresses of all nodes do not have to be known and as discussed above, it gives the ability to see all the advertising nodes at each moment. This information can be used for many different purposes. First of all, as soon as a node looses connection it is displayed on the screen (and an alarm signal can be introduced) so that the controller is informed and can repair it. Secondly, the number of available nodes is used in the scheduling protocol and failing nodes will not be scheduled. Finally, when a node stops advertising and disappears from the discovered list, the network should respond to this to keep system stability. How this can be done, will not be discussed in this report but can be studied in the future. 3.5 UDP broadcasting As mentioned in Section 3.4, the advertising and discovering of nodes happens using the User Datagram Protocol (UDP) principle. In this section the UDP broadcasting principle will be clarified. UDP is used to send short messages, known as datagrams, from one networked computer to another. Unlike the Transmission Control Protocol (TCP), UDP does not guarantee reliability or ordering of datagrams: they may drop out or arrive out of order. However, avoiding the checking whether every packet arrives or not makes UDP faster and more efficient for applications that do not need guaranteed delivery. Moreover, UDP is compatible to broadcast to all clients on the local network. This broadcasting is done by sending small data units, containing the actual system data and the UDP header, which consists of the following four fields: destination port, length, checksum (optional) and source port (optional). In the NCS these fields and data are: destination port is equal to the receiving port of the control node length is equal to the length of the user datagram, including the header and the data, and has a minimum value of 8 bytes checksum is used for error-checking of the header and data the actual data is a structure containing four integers and one double (24 bytes). The UDP header and data are not processed by intermediate systems in the network (like computers or network equipment which do not directly support users, but forward received data onward to the intended recipient) and are delivered to the final destination (the control node) in the same form as originally transmitted. Once delivered, the packets are checked using checksum and valid data is passed to the appropriate session layer protocol identified by the destination port number. 18

22 3.6 Network configuration As mentioned in the previous sections, the NCS setup consists of five different computers. The network configuration used in this study, where the master node serves as host of the wireless network, results in some problems. First of all there is a lot of communication over the wireless network, such as internet, the NCS simulation and the fact that one screen acts as interface for all computers. Because of this large amount of communication and data transport on the wireless network, the possibility that collisions occur is very high. Secondly, the fact that the host of the wireless network is also connected to the local area network of the university introduces further problems. Namely, the local area connection port is set as the main communication port of the computer (can be adjusted). As a consequence, when the Xcode program broadcasts to all nodes, the master node does not automatically broadcasts over the wireless port of the computer. Instead, the main (wired) communication port is chosen as broadcast port. This fact should be taken into account during programming and should be declared in the NCS code. The third problem is related to the fact that one computer serves as host of the wireless network in the office. As in all networks, all data transport on the network goes via this host. Hence, when this host does not send the data on to its final destination, the data packet drops out and the NCS gets into an infinitely long time-out. Summarizing, there are three network complications that have to be dealt with: collisions due to amount of communication computer/node connected to multiple networks one computer/node serves as host of wireless network. In the next three sections, these problems and the solutions will be discussed Data packet collisions The best solution to reduce the number of collisions would be the use of a separate wireless network for the NCS simulation. However, in most cases the network is used for multiple purposes, so collisions can not be avoided. Though, the introduction of a wired switch to remote the computers on one screen has a large effect on the number of dropouts. This is achieved while the wireless internet is not used. Although this change in configuration reduces the number of dropouts, the round-robin simulation was not yet stable. The usage of an other faster available wireless network (less traffic, more Mbit/s), instead of the one in the office, resulted in simulations with a very small number ( 0) of dropouts. 19

23 3.6.2 Computer connected to multiple networks Most computers use the wired network port as main network port. When the program is written such that the master node broadcasts to all nodes via a random communication port, this results into a failure of the NCS. Because the random command chooses automatically the main network port, the control node broadcasts over the wired local area network instead of the wireless one. Programming the master node to send the commands over the wireless network port, is quiet simple to accomplish. Because all the nodes in the network have an address of the form x, the address is the broadcast address for the wireless network Wireless network host Because one of the computers is connected to the university network, that computer also serves as host of the wireless network in the office so that wireless internet is available. However, a host of a network also serves as a distribution station and passes on all communication. So each data packet first goes to the host and then to its final destination. When a random node (not the master node) is chosen as host of the wireless network, none of the data will be passed on and the network will wait infinitely long. This can be solved by making the master also the host of the wireless network, because the master already covers the function of distribution station by broadcasting to all nodes and discovering them. 3.7 Contents of data packets In a real NCS the measurements of the sensors will be sent and received as data packets. However, because in this study the NCS is simulated with the batch reactor model from Section 2.1, other data is being sent and received, namely a structure called SystemData. This structure contains the following elements: node number magic number message type state dimension system state. The node number variable is equal to the number of the node that is scheduled by the protocol, which uses the state dimension variable to schedule the right number of available nodes. To check whether or not the sent data packet has arrived at the master node, the magic number integer is compared with a certain constant integer: when the two integers 20

24 are equal, the master received the packet, otherwise the packet dropped out. The message type variable is used to reset the scheduling protocol and can be equal to 0 or 1. It equals 1 when no data dropouts are detected, but when the timer threshold expires in case of the RR protocol, the integer is set to 0, the protocol is reset and the last node transmitted is asked to broadcast again. Finally, the system state variable contains the state values of all available nodes and is updated each time a data packet arrives at the master node. 3.8 Dealing with data packet dropouts In Section is discussed in what way the number of dropouts is reduced. But how does the NCS deal with data packet dropouts that occur because of collisions due to the amount of communication? This depends on the scheduling protocol. When the round-robin node scheduler is used, a time-out of a certain period is applied (see Section 4.2.1). When that period expires, because of a data packet dropped out, the last transmitted node is asked to transmit again. In this way of dealing with larger transfer intervals caused by data dropouts, the RR algorithm is maintained. The random node scheduling protocol has a different working principle. In contrast to the RR scheduler, the random protocol is only executed by the master node. While the master node schedules one of the nodes in a random manner, each node is transmitting its data constantly with a random time between each transmission. The time between each transmission instant is chosen randomly from a certain set of times (see Section 4.2.2), which minimizes the probability that two or more nodes decide to transmit at the same time. In this way, not many data packets will drop out and the system s maximum time between two succeeded transmissions will never be long. 21

25 Chapter 4 Networked Control System stability The protocols described in Section 2.2 are tested on stability for the setup as discussed in Chapter 2 and 3. The maximum allowable transfer interval (MATI) and the maximum transfer interval (MTI) from Section 2.3 are important variables in this analysis. In this chapter the theoretical NCS results providing (conservative) lower and upper bounds on the MATI, the results from the experiments with network-in-the-loop and the Matlab Simulink simulation results will be presented. Before presenting these results, we have to make an important remark. In the literature, a NCS model with two nodes that measure the two outputs is used. However, the network-in-the-loop setup that is used in this study contains four nodes. This means that the theoretical bounds on the MATI would be smaller when a NCS with four nodes was used in the literature and the difference between the values that result from this work and the literature would be larger. The goals of this chapter are to investigate whether or not the network-in-the-loop NCS can be replaced by a reliable Matlab simulation model that is a good approximation of the real system and verify the conservative character of the theoretical MATIs. Note that during all simulations and experiments the initial state z of the system is equal to z(t 0 ) = [ ] T. 22

26 4.1 NCS results from theory Much research is performed on the stability theory of NCS. In Walsh et al. [8] the lower bound τwalsh RR on the MATI on the linearized model of the batch reactor with a RR scheduler is seconds. In other words, the results in [8] guarantee that the NCS is stable as long as the transmission intervals are smaller than seconds. However, the computed lower bound on the transfer interval τwalsh,const RR with equidistant transfer intervals, while the system remains stable, is around 0.06 seconds. In [2], Nesic and Teel determine a theoretical bound of τnesic RR = seconds and an upper bound τnesic,const RR on the MATI (with equidistant τ i ) of seconds. Finally, in [1] an UGES system is achieved with τtabbara RR = seconds. Moreover, Tabbara determined a mean transfer interval bound for a networked system with the random protocol without dropouts: τtabbara rand = 0.02s. These theoretical stability bounds for the transfer interval of a NCS with the round-robin and random scheduling protocols are summarized in Table 4.1. Note that these values result from models with non-equidistant transfer intervals (except otherwise stated). Moreover, as noted before in the introduction of the chapter, the theoretical MATIs would be lower than the values given in the table below when a NCS with four nodes was used in the literature. Table 4.1: Summary of MATI bounds Theoretical MATI with round-robin protocol Definition Notation Value [seconds] lower bound from [1] lower bound from [2] lower bound from [8] computed bound from [8] (equidistant τ i ) computed bound from [2] (equidistant τ i ) τtabbara RR τnesic RR τ RR walsh τwalsh,const RR 0.06 τnesic,const RR Theoretical MATI with random protocol computed bound from [1] τ rand tabbara 0.02 In Chapter 5 of this report, these results will be compared with the results obtained from the network-in-the-loop experiments and Matlab Simulink simulations. 23

27 4.2 Network-in-the-loop experiments Network-in-the-loop experiments with the NCS are performed with two different scheduling protocols: the static round-robin protocol and the stochastic random protocol. In this section the results obtained from experiments with the program and network discussed in the previous sections of this report, will be described Network-in-the-loop with round-robin scheduling The RR protocol is described in Section and can easily be implemented in the NCS code. As discussed in Section 3.8, when a packet dropout occurs the master node waits for a certain amount of time (time-out), after asking the last transmitted node to transmit again. This time-out is the only parameter that can be varied to examine its influence on system stability. In Figures 4.1 and 4.2, the results from the network-in-the-loop experiments are plotted for two different values of the RR time-out: 0.03s and 0.04s. In the probability density function (PDF) plot of the sample times in Figure 4.2, also a normal distributed fit is plotted. The two arrows in the figure indicate the occurrence of some high transfer intervals that are caused by data packet dropouts. As can be seen, this results in a maximal transfer interval of 0.27s, which has a very low probability State x with RR (0.03s time out) p State x p1 State x p2 State x p3 State x p State x and error e with RR (0.03s time out) c State x c1 State x c2 Error e 1 Error e 2 State norm Vector norm of state State x p State x c and error e Probability density Time [s] PDF of sampletimes Time [s] Time [s] Transfer interval [s] Figure 4.1: Results from network-in-the-loop with round-robin (0.03s time-out) 24

28 State x p State x p with RR (0.04s time out) State x p1 State x p2 State x p3 State x p4 x = 0.1 State x c and error e State x c and error e with RR (0.04s time out) State x c1 State x c2 Error e 1 Error e 2 e = 0.1 Probability density State norm Vector norm of state Time [s] PDF of sampletimes z =0.1 NCS sampletimes Normal fit Time [s] Time [s] Transfer interval [s] Figure 4.2: Results from network-in-the-loop with round-robin (0.04s time-out) To analyze the performance of the NCS with the RR protocol based on the network-in-theloop experiments, some characteristic parameters are introduced. These are the minimal times (in seconds) that all the states in x and e and the vector norm of state z, respectively, (see Section 3.3) are smaller than 0.1, defined as t x := mint > 0 i 1, 2, 3, 4, t T, x pi (t) 0.1 t e := mint > 0 i 1, 2, t T, e i (t) 0.1 and x ci (t) 0.1 t z := mint > 0 t T, z 0.1 (4.1) These three characteristic parameters are depicted by the dotted lines in Figure 4.2. Evaluating the results in Figures 4.1 and 4.2 gives the values that are summarized in Table 4.2. As can be concluded from the figures and table, a longer time-out (0.04s) results in smaller t x, t e and t z than the system with a smaller RR time-out of 0.03 seconds, which might be considered surprising. However, the maximum transfer interval of the system with a time-out of 0.03 seconds is relatively large in comparison with the other system, while the other characteristic values and the figures of the normal distributions are similar. Thus, the fact that the system with the smaller time-out is slower, is caused by a small number of large transfer intervals, caused by data packet dropouts. 25

29 Table 4.2: Results from network-in-the-loop with round-robin scheduling Results network-in-the-loop with round-robin scheduling (in seconds) Definition Time-out = 0.03s Time-out = 0.04s With dropouts maximum transfer interval (MTI) mean transfer interval minimum transfer interval t x t e t z To examine the influence of packet dropouts on system stability, an experiment is done using ping to create dropouts. This is achieved by sending much (unimportant) data over the network, causing collisions with the important data packets and leading to packet dropouts. During this experiment the RR time-out from Section 3.8 equals 0.1 seconds and the ping data is sent as frequently as possible. In Figure 4.3 the measured distribution of the transfer intervals, the state norm and the percentage of dropouts are plotted. Again, the arrows are used to indicate large transfer intervals that are caused by data packet dropouts. As shown, the NCS becomes unstable when too many dropouts occur. Evaluating the transfer intervals in Table 4.2 shows that the maximum interval is apparently too large to maintain stability. Moreover, probably several high transfer intervals occur during the experiments, because else the stability of the system would be maintained. In Figure 4.3, the percentage of dropouts is calculated by dividing the number of dropouts by the total number of transmitted data packets at that time. As can be seen, the first serie of consecutive dropouts occur at time is 100s. Though, the system (state norm) remains stable. However, when more dropouts occur (at time 145s), the system shows a peak. Hence, the relation between dropout percentage and state norm peaks can not be clarified precisely. 26

30 4000 PDF of sampletimes Probability density Transfer interval [s] 8 x 104 Vector norm of state State norm Dropout percentage [%] Dropouts using ping Time [s] Figure 4.3: Results from network-in-the-loop with round-robin and dropouts Network-in-the-loop with random scheduling The stochastic random scheduling protocol is described in Section and is, like the RR protocol, easy to implement in the Xcode program (see Appendix A.5). Unlike RR, the random protocol does not have a time-out period when a data packet drops out, but has a certain period between each transmission, which means that each node (scheduled or not) is sending data constantly. In that way, although a data packet might be lost, one of the next data packets sent by the same node will always arrive at the master node. Because this period between each transmission instant is randomly chosen from a time set of small values, the probability that nodes try to transmit at the same time is very low and the system s time-out will never be very large. In this section the time κ between transmissions will be varied to examine the influence of this parameter. Although the values are chosen randomly, the time set of values from which κ is picked can be chosen a priori. In Figures 4.4 and 4.5 the results from the network-inthe-loop are plotted for two different sets: κ (0, 100/3000s) and κ (0, 100/5000s). 27

31 State x p x 105 State x p with Random (100/3000 s) State x p1 State x p2 State x p3 State x p Time [s] State x c and error e 4 x State x and error e with Random (100/3000 s) 105 c State x c State x c2 Error e 1 Error e Time [s] Probability density State norm 5 x Vector norm of state PDF of sampletimes Transfer interval [s] Figure 4.4: Results from network-in-the-loop with random (κ (0, 100/3000)) State x with Random (100/5000 s) p State x p1 State x p2 State x p3 State x p State x and error e with Random (100/5000 s) c State x c1 State x c2 Error e 1 Error e 2 State norm Vector norm of state State x p State x c and error e Probability density PDF of sampletimes Time [s] Time [s] Transfer interval [s] Figure 4.5: Results from network-in-the-loop with random (κ (0, 100/5000)) To analyze the performance of the random scheduling experiments with network-in-theloop, the same criteria as in Section are applied to the results in Figures 4.4 and 4.5. The values are summarized in Table 4.3 and show that the distribution of the two sets of transmission intervals is not very different. Though, one of the sets (κ (0, 100/5000)) maintains system stability, while the other set from Figure 4.4 leads to instability. This might be caused by a few dropouts close after each other around time = 40s, which lead to a relatively large maximum transfer interval of s. After that, the system converges again. Unfortunately, it is difficult to program the recording of the number of dropouts in the experiment with the random scheduling protocol, so it will not be possible to plot the percentage of dropouts. 28

32 Table 4.3: Results from network-in-the-loop with random scheduling Results network-in-the-loop with random scheduling (in seconds) Definition κ (0, 0.033) κ (0, 0.020) maximum transfer interval (MTI) mean transfer interval minimum transfer interval t x 2 t e 0.7 t z Network-in-the-loop on slower network (RR) The stability of the systems in Sections and is mainly influenced by the number of dropouts, thus large maximum transfer intervals. To show what the system does when it is used to experiment with the network-in-the-loop over a slower network with more traffic, thus more data packet collisions, the local wireless network in the office is used. In the experiments with network-in-the-loop the round-robin protocol is used as scheduler and the time-out period equals 0.03s (as used to obtain the results in Figure 4.1). In Figure 4.6 it is shown that the percentage of dropouts lies between 0 and 7%. This relatively high number of dropouts leads to system instability as shown in the state and error figures. 1.5 x 1033 State x p with slower network 2.5 x 1033 State x c and error e with slower network 200 Probability density function of sampletimes State x p State x p1 0.5 State x p2 State x p3 State x p Time [s] State x c and error e State x c1 1.5 State x c2 2 Error e 1 Error e Time [s] PDF State norm Dropouts [%] Transfer interval [s] 3 x Vector norm of state Percentage of dropouts using other network Time [s] Figure 4.6: Results from network-in-the-loop with RR on slower network 29

33 4.3 Matlab Simulink simulation To validate the results from the experiments with network-in-the-loop from the previous sections, a model is designed using Matlab Simulink to simulate and analyze the NCS. Both system elements (batch reactor model and scheduling protocol from Chapter 2) are implemented in the total system in Simulink. The resulting simulation model is shown in Figure 4.7, where the Matlab function block f(x) (upper block) contains the linearized batch reactor model and h(x) (lower block) the scheduling algorithm (RR or random). To apply a sampling time that is comparable with the probability density functions in Figures 4.1 to 4.4, a Gaussian distributed pulse signal is used to approximate the transfer intervals from the experiments and to reset the integrator. The model in Figure 4.7 is simulated for the RR and random protocols and the results are discussed in this section and summarized in Table 4.4. Figure 4.7: Matlab Simulink model of the NCS Simulink simulation with round-robin protocol The round-robin algorithm from Section is implemented in a m-file, given in Appendix A.1.1. This m-file is inserted in the Simulink model from Figure 4.7, together with an approximation of the Gaussian distribution from Figure 4.2 (RR with a time-out of 0.04s). With this configuration, the round-robin simulation of the NCS gives the results shown in Figure 4.8 and the performance data is summarized in Table 4.4. In Figure 4.8 the absolute responses of the states are plotted versus the time and show stable and smooth behavior, without any disturbances (dropouts are not modeled). 30

34 0.6 Simulink RR state x p State x p1 0.2 Simulink RR state x c and error e State x c1 1.5 Vector norm of state State x p State x p2 State x p3 State x p4 State x c and error e State x c2 Error e 1 Error e 2 State norm Probability density Time [s] PDF of sampletimes Time [sec] Time [sec] Sampling time [s] Figure 4.8: Results from Simulink with round-robin protocol Simulink simulation with random protocol The implementation of the random algorithm from Section in Matlab is given in Appendix A.1.2. This m-file is inserted in the h(x) function block from Figure 4.7 and the Gaussian distribution from Figure 4.5 is approximated and applied as an integrator reset signal. Note that the high transfer intervals, due to dropouts, from the experiments with network-in-the-loop from Figure 4.5 are not taken into account in the Gaussian distribution. The simulation of the NCS with the random protocol gives the results in Figure 4.9 and Table Simulink random state x p State x p1 0.2 Simulink random state x c and error e State x c1 1.5 Vector norm of state State x p State x p2 State x p3 State x p4 State x c and error e State x c2 Error e 1 Error e 2 State norm Probability density Time [s] PDF of sampletimes Time [sec] Time [sec] Sampling time [s] Figure 4.9: Results from Simulink with random protocol 31

35 Table 4.4: Results from Matlab Simulink Results from simulations (in seconds) Definition Round-robin Random maximum transfer interval mean transfer interval minimum transfer interval t x t e t z In the table above, the performance results from the Simulink simulations are given. The same criteria are used as in Sections and As shown in the table, the results of the two different protocols are similar and the performances are almost equal. Although the protocols are different (RR and random), for such small and perfect normal distributed transfer intervals the Simulink model apparently gives the same results Simulated protocols In [2], [3] and [7] several other protocols are proposed. Nesic and Teel discuss the modified round-robin, Try-Once-Discard (TOD) and the modified TOD protocols in [2] and [3]. Walsh et al. propose the Constant Penalty, Estimated Error Order and Lag First Order scheduling protocols in [7] (all with TOD as underlying scheduler). These protocols from Walsh are dynamic schedulers as explained in Section 2.2 and use an estimation of the error. These methods are relatively easy to implement, as long as no dropouts occur. As soon as that happens, it becomes difficult to program a mechanism that reacts on this to maintain the right scheduling order. That is why the scheduling protocols mentioned in this section are less robust than the RR and random schedulers. Moreover, the RR and random protocols are easier to implement. This is why only the RR and random scheduling protocols are used in the experiments with network-in-the-loop. The other protocols have been simulated in Matlab Simulink only (see Appendix A.1) and are discussed in this section and their results are summarized in Table 4.5. Let us first introduce the other protocols. Try-Once-Discard In [2], Nesic and Teel describe the UGES try-once-discard (TOD) protocol which operates as follows. Suppose that there are l nodes competing for access to the network, with error vector e = (e T 1 e T 2... e T l )T. The node i with the greatest error at time t sj will be granted access to the network at t + s j and hence the error will be reset to e i (t + s j ) = 0 while 32

36 the others stay the same. If a data packet fails to gain access to the network, it is discarded and thus e i (t + s j ) = e i (t s j ) as the error remains the same. If two or more nodes have equal priority, a pre-specified ordering of the nodes is used to resolve the collision. The protocol model is described by: h(e) = (I Ψ(e))e, (4.2) where Ψ(e) := diagψ 1 (e)i n1, ψ 2 (e)i n2,..., ψ l (e)i nl. I nj are identity matrices of dimension n j with l j=1 n j = n e and 1 if j = min(arg maxi e ψ j (e) := i ) 0 otherwise. (4.3) Modified try-once-discard The modified TOD protocol is described in [3] and behaves like TOD for large e and for small e it makes the error jumps smaller, because it is transmitting less information. It is described by e(i + 1) = h(i, e(i)), where h(e) = (I Ψ(e))e as in equation (4.2), and a modified version of equation (4.3), given by: sat( ej ) if j = min(arg max ψ j (e) := i e i ) 0 otherwise, (4.4) where sat( e j ) is a saturation function that is given in Appendix A.1.4, bounded by a given parameter. In [3] is showed that the modified TOD scheduling protocol is uniformly globally asymptotically stable (UGAS) as in Definition 3 below. Definition 3 (Lyapunov UGAS protocols): A protocol as in Section is said to be Lyapunov UGAS if there exist a Lyapunov function W : R 0 R n R 0, α 1, α 2 K and a real number λ [0, 1) such that for all i N and all e R n : Modified round-robin α 1 ( e ) W (i, e) α 2 ( e ), (4.5) W (i + 1, h(i, e)) λw (i, e). (4.6) Like the modified TOD protocol, the UGAS modified RR is described in [3] and has a similar structure as the normal RR: it behaves exactly like round-robin for e > 1 and 2 for small e it transmits less frequently (e.g. for e ( 1, 1 ] the protocol transmits at a frequency that is 10 times smaller than that of the RR protocol). Consider the protocol in equation (2.9), where (i) = diagδ 1 (i)i s1,..., δ l (i)i sl and 1 1 if e > 0, i = (k + jl), j N δ k (i) = sat( e ) (4.7) 0 otherwise. 33

37 Constant penalty Walsh et al. describe in [7] the UGAS constant penalty (CP) scheduling protocol in the following way: ê i (t + ) = e i (t ) = ẽ(t) ê j (t + ) = ê j (t (4.8) ) + θ, where i represents the transmitted node, j the silent nodes, j i and θ (0, ) is a prespecified constant. When this is written in a discrete way, the following equations result: e + = (I Φ(r, ê))e ê + = (I Φ(r, ê))(ê + θ) + Φ(r, ê) e (4.9) r + = (I Φ(r, ê))(r + 1), where θ is the penalty vector, 1 = [1...1] T, the scheduling function Φ is given by Φ(r, ê) = diagϕ j (r, ê)i sj, j [1,..., l] and 1 if [n =min(arg max ê )] ϕ n (r, ê) = [n =minm : r m M] (4.10) 0 otherwise. In these equations ê is the estimation of the error and M is the threshold for the transmission counter r. This scheduling scheme ensures that every node is visited at least once during any kpt time interval. If r j M, no matter how big ê i is at that instant, node j will be transmitted. If there are two or more nodes for which this applies, the first of those nodes will be transmitted. Estimated error order The UGAS estimated error order (EEO) scheduling algorithm is described in [7] by the next equations, where at every transmission instant the true error equals e i (t + i j ) = 0 and node i keeps silent where its growth rate and error amplitude are estimated by: ˆė i (t) = k i (t) = e i (t i j )/(t ij t ij 1 ) ê i (t) = θ 0 + k i (t) (t t ij ), (4.11) where θ 0 [0, ) is a prespecified small constant. This set of estimated error equations can be rewritten as: e + = (I Φ(r, ê))e ê + = θ 0 + k T, where k = e (4.12) T r + = (I Φ(r, ê))(r + 1), where T is the sampling period and Φ and 1 are given in the CP section. The scheduling scheme is based on the continuity of the plant output and small interval between two consecutive transmissions and the true error of every node is assumed to be piecewise linear. So, the difference with the Constant Penalty scheduler is that the estimated error ê + is updated by using its error growth rate and error amplitude. 34

38 Lag first order The third and last scheduling algorithm Walsh et al. describe in [7] is the UGAS lag first order (LFO) scheme. Actually, this algorithm is a autoregressive filter and uses a time-varying penalty θ(t) which is updated according to the following law: θ(t k+1 ) = (1 1/m)θ(t k ) + ẽ(t k+1 ) /m + θ 0 /m, (4.13) where m [1, ) and θ 0 (0, ) are two prespecified constants. Assume at t k instant, node i is transmitted and all other nodes keep silent, then ê i (t + k ) = e i(t k ) = ẽ k, ê j (t + k ) = ê j(t k ) + θ(t k) for all j i, where θ(t k ) is updated as above in (7). Writing this time-varying scheme in a discrete way, results in the next set of equations: e + = (I Φ(r, ê))e ê + = (I Φ(r, ê))(ê + θ) + Φ(r, ê) e, r + = (I Φ(r, ê))(r + 1), (4.14) where the penalty is updated by θ = (1 1/m)θ+ e /m+θ 0 /m and m and θ 0 are constants. See Section for the definition of the other parameters Φ and 1. Summary of simulated protocols The protocols described in this section are implemented in Matlab files (Appendix A.1) and simulated with the Simulink model in Figure 4.7. However, instead of using the Gaussian time distribution as integrator reset input, Poisson distributed transmission intervals are used as in [1] and [7]. The simulation results in Table 4.5 represent the maximal mean values of the Poisson distributed transfer intervals, while the simulations remain stable. This mean value of the Poisson distribution is a parameter that can be varied in Simulink. These results are obtained by running the simulation model for different values of the mean of the Poisson distribution and determine for which mean value the system gets unstable. Note that these values are not equal to the MATI. Based on the Simulink simulations and literature results, the maximal mean transfer intervals and the estimations of the real MATIs are summarized in Table 4.5. Note again that the simulation model uses a NCS with four nodes, whereas the model in the literature uses a NCS with two nodes and the MATIs would be lower than the theoretical values in the table when four nodes were used. 35

39 Table 4.5: Summary of MATIs for the simulated protocols MATI and MMTI results of simulated protocols (in seconds) Used protocol Literature Simulation try-once-discard [1] modified try-once-discard not available modified round-robin not available constant penalty [7] estimated error order [7] lag first order [7] Network-in-the-loop and Simulink comparison Because simulation is much faster and cheaper than doing experiments on the real system, it would be desirable that the Matlab Simulink simulations are close to the network-inthe-loop experiments. In the following two sections the Simulink results from Section 4.3 will be compared with the NCS experiment results from Section 4.2 to examine this Network-in-the-loop and Simulink: round-robin A model that predicts the behavior of the real system would be ideal. To check whether the Matlab Simulink model of the NCS in Figure 4.7 is a good approximation of the real system, the resulting states of the simulation will be compared with the results from the network-in-the-loop experiments. In this section, RR with a time-out of 0.04 seconds is the scheduling protocol, as shown in Figures 4.2 and 4.8. Moreover, in the Simulink simulations the Gaussian fit of the transfer intervals from Figure 4.2 is used, instead of the exact transfer intervals from the experiments. All states x i and e i and the vector norms display similar results. That is why only x p3 and e y1 = ŷ 1 y 1 are plotted in Figure 4.10 for both the network-in-the-loop experiment and the Simulink simulation. The conclusions on performance that can be drawn from Figure 4.10 are summarized in Table 4.6, where t i is defined in equation (4.1). 36

40 1.5 1 State x p3 Simulink NCS Error state e 1 Simulink NCS Vector norm of both states Simulink NCS State x p Error e State norm z Time [s] Time [s] Time [s] Figure 4.10: Compare results from RR protocol Table 4.6: Compare RR scheduling Compare RR scheduling (in seconds) Definition Simulink NCS mean transfer interval transfer interval variance t x t e t z As shown in the figure and table, the Matlab simulation results in different behavior than the experiment with network-in-the-loop. It is obvious that the normal distribution of the transfer intervals is alike, because in the Matlab simulation a comparable transfer interval distribution is used as in the experiment. Though, we do not use the exact same transfer intervals as in the experiments, especially the sequence of transfer intervals is probably totally different. This might clarify the differences between the network-in-theloop experiments and the Matlab simulations. Also, the performance of both results is quite different. This might be caused by the fact that dropouts occur (and thus large transfer intervals) during the experiments, but are not taken into account in the Simulink model, which results in the smooth response of the simulation plots. Though, the performance results of the experiment and simulation are of the same order (except the error). 37

41 4.4.2 Network-in-the-loop and Simulink: random In this section the results from the experiments with the network-in-the-loop and Matlab Simulink simulations with the random scheduling protocol will be compared. The results from the network-in-the-loop experiments are shown in Section 4.2.2, Figure 4.5 (κ 0 : 100/5000s), and are used to examine the similarity of the Simulink results from Figure 4.9 and the experiments with the network-in-the-loop. As in the RR comparison above, a Gaussian approximation of the transfer intervals is used and all states show similar results. That is why in Figure 4.11 only states x p4 and e y2 = ŷ 2 y 2 are plotted together with the vector norms of both the network-in-the-loop and Simulink state results State x p4 Simulink NCS Error state e 2 Simulink NCS 1.5 Vector norm of both states Simulink NCS State x p Error e State norm Time [s] Time [s] Time [s] Figure 4.11: Compare results from random protocol Table 4.7: Compare random scheduling Compare random scheduling (in seconds) Definition Simulink NCS mean transfer interval transfer interval variance t x t e t z As in the RR comparison in Section 4.4.1, the Simulink model with random scheduling gives different behavior and performance results than the experiments with the network-inthe-loop. The Simulink model shows less disturbances, which is expectable because there are no side effects (such as data packet dropouts) in Simulink, while these are present in the experiments with the network-in-the-loop. Again, the differences might be caused by the usage of a Gaussian approximation of the transfer intervals instead of the exact intervals and sequence from the experiments. 38

42 Chapter 5 Evaluation of theoretical NCS framework In this chapter a comparison is made between the results from previous research, as in [1] and [7], and the network-in-the-loop experiments using the MATI and MTI from Section 2.3. This is done to verify the conservative character of the lower bounds presented in the literature. As shown in Chapter 4 and in the network-in-the-loop experiments, the stability of the NCS is mainly influenced by the number of data packet dropouts and thus by large transmission intervals. These factors are dependent of the used scheduling protocol (time-outs) and, as least as important, of the characteristics of the used (wireless) network. To make a good comparison, it is important to realize that two different wireless networks are available for the network-in-the-loop experiments that are discussed in this study: one that is able to transport data packets with very few dropouts and one with relatively many dropouts because of the increased amount of other traffic. Of course, for applications it is desired to use a network that transports data with as few dropouts as possible. 39

43 5.1 Round-robin protocol comparison In Section 4.1 the results from previous studies on the RR and random protocols are summarized. In Table 5.1 these MATIs for the RR protocol are compared with the MTI obtained from the NCS with network-in-the-loop resulting in stable behavior, which is equal to the one obtained from the NCS experiment with a RR time-out of 0.04s and no dropouts from Table 4.2 and Figure 4.2. This MTI is denoted by τncs,0.04. RR Table 5.1: Compare MATIs from theory with MTI from NCS experiment (RR) MATIs from theory and MTI from NCS (RR, in seconds) τtabbara RR = τnesic RR = τ RR walsh = τ RR ncs,0.04 = As shown in Table 5.1, the MTI obtained from the stable NCS experiment is higher than the MATIs obtained by theoretical calculations. In the literature a lower bound on the MATI is calculated, while in the NCS experiment this lower bound is actually conservative and the MTI results to be higher before the system becomes unstable. Though, doing a new experiment with τncs,0.04 RR = might result in unstable behavior, depending on the number of large transfer intervals. Moreover, the sequence of the transfer intervals might influence the system s stability, while τ i is not exactly Gaussian distributed. Comparing the resulting MTI with the MATIs from the theory, makes clear that in this study an other approximation is determined than in the theory: the authors of previous studies determined conservative lower bounds on the MATI, while the MTIs determined in this study are typically much larger than these lower bounds on the MATI. 5.2 Random protocol comparison In [1], Tabbara determines an average MATI for a NCS system with a random scheduling protocol for different percentages of dropouts. For non-equidistant transmission rates and a network without dropouts, this value τtabbara rand equals 0.02s as displayed in Table 4.1. In Section the MTI τncs rand from the stable network-in-the-loop experiment (κ 0 : 100/5000s) is determined and this value is shown in Table 5.2. Table 5.2: Compare maximum transfer intervals from theory and experiments Maximum (allowable) transfer interval (random, in seconds) τ rand tabbara = 0.02 τ rand ncs =

44 Chapter 6 Conclusion and future work In this study different scheduling protocols are simulated using Matlab Simulink and using a network-in-the-loop setup. The results from the simulations and experiments are compared with each other in Chapter 4 and with previous studies in Chapter 5. These comparisons were done for two reasons: to compare the theoretical bounds from the theory with the ones obtained from experiments with a real network-in-the-loop and say something about the conservative character of the theoretical MATI to design a Matlab Simulink model of the NCS that is a good approximation of the network-in-the-loop setup (real NCS). As concluded in the previous chapters, most studies from the literature compute theoretical lower bounds on the MATI. However, from the experiments with the network-in-the-loop that are performed in this research, with a standard wireless network, it can be concluded that the values of the MATI in the literature are typically much smaller than the MTIs obtained from the network-in-the-loop experiments. An important note here is that the studies in the literature analyse a NCS with two nodes and that in this study a NCS with four nodes is examined. This means that the theoretical lower bounds on the MATI that are given in this work would be even smaller when a NCS with four nodes was analyzed in the literature. Moreover, the MATI might not be such a relevant parameter to analyze the NCS stability. From the network-in-the-loop experiments it seems that the transfer intervals are often having a normal (Gaussian) distribution. This means that the maximum transfer interval has a very low probability and might not be a good parameter in this case. Here, the average transfer interval might be a better parameter to analyze NCS stability. To study this in more detail, we recommend to formulate a stability theory in terms of distributions with certain parameters, such as the average transfer interval and/or the standard deviation, instead of using the MATI. This new stability theory might give better and less conservative results. 41

45 Although eight protocols are mentioned and described in this paper, only two protocols are implemented in the network-in-the-loop setup: the round-robin and random protocols. These two static schedulers are much easier to implement in the program code, because unlike the dynamic schedulers, random and RR do not use the state error to schedule the nodes, which means that the error does not need to be transmitted over the network. This makes them to operate faster and with less calculations. Moreover, the random protocol does not need a certain method for dealing with dropouts, because it is not important which node is scheduled (stochastic) and data is available at any time. The six dynamic protocols are only simulated in Simulink. The best scheduling protocol to use in the real system seems to be the random protocol. Because it is stochastic, the probability that two or more nodes decide to transmit at the same time is very low and therefore the probability that collisions and dropouts occur is very low. Moreover, the random protocol does not have a waiting time when dropouts occur, like RR (Section 3.8), which makes the maximal transfer intervals smaller and thus the NCS faster and faster stable. Finally, as shown in Section 4.4 the results from the Simulink simulations and the networkin-the-loop experiments are comparable. The used performance parameters t x, t e and t z of the simulations and experiments are of the same order. Unfortunately, in the current Simulink model the possibility of dropouts is not implemented, which should be done in future work. Moreover, instead of using the Gaussian distributed approximation of the transfer intervals, we recommend to implement the measured realization of τ i in the Simulink model to see if this results in same behavior of the simulations and experiments. Also, the current NCS program should be tested on a real plant. In this work, a linearized model of a batch reactor is used to simulate a plant that can be actuated and observed. The results show that the NCS simulations with this plant model are stable, so experimenting with a real plant would be a reasonable next step. When this is done, the dropout of a node can be examined as well, because this is not researched in this study. A final note to finish this report. The used model of the NCS with the batch reactor does not contain communication delays. Because each real NCS contains communication delays to deal with, it would be a good idea to implement a model of a network with communication delays in the current Simulink and network-in-the-loop models to examine the effects of communication delays on system stability as well. 42

46 Bibliography [1] M. Tabbara, Networked Control Systems, Analysis & Design, Department of Electrical and Electronic Engineering, The University of Melbourne, [2] D. Nesic, A.R. Teel, Input-output stability properties of networked control systems, IEEE Trans. Automat. Contr., 49(10): , [3] D. Nesic, A.R. Teel, Input-to-state stability of networked control systems, Automatica, 40(12): , [4] D. Nesic, A.R. Teel, L p stability of networked control systems, Proc. 42nd IEEE, Hawaii USA, [5] D. Nesic, A.R. Teel, M. Tabbara, Stability of wireless and wireline networked control systems, IEEE Trans. Autom. Cont., vol.52, no.9, [6] D. Nesic, M. Tabbara, Stability of networked control systems with stochastic protocols, Proc American Cont. Conf., New York City, [7] G.C. Walsh, Hong Ye, L.G. Bushnell, Real-time mixed-traffic wireless networks, IEEE Trans. Ind. Elec., vol.48, no.5, [8] G.C. Walsh, Hong Ye, L.G. Bushnell, Stability analysis of networked control systems, IEEE Trans. Cont. Sys. Techn., vol.10, no.3, [9] H.H. Rosenbrock, Computer-aided control system design, Academic Press, New York, [10] M. Cloosterman, N. van de Wouw, M. Heemels, H. Nijmeijer, Robust stability of networked control systems with time-varying network- induced delays, IEEE CDC, San Diego,

47 Appendix A Matlab and Xcode files 44

48 A.1 Scheduling Protocols A.1.1 Round-robin scheduling Matlab file The mathematical description of the round-robin scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = h ( x ) ; % Round Robin s c h e d u l i n g p r o t o c o l with s t a t e x = [ 8 x1 ] g l o b a l i ; % g l o b a l count v a r i a b l e g l o b a l x0 ; % i n i t i a l s t a t e c o n d i t i o n i = i +1; % each sampling i n s t a n t i i s r a i s e d by 1 i f i == 1 % at time = 0, i e q u a l s 1 out = x0 ; % the output o f h ( x ) e q u a l s the i n i t i a l c o n d i t i o n x0 return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; % e r r o r e e q u a l s the f i f t h t i l l e i g h t h s t a t e nodetoreset = mod( i, 4 ) ; % e q u a l s 0 to 3 i n a f i x e d o r d e r ( 1, 2, 3, 0, 1,.. ) e (1 + nodetoreset ) = 0 ; % s e t s 1 s t t i l l 4 th element o f e to 0 i n a f i x e d o r d e r out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; % output o f h ( x ) e q u a l s s t a t e x A.1.2 Random scheduling Matlab file The mathematical description of the random scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = h ( x ) ; g l o b a l i ; g l o b a l x0 ; % I n i t i a l c o n d i t i o n i = i +1; i f i == 1 out = x0 ; % I n i t i a l c o n d i t i o n return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; randomnumber = c e i l (4 rand ( 1, 1 ) ) ; % node i s chosen randomly e ( randomnumber ) = 0 ; out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; 45

49 A.1.3 Try-once-discard scheduling Matlab file The mathematical description of the try-once-discard scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = htod( x ) ; g l o b a l i ; g l o b a l x0 ; % I n i t i a l c o n d i t i o n i = i +1; i f i == 1 out = x0 ; % I n i t i a l c o n d i t i o n return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; [ maxerror e r r o r ] = max( abs ( e ) ) ; e ( e r r o r ) = 0 ; out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; A.1.4 Modified try-once-discard scheduling Matlab file The mathematical description of the modified try-once-discard scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = hmodifiedtod ( x ) ; g l o b a l i ; g l o b a l x0 ; i = i +1; i f i == 1 out = x0 ; return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; [ maxerror e r r o r ] = max( abs ( e ) ) ; e ( e r r o r ) = s a t u r a t i o n 2 ( e ( e r r o r ), 1 ) ; out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; In this modified TOD m-file, the saturation2 function is calculated by the file below. f u n c t i o n out = s a t u r a t i o n 2 ( e, a ) i f abs ( e ) < a out = e ; return else out = s i g n ( e ) a ; return end 46

50 A.1.5 Modified round-robin scheduling Matlab file The mathematical description of the modified round-robin scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = h ( x ) ; g l o b a l i ; g l o b a l x0 ; i = i +1; i f i == 1 out = x0 ; return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; a = f l o o r (1/ s a t u r a t i o n 2 ( norm ( e ), 1 ) ) ; for j = 1 : 4 i f mod( i, 4 a ) == a ( j 1) e ( j ) = 0 ; end end out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; A.1.6 Constant penalty scheduling Matlab file The mathematical description of the constant penalty scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = hcp( x ) ; % Function h ( x ) for the Constant Penalty p r o t o c o l g l o b a l i ; % Counter g l o b a l r ; % Link t r a n s m i s s i o n counter g l o b a l M; % Threshold for t r a n s m i s s i o n counter r g l o b a l T; % Sampling time g l o b a l eh ; % Estimated e r r o r e ( hat ) g l o b a l x0 ; % I n i t i a l c o n d i t i o n s t a t e x g l o b a l t h e t a ; % I n t e g r a t i o n c o n s t a n t i = i +1; % Counter+1 i f i == 1 % S t a r t out = x0 ; % I n i t i a l c o n d i t i o n s t a t e x eh = z e r o s ( 4, 1 ) ; % I n i t i a l estimated e r r o r e ( hat ) return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; % Error e q u a l s s t a t e 5 to 8 [ maxerror n ] = max( abs ( eh ) ) ; % Maximum o f e r r o r, nth l i n k [ maxr j ] = max( r ) ; % Maximum o f counter r, j t h l i n k i f maxr < M % I f r i s s m a l l e r than M, nth l i n k t r a n s m i t t e d eh = eh+t h e t a ; % Error growth = growth r a t e sampling time + int const eh ( n ) = norm ( e ( n ) ) ; % Transmitted maximal e r r o r e ( hat ) ( n ) = the norm o f e e ( n ) = 0 ; % Transmitted e r r o r i s s e t to 0 47

51 r = r +1; % Counter i s updated with 1 r ( n ) = 0 ; % Transmitted counter i s s e t to 0 e l s e i f maxr >= M; % I f r i s g r e a t e r than M, j t h l i n k t r a n s m i t t e d eh = eh+t h e t a ; % Error growth = growth r a t e sampling time + int const eh ( j ) = norm ( e ( j ) ) ; % Transmitted maximal s i l e n t time e ( hat ) ( j ) = o f e e ( j ) = 0 ; % Phi = 1, so e ( n)+ = 0 r = r +1; % Counter i s updated with 1 r ( j ) = 0 ; % Transmitted counter i s s e t to 0 end out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; % The output e q u a l s the whole s t a t e A.1.7 Estimated error order scheduling Matlab file The mathematical description of the estimated error order scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = heeo( x ) ; % Function h ( x ) for the Estimated Error Order p r o t o c o l g l o b a l i ; % Counter g l o b a l r ; % Link t r a n s m i s s i o n counter g l o b a l M; % Threshold for t r a n s m i s s i o n counter r g l o b a l T; % Sampling time g l o b a l eh ; % Estimated e r r o r e ( hat ) g l o b a l x0 ; % I n i t i a l c o n d i t i o n s t a t e x g l o b a l t h e t a ; % I n t e g r a t i o n c o n s t a n t i = i +1; % Counter+1 i f i == 1 % S t a r t out = x0 ; % I n i t i a l c o n d i t i o n s t a t e x eh = z e r o s ( 4, 1 ) ; % I n i t i a l estimated e r r o r e ( hat ) return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; % Error e q u a l s s t a t e 5 to 8 [ maxerror n ] = max( abs ( eh ) ) ; % Maximum o f e r r o r, nth l i n k [ maxr j ] = max( r ) ; % Maximum o f counter r, j t h l i n k i f maxr < M % I f r i s s m a l l e r than M, nth l i n k t r a n s m i t t e d for z = 1 : 4 % For each l i n k k ( z ) = e ( z ) T; % Error growth r a t e = e r r o r / sampling time ( eq 4 i n [ 7 ] ) eh ( z ) = t h e t a+norm ( k ( z ) ) /T; % Error growth = growth r a t e sampling time + int const end e ( n ) = 0 ; % Transmitted e r r o r i s s e t to 0 r = r +1; % Counter i s updated with 1 r ( n ) = 0 ; % Transmitted counter i s s e t to 0 e l s e i f maxr >= M; % I f r i s g r e a t e r than M, j t h l i n k t r a n s m i t t e d for z = 1 : 4 k ( z ) = e ( z ) T; % Error growth r a t e = e r r o r / by sampling time eh ( z ) = t h e t a+norm ( k ( z ) ) /T; % Error growth = growth r a t e sampling time + int const end e ( j ) = 0 ; % Phi = 1, so e ( n)+ = 0 r = r +1; % Counter i s updated with 1 r ( j ) = 0 ; % Transmitted counter i s s e t to 0 end out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; % The output e q u a l s the whole s t a t e 48

52 A.1.8 Lag first order scheduling Matlab file The mathematical description of the lag first order scheduling protocol in Section is implemented in Matlab as shown in the m-file below. f u n c t i o n out = hlfo( x ) ; % Function h ( x ) for the Lag F i r s t Order p r o t o c o l g l o b a l i ; % Counter g l o b a l r ; % Link t r a n s m i s s i o n counter g l o b a l m; % Constant g l o b a l M; % Threshold for t r a n s m i s s i o n counter r g l o b a l T; % Sampling time g l o b a l eh ; % Estimated e r r o r e ( hat ) g l o b a l x0 ; % I n i t i a l c o n d i t i o n s t a t e x g l o b a l t h e t a ; % I n t e g r a t i o n c o n s t a n t g l o b a l t h e t a 0 ; % I n i t i a l p e n a l t y i = i +1; % Counter+1 i f i == 1 % S t a r t out = x0 ; % I n i t i a l c o n d i t i o n s t a t e x t h e t a = t h e t a 0 ; % I n i t i a l e s timated e r r o r e ( hat ) return end e = [ x ( 5 ) ; x ( 6 ) ; x ( 7 ) ; x ( 8 ) ] ; % Error e q u a l s s t a t e 5 to 8 [ maxerror n ] = max( abs ( eh ) ) ; % Maximum o f e r r o r, nth l i n k [ maxr j ] = max( r ) ; % Maximum o f counter r, j t h l i n k t h e t a = (1 1/m) t h e t a+norm ( e )/m+t h e t a 0 /m; % Estimation o f the e r r o r i f maxr < M % I f r i s s m a l l e r than M, nth l i n k t r a n s m i t t e d for z = 1 : 4 % For each l i n k eh ( z ) = e ( z)+ t h e t a ; % Error growth = growth r a t e sampling time + int const end eh ( n ) = norm ( e ( n ) ) ; % Transmitted maximal e r r o r e ( hat ) ( n ) = norm o f e e ( n ) = 0 ; % Transmitted e r r o r i s s e t to 0 r = r +1; % Counter i s updated with 1 r ( n ) = 0 ; % Transmitted counter i s s e t to 0 e l s e i f maxr >= M; % I f r i s g r e a t e r than M, j t h l i n k t r a n s m i t t e d for z = 1 : 4 eh ( z ) = e ( z)+ t h e t a ; % Error growth = growth r a t e sampling time + int const end eh ( j ) = norm ( e ( j ) ) ; % Transmitted maximal s i l e n t time e ( hat ) ( j ) = norm o f e e ( j ) = 0 ; % Phi = 1, so e ( n)+ = 0 r = r +1; % Counter i s updated with 1 r ( j ) = 0 ; % Transmitted counter i s s e t to 0 end out = [ x ( 1 ) x ( 2 ) x ( 3 ) x ( 4 ) e ] ; % The output e q u a l s the whole s t a t e 49

53 A.2 State-space description of batch reactor The linearized model of the batch reactor from Section 2.1 is implemented in Matlab with the following m-file. f u n c t i o n out = f ( x ) ; % State space l i n e a r i z a t i o n o f batch r e a c t o r % Plant Ap = [ ] ; Bp = [ ] ; Cp = [ ] ; Dp = [ ] ; % C o n t r o l l e r Ac = [ ] ; Bc = [ ] ; Cc = [ ]; Dc = [ ] ; % Total ( page 81) A11 = [ Ap+Bp Dc Cp Bp Cc ; Bc Cp Ac ] ; A12 = [ Bp Dc ; Bc ] ; A21 = [Cp [ 0 0 ; 0 0 ] ] A11 ; A22 = [Cp [ 0 0 ; 0 0 ] ] A12 ; % f u n c t i o n xdot = [ A11 A12 ; A21 A22 ] x ; out = xdot ; 50

54 A.3 Matlab file to run Poisson Simulink model To simulate the Simulink model with Poisson time distribution, the next m-file has to be evaluated. %% Simulate Simulink f i l e Poisson c l e a r a l l ; c l c ; c l o s e a l l g l o b a l i ; % Counter g l o b a l r ; % Link t r a n s m i s s i o n counter g l o b a l M; % Threshold for t r a n s m i s s i o n counter r g l o b a l T; % Sampling time g l o b a l eh ; % Estimated e r r o r e ( hat ) g l o b a l x0 ; % I n i t i a l c o n d i t i o n s t a t e x g l o b a l t h e t a ; % I n t e g r a t i o n c o n s t a n t % I n i t i a l c o n d i t i o n s x0 = 0. 5 diag ( eye ( 8 ) ) ; % Counter t h r e s h o l d and i n t e g r a t i o n c o n s t a n t M = 1 0 ; t h e t a =. 1 ; % Poisson parameters T = 1 / 1 0 ; % Sampling time lambda = 1 ; % Poisson d e n s i t y IS = 1 0 ; % I n i t i a l seed % Counters i = 0 ; r = z e r o s ( 1, 4 ) ; % Run s i m u l a t i o n sim ( BatchReactor, 1 0 ) % Simulate for 10 seconds %% P l o t s % Plot s t a t e x f i g u r e ( 1 ) p l o t ( t, s t a t e ( 1, : ), LineWidth, 2 ) hold on p l o t ( t, s t a t e ( 2, : ), r, LineWidth, 2 ) p l o t ( t, s t a t e ( 3, : ), g, l i n e w i d t h, 2 ) p l o t ( t, s t a t e ( 4, : ), k, l i n e w i d t h, 2 ) t i t l e ( EEO s t a t e s x ) x l a b e l ( Time [ s e c ] ) y l a b e l ( S t a t e x ) l e g e n d ( x1, x2, x3, x4 ) g r i d on % Plot e r r o r e f i g u r e ( 2 ) p l o t ( t, s t a t e ( 5, : ), LineWidth, 2 ) hold on p l o t ( t, s t a t e ( 6, : ), r, LineWidth, 2 ) p l o t ( t, s t a t e ( 7, : ), g, l i n e w i d t h, 2 ) p l o t ( t, s t a t e ( 8, : ), k, l i n e w i d t h, 2 ) t i t l e ( EEO s t a t e s e ) x l a b e l ( Time [ s e c ] ) y l a b e l ( Error e ) l e g e n d ( e1, e2, e3, e4 ) g r i d on 51

55 A.4 Matlab files to run Gaussian Simulink model To simulate the Simulink model with normal time distribution, the next m-file has to be evaluated. %% Simulate Simulink f i l e with Gaussian d i s t r i b u t i o n c l e a r a l l ; c l c ; c l o s e a l l g l o b a l i ; g l o b a l x0 ; % I n i t i a l c o n d i t i o n g l o b a l m; g l o b a l v ; % I n i t i a l s t a t e c o n d i t i o n s x0 =. 5 0 diag ( eye ( 8 ) ) ; % Import mean and v a r i a n c e ( normal d i s t r i b u t i o n ) n o r m a l D i s t r i b u t i o n ; % Counter i = 0 ; % S t a r t s i m u l a t i o n sim ( BatchReactor gaussian, 1 0 ) % P l o t s f i g u r e ( 1 ) s u b p l o t ( 1, 2, 1 ) p l o t ( t, s t a t e ( 1, : ), LineWidth, 2 ) hold on p l o t ( t, s t a t e ( 2, : ), r, LineWidth, 2 ) p l o t ( t, s t a t e ( 3, : ), g, l i n e w i d t h, 2 ) p l o t ( t, s t a t e ( 4, : ), k, l i n e w i d t h, 2 ) t i t l e ( Simulink RR s t a t e x ) x l a b e l ( Time [ s e c ] ) y l a b e l ( S t a t e x ) l e g e n d ( x 1, x 2, x 3, x 4 ) g r i d on s u b p l o t ( 1, 2, 2 ) p l o t ( t, s t a t e ( 5, : ), LineWidth, 2 ) hold on p l o t ( t, s t a t e ( 6, : ), r, LineWidth, 2 ) p l o t ( t, s t a t e ( 7, : ), g, l i n e w i d t h, 2 ) p l o t ( t, s t a t e ( 8, : ), k, l i n e w i d t h, 2 ) t i t l e ( Simulink RR e r r o r s t a t e e ) x l a b e l ( Time [ s e c ] ) y l a b e l ( Error e ) l e g e n d ( e 1, e 2, e 3, e 4 ) g r i d on N = [ ] ; [ a b ] = s i z e ( s t a t e ) ; for i = 1 : b n = norm ( s t a t e ( :, i ) ) ; N = [N; n ] ; end f i g u r e ( 2 ) s u b p l o t ( 2, 1, 1 ) p l o t ( t,n, l i n e w i d t h, 2 ) 52

56 x l a b e l ( Time [ s ] ) y l a b e l ( S t a t e norm ) t i t l e ( Vector norm o f s t a t e ) g r i d on % a x i s ( [ ] ) ; s u b p l o t ( 2, 1, 2 ) h i s t ( fake, ) x l a b e l ( Sampling time [ s ] ) y l a b e l ( P r o b a b i l i t y d e n s i t y ) t i t l e ( PDF o f sampletimes ) g r i d on The file above contains the m-file that determines the normal distribution and is given below. %% Make a normal d i s t r i b u t i o n % Load s t a b l e RR data f i l e ( network with 0% dropouts ) load r o u n d r o b i n t i m e o u t l o g f i l e = r o u n d r o b i n t i m e o u t 0 ; % Read column with sampletimes sampletimes = f i l e ( :, 3 ) ; % t h i r d column c o n t a i n s a l l t r a n s f e r t i m e s % C a l c u l a t e mean and v a r i a n c e m = mean ( sampletimes ) ; % c a l c u l a t e the average t r a n s f e r t i m e v = var ( sampletimes ) ; % c a l c u l a t e the v a r i a n c e i n the t r a n s f e r t i m e s [ row column ] = s i z e ( sampletimes ) ; % Make normal d i s t r i b u t i o n f a k e = abs (m + s q r t ( v ) randn ( row, 1 ) ) ; % make a normal d i s t r i b u t i o n with mean m and v a r i a n c e v % that approaches the r e a l t r a n s f e r t i m e s 53

57 A.5 NCS program code In this appendix the NCS program code is given. As discussed before, it is written in Xcode with the C language. These twelve files are the entire code, but the program also has a user interface. How this interface looks like, depends on what kind of node is selected: when the master is selected the interface is shown in Figure 3.1; selecting one of the other nodes will result in the interface shown below in Figure A.1. Note that the.h files are used to declare (global) parameters and properties. The actual commands are written in the.m files. Another note, in this study no quantization is used, although it is shown in the UI. Figure A.1: User Interface of NCS program with node To clarify the working principle of the code, a brief instruction is given. Starting program Controller.m: (void)awakefromnib with (IBAction)refreshGraph, (void)setuplabelsforaxiswithrange and (void)setuplabelsforaxiswithrangex make the graph view; (id)init makes drop down menus for protocols and declares parameters. System.m: systemmatrix is initialized; socketcallback declares communication parameters; (id)init initializes parameters and makes sockets. Selecting scheduling protocol Controller.m: in (id)init the selected scheduling protocol is assigned to self.currentschedulingprotocol. Selecting node Controller.m: (IBAction)setNode updates UI to correspond with the right selected node (Figure 3.1 or A.1); if the master is selected, it starts discovering for searchforservicesoftype using (void)readallthedata and (void)netservicebrowser; if a normal node is selected, it starts advertising on the netservice using NSApplicationTerminateReply, (void)netservicewillpublish, (void)netservice and (void)netservicedidstop. 54

Networked Control Systems:

Networked Control Systems: Networked Control Systems: an emulation approach to controller design Dragan Nesic The University of Melbourne Electrical and Electronic Engineering Acknowledgements: My collaborators: A.R. Teel, M. Tabbara,

More information

NOWADAYS, many control applications have some control

NOWADAYS, many control applications have some control 1650 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL 49, NO 10, OCTOBER 2004 Input Output Stability Properties of Networked Control Systems D Nešić, Senior Member, IEEE, A R Teel, Fellow, IEEE Abstract Results

More information

Chapter 5 A Modified Scheduling Algorithm for The FIP Fieldbus System

Chapter 5 A Modified Scheduling Algorithm for The FIP Fieldbus System Chapter 5 A Modified Scheduling Algorithm for The FIP Fieldbus System As we stated before FIP is one of the fieldbus systems, these systems usually consist of many control loops that communicate and interact

More information

Delay compensation in packet-switching network controlled systems

Delay compensation in packet-switching network controlled systems Delay compensation in packet-switching network controlled systems Antoine Chaillet and Antonio Bicchi EECI - L2S - Université Paris Sud - Supélec (France) Centro di Ricerca Piaggio - Università di Pisa

More information

Appendix A Prototypes Models

Appendix A Prototypes Models Appendix A Prototypes Models This appendix describes the model of the prototypes used in Chap. 3. These mathematical models can also be found in the Student Handout by Quanser. A.1 The QUANSER SRV-02 Setup

More information

NONLINEAR CONTROL with LIMITED INFORMATION. Daniel Liberzon

NONLINEAR CONTROL with LIMITED INFORMATION. Daniel Liberzon NONLINEAR CONTROL with LIMITED INFORMATION Daniel Liberzon Coordinated Science Laboratory and Dept. of Electrical & Computer Eng., Univ. of Illinois at Urbana-Champaign Plenary talk, 2 nd Indian Control

More information

Stability Analysis of Networked Linear Control Systems with Direct-Feedthrough Terms

Stability Analysis of Networked Linear Control Systems with Direct-Feedthrough Terms Stability Analysis of Networked Linear Control Systems with Direct-Feedthrough Terms S.H.J. Heijmans a, R. Postoyan b, D. Nešić c, N. Noroozi d, W.P.M.H. Heemels a a Eindhoven University of Technology,

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee & Dianna Xu University of Pennsylvania, Fall 2003 Lecture Note 3: CPU Scheduling 1 CPU SCHEDULING q How can OS schedule the allocation of CPU cycles

More information

Distributed Systems Fundamentals

Distributed Systems Fundamentals February 17, 2000 ECS 251 Winter 2000 Page 1 Distributed Systems Fundamentals 1. Distributed system? a. What is it? b. Why use it? 2. System Architectures a. minicomputer mode b. workstation model c. processor

More information

Time in Distributed Systems: Clocks and Ordering of Events

Time in Distributed Systems: Clocks and Ordering of Events Time in Distributed Systems: Clocks and Ordering of Events Clocks in Distributed Systems Needed to Order two or more events happening at same or different nodes (Ex: Consistent ordering of updates at different

More information

Input-Output Stability with Input-to-State Stable Protocols for Quantized and Networked Control Systems

Input-Output Stability with Input-to-State Stable Protocols for Quantized and Networked Control Systems Proceedings of the 47th IEEE Conference on Decision and Control Cancun, Meico, Dec. 9-11, 2008 Input-Output Stability with Input-to-State Stable Protocols for Quantized and Networked Control Systems Mohammad

More information

Wireless Internet Exercises

Wireless Internet Exercises Wireless Internet Exercises Prof. Alessandro Redondi 2018-05-28 1 WLAN 1.1 Exercise 1 A Wi-Fi network has the following features: Physical layer transmission rate: 54 Mbps MAC layer header: 28 bytes MAC

More information

Stability of networked control systems with variable sampling and delay

Stability of networked control systems with variable sampling and delay Stability of networked control systems with variable sampling and delay Payam Naghshtabrizi and Joao P Hespanha Abstract We consider Networked Control Systems (NCSs) consisting of a LTI plant; a linear

More information

STATE AND OUTPUT FEEDBACK CONTROL IN MODEL-BASED NETWORKED CONTROL SYSTEMS

STATE AND OUTPUT FEEDBACK CONTROL IN MODEL-BASED NETWORKED CONTROL SYSTEMS SAE AND OUPU FEEDBACK CONROL IN MODEL-BASED NEWORKED CONROL SYSEMS Luis A Montestruque, Panos J Antsalis Abstract In this paper the control of a continuous linear plant where the sensor is connected to

More information

requests/sec. The total channel load is requests/sec. Using slot as the time unit, the total channel load is 50 ( ) = 1

requests/sec. The total channel load is requests/sec. Using slot as the time unit, the total channel load is 50 ( ) = 1 Prof. X. Shen E&CE 70 : Examples #2 Problem Consider the following Aloha systems. (a) A group of N users share a 56 kbps pure Aloha channel. Each user generates at a Passion rate of one 000-bit packet

More information

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm Real-time operating systems course 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm Definitions Scheduling Scheduling is the activity of selecting which process/thread should

More information

Motors Automation Energy Transmission & Distribution Coatings. Servo Drive SCA06 V1.5X. Addendum to the Programming Manual SCA06 V1.

Motors Automation Energy Transmission & Distribution Coatings. Servo Drive SCA06 V1.5X. Addendum to the Programming Manual SCA06 V1. Motors Automation Energy Transmission & Distribution Coatings Servo Drive SCA06 V1.5X SCA06 V1.4X Series: SCA06 Language: English Document Number: 10003604017 / 01 Software Version: V1.5X Publication Date:

More information

MOST control systems are designed under the assumption

MOST control systems are designed under the assumption 2076 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 53, NO. 9, OCTOBER 2008 Lyapunov-Based Model Predictive Control of Nonlinear Systems Subject to Data Losses David Muñoz de la Peña and Panagiotis D. Christofides

More information

Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN

Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN Lan Performance LAB Ethernet : CSMA/CD TOKEN RING: TOKEN Ethernet Frame Format 7 b y te s 1 b y te 2 o r 6 b y te s 2 o r 6 b y te s 2 b y te s 4-1 5 0 0 b y te s 4 b y te s P r e a m b le S ta r t F r

More information

Description of the ED library Basic Atoms

Description of the ED library Basic Atoms Description of the ED library Basic Atoms Simulation Software / Description of the ED library BASIC ATOMS Enterprise Dynamics Copyright 2010 Incontrol Simulation Software B.V. All rights reserved Papendorpseweg

More information

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University } 2017/11/15 Midterm } 2017/11/22 Final Project Announcement 2 1. Introduction 2.

More information

CDS 270-2: Lecture 6-1 Towards a Packet-based Control Theory

CDS 270-2: Lecture 6-1 Towards a Packet-based Control Theory Goals: CDS 270-2: Lecture 6-1 Towards a Packet-based Control Theory Ling Shi May 1 2006 - Describe main issues with a packet-based control system - Introduce common models for a packet-based control system

More information

These are special traffic patterns that create more stress on a switch

These are special traffic patterns that create more stress on a switch Myths about Microbursts What are Microbursts? Microbursts are traffic patterns where traffic arrives in small bursts. While almost all network traffic is bursty to some extent, storage traffic usually

More information

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1 NICTA Short Course Network Analysis Vijay Sivaraman Day 1 Queueing Systems and Markov Chains Network Analysis, 2008s2 1-1 Outline Why a short course on mathematical analysis? Limited current course offering

More information

Communication constraints and latency in Networked Control Systems

Communication constraints and latency in Networked Control Systems Communication constraints and latency in Networked Control Systems João P. Hespanha Center for Control Engineering and Computation University of California Santa Barbara In collaboration with Antonio Ortega

More information

Session-Based Queueing Systems

Session-Based Queueing Systems Session-Based Queueing Systems Modelling, Simulation, and Approximation Jeroen Horters Supervisor VU: Sandjai Bhulai Executive Summary Companies often offer services that require multiple steps on the

More information

How to deal with uncertainties and dynamicity?

How to deal with uncertainties and dynamicity? How to deal with uncertainties and dynamicity? http://graal.ens-lyon.fr/ lmarchal/scheduling/ 19 novembre 2012 1/ 37 Outline 1 Sensitivity and Robustness 2 Analyzing the sensitivity : the case of Backfilling

More information

CPU scheduling. CPU Scheduling

CPU scheduling. CPU Scheduling EECS 3221 Operating System Fundamentals No.4 CPU scheduling Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University CPU Scheduling CPU scheduling is the basis of multiprogramming

More information

Discrete-event simulations

Discrete-event simulations Discrete-event simulations Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/elt-53606/ OUTLINE: Why do we need simulations? Step-by-step simulations; Classifications;

More information

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences Data Gathering and Personalized Broadcasting in Radio Grids with Interferences Jean-Claude Bermond a,, Bi Li a,b, Nicolas Nisse a, Hervé Rivano c, Min-Li Yu d a Coati Project, INRIA I3S(CNRS/UNSA), Sophia

More information

Computing Minimal and Maximal Allowable Transmission Intervals for Networked Control Systems using the Hybrid Systems Approach

Computing Minimal and Maximal Allowable Transmission Intervals for Networked Control Systems using the Hybrid Systems Approach Computing Minimal and Maximal Allowable Transmission Intervals for Networked Control Systems using the Hybrid Systems Approach Stefan H.J. Heijmans Romain Postoyan Dragan Nešić W.P. Maurice H. Heemels

More information

A Novel Integral-Based Event Triggering Control for Linear Time-Invariant Systems

A Novel Integral-Based Event Triggering Control for Linear Time-Invariant Systems 53rd IEEE Conference on Decision and Control December 15-17, 2014. Los Angeles, California, USA A Novel Integral-Based Event Triggering Control for Linear Time-Invariant Systems Seyed Hossein Mousavi 1,

More information

Lecture on Sensor Networks

Lecture on Sensor Networks Lecture on Sensor Networks Cyclic Historical Redundancy Development Copyright (c) 2008 Dr. Thomas Haenselmann (University of Mannheim, Germany). Permission is granted to copy, distribute and/or modify

More information

Towards control over fading channels

Towards control over fading channels Towards control over fading channels Paolo Minero, Massimo Franceschetti Advanced Network Science University of California San Diego, CA, USA mail: {minero,massimo}@ucsd.edu Invited Paper) Subhrakanti

More information

cs/ee/ids 143 Communication Networks

cs/ee/ids 143 Communication Networks cs/ee/ids 143 Communication Networks Chapter 4 Transport Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech Agenda Internetworking n Routing across LANs, layer2-layer3 n DHCP n NAT Transport layer

More information

Modeling and Simulation NETW 707

Modeling and Simulation NETW 707 Modeling and Simulation NETW 707 Lecture 6 ARQ Modeling: Modeling Error/Flow Control Course Instructor: Dr.-Ing. Maggie Mashaly maggie.ezzat@guc.edu.eg C3.220 1 Data Link Layer Data Link Layer provides

More information

Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment

Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment Overlay Transport Virtualization (OTV) Unicast-Mode Transport Infrastructure Deployment July 24, 2012 ALL DESIGNS, SPECIFICATIONS, STATEMENTS, INFORMATION, AND RECOMMENDATIONS (COLLECTIVELY, "DESIGNS")

More information

Bounded Delay for Weighted Round Robin with Burst Crediting

Bounded Delay for Weighted Round Robin with Burst Crediting Bounded Delay for Weighted Round Robin with Burst Crediting Sponsor: Sprint Kert Mezger David W. Petr Technical Report TISL-0230-08 Telecommunications and Information Sciences Laboratory Department of

More information

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1.

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1. Coordination Failures and Consensus If the solution to availability and scalability is to decentralize and replicate functions and data, how do we coordinate the nodes? data consistency update propagation

More information

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals CHAPTER 4 Networks of queues. Open networks Suppose that we have a network of queues as given in Figure 4.. Arrivals Figure 4.. An open network can occur from outside of the network to any subset of nodes.

More information

Explicit computation of the sampling period in emulation of controllers for nonlinear sampled-data systems

Explicit computation of the sampling period in emulation of controllers for nonlinear sampled-data systems Explicit computation of the sampling period in emulation of controllers for nonlinear sampled-data systems D. Nešić, A.R. Teel and D. Carnevale Abstract The purpose of this note is to apply recent results

More information

Networked and Quantized Control Systems with Communication Delays

Networked and Quantized Control Systems with Communication Delays Joint 48th IEEE Conference on Decision and Control and 8th Chinese Control Conference Shanghai, P.R. China, December 6-8, 009 FrB7.4 Networked and Quantized Control Systems with Communication Delays W.P.M.H.

More information

FAULT-TOLERANT CONTROL OF CHEMICAL PROCESS SYSTEMS USING COMMUNICATION NETWORKS. Nael H. El-Farra, Adiwinata Gani & Panagiotis D.

FAULT-TOLERANT CONTROL OF CHEMICAL PROCESS SYSTEMS USING COMMUNICATION NETWORKS. Nael H. El-Farra, Adiwinata Gani & Panagiotis D. FAULT-TOLERANT CONTROL OF CHEMICAL PROCESS SYSTEMS USING COMMUNICATION NETWORKS Nael H. El-Farra, Adiwinata Gani & Panagiotis D. Christofides Department of Chemical Engineering University of California,

More information

Event-Triggered Decentralized Dynamic Output Feedback Control for LTI Systems

Event-Triggered Decentralized Dynamic Output Feedback Control for LTI Systems Event-Triggered Decentralized Dynamic Output Feedback Control for LTI Systems Pavankumar Tallapragada Nikhil Chopra Department of Mechanical Engineering, University of Maryland, College Park, 2742 MD,

More information

Information in Aloha Networks

Information in Aloha Networks Achieving Proportional Fairness using Local Information in Aloha Networks Koushik Kar, Saswati Sarkar, Leandros Tassiulas Abstract We address the problem of attaining proportionally fair rates using Aloha

More information

Computer Networks ( Classroom Practice Booklet Solutions)

Computer Networks ( Classroom Practice Booklet Solutions) Computer Networks ( Classroom Practice Booklet Solutions). Concept Of Layering 0. Ans: (b) Sol: Data Link Layer is responsible for decoding bit stream into frames. 0. Ans: (c) Sol: Network Layer has the

More information

Input-Output Stability of Networked Control Systems with Stochastic Protocols and Channels

Input-Output Stability of Networked Control Systems with Stochastic Protocols and Channels Input-Output Stability of Networked Control Systems with Stochastic Protocols and Channels Mohammad Tabbara, Member, IEEE, and Dragan Nešić, Senior Member, IEEE Abstract This paper introduces a new definition

More information

Graphical User Interfaces for Emittance and Correlation Plot. Henrik Loos

Graphical User Interfaces for Emittance and Correlation Plot. Henrik Loos Graphical User Interfaces for Emittance and Correlation Plot Common GUI Features Overview Files Configs Measure Data Point Export Common GUI Features Save Saves the present data. Auto-generated file name

More information

Emulated controller design for networked control systems implemented on FlexRay

Emulated controller design for networked control systems implemented on FlexRay Emulated controller design for networked control systems implemented on FlexRay Wei Wang, Dragan Nesic, Romain Postoyan To cite this version: Wei Wang, Dragan Nesic, Romain Postoyan. Emulated controller

More information

Queueing Theory and Simulation. Introduction

Queueing Theory and Simulation. Introduction Queueing Theory and Simulation Based on the slides of Dr. Dharma P. Agrawal, University of Cincinnati and Dr. Hiroyuki Ohsaki Graduate School of Information Science & Technology, Osaka University, Japan

More information

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

EP2200 Course Project 2017 Project II - Mobile Computation Offloading EP2200 Course Project 2017 Project II - Mobile Computation Offloading 1 Introduction Queuing theory provides us a very useful mathematic tool that can be used to analytically evaluate the performance of

More information

Zeno-free, distributed event-triggered communication and control for multi-agent average consensus

Zeno-free, distributed event-triggered communication and control for multi-agent average consensus Zeno-free, distributed event-triggered communication and control for multi-agent average consensus Cameron Nowzari Jorge Cortés Abstract This paper studies a distributed event-triggered communication and

More information

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems Exercises Solutions Note, that we have not formulated the answers for all the review questions. You will find the answers for many questions by reading and reflecting about the text in the book. Chapter

More information

(Refer Slide Time: 1:42)

(Refer Slide Time: 1:42) Control Engineering Prof. Madan Gopal Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 21 Basic Principles of Feedback Control (Contd..) Friends, let me get started

More information

Robust Stability and Disturbance Attenuation Analysis of a Class of Networked Control Systems

Robust Stability and Disturbance Attenuation Analysis of a Class of Networked Control Systems Robust Stability and Disturbance Attenuation Analysis of a Class of etworked Control Systems Hai Lin Department of Electrical Engineering University of otre Dame otre Dame, I 46556, USA Guisheng Zhai Department

More information

Master thesis. Multi-class Fork-Join queues & The stochastic knapsack problem

Master thesis. Multi-class Fork-Join queues & The stochastic knapsack problem Master thesis Multi-class Fork-Join queues & The stochastic knapsack problem Sihan Ding August 26th, 2011 Supervisor UL: Dr. Floske Spieksma Supervisors CWI: Drs. Chrétien Verhoef Prof.dr. Rob van der

More information

Module 5: CPU Scheduling

Module 5: CPU Scheduling Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 5.1 Basic Concepts Maximum CPU utilization obtained

More information

Methodology for Computer Science Research Lecture 4: Mathematical Modeling

Methodology for Computer Science Research Lecture 4: Mathematical Modeling Methodology for Computer Science Research Andrey Lukyanenko Department of Computer Science and Engineering Aalto University, School of Science and Technology andrey.lukyanenko@tkk.fi Definitions and Goals

More information

QSR-Dissipativity and Passivity Analysis of Event-Triggered Networked Control Cyber-Physical Systems

QSR-Dissipativity and Passivity Analysis of Event-Triggered Networked Control Cyber-Physical Systems QSR-Dissipativity and Passivity Analysis of Event-Triggered Networked Control Cyber-Physical Systems arxiv:1607.00553v1 [math.oc] 2 Jul 2016 Technical Report of the ISIS Group at the University of Notre

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 Basic Concepts Maximum CPU utilization obtained

More information

Clocks in Asynchronous Systems

Clocks in Asynchronous Systems Clocks in Asynchronous Systems The Internet Network Time Protocol (NTP) 8 Goals provide the ability to externally synchronize clients across internet to UTC provide reliable service tolerating lengthy

More information

DISTRIBUTED COMPUTER SYSTEMS

DISTRIBUTED COMPUTER SYSTEMS DISTRIBUTED COMPUTER SYSTEMS SYNCHRONIZATION Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Topics Clock Synchronization Physical Clocks Clock Synchronization Algorithms

More information

Enhance & Explore: an Adaptive Algorithm to Maximize the Utility of Wireless Networks

Enhance & Explore: an Adaptive Algorithm to Maximize the Utility of Wireless Networks Enhance & Explore: an Adaptive Algorithm to Maximize the Utility of Wireless Networks Julien Herzen joint work with Adel Aziz, Ruben Merz, Seva Shneer and Patrick Thiran September 5th, 2011 1/20 Context

More information

CL Digital Control

CL Digital Control CL 692 - Digital Control Kannan M. Moudgalya Department of Chemical Engineering Associate Faculty Member, Systems and Control IIT Bombay Autumn 26 CL 692 Digital Control, IIT Bombay 1 c Kannan M. Moudgalya,

More information

2DI90 Probability & Statistics. 2DI90 Chapter 4 of MR

2DI90 Probability & Statistics. 2DI90 Chapter 4 of MR 2DI90 Probability & Statistics 2DI90 Chapter 4 of MR Recap - Random Variables ( 2.8 MR)! Example: X is the random variable corresponding to the temperature of the room at time t. x is the measured temperature

More information

Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling

Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling Estimation of DNS Source and Cache Dynamics under Interval-Censored Age Sampling Di Xiao, Xiaoyong Li, Daren B.H. Cline, Dmitri Loguinov Internet Research Lab Department of Computer Science and Engineering

More information

System Model. Real-Time systems. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy

System Model. Real-Time systems. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy Real-Time systems System Model Giuseppe Lipari Scuola Superiore Sant Anna Pisa -Italy Corso di Sistemi in tempo reale Laurea Specialistica in Ingegneria dell Informazione Università di Pisa p. 1/?? Task

More information

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.20, steen@cs.vu.nl Chapter 06: Synchronization Version: November 16, 2009 2 / 39 Contents Chapter

More information

2/5/07 CSE 30341: Operating Systems Principles

2/5/07 CSE 30341: Operating Systems Principles page 1 Shortest-Job-First (SJR) Scheduling Associate with each process the length of its next CPU burst. Use these lengths to schedule the process with the shortest time Two schemes: nonpreemptive once

More information

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times Scheduling The objective of multiprogramming is to have some process running all the time The objective of timesharing is to have the switch between processes so frequently that users can interact with

More information

HDR - A Hysteresis-Driven Routing Algorithm for Energy Harvesting Tag Networks

HDR - A Hysteresis-Driven Routing Algorithm for Energy Harvesting Tag Networks HDR - A Hysteresis-Driven Routing Algorithm for Energy Harvesting Tag Networks Adrian Segall arxiv:1512.06997v1 [cs.ni] 22 Dec 2015 March 12, 2018 Abstract The work contains a first attempt to treat the

More information

Robust Network Codes for Unicast Connections: A Case Study

Robust Network Codes for Unicast Connections: A Case Study Robust Network Codes for Unicast Connections: A Case Study Salim Y. El Rouayheb, Alex Sprintson, and Costas Georghiades Department of Electrical and Computer Engineering Texas A&M University College Station,

More information

Time. To do. q Physical clocks q Logical clocks

Time. To do. q Physical clocks q Logical clocks Time To do q Physical clocks q Logical clocks Events, process states and clocks A distributed system A collection P of N single-threaded processes (p i, i = 1,, N) without shared memory The processes in

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 6 (version April 7, 28) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.2. Tel: (2)

More information

A POMDP Framework for Cognitive MAC Based on Primary Feedback Exploitation

A POMDP Framework for Cognitive MAC Based on Primary Feedback Exploitation A POMDP Framework for Cognitive MAC Based on Primary Feedback Exploitation Karim G. Seddik and Amr A. El-Sherif 2 Electronics and Communications Engineering Department, American University in Cairo, New

More information

A model-based approach to control over packet-switching networks, with application to Industrial Ethernet

A model-based approach to control over packet-switching networks, with application to Industrial Ethernet A model-based approach to control over packet-switching networks, with application to Industrial Ethernet Universitá di Pisa Centro di Ricerca Interdipartimentale E. Piaggio Laurea specialistica in Ingegneria

More information

CS418 Operating Systems

CS418 Operating Systems CS418 Operating Systems Lecture 14 Queuing Analysis Textbook: Operating Systems by William Stallings 1 1. Why Queuing Analysis? If the system environment changes (like the number of users is doubled),

More information

DATA ROUTING WITH WIRELESS SENSOR NETWORKS

DATA ROUTING WITH WIRELESS SENSOR NETWORKS DATA ROUTING WITH WIRELESS SENSOR NETWORKS By Thomas J. Reale III A Project Submitted to the Graduate Faculty of Rensselaer Polytechnic Institute in Partial Fulfillment of the Requirements for the Degree

More information

Analysis of random-access MAC schemes

Analysis of random-access MAC schemes Analysis of random-access MA schemes M. Veeraraghavan and Tao i ast updated: Sept. 203. Slotted Aloha [4] First-order analysis: if we assume there are infinite number of nodes, the number of new arrivals

More information

Delay-independent stability via a reset loop

Delay-independent stability via a reset loop Delay-independent stability via a reset loop S. Tarbouriech & L. Zaccarian (LAAS-CNRS) Joint work with F. Perez Rubio & A. Banos (Universidad de Murcia) L2S Paris, 20-22 November 2012 L2S Paris, 20-22

More information

cs/ee/ids 143 Communication Networks

cs/ee/ids 143 Communication Networks cs/ee/ids 143 Communication Networks Chapter 5 Routing Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech Warning These notes are not self-contained, probably not understandable, unless you also

More information

WiFi MAC Models David Malone

WiFi MAC Models David Malone WiFi MAC Models David Malone November 26, MACSI Hamilton Institute, NUIM, Ireland Talk outline Introducing the 82.11 CSMA/CA MAC. Finite load 82.11 model and its predictions. Issues with standard 82.11,

More information

Broadband Internet Access Disclosure

Broadband Internet Access Disclosure Broadband Internet Access Disclosure This document provides information about the network practices, performance characteristics, and commercial terms applicable broadband Internet access services provided

More information

Estimation Techniques for Monitoring and Controlling the Performance of the Computer Communication Networks

Estimation Techniques for Monitoring and Controlling the Performance of the Computer Communication Networks American Journal of Applied Sciences 2 (1): 1395-14, 25 ISSN 1546-9239 25 Science Publications Estimation Techniques for Monitoring and Controlling the Performance of the Computer Communication Networks

More information

Burst Scheduling Based on Time-slotting and Fragmentation in WDM Optical Burst Switched Networks

Burst Scheduling Based on Time-slotting and Fragmentation in WDM Optical Burst Switched Networks Burst Scheduling Based on Time-slotting and Fragmentation in WDM Optical Burst Switched Networks G. Mohan, M. Ashish, and K. Akash Department of Electrical and Computer Engineering National University

More information

Model Predictive Controller of Boost Converter with RLE Load

Model Predictive Controller of Boost Converter with RLE Load Model Predictive Controller of Boost Converter with RLE Load N. Murali K.V.Shriram S.Muthukumar Nizwa College of Vellore Institute of Nizwa College of Technology Technology University Technology Ministry

More information

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences Data Gathering and Personalized Broadcasting in Radio Grids with Interferences Jean-Claude Bermond a,b,, Bi Li b,a,c, Nicolas Nisse b,a, Hervé Rivano d, Min-Li Yu e a Univ. Nice Sophia Antipolis, CNRS,

More information

Solutions to COMP9334 Week 8 Sample Problems

Solutions to COMP9334 Week 8 Sample Problems Solutions to COMP9334 Week 8 Sample Problems Problem 1: Customers arrive at a grocery store s checkout counter according to a Poisson process with rate 1 per minute. Each customer carries a number of items

More information

Recap. CS514: Intermediate Course in Operating Systems. What time is it? This week. Reminder: Lamport s approach. But what does time mean?

Recap. CS514: Intermediate Course in Operating Systems. What time is it? This week. Reminder: Lamport s approach. But what does time mean? CS514: Intermediate Course in Operating Systems Professor Ken Birman Vivek Vishnumurthy: TA Recap We ve started a process of isolating questions that arise in big systems Tease out an abstract issue Treat

More information

Stability Analysis of Stochastic Networked Control Systems

Stability Analysis of Stochastic Networked Control Systems 21 American Control Conference Marriott Waterfront, Baltimore, MD, USA June 3-July 2, 21 ThB16.3 Stability Analysis of Stochastic Networed Control Systems M.C.F. Doners, W.P.M.H. Heemels, D. Bernardini,

More information

Load Balancing in Distributed Service System: A Survey

Load Balancing in Distributed Service System: A Survey Load Balancing in Distributed Service System: A Survey Xingyu Zhou The Ohio State University zhou.2055@osu.edu November 21, 2016 Xingyu Zhou (OSU) Load Balancing November 21, 2016 1 / 29 Introduction and

More information

Switched Systems: Mixing Logic with Differential Equations

Switched Systems: Mixing Logic with Differential Equations research supported by NSF Switched Systems: Mixing Logic with Differential Equations João P. Hespanha Center for Control Dynamical Systems and Computation Outline Logic-based switched systems framework

More information

Stability Analysis of Networked Control Systems Using a Switched Linear Systems Approach

Stability Analysis of Networked Control Systems Using a Switched Linear Systems Approach Stability Analysis of Networked Control Systems Using a Switched Linear Systems Approach Tis Donkers, Maurice Heemels, Nathan Van de Wouw, Laurentiu Hetel To cite this version: Tis Donkers, Maurice Heemels,

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Input-to-State Stability of Networked Control Systems

Input-to-State Stability of Networked Control Systems Input-to-State Stability of Networked Control Systems D.Nešić a, A.R.Teel b, a Department of Electrical and Electronic Engineering, The University of Melbourne, Parkville, 3052, Victoria, Australia. b

More information

CPU Scheduling. CPU Scheduler

CPU Scheduling. CPU Scheduler CPU Scheduling These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of each

More information

The Weakest Failure Detector to Solve Mutual Exclusion

The Weakest Failure Detector to Solve Mutual Exclusion The Weakest Failure Detector to Solve Mutual Exclusion Vibhor Bhatt Nicholas Christman Prasad Jayanti Dartmouth College, Hanover, NH Dartmouth Computer Science Technical Report TR2008-618 April 17, 2008

More information

14 Random Variables and Simulation

14 Random Variables and Simulation 14 Random Variables and Simulation In this lecture note we consider the relationship between random variables and simulation models. Random variables play two important roles in simulation models. We assume

More information

Process Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach

Process Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach Process Scheduling for RTS Dr. Hugh Melvin, Dept. of IT, NUI,G RTS Scheduling Approach RTS typically control multiple parameters concurrently Eg. Flight Control System Speed, altitude, inclination etc..

More information

CHAPTER 3 MATHEMATICAL AND SIMULATION TOOLS FOR MANET ANALYSIS

CHAPTER 3 MATHEMATICAL AND SIMULATION TOOLS FOR MANET ANALYSIS 44 CHAPTER 3 MATHEMATICAL AND SIMULATION TOOLS FOR MANET ANALYSIS 3.1 INTRODUCTION MANET analysis is a multidimensional affair. Many tools of mathematics are used in the analysis. Among them, the prime

More information