neuro-fuzzy control with time delay estimation for...

16
International Journal of Innovative Computing, Information and Control ICIC International 2011 ISSN 1349-4198 Volume 7, Number 10, October 2011 pp. 1–-16 Neuro-Fuzzy Control with Time Delay Estimation for Nonlinear Networked Control Systems Paul E. Mendez-Monroy 1 , Héctor Benítez-Pérez 2 1 Postgraduate of engineering National Autonomous University of Mexico Circuito Escolar, Ciudad Universitaria, Col. Copilco, México D.F., CP. 04510 [email protected] 2 Department of Engineering in Computer Systems and Automation Research Institute of Applied Mathematics and Systems National Autonomous University of Mexico Circuito Escolar, Ciudad Universitaria, Col. Copilco, México D.F., CP. 04510 [email protected] Received May 2010; revised August 2010 ABSTRACT. This paper presents a neuro-fuzzy control strategy with online estimation of Round Trip Time delay for nonlinear Networked Control Systems, first a fuzzy model is identified offline through inputs-states data with delay measurement, therefore, parameters for the estimation of Round Trip Time delay are obtained. The fuzzy control is designed by Linear Quadratic Regulation and a stability analysis is present. A Real-Life hardware-in- the-loop Magnetic Levitation System is used as case study to show the effectiveness of control and robustness to traffic. Keywords: Networked Control Systems, Neuro Fuzzy Control, Delay Estimation 1. Introduction. A feedback control system in which control loops are closed via a communication network is called networked control system (NCS), so, sensors, actuators, controllers and others (monitors, etc) are interconnected via communication networks. The main advantages of this kind of systems are their low cost, small volume of wiring, distributed processing, simple installation, maintenance and reliability. Recently, much attention has been paid to control design and stability analysis of NCSs [1] –[8], where the key problems to resolve are network-induced delays and packet loss that degrade the system performance. Time delay is considered constants, time varying, or even random. Time delays as well as loss packet depends of the scheduler, network type, architecture, operating systems, etc [9] [10]. When time delay is less than the sampling period of NCS, results indicate that time delay has degradation effects in system performance but is possible to correct or eliminate this [11]. However, when time delay is greater than sampling period with a varying o random behavior, the performance in a NCS is reduced considerably. Whereby, it is necessary to analyze time delays and packet loss to develop an efficient approach to reduce its effect into NCS. Nilsson analyzes important facets of NCSs [10]. It introduces models for the delays in NCS, first as a fixed delay, after as an independently random, and finally like a Markov process. The author introduces optimal stochastic control theorems for NCSs based upon the independently random and Markovian delay models, but he considers just time delays less than a sampling period. In [12], Walsh et al. introduces static and dynamic scheduling policies but just for transmission from sensor to controller in a continuous-time LTI system.

Upload: others

Post on 16-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

International Journal of Innovative Computing, Information and Control ICIC International ⓒ2011 ISSN 1349-4198 Volume 7, Number 10, October 2011 pp. 1–-16

Neuro-Fuzzy Control with Time Delay Estimation for Nonlinear Networked Control Systems

Paul E. Mendez-Monroy1, Héctor Benítez-Pérez2

1Postgraduate of engineering National Autonomous University of Mexico

Circuito Escolar, Ciudad Universitaria, Col. Copilco, México D.F., CP. 04510 [email protected]

2Department of Engineering in Computer Systems and Automation

Research Institute of Applied Mathematics and Systems National Autonomous University of Mexico

Circuito Escolar, Ciudad Universitaria, Col. Copilco, México D.F., CP. 04510 [email protected]

Received May 2010; revised August 2010

ABSTRACT. This paper presents a neuro-fuzzy control strategy with online estimation of Round Trip Time delay for nonlinear Networked Control Systems, first a fuzzy model is identified offline through inputs-states data with delay measurement, therefore, parameters for the estimation of Round Trip Time delay are obtained. The fuzzy control is designed by Linear Quadratic Regulation and a stability analysis is present. A Real-Life hardware-in-the-loop Magnetic Levitation System is used as case study to show the effectiveness of control and robustness to traffic. Keywords: Networked Control Systems, Neuro Fuzzy Control, Delay Estimation

1. Introduction. A feedback control system in which control loops are closed via a communication network is called networked control system (NCS), so, sensors, actuators, controllers and others (monitors, etc) are interconnected via communication networks. The main advantages of this kind of systems are their low cost, small volume of wiring, distributed processing, simple installation, maintenance and reliability.

Recently, much attention has been paid to control design and stability analysis of NCSs [1] –[8], where the key problems to resolve are network-induced delays and packet loss that degrade the system performance. Time delay is considered constants, time varying, or even random. Time delays as well as loss packet depends of the scheduler, network type, architecture, operating systems, etc [9] [10]. When time delay is less than the sampling period of NCS, results indicate that time delay has degradation effects in system performance but is possible to correct or eliminate this [11]. However, when time delay is greater than sampling period with a varying o random behavior, the performance in a NCS is reduced considerably. Whereby, it is necessary to analyze time delays and packet loss to develop an efficient approach to reduce its effect into NCS.

Nilsson analyzes important facets of NCSs [10]. It introduces models for the delays in NCS, first as a fixed delay, after as an independently random, and finally like a Markov process. The author introduces optimal stochastic control theorems for NCSs based upon the independently random and Markovian delay models, but he considers just time delays less than a sampling period. In [12], Walsh et al. introduces static and dynamic scheduling policies but just for transmission from sensor to controller in a continuous-time LTI system.

Page 2: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

They introduce the notion of the Maximum Allowable Transfer Interval (MATI), which is the longest time in that a sensor should transmit a data. Therefore, Walsh derived Try-Once-Discarded (TOD) scheduling where the MATI constraint ensures at least one such transmission every τ seconds. However, TOD does not guarantee that each node will transmit once every p transmissions. In [13], Zhang extends the work of Walsh, he developed a theorem which ensures that the Lyapunov derivative function is negative definite for a discrete-time LTI system at each sampling instant.

In [14] Zhu takes into consideration both the network-induced delay and the time delay in the plant with both transmission sensor-controller and controller-actuator, a controller design method is proposed by using the delay-dependent approach; an appropriate Lyapunov candidate function is used to obtain a Linear Matrix Inequalities (LMIs) based on memoryless feedback controller. In [15] Wang models the network induced delays of the NCSs as interval variables governed by a Markov chain. Using the upper and lower bounds of the delays, a discrete-time Markovian jump system with norm-bounded uncertainties is presented to model the NCSs.

On the other hand, it is well known that Takagi Sugeno Kang (TSK) fuzzy models are qualified to represent a certain class of nonlinear dynamic systems [16] and many control techniques have been developed in the literature. With respect to NCS control designs using TSK fuzzy models some results have recently been published [17] - [19]. In [19], a control with fault detection for NCSs with Markov delays was addressed, where a linear plant was modeled in the discrete-time domain, and a set of TSK fuzzy rules were used to deal with network-induced delays. On the other hand, results in [17] and [18] were formulated in the continuous time domain, where the TSK fuzzy systems with norm-bounded uncertainties were used to characterize the nonlinear NCSs. In [20] is proposed a LQR (Linear Quadratic Regulator) based on Fuzzy Logic. It is presented a method for online estimation of network-time delays for invariant sampling period and it is assumed that the delays to be less than a sampling period. [29] shows robust control design for NCS polytopic systems with time delays uncertain with PID controllers, but only shows numerical examples to show effectiveness of method.

With respect to time delays, in [3] is modeled the effect of varying time delays as a variable sampling period in discrete time systems. Similar approximation has been performed by [29] where a specific study of the time delays has been reviewed as well as the application strategy for NCS. On the other hand [30] shows a practical approximation of time delays assuming a regular computer network.

All previous work shows some control or scheduling strategy to provide robustness to constant or varying time delays, including packet loss; those assume they have available the system model mostly linear and that this is sampled periodically. This means some restrictions on the implementation of control system, so we propose a controller to stabilize nonlinear systems assuming that there is no model system-network. Only knowledge about inputs-states data and statistical values of RTT delay and packet loss network is assumed. Those are obtained using a classic controller in the NCS by simulation. This paper has as main objective to stabilize the system following desired trajectory with robustness to traffic into network but with an optimal performance according to delay value.

This work presents a neuro fuzzy control with online estimation of RTT (Round Trip Time) delay for nonlinear NCS, where local discrete models are identified with inputs-states and RTT delays data. Next section shows the neuro fuzzy model and the identification

Page 3: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

approach, third section shows the online estimation of RTT delay, fourth section shows the design of LQR fuzzy controller and its stability analysis, fifth section shows a magnetic levitation system as case study and its model identified as well as the control design. Last section presents conclusions of work.

2. RTT Delay Estimation. Time delays and packet losses are the main concerns for control design in a NCS. As opposed to digital systems, a NCS with a small sampling period of the system does not always improve system performance due to constraints of network bandwidth. So, it is important to analyze their behavior focusing to obtain a model that allows a compensation action. However, the model should be simple to be estimated in real time providing a reasonable accuracy.

Our NCS configuration has four types of nodes into an Ethernet network, sensor, controller, actuator and traffic nodes. It is considered communication between sensor – controller and controller – actuator nodes. Traffic nodes send periodic or sporadic packets into network, for example, other control loops or monitoring.

FIGURE 1. NCS configuration with traffic nodes

All nodes send UDP packets to avoid double traffic into network, but resulting in an unreliable network because there is not certainty that a send packet had been received. Sensor node is managed with a sampling period T, controller node is event triggered by a send packet from sensor node, while actuator node is event triggered by a send packet from controller node; those generate precedence constraints into network.

In this paper, network-induced time delays and packet loss are seen as a RTT delay kτ̂ to be estimated in the controller node to generate a control action. Controller node receives packets from sensor node with information about system states ( )kx , sampling period T and stamped time kb of send packet; when a packet from sensor node is received the controller node stamps its arrived time kc , where K,2,1=k is the instant when a packet is received. So, the controller time delay kκ and packet losses kλ are calculated using kb and kc time stamped (FIGURE 2).

Page 4: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 2. Time diagram of RTT delays

It is assumed that internal clocks into nodes has no drift or it is compensated, so, kκ (1) is calculated to assume known 1κ initial controller time delay, while kκ is the difference between controller kc and sensor kb time stamped intervals (1).

11 −⎟⎠⎞

⎜⎝⎛ −

= −

Tbbround kk

kλ K,3,2=k (1)

( ) ( ) kkkkkk bbcc λκκ ++−−−= −− 111 ,...3,2=k (2)

While packet loss kλ (2) are the integer number of the difference between sensor stamped time divided by sampling period T less 1.

Once controller time delay kκ is calculated the exponential distribution algorithm [7] is used to estimate RTT delay kτ̂ , this algorithm is widely used to estimate delays in real time,

where a offline statistical analysis characterizes mean and standard deviation [ ]TEq φη,= of offline RTT delay data τ with various traffic scenarios, those data are used to form a generalized exponential distribution with a probability density function:

[ ]( )

⎪⎩

⎪⎨⎧

<

≥=

−−

ηκ

ηκφκ

φηκ

,0

,1 /eP (3)

This function [ ]κP is calculated for a moving window with w previous controller time delays { }kkwk κκκ ,,, 11 −+−=Τ K , where the expected value of kτ̂ is [ ] wkwkwkE |1|1| ++ += φηκ .

First, it is obtained [ ]TEq φη,= by statistical analysis, so the new mean wk |1+η is the controller time delay iκ with the maximum value of the probability function (3) and the new standard deviation wk |1+φ is square root of the variance’s window.

[ ]ΤΤ=+i

Piwk max|1 |η (4)

( )Τ=+ var|1 wkφ (5)

So, the RTT delay is estimated as:

wkwkk |1|1ˆ ++ += ηφτ ,...3,2=k (6)

Once the RTT delay kτ̂ of system is estimated, it is used to generate a control signal with

Page 5: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

the fuzzy controller showed in section 3.

3. Neuro Fuzzy model. The fuzzy model (7) is TSK type [27] with RTT delay kτ̂ as antecedent input and discrete models with different sampling periods T as consequent part. So, defining r fuzzy rules, the j-th rule has form of:

( ) ( ) ( ) ( ) ( )kkTktheniskif jjjjj uΓxΦx +=+τατ ˆˆ (7)

where ( ) nk ℜ∈x is state vector of system, ( ) mk ℜ∈u is input vector of plant, jα is the j-th membership function of RTT delay kτ̂ .

The overall fuzzy model is:

( ) ( ) ( )( )∑=

+=+r

j

jjj kkk1

ˆˆ uΓxΦx ψτ (8)

where the normalized fire strength jψ is:

∑=

= r

s

s

jj

αψ 0≥jψ 11

=∑=

r

j

jψ ( )( ) ⎟

⎟⎠

⎞⎜⎜⎝

⎛ −−= 2

2ˆexp

j

jkj

σρτα (9)

where jα is a Gaussian membership function with parameters ( )jj σρ , and nxnj ℜ∈Φ , nxmj ℜ∈Γ are the matrices of j-th model with periods { }rT ρρρ ,,, 21 K= and m

outputs. With this fuzzy model is obtained the states with a estimated RTT delay, the objective is to

smoothly switch between discrete models to generate the best estimate of states according to the RTT delay kτ̂ . However, there are some parameters as ( )jjjj σρ ,,,ΓΦ that need to be tuned; those are tuned using a neuro-fuzzy approach based on simulation data of system with specific time delays. The neuro-fuzzy model is identified using inputs-states data with RTT delays measurement { }LluxD lll K1,, == τ obtained from a Truetime simulation of system with a PID controller and a traffic node into an Ethernet network.

The identification procedure has two algorithm; a clustering algorithm to create new rules and a training algorithm to update model’s parameters (FIGURE 3). The procedure is repeated φ epochs. M is maximum firing strength of all rules for RTT delay and dK is its threshold.

eK is a threshold of maximum model error. J is performance index to update the matrices ( )jj ΓΦ , .

Procedure: the first fuzzy rule is created with the discrete model with sampling period 0ρ , where 0ρ is RTT delay mean and 0σ is predetermined width. So, matrices 1Φ and 1Γ of first rule are:

( )01 ρAΦ e= (10)

BΓ A∫=0

0

1 ρdse s (11)

( )τρρ mean== 01 0

1 σσ = (12)

Page 6: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

Begin Eqns. First rule r = 1 (10-12) for f =1…φ

for k = 1…L read { }lll ux τ,,

calculate M and e (13) (15) if dKM < (14)

r=r+1, new rule if eKe < (16)

calculate J (18) update ( )jjjj σρ ,,,ΓΦ j = 1,…,n (19-22)

End

FIGURE 3. Neuro-fuzzy model algorithm

A new rule is created using the ε-completeness criterion. It says that for any input within operation range there is a rule with fire strength jα greater than a threshold dK [22]. So, if maximum firing strength M of all rules is less than dK then a new rule is created.

( )j

jM αmax= (13)

dKM < (14)

With this clustering algorithm is ensured that all RTT delays of the training data are represented by the antecedent part of neuro-fuzzy model.

In training algorithm, the parameters of local models are estimated using error criterion. It says that if output error e is less than a threshold eK (16), parameters should be adjusted. The threshold eK is decreased according to the current epoch f.

( ) ( )1ˆ1 +−+= kykye (15)

eKe > (16)

( ) maxminmax 1

1efeeKe +−

−+

−=φ

(17)

where: maxe Final error expected at the end of training

mine Initial error obtained in the first epoch without training f Current training epoch φ Total of epochs The back propagation approach is used for the adjustment of the parameters. So, a

performance index J is used to adjust the model with objective to minimize J (modeled error).

( )2

ˆˆ

21 12

∑=

−=−=

n

ppp xx

xxJ (18)

The coefficients of matrices jjqpa Φ∈, and jj

opb Γ∈, , as well as the centers and standard

Page 7: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

deviations are adjusted by:

( ) ( ) ( ) ( )( ) ( )kxkxkxkaka qppaj

pqj

pq ψη 1ˆ1ˆ1 ,, +−+−=+ (19)

( ) ( ) ( ) ( )( ) ( )kukxkxkbkb ij

ppbj

ipj

ip ψη 1ˆ1ˆ1 ,, +−+−=+ (20)

( ) ( ) ( ) ( )( ) ( ) ( )( ) ( )( ) ( ) ⎟⎟⎠

⎞⎜⎜⎝

⎛ −−−Γ+Φ+−+−=+ 2

2 ˆ2ˆ1ˆ1ˆ1j

jjjjjjj kukxkxkxkk

σρτψψηρρ ρ

(21)

( ) ( ) ( ) ( )( ) ( ) ( )( ) ( )( ) ( )( ) ⎟

⎟⎠

⎞⎜⎜⎝

⎛ −−−Γ+Φ+−+−=+ 3

22 ˆ2ˆ1ˆ1ˆ1

j

jjjjjjj kukxkxkxkk

σρτψψησσ σ

(22)

where: η It is the learning rate for each parameter

npq K1, = states mo K1= inputs rj K1= rules

4. Fuzzy Control. Once designed and identified the fuzzy model (7-9) is proposed a fuzzy controller using estimated RTT delay kτ̂ . A fuzzy feedback control law is designed:

( ) ( ) rjkkr

j

jj K11

=−= ∑=

xKu ψ (23)

where jK is the feedback matrix of the j-th fuzzy rule. This control law is designed like a LQR (Linear Quadratic Regulator) [18] to minimize performance index:

( ) ( ) ( ) ( ) ( ){ }∑∞

=

+=0k

jTjTj kkkkuJ uRuxQx rj ,,1K= (24)

where ( ) 0≥=Tjj QQ and ( ) 0≥=

Tjj RR . Control design by LQR for each local model requires the algebraic solution of the Ricatti equation for jH matrix.

( ) ( ) ( )( ) ( ) 0ΦHΓΓHΓRΓHΦQHΦHΦ =+−+−−

jjTjjjTjjjjTjjjjjTj1

(25)

So, the feedback matrices are calculated like:

( )( ) ( ) jjTjjjTjjj ΦHΓΓHΓRΚ1−

+= rj ,,1K= (26)

The close loop system is:

( ) ( ) ( )

( )∑∑

∑∑

= =

= =

=

−=+

r

i

r

jij

ji

r

i

r

j

jiiji

k

kk

1 1

1 11

xΚΓΦx

ψψ

ψψ (27)

with jiiij ΚΓΦΛ −= ri ,,1K= rj ,,1K=

The proprieties of the antecedent part (9) are considered for the stability analysis of fuzzy

Page 8: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

control (27):

( ) 1210,1

2

1 1=+=≥ ∑∑∑∑

<

== =

ji

ji

jir

i

ir

i

r

j

jiji ψψψψψψψ (28)

Based on the properties of fuzzy control and assume that two-overlapped fuzzy memberships at most is presented stability analysis of closed loop fuzzy control. First, it is necessary to define the following lemma to prove stability analysis. Lemma 4.1. [30] For any matrices nxn

kgij , ℜ∈> 0,PBA for ri ≤≤1 , we have

( )∑∑∑∑∑∑ +≤r

i

r

jij

Tijij

Tij

jir

i

r

j

r

k

r

gkg

Tij

gkji PBBPAAPBA ψψψψψψ2 (29)

where iψ has properties (28). Theorem 4.1. The equilibrium state 0=ex of closed loop system (27), with control input (23) with two-overlapped fuzzy memberships at most, is asymptotically stable in the large, if there exist μ positive-definite matrices 0>= TPP ss such that:

( ) 0<− ssiis

sii PΛPΛ T sSi∈ μ,,1K=s (30)

( ) ( ) 02 <−++ sjiijsjiij PΛΛPΛΛ T sSi∈ sSj∈ sSji ∈< (31)

with jiiij ΚΓΦΛ −=

where { }μSSSS ,,, 21 K= are μ regions where two fuzzy rules are fired (overlapped fuzzy memberships) at most, where sS contains the membership function indexes for fired fuzzy rules in s region.

Proof: We suppose that there exist μ matrices 0>= TPP ss so (30) and (31) are satisfied. Considering a candidate Lyapunov function like:

( ) ( ) ( )( )kkk ss

s xPxV T∑=

λ1

(32)

where

( ) ( )( ) ( ) 1ˆ

ˆ0ˆ1

ˆ1

=⎩⎨⎧

∉∈

= ∑=

τλττ

τλμ

ss

s

ss Sk

Sk (33)

It can be easily showed that ( ) 00 =V , ( ) 0>kV for ( ) 0≠kx , and ( ) ∞→xV as ( ) ∞→kx , it is only sufficient shows that ( )( ) 0<Δ kxV to prove that ( )kV is a Lyapunov

function and the theorem. So, we have:

( ) ( ) ( ) ( ) ( )( ) ( ) ( )( )

( ) ( ) ( ) ( )kkkk

kkkkkkk

sss

ss

ss

sss

s

xPxVLV

xPxxPxVVV

T

TT

==Δ

−++=−+=Δ

∑∑

=

==

μ

μμ

λ

λλ

1

11

111

( ) ( )kk sss VVL −+= 1 (34)

It is enough to show that:

Page 9: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

0<sL μ,...,1=s

Substituting ( )1+ksV and ( )ksV in (34) we have:

xPxxΛPxΛL T

T

sSi Sj

ijjisSi Sj

ijjiss ss s

−⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛= ∑∑∑∑

∈ ∈∈ ∈

ψψψψ (35)

applying the proprieties (28) to (35)

( ) ( ) ( )kks s s sSi Sj Sk Sg

skgsijgkji xPΛPΛx TT

⎟⎟⎠

⎞⎜⎜⎝

⎛−= ∑∑∑∑

∈ ∈ ∈ ∈

ψψψψ '

By lemma 1 (29), sL is:

( ) xPΛPΛxL TT⎟⎟⎠

⎞⎜⎜⎝

⎛−≤ ∑∑

∈ ∈s sSi Sjsijsijjis ψψ (36)

( ) ( ) ( )( ) xPΛΛPΛΛPΛPΛxL TT⎟⎟⎠

⎞⎜⎜⎝

⎛−+++−≤ ∑∑∑

<

∈∈ s ss Si

ij

Sjsjiijs

Tjiijji

Sisiisiiis 22 ψψψ

(37) ( ) 00 <Δ→< ks VL

The first term in (40) is negative definite by (30). The second term is negative definite by (31). Thus, the positive definite quadratic function (32) is a Lyapunov function for fuzzy control (23), this implicates asymptotically stability in the large. The proof of theorem is complete.

5. Case Study. Case study is a magnetic levitation system integrated to Ethernet network [1] (Figure 1). The computers are Pentium 2 with 254 Mb RAM and a INTEL 10/100 Mb Ethernet card, each has a XPC target 2.8v as operative system by Matlab 7.1v and are connected through a switch Cisco Catalyst 2960 with 24 port 10/100 Mb. The sensors have an A/D Q4 card by Quanser with 10 bits resolution and the actuator has a D/A AD512 card by Humusoft with 8 bits resolution. The sampling period for sensor node is 1 ms and controller, actuators nodes are event driven.

The magnetic levitation system is a nonlinear, open-loop unstable and time varying system. This device contains an electromagnet to levitate a steel ball, and an infrared sensor for the measurement of steel ball’s position. The issue of the experiment is to design a controller to levitate the steel ball following a desired trajectory.

Using a free-body diagram of the maglev, we obtain the following equations:

( ) ( ) ( )

( ) ( )( )tati

mKg

dttad

tiLRtv

Ldttdi

e2

2

2

2

1

−=

−= (38)

Page 10: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 4. Schematic mechanic-electric diagram of MAGLEV.

where g is the gravity force, ( )ti the current of the coil, ( )ta the distance from coil to ball position, ( )tv the voltage of the coil, eK the magnetic force constant, R the resistance of the coil, and L the inductance of the coil.

5.1. Fuzzy Model. The continuous state space model with state vector ( ) ( )iaatx ,, &= is:

( ) ( ) ( )

( ) ( )tu

L

tx

LR

maiK

maiK

tutxtx

ee

⎥⎥⎥

⎢⎢⎢

+

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

−=

+=

100

00

0010

20

030

20

BA&

(39)

The discrete model is obtained of (29) with a sampling period 1ρ and it is used to training the neuro-fuzzy model. To training the neuro-fuzzy model first is obtained a set of inputs-states with RTT delay measurement with a classic PID controller by Truetime simulation. The training generated four rules 4=r , the first discrete model is:

kkk uxx⎥⎥⎥

⎢⎢⎢

⎡+

⎥⎥⎥

⎢⎢⎢

−−=+

0024.000

9737.0000225.00016.12718.30001.00016.1

11

The parameters jρ , jσ for 41K=j rules, with the bounded RTT delay msh 20= are:

[ ][ ]4444 10x3010x3010x2410x6

0152.00110.00053.00012.0−−−−=

=

j

j

σ

ρ

FIGURE 5 show the membership function with the parameters designed with a bounded RTT delay msh 20= .

Page 11: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 5. Normalized Membership functions for case study.

Notice that there are three region with two overlapped membership functions, therefore, there should be only three matrices sP with three conditions each to ensure stability, contrary to the general method that requires 16 conditions for a common matrix P. 5.2. RTT Estimation. The parameters of RTT delay estimation were obtained of offline RTT delay measurement. These data are composed by four parts of 25 ms each (FIGURE 6), first part shows the delay with five traffic nodes were transmitting into network, second part has not traffic nodes, third part has three traffic nodes and last part has only one traffic node. So, the median and variance of this data are the initial parameters.

3010x56.1

10x36

3

==

=−

η

FIGURE 6. Offline RTT delay data.

With these parameters we show the online estimated RTT delay (6) (FIGURE 7), (+) is the RTT delay measurement and (•) is the estimated RTT delay, where the estimation is

Page 12: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

acceptable with a standard deviation of 61082.1 −x .

FIGURE 7. Comparison between the measured (+) and estimated (•) RTT delay.

5.3. Fuzzy Control. With the fuzzy model was designed a fuzzy controller following (23) control law designed for each discrete local model. Each feedback control law is designed by LQR (25) and (26), feedback law for first model is:

[ ]97.11054.103383681 −−=K

Fuzzy controller was implemented with the control loop and five nodes into Ethernet network. The first test is only with the control loop without traffic nodes, the reference signal was a pulse train to shows the following of trajectories (FIGURE 8).

The system has an acceptable performance 61007.1 −x ; with small fluctuations due to the light sensor has not a noise filter after the sensor. The controller has good tracking, and low average settling time 1.12 s, with an average delay of 3 ms, although the RTT delay (FIGURE

9) has a range of ( )14 102,10x8 −− x showing the random behavior of the RTT delay.

FIGURE 8. Response of the system without traffic.

Page 13: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 9. Estimated RTT delay of the system without workload.

To show the efficiency of fuzzy controller we present two cases; first case shows stability to delays with three traffic nodes, second case shows stability to delays and packet loss with five traffic nodes. The message length of traffic nodes is 2 Kbytes with a sampling period of 1 ms.

The first case (Figure 10) shows the system trajectory with three traffic nodes, the system is stable with a good performance 610x69.1 − and small fluctuations even with average RTT delay of 6 ms, note that there are a maximum RTT delay of 300 ms and 1.98% packet loss (FIGURE 11). Therefore, the average settling time is very similar to case without traffic.

Figure 10. System trajectory with 1.98% packet loss and maximum RTT delay of 300 ms.

Page 14: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 11. Estimated RTT delay with three traffic nodes.

The case above shown robust behavior to moderate time delays and packet loss, but it is necessary to prove more aggressive behavior with large time delays and more packet loss into network.

So, second case (FIGURE 12) shows the system trajectory with five traffic nodes that generate large varying RTT delays and a larger packet loss percent. The system has more fluctuation but It remains stable and its average settling time 1.34 ms is similar to two case above. Its performance is good 610x58.2 − , with a average RTT delay of 20 ms and a maximum RTT delay of 700 ms, the packet loss percent is 5.7% (FIGURE 13).

FIGURE 12. Response of maglev with five traffic nodes.

Page 15: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

FIGURE 13. RTT delay with five traffic nodes.

6. Conclusions This paper presents a new neuro-fuzzy model with online estimated RTT delays for NCS.

The model is obtained from inputs-states data with RTT delay measurement, the rules are created with an easy clustering method, the model’s parameters are updated using back propagation. It is showed the efficiency modeling with a nonlinear instable system.

The generalized exponential distribution to estimate RTT delays was proved with real RTT delays generated into a Ethernet network. Results show a good estimation for use in the fuzzy model.

It has been proposed the design of a fuzzy controller to stabilize a nonlinear NCS, this design is optimal for a static RTT delay and asymptotically stable in the large with varying RTT delays longer than a sampling period, this control is robust to several data loss and traffic into network.

The complete implementation has been carried out considering a Ethernet network and a benchmark of magnetic levitation system was used to prove the fuzzy controller. Real data shows that own strategy is suitable for common situation during Ethernet performance. Future work needs to be carried out in order to understand the communication network as dynamic system. Furthermore a better understanding is necessary when intermittent long delays appear into network as well as get bounds for the RTT delay and packet loss.

Acknowledgment The authors would like to thank the financial support of DISCA-IIMAS-UNAM, and

UNAM-PAPIIT IN103310. The authors also gratefully acknowledge the helpful comments and suggestions of the reviewers, which have improved the presentation.

REFERENCES [1] H. Benítez-Pérez, P. Quiñones-Reyes, P. E. Mendez-Monroy, F. García-Nocetti, And F. Cardenas-Flores,

Reconfigurable Fault Tolerant PID Networked Control for Magnetic Levitation Case Study, IFAC Symposium on Safeprocess, Beijing, P.R. of China. August 2006.

[2] D. Kim, Y. Lee, W. Kwon, and H. Park, Maximum allowable delay bounds of networked control systems, Control Eng. Pract., vol. 11, no. 11, pp. 1301–1313, Nov. 2003.

Page 16: Neuro-Fuzzy Control with Time Delay Estimation for ...zaz.iimas.unam.mx/~hector/archivos/documento30.pdf · design of LQR fuzzy controller and its stability analysis, fifth section

[3] E. H. Jung, H. H. Lee ,and Y. S. Suh, LMI-based output feedback control of networked control systems, IEEE International Workshop on Factory Communication Systems, 2004.

[4] L. A. Montestruque and P. J. Autsaklis, Stability of model-based networked control systems with time-varying transmission times, IEEE Trans. Autom. Control, vol. 49, no. 9, pp. 1562–1572, Sep. 2004.

[5] D. Nésíc and A. R. Teel, Input-to-state stability of networked control systems, Automatica, vol. 40, no. 12, pp. 2121–2128, Dec. 2004.

[6] D. Yue, Q.-L. Han, and J. Lam, Network-based robust H∞ control of systems with uncertainty, Automatica, vol. 41, no. 6, Jun. 2005.

[7] Azimi-Sadjadi B., Stability of Networked Control Systems in the Presence of Packet Losses, Proc. IEEE Conference on Decision and Control, Maui, Hawaii, USA, pp. 676–681, December 2003.

[8] Eidson J. C., Fischer M., and White J., IEEE-1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems. IEEE Standard 1588-2002.

[9] Gahinet P., Nemirovski A., Laub A. J., and Chilali M., LMI Control Toolbox—For Use with MATLAB. The MathWorks, Inc., Natick, MA, May 1995.

[10] Nilsson J., Real-Time Control Systems with Delays. Ph.D. thesis, Lund Institute of Technology, Dept. of Automatic Control, February 1998.

[11] Loyoza C., Marti P., Velasco M., and Fuertes J. M., Analysis and design of networked control loops with synchronization at the actuation instants, In 34th Annual Conference of the IEEE Industrial Electronics Society (IECON08), Orlando, Florida, US, November, 2008.

[12] Walsh G. C., Ye H., and Bushnell L., Stability Analysis of Networked Control Systems, Proc. American Control Conference, San Diego, USA, pp. 2876–2880, June 1999.

[13] Zhang W., Stability Analysis of Networked Control Systems. Ph.D. thesis, Case Western Reserve University, Dept. of Electrical Engineering and Computer Science, May 2001.

[14] Zhu X., Hua C. and Wanf S., State Feedback Control Design of Networked Control Systems with Time Delay in the Plant, International Journal of Innovative Computing, Information and Control, vol. 4, no. 2, Feb. 2008.

[15] Wang Y. and Sun Z., H-inf Control of Networked Control Systems Via LMI Approach, International Journal of Innovative Computing, Information and Control, vol. 3, no. 2, Apr. 2007.

[16] K. Tanaka and H. O. Wang, Fuzzy Control Systems Design and Analysis: A Linear Matrix Inequality Approach. New York: Wiley, 2001.

[17] H. Zhang, J. Yang, and C.-Y. Su, T–S fuzzy-model-based robust H∞ design for networked control systems with uncertainties, IEEE Trans. Ind. Informat., vol. 3, no. 4, pp. 289–301, Nov. 2007.

[18] H. Zhang, D. Yang, and T. Chai, Guaranteed cost networked control for T–S fuzzy systems with time delays, IEEE Trans. Syst., Man, Cybern. C, Appl. Rev., vol. 37, no. 2, pp. 160–172, Mar. 2007.

[19] Y. Zheng, H. Fang, and H. O. Wang, Takagi–Sugeno fuzzy-model-based fault detection for networked control systems with Markov delays, IEEE Trans. Syst., Man, Cybern. B, Cybern., vol. 36, no. 4, pp. 924–929, Aug. 2006.

[20] L. Zhang and F. Huajing, Fuzzy controller design for networked control system with time-variant delays, Journal of Systems Engineering and Electronics, Vol.17, No. 1, 2006, pp.172– 176.

[21] E. H. Jung, H. H. Lee ,and Y. S. Suh, LMI-based output feedback control of networked control systems, IEEE International Workshop on Factory Communication Systems, 2004.

[22] We S., Er M. J. and Gao y., A Fast Approach for Automatic Generation of Fuzzy Rules by Generalized Dynamic Fuzzy Neural Networks, IEEE Trans. Fuzzy Systems, 4(4):578-598, Ago 2001.

[23] Y. Tipsuwan and M. Y. Chow, On the Gain Scheduling for Networked PI Controller Over IP Network, IEEE/ASME Trans. Mechatronics, vol. 9, no. 3, Sep. 2004

[24] Truetime software: www.control.lth.se/truetime/ [25] Mendez P.E and Benítez H. Identification and Control for Discrete Dynamics Systems Using Space State

Recurrent Fuzzy Neural Networks Proceeding Electronics, Robotics, and Automotive Mechanics Conference CERMA, pp. 112-117, Sep 2007.

[26] Tanaka K., Ikeda T. and Wang H. O., Fuzzy Regulators and Fuzzy Observers: Relaxed Stability Conditions and LMI-Based Designs, IEEE Trans. Fuzzy Systems, Vol. 6, No. 2, May 1998.

[27] Tanaka K. and Wang H. O., 2001: Fuzzy Control Systems Design and Analysis: A Linear Matrix Inequality Approach. Wiley & Sons, Inc.

[28] Tzes A., Nikolakopoulos G., and Koutroulis I., Development and Experimental Verification of a Mobile Client-Centric Networked Controlled System, Proc European Control Conference, Cambridge, UK, 2003.

[29] Vesely V. and Nguyen T., Robust Output Networked Control System Design, ICIC Express Letters, Vol. 4, No. 3, Jun 2010.

[30] Guan X., and Chen C., Delay-Dependent Guaranteed Cost Control for T–S Fuzzy Systems With Time Delays, IEEE Transactions on Fuzzy Systems, Vol. 12, No. 2, Apr. 2004.