Abstract
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.
1. Introduction
In recent years, there has been an increasing interest in implementing networked transmission protocols (e.g., wire/wireless local area networks) in automation and control system. Cost effectiveness and flexibility are achieved using communication protocol in the feedback control.
The NCS closes the feedback control loops through a real-time network. 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 controllers via networks can eliminate wiring, reduce installation costs, and enable remote monitoring and tuning. Additional components and modules can be added without additional circuitry to the existing layout. The controllers effectively share the data via the information technology allowing easy data fusion and integration to the controller for an intelligent decision or optimal operation in a large and complex process [3, 4]. The potential applications of NCS include industrial automation, military, hazardous environment exploration, or robots application.
Three methods on scheduling packets were proposed to improve NCS performance and stability as static scheduler, try-once-discard (TOD) scheduler with continuous priority level, and TOD with discrete priority level [5, 6].
A networked DC motor control system was proposed using controller gain adaptation to compensate the changes in QoS (quality-of-service) requirements over time-varying network [7].
Stabilization of NCS was investigated in the discrete-time domain with random delays [8]. Two Markov chains were applied to model the delay on controller-to-actuator delay and sensor-to-controller.
Model-based NCS was proposed using an explicit model of the plant to produce an estimate of the plant state during transmission delay. The stability was evaluated for the controller/actuator which was updated with sensor information at nonconstant time intervals [9].
An NCS model including network-induced delay and packet loss in transmission network was proposed. The feedback gain of a memory-less controller and the maximum allowable value of the network-induced delay were derived by solving a set of linear matrix inequalities [10]. Two predictors estimating the plant outputs in open-loop and closed-loop were proposed [11].
An error predictive model was built using a back propagation neural network to reduce the error on estimation of output. Three control methods were compared as PID, GPC, and GPC with error correction. GPC with error correction was validated to have the best performance [12].
A novel GPC strategy was proposed controlling NCS with respect to the NSC structure characteristics. The timestamp mechanism of data communication network was applied. Accurate measurement to the system output and timely modification to the predictive value were required under the random network-induced delay [13].
A client-server control architecture was implemented on the dual-axis hydraulic position system of an industrial fish-processing machine. The GPC algorithm was adopted to compensate for data-transmission delays. It incorporates a minimum-effort estimator to estimate missing or delayed sensor data and a variable-horizon adaptive GPC controller to predict the required future control efforts to drive the plant to track a desired reference trajectory [14].
Time-varying delays for the transmission of sensor and control signal over the wireless network were evaluated using a randomized multihop routing protocol. The proposed predictive control scheme with a delay estimator was based on a Kalman filter [15].
This paper presents a model of the NCS with network-induced delay and packets loss for a general SISO NCS model. The stochastic time delays reduce the system performance (e.g., stability, controllability, and observability). This paper applies GPC to predict the network-induced delay and simulate it through the wireless network environment setup by NS2 in Linux. The PiccSIM is used as the platform in the client/server architecture for the WiNCS. The MPC concept was adopted and the GPC control algorithm with the Kalman state estimator is implemented in WiNCS to reduce the effect on network-induced delay and packets loss.
The contributions in the paper are summarized as follows.
The main factors affecting the performance of NCS in communication networks have been identified. The NCS with network-induced delay and packet loss is modeled. The GPC algorithm is implemented in WiNCS to cope with the time-varying delay issue. The simulated platform is constructed which connects NS2 and Matlab∖Simulink for implementation of GPC in WiNCS.
2. Method
The GPC is proposed to compensate the network-induced delay in WiNCS. The algorithm, closed-loop structure, and CARIMA model structure are developed. The GPC in state space with state estimator is derived for WiNCS simulation. The state space is adopted to reduce the algebraic complexity in the GPC control law.
2.1. Formulation of GPC
The SISO (single-input single-output) system is given which considers the operation around a specific set point after linearization. A predictive model known as CARIMA (controlled autoregressive integrated moving average) for GPC is
with
The optimal prediction of the output
with
Equation (1) is multiplied by
Equation (9) is rewritten in consideration of (6) as
Noise term in the future on the system is neglected in (10). Letting
The set of the control signals
The above equations are marshaled as
In (13), it includes known and unknown sequences at time k. The known sequence which is the last two terms is grouped into
Equation (4) is written in consideration (15) as
The minimum of
In (19), the actually control signal that is sent to the system is the first element of
The optimization in GPC is different from the general optimal algorithm; the optimized target is moving by time (i.e., local optimization in every sampling time). The first element of
2.2. GPC Control Strategy
The following equations are rewritten to illustrate the GPC control block diagram.
Figure 1 shows that the GPC control-loop structure consists of smoothing, tuning, and prediction processes. The thick line indicates the vector signal and the thin line indicates the scalar signal. At each moment, the desired output vector W is obtained after smoothing the set point

GPC control-loop structure.
2.3. GPC in State-Space Formulation
Consider a state-space description [18, 19] of the system plant which was given as follows. The dimension of the state vector is
The noise and disturbance in (22) are neglected; the predictive model is rewritten as
From (27), the z-domain transfer function
From (30), the current output is obtained as
Since the predictive horizon
From the previous equations, the prediction state of the system is also obtained as
A general term of
Therefore, the predictive output is denoted as
The cost function is fundamental for the determination of control action [20] and it is rewritten as
The cost function
After obtaining the predictive outputs
To minimize the cost function in (41), the solution of the algebraic equation (the control action) is derived as
Equation (42) is further presented as follows:
For solving (42), the QR decomposition [21] method based on the Householder algorithm [22, 23] is used to decompose matrix
Considering (45), the solution of least squares in (43) is
The preceding Equation (47) is rewritten as
Thus, the control signal is obtained as
Obtained vector
2.4. State Estimator
Consider the system in state space which is presented in (27) as follows:
The joint covariance matrix is
The initial state
The covariance matrix is given by
The conditional probability density functions (pdf) represent the Gaussian pdf as
Considering (55), the filtering cycle states at the instant
The Gaussian pdf is characterized by the mean and covariance matrix. Considering (27) by applying the mean value operator which is presented as
From (55) and (57), the ω with zero mean is obtained as
The prediction error is defined as
which is replaced in expression of
Equation (59) is rewritten as follows:
From (63), the notations in (56) and (58) result in
The predictive estimated states of the system and the associated covariance matrix in (60) and (64) correspond to the optimal system state at the time instant
The measurement prediction error
Considering (66), the covariance matrix is obtained as
Multiply
Consider
The optimal estimator to compute the state is based on a Kalman filter. The j-step ahead system output presented in (34) is
In (69), the estimation of the state vector
Figure 2 shows the block diagram of the state estimator using Kalman filter to provide the estimate state for GPC. The Kalman filter is linear, discrete time, and finite dimension. The filter gain is independent of the system outputs. The error covariance and the filter gain are calculated before the filter is executed.

State estimator with Kalman filter.
3. Result
3.1. GPC Implementation in WiNCS
Figure 3 shows the setup for the proposed GPC controller with Kalman state estimator implemented; control and sensor signals are encapsulated into packets to transmit in a wireless network environment emulated by NS2 (see the Appendix) under the WiNCS client/server architecture (IEEE 802.11b protocol) provided by PiccSIM (see the Appendix).

Experiment setup: (a) hardware and (b) software.
The simulation architecture is illustrated in Figure 4. The control system is in the server. The sensor, actuator, and plant are in the client under an emulated IEEE 802.11b wireless network.

Structure of WiNCS.
3.1.1. Controller Node
The controller node in server module includes GPC controller, Kalman state estimator, sender, and receiver as shown in Figure 5. The square wave (period: 15 seconds, peaks: 1, and duration: from 0 to 100 seconds) is applied as the controller input.

Simulation architecture of controller node.
3.1.2. Actuator/Sensor Node
The actuator/sensor node in the client module includes actuator, plant, sensor, sender, and receiver as shown in Figure 6. A white noise is applied as the disturbance to sensor measurement. The discrete state-space plant model is given by

Simulation architecture of actuator/sensor node.
3.2. Latency and Throughput on Actual Wireless Network Environment
The performance of the networked data acquisition system for an actual small UAV (CoaX helicopter) is evaluated with the topology in Figure 7. The UAV sends images to a ground-based computer where the data is processed, and control packages are sent back to the UAV. Latency and throughput of the system are determined with the hrPing utility and the Interprocess Communication (IPC) library (see the Appendix).

Topology of the wireless network for performance testing.
Experiments were performed in two different indoor environments. The first is a room with a square ground plane and the second is a long corridor as shown in Figures 8 and 9. The line of sight connection of the transmission is uninterrupted by massive structures like concrete walls at all times.

Square-shaped room for wireless network parameter measurements.

Long corridor for wireless network parameter measurements.
The latency and throughput are tested for several distances between the CoaX helicopter and the stationary wireless router under two standards (IEEE 802.11 g and IEEE 802.11n). IEEE 802.11n provides longer range and higher throughput. The throughput of the wireless connection is determined for data packet sizes between 1 kB and 256 kB. The transfer rate for smaller packets is lower because the overhead of the transmission is dominant.
3.2.1. Laboratory Environment
The average latency of the IEEE 802.11 g connection (Figure 10) is constantly very low, and also the maximum values are stable over the whole distance range. Figure 11 shows the measurements for the connection conforming IEEE 802.11n. The mean latency is slightly higher, but the maximum latency does not significantly exceed the results of the previous measurements.

Latency measurements in room—IEEE 802.11 g.

Latency measurements in room—IEEE 802.11n.
The throughput of the connection with the CoaX helicopter (IEEE 802.11 g), shown in Figure 12, is practically independent of the distance in this environment. In the measurements with the IEEE 802.11n connection (Figure 13), the throughput decreases with longer distance for bigger data packets.

Throughput measurements in room—IEEE 802.11 g.

Throughput measurements in room—IEEE 802.11n.
3.2.2. Corridor Environment
The measurements are taken in the long corridor at distances from 10 to 70 meters. The latency of the connection with the CoaX helicopter (IEEE 802.11 g) is illustrated in Figure 14. The results show that the average latency is very low at around 1.2 ms, which is close to the minimum value. The worst case of the latency in the measurements is 20 ms. The measurements of a connection with the recently introduced standard IEEE 802.11n are shown in Figure 15. The average latency for distances from 30 meters and higher is low at around 1.2 ms. In close distance, however, the mean latency rises to 6.5 ms and the maximum value of 100 ms is comparatively high.

Latency measurements in corridor—IEEE 802.11 g.

Latency measurements in corridor—IEEE 802.11n.
The results for the throughput of the connection with IEEE 802.11 g are depicted in Figure 16. The throughput decreases with rising distance up to 60 meters; however, the measurement for 70 meters gave a higher value. As expected, the connection with IEEE 802.11n achieved significantly higher transfer rates. The data in Figure 17 shows that the throughput decreases as the distance is increased.

Throughput measurements in corridor—IEEE 802.11 g.

Throughput measurements in corridor—IEEE 802.11n.
3.3. System Response with Random Delay and Packets Loss
This experiment is to evaluate the capability of the proposed GPC with Kalman state estimator approach for compensating the random time delay in NCS. The random delay model is adopted to validate the GPC capability of compensating the delays. The system response is shown in Figure 18 with the random delay between 160 ms and 200 ms. The GPC parameters are listed in Table 1. The system response is stable but with the higher overshoot and the longer settling time. When the delay time closes to the sample time, the system response occurs with highly jitter.
Controller parameters in GPC.

System response with random delay between 160 ms and 200 ms.
The packet loss phenomenon is emulated by a switch with various packet loss rates. Figure 19 shows the system response with random delay between 120 ms and 160 ms and packets loss rate 5%. The higher packet loss rate causes the higher jitter of the system response (unstable).

System response with random delay between 120 ms and 160 ms and packets loss rate 5%. x-axis: time (sec.) and y-axis: magnitude.
3.4. System Response with Network-Induced Delay in NS2
The network-induced delay is generated by NS2 to evaluate if the system can follow the reference trajectory. Figure 20 shows the system response. Figures 21, 22, and 23 show the controller-to-actuator delay, sensor-to-controller delay, and sensor disturbance measurement, respectively. The simulation information is listed in Table 2. All of the packets were successfully transmitted without dropped packets. The system response successfully follows the reference trajectory as shown in Figure 20.
Simulation information of nodes with sample time 0.4 sec.

WiNCS response with sample time 0.4 sec. x-axis: time (sec.) and y-axis: magnitude.

Controller-to-actuator delay with sample time 0.4 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor-to-controller delay with sample time 0.4 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor noise measurement with sample time 0.4 sec. x-axis: time (sec.) and y-axis: magnitude.
Figure 24 shows the system response with sample time 0.3 sec. Figures 25, 26, and 27 show the controller-to-actuator delay, sensor-to-controller delay, and sensor disturbance measurement, respectively. The simulation information is listed in Table 3. The system is stable but with higher overshoot and the longer settling time. Different sample times affect the system performance. When the system is with the short sample time, the sender must generate more data packets. It might raise the packets loss rate and shorten the predictive horizon which might cause system unstablility.
Simulation information of nodes with sample time 0.3 sec.

WiNCS response with sample time 0.3 sec. x-axis: time (sec.) and y-axis: magnitude.

Controller-to-actuator delay with sample time 0.3 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor-to-controller delay with sample time 0.3 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor noise measurement with sample time 0.3 sec. x-axis: time (sec.) and y-axis: magnitude.
Figure 28 shows the system response with sample time 0.2 sec. Figures 29, 30, and 31 show the controller-to-actuator delay, sensor-to-controller delay, and sensor disturbance measurement, respectively. The system response is highly jitter and with longer settling time. The simulation information is listed in Table 4. The system response already cannot follow the reference trajectory.
Simulation information of nodes with sample time 0.2 sec.

WiNCS response with sample time 0.2 sec. x-axis: time (sec.) and y-axis: magnitude.

Controller-to-actuator delay with sample time 0.2 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor-to-controller delay with sample time 0.2 sec. x-axis: time (sec.) and y-axis: magnitude.

Sensor noise measurement with sample time 0.2 sec. x-axis: time (sec.) and y-axis: magnitude.
Figure 32 shows the system response with sample time 0.1 sec. The shorter sample time cause system unstable in WiNCS due to it shorten the predictive horizon.

WiNCS response with sample time 0.1 sec. x-axis: time (sec.) and y-axis: magnitude.
4. Discussion
The WiNCS is implemented and evaluated with random delay, network-induced delay, and packets loss implementation by an analytical model and NS2. Result shows that the system response could follow the reference trajectory with the condition of the time delay under 160 ms and sample time 0.2 s. The system response jittered when packet loss rate exceeded 10%.
The WiNCS is also simulated by NS2 with AOVD protocol. Result shows the system response with sample time = 0.4 sec. and number of transmission data packets = 500 and sample time = 0.3 sec. number of transmission data packets = 668 can follow the reference trajectory. The system response with sample time = 0.2 sec, number of transmission data packets = 1002, and number of packets loss = 2 has high jitter. The different sample times have various numbers of transmission data packets. The larger the number of transmission data packets is, the easier the packets loss occurs.
It is easier to evaluate the performance of GPC in WiNCS when it is simulated via a model because the condition of random delay and packets loss rate can be controlled. WiNCS implemented in NS2 is closer to actual wireless network; therefore, the distance between control node and actuator/sensor node affects the network-induced delay and packets loss. This causes GPC performance to be difficult to analyse. The parameter in NS2 needs to be reestimated when being in the various wireless coverage environments. This also affects the simulation results when GPC is implemented in WiNCS.
The wireless networked control system results suggest that the latency is not directly related to the distance between sender and receiver. The mean values of the measurements are adequate for a closed-loop control system; however, the maximum values might have to be considered depending on the application. One reason for latency is the property that different wireless networks share the same frequency channel. Therefore, the density of wireless networks and the rate of traffic in close vicinity to the measurement setup determine the latency of the connection.
The throughput of the wireless connection according to standard IEEE 802.11 g is sufficient to transmit compressed images of size 320 × 240 at a rate of 30 frames per second up to a distance of 70 meters. The connection with the faster IEEE 802.11n standard allows transmitting the same images with smaller time delay or images with higher resolution at the same rate.
The measurements suggest that the concept of the wireless networked control system is applicable to autonomous navigation of small UAVs. The latency in a controlled environment is very low and does not inhibit real-time closed-loop control applications. The throughput of either standard IEEE 802.11 g or IEEE 802.11n is sufficient for transmitting compressed images of adequate resolution at a rate of 30 frames per second; however, the standard IEEE 802.11n is preferable for better performance.
The ideal environment for the wireless networked control system approach would be a closed room with strong walls to shield against interference from other networks. The limitations of the proposed system are the high sensitivity to interference from other wireless sources and the necessity of a line of sight connection without massive obstacles like concrete walls.
5. Conclusion
This paper proposed the GPC controller with Kalman state estimator in WiNCS based on PiccSIM platform. The packets are exchanged between the controller node and actuator/sensor node via wireless network IEEE 802.11b which is emulated by NS2. Although network-induced delay characteristics in the wireless communication network are difficult to model, this paper describes the main problems which might induce the time delay.
This paper simplifies complex architectures in the wireless communication network for analysis proposed with WiNCS which is simulated in NS2 using the two-ray ground model. 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 sample times in the predictive horizon; that is, 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 the system performance.
We also propose the basic WiNCS simulation on a low-level 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 occurred when the packets are exchanged in the network. The algorithm for optimizing network performance communication is also important. This paper proposes the GPC algorithm for compensating time delay which focuses on improving control algorithm. In future, it is required to have further integration of the automation and control and network communication for realizing WiNCS.
The concept for a wireless networked control system was evaluated with latency and throughput measurements in different environments. The experiment setup conforming to the IEEE 802.11n 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 navigation control with the proposed concept.
The only significant limitations of the wireless networked control concept are the relatively short range of the wireless connections and the sensitivity to congest with other wireless devices. However, neither of them inhibits the effectiveness of the concept in the designated application to research in a controlled environment.
Modeling the network-induced delay and packets loss is extremely difficult. Although the NS2 provides the simulated communication network environment, it still simplifies the network condition comparing with real network devices. In this paper, the GPC implemented in WiNCS was verifying that it is a feasibility study.
In future work, a network estimator must be implemented and measure the network-induced delay and round trip time delay for tuning the controller parameters for increasing the performance of WiNCS. In addition, the soft computing technique (e.g., artificial neural network) can be applied to the predictive control algorithm to minimize the predictive error or tune the parameters of network estimator.
