You are on page 1of 12

Online Delay Estimation and Adaptive Compensation in

Wireless Networked System: An Embedded Control Design


Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey*,
and Dipankar Deb

International Journal of Control, Automation and Systems 18(4) (2020) 856-866

ISSN:1598-6446 (print version)


eISSN:2005-4092 (electronic version)

To link to this article:


http://dx.doi.org/10.1007/s12555-018-0612-x
International Journal of Control, Automation and Systems 18(4) (2020) 856-866 ISSN:1598-6446 eISSN:2005-4092
http://dx.doi.org/10.1007/s12555-018-0612-x http://www.springer.com/12555

Online Delay Estimation and Adaptive Compensation in Wireless Net-


worked System: An Embedded Control Design
Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey*  , and Dipankar Deb

Abstract: In the present work, an embedded PI controller is designed for speed regulation of DC servomotor over
a wireless network. The embedded controller integrates PI controller with a proposed time-delay estimator and an
adaptive digital Smith predictor for its real time operation, which is the novelty of the work. The real time or
rather online operation of the developed embedded controller over wireless network is possible mainly due to the
contributions in terms of proposing a new empirical formula for time-delay estimation, viable approximation of
time-delay, discretization scheme in developing the proposed adaptive Smith predictor. The proposed embedded
design validates that the deterioration of control performance due to random network-induced delay are mitigated in
real time. The embedded controller is designed and tested for a short-range of 100 meters, and wireless technology
chosen is suitable for biomedical applications.

Keywords: Adaptive Smith predictor, delay estimation, embedded control system, wireless network control system
(WNCS).

1. INTRODUCTION a time-delay compensator. Over the past years, various


methodologies have been proposed by researchers in this
In medical and industrial applications, there is an on- area. Some of the most relevant ones are addressed below.
set of real-time control over the wireless network in re- An adaptive gain output feedback H∞ controller is de-
cent times. Networked control system (NCS) intercon- signed in [10] to control the effects of time-delays and
nects the sensors, actuators, and controllers through wired packet losses arising in NCS. The performance of the pro-
or wireless networks [1] with potential industrial appli- posed methodology was evaluated on a temperature con-
cations with rapid development of data communication trol plant with network-feedback loop. A robust Smith
network technologies. Merits of network technologies are predictor to compensate round trip time-delay in NCS set-
easy maintenance and expandability for the control sys- ting [4] shows that stability is guaranteed up to an upper
tem design, with certain drawbacks like time-delay, packet bound of round trip delay. Online time-delay estimation
dropout, and message collision. Focus areas of research using round trip time measurement (RTT) followed by an
in NCS includes improved packet dropout, time-delay, jit- adaptive Smith predictor scheme in NCS setting is studied
ter, channel capacity (or) throughput, network scheduling in [1]. To test feasibility, an AC 400W motor was con-
[2–4], communication protocols [5, 6] and design of con- trolled from a distance of 15km. An improved predictor
trol algorithms [1, 7–10]. control strategy for data dropout and time-delay in NCS
A major concern of NCS is the stability of the physi- is proposed in [12], and a model-based prediction con-
cal system and performance degradation due to uncertain trol methodology is proposed in [13] where the current
time-delay from the network serving the control applica- and predicted control output is calculated for several time
tion. Also, in the presence of time-delay, the system ex- steps and sent to the actuator node at once. A predictive
hibits transcendental characteristics [11] wherein system NCS [14] is particularly active to compensate network de-
analysis and controller design is challenging. The design lays and data dropouts. Other model predictive control
of control architecture for NCS in the presence of uncer- methodologies [15, 16] are proposed for similar scenarios
tain time-delays is a popular area of research. The main are given in references therein. Studies on convergence
focus of the present work is to develop an embedded con- analysis of NCS are found in [17,18]. In the present work,
trol architecture consisting of a time-delay estimator and a linear plant model is considered. Non-linear systems in

Manuscript received September 3, 2018; revised February 3, 2019 and June 25, 2019; accepted August 15, 2019. Recommended by
Associate Editor Jun Cheng under the direction of Editor PooGyeon Park.

Santosh Mohan Rajkumar is with the Indian Oil Corporation Ltd., Dimapur, India (e-mail: rajkumar.nits@gmail.com). Sayan Chakraborty
is with the Department of Electrical Engineering, IIT Hyderabad, India (e-mail: sayanchakraborty@iith.ac.in). Dipankar Deb is with the
Department of Electrical Engineering, IITRAM, Ahmedabad, India (e-mail: dipankardeb@iitram.ac.in). Rajeeb Dey is with the Department
of Electrical Engineering, NIT Silchar, Assam, India (e-mail: rajeeb.iitkgp@gmail.com).
* Corresponding author.

ICROS,
c KIEE and Springer 2020
Online Delay Estimation and Adaptive Compensation in Wireless Networked System: An Embedded Control Design 857

presence of time-delays can be found in [19, 20]. main contributions of this work are (i) validation through
NCS exhibits stochastic behavior due to packet dropout, experimental results on how time-varying or random net-
time-delay, etc.. Recent developments in the stochastic work delay affects actuation system stability and perfor-
networked-based framework are found in [21,22], and ref- mance, (ii) online delay estimator design with an adap-
erences therein. Significant contributions have been made tive Smith predictor for mitigating uncertain random time-
to overcome issues like uncertain delays, packet drop- delay, (iii) deploying the entire computation in an embed-
outs, etc.. Robust stability analysis of NCS with time- ded platform unlike in [10] and references therein. For the
varying delays in LMI framework is reported in [23] in implementation of delay estimation, adaptive Smith pre-
a polytopic framework which also discusses the packet dictor and digital controller algorithms, certain computa-
drop-out cases. In [10] an experimental result for temper- tional modifications are proposed.
ature control over the wireless network is reported where The paper is organized as follows. Section 2 presents
the control gain and the stability margins are computed in the experimental setup and the control architecture of
an LMI framework. If the system model is expressed in a WNCS. Section 3 discusses measurement of round trip
nonlinear state-space form then, one can use the fuzzy T-S time (RTT) and time-delay estimation. Section 4 discusses
modeling approach as in [24] to obtain a polytopic system the proposed adaptive digital Smith predictor scheme.
representation. The polytopic linear models so obtained Section 5 discusses a posteriori stability analysis of the
allow designing NCS with state as well as output-feedback time-delayed DC motor system sans Smith predictor. Sec-
control law as in [10, 24] in an LMI framework. This con- tion 6 discusses the experimental results, Section 7 pro-
trol design requires a state space system model which is vides algorithmic steps of the developed time-delay com-
not the case in the present work wherein our prime fo- pensator, and Section 8 provides concluding remarks.
cus is on uncertain time-delay arising in NCS. While sev-
eral methodologies to overcome uncertain delay has been
2. EXPERIMENTAL SETUP
studied in simulation, the issue of practical implementa-
tion has not been explored much. [1, 10] provide exper- This section discusses the experimental setup of WNCS
imental validation with the controller implemented on a using Bluetooth technology for connecting a limited num-
PC which is costly, and the architecture is not portable. ber of devices for voice and data messages over a short
The present work is developed for easy and cost-effective range but has an obvious advantage in medical applica-
embedded implementation, and overall portable architec- tions as it operates in ISM band of 2.4 GHz. The ba-
ture uses wireless communication that provides flexibility. sic unit of a Bluetooth network is a ‘piconet’ as shown
The development of NCS in the present work is demon- in Fig. 1. Piconets are expandable to a bigger network
strated for a medical application (artificial pancreas sys- called a ‘scatternet’ with many master bridges as shown
tem (APS) [25]) where connectivity between devices is in Fig. 2. Sufficient uncertain transmission delay may oc-
restricted to a limited region. APS is crucial for Type 1 cur between different piconets when a bridge is serving a
Diabetic patients whose pancreas does not secrete enough particular piconet and master in another piconet is waiting
insulin thereby leading to the risk of hyperglycemia (rise for the current service [28]. Uncertain delays may affect
in glucose level) and hypoglycemia (sudden fall in glucose
level) due to an improper insulin dosage [26]. There is a
need for tight glycemic control, monitoring, and manage-
ment of glucose level in real-time for these patients. In
APS, there exists sufficient short-range wireless commu-
nication between glucose sensor, insulin infusion pump,
control algorithm on embedded computers [27]. The relia-
bility of the APS system can be enhanced by incorporating Fig. 1. Bluetooth piconet. (M=Master, S=Slave).
continuous monitoring facilities by doctors/nurses located
at large/medium distances from the patients. Bluetooth pi-
conet or scatternet technology is used in this work for the
connectivity of devices over short or medium range.
The main aim of the paper is not to develop an APS but
to develop a Wireless Network Control System (WNCS)
based actuation control system in the face of network in-
duced uncertain time-delay. However, the developed ex-
perimental environment for WNCS based DC servo mo-
tor speed control using Bluetooth technology in an em-
bedded platform (Arduino) can be easily adapted for the
APS as the arrangement of the devices are similar. The Fig. 2. Bluetooth scatternet.
858 Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey, and Dipankar Deb

system stability and performance and are the motivation ious hardware components used for prototyping the pro-
of the present work wherein a conceptual arrangement of posed experimental setup are described below:
devices in a reliable artificial pancreas system (APS) oper- A permanent magnet type DC motor is used with 200
ating with Bluetooth technology is shown in Fig. 3. APS is rps rated speed and 3V-5V rated voltage. For controller
an automated system that mimics the homeostasis process design, the transfer function of the DC motor is identified
to regulate plasma glucose in the human body. using the system identification technique and is given as
This automation is depicted in a closed-loop architec-
4.159
ture with wireless network technology in Fig. 4. G(s) = . (1)
To realize an automation system similar to Fig. 4, a s + 3.888
bluetooth enabled DC servo motor speed control is devel- A discrete time equivalent of this plant with a sampling
oped, and the physical set up is shown in Fig. 5. time of 0.02s can be obtained as
The developed prototype operates with a single piconet.
0.0831
However, to realize a massive transmission delay due to G(z) = . (2)
z − 0.92
the scatternet formation, the master node of the piconet
(intermediate node) runs an algorithm to conceptually em- The speed sensor module is an HC-020k optical speed
ulate uncertain random delay in the network [28]. The var- encoder with a measurement frequency of 100 KHz, en-
coder resolution of 20 lines, and working voltage range
of 4V-5V. As the motor shaft turns, the slots pass the
LED - photo-transistor pairs creating a series of electrical
ON/OFF states. For every electrical ON and OFF state, a
binary data 1 and 0 is fed to the embedded microcontroller
to determine the motor speed.
The motor driver used is a 16 pin Texas Instrument
L293D driver IC with a supply voltage range of 4.5 V-36
V, output current 600 mA per channel, peak output cur-
rent 1.2 A per channel and speed controller input PWM
pins. The Bluetooth device is a V2.0+EDR (Enhanced
Data Rate) HC05 Bluetooth Serial Port Protocol (SPP)
module with 3 Mbps data rate, 2.4 GHz radio transceiver.
The implementation of the digital controller, delay esti-
mator, and adaptive Smith predictor are done on Arduino
UNO and Arduino DUE. For digital signal processing in
the control block, inbuilt pulse width modulator (PWM) of
Arduino is used. A discrete PI controller is implemented
in embedded hardware, as
Fig. 3. Proposed scatternet based reliable APS n−1

(M=Master, S=Slave). u(n) = KP e(n) + KI ∑ e(i). (3)


i=0

Fig. 4. Proposed wireless network control for the APS. Fig. 5. Physical setup of the experiment.
Online Delay Estimation and Adaptive Compensation in Wireless Networked System: An Embedded Control Design 859

This form of PI controller is known as the position al- Bluetooth network of AB3. AB3 introduces random time-
gorithm. The main concern with the position algorithm delays to the PWM signal and the measured speed signal
is that all the past error values need to be stored. While before transmitting them to AB2 and AB1 respectively.
working with an Arduino microcontroller, this problem is Hereafter, the delayed speed signal is referred to as the
addressed by assigning an integer variable for the sum- delayed feedback signal. A send time stamp is recorded
mation of the error signal. An integer in the micro- in AB1 for every PWM signal sent to AB2 from AB1 and
controller stores a 32-bit value that yields a range of a receive time stamp is recorded in AB1 for every delayed
−2, 147, 483, 648 to 2, 147, 483, 647 which is sufficiently feedback signal received in AB1 from AB2. The output
large for the present application. The tuning of the PI of the comparator 3 in Fig. 6 is the difference between
controller parameters is done using the SISO toolbox of the time stamps and is referred to as the round trip time
MATLAB. The obtained controller gains are KP = 1.69 (RTT). Based on the RTT measured and the delayed feed-
and KI = 0.1488. back signal received, the online time-delay estimator esti-
Fig. 6 shows the block diagram of the proposed con- mates the delay which is then fed to the online time-delay
trol system. The two embedded microcontrollers, Arduino compensator. The output of the time-delay compensator
board 1 (AB1) and Arduino board 2 (AB2), communicate is compared by comparator 2 with the error signal gener-
through a wireless network viz. Bluetooth. AB1 and AB2 ated from comparator 1. The output of comparator 2 is the
are individual ‘piconets’, both capable of connecting to non-delayed nominal output (see (13)) in Section 4.1.4)
7 different slaves each. A third microcontroller, Arduino which is then fed to the discrete controller for the desired
board 3 (AB3) is an intermediate node between AB1 and action for the DC motor.
AB2. The only communication channel between AB1 and
AB2 is the intermediate node AB3, thereby forming a 3. RTT MEASUREMENT & DELAY
‘scatternet’ like structure. The output signal from AB3 ESTIMATION
is the randomly delayed signal received either from AB1
or AB2. Such a configuration emulates a similar situation Communication delay is introduced by the Bluetooth
of uncertain delay in a scatternet Bluetooth network. network while the controller and plant node communi-
AB1 consists of a time-delay estimator, a time-delay cate via an intermediate Bluetooth network as depicted
compensator and a PI controller. The inbuilt PWM in in Fig. 6. Further, to emulate a random delay, the mes-
AB1 converts the controller output to an 8-bit PWM sig- sages received to and from either controller or plant are
nal. This signal is then transmitted to AB2 via the Blue- randomly delayed by the intermediate node. Uncertain
tooth network of AB3. The motor driver IC, DC motor delay in WNCS degrades performance and system stabil-
and the speed sensor are interfaced with AB2. The motor ity under control [10]. In the developed prototype, the
driver IC generates a voltage based on the duty ratio of the time-delay induced from the controller-to-plant direction
PWM signal received from AB1. The generated voltage is taken as t1 (denoted as forward delay) and the time-
is then given as an input to the DC motor. The speed sen- delay from the sensor-to-controller direction is t2 (denoted
sor block in Fig. 6 measures the speed of the DC motor. as backward delay). Total time-delay td = t1 + t2 is the
The measured speed is then transmitted to AB1 via the round trip time (RTT).

Fig. 6. Practical wireless block diagram for speed control of DC motor.


860 Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey, and Dipankar Deb

3.1. RTT measurement Table 1. Illustration of delay estimation.


For RTT measurement and estimation of time-delay, the
following rules are adopted from [1]. Sent t1pr t2pr t pa Received tm Sample
data data time
• Normal transmission: If td is less than one sampling 50 0 23 23 0 0 0
period, the effect on the system performance is negli- 70 23 45 22 0 20 20
gible, and the measured td is the estimated delay (tm ). 80 45 74 29 50 40 40
• Vacant sampling: In the absence of occurrence of a 90 74 93 19 70 60 60
data sample before the advent of the next sampling in- 100 93 108 15 80 74 80
stant, the td measured before is added to one sampling 110 108 124 16 90 70 100
period and is considered as tm . 120 124 143 19 100 63 120
• Message Rejection: If there is occurrence of more 130 143 167 24 110 50 140
than one data at a sampling instant, the most recently 140 167 184 17 120 50 160
arrived data is accepted and all the previous data are
discarded. Accordingly, the recently measured td is
considered as tm . where tm is the estimated delay, t1pr is the present sent
• Delayed transmission: The td measured continu- time-stamp, t2pr is the present receive time-stamp, t pa is
ously is considered as tm . the difference of past time-stamps, vs is the number of va-
cant samples. The computation of estimated delay using
In the developed prototype, plant side is considered to (4) is explained with an example. It is evident from Ta-
be time-driven (or clock-driven) while the controller side ble 1 that vs = 3. Considering the estimated delay (tm ) at
is considered to be event-driven. A graphical illustration sample time 100 ms, the present time stamps are t2pr = 93
of RTT measurement and time-delay estimation on the ms, t1pr = 74 ms, and the difference of the past time
proposed setup is presented in Fig. 7. The time-delay esti- stamps are t pa2 = 29 ms, t pa3 = 22 ms. Using (4), we get
mation data is tabulated in Table 1. The occurrence of zero tm = (93 − 74) + 29 + 22 = 70 ms. Similarly, at sample
is considered equivalent to the vacant sampling situation. time 140 ms, tm = (124 − 108) + 15 + 19 = 50 ms. Note
that, here we consider t2pr −t1pr as the RTT which is same
3.2. On-line delay estimation as t1 + t2 .
The proposed empirical formula for time-delay estima- In the proposed prototype, the measurement and esti-
tion based on the RTT measurement is expressed as mation of delay are done at the controller side (see Fig. 6)
vs thus making the implementation easier and faster. Fur-
tm = t2pr − t1pr + ∑ t pai , (4) ther, unlike in [1], the measurement and estimation is im-
i=2 plemented in a dedicated embedded platform and not in a
high-performance computer, and so a simple yet accurate
algorithm needed to be developed.

4. TIME-DELAY COMPENSATION

The closed-loop transfer function of a delayed system


along with the classical Smith predictor as seen from
Fig. 8(a) is found to be

Y (s) Gs (s)G(s)e−t1 s
= , (5)
R(s) 1 + Gs (s)G(s)e−td s

where, Y (s) is the output, R(s) is the input/reference sig-


nal, and Gs is the inner loop transfer function given as

Gc (s)
Gs (s) = . (6)
1 + (1 − e−tm s )G(s)G
b c (s)

Substituting (6) in (5), we get

Y (s) Gc (s)G(s)e−t1 s
= ,
R(s) 1 + G(s)G
b −t s −t s
c (s) (1 − e m ) + G(s)Gc (s)e d
Fig. 7. Measured RTT (td ) and estimated delay (tm ). (7)
Online Delay Estimation and Adaptive Compensation in Wireless Networked System: An Embedded Control Design 861

Table 2. Different delay approximation series


Series Formulation
1 − 0.5sτ + 0.0833s2 τ 2
Pade
1 + 0.5sτ + 0.0833s2 τ 2
1 − 0.0625s2 τ 2
Marshall
1 + 0.0625s2 τ 2
1 − 0.5sτ + 0.125s2 τ 2
Product
1 + 0.5sτ + 0.125s2 τ 2
1 − 0.5sτ + 0.0625s2 τ 2
Laguerre
(a) 1 + 0.5sτ + 0.0625s2 τ 2
1
Paynter
1 + sτ + 0.405s2 τ 2
1 − 0.49sτ + 0.0954s2 τ 2
Direct frequency response (DFR)
1 + 0.49sτ + 0.0954s2 τ 2

Table 3. Time-delay approximation errors.

Series τ = 0.04 τ = 0.24 τ =1 Average


ISE
Pade 0.0057 0.0345 0.1437 0.0592
Marshal 43.989 41.139 41.880 41.321
Product 0.0054 0.0321 0.1339 0.0552
(b) Laguare 0.0068 0.0406 0.169 0.0696
Paynter 0.0058 0.0347 0.1447 0.0596
Fig. 8. Block diagrams for (a) Classical Smith predictor; DFR 0.0053 0.0319 0.1331 0.0548
(b) Digital Smith predictor.
4.1.1 Time-delay approximation
If tm = td and G(s)
b = G(s) in (7), then it reduces to Approximate e−tm s using a suitable series polynomial
as given in Table 2 such that e−tm s ≈ Gdm (s). The occur-
Y (s) Gc (s)G(s) −t1 s rence of an error in the approximation is inevitable. The
= e . (8) error also depends on the type and order of the series being
R(s) 1 + Gc (s)G(s)
considered for approximation.
The effect of time-delay is compensated from feedback Approximation errors are tabulated in Table 3 for dif-
signal and the controller takes a decision sans any delayed ferent types of series polynomials. The DFR and Pade
information. Classical Smith predictor is useful when the series gives the minimum average error. In this work, we
system time-delay is fixed. But in practice, the network- use DFR and Pade series for time-delay approximation.
induced delay may vary due to which actual delay differs However, the experimental results are shown for the DFR
from the estimated value, and so an adaptive version of the series approximation only.
Smith predictor using delay estimator is needed.
4.1.2 Discretisation
4.1. Synthesis of adaptive digital Smith predictor Discretise the transfer function Gsp (s) = (1 −
The focus of present work is to implement an adap- e−tm s )G(s)
b = (1 − Gdm (s))G(s)b using a suitable transform
tive Smith predictor in dedicated embedded hardware with and obtain Gsp (z) = (1 − Gdm (z))G(z).
b The nominal plant
limited memory and computing power. An adaptive Smith is selected to be a discrete version of the plant given by
predictor scheme adopted from [1], is shown in Fig. 8(b). b = 0.0831 . Approximation of e−tm s using DFR series
G(z) z−0.92
The transfer function of the adaptive Smith predictor is approximation as indicated above gives Gdm (s). Further,
using the bilinear transform with sampling time T = 20ms,
Gsp (s) = (1 − e−tm s )G(s).
b (9) the discrete transfer function of Gdm (s) is obtained as
Due to the e−tm s term, the transfer function has infinite c(tm )z2 + d(tm )z + e(tm )
roots. In the present work, for the first time, digital im- Gdm (z) = , (10)
e(tm )z2 + d(tm )z + c(tm )
plementation of the adaptive Smith predictor scheme in
an embedded platform is proposed, and the procedure where c(tm ) = 1 + 100tm (9.54tm − 0.49), e(tm ) = 1 +
adopted is outlined below. 100tm (9.54tm + 0.49), d(tm ) = 2 − 100tm (9.54tm + 0.49) −
862 Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey, and Dipankar Deb

100tm (9.54tm − 0.49). The coefficients of (10) are func- ŷd | is negligible (converges to zero) and a delay free error
tions of the estimated delay. With algebraic manipulations signal is generated for proper controller action. In prac-
in negative powers of z, one can get tice, the residue | yd − ŷd | can never be zero but there exists
a small error ε. From Table 3 and [29], the approximation
Y (z) f (tm )z−1 + g(tm )z−3 schemes like Pade and DFR provide reasonable approxi-
Gsp (z) = = ,
X(z) 1 + h(tm )z−1 + i(tm )z−2 + j(tm )z−3 mation of the time-delay such that | yd − ŷd |≤ ε. Hence,
(11) a satisfactory delay free error signal can be generated for
proper controller action.
where
8.1438tm
f (tm ) = = −g(tm ), 5. STABILITY ANALYSIS
954.0tm 2 + 49.0tm + 1.0
−2785.68tm 2 − 45.080tm + 1.08 In this section, the maximum analytical delay bound
h(tm ) = , (tcrit ) for the stability of the closed-loop time-delayed DC
954.0tm 2 + 49.0tm + 1.0
2709.36tm 2 − 49.0tm − 0.84 motor in the absence of Smith predictor is obtained.
i(tm ) = , The characteristic roots of the time-delay system are
954.0tm 2 + 49.0tm + 1.0
computed using the Galerkin approximation wherein the
−877.68tm 2 + 45.080tm − 0.92000
j(tm ) = . root convergence starts from the rightmost root within a
954.0tm 2 + 49.0tm + 1.0 specified tolerance ξ [11, 30]. Stability is analyzed by
Using Pade series, we get the following coefficients, studying the effect of delay on the movement of the right-
most characteristic roots. For brevity, the derivation of
24.93tm Galerkin approximation for computation of characteristic
f (tm ) = 2
, g(tm ) = − f (tm ),
2500.0tm + 150.0tm + 3.0 roots for time-delay systems (TDS) is not discussed here
−7300tm2 − 138tm + 3.24 but can be found in [11].
h(tm ) = ,
2500tm2 + 150tm + 3 The closed-loop transfer function of the DC motor sys-
7100tm2 − 150tm − 2.52 tem without the Smith predictor can be obtained as
i(tm ) = ,
2500tm2 + 150tm + 3 Gc Ge−t1 s
Gcl (s) = , (14)
−2300.0tm2 + 138.0tm − 2.7600 1 + Gc Ge−td s
j(tm ) = .
2500.0tm2 + 150.0tm + 3.0
where td = t1 + t2 , and the characteristic equation is
4.1.3 Finding the difference equation d(s) = s2 + 3.888s + 7.0287se−td s + 0.6188e−td s = 0.
The difference equation from the discretised transfer (15)
function is obtained from (11) as
The characteristic DDE of the system described in (14)
y[n] = f (tm )x[n − 1] + g(tm )x[n − 3] − h(tm )y[n − 1] can be easily obtained from (15) as
− i(tm )y[n − 2] − j(tm )y[n − 3], (12)
ẍ(t) + 3.89ẋ(t) + 7.029ẋ(t − td ) + 0.619x(t − td ) = 0.
which is the output of the adaptive digital Smith predictor (16)
(time-delay compensator). This difference equation can
be easily implemented on an embedded device for time- Applying Galerkin approximation theory, one can obtain
delay compensation. the characteristic roots of (16) for different time-delays.
The movement of the real part of the first four rightmost
4.1.4 Effect of approximation error roots of (16) by varying td , is shown in Fig. 9. The dom-
The compensator output y comprises of two parts: (i) inant rightmost root (1st root) remains in the right half
the nominal feedback ŷ by the nominal plant and (ii) de- s-plane for delays greater than 0.369 s. Thus, the closed-
layed nominal feedback ŷd by the nominal plant. From loop system without Smith predictor loses its stability for
Fig. 6 one can see that the comparator 1 compares the ref- delays greater than tcrit = 0.369 s (critical delay). There-
erence signal r with the delayed feedback yd , following fore, the main objective is to implement the proposed
which the comparator 2 compares the output of compara- Smith predictor scheme such that the closed-loop system
tor 1, e1 , with the compensator output y. Therefore, the is stable for delays greater than tcrit .
output of the comparator 2 is obtained as
6. EXPERIMENTAL RESULTS
e2 = e1 − y = r − ŷ − (yd − ŷd ). (13)
The system responses of the following experimental se-
If the nominal plant model (Ĝ(z)) and the time-delay tups are compared: 1) classical Smith predictor (CSP) with
approximation (Gdm (z)) are proper, the residue of | yd − a PI controller and a fixed time-delay, and 2) adaptive
Online Delay Estimation and Adaptive Compensation in Wireless Networked System: An Embedded Control Design 863

(a)

Fig. 9. Variation of first four characteristic roots of (16)


with respect to td .

Smith predictor (ASP) with DFR series approximation of


time-delay and PI controller. Uncertain delays are induced
in the network via a code running in intermediate node.
The main objective is to stabilize the closed system for de-
lays greater than tcrit by implementing the proposed adap-
tive Smith predictor developed in this work. In practice
there is a certain operating bounds for current and volt-
age associated with actuators. Any voltage/current greater (b)
than its operating value might damage the actuator or lead
to undesirable functioning. Therefore, it is a good prac-
tice to maintain the voltage/current supply to actuators less
than its nameplate specifications. Therefore, it needs to be
shown that with the proposed scheme of adaptive Smith
predictor, the control input is maintained below the ac-
tuator operating voltage (5 V). A 100% duty ratio corre-
sponds to 5 V, whereas a 0% duty ratio is to 0 V.
Fig. 10 shows experimental results for time-delay vari-
ations from 0.03 s to 0.130 s. Time-delays in Fig. 10(a)
is less than tcrit and the performance of CSP and ASP
schemes are similar. It should be noted that the maximum (c)
value attained by the control input signal is only about
57% duty ratio in case of both CSP and ASP schemes. Fig. 10. (b) classical Smith predictor (tm = 0.06s) with PI
Thus, for the delays less than tcrit , the performance of the control; (c) adaptive Smith predictor with DFR
CSP and ASP schemes are satisfactory. series approximation.
Fig. 11 shows the system response for classical Smith
predictor with a fixed time-delay of 0.06s and PI con-
troller. The delay varies from 0.293 s to 0.389 s which is
slightly greater than tcrit . Fig. 11(b) shows the response of of time-delay. The variation of time-delay is in the range
the classical Smith predictor and the control input signal. of 0.370 s to 0.636 s which is approximately 1.6 times
The system response exhibits oscillations and does not ac- greater than tcrit . It can be seen from Fig. 12(b) that the
curately follow the set-point. The control signal rises to closed-loop system performance is satisfactory with no
a value close to maximum (98 % duty ratio) indicating oscillations in the system response. Also, the control sig-
actuator saturation, and no satisfactory performance is ob- nal attains a maximum value of about 87% duty ratio and a
served for a large mismatch in the nominal fixed delay and minimum value of about 20% duty ratio, thereby avoiding
actual delay in the network. actuator saturation. The proposed scheme effectively mit-
Fig. 12(b) shows the response of the proposed adap- igates the effects of large and random time-delays (> tcrit )
tive Smith predictor developed with DFR approximation in the network and improves system stability.
864 Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey, and Dipankar Deb

(a) (a)

(b) (b)

Fig. 11. With classical Smith predictor (tm = 0.06 s) with Fig. 12. With adaptive Smith predictor with DFR series
PI controller. approximation.

7. ALGORITHMIC STEPS quired that r − ŷ → 0 and yd − ŷd → 0, hence the error term
Next, the algorithm for delay estimation and delay com- e2 → 0. The convergence of the term yd − ŷd is discussed
pensation in conjunction with a discrete PI controller for in Section 4.1.4. The error term r − ŷ → 0 if the nominal
DC servo motor speed regulation is presented. feedback ŷ is a good estimate of the non delayed feedback
y. Hence, if Ĝ(z) and Gdm (z) are proper, e2 → 0 in fi-
Remark 1: The sampling time of 1 sec is considered in nite time. Figs. [10-12] describe that the plant response
[10] whereas in the proposed work it is 0.02 sec due to the with the proposed adaptive Smith predictor closely fol-
nature of application chosen. Maximum delay variation lows the set-point. Therefore, it can be said that the error
in [1] is found to be 600 msec for a separation of around e2 → 0 in finite time for the developed WNCS. The con-
4 Km whereas in the proposed work we have attained a vergence speed can be improved by starting the Smith pre-
maximum delay of 800 msec for a distance of 60 meters. dictor with an initial delay [1]. The detailed convergence
The nature of delay variation in [10] and [1] seems to be analysis of the developed WNCS with proofs are left for
constant over some sampling time, whereas there are vari- another publication due to length restrictions here.
ations within a certain bound, at every sampling instant as
seen from Figs. [10-12].
8. CONCLUSION AND FUTURE SCOPE
Remark 2: In [1,10] the algorithms for control are im-
plemented through PC with high-performance math pro- The present work deals with embedded control system
cessing software, whereas all the algorithms (delay es- development for DC servo motor over Bluetooth wireless
timation, delay compensation, and controller) are imple- network. The prototype is built with limited computing re-
mented in embedded platform with limited computing ca- source, thereby innovating the computational implementa-
pabilities, and so [10] and [1] significantly differ in both tion in terms of delay estimation and adaptive Smith pre-
theoretical and practical aspects from the present work. dictor, thereby preventing serious performance degrada-
Remark 3: The convergence of the proposed WNCS tion due to uncertain time-delay. Stability analysis is pro-
can be studied from e2 = r − ŷ − (yd − ŷd ) (13). It is re- vided to validate the effect of delay. Experimental results
Online Delay Estimation and Adaptive Compensation in Wireless Networked System: An Embedded Control Design 865

Algorithm 1 Journal of Control Science and Engineering, vol. 2009, Ar-


1: Set PI parameters Ithres , Isum = 0, KP , KI . ticle ID 591506, 2009.
2: Set ASP parameters x[n − 1] = x[n − 2] = x[n − 3] = [6] A. Hernandez, Wireless Process Control Using IEEE
0, y[n − 1] = y[n − 2] = y[n − 3] = 0. 802.15. 4 Protocol, Master Degree Thesis, Royal Institute
3: while Serial.available() do of Technology, 2010.
4: Receive feedback signal (yd ). [7] D. Yue, Q. L. Han, and J. Lam, “Robust H-inf control for
5: Register the receive time stamp (t2pr ). uncertain networked control systems,” 2004.
6: Estimate tm using rules in Section 3.1 and (4). [8] G. Q. Qiu, D. M. Cao, S. Liu, and J. J. Bao, “GPC control
7: Compute e1 = r − yd , e2 = e1 − y. strategy and simulation of a ZigBee based wireless net-
8: procedure D RIVE = PI C ONTROLLER(PI param- worked control system,” Applied Mechanics and Materi-
als, vols. 687-691, pp. 641-644, 2014.
eters)
9: P = e2 × KP , I = Isum × KI . [9] Y. Wu, Y. Wu, and Y. Zhao, “Mode-dependent controller
10: DRIVE = P + I, Isum = Isum + e2 . design for networked control system with average dwell
time switching,” Transactions of the Institute of Measure-
11: if DRIVE > actuator saturation then
ment and Control, vol. 39, no. 10, pp. 1577-1589, 2017.
12: set DRIVE = constraint(Drive, 0, 255).
[10] C. Suryendu, S. Ghosh, and B. Subudhi, “Variable gain
13: if Isum > Ithres then output feedback control of a networked temperature control
14: set Isum = Ithres . system based on online delay estimation,” Asian Journal of
15: return DRIVE Control, vol. 19, no. 3, pp. 1250-1254, 2017.
16: Send DRIVE signal. [11] C. P. Vyasarayani, S. Subhash, and T. Kalmár-Nagy,
17: Register sent time stamp (t1pr ). “Spectral approximations for characteristic roots of delay
18: procedure y = ASP(ASP parameters) differential equations,” International Journal of Dynamics
19: Set x[n] = DRIVE. and Control vol. 2, no. 2, pp. 126-132, 2014.
20: Compute (12). [12] R. Wang, G. P. Liu, W. Wang, D. Rees, and Y. B. Zhao,
21: return y “Guaranteed cost control for networked control systems
based on an improved predictive control method,” IEEE
Transactions on Control Systems Technology, vol. 18, no.
validate the proposed implementation scheme by show- 5, pp. 1226-1232, 2010.
ing that the proposed scheme can stabilize the closed-loop [13] A. Onat, A. Teoman Naskali, and E. Parlakay, “Model
system for delays greater than tcrit under highly uncertain based predictive networked control systems,” IFAC Pro-
time-delay variation situation. ceedings, vol. 41, no. 2, pp. 13000-13005, 2008.
Future scope of this research includes implementation [14] G. P. Liu, Y. Xia, D. Rees, and W. Hu, “Design and stability
of the said methodology in a loaded network, investiga- criteria of networked predictive control systems with ran-
tion of data loss issues, appropriate algorithms for inher- dom network delay in the feedback channel,” IEEE Trans-
actions on Systems, Man, and Cybernetics, Part C, vol. 37,
ent nonlinear attributes in the plant, and implementation
no. 2, pp. 173-184, 2007.
for a real-time artificial pancreas system (APS).
[15] A. Ulusoy, G. Ozgur, and A. Onat, “Wireless model-based
predictive networked control system over cooperative wire-
REFERENCES less network,” IEEE Transactions on Industrial Informat-
ics, vol. 7, no. 1, pp. 41-51, 2011.
[1] C. L. Lai, and P. L. Hsu, “Design the remote control system [16] S. L. Du, X. M. Sun, and W. Wang, “Guaranteed cost con-
with the time-delay estimator and the adaptive Smith pre- trol for uncertain networked control systems with predic-
dictor,” IEEE Transactions on Industrial Informatics, vol. tive scheme,” IEEE Transactions on Automation Science
6, no. 1, pp. 73-80, 2010. and Engineering, vol. 11, no. 3, pp. 740-748, 2014.
[2] doi J. Eker, A. Cervin, and A. Hörjel, “Distributed wire- [17] L. Huang and Y. Fang, “Convergence analysis of wire-
less control using Bluetooth,” Proceedings of the IFAC less remote iterative learning control systems with dropout
Conference on New Technologies for Computer Control, compensation,” Mathematical Problems in Engineering,
2001.10.1016/S1474-6670(17)32965-8 vol. 2013, Article ID 609284, 2013.
[3] N. J. Ploplys, P. A. Kawka, and A. G. Alleyne, “Closed- [18] R. Patael, D. Deb, R. Dey, and V. E. Balas, “Model ref-
loop control over wireless networks,” IEEE Control Sys- erence adaptive control of microbial fuel cells,” Adaptive
tems, vol. 24, no. 3, pp. 58-71, 2004. and Intelligent Control of Microbial Fuel Cells, Springer,
Cham, pp. 109-121, 2019.
[4] C. H. Chen, C. L. Lin, and T. S. Hwang, “Stability of net-
[19] S. He, J. Song, and F. Liu, “Robust finite-time bounded
worked control systems with time-varying delays,” IEEE
controller design of time-delay conic nonlinear systems us-
Communications Letters, vol. 11, no. 3, 2007.
ing sliding mode control strategy,” IEEE Transactions on
[5] J. D. Boeij, M. Haazen, P. Smulders, and E. Lomonova, Systems, Man, and Cybernetics: Systems, vol. 49, no. 11,
“Low-latency wireless data transfer for motion control,” pp. 1863-1873, Nov. 2018.
866 Santosh Mohan Rajkumar, Sayan Chakraborty, Rajeeb Dey, and Dipankar Deb

[20] S. He, Q. Ai, C. Ren, J. Dong, and F. Liu, “Finite-time Sayan Chakraborty obtained his Bache-
resilient controller design of a class of uncertain nonlin- lor’s degree in Electrical Engineering from
ear systems with time-delays under asynchronous switch- National Institute of Technology, Silchar,
ing,” IEEE Transactions on Systems, Man, and Cybernet- India in 2017. He is currently pursuing
ics: Systems, vol. 49, no. 2, pp. 281-286, Feb. 2019. a Master’s degree in Systems and Control
[21] S. Shi, S. Xu, W. Liu, and B. Zhang, “Global fixed-time from the Dept. of Electrical Engineering at
consensus tracking of nonlinear uncertain multiagent sys- Indian Institute of Technology Hyderabad,
tems with high-order dynamics,” IEEE Transactions on India. His research interests include net-
Cybernetics, 2018. work control systems, embedded control,
time-delay sytems, reduced order modelling, parameter identifi-
[22] H. Shen, F. Li, S. Xu, and V. Sreeram, “Slow state variables cation, and artificial intelligence.
feedback stabilization for semi-Markov jump systems with
singular perturbations,” IEEE Transactions on Automatic
Control, vol. 63, no. 8, pp. 2709-2714, 2018. Rajeeb Dey is currently teaching in Na-
tional Institute of Technology Silchar, As-
[23] B. Subudhi, S. Bonala, S. Ghosh, and R. Dey, “Robust sam, India as an Assistant Professor in
analysis of networked control systems with time-varying the Department of Electrical Engineering.
delays,” IFAC Proceedings Volumes vol. 45, no. 13, pp. 75- He has obtained his Masters degree from
78, 2012. IIT Kharagpur and a Ph.D. from Jadavpur
[24] R. Datta, R. Dey, B. Bhattacharya, and A. Chakrabarti, University, in 2007 and 2012, respectively
“Delayed state feedback controller design for inverted pen- both in Control System Engineering. He
dulum using TS fuzzy modeling: an LMI approach,” Inno- is a senior member of IEEE (CSS) since
vations in Infrastructure, Springer, Singapore, pp. 67-79, 2013 and a member of the Institution of Engineers (India). His
2018. research interest includes time-delay systems, control of biomed-
[25] M. Ghorbani and P. Bogdan, “A cyber-physical system ap- ical systems, network control systems.
proach to artificial pancreas design,” Proc. of International
Conference on Hardware/Software Codesign and System Dipankar Deb has completed his Ph.D.
Synthesis (CODES+ ISSS), IEEE, 2013. degree from University of Virginia, Char-
[26] A. Nath, D. Deb, R. Dey, and S. Das, “Blood glucose reg- lottesville with Prof. Gang Tao, IEEE Fel-
ulation in type 1 diabetic patients: an adaptive parametric low and Professor in the Department of
compensation control-based approach,” IET Systems Biol- ECE in 2007. He received his B.E. degree
ogy, vol. 12, no. 5, p. 291, 2018. from NIT Karnataka, Surathkal (2000)
and M.S. degree from the University of
[27] S. F. Ali, and R. Padhi, “Optimal blood glucose regulation
Florida, Gainesville (2004). In 2017, he
of diabetic patients using single network adaptive critics,”
was elected to be an IEEE Senior Member.
Optimal Control Applications and Methods, vol. 32, no. 2,
He has served as a Lead Engineer at GE Global Research Ben-
pp. 196-214, 2011.
galuru (2012-15) and as an Assistant Professor in EE, IIT Guwa-
[28] M. Zhou, J. Ren, J. Qi, D. Niu, and G. Li, “Emerging tech- hati 2010-12. Presently, he is a Professor in Electrical Engineer-
nologies in knowledge discovery and data mining,” Lecture ing at IITRAM Ahmedabad. He is also the Book Series Editor,
Notes in Computer Science, pp.87-98, 2007. Control System Series/CRC Press/Taylor and Francis Group. He
[29] J. Lam, “Convergence of a class of Pade approximations is an Associate Editor of IEEE Access Journal. He has published
for delay systems,” International Journal of Control, vol. a total of 17 SCI indexed Journal articles and holds 6 granted US
52, no. 4, pp. 989-1008, 1990. patents.

[30] C. P. Vyasarayani, “Galerkin approximations for higher or-


Publisher’s Note Springer Nature remains neutral with regard
der delay differential equations,” Journal of Computational
to jurisdictional claims in published maps and institutional affil-
and Nonlinear Dynamics, vol. 7, no. 3, pp. 031004, 2012.
iations.

Santosh Mohan Rajkumar is currently


working at Indian Oil Corporation Limited
as an Operations Officer. He has obtained
his Bachelor’s degree in Electrical Engi-
neering from National Institute of Tech-
nology, Silchar, India in 2017. His re-
search interest includes system identifica-
tion, control of networked and distributed
systems, robust control applications, em-
bedded control applications, and time-delay sytems.

You might also like