1. Introduction
Time synchronization is a critical issue and a necessary condition in most of the distributed systems including industrial Internet of Things [
1,
2,
3], communication systems [
4], localization systems [
5,
6], smart grids [
7], data acquisition [
8], time-sensitive networking [
9,
10], and control systems [
11,
12]. In particular, precise time synchronization is crucial for efficient energy management in campus energy internet systems. Accurate time synchronization ensures that energy resources are managed optimally, reducing waste and improving overall system efficiency. In recent years, wireless sensor networks (WSNs) have been employed in IoT, making time synchronization in WSNs an exceedingly popular topic. Due to the distributed and energy-constrained nature of WSNs, the node’s capability for communication is limited. Moreover, the topology of these wireless networks is too dynamic. Therefore, the time synchronization problem remains an inherent challenge in WSNs.
In the literature, accuracy, energy-efficiency, scalability, robustness, and convergence rate are commonly used as the performance metrics for the WSN time synchronization algorithm. However, it is difficult for the time synchronization algorithm to optimize all of these performance metrics simultaneously. For instance, centralized or clustered time synchronization algorithms, e.g., RBS [
13], CESP [
14], and cluster-based approaches [
15,
16] focus on the improvement of accuracy and energy-efficiency while ignoring scalability and robustness. To overcome such ignored performance, flooding time synchronization approaches have been introduced, e.g., FTSP [
17], FCSA [
18], PulseSync [
19], PISync [
20], and RMTS [
21,
22]; however, the topological changes still pose challenges to the robustness of the time synchronization in dynamic WSNs. In consensus-based methods [
23], e.g., ATS [
24], MTS [
25], GTSP [
26], MACTS [
27], and DCTS [
28], the scalability and the robustness of time synchronization are greatly improved compared to any other algorithms, while the convergence rate is much slower than the flooding approach [
29,
30].
In addition, the existing time synchronization algorithms employ a fixed structure and presupposed operating mechanism. This is a bottleneck of the algorithm to optimize the performance in real time, serving as a critical metric for synchronous convergence. According to the experimental results in [
20,
21,
22,
27], it can be found that the performance of time synchronization algorithms highly depends on the topology. For instance, the accuracy of flooding time synchronization mainly depends on the diameter of WSNs, and the density of a network will affect its robustness. Thus, the accuracy and convergence rate of consensus-based time synchronization are affected by the shape and density of the network.
1.1. Challenge Analysis
We observe that the performance of existing methods may not be consistent in randomly deployed and large-scale WSN applications, and the major challenges are as follows.
- (1)
The performance highly depends on the shape of the network topology. There are specific requirements for the shape of the network to achieve better performance. For instance, the average consensus approach (e.g., ATS, MACTS) can meet better performance targets in grid networks than in line networks; the flooding approach (e.g., FTSP, PulseSync, and RMTS) can set up time synchronization faster than average consensus in line networks, while it has no significant advantage in grid networks.
- (2)
The performance cannot be estimated in real time. Specifically, the time synchronization algorithm cannot evaluate the synchronization status of networks, and the algorithm cannot repair the time synchronization performance once the shape of the network is changed. Considering the average consensus approach, once the network shape evolves from a grid to line, then the performance will be significantly reduced.
- (3)
The synchronization parameters, e.g., synchronization time interval and coefficient, are always fixed values, and the parameters must be configured before the deployment of the time synchronization algorithm. Thus, setting the right parameters for a randomly deployed network can be difficult, and the network cannot reset the parameters to meet the changes of the topology.
Therefore, developing a novel time synchronization algorithm which can achieve consistent performance in different shapes of network topology will be very valuable. Thus, the time synchronization algorithm should be an adaptive approach, as shown in
Figure 1.
There are two components in an adaptive approach: synchronization status estimation and adaptation. The algorithm first estimates the synchronization status, including synchronization errors and convergence status. Then, it adjusts the synchronization parameters to match the shape of the topology.
1.2. Motivation and Contributions
In this paper, we are interested in synchronization status estimation, focus on convergence detection based on synchronization error estimation, and propose adaptive real-time convergence estimation (ARCE) to provide a reference for future studies on adaptive time synchronization.
Synchronization error is a key parameter for evaluating the performance of a time synchronization algorithm, commonly used to indicate the accuracy of the algorithm. Similarly, to analyze the convergence of time synchronization, a threshold of synchronization error is used to detect the convergence time [
24,
27]. Furthermore, changes in synchronization error are used to describe the scalability and robustness of an algorithm after interference occurs [
24,
25]. In a previous study on MACTS [
27], to reduce by-hop error accumulation and communication costs caused by time information forwarding, a simple convergence estimation based on synchronization error estimation was used to drive the multi-hop controller of MACTS. As a result, MACTS can achieve a fast convergence rate with few communication increments.
Based on the analysis of existing time synchronization algorithms, it can be found that synchronization errors show significant differences before and after convergence, and the convergence of time synchronization can be summarized as two phases, i.e., setup and hold-on. At the hold-on phase, time synchronization is convergent, where the synchronization errors are stable random variables with a constant mean in the time interval. Therefore, the proposed ARCE is developed based on a synchronization characteristic estimator and a convergence probability estimator, and it is evaluated based on flooding and average consensus-based time synchronization algorithms, separately. Also, the implications of ARCE for the average consensus time synchronization algorithm (MACTS) are discussed.
The following aspects of ARCE are noteworthy:
The proposed ARCE uses clock offset estimation of the time synchronization algorithm to indicate instantaneous local synchronization errors and estimates the convergence time of synchronization errors in real time.
It can detect a sudden change in local synchronization errors and indicates the out-of-synchronization status of local network, where a significant clock offset estimation may be ignored in the time synchronization algorithm based on one-way broadcast [
21]. Hence, ARCE is beneficial for accurate clock parameter estimation.
It is a self-adaptive and real-time convergence detector which can adapt to changes in random variable delay and the environment. Meanwhile, it can start based on a loose initial condition.
Therefore, the proposed ARCE can be simply embedded into a time synchronization algorithm in which clock offset estimation is employed and can be deployed without any prior experimental results. Considering large-scale and randomly deployed WSNs, ARCE is easy to implement and improves the robustness of distributed time synchronization approaches.
1.3. Organization
The remainder of this paper is organized as follows. We present the system model in
Section 2 and analyze the synchronization error in
Section 3. ARCE is presented and analyzed in
Section 4. The evaluation of ARCE is shown in
Section 5. The implications are analyzed in
Section 6. Finally, conclusions are drawn in
Section 7.
2. System Model
The WSN is modeled as a graph , where represents the nodes of the WSN and defines the available communication links. The set of neighbors for is , where nodes and belong to , and .
2.1. Clock Model
For the time synchronization algorithm, we define the hardware clock notion
as
where
is the hardware frequency, i.e., clock speed, of the clock. The parameter
is an inherent attribute of the crystal oscillator and cannot be changed. Every node considers itself to have the ideal clock frequency (i.e., nominal frequency); thus,
is fixed to a hardware clock, i.e.,
. Considering the time synchronization in WSNs, a timer that is commonly used as a hardware clock generator counts the number of pulses in the crystal oscillator.
The
logical clock is given by
where
is a logical relative clock rate multiplier and initialized as 1. To counteract the effect of clock skew, a time synchronization algorithm continuously adjusts
to speed up or slow down the local
. The parameter
is used to supply the global time service for synchronization applications in WSNs. Variable
is the moment that the node is powered on, and parameter
is the initial relative clock offset. We further describe the updated model of
as
where
and
are the relative clock offset and relative clock rate between arbitrary nodes
and
, respectively.
Now, the parameters
and
in (
3) are expressed as
where
is a reference node. In addition, the relative clock offset estimation, denoted as
, is calculated by real-time timestamps of
. Additionally, we estimate the relative clock rate by the real-time timestamp of
.
2.2. Sync-Error Model
- (1)
Local synchronization error. The synchronization error between two adjacent nodes is denoted as local synchronization error and is expressed as
where node
, and
is the neighbor of
.
- (2)
Global synchronization error. This is used to describe the synchronization error between an arbitrary pair of nodes in
and is expressed as
where
and
are not necessarily adjacent nodes.
2.3. Convergence Time
According to the existing study, convergence status is defined as the moment that the sync error is below the preset threshold. Specifically, the convergence time is calculated off-line based on the measured synchronization error. Here,
is defined as convergence time, and it is given by
where
is the presupposed synchronization error threshold. By using
or
in Equation (
8),
indicates the local and global convergence status, respectively.
3. Synchronization Error
According to (
3), substituting Equation (
3) into Equations (
6) and (
7) leads to the conclusion that parameter
E in (
6) and (
7) highly depends on
and
. Thus, the clock parameter estimations
and
are the key issues for the time synchronization algorithm, and the changes in sync error are mainly caused by estimation errors. In other words, it is reasonable to analyze sync error by using
and
.
3.1. Analysis on Sync Error
Estimation error is unavoidable in clock parameter estimation due to the latency of timestamp creation and message exchange. Most time synchronization algorithms use periodic re-synchronization to counteract clock drift. Considering a pair of adjacent nodes
and
, the sync error is given by
where
T is the re-synchronization interval of the time synchronization; parameter
, which includes the delay D, is the estimation error of clock offset estimation, i.e.,
; and parameter
is the estimation error of clock skew estimation, i.e.,
.
Clock skew estimation error : This error highly depends on the distribution of delay. Specifically, the bound of most of the proposed clock skew based on Gaussian delay is a proportional function of
. For instance, in [
31,
32],
is given by a delay-independent function, where the standard deviation of delay plays a major role.
Clock offset estimation error : According to [
21],
is totally dependent on the variable delay
D. For instance, in the time synchronization approaches based on the one-way broadcast model,
is given by
In addition, for the two-way message exchange model-based protocol, we write
where
and
are the
uplink and
downlink delay, respectively.
Actual variable delay D: As the analysis in [
17], the distribution of
D highly depends on the implementation of timestamp creation, and the typical delay varies across different testbeds. Most existing clock parameter maximum likelihood estimation methods use a distribution function to model
D. Specifically, Gaussian and exponential distributions are the most commonly used delay models. According to the experimental results in [
33], the main portion of actual delay is Gaussian, i.e.,
, where
µs and
.
In light of the above discussion,
is Gaussian and depends on the distribution of
D. According to (
9), if
and
t are small enough, the formula
. In addition, as discussed in [
33], if
is smaller than the clock resolution (granularity), its effect on synchronization accuracy can be ignored.
3.2. Actual Sync Error
In this part, we analyze
based on experimental results of FTSP, PulseSync, FCSA, PISync, RMTS, ATS, and MACTS, some of which have been reported in [
21,
22,
27]. Therefore, some of the experimental results are used to analyze the convergence of the corresponding algorithm.
Actual sync error: The instantaneous
and
of ATS, MACTS, FloodPISync, and RMTS are shown in
Figure 2. It is clear that most of the experimental results can be divided into two phases, i.e., the
setup and the
hold-on. At the
setup phase, network-wide time synchronization has not been established; thus, the sync error is unstable and shows a decreasing trend. During the
hold-on phase, the sync error is almost stable, and network-wide time synchronization has been achieved.
Therefore, we determine that the time synchronization has locally converged when the local sync error is in the
hold-on region. It is clear that the local sync error in the
hold-on region is a wide stationary random sequence. Specifically, as shown in
Table 1, the mean is constant and the autocorrelation is independent of the start time.
4. Proposed ARCE
Based on the distribution of the sync error, the proposed ARCE detector is developed and shown in
Figure 3, where a sync-error characteristic estimator and a convergence probability estimator are designed for feedback. Considering a real WSN, it is impossible to estimate the global sync error at a local node due to the multi-hop topology of the network. However, it is easy to obtain the local sync-error estimations by using pairs of timestamps that are generated by adjacent (or multi-hop) nodes.
ARCE uses the local sync-error estimate as an input parameter; represents the time required for the k-th synchronization, where k is the synchronization count. Thus, it is an approach to detect local convergence. The output of ARCE is a probability estimation, i.e., . Using the parameter , the time synchronization algorithm can estimate the convergence state of the local network in real time.
The sync-error characteristic estimator is a model that estimates sync error. It is driven by the convergence probability. It is employed to calculate the statistical characteristic of sync error, i.e., the mean and standard deviation . The first-in first-out (FIFO) buffer is used to store the convergent sync-error observations, i.e., error-buffer unit (EU). In addition, the convergence probability drives the estimator to update the EU. That is, will be injected into the EU only if . Therefore, the sync error in the EU is the observation after which the time synchronization has converged.
The convergence probability estimator is composed of three parts, i.e., a sync-error discrimination unit (SeDu), probability-buffer unit (PU), and calculator. The convergence process of local sync error is divided into three phases, i.e., setup, transition, and hold-on. Then, the SeDU is designed as a piece-wise function, and parameter out is the convergence weight for the observation . In addition, the FIFO PU is employed to store out for its corresponding observation , and the dynamic array that is used to calculate will be filled with 0, , and 1. Here, represents the cumulative value of single-word convergence; the smaller the , the greater the convergence delay of ARCE, and vice versa.
4.1. Real-Time Local Sync-Error Estimation
According to the existing time synchronization algorithm, the clock parameter estimations and the sync-error estimations are both calculated based on pairs of instantaneous timestamps. For instance, timestamps of are used to calculate , and timestamps of are used to estimate . For ease of implementation, relative clock offset estimation is employed to estimate in ARCE.
Considering nodes
and
, relative clock offset estimation
based on the one-way broadcast model is given by
where delay
D is assumed to follow a Gaussian exponential distribution. According to the local sync-error model in (
6), (
12) can be rewritten as
where
is the sync error for
and
.
Therefore, a local sync-error estimation for nodes
and
is given by
where
and
are a pair of timestamps. Note that the estimation error of
is mainly composed of
D, which is equivalent to (
10). In addition, it is equivalent to (
11) in the time synchronization algorithm based on the two-way message exchange model. The value
represents
at time
.
4.2. Implementation of ARCE Algorithm
According to
Figure 3, the pseudo-code of ARCE is presented in Algorithm 1. Parameters
,
,
,
, and
are initialized to a non-zero constant; meanwhile,
out,
, FIFO EU, and PU are initialized to zero.
Algorithm 1 The pseudo-code of the ARCE algorithm. |
˙Initialization: |
Set Emax, , , α, and PT |
Clear out, , FIFO EU and PU |
˙Upon Receving : |
Calculate (, , , Emax, a) →out |
Update FIFO, out →PU |
generate PU→ |
˙Upon ≥ PT and out > 0: |
Update FIFO, →EU |
Update characteristic parameters, EU→ (, ) |
Parameter
is a threshold for the
transition phase of the time synchronization algorithm. Parameter
is set based on the experience of the accuracy of the time synchronization algorithm and the granularity of the clock source. For instance, if the accuracy of the time synchronization algorithm is about
N ticks of the clock source, then
can be set to
ticks, e.g., 200 µs. In addition,
can be updated in real time by using
and
, given by
where
and
. In the following experiments and simulations,
and
are set to 2 and 3, respectively.
The initial values of parameters
and
can be set to be a little greater than the values of the prior experimental results. For instance, according to prior experimental results, shown in
Table 1,
and
for RMTS can be initialized to 5 µs and 2 µs, respectively. In addition,
and
are the convergence decision coefficients. Specifically, there is a loose convergence if
or
, and the reliability and stability of
and
will decrease, while the convergence decision rate will increase. In contrast, it is a strict convergence if
or
, which leads to an opposite trend of changes in
and
. Thus, to set appropriate
and
, the convergence characteristics of the time synchronization algorithm should be considered. For instance, according to the fluctuation of sync error shown in
Figure 2, a greater value of
is suitable for RMTS, PulseSync, and PulsePISync, while a smaller value is suitable for ATS, FCSA, and MACTS.
The weight parameter
out is calculated based on the piece-wise function that is indicated in
Figure 3 (Algorithm 1, Line 1). By using the updated weight array PU, the
is expressed as
where
is the depth of the FIFO PU. In addition, the depths of the PU and EU are related to the convergence rate and the smoothness of
, respectively. A smaller depth of the PU leads to faster convergence for
, and a greater depth of the EU leads to smooth
. Thus, the FIFO can be used to balance the rate and reliability of convergence decisions in ARCE by changing the depth.
5. Performance Evaluation
To evaluate the proposed ARCE, a prototype system is built with 9 Synchronous Sensing Wireless Sensor (SSWS) nodes that have been described in detail in [
21,
27]. Specifically, a line topology testbed is used to run ARCE on flooding time synchronization algorithms, e.g., FTSP, FCSA, PulseSync, FloodPISync, PulsePISync, and RMTS; one testbed of grid (
) is employed to evaluate ARCE on average consensus approaches, e.g., ATS and MACTS. In addition, the employed sync-error measurement is similar to the one [
17,
18,
19,
21,
27,
33] used, which has been discussed in [
21,
33].
According to the existing study, a threshold is employed to find the convergence time of the synchronization error [
18,
24,
27], while no common method to detect the convergence state has been proposed. To calculate the estimation error, experiments are designed for off-line ARCE and on-line ARCE, respectively.
Off-line ARCE, in which the input of ARCE () is the measuring results for synchronization error, and the results for ARCE are calculated off-line using , i.e., .
On-line ARCE, in which the proposed ARCE is embedded into the employed time synchronization algorithms, and the clock offset estimation
in (
13) is employed as input. The actual experimental results are calculated on-line by using
, i.e.,
. Therefore, the estimation error becomes
where
is calculated using (
8), and the threshold
is set as 20 (µs) for the following experiments.
5.1. Experimental Results
Table 2 summarizes the default parameter settings. The parameter
is updated by (
15). The experimental results are illustrated in
Figure 4 and
Figure 5. Note that RMTS, PulseSync, and PulsePISync are rapid-flooding time synchronization algorithms. In these protocols, all testbed nodes run the synchronization operation at almost the same moment. Thus, they are synchronous time synchronization approaches. However, slow-flooding methods, such as floodPISync, and average consensus methods, such as ATS and MACTS, use an asynchronous approach, where a node runs the synchronization operation based on local time. The
values of on-line and off-line ARCE are highly similar in the synchronous approach and are obviously inconsistent in the asynchronous method.
Considering the flooding approaches, a comparison between synchronous and asynchronous has been discussed carefully in [
21,
22]. The average consensus approaches employ iteration to forward the time information among multi-hop nodes. Hence, the main challenge for an asynchronous method is that the time information error will increase continuously due to the forward wait time and the clock drift.
In addition, the error bars in
Figure 6 show that the asynchronous method indicates a smaller standard deviation than the synchronous one. Basically, by using the synchronous method, time synchronization can be established for all nodes almost at the same moment, and the global synchronization and local synchronization almost converge simultaneously. However, considering the asynchronous algorithms, there are slight differences in the time synchronization convergence time among nodes.
Furthermore, the experimental results of on-line and off-line ARCE are very close to each other. The convergence latency for on-line and off-line ARCE is about 1, 1, 1, 20, 15, and 15 synchronization intervals in RMTS, PulseSync, PulsePISync, FloodPISync, ATS, and MACTS, respectively. Thus, using as input is reasonable for on-line ARCE. The maximal convergence estimation error is about 21 synchronization intervals in FloodPISync. Therefore, the proposed ARCE is realizable and reliable for the comparison of time synchronization algorithms to detect local synchronization convergence.
However, for the distributed and asynchronous time synchronization algorithms, e.g., ATS and MACTS, the convergence time is different between local synchronization and global synchronization. In addition, such differences may increase when the time synchronization algorithm is deployed in more complex networks. Thus, if the presented ARCE is considered to detect the global synchronization convergence of an asynchronous approach, the latency between local and global synchronization convergence should be compensated for.
5.2. When out of Sync
Considering dynamic wireless networks, serious synchronization skew may be caused by changes in topology and environment, e.g., new node joints or communication interference. Specifically, local synchronization error will propagate among multi-hop nodes or even network-wide. Thus, once a large synchronization error is generated at a local node, it will result in a lack of synchronization at that local network. To avoid the spread of synchronization error, it requires neighbors of the node to detect the out-of-synchronization situation.
We evaluate the on-line ARCE based on RMTS and restart a node (
) at 87 min. The experimental results in
Figure 7 are calculated with
. As shown in the middle panel of
Figure 7, the
suddenly increases at the moment that
restarts, then the
of
is reduced and indicates the out-of-synchronization situation (upper panel of
Figure 7). In addition, ARCE also indicates the re-synchronization of
. The lower panel of
Figure 7 shows the
of local synchronization error, where the samples among the region in which
is out of synchronization are removed from the FIFO EU; thus,
is a fixed value in that region.
5.3. Discussion on
According to the above-mentioned experimental results, we observe that the convergence estimation error is highly related to the width of the observation window, i.e., the length of FIFO PU
. Therefore, we evaluate ARCE based on RMTS and set the
as 5, 10, 15, and 20, separately. From the experimental results in
Figure 8, it is clear that the larger
results in higher
. Hence, (a) a smaller value of
can be used to achieve highly sensitive convergence detection and (b) a larger
can be used to design smoother convergence detection.
5.4. Discussion on and
To find the relationship between the parameters
, and the performance of ARCE, a simulation is built based on MACTS. Definition of probability of convergence detection (PCD): Considering the time synchronization as totally convergent, the PCD is the probability of
. Hence, the PCD is used to describe the possibility of ARCE successfully detecting the convergence status. We evaluate ARCE under different delay levels, where the delay is Gaussian with mean 3.3 µs with standard deviations
of 0.0054, 0.054, 0.54, and 5.4, separately. The experimental results for
and
are shown in
Figure 9 and
Figure 10, respectively. We observe that a larger
or a deeper FIFO EU leads to the ARCE being more robust; as a result, ARCE achieves a higher PCD. Therefore, by adjusting either parameter
or
, ARCE can be made more stable and better handle the change in random delay.
6. Implications
Recently, self-adaptability has been considered an important feature of time synchronization algorithms. For instance, PISync uses a proportional–integral controller to compensate for the relative clock rate, and MACTS employs a multi-hop controller to reduce multi-hop communication. However, it is important and difficult to set an appropriate threshold for these controllers, e.g., the maximum synchronization error in the adaptation algorithm of PISync and the maximum local synchronization error in MACTS.
Specifically, as we discussed in detail in [
21,
22,
27,
34], the synchronization error highly depends on the following factors:
- (1)
The accuracy of the clock parameter estimations. The relative clock offset estimation error is a major portion of the synchronization error of a time synchronization algorithm in the setup region. In addition, the relative clock rate estimation error is an important reason for the clock skew of the algorithm in the hold-on region.
- (2)
The random package variable delay. As is well known, delay poses major challenges to accurate clock parameter estimation, and suppression of transmission delay is one of the key techniques to improve the accuracy of time synchronization in existing algorithms.
- (3)
The topology of wireless networks. The diameter and shape of topology severely limit the actual accuracy of time synchronization algorithms, and diameter is a major factor in the bound of time synchronization errors [
35].
Therefore, both increases in delay and changes in topology will cause changes in actual synchronization error. As a result, by using the frequency difference () between the upper and lower bounds of the oscillators to configure in PISync, if the actual synchronization error is always larger than , the time synchronization cannot converge. Considering MACTS, a constant is configured based on prior experimental results; thus, the changes in actual delay may cause convergence detection failure.
6.1. Challenges in MACTS
In this part, a simulation model is built for MACTS. The clock frequency offset is a random variable in the range of
parts per million, and the delay is a random Gaussian variable. We evaluate the changes in synchronization error based on a line topology network, and the simulation of local synchronization is shown in
Figure 11. It is clear that both an increase in the network diameter and delay will significantly increase local synchronization error. Thus, for a randomly deployed wireless network, the unpredictable network topology and delay pose challenges to setting a suitable
for MACTS. Specifically, a larger value of
may lead to slow convergence, while a smaller one may cause failure of the multi-hop controller.
6.2. ARCE-Based MACTS
The presented ARCE is considered to improve the MACTS, which is shown in
Figure 12 and is named ARCE-MACTS. The main difference between MACTS and ARCE-MACTS is the multi-hop controller, where ARCE is used to replace the threshold detection. The output of ARCE is the convergence status of local synchronization error, and the controller reduces or increases the multi-hop number
H based on the output.
Simulations of ARCE-MACTS and MACTS are developed, where a
grid network is employed, and
H is initialized as 3. The parameters are set as
,
,
, and
. The initial values of parameters
and
are 450 (µs) and 80, respectively. The parameter
is calculated using (
15). The means of Gaussian delay are set as 3, 15, 30, 50, and 90 (µs), and the corresponding standard deviations are set as 0.005, 0.05, 0.5, 5, and 15, respectively. The parameter
of MACTS is set as 20 (µs), which was set as 5 (µs) in the above experiments with MACTS.
The convergence detection time (CDT) is summarized in
Table 3, and the maximal global synchronization error bars of simulations are shown in
Figure 13. The results show that MACTS fails to detect the convergence time at a larger delay level. From the results, we see that the multi-hop number
H is always equal to 3 and MACTS never converges to one-hop communication. In addition, the global synchronization error of MACTS is significantly larger than that of ARCE-MACTS. Note that the drawbacks of multi-hop communications for time synchronization, e.g., increased communication collision, by-hop error accumulation, and energy consumption, are studied in [
21,
27].
6.3. Discussion
However, the synchronization error highly depends on the hardware of the implementation, e.g., the granularity of the clock system and the computational accuracy of the processor. In our latest work, we designed a testbed based on FGPA and CC2538, in which the clock system was designed based on FPGA, and the clock granularity was set to 10 ns, i.e., the clock frequency was 100 MHz. Moreover, we extended the GNSS to synchronize mutually independent WSN systems. In this testbed, a reference node of the local network synchronizes itself to the GNSS, and then the network nodes synchronize to this reference. Commonly, the synchronization error of reference nodes to the GNSS is as low as 100 ns; therefore, the synchronization error for different WSNs is much lower. In our existing experimental results, the averaging synchronization error (or synchronization accuracy) for two different WSNs is as low as 0.34 µs, and the average synchronization error (or synchronization accuracy) for the reference (host node) and its neighbor (slave node) is as low as 0.05 µs.
In the current ARCE method, the focus is primarily on a single synchronization source. However, in real-world applications, especially in distributed systems, multiple data sinks or nodes with varying computational and communication capabilities may exist. The ARCE method can be adapted to address these challenges. In multi-sink networks, the method could be extended by enhancing the synchronization algorithm to minimize the time synchronization errors between sinks, ensuring consistency across the entire network. Additionally, in heterogeneous networks, the synchronization strategy can be adjusted based on the capabilities of the nodes. Higher-precision synchronization could be applied to nodes with stronger computational capabilities, while simplified synchronization approaches could be used for nodes with lower capabilities. In this way, the ARCE method can maintain high synchronization accuracy and network efficiency across diverse network environments.
In practice, the ARCE method could also have significant applications in real-world scenarios that require precise synchronization, such as in distributed energy systems like solar panel monitoring. For example, in our experimental setup, we extended the GNSS to synchronize the WSNs, where the synchronization error for reference nodes to the GNSS was as low as 100 ns. With the ARCE method, such high-precision synchronization could ensure synchronized fault detection across multiple devices, thus improving the overall efficiency and reliability of energy management systems. This can be particularly valuable in applications such as distributed solar panel monitoring, where precise synchronization is crucial for detecting and responding to faults across a large, geographically distributed network.
7. Conclusions
In this paper, we have proposed ARCE to detect the convergence status of a time synchronization algorithm in real time, which can be used to develop an adaptive time synchronization algorithm. By using a sync-error discrimination unit and a sync-error characteristic estimator, ARCE generates the convergence probability and the statistical characteristic of synchronization error, respectively. The output of the characteristic estimator is fed back to update the detection condition of synchronization convergence. As a result, ARCE can adapt to changes in delay and be easily deployed without any prior experimental results.
Evaluations are designed for ARCE based on flooding and average consensus time synchronization algorithms, separately, where both synchronous and asynchronous time synchronization approaches are employed. Additionally, the parameter settings and the implications of ARCE are discussed in detail. According to the experimental results and simulations, ARCE can effectively detect the convergence state for all the comparisons. Therefore, ARCE can be used to develop an adaptive time synchronization protocol, which could be robust and scalable for a large-scale and randomly deployed wireless network.