Wireless communication time synchronization method supporting sleep
Through the indirect time synchronization mechanism and extended reference node strategy, the problem of difficulty in sleep clock synchronization between dual crystal nodes is solved, efficient and accurate time synchronization is achieved, and communication overhead is reduced.
Patent Information
- Application Number
- CN202411827917.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing sleep-enabled time synchronization methods are difficult to apply to dual-crystal nodes, and it can lead to huge communication and computing overhead when multiple nodes request synchronization at the same time.
An indirect time synchronization mechanism is proposed to make corrections to the frequency deviation of the sleep clock and the phase offset of the local clock by prioritizing the correction of the working clock, and to improve the synchronization efficiency and accuracy of large-scale dual crystal oscillator nodes by using the extended reference node strategy.
It effectively solves the problem of difficulty in sleep clock synchronization between dual crystal nodes, significantly reduces communication overhead, and improves time synchronization efficiency and accuracy in large-scale networks.
Smart Images

Figure CN119815498A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wireless sensor networks and relates to a wireless communication time synchronization method supporting sleep. Background Art
[0002] In wireless sensor networks, accurate clock synchronization is the key foundation for distributed interaction and coordination between various infrastructures and machines in industrial environments. In practical applications, nodes usually use high-frequency crystal oscillators to provide clock sources when in working state, and use low-frequency crystal oscillators when entering sleep state to save energy. However, most of the existing time synchronization methods that support sleep are aimed at the situation where the same crystal oscillator is used in working and sleeping states. For example, Huan proposed a one-way time synchronization scheme based on a reverse asymmetric framework, in which the synchronization process is always initiated by the node to the gateway. The gateway collects a one-way timestamp set and uses the least squares method to complete parameter estimation. However, in actual application scenarios, since nodes often use different crystal oscillators in sleep and working states, this method is difficult to apply to dual-crystal oscillator nodes. In addition, when multiple nodes request synchronization at the same time, this scheme will result in huge communication and computing overhead.
[0003] Therefore, considering the actual scenarios of wireless sensor nodes, it is urgent to design an efficient time synchronization method that can adapt to the characteristics of dual crystal oscillator nodes and significantly reduce communication overhead to meet the application requirements in large-scale networks. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a wireless communication time synchronization method that supports sleep, establish a clock model of a dual crystal oscillator node that conforms to actual industrial scenarios, and propose an indirect synchronization mechanism to solve the problem of difficulty in synchronizing the sleep clock of dual crystal oscillator nodes. Then, based on the strategy of expanding reference nodes, the synchronization efficiency and synchronization accuracy of large-scale dual crystal oscillator nodes are improved.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A wireless communication time synchronization method supporting sleep. Considering the difficulty of directly synchronizing the sleep clock, the method indirectly realizes the correction of the sleep clock frequency deviation and the local clock phase offset by correcting the working clock first. In addition, when multiple dual crystal oscillator nodes request synchronization at the same time, the reference node first completes the correction of the working clock frequency deviation and phase offset of each node to be synchronized, and then groups these nodes in pairs as extended reference nodes in turn, and completes the correction of each other's sleep clocks based on the indirect time synchronization mechanism. For the remaining single nodes, the sleep clock correction is completed directly with the reference node.
[0007] The method specifically comprises the following steps:
[0008] S1: A dual crystal clock model of the node is established for the situation where the wireless node device uses different clock crystals when sleeping and working;
[0009] S2: Adopting indirect time synchronization mechanism, based on the premise of correcting the working clock, indirectly realizes the correction of the sleep clock frequency deviation and the local clock phase deviation;
[0010] S3: When multiple dual-crystal oscillator nodes request synchronization at the same time, the reference node first completes the correction of the frequency deviation and phase deviation of the working clock of each node to be synchronized, and then groups these nodes in pairs, successively serving as extended reference nodes, and completes the correction of each other's sleep clocks based on the indirect time synchronization mechanism; for the remaining single nodes, the sleep clock correction is completed directly with the reference node.
[0011] Further, step S1 specifically includes: due to the instability of the crystal oscillator of the wireless node and the influence of environmental factors such as aging and temperature, the clock frequency of the node will show a time-varying characteristic. The clock frequency f(t) of node i at time t is:
[0012] f i (t) = f i (1+s i t)+Δf i +N i (t)
[0013] Among them, f i is the standard frequency of node i, s i is the rate of change of the clock frequency of node i, Δf i is the fixed frequency deviation, N i is the noise of node i, which has little effect on the frequency and can be ignored; therefore, the clock rate a of node i at time t i (t) can be expressed as:
[0014]
[0015] Among them, Δa i It is the ratio of the fixed frequency deviation to the standard frequency and is a constant value affected by the manufacturer;
[0016] Clock Model C for Long-Term Single Crystal Oscillator Wireless Nodes i (t) can be expressed as:
[0017]
[0018] Among them, β i Indicates the initial clock phase deviation;
[0019] Assume that the working state of the dual crystal oscillator node j is S w , the sleep state is Ss , and is in working state S at time t0 w , the clock C of the long-term dual crystal oscillator node j can be derived j (t) is:
[0020]
[0021] Among them, a jw is the operating clock rate of the dual crystal oscillator node j, a js is the rate of the sleep clock, β jw (t0) is the phase deviation of the dual crystal oscillator nodes at time t0;
[0022] During synchronization, the frequency deviation of the dual crystal oscillator node changes little in a short period of time, so its clock C(t) can be expressed as:
[0023]
[0024] Among them, a w Indicates the working clock rate, a s represents the sleep clock rate, β w represents the initial clock phase deviation; ψ(t) is a random time deviation, which obeys a normal distribution with a mean of 0, that is, ψ(t)~N(0,σ 2 ).
[0025] Further, step S2 specifically includes the following steps:
[0026] S21: Synchronization starts, the node to be synchronized i sends a synchronization request frame Syn_Req_1 to the reference node Sink;
[0027] S22: In the first stage, after receiving the synchronization request, the Sink node continuously sends k groups of frequency offset correction frames Skew_Correction to node i;
[0028] Assume that during synchronization, the clock frequency deviation of node i is relatively stable, d si To fix the transmission delay, is the variable transmission delay at time k-1, is the variable time deviation at time k-1; θ is the phase offset of node i relative to the sink node at the beginning of this synchronization, i.e., at time t0; are the frequency deviations of the working crystal oscillator during the k-1th and kth transmissions respectively, then:
[0029] ...
[0031]
[0032] in, is the sending time of the kth group of frequency offset correction frames Skew_Correction at the Sink node, is the reception time of the kth group of frequency offset correction frame Skew_Correction at node i;
[0033] Because the time between k and k-1 is very short, we can assume that: also, It conforms to the normal distribution with mean 0, which is very small and can be ignored, so:
[0034]
[0035] Based on the least squares method, the frequency offset estimation obtained by k groups of frequency offset correction frames can be obtained. and phase bias estimation
[0036]
[0037] S23: In the second stage, after completing the frequency deviation and phase deviation correction of the working clock of node i in the first stage, after Δ s After a short sleep, it wakes up and sends the second synchronization request Syn_Req_2 to the Sink node;
[0038]
[0039] in, It conforms to the normal distribution with mean 0. The new clock phase is biased, so
[0040]
[0041] Therefore, the latest clock offset can be Make corrections; assuming Δ s The short sleep time recorded by the node itself, t s is the actual sleeping time, is the sleep crystal clock frequency deviation, then:
[0042]
[0043] In addition, the latest clock phase deviation The source is:
[0044]
[0045] because Just got calibrated, Therefore and Then we can get:
[0046]
[0047] make Then the clock frequency deviation of the sleep crystal oscillator of node i can be deduced To achieve frequency deviation correction of the sleep crystal oscillator and complete time synchronization of the dual crystal oscillator nodes;
[0048]
[0049] Further, step S3 specifically includes the following steps:
[0050] S31: In the Syn_Stage_1 phase, when the synchronization time arrives, the dual crystal oscillator nodes to be synchronized wake up one after another and initiate synchronization requests to the Sink node. The Sink node allocates extended reference nodes based on the number of dual crystal oscillator nodes to be synchronized;
[0051] S32: The Sink node completes the clock frequency deviation and node clock phase deviation correction of all dual crystal oscillator nodes to be synchronized through k unidirectional broadcast frames Skew_Correction, and adds the extended reference node information allocated in step S31 during the last broadcast;
[0052] S33: In the Syn_Stage_2 phase, if the dual crystal oscillator node is selected as the extended reference node, it is necessary to wait for the remaining dual crystal oscillator nodes to be synchronized to have a short sleep Δ s Then initiate the second phase of synchronization request; then, based on step S23, complete the time synchronization process; the node that completes the second phase of time synchronization will be converted into a new extended reference node, waiting for the dual crystal oscillator node that was previously its extended reference node to sleep for a short time Δ s Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23;
[0053] If the dual crystal oscillator node to be synchronized resolves that its extended reference node is a Sink node, the second stage of time synchronization process is completed with the Sink node.
[0054] The beneficial effects of the present invention are:
[0055] (1) The present invention establishes a clock model of a dual-crystal oscillator node based on the characteristics that wireless node devices use different types of clock crystal oscillators in sleep and working states, so as to meet energy-saving requirements.
[0056] (2) Based on the clock model of the dual crystal oscillator node, the present invention proposes an indirect time synchronization mechanism, which indirectly realizes the correction of the sleep clock frequency deviation and the local clock phase deviation based on the correction of the working clock, thus solving the problem of difficulty in synchronizing the sleep clock.
[0057] (3) The present invention is based on the combination of the proposed extended reference node strategy and the indirect synchronization mechanism, thereby improving the synchronization efficiency and accuracy of large-scale dual crystal oscillator nodes to be synchronized.
[0058] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0060] Figure 1 This is a local clock model diagram of the dual crystal oscillator node proposed in the present invention;
[0061] Figure 2 This is a message interaction diagram of the indirect time synchronization mechanism proposed by the present invention;
[0062] Figure 3 This is a message interaction diagram based on the extended reference node time synchronization mechanism proposed in the present invention. DETAILED DESCRIPTION
[0063] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0064] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0065] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0066] See also Figure 1 to Figure 3 , Figure 1 is a local clock model diagram of the dual crystal oscillator node proposed in the present invention. Figure 1 Medium, β w is the initial phase deviation, a s 、a w They are the sleep clock frequency deviation and working clock frequency deviation of the dual crystal oscillator node respectively. Figure 1 The range of t in (a) is:
[0067] t∈{[t i ,t i+1 ]|i=0,2,...}
[0068] Figure 1 The range of t in (b) is:
[0069] t∈{[t i ,t i+1 ]|i=1,3,...}
[0070] Finally, the expression of the local clock C(t) of the dual crystal oscillator node is:
[0071]
[0072] Figure 2 This is the message interaction diagram of the indirect time synchronization mechanism proposed by the present invention, such as Figure 2 As shown, synchronization starts, and the node to be synchronized i sends a synchronization request frame Syn_Req_1 to the reference node Sink;
[0073] In the first stage, after the Sink node receives the synchronization request, Continuously send k groups of frequency offset correction frames Skew_Correction at time, and node i records the receiving time as Then, based on the least squares method, the frequency offset estimation and phase offset estimation of the working clock obtained by k groups of frequency offset correction frames can be obtained:
[0074]
[0075] In the second stage, after completing the frequency deviation and phase deviation correction of the working clock in the first stage, node i undergoes a short sleep of Δs, and then wakes up and The second synchronization request Syn_Req_2 is sent to the Sink node at time , and the Sink node records the receiving time as Later in The response frame Syn_Ack is returned at time , and node i records the receiving time as Then the new clock phase offset between node i and the sink node is:
[0076]
[0077] Therefore, the clock deviation can be corrected and the clock frequency deviation of the sleep crystal oscillator of node i can be obtained. To achieve frequency deviation correction of the sleep crystal oscillator.
[0078]
[0079] Figure 3 This is the message interaction model based on the extended reference node time synchronization mechanism proposed in the present invention, such as Figure 3 As shown, first, in the Syn_Stage_1 stage, the dual crystal oscillator nodes i, ..., j, m to be synchronized wake up one after another when the synchronization time arrives, and initiate synchronization requests to the Sink node, and the Sink node allocates extended reference nodes based on the number of dual crystal oscillator nodes to be synchronized.
[0080] Secondly, the Sink node completes the clock frequency deviation and node clock phase deviation correction of all dual crystal oscillator nodes to be synchronized through k unidirectional broadcast frames Skew_Correction, and adds the extended reference node information assigned by step S31 during the last broadcast, where the extended reference node i is the Sink node, and j and m are successively elected as extended reference nodes.
[0081] Finally, in the Syn_Stage_2 phase, the dual crystal oscillator node j is selected as the extended reference node, and it is necessary to wait for the dual crystal oscillator node m to be synchronized to have a short sleep time Δ s Then, the second phase synchronization request is initiated. Then, the time synchronization process is completed based on step S23. The dual crystal oscillator node m that has completed the second phase time synchronization will be converted into a new extended reference node, waiting for the dual crystal oscillator node j that was previously its extended reference node to have a short sleep time of Δ s Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23.
[0082] If the extended reference node of the dual crystal oscillator node i to be synchronized is the Sink node, the second stage of time synchronization process is completed with the Sink node.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A wireless communication time synchronization method supporting sleep, characterized in that: The method specifically comprises the following steps: S1: A dual crystal clock model of the node is established for the situation where the wireless node device uses different clock crystals when sleeping and working; S2: Adopting indirect time synchronization mechanism, based on the premise of correcting the working clock, indirectly realizes the correction of the sleep clock frequency deviation and the local clock phase deviation; S3: When multiple dual-crystal oscillator nodes request synchronization at the same time, the reference node first completes the correction of the frequency deviation and phase deviation of the working clock of each node to be synchronized, and then groups these nodes in pairs, successively serving as extended reference nodes, and completes the correction of each other's sleep clocks based on the indirect time synchronization mechanism; for the remaining single nodes, the sleep clock correction is completed directly with the reference node.
2. The wireless communication time synchronization method supporting sleep according to claim 1, characterized in that: Step S1 specifically includes: the clock frequency f of node i at time t i (t) is: f i (t)=f i (1+s i t)+Δf i +N i (t) Among them, f i is the standard frequency of node i, s i is the rate of change of the clock frequency of node i, Δf i is the fixed frequency deviation, N i is the noise of node i; therefore, the clock rate a of node i at time t i (t) is expressed as: Among them, Δa i It is the ratio of the fixed frequency deviation to the standard frequency and is a constant value affected by the manufacturer; Clock Model C for Long-Term Single Crystal Oscillator Wireless Nodes i (t) is expressed as: Among them, β i Indicates the initial clock phase deviation; Assume that the working state of the dual crystal oscillator node j is S w , the sleep state is S s , and is in working state S at time t0 w , derive the clock C of the long-term dual crystal oscillator node j j (t) is: Among them, a jw is the operating clock rate of the dual crystal oscillator node j, a js is the rate of the sleep clock, β jw (t0) is the phase deviation of the dual crystal oscillator nodes at time t0; During synchronization, the clock model C(t) of the dual crystal oscillator node for a short period of time is expressed as: Among them, a w Indicates the working clock rate, a s represents the sleep clock rate, β w represents the initial clock phase deviation; ψ(t) is a random time deviation, which obeys a normal distribution with a mean of 0, that is, ψ(t)~N(0,σ 2 ).
3. The wireless communication time synchronization method supporting sleep according to claim 2, characterized in that: Step S2 specifically includes the following steps: S21: Synchronization starts, the node to be synchronized i sends a synchronization request frame Syn_Req_1 to the reference node Sink; S22: In the first stage, after receiving the synchronization request, the Sink node continuously sends k groups of frequency offset correction frames Skew_Correction to node i; Assume that during synchronization, the clock frequency deviation of node i is relatively stable, d si To fix the transmission delay, is the variable transmission delay at time k-1, is the variable time deviation at time k-1; θ is the phase offset of node i relative to the sink node at the beginning of this synchronization, i.e., at time t0; are the frequency deviations of the working crystal oscillator during the k-1th and kth transmissions respectively, then: in, is the sending time of the kth group of frequency offset correction frames Skew_Correction at the Sink node, is the reception time of the kth group of frequency offset correction frame Skew_Correction at node i; Because the time between k and k-1 is very short, we believe that: also, It conforms to the normal distribution with mean 0, which is very small and can be ignored. Therefore: The frequency offset estimation is obtained by obtaining k groups of frequency offset correction frames based on the least squares method and phase bias estimation S23: In the second stage, after completing the frequency deviation and phase deviation correction of the working clock of node i in the first stage, after Δ s After a short sleep, it wakes up and sends the second synchronization request Syn_Req_2 to the Sink node; in, It conforms to the normal distribution with mean 0. is the new clock phase deviation, so The latest clock deviation Make corrections; assuming Δ s The short sleep time recorded by the node itself, t s is the actual sleeping time, is the sleep crystal clock frequency deviation, then: In addition, the latest clock phase deviation The source is: because Just got calibrated, Therefore and Then we get: make Then the clock frequency deviation of the sleep crystal oscillator of node i is derived To achieve frequency deviation correction of the sleep crystal oscillator and complete the time synchronization of the dual crystal oscillator nodes; 4. The wireless communication time synchronization method supporting sleep according to claim 3, characterized in that: Step S3 specifically includes the following steps: S31: In the Syn_Stage_1 phase, when the synchronization time arrives, the dual crystal oscillator nodes to be synchronized wake up one after another and initiate synchronization requests to the Sink node. The Sink node allocates extended reference nodes based on the number of dual crystal oscillator nodes to be synchronized; S32: The Sink node completes the clock frequency deviation and node clock phase deviation correction of all dual crystal oscillator nodes to be synchronized through k unidirectional broadcast frames Skew_Correction, and adds the extended reference node information allocated in step S31 during the last broadcast; S33: In the Syn_Stage_2 phase, if the dual crystal oscillator node is selected as the extended reference node, it is necessary to wait for the remaining dual crystal oscillator nodes to be synchronized to have a short sleep Δ s Then initiate the second phase of synchronization request; then, based on step S23, complete the time synchronization process; the node that completes the second phase of time synchronization will be converted into a new extended reference node, waiting for the dual crystal oscillator node that was previously its extended reference node to sleep for a short time Δ s Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23; If the dual crystal oscillator node to be synchronized resolves that its extended reference node is a Sink node, the second stage of time synchronization process is completed with the Sink node.
Citation Information
Patent Citations
An industrial wireless sensor network clock frequency offset estimation method based on timing response
CN109936519A
Node synchronization method and device, storage medium and node
CN111447674A
Matrix model estimation time synchronization method based on wireless network clustering topology
CN113038589A
Wireless sensor network time synchronization method based on partial timestamp information
CN114710828A
Wireless sensor network time synchronization method based on partial timestamp information
WO2023207254A1