0% found this document useful (0 votes)
16 views6 pages

Martinez 2019

This document summarizes a study on analyzing communication times in embedded systems applied to telecontrol systems. The study implemented a client-server telecontrol system using two embedded system clients (MyRIO and CompactRIO) and an embedded computer server (Raspberry Pi). Communication times were measured to determine which client configuration had the best response time. Results from implementing the system on an unstable first-order process are presented and analyzed to characterize communication times statistically.

Uploaded by

Tung Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

Martinez 2019

This document summarizes a study on analyzing communication times in embedded systems applied to telecontrol systems. The study implemented a client-server telecontrol system using two embedded system clients (MyRIO and CompactRIO) and an embedded computer server (Raspberry Pi). Communication times were measured to determine which client configuration had the best response time. Results from implementing the system on an unstable first-order process are presented and analyzed to characterize communication times statistically.

Uploaded by

Tung Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2019 International Conference on Mechatronics, Electronics and Automotive Engineering (ICMEAE)

Analysis of the communication time of embedded systems


applied to telecontrol systems
Jorge Salvador Valdez Martínez, Jonathan Villanueva Tavira, Alberto Miguel Beltrán Escobar,
Enrique Contreras Calderón, Iván Alcalá Barojas, Luis Jaime López Vega
División Académica de Mecánica Industrial
Universidad Tecnológica “Emiliano Zapata” del Estado de Morelos
Av. Universidad Tecnológica No. 1, Col. Palo escrito, Emiliano Zapata, Morelos. C.P. 62760.
{jorgevaldez & jonathanvillanueva & miguelbeltran & enriquecontreras & ivanalcala & luislopez &}@utez.edu.mx

Abstract – This paper shows the implementation of a predictability of the system by knowing the behavior of the
telecontrol system in a multiclient-server communication scheme processing and transport times [5].
based on embedded systems and embedded computing systems,
The organization of the paper is as follows. In section one
in order to obtain the performance of the clients configurations
presented, based on the analysis of the communication time
a general introduction of the topic was explained. The
involved in the telecontrol process. Clients developed in real-time telecontrol scheme used, as well as the main features of the
embedded systems based on FPGA- (My RIO and Compact RIO server and clients developed will be describe in Section 2.
of National Instruments) work properly with the server Section 3 shows the results obtained from the implementation
developed in the embedded computing system Raspberry Pi. done, as well as its analysis. And the conclusions can be read
From the measurements obtained, it was determined which of in section 4
the clients developed have the best response.
II. DEVELOPMENT
Index Terms – Telecontrol, Embedded systems, Embedded A. Telecontrol schema
computing systems, Client-Server schema, Performance. The telecontrol schema was developed according to [4,
6]. It was built on a client-server architecture based on TCP
I. INTRODUCTION protocol because it allows to the communication systems
(controlled and controller) to send information with strings
In this paper is pretended to demonstrate the applications
chains between the embedded systems. The telecontrol
of embedded systems and embedded computer systems in the
schema is presented in Fig. 1.
telecontrol systems in order to obtain the measuring and
statistical characterization of the involved telecontrolled times. CLIENT A:
To achieve this, the telecontrol schema presented in [1, 2, 3] My RIO as
was applied, which were based in multiclient –server schema Embedded system
and used to control a study case. (Unstable first order system). SERVER:
The obtained time from the realized measurements were Raspberry PI My RIO
statistically characterized with the objective to compare their with Raspbian
m (t)
performance. (POSIX) SYSTEM 1
The justification for this research is that the computational m (t) y (t) m (t)
INTERNET

factors that are currently considered to explain the telecontrol Proportional


times are not sufficient to determine the performance of a Control
y (t)
telecontrolled system and the explanation is that these times
have not been considered in the analysis. of the measurement, y (t)
both of the execution and transport times obtained through
operating systems dedicated to the study of Real Time NI COMPACT RIO
Systems that allow measuring the times involved with high NI 9219 NI 9263
precision and accuracy [4].
When the computational factors would be considered, it SYSTEM 1
would be allowed to analyze and create mathematical models y (t) m (t)
that represent the times involved in the process of CLIENT B:
transmission and reception of information, and thus create Compact RIO as
techniques to minimize the effect of response times on those Embedded system
in Real-Time Telecontrol Systems based on the measurement Fig. 1 Telecontrol schema.
of the observed variant times as well as the implementation of
better fault tolerant systems schemes since it increases the The server was developed in the embedded computer
system Raspberry PI. This computer has Raspian OS with

978-1-7281-6037-5/19/$31.00 ©2019 IEEE 151


DOI 10.1109/ICMEAE.2019.00035

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.
Portable Operating System Interface (POSIX) [7] which was The developed program set up the Internet
used for programming the server. communication and provided the proportional control action
For the client was considered two cases: the client A was whose is returned to the client for generating the control signal
developed in NI My RIO. This evaluation board is a real-time to the first-order unstable system with the corresponded
embedded system made by National Instruments. It is used to analog output module in the embedded systems. Additionally
develop applications that utilize its onboard FPGA and the program obtained the communication time elapsed. This
microprocessor. It provides analog input (AI), analog output time was divided into reception, execution and transmission
(AO), which could be used to acquire or generate control time.
signal [6] an embedded system based in FPGA technology [8].
C. Client programming
The client B was developed in NI CompacRIO. This
The clients were based in [4, 6, 9], and programmed in
platform offers a range of embedded controllers with two
Labview 2016MR [8], due to the ability to interact with
processing targets: (1) a real-time processor for
physical systems using data acquisition card (DAQ) and the
communication and signal processing and (2) a user-
capability for monitoring and plotting the information emitted
programmable FPGA to implement high-speed control and
by the controlled systems. The DAQ’s used to acquire or
custom timing and triggering directly in hardware. For
generate control signal were embedded systems: NI myRIO
acquisition/generating signal is used a data acquisition module
and NI CompacRio platforms which are real-time embedded
(NI 9219) and a signal generation module (NI 9263) in
industrial controllers developed by National Instruments for
Compact RIO [8].
industrial control systems [8].
Additionally the client A and B realized the output system
Then according to Fig. 1, were developed 2 clients. Client
monitoring information y(t) and generated the signal control
A block diagram is shown in Fig. 3. This block diagram
m(t) sent by the server
shows the data acquisition and the Internet communication
The telecontrolled SYSTEM1 was an unstable first order
based on TCP protocol. This client had a NI myRIO card
system constructed with operational amplifiers in order to
acting as DAQ and it acquired the unstable first order system
observe the behavior of its output, as well as the effect of the
output signal with the device’s analog input (AI), this output
information exchange in the communication time when using
signal y(t) was transmitted to the server for obtaining the
the NI myRIO and NI CompactRIO. The system transfer
signal control m(t) which is returned to the client A and m(t) is
function is in (1):
applied to the controlled system with the NI myRIO analog
output (AO). This block diagram was loaded to the NI myRIO
1
G s (1) for working as a real-time embedded system.
s2

B. Server programming
The architecture server was based on [4, 6, 9], and in this
case, the server was created, in POSIX and it provides the
proportional control action to the remote system, which was
sensed and controlled on the client. The Fig. 2 shows the
telecontrol server block diagram based in POSIX (in Raspbian
OS), which has enabled the port 555 in the IP address Fig. 3 Block diagram client with Myrio in Labview 2016MR
192.168.0.4.
In Fig. 4 is shown the client A front panel, where the
START server IP address and port is assigned to start the
VARIABLE DECLARATION communication between the telecontrol system.
CONFIGURATION OF INTERNET COMMUNICATION .

START OF TELECONTROL TIME MEASUREMENT

OBTAINING THE RECEPTION TIME DUE TO CLIENT DATA READING

OBTAINING THE EXECUTION TIME, DUE TO CALCULATION


OF THE VALUE OF THE PROPORTIONAL CONTROL ACTION

OBTAINING THE TRANSMISSION TIME DUE


TO DATA WRITING TO CLIENT

ENDING OF TELECONTROL TIME MEASUREMENT

PRINTING OF RESULTS OBTAINED

END

Fig. 2 Telecontrol server block diagram


Fig. 4 Front panel client A in Labview 2016MR

152

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.
Client B was developed using NI Compact RIO, the system The system output converges up to 15 Volts, a proportional
signal output y(t) was acquired by the data acquisition module control action was proposed to regulate its output at 1.66 Volts
(NI 9219) and the signal control m(t) was applied by the with a proportional gain Kp = 5, which was tuned using the
signal generation module (NI 9263), the client block diagram Ziegler-Nichols method [5] from the open loop curve shown
is shown in Fig. 5. in Fig. 8.

Fig. 5 Block diagram client with CompactRIO in Labview 2016MR Fig. 8 Unstable system output

In Fig. 6 is shown the front panel client B. This block After of this, the block diagram was constructed with the
diagram was loaded to the NI CompactRIO for working as a controller in closed loop (Fig. 9) to observe its behavior and
real-time embedded system. verify that with that gain it has a rapid response, maintaining
amplitude of 1.66 Volts.

SERVER:
CLIENT A/B:
Raspberry PI
Embedded
with Raspbian
system
(POSIX)

e(t) Proportional m(t) y(t)


r(t) control
Unstable
system

y(t)
Fig. 6 Front panel client B in Labview 2016MR.

D. Telecontrolled system Fig. 9 Block diagram system control


In this case the unstable first order system was
constructed with operational amplifiers [5] in order to observe In Fig. 10, the Block diagram system control output of
the behavior of its output y(t) when is applied the signal Fig. 9 is represented with the black line. Additionally is shown
control sent by the server, and the effect of the information the Ni My RIO output response in red line with the telecontrol
exchange in the communication time when is used the applied. The blue line represents the NI Compact RIO output
embedded systems to acquire and generate control signals. system. In all the cases, the amplitude of 1.66 Volts is
The transfer function of the unstable system can be seen in maintained.
(1). The electronic circuit representing (1) can be seen in Fig.
7, and its system response in Fig. 8.

100K:
10PF

100K:
Signal
output
Signal
100K:
Input

50K:
Fig. 7 Unstable system electronic circuit.

Fig. 10 Obtained telecontrolled .system outputs

153

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.
III. RESULTS In Fig. 11, 12 and 13 are observed that the measured
times WTx,k, WRx,k and ck have a different behavior depending on
The maximum measured transmission time (Fig. 11) with
the embedded systems applied, but this argument is not
NI My RIO embedded system (red line) was 3.38 msec and
enough so it will be necessary to characterize the measured
the minimum measured time was 0.244 msec. And the
times using a few numbers rather than to specify the entire
maximum measured transmission time with NI Compact RIO
density function. These numbers, which are called statistical
embedded system (blue line) was 11.9 msec and the minimum
averages or moments, are evaluated by using the mathematical
was 0.202 msec.
expectation operation [10]. There are ordinary moments of kth
order

mk > @
E Xk (2)

And central moments of kth order

Pk >
E ( X  E>X @) k @ (3)

Where E is called the expected value or mathematical


expectation [11]. The ordinary first-order moment is also
Fig. 11 Transmission time WTx,k (Logarithmic scale) called the arithmetic average value and it is given by:

1 n
The measured reception times (Fig. 12) with NI My RIO m1 E>X @ x ¦ xi n 1, 2, 3, ... (4)
embedded system (red line) were between 1.624 and 11.9 ni1
msec. For NI Compact RIO embedded system (blue line) the
measured reception times were between 0.995 and 979 msec. And the central second-order moment (variance or
dispersion) is a measure of the scattering of measured values
about the average value:

V 2 P 2 D 2 >X @ E>( X  E>X @) 2 @


1
n 1, 2, 3,... (5)
N

In Fig. 14 is observed the dynamics of the behavior of the


ordinary first-order moment E[WTx,k] of the transmission time
WTx,k. In the red solid line is represented the NI myRIO platform
dynamics, in the blue solid line is shown the NI CompactRIO
response.
Fig. 12 Reception time WRx,k. (Logarithmic scale)

The measured execution times (Fig. 13) with NI My RIO


embedded system (red line) were between 0.088 and 0.432
msec. For NI Compact RIO embedded system (blue line) the
measured reception times were between 0.141 and 4.231
msec.

Fig. 14 Ordinary first-order moments E[WTx,k] and E[c,k]

The ordinary first-order moment E[WTx,k] of the measured


transmission time WTx,k,, when initiating the exchange of
information using the TCP protocol, it can be observed that the
measured transmission time WTx,k for NI myRIO board used as
DAQ, is around the region of 0.515 milliseconds and while the
system is evolving, it has a convergence towards a region near
Fig. 13 Execution time ck. (Logarithmic scale)

154

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.
to 0.2969 milliseconds. While NI CompactRIO E[WTx,k], is The ordinary first-order moment E[WRx,k] of the reception
around the region of 0.3555 milliseconds and while the system time WRx,k, on having initiated the information exchange using
is evolving, it is possible to see that it has a convergence the TCP protocol, it is possible to observe that the reception
towards a region near to 0.332 milliseconds. time WRx,k obtained with NI myRIO (red line) is about the region
While the ordinary first-order moment E[c,k] of the of 0.7757 milliseconds, but as the system evolves, it has a
measured execution time ck, (Fig. 14), when initiating the convergence towards a region close to 1.497 milliseconds.
exchange of information using the TCP protocol, it can be With NI CompactRIO (blue line) is about the region of 0.533
observed that the measured execution time ck for when the NI milliseconds, but as the system evolves, it has a convergence
myRIO platform (red dotted line) is about the region from towards a region close to 6.486 milliseconds.
0.298 (max) to 0.1326 (min) milliseconds. With NI In Fig. 17, the behavior of the central second-order
CompactRIO (blue dotted line) the region is between 0.157 moment E[WRx,k]2 of the reception time WRx,k corresponding to
(max) and 0.1367 (min) milliseconds. the NI myRIO platform (red line) and the Compact RIO
For the transmission time central second-order moment platform (blue line) can be observed, acting as embedded
E[WTx,k]2 (see Fig. 15), it is possible to observe that there were system..
variations of 0.00396 – 0.01764 milliseconds2 for NI myRIO
board in solid red line. For NI CompactRIO board, the value
reaches from 0.0.003612 milliseconds2 at the beginning of the
evolution of the system, until 0.3125 milliseconds2 (blue solid
line).

Fig. 17 Central second-order moments E[WRx,k]2 (Logarithmic scale)

For the reception time central second-order moment


E[WRx,k]2 (see Fig. 17), it is possible to observe that there were
variations of 0.01805 – 1.155 milliseconds2 for NI myRIO
Fig. 15 Central second-order moments E[WTx,k]2 and E[ck]2 (Logarithmic scale)
board in solid red line. For NI CompactRIO board, the value
reaches from 0.3093 milliseconds2 at the beginning of the
And for the execution time central second-order moment evolution of the system, until 3054 milliseconds2 (blue solid
E[ck]2 (see Fig. 15 dotted lines), it is possible to observe that line).
there were variations of 0.01125 – 0.002764 milliseconds2 for The suddenly changes observed in embedded systems were
NI myRIO board in dotted red line. For NI CompactRIO board, due to the presence of delays in the reception time of more than
the value reaches from 0.0003645 to 0.02777 milliseconds2 12 millisecond duration (in the three cases) which caused the
(red dotted line). behavior of the central second-order moment E[WRx,k]2 (see Fig.
In Fig. 16, the behavior of the ordinary first-order 15).
moment E[WRx,k] of the reception time WRx,k corresponding to NI myRIO had maximum changes from 0.1076 – 125.7
the NI myRIO platform (red line) and the Compact RIO units of variance. NI Compact RIO had changes between 1.374
platform (blue line) can be observed, acting as embedded – 2645 units of variance and Arduino Nano board had changes
system.. from 0.0033 – 4449 units at the end of the evolution of the
system.
IV. CONCLUSIONS
The telecontrol system developed in embedded systems
and embedded computing systems, worked properly to control
the unstable system remotely.
But there were variations of the controlled systems
outputs compared to the ideal system output, because the
communication times involved to send and receive the
information varied depending on the time.
The communication time of the telecontrol schemes
presented, were divided into three times identified as the
Fig. 16 Ordinary first-order moments E[WRx,k]

155

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.
transmission time WTx,k,, reception time WRx,k and execution time Interface (API) [C Language]”. Institute of Electrical and Electronics
Engineers. USA, 1995.
ck, in order to quantify and analyze them.
[8] Labview 2016MR Software, National Instruments. USA, 2016.
The analysis was made from the study of the ordinary [9] Jorge Salvador Valdez Martínez. Medición, Caracterización y
first-order moment and the central second-order moment of Reconstrucción de los Tiempos de Ejecución y Transporte para Sistemas
probability of the times involved in the telecontrol schemes de Telecontrol en Tiempo Real. PhD Thesis. Instituto Politécnico
presented Nacional. México, 2015.
[10] Manolakis D., Ingle V., Kogon S.: Statistical and adaptive signal
It was observed that the best information transmission processing: Spectral estimation, signal modeling, adaptive filtering and
time was obtained in the NI MyRIO embedded system, since array processing. First edn. Artech House, Norwood (2005)
it presented a constant value because the sending information [11] Sydenham, P. H.: Handbook of measurement science: Volume 1
from the server to the client A, was made with an ordinary Theoretical fundamentals. First edn. John Wiley & Sons (1982)
first-order moment E[WTx,k] of 0.2969 milliseconds, causing
that the central second-order moment E[WTx,k]2 remained with
low values between 0.00396 to 0.01764 milliseconds2.
The best reception time was the one obtained by the client
A (NI MyRIO), since it presented a constant value E[WRx,k] of
1,497 milliseconds because the sending information from the
client to the server, was carried out constantly without
accentuated variations that can be observed in the central
second-order moment E[WTx,k]2, where there were variations
between 0.01805 to 1,155 milliseconds2.
In the case of the execution times, both clients presented
similar dynamics at the ordinary first-order moment since the
calculation process for the control action was executed in
0.1326 milliseconds for client A and for client B was 0.1367
milliseconds.
With these results, it can be determined that the
embedded system used in client A performed better than client
B.
REFERENCES
[1] J. S. Valdez Martínez, J. Villanueva Tavira, Jaime Vázquez Colín,
“Workbench's implementations based in telecontrol system software
architecture”. Proc. 2016 International Congress of Mechatronics,
Electronics and Automotive Engineering, pp. 150-156.
[2] Jorge S. Valdez-Martínez, Jonathan Villanueva-Tavira, Jesse Y. Rumbo-
Morales, Alberto M. Beltrán-Escobar, Iván Alcalá-Barojas, Luis J.
López-Vega, Enrique Contreras-Calderón “Measuring and
characterization of telecontrol time in embedded systems”. Proc. 2017
International Congress of Mechatronics, Electronics and Automotive
Engineering, pp. 169-174
[3] Jorge S Valdez-Martínez, Jonathan Villanueva-Tavira, Jesse Y Rumbo-
Morales, Alberto M Beltrán-Escobar, Iván Alcalá-Barojas, Luis J López-
Vega, Enrique Contreras-Calderón, “Comparison of Workbenchs for
Telecontrol Systems over the Internet Using Embedded Systems Such as
Data Acquisition Cards”, Proc. 2018 International Congress of
Mechatronics, Electronics and Automotive Engineering, pp 147 – 153
[4] Jorge Salvador Valdez Martínez, Pedro Guevara López, “Measurement,
Characterization and Reconstruction of Computing Time and
Transporting Time for Real-Time Telecontrol Systems” Revista
Computación y Sistemas 23(2), 2019. Pp. 531 – 546
[5] Jorge Salvador Valdez Martínez, Jesse Yoe Rumbo Morales, Alberto
Miguel Beltrán Escobar, Iván Alcalá Barojas, Luis Jaime López Vega,
Enrique Contreras Calderón “Implementación de un sistema de
telecontrol por internet usando microcontroladores como tarjeta de
adquisición de datos”, Revista electrónica Programación Matemática y
Software 10(3), Octubre, 2018.
[6] Jorge Salvador Valdez Martínez, Gustavo Delgado Reyes, Pedro
Guevara López, Jose Luis Cano Rosas, "Transmission Times
Reconstruction in a Telecontrolled Real-Time System" IEEE
Latinamerica Transaction 17(3), 2019.Pp. 349-357.
[7] Institute of Electrical and Electronics Engineers. “Portable Operating
System Interface (POSIX)—Part 1: System Application Program

156

Authorized licensed use limited to: University of Vermont Libraries. Downloaded on July 27,2020 at 11:14:05 UTC from IEEE Xplore. Restrictions apply.

You might also like