METHOD AND APPARATUS FOR CLOCK SYNCHRONIZATION IN WIRELESS NETWORK
20230284157 · 2023-09-07
Inventors
Cpc classification
H04W56/004
ELECTRICITY
H04J3/0667
ELECTRICITY
International classification
Abstract
An electronic device, including a transceiver for sending and receiving data packets via a wireless link with a reference node of a wireless network; a processor; a storage device storing instructions that, when executed by the processor, cause the processor to perform: performing timestamp packet exchanging between the electronic device and the reference node successively for a certain number of rounds; obtaining a set of time values corresponding to each round; transforming all sets of time values corresponding to the plurality of rounds into one or more low-rank matrices; applying a Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain a recovered matrix; calculating clock parameters and transmission delay associated with the wireless link based on the recovered matrix; and synchronizing the electronic device with respect to the reference node based on the clock parameters and the transmission delay.
Claims
1. A computer-implemented method of synchronizing an electronic device with a reference node in a wireless network, wherein the electronic device is in communication with the reference node via a wireless link, comprising: performing timestamp packet exchanging between the electronic device and the reference node successively for a plurality of rounds; wherein performing timestamp packet exchanging between the electronic device and the reference node comprises, for each of the plurality of rounds respectively: sending a first timestamp packet from the electronic device to the reference node, the first timestamp packet including a first time value of a local time of the electronic device upon sending the first timestamp packet, responsive to the sending of the first timestamp packet, receiving a second timestamp packet from the reference node to the electronic device, the second timestamp packet including a second time value of a local time of the reference node upon receiving the first timestamp packet and a third time value of a local time of the reference node upon sending the second timestamp packet, recording a fourth time value of a local time of the electronic device upon receiving the second timestamp packet, using the first time value, the second time value, the third time value, and the fourth time value to form a set of time values corresponding to the each of the plurality of rounds; transforming all sets of time values corresponding to the plurality of rounds into one or more low-rank matrices; applying a Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain a recovered matrix; calculating clock parameters and transmission delay associated with the wireless link based on the recovered matrix; and synchronizing the electronic device with respect to the reference node based on the clock parameters and the transmission delay.
2. The method according to claim 1, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a difference between the second time value and the first time value for each of the sets of time values corresponding to the plurality of rounds to obtain an uplink sequence represented by an uplink timestamp matrix; and calculating a difference between the fourth time value and the third time value for each of the sets of time values corresponding to the plurality of rounds to obtain a downlink sequence represented by a downlink timestamp matrix.
3. The method according to claim 2, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: transforming the uplink timestamp matrix and the downlink timestamp matrix into corresponding observation operators respectively; calculating noisy versions of the uplink timestamp matrix and the downlink timestamp matrix respectively based on random transmission delay associated with the wireless link; applying the Matrix-Completion-Based formulation to the noisy version of the uplink timestamp matrix with the observation operator corresponding to the uplink timestamp matrix to calculate a recovered matrix corresponding to the uplink timestamp matrix; and applying the Matrix-Completion-Based formulation to the noisy version of the downlink timestamp matrix with the observation operator corresponding to the downlink timestamp matrix to calculate a recovered matrix corresponding to the downlink timestamp matrix.
4. The method according to claim 3, wherein calculating the clock parameters and the transmission delay associated with the wireless link based on the recovered matrix comprises: using a likelihood function and a normally-distributed model to describe a random portion of the transmission delay associated with the wireless link; differentiating the likelihood function with respect to a clock offset to generate an equation for calculating the clock offset based on means of the uplink sequence and the downlink sequence; using the equation to calculate the clock offset; and calculating an estimated noise variance using the calculated clock offset.
5. The method according to claim 1, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a timestamp matrix based on all sets of time values corresponding to the plurality of rounds, wherein each row of the timestamp matrix corresponds to each of the sets of time values respectively.
6. The method according to claim 5, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: calculating a noisy version of the timestamp matrix based on random transmission delay associated with the wireless link; and using the noisy version of the timestamp matrix to obtain an output matrix, wherein the output matrix comprises all entries of the noisy version of the timestamp matrix and fills other positions with a value of zero.
7. The method according to claim 6, wherein calculating the clock parameters and the transmission delay associated with the wireless link based on the recovered matrix comprises: trimming the output matrix to remove overrepresented values; using a likelihood function and a normally-distributed model to describe a random portion of the transmission delay associated with the wireless link; and calculating a clock skew, a clock offset, and a fixed portion of the transmission delay.
8. An electronic device, comprising: a transceiver for sending and receiving data packets via a wireless link with a reference node of a wireless network; a processor; and a storage device storing instructions that, when executed by the processor, cause the processor to perform: performing timestamp packet exchanging between the electronic device and the reference node successively for a plurality of rounds; wherein performing timestamp packet exchanging between the electronic device and the reference node comprises, for each of the plurality of rounds respectively: sending a first timestamp packet from the electronic device to the reference node, the first timestamp packet including a first time value of a local time of the electronic device upon sending the first timestamp packet, responsive to the sending of the first timestamp packet, receiving a second timestamp packet from the reference node to the electronic device, the second timestamp packet including a second time value of a local time of the reference node upon receiving the first timestamp packet and a third time value of a local time of the reference node upon sending the second timestamp packet, recording a fourth time value of a local time of the electronic device upon receiving the second timestamp packet, using the first time value, the second time value, the third time value, and the fourth time value to form a set of time values corresponding to the each of the plurality of rounds; transforming all sets of time values corresponding to the plurality of rounds into one or more low-rank matrices; applying a Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain a recovered matrix; calculating clock parameters and transmission delay associated with the wireless link based on the recovered matrix; and synchronizing the electronic device with respect to the reference node based on the clock parameters and the transmission delay.
9. The electronic device according to claim 8, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a difference between the second time value and the first time value for each of the sets of time values corresponding to the plurality of rounds to obtain an uplink sequence represented by an uplink timestamp matrix; and calculating a difference between the fourth time value and the third time value for each of the sets of time values corresponding to the plurality of rounds to obtain a downlink sequence represented by a downlink timestamp matrix.
10. The electronic device according to claim 9, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: transforming the uplink timestamp matrix and the downlink timestamp matrix into corresponding observation operators respectively; calculating noisy versions of the uplink timestamp matrix and the downlink timestamp matrix based on random transmission delay associated with the wireless link; and applying the Matrix-Completion-Based formulation to the uplink timestamp matrix, the observation operator corresponding to the uplink timestamp matrix, and the noisy version of the uplink timestamp matrix, to calculate a recovered matrix corresponding to the uplink timestamp matrix; and applying the Matrix-Completion-Based formulation to the downlink timestamp matrix, the observation operator corresponding to the downlink timestamp matrix, and the noisy version of the downlink timestamp matrix, to calculate a recovered matrix corresponding to the downlink timestamp matrix.
11. The electronic device according to claim 10, wherein calculating the clock parameters and the transmission delay associated with the wireless link based on the recovered matrix comprises: using a likelihood function and a normally-distributed model to describe the random portion of the transmission delay associated with the wireless link; differentiating the likelihood function with respect to the clock offset to generate an equation for calculating the clock offset based on means of the uplink sequence and the downlink sequence; using the equation to calculate the clock offset; and calculating an estimated noise variance using the calculated clock offset.
12. The electronic device according to claim 8, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a timestamp matrix based on all sets of time values corresponding to the plurality of rounds, wherein each row of the timestamp matrix corresponds to each of the sets of time values respectively.
13. The electronic device according to claim 12, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: calculating a noisy version of the timestamp matrix based on random transmission delay associated with the wireless link; and using the noisy version of the timestamp matrix to obtain an output matrix, wherein the output matrix comprises all entries of the noisy version of the timestamp matrix and fills other positions with a value of zero.
14. The electronic device according to claim 13, wherein calculating the clock parameters and the transmission delay associated with the wireless link based on the recovered matrix comprises: trimming the output matrix to remove overrepresented values; using a likelihood function and a normally-distributed model to describe a random portion of the transmission delay associated with the wireless link; and calculating a clock skew, a clock offset, and the random portion of the transmission delay.
15. (canceled)
16. A non-transitory computer-readable storage medium comprising instructions which, when executed by an electronic device, cause the electronic device to perform: performing timestamp packet exchanging between the electronic device and the reference node successively for a plurality of rounds; wherein performing timestamp packet exchanging between the electronic device and the reference node comprises, for each of the plurality of rounds respectively: sending a first timestamp packet from the electronic device to the reference node, the first timestamp packet including a first time value of a local time of the electronic device upon sending the first timestamp packet, responsive to the sending of the first timestamp packet, receiving a second timestamp packet from the reference node to the electronic device, the second timestamp packet including a second time value of a local time of the reference node upon receiving the first timestamp packet and a third time value of a local time of the reference node upon sending the second timestamp packet, recording a fourth time value of a local time of the electronic device upon receiving the second timestamp packet, using the first time value, the second time value, the third time value, and the fourth time value to form a set of time values corresponding to the each of the plurality of rounds; transforming all sets of time values corresponding to the plurality of rounds into one or more low-rank matrices; applying a Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain a recovered matrix; calculating clock parameters and transmission delay associated with the wireless link based on the recovered matrix; and synchronizing the electronic device with respect to the reference node based on the clock parameters and the transmission delay.
17. The non-transitory computer-readable storage medium according to claim 16, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a difference between the second time value and the first time value for each of the sets of time values corresponding to the plurality of rounds to obtain an uplink sequence represented by an uplink timestamp matrix; and calculating a difference between the fourth time value and the third time value for each of the sets of time values corresponding to the plurality of rounds to obtain a downlink sequence represented by a downlink timestamp matrix.
18. The non-transitory computer-readable storage medium according to claim 17, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: transforming the uplink timestamp matrix and the downlink timestamp matrix into corresponding observation operators respectively; calculating noisy versions of the uplink timestamp matrix and the downlink timestamp matrix based on random transmission delay associated with the wireless link; and applying the Matrix-Completion-Based formulation to the uplink timestamp matrix, the observation operator corresponding to the uplink timestamp matrix, and the noisy version of the uplink timestamp matrix, to calculate a recovered matrix corresponding to the uplink timestamp matrix; and applying the Matrix-Completion-Based formulation to the downlink timestamp matrix, the observation operator corresponding to the downlink timestamp matrix, and the noisy version of the downlink timestamp matrix, to calculate a recovered matrix corresponding to the downlink timestamp matrix.
19. The non-transitory computer-readable storage medium according to claim 18, wherein calculating the clock parameters and the transmission delay associated with the wireless link based on the recovered matrix comprises: using a likelihood function and a normally-distributed model to describe the random portion of the transmission delay associated with the wireless link; differentiating the likelihood function with respect to the clock offset to generate an equation for calculating the clock offset based on means of the uplink sequence and the downlink sequence; using the equation to calculate the clock offset; and calculating an estimated noise variance using the calculated clock offset.
20. The non-transitory computer-readable storage medium according to claim 16, wherein transforming all sets of time values corresponding to the plurality of rounds into the one or more low-rank matrices comprises: calculating a timestamp matrix based on all sets of time values corresponding to the plurality of rounds, wherein each row of the timestamp matrix corresponds to each of the sets of time values respectively.
21. The non-transitory computer-readable storage medium according to claim 20, wherein applying the Matrix-Completion-Based formulation to the one or more low-rank matrices to obtain the recovered matrix comprises: calculating a noisy version of the timestamp matrix based on random transmission delay associated with the wireless link; and using the noisy version of the timestamp matrix to obtain an output matrix, wherein the output matrix comprises all entries of the noisy version of the timestamp matrix and fills other positions with a value of zero.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying figures, where like reference numerals refer to identical or functionally similar elements throughout the separate views, together with the detailed description below, are incorporated in and form part of the specification, and serve purposes of illustrative only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the embodiments described herein.
[0019]
[0020]
[0021]
[0022]
DETAILED DESCRIPTION OF EMBODIMENTS
[0023] The present disclosure will now be described with reference to certain embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous particular embodiments are set forth in order to provide a thorough understanding of the principles and practical applications of the present invention. However, it will be understood by those skilled in the art that the detailed description is not intended to be exhaustive or to be limited to the precise forms disclosed. The embodiments are not limited to the precise terms and components disclosed herein. Various modifications or variances may be made in the arrangement, operation, and details of the methods and apparatuses of the embodiments without departing from the spirit and scope of the present invention. Also, well-known methods, procedures, components, circuits, and networks have not been described in details so as not to unnecessarily obscure aspects of the embodiments. It will be appreciated that any module, unit, component, server, computer, terminal or device exemplified herein that stores or executes computer readable instructions, data structures, program modules, or other data may include or otherwise have access to computer readable media such as storage media, computer storage media, or data storage devices. It will also be appreciated that any application, module, algorithm, or method herein described may be implemented using computer readable/executable instructions that may be stored or otherwise held by such computer readable media.
[0024] The terminology used in the detailed description is for the purpose of describing particular embodiments only and is not intended to be limiting the present invention. As utilized herein, the terms “circuits” and “circuitry” refer to physical electronic components (i.e. hardware) and any software and/or firmware (“code”) which may configure the hardware, be executed by the hardware, and or otherwise be associated with the hardware. As used herein, for example, a particular processor and memory may include a first “circuit” when executing a first one or more lines of code and may include a second “circuit” when executing a second one or more lines of code. As utilized herein, “and/or” means any one or more of the items in the list joined by “and/or”. As an example, “x and/or y” means any element of the three-element set {(x), (y), (x, y)}. In other words, “x and/or y” means “one or both of x and y”. As another example, “x, y, and/or z” means any element of the seven-element set {(x), (y), (z), (x, y), (x, z), (y, z), (x, y, z)}. In other words, “x, y and/or z” means “one or more of x, y and z”. As utilized herein, the term “exemplary” means serving as a non-limiting example, instance, or illustration. As utilized herein, the terms “e.g.,” and “for example” set off lists of one or more non-limiting examples, instances, or illustrations. As utilized herein, a circuitry or a device is “operable” to perform a function whenever the circuitry or device includes the necessary hardware and code (if any is necessary) to perform the function, regardless of whether performance of the function is disabled or not enabled (e.g., by a user-configurable setting, factory trim, etc.).
[0025] As utilized herein, the terms “first”, “second”, “third”, “fourth”, and the like are used to describe various elements so as to distinguish one element from another. These elements should not be limited by these terms. For example, “a first gesture” and “a second gesture” as utilized in the same particular embodiment mean two different gestures. “A first gesture” in one embodiment may be termed “a second gesture” in another embodiment, or may be termed “a third gesture” in still another embodiment, depending on the context. As utilized herein, the singular terms “a”, “an”, and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the terms “comprise”, “include”, “have”, “compose”, and “dispose” in all tenses, when used in the specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
[0026] As utilized herein, the term “if” may be construed to mean “when” or “upon” or “in response to determining” or “in response to detecting”, depending on the context. Similarly, the phrase “if it is determined” or “if [a stated condition or event] is detected” may be construed to mean “upon determining” or “in response to determining” or “upon detecting [the stated condition or event]” or “in response to detecting [the stated condition or event]”, depending on the context.
[0027] Referring to
[0028] Still referring to
[0029] Still referring to
[0030] Still referring to
[0031] Still referring to
T.sub.A=αT.sub.B+β (1)
[0032] With respect to formula (1), a represents the clock skew (i.e., clock frequency offset), and β represents the clock offset (i.e., clock time phase offset), respectively, of the destination node 102 with respect to the reference node 100. The clock skew and the clock offset together are clock parameters, which may be used to adjust the time T.sub.B of the destination node 102 to obtain the time T.sub.A of the reference node 100 according to formula (1).
[0033] A synchronization cycle between the reference node 100 and the destination node 102 includes one or more synchronization rounds, represented by a number N (N is a positive integer equal to or larger than 1). For a K-th round out of the N synchronization rounds of the synchronization cycle, the destination node 102 at a respective local time T.sub.1,k (send time) sends a timestamp packet containing the value of T.sub.1,k (a first timestamp packet) via the wireless link 104 to the reference node 100; the reference node 100 at a respective local time T.sub.2,k (reception time) receives the first timestamp packet and the value of T.sub.1,k; then the reference node 100 at a respective local time T.sub.3,k (send back time) sends back another timestamp packet containing the values of T.sub.2,k and T.sub.3,k (a second timestamp packet) via the wireless link 104 to the destination node 102; the destination node 102 at a respective local time T.sub.4,k (end of the K-round) receives the second timestamp packet. Accordingly, times T.sub.2,k and T.sub.3,k are recorded by the reference node 100 and then sent to the destination node 102, while times T.sub.1,k and T.sub.4,k are recorded by the destination node 102. The recording of a respective local time at the reference node 100 or the destination node 102 is performed by local timing devices as discussed above, and means local current time at the reference node 100 or the destination node 102 respectively. At the end of the K-th round, the destination node 102 has a set of time values associated with the first timestamp packet and the second timestamp packet, represented as {T.sub.1,k, T.sub.2,k, T.sub.3,k, T.sub.4,k}.sub.k=1 to N. The relationship among the set of time values in the K-th round synchronization satisfies:
T.sub.2,k=αT.sub.1,k+β+α(d+G.sub.k) (2)
T.sub.3,k=αT.sub.4,k+β−α(d+H.sub.k) (3)
[0034] With respect to formulas (2) and (3), α represents the clock skew (i.e., clock frequency offset), and β represents the clock offset (i.e., clock time phase offset), respectively, of the destination node 102 with respect to the reference node 100; d represents the fixed portion of the timestamp packet transmission delay from the destination node 102 to the reference node 100 via the wireless link 104; G.sub.k and H.sub.k represent the random portion of the timestamp packet transmission delay from the destination node 102 to the reference node 100 via the wireless link 104 in the uplink direction (i.e., from the destination node 102 to the reference node 100) and the downlink direction (i.e., from the reference node 100 to the destination node 102) respectively. During the two exchanges of timestamp packets, i.e., the exchanges of the first and the second timestamp packets, the clock parameters are assumed to be constant due to the relatively stable characteristics of the wireless link 104. The random portion of the timestamp packet transmission delay may follow the distribution models of Gaussian, exponential, Weibull, or Gamma. In some situations, the clock skew is small and therefore it is safe to assume that a equals one. The recorded set of time values in the K-th round is subject to packet loss and noise corruption, and may also be affected by random transmission delay, and therefore may have missing data or incomplete data. Accordingly, the recorded set of time values in the K-th round of synchronization may be treated as an incomplete and low-rank matrix, and may be subject to the signal processing of matrix completion in order to recover the original matrix containing the loss data or missing data. The recovered original matrix may then be used to derive the clock parameters and adjust the destination node 102 based on the clock parameters to be synchronized with the reference node 100. In a wireless network environment, there may be additional nodes and these additional nodes may be synchronized globally with the reference node 100 similar to how the destination node 102 is synchronized.
[0035] Referring to
[0036] Step 200: providing a reference node 100 and a destination node 102 connected with the reference node 100 via a wireless link 104, both the reference node 100 and the destination node 102 including a processor, a memory, and a timing device for recording local times, respectively.
[0037] Step 202: arranging the reference node 100 and the destination node 102 to exchange timestamp packets for N rounds via the wireless link 104, where N is a positive integer equal to or larger than 1.
[0038] Step 204: for each round out of the N rounds, respectively, obtaining a first time value, a second time value, a third time value, and a fourth time value associated with a first timestamp packet sent from the destination node 102 to the reference node 100 and a second timestamp packet sent from the reference node 100 to the destination node 102. Step 204 is described further in details: the destination node 102 sends a first timestamp packet to the reference node 100 containing a first time value, where the first time value represents the local time of the destination node 102 at sending the first timestamp packet; the reference node 100 receives the first timestamp packet and records a second time value, where the second time value represents the local time of the reference node 100 at receiving the first timestamp packet; the reference node 100 sends a second timestamp packet corresponding to the first timestamp packet to the destination node 102, where the second timestamp packet contains the second time value and a third time value, the third time value representing the local time of the reference node 100 at sending the second timestamp packet; the destination node 102 receives the second timestamp packet and records a fourth time value, where the fourth time value represents the local time of the destination node 102 at receiving the second timestamp packet.
[0039] Step 206: transforming the recorded first time value, second time value, third time value, and fourth time value for a K-th round out of the N rounds into a set of time values for the K-th round, where K is a positive integer not larger than N.
[0040] Step 208: transforming the recorded N sets of time values for the N rounds of synchronization into one or more low-rank matrices.
[0041] Step 210: applying matrix formulations to the one or more low-rank matrices to obtain a recovered matrix.
[0042] Step 212: calculating the clock parameters and the transmission delay based on the recovered matrix.
[0043] With respect to steps 200 to 206, the set of time values for the K-th round may be represented as {T.sub.1,k, T.sub.2,k, T.sub.3,k, T.sub.4,k}.sub.k=1 to N. The first time value, second time value, third time value, and the fourth time value for the K-th round are represented as T.sub.1,k, T.sub.2,k, T.sub.3,k, and T.sub.4,k, respectively.
[0044] With respect to steps 208 to 212, a low-rank matrix means the data contained in the matrix is missing or lost due to random transmission delay and noise corruption during the timestamp packet exchanging between the reference node 100 and the destination 102. A low-rank matrix may be represented as M∈R.sup.P×Q with a rank r<<min {P, Q}. Assuming that some of the entries {Mi,j} of the low-rank matrix are known and the indices (i, j)∈Ω are randomly selected, and the observed entries can be represented by an observation operator P.sub.Ω(M), the relationship satisfies:
[0045] In the absence of noise, the original matrix M can be recovered by the optimization problem:
min rank(Φ);s.t. P.sub.Ω(Φ)=P.sub.Ω(M) (5)
[0046] With respect to formula (5), rank (Φ) defines the rank of the recovered matrix Φ. The rank minimization problem in formula (5) is equivalent to searching for a minimum rank matrix Φ that matches well with the observed entries Mi,j, (i, j)∈Ω. A convex relaxation alternative that minimizes the nuclear norm of the low rank matrix may be employed. Because the rank of a matrix equals to the number of its non-zero singular values, as a convex relaxation, the rank can be replaced by the nuclear norm, which is the sum of its singular values. The rank minimization problem is turned into the nuclear norm minimization problem as:
min ∥Φ∥;s.t. P.sub.Ω(Φ)=P.sub.Ω(M) (6)
where ∥Φ∥ is the nuclear norm of the matrix Φ, and is defined as:
[0047] where σi,j≥0 is the i-th singular value of the matrix Φ. A variety of techniques may be employed to solve the convex optimization problem in the formula (6), including but not limited to singular value thresholding (SVT), fixed point continuation with approximate singular value decomposition (FPCA), iterative reweighted least squares algorithm (IRLS-M), combination of spectral techniques and manifold optimization (OptSpace), and spectral matrix completion. In the present disclosure, the technique of OptSpace algorithm is used to illustrate the processes for clock synchronization, and other appropriate techniques may be employed to obtain a recovered matrix and to calculate the clock parameters.
[0048] Referring to
[0049] Steps 300 to 306 are similar to the steps of 200 to 206 as discussed above, and will not be repeated herein. At step 306, the set of time values for the K-th round may be represented as {T.sub.1,k, T.sub.2,k, T.sub.3,k, T.sub.4,k}.sub.k=1 to N. The first time value, second time value, third time value, and the fourth time value for the K-th round are represented as T.sub.1,k, T.sub.2,k, T.sub.3,k, and T.sub.4,k, respectively.
[0050] Step 308: calculating an uplink timestamp matrix M.sub.U and a downlink timestamp matrix M.sub.V based on the recorded N sets of time values for the N rounds of synchronization. At step 308, for a K-th round of synchronization, the differences between the K-th uplink and downlink timestamps satisfy:
U.sub.k=T.sub.2,k−T.sub.1,k=d+G.sub.k+β (8)
V.sub.k=T.sub.4,k−T.sub.3,k=d+H.sub.k−β (9)
[0051] For all N rounds of synchronization, all uplink timestamps are used to form a sequence u which represents u={U.sub.k}.sub.k=1 to N. And all downlink timestamps are used to form a sequence v which represents v={V.sub.k}.sub.k=1 to N. The two sequences u and v are further divided into two low-rank delay matrices having P segments of length Q: M.sub.U∈R.sup.P×Q and M.sub.V∈R.sup.P×Q, respectively. Specifically, with respect to formula (8), the differences between the second time value and the first time value in each round of synchronization out of the N rounds are used to formulate the sequence {U.sub.k}.sub.k=1 to N, which is then transformed into the uplink timestamp matrix M.sub.U. With respect to formula (9), the differences between the fourth time value and the third time value in each round of synchronization out of the N rounds are used to formulate the sequence {V.sub.k}.sub.k=1 to N, which is then transformed into the downlink timestamp matrix M.sub.V. In this embodiment, the clock parameter a, i.e., the clock skew of the destination node 102 with respect to the reference node 100, is presumed to be 1, because there are situations where the clock skew is relatively small, meaning there is relatively small fluctuation in the clock frequency and there is no need to provide frequency offset.
[0052] Step 310: transforming the two timestamp matrices M.sub.U and M.sub.V into corresponding observation operators P.sub.Ω(M.sub.U) and P.sub.Ω(M.sub.V), respectively. The two delay matrices M.sub.Un and M.sub.Vn are noisy versions of the two low-rank matrices M.sub.U and M.sub.V, meaning the delay matrices M.sub.Un and M.sub.Vn reflect the random transmission delay caused by noise pollution. M.sub.Un corresponding to the uplink timestamp matrix M.sub.U and M.sub.Vn corresponding to the downlink timestamp matrix M.sub.V, respectively. The signal processing technique based on Matrix Completion allows transforming low-rank matrices into observation operators in order to recover loss data, as following:
[0053] With respect to formulas (10) and (11), Ωu and Ωv are the coordinates of the known entries in matrices M.sub.U and M.sub.V, respectively. In consideration of random transmission delay, the matrices M.sub.Un and M.sub.Vn are defined to be:
M.sub.Un(i,j)=M.sub.U(ij)+Z.sub.u(ij) (12)
M.sub.Vn(i,j)=M.sub.V(i,j)+Z.sub.v(i,j) (13)
[0054] With respect to formulas (12) and (13), Z.sub.u and Z.sub.v are random transmission delay caused by noise, and are represented as {G.sub.k}.sub.k=1 to N and {H.sub.k}.sub.k=1 to N, respectively.
[0055] Step 312: applying matrix completion to the two timestamp matrices M.sub.Un and M.sub.Vn with the corresponding observation operators P.sub.Ω(M.sub.Un) and P.sub.Ω(M.sub.Vn) to obtain recovered matrices.
[0056] In this embodiment, the nuclear norm minimization is employed as an exemplary technique, and other appropriate matrix completion may be employed to achieve a similar result. At step 312, the recovered matrices satisfy:
min ∥M.sub.U∥;s.t. ∥P.sub.Ωu(M.sub.U)−P.sub.Ωu(M.sub.Un)∥.sub.F<η.sub.u (14)
min ∥M.sub.V∥;s.t. ∥P.sub.Ωv(M.sub.V)−P.sub.Ωv(M.sub.Vn)∥.sub.F<η.sub.v (15)
[0057] With respect to formulas (14) and (15), η.sub.u>0 and η.sub.v>0 are regularization parameters controlling the tolerance error of the minimizer. Accordingly, at step 312, recovered matrices are obtained which agree with the observed entries by nuclear norm minimization and also have taken into account the data loss or missing.
[0058] Step 314: calculating the clock offset based on the recovered matrices and performing the clock synchronization using the calculated clock offset.
[0059] Assuming the random transmission delays of {G.sub.k}.sub.k=1 to N and {H.sub.k}.sub.k=1 to N are normally distributed with the same mean μ and variance σ.sub.n.sup.2. A likelihood function based on formulas (8) and (9) satisfies:
[0060] The likelihood function is differentiated with respect to the clock offset β to obtain:
[0061] Accordingly, the clock offset β is calculated as:
[0062] With respect to formulas (18) and (19), the clock offset β is calculated based on the means of the sequences u and v, respectively. The CRLB of the calculated clock offset β is obtained by differentiating the likelihood function with respect to the clock offset β and the expected value based on formula (18) to obtain:
[0063] With respect to formula (20), σ.sub.n.sup.2 represents the estimated noise variance after matrices recovery. Accordingly, with respect to steps 300 to 306, the timestamp packet exchanges between the reference node 100 and the destination node 102 are performed, then recovered matrices are obtained from formulas (14) and (15), and then are used to calculate clock parameters in consideration of packet loss and random transmission delay. The calculated clock parameters are used to adjust the destination node 102 with respect to the reference node 100 to finish the clock synchronization which accounts for the factors of packet loss and random transmission delay.
[0064] Referring to
[0065] In situations where the clock skew is not ignorable, which means the clock parameter a, i.e., the clock skew of the destination node 102 with respect to the reference node 100, is not equal to 1. In this embodiment, the potential frequency fluctuation must be taken into consideration.
[0066] Steps 400 to 406 are similar to the steps of 200 to 206 as discussed above, and will not be repeated herein. At step 406, the set of time values for the K-th round may be represented as {T.sub.1,k, T.sub.2,k T.sub.3,k, T.sub.4,k}.sub.k=1 to N. The first time value, second time value, third time value, and the fourth time value for the K-th round are represented as T.sub.1,k, T.sub.2,k, T.sub.3,k, and T.sub.4,k, respectively.
[0067] Step 408: calculating a timestamp matrix M based on the recorded N sets of time values for the N rounds of synchronization, where the matrix M has N rows, each row of the matrix M corresponding to a set of time values of a specific round of synchronization.
[0068] At step 408, the calculated timestamp matrix M holds the recorded set of time values for the N rounds of synchronization. With respect to packet loss, if the timestamp packet exchange for a K-th round is lost due to conditions of the wireless link 104 or the hardware components of the reference node 100 or the destination node 102, the timestamp matrix M will miss the K-th row, which corresponds to the set of time values for the K-th round, except for the first time value that represents the beginning time of the K-th round. If the clock skew and the clock offset are almost constant during the N rounds of synchronization, then the matrix M will show a strong correlation, considering that the destination node 102 actually sends timestamp packets in a constant interval. Also, in situations where the clock skew is ignorable (meaning α=1) and the delays are fixed, then the matrix M may be expressed as: M=1.sub.NX.sup.T+t1.sub.4.sup.T, where X.sup.T=[0, D, D+b+β, 2D+b−β] and t=[T1,1+T1,2 . . . T1,N].sup.T. Here 1.sub.N represents an all-one vector of length N. Hence M is a rank-two matrix.
[0069] Step 410: using the timestamp matrix M to obtain a noisy version M.sub.n corresponding to the timestamp matrix M, and using the noisy version M.sub.n to obtain an output matrix M.sub.Ωn.
[0070] At step 410, the entries of the matrix M are affected by random transmission delay and therefore satisfy:
M.sub.n(i,j)=M(i,j)+Z(i,j) (21)
[0071] With respect to formula (21), Z represents the noise caused by random transmission delays. The obtained noisy version M.sub.n is then used to calculate an output matrix M.sub.Ωn, which holds the observed entries of the noisy version M.sub.n and have all lost positions filled with zero.
[0072] Step 412: trimming the output matrix M.sub.Ωn to obtain a recovered matrix.
[0073] At step 412, the output matrix M.sub.Ωn is trimmed and the orthogonal projection of the trimmed matrix M.sub.Ωn onto the set of rank-k matrices is defined as:
[0074] With respect to formula (22), the trimming eliminates the over represented rows and columns, and the singular value decomposition of the output matrix M.sub.Ωn is obtained by:
{tilde over (M)}.sub.Ω.sub.
[0075] The recovered matrix may be obtained by solving:
min ∥.sub.Ω(XSY.sup.T)−
.sub.Ω(M.sub.n)∥.sub.F.sup.2 (24)
[0076] With respect to formula (24), through standard gradient descent with line search using the calculated rank-k projection as the initial guess, i.e., X=X.sub.0, and Y=Y.sub.0. P.sub.Ω(M) represents the observation operator containing all the observed entries in matrix M, following the same definition as in formulas (10) and (11). The optimal X, S and Yreconstruct the low rank complete timestamps matrix M.
[0077] Step 414: calculating the clock skew and the clock offset based on the recovered matrix and performing the clock synchronization using the calculated clock skew and clock offset.
[0078] Referring to formulas (2) and (3), they may be rewritten into:
[0079] All the N rounds of synchronization may be stacked into a single matrix as:
[0080] With respect to formula (27), x.sub.1=1/α, x.sub.2=1/β, and x.sub.3=d.
[0081] Assuming that the random transmission delays of {G.sub.k}.sub.k=1 to N and {H.sub.k}.sub.k=1 to N are both normally distributed with zero mean μ=0 and variance σ.sub.n.sup.2, then the random transmission delays follow the distribution as: G.sub.i˜(0, σ.sub.n.sup.2), H.sub.i˜
(0, σ.sub.n.sup.2). The formula (27) may be used to calculate the likelihood function as:
[0082] With respect to formula (28), T.sub.A, T.sub.B, and X are defined as in formula (27). For a specific set of timestamps, the likelihood function of formula (28) may be differentiated with respect to X to obtain:
{circumflex over (X)}=(T.sub.A.sup.HT.sub.A).sup.−1T.sub.A.sup.HT.sub.B (29)
[0083] Formula (29) provides that the estimated clock skew, clock offset, and fixed delay as:
{circumflex over (α)}=1/{circumflex over (x)}.sub.1 (30)
{circumflex over (β)}={circumflex over (x)}.sub.2/{circumflex over (x)}.sub.1 (31)
{circumflex over (d)}={circumflex over (x)}.sub.3 (32)
[0084] Accordingly, the CRLBs of the estimated clock skew and clock offset satisfies:
[0085] Accordingly, with respect to formula (19), there are:
[0086] With reference to formulas (33) to (37), the CRLBs of the estimated clock skew and clock offset are obtained, and they show that the embodiment reduces the number of rounds N while achieving a good performance of clock synchronization.
[0087] With reference to
[0088] With reference to
[0089] With reference to
[0090] With reference to
[0091] With reference to
[0092] While the present disclosure has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the present invention. The disclosure of the embodiments is for purposes of illustrative only, and is not intended for limiting the scope of the present invention. Also, it is appreciated that the previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.