Time slot synchronization method of TDMA (Time Division Multiple Access) wireless communication network

By adopting a variety of clock synchronization methods in the TDMA wireless communication network, including UTC direct synchronization, UTC indirect synchronization, base station direct synchronization and mobile node semaphore synchronization, the clock offset problem of IoT nodes is solved and the stability and efficiency of the network are improved.

CN119697752APending Publication Date: 2025-03-25SHANGHAI ADVANCED AVIONICS
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411951120.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In TDMA wireless communication network, the clock synchronization performance indicators between massive IoT nodes are highly required, and the existing technology is difficult to effectively solve the node clock offset problem, resulting in communication failure.

Method used

A time slot synchronization method for TDMA wireless communication network is provided, including UTC direct synchronization between nodes, UTC indirect synchronization, base station direct synchronization, base station indirect synchronization and mobile node semaphore synchronization, and broadcast messages through the time slot provided by the base station to realize accurate synchronization of time slots.

Benefits of technology

It improves the clock synchronization performance between massive IoT nodes, ensures the stability and efficiency of the network, and is suitable for the fields of IoT, smart cities and industrial automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697752A_ABST
    Figure CN119697752A_ABST
Patent Text Reader

Abstract

The invention discloses a time slot synchronization method of a TDMA (Time Division Multiple Access) wireless communication network. The time slot synchronization method comprises the following steps: S1, nodes maintain time slot synchronization among the nodes by using the following synchronization modes: UTC (Universal Time Coordinated) direct synchronization, UTC indirect synchronization, base station direct synchronization, base station indirect synchronization and mobile node semaphore synchronization; s2, the base station plays related information required by time slot synchronization by using a time slot synchronization broadcast message; s3, any node uses a node information broadcast message to play related information required by time slot synchronization, and the related information comprises node attributes, timing unreliability values and synchronization state information required by a synchronization reference selection process; s4, the base station provides time service, so that the mobile node can determine the deviation between the local time and the base station time; and S5, providing precise time synchronization service by the base station, and maintaining time slot synchronization within an error range given by the system. According to the invention, wireless relay networking communication of mass Internet of Things nodes is realized, and the performance index of clock synchronization between the nodes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a time slot synchronization method, in particular to a time slot synchronization method for a TDMA (Time Division Multiple Access) wireless communication network. Background Art

[0002] In a half-duplex wireless ad hoc communication system, network node synchronization is the key to whether each communication node can access the network for communication. In the Internet of Things, after most nodes wake up from low-power sleep mode, they need to complete the communication as soon as possible. This requires instant synchronization with adjacent nodes in the network and obtaining relevant information about adjacent nodes, and then selecting one of the nodes as the access relay node to complete network access and subsequently achieve this communication task.

[0003] Since the local clock of each node is offset, the local clocks of different nodes are not synchronized. When the clock offset is too large, the two nodes cannot communicate normally. Therefore, it is necessary for each node to maintain the clock synchronization deviation between each other within the tolerance set by the system.

[0004] Usually, a unified time reference is set for the wireless communication system. Typically, UTC is selected as the standard reference time, and then the reference time of the local communication system is derived. For example, the base station time is used as the local reference time and synchronized to UTC time when possible.

[0005] The SDR wireless communication system in the Bluetooth frequency band is used to interconnect various communication nodes in the Internet of Things. In order to ensure that large-capacity nodes can communicate efficiently, it is necessary to further use time division multiplexing on the basis of frequency division multiplexing, and use base stations to manage the access of various mobile nodes, and even use dedicated relay nodes or enable the relay function of mobile nodes to expand the coverage of the communication network, which increases the complexity of the system. In order to solve the clock synchronization of various nodes in the SDR wireless communication system using the Bluetooth frequency band, it is necessary to provide a time slot synchronization method for TDMA wireless communication network. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a time slot synchronization method for a TDMA wireless communication network, which can realize wireless relay networking communication of massive Internet of Things nodes and improve the performance index requirements of clock synchronization between various nodes.

[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is to provide a time slot synchronization method for a TDMA wireless communication network, comprising the following steps: S1, nodes use the following synchronization methods to maintain time slot synchronization between nodes: UTC direct synchronization, UTC indirect synchronization, base station direct synchronization, base station indirect synchronization and mobile node signal synchronization; S2, the base station uses the "time slot synchronization broadcast" message to broadcast the relevant information required for time slot synchronization, including the current time, the current time slot description, and the calculation parameters of the delay time; S3, any node uses the "node information broadcast" message to broadcast the relevant information required for time slot synchronization, including the current time, the current time slot description, the calculation parameters of the delay time, and the node attributes, timing unreliability values ​​and synchronization status information required for the synchronization benchmark selection process; S4, the base station provides time services so that the mobile node can determine the deviation between the local time and the base station time; S5, the base station provides precise time synchronization services to maintain time slot synchronization within the error range given by the system.

[0008] Further, the step S2 includes: S21, the mobile node monitors the messages of the surrounding nodes for 120 seconds; S22, recording the type, synchronization status and timing unreliability attribute data of the surrounding nodes; S23, sorting the surrounding nodes by the number of messages received, with the largest number at the front; S24, re-sorting the nodes with the same number of message receptions by node ID number, with the smaller ID number at the front; S25, re-sorting the nodes with the same number of message receptions by node timing unreliability, with the smaller value at the front; S26, selecting the node at the front of the sort as the reference node for time synchronization, and checking the synchronization status; S27, determining the state after completing the synchronization process according to the synchronization status, node attributes, and timing unreliability of the reference node: UTC indirect synchronization, base station direct synchronization, base station indirect synchronization, mobile node semaphore synchronization, and unsynchronized, and assigning a value to the timing unreliability NUR after successful synchronization; if the synchronization is unsuccessful, the synchronization state is "unsynchronized", and the timing unreliability NUR is set to the maximum value of 31; obtaining the frame description information of the current UTC time and time slot from the selected reference node, and then setting the register of the local time and the register of each frame time slot description to complete the coarse synchronization.

[0009] Furthermore, in step S3, the mobile node receives the "time slot synchronization broadcast" of the base station or the repeater, and executes the following process to realize time slot fine synchronization: S31, receiving the time slot synchronization broadcast information of the base station at a given time slot; S32-1, if the number of received pre-synchronization codes is less than 8 0xAA bytes and the post-synchronization codes are all received, it means that the receiving time slot is ahead, and the timer is adjusted upward by 1 microsecond, and then the step S31 is turned; S32-2, if the number of received post-synchronization codes is less than 7 0x1B bytes and the pre-synchronization codes are all received. 8 0xAA bytes, it means that the receiving time slot is behind, and the timer is adjusted downward by 1 microsecond, and then the step S31 is turned; S32-3, if the pre-synchronization code 8 0xAA bytes and the post-synchronization code 7 0x1B bytes are correctly received. It means that synchronization has been achieved, and then the step S33 is turned; step S33, exit the time slot synchronization process.

[0010] Furthermore, in step S4, the base station provides time service according to the following steps: S41, the mobile node sends a "time service request" and records the mobile node timestamp T1 of the local sending of the "time service request packet"; S42, when the relay node forwards the "time service request", it adjusts the forwarding indication in the forwarded "time service request" according to the forwarded sending time Trelay* and the "delay time" of the device, and then increases the forwarding delay time of the forwarder and modifies the data packet length; S43, after the base station receives the "time service request", it records the base station timestamp T2 when the "time service request" is received; then, the timestamp T2, the delay time list of the request packet, and the planned sending timestamp T3 of the base station are used as the static load of the "time service response", so that the hardware timer is set at the base station timestamp T 3, the "time service response" is transmitted; S44, when the relay node forwards the "time service response", it records the time T3* when the "time service response" is received, and then adjusts the forwarding instruction in the forwarded "time service response packet" according to the forwarded sending time Trelay* and the "delay time" of the device, adds the delay time information, and modifies the data packet length; S45, after the mobile node receives the "time service response", it records the mobile node timestamp T4 when the "time service response" is received; according to the "repeater delay time list of received request packets", the "accumulated delay time" T2delay of the received request packets is accumulated, and according to the "repeater delay time list", the "accumulated delay time" T4delay is accumulated; S45-1, calculate the round-trip transmission delay: delay = (T4-T1)-(T3-T2); T2 = T1 + offset + T2delay + air delay uplink; T4 = T3 - offset + T4delay + air delay downlink; S45-2, calculate the time difference between the mobile node and the base station: i) If the "accumulated delay time" T4delay and the "accumulated delay time" T2delay of the received request packet are equal, the result of adding the two is equal to delay, ignoring the difference between the air delay uplink and the air delay downlink, the time difference can be solved as: offset = ((T2 -T1) + (T3 - T4) ) / 2; ii) If the "accumulated delay time" T4delay and the "accumulated delay time" T2delay of the received request packet are not equal, the round-trip path is the same, but the result of adding the two is equal to delay, ignoring the difference between the air delay uplink and the air delay downlink, the time difference can be solved as: offset = ((T2 - T1) + (T3 - T4) + (T4delay -T2delay) ) / 2; S46, calculate the time deviation, if multiple measurements are needed to reduce the error, repeat the above steps; S47, adjust the local time of the mobile node to complete the time calibration between the mobile node and the base station;New local time NewTime = original local time Time + time offset offset. ;

[0011] Furthermore, in step S5, the base station provides precise time synchronization service according to the following steps: S51, the mobile node sends a "precise time synchronization request" to the base station, and waits for the "precise time synchronization response" of the base station; S52, after receiving the signaling, the base station measures the time deviation data of the "time slot synchronization broadcast" sent by itself, and records the message reception timestamp T0 and the start time t0 of the reception time slot; S53, the base station measures the time deviation data of the "time slot synchronization broadcast" of the signaling sender, and records the message reception timestamp T1 and the start time t1 of the reception time slot; S54, the base station calculates the time deviation: ΔT0=T0-t0, ΔT1=T1-t1, Offset =ΔT1-ΔT0; S55, the base station tracks the Offset and sends a "precise time synchronization response"; if the Offset is within the range of ±32767 nanoseconds, it replies with the NTP_PRE_RES signaling and sets the "time synchronization indication" parameter in the NTP_PRE_RES signaling to 1; if the Offset is outside the range of ±32767 nanoseconds, it replies with the NTP_PRE_RES signaling and sets the "time synchronization indication" parameter in the NTP_PRE_RES signaling to 0; S56, after receiving the "precise time synchronization response", the mobile node adjusts its own clock according to the Offset value in the "precise time synchronization response" message to achieve clock synchronization with the base station: NewTime = Time + offset.

[0012] Furthermore, the time length of the time slot is set to 3.0 ms, 1 time slot is divided into 6 sub-time slots, the time length of each sub-time slot is 0.5 milliseconds, each frame contains 333 time slots, and 1 ms retention time is reserved for synchronization and calibration processing.

[0013] Furthermore, the time slot synchronization frame is 1 frame per second, 60 frames per minute, and every 60 frames constitute a multiframe; 60 multiframes per hour, and every 60 multiframes constitute a superframe; 24 superframes per day, and at 0:0:0:0:0:0 milliseconds every day, all levels of counters are reset to zero.

[0014] Compared with the prior art, the present invention has the following beneficial effects: the time slot synchronization method of the TDMA wireless communication network provided by the present invention realizes large-scale relay networking through precise time synchronization and time slot allocation, as well as dynamic routing selection and late-entry processing; the present invention can improve the stability and efficiency of the network, and is suitable for scenarios requiring large-scale device connection and data transmission, especially in the fields of the Internet of Things (IoT), smart cities and industrial automation, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the frame structure of the half-duplex wireless ad hoc network communication of the present invention; Figure 2 This is a flowchart of the mobile node startup synchronization of the present invention; Figure 3 This is a flowchart of base station startup synchronization of the present invention; Figure 4 This is a flow chart of mobile node time synchronization of the present invention; Figure 5 This is a signaling process diagram of random access of the present invention; Figure 6 This is a signaling process diagram of fixed access of the present invention; Figure 7 A signaling process diagram for the precise time synchronization service of the present invention. DETAILED DESCRIPTION

[0016] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0017] The method of the present invention is used for UTC indirect synchronization, base station direct synchronization, base station indirect synchronization and mobile node signal synchronization, and provides a set of time synchronization methods for a time division multiple access (TDMA) wireless communication system, and is used in a wireless communication system constructed by SDR in the 2.4G Bluetooth frequency band.

[0018] In this wireless communication system, TDMA access is divided into two modes: FATDMA access (fixed time slot TDMA access) and RATDMA access (random time slot TDMA access).

[0019] 1. Time synchronization method 1) If the network node equipment of wireless communication is equipped with a satellite navigation positioning and timing system, it should be synchronized to UTC time. Otherwise, see if it can obtain synchronization from other nodes synchronized to UTC time to achieve indirect synchronization to UTC time.

[0020] 2) If the base station cannot be synchronized to UTC time directly or indirectly, the time base of the communication system will be the base station.

[0021] 3) When the mobile node can directly or indirectly synchronize to UTC time at the base station, it is preferred to directly or indirectly synchronize to UTC time. Otherwise, it is second best to synchronize directly to the base station. Thirdly, it is best to see if it can obtain synchronization from other nodes that are directly synchronized to the base station to achieve indirect synchronization to the base station.

[0022] 4) The mobile node cannot be directly or indirectly synchronized to UTC time, nor can it be directly or indirectly synchronized to the base station time, but it can receive broadcast messages from other nodes that are indirectly synchronized to UTC time or indirectly synchronized to the base station time, and can achieve time synchronization with these nodes, but the time accuracy of synchronization has been reduced, and its synchronization state is semaphore synchronization. In order to identify the unreliability of time accuracy, an unreliable value is used to record it.

[0023] 5) The mobile node cannot receive broadcast messages from other nodes that are indirectly synchronized to UTC time or indirectly synchronized to base station time. It can only receive broadcast messages from other nodes that are synchronized by semaphore. It can achieve time synchronization with these nodes, and its synchronization state is also semaphore synchronization, but the unreliability value needs to be increased by 1, which shows that the accuracy of time synchronization is inferior to that of the selected synchronization node.

[0024] 6) Base stations or dedicated relay nodes use time synchronization broadcasting, and ordinary nodes use node information broadcasting. Time synchronization related information is given in the broadcast information to facilitate other nodes to achieve time synchronization and track the TDMA time slot operation of the entire communication system.

[0025] 2. Several ways of synchronization 2.1 UTC Direct Synchronization When a node is equipped with a satellite navigation positioning and timing system and is working well, and can directly obtain UTC time with the accuracy required by the system, it is in the UTC direct synchronization state. Nodes in the UTC direct synchronization state should set their synchronization state to "UTC direct synchronization".

[0026] The mobile node directly synchronized with UTC uses the UTC clock source provided by the satellite navigation positioning and timing system as the synchronization clock source, which can align the TDMA time slot within the range of ±100 nanoseconds.

[0027] Base stations, dedicated repeaters and any type of mobile nodes in wireless communication networks should use UTC direct synchronization if they are equipped with a satellite navigation positioning and timing system and are working well.

[0028] 2.2 UTC indirect synchronization A node that cannot achieve "UTC Direct" synchronization, but can receive messages from other nodes (base stations, dedicated repeaters, or mobile nodes) that show the synchronization state as "UTC Direct", should synchronize with these nodes (base stations, dedicated repeaters, or mobile nodes) and change its synchronization state to "UTC Indirect Synchronization" after synchronization is completed.

[0029] For network nodes that are indirectly synchronized with UTC, their synchronized clock source can still be considered to be the UTC clock source given by the satellite navigation positioning and timing system, but there is a certain lag delay time. The delay error can be reduced through a compensation algorithm.

[0030] The process of base stations, dedicated repeaters or mobile nodes using the NTP protocol to calibrate time with the timing server is equivalent to UTC indirect synchronization. After completing time synchronization, its synchronization status is set to "UTC indirect synchronization". The synchronized clock source is still considered to be the UTC clock source given by the satellite navigation positioning timing system, but there is a certain lag delay time, which needs to be compensated to reduce the error.

[0031] 2.3 Base station direct synchronization A node that cannot achieve UTC direct or UTC indirect synchronization should use base station direct synchronization if it can directly receive transmission messages from base stations. Under this condition, the node should synchronize with the base station with the largest number of message receptions, provided that the base station has received more than three messages in the past 120 seconds. When a node receives messages from multiple base stations, the base station with the largest number of message receptions is used as the benchmark; if the number of message receptions of these base stations is the same, the base station with the smallest number is selected as the benchmark.

[0032] After a node completes base station direct synchronization, it should change its synchronization state to "base station direct synchronization".

[0033] For nodes that are directly synchronized with the base station, the clock source of their synchronization is the clock source of the base station (not necessarily synchronized with UTC).

[0034] 2.4 Indirect synchronization of base stations If a node cannot achieve UTC direct or UTC indirect synchronization, and cannot achieve base station direct synchronization, it should use the base station indirect synchronization method to complete synchronization if it can receive other node transmission messages showing "base station direct synchronization". Then, it changes its synchronization state to "base station indirect synchronization".

[0035] Nodes using the base station indirect synchronization method should synchronize with the node that receives the most messages, provided that the node has received more than three messages in the past 120 seconds. When a mobile node receives messages from multiple mobile nodes, the mobile node with the most messages is used as the benchmark; if the number of messages received by these mobile nodes is the same, the mobile node with the smallest number is selected as the benchmark.

[0036] For mobile nodes that have completed indirect synchronization with the base station, their synchronized clock source can still be considered to be the base station's clock source (not necessarily synchronized with UTC), but there is a certain lag delay time. The delay error can be reduced through a compensation algorithm.

[0037] 2.5 Mobile Node Semaphore Synchronization When a node cannot achieve UTC direct or UTC indirect synchronization, and cannot achieve base station direct or base station indirect synchronization, "mobile node semaphore" synchronization should be used.

[0038] A node using "Mobile Node Semaphore" synchronization shall synchronize with the node that has received the most messages from other nodes in the last 120 seconds, provided that the node has received more than two reports in the last 120 seconds. After completing the mobile node semaphore synchronization, the node shall change its synchronization state to "Mobile Node Semaphore".

[0039] When a node receives multiple other mobile nodes at the same time, it should synchronize with the node with the largest number of received messages. If the number of received messages of these mobile nodes is the same, the node with the smallest node number should be used as the benchmark for synchronization. Among these candidate mobile nodes, the priority order of selection according to synchronization status is "UTC indirect synchronization", "base station indirect synchronization", and "mobile node semaphore". Mobile nodes with a synchronization status of "unsynchronized" are not selected.

[0040] The mobile node synchronized by mobile node semaphore uses the clock source of other mobile nodes as the synchronization clock source, which is unreliable.

[0041] For mobile nodes synchronized with mobile node signals, their TDMA timing deviates greatly from the TDMA timing based on the base station. Unless in special circumstances, the FATDMA access method should not be used, and the RATDMA access method should be used for access communication.

[0042] 3. Implementation of TDMA time slot synchronization 3.1 UTC Direct Synchronization If the mobile node has a satellite navigation positioning and timing system and it works normally, it can directly set the system timer according to the decoded UTC time information and the time slot number definition rules of the system's time slot division to complete time synchronization and fill in the current time slot information: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds).

[0043] After completing the local clock setting and time slot information setting, change the synchronization state to "UTC direct synchronization" and set the "timing unreliability" of the node to 0.

[0044] 3.2 UTC Indirect Synchronization If the mobile node does not have a satellite navigation positioning and timing system, or the satellite navigation positioning and timing system is working abnormally, but can synchronize the messages of the base station or mobile node with the status of "UTC direct synchronization", the mobile will achieve time synchronization through the UTC indirect synchronization method.

[0045] The base stations or mobile nodes in the synchronization state of "UTC direct synchronization" are sorted by the number of received messages for 120 seconds, and the base station or mobile node with the largest number of received messages is selected as the benchmark for synchronization. If the number of received messages is the same, the base station or mobile node with the smallest number is selected as the benchmark for synchronization.

[0046] If the base station is selected as the benchmark, listen to and receive the time slot synchronization broadcast message of the base station, and add local timestamp to any received message. When listening, receive according to the no time slot division. When the message contains more than 6 consecutive 0xAA characters and more than 5 consecutive 0x1B characters, it is confirmed that a time slot synchronization message has been received. Then, the following important information can be obtained: 1) Preamble (0xAA repeated 8 times); 2) The current time and synchronization status of the message transmission; 3) The delay time of the transceiver sending the synchronization message; 4) The number of bits of a complete data packet transmitted over the air interface; 5) Air interface rate; 6) Frame description information of the current time slot: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). The current time during message transmission and the frame description information of the current time slot have a corresponding relationship and can be verified with each other.

[0047] 7) Post-synchronization code (0x1B repeated 7 times).

[0048] Verify the data in 2) and 6). If they are relevant, confirm that the data is valid and complete the initial time slot synchronization. You can then proceed with the following settings: 1) Set the local time to: current time of the base station + delay time + number of bits / air interface rate + (current local time stamp - local receiving time stamp of the data packet); 2) Change the frame description information of the current time slot running locally to the frame description information of the current time slot of the base station.

[0049] After completing the above process, the mobile node is initially synchronized with the selected reference base station, changes the synchronization state to "UTC indirect synchronization", and sets the "timing unreliability" of the node to 1.

[0050] If a mobile node is selected as the benchmark, listen to and receive the node information broadcast message of the mobile node, and add a local timestamp to any received message. When listening, receive according to the time slot division. When the frame identifier in the message is 0xBA, it is confirmed that a node's "node information broadcast" message has been received. Then, the following important information of the node can be obtained: 1) Frame identification (0xBA); 2) Node ID; 3) Number of node hops; 4) Node attributes and working modes; 5) The current time and synchronization status during message transmission.

[0051] 6) Frame description information of the current time slot: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). The current time during message transmission and the frame description information of the current time slot have a corresponding relationship and can be verified with each other.

[0052] 7) Sending delay time.

[0053] 8) The number of bits of a complete data packet transmitted over the air interface.

[0054] 9) Air interface rate.

[0055] 10) Description of time slot usage; 11) Neighbor table.

[0056] Verify the data in 5) and 6). If they are relevant, confirm that the data is valid and complete the initial time slot synchronization. You can then proceed with the following settings: 1) Set the local time to: current time of the base station + delay time + number of bits / air interface rate + (current local time stamp - local receiving time stamp of the data packet); 2) Change the frame description information of the current time slot running locally to the frame description information of the current time slot of the base station.

[0057] After completing the above process, the mobile node is initially synchronized with the selected reference mobile node, changes the synchronization state to "UTC indirect synchronization", and sets the "timing unreliability" of the node to 1.

[0058] 3.3 Base station direct synchronization If the mobile node can directly receive the message from the base station, the base stations are sorted by the number of messages received for 120 seconds, and the base station with the largest number of received messages is selected as the benchmark for synchronization. If the number of received messages is the same, the base station with the smallest number is selected as the benchmark for synchronization.

[0059] After selecting the reference base station for time slot synchronization, listen to and receive the time slot synchronization broadcast message of the base station, and add local timestamp to any received message. When listening, receive according to no time slot division. When the message contains more than 6 consecutive 0xAA characters and more than 5 consecutive 0x1B characters, it is confirmed that a time slot synchronization message has been received. Then, the following important information can be obtained: 1) The current time and synchronization status of the message transmission; 2) The delay time of the transceiver sending the synchronization message; 3) The number of bits of a complete data packet transmitted over the air interface; 4) Air interface rate; 5) Frame description information of the current time slot: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds).

[0060] Verify the data in 1) and 4). If they are relevant, confirm that the data is valid and complete the initial time slot synchronization. You can then proceed with the following settings: 1) Set the local time to: current time of the base station + delay time + number of bits / air interface rate + (current local time stamp - local receiving time stamp of the data packet); 2) Change the frame description information of the current time slot running locally to the frame description information of the current time slot of the base station.

[0061] After completing the above process, the mobile node is initially synchronized with the base station, changes the synchronization state to "base station direct synchronization", and sets the "timing unreliability" of the node to 1.

[0062] 3.4 Indirect synchronization of base stations If the mobile node cannot synchronize with UTC directly or indirectly, nor can it synchronize with the base station directly, but can receive transmission messages from other mobile nodes that display "base station direct synchronization", these mobile nodes will be statistically sorted according to the number of messages received for 120 seconds, and the mobile node with the largest number of received messages will be selected as the benchmark for synchronization. If the number of received messages is the same, the mobile node with the smallest number will be selected as the benchmark for synchronization.

[0063] After selecting a mobile node as the benchmark, listen to and receive the node information broadcast message of the mobile node, and add a local timestamp to any received message. When listening, receive according to the time slot division. When the frame identifier in the message is 0xBA, it is confirmed that a node's "node information broadcast" message has been received. Then, the following important information of the node can be obtained: 1) Frame identification (0xBA); 2) Node ID; 3) Number of node hops; 4) Node attributes and working modes; 5) The current time and synchronization status during message transmission.

[0064] 6) Frame description information of the current time slot: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). The current time during message transmission and the frame description information of the current time slot have a corresponding relationship and can be verified with each other.

[0065] 7) Sending delay time.

[0066] 8) The number of bits of a complete data packet transmitted over the air interface.

[0067] 9) Air interface rate.

[0068] 10) Description of time slot usage; 11) Neighbor table.

[0069] Verify the data in 5) and 6). If they are relevant, confirm that the data is valid and complete the initial time slot synchronization. You can then proceed with the following settings: 1) Set the local time to: current time of the base station + delay time + number of bits / air interface rate + (current local time stamp - local receiving time stamp of the data packet); 2) Change the frame description information of the current time slot running locally to the frame description information of the current time slot of the base station.

[0070] After completing the above process, the mobile node is initially synchronized with the selected reference mobile node, changes the synchronization state to "base station indirect synchronization", and sets the "timing unreliability" of the node to 2.

[0071] 3.5 Mobile Node Semaphore Synchronization If a mobile node cannot achieve UTC direct synchronization or UTC indirect synchronization, and cannot synchronize directly or indirectly with a base station, but can receive messages transmitted by other mobile nodes, these mobile nodes are sorted by the number of messages received for 120 seconds, and the mobile node with the largest number of received messages is selected as the benchmark for synchronization. If the number of received messages is the same, the mobile node with the smallest number is selected as the benchmark for synchronization. Among these candidate mobile nodes, the priority order of selection based on synchronization status is "UTC indirect synchronization", "base station indirect synchronization", and "mobile node semaphore". Mobile nodes with a synchronization status of "unsynchronized" are not selected. Generally, when the "timing unreliability" of a mobile node with a synchronization status of "mobile node semaphore" reaches 10, it should not be selected as a benchmark for synchronization.

[0072] After selecting a mobile node as the benchmark, listen to and receive the node information broadcast message of the mobile node, and add a local timestamp to any received message. When listening, receive according to the time slot division. When the frame identifier in the message is 0xBA, it is confirmed that a node's "node information broadcast" message has been received. Then, the following important information of the node can be obtained: 1) Frame identification (0xBA); 2) Node ID; 3) Number of node hops; 4) Node attributes and working modes; 5) The current time and synchronization status during message transmission.

[0073] 6) Frame description information of the current time slot: sub-time slot (5 bits, 0.5 milliseconds), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). The current time during message transmission and the frame description information of the current time slot have a corresponding relationship and can be verified with each other.

[0074] 7) Sending delay time.

[0075] 8) The number of bits of a complete data packet transmitted over the air interface.

[0076] 9) Air interface rate.

[0077] 10) Description of time slot usage; 11) Neighbor table.

[0078] Verify the data in 5) and 6). If they are relevant, confirm that the data is valid and complete the initial time slot synchronization. You can then proceed with the following settings: 1) Set the local time to: current time of the base station + delay time + number of bits / air interface rate + (current local time stamp - local receiving time stamp of the data packet); 2) Change the frame description information of the current time slot running locally to the frame description information of the current time slot of the base station.

[0079] After completing the above process, the mobile node is initially synchronized with the selected reference mobile node, the synchronization state is changed to "mobile node semaphore synchronization", and the "timing unreliability" of the node is increased by 1.

[0080] Implementation Effect The network node synchronization method of the wireless ad hoc network of the present invention specifically includes the following contents.

[0081] 1. Frame structure and time slot organization The time length of the time slot is defined as 3.0ms, which can meet the data transmission within 250 bytes and ensure that larger data packets can be transmitted in a single time slot. Furthermore, one time slot is divided into 6 sub-time slots to support the transmission of short messages (less than 52 bytes) in the sub-time slots, and the length of each sub-time slot is 0.5 milliseconds.

[0082] The frame structure of the half-duplex wireless ad hoc network communication of the present invention is as follows: Figure 1 As shown, there is one frame per second, one frame contains 333 time slots, and 1ms is reserved for synchronization and calibration. There are 60 frames per minute, and every 60 frames form a multiframe. There are 60 multiframes per hour, and every 60 multiframes form a superframe. There are 24 superframes per day, and at 0:0:0:0:0:0:0 milliseconds per day, all counters are reset to zero.

[0083] Special case: The last 1ms of each frame is represented by time slot number 333 (999 milliseconds), and can be divided into 2 sub-time slots using sub-time slot number 0 (999.0 milliseconds) or 1 (999.5 milliseconds), which is reserved for time synchronization and time calibration processing.

[0084] 2. SDR wireless broadcasting The system supports the following broadcasts: 1) Time slot synchronous broadcast, frame identifier 0xAA; 2) Random access resource broadcast, frame identifier 0xAB; 3) Random access request broadcast, frame identifier 0xAE; 4) Random access approval notification broadcast, frame identifier 0xAC; 5) Node information broadcast, frame identifier 0xBA; 6) Neighbor request broadcast, frame identifier 0xDB; 7) Neighbor announcement broadcast, frame identifier 0xDA.

[0085] Among these broadcast information, the time slot synchronization broadcast and the node information broadcast both contain information for time synchronization, which facilitates nodes that have not yet joined the network to complete the clock synchronization process before initiating an access application.

[0086] 2.1 Time slot synchronous broadcast Used for synchronization between mobile nodes and base stations, so that the time slots of mobile nodes and base stations are accurately aligned. There is no frame identifier for time slot synchronization broadcast. If the first byte is forced to be the frame identifier, it is 0xAA. Even if the receiver's time slot is not aligned, there is still a chance to search for the synchronization frame feature mark that marks multiple consecutive 0xAA bytes followed by a 0x00. When the mobile node receives, the CRC check should be turned off if conditions permit.

[0087] 1) Preamble (8 bytes): 0xAA repeated 8 times.

[0088] 2) Node synchronization status and unreliability (1 byte): Node synchronization status NSS (3 bits) and timing unreliability NUR (5 bits). NSS values: 0 (unsynchronized); 1 (UTC direct synchronization); 2 (UTC indirect synchronization); 3 (base station direct synchronization); 4 (base station indirect synchronization); 5 (mobile node semaphore synchronization).

[0089] 3) The current time of the base station when the function is called (6) bytes: the first 32 bits are UTC seconds, and the next 16 bits are milliseconds.

[0090] 4) Delay time for the transceiver to send the synchronization message (3 bytes, in nanoseconds): an unsigned integer, which is the time delay value from the transmission function call time to the data transmission start time (the start time of the first bit transmission). This parameter is measured in the laboratory and recorded in the basic parameter table of the equipment.

[0091] 5) The number of bits of a complete data packet transmitted in the air interface (2 bytes): The laboratory measures the number of additional bits (usually 160 bits) and records them in the basic parameter table of the equipment, and then adds the number of bits of this message: 32×8=256 bits.

[0092] 6) Air interface rate (1 byte, default is 0x04): 0-62.5Kbps; 1-125Kbps; 2-250Kbps; 3-500Kbps; 4-1Mbps; 5-2Mbps.

[0093] 7) Frame description information of the current time slot (4 bytes): 5 bits for sub-time slot, 5 bits for superframe number, 6 bits for multiframe number, 6 bits for frame number, and 10 bits for time slot number. At 0:00:00:00:00 every day, the frame description information of the current time slot is all reset to zero. Therefore, there is a corresponding relationship between the previous time information and the frame description information of the current time slot, and they can be verified with each other.

[0094] 8) Post-synchronization code (7 bytes): 0x1B repeated 7 times.

[0095] The timeslot synchronization information is 32 bytes in total.

[0096] 2.2 Node Information Broadcast 1) Frame identification (1 byte): 0xBA, node information broadcast; 2) Node ID (2 bytes): the low byte is valid; 3) Node hop count (1 byte): The node's level in the network relative to the base station, 0-base station, 1~254, node hop count, 255-disabled hop count information; 4) Node attributes and working mode (1 byte): high 4 bits of node attributes, 0x0-ordinary node (mobile node), 0xA-base station, 0x5-relay node; low 4 bits of node working mode, 0x0-ordinary node (mobile node), 0xA-base station, 0x5-relay node; 5) Node synchronization status and unreliability (1 byte): Node synchronization status NSS (3 bits) and timing unreliability NUR (5 bits). NSS values: 0 (unsynchronized); 1 (UTC direct synchronization); 2 (UTC indirect synchronization); 3 (base station direct synchronization); 4 (base station indirect synchronization); 5 (mobile node semaphore synchronization).

[0097] 6) The current time of the base station when the function is called (6) bytes: the first 32 bits are UTC seconds, and the next 16 bits are milliseconds.

[0098] 7) Frame description information of the current time slot (4 bytes): 5 bits for sub-time slot, 5 bits for superframe number, 6 bits for multiframe number, 6 bits for frame number, and 10 bits for time slot number. At 0:00:00:00:00 every day, the frame description information of the current time slot is all reset to zero. Therefore, there is a corresponding relationship between the previous time information and the frame description information of the current time slot, and they can be verified with each other.

[0099] 8) Send delay time (3 bytes, in nanoseconds): unsigned integer, which is the time delay value from the function call time to the start time of data transmission (the start time of the first bit of transmission). This parameter is measured in the laboratory and recorded in the basic parameter table of the device.

[0100] 9) The number of bits of a complete data packet transmitted in the air interface (2 bytes): The laboratory measures the number of additional bits (usually 160 bits) and records them in the basic parameter table of the equipment, and then adds the number of bits of this message: 32×8=256 bits.

[0101] 10) Air interface rate (1 byte, default is 0x04): 0-62.5Kbps; 1-125Kbps; 2-250Kbps; 3-500Kbps; 4-1Mbps; 5-2Mbps.

[0102] 11) Time slot usage description (4 bytes): The data structure and meaning of the time slot usage description are different for different node attributes; The time slot usage description data structure of the base station or repeater attribute node is: {synchronous broadcast time slot (1 byte, the offset time slot number relative to the start time slot of the time period) random access resource broadcast time slot (1 byte, the offset time slot number relative to the start time slot of the time period) random access approval notification time slot (1 byte, the offset time slot number relative to the start time slot of the time period) reserved byte (1 byte)}.

[0103] The time slot of an ordinary leaf attribute node uses the following data structure: {allocated working time slot (4 bytes): 5 bits for sub-time slot, 5 bits for superframe number, 6 bits for multiframe number, 6 bits for frame number, and 10 bits for time slot number, where 5 bits for sub-time slot are fixed to 00000}.

[0104] 12) Neighbor list (6 bytes): 0xFF indicates a padding byte, which is the low byte of the node ID. There are a maximum of 6 neighbors at a time. If there are more than 6 neighbors, the broadcast time will be rotated.

[0105] If a node that enters the network late selects a repeater or base station as its parent node, it should first listen to the broadcast of the base station / repeater (synchronous broadcast time slot, random access resource broadcast time slot, random access approval notification time slot), and then use random access to obtain time slot resources for temporary communication, and then use this time slot resource to initiate a late network entry application to the parent node. If a normal leaf node is selected as the parent node, it should "seize" the 4th sub-time slot of the parent node's working time slot in the next frame after listening to the "node information" broadcast information of the leaf node to initiate a late network entry application to the parent node.

[0106] According to the system's time slot usage rules, base stations and repeaters have time slots for broadcasting "node information broadcast" and "time slot synchronization broadcast" in each time period. Therefore, as long as the nodes that enter the network later are within the coverage area of ​​the base station or repeater, they can enter the network at an extremely fast speed (less than 3 seconds) through random access.

[0107] Note: Any node cannot broadcast "node information broadcast" in the working time slots of two consecutive frames to ensure that the node that can accept the late network access application "preempts" the sub-time slot to send the network access application.

[0108] Node information broadcast information 32 bytes.

[0109] 3. Timeslot synchronization process After the mobile node is powered on, according to whether the local satellite navigation positioning and timing system is configured, and the working status of the satellite navigation positioning and timing system (if any), if the UTC information is directly available, the local clock and the frame description information of the current time slot are set: sub-time slot (5 bits, 0~5), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). And set the synchronization status of this node to "UTC direct".

[0110] If the mobile node cannot achieve the "UTC direct" synchronization state, it needs to achieve synchronization by monitoring the communications of other nodes, including UTC indirect synchronization, base station direct synchronization, base station indirect synchronization, and mobile node semaphore synchronization, such as Figure 2 shown.

[0111] As a device with a special status, the base station sets the local clock and the frame description information of the current time slot according to whether the local satellite navigation positioning and timing system is configured and the working status of the satellite navigation positioning and timing system (if any) after it is turned on, if the UTC information is directly available: sub-time slot (5 bits, 0~5), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). And set the synchronization state of this node to "UTC direct" and the timing unreliability to 0; if Figure 3 shown.

[0112] If the base station cannot achieve the "UTC direct" synchronization state, set the local time according to the local RTC clock, including hours, minutes, seconds, and milliseconds. Then check the configured NTP time server and try to connect to the NTP time server to complete the time calibration. If the time calibration can be completed, set the local clock and the frame description information of the current time slot: sub-time slot (5 bits, 0~5), superframe number (5 bits, UTC hours), multiframe number (6 bits, UTC minutes), frame number (6 bits, UTC seconds) and time slot number (10 bits, 3 milliseconds). And set the synchronization state of this node to "UTC direct" and the timing unreliability to 1. Otherwise, use the local time to set the frame description information of the current time slot, and set the synchronization state to "unsynchronized" and the timing unreliability to 1.

[0113] The mobile node time synchronization process of the present invention is as follows Figure 4 If the mobile node cannot achieve the "UTC direct" synchronization state, it is necessary to perform the following mobile node time synchronization process and use the clock source of other nodes to complete the synchronization.

[0114] This node sorts the received broadcast messages according to their working mode (mobile node, base station, relay node) and the number of received messages. Base stations are better than relay nodes, and relay nodes are better than mobile nodes. For nodes of the same type, nodes with more received messages are better than nodes with less received messages; for nodes of the same type, nodes with a smaller number of hops are better than nodes with a larger number of hops; for nodes of the same type, nodes with a smaller value of "timing unreliability" are better than nodes with a larger value. Usually, nodes with a "timing unreliability" greater than 10 are not selected for time synchronization.

[0115] Since there is a "time slot synchronization broadcast", it is necessary to listen to the "node information broadcast" and extract the "local time", "delay time", "number of data message bits", "air interface rate" and "frame time slot" of the mobile node from the "node information broadcast" of other mobile nodes, calculate the deviation between the local time and the transmitter time, and set the local time and frame time slot.

[0116] If the "time slot synchronization broadcast" of the base station can be received, the "local time", "delay time", "number of data message bits", "air interface rate" and "frame time slot" of the base station can be extracted, the deviation between the local time and the base station time can be calculated, and the local time and frame time slot can be set.

[0117] 4. Specific methods of time slot synchronization 4.1. Coarse synchronization By listening to the "time slot synchronization broadcast" or "node information broadcast" of the base station, repeater or ordinary mobile node (leaf node), the frame description information of the current UTC time and time slot is obtained (5 bits for sub-time slot, 5 bits for superframe number, 6 bits for multiframe number, 6 bits for frame number, and 10 bits for time slot number). Then, the registers for local time and the registers for the description of each frame time slot can be set.

[0118] After completing the above process, the mobile node has initially achieved synchronization with the base station. Next, fine adjustments will be made to complete a more accurate time slot synchronization process.

[0119] If you can receive the "time slot synchronization broadcast" from the base station or repeater, execute the following process to achieve time slot synchronization (coarse synchronization).

[0120] Step 1) Receive the time slot synchronization broadcast information of the base station at a given time slot.

[0121] Step 2-1) If the number of received pre-synchronization codes is less than 8 0xAA bytes and all 7 0x1B bytes of post-synchronization codes are received, it means that the receiving time slot is advanced. The timer should be adjusted upward by 1 microsecond, and then go to step 1).

[0122] Step 2-2) If the number of received post-synchronization codes is less than 7 0x1B bytes but all 8 0xAA bytes of pre-synchronization codes are received, it means that the receiving time slot is behind, and the timer should be adjusted down by 1 microsecond, and then go to step 1).

[0123] Step 2-3) If the 8 0xAA bytes of the pre-synchronization code and the 7 0x1B bytes of the post-synchronization code are received correctly, it means synchronization has been achieved, and then go to step 3).

[0124] Step 3) Exit the time slot synchronization process.

[0125] 4.2. Accurate synchronization With the help of the base station, the mobile node can be precisely synchronized with the base station time slot. The method is that the base station receives the time slot synchronization broadcast that it broadcasts regularly, records the message reception timestamp T0 and the start time t0 of the reception time slot, and calculates the time deviation ΔT0=T0-t0. Then, let the mobile node complete a message with the same content as the time slot synchronization broadcast in the allocated time slot. The base station receives the message, records the message reception timestamp T1 and the start time t1 of the reception time slot, and calculates the time deviation ΔT1=T1-t1.

[0126] Offset = ΔT1-ΔT0 When Offset=0, it indicates that the two time slots are completely synchronized.

[0127] When Offset<0, it indicates that the mobile node time slot is ahead of the base station time, and the deviation is Offset.

[0128] When Offset>0, it indicates that the mobile node time slot lags behind the base station, and the deviation is Offset.

[0129] After multiple measurements (more than 10 times), the maximum and minimum values ​​are eliminated and the average result is calculated. The mobile node can adjust the local timer based on this result to achieve accurate time slot synchronization with an accuracy better than ±5us.

[0130] Note: The above time slot synchronization is only adjusted for the base station to receive the mobile node message, and does not include the processing of radio propagation delay.

[0131] When the radio propagation distance is greater than 3000 meters, the radio propagation delay reaches 10us, and the actual time slot time of the mobile node is 10us ahead of the base station. The message sent by the base station to the mobile node arrives at the mobile node after a delay of 10us. The mobile node starts receiving 20us after the time slot time in the receiving window, and the window time of the receiving end is actually advanced by 20us (relative to the sender). Therefore, if the sender's data transmission completely fills the time slot, it will lead to incorrect reception.

[0132] In the Internet network of the present invention, one time slot is 3000us. The base station can repeat the above "time slot synchronization broadcast information" three times in one time slot (each time with a different delay time) to ensure that the mobile node can accurately complete the reception. When the mobile node sends a message to the base station, since the time slot time is 10us ahead, after a 10us air propagation delay, when it arrives at the base station, it accurately falls into the receiving time slot of the base station.

[0133] 4.3.Time slot synchronization maintenance Since there is a deviation between the local clock and the base station clock, the time slot synchronization state cannot be maintained for a long time after a single synchronization. The time slot synchronization deviation should be measured and corrected regularly.

[0134] The mobile node receives the time slot synchronization broadcast of the base station, and records the received timestamp TDn and the timestamp TBn announced by the base station in the "time slot synchronization broadcast" timeslot of each period.

[0135] Compare the timestamp difference between the previous and next frames: ΔTDn=TDn-TDn-1 ΔTBn = TBn - TBn-1 Offset = ΔTDn - ΔTBn When Offset=0, it indicates that the two time slots are completely synchronized.

[0136] When Offset>0, it indicates that the mobile node's clock is faster than the base station's clock, and the mobile node's time slot is ahead of the base station's, with a deviation of Offset.

[0137] When Offset<0, it indicates that the clock of the mobile node is slower than the clock of the base station, and the time slot of the mobile node lags behind that of the base station, with a deviation of Offset.

[0138] The time slot timer of the mobile node is adjusted according to the Offset value to correct the timing error so that the subsequent time slots are accurately synchronized with the base station within the time range of this frame.

[0139] According to the requirement that the length of a time period is 333ms and the time slot synchronization error is ±5us, the mobile node can automatically adjust the clock deviation within 15PPM.

[0140] The deviation δTsys between the local clock and the base station clock and the corrected local clock frequency Fcor are calculated every 100 frames (60 seconds), and then the correction amount δTseg = δTsys / 600 is calculated for each time period. The clock used for the time slot is derived from the original system clock Tsys. The sending thread and the receiving thread use independent time slot clocks, and the semaphore is used to maintain the mutual exclusion relationship between the two threads. Before each transmission, the preparation for data transmission is done first, and then the timing parameters of the calibration time slot are calculated and configured, and the data transmission process is activated in the timer interrupt (time slot start time) processing function.

[0141] 5. Signaling process of random access (RATDMA) network access Please continue to see Figure 5 The mobile node that completes random access through the base station or mobile node relay obtains a time slot for temporary work, uses the time slot to send a "network access" application to the selected parent node, waits for the selected parent node to allocate time slot resources, and after obtaining the formally allocated time slot resources, enters the network and carries out the formal work process.

[0142] 6. Signaling process of fixed access (FATDMA) network access Please continue to see Figure 6 After the node is turned on, it cannot directly listen to the broadcast of the base station or repeater, but can only listen to the "node information broadcast" of the mobile node. Therefore, the "fixed access" process is adopted to apply for late access to the network directly from the parent node.

[0143] The mobile node that joins the network sends a network access application to the parent node by occupying the 4th sub-time slot of the working time slot allocated by the parent node, but can only use the next frame of the frame used for broadcasting the node information to avoid conflicts.

[0144] Use this time slot to send a "network access" application to the selected parent node, wait for the selected parent node to allocate time slot resources, and after obtaining the formally allocated time slot resources, enter the network and carry out the formal work process.

[0145] As an alternative solution, after the access node is powered on, it scans and listens for 10 seconds to understand the time slot usage (occupancy). If an "idle time slot" can be selected, the selected idle time slot can be used to send a network access application to the parent node.

[0146] 7. Time service 7.1 Time Service Request Source signaling point OPC (2 bytes): The signaling point identification code of the signaling sender.

[0147] Destination signaling point DPC (2 bytes): The signaling point identification code of the signaling receiver (usually a base station).

[0148] Link identification code SLC (1 byte): 0x00.

[0149] Signaling header code H1H0 (1 byte): Time service request (NTP_REQ), 00100111 Signaling parameter SD (variable length, up to 19 bytes): 1) Node ID (2 bytes); 2) Node hop count (1 byte): The node's level in the network relative to the base station, 0-base station, 1~254, node hop count, 255-disabled hop count information; 3) Relay forwarding indication (1 byte): 0 means no forwarding through a wireless repeater. The value increases by 1 for each wireless repeater, up to a maximum of 4. 4) Node sending delay time (3 bytes): It is the transmission delay time of the signaling sender, in nanoseconds; 5) Repeater delay time data list (variable length, relay forwarding indication × 3 bytes, up to 12 bytes): Each time a repeater is passed, a 3-byte delay time is added, which is the repeater's transmission delay time, unit: nanoseconds.

[0150] When the signaling receiver (usually a base station) receives the time service request from the signaling, it immediately responds with the NTP_RES signaling.

[0151] Any repeater or ordinary mobile node (leaf node) can use the built-in time service function of the base station and use the time synchronization process (see Chapter 6, System Time Calibration) to synchronize the local time to the base station.

[0152] The total length of the time service request signaling is 28 bytes.

[0153] 7.2 Time Service Response Source signaling point OPC (2 bytes): The signaling point identification code of the signaling sender.

[0154] Destination signaling point DPC (2 bytes): signaling point identification code of the signaling receiver.

[0155] Link identification code SLC (1 byte): 0x00.

[0156] Signaling header code H1H0 (1 byte): Time service response (NTP_RES), 00101000 Signaling parameter SD (variable length, up to 38 bytes): 1) Relay forwarding indication (1 byte): 0 means no forwarding through a wireless repeater. The value increases by 1 for each wireless repeater, up to a maximum of 4. 2) Time data (variable length, 13 bytes + relay forwarding indication × 6 bytes, up to 37 bytes): timestamp T3 offset (3 bytes, nanoseconds, relative to the timestamp T2 of the received request packet) + delay time (3 bytes, unit: nanoseconds) + timestamp T2 of the received request packet (7 bytes, 4 bytes UTC seconds + 3 bytes nanoseconds) + repeater delay time list for receiving the request packet (3 bytes of delay time are added for each repeater passed) + repeater delay time list (3 bytes of delay time are added for each repeater passed).

[0157] Note: The response time should be within 16ms after receiving the request packet, that is, the time difference between timestamp T2 and timestamp T3 is ≤16ms.

[0158] The total length of the time service response signaling is 47 bytes.

[0159] 7.3 Process of mobile node requesting time service The first step is similar to NTP synchronization. The mobile node sends a "time service request" with the destination address being the base station. The forwarding indication (0) in the "time service request" uses its own delay time as the static load. At the same time, the (planned) sending timestamp T1 of the local "time service request" is recorded.

[0160] If there is a relay node, when the relay node forwards the "time service request", it records the time T1 when the "time service request" is received. * , and then according to the forwarded (planned) sending time T relay * and the "delay time" of the device, adjust the forwarding indication in the forwarded "time service request" (increase 1), then increase the forwarding delay time of the forwarder and modify the data packet length (increase 3).

[0161] In the second step, after receiving the "time service request", the base station records the base station timestamp T2 when the "time service request" is received. Then, the timestamp T2, the delay time list of the request packet, and the base station's planned sending timestamp T3 are used as the static payload of the "time service response", so that the hardware timer transmits the "time service response" at the base station timestamp T3. The "time service response" sent (planned) at the base station timestamp T3 also includes the forwarding indication (0) and the base station's delay time.

[0162] If there is a relay node, when the relay node forwards the "time service response", it records the time T3 when the "time service response" is received * , and then according to the forwarded (planned) sending time T relay * and the "delay time" of the device, adjust the forwarding indication in the forwarded "time service response" (increase 1), add the delay time information, and modify the data packet length (increase 3).

[0163] Step 3: After the mobile node receives the "time service response", it records the mobile node timestamp T4 when the "time service response" is received. The "accumulated delay time" T2 of the received request packet is calculated based on the "relay delay time list of the received request packet" delay , calculate the "accumulated delay time" T4 according to the "repeater delay time list" delay .

[0164] The fourth step is to calculate the time deviation. If multiple measurements are needed to reduce the error, repeat the previous steps.

[0165] The fifth step is to adjust the local time of the mobile node and complete the time calibration between the mobile node and the base station.

[0166] 1) Calculation of round-trip transmission delay between mobile nodes and base stations The round-trip delay of the time service message from the client to the server.

[0167] delay = (T4-T1)-(T3-T2) Formula 1 “Cumulative delay time” T4 delay And the received request packet "accumulated delay time" T2delay The validity of the above delay calculation results can be tested in a single process. If the round-trip delay is the same, the offset will be calculated using Formula 2 and Formula 3.

[0168] 2) Calculation of time difference between mobile node and base station The time difference offset between the mobile node and the base station.

[0169] “Cumulative delay time” T4 delay And the received request packet "accumulated delay time" T2 delay are equal, and the return path is the same. The sum of the two is approximately equal to delay. According to the equation group: T2 = T1 + offset + (delay / 2) + air delay 上行 Formula 2-1a T4 = T3 - offset + (delay / 2) + air delay 下行 Formula 2-1b Ignore air delay 上行 and air delay 下行 The time difference can be solved as: offset= ((T2 - T1) + (T3 - T4) ) / 2Formula 3-1 The mobile node adjusts its own clock according to the calculated offset to synchronize with the base station's clock: NewTime = Time + offset formula 4 If the “accumulated delay time” is T4 delay And the received request packet "accumulated delay time" T2 delay They are not equal, the round trip paths are the same, but the sum of the two is approximately equal to delay, then according to the equation group: T2 = T1 + offset + T2 delay + Air Delay 上行 Formula 2-2a T4 = T3 - offset + T4 delay + Air Delay 下行 Formula 2-2b Ignore air delay 上行 and air delay 下行 The time difference can be solved as: offset= ((T2 - T1) + (T3 - T4) + (T4 delay - T2 delay ) ) / 2 formula 3-2 Then, the mobile node adjusts its own clock using Formula 4 to achieve clock synchronization with the base station.

[0170] 7.4 Exception handling of mobile node time service process If the mobile node does not receive a time service response message within 3 seconds, it is considered to have timed out and should exit the time service process.

[0171] When the mobile node receives a time service response message, the "relay forwarding indication" of the message does not match the "received request packet forwarding indication" in the net payload, indicating that the request and response have different relay paths. If no matching message forwarded by other forwarders is received, the mobile node should exit the time service process.

[0172] When the "relay forwarding indication" in the message or the "received request packet forwarding indication" in the net load is greater than 10, the time service process should be exited.

[0173] 8. Accurate time synchronization service 8.1 Precise Time Synchronization Request Source signaling point OPC (2 bytes): The signaling point identification code of the signaling sender.

[0174] Destination signaling point DPC (2 bytes): The signaling point identification code of the signaling receiver (base station or repeater).

[0175] Link identification code SLC (1 byte): 0x00.

[0176] Signaling header code H1H0 (1 byte): Precision time synchronization request (NTP_PRE_REQ), 00100110 Signaling parameter SD (length 7 bytes): 1) Node ID (2 bytes); 2) Node hop count (1 byte): The node's level in the network relative to the base station, 0-base station, 1~254, node hop count, 255-disabled hop count information; 3) Sending time slot synchronization broadcast time slot (4 bytes): tells the base station or repeater that the signaling sender will send the "time slot synchronization broadcast" in which time slot, 5 bits for sub-time slot, 5 bits for superframe number, 6 bits for multiframe number, 6 bits for frame number, and 10 bits for time slot number.

[0177] The precise time synchronization request signaling length is 16 bytes in total.

[0178] 8.2 Accurate time synchronization response Source signaling point OPC (2 bytes): The signaling point identification code of the signaling sender.

[0179] Destination signaling point DPC (2 bytes): signaling point identification code of the signaling receiver.

[0180] Link identification code SLC (1 byte): 0x00.

[0181] Signaling header code H1H0 (1 byte): Precision time synchronization response (NTP_PRE_RES), 00101001 Signaling parameter SD (length 6 bytes): 1) Node ID (2 bytes); 2) Node hop count (1 byte): The node's level in the network relative to the base station, 0-base station, 1~254, node hop count, 255-disabled hop count information; 3) Time synchronization indication (1 byte): Indicates whether the time synchronization deviation data is valid, 0-invalid, 1-valid, 0xFF-service does not exist.

[0182] 4) Time synchronization deviation (2 bytes, unit: nanosecond): 16-bit signed integer, indicating the time error of ±32767 nanoseconds.

[0183] The length of the precise time synchronization response signaling is 15 bytes in total.

[0184] 8.3 Time Slot Precision Synchronization Service Process In the first step, the mobile node sends a "precise time synchronization request" with the destination address being the base station. The forwarding indication (0) in the "time service request packet" uses its own delay time as the static load. At the same time, the (planned) sending mobile node timestamp T0 of the local "time service request packet" is recorded. Then wait to receive the "precise time synchronization response".

[0185] The second step is that after receiving the signaling, the signaling receiver (base station or repeater) first measures the time deviation data of receiving its own "time slot synchronous broadcast" before "sending time slot synchronous broadcast time slot", and records the message receiving timestamp T0 and the starting time t0 of the receiving time slot time.

[0186] The third step is to wait for the time deviation data of the "time slot synchronous broadcast" of the measurement signaling sender, and record the message receiving timestamp T1 and the starting time t1 of the receiving timeslot time.

[0187] Step 4: The base station calculates the time deviation ΔT0=T0-t0 ΔT1=T1-t1 Offset = ΔT1-ΔT0.

[0188] Step 5: If the Offset is within the range of ±32767 nanoseconds, reply with NTP_PRE_RES signaling, and set the "Time Synchronization Indication" parameter in the NTP_PRE_RES signaling to 1 (valid); if the Offset is outside the range of ±32767 nanoseconds, reply with NTP_PRE_RES signaling, and set the "Time Synchronization Indication" parameter in the NTP_PRE_RES signaling to 0 (invalid). The base station sends a "Precise Time Synchronization Response" data packet to the node that sent the "Precise Time Synchronization Request Packet".

[0189] Step 6: After receiving the "Precise Time Synchronization Response", the mobile node sets the time according to the Offset value: 1) When Offset = 0, it indicates that the two time slots are completely synchronized; 2) When Offset<0, it indicates that the mobile node time slot is ahead of the base station, and the deviation is Offset; 3) When Offset>0, it indicates that the mobile node time slot lags behind the base station, and the deviation is Offset.

[0190] The mobile node adjusts its own clock according to the Offset value in the "Precise Time Synchronization Response" message to achieve clock synchronization with the base station: NewTime = Time + offset The signaling process of the precise time synchronization service is as follows Figure 7 shown.

[0191] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the definition of the claims.

Claims

1. A time slot synchronization method for a TDMA wireless communication network, characterized in that: The steps include: S1. Nodes use the following synchronization methods to maintain time slot synchronization between nodes: UTC direct synchronization, UTC indirect synchronization, base station direct synchronization, base station indirect synchronization and mobile node semaphore synchronization; S2. The base station uses the "time slot synchronization broadcast" message to broadcast the relevant information required for time slot synchronization, including the current time, the current time slot description, and the calculation parameters of the delay time; S3. Any node uses the "node information broadcast" message to broadcast the relevant information required for time slot synchronization, including the current time, the current time slot description, the calculation parameters of the delay time, and the node attributes, timing unreliability values ​​and synchronization status information required for the synchronization reference selection process; S4. The base station provides a time service so that the mobile node can determine the deviation between the local time and the base station time; S5. The base station provides precise time synchronization services to maintain time slot synchronization within the error range given by the system.

2. The time slot synchronization method of a TDMA wireless communication network as claimed in claim 1, characterized in that: The step S2 comprises: S21, the mobile node monitors the surrounding node messages for 120 seconds; S22, recording the type, synchronization status and timing unreliability attribute data of the surrounding nodes; S23, sort the surrounding nodes by the number of receiving the article, with the one with the largest number at the front; S24, re-sorting the nodes with the same number of received messages according to the node ID numbers, with the smaller ID number at the front; S25, reordering the nodes with the same number of message receptions according to the node timing unreliability, with the smaller value at the front; S26, select the node at the front of the sort as the reference node for time synchronization, and check the synchronization status; S27. Determine the state after the synchronization process is completed according to the synchronization state, node attributes, and timing unreliability of the reference node: UTC indirect synchronization, base station direct synchronization, base station indirect synchronization, mobile node semaphore synchronization, and unsynchronized. After the synchronization is successful, assign a value to the timing unreliability NUR. If the synchronization is unsuccessful, the synchronization state is "unsynchronized" and the timing unreliability NUR is set to the maximum value of 31. The current UTC time and the frame description information of the time slot are obtained from the selected reference node, and then the registers of the local time and the registers of each frame time slot description are set to complete the coarse synchronization.

3. The time slot synchronization method of a TDMA wireless communication network as claimed in claim 1, characterized in that: In step S3, the mobile node receives the "time slot synchronization broadcast" of the base station or the repeater, and executes the following process to achieve time slot fine synchronization: S31, receiving the time slot synchronization broadcast information of the base station at a given time slot; S32-1, if the number of received pre-synchronization codes is less than 8 0xAA bytes and the number of received post-synchronization codes is all 7 0x1B bytes, it indicates that the receiving time slot is ahead of schedule, adjust the timer upward by 1 microsecond, and then go to step S31; S32-2, if the number of received post-synchronization codes is less than 7 0x1B bytes and the number of received pre-synchronization codes of 8 0xAA bytes is all received, it indicates that the receiving time slot is behind, and the timer is adjusted downward by 1 microsecond, and then the process goes to step S31; S32-3, if the 8 0xAA bytes of the pre-synchronization code and the 7 0x1B bytes of the post-synchronization code are correctly received, it means synchronization has been achieved, and then go to step S33; Step S33: exit the time slot synchronization process.

4. The time slot synchronization method of a TDMA wireless communication network as claimed in claim 1, characterized in that: In step S4, the base station provides time service according to the following steps: S41, the mobile node sends a "time service request", and records the local sending mobile node timestamp T1 of the "time service request packet"; S42, when the relay node forwards the "time service request", it adjusts the forwarding instruction in the forwarded "time service request" according to the forwarded sending time Trelay* and the "delay time" of the device, and then increases the forwarding delay time of the forwarder and modifies the data packet length; S43, after receiving the "time service request", the base station records the base station timestamp T2 when the "time service request" is received; Then, the timestamp T2, the delay time list of the request packet, and the planned sending timestamp T3 of the base station are used as the static payload of the "time service response", so that the hardware timer transmits the "time service response" at the base station timestamp T3; S44, when the relay node forwards the "time service response", it records the time T3* when the "time service response" is received, and then adjusts the forwarding instruction in the forwarded "time service response packet" according to the forwarded sending time Trelay* and the "delay time" of the device, adds the delay time information, and modifies the data packet length; S45, after receiving the "time service response", the mobile node records the mobile node timestamp T4 when the "time service response" is received; cumulatively calculates the "accumulated delay time" T2delay of the received request packet according to the "repeater delay time list of received request packets", and cumulatively calculates the "accumulated delay time" T4delay according to the "repeater delay time list"; S45-1. Calculate the round-trip transmission delay: delay = (T4-T1)-(T3-T2); T2 = T1 + offset + T2delay + air delay uplink; T4 = T3 - offset + T4delay + air delay downlink; S45-2. Calculate the time difference between the mobile node and the base station: i) If the "accumulated delay time" T4delay is equal to the "accumulated delay time" T2delay of the received request packet, the sum of the two equals delay. Ignoring the difference between the uplink delay in the air and the downlink delay in the air, the time difference can be solved as: offset= ((T2 - T1) + (T3 - T4) ) / 2; ii) If the "accumulated delay time" T4delay is not equal to the "accumulated delay time" T2delay of the received request packet, the round-trip path is the same, but the sum of the two equals delay. Ignoring the difference between the uplink delay in the air and the downlink delay in the air, the time difference can be solved as: offset= ((T2 - T1) + (T3 - T4) + (T4delay - T2delay) ) / 2; S46, calculating the time deviation, if multiple measurements are needed to reduce the error, repeat the above steps; S47, adjusting the local time of the mobile node to complete the time calibration between the mobile node and the base station; New local time NewTime = original local time Time + time offset offset.

5. The time slot synchronization method of a TDMA wireless communication network as claimed in claim 1, characterized in that: In step S5, the base station provides accurate time synchronization service according to the following steps: S51, the mobile node sends a "precise time synchronization request" to the base station, and waits for a "precise time synchronization response" from the base station; S52, after receiving the signaling, the base station measures the time deviation data of receiving the "time slot synchronous broadcast" sent by itself, and records the message receiving timestamp T0 and the starting time t0 of the receiving timeslot time; S53, the base station measures the time deviation data of the "time slot synchronous broadcast" of the signaling sender, and records the message receiving timestamp T1 and the starting time t1 of the receiving timeslot time; S54, the base station calculates the time offset: ΔT0=T0-t0, ΔT1=T1-t1, Offset =ΔT1-ΔT0; S55, the base station tracks the Offset and sends a "precise time synchronization response"; if the Offset is within the range of ±32767 nanoseconds, it replies with the NTP_PRE_RES signaling, and sets the "time synchronization indication" parameter in the NTP_PRE_RES signaling to 1; if the Offset is outside the range of ±32767 nanoseconds, it replies with the NTP_PRE_RES signaling, and sets the "time synchronization indication" parameter in the NTP_PRE_RES signaling to 0; S56. After receiving the "precise time synchronization response", the mobile node adjusts its own clock according to the Offset value in the "precise time synchronization response" message to achieve clock synchronization with the base station: NewTime = Time + offset.

6. The time slot synchronization method of a TDMA wireless communication network according to any one of claims 1 to 5, characterized in that: The time length of the time slot is set to 3.0 ms, 1 time slot is divided into 6 sub-time slots, the time length of each sub-time slot is 0.5 milliseconds, each frame contains 333 time slots, and 1 ms retention time is reserved for synchronization and calibration processing.

7. The time slot synchronization method of a TDMA wireless communication network as claimed in claim 6, characterized in that: The time slot synchronization frame is 1 frame per second, 60 frames per minute, and every 60 frames constitute a multiframe; 60 multiframes per hour, and every 60 multiframes constitute a superframe; There are 24 superframes every day, and at 0:0:0:0:0:0 millisecond every day, all counters are reset to zero.

Citation Information

Cited By

  • Method for realizing uplink and downlink frame synchronization of base station based on synchronization assistant

    CN120676443A

  • Wireless communication control method and system

    CN121262536A

  • Method for synchronizing clocks of Internet of Things equipment

    CN121530517A