Model-Based Learning for Network Clock Synchronization in Half-Duplex TDMA Networks

Itay Zino, Ron Dabora, , and H. Vincent Poor I. Zino and R. Dabora are with the School of Electrical and Computer Engineering, Ben-Gurion University of the Negev, Be’er-Sheva, Israel (e-mail: [email protected]; [email protected]); H. V. Poor (email: [email protected]) is with the Department of Electrical and Computer Engineering, Princeton University, Princeton, NJ, USA. R. Dabora is currently a Visiting Fellow at Princeton University. This work was supported in part by the Israel Science Foundation under Grant 584/20, by the Israel Ministry of Economy via the 5G-WIN Consortium, and by the U.S National Science Foundation under Grants CNS-2128448 and ECCS-2335876. © © 20xx IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
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

We consider a network with N𝑁Nitalic_N nodes, indexed by i{1,2,,N}N𝑖12𝑁subscript𝑁i\in\{1,2,...,N\}\triangleq\mathcal{I}_{N}italic_i ∈ { 1 , 2 , … , italic_N } ≜ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT. Each node i𝑖iitalic_i has a clock oscillator with its own inherent period, denoted by Tisubscript𝑇𝑖T_{i}italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Ignoring phase noise (see, e.g., [7, Sec. V], [1]), then, at update index k𝒵𝑘𝒵k\in\mathcal{Z}italic_k ∈ caligraphic_Z the clock time at node i𝑖iitalic_i, ϕi[k]subscriptitalic-ϕ𝑖delimited-[]𝑘\phi_{i}[k]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ], can be expressed as

ϕi[k]=ϕi[0]+kTi,subscriptitalic-ϕ𝑖delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]0𝑘subscript𝑇𝑖\phi_{i}[k]=\phi_{i}[0]+k\cdot T_{i},italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] + italic_k ⋅ italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , (1)

where ϕi[0]subscriptitalic-ϕ𝑖delimited-[]0\phi_{i}[0]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] denotes the clock time at index k=0𝑘0k=0italic_k = 0.

II-A2 Scenario Parameters

As a baseline example, we set the network size to N=16𝑁16N=16italic_N = 16 nodes, deployed in a square area with a side-length of 10 [Km]10 [Km]10\mbox{ [Km]}10 [Km]. We assume 2222-ray propagation with antenna height 1.51.51.51.5 [m], transmit power of 33333333 [dBm], and a reception threshold of Pth=114subscript𝑃𝑡114P_{th}=-114italic_P start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT = - 114 [dBm]. With the node deployment depicted by the circles in Fig. 1, it follows that 30%percent3030\%30 % 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 5555 [msec] and the respective nominal TDMA frequency is fnom=200[Hz]subscript𝑓nom200delimited-[]Hzf_{\rm nom}=200\;[\mbox{Hz}]italic_f start_POSTSUBSCRIPT roman_nom end_POSTSUBSCRIPT = 200 [ Hz ]. We model clock uncertainty by generating the initial TDMA frequency fisubscript𝑓𝑖f_{i}italic_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT at each node i𝑖iitalic_i randomly, according to a uniform distribution fi𝕌[fnom(1150106),fnom(1+150106)]similar-tosubscript𝑓𝑖𝕌subscript𝑓nom1150superscript106subscript𝑓nom1150superscript106f_{i}\sim\mathds{U}[f_{\rm nom}(1-150\cdot 10^{-6}),f_{\rm nom}(1+150\cdot 10^% {-6})]italic_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∼ blackboard_U [ italic_f start_POSTSUBSCRIPT roman_nom end_POSTSUBSCRIPT ( 1 - 150 ⋅ 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT ) , italic_f start_POSTSUBSCRIPT roman_nom end_POSTSUBSCRIPT ( 1 + 150 ⋅ 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT ) ], which corresponds to clock accuracy of 150 [ppm]. The initial TDMA period at node i𝑖iitalic_i is obtained as Ti=1fisubscript𝑇𝑖1subscript𝑓𝑖T_{i}=\frac{1}{f_{i}}italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG italic_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_ARG. Each node is then assigned an initial phase ϕi[0]subscriptitalic-ϕ𝑖delimited-[]0\phi_{i}[0]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] uniformly distributed over [0,Ti]0subscript𝑇𝑖[0,T_{i}][ 0 , italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ]. After startup, the nodes begin to transmit their signatures, such that at time k𝑘kitalic_k, node i=(kmodN)+1𝑖modulo𝑘𝑁1i=(k\!\!\mod{\!N})+1italic_i = ( italic_k roman_mod italic_N ) + 1 transmits and the remaining N1𝑁1N-1italic_N - 1 nodes receive. Each receiving node assigns a time stamp and a received signal power value to each received signature. At time indices k𝑘kitalic_k such that (kmodN)=N1modulo𝑘𝑁𝑁1(k\!\!\mod{\!N})\!=\!N-1( italic_k roman_mod italic_N ) = italic_N - 1, 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 Ti[k]subscript𝑇𝑖delimited-[]𝑘T_{i}[k]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] denote the period of the clock at node i𝑖iitalic_i at time index k𝑘kitalic_k, and Ti[0]subscript𝑇𝑖delimited-[]0T_{i}[0]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] denote the initial period value.

Refer to caption
Figure 1: Nodes placement for the baseline scenario (nodes are denoted by circles). Links over which the signal is received at the respective destination above the reception threshold are denoted by lines.

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 k𝑘kitalic_k s.t. (kmodN)=N1modulo𝑘𝑁𝑁1(k\mod{N})=N-1( italic_k roman_mod italic_N ) = italic_N - 1. The phase is plotted as the offset w.r.t. to the mean instantaneous phase, defined as ϕ¯[k]1Ni=1Nϕi[k]¯italic-ϕdelimited-[]𝑘1𝑁superscriptsubscript𝑖1𝑁subscriptitalic-ϕ𝑖delimited-[]𝑘\bar{\phi}[k]\triangleq\frac{1}{N}\sum_{i=1}^{N}\phi_{i}[k]over¯ start_ARG italic_ϕ end_ARG [ italic_k ] ≜ divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ].

Refer to caption
Figure 2: Clock phases in an HD-TDMA network without period update. Each line depicts the clock phase at one node.

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 T¯[k]1Ni=1NTi[k]¯𝑇delimited-[]𝑘1𝑁superscriptsubscript𝑖1𝑁subscript𝑇𝑖delimited-[]𝑘\bar{T}[k]\triangleq\frac{1}{N}\sum_{i=1}^{N}T_{i}[k]over¯ start_ARG italic_T end_ARG [ italic_k ] ≜ divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ]:

NPDR[k]NPDRdelimited-[]𝑘\displaystyle\mbox{NPDR}[k]NPDR [ italic_k ] \displaystyle\triangleq (maxi1Nϕi1[k]mini2Nϕi2[k])/T¯[k].subscriptsubscript𝑖1subscript𝑁subscriptitalic-ϕsubscript𝑖1delimited-[]𝑘subscriptsubscript𝑖2subscript𝑁subscriptitalic-ϕsubscript𝑖2delimited-[]𝑘¯𝑇delimited-[]𝑘\displaystyle\Big{(}\mathop{\max}\limits_{i_{1}\in\mathcal{I}_{N}}\phi_{i_{1}}% [k]-\mathop{\min}\limits_{i_{2}\in\mathcal{I}_{N}}\phi_{i_{2}}[k]\Big{)}/\bar{% T}[k].( roman_max start_POSTSUBSCRIPT italic_i start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_ϕ start_POSTSUBSCRIPT italic_i start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT [ italic_k ] - roman_min start_POSTSUBSCRIPT italic_i start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_ϕ start_POSTSUBSCRIPT italic_i start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT [ italic_k ] ) / over¯ start_ARG italic_T end_ARG [ italic_k ] . (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 i𝑖iitalic_i, as stated in [1, Eqn. (16)]:

ϕi[k+1]=ϕi[k]+Ti[0]+ε0j𝒩(i)αi,j(ϕj[k]+qi,jϕi[k]),subscriptitalic-ϕ𝑖delimited-[]𝑘1subscriptitalic-ϕ𝑖delimited-[]𝑘subscript𝑇𝑖delimited-[]0subscript𝜀0𝑗𝒩𝑖subscript𝛼𝑖𝑗subscriptitalic-ϕ𝑗delimited-[]𝑘subscript𝑞𝑖𝑗subscriptitalic-ϕ𝑖delimited-[]𝑘\phi_{i}[k+1]=\phi_{i}[k]+T_{i}[0]+\varepsilon_{0}\!\!\underset{j\in\mathcal{N% }(i)}{\sum}\!\!\alpha_{i,j}\cdot(\phi_{j}[k]+q_{i,j}-\phi_{i}[k]),italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k + 1 ] = italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] + italic_ε start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_UNDERACCENT italic_j ∈ caligraphic_N ( italic_i ) end_UNDERACCENT start_ARG ∑ end_ARG italic_α start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ⋅ ( italic_ϕ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k ] + italic_q start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] ) , (3)

where ε0subscript𝜀0\varepsilon_{0}italic_ε start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT denotes the loop gain, qi,jsubscript𝑞𝑖𝑗q_{i,j}italic_q start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT is the propagation delay between nodes i𝑖iitalic_i and j𝑗jitalic_j, and 𝒩(i)𝒩𝑖\mathcal{N}(i)caligraphic_N ( italic_i ) is the neighborhood set of node i𝑖iitalic_i, consisting of all the nodes whose signals are received at node i𝑖iitalic_i with power higher than Pthsubscript𝑃𝑡P_{th}italic_P start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT. Note that here the clock period is fixed at Ti[0]subscript𝑇𝑖delimited-[]0T_{i}[0]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ 0 ] as this value is not updated by the algorithm [1]. Let Pi,j[k]subscript𝑃𝑖𝑗delimited-[]𝑘P_{i,j}[k]italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] denote the power of the signal received at node i𝑖iitalic_i from node j𝑗jitalic_j at time index k𝑘kitalic_k, and denote by ti,j[k]ϕj[k]+qi,jsubscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑗delimited-[]𝑘subscript𝑞𝑖𝑗t_{i,j}[k]\triangleq\phi_{j}[k]+q_{i,j}italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] ≜ italic_ϕ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k ] + italic_q start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT the time stamp node i𝑖iitalic_i assigns to the signature received from node j𝑗jitalic_j. At startup, note i𝑖iitalic_i initializes the storage variables Δϕi,jprev.=Δϕi,j=P(i)[j]=0Δsuperscriptsubscriptitalic-ϕ𝑖𝑗prevΔsubscriptitalic-ϕ𝑖𝑗superscript𝑃𝑖delimited-[]𝑗0\Delta\phi_{i,j}^{\rm prev.}=\Delta\phi_{i,j}=P^{(i)}[j]=0roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_prev . end_POSTSUPERSCRIPT = roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT = italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = 0. At time index k𝑘kitalic_k, node j=(kmodN)+1𝑗modulo𝑘𝑁1j=(k\mod{N})+1italic_j = ( italic_k roman_mod italic_N ) + 1 transmits and nodes iNj𝑖subscript𝑁𝑗i\in\mathcal{I}_{N}\setminus jitalic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ∖ italic_j receive. Then, for any node iNj𝑖subscript𝑁𝑗i\in\mathcal{I}_{N}\setminus jitalic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ∖ italic_j for which Pi,j[k]>Pthsubscript𝑃𝑖𝑗delimited-[]𝑘subscript𝑃𝑡P_{i,j}[k]>P_{th}italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] > italic_P start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT, the node first updates 𝒩(i)𝒩𝑖\mathcal{N}(i)caligraphic_N ( italic_i ) to include j𝑗jitalic_j, and then computes and stores Δϕi,jprev.Δϕi,jΔsuperscriptsubscriptitalic-ϕ𝑖𝑗prevΔsubscriptitalic-ϕ𝑖𝑗\Delta\phi_{i,j}^{\rm prev.}\leftarrow\Delta\phi_{i,j}roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_prev . end_POSTSUPERSCRIPT ← roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, Δϕi,jti,j[k]ϕi[k]Δsubscriptitalic-ϕ𝑖𝑗subscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]𝑘\Delta\phi_{i,j}\leftarrow t_{i,j}[k]-\phi_{i}[k]roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ← italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ], and P(i)[j]Pi,j[k]superscript𝑃𝑖delimited-[]𝑗subscript𝑃𝑖𝑗delimited-[]𝑘P^{(i)}[j]\leftarrow P_{i,j}[k]italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ]. At times k𝑘kitalic_k s.t. (kmod3N)=2N1modulo𝑘3𝑁2𝑁1(k\!\!\mod{\!3N})=2N-1( italic_k roman_mod 3 italic_N ) = 2 italic_N - 1, the weights at node i𝑖iitalic_i are set to [1, Eqn. (8)]

αi,j=P(i)[j]/m𝒩(i)P(i)[m].subscript𝛼𝑖𝑗superscript𝑃𝑖delimited-[]𝑗𝑚𝒩𝑖superscript𝑃𝑖delimited-[]𝑚\alpha_{i,j}=P^{(i)}[j]/\underset{m\in\mathcal{N}(i)}{\sum}P^{(i)}[m].italic_α start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT = italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] / start_UNDERACCENT italic_m ∈ caligraphic_N ( italic_i ) end_UNDERACCENT start_ARG ∑ end_ARG italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_m ] .

In the following we generalize the algorithm of [1] to include period synchronization by introducing a nested loop designed to synchronize Ti[k]subscript𝑇𝑖delimited-[]𝑘T_{i}[k]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] across the different nodes. The generalized scheme, referred to in this work as the extended Simeone-Spagnolini-BarNess-Strogatz (ESSBS) algorithm, operates as follows:

ϕi[k+1]=ϕi[k]+Ti[k]+Qϕ,i[k]subscriptitalic-ϕ𝑖delimited-[]𝑘1subscriptitalic-ϕ𝑖delimited-[]𝑘subscript𝑇𝑖delimited-[]𝑘subscript𝑄italic-ϕ𝑖delimited-[]𝑘\displaystyle\!\!\!\!\phi_{i}[k+1]=\phi_{i}[k]+T_{i}[k]+Q_{\phi,i}[k]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k + 1 ] = italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_Q start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT [ italic_k ]
Qϕ,i[k]={0,(kmod3N)3N1εϕm𝒩(i)αi,mΔϕi,m,(kmod3N)=3N1\displaystyle\!\!\!\!Q_{\phi,i}[k]=\left\{\begin{array}[]{cl}0&,(k\!\!\!\!\mod% {3N})\neq 3N-1\\ \!\!\varepsilon_{\phi}\!\!\!\!\underset{m\in\mathcal{N}(i)}{\sum}\!\!\!\!% \alpha_{i,m}\cdot\Delta\phi_{i,m}&,(k\!\!\!\!\mod{3N})=3N-1\end{array}\right.italic_Q start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT [ italic_k ] = { start_ARRAY start_ROW start_CELL 0 end_CELL start_CELL , ( italic_k roman_mod 3 italic_N ) ≠ 3 italic_N - 1 end_CELL end_ROW start_ROW start_CELL italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_UNDERACCENT italic_m ∈ caligraphic_N ( italic_i ) end_UNDERACCENT start_ARG ∑ end_ARG italic_α start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT ⋅ roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT end_CELL start_CELL , ( italic_k roman_mod 3 italic_N ) = 3 italic_N - 1 end_CELL end_ROW end_ARRAY (6)
Ti[k+1]=Ti[k]+QT,i[k]/Nsubscript𝑇𝑖delimited-[]𝑘1subscript𝑇𝑖delimited-[]𝑘subscript𝑄𝑇𝑖delimited-[]𝑘𝑁\displaystyle\!\!\!T_{i}[k+1]=T_{i}[k]+Q_{T,i}[k]/Nitalic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k + 1 ] = italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_Q start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT [ italic_k ] / italic_N
QT,i[k]={0,0(kmod3N)<2N1εTm𝒩(i)αi,m(Δϕi,mΔϕi,mprev.),(kmod3N)=2N1QT,i[k1],2N(kmod3N)<3N1\displaystyle\!\!\!\!Q_{T,i}[k]\!=\!\!\left\{\begin{array}[]{cl}\!\!\!\!\!\!0&% \!\!\!,0\leq(k\!\!\!\!\mod{3N})<2N\!\!-\!\!1\\ \!\!\varepsilon_{T}\!\!\!\!\underset{m\in\mathcal{N}(i)}{\sum}\!\!\!\!\!\alpha% _{i,m}(\Delta\phi_{i,m}&\\ \;\;\;\;\;\;\;\!\!\!\!-\Delta\phi_{i,m}^{\rm prev.})&\!\!\!,(k\!\!\!\!\mod{3N}% )=2N-1\\ \!\!\!\!\!\!\!\!\!\!\!Q_{T,i}[k-1]&\!\!\!,2N\!\leq\!(k\!\!\!\!\mod{3N})\!<\!3N% \!\!-\!\!1\end{array}\right.\!italic_Q start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT [ italic_k ] = { start_ARRAY start_ROW start_CELL 0 end_CELL start_CELL , 0 ≤ ( italic_k roman_mod 3 italic_N ) < 2 italic_N - 1 end_CELL end_ROW start_ROW start_CELL italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_UNDERACCENT italic_m ∈ caligraphic_N ( italic_i ) end_UNDERACCENT start_ARG ∑ end_ARG italic_α start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT ( roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL - roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_prev . end_POSTSUPERSCRIPT ) end_CELL start_CELL , ( italic_k roman_mod 3 italic_N ) = 2 italic_N - 1 end_CELL end_ROW start_ROW start_CELL italic_Q start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT [ italic_k - 1 ] end_CELL start_CELL , 2 italic_N ≤ ( italic_k roman_mod 3 italic_N ) < 3 italic_N - 1 end_CELL end_ROW end_ARRAY (11)

Fig. 3 presents a schematic depiction of the ESSBS algorithm.

Refer to caption
Figure 3: Schematic description of the ESSBS algorithm (Eqns. (II-B)–(II-B)).

In Sec. III we elaborate on the factor of 3333 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.

Refer to caption
Figure 4: Performance of the ESSBS algorithm: (a) The evolution of the clock periods Ti[k]subscript𝑇𝑖delimited-[]𝑘T_{i}[k]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] vs. k𝑘kitalic_k, where each line represents the evolution of the clock period at a different node in the network; (b) The NPDR of the network vs. k𝑘kitalic_k.

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 ψT,i(𝜽T,i)()superscriptsubscript𝜓𝑇𝑖subscript𝜽𝑇𝑖\psi_{T,i}^{(\bm{\theta}_{T,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ) and ψϕ,i(𝜽ϕ,i)()superscriptsubscript𝜓italic-ϕ𝑖subscript𝜽italic-ϕ𝑖\psi_{\phi,i}^{(\bm{\theta}_{\phi,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ) denote the DNNs used for computing the weights for the period and for the phase update loops at node iN𝑖subscript𝑁i\in\mathcal{I}_{N}italic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT, respectively, where 𝜽T,isubscript𝜽𝑇𝑖\bm{\theta}_{T,i}bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT and 𝜽ϕ,isubscript𝜽italic-ϕ𝑖\bm{\theta}_{\phi,i}bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT denote their respective DNN parameters. In the HD regime, a node requires N𝑁Nitalic_N 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 k𝑘kitalic_k such that (kmodN)N1modulo𝑘𝑁𝑁1(k\mod{N})\neq N-1( italic_k roman_mod italic_N ) ≠ italic_N - 1, node iN𝑖subscript𝑁i\in\mathcal{I}_{N}italic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT updates its clock phase and frequency via

ϕi[k+1]subscriptitalic-ϕ𝑖delimited-[]𝑘1\displaystyle\phi_{i}[k+1]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k + 1 ] =\displaystyle== ϕi[k]+Ti[k]+Ωi[k]subscriptitalic-ϕ𝑖delimited-[]𝑘subscript𝑇𝑖delimited-[]𝑘subscriptΩ𝑖delimited-[]𝑘\displaystyle\phi_{i}[k]+T_{i}\left[k\right]+\Omega_{i}[k]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] (12a)
Ti[k+1]subscript𝑇𝑖delimited-[]𝑘1\displaystyle T_{i}[k+1]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k + 1 ] =\displaystyle== Ti[k]+Ai[k]/N,subscript𝑇𝑖delimited-[]𝑘subscript𝐴𝑖delimited-[]𝑘𝑁\displaystyle T_{i}[k]+A_{i}[k]/N,italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] + italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] / italic_N , (12b)

where Ai[k]subscript𝐴𝑖delimited-[]𝑘A_{i}[k]italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] denotes the period correction term at node i𝑖iitalic_i at time k𝑘kitalic_k, and Ωi[k]subscriptΩ𝑖delimited-[]𝑘\Omega_{i}[k]roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] is the corresponding phase correction term. In addition to updating their clocks, at time slot k𝑘kitalic_k the node with index j=(kmodN)+1𝑗modulo𝑘𝑁1j=(k\mod{N})+1italic_j = ( italic_k roman_mod italic_N ) + 1 transmits its synchronization signature while the remaining N1𝑁1N-1italic_N - 1 nodes, iNj𝑖subscript𝑁𝑗i\in\mathcal{I}_{N}\setminus jitalic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ∖ italic_j are set to receive. Let Xϕ(i)[j]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗X_{\phi}^{(i)}[j]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] denote the phase difference between nodes j𝑗jitalic_j and i𝑖iitalic_i, stored at node i𝑖iitalic_i at the previous update cycle. Upon reception, each node iNj𝑖subscript𝑁𝑗i\in\mathcal{I}_{N}\setminus jitalic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ∖ italic_j for which Pi,j[k]>Pthsubscript𝑃𝑖𝑗delimited-[]𝑘subscript𝑃𝑡P_{i,j}[k]>P_{th}italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] > italic_P start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT, stores P(i)[j]Pi,j[k]superscript𝑃𝑖delimited-[]𝑗subscript𝑃𝑖𝑗delimited-[]𝑘P^{(i)}[j]\leftarrow P_{i,j}[k]italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ], otherwise it sets P(i)[j]=0superscript𝑃𝑖delimited-[]𝑗0P^{(i)}[j]=0italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = 0. A node i𝑖iitalic_i for which P(i)[j]>0superscript𝑃𝑖delimited-[]𝑗0P^{(i)}[j]>0italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] > 0 computes and stores the period difference w.r.t. node j𝑗jitalic_j, defined as XT(i)[j]1N(ti,j[k]ϕi[k]Xϕ(i)[j])superscriptsubscript𝑋𝑇𝑖delimited-[]𝑗1𝑁subscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]𝑘superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗X_{T}^{(i)}[j]\leftarrow\frac{1}{N}\big{(}t_{i,j}[k]-\phi_{i}[k]-X_{\phi}^{(i)% }[j]\big{)}italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ( italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] - italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ). Node i𝑖iitalic_i then proceeds to store the new receive phase difference Xϕ(i)[j]ti,j[k]ϕi[k]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗subscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]𝑘X_{\phi}^{(i)}[j]\leftarrow t_{i,j}[k]-\phi_{i}[k]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ]. If P(i)[j]=0superscript𝑃𝑖delimited-[]𝑗0P^{(i)}[j]=0italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = 0, then node i𝑖iitalic_i sets Xϕ(i)[j]=XT(i)[j]=0superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗superscriptsubscript𝑋𝑇𝑖delimited-[]𝑗0X_{\phi}^{(i)}[j]=X_{T}^{(i)}[j]=0italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = 0.

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 3333 alternating actions, and therefore, a cycle of frequency and phase updates spans 3N3𝑁3N3 italic_N times indices. We denote the interval for which (kmod3N){0,2N2}modulo𝑘3𝑁02𝑁2(k\mod{3N})\in\{0,2N-2\}( italic_k roman_mod 3 italic_N ) ∈ { 0 , 2 italic_N - 2 } as a “collection-only” interval, at which the clocks are updated via Eqns. (12) where the correction terms are set to Ωi[k]=Ai[k]=0subscriptΩ𝑖delimited-[]𝑘subscript𝐴𝑖delimited-[]𝑘0\Omega_{i}[k]=A_{i}[k]=0roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = 0. The “period update” action takes place at k𝑘kitalic_k such that (kmod3N){2N1,3N2}modulo𝑘3𝑁2𝑁13𝑁2(k\mod{3N})\in\{2N-1,3N-2\}( italic_k roman_mod 3 italic_N ) ∈ { 2 italic_N - 1 , 3 italic_N - 2 }. 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 ψT,i(𝜽T,i)()superscriptsubscript𝜓𝑇𝑖subscript𝜽𝑇𝑖\psi_{T,i}^{(\bm{\theta}_{T,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ), which replace the weights αi,msubscript𝛼𝑖𝑚\alpha_{i,m}italic_α start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT’s used in the rule (II-B), while Ωi[k]=0subscriptΩ𝑖delimited-[]𝑘0\Omega_{i}[k]=0roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = 0. The period correction signal at node i𝑖iitalic_i is given by

Ai[k]=εTj=1,jiN[ψT,i(𝜽T,i)({(XT(i)[j],P(i)[j])}j=1,jiN)]jXT(i)[j].subscript𝐴𝑖delimited-[]𝑘subscript𝜀𝑇superscriptsubscript𝑗1𝑗𝑖𝑁subscriptdelimited-[]superscriptsubscript𝜓𝑇𝑖subscript𝜽𝑇𝑖superscriptsubscriptsuperscriptsubscript𝑋𝑇𝑖delimited-[]superscript𝑗superscript𝑃𝑖delimited-[]superscript𝑗superscript𝑗1superscript𝑗𝑖𝑁𝑗superscriptsubscript𝑋𝑇𝑖delimited-[]𝑗\displaystyle\!\!\!\!A_{i}[k]\!=\!\varepsilon_{T}\!\mathop{\sum}\limits_{% \begin{subarray}{c}j=1,\\ j\neq i\end{subarray}}^{N}\!\!\Big{[}\!\psi_{T,i}^{(\bm{\theta}_{T,i})}\!\Big{% (}\!\Big{\{}\!\big{(}X_{T}^{(i)}[j^{\prime}],\!P^{(i)}[j^{\prime}]\big{)}\!% \Big{\}}_{\begin{subarray}{c}j^{\prime}=1,\\ j^{\prime}\neq i\end{subarray}}^{N}\Big{)}\!\Big{]}_{j}\!\!\!\cdot\!X_{T}^{(i)% }[j].italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT ∑ start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j = 1 , end_CELL end_ROW start_ROW start_CELL italic_j ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT [ italic_ψ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( { ( italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] , italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] ) } start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = 1 , end_CELL end_ROW start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT ) ] start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ⋅ italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] . (13)

Finally, a phase correction update is applied when (kmod3N)=3N1modulo𝑘3𝑁3𝑁1(k\mod{3N})=3N-1( italic_k roman_mod 3 italic_N ) = 3 italic_N - 1, by weighting the received clock phase differences with weights generated by the DNN ψϕ,i(𝜽ϕ,i)()superscriptsubscript𝜓italic-ϕ𝑖subscript𝜽italic-ϕ𝑖\psi_{\phi,i}^{(\bm{\theta}_{\phi,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ), which replace the weights αi,msubscript𝛼𝑖𝑚\alpha_{i,m}italic_α start_POSTSUBSCRIPT italic_i , italic_m end_POSTSUBSCRIPT’s used Eqn. (II-B), while Ai[k]=0subscript𝐴𝑖delimited-[]𝑘0A_{i}[k]=0italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = 0. The phase correction signal at node i𝑖iitalic_i is given by

Ωi[k]=εϕj=1,jiN[ψϕ,i(𝜽ϕ,i)({(Xϕ(i)[j],P(i)[j])}j=1,jiN)]jXϕ(i)[j].subscriptΩ𝑖delimited-[]𝑘subscript𝜀italic-ϕsuperscriptsubscript𝑗1𝑗𝑖𝑁subscriptdelimited-[]superscriptsubscript𝜓italic-ϕ𝑖subscript𝜽italic-ϕ𝑖superscriptsubscriptsuperscriptsubscript𝑋italic-ϕ𝑖delimited-[]superscript𝑗superscript𝑃𝑖delimited-[]superscript𝑗superscript𝑗1superscript𝑗𝑖𝑁𝑗superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗\displaystyle\!\!\!\!\Omega_{i}[k]\!=\!\varepsilon_{\phi}\mathop{\sum}\limits_% {\begin{subarray}{c}j=1,\\ j\neq i\end{subarray}}^{N}\!\Big{[}\psi_{\phi,i}^{\!\!(\bm{\theta}_{\phi,i})}% \!\Big{(}\!\Big{\{}\!\!\big{(}X_{\phi}^{(i)}[j^{\prime}],\!P^{(i)}[j^{\prime}]% \big{)}\!\!\Big{\}}_{\begin{subarray}{c}j^{\prime}=1,\\ j^{\prime}\neq i\end{subarray}}^{N}\Big{)}\Big{]}_{j}\!\!\!\cdot\!X_{\phi}^{(i% )}[j].roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT ∑ start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j = 1 , end_CELL end_ROW start_ROW start_CELL italic_j ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT [ italic_ψ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( { ( italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] , italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] ) } start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = 1 , end_CELL end_ROW start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT ) ] start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ⋅ italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] . (14)

The proposed algorithm is schematically depicted in Fig. 5.

Refer to caption
Figure 5: Schematic description of the proposed PFDSA.

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 NTsubscript𝑁𝑇N_{T}italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT TDMA frames, each consisting of N𝑁Nitalic_N transmissions, one from each node in the network. During this step, each node i𝑖iitalic_i uses its initial, randomly generated DNN parameters, 𝜽ϕ,isubscript𝜽italic-ϕ𝑖\bm{\theta}_{\phi,i}bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT and 𝜽T,isubscript𝜽𝑇𝑖\bm{\theta}_{T,i}bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT, to generate its clock times via the PFDSA, while concurrently storing all its measured time stamps and received signal powers. For example, at time k𝑘kitalic_k, following the TDMA time-slot assignment, node j=(kmodN)+1𝑗modulo𝑘𝑁1j=(k\!\mod N)+1italic_j = ( italic_k roman_mod italic_N ) + 1 transmits, and each node iNj𝑖subscript𝑁𝑗i\in\mathcal{I}_{N}\setminus jitalic_i ∈ caligraphic_I start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ∖ italic_j stores its receive time stamp ti,j[k]subscript𝑡𝑖𝑗delimited-[]𝑘t_{i,j}[k]italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] and received powers Pi,j[k]subscript𝑃𝑖𝑗delimited-[]𝑘P_{i,j}[k]italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] (if Pi,j[k]<Pthsubscript𝑃𝑖𝑗delimited-[]𝑘subscript𝑃𝑡P_{i,j}[k]<P_{th}italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] < italic_P start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT, then both stored parameters are set to 00). Thus, for every time k𝑘kitalic_k, node i𝑖iitalic_i stores the pair 𝒟(i)[k]{ti,j[k],Pi,j[k]}superscript𝒟𝑖delimited-[]𝑘subscript𝑡𝑖𝑗delimited-[]𝑘subscript𝑃𝑖𝑗delimited-[]𝑘\mathcal{D}^{(i)}[k]\triangleq\big{\{}t_{i,j}[k],P_{i,j}[k]\big{\}}caligraphic_D start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_k ] ≜ { italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] , italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] }, where j=(kmodN)+1𝑗modulo𝑘𝑁1j=(k\!\mod N)+1italic_j = ( italic_k roman_mod italic_N ) + 1, ji𝑗𝑖j\neq iitalic_j ≠ italic_i. Note that during the entire acquisition step, the parameters of both DNNs remain fixed. Due to the HD transmission protocol, the acquisition step spans NNT𝑁subscript𝑁𝑇N\cdot N_{T}italic_N ⋅ italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT time indices k𝑘kitalic_k.

Based on the NTsubscript𝑁𝑇N_{T}italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT TDMA frames received during data acquisition, each node i𝑖iitalic_i generates a training set containing NTsubscript𝑁𝑇N_{T}italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT samples, where each sample consists of N1𝑁1N-1italic_N - 1 pairs, 𝒟(i)[k]superscript𝒟𝑖delimited-[]𝑘\mathcal{D}^{(i)}[k]caligraphic_D start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_k ], containing the receive time stamp and received power.

𝒟i={ti,(kmodN)+1[k],Pi,(kmodN)+1[k]}k=0,(kmodN)i1NNT1subscript𝒟𝑖superscriptsubscriptsubscript𝑡𝑖modulo𝑘𝑁1delimited-[]𝑘subscript𝑃𝑖modulo𝑘𝑁1delimited-[]𝑘𝑘0modulo𝑘𝑁𝑖1𝑁subscript𝑁𝑇1\mathcal{D}_{i}=\Big{\{}t_{i,(k\!\mod\!N)+1}[k],P_{i,(k\!\mod{N})+1}[k]\Big{\}% }_{\begin{subarray}{c}k=0,\\ \!(k\!\mod\!N)\neq i-1\end{subarray}}^{N\cdot N_{T}-1}caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = { italic_t start_POSTSUBSCRIPT italic_i , ( italic_k roman_mod italic_N ) + 1 end_POSTSUBSCRIPT [ italic_k ] , italic_P start_POSTSUBSCRIPT italic_i , ( italic_k roman_mod italic_N ) + 1 end_POSTSUBSCRIPT [ italic_k ] } start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_k = 0 , end_CELL end_ROW start_ROW start_CELL ( italic_k roman_mod italic_N ) ≠ italic_i - 1 end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N ⋅ italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT - 1 end_POSTSUPERSCRIPT

IV-B Training Procedure

Once the acquisition step is completed, node i𝑖iitalic_i processes the stored training data at sample kN𝑘𝑁k\geq Nitalic_k ≥ italic_N as follows: Let j=(kmodN)+1𝑗modulo𝑘𝑁1j=(k\mod{N})+1italic_j = ( italic_k roman_mod italic_N ) + 1. Then, if Pi,j[k]>0subscript𝑃𝑖𝑗delimited-[]𝑘0P_{i,j}[k]>0italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] > 0, node i𝑖iitalic_i computes

Δϕi,j[k]Δsubscriptitalic-ϕ𝑖𝑗delimited-[]𝑘\displaystyle\Delta\phi_{i,j}[k]roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] =\displaystyle== ti,j[k]ϕi[k]subscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]𝑘\displaystyle t_{i,j}[k]-\phi_{i}[k]italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] (15)
Ti,j[k]subscript𝑇𝑖𝑗delimited-[]𝑘\displaystyle T_{i,j}[k]italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] =\displaystyle== ti,j[k]ti,j[kN+1].subscript𝑡𝑖𝑗delimited-[]𝑘subscript𝑡𝑖𝑗delimited-[]𝑘𝑁1\displaystyle t_{i,j}[k]-t_{i,j}[k-N+1].italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k - italic_N + 1 ] . (16)

Using the definition of ti,j[k]subscript𝑡𝑖𝑗delimited-[]𝑘t_{i,j}[k]italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] and the update rules (12) in (16) we can express Ti,j[k]subscript𝑇𝑖𝑗delimited-[]𝑘T_{i,j}[k]italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] via the period and the phase correction signals as follows:

Ti,j[k]subscript𝑇𝑖𝑗delimited-[]𝑘\displaystyle T_{i,j}[k]italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] =l=kN+1k(Aj[l]N+Ωj[l])+NTj[kN+1]absentsuperscriptsubscript𝑙𝑘𝑁1𝑘subscript𝐴𝑗delimited-[]𝑙𝑁subscriptΩ𝑗delimited-[]𝑙𝑁subscript𝑇𝑗delimited-[]𝑘𝑁1\displaystyle=\!\!\!\!\sum_{l=k-N+1}^{k}(\frac{A_{j}[l]}{N}+\Omega_{j}[l])+N% \cdot T_{j}[k-N+1]= ∑ start_POSTSUBSCRIPT italic_l = italic_k - italic_N + 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT ( divide start_ARG italic_A start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_l ] end_ARG start_ARG italic_N end_ARG + roman_Ω start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_l ] ) + italic_N ⋅ italic_T start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k - italic_N + 1 ]
=Aj[kN+1]N(Nj+1)+Aj[k]N(j1)absentsubscript𝐴𝑗delimited-[]𝑘𝑁1𝑁𝑁𝑗1subscript𝐴𝑗delimited-[]𝑘𝑁𝑗1\displaystyle=\!\frac{A_{j}[k\!-\!N\!\!+\!1]}{N}\cdot(\!N\!\!-\!j\!+\!1\!)\!+% \!\frac{A_{j}[k]}{N}\cdot(\!j\!-\!1\!)= divide start_ARG italic_A start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k - italic_N + 1 ] end_ARG start_ARG italic_N end_ARG ⋅ ( italic_N - italic_j + 1 ) + divide start_ARG italic_A start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k ] end_ARG start_ARG italic_N end_ARG ⋅ ( italic_j - 1 )
+Ωj[kNN1]+NTj[kN+1].subscriptΩ𝑗delimited-[]𝑘𝑁𝑁1𝑁subscript𝑇𝑗delimited-[]𝑘𝑁1\displaystyle\qquad+\!\Omega_{j}\!\!\left[\left\lfloor\frac{k}{N}\right\rfloor% \!\!N\!\!-\!1\!\right]+N\cdot T_{j}[k-N+1].+ roman_Ω start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ ⌊ divide start_ARG italic_k end_ARG start_ARG italic_N end_ARG ⌋ italic_N - 1 ] + italic_N ⋅ italic_T start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k - italic_N + 1 ] .

Observe that Ti,j[k]subscript𝑇𝑖𝑗delimited-[]𝑘T_{i,j}[k]italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] represents node i𝑖iitalic_i’s estimate of the TDMA frame duration of node j𝑗jitalic_j, at time k𝑘kitalic_k. Note that this estimate will have an offset at some values of k𝑘kitalic_k due to the phase correction term, which is non-zero only at values of k𝑘kitalic_k for which (kmod3N)=3N1modulo𝑘3𝑁3𝑁1(k\mod{3N})=3N-1( italic_k roman_mod 3 italic_N ) = 3 italic_N - 1, and to the change in Aj[k]subscript𝐴𝑗delimited-[]𝑘A_{j}[k]italic_A start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k ] within a set of N1𝑁1N-1italic_N - 1 samples at node i𝑖iitalic_i, which occurs when (kmod3N)=2N1modulo𝑘3𝑁2𝑁1(k\mod{3N})=2N-1( italic_k roman_mod 3 italic_N ) = 2 italic_N - 1. Recall also that Aj[k]subscript𝐴𝑗delimited-[]𝑘A_{j}[k]italic_A start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT [ italic_k ] is non-zero only for k𝑘kitalic_k s.t. (kmod3N){2N1,3N2}modulo𝑘3𝑁2𝑁13𝑁2(k\mod{3N})\in\{2N-1,3N-2\}( italic_k roman_mod 3 italic_N ) ∈ { 2 italic_N - 1 , 3 italic_N - 2 }.

Next, the features used for computing the outputs of the DNNs ψT,i(𝜽T,i)()superscriptsubscript𝜓𝑇𝑖subscript𝜽𝑇𝑖\psi_{T,i}^{(\bm{\theta}_{T,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ) and ψϕ,i(𝜽ϕ,i)()superscriptsubscript𝜓italic-ϕ𝑖subscript𝜽italic-ϕ𝑖\psi_{\phi,i}^{(\bm{\theta}_{\phi,i})}(\cdot)italic_ψ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( ⋅ ) are obtained in the following order

XT(i)[j]superscriptsubscript𝑋𝑇𝑖delimited-[]𝑗\displaystyle X_{T}^{(i)}[j]italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] \displaystyle\leftarrow 1N(Δϕi,j[k]Xϕ(i)[j])1𝑁Δsubscriptitalic-ϕ𝑖𝑗delimited-[]𝑘superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗\displaystyle\frac{1}{N}\big{(}\Delta\phi_{i,j}[k]-X_{\phi}^{(i)}[j]\big{)}divide start_ARG 1 end_ARG start_ARG italic_N end_ARG ( roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] )
Xϕ(i)[j]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗\displaystyle X_{\phi}^{(i)}[j]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] \displaystyle\leftarrow Δϕi,j[k]Δsubscriptitalic-ϕ𝑖𝑗delimited-[]𝑘\displaystyle\Delta\phi_{i,j}[k]roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ]
P(i)[j]superscript𝑃𝑖delimited-[]𝑗\displaystyle P^{(i)}[j]italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] \displaystyle\leftarrow Pi,j[k].subscript𝑃𝑖𝑗delimited-[]𝑘\displaystyle P_{i,j}[k].italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] .

Subsequently, the DNNs compute the weights for the phase loop and the frequency loop for generating the error signals at node i𝑖iitalic_i, using the respective 2(N1)2𝑁12(N-1)2 ( italic_N - 1 ) features at each DNN according to the time regime, i.e., when (kmod3N)=2N1modulo𝑘3𝑁2𝑁1(k\mod{3N})=2N-1( italic_k roman_mod 3 italic_N ) = 2 italic_N - 1, the DNN ψT,i(𝜽T,i)({(XT(i)[j],P(i)[j])}j=1,jiN)superscriptsubscript𝜓𝑇𝑖subscript𝜽𝑇𝑖superscriptsubscriptsuperscriptsubscript𝑋𝑇𝑖delimited-[]superscript𝑗superscript𝑃𝑖delimited-[]superscript𝑗superscript𝑗1superscript𝑗𝑖𝑁\psi_{T,i}^{(\bm{\theta}_{T,i})}\!\Big{(}\!\Big{\{}\!\big{(}X_{T}^{(i)}[j^{% \prime}],\!P^{(i)}[j^{\prime}]\big{)}\!\Big{\}}_{\begin{subarray}{c}j^{\prime}% =1,\\ j^{\prime}\neq i\end{subarray}}^{N}\Big{)}italic_ψ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( { ( italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] , italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] ) } start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = 1 , end_CELL end_ROW start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT ) is used for computing Ai[k]subscript𝐴𝑖delimited-[]𝑘A_{i}[k]italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] via (13). Then, Ai[k]subscript𝐴𝑖delimited-[]𝑘A_{i}[k]italic_A start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] is applied for period update when (kmod3N){2N1,3N2}modulo𝑘3𝑁2𝑁13𝑁2(k\mod{3N})\in\{2N-1,3N-2\}( italic_k roman_mod 3 italic_N ) ∈ { 2 italic_N - 1 , 3 italic_N - 2 }. When (kmod3N)=3N1modulo𝑘3𝑁3𝑁1(k\mod{3N})=3N-1( italic_k roman_mod 3 italic_N ) = 3 italic_N - 1, a phase correction is applied using (14) with Ωi[k]subscriptΩ𝑖delimited-[]𝑘\Omega_{i}[k]roman_Ω start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] obtained using the DNN ψϕ,i(𝜽ϕ,i)({(Xϕ(i)[j],P(i)[j])}j=1,jiN)superscriptsubscript𝜓italic-ϕ𝑖subscript𝜽italic-ϕ𝑖superscriptsubscriptsuperscriptsubscript𝑋italic-ϕ𝑖delimited-[]superscript𝑗superscript𝑃𝑖delimited-[]superscript𝑗superscript𝑗1superscript𝑗𝑖𝑁\psi_{\phi,i}^{\!\!(\bm{\theta}_{\phi,i})}\!\Big{(}\!\Big{\{}\!\!\big{(}X_{% \phi}^{(i)}[j^{\prime}],\!P^{(i)}[j^{\prime}]\big{)}\!\!\Big{\}}_{\begin{% subarray}{c}j^{\prime}=1,\\ j^{\prime}\neq i\end{subarray}}^{N}\Big{)}italic_ψ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT ( { ( italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] , italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] ) } start_POSTSUBSCRIPT start_ARG start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = 1 , end_CELL end_ROW start_ROW start_CELL italic_j start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ italic_i end_CELL end_ROW end_ARG end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT ). Letting 𝟙(𝒳)subscript1𝒳\mathds{1}_{(\mathcal{X})}blackboard_1 start_POSTSUBSCRIPT ( caligraphic_X ) end_POSTSUBSCRIPT denote the indicator function for the event 𝒳𝒳\mathcal{X}caligraphic_X, the loss functions are computed as follows:

𝒟i(𝜽i,ϕ)subscriptsubscript𝒟𝑖subscript𝜽𝑖italic-ϕ\displaystyle\!\!\!\!\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,\phi})caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT ) =k=1NTN1𝟙(P(j)[j]>0)log(k+1)(ti,j[k]ϕi[k])2absentsuperscriptsubscript𝑘1subscript𝑁𝑇𝑁1subscript1superscript𝑃𝑗delimited-[]𝑗0𝑘1superscriptsubscript𝑡𝑖𝑗delimited-[]𝑘subscriptitalic-ϕ𝑖delimited-[]𝑘2\displaystyle=\!\!\!\!\sum_{k=1}^{N_{T}\cdot N-1}\!\!\!\!\mathds{1}_{(P^{(j)}[% j]>0)}\log(k+1)(t_{i,j}[k]-\phi_{i}[k])^{2}= ∑ start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT ⋅ italic_N - 1 end_POSTSUPERSCRIPT blackboard_1 start_POSTSUBSCRIPT ( italic_P start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT [ italic_j ] > 0 ) end_POSTSUBSCRIPT roman_log ( italic_k + 1 ) ( italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (17)
𝒟i(𝜽i,T)subscriptsubscript𝒟𝑖subscript𝜽𝑖𝑇\displaystyle\!\!\!\!\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,T})\!caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT ) =k=1NTN1𝟙(P(j)[j]>0)log(k+1)(Ti,j[k]NTi[k])2.absentsuperscriptsubscript𝑘1subscript𝑁𝑇𝑁1subscript1superscript𝑃𝑗delimited-[]𝑗0𝑘1superscriptsubscript𝑇𝑖𝑗delimited-[]𝑘𝑁subscript𝑇𝑖delimited-[]𝑘2\displaystyle=\!\!\!\!\!\sum_{k=1}^{N_{T}\cdot N-1}\!\!\!\!\!\!\mathds{1}_{(P^% {(j)}[j]>0)}\log(k+1)\Big{(}\frac{T_{i,j}[k]}{N}\!-\!T_{i}[k]\Big{)}^{2}\!\!.= ∑ start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT ⋅ italic_N - 1 end_POSTSUPERSCRIPT blackboard_1 start_POSTSUBSCRIPT ( italic_P start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT [ italic_j ] > 0 ) end_POSTSUBSCRIPT roman_log ( italic_k + 1 ) ( divide start_ARG italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k ] end_ARG start_ARG italic_N end_ARG - italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT . (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.

Data: Data set 𝒟isubscript𝒟𝑖\mathcal{D}_{i}caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT consisting of NTsubscript𝑁𝑇N_{T}italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT tuples, each of length 2(N1)2𝑁12\cdot(N-1)2 ⋅ ( italic_N - 1 ); learning rate μ𝜇\muitalic_μ; initial weights (𝜽ϕ,i,𝜽T,i)subscript𝜽italic-ϕ𝑖subscript𝜽𝑇𝑖(\bm{\theta}_{\phi,i},\bm{\theta}_{T,i})( bold_italic_θ start_POSTSUBSCRIPT italic_ϕ , italic_i end_POSTSUBSCRIPT , bold_italic_θ start_POSTSUBSCRIPT italic_T , italic_i end_POSTSUBSCRIPT ), number of epochs Essubscript𝐸𝑠E_{s}italic_E start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT and Eloopsubscript𝐸loopE_{\text{loop}}italic_E start_POSTSUBSCRIPT loop end_POSTSUBSCRIPT, number of epochs for each loop Eloopsubscript𝐸loopE_{\text{loop}}italic_E start_POSTSUBSCRIPT loop end_POSTSUBSCRIPT, initial phases, {ϕi[k]}k=0N1superscriptsubscriptsubscriptitalic-ϕ𝑖delimited-[]𝑘𝑘0𝑁1\{\phi_{i}[k]\}_{k=0}^{N-1}{ italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] } start_POSTSUBSCRIPT italic_k = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N - 1 end_POSTSUPERSCRIPT.
1 for epoch1=1subscriptepoch11{\rm epoch}_{1}=1roman_epoch start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = 1 to Essubscript𝐸𝑠E_{s}italic_E start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT do
2       Initialize: for any j=1,2,,N𝑗12𝑁j=1,2,...,Nitalic_j = 1 , 2 , … , italic_N, ji𝑗𝑖j\neq iitalic_j ≠ italic_i:
3       Read {ti,j[j1],Pi,j[j1]}𝒟isubscript𝑡𝑖𝑗delimited-[]𝑗1subscript𝑃𝑖𝑗delimited-[]𝑗1subscript𝒟𝑖\left\{t_{i,j}[j-1],P_{i,j}[j-1]\right\}\in\mathcal{D}_{i}{ italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_j - 1 ] , italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_j - 1 ] } ∈ caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT
4       if  Pi,j[j1]>0subscript𝑃𝑖𝑗delimited-[]𝑗10P_{i,j}[j-1]>0italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_j - 1 ] > 0 then
5             Set Xϕ(i)[j]=ti,j[j1]ϕi[j1]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗subscript𝑡𝑖𝑗delimited-[]𝑗1subscriptitalic-ϕ𝑖delimited-[]𝑗1X_{\phi}^{(i)}[j]=t_{i,j}[j-1]-\phi_{i}[j-1]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] = italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_j - 1 ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_j - 1 ];
6            
7      for m=1𝑚1m=1italic_m = 1 to 2Eloop2subscript𝐸loop2\cdot E_{\text{loop}}2 ⋅ italic_E start_POSTSUBSCRIPT loop end_POSTSUBSCRIPT do
8             for k=Nsuperscript𝑘𝑁k^{\prime}=Nitalic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = italic_N to NNT1𝑁subscript𝑁𝑇1N\cdot N_{T}-1italic_N ⋅ italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT - 1 do
9                   Set current Tx node j=(kmodN)+1𝑗modulosuperscript𝑘𝑁1j=(k^{\prime}\mod{N})+1italic_j = ( italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT roman_mod italic_N ) + 1
10                   Read {ti,j[k],Pi,j[k]}𝒟isubscript𝑡𝑖𝑗delimited-[]superscript𝑘subscript𝑃𝑖𝑗delimited-[]superscript𝑘subscript𝒟𝑖\left\{t_{i,j}[k^{\prime}],P_{i,j}[k^{\prime}]\right\}\in\mathcal{D}_{i}{ italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] , italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] } ∈ caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT
11                   if  Pi,j[k]>0subscript𝑃𝑖𝑗delimited-[]superscript𝑘0P_{i,j}[k^{\prime}]>0italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] > 0 and ji𝑗𝑖j\neq iitalic_j ≠ italic_i then
12                         Compute Δϕi,j[k]=ti,j[k]ϕi[k]Δsubscriptitalic-ϕ𝑖𝑗delimited-[]superscript𝑘subscript𝑡𝑖𝑗delimited-[]superscript𝑘subscriptitalic-ϕ𝑖delimited-[]superscript𝑘\Delta\phi_{i,j}[k^{\prime}]=t_{i,j}[k^{\prime}]-\phi_{i}[k^{\prime}]roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] = italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] - italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ]
13                         Store XT(i)[j](Δϕi,j[k]Xϕ(i)[j])/Nsuperscriptsubscript𝑋𝑇𝑖delimited-[]𝑗Δsubscriptitalic-ϕ𝑖𝑗delimited-[]superscript𝑘superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗𝑁X_{T}^{(i)}[j]\leftarrow(\Delta\phi_{i,j}[k^{\prime}]-X_{\phi}^{(i)}[j])/Nitalic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← ( roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] - italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ) / italic_N
14                         Store Xϕ(i)[j]Δϕi,j[k]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗Δsubscriptitalic-ϕ𝑖𝑗delimited-[]superscript𝑘X_{\phi}^{(i)}[j]\leftarrow\Delta\phi_{i,j}[k^{\prime}]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← roman_Δ italic_ϕ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ]
15                         Store P(i)[j]Pi,j[k]superscript𝑃𝑖delimited-[]𝑗subscript𝑃𝑖𝑗delimited-[]superscript𝑘P^{(i)}[j]\leftarrow P_{i,j}[k^{\prime}]italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] ← italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ]
16                         Forward pass P(i)[j]superscript𝑃𝑖delimited-[]𝑗P^{(i)}[j]italic_P start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ], XT(i)[j]superscriptsubscript𝑋𝑇𝑖delimited-[]𝑗X_{T}^{(i)}[j]italic_X start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] and Xϕ(i)[j]superscriptsubscript𝑋italic-ϕ𝑖delimited-[]𝑗X_{\phi}^{(i)}[j]italic_X start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT [ italic_j ] to compute ϕi[k+1]subscriptitalic-ϕ𝑖delimited-[]superscript𝑘1\phi_{i}[k^{\prime}+1]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT + 1 ] and Ti[k+1]subscript𝑇𝑖delimited-[]superscript𝑘1T_{i}[k^{\prime}+1]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT + 1 ] via Eqns. (12), (13), and (14), according to update action selected by the value of (kmod3N)modulo𝑘3𝑁(k\!\!\mod{3N})( italic_k roman_mod 3 italic_N )
17                  
18            if mEloop𝑚subscript𝐸loopm\leq E_{\text{loop}}italic_m ≤ italic_E start_POSTSUBSCRIPT loop end_POSTSUBSCRIPT then
19                   Compute loss 𝒟i(𝜽i,T)subscriptsubscript𝒟𝑖subscript𝜽𝑖𝑇\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,T})caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT ) via Eqn. (18) using the computed Ti[k]subscript𝑇𝑖delimited-[]superscript𝑘T_{i}[k^{\prime}]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] and the stored ti,j[k]subscript𝑡𝑖𝑗delimited-[]superscript𝑘t_{i,j}[k^{\prime}]italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ]’s (from which Ti,j[k]subscript𝑇𝑖𝑗delimited-[]superscript𝑘T_{i,j}[k^{\prime}]italic_T start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] is computed via (16));
20                   Compute gradient 𝜽i𝒟i(𝜽i,T)subscriptsubscript𝜽𝑖subscriptsubscript𝒟𝑖subscript𝜽𝑖𝑇\nabla_{{\bm{\theta}}_{i}}\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,T})∇ start_POSTSUBSCRIPT bold_italic_θ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT ) using backpropagation through time;
21                   Update weights via 𝜽i,T𝜽i,Tμ𝜽i,T𝒟i(𝜽i,T)subscript𝜽𝑖𝑇subscript𝜽𝑖𝑇𝜇subscriptsubscript𝜽𝑖𝑇subscriptsubscript𝒟𝑖subscript𝜽𝑖𝑇{\bm{\theta}}_{i,T}\leftarrow{\bm{\theta}}_{i,T}-\mu\cdot\nabla_{{\bm{\theta}}% _{i,T}}\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,T})bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT ← bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT - italic_μ ⋅ ∇ start_POSTSUBSCRIPT bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT end_POSTSUBSCRIPT caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_T end_POSTSUBSCRIPT ).
22            else
23                   Compute loss 𝒟i(𝜽i,ϕ)subscriptsubscript𝒟𝑖subscript𝜽𝑖italic-ϕ\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,\phi})caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT ) via Eqn. (17) using the computed ϕi[k]subscriptitalic-ϕ𝑖delimited-[]superscript𝑘\phi_{i}[k^{\prime}]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ] and the stored ti,j[k]subscript𝑡𝑖𝑗delimited-[]superscript𝑘t_{i,j}[k^{\prime}]italic_t start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT [ italic_k start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ];
24                   Compute gradient 𝜽i𝒟i(𝜽i,ϕ)subscriptsubscript𝜽𝑖subscriptsubscript𝒟𝑖subscript𝜽𝑖italic-ϕ\nabla_{{\bm{\theta}}_{i}}\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,\phi})∇ start_POSTSUBSCRIPT bold_italic_θ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT ) using backpropagation through time;
25                   Update weights via 𝜽i,ϕ𝜽i,ϕμ𝜽i,ϕ𝒟i(𝜽i,ϕ)subscript𝜽𝑖italic-ϕsubscript𝜽𝑖italic-ϕ𝜇subscriptsubscript𝜽𝑖italic-ϕsubscriptsubscript𝒟𝑖subscript𝜽𝑖italic-ϕ{\bm{\theta}}_{i,\phi}\leftarrow{\bm{\theta}}_{i,\phi}-\mu\cdot\nabla_{{\bm{% \theta}}_{i,\phi}}\mathcal{L}_{\mathcal{D}_{i}}({\bm{\theta}}_{i,\phi})bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT ← bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT - italic_μ ⋅ ∇ start_POSTSUBSCRIPT bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT end_POSTSUBSCRIPT caligraphic_L start_POSTSUBSCRIPT caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( bold_italic_θ start_POSTSUBSCRIPT italic_i , italic_ϕ end_POSTSUBSCRIPT ).
26            
27      
Algorithm 1 Unsupervised Online Local Training at Node i𝑖iitalic_i

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 2(N1)2𝑁12(N-1)2 ( italic_N - 1 ) 30303030
Sigmoid Layer 1 30303030 30303030
Linear Layer 2 30303030 30303030
Sigmoid Layer 2 30303030 30303030
Linear Layer 3 30303030 N1𝑁1N-1italic_N - 1
Softmax Layer N1𝑁1N-1italic_N - 1 N1𝑁1N-1italic_N - 1
Selection N1𝑁1N-1italic_N - 1 N1𝑁1N-1italic_N - 1
Normalization N1𝑁1N-1italic_N - 1 N1𝑁1N-1italic_N - 1
TABLE I: Summary of the layers in the DNN implementation.

For a network with N𝑁Nitalic_N nodes, each DNN consists of (3(N1)+30)303𝑁13030(3(N-1)+30)\cdot 30( 3 ( italic_N - 1 ) + 30 ) ⋅ 30 weights and 230+N1230𝑁12\cdot 30+N-12 ⋅ 30 + italic_N - 1 biases. For a network with N=16𝑁16N=16italic_N = 16 nodes, we obtain 2250225022502250 weights and 75757575 biases, which corresponds to less than 2.51032.5superscript1032.5\cdot 10^{3}2.5 ⋅ 10 start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT products for inference per DNN. We note that each DNN is used for inference only once per 3N3𝑁3\cdot N3 ⋅ italic_N time slots, thus the rate of computation at a node is less than 1700170017001700 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 Es=6subscript𝐸𝑠6E_{s}=6italic_E start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT = 6 cycles with Eloop=5subscript𝐸loop5E_{\text{loop}}=5italic_E start_POSTSUBSCRIPT loop end_POSTSUBSCRIPT = 5. Thus, overall each DNN is trained over 30303030 epochs with a learning rate of μ=0.1𝜇0.1\mu=0.1italic_μ = 0.1. The information for training was collected over NT=126subscript𝑁𝑇126N_{T}=126italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = 126 TDMA frames. As each TDMA frame facilitates transmission of N=16𝑁16N=16italic_N = 16 nodes, then the overall time samples collected for training at a given node is 2016201620162016. In the testing phase, NT=751subscript𝑁𝑇751N_{T}=751italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = 751 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.

Refer to caption
Figure 6: The evolution of the clock periods Ti[k]subscript𝑇𝑖delimited-[]𝑘T_{i}[k]italic_T start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] vs. k𝑘kitalic_k, for the PFDSA for all nodes (each line represents the period at a different node in the network), εT=εϕ=0.3subscript𝜀𝑇subscript𝜀italic-ϕ0.3\varepsilon_{T}=\varepsilon_{\phi}=0.3italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT = 0.3.
Refer to caption
Figure 7: The evolution of the clock phases ϕi[k]subscriptitalic-ϕ𝑖delimited-[]𝑘\phi_{i}[k]italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT [ italic_k ] vs. k𝑘kitalic_k, for the PFDSA for all nodes (each line represents the phase at a different node in the network), εT=εϕ=0.3subscript𝜀𝑇subscript𝜀italic-ϕ0.3\varepsilon_{T}=\varepsilon_{\phi}=0.3italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT = 0.3.
Refer to caption
Figure 8: The evolution of the NPDR vs. k𝑘kitalic_k, (a) for PFDSA and ESSBS algorithm, εT=εϕ=0.3subscript𝜀𝑇subscript𝜀italic-ϕ0.3\varepsilon_{T}=\varepsilon_{\phi}=0.3italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT = 0.3.; subfigs. (b) and (c) show regions of interest only for the PFDSA.

Next, we tested the impact of network parameters on the performance, by randomly generating 800800800800 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 4.54.54.54.5) and in its standard deviation (STD) (a factor of 2222).

Refer to caption
Figure 9: The histogram of the NPDR for PFDSA (top) and for ESSBS (bottom), εT=εϕ=0.3subscript𝜀𝑇subscript𝜀italic-ϕ0.3\varepsilon_{T}=\varepsilon_{\phi}=0.3italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT = 0.3.
Refer to caption
Figure 10: The histogram of the mean period for PFDSA (top) and for ESSBS (bottom), εT=εϕ=0.3subscript𝜀𝑇subscript𝜀italic-ϕ0.3\varepsilon_{T}=\varepsilon_{\phi}=0.3italic_ε start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_ε start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT = 0.3.

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.