A wireless communication time synchronization method supporting sleep
By establishing a clock model and indirect time synchronization mechanism for dual crystal oscillator nodes, the synchronization difficulty problem of dual crystal oscillator nodes in sleep and working states is solved, efficient time synchronization is achieved, synchronization efficiency and accuracy are improved, and energy-saving requirements are met.
Patent Information
- Application Number
- CN202411827917.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing technologies are difficult to adapt to the clock synchronization of dual-crystal oscillator nodes in sleep and working states, resulting in excessive communication and computing overhead, especially insufficient synchronization efficiency and accuracy in large-scale networks.
A clock model of dual-crystal oscillator nodes is established, and an indirect time synchronization mechanism is adopted to indirectly correct the frequency and phase offset of the sleep clock by correcting the working clock. The extended reference node strategy is used to improve the synchronization efficiency and accuracy.
It effectively reduces communication overhead, improves the synchronization efficiency and accuracy of large-scale dual-crystal oscillator nodes, and meets energy-saving requirements.
Smart Images

Figure CN119815498B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of wireless sensor networks, and relates to a wireless communication time synchronization method supporting sleep. BACKGROUND
[0002] In a wireless sensor network, accurate clock synchronization is a key basis for realizing distributed interaction and coordination among various infrastructures and machines in an industrial environment. In actual applications, a node usually uses a high-frequency crystal oscillator to provide a clock source in a working state, and uses a low-frequency crystal oscillator to save energy in a sleep state. However, most existing time synchronization methods supporting sleep are mostly for the case of using the same crystal oscillator in the working and sleep 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 a node to a gateway, the gateway collects a set of one-way timestamps, and parameter estimation is completed by using the least square method. However, in actual application scenarios, since different crystal oscillators are usually used by a node in the sleep and working states, the method is difficult to be applied to a dual-crystal oscillator node. In addition, when multiple nodes simultaneously request synchronization, the scheme will cause huge communication and calculation overheads.
[0003] Therefore, in combination with the actual scene of a wireless sensor node, it is urgent to design an efficient time synchronization method capable of adapting to the characteristics of a dual-crystal oscillator node and significantly reducing communication overheads, so as to meet the application requirements in a large-scale network. SUMMARY
[0004] Therefore, the purpose of the application is to provide a wireless communication time synchronization method supporting sleep, establish a clock model of a dual-crystal oscillator node conforming to an actual industrial scene, and propose an indirect synchronization mechanism to solve the problem of difficult clock synchronization of a dual-crystal oscillator node in sleep. Then, based on the strategy of an extended reference node, the synchronization efficiency and synchronization accuracy of a large-scale dual-crystal oscillator node are improved.
[0005] To achieve the above purpose, the application provides the following technical scheme:
[0006] A wireless communication time synchronization method supporting sleep, considering the difficulty of directly synchronizing a sleep clock, the method indirectly corrects the frequency deviation of the sleep clock and the phase offset of the local clock by preferentially correcting the working clock. In addition, when multiple dual-crystal oscillator nodes simultaneously request synchronization, the reference node first corrects the frequency deviation and phase offset of the working clock of each node to be synchronized, then groups these nodes two by two as extended reference nodes, and sequentially completes the correction of the sleep clocks of each other based on the indirect time synchronization mechanism. For the remaining single node, the sleep clock is directly corrected with the reference node.
[0007] The method specifically includes the following steps:
[0008] S1: Establish a dual-crystal clock model for wireless node devices, considering that they use different clock crystals when in sleep and working mode.
[0009] S2: Uses an indirect time synchronization mechanism, which indirectly corrects the sleep clock frequency deviation and local clock phase deviation based on the working clock correction.
[0010] S3: When multiple dual-crystal oscillator nodes request synchronization at the same time, the reference node first completes the correction of the working clock frequency and phase deviation of each node to be synchronized, and then groups these nodes into twos, 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] Furthermore, 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, Time Node Clock frequency for:
[0012]
[0013] in, is a node The standard frequency, is a node The clock frequency change rate, is the fixed frequency deviation, is a node The noise has little effect on the frequency and can be ignored; therefore, Time Node Clock rate It can be expressed as:
[0014]
[0015] in, 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 for long-term single-crystal wireless nodes It can be expressed as:
[0017]
[0018] in, Indicates the initial clock phase deviation;
[0019] Assuming dual crystal nodes Working status is , the sleep state is , and in Always in working condition , the long-term operation of the dual crystal oscillator node can be derived Clock for:
[0020]
[0021] in, It is a dual crystal oscillator node The operating clock rate, is the sleep clock rate, yes The dual crystal oscillator nodes are phase-shifted at all times;
[0022] During synchronization, the frequency deviation of the dual crystal oscillator node changes little in a short period of time, so its clock It can be expressed as:
[0023]
[0024] in, Indicates the operating clock rate, represents the sleep clock rate, Indicates the initial clock phase deviation; is a random time deviation, which obeys a normal distribution with a mean of 0, that is, .
[0025] Furthermore, step S2 specifically includes the following steps:
[0026] S21: Synchronization starts, nodes to be synchronized To the reference node Send synchronization request frame ;
[0027] S22: Phase 1, After receiving the synchronization request, the node continuously sends send Group frequency offset correction frame ;
[0028] Assume that during synchronization, the nodes The clock frequency deviation is relatively stable. For a fixed transmission delay, for Time-variable transmission delay, for moment-variable time deviation; When this synchronization starts, Time Node Relative to Phase offset of the node; 、 Respectively 、 The frequency deviation of the working crystal oscillator during the first transmission is:
[0029] ...
[0031]
[0032] in, for Node Group frequency offset correction frame Sending time, For nodes Place Group frequency offset correction frame Receiving time;
[0033] Because the 、 The time between them is very short, so it can be considered that: ,also, It follows a normal distribution with a mean of 0, which is very small and can be ignored. Therefore:
[0034]
[0035] Based on the least squares method, we can get Frequency offset estimation obtained by group frequency offset correction frame and phase bias estimation :
[0036]
[0037] S23: Second stage, node After completing the first phase of the working clock frequency deviation and phase deviation correction, A short sleep, then wake up to The node initiates a second synchronization request ;
[0038]
[0039]
[0040] in, It conforms to the normal distribution with mean 0. The new clock phase is offset, so
[0041]
[0042] Therefore, the latest clock offset can be Make corrections; assume A short sleep time recorded by the node itself. is the actual sleep time, is the sleep crystal oscillator clock frequency deviation, then:
[0043]
[0044] In addition, the latest clock offset The source is:
[0045]
[0046] because Just got calibrated, , so ,and , we can get:
[0047]
[0048] make , we can deduce the node The clock frequency deviation of the sleep crystal oscillator , in order to realize the frequency deviation correction of the sleep crystal oscillator and complete the time synchronization of the dual crystal oscillator nodes;
[0049] .
[0050] Furthermore, step S3 specifically includes the following steps:
[0051] S31: In In the phase, when the synchronization time arrives, the dual crystal oscillator nodes to be synchronized wake up one after another and send The node initiates a synchronization request. The node allocates extended reference nodes based on the number of dual crystal oscillator nodes to be synchronized;
[0052] S32: Node passes One-way broadcast frame Complete the clock frequency deviation and node clock phase deviation correction for all dual-crystal oscillator nodes to be synchronized, and add the extended reference node information allocated in step S31 during the last broadcast;
[0053] S33: In In the phase, if the dual crystal oscillator node is selected as the extended reference node, it is necessary to wait for the other dual crystal oscillator nodes to be synchronized to have a short sleep period. 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. Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23;
[0054] If the extended reference node of the dual crystal oscillator node to be synchronized is parsed as Node, then The nodes complete the second phase of time synchronization.
[0055] The beneficial effects of the present invention are:
[0056] (1) The present invention establishes a clock model for a dual-crystal oscillator node based on the characteristics that wireless node devices use different types of clock crystals in sleep and working states, so as to meet energy-saving requirements.
[0057] (2) Based on the clock model of a dual-crystal oscillator node, this paper proposes an indirect time synchronization mechanism. Based on the correction of the working clock, it indirectly corrects the frequency deviation of the sleep clock and the phase deviation of the local clock. This solves the problem of difficult sleep clock synchronization.
[0058] (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.
[0059] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] 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 with reference to the accompanying drawings, in which:
[0061] Figure 1 This is a diagram of the local clock model of the dual crystal oscillator node proposed in the present invention;
[0062] Figure 2 This is a message interaction diagram of the indirect time synchronization mechanism proposed in the present invention;
[0063] Figure 3 This is a message interaction diagram based on the extended reference node time synchronization mechanism proposed in the present invention. DETAILED DESCRIPTION
[0064] The following describes the embodiments of the present invention by means of 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 are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0065] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.
[0066] 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 there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional 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.
[0067] See also Figures 1 to 3 , Figure 1 This is the local clock model diagram of the dual crystal oscillator node proposed in the present invention. Figure 1 middle, is the initial phase deviation, They are the sleep clock frequency deviation and working clock frequency deviation of the dual crystal oscillator node respectively. Figure 1 (a) The value range is:
[0068]
[0069] Figure 1 (b) The value range is:
[0070]
[0071] Finally, the local clock of the dual crystal oscillator node The expression is:
[0072]
[0073] 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 nodes to be synchronized To the reference node Send synchronization request frame ;
[0074] Phase I, After receiving the synchronization request, the node ,..., Continuous sending at all times Group frequency offset correction frame ,node Record the receiving time as ,..., , then based on the least squares method we can get The frequency offset estimation and phase offset estimation of the working clock obtained by the group frequency offset correction frame are:
[0075]
[0076] The second stage, nodes After completing the first phase of the working clock frequency deviation and phase deviation correction, A short sleep, then wake up Always The node initiates a second synchronization request , The node records the receiving time as , and then Time return response frame ,node Record the receiving time as . Then the node and The new clock skew between nodes is:
[0077]
[0078] Therefore, the clock deviation can be corrected and the node The clock frequency deviation of the sleep crystal oscillator , in order to achieve the frequency deviation correction of the sleep crystal oscillator.
[0079]
[0080] 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 Stage, dual crystal oscillator nodes to be synchronized When the synchronization time arrives, they wake up one after another and send The node initiates a synchronization request. The nodes are assigned extended reference nodes based on the number of dual crystal nodes to be synchronized.
[0081] Secondly, Node passes One-way broadcast frame Complete the clock frequency deviation and node clock phase deviation correction of all dual crystal oscillator nodes to be synchronized, and add the extended reference node information allocated in step S31 during the last broadcast, where The extended reference node is node, They were successively elected as extended reference nodes.
[0082] Finally, in Phase, dual crystal node If it is selected as the extended reference node, it needs to wait for the dual crystal oscillator node to be synchronized. After a short sleep Then, the second phase synchronization request is initiated. Then, the time synchronization process is completed based on step S23. The dual crystal oscillator node that completes the second phase time synchronization It will be converted to a new extended reference node and wait for the dual crystal node that was previously its extended reference node to After a short sleep Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23.
[0083] Dual crystal oscillator node to be synchronized Its extended reference node is Node, then The nodes complete the second phase of time synchronization.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. 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 solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all 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: Establish a dual-crystal clock model for wireless node devices, considering that they use different clock crystals when in sleep and working mode. S2: Using an indirect time synchronization mechanism, based on the working clock correction, indirectly corrects the sleep clock frequency deviation and the local clock phase deviation. This specifically includes the following steps: S21: Synchronization starts, nodes to be synchronized To the reference node Send synchronization request frame ; S22: Phase 1, After receiving the synchronization request, the node continuously sends send Group frequency offset correction frame ; Assume that during synchronization, the nodes The clock frequency deviation is relatively stable. For a fixed transmission delay, for Time-variable transmission delay, for moment-variable time deviation; When this synchronization starts, Time Node Relative to Phase offset of the node; 、 Respectively 、 The frequency deviation of the working crystal oscillator during the first transmission is: ... in, for Node Group frequency offset correction frame Sending time, For nodes Place Group frequency offset correction frame Receiving time; Because the 、 The time between them is very short, so we think: ,also, It follows a normal distribution with a mean of 0. It is very small and therefore can be ignored. Therefore: Based on the least squares method Frequency offset estimation obtained by group frequency offset correction frame and phase bias estimation : S23: Second stage, node After completing the first phase of the working clock frequency deviation and phase deviation correction, A short sleep, then wake up to The node initiates a second synchronization request ; in, It conforms to the normal distribution with mean 0. is the new clock phase offset, so The latest clock offset Make corrections; assume A short sleep time recorded by the node itself. is the actual sleep time, is the sleep crystal oscillator clock frequency deviation, then: In addition, the latest clock offset The source is: because Just got calibrated, , so ,and , we get: make , then the node is derived The clock frequency deviation of the sleep crystal oscillator , in order to realize the frequency deviation correction of the sleep crystal oscillator and complete the time synchronization of the dual crystal oscillator nodes; S3: When multiple dual-crystal oscillator nodes request synchronization at the same time, the reference node first completes the correction of the working clock frequency and phase deviation of each node to be synchronized, and then groups these nodes into twos, 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: Time Node Clock frequency for: in, is a node The standard frequency, is a node The clock frequency change rate, is the fixed frequency deviation, is a node noise; therefore, Time Node Clock rate Expressed as: in, It is the ratio of the fixed frequency deviation to the standard frequency and is a constant value affected by the manufacturer; Clock model for long-term single-crystal wireless nodes Expressed as: in, Indicates the initial clock phase deviation; Assuming dual crystal nodes Working status is , the sleep state is , and in Always in working condition , derive the long-term operation of the dual crystal oscillator node Clock for: in, It is a dual crystal oscillator node The operating clock rate, is the sleep clock rate, yes The dual crystal oscillator nodes are phase-shifted at all times; The clock model of the dual crystal oscillator node for a short period of time during synchronization Expressed as: in, Indicates the operating clock rate, represents the sleep clock rate, Indicates the initial clock phase deviation; is a random time deviation, which obeys a normal distribution with a mean of 0, that is, .
3. The wireless communication time synchronization method supporting sleep according to claim 2, characterized in that: Step S3 specifically includes the following steps: S31: In In the phase, when the synchronization time arrives, the dual crystal oscillator nodes to be synchronized wake up one after another and send The node initiates a synchronization request. The node allocates extended reference nodes based on the number of dual crystal oscillator nodes to be synchronized; S32: Node passes One-way broadcast frame Complete the clock frequency deviation and node clock phase deviation correction for all dual-crystal oscillator nodes to be synchronized, and add the extended reference node information allocated in step S31 during the last broadcast; S33: In In the phase, if the dual crystal oscillator node is selected as the extended reference node, it is necessary to wait for the other dual crystal oscillator nodes to be synchronized to have a short sleep period. 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. Then initiate a synchronization request and continue to complete the second phase of the time synchronization process according to step S23; If the extended reference node of the dual crystal oscillator node to be synchronized is parsed as Node, then The nodes complete the second phase of time synchronization.
Citation Information
Patent Citations
An industrial wireless sensor network clock frequency offset estimation method based on timing response
CN109936519A
Wireless sensor network time synchronization method based on partial timestamp information
CN114710828A