Model-Based Learning for Network Clock Synchronization in Half-Duplex TDMA Networks
Abstract
Supporting increasingly higher rates in wireless networks requires highly accurate clock synchronization across the nodes. Motivated by this need, in this work we consider distributed clock synchronization for half-duplex (HD) TDMA wireless networks. We focus on pulse-coupling (PC)-based synchronization as it is practically advantageous for high-speed networks using low-power nodes. Previous works on PC-based synchronization for TDMA networks assumed full-duplex communications, and focused on correcting the clock phase at each node, without synchronizing clocks’ frequencies. However, as in the HD regime corrections are temporally sparse, uncompensated clock frequency differences between the nodes result in large phase drifts between updates. Moreover, as the clocks determine the processing rates at the nodes, leaving the clocks’ frequencies unsynchronized results in processing rates mismatch between the nodes, leading to a throughput reduction. Our goal in this work is to synchronize both clock frequency and clock phase across the clocks in HD TDMA networks, via distributed processing. The key challenges are the coupling between frequency correction and phase correction, and the lack of a computationally efficient analytical framework for determining the optimal correction signal at the nodes. We address these challenges via a DNN-aided nested loop structure in which the DNNs are used for generating the weights applied to the loop input for computing the correction signal. This loop is operated in a sequential manner which decouples frequency and phase compensations, thereby facilitating synchronization of both parameters. Performance evaluation shows that the proposed scheme significantly improves synchronization accuracy compared to the conventional approaches.
I Introduction
Clock synchronization is critical for the implementation of high-rate communications over wireless networks operating in a time division multiple access (TDMA) regime, as higher throughput requires stricter temporal coordination between the nodes. The common approach for clock synchronization in ad-hoc wireless networks is based on exchanging packets carrying timing information. While this approach is relatively simple to implement, it is susceptible to random queuing delays at the medium access control (MAC) layer as well as to random processing delays at the nodes, which limits its accuracy. Moreover, the processing associated with packet-based synchronization entails a higher power consumption at the nodes [1].
An alternative approach for network clock synchronization is based on pulse-coupling (PC), in which the nodes transmit signature sequences, and each node applies processing based on the time stamps it assigns to the signatures received from the other nodes. Commonly, a clock update signal is computed by weighting the received time stamps according to their relative received power w.r.t. to the received powers from the other nodes, see, e.g., [1]. Such weighting leads to good performance when all clocks have the same frequency as long as the propagation delays between the nodes are negligible. The major challenges thus follow as the accuracy of PC-based algorithms is strongly dependent on the weights, yet the optimal weights for practical scenarios, in which there are frequency differences between the clocks as well as propagation delays, are unknown. This has motivated our work [2], which proposed a DNN-aided synchronization scheme in which the DNN is trained to compute the weights at the nodes. The algorithm, presented in [2], improves the accuracy by two orders of magnitudes compared to the classic weights of [1].
While previous works, [1], [2], [3], have proposed distributed algorithms which achieve different clock synchronization accuracy across the nodes, they all share a common limitation: In all these works, the correction signal is applied to the clock’s phase, without synchronizing the clock’s frequency. The main benefit of this approach is simplicity as only the clock phase is updated, and when applied in networks operating in the full-duplex (FD) regime, it can indeed attain good synchronization performance. However, when applied in the common scenario of half-duplex (HD) communications, rendering the frequencies of the clocks at the nodes unsynchronized results in significant drifts in the clock phase between updates across the nodes in the network, which decreases the throughput of the network. As the clocks drive the processing at the nodes, then, when the clocks’ frequencies remain unsynchronized, different nodes carry out processing at different rates, which will lead to loss of information even with perfect clock phase synchronization between the nodes. In order to mitigate these issues, clock frequency synchronization has to be achieved along with clock phase synchronization in HD TDMA networks, which is the focus of this work. We note that such network architectures are relevant to multiple network and application scenarios, including aerial networks [4], cooperative navigation in wireless networks [5], and sensor networks [6].
Main Contributions: In this work, we propose a new PC-based DNN-aided synchronization algorithm that synchronizes both the frequencies and the phases of the clocks, which makes it particularly suitable for HD TDMA wireless networks. As coupling between phase correction and frequency correction may result in frequency differences also after convergence, we implement a staggered update rule which decouples the phase updates from the frequency updates. We then propose an unsupervised and distributed training scheme for obtaining the weights. The main novelty here is facilitating the training of both the frequency and the phase detectors overcoming the above mentioned coupling. The proposed DNN-aided algorithm implements a model-based learning approach, which benefits from the stability and convergence properties of the loop architecture, see, e.g., [2]. As training is carried out online with the actual deployment, the learned DNN coefficients result in superior synchronization performance compared to other distributed approaches. The proposed scheme is compared with a direct extension of the classic algorithm [1] to HD operation and frequency synchronization, as well as with an adapted version of [7]. The comparison shows that the synchronization accuracy of the DNN-aided scheme is considerably higher than that of analytical scheme [3], while the adapted scheme of [7] is not able to synchronize either the frequency or the phase.
Organization: The rest of this work is organized as follows: In Section II the clock model and the baseline network model are described and the classic algorithm [3] is extended to operate in the HD regime and to achieve frequency synchronization. The performance of the extended scheme is then demonstrated to motivate the current work; Section III details the proposed algorithm and Section IV details the associated training scheme; Section V presents simulation tests and discussion; Lastly, Section VI concludes the work.
II Preliminaries: Distributed Pulse-Coupled Time Synchronization for Wireless Networks
II-A A Baseline Scenario
II-A1 Network and Clock Models
II-A2 Scenario Parameters
As a baseline example, we set the network size to nodes, deployed in a square area with a side-length of . We assume -ray propagation with antenna height [m], transmit power of [dBm], and a reception threshold of [dBm]. With the node deployment depicted by the circles in Fig. 1, it follows that of the links carry signals that are received at their respective destinations above the reception threshold. These links are marked by the lines in Fig. 1. The nominal value of the TDMA period is set to [msec] and the respective nominal TDMA frequency is . We model clock uncertainty by generating the initial TDMA frequency at each node randomly, according to a uniform distribution , which corresponds to clock accuracy of 150 [ppm]. The initial TDMA period at node is obtained as . Each node is then assigned an initial phase uniformly distributed over . After startup, the nodes begin to transmit their signatures, such that at time , node transmits and the remaining nodes receive. Each receiving node assigns a time stamp and a received signal power value to each received signature. At time indices such that , each node independently processes its received time stamps and received signal power values to generate correction signals applied to update its TDMA clock period and clock phase. Accordingly, in the following we let denote the period of the clock at node at time index , and denote the initial period value.
II-B Phase and Frequency Synchronization with Current State-of-the-Art
As mentioned in Sec. I, the classic scheme of [1] operates to achieve network clock synchronization by updating only the clock phase leaving the frequencies of the clocks at the nodes unsynchronized. Fig. 2 depicts the clock phases obtained with the classic algorithm [1] in the HD regime, where the phase correction is applied at times s.t. . The phase is plotted as the offset w.r.t. to the mean instantaneous phase, defined as .
We observe that the lack of frequency synchronization induces significant phase drifts across the nodes. We measure the network synchronization accuracy via the range (NPDR), which is the maximal clock phase difference between any pair of clocks in the network, normalized to the instantaneous mean period, defined as :
(2) |
A straightforward approach for achieving clock phase and frequency synchronization in HD networks is to generalize the model of [1] by adding a frequency synchronization loop, using the same power-dependent weights. Before stating the generalization we recall the clock phase update rule at node , as stated in [1, Eqn. (16)]:
(3) |
where denotes the loop gain, is the propagation delay between nodes and , and is the neighborhood set of node , consisting of all the nodes whose signals are received at node with power higher than . Note that here the clock period is fixed at as this value is not updated by the algorithm [1]. Let denote the power of the signal received at node from node at time index , and denote by the time stamp node assigns to the signature received from node . At startup, note initializes the storage variables . At time index , node transmits and nodes receive. Then, for any node for which , the node first updates to include , and then computes and stores , , and . At times s.t. , the weights at node are set to [1, Eqn. (8)]
In the following we generalize the algorithm of [1] to include period synchronization by introducing a nested loop designed to synchronize across the different nodes. The generalized scheme, referred to in this work as the extended Simeone-Spagnolini-BarNess-Strogatz (ESSBS) algorithm, operates as follows:
(6) | ||||
(11) |
Fig. 3 presents a schematic depiction of the ESSBS algorithm.
In Sec. III we elaborate on the factor of included in the modulo operations in (II-B) and (II-B). Fig. 4 depicts the clock periods and the NPDR achieved by the ESSBS algorithm for the baseline scenario detailed in Sec. II-A. Observe that ESSBS is not able to achieve accurate clock synchronization, and in fact, as time increases the clocks’ phases drift farther apart. This motivates the introduction of a DNN-based weight computations, considered in the next section.
III A Distributed \texorpdfstringDNNDNN-Aided Frequency and Phase Synchronization Scheme for the HD Regime
We propose to improve upon the current state-of-the-art FD algorithms [1] (which uses weights computed analytically) and [2] (which uses weights generated via a DNN) by incorporating three new elements: (1) A DNN-aided frequency synchronization loop which operates together with the phase synchronization loop; (2) Modification of the operation of the overall synchronization scheme, adapting it to the HD regime; and (3) Introduction of an unsupervised and distributed training scheme that facilitates training of both DNNs without requiring the exchange of feedback information between the nodes. Next, we elaborate on the operation of the proposed combined frequency and phase synchronization scheme in the HD regime.
By analyzing (this original analysis, reported in [8], is not included here due to space constraints) the impact of propagation delays on the phase update rule in the ESSBS algorithm (II-B) it was concluded that these delays induce a drift in the frequency synchronization loop. Accordingly, our proposed synchronization scheme, referred to as the phase and frequency -aided synchronization algorithm (PFDSA), is designed to guarantee that both the clock phases and periods are simultaneously synchronized. We employ learning only of the weights, kee** the other elements of the loop structure of the ESSBS algorithm (II-B)-(II-B) unchanged, see Fig. 3. This approach, known as a model-based approach, benefits from the desired convergence and stability properties associated with the loop structure, while optimizing only the element whose analytical determination is suboptimal.
Let and denote the DNNs used for computing the weights for the period and for the phase update loops at node , respectively, where and denote their respective DNN parameters. In the HD regime, a node requires time slots to collect the timing information from all of its neighbors (received above the reception threshold), which is a significantly slower rate than in the FD regime, in which timing information from all received nodes is collected at every time slot. Accordingly, at time indices such that , node updates its clock phase and frequency via
(12a) | |||||
(12b) |
where denotes the period correction term at node at time , and is the corresponding phase correction term. In addition to updating their clocks, at time slot the node with index transmits its synchronization signature while the remaining nodes, are set to receive. Let denote the phase difference between nodes and , stored at node at the previous update cycle. Upon reception, each node for which , stores , otherwise it sets . A node for which computes and stores the period difference w.r.t. node , defined as . Node then proceeds to store the new receive phase difference . If , then node sets .
In order to decouple the period update and the phase update, such that both period and phase will converge, the update takes place in a sequence of alternating actions, and therefore, a cycle of frequency and phase updates spans times indices. We denote the interval for which as a “collection-only” interval, at which the clocks are updated via Eqns. (12) where the correction terms are set to . The “period update” action takes place at such that . In this interval each node updates its period via a correction signal computed by weighting all the estimated period differences between its own period and the periods of the other nodes with weights computed by the DNN , which replace the weights ’s used in the rule (II-B), while . The period correction signal at node is given by
(13) |
Finally, a phase correction update is applied when , by weighting the received clock phase differences with weights generated by the DNN , which replace the weights ’s used Eqn. (II-B), while . The phase correction signal at node is given by
(14) |
The proposed algorithm is schematically depicted in Fig. 5.
IV The Proposed Unsupervised Distributed Online Training Scheme
IV-A Data Acquisition and Training Set Generation
Typically, DNNs are trained offline with data collected a-priori. However, as was already noted in [2], achieving high accuracy clock synchronization in wireless networks requires that the training data corresponds to the actual parameters of the network deployment, i.e., the actual clock frequency differences, clock phases, propagation delays, and network topology. This requires collecting the training data after deployment.
The data acquisition step takes place after startup and spans TDMA frames, each consisting of transmissions, one from each node in the network. During this step, each node uses its initial, randomly generated DNN parameters, and , to generate its clock times via the PFDSA, while concurrently storing all its measured time stamps and received signal powers. For example, at time , following the TDMA time-slot assignment, node transmits, and each node stores its receive time stamp and received powers (if , then both stored parameters are set to ). Thus, for every time , node stores the pair , where , . Note that during the entire acquisition step, the parameters of both DNNs remain fixed. Due to the HD transmission protocol, the acquisition step spans time indices .
Based on the TDMA frames received during data acquisition, each node generates a training set containing samples, where each sample consists of pairs, , containing the receive time stamp and received power.
IV-B Training Procedure
Once the acquisition step is completed, node processes the stored training data at sample as follows: Let . Then, if , node computes
(15) | |||||
(16) |
Using the definition of and the update rules (12) in (16) we can express via the period and the phase correction signals as follows:
Observe that represents node ’s estimate of the TDMA frame duration of node , at time . Note that this estimate will have an offset at some values of due to the phase correction term, which is non-zero only at values of for which , and to the change in within a set of samples at node , which occurs when . Recall also that is non-zero only for s.t. .
Next, the features used for computing the outputs of the DNNs and are obtained in the following order
Subsequently, the DNNs compute the weights for the phase loop and the frequency loop for generating the error signals at node , using the respective features at each DNN according to the time regime, i.e., when , the DNN is used for computing via (13). Then, is applied for period update when . When , a phase correction is applied using (14) with obtained using the DNN . Letting denote the indicator function for the event , the loss functions are computed as follows:
(17) | ||||
(18) |
By the structure of the loss functions (17) and (18), it follows that the gradient of the loss with respect to the weights can be computed via backpropagation through time. Moreover, the loss functions can be computed in an unsupervised manner by each node locally, facilitating unsupervised local training via conventional first-order based optimizers. The training algorithm is summarized in Algorithm 1.
Observe that at each training batch, first, only the frequency loop is trained, and then only the phase loop is trained. This is done to avoid the phase loop compensating for frequency errors, which would decrease the accuracy of frequency synchronization across the nodes.
We note that as training is local at each node, based only on its received inputs with fixed DNNs parameters during training data acquisition, then the proposed approach is flexible and scales with the size of the network without requiring any modifications.
IV-C Discussion and Complexity Analysis
The DNNs used in the frequency synchronization loop and in the phase synchronization loop have the same structure, each consisting of a total of six layers, including two linear layers, each followed by a sigmoid layer, and a third linear layer followed by a softmax layer, which is the output of the DNN. The output of the DNN is then passed to a selector which outputs only the weights corresponding to nodes whose signal was received above the reception threshold. These weights are then normalized such that their sum is one and are then applied in the loop. The number of inputs and outputs of each layer are summarized in Table I.
Operation | Inputs | Outputs |
---|---|---|
Linear Layer 1 | ||
Sigmoid Layer 1 | ||
Linear Layer 2 | ||
Sigmoid Layer 2 | ||
Linear Layer 3 | ||
Softmax Layer | ||
Selection | ||
Normalization |
For a network with nodes, each DNN consists of weights and biases. For a network with nodes, we obtain weights and biases, which corresponds to less than products for inference per DNN. We note that each DNN is used for inference only once per time slots, thus the rate of computation at a node is less than products for inference per TDMA frame. As discussed in [2], such a computational burden is feasible on real-time modern micro-controllers.
V Performance Evaluation
In the simulations we used the baseline setup described in Sec. II-A. In this section we shall depict the comparison only with the ESSBS algorithm described in Sec. II-B, as the algorithms based on skew and offset estimation, e.g., [7], achieve worse performance than ESSBS for the scenarios tested in this section. In the learning phase of the simulations, the PFDSA algorithm was trained using cycles with . Thus, overall each DNN is trained over epochs with a learning rate of . The information for training was collected over TDMA frames. As each TDMA frame facilitates transmission of nodes, then the overall time samples collected for training at a given node is . In the testing phase, TDMA frames were used in the evaluation.
The results for the proposed PFDSA algorithm for the network depicted in Fig. 1 are presented in Figs. 6 (synchronization of the period) and 7 (synchronization of the phase). Both figures present the quantities w.r.t. the respective instantaneous mean. The figures demonstrate that the proposed PFDSA algorithm is indeed able to achieve excellent frequency and phase synchronization performance, which is considerably better than that of the ESSBS algorithm. The main performance characteristics, namely, the NPDR, is depicted in Figure 8a. It is observed that the proposed PFDSA is able to achieve accurate synchronization while ESSBS is not able to synchronize the phase at all.
Next, we tested the impact of network parameters on the performance, by randomly generating network scenarios in which the nodes were randomly placed in the network area, and the initial phases and periods were selected according to the statistics described in Sec. II-A. Only scenarios in which about 30% of the links are received above the detection threshold were considered. The histogram of the NPDR and of the mean period are depicted in Figs. 9 and 10, respectively. It is observed from the figure that both algorithms can typically be expected to achieve accurate frequency synchronization. Yet, the ESSBS would typically result in very high NPDR which implies that it is not able to achieve phase synchronization, and therefore does not facilitate communications over the network. In contrast, the proposed PFDSA would typically achieve very accurate phase synchronization and represents a major improvement both in the mean NPDR (a factor of ) and in its standard deviation (STD) (a factor of ).
VI Conclusions
In this work we have considered the problem of clock synchronization in networks operating in the HD regime. Synchronization of both clock phase and clock frequency introduces several challenges: The first challenge is that phase correction can compensate for frequency differences, and thus, we proposed a scheme in which these two updates are decoupled. The second challenge is the stability and convergence of the synchronization scheme. In this work we use a nested loop structure, where each loop is a first order loop. This structure benefits from the stability and convergence associated with such loops. The third challenge follows as facilitating accurate synchronization requires that the synchronization parameters correspond to the scenario parameters, however, to date, the optimal discriminator for a given scenario parameters is unknown. In particular, attempting to apply the classic weights of [1] results in very poor synchronization performance. We address this challenge by employing DNN-based phase and period discriminators for the HD regime. Combined with a temporal update regime that facilitates decoupling of the phase and the frequency updates, the proposed approach achieves significant improvement compared to the (generalized) classic approach of [1]. Future work will focus on further improving the performance of the DNN-based scheme by considering different initialization procedures, and evaluation of performance for different channel conditions relevant to wireless communications.
References
- [1] O. Simeone, U. Spagnolini, Y. Bar-Ness, and S. H. Strogatz, “Distributed synchronization in wireless networks,” IEEE Signal Process. Mag., vol. 25, no. 5, pp. 81–97, Sep. 2008.
- [2] E. Abakasanga, N. Shlezinger, and R. Dabora, “Unsupervised deep-learning for distributed clock synchronization in wireless networks,” IEEE Trans. Veh. Technol., vol. 72, no. 9, pp. 12 234–12 247, 2023.
- [3] O. Simeone and U. Spagnolini, “Distributed time synchronization in wireless sensor networks with coupled discrete-time oscillators,” EURASIP J Wirel. Commun. Netw., vol. 2007, pp. 1–13, Jun. 2007.
- [4] W. Jaafar, S. Naser, S. Muhaidat, P. C. Sofotasios, and H. Yanikomeroglu, “Multiple access in aerial networks: From orthogonal and non-orthogonal to rate-splitting,” IEEE Open J. Veh. Technol., vol. 1, pp. 372–392, 2020.
- [5] J. Zhu and S. S. Kia, “A spin-based dynamic TDMA communication for a UWB-based infrastructure-free cooperative navigation,” IEEE Sens. Lett., vol. 4, no. 7, pp. 1–4, 2020.
- [6] J. C. López-Ardao, R. F. Rodríguez-Rubio, A. Suárez-González, M. Rodríguez-Pérez, and M. E. Sousa-Vieira, “Current trends on green wireless sensor networks,” Sensors, vol. 21, no. 13, 2021.
- [7] M. K. Maggs, S. G. O’Keefe, and D. V. Thiel, “Consensus clock synchronization for wireless sensor networks,” IEEE Sens. J., vol. 12, no. 6, pp. 2269–2277, Jun. 2012.
- [8] I. Zino, R. Dabora, and H. V. Poor, “Unsupervised distributed learning for accurate clock synchronization in half-duplex TDMA networks,” in preparation.