Next Article in Journal
Bulk-Driven CMOS Differential Stages for Ultra-Low-Voltage Ultra-Low-Power Operational Transconductance Amplifiers: A Comparative Analysis
Previous Article in Journal
Study of Wash-Induced Performance Variability in Embroidered Antenna Sensors for Physiological Monitoring
Previous Article in Special Issue
Adaptive Real-Time Convergence Estimation for Enhancing Reliability of Time Synchronization in Distributed Energy Monitoring System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Time Synchronization Hop-Count-Control Algorithm Based on Synchronization Error Convergence Probability Estimation

1
School of Information and Control Engineering, Southwest University of Science and Technology, Mianyang 621010, China
2
School of Electrical Engineering, Chongqing University, Chongqing 400044, China
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(10), 2086; https://doi.org/10.3390/electronics14102086
Submission received: 11 April 2025 / Revised: 16 May 2025 / Accepted: 19 May 2025 / Published: 21 May 2025
(This article belongs to the Special Issue Real-Time Monitoring and Intelligent Control for a Microgrid)

Abstract

:
High-precision time synchronization is regarded as the foundation for ensuring the stable operation of microgrids and for the coordinated sensing, communication, and computing among network devices. In multi-hop wireless sensor networks, it is observed that both the accumulation of synchronization errors and the associated communication overhead are increased with the number of hops; however, in single-hop mode, it is found that the rate of error convergence is insufficient to satisfy the requirements for rapid synchronization. To address these challenges, a hop-control time synchronization algorithm based on the estimation of synchronization error convergence probability is proposed. In the proposed method, the convergence probability of the synchronization error at each node and its rate of change are estimated online, so that the synchronization hop count can be dynamically adjusted: during the synchronization establishment phase, a larger hop count is employed to accelerate error convergence; during the synchronization maintenance phase, the minimal hop count is utilized to maintain long-term high-precision synchronization, thereby ensuring synchronization accuracy and significantly reducing communication overhead. MATLAB simulation results are reported to have demonstrated that the proposed algorithm exhibits marked advantages in convergence speed, synchronization accuracy, and energy consumption as compared to fixed-hop-count and pure single-hop schemes, thereby providing an effective solution for efficient time synchronization in multi-hop wireless sensor networks.

1. Introduction

Traditional Phasor Measurement Unit (PMU) [1,2] technology in microgrids provides rapid synchronized measurements, ensuring stable operation of distribution networks [3,4]. However, in modern microgrids, where the diversity of Distributed Energy Resources (DERs), the integration of Energy Storage Systems (ESSs), and bidirectional energy flows are encountered, system equipment and communication networks are rendered exceptionally complex [5]. Under such circumstances, the application of conventional PMU technology is hindered by high costs, increased system complexity, and its reliance on external precise time sources such as the Global Positioning System (GPS) [6].
In response to these challenges, the introduction of wireless sensor network (WSN) time synchronization technology has been explored by researchers in recent years to address complex network issues and to reduce dependence on GPS technology, thereby alleviating both the economic and technical burdens of system implementation [7]. As time synchronization is regarded as a critical foundational technology for intelligent monitoring and control systems in microgrids, its application scope is considered to include, but is not limited to, real-time monitoring [8] and protection [9], energy management [10], and dispatch [11].
Currently, various time synchronization algorithms in WSNs have been widely investigated and are generally classified into three categories: centralized, semi-distributed, and distributed. Centralized algorithms, such as Reference Broadcast Synchronization (RBS) [12] and Timing-sync Protocol for Sensor Networks (TPSN) [13], are dependent on explicit topology management; however, in microgrid scenarios where nodes are loosely distributed and subject to frequent changes, high topology maintenance costs are incurred. Semi-distributed algorithms, such as the Flooding Time Synchronization Protocol (FTSP) [14], require the utilization of reference nodes rather than full topology management, yet network topology and routing conditions are found to affect their performance. Distributed algorithms, exemplified by Average Time Synchronization (ATS) [15] and Gradient Time Synchronization Protocol (GTSP) [16], do not rely on a fixed topology and are regarded as providing better adaptability and robustness, which facilitates high synchronization accuracy in complex distributed environments; however, a slower convergence speed is often observed with these algorithms.
The ATS algorithm, as a conventional distributed time synchronization method, has been widely applied in WSNs. In this approach, each node periodically averages its own clock with those of neighboring nodes through multiple iterations, thereby obtaining a unified clock. It is characterized by high accuracy and strong robustness; however, in complex networks, its convergence speed is slow, and in linear networks, achieving rapid error convergence within a short period is particularly challenging [17,18]. In contrast, the FTSP algorithm, which is categorized as a semi-distributed time synchronization method, relies on nodes periodically broadcasting local time messages that are subsequently relayed through a virtual hierarchical network to all nodes. The FTSP method is noted for its fast convergence of synchronization error and robust performance; nevertheless, it suffers from deteriorating accuracy as the network diameter increases due to the accumulation of synchronization errors along multi-hop paths [19,20].
It can be observed that various algorithms are affected by the actual network structure and scale in microgrids, with each offering distinct advantages and limitations in terms of synchronization precision, convergence speed, and communication overhead [21,22]. However, in practical applications, network topologies are complex and diverse, and existing time synchronization algorithms are often tailored to a single scenario, thus lacking effective adaptability [23]. The number of hops used for transmitting synchronization information is critical to algorithm performance: multi-hop communication results in behavior similar to FTSP, which achieves rapid convergence but is prone to cumulative errors, while single-hop communication results in behavior akin to ATS, which offers high precision but slow convergence. Therefore, it is necessary to develop a time synchronization algorithm that can autonomously adjust the hop count to suit different synchronization phases and network structures.
The Multi-Hop Average Consistency Time-Sync (MACTS) [24] algorithm is a multi-hop average consistency time synchronization scheme that enhances the network’s algebraic connectivity by establishing virtual links between nodes. It employs a multi-hop controller to balance convergence time, convergence precision, and communication complexity. In MACTS, hop count is adjusted via a preset synchronization error threshold: if the local convergence metric falls below this threshold, the hop count is decreased by one; if it exceeds the threshold, the hop count is increased by one—up to the initially configured maximum.
However, in real-world deployments, selecting an appropriate error threshold in advance is challenging. During the early application of time synchronization methods, users typically lack sufficient knowledge of the network’s topology and characteristics, making a global threshold difficult to set. Moreover, sensor networks vary widely in size, shape, and device specifications, so the precision achievable at each node differs; a single fixed threshold cannot accommodate such heterogeneity. Consequently, controlling hop count solely by a predetermined error threshold has inherent limitations.
In addition, the reliance of MACTS on a fixed initial hop count also poses practical difficulties. Under its control strategy, when the local synchronization error exceeds the preset threshold, the hop count increases—but cannot surpass the initial value, which thus becomes the algorithm’s maximum. In networks with random node numbers, densities, or topologies, it is impractical to choose a one-size-fits-all maximum hop count, further limiting adaptability for MACTS.
To address these issues, this paper integrates the Adaptive Real-time Convergence Estimation (ARCE) [25] algorithm to propose a hop-control time synchronization (HCTS) algorithm based on the estimated probability of synchronization error convergence. Our method continuously estimates the network’s convergence state from instantaneous synchronization errors and dynamically adjusts each node’s hop count according to this real-time convergence probability.
During the time synchronization establishment phase, the HCTS algorithm employs a multi-hop information transmission mode so that synchronization information is rapidly forwarded, thereby achieving rapid preliminary error convergence across all network nodes. After synchronization convergence has been achieved, the algorithm transitions into the synchronization maintenance phase, during which the hop count is gradually reduced as the system shifts to a single-hop time synchronization framework. This transition is intended to reduce synchronization overhead and achieve higher synchronization precision.
It is worth noting that the MACTS algorithm adjusts hop counts using a pre-defined synchronization error threshold; however, in dynamic or heterogeneous networks, a fixed threshold often fails to accommodate real-time error variations across nodes, resulting in suboptimal performance. In contrast, the HCTS algorithm proposed herein incorporates an online estimation of the synchronization error convergence probability and its rate of change, enabling real-time hop-count adjustments for finer-grained control of the synchronization process. This probability-driven mechanism not only accelerates error convergence and enhances synchronization accuracy, but also endows the algorithm with greater robustness and applicability in sensor networks exhibiting diverse accuracies, topologies, and node characteristics.
MATLAB simulations demonstrate that the algorithm jointly adjusts node hop count based on synchronization error convergence probability and its rate of change, improving synchronization precision and convergence speed while reducing communication overhead.
This article is organized into five sections. Section 1 is the introduction. Section 2 presents the system model, which defines the key components and parameters used in the proposed algorithm. Section 3 describes the algorithm design, including the ARCE convergence probability estimation and the hop-control mechanism. Section 4 reports the experimental simulation results, analyzing the synchronization error, hop control, and overall algorithm performance. Finally, Section 5 discusses the paper and concludes it.

2. System Model

The WSN is modeled as ψ = ( V , ε ) , where the node is defined as V = { 1 , , N } . ψ is a collection of ε edges, ε { ( i , j ) : i , j V } , because it is an undirected graph ψ . ( i , j ) refers to the edge connections between nodes v i and v j , which can communicate with each other. We define the set of neighbors of node v i V as N i = { v i V : { i , j } ε } .

2.1. Clock Model

The wireless sensor node controls the clock running rate with the counter and provides the clock source with the crystal oscillator. The nominal frequency of the crystal oscillator is expressed by f, while the actual frequency is expressed by f i . In the clock model of the time synchronization algorithm, there are two types of clock: a hardware clock and logical clock. The mathematical model of the hardware clock is expressed as
H ( t ) = 0 t h ( τ ) d τ
In Equation (1), h ( τ ) is the hardware frequency (clock speed) of the clock source and the inherent property of the crystal oscillator.
The mathematical model of logical clock is expressed as
L ( t ) = φ ( t ) × H ( t ) + θ ( t 0 )
In Equation (2), φ ( t ) is the logical relative clock frequency multiplier, θ ( t 0 ) is the initial relative clock offset, and L ( t ) provides the global time service for synchronization applications in WSNs. We can further write the updated model of L ( t ) as
L + ( t ) = L ( τ ) + ( H ( t ) H ( τ ) ) × φ i j + θ i j , ( t > τ )
where φ i j and θ i j are the relative clock offset and relative clock rate between any node v i and v j , respectively. The two are respectively obtained by the following formulas:
φ i j = H j ( t ) H j ( t τ ) H i ( t ) H i ( t τ ) , τ > 0
θ i j = L j ( t ) L i ( t )

2.2. Error Model

(1) Local synchronization error. The synchronization error between two adjacent nodes is called local synchronization error and is expressed as
E l ( t ) = sup i , j N i { L i ( t ) L j ( t ) }
where nodes v i and v j are neighbors.
(2) Global synchronization error. The global synchronization error is used to describe the synchronization error between any node pair, expressed as
E g ( t ) = sup i , j N i { L i ( t ) L j ( t ) }
where nodes v i and v j are not necessarily neighbors.

3. Implementation of HCTS

The HCTS can be divided into two main parts: the ARCE convergence probability estimation component and the step control component. The design flowchart is shown in Figure 1.
In the ARCE convergence probability estimation section, the synchronous error estimate is E l ( k ) , obtained through the calculation of pairs of instantaneous timestamps with the ARCE algorithm, the statistical error μ , the standard deviation of average σ , and computation and filtering of convergence probability estimates of the current output node  P ^ c .
The control section contains three modules: (1) The synchronization information processing unit: This unit achieves convergence in the probability estimate P ^ c , using Exponentially Weighted Moving Average (EWMA) filter processing to obtain P ^ E . At the same time, the synchronous counter value M of the synchronization algorithm needs to be obtained. (2) Hop adjustment information processing unit: This unit computes the convergence-probability variation rate δ based on P ^ E and M obtained from the preceding unit, and then incorporates P ^ E , M, and δ into the hop information matrix. (3) Hop adjustment unit: In this unit, error rate of change in the δ and the error convergence probability P ^ E jointly determine the node hop to adjust. We need to compare the size of the convergence probability bound value ξ and P ^ E , the size of the error probability in the convergence rate analysis of the current convergence situation, and then adjust and make the hop. After the new hop number is obtained, the new hop number is fed back to the time synchronization algorithm, and a new synchronization error is estimated to start a new cycle.

3.1. ARCE Algorithm

In this work, synchronization errors in the HCTS algorithm are treated by the ARCE algorithm. The local synchronous error estimate E l ( k ) is used as an input function to detect local convergence states, and, after being processed by a buffer unit, the convergence probability estimate P ^ c is generated.
(1)
Convergence probability estimation
ARCE obtains the local synchronization error estimation E l ( k ) by paired timestamps, and calculates the mean value of error μ and standard deviation σ by the synchronization error characteristic estimator after multiple statistics. At the same time, E l ( k ) is used as the input value, and the convergence probability value out is output by a three-stage function.
o u t = 0 , if E l ( k ) > E max a , if E max E l ( k ) μ + 3 σ 1 , if E l ( k ) < μ + 3 σ
In Equation (8), E max represents the synchronization error threshold of the transition stage. By comparing the above equation, the error can be divided into three states: when the synchronization error estimate is greater than the maximum threshold, the output convergence probability is 0, which is not convergence. When the synchronization error estimation between the maximum threshold value and effective value is obtained, with an output convergence probability of a, considered the transition state, the a ( 0 , 1 ) . When the synchronization error estimate is less than the effective value, the output convergence probability is 1, indicating that the error has converged. In addition, a is the convergence–decision coefficient. When a 1 , convergence is loose: the reliability and stability of μ and σ decrease, while the convergence–decision rate increases. Conversely, when a 0 , convergence is strict, and μ and σ exhibit the opposite behavior. Therefore, when selecting an appropriate a, one must consider the convergence characteristics of the time synchronization algorithm.
The parameter E max is a threshold for the transition phase of the time synchronization algorithm. The parameter E max is set based on 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 E max can be set to m × N ( m > 1 ) ticks, e.g., 200 µs. In addition, E max can be updated in real time by using μ and σ , and is given by
E max = ρ μ + β σ ,
where ρ > 1 and β > 1 . In the following experiments and simulations, ρ and β are set to 2 and 3, respectively.
With each time synchronization, the mean value μ and standard deviation σ of synchronization error will change due to the input of new data. Therefore, the existing mean value μ and standard deviation σ need to be fed back to the synchronization error characteristic estimator for updating.
(2)
Buffer unit PU
Every time the convergence probability estimator completes an E l [ k ] convergence probability estimation, its output estimate is entered into the buffer PU cache. A first-in first-out storage unit with length L p is defined to store the convergence probability estimate of the output.
(3)
Convergence probability calculation
The convergence probability of the current time synchronization error is calculated by using a sample set in the buffer. A weighted average filter is used with the number of weighted coefficients L p .
P ^ c = P U L p
P ^ c is the error convergence probability, and L p is the depth of the PU, which can be understood as a buffer unit. L p values will affect the P ^ c convergence rate and smoothness. The smaller the depth of the PU, P ^ c , the faster the convergence speed. The greater the depth of the PU, P ^ c , the slower the convergence speed, but the more stable. Therefore, depth can be set according to the requirements of different smoothness and sensitivity values in application.

3.2. Hop Control

In a multi-hop network, with an increase in the number of hops, the following situations will occur: First, the cumulative error on the multi-hop path will increase. Second, the amount of information will increase. Third, the probability of information collision will increase. Therefore, when the errors of the time synchronization algorithm have converged, reducing the hops of information transmission without affecting the convergence will greatly improve the above cases.
To overcome the above problems, a multi-hop controller is designed in this paper, as shown in Figure 2. The controller is divided into a synchronization information processing unit, a hop adjustment information processing unit, and a hop adjustment unit.
(1)
Synchronize the information processing unit
The synchronization information processing unit comprises three components: the ARCE algorithm, an EWMA filter, and a time synchronization acquisition module. First, the ARCE algorithm computes the error convergence probability P ^ c . This probability is then smoothed by an EWMA filter to estimate and stabilize network state parameters, eliminating short-term fluctuations. Its formula is as follows:
P ^ E ( t ) = λ Y ( t ) + ( 1 λ ) P ^ c ( t 1 ) , t = 1 , 2 , , L p
In the equation for P ^ E ( t ) time estimates, λ is the smoothing factor, that is, the weight coefficient of the historical measurement value; Y ( t ) is the t time measured value (in this article, the t moment convergence probability is an estimate of P ^ c ). The closer the value of λ is to 1, the lower the weight of the previous measured value, and the stronger the timeliness of the algorithm is. On the other hand, the size of λ can also reflect the ability of the algorithm to absorb instantaneous emergencies. The smaller the value of λ , the stronger the stationarity.
The synchronization information processing unit also needs to obtain the synchronization count value M of the time synchronization algorithm. The first synchronization refers to the number of synchronizations from the first count. If it is the synchronization after the hops were adjusted, it refers to the number of synchronization counts since the hops were adjusted.
(2)
Hop adjustment information processing unit
After filtering, the convergence probability P ^ E corresponds to a synchronous M, calculated with synchronous frequency, which increases convergence probability and the rate of change of δ . The formula is as follows:
δ a b = P ^ E b P ^ E a M b M a
In Equation (11), a and b indicate the number of time synchronizations, and b > a . δ a b refers to the change rate of error convergence probability between the A-th synchronization and the B-th synchronization, which can be understood as the first derivative of error convergence change during the two synchronizations. When δ a b 0 , the probability of error convergence increases during the two synchronization periods of a and b. When δ a b < 0 , the probability of error convergence is in a declining trend during the two synchronization periods of a and b. The probability of convergence rate δ a b , synchronous number M, and convergence probability estimate P ^ c being in the hop adjustment coefficient matrix is shown in Table 1.
(3)
Hop adjustment unit
Adjusting hops by the error probability of convergence rate is the main task of the hop adjustment unit. δ and error convergence probability P ^ E jointly determine the node hop to adjust. This unit accepts as inputs the filtered error-convergence probability estimate P ^ E and its rate of change δ , and produces one of three control actions: “reduce hops,” “maintain hops,” or “increase hops.”
The parameter ξ is set to the convergent probability judgment limit, where ξ ( 0 , 1 ) . The limit value here can be adjusted flexibly with the required probabilistic judgment rigor, and the closer ξ is to 1, the higher the requirement of convergence probability. η is a regulating factor whose value is jointly determined by (i) the comparison between the filtered error-convergence probability estimate P ^ E and the threshold ξ , and (ii) the rate of change δ of the error-convergence probability. The resulting η is then used to adjust the hop count. Specific judgment methods are as follows:
η = 1 , P ^ E ξ , δ 0 , 0 , P ^ E ξ , δ < 0 , 0 , P ^ E < ξ , δ 0 , 1 , P ^ E < ξ , δ < 0 .
When P ^ E is greater than or equal to the specified convergence probability judgment limit value ξ , and the change rate of δ is greater than or equal to 0, it can be judged that the probability of error convergence at this time reaches the specified threshold and increases. Therefore, we assign −1 to the adjustment coefficient η , indicating that the node hops can be reduced by one hop.
Whether P ^ E is greater than or equal to ξ is deduced, and the rate of change in δ is less than 0, although convergence probability indicates that the threshold rate has dropped so it has not achieved stable convergence. The adjustment coefficient η is set to 0, indicating that the number of hops remains unchanged.
When P ^ E less than ξ is deduced and the rate of change in the δ is greater than or equal to 0, although the probability rate is rising, the convergence probability still fails to reach the specified threshold; therefore, 0 is assigned to η to maintain the original jump number.
When P ^ E is less than ξ and the rate of change in δ is less than 0, we can judge that the convergence of probability does not meet the prescribed threshold and continues to decline; therefore, assigning 1 to η means that the number of node hops should increase by 1.
After adjusting the hop number, the adjusted hop number is fed back to the original time synchronization algorithm, related steps of time synchronization are re-performed to obtain new synchronization information, and then a new round of hop number adjustment is carried out. Under ideal conditions, all nodes can converge to one hop after adjusting the number of round hops.
The pseudo-code of HCTS is presented in Algorithm 1. After the broadcast task is triggered, it immediately begins to send time information packets H i ( t ) , L i ( t ) , φ i , H to neighboring nodes, which includes establishing two sets of time series H i ( t ) and L i ( t ) during the broadcast phase, relative to clock drift φ i and the current running hop count of the node H. After the convergence rate estimation and parameter control calculation described above, the hop count of the new node undergoes a new round of time synchronization.
Algorithm 1: The pseudo-code of HCTS algorithm. The reference nodes are denoted as R, and the node under consideration is i V .
 1 
Initialization:
 2 
   Set φ i = 1 , φ i j = 1 , θ i j = 0 , H = 5
 3 
   Set H i , old = 0 , H j , old = 0
 4 
   Set periodic task to broadcast, periodic task is set as B
 5 
When periodic task is broadcast:
 6 
   Broadcast H i ( t ) , L i ( t ) , φ i , H
 7 
Receive synchronization message H j ( t ) , L j ( t ) , φ j , H :
 8 
   Store received data: H i ( t ) , H j ( t ) , L i ( t ) , L j ( t ) , φ j
 9 
   Compute φ i j , θ i j , E l ( k ) , μ , σ
10 
 Compute P ^ C , P ^ E , γ , δ
11 
 Update φ i φ i j , φ i j , H

4. Experimental Simulation

In order to evaluate the performance of the proposed algorithm, all simulations were conducted on the MATLAB (R2016a) platform. The experimental design and subsequent result analyses were focused on three key metrics: synchronization error, hop count, and overall algorithmic performance. To ensure statistical significance and result stability, extensive repeated simulations were performed, with each configuration executed no fewer than 500 times. Statistical results were obtained from these simulation runs.

4.1. Error Analysis

In the grid network, the WSN was set as a 5 × 5 grid with a total of 25 nodes, and the diameter of the network was 8. We set 50 time synchronizations in one round of simulation, and each time synchronization period was 30 s. We collected statistics on local synchronization errors and global synchronization errors, and the results are presented in Figure 3.
Local synchronization error: In this simulation, the variation curve of the local synchronization error, E l , for all nodes in the WSN was obtained. With an increasing number of synchronization events, M, the local synchronization error of each node was gradually reduced. Local error convergence was achieved for all nodes after the third synchronization cycle, with the convergence error remaining within 6 microseconds.
Global synchronization error: The variation trend of the global synchronization error, E g , was found to be similar to that of the local synchronization error. Global error convergence was observed for all nodes between the 19th and 21st synchronization cycles, with the global error converging within 9 microseconds.

4.2. Hop-Control Analysis

This algorithm controls the hop count on the premise of achieving error convergence, and increases and decreases the hop count by estimating the convergence probability and statistics of the change rate of the time synchronization algorithm, so as to achieve an adaptive hop count.
In this experiment, the initial hop number of nodes in the 10 × 10 grid network is set to 7 hops, and the threshold value of parameter convergence probability judgment ξ is 0.9 (the closer ξ to 1, the higher the requirement of convergence probability), and the probability change rate δ is calculated. By comparison results from P ^ E and ξ and the factor of the comparison results, the error rate δ is used to adjust the hop. After synchronization convergence is achieved, the convergence probability approaches 1; a smaller rate of change at this point indicates a smoother convergence. Furthermore, the hop-count adjustment mechanism will progressively reduce the number of synchronization hops—ultimately decreasing to a single hop—thereby minimizing the overhead associated with multi-hop synchronization.
Figure 4 is an example of an arbitrarily selected node in the network. The effect of the rate of change and the probability of convergence on the change of node hops can be observed. When the convergence probability is greater than 0.9 and the change rate is greater than 0, the hop count decreases by one hop. When the convergence probability is less than 0.9 and the change rate is less than 0, the hop count increases by one hop. When the probability of convergence is greater than 0.9 but the rate of change is less than 0, or when the probability of convergence is less than 0.9 but the rate of change is greater than 0, the number node hops remains the same.
In order to observe the hop number change of all nodes in the whole network, we calculate the hop number change in a grid network of 10 × 10 with a synchronization period of 30 s and draw a statistical graph. As shown in Figure 5, all nodes have 7 hops at the beginning of synchronization, but the average number of hops gradually decreases with an increase in synchronization time. At the same time, it can be observed that the hop count of node 9 is not only reduced but the hop count of individual nodes will also fluctuate due to the impact of the synchronization error. The maximum hop count reaches 9 hops, but the final hop count will converge to 1 hop with the convergence of the error.

4.3. Algorithm Performance Comparison

Taking a 10 × 10 grid network as an example, comparative experiments were conducted under identical network scales and other synchronization parameters, in which the conventional ATS algorithm, the MACTS algorithm with an integrated multi-hop controller, and the proposed HCTS algorithm were evaluated. Figure 6 displays the convergence curves of the global error for the three algorithms.
As a time synchronization algorithm that transmits information with a single hop, the ATS algorithm has difficulty achieving error convergence in a short time in a large-scale network. As shown in the figure above, after 200 synchronization cycles, the ATS algorithm fails to achieve error convergence.
As a fast time synchronization error convergence algorithm, MACTS can quickly set the threshold range of error convergence values and maintain its convergence accuracy. The disadvantage of MACTS is that it uses a local convergence detector to directly determine whether hops are maintained or reduced based on a specified error. The judgment method is unique and the threshold is fixed. When the error is much larger or much smaller than the threshold, the judgment method will be invalid.
HCTS has obvious convergence characteristics: In the early stage, it uses multi-hop information transmission to carry out fast synchronization information forwarding, so it achieves fast convergence of synchronization errors in the time synchronization establishment stage. When the error converges gradually, the hop count decreases gradually. In order to obtain lower synchronization costs and higher synchronization accuracy, information transmission is carried out with a small hop count. As shown in Figure 6, the HCTS demonstrates advantages in both convergence speed and precision.
Using the global synchronization error as the comparison metric, multiple experiments were conducted in a 5 × 5 grid network to statistically analyze both the mean convergence time and the probability distribution of each node’s convergence time. The results are shown in Figure 7. A comparison of the two algorithms revealed that the proposed HCTS algorithm exhibited an average global error convergence time of 4.76 min, which was lower than the 6.68 min required by the MACTS algorithm. Moreover, the probability density plot indicated that the convergence time of the HCTS algorithm was more concentrated and stable. Consequently, under identical network parameters, the HCTS algorithm demonstrated both a faster average convergence speed and greater stability than the MACTS algorithm.
Since the HCTS algorithm is capable of rapidly achieving convergence and subsequently maintaining a low hop count for information transmission, it was observed that the number of broadcasts and the volume of transmitted information could be significantly reduced compared to other algorithms. Multiple simulations were performed under varying network scales while keeping other parameters constant, and the number of broadcasts required for nodes to achieve error convergence was recorded, as illustrated in Figure 8.
As shown in Figure 8, the number of broadcasts required for node convergence using the HCTS algorithm was lower than that required by the MACTS algorithm. For example, in a 20 × 20 grid network, the MACTS algorithm required a total of 64,148 broadcasts to achieve global error convergence, corresponding to an average of 160.37 broadcasts per node, whereas the proposed algorithm required only 49,500 broadcasts in total, with an average of 123.75 broadcasts per node.

5. Discussion

In this paper, we propose a hop-control time synchronization algorithm (HCTS) based on error convergence probability estimation, along with a corresponding adaptive hop-control mechanism. Both HCTS and MACTS are average-consensus-based algorithms and fully distributed time synchronization algorithms like ATS. These algorithms exhibit superior synchronization performance in dynamic networks with node mobility, packet loss, and topology changes, compared to centralized synchronization approaches. Moreover, they offer better scalability, making them well-suited for large-scale or evolving network environments.

5.1. Communication Cost

In WSNs, the energy expended by a node for transmission and reception operations constitutes the vast majority of its energy budget, whereas the sensor and processor consume comparatively little. Transmitting 1 bit of information over a distance of 100 m requires approximately the same energy as executing 3000 instructions. Consequently, reducing the total amount of information transmitted during a node’s lifetime directly lowers communication overhead. The total information transmitted is determined both by the length of individual data packets and by the total number of packets exchanged.
In this work, HCTS employs data packets of the same length as those used in MACTS and ATS—each packet carries only the node’s timestamp information—so variations in communication cost arise solely from differences in packet count. As shown in Figure 8, when network size increases, the number of packets required by HCTS to reach convergence is lower than that required by MACTS. Once synchronization has converged, the message complexity of HCTS is identical to that of both ATS and MACTS, since all three operate in a single-hop fashion. Moreover, during the synchronization setup phase, fewer message transmissions are incurred by HCTS than by ATS and MACTS. Therefore, to achieve faster convergence, it is cost-effective to introduce an appropriate increase in control complexity within HCTS.

5.2. Computational Cost

The synchronization models of HCTS, MACTS, and ATS are identical: one-way broadcasting is employed to exchange timestamps among nodes, after which clock parameters are estimated, and clock counter units are compared to achieve synchronization [24]. All three algorithms compute relative clock offset and relative clock rate using simple arithmetic operations, so their computational procedures—and hence their computational costs—are equivalent. Relative to ATS, HCTS and MACTS incur a slight increase in computational overhead due to the incorporation of multi-hop-control logic (basic arithmetic and logical operations). In particular, HCTS requires approximately 20 additional arithmetic or logical operations compared to MACTS. Thus, HCTS is characterized by its ease of implementation and its low energy overhead.

5.3. Limitations

If the parameters a, L p , λ , and ξ set either too small or too large, oscillatory behavior may occur in the multi-hop-control system under conditions of unstable time synchronization. Furthermore, HCTS is better suited to mesh topologies than to line topologies. Since HCTS relies on an average-consensus synchronization paradigm, its convergence speed and precision improve as the network’s algebraic connectivity increases [24]. Given the same number of nodes, a line network exhibits substantially lower algebraic connectivity than a mesh network. Accordingly, average-consensus methods are more appropriate for networks with many nodes arranged in a mesh topology.

6. Conclusions

The proposed HCTS is an improved version of the MACTS algorithm, where the original static multi-hop-control strategy in MACTS is enhanced with adaptive capabilities. Compared to MACTS, HCTS achieves faster convergence and higher synchronization accuracy. Additionally, HCTS significantly reduces communication overhead. Although it incurs slightly higher computational complexity than MACTS, the additional energy consumed by computation is negligible relative to the energy cost of wireless transmission. Therefore, HCTS offers improved overall energy efficiency. The hop count for each node is dynamically adjusted according to the real-time estimated convergence probability and the error variation rate of the synchronization process. This enables rapid error convergence during the initialization phase, improved accuracy during the maintenance phase, and reduced transmission overhead.
Experimental results demonstrate that the proposed algorithm significantly enhances synchronization precision, convergence speed, and communication efficiency. Notably, HCTS’s fine-grained timing alignment makes it highly suitable for microgrid applications, facilitating accurate state estimation, fault detection, and efficient renewable energy integration in distributed PMU networks.

Author Contributions

Conceptualization, H.D., F.S. and Q.C.; methodology, H.D. and Q.C.; software, H.D. and M.Z.; writing—original draft preparation, H.D. and F.S.; project administration, S.W.; writing—review and editing, H.D. and S.W. All authors have read and agreed to the published version of the manuscript.

Funding

Supported by the National Natural Science Foundation of China under Grant 62441111, the Sichuan Science and Technology Program under Grants 2025YFHZ0199 and 2024NSFSC0476, the Postgraduate Innovation Fund Project of SWUST 23zx7101, and the Chongqing Talents Program under Grant cstc2024ycjh-bgzxm0208.

Data Availability Statement

Data is unavailable due to privacy or ethical restrictions.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Arefin, A.A.; Baba, M.; Singh, N.S.S.; Nor, N.B.M.; Sheikh, M.A.; Kannan, R.; Abro, G.E.M.; Mathur, N. Review of the techniques of the data analytics and islanding detection of distribution systems using phasor measurement unit data. Electronics 2022, 11, 2967. [Google Scholar] [CrossRef]
  2. Ou, K.; Liu, Y.; Duan, Z.; Wang, M.; Li, C.; Luo, Z. Time Synchronization Attack Protection Scheme Based on Three-Step Iterative Filter. Electronics 2025, 14, 218. [Google Scholar] [CrossRef]
  3. Sharma, N.K.; Samantaray, S.R. Assessment of PMU-based wide-area angle criterion for fault detection in microgrid. IET Gener. Transm. Distrib. 2019, 13, 4301–4310. [Google Scholar] [CrossRef]
  4. Samantaray, S.R.; Kamwa, I.; Joos, G. Phasor measurement unit based wide-area monitoring and information sharing between micro-grids. IET Gener. Transm. Distrib. 2017, 11, 1293–1302. [Google Scholar] [CrossRef]
  5. Kyriakou, D.G.; Kanellos, F.D.; Ipsakis, D. Multi-agent-based real-time operation of microgrids employing plug-in electric vehicles and building prosumers. Sustain. Energy Grids Netw. 2024, 37, 101229. [Google Scholar] [CrossRef]
  6. Biswal, C.; Sahu, B.K.; Mishra, M.; Rout, P.K. Real-time grid monitoring and protection: A comprehensive survey on the advantages of phasor measurement units. Energies 2023, 16, 4054. [Google Scholar] [CrossRef]
  7. Shi, F.; Tuo, X.; Yang, S.X.; Ran, L.; Huang, Y. Rapid-Flooding Time Synchronization for Large-Scale Wireless Sensor Networks. IEEE Trans. Ind. Inform. 2019, 16, 1581–1590. [Google Scholar] [CrossRef]
  8. Sumarmad, K.A.A.; Sulaiman, N.; Wahab, N.I.A.; Hizam, H. Microgrid energy management system based on fuzzy logic and monitoring platform for data analysis. Energies 2022, 15, 4125. [Google Scholar] [CrossRef]
  9. Oliveira, H.A.; Santos, L.H.S.; Ribeiro, L.A.D.S.; De Matos, J.G.; Oliveira, C.B.M.; Oliveira, A.C. Protection Design for Critical Microgrids. In Proceedings of the 2024 Energy Conversion Congress & Expo Europe (ECCE Europe), Darmstadt, Germany, 2–6 September 2024; pp. 1–6. [Google Scholar]
  10. Shi, W.; Li, N.; Chu, C.C.; Gadh, R. Real-time energy management in microgrids. IEEE Trans. Smart Grid 2015, 8, 228–238. [Google Scholar] [CrossRef]
  11. Worku, M.Y.; Hassan, M.A.; Abido, M.A. Real time-based under frequency control and energy management of microgrids. Electronics 2020, 9, 1487. [Google Scholar] [CrossRef]
  12. Elson, J.; Girod, L.; Estrin, D. Fine-grained network time synchronization using reference broadcasts. In Proceedings of the 5th Symposium on Operating Systems Design and Implementation, Boston, MA, USA, 9–11 December 2002; pp. 147–163. [Google Scholar]
  13. Ganeriwal, S.; Kumar, R.; Srivastava, M.B. Timing-sync protocol for sensor networks. In Proceedings of the 1st International Conference on Embedded Networked Sensor Systems, Los Angeles, CA, USA, 5–7 November 2003; pp. 138–149. [Google Scholar]
  14. Maróti, M.; Kusy, B.; Simon, G.; Lédeczi, Á. The flooding time synchronization protocol. In Proceedings of the 2nd International Conference on Embedded Networked Sensor Systems, Baltimore, MD, USA, 3–5 November 2004; pp. 39–49. [Google Scholar]
  15. Schenato, L.; Fiorentin, F. Average timesynch: A consensus-based protocol for clock synchronization in wireless sensor networks. Automatica 2011, 47, 1878–1886. [Google Scholar] [CrossRef]
  16. Sommer, P.; Wattenhofer, R. Gradient clock synchronization in wireless sensor networks. In Proceedings of the 2009 International Conference on Information Processing in Sensor Networks, San Francisco, CA, USA, 13–16 April 2009; pp. 37–48. [Google Scholar]
  17. Kenyeres, M.; Kenyeres, J.; Hassankhani Dolatabadi, S. Distributed Consensus Gossip-Based Data Fusion for Suppressing Incorrect Sensor Readings in Wireless Sensor Networks. J. Low Power Electron. Appl. 2025, 15, 6. [Google Scholar] [CrossRef]
  18. Wang, H.; Zou, Y.; Liu, X.; Meng, Z. A Rapid Time Synchronization Scheme Using Virtual Links and Maximum Consensus for Wireless Sensor Networks. IEEE Internet Things J. 2024, 12, 3318–3329. [Google Scholar] [CrossRef]
  19. Zuo, Z.; Liu, W.; Lei, J.; Yang, P. Joint Estimation of Clock Skew and Offset of Listening Nodes in Wireless Sensor Networks Based on Correlation Detection. In Proceedings of the 2024 IEEE International Conference on Smart Internet of Things (SmartIoT), Shenzhen, China, 14–16 November 2024; pp. 516–522. [Google Scholar]
  20. Dong, S.; Liu, Y.; Li, X.; Chu, W. An accurate time synchronization algorithm based on ultra-wideband wireless sensor networks. In Proceedings of the 2023 3rd International Conference on Electronic Information Engineering and Computer Science (EIECS), Changchun, China, 22–24 September 2023; pp. 238–242. [Google Scholar]
  21. Feng, L.; Guo, Y.; Guo, Y. Multi-block Directed Radiation Routing Algorithm for Optimized Wireless Sensor Network. Int. J. High Speed Electron. Syst. 2025, 2540313. [Google Scholar] [CrossRef]
  22. Abidin, Z.; Falah, R.; Setyawan, R.A.; Wardana, F.C. Wireless sensor network using nRF24L01+ for precision agriculture. Bull. Electr. Eng. Inform. 2025, 14, 1003–1013. [Google Scholar] [CrossRef]
  23. Abdul-Rashid, R.; Abd Rahman, M.A. An Adaptive Procedure of Time Synchronization in Unstructured Multi-Hop Wireless Sensor Networks using Butterfly Optimization Algorithm. Proc. J. Phys. 2024, 2891, 162026. [Google Scholar] [CrossRef]
  24. Shi, F.; Tuo, X.; Ran, L.; Ren, Z.; Yang, S.X. Fast convergence time synchronization in wireless sensor networks based on average consensus. IEEE Trans. Ind. Inform. 2019, 16, 1120–1129. [Google Scholar] [CrossRef]
  25. Shi, F.; Zhang, Q.; Yang, S.X.; Sijie, W.; Yingying, D.; Mukherjee, M. ARCE: Adaptive Real-time Convergence Estimation for Wireless Networks Time Synchronization. In Proceedings of the IEEE China Automation Congress (CAC), Chongqing, China, 17–19 November 2023; pp. 7367–7371. [Google Scholar]
Figure 1. The architecture of HCTS. Two portions are designed for HCTS: the ARCE convergence probability estimation component and the step control component.
Figure 1. The architecture of HCTS. Two portions are designed for HCTS: the ARCE convergence probability estimation component and the step control component.
Electronics 14 02086 g001
Figure 2. HCTS multi-hop controller, which is designed to dynamically adjust the multi-hop configuration based on the convergence status of the network.
Figure 2. HCTS multi-hop controller, which is designed to dynamically adjust the multi-hop configuration based on the convergence status of the network.
Electronics 14 02086 g002
Figure 3. Synchronization error. The convergence accuracy of local errors is higher and the convergence rate is faster than that of global errors.
Figure 3. Synchronization error. The convergence accuracy of local errors is higher and the convergence rate is faster than that of global errors.
Electronics 14 02086 g003
Figure 4. Hop-control analysis. The change rate reflects the stability of the convergence probability; once the convergence probability has stabilized, the change rate approaches zero, and the hop count is progressively reduced to one.
Figure 4. Hop-control analysis. The change rate reflects the stability of the convergence probability; once the convergence probability has stabilized, the change rate approaches zero, and the hop count is progressively reduced to one.
Electronics 14 02086 g004
Figure 5. Statistical chart of hop-count variation. In the initial phase of synchronization, the network exhibits a large number of hops, which rapidly decreases to a single hop as synchronization converges.
Figure 5. Statistical chart of hop-count variation. In the initial phase of synchronization, the network exhibits a large number of hops, which rapidly decreases to a single hop as synchronization converges.
Electronics 14 02086 g005
Figure 6. Convergence rate. The convergence rate of HCTS is significantly faster than that of the comparison algorithms MACTS and ATS.
Figure 6. Convergence rate. The convergence rate of HCTS is significantly faster than that of the comparison algorithms MACTS and ATS.
Electronics 14 02086 g006
Figure 7. Convergence characteristics. HCTS achieves faster convergence and improved stability.
Figure 7. Convergence characteristics. HCTS achieves faster convergence and improved stability.
Electronics 14 02086 g007
Figure 8. Comparison of broadcast counts. Compared to MACTS, HCTS achieves convergence with fewer broadcasts, which leads to improved energy efficiency.
Figure 8. Comparison of broadcast counts. Compared to MACTS, HCTS achieves convergence with fewer broadcasts, which leads to improved energy efficiency.
Electronics 14 02086 g008
Table 1. Hop-count adjustment information table.
Table 1. Hop-count adjustment information table.
Synchronization Time MProbability Convergence P ^ E Rate of Change δ
M 1 P ^ E 1 -
M 2 P ^ E 2 δ 1 2
M 3 P ^ E 3 δ 2 3
.........
M n P ^ E n δ n 1 n
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Duan, H.; Shi, F.; Wang, S.; Cui, Q.; Zeng, M. A Time Synchronization Hop-Count-Control Algorithm Based on Synchronization Error Convergence Probability Estimation. Electronics 2025, 14, 2086. https://doi.org/10.3390/electronics14102086

AMA Style

Duan H, Shi F, Wang S, Cui Q, Zeng M. A Time Synchronization Hop-Count-Control Algorithm Based on Synchronization Error Convergence Probability Estimation. Electronics. 2025; 14(10):2086. https://doi.org/10.3390/electronics14102086

Chicago/Turabian Style

Duan, Haibo, Fanrong Shi, Sijie Wang, Qiushi Cui, and Min Zeng. 2025. "A Time Synchronization Hop-Count-Control Algorithm Based on Synchronization Error Convergence Probability Estimation" Electronics 14, no. 10: 2086. https://doi.org/10.3390/electronics14102086

APA Style

Duan, H., Shi, F., Wang, S., Cui, Q., & Zeng, M. (2025). A Time Synchronization Hop-Count-Control Algorithm Based on Synchronization Error Convergence Probability Estimation. Electronics, 14(10), 2086. https://doi.org/10.3390/electronics14102086

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop