Martinez 2019
Martinez 2019
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
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
Gs (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 .
END
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)
y(t)
Fig. 6 Front panel client B in Labview 2016MR.
100K:
10PF
100K:
Signal
output
Signal
100K:
Input
50K:
Fig. 7 Unstable system electronic circuit.
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)
Pk >
E ( X E>X @) k @ (3)
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:
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).
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.