As a result of the influence of clock drift and uncertainty delay in synchronous message transmission, the clock synchronization model based on statistical distribution cannot accurately describe clock deviation. This model also requires a large number of timestamp samples that cause a storage occupation issue for wireless sensor nodes with limited resources. The modeling method based on grey prediction has advantages of low sample demand and simple modeling process. However, the accuracy of the existing clock synchronization models needs to be improved. Based on the grey prediction theory, this paper proposes an adaptive fractional-order operator clock synchronization algorithm considering uncertainty delay. First, based on the clock model and clock offset model, the frequency offset between nodes is optimized by taking the mean on the clock frequencies. Second, a grey prediction algorithm based on a fractional-order operator is proposed by estimating the uncertainty delay in message transmission to obtain the clock offset. Finally, the order of the fractional-order accumulation is adjusted adaptively in the grey prediction model according to the collected timestamp sample values so that the estimation of the uncertainty delay is more accurate, thereby improving the accuracy of the clock offset. Compared with the first-order accumulative grey prediction clock synchronization algorithms and timing-sync protocol for sensor networks, the proposed scheme improved the synchronization accuracy by 29.18% and 44.01%, respectively, and reduced the variance of the clock offset by 48.66% and 64.89%. Thus, the proposed algorithm is characterized by improved stability.
Clock synchronization between different nodes in wireless sensor networks (WSNs) is an important basis for coordinating network operations [
Existing clock synchronization methods can be generally classified into two types according to the transmission message interaction mode: sender-receiver synchronization (SRP) model and receiver-receiver synchronization (RRP) model. The SRP model can be divided into a two-way message exchange synchronization mechanism and a one-way broadcast synchronization mechanism according to the message exchange manner in the synchronization process. In the algorithm based on the two-way message exchange synchronization mechanism, two sensor nodes are synchronized with each other through a two-way message exchange. The message has a local timestamp value, and the node calculates the clock offset by four collected timestamps, which has the advantage of high synchronization precision. However, in this process, frequent message exchanges between two nodes cause an increase in energy consumption. In the algorithm based on the one-way broadcast synchronization mechanism, the reference node broadcasts a data packet including its timestamp. The node to be synchronized calculates the data communication delay and performs delay compensation as soon as they receive a timestamp message, and then completes the clock synchronization with the reference node. The advantage is that the algorithm has low complexity and energy consumption. However, the certainty delay is regarded as a part of the clock offset; thus, the synchronization precision is lower than the synchronization mechanism of the two-way message exchange. On the other hand, such clock synchronization algorithm depends on the broadcast node, and the intranetwork synchronization fails if only the broadcast node fails. In the timing-sync protocol for sensor networks (TPSNs) based on the SRP model [
Furthermore, each sensor node has its clock while being equipped with a crystal oscillator. In the actual environment, the oscillator frequency is unstable due to the oscillator quality, node power battery, temperature, humidity, and device aging. These issues often cause clock frequency offset, and the clock synchronization deviation becomes increasingly larger over time. Maintaining accuracy requires frequent synchronization to correct the clock offset, which also causes energy waste. Thus, the effect of clock frequency offset needs to be considered in clock synchronization deviation. To reduce the energy consumption created by the clock synchronization process, extend the network life cycle, and improve the accuracy of clock synchronization, this study proposes an adaptive fractional-order operator clock synchronization algorithm based on the grey prediction GM(1,1) model [ Based on the GM(1,1) grey prediction model, the grey prediction clock synchronization algorithm using a fractional accumulative operator is proposed. The accuracy of clock synchronization is improved in comparison with the grey prediction clock synchronization algorithm of the first order The study uses the collected timestamp sample values to adaptively obtain the best fractional-order cumulative generation order. When the timestamp received by the node is significantly different from the historical record, the proposed algorithm can be adaptive to adjust the cumulative generation order to fit the current timestamp sequence, thereby improving the accuracy of the estimation of the uncertainty delay Compared with the entire network synchronization based on the spanning tree algorithm, the proposed algorithm does not require a lot of energy to maintain the network structure. This method should be robust to the dynamic changes in the network topology; furthermore, the applicable scene is wider
The subsequent parts of this paper are organized as follows. Section
Clock synchronization is essentially related to the prediction of clock parameters, and the accuracy of the synchronization algorithm depends on the statistical properties of the parameter estimation algorithm. At present, many clock parameter estimation algorithms based on a two-way message exchange mechanism have been proposed to solve the accuracy problem in clock synchronization [
The preceding analysis shows that only the clock offset correction without considering the clock frequency offset must be increasing the synchronization overhead, while the synchronization algorithm based on statistical distribution corrects the clock frequency offset. However, the delay distribution depends on the specific environment; thus, the adaptability is poor and requires a large number of timestamp samples. Energy consumption is large as well. Based on the tree-structured clock synchronization protocol, when the network topology changes, additional energy is needed to maintain the network topology, especially when the reference node fails, the network structure needs to be reconstructed, and the energy consumption is relatively large. Wu et al. in [
Based on the assumption that the sensor network consists of The network communication link is reliable and no message packet loss occurs Each node is static and has a unique ID Each node has its own clock and is equipped with a crystal oscillator Any two nodes can communicate through a limited hop
Ideally, the clock of a sensor node is defined as
Among them, the parameter
The clock model is shown in Figure
Clock model of sensor nodes.
Among the lines,
Assume that nodes
Clock offset model of two-way time message exchange.
As shown in Figure
According to Figure
The clock synchronization algorithm in this study consists of four parts: graph structure establishment based on breadth-first search, clock frequency offset correction, clock synchronization prediction based on fractional-order operator, and adaptive synchronization process. In the establishment period of the graph structure, the sensor network is constructed as an undirected graph, all nodes are equally connected in a breadth-first search manner in the network, and they communicate only with their neighbor nodes. In the clock frequency offset correction period, the nodes broadcast their respective clock frequencies, and correct the clock frequency offset among the nodes by taking the mean to the clock frequencies. In the clock offset synchronization period of the fractional-order operator, the grey prediction of the fractional-order operator is modeled for the clock offset so that the uncertainty delay is estimated. Finally, the estimated value of the clock offset is obtained. In the adaptive synchronization period, whether to optimize the fractional-order operator is determined according to the clock offset. When an order needs to be optimized, the optimal order is calculated according to the previously received timestamp samples.
To improve the robustness of the clock synchronization network structure, this paper proposes a graph-based breadth-first search synchronization algorithm. All nodes in the network are equal, do not need to maintain a specific network structure, and perform the same synchronization algorithm. Furthermore, no root node or gateway node exists. As all nodes only communicate with their neighbor nodes, the algorithm should be robust to the dynamic changes of the topology, and the scalability improves as the network scale increases. Compared with the spanning tree-based clock synchronization protocol, the proposed algorithm consumes less energy and is more suitable for WSNs with frequent changes in topology. The network structure of the breadth-first search based on the graph is shown in Figure
Network topology diagram based on graph-based breadth-first search.
If the clock of the node is not corrected to its frequency offset, the clock offset increases over time. The clock frequency offset is a random variable that changes with time. It is not only affected by many factors but also difficult to model. Usually, in an extremely short period, the change in clock frequency offset is negligible, but the clock frequency offset needs to be corrected for long-term synchronization. Therefore, this study adopts a frequency offset optimization strategy to achieve frequency offset correction by exchanging and computing the clock frequency information between sensor nodes. Assume that in a WSN consisting of
For each node
Node
Node
The preceding process is repeated until the clock frequencies of all nodes in the network reach the same value, that is, the entire network reaches frequency synchronization.
The frequency offset optimization process is presented in Figure
Frequency offset optimization process.
The grey prediction model [
As the frequency offset of the clock has been optimized in Section
The existing grey prediction model is mainly based on first-order cumulative generation sequence modeling, and then the prediction value is obtained by first-order cumulative reduction. However, the modeling based on the first-order accumulation generation sequence is unsuitable for modeling data or experimental scenes of all features. Therefore, this study establishes a grey prediction model based on fractional-order operator [
From [
From [
From equation (
Initialize the order
Introduce the grey weakening buffer operator to reduce the randomness of the sample sequence. Let the original timestamp sample sequence be
Using the constructed average weakening buffer operator to work on the original data sequence smoothens the sequence and considers the principle of new information prioritization. The latest information remains unchanged under the action of the average weakening buffer operator, that is, when
Perform
Obtain the estimated value of
The parameters
The expression for
Accumulate the fractional-order (
Similarly, the estimated value of the
When the estimated values of
The ratio
According to formulas (
After computing the clock offset between nodes
Due to changes in environmental factors, the timestamp value sent by the node after a period of time may change. Thus, setting a threshold
When the remaining energy of the node meets the requirement of one synchronization, we have to check whether the current clock offset is greater than a given threshold. If the remaining energy is greater than the threshold, then the node calculates an optimal fractional cumulative generation order according to the currently obtained timestamp value as a new fractional-order cumulative generation order in the synchronization model. The clock offset is estimated using the new order when performing a new round of clock offset predictions.
A flowchart of the clock offset correction and adaptive clock offset synchronization process of the fractional-order operator is shown in Figure
Clock offset correction and adaptive clock offset synchronization process.
In this paper, the proposed fractional-order grey prediction algorithm is simulated by MATLAB_R2017b and compared with the first-order grey prediction algorithm [
Parameter setting for simulation environment.
Parameter | Value |
---|---|
Node coverage area | (400 m, 400 m) |
Number of nodes | 100 |
Node transmission distance | 78 m |
Number of synchronizations | 500 |
Synchronization cycle | 10 s |
Node frequency offset | ±50 ppm |
The variance of the clock offset obtained by the first-order cumulative grey prediction and fractional-order cumulative grey prediction based on the same timestamp data is shown in Figure
Fractional-order cumulative gray prediction based on the same timestamp.
The green circle represents the variance of the first-order accumulated clock synchronization offset, the blue solid line indicates the variance of the fractional-order accumulated clock synchronization offset, and the red circle marks the position of the minimum offset variance obtained by the fractional-order cumulative grey prediction. In the synchronization process, the deviation based on the 3.6-order cumulative grey prediction clock synchronization offset is the smallest. Thus, this study selects the 3.6-order fractional-order to perform the grey accumulation prediction.
In addition, since the fractional-order also contains the integer-order (the cumulative order is in the first-order, the variance of the clock offset obtained by the fractional grey prediction and the first-order grey prediction is the same), so the grey prediction is compared with the first-order. The grey prediction of fractional-order accumulation is more applicable. As shown in Figure
Figure
(a) 500 times of clock synchronization offset change. (b) 100 times of clock synchronization offset change.
Figure
Figure
Variance of clock synchronization offset.
Figure
Clock offset distribution of clock offset.
The stability of clock synchronization is an important criterion for evaluating a clock synchronization algorithm. Based on the simulation results in Figures
To improve the clock synchronization accuracy, this study estimates the uncertainty delay in clock synchronization from the perspective of statistical signal processing and proposes an adaptive fractional-order operator clock synchronization algorithm based on the grey prediction model. First, the frequency offset between nodes is optimized by taking the mean on the clock frequency so that the sensor nodes do not need to be frequently synchronized, thereby reducing the energy consumption of the nodes to a certain extent. Second, after frequency offset optimization, a fractional-order operator clock model based on grey prediction theory is proposed to estimate the uncertainty delay in synchronous message transmission and then an accurate clock offset is obtained. In addition, the algorithm adaptively adjusts the order of the fractional-order accumulation in the grey prediction model according to the collected timestamp sample values, thereby improving the accuracy of the uncertainty delay estimation. At the same time, the graph-based breadth-first search is more suitable than the spanning tree to construct the clock synchronization network structure for the wireless sensor network with frequent changes in topology, which does not require a large amount of energy to maintain the topology network while achieving clock synchronization of the entire network. Compared with the existing first-order cumulative grey prediction and TPSN algorithms, the proposed algorithm reduces the mean on the clock offset by approximately 29.18% and 44.01%, respectively. The proposed algorithm also reduces the variance of the offset by approximately 48.66% and 64.89%. The result of the distribution of the clock deviation shows that the proposed algorithm has higher synchronization accuracy and stability than the first-order accumulated grey prediction and TPSN algorithms. In our further research work, we will testify the performance of the proposed algorithm in the real IoT platform and optimize the communication performance of the proposed clock synchronization algorithm; the characteristics of the communication channel will be considered simultaneously.
The test data, simulation data, and the proposed method used to support the findings of this study are available from the corresponding author upon request. The proposed algorithm is in the state of patent-pending; thus, the access of the data used in the proposed algorithm is restricted now.
The authors declare no conflict of interest.
This research was funded in part by the National Key Research and Development Program (Grant No. 2017YFB1401800), the Jilin Province Foundation for Excellent Youth Talents, grant number 20190103052JH, and the Project of the Education Department of Jilin Province, grant number JJKH20200802KJ.