Communication Times Reconstruction in a Telecontrolled Client–Server Scheme: An Approach by Kalman Filter Applied to a Proprietary Real-Time Operating System and TCP/IP Protocol

: Nowadays, various systems were developed in the telecommunications ﬁeld which make use of technologies for the transmission and reception of information. One of these technologies is the Internet, which was developed in tandem with scientiﬁc growth. Therefore, its application in the control of various industrial processes has a notable inﬂuence. In this context, there are industrial processes that, due to the potential danger they represent to human beings, must be controlled by means of a remote control system. Such systems can be implemented through client–server communication schemes, which form a network of computers to exchange information. In the exchange of information, delay times are generated. These inactivity times have a close relationship with the latency in the communication network and have a negative impact on the performance of closed-loop control systems. In this sense, for physical implementation, it is essential to measure and mathematically characterize their magnitudes in order to know their variability and thus be able to design control strategies that compensate for their effects. Hence, this research paper presents the reconstruction of the communication times measured from a telecontrol system, where it is assumed that only one subsystem acts as the controller and the other one acts as the controlled. In other words, this paper addresses a control scheme type of single-input-single-output system (SISO). This reconstruction is based on the Kalman ﬁlter, which estimates the communication times that are measured on an experimental test bench with a client–server communication scheme. Communication times are characterized as stochastic processes. So, in order to validate the reconstruction presented, the level of dependence between the random processes is evaluated by analyzing their moments of probability as well as their covariance moments. Finally, an analysis based on the mean square error is presented, through which it can be concluded that the reconstruction technique used allows one to know the dynamics of the communication times generated by the remote control process presented in this research.


Introduction
The Internet is the primary on-ramp for connecting laptops, handsets, tablets, game consoles, smart televisions, and IoT devices to wired broadband networks [1]. Most of of adaptive signal processing techniques to monitor and predict the performance of a network so that it can make timely and effective control decisions.
The main aim of this manuscript proposal is to show the relevance of a reconstruction technique based on Kalman's filtering that allows us to describe the behavior of dynamics involved in telecontrol real-time processes. In this specific case of reception time τ Rx,k , which, along with transmission time τ Tx,k , composes the transport time τ k , a designed and programmed algorithm developed by [2], reported in [3] and applied in [27] as a test bench will be used. The main objective of this algorithm is to determine through computational measurement techniques and the times involved in telecontrol of real-time processes if reconstruction of the behavior is possible using the proposed filter where results could be acceptable to characterize the dynamic of the times involved in Internet communication processes.
The paper organization is as follows: the second section explains the times involved in the remote control process as well as the Kalman filter; the third section presents the development of a test bench used for measuring transmission times in a remote control system, and its statistical characterization and reconstruction from the Kalman filter; the fourth section presents the discussions about the investigation. Finally, the conclusions are presented.

Times in Telecontrol Process
The telecontrol system used in this paper is shown in Figure 1. The system is designed to measure and analyze the time involved in the telecontrol process. It is based on the software architecture with a real-time client-server communication scheme developed by [2] and implemented in [27]. The time difference between the controlled variable in a process and the manipulated variable of the control system will be made up of transmission time τ Tx,k , reception time τ Rx,k , and execution time τ c,k . These times will be called communication times T C,k (see (1)).
where if the execution time τ c,k in each instance is bounded by the interval (0,d k ] with d k in + , it is justified that the simulation on the server takes place in real-time. In this context, d k is the deadline time imposed by the controlled physical system to obtain a punctual response, which does not affect system performance. The communication scheme can be developed using a Local Area Network (LAN) or a Wide Area Network (WAN), where interconnected devices such as switches and routers can be used. The experiments reported in this paper make exclusive use of a WAN-type network. In fact, in a LAN network, communication is faster, allowing it to communicate in local client-server type schemes. These schemes generate communication times whose amplitude is smaller compared to those obtained when using a WAN.
According to Figure 1, execution time τ c,k ∈ + is the time in which the information is processed on Client A in the interval k ∈ Z + until processing is completed without considering blockages by reading or writing over communication channels, processor evictions, or other suspensions. Here, it is important to mention that the execution time on the server is not considered because only the server's external times will be measured.
The reception time τ Rx,k ∈ + is a period of time in which information is sent from Client A to the telecontrol server in an interval k ∈ Z + . The transmission time τ Tx,k ∈ + is the time it takes to send information from the server to remote Client A in an interval k ∈ Z + . Note that in Figure 1, Client B is only used to monitor the output of a simulated system on the server. Telecontrol time in real-time T Tc,k ∈ + is the algebraic sum of execution time τ c,k , reception time τ Rx,k , and transmission time τ Tx,k in an interval k ∈ Z + . Thus:

Model for Reconstruction of the Communication Times in a Telecontrol System
The term "filter" is used to describe an analogically or digitally implemented device that is used to eliminate noise, extract information with smoothing, and predict or reconstruct system behaviors [28]. For the modeling of the times τ c,k , τ Tx,k , and τ Rx,k in the reviewed literature, the use of digital filtering is reported to estimate or represent their behavior.
The mathematical models that represent the dynamics of the execution time τ c,k are considered fixed [10] or as the worst case of execution times, WCET [11]. However, after conducting a study of the local and global convergence of τ c,k in [16], it was concluded that it can be considered a stochastic system with correlated disturbances, and due to this, it is possible to use an auto-regressive moving average model ARMA (1,1) for the mathematical representation of the execution times τ c,k . The system parameters can be obtained by using a digital filter based on the the Instrumental Variable Method IVM [16,18,19] and fuzzy filtering [17,20,21].
The mathematical modeling of transmission and reception times is not a trivial task because they have a behavior that is strongly related to latency in the communication network, and therefore, they have completely random behavior. In this context, they can be modeled by stochastic processes [29] or, failing that, tried in reconstruction techniques for analysis and characterization [30].
A digital filter used as a reconstructor is described in [28,31]. In this context, a reconstructor is a mathematical procedure operating through an observer and correction mechanism (See Figure 2). The algorithm predicts the new state from its previous estimate by adding a correction term proportional to the prediction error, where it is minimized in an optimal sense. Then, for the reconstruction of communication times T C,k , the Kalman filter will be used. This will take into account [28,31,32] to propose a model for communication times, considering it as a discrete time system with stochastic behavior and having the general form expressed by Equations (3) and (4). where X k is a states vector, A k is the system parameter matrix, B k is the system input matrix coefficient, U k is the system input vector, V k is the noise associated with the input system, T C,k is the communication time, C k is the system outputs coefficient matrix, and W k is the noise associated with the output system. The prediction of the system's internal stateĜ k+1 is defined in (5) as:Ĝ Let K k be the Kalman K gain defined in (7) by: Such that J k+1 is the covariance matrix of states identification and is defined in (8): where Q k is the covariance matrix of noise associated with the input system, which is defined in (9): Then, P k+1 is defined as the covariance matrix of identification error and is given by (10): Here, R k is the covariance of noise associated with the output system, which is given by (11): Considering the above, the model proposed for the reconstruction of the communication times will be obtained from (4), which is rewritten in (12): (12) whereX k is defined as follows: With the following initial conditions of the estimated state vector: Then,T Tc,k is shown in (15):

Results
This section includes the results of this research. The structure of the multi-clientserver system that integrates a test bench developed for the study of times involved in the telecontrol process is shown in Figure 1. This served to measure, characterize, and reconstruct the communication times T C,k . This is in order to know the dynamics of these non-deterministic times because they determine the occurrence of latency times. In this sense, they can be considered as delays, and these times affect the behavior of the controlled system.

Telecontrol System Server
To obtain telecontrol times measurement, the software architecture reported in [2,3,30], which is a modular multi-client-server communication scheme, was taken into consideration. The server implementation was performed on a dual processor computer with a speed of 1.6 GigaHertz, 4 Gigabytes of RAM, and the QNX 6.5 Neutrino real-time operating system (RTOS) [33]. The programming was developed in POSIX (Portable Operating System Interface), which is a family of programming standards specified by the IEEE Computer Society and used to maintain software compatibility between UNIX-based operating systems. POSIX defines the Application Programming Interface (API) between command-line and graphical interfaces [34].
The server program executes three main real-time tasks (RTT). The tasks carried out on the server are executed periodically through the use of real-time timers with a sampling period T = 0.1. Figure 3 shows a user interface flow diagram for the telecontrol server.
The first task realized the communication via Internet to Client A and B using TCP/IP protocol through the use of function socket() from library sys/socket.h [33]. In this paper, this TCP communication protocol was used since it guarantees the reliability and correct order of sent data through a communication socket. The correct data order, verified by the cyclic redundancy check (CRC), avoids loss of information, but it may increase response times. However, it ensures the data accuracy. Therefore, in this paper, this communication protocol was chosen since the implementation of a telecontrol system requires data integrity for its proper performance.  The virtual circuit for transferring information uses network communication ports where information is sent as an 8-byte character string to Client A through the use of network port 7000 (writing socket) and to Client B via network port 7020 (graphing socket), but only information is received from Client A through network port 7010 (reading socket). Network port 7030 was used to send information about measured times of the telecontrol system in real-time.
The second server task is responsible for the simulation of an unstable first-order system, whose transfer function is shown in (16): The discrete time recursive model shown in (17) was obtained through the Z-transform: where β = 1, α = −0.5, τ = 1/|α| and T = 0.1. There are real-time applications that use small deadlines (RTT iteration steps) T s , but this is not an indispensable requirement for the implementation of real-time systems (RTS). In this sense, it should be noted that the execution deadline assignment of the real-time tasks that are part of the RTS should be determined based on the speed of change or evolution of the dynamic system, which is determined by its time constant τ. In this context and according to the α parameter defined by the SISO system (16), τ = 2, it is proposed to use T s = 0.1 as the deadline for the RTT programming. Although this deadline does not represent a challenge for the processing capacity of the RTS, it was determined considering the aforementioned criteria, thus complying with one of the essential characteristics of all RTS [35]. On the other hand, there are communication protocols that, together with the bandwidth of the Internet where these implementations are carried out, guarantee shorter response times.
To avoid preemption times (considered as delays) caused by interaction with other RTT, a high execution priority was assigned by means of the setprio() and getprio() functions of POSIX for QNX RTOS to ensure the minimum existence of preemption tasks due to mutual exclusion. By using this scheduling tool, it is possible to guarantee execution times whose magnitude is lower compared to the scenario in which no priority assignment is made. This action is intended to ensure that the real-time simulation of the unstable system satisfies the deadline associated with the task that simulates it.
The result of the system simulation's y k output signal was sent to both clients. Client A used the y k signal value to obtain the control signal u k−1 . This value was returned to the server to modify the behavior of the first-order unstable system simulated in realtime. Client B used the output signal to make the comparison between the signal y k obtained by the real-time control of the first-order unstable system simulation and the ideal output signal.
The third task of the server was programmed to measure the communication times involved in the telecontrol process from the server to client A, within which execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k can be considered. It is worth mentioning that this information was sent to Client B using network port 7030. The measured times can be saved in a database on the server for later analysis, and this activity is considered as the fourth task.
To avoid the appearance of excessive time originated by the reading and writing of information in the communication buffer (latency times), additional secondary real-time tasks were programmed. In this sense, the programming performed for the prevention of such latency times use the select() function from the library sys/select.h of POSIX, with the purpose of implementing blocking type communication sockets. This prevention mechanism was carried out by the first secondary RTT, which has the purpose of assigning a sub-deadline d s1,k for the reception of data by the server. Therefore, if in the current iteration, the reception time τ Rx,k exceeds the sub-deadline d s1,k , the server blocks the communication socket and consequently does not wait for the value of the control action u k−1 sent by Client A.
In this scenario, to ensure the correct execution of the telecontrol strategy, the server does not consider the control action null. Instead, it considers the value of the control action sent by the Client A in the previous iteration u k−2 , this being considered for the stabilization of the simulated system in the server. As a consequence of the procedure described above, the server calculates the output of the system y k to be used in the subsequent iteration and forwards it to Client A. To this end, the other secondary RTT is programmed in the server, which aims at allocating a sub-deadline d s2,k . If it is detected that the time of data transmission τ Tx,k exceeds the sub-deadline d s2,k , the server blocks the communication socket again, thus terminating the process and preparing to send the information to Client B. This prevention mechanism helps to limit the sub-deadlines d s1,k and d s2,k as waiting times to ensure that even when the communication times between the server and the clients are of variable magnitude, the deadline T S (RTT iteration step) is met, such that, if there is a long response time from Client B, and if it exceeds the deadline T S , the communication is terminated to initialize the scheduling loop again. This is repeated until there is confirmed communication with the clients in the control scheme. To guarantee the periodic execution of the main RTTs, a real-time signal timer was programmed to define the sampling period T, such that T s is less than or equal to T.

Client A of the Telecontrol System
Client A was developed on a computer with the QNX 6.5 Neutrino real-time operating system, a dual processor with a speed of 1.6 Gigahertz, and 4 Gigabytes of RAM. The user interface flow diagram for telecontrol Client A is shown in Figure 4. The three tasks performed by Client A are described as follows: The first task was programmed to communicate with the server to receive information sent on the assigned socket (IP address 201. 163. 201. 153 and network port 7000), which corresponds to the output of the unstable first-order system y k . The second task was used to program and execute a real-time timer. The third task provided a menu where the proportional control scheme designed for the SISO system, denoted by (16), was chosen, assigning a value of Kp = 0.6, which was tuned by means of the Ziegler-Nichols method from the open loop curve. The block diagram was constructed with its controller in a closed loop (See Figure 5) to observe its behavior and verify that with this gain it has a quick response, maintaining a value of y k = 6. The control signal u k−1 will be sent through the network communication port 7010 to the server in order to manipulate or limit the output of the simulated unstable firstorder system. As with the server, there is a timing mechanism in the POSIX programming language that allows the control signal to be provided at the indicated times. The timing mechanism provides an iteration step for the programmed task which is equal to the server.

Client B of the Telecontrol System
Client B (see Figure 6) was implemented in a non-real-time operating system and has the following hardware features: quad-core processor with a processing speed of 3.2 Gigahertz and 8 Gigabytes of RAM. The time-sharing operating system used is Windows, which uses National Instruments industrial development software LABVIEW for the graphic interface development [36]. This is because it offers the possibility of interacting with physical systems through the use of data acquisition cards, as well as monitoring and graphically displaying the information emitted by systems.
The graphical interface is responsible for reading the IP address 201. 163. 201. 153 on network port 7020 and 7030, the information sent by the server. The network port 7020 of this IP address is the socket responsible for sending the value of the output signal of the unstable first-order system to be plotted on the server.
The network port 7030 is the socket responsible for sending values of reception time τ Rx,k and transmission time τ Tx,k measured during communication from the server developed in the QNX 6.5 Neutrino real-time operating system to Client A to be plotted (see Figure 6 communication times). The block diagram of the front panel can be seen in Figure 7.
The information is transported on the Internet by the virtual communication circuit as an 8-byte character string. It is converted to a numerical format and plotted using the developed interface or through the mathematical analysis software MATLAB [37]. These results are shown in Figure 8.
To analyze the effect of the communication times in the simulation of the unstable firstorder system, it was added (17) to the code G diagram shown in Figure 7. The proportional control action was also applied to this representation, and its output was compared with the output of the simulated system on the server, which is controlled by Client A. The variation observed at the beginning of the evolution of the real output signal, which is seen in Figure 6, is due to the use of different timing values in each client. The communication times T C,k were measured by Client A, which, due to their duration and variation, were considered for their graphing, and consequently, their reconstruction. Figure 8 shows the reception and transmission times measured by the server.  Figure 9 shows the execution times measured by Client A. These times are generated due to the calculation of the control action applied to the server.

Iteration
The times shown in Figure 8 correspond to the transmission and reception of information in the Internet communication scheme, which were measured by the server and vary according to both external and internal factors. With regard to external factors, these may be caused by communication network infrastructure, computer intrusions, latency due to use of the system during peak hours, meteorological phenomena, among others. Therefore, there is no certainty that its variability is known a priori; thus, it is associated with factors that do not depend on the system in real time. Instead, they are due to the latency of the network of communication devices such as access points, routers, hubs, and switches, to mention a few. Regarding the internal factors associated with the server and Client A, there are pipeline, preemption times due to priority management, exclusion of tasks due to process scheduling effects, and caching, among others. It should be noted that the determination of the deadline for the execution of tasks in real time was made based on the time constant of the dynamic system SISO (14) and not based on the maximum magnitude of the transmission and reception times, since one of the primary characteristics of any RTS is to meet the time constraints imposed by the process or physical phenomenon with which it is interacting.
In this context, it is important to emphasize that server and Client A were both implemented using a real-time operating system. Therefore, only Client B was implemented using a time-sharing operating system. Based on the above, the mechanism to ensure compliance with the deadlines was implemented in the server and Client A to ensure that even when the transmission and reception times have a significant variability (for example, 6 s), the system continues to operate by using the previous value of the control action u k−2 ; thus, these latency times do not compromise the stability of the closed-loop system.

Characterization of Communication Times T C,k in Telecontrol Systems
To ensure the operating condition of the Kalman filter as a reconstructor of communication times T C,k behavior of a telecontrol system, it is necessary to analyze the temporary covariance of input noise Q T C,k and the covariance of output noise R T C,k+1 in execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k , to determine its functional dependence using (9) and (11), respectively. Q T C,k is denoted by (18). Figure 10 shows the covariance of associated noises with the system input. This figure shows Q Tx,k , Q Rx,k , and Q c,k , and it can be observed that at the beginning of system evolution, the behavior of covariance has different values than zero. This allows us to say that at the beginning of reconstruction, the noises associated with the system at input and output have some linear dependence, but as the system evolves, the temporary covariance of the noises associated with the system converges close to zero gradually (See Table 1).  R T C,k is represented by (19), and Figure 11 shows the covariance of output noise with the system.
The same situation is observed in R T C,k (See Table 2). With this, we can ensure that the covariance of input Q T C,k and output R T C,k+1 noises have linear independence. The linear independence allows us to state that the variance of identification error P T C,k+1 given in (10) will have the same behavior ( Figure 11). Based on the analysis of the values (See Table 3), we concluded that operating conditions to use the Kalman filter are able to reconstruct the communication times T C,k behavior of a telecontrol real-time system (RTS) and are fulfilled by ensuring that noises associated with the input and output of the system are linearly independent.  Figure 11. Temporary behavior of the covariance of the identification error P T C,k+1 (using log scale on xand y-axis).
When the covariance moment is evaluated by means of a linear type function of two random processes, it is established that a closed interval goes from 0 to 1, where the interval closed on the left denotes independence of the processes and the interval closed on the right denotes a high level of dependence. Therefore, in both cases, it can be observed that at the start of the system evolution, the behavior of the covariance has values different from zero, which means that at the beginning of the reconstruction, the noises associated with the system at the input and output have a certain dependence. However, while the system evolves, the behavior of the temporal covariance of the noises associated with the system tends to a region close to zero. Thus, it can be assured that the noises characterized by the covariance matrices Q Tx,k and R Tx,k+1 have linear independence, which allows assurance that the covariance of the identification error will have the same behavior.

Reconstruction of Communication Times Using the Kalman Filter
Once linear independence of the noises associated with input system Q T C,k and output system R T C,k+1 is ensured, it is possible to carry out the reconstruction of communication times. To this end, some additional implementation details of the Kalman filter are emphasized, so the description of the filter parameters settings is performed as follows: Then, it is possible to use Equation (7) to calculate the Kalman's gain K T C,k (see Figure 12) that will allow the reconstruction of execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k . In Figure 13, the measured reception times τ Rx,k and the reconstructed reception timeŝ τ Rx,k can be observed. Here, it can be seen that the reconstruction of the reception times has the same behavior as the measured times.     In this case, as well as withτ Rx,k andτ c,k , the obtained results are very close to the measured times T C,k for all values of k. However, it is considered that this argument is not enough, which leads to the use of descriptive measures such as the first-and second-order moment of probability, and the mean squared error to validate this result [3,27,30].

Iteration
The behavior of the first order moment of probability E{T C,k } of the real and reconstructed communication times can be seen in Figure 16. It can be seen that at the beginning of communication attempts using the TCP/IP protocol, communication times T C,k have a convergence towards the real values of almost 100% in most points.
The behavior of the second-order moment of probability E{T C,k } 2 of the real and reconstructed communication times can be seen in Figure 17. It can be seen that at the beginning of communication attempts using the TCP/IP protocol, the second-order moment of probability of reconstructed communication timeŝ T C,k has a certain divergence with respect to the real values, but once the system evolves, convergence towards real values is very close to 100% in almost all points.
For the probability density function, the frequency of appearance of the information of the transport times was measured through its histogram. A histogram is used to identify patterns in a data set when it is necessary to group the observations into a relatively small number of non-overlapping classes or bins, such that there is no imprecision in the class that a particular observation belongs. This grouping of observations for the information transport times is graphically observed in Figures 18-20. The mean squared error between real communication times T C,k and reconstructed communication timesT C,k can be determined by describing the convergence of the filter by using (24) and (25) until the minimum magnitude of H TC,k is reached.
Then, in Figure 21 and according to Equation (25), the Kalman filter has a convergence at almost all points since the mean squared error H TC,k converges to very small values (See Table 4) for communication times T C,k , which allows us to describe the quality of reconstruction, because the smaller the values of H T C,k , the better the reconstruction achieved.

Discussion
In a real-time system, execution times or computing times τ c,k vary due to a variety of factors, such as deep pipeline, branch prediction [9], cache sizes [10], the worst-case execution path due to mutual exclusion [11], and other interactions, that cause non-deterministic behavior of execution times and are asynchronous in the dynamics system [12,13].
In telecontrol systems, reception times τ Rx,k and transmission times τ Tx,k , the variation with respect to time is due to the fact that its duration depends on the increase in technological infrastructure, seasonal or hourly factors, cyclic factors, irregular factors [22], and communications protocols used for the exchange of information [23]. The reception time τ Rx,k ∈ + is a period of time in which information is sent from Client A to the telecontrol server in an interval k ∈ Z + . While the transmission time τ Tx,k ∈ + is the time it takes to send information from the server to remote Client A in an interval k ∈ Z + . In this sense, telecontrol time in real-time T Tc,k ∈ + is the algebraic sum of execution time τ c,k , reception time τ Rx,k , and transmission time τ Tx,k in an interval k ∈ Z + .
According to the previous paragraphs, to obtain telecontrol times measurement, in this paper the software architecture uses a modular multi-client-server communication scheme as workbench. The server implementation was performed on a dual processor computer with a speed of 1.6 GigaHertz, 4 Gigabytes of RAM, and the QNX 6.5 Neutrino real-time operating system [33]. Basically, the server executed three real-time tasks. The first task realized the communication via Internet to Client A and B using TCP/IP protocol through the use of function socket() from library sys/socket.h [33]. The second server task was responsible for the simulation of an unstable first-order system. The third task of the server was programmed to obtain the measurement of communication times involved in the telecontrol process from server to Client A, within which execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k can be considered.
Once linear independence of the noises associated with input system Q T C,k and output system R T C,k+1 was ensured, the Kalman filter was used as one part of a reconstructor of communication times T C,k of a telecontrol system. For this reason, it was necessary to analyze the covariance of input noise Q T C,k and the covariance of output noise R T C,k+1 in execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k . Then it is possible to use Equation (7) to calculate the Kalman's gain K T C,k , which will allow the reconstruction of execution times τ c,k , reception times τ Rx,k , and transmission times τ Tx,k .
In this paper, the validation of the results is corroborated based on three descriptive measures: probability moments, probability distribution, and mean square error. All these measures are global indicators of the performance of the communication time reconstruction process. Regarding the probability moments, it is worth mentioning that they were analyzed for both measured and reconstructed communication times, and when comparing them in both scenarios, as shown in Figures 16 and 17, they converge to similar values, validating that the reconstruction was successfully achieved. Regarding the probability distributions shown in Figures 19 and 20, these denote the frequency of occurrence of transmission and reception times through their histograms, where the histogram is used to identify patterns in a data set when it is necessary to group the observations in a relatively small number of non-overlapping classes so that there is no imprecision in the class to which a given observation belongs. In this context, when comparing these histograms, it can be seen that the probability of occurrence of the reconstructed transmission and reception times is very similar to that of the measured ones. Therefore, in a probability sense, this argument also validates that the reconstruction process was performed adequately. Finally, the mean square errors defined by Equations (18) and (19) shown in Figure 21 have an asymptotic convergence to zero, which allows us to conclude that this performance indicator confirms the quality of the reconstruction obtained by means of the two approaches mentioned above.
It can be seen that at the beginning of communication attempts using the TCP/IP protocol, the second order moment of probability of reconstructed communication timeŝ T C,k has a certain divergence with respect to the real values, but once the system evolves, it converges towards real values very close to 100% in almost all points.

Conclusions
For the reconstruction of communication times dynamic T C,k using the Kalman filter, we present the following results.
(1) We observed in bibliographic references presented that the quantification of communication times T C,k of information over the Internet has a strong dependence on applications developed to work on the Internet, as well as factors that increase communication time, favoring the appearance of delay response times. Moreover, its modeling is based on structural models that depend on the type of information that is handled (voice, video, or data), which takes into account the size of information and amount of sent information. However, these models do not investigate the dynamics of communication times; thus, as a contribution to this work, we propose a modeling and reconstruction of the dynamic variation of communication times T C,k in telecontrol real-time systems using a model based on the Kalman filter.
(2) The Kalman filter has the ability to dynamically interpret the variables of a system and their respective variations.This interpretation gives a natural response according to the requirements of a process, ensuring proper operation.
(3) The reconstruction from the used method was quite good, since the communication timesT C,k reconstructed in the telecontrol real-time system are very close to the real communication times T C,k for all values of k. We obtained an approximation very close to 100% in the first-and second-order moments of probability, achieving a mean squared error close to zero.
For future work, we expect to experiment with SIMO, MISO, and MIMO systems. This requires the scheduling of multiple processes that can be executed concurrently or in parallel to obtain a real-time simulation to meet the time constraints (deadline) associated with the dynamics of the system to be controlled.
One of the main focuses of the present research was the reconstruction of the communication times implicit in an experimental telecontrol scheme. For this purpose, the Kalman filter was used as an example of the application of adaptive digital filtering techniques. It is worth mentioning that for the development of the work and to deepen its study, some tasks were programmed in real-time, using for this purpose a real-time operating system. The reconstruction reported in the manuscript was validated according to the following criteria: • Mean square error analysis. • Probability moment analysis • Probability distribution analysis Since the context of the manuscript concerns the aforementioned topic, it is proposed that the study of computational time complexity be carried out as future work. However, it should be noted that this approach could be developed according to the previous work developed by the authors of this paper cited in this manuscript [15].   Noise associated with the input system W k Noise associated with the output system G k+1 Prediction of the system internal statê X k Estimated states vector K k Kalman gain J k+1 Covariance matrix of states identification R k+1 Covariance matrix of noise associated with output system P k+1 Covariance matrix of identification error Q k Covariance matrix of noise associated with input system G(s) Unstable first-order system transfer function β Parameter of the numerator transfer function α Parameter of the denominator transfer function y k Unstable first-order system output T Unstable first-order system sampling period u k−1 Unstable first-order system input τ Unstable first-order system constant time T s Real-time task deadline d s1,k Sub-deadline for the secondary RTT programmed for reception of data d s2,k Sub-deadline for the secondary RTT programmed for transmission of data Kp Proportional gain Q T C,k Temporary covariance of input noise for communication time Q c,k Temporary covariance of input noise for execution time Q Tx,k Temporary covariance of input noise for transmission time Q Rx,k Temporary covariance of input noise for reception time R T C,k Temporary covariance of output noise for communication time R c,k Temporary covariance of output noise for execution time R Tx,k Temporary covariance of output noise for transmission time R Rx,k Temporary covariance of output noise for reception time P T C,k Covariance of identification error for communication time P c,k Covariance of identification error for execution time P Tx,k Covariance of identification error for transmission time P Rx,k Covariance of identification error for reception time E{T C,k } First order moment of probability for communication time E{T c,k } First order moment of probability for execution time E{T Tx,k } First order moment of probability for transmission time E{T Rx,k } First order moment of probability for reception time E{T C,k } 2 Second order moment of probability for communication time E{T c,k } 2 Second order moment of probability for execution time E{T Tx,k } 2 Second order moment of probability for transmission time E{T Rx,k } 2 Second order moment of probability for reception time e T C,k Error for communication time H T C,k Mean squared error between T C,k andT C,k H c,k Mean squared error between T c,k andT c,k H Tx,k Mean squared error between T Tx,k andT Tx,k H Rx,k Mean squared error between T Rx,k andT Rx,k