Generalized Predictive Control in a Wireless Networked Control System

The NCS (networked control system) is different from the conventional control systems which is the integration of the automation and control over communication network. When an NCS operates over the communication network, one of the major challenges is the network-induced delay in data transfer among the controllers, actuators, and sensors. This delay degrades system performance and causes system unstablility. This paper proposes a GPC (generalized predictive control) with the Kalman state estimator to compensate for the network-induced delay and packet loss. The GPC is implemented in WiNCS (Wireless NCS) based on IEEE 802.11 standard. An analytical NCS model and NS2 (network simulator version 2) are developed to simulate and evaluate the performance under the effect of various delays and packet loss rates. The result shows that the proposed GPC is adaptive and robust to the uncertainties in a time-delay system. The WiNCS is evaluated with latency and throughput measurements in various environments. The experiment setup conforming to the IEEE 802.11 standard achieves an average latency of 1.3 ms and a data throughput of 3.000 kB/s up to a distance of 70 m. The results demonstrate the feasibility of real-time closed-loop control with the proposed concept.


I. INTRODUCTION
Using data network, Ethernet cable, or wireless as the communication protocol in the feedback control loop has gained increasing attentions due to its cost effectiveness and flexibility.The Networked Control System (NCS) closes the feedback control loops through a network and the control signals to the actuators and the feedback signals from sensors are in the form of information packages [1][2].
Interconnecting the sensors, actuators, and controller via networks can eliminate wiring, reduce installation costs, and conduct remote monitoring and tuning.Further components and modules can be added without additional circuitry to the existing layout.The controllers can effectively share the data and the data can be further fused and integrated easily to the controller to make an intelligent decision or optimal operation in a large and complex process [3].Dong et al. [4] modeled an NCS with both networkinduced delay and packet loss in a transmission network.They proposed the feedback gain of a memory-less controller and derived the maximum allowable value of the network-induced delay by solving a set of linear matrix inequalities.
Garcia and Antsaklis [5] proposed the Model-Based Networked Control System which applies to a lifting process for resulting a Linear Time-Invariant and the asymptotic stability were analyzed.
A randomized multi-hop routing protocol causes timevarying delays for transmitting the sensor and control signal over the wireless network.Witrant et al. [6] proposed a predictive control scheme with a delay estimator, based on a Kalman filter with a change detection algorithm.
Loon and de Silva [7] proposed a GPC to compensate data-transmission delays incorporating a minimum-effort estimator to estimate missing or delayed sensor data and apply a variable-horizon adaptive GPC controller to predict the control actions to track a reference trajectory.
This paper proposes a wireless network control system algorithm and architecture based on the WLAN IEEE 802.11 technology.The Generalized Predictive Control (GPC) is applied to predict the network-induced delay and simulates it through the wireless network environment using the Network Simulator version 2 (NS2) in Linux.The PiccSIM is used as the platform in the client/server architecture for the WiNCS.The contribution of the proposed paper is summarized as The control system operation in communication networks and the NCS model with network-induced delay and packet loss using a general SISO NCS model is analyzed.
A GPC control algorithm with the Kalman state estimator is implemented in WiNCS to reduce the network-induced delay effect.Experimental results confirm effectiveness of the proposed methodology.

II. ANALYSIS
The primary factors affecting NCS performance [8-10] are 1) Networked-induced delay, 2) Network scheduling, 3) Single-packet and multiple-packet transmission, 4) Packet loss and 5) Noise and Disturbance.The conventional control strategies are insufficient to deal with those issues and need alternative approach for system modeling and analysis to address NCS characteristics and further construct an appropriate control strategy.

A. Networked-induced delay
Multiple time delay induced while the data transfer across the network among the controllers, actuators, and sensors as Propagation delay ( ): the data transmission time via wired or wireless networks is determined by the size of packet, bandwidth, and transmission distance.

Switching delay (
): the time required for data passing through electronic instruments such as a bridge, router, and switch.The instruments cannot send the data until all the packets have arrived.

Access delay (
): the time a network interface waits before it can access the network, mostly during packet collision or network congestion.

Queuing delay (
): the time for newly arrived packets to wait until the previous packets have been sent.The packets will be queued by each switching device during the packet exchange in the communication network.

B. Delay Characteristic in NCS Model
Figure 1 shows the general NCS mode induced delay.There are two sources of delays from communication network, controller, τ , and the controllers-to-actu controller processing delay τ is negligible i the network transmission delays.For analysis purposes, the sensor-to-con the controller-to-actuator delay can be lumped Figure 2 shows the network delay propa where is the process input, is the proces time index, and T is the sampling time [12] as  The NCS model with packe without considering the networkswitches are on, the controller out and the controller input equal to switches are off, the system inpu remain in the preceding state.The loss is represented as follows as sho of packet loss occurring in vely.P GB and P BG is the G" to "B" and "B" to "G" hannel.If the transmission ability of state change from follows: n the GE model is ay and packet loss et loss is constructed first induced delay.When the tput equal to system input system output.When the ut and the controller input e NCS model with packet own in Table 1.
NETWORK CONDITION The controlled system is rewritten from ( 1) and ( 4) as The discrete-time equation is rewritten from ( 2) and ( 6) Where , The discrete-time model of the state feedback controller can be represented by ( ) ( ) , where K is a gain matrix of the controller.From ( 7) and ( 8), let ( ) ( ) ( ) ( 1) , the state feedback of the NSC model with packet loss and delay is derived as follows The switching probability of Φ for event i is according to the state of K 1 and K 2 , as the packet loss rate in (3).

III. METHODOLOGY
When the control system operates over the networks, the network-induced delay affects system performance.The traditional controller generates a signal at every sample time.If the network-induced delay exceeds one sample time, the new control signal cannot update the actuator which lead to an unstable control system.To avoid this situation, the controller generates one control signal series, including the predictive control signal, so the actuator can implement the backup control signal when network-induced delay occurs.

A. Adapter GPC
Assume a single-input single-output system operates around a specific set point after linearization.A predictive model known as the "Controlled Auto-Regressive Integrated Moving-Average" for Generalized Predictive Control as where ( ) is output signal, ( ) is input signal; ( ) is zero mean white noise.A, B and C are expressed as For simplicity, ( ) polynomial is chosen to be 1.To enhance system robustness, the cost function includes the influence of u(k), and GPC algorithm apply control sequence to minimize a multistage cost function as Where ( ) is the optimal j-step ahead prediction of system output, n 1 and n 2 are the minimum and maximum of the prediction horizons H ; H is the control horizon; ( ) and ( ) are weighting sequences.( ) is the future reference trajectory as: y(k) and y r are set points and future outputs of the system respectively.α is a parameter between 0 and 1 to adjust the system response (closer to 1, smoother response).Diophantine equation for predicting the precede j-step output as where ( ) 1 ( ) .A state-space description [16][17] is given with dimension of the state vector as max (na+1, nb+1, nc) Where 1 0 0 0 1 0 0 0 0 0 0 0 , 0 0 , 1 0 0 0 where is the coefficient of polynomial given by (11).The random variable and represent disturbance input and measurement (sensor) noise and they are assumed as white Gaussian zero-mean with normal probability distributions. ( The z-domain transfer function R(z) and current output y(k) is obtained as The output is obtained at the predictive horizon 3) The prediction state of the system is then obtained as A ( )

( ) A ( ) Δ ( )
A general term of ( ) with ( 1,2,3 , ) as The predictive output is ∆ , where ( ) The cost function is applied to the control action [18] and is formulated by penalization matrixes, and The cost function ( 16) is rewritten as To minimize the cost function (17), the solution of the algebraic equation is the control action as follows The above solution is re-organized as The QR decomposition method based on the Householder algorithm is applied in the decomposition of matrix , where R is an upper triangular matrix and Q is an orthogonal matrix.( 18) is written as ( ∆ ) 0 and the control signal is obtained as ∆ is the control signal for the whole predictive horizon N, and the actual control signal is the first element in (19).

B. State estimator
The optimal estimator to compute the state is based on the Kalman filter.The j step ahead system output is The estimation of the state vector x can be obtained with the Kalman filter as follows ( ) ( 1) Δ ( 1) Δ ( 1) where ( ) ( 1) T ( 1) T , is the Kalman filter gain matrix to adapt the estimation of model states to measure the controlled system outputs.

C. Experimental setup
The experimental hardware setup for WiNCS simulation is illustrated in Figure 6.Matlab/Simulink runs in Windows XP based client workstation for the emulation of the NCS Server/Client structure and network simulator version 2 (NS2) in Linux based server workstation for the emulation of the NCS wireless network environment.Client/ server is interconnected through an Ethernet cable and router for sharing the same simulation data The PiccSIM toolbox [19] is a Matlab xPC based target toolbox adopted in the proposed approach as to transmit user datagram protocol (UDP) packet between Matlab/Simlink and NS-2.The experimental setup is illustrated in Figure 7.To emulate the real NCS structure, the Server/Client module is setup through Matlab toolbox at the client workstation.2 presents the controller and actuator/sensor nodes configuration of IEEE 802.11b in NS2.When the network devices receive a large number of packets that exceed its maximum capacity, the newly arrived packets will be dropped until the network devices have a free queue space to accept incoming traffic.The AODV is implemented as a routing protocol algorithm in NS2, which builds a route to a destination only on demand.The propagation model is a Two Ray Ground model [20] which considers transmission power consumed by a line-ofsight path between two mobile nodes and a ground reflection.The received power P r is presented as follows     The experiment implements the adaptive GPC with the state estimator, based on Kalman filter, and encapsulates the control signal and the sensor measurement into packets, transmitted in the wireless simulated environment IEEE 802.11b in NS2. Figure 9 shows the simulation architecture.

IV. RESULTS
Figure 10 shows the system response with a sample time of 0.3 sec.Figure 11 and 12 shows the controller-to-actuator delay, sensor-to-controller delay, and sensor disturbance measurement respectively.The system is stable but with a higher overshoot and a longer settling time.Different sample times affect the system performance.For a system with a shorter sample time, the sender must generate more data packets.This might raise the packet loss rate and shorten the predictive horizon, which may make the system unstable.Figure 13, 14 and 15 shows the system response with a sample time of 0.2 sec.The system response is highly jittered with a longer settling time.Sender_c (n0) and Receiver_s (n1) dropped two packets and the dropped packet sizes were 132 bytes, presented in Table 5.In this situation, the system response could not follow the reference trajectory.V. CONCLUSION Network-induced delays in the wireless communication network are difficult to model, however this paper investigates the main problems that induce the time delay.With WiNCS simulated in NS2 using the Two Ray Ground model, this paper simplifies complex architectures in the wireless communication network for analysis proposes.First, this study implements WiNCS with the random delay to verify GPC controller capability with the Kalman state estimator to cope with time delay.Then WiNCS is implemented with NS2 to present the effect of different sampling times in the predictive horizon, namely system performance decreases when sample time decreases.When WiNCS is implemented with the sample time of 0.2 seconds, the packets start to drop, affecting system performance.
This paper proposes the WiNCS simulation on a lowlevel control system.Realizing WiNCS requires not only improving the control algorithm to compensate for time delay, but also improving wireless communication performance.The time delay generates when the packets exchange in the network.The algorithm for optimizing network performance communication is also important.

Fig. 2
Fig. 2 Timing diagrams of network delay propC.Packet loss modelIn IEEE 802.11, the wireless loss can be patterns, distributed loss and burst loss as show

Fig. 3 Fig. 5 NCS
Fig. 3 Two types of packet loss in wirelesRandom uniform model is widely used loss and the Gilbert-Elliott model[13] for bu model contains two states of the Mark transmission channel is either available or n named as "G (good)" or "B (bad)" respectively

( 3 )
he NCS Model with Delay continuous-time system and rive the NCS model as and ( ) (4) a fixed sample period of T e event driven, and execute ration immediately after mode, the probability of t vable and the measurement y is less than the sample hitecture of the NCS model s the system input (actuator sensor measurement), ( ) nd output [4,10, 14-15].A n/off rate is used to emulate communication network.

Fig. 7
Fig. 7 Software Architecture Table2presents the controller and actuator/sensor nodes configuration of IEEE 802.11b in NS2.When the network devices receive a large number of packets that exceed its maximum capacity, the newly arrived packets will be dropped until the network devices have a free queue space to accept incoming traffic.The AODV is implemented as a routing protocol algorithm in NS2, which builds a route to a destination only on demand.
:Transmission power, G t: :Transmission antenna gain, G r :Received antenna gain, h t :Transmission antenna height, h r :Received antenna height, d:Distance between sender and receiver and L:System loss factor.

Figure 8
Figure 8 shows the wireless simulated environment in NS2.The Controller node (n0) and Actuator/Sensor node (n1) transmit the data packet via the IEEE 802.11b as an end-toend transmission.The coordinates of the two nodes are (10, 10) of n0 and (60, 60) of n1, and each node propagation distance is 250 meters in the Two Ray Ground model.

TABLE II
Table 3 shows the IEEE 802.11b simulation parameters in NS2.

TABLE III IEEE
802.11B SIMULATION PARAMETERS IN NS2 Parameters Value Transmit/ Received Antenna Gain G t and G r 1 System Loss Factor L/ Propagation Frequency 1.0 / 2.472 GHz Data Rate (Bandwidth)/ Transmit Power P t 11 Mb/ 0.0316 Collision Threshold/ Carrier Sense Power 10.0/ 5.011872e-12 Received Power Threshold/ Rate for Data Frames 5.82587e-09/ 11 Mb Rate for Control Frames 1 Mb Controller node: The controller node contains the GPC controller, Kalman state estimator, sender, and receiver.The reference trajectory (controller input) is a square wave with a 15 sec.periodand one peak between 0 to 100 secs.Actuator/Sensor node: The actuator/sensor node includes the actuator, plant, sensor, sender, and receiver.The sensor measurement disturbance is implemented with a white noise distribution.A plant model in discrete state-space is

TABLE IV SIMULATION
INFORMATION OF NODES Simulation Information Number of packets generated/ Number of packets sent 668/ 668 Average packet bytes/ Number of bytes sent 43.77/44048