ELSEVIER
Copyright © IFAC Large Scale Systems: Theory and Applications, Osaka, Japan, 2004
IFAC PUBLICATIONS www.elsevier.comllocatelifac
COMPENSATION OF TRANSMISSION DELAY AND PACKET-LOSS IN NONLINEAR REMOTE-CONTROL SYSTEM Yuh Yamashita . ,1 Hirokazu Nishitani··
• Hokkaido University, Sapporo, Japan •• Nam Institute of Science and Technology , Ikoma, Japan
Abstract: In this paper, for a nonlinear remote control system over a communication channel, we develop a new digital controller that can cope with the problems of transmission delay and packet loss. The digital controller is composed of a nonlinear analog controller and two digital compensators. The compensators make the behavior of the digital control system approximate that of the ideal continuoustime control system. Each compensator calculates an output by using three items of input data that have already been received. Copyright © 2004 IFAC Keywurds: remote control, digital redesign, nonlinear systems
1. INTRODUCTION
troller design method for linear systems using the multi-step digital redesign method (Isurugi and Shima, 1995; Shima et al., 1997) . The digital redesign method can works under the existence of computational delay, which is used in this paper to compensate transmission delay on a network. The purpose of this paper is to extend the remote controller design for linear systems to nonlinear cases. The proposed method is simple, and the delay compensator can be designed independently on the plant system and nominal continuous-time controller. Moreover, this method can cope with data loss on the network by using the degree of freedom in the delay compensator design.
In this paper, we propose a new controller design for a non linear remote control system, which can cope with transmission delay and data loss. In recent years , with the development of network technology, many studies on remote control over networks have been performed. In particular, many papers have been published on bilateral control of robot manipulators (Leung et al., 1995; Anderson and Spong, 1989; Niemeyer and Slotine, 1998; Kosuge et al., 1996; Yokokoji et al., 2002). Moreover, in the plant control area, fieldbus technology has been widely used recently. From the viewpoint of the control theory, there are two major problems in remote control over network. One is the problem of limitations in the network bandwidth. The other is the existence of transmission delay on the network. This paper focuses on the latter problem.
2. PROBLEM STATEMENT In this paper, we propose a new compensation method of transmission delay and packet-loss in nonlinear remote-control systems.
In the previous ~aper (Yamashita and Nishitani, 2002), we have proposed a remote con-
\Ve consider a continuous-time system
x = f(x) + G(x)u
1 This research is partially supported by JSPS Grant-inAid for Scientific Research (C) (15560378).
y
609
= h(x)
(1)
Compensator 1
Plant Holder
y(k7)
Additional Delay '----r--' (~I
+ ~I'
=~) Transmission Delay r---''----,
••
•
••••••••••••••••••••••••••••••••••• '----r--' Transmission
Delay Additional Delay
u(k7) (Llz +~' = M ~~____~~~t)~~~k7) Continuous-Time r-------, Controller Compensator 2 Holder
Fig. 1. Block diagram of remote control system as a plant, where x E ~n denotes a state vector, E ~m an input vector, Y E ~e an output vector , h(x) a smooth output fUIlction, and J, g\, . .. ,gm (G(x) = [g\, . . . ,gm]) are smooth vector fields. In this paper, we assume a continuous-time controller with an observer U
i = J(x) + G(x)u - K(x)(y - h(x»), u = c(i, v),
(2)
kT
ii(t) = vd(kT),
+ ~ :S t :S (k + l)T +~,
kT:S t :S (k
+ l)T.
A subsystem consisting of the delay compensators, the Oth-order holders, and the original continuous-time controller can be regarded as a digital controller. The input signal transmitted by the digital controller at kT also reaches another delay compensator (compensator #1 in Fig. 1) at kT + D . The value of the input for the plant is maintained in the sampling interval as
In the actual remote control system, the output of the plant is sampled with sampling interval T. Figure 1 shows a block diagram of the proposed remote control system. The control system includes a copy of the continuous-time controller as a part of the digital controller as
K(i)(fj - h(i»
fj(t) = Yd(kT),
where Yd(kT) is the output of the delay compensator at J.:T +~ . It is assumed that the exogenous input ii is also a Oth-order held signal
which already has been designed. (I11r final goal is to obtain a digital controller under an environment that includes transmission delay and data loss in the communication channel. In this paper, this problem is considered as a digitalredesign problem (Isurugi and Shima, 1995; Shima et al., 1997), in which we redesign the digital controller such that the digital control system under transmission delay approximates the ideal continuous-time control system with no delay.
i = J(i) + G(i)u u = c(i , ii) .
The received output is filtered through a delay compensator (compensator #2 in Fig. 1) and a Oth-order holder and then sent to the continuoustime controller. The input of the continuous-time controller becomes
u(t) = ud(kT),
kT + ~ :S t :S (k
+ l)T +~ ,
where ud(kT) is the output of compensator #1 at kT+~ .
Note that in the implementation of the proposed digital controller, the embedded continuous-time observer would be simulated in real-time by a numerical method.
(3)
The above equations are slightly different from system (2) because the input and output of system (3) no longer connect to plant (1) directly. The sampled output y(kT) is transmitted through the communication channel along with a delay ~2, and the digital controller receives it at kT + ~2 ' To absorb the perturbation of the delay time, an additional delay ~~ is inserted at the entry of the digital controller, which makes the total delay time ~ = ~2 + ~~ constant. A data packet with a larger delay than ~ is counted as a lost packet. We discuss later how to deal with lost packets.
•
3. DESIGN OF DELAY COMPENSATORS In this paper, we adopt FIR filters 1'-1
Ud(kT)
= 2: O:iu«k -
i)T)
(4.)
2: Piy«k - i)T)
(5)
;=0 1'-\
Yd(kT) =
;=0
as the delay/data-loss compensators, where the coefficients 0:; and /3; are constant values. The
610
purpose of this paper is to find values of the coefficients such that the behavior of the control system approximates that of the ideal continuoustime control system
= f(x c ) + G(xc}c(xc , v), i c = f(x c ) + G(xc)c(xc, v)
i(kT + b.)
+ b.L I +GUd«k - l)T) L }+Gud(kT)xlx=r(kT) b.
-
2
(6)
2 b. 3 fiL/+Gud«k-l)T)L I+Gud(kT)xl x=x(kT)
+ ... , ... .
h(x c )).
(10)
tvioreover , by also expanding x((k respect to T - b. , we obtain
+ (T -
+ b.)
(11)
(T - b.)3 3 6 x( ) (kT
+ b.) + ....
x((k + l)T) = x(kT) + T{J(x(kT)) + G(x(kT)) . (7]ud((k - l)T) + (1 -1})ud(kT))} T2 {
2
2
+ 2"" 1} L1+Gud«k- l)T)xlx=x(kT) + 2(1 -TJ)1} · L I+Gud«k - l)T) L I+Glld(kT)xlx=x(kT) + (1 -7])2L}+ Gu d(kT) x lx=x(kT)} (12) T3 { 3 3 +""6 7] L1+Gud«k-l)T)xlx=x(kT)
(7)
The power expansion of the state vector x( kT + b.) with respect to the transmission delay b. can be expressed as
+ 3(1 -
b. crx E if · dt i (kT) , QC
b.)2 i (kT
Let 1} denote b./T. By substitute (8), (9), (10) and b. = 1}T into (11), a power expansion with respect to the sampling interval T of x(kT + b.) can be derived as follows :
In this section, we evaluated local discretization errors to determine the coefficients of the compensators. The local discretization errors are defined as the errors of the state vectors e(t) = x(t)- xc (t) and e(t) = x(t) - xc(t) at t = (k + l)T , when the state vectors of the digital control system coincide with those of the ideal continuous-time control system at t :S kT, i.e.
x(kT + b.) =
with
2
4. EVALUATION OF LOCAL DISCRETIZATION ERROR
t:S kT.
+ l)T)
x((k + l)T) = x(kT + b.) + (T - b.)x(kT + b.)
+
x c(t) = x(t) ,
2
3
+
In (Isurugi and Shima, 1995), the transmission delay was included in a single path from the controller to the plant, and the continuous-time controller was allowed to have a direct-through term. In this paper, the continuous-time controller is restricted to having a positive relative degree, because both the uplink and the downlink have transmission delay in this configuration.
x c(t) = x(t),
2
+ TL I+GUd«k - l)T)L I+Gud(kT)xlx=T (kT)
Xc
- f((x c)(h(xc )
= L}+Gud(kT)xlx=r(kT)
7])7]2
· L }+Gud«k - l)T) L I+Gud(kT)xlx=x(kT) - 7])27]
i
+ 3(1
;=0
· LI+Gud«k-l)T)L}+Gud(kT)xlx=X(kT)
where (dix/dti)(kT), i = 1, 2, . .. are the righthand derivatives of x at t = kT. This expansion leads to
+ (1
+ Ocr'),
+ b.) = x(kT) + b.(f(x(kT)) + G(x(kT))Ud((k - l)T)
which is expressed by x(kT), ud(kT) and ud((kl)T) .
x (kT
b.
2
2
+ TLI+Gud«k-l)T)X1 x=x(kT)
-11)3 LJ+Gud(kT)xlx=x(kT)}
On the other hand, the state of the ideal continuoustime control system can be expressed as
(8)
b. 3
+ fiLJ +GUd«k- l)T)xlx=X(kT) + ...
xc((k + l)T)
x c(kT) = f(xc(kT))
(13)
+ G(xc(kT))uc(kT)
xc(kT) = LJ+Guxlx=xc(kT) .u=uc(kT) + GiJAkT). ···
+ b.L1+Gud«k - l)T)L /+Gud(kT) x lx=x(kT) b. 2
oc
Derivatives of Xc are
+ G(x(kT))Ud(kT)
+ TL}+Gud«k-l)T)L/+Gud(kT)xlx=T(kT)
Ti d' E if · d~C(kT). i=O
where LI denotes a Lie derivative. Right-hand derivatives of x(kT + b.) can be expanded also as follows:
x(kT + b.) = f(x(kT))
=
(14)
where U c = c(xc , v ) is the input to the plant of the ideal continuous-time control system.
(9)
b. 3
+ fiL}+GUd«k - l)T)LI+GUd(kT)xlx=X(kT) + ... ,
Suppose that v(kT) = v(kT), then it is obvious that uc(t) = u(t) (t ~ kT) from (7). Hence, we
611
can obtain the relationship between follows:
Ud
and
Uc
Table 1. Relationship between ai and the local discretization error
as
1 "'I
11
01 02
2
1
3
1
1) + 3/ 2 - 1) - 1/ 2 -
1 -
00
(15)
1
TJ<
+ (3/2)1) + 23/ 12
_ 2T}2 -
1)
e((k + I)T)
where
= Ljmaj ,
m=0 , 1,2,.. ..
(16)
A similar calculation to (15) also leads to
-
+ O(T4) .
= ~ .~
(-(i
La'L L
m=Oj=O
= ~~ L
+ I)T)m m!
. dmu c (kT) dtm
(21)
It is not possible to delete the third order term in general by selecting 62 solely, but for a special delay ratio 1] we can eliminate the third order term, i.e. if
m=O
L
L
m=Oj=O
(m) J
("!) J
~ija(-T)m L
i=O
'm!
. dmuC(kT) dtm
+-1 3 3± V3 1]=--
6(-T)m . d"'uC(kT). J m! dtm
62
( 17) I3y substituting ud(kT) and ud((k - I)T) in (12) by the values of (15) and (17), respectively, we can compare ..c((k + I)T) with xc((k + I)T).
= T(1
-
- 60 )G(x(kT))uc(kT)
6 0 ){Lcu c (kT)Lj x lx=x(kT)
(18)
+ L,Lcuc(kT)xlx=x(kT)} + (1 - 65)Lcur.(kT)Lcuc(kT)xlx=x(kT)1 + O(T 3 ) .
2
(22) (23)
To determine the coefficients f3i in the delay compensator #2, the local discretization error of the state vector of the observer must be evaluated. I3y a similar procedure to the case of compensator # 1, we can determine Pi . The power expansion of e((k + l)T) can be expressed as:
Our purpose is to find the parameters 6i that minimize the local discretization error e( (k + I)T). I3y zeroing the low-order terms in (18), the local discretization error e((k + I)T) becomes small if the sampling interval T is small enough. The condition under which the first-order term vanishes is
60 = 1.
21]
hold in addition to (19) and (20), the local discretization error e((k+1)T) becomes O(r) . However, it is generally impossible to delete the fourthorder term for any Oi and 1]. Equation (23) shows that we must wait until t = kT + (3 ± "f3)T/6 to make the local discretization error O(T4), even if the data packet arrives before kT + (3 ± V3)T /6. By solving equations (16), we can obtain the coefficients a; in the delay compensator #1. Table 1 shows the relationship between the coefficients and the order of the local discretization error. Note that these coefficients are independent from the system functions !(.), g( .), and the continuous-time controller cC .).
+ 2[(1 + 21]60 + 26dG(x(kT))iJAkT)
+ (1
=
6
Finally, the local discretization error of x can be expanded with respect to the sampling interval T as follows : e((k + I)T) T2
Lcur. (kT)Lcu c(kT)xlx=x(kT)
+ LCur. (kT) LCuc(kT)xlx=x(kT)} 1
ud((k - I)T)
=~~
_ 362 )G(x(kT))iiAkT)
+ (1/2 - 31] + 31]2){ -Lcur.(kT)L,xlx=x(kT) + L, LCuc (kT)xlx=x(kT)
j=O
i=O
=
~3 [(1 + 61]2
")'-1
6m
21) - 4/ 3
+ (1 / 2)1) + .5/ 12 (3 + ';3) / 6
21)2
•
e((k
+ l)T) = T(1
- (o)K(i(kT))Yc(kT)
+ ~2 [(1 + 21](0 + 2(dK(i(kT))Yc(kT)
(19)
+ (1- (o){LKY r. (kT)Ljilx=x(kT) (24) + L jLKYc(kT)ili=i(kT)} + (1 - (~)LKYc (kT)LKYr. (kT)ili=i(kT)l
If (20)
holds in addition to (19), the first and second terms in the local discretization error are eliminated. Under (19) and (20), the local discretization error becomes
+ O(T3 ), where Yc(kT) h(xc(kT)), G(i)c(i, v) + K(i)h(i), and
612
j(X, v)
!(i)
+
Table 2. Relationship between /3; and the local discretization error I
'I
1
11
,Bo ill
-
rh
-
2
3
T} + 3/2 -'1'} - 1/2
'1'}' + (3/2)'1'} + 23/12 _2'1'}2 - 2'1'} - 4/3 2'1'}2 + (1/2)'1'} + 5/12 (3 + v3)/6
I
1
-
'1'}
freedom for selecting the coefficients 6; that fulfill the conditions (19), (20) and (22) under which e((k + I)T) = O(T4). By means of this degree of freedom, we can set the coefficient corresponding to the lost packet to zero. However, since making "I large often increases the high-order terms of the local discretization error, we cannot use a very large value for "I in actual cases. Suppose that s packets including the data of
..,-1
(m =
2:jm/3j,
m
= 0, 1,2, ....
(25)
u((k - idT) ... , u((k - is)T),
(29)
j=o
We will delete the low-order terms in (24) as well as (18). The first-order and second-order terms are deleted by setting (0
= v,
(1
1
= -7]-- . 2
(26)
Under (26), the local discretization error e((k I)T) is O(T3) as
e((k
have arrived at delay compensator # 1 through the communication channel without data loss. If s is larger than 2, we use three data items u((k idT), u((k-i2)T) and u((k-i3)T) for calculating ud(kT), i.e. the solution (0;1' 0;., Oi3) of linear simultaneous equations
+
Oil +0;. +Oi3 = 1 .. 1 , llOil + l2 0 i. + t3 0 i3 = -7] - 2
+ I)T) =
~3 [(1 + 67]2
_ 3(2)K(x(kT))jjc(kT)
iioil + i~Oi. + i~Oi3 = 27]2 + 3 is adopted, and the values of the other 6i are set to zero. The coefficients determined as above can keep the local discretization error to O(T4). When s = 2, we can use only two data packets. The solution of linear simultaneous equations
+ (1/2 - 37] + 37]2){ -LKYc(kT)Ljxlx=x(kT) + LjLKYc(kT)xlx=x(kT) - LKYc(kT)LKYc(kT)xlx=x(kT)
+ LKYc(kT)LKYc(kT)xlx=x(kT)}] + O(T4). (27) In addition to (26), selecting the same 7] as (23) and choosing (2 as (2
1
= 27]2 + 3
(30)
1
Oil + 0i. = 1 .. 1 tlOil + 12 0 i2 = -7] - 2
(31)
can achieve e((k + l)T) = O(T 3 ). When only one packet has arrived from t = ("( - I)T , the coefficients can only be set as 0;1 = 1. In this case, the local discretization error becomes O(T2) . If all packets are lost, the actuator performs a prescribed behavior, for example, keeping the last effective value, emergency shutdown, or trying to get the sensor data directly through the field bus.
(28)
can make the third-order term zero. Equations (25) derive the coefficients (3i in delay compensator #2. Table 2 shows the relationship between the coefficients and the order of the local discretization error.
5. MAKING UP FOR DATA LOSS IN THE COMMUNICATION CHANNEL
6. SIMULATION We consider the system
In lP-based telecommunication, the data packet in the communication channel is often lost. In a TCP lIP connection, the lost packet is retransmitted, which degrades the real-time performance of the system. Therefore, in this paper, we deal with UDP lIP-like communication.
(32) Y
=
XI
as a plant. A continuous-time controller is given a priori as follows:
To cope with data loss, we use the degree of freedom in determining the coefficients for the case with "I > 3. The following discussion is only for compensator #1, but the same procedure can be appLcd to compensator #2. In the previous section, we showed that it is possible to make the local discretization error O(T4) by using the weighted average of last three input values. For cases with "I > 3, there is a degree of
u
=-
d dt
sinxI - CIXI - C2X2
(XI) X2 = (X2) Sinxl + (0) l u-
K
(_ ) XI -
Y ,
(33) where Cl = 2, C 2 = 1.5, and K = (2,2) . For the ideal continuous-time control system and digitalredesigned control system with transmission delay, simulations are performed where the initial
613
)~~r-----~----~----~----~----'
,,....,
'''"'''' L -____. ! -____' - -____' - -__---II.....-__---l 0 .2
Fig. 2. Root mean square errors for pling interval T
Xl
0 ."
Fig. 3. Root mean square errors for
vs . sam-
Xl
vs . 1/
the plant is necessary in constructing the delay compensator. Therefore, we believe that this design method would be useful in practical remote control systems.
states are x(O) = (1,I)T and i:(0) = (2,2)T. The error between the two systems are defined as follows: N
ei ,RMsE
=
2: {xi(kT) -
xc ,i(kT)P,
(34)
REFERENCES
k=O
Anderson, R.J . and W .M. Spong (1989) . Bilateral control of teleoprators with time delay. IEEE Trans. on Autom. Contr. 34, 494- 501. Isurugi, Y. and M. Shima (1995). Discretization of continuous-time control laws for nonlinear systems with computational delay. J1roc.
where N is the number of sampled times in 0 < t ::; 5. If the local discretization error is O(TP), it is expected that ei ,RMsE has an order O(TP-l), because N is almost proportional to I/T. Figure 2 shows the relationship between el RMSE and the sampling interval T for the pro'p osed control system with 1 = 3 and tht: cliscrete-time control system without delay compensation, when 1/ = (3 - J3)/6 . The dotted line in Fig 2 indicates lOT 3 , so we can observe from the figure that 3 el ,RMsE has O(T ), which accords to the result of §4.
ECC'95, Rome, Italy. Kosuge, K. , H. rvlurayama and K. Takeo (1996). Bilateral feedback control of telemanipulators via computer network. Proc. IEEE/RSJ IROS ' 96 pp. 1380- 1385. Leung, G.M .H., B.A. Francis and J . Apkarian (1995). Bi-lateral controller for teleoperators with time delay via j.t-synthesis. lb'b'b' 'lrans. on Robotics and Autom. 11, 105- 116. Niemeyer, G. and J .J .E. Slotine (1998) . Towards force-reflecting teleoperation over the internet. Proc. IEEE ICRA '98, Leuven, Belgium pp. 1909- 1915. Shima, M., Y. Isurugi, Y. Yamashita, A. Watanabe, T. Kawamura and Y. Yokomichi (1997).
Figure 3 indicates the relationship between 1/ and where T = 0.01 and the coefficients of the delay compensators satisfy the conditions (19), (20) , (22), (26) , and (28). The dotted lines mean 1/ = (3 ± J3)/6 . In this case, the effect of the high-order terms increases for large 1/, so it is better to choose the smaller value (3 J3)/6 for 1/ than (3 + J3)/6 . Figure 3 also shows that, even if the actual transmission delay is very small, the updating of the compensator's output should wait until t = kT + (3 - J3)T /6. In other words, the proposed method is based on this phenomenon, which makes this method effective for transmission delay. el ,RMSE,
Nonlinear Control Theory (In Japanese). Corona-Sha. Tokyo, Japan . Yamashita, Y. and H. Nishitani (2002) . Compensation for transmission delay and data loss in remote control systems. Proc. PSE Asia 2002, Taipei, Taiwan pp. 141- 146. Yokokoji , " ., T . Tsujioka and T . Yoshikawa (2002) . Bilateral control with time-varying delay including communication blackout.
7. CONCLUSION
Proc. IEEE HAPTICS 2002, Orlando, USA pp. 285--292.
In this paper , we proposed a new controller design method to cope with the transmission delay and data loss in nonlinear remote contrul systems by means of a digital redesign method . The effectiveness of the proposed method was confirmed by computer simulation . The proposed delay compensator is very simple, and no identification of
614