Research Article Generalized Predictive Control in a

0 downloads 0 Views 6MB Size Report
An analytical NCS model and NS2 (network simulator version 2) are developed to simulate and evaluate the ..... The cost function Jadp based on square-root minimization ..... Figure 8: Square-shaped room for wireless network parameter.
Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2013, Article ID 475730, 16 pages http://dx.doi.org/10.1155/2013/475730

Research Article Generalized Predictive Control in a Wireless Networked Control System Min-Fan Ricky Lee, Fu-Hsin Steven Chiu, Hsuan-Chiao Huang, and Christian Ivancsits Graduate Institute of Automation and Control, National Taiwan University of Science and Technology, Taipei 106, Taiwan Correspondence should be addressed to Min-Fan Ricky Lee; [email protected] Received 28 June 2013; Accepted 11 September 2013 Academic Editor: Qin Xin Copyright Β© 2013 Min-Fan Ricky Lee et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. 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].

2

International Journal of Distributed Sensor Networks

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 fishprocessing 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 networkinduced 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. (i) The main factors affecting the performance of NCS in communication networks have been identified. (ii) The NCS with network-induced delay and packet loss is modeled. (iii) The GPC algorithm is implemented in WiNCS to cope with the time-varying delay issue. (iv) 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 singleoutput) 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 𝐴 (π‘§βˆ’1 ) 𝑦 (π‘˜) = 𝐡 (π‘§βˆ’1 ) 𝑒 (π‘˜ βˆ’ 1) +

𝐢 (π‘§βˆ’1 ) Ξ”

𝑒 (π‘˜) ,

(1)

with Ξ” = 1 βˆ’ π‘§βˆ’1 ,

(2)

where 𝑦(π‘˜) is output signal, 𝑒(π‘˜) is input signal, 𝑒(π‘˜) is zero mean white noise, and 𝐴, 𝐡, and 𝐢 are 𝐴 (π‘§βˆ’1 ) = 1 + π‘Ž1 π‘§βˆ’1 + π‘Ž2 π‘§βˆ’2 + β‹… β‹… β‹… + π‘Žπ‘›π‘Ž π‘§βˆ’π‘›π‘Ž 𝐡 (π‘§βˆ’1 ) = 𝑏0 + 𝑏1 π‘§βˆ’1 + 𝑏2 π‘§βˆ’2 + β‹… β‹… β‹… + 𝑏𝑛𝑏 π‘§βˆ’π‘›π‘

(3)

𝐢 (π‘§βˆ’1 ) = 1 + 𝑐1 π‘§βˆ’1 + 𝑐2 π‘§βˆ’2 + β‹… β‹… β‹… + 𝑐𝑛𝑐 π‘§βˆ’π‘›π‘ , where 𝐢(π‘§βˆ’1 ) is selected to be 1 for the simplicity. The cost function including the influence of 𝑒(π‘˜) on future system is to enhance the system robustness. GPC algorithm applies a control sequence to minimize a multistage cost function as 𝑛2

2

J = βˆ‘ 𝛿 (𝑗) [𝑦̂ (π‘˜ + 𝑗) βˆ’ 𝑀 (π‘˜ + 𝑗)] 𝑗=𝑛1 𝐻𝑐

(4) 2

+ βˆ‘ πœ† (𝑗) [Δ𝑒 (π‘˜ + 𝑗 βˆ’ 1)] , 𝑗=1

Μ‚ + 𝑗) is optimum 𝑗-step ahead prediction of system where 𝑦(π‘˜ output, 𝑛1 and 𝑛2 are the minimum and maximum of the prediction horizons 𝐻𝑝 and the order of 𝑛2 must be larger than 𝐡(π‘§βˆ’1 ), 𝐻𝑐 is control horizon (𝐻𝑐 ≀ 𝐻𝑝 ), 𝛿(𝑗) and πœ†(𝑗) are weighting sequences, 𝛿(𝑗) is selected to be 1, and πœ†(𝑗) is a constant. 𝑀(π‘˜ + 𝑗) is the future reference trajectory as 𝑀 (π‘˜ + 𝑗) = 𝛼𝑗 𝑦 (π‘˜ + 𝑗) + (1 βˆ’ 𝛼𝑗 ) π‘¦π‘Ÿ

(𝑗 = 1, 2, 3 β‹… β‹… β‹… , 𝑛) , (5)

where 𝑦(π‘˜) and π‘¦π‘Ÿ are the set point and the future output of the system, respectively. 𝛼 is a parameter between 0 and 1 that affects the response of the system (closer to 1, smoother response curve). The optimal prediction of the output 𝑦(π‘˜ + 𝑗) is driven close to 𝑀(π‘˜ + 𝑗) to optimize the cost function. Diophantine equation for predicting the precede 𝑗-step output is given by Μƒ (π‘§βˆ’1 ) + π‘§βˆ’π‘— 𝐹𝑗 (π‘§βˆ’1 ) , 1 = 𝐸𝑗 (π‘§βˆ’1 ) 𝐴

(6)

International Journal of Distributed Sensor Networks

3

with

where Μƒ (π‘§βˆ’1 ) = Δ𝐴 (π‘§βˆ’1 ) = 1 + π‘ŽΜƒ1 π‘§βˆ’1 + π‘ŽΜƒ2 π‘§βˆ’2 𝐴 + β‹… β‹… β‹… + π‘ŽΜƒπ‘›π‘Ž+1 π‘§βˆ’(π‘›π‘Ž+1) ,

(7)

where 𝐸𝑗 (π‘§βˆ’1 ) = 𝑒𝑗,0 + 𝑒𝑗,1 π‘§βˆ’1 + 𝑒𝑗,2 π‘§βˆ’2 + β‹… β‹… β‹… + 𝑒𝑗,π‘—βˆ’1 π‘§βˆ’(π‘—βˆ’1) 𝐹𝑗 (π‘§βˆ’1 ) = 𝑓𝑗,0 + 𝑓𝑗,1 π‘§βˆ’1 + 𝑓𝑗,2 π‘§βˆ’2 + β‹… β‹… β‹… + 𝑓𝑗,π‘›π‘Ž π‘§βˆ’π‘›π‘Ž .

(8)

𝑦̂ (π‘˜ + 1) [ 𝑦̂ (π‘˜ + 2) ] [ ] ] Μ‚ [ Y= [ 𝑦̂ (π‘˜ + 3) ] ; [ ] .. [ ] . [𝑦̂ (π‘˜ + 𝑁)] [ [ Ξ”U = [ [

(9)

(15)

f = 𝐹 (π‘§βˆ’1 ) 𝑦 (π‘˜) + 𝐻 (π‘§βˆ’1 ) Δ𝑒 (π‘˜ βˆ’ 1) .

(16)

where

(11)

The set of the control signals 𝑒(π‘˜), 𝑒(π‘˜+1), . . . , 𝑒(π‘˜+𝑁) is obtained to optimize (4). The values 𝑛1 , 𝑛2 , and 𝐻𝑐 are defined by 𝑛1 = 1 and 𝑛2 = 𝑁 and the predictive horizon 𝐻𝑝 = 𝑁 and the control horizon 𝐻𝑐 = 𝑁. 𝑁 ahead optimal prediction is considered as 𝑦̂ (π‘˜ + 1) = 𝐺1 Δ𝑒 (π‘˜) + 𝐹1 (π‘§βˆ’1 ) 𝑦 (π‘˜)

Equation (4) is written in consideration (15) as J = (GΞ”U + f βˆ’ W)𝑇 (GΞ”U + f βˆ’ W) + πœ†Ξ”U𝑇 Ξ”U, 𝑀 (π‘˜ + 1) [ 𝑀 (π‘˜ + 2) ] [ ] W=[ ]. .. [ ] . 𝑀 + 𝑁) (π‘˜ [ ]

(12)

(19)

In (19), the actually control signal that is sent to the system is the first element of Ξ”U as 𝑒 (π‘˜) = 𝑒 (π‘˜ βˆ’ 1) + 𝐾 (W βˆ’ f) ,

.. .

(18)

The minimum of J, assuming there are no constraints on the control signal, is found by taking gradient of J. Let πœ•J/πœ•Ξ”U = 0 which leads to βˆ’1

𝑦̂ (π‘˜ + 2) = 𝐺2 Δ𝑒 (π‘˜ + 1) + 𝐹2 (𝑧 ) 𝑦 (π‘˜)

(17)

where

Ξ”U = (G𝑇 G + πœ†I) G𝑇 (W βˆ’ f) .

βˆ’1

(20)

where 𝐾 = [π‘˜1 π‘˜2 β‹… β‹… β‹… π‘˜π‘] is the first row of the matrix

𝑦̂ (π‘˜ + 𝑁) = 𝐺𝑁Δ𝑒 (π‘˜ + 𝑁 βˆ’ 1) + 𝐹𝑁 (π‘§βˆ’1 ) 𝑦 (π‘˜) .

βˆ’1

The above equations are marshaled as Μ‚ Y=GΞ”U + 𝐹 (π‘§βˆ’1 ) 𝑦 (π‘˜) + 𝐻 (π‘§βˆ’1 ) Δ𝑒 (π‘˜ βˆ’ 1) ,

] ] ]; ]

𝐹1 (π‘§βˆ’1 ) [ 𝐹 (π‘§βˆ’1 ) ] ] [ 2 ] 𝐹 (π‘§βˆ’1 ) = [ .. ] [ ] [ . βˆ’1 𝐹 (𝑧 ) ] [ 𝑁

Μ‚ = GΞ”U + f, Y

(10)

Noise term in the future on the system is neglected in (10). Letting 𝐺𝑗 (π‘§βˆ’1 ) = 𝐸𝑗 (π‘§βˆ’1 )𝐡(π‘§βˆ’1 ), the best prediction of future output is

𝑦̂ (π‘˜ + 3) = 𝐺3 Δ𝑒 (π‘˜ + 2) + 𝐹3 (π‘§βˆ’1 ) 𝑦 (π‘˜)

0 0] ] .. ] ; .]

In (13), it includes known and unknown sequences at time π‘˜. The known sequence which is the last two terms is grouped into f as

Equation (9) is rewritten in consideration of (6) as

𝑦̂ (π‘˜ + 𝑗) = 𝐺𝑗 (π‘§βˆ’1 ) Δ𝑒 (π‘˜ + 𝑗 βˆ’ 1) + 𝐹𝑗 (π‘§βˆ’1 ) 𝑦 (π‘˜) .

β‹…β‹…β‹… β‹…β‹…β‹… .. .

(𝐺1 (π‘§βˆ’1 ) βˆ’ 𝑔0 ) 𝑧 [ ] (𝐺2 (π‘§βˆ’1 ) βˆ’ 𝑔0 βˆ’ 𝑔1 π‘§βˆ’1 ) 𝑧2 [ ] ]. =[ .. [ ] [ ] . βˆ’1 βˆ’1 βˆ’(π‘βˆ’1) 𝑁 )𝑧 ] [(𝐺𝑁 (𝑧 ) βˆ’ 𝑔0 βˆ’ 𝑔1 𝑧 βˆ’ β‹… β‹… β‹… π‘”π‘βˆ’1 𝑧 (14)

+ 𝐸𝑗 (π‘§βˆ’1 ) 𝑒 (π‘˜ + 𝑗) .

Γ— Δ𝑒 (π‘˜ + 𝑗 βˆ’ 1) + 𝐸𝑗 (𝑧 ) 𝑒 (π‘˜ + 𝑗) .

0 𝑔0 .. .

𝐻 (π‘§βˆ’1 )

Μƒ (π‘§βˆ’1 ) 𝐸𝑗 (π‘§βˆ’1 ) 𝑦 (π‘˜ + 𝑗) = 𝐸𝑗 (π‘§βˆ’1 ) 𝐡 (π‘§βˆ’1 ) Δ𝑒 (π‘˜ + 𝑗 βˆ’ 1) 𝐴

βˆ’1

𝑔0 𝑔1 .. .

[π‘”π‘βˆ’1 π‘”π‘βˆ’2 β‹… β‹… β‹… 𝑔0 ]

[𝑒 (π‘˜ + 𝑁 βˆ’ 1)]

Equation (1) is multiplied by Δ𝐸𝑗 (π‘§βˆ’1 )𝑧𝑗 to obtain the predictive equation of 𝑗-step after time π‘˜ as

𝑦 (π‘˜ + 𝑗) = 𝐹𝑗 (π‘§βˆ’1 ) 𝑦 (π‘˜) + 𝐸𝑗 (π‘§βˆ’1 ) 𝐡 (π‘§βˆ’1 )

𝑒 (π‘˜) 𝑒 (π‘˜ + 1) .. .

[ [ G= [ [

(13)

(G𝑇 G + πœ†I) G𝑇 . 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 Ξ”U is applied and the optimal procedure is repeated at the next sampling time [16, 17].

4

International Journal of Distributed Sensor Networks

2.2. GPC Control Strategy. The following equations are rewritten to illustrate the GPC control block diagram.

where

(a) The reference trajectory in (5) is W = 𝑄𝑦 (π‘˜) + π‘ƒπ‘¦π‘Ÿ , where 𝑄

=

[𝛼 𝛼2 β‹… β‹… β‹… 𝛼𝑛 ]

(21) 𝑇

and 𝑃

𝑛 𝑇

2

=

[1 βˆ’ 𝛼 1 βˆ’ 𝛼 β‹… β‹… β‹… 1 βˆ’ 𝛼 ] . βˆ’1

βˆ’1

From (7) and (22), the CARIMA model is driven as π‘§βˆ’1 𝐡 𝐢 𝑒 (π‘˜) + 𝑒 (π‘˜) , 𝐴 𝐴⋅Δ

(23)

where the polynomial 𝐢 is selected to be 1. (c) The predictive output in (16) is f = 𝐹 (π‘§βˆ’1 ) 𝑦 (π‘˜) + 𝐻 (π‘§βˆ’1 ) Δ𝑒 (π‘˜) ,

(24)

0 .. .

β‹…β‹…β‹… β‹…β‹…β‹… .. .

0 0] ] .. ] .] ]; 0] ] .. ] .] 0]

β‹…β‹…β‹… .. .

0 0 β‹…β‹…β‹…

] [ ] [ ] [ ] [ ], Ξ =[ [ 𝑐𝑛 βˆ’Μƒ π‘Žπ‘› ] ] [ [ .. ] [ . ] π‘Žπ‘›π‘ ] [𝑐𝑛𝑐 βˆ’Μƒ

βˆ’1

Δ𝐴 (𝑧 ) 𝑦 (π‘˜) = 𝑧 𝐡 (𝑧 ) Δ𝑒 (π‘˜) + 𝐢 (𝑧 ) 𝑒 (π‘˜) . (22)

𝑦 (π‘˜) =

0 .. .

0 1 .. .

π‘Ž1 𝑐1 βˆ’Μƒ 𝑐2 βˆ’Μƒ π‘Ž2 .. .

(b) The predictive model (CARIMA) in (1) is βˆ’1

1 0 .. .

βˆ’Μƒ π‘Ž1 [ βˆ’Μƒ [ π‘Ž2 [ .. [ . 𝐴=[ [ βˆ’Μƒ [ π‘Žπ‘› [ .. [ . π‘Žπ‘›π‘Ž+1 [βˆ’Μƒ

[ [ [ [ 𝐡=[ [ [ [ [

0 0 .. .

𝑏0 .. .

] ] ] ] ]; ] ] ] ]

[π‘π‘›π‘βˆ’1 ]

𝐢 = [1 0 β‹… β‹… β‹… 0 β‹… β‹… β‹… 0 β‹… β‹… β‹…] ,

Μƒ The random where π‘ŽΜƒπ‘– are the coefficient of polynomial 𝐴. variables πœ” and ] represent disturbance input and measurement (sensor) noise, and they are assumed to be white Gaussian zero mean with normal probability distributions. The noise and disturbance in (22) are neglected; the predictive model is rewritten as π‘₯ (π‘˜ + 1) = 𝐴π‘₯ (π‘˜) + 𝐡𝑒 (π‘˜)

where H (π‘§βˆ’1 )

𝑦 (π‘˜) = 𝐢π‘₯ (π‘˜) .

(𝐺1 (π‘§βˆ’1 ) βˆ’ 𝑔0 ) ] (𝐺2 (π‘§βˆ’1 ) βˆ’ 𝑔0 βˆ’ 𝑔1 π‘§βˆ’1 ) 𝑧 ] ]. .. ] ] . βˆ’1 βˆ’1 βˆ’(π‘βˆ’1) π‘βˆ’1 )𝑧 ] [(𝐺𝑁 (𝑧 ) βˆ’ 𝑔0 βˆ’ 𝑔1 𝑧 βˆ’ β‹… β‹… β‹… π‘”π‘βˆ’1 𝑧 (25)

[ [ =[ [ [

(d) The control-increment vector is Δ𝑒 (π‘˜) = 𝐾 (W βˆ’ f) .

(28)

(29)

From (27), the 𝑧-domain transfer function 𝑅(𝑧) is derived as 𝑅 (𝑧) = 𝐢(𝑧I βˆ’ 𝐴)βˆ’1 𝐡 =

𝐢(I βˆ’ (𝐴/𝑧))βˆ’1 𝐡 𝐢 𝐴 𝐴2 𝐴3 = (I + + 2 + 3 + β‹… β‹… β‹… ) 𝐡 𝑧 𝑧 𝑧 𝑧 𝑧

=

𝐢𝐡 𝐢𝐴𝐡 𝐢𝐴2 𝐡 𝐢𝐴3 𝐡 + + β‹…β‹…β‹… . + 2 + 𝑧 𝑧 𝑧3 𝑧4

(26)

(30)

From (30), the current output is obtained as 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 π‘Š is obtained after smoothing the set point π‘¦π‘Ÿ . Compared with the predictive output and desired output, the declination vector is obtained. The control signal Δ𝑒 at this moment is the product of declination vector and vector 𝐾. The control signal Δ𝑒 also generates the new predictive output f with the vector H and the system output. 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 𝑛 = max (π‘›π‘Ž + 1, 𝑛𝑏 + 1, 𝑛𝑐 ) : π‘₯ (π‘˜ + 1) = 𝐴π‘₯ (π‘˜) + 𝐡𝑒 (π‘˜) + Ξ πœ” (π‘˜) 𝑦 (π‘˜) = 𝐢π‘₯ (π‘˜) + ] (π‘˜) ,

𝑦 (π‘˜) = 𝐢𝐡Δ𝑒 (π‘˜ βˆ’ 1) + 𝐢𝐴𝐡Δ𝑒 (π‘˜ βˆ’ 2) + 𝐢𝐴2 𝐡Δ𝑒 (π‘˜ βˆ’ 3) + β‹… β‹… β‹… .

Since the predictive horizon 𝐻𝑝 = 𝑁, the future output is obtained as 𝑦 (π‘˜ + 1) = 𝐢𝐡Δ𝑒 (π‘˜) + 𝐢𝐴𝐡Δ𝑒 (π‘˜ βˆ’ 1) + 𝐢𝐴2 𝐡Δ𝑒 (π‘˜ βˆ’ 2) + β‹… β‹… β‹… 𝑦 (π‘˜ + 2) = 𝐢𝐡Δ𝑒 (π‘˜ + 1) + 𝐢𝐴𝐡Δ𝑒 (π‘˜) + 𝐢𝐴2 𝐡Δ𝑒 (π‘˜ βˆ’ 1) + β‹… β‹… β‹… .. . 𝑦 (π‘˜ + 𝑁) = 𝐢𝐡Δ𝑒 (π‘˜ + 𝑁 βˆ’ 1) + 𝐢𝐴𝐡Δ𝑒 (π‘˜ + 𝑁 βˆ’ 2)

(27)

(31)

+ 𝐢𝐴2 𝐡Δ𝑒 (π‘˜ + 𝑁 βˆ’ 3) + β‹… β‹… β‹… .

(32)

International Journal of Distributed Sensor Networks

5 e(k)

Tuning

Smoothing

Prediction

CARIMA C AΒ·Ξ”

P 1βˆ’π›Ό yr

1 βˆ’ 𝛼2 .. . 1 βˆ’ 𝛼n

W + +

+

K [k1 k2 Β· Β· Β· kn ]

βˆ’

Ξ”u(k)

1 1 βˆ’ zβˆ’1

u(k)

zβˆ’1 B A

+

+

y(k)

H(zβˆ’1 )

G1 (zβˆ’1 ) βˆ’ g0 𝛼 Q

f

(G2 (zβˆ’1 ) βˆ’ g0 βˆ’ g1 zβˆ’1 )z .. .

2

𝛼 .. .

(GN (zβˆ’1 ) βˆ’ g0 βˆ’ g1 zβˆ’1 Β· Β· Β· gNβˆ’1 zβˆ’(Nβˆ’1) )zNβˆ’1

𝛼n

+

F(zβˆ’1 ) F1 (zβˆ’1 )

F2 (zβˆ’1 ) .. .

+

FN (zβˆ’1 )

Figure 1: GPC control-loop structure. ∞

From the previous equations, the prediction state of the system is also obtained as

+ βˆ‘ πΆπ΄π‘š+𝑗 [π‘₯ (π‘˜ βˆ’ π‘š) βˆ’ 𝐴π‘₯ (π‘˜ βˆ’ π‘š βˆ’ 1)] π‘š=0

𝑗

π‘₯ (π‘˜ + 1) = 𝐴π‘₯ (π‘˜) + 𝐡Δ𝑒 (π‘˜)

= βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖)

π‘₯ (π‘˜ + 2) = 𝐴π‘₯ (π‘˜ + 1) + 𝐡Δ𝑒 (π‘˜ + 1)

𝑖=1 ∞

2

= 𝐴 π‘₯ (π‘˜) + 𝐴𝐡Δ𝑒 (π‘˜) + 𝐡Δ𝑒 (π‘˜ + 1)

+ βˆ‘ 𝐢𝐴𝑗 [π΄π‘š π‘₯ (π‘˜ βˆ’ π‘š) βˆ’ π΄π‘š+1 π‘₯ (π‘˜ βˆ’ π‘š βˆ’ 1)]

π‘₯ (π‘˜ + 3) = 𝐴3 π‘₯ (π‘˜) + 𝐴2 𝐡Δ𝑒 (π‘˜) + 𝐴𝐡Δ𝑒 (π‘˜ + 1) + 𝐡Δ𝑒 (π‘˜ + 2)

π‘š=0 𝑗

(33)

= βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) + 𝐢𝐴𝑗 π‘₯ (π‘˜) .

.. .

𝑖=1

(34)

π‘—βˆ’1

π‘₯ (π‘˜ + 𝑗) = 𝐴𝑗 π‘₯ (π‘˜) + βˆ‘ π΄π‘—βˆ’π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑖) . 𝑖=1

A general term of 𝑦(π‘˜ + 𝑗) with (𝑗 = 1, 2, 3, . . . , 𝑁) is obtained as ∞

𝑦 (π‘˜ + 𝑗) = βˆ‘πΆπ΄

π‘–βˆ’1

𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖)

𝑖=1 𝑗

= βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) 𝑖=1 ∞

+ βˆ‘ πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) 𝑖=𝑗+1 𝑗

= βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) 𝑖=1 ∞

+ βˆ‘ πΆπ΄π‘š+𝑗 𝐡Δ𝑒 (π‘˜ βˆ’ π‘š βˆ’ 1) π‘š=0 𝑗

= βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) 𝑖=1

Therefore, the predictive output is denoted as Μ‚ = GΞ”U + f, Y

(35)

where 𝑦̂ (π‘˜ + 1) [ 𝑦̂ (π‘˜ + 2) ] [ ] ] Μ‚ [ Y= [ 𝑦̂ (π‘˜ + 3) ] ; [ ] .. [ ] . Μ‚ 𝑦 + 𝑁) (π‘˜ [ ] 𝑒 (π‘˜) [ 𝑒 (π‘˜ + 1) ] [ ] Ξ”U = [ ]; .. [ ] . [𝑒 (π‘˜ + 𝑁 βˆ’ 1)]

𝐢𝐴 [ 𝐢𝐴2 ] ] [ f = [ .. ] π‘₯ (π‘˜) [ . ] 𝑁 [𝐢𝐴 ]

𝐢𝐡 0 0 [ 𝐢𝐴𝐡 𝐢𝐡 0 [ G= [ .. .. .. [ . . . π‘βˆ’1 π‘βˆ’2 π‘βˆ’3 [𝐢𝐴 𝐡 𝐢𝐴 𝐡 𝐢𝐴 𝐡

β‹…β‹…β‹… β‹…β‹…β‹… .. .

0 0 .. .

] ] ]. ] π‘βˆ’π‘π‘’ β‹… β‹… β‹… 𝐢𝐴 𝐡]

(36)

6

International Journal of Distributed Sensor Networks

The cost function is fundamental for the determination of control action [20] and it is rewritten as

where 𝑅 is an upper triangular matrix and 𝑄 is an orthogonal matrix as 𝑅 = π»π‘π»π‘βˆ’1 β‹… β‹… β‹… 𝐻1 𝐴,

𝑁 σ΅„© σ΅„©2 Jadp = βˆ‘σ΅„©σ΅„©σ΅„©σ΅„©[𝑦̂ (π‘˜ + 𝑗) βˆ’ 𝑀 (π‘˜ + 𝑗)] 𝑄𝑦 σ΅„©σ΅„©σ΅„©σ΅„©

𝑄 = 𝐻1 𝐻2 β‹… β‹… β‹… π»π‘βˆ’1

𝑗=1

(37)

𝐻𝑐

σ΅„© σ΅„©2 + βˆ‘σ΅„©σ΅„©σ΅„©[Δ𝑒 (π‘˜ + 𝑗 βˆ’ 1)] 𝑄𝑒 σ΅„©σ΅„©σ΅„© , 𝑗=1

where 𝑄𝑦 and 𝑄𝑒 are the penalization matrixes. The cost function in (37) is further rewritten as

(46)

𝑄𝑇 𝑄 = [𝐻1 𝐻2 β‹… β‹… β‹… π»π‘βˆ’1 ] [𝐻1 𝐻2 β‹… β‹… β‹… π»π‘βˆ’1 ] = I, T

where 𝐻𝑖 (i = 1, 2, . . . , 𝑁) is a Householder matrix. Considering (45), the solution of least squares in (43) is 𝑇

𝐴 (𝑏 βˆ’ 𝐴ΔU) = 0 󳨐⇒ 𝑅𝑇 𝑄𝑇 (𝑏 βˆ’ 𝐴ΔU) = 0

(47)

𝑇

Μ‚ βˆ’w 𝑄 0 𝑄 0 Y Μ‚ βˆ’ w)𝑇 Ξ”U𝑇 ] [ 𝑦 Jadp = [(Y ] [ 𝑦 ][ ]. 0 𝑄𝑒 0 𝑄𝑒 Ξ”U (38)

as 𝑄𝑇 𝐴 = 𝑄𝑇 𝑄𝑅 = 𝑅. The preceding Equation (47) is rewritten as 𝑅𝑇 𝑄𝑇 (𝑏 βˆ’ 𝐴ΔU) = 0

The cost function Jadp based on square-root minimization is separated into two square roots as Jadp = Jm β‹… Jm ,

󳨐⇒ 𝑅𝑇 (𝑄𝑇 𝑏 βˆ’ 𝑄𝑇 𝐴ΔU) = 0

(39)

(48)

󳨐⇒ 𝑅𝑇 (𝑄𝑇 𝑏 βˆ’ 𝑅ΔU) = 0.

where Μ‚ βˆ’w 𝑄 0 Y Jm = [ 𝑦 ][ ]. 0 𝑄𝑒 Ξ”U

Thus, the control signal is obtained as (40)

𝑇

𝑄𝑇 𝑏 = 𝑅ΔU 󳨐⇒ Ξ”U=π‘…βˆ’1 𝑄 𝑏

Μ‚ the cost function After obtaining the predictive outputs Y, Jm in (40) is derived as

(41)

𝑄 G 𝑄 (wβˆ’f) ]. = [ 𝑦 ] Ξ”U βˆ’ [ 𝑦 0 𝑄𝑒

(49)

2.4. State Estimator. Consider the system in state space which is presented in (27) as follows: π‘₯ (π‘˜ + 1) = 𝐴π‘₯ (π‘˜) + 𝐡𝑒 (π‘˜) + Ξ πœ” (π‘˜) 𝑦 (π‘˜) = 𝐢π‘₯ (π‘˜) + ] (π‘˜) ,

To minimize the cost function in (41), the solution of the algebraic equation (the control action) is derived as 𝑄 G 𝑄 (wβˆ’f) [ 𝑦 ] Ξ”U βˆ’ [ 𝑦 ] = 0. 0 𝑄𝑒

𝑄𝑦 (wβˆ’f) ]. 0

Obtained vector Ξ”U represents the control signal for the whole predictive horizon N, and the actual control signal sent to plant is the first element in (49).

𝑄 0 GΞ”U + f βˆ’ w ][ Jm = [ 𝑦 ] Ξ”U 0 𝑄𝑒 (GΞ”U + f βˆ’ w) 𝑄𝑦 ] =[ Ξ”U𝑄𝑒

𝑇

󳨐⇒ Ξ”U = π‘…βˆ’1 𝑄 [

(42)

(50)

where πœ” and ] are sequences of white Gaussian noise with zero mean with known covariance as 𝐸 {πœ” (π‘˜)} = 𝐸 {] (π‘˜)} = 0.

(51)

Equation (42) is further presented as follows: The joint covariance matrix is 𝐴ΔU = 𝑏,

(43) 𝐸 {[

where 𝑄 G 𝐴 = [ 𝑦 ], 𝑄𝑒

𝑏=[

𝑄𝑦 (wβˆ’f) ]. 0

(44)

For solving (42), the QR decomposition [21] method based on the Householder algorithm [22, 23] is used to decompose matrix 𝐴 as 𝐴 = 𝑄𝑅,

(45)

𝑄 0 πœ” (π‘˜) ]. ] [πœ”T (π‘˜) ]T (π‘˜)]} = [ 0 0 𝑅0 ] (π‘˜)

(52)

The initial state π‘₯0 of a Gaussian random vector with mean presents 𝑖 as 𝐸 {π‘₯0 } = π‘₯Μ‚0 .

(53)

The covariance matrix is given by T

𝐸 {(π‘₯0 βˆ’π‘₯Μ‚0 ) (π‘₯0 βˆ’π‘₯Μ‚0 ) } = Ξ£0 .

(54)

International Journal of Distributed Sensor Networks

7

The conditional probability density functions (pdf) represent the Gaussian pdf as

Μƒ + 1) = 𝑦(π‘˜ + 1) βˆ’ The measurement prediction error 𝑦(π‘˜ Μ‚ + 1) is rewritten by replacing the 𝑦 and 𝑦̂ as 𝑦(π‘˜

P (π‘₯ (π‘˜)) ∼ N (π‘₯Μ‚ (π‘˜) , 𝑃 (π‘˜)) ,

𝑦̃ (π‘˜ + 1) = 𝐢π‘₯Μ‚ (π‘˜ + 1) + ] (π‘˜) .

(55)

(66)

Μ‚ and the covariance matrix 𝑃(π‘˜) where the state estimate π‘₯(π‘˜) are presented as

Considering (66), the covariance matrix is obtained as

π‘₯Μ‚ (π‘˜) = 𝐸 {π‘₯ (π‘˜)}

Multiply π‘₯(π‘˜ + 1) on both sides of transpose in (66) as

𝑃 (π‘˜) = 𝐸 {(π‘₯ (π‘˜) βˆ’ π‘₯Μ‚ (π‘˜)) (π‘₯ (π‘˜) βˆ’ π‘₯Μ‚ (π‘˜))𝑇 } .

(56)

Considering (55), the filtering cycle states at the instant π‘˜ + 1 are presented as P (π‘₯ (π‘˜ + 1)) ∼ N (π‘₯Μ‚ (π‘˜ + 1) , 𝑃 (π‘˜ + 1)) ,

(57)

where

𝑃𝑦̃ (π‘˜ + 1) = 𝐢𝑃 (π‘˜ + 1) 𝐢𝑇 + 𝑅0 . π‘₯ (π‘˜ + 1) 𝑦̃𝑇 (π‘˜ + 1) = π‘₯ (π‘˜ + 1) 𝐢𝑇 π‘₯̂𝑇 (π‘˜ + 1) + π‘₯ (π‘˜ + 1) ]𝑇 (π‘˜) .

+ 𝐸 {π‘₯ (π‘˜ + 1) , 𝑦̃𝑇 (π‘˜ + 1) π‘ƒπ‘¦Μƒβˆ’1 (π‘˜ + 1) 𝑦̃ (π‘˜ + 1)} . (69) (58)

Γ— (π‘₯ (π‘˜ + 1) βˆ’ π‘₯Μ‚ (π‘˜ + 1))𝑇 } . The Gaussian pdf is characterized by the mean and covariance matrix. Considering (27) by applying the mean value operator which is presented as 𝐸 {π‘₯ (π‘˜ + 1)} = 𝐴 β‹… 𝐸 {π‘₯ (π‘˜)} + 𝐡 β‹… 𝐸 {𝑒 (π‘˜)} + Ξ  β‹… 𝐸 {πœ” (π‘˜)} . (59) From (55) and (57), the πœ” with zero mean is obtained as π‘₯Μ‚ (π‘˜ + 1) = 𝐴π‘₯Μ‚ (π‘˜) + 𝐡𝑒 (π‘˜) .

βˆ’ 𝐴π‘₯Μ‚ (π‘˜) βˆ’ 𝐡𝑒 (π‘˜) = 𝐴π‘₯Μƒ (π‘˜) + Ξ πœ” (π‘˜) ,

In (69), the estimation of the state vector π‘₯Μ‚ is obtained by the Kalman filter as π‘₯Μ‚ (π‘˜) = 𝐴π‘₯Μ‚ (π‘˜ βˆ’ 1) + 𝐡Δ𝑒 (π‘˜ βˆ’ 1) + 𝐾𝑔 (π‘˜) (71) Γ— {𝑦 (π‘˜) βˆ’ 𝐢 [𝐴π‘₯Μ‚ (π‘˜ βˆ’ 1) + 𝐡Δ𝑒 (π‘˜ βˆ’ 1)]} ,

𝐾𝑔 (π‘˜) = 𝑃 (π‘˜ βˆ’ 1) 𝐢𝑇 [𝐢𝑃 (π‘˜ βˆ’ 1) 𝐢𝑇 + 𝑅] ,

(62)

𝐸 {(π‘₯Μƒ (π‘˜ + 1)) (π‘₯Μƒ (π‘˜ + 1))𝑇 } = 𝐴𝐸 {π‘₯Μƒ (π‘˜)} 𝐴𝑇 + Π𝑄0 Π𝑇 . (63) From (63), the notations in (56) and (58) result in (64)

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 π‘˜+1 before making observation at time instant π‘˜. The predicted measurement with a Gaussian pdf is given by 𝑦̂ (π‘˜ + 1) = 𝐸 {𝑦 (π‘˜ + 1)} = 𝐢π‘₯Μ‚ (π‘˜ + 1) .

(70)

𝑖=1

(61)

Μƒ = π‘₯(π‘˜) βˆ’ π‘₯(π‘˜). Μ‚ where the filtering error is π‘₯(π‘˜) Equation (59) is rewritten as follows:

𝑃 (π‘˜ + 1) = 𝐴𝑃 (π‘˜) 𝐴𝑇 + Π𝑄0 Π𝑇 .

𝑗

𝑦 (π‘˜ + 𝑗) = 𝐢𝐴𝑗 π‘₯Μ‚ (π‘˜) + βˆ‘πΆπ΄π‘–βˆ’1 𝐡Δ𝑒 (π‘˜ + 𝑗 βˆ’ 𝑖) .

where 𝐾𝑔 is Kalman filter gain matrix represented in (72) to adapt the estimation of model states to measure the outputs from controlled system. Consider

Μ‚ + 1). which is replaced in expression of π‘₯(π‘˜ + 1) and π‘₯(π‘˜ Equation (61) is rewritten as π‘₯Μƒ (π‘˜ + 1) = 𝐴π‘₯ (π‘˜) + 𝐡𝑒 (π‘˜) + Ξ πœ” (π‘˜)

The optimal estimator to compute the state is based on a Kalman filter. The 𝑗-step ahead system output presented in (34) is

(60)

The prediction error is defined as π‘₯Μƒ (π‘˜ + 1) = π‘₯ (π‘˜ + 1) βˆ’ π‘₯Μ‚ (π‘˜ + 1) ,

(68)

Consider 𝐸{π‘₯(π‘˜ + 1)𝑦̃𝑇 (π‘˜ + 1)} = 𝑃(π‘˜ + 1)𝐢𝑇 and evaluate the estimate state π‘₯Μ‚ at time instant π‘˜ + 1 as π‘₯Μ‚ (π‘˜ + 1) = 𝐸 {π‘₯ (π‘˜ + 1)}

π‘₯Μ‚ (π‘˜ + 1) = 𝐸 {π‘₯ (π‘˜ + 1)} 𝑃 (π‘˜ + 1) = 𝐸 { (π‘₯ (π‘˜ + 1) βˆ’ π‘₯Μ‚ (π‘˜ + 1))

(67)

(65)

βˆ’1

(72)

where the updated error covariance is 𝑃(π‘˜) = [𝐼 βˆ’ 𝐾𝑔 (π‘˜)𝐢]𝑃(π‘˜ βˆ’ 1). 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.

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). 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.

8

International Journal of Distributed Sensor Networks

Control signal u

State x

B A

+

1 z + Unit delay +

C +

+ + System output y

Kg

Kalman filter gain

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.

Figure 2: State estimator with Kalman filter.

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. 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 π‘₯ (π‘˜ + 1) = [

βˆ’0.0304 βˆ’0.0998 0.2116 ] π‘₯ (π‘˜) + [ ] 𝑒 (π‘˜) 0.1058 0.3476 1.3834 𝑦 (π‘˜) = [0 15.858] π‘₯ (π‘˜) . (73)

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). 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. 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.

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. 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. 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. 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). 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. 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

International Journal of Distributed Sensor Networks

9 Client workstation

Router

Server workstation

Matlab (Windows) Server module

NS2 (Linux)

Controller Ethernet

Ethernet

Server module Controller LAN Controller Controller NCS

Controller node Wireless node Actuator sensor node

Server workstation (Linux)

Client workstation (Windows XP)

Wireless simulator

(a)

(b)

Figure 3: Experiment setup: (a) hardware and (b) software.

Actuator/sensor node (client module)

Controller node (server module) Control signal u

Reference trajectory

Receiver a

Sender c

GPC

Sensor measurement disturbance

IEEE 802.11b

State x

State estimator

Plant

Receiver c System output y

Sender a

Sensor

Figure 4: Structure of WiNCS. X y C Discrete state observer B u A Kalman filter A B GPC controller C State (X) W Signal generator

Timestamps Node Terminator Send to N 1 T 1 ID = 0 Data N 1 T 1

u

S-function GPC

[A]

Controller node

Control signal in

Figure 5: Simulation architecture of controller node. Timestamps Node Terminator Send to N 0 T 1 ID = 1 Input Data N 0 T 1 Actuator node

Signal generator 1 y(k)

y(t) Measurement [A] Sensor State-space plant model Scope 1 Control signal out Scope Output

Figure 6: Simulation architecture of actuator/sensor node.

10

International Journal of Distributed Sensor Networks Wireless LAN IEEE 802.11

CoaX helicopter Embedded system Server program

Wireless router

Desktop computer Client program

Distance

Figure 7: Topology of the wireless network for performance testing.

Figure 9: Long corridor for wireless network parameter measurements. Wireless latency results-IEEE 802.11g

102

Figure 8: Square-shaped room for wireless network parameter measurements.

Latency (ms)

101

100

Table 1: Controller parameters in GPC. Controller parameter Predictive horizon Control horizon Sample time Penalization matrixes

Value 6 sampling steps 3 sampling steps 0.2 second 𝑄𝑦 : 0.8, 𝑄𝑒 : 0.01

Table 2: Simulation information of nodes with sample time 0.4 sec. Simulation specification Number of generated packets Number of sent packets Average packet size Number of sent bytes

Value 500 500 43.4973 32960

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. 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.

10βˆ’1

1

5

10

15

Distance (m)

Minimum Average Maximum

Figure 10: Latency measurements in roomβ€”IEEE 802.11 g. Table 3: Simulation information of nodes with sample time 0.3 sec. Simulation information Number of generated packets Number of sent packets Average packet size Number of sent bytes

Value 668 668 43.7701 44048

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.

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

International Journal of Distributed Sensor Networks

11

Wireless latency results-IEEE 802.11n

102

Wireless throughput results-IEEE 802.11n

5000

4500 4000 3500

Throughput (kB/s)

Latency (ms)

101

100

3000 2500 2000 1500 1000 500

10βˆ’1

1

5

10 Distance (m)

0

15

1

10

5

15

Distance (m)

Minimum Average Maximum

64 kB 256 kB

1 kB 4 kB 16 kB

Figure 11: Latency measurements in roomβ€”IEEE 802.11n.

Figure 13: Throughput measurements in roomβ€”IEEE 802.11n.

Wireless throughput results-IEEE 802.11g

2000

Wireless latency results-IEEE 802.11g

102

1800

1400 101

1200 Latency (ms)

Throughput (kB/s)

1600

1000 800 600

100

400 200 0

1

10

5

15

Distance (m) 1 kB 4 kB 16 kB

64 kB 256 kB

Figure 12: Throughput measurements in roomβ€”IEEE 802.11 g.

10βˆ’1

0

10

20

30 40 Distance (m)

50

60

70

Minimum Average Maximum

Figure 14: Latency measurements in corridorβ€”IEEE 802.11 g. Table 4: Simulation information of nodes with sample time 0.2 sec. Simulation information Number of generated packets Number of sent packets Number of dropped packets Average packet size Number of sent bytes Number of dropped bytes

Value 1002 1000 2 44.1737 65920 132

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

12

International Journal of Distributed Sensor Networks Wireless latency results-IEEE 802.11n

102

Wireless throughput results-IEEE 802.11n

5000

4500 4000 Throughput (kB/s)

Latency (ms)

101

100

3500 3000 2500 2000 1500 1000 500

10βˆ’1

0

10

20

30 40 Distance (m)

50

60

0

70

10

20

Minimum Average Maximum

30

60

70

64 kB 256 kB

1 kB 4 kB 16 kB

Figure 15: Latency measurements in corridorβ€”IEEE 802.11n.

40 50 Distance (m)

Figure 17: Throughput measurements in corridorβ€”IEEE 802.11n.

Wireless throughput results-IEEE 802.11g 2 1.5 1 0.5 0 βˆ’0.5 βˆ’1

1800

1600

Throughput (kB/s)

1400 1200 1000

0

10

20

30

40

50

60

70

80

90

100

Figure 18: System response with random delay between 160 ms and 200 ms.

800 600 400 10

20

1 kB 4 kB 16 kB

30

40 50 Distance (m)

60

70

64 kB 256 kB

Figure 16: Throughput measurements in corridorβ€”IEEE 802.11 g.

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

2 1.5 1 0.5 0 βˆ’0.5 βˆ’1

0

10

20

30

40

50

60

70

80

90

100

Figure 19: System response with random delay between 120 ms and 160 ms and packets loss rate 5%. π‘₯-axis: time (sec.) and 𝑦-axis: magnitude.

2 1.5 1 0.5 0 βˆ’0.5

0

10

20

30

40

50

60

70

80

90

100

Figure 20: WiNCS response with sample time 0.4 sec. π‘₯-axis: time (sec.) and 𝑦-axis: magnitude.

International Journal of Distributed Sensor Networks

13 Γ—10βˆ’3

Delay between node 0 and node 1 (s)

Delay between node 0 and node 1 (s)

Γ—10βˆ’3 4.5

4 3.5 3 2.5 2 10

20

30

40

50

60

70

4

3.5 3 2.5 2

90

80

10

20

Packet send time at node 0 (s)

Figure 21: Controller-to-actuator delay with sample time 0.4 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

40

50

60

70

80

90

Γ—10βˆ’3 5 4.5 4 3.5 3 2.5 2

Figure 25: Controller-to-actuator delay with sample time 0.3 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

Γ—10βˆ’3

Delay between node 0 and node 1 (s)

Delay between node 0 and node 1 (s)

30

Packet send time at node 0 (s)

10

20

30

40

50

60

70

80

3.2 3 2.8 2.6 2.4 2.2 2 1.8 1.6

90

10

20

Packet send time at node 1 (s)

30

40

50

60

70

90

80

Packet send time at node 1 (s)

Figure 22: Sensor-to-controller delay with sample time 0.4 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

Figure 26: Sensor-to-controller delay with sample time 0.3 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

0.03

0.03

0.02

0.02

0.01

0.01

0 0

βˆ’0.01

βˆ’0.01

βˆ’0.02

βˆ’0.02

βˆ’0.03 βˆ’0.04

0

10

20

30

40

50

60

70

80

90

100

Figure 23: Sensor noise measurement with sample time 0.4 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

2 1.5 1 0.5 0 βˆ’0.5 βˆ’1

0

10

20

30

40

50

60

70

80

90

100

Figure 24: WiNCS response with sample time 0.3 sec. π‘₯-axis: time (sec.) and 𝑦-axis: magnitude.

βˆ’0.03

0

10

20

30

40

50

60

70

80

90

100

Figure 27: Sensor noise measurement with sample time 0.3 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

2 1.5 1 0.5 0 βˆ’0.5 βˆ’1

0

10

20

30

40

50

60

70

80

90

100

Figure 28: WiNCS response with sample time 0.2 sec. π‘₯-axis: time (sec.) and 𝑦-axis: magnitude.

Delay between node 0 and node 1 (s)

14

International Journal of Distributed Sensor Networks Γ—10βˆ’3 4.5 4 3.5 3 2.5 2

0.03

0.02 0.01 0 10

20

30

40

50

60

70

80

90

Packet send time at node 0 (s)

Delay between node 0 and node 1 (s)

Figure 29: Controller-to-actuator delay with sample time 0.2 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

βˆ’0.01 βˆ’0.02 βˆ’0.03

0

10

20

30

40

50

60

70

80

90

100

Figure 31: Sensor noise measurement with sample time 0.2 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

Γ—10βˆ’3 5 4.5 4 3.5 3 2.5 2

10

20

30

40

50

60

70

80

90

Packet send time at node 1 (s)

Figure 30: Sensor-to-controller delay with sample time 0.2 sec. π‘₯axis: time (sec.) and 𝑦-axis: magnitude.

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 closedloop 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.

Γ—1014 10 8 6 4 2 0 βˆ’2 βˆ’4 βˆ’6 βˆ’8 10 0

20

30

40

50

60

70

80

90

100

Figure 32: WiNCS response with sample time 0.1 sec. π‘₯-axis: time (sec.) and 𝑦-axis: magnitude.

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

International Journal of Distributed Sensor Networks 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 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 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.

Appendix Software Packages (i) PiccSIM (Platform for Integrated Communications and Control Design, Simulation, Implementation, and Modeling). Helsinki University of Technology’s PiccSIM is a simulation platform for WiNCS using Matlab/Simulink and NS2. It is a Matlab xPC-based target toolbox that is to transmit user datagram protocol (UDP) packet between Matlab/Simlink and NS2 (http://autsys.tkk.fi/en/Control/PiccSIM). (ii) NS2 (Network Simulator Version 2). NS2 is a discrete event driven network simulator developed by UC Berkeley. NS2 has rich library of networks and protocols such as TCP and UDP, traffic behavior such as file transfer protocol (FTP), Telnet, CBR (constant bit rate), and VBR (variable

15 bit rate), router queue management mechanism, and more (http://www.isi.edu/nsnam/ns/). (iii) CMU IPC (Interprocess Communication). The Carnegie Mellon University’s Interprocess Communication library provides flexible, efficient message passing between processes based on the TCP/IP protocol. It can transparently send and receive complex data structures, including lists and variable length arrays, using both anonymous β€œpublish/subscribe” and β€œclient/server” message-passing paradigms. A wide variety of languages and operating systems are supported (http://www.cs.cmu.edu/∼ipc/). (iv) HrPing Utility. The hrPing utility provides throughput and round trip delay measurements for computer networks. In contrast to other tools, it achieves higher resolution by timing the round trip delay in microseconds (http://www.cfos.de/ping/ping e.htm).

References [1] W. Zhang, M. S. Branicky, and S. M. Phillips, β€œStability of networked control systems,” IEEE Control Systems Magazine, vol. 21, no. 1, pp. 84–99, 2001. [2] Y. Tipsuwan and M.-Y. Chow, β€œControl methodologies in networked control systems,” Control Engineering Practice, vol. 11, no. 10, pp. 1099–1111, 2003. [3] F.-Y. Wang and D. Liu, Networked Control Systems:Theory and Applications, Springer, London, UK, 2008. [4] W.-L. D. Leung, R. Vanijjirattikhan, Z. Li et al., β€œIntelligent space with time sensitive applications,” in Proceedings of the IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM ’05), pp. 1413–1418, July 2005. [5] G. C. Walsh, H. Ye, and L. G. Bushnell, β€œStability analysis of networked control systems,” IEEE Transactions on Control Systems Technology, vol. 10, no. 3, pp. 438–446, 2002. [6] G. C. Walsh, O. Beldiman, and L. Bushnell, β€œAsymptotic behavior of networked control systems,” in Proceedings of the IEEE International Conference on Control Applications (CCA ’99), pp. 1448–1453, August 1999. [7] M.-Y. Chow and Y. Tipsuwan, β€œGain adaptation of networked DC motor controllers based on QOS variations,” IEEE Transactions on Industrial Electronics, vol. 50, no. 5, pp. 936–943, 2003. [8] L. Zhang, Y. Shi, T. Chen, and B. Huang, β€œA new method for stabilization of networked control systems with random delays,” IEEE Transactions on Automatic Control, vol. 50, no. 8, pp. 1177– 1181, 2005. [9] L. A. Montestruque and P. Antsaklis, β€œStability of model-based networked control systems with time-varying transmission times,” IEEE Transactions on Automatic Control, vol. 49, no. 9, pp. 1562–1572, 2004. [10] D. Yue, Q.-L. Han, and C. Peng, β€œState feedback controller design of networked control systems,” IEEE Transactions on Circuits and Systems II, vol. 51, no. 11, pp. 640–644, 2004. [11] O. Beldiman, G. C. Walsh, and L. Bushnell, β€œPredictors for networked control systems,” in Proceedings of the American Control Conference, vol. 4, pp. 2347–2351, June 2000. [12] W. Aiguo, W. Dongqing, and L. Jin, β€œApplication of generalized predictive control with neural network error correction in networked control system,” in Proceedings of the 5th World

16

[13]

[14]

[15]

[16]

[17] [18]

[19] [20]

[21]

[22] [23]

International Journal of Distributed Sensor Networks Congress on Intelligent Control and Automation (WCICA ’04), vol. 2, pp. 1386–1390, 2004. M. Dejun, F. Lei, and D. Guanzhong, β€œResearch on generalized predictive control algorithm of networked control system,” in Proceedings of the 25th Chinese Control Conference (CCC ’06), pp. 119–122, August 2006. P. L. Tang and C. W. de Silva, β€œCompensation for transmission delays in an ethernet-based control network using variablehorizon predictive control,” IEEE Transactions on Control Systems Technology, vol. 14, no. 4, pp. 707–718, 2006. E. Witrant, P. G. Park, M. Johansson, C. Fischione, and K. H. Johansson, β€œPredictive control over wireless multi-hop networks,” in Proceedings of the 16th IEEE International Conference on Control Applications (CCA ’07), pp. 1037–1042, Singapore, October 2007. D. W. Clarke, C. Mohtadi, and P. S. Tuffs, β€œGeneralized predictive control. Part I. The basic algorithm,” Automatica, vol. 23, no. 2, pp. 137–148, 1987. C. B. E. F. Camacho, Model Predictive Control, Springer, Berlin, Germany, 2004. D. W. Clarke, C. Mohtadi, and P. S. Tuffs, β€œGeneralized predictive control. Part II. Extensions and interpretations,” Automatica, vol. 23, no. 2, pp. 149–160, 1987. D. Soloway, J. Shi, and A. Kelkar, GPC-Based Stable Reconfigurable Control, NASA Ames Research Center, 2004. K. Belda and J. Bohm, β€œRange-space predictive control for optimal robot motion,” International Journal of Circuits, Systems and Signal Processing, vol. 1, no. 1, 2007. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes: The Art of Scientific Computing, Cambridge University Press, Cambridge, UK, 3rd edition, 2007. G. H. Golub and C. F. V. Loan, Matrix Computations, Johns Hopkins University, Baltimore, Md, USA, 3rd edition, 1996. W. Y. Yang, W. Cao, T. S. Chung, and J. Morris, Applied Numerical Methods Using MATLAB, John Wiley & Sons, Hoboken, NJ, USA, 2005.

International Journal of

Rotating Machinery

Engineering Journal of

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

The Scientific World Journal Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

International Journal of

Distributed Sensor Networks

Journal of

Sensors Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Journal of

Control Science and Engineering

Advances in

Civil Engineering Hindawi Publishing Corporation http://www.hindawi.com

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Volume 2014

Submit your manuscripts at http://www.hindawi.com Journal of

Journal of

Electrical and Computer Engineering

Robotics Hindawi Publishing Corporation http://www.hindawi.com

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Volume 2014

VLSI Design Advances in OptoElectronics

International Journal of

Navigation and Observation Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Hindawi Publishing Corporation http://www.hindawi.com

Chemical Engineering Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Volume 2014

Active and Passive Electronic Components

Antennas and Propagation Hindawi Publishing Corporation http://www.hindawi.com

Aerospace Engineering

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Volume 2014

International Journal of

International Journal of

International Journal of

Modelling & Simulation in Engineering

Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Shock and Vibration Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

Advances in

Acoustics and Vibration Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014