A low energy consumption synchronization mechanism method for TDMA wireless sensor networks

By dividing long frames and setting the guard interval time in the TDMA wireless sensor network, the problem of mutual influence between time slots and high energy consumption of sub-nodes due to clock drift is solved, and a low-energy consumption synchronization mechanism is realized, which is suitable for battery-powered systems. child node.

CN115988430BActive Publication Date: 2025-01-17SHANGHAI XINGYUXING ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211651989.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-01-17
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In the existing TDMA wireless sensor network, the time slots are affected by clock drifting, and frequent synchronous operations significantly increase energy consumption, affecting the life cycle of the battery-powered node.

Method used

By dividing the time axis into multiple long frames, each long frame includes a synchronization frame and multiple subframes, each subframe is divided into n sub-slots, and a guard interval time is set at the head and tail of each sub-slot, To compensate for clock drift and reduce the number of synchronizations of child nodes.

Benefits of technology

It effectively avoids the interaction between time slots caused by clock drift between child nodes, maximizes the number M of subframes in a long frame, reduces the energy consumption of child nodes, and is especially suitable for battery-powered child nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988430B_ABST
    Figure CN115988430B_ABST
Patent Text Reader

Abstract

A low-energy synchronization mechanism method applied to a TDMA wireless sensor network includes: step 1, dividing the time axis of the TDMA wireless sensor network into multiple long frames, each long frame includes a synchronization frame and multiple subframes; step 2, performing the same processing and compensation on each long frame to obtain the synchronization frame duration in the long frame, the protection interval time set at the head and tail of the sub-time slot in each subframe, the maximum number of subframes in the long frame, the protection interval time set at the head and tail of the synchronization frame in the long frame, and the final long frame duration; step 3, all subnodes of the TDMA wireless sensor network and the root node use the various durations processed and compensated in step 2 to send and receive data frames. The method can reduce the frequency of subnodes waking up to receive synchronization frames, thereby reducing the energy consumption required for subnode synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of wireless transmission, and in particular to a low-energy consumption synchronization mechanism method applied to a TDMA wireless sensor network. Background Art

[0002] Time Division Multiple Access (TDMA) technology has the characteristics of zero conflict and low latency, so it is widely used in wireless sensor networks. Compared with other competitive protocols, TDMA protocol can better allocate channel resources reasonably.

[0003] In the TDMA mechanism, the root node broadcasts synchronization frames regularly and allocates appropriate time slots to the child nodes in the cluster. In order to ensure that n child nodes share the channel, the time axis is divided into several subframes, each subframe is divided into n fixed time slots, and each child node is allocated and bound to a time slot, and occupies the channel in turn to send data, so that two mutually interfering adjacent nodes transmit data in different time slots. The traditional TDMA working mechanism is as follows Figure 1 As shown, the workflow is roughly as follows:

[0004] Step (1), before sending data, n child nodes listen to the synchronization frame regularly broadcast by the root node;

[0005] Step (2), the child nodes all receive the synchronization frame at the same time, and based on the time of receiving the synchronization frame, a fixed sub-time slot is allocated to each child node, so that the child nodes can send data in sequence;

[0006] Step (3): The sub-nodes cyclically send data in the corresponding sub-time slots. After all sub-nodes are completed, they go to step (1).

[0007] In step (3), the crystal oscillator used by the node is affected by factors such as environmental changes and its own performance changes, causing the actual working frequency to drift. After working for a period of time, the previous time slot may drift backward and the next time slot may drift forward. The two adjacent time slots will partially overlap, and the sent data cannot be transmitted correctly. Therefore, in order to ensure the accurate allocation of time slots, network nodes need to perform clock synchronization regularly.

[0008] In a wireless sensor network, nodes are generally in the sending, receiving or sleeping states. The states with the highest power consumption are sending and receiving, and the power consumption of a node in the receiving state is close to that in the sending state. In order to reduce power consumption, a sub-node should immediately enter a low-power sleeping state after sending the necessary information. However, synchronization frames need to be sent and received between nodes, and frequent wake-up of sub-nodes for synchronization will significantly increase energy consumption. Therefore, under the premise of ensuring that the sub-node does not lose the "synchronization state", minimizing the number of synchronization times of the sub-node is important for maintaining the life cycle of the battery-powered sub-node.

[0009] In addition, time slot allocation is also the key to the TDMA protocol. In wireless communication, if the length of the data packet and the communication rate are known, then theoretically the data sending or receiving time can be used as the time slot duration. Assuming that the total number of bytes to be sent or received is m, and the data transmission rate in the air is v, the time it takes for the radio frequency to send the data to the air can be calculated as m / v. However, in actual wireless communication, nodes have processing time before sending data and after receiving data, resulting in the actual time length for nodes to complete data transmission and reception being greater than m / v. On the other hand, the time slot length allocated to child nodes is not the longer the better. Otherwise, as the number of nodes increases, the wireless channel idle time is too long, resulting in a significant decrease in utilization, and the clock frequency will also increase, and the cycle of child nodes communicating with the root node will also become longer.

[0010] Therefore, the prior art needs to be further improved. Summary of the invention

[0011] The technical problem to be solved by the present invention is to provide a low-energy synchronization mechanism method for TDMA wireless sensor networks, which effectively avoids the mutual influence between time slots caused by clock drift between sub-nodes and reduces the energy consumption of sub-nodes.

[0012] The technical solution adopted by the present invention to solve the above technical problems is: a low energy consumption synchronization mechanism method applied to a TDMA wireless sensor network, wherein the TDMA wireless sensor network includes 1 root node and n child nodes, wherein n is a positive integer; and the method is characterized in that it includes the following steps:

[0013] Step 1: Divide the time axis of the TDMA wireless sensor network into multiple long frames, where each long frame is the same, each long frame includes one synchronization frame and multiple subframes, each subframe is divided into n sub-time slots, each subnode is correspondingly allocated and bound to a sub-time slot, and each subnode transmits data frames to the root node in the corresponding sub-time slot in turn;

[0014] Step 2: Perform the same processing and compensation on each long frame to obtain the synchronization frame duration t in the long frame. sync , the guard interval time set at the head and tail of the sub-time slot in each sub-frame, the maximum number of sub-frames in a long frame, and the guard interval time set at the head and tail of the synchronization frame in a long frame;

[0015] The specific steps for processing and compensating any long frame are:

[0016] Step 2-1: After all sub-nodes in the long frame have received the synchronization frame, each sub-time slot of all sub-frames is advanced to the previous sub-time slot to start sending data, that is, the pre-sending processing time of the next sub-time slot of all sub-frames is allocated to the previous sub-time slot, so that the timing of the next sub-time slot overlaps with the transmission of the previous sub-time slot, and the pre-sending processing time of the data frame corresponding to the first sub-time slot of the first sub-frame in the long frame is allocated to the synchronization frame, and the synchronization frame time t of the long frame is obtained. sync and the length of the i-th non-redundant time subslot of the k-th subframe in the long frame T Slot (k, i);

[0017] Step 2-2: Set a guard interval time at the head and tail of each sub-time slot of all sub-frames in the long frame to compensate for the offset of the sub-time slot, and obtain the guard interval time t of the head of the i-th sub-time slot in the k-th sub-frame. Res1 (k, i) and the guard interval time t at the end of the i-th sub-time slot in the k-th sub-frame Res2 (k, i);

[0018] Step 2-3: After the processing of step 2-1 and the compensation of step 2-2, the duration T of the i-th sub-time slot with the guard interval time in the k-th sub-frame is obtained. SlotRes (k, i);

[0019] T SlotRes (k, i) = T slot (k,i)+t Res1 (k,i)+t Res2 (k, i);

[0020] The duration of all sub-time slots with guard intervals in the k-th subframe is summed to obtain the duration of the k-th subframe T(k);

[0021] Step 2-4: Find the maximum value k when the kth subframe duration T(k) is less than or equal to the preset period T of the child node sending data to the root node. max , and according to k max Get the maximum number of subframes M in the long frame;

[0022] The calculation formula of M is:

[0023]

[0024] in, is the floor rounding symbol;

[0025] Step 2-5, set a guard interval time for the synchronization frame header and tail in the current long frame respectively to compensate for the clock drift generated by the synchronization frame in the current long frame and the M subframes in the previous long frame, and obtain the guard interval time t′ set in the synchronization frame header in the current long frame respectively. Res1 and the protection interval time t′ set at the end of the synchronization frame in the current long frame Res2 ;

[0026] Step 3: All sub-nodes of the TDMA wireless sensor network and the root node use the respective durations processed and compensated in step 2 to send and receive data frames;

[0027] The specific process of data frame transmission between the child node and the root node is as follows:

[0028] Step 3-1: Based on the time when the root node starts sending synchronization frames, all child nodes are set to start sending synchronization frames t′ in advance before the root node starts sending synchronization frames. Res1 Enter the receiving state, and when the root node sends a synchronization frame, all child nodes also synchronize and continue t sync After that, all child nodes are delayed by t′ Res2 Then close the receiving state, put all child nodes into a dormant state, and go to step 3-2;

[0029] Step 3-2: Start entering the ith sub-time slot in the kth sub-frame, the root node is always in the receiving state, and the sub-node corresponding to the ith sub-time slot in the kth sub-frame is kept in the dormant state for a period of time t Res1 (k, i) and then enter the sending state, and stay in the sending state of the child node for T Slot (k, i) and then enter the dormant state. Wait for the dormant state of the child node to last for t Res2 (k, i), then enter the next sub-time slot and go to step 3-3; the initial values ​​of k and i are 1, where t Resl (1, 1) = 0;

[0030] Step 3-3, determine whether i is n, if yes, proceed to step 3-4; if no, add 1 to the value of i and update the value of i, use the end time of the previous sub-time slot as the start time of the next sub-time slot, and proceed to step 3-2;

[0031] Step 3-4, determine whether k is M. If so, complete the data transmission of a long frame and proceed to step 3-1 to enter the data transmission of the next long frame; if not, the current subframe ends, and the value of k is updated by adding 1, and then proceed to step 3-2.

[0032] Specifically, in step 2-1, sync The calculation formula is:

[0033]

[0034] Among them, t PreTx is the preprocessing time before sending the data frame, t txDelay is the physical layer sending trigger duration, m is the number of bytes of transmitted data, v is the transmission rate of the transmitted data in the air, t PostRx It is the processing time after receiving the data frame.

[0035] Specifically, in step 2-1, T Slot The calculation formula for (k, i) is:

[0036]

[0037] In order to ensure that each child node does not cause data collision with adjacent nodes due to clock drift, the t Res1 The calculation formula for (k, i) is:

[0038]

[0039] Among them, T p1 is the maximum frequency error of the crystal oscillator used by the child node, T p2 The maximum frequency error of the crystal oscillator used for the root node.

[0040] In order to ensure that each child node does not cause data collision with adjacent nodes due to clock drift, the t Res2 The calculation formula for (k, i) is:

[0041]

[0042] To compensate for the clock drift of the root node after a long frame time and the clock drift of M subframes, t′ in step 2-5 Res1 The calculation formula is:

[0043]

[0044] To compensate for the clock drift of the root node after a long frame time and the clock drift of M subframes, t′ in step 2-5 Ros2 The calculation formula is:

[0045]

[0046] To meet the actual application requirements, add the idle time to all sub-time slots with guard interval time in the k-th sub-frame in step 2-3, and obtain the time T of the i-th sub-time slot containing idle time in the k-th sub-frame. SlotResIdle (k, i);

[0047] The specific process of adding the idle duration of the sub-time slot is as follows:

[0048] Taking the Mth subframe of each long frame as a reference, add idle time to each subslot of the 1st subframe, the 2nd subframe, ... the (M-1)th subframe of the current long frame, so that each subslot of the same subframe has the same length;

[0049] The idle time length T added to the i-th sub-time slot in the k-th sub-frame idle (k, i) is:

[0050] T idle (k, i) = T SlotRes (M, i)-T SlotRes (k, i)

[0051] Therefore, T SlotResIdle (k, i) = T SlotRes (k,i)+T idle (k, i).

[0052] Furthermore, an idle time length is added to the end of the nth sub-time slot of each sub-frame, and the added idle time length is: TT(M), so that the time length of each sub-frame is T.

[0053] Compared with the prior art, the advantages of the present invention are: the root node sends a synchronization frame at the beginning of a long frame, so that all child node clocks are synchronized with the root node, and the child nodes periodically transmit data frames to the root node in sub-time slots; wherein each sub-time slot adds a corresponding protection interval, which effectively avoids the mutual influence between time slots due to clock drift between sub-nodes, thereby maximizing the number of sub-frames M in the long frame, reducing the frequency of child node wake-up for synchronization, and further reducing the energy consumption of child nodes. Compared with the traditional working mechanism, the energy consumption required for each child node to wake up and receive the synchronization frame is reduced by (M-1) / M, which has obvious advantages when applied to battery-powered child nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a schematic diagram of TDMA working mechanism in the prior art;

[0055] Figure 2 Schematic diagram of TDMA low energy consumption synchronization working mechanism in an embodiment of the present invention;

[0056] Figure 3 A schematic diagram of a time-sharing flow chart of a data frame receiving and sending process according to an embodiment of the present invention;

[0057] Figure 4 Schematic diagram of a sub-time slot containing a guard interval time in an embodiment of the present invention;

[0058] Figure 5Schematic diagram of a long frame containing a guard interval in an embodiment of the present invention;

[0059] Figure 6 It is a schematic diagram of a long frame including an idle time and a protection interval time in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The present invention is further described in detail below with reference to the accompanying drawings.

[0061] In this embodiment, the TDMA wireless sensor network includes 1 root node and n child nodes, where n is a positive integer. The low energy consumption synchronization mechanism method applied to the TDMA wireless sensor network in this embodiment includes the following steps:

[0062] Step 1: Divide the time axis of the TDMA wireless sensor network into multiple long frames, where each long frame is the same, each long frame includes one synchronization frame and multiple subframes, each subframe is divided into n sub-time slots, each subnode is correspondingly allocated and bound to a sub-time slot, and each subnode transmits data frames to the root node in the corresponding sub-time slot in turn;

[0063] In this embodiment, the traditional TDMA is improved, and the improved low-power synchronization working mechanism is as follows: Figure 2 As shown in Figure 2, its main workflow is similar to that of traditional TDMA, but in step (3), the child node sends data in multiple cycles, such as Figure 2 As shown in , the first cycle corresponds to the first long frame, and the second cycle corresponds to the second long frame;

[0064] Step 2: Perform the same processing and compensation on each long frame to obtain the synchronization frame duration t in the long frame. sync , the guard interval time set at the head and tail of the sub-time slot in each sub-frame, the maximum number of sub-frames in a long frame, and the guard interval time set at the head and tail of the synchronization frame in a long frame;

[0065] The specific steps for processing and compensating any long frame are:

[0066] Step 2-1: After all sub-nodes in the long frame have received the synchronization frame, each sub-time slot of all sub-frames is advanced to the previous sub-time slot to start sending data, that is, the pre-sending processing time of the next sub-time slot of all sub-frames is allocated to the previous sub-time slot, so that the timing of the next sub-time slot overlaps with the transmission of the previous sub-time slot, and the pre-sending processing time of the data frame corresponding to the first sub-time slot of the first sub-frame in the long frame is allocated to the synchronization frame, and the synchronization frame time t of the long frame is obtained. sync and the length of the i-th non-redundant time subslot of the k-th subframe in the long frame T Slot (k, i);

[0067] In this embodiment, t sync The calculation formula is:

[0068]

[0069] Among them, t PreTx is the preprocessing time before sending the data frame, t txDelay is the physical layer sending trigger duration, m is the number of bytes of transmitted data, v is the transmission rate of the transmitted data in the air, t PostRx It is the processing time after receiving the data frame.

[0070] T Slot The calculation formula for (k, i) is:

[0071]

[0072] Step 2-2: Set a guard interval time at the head and tail of each sub-time slot of all sub-frames in the long frame to compensate for the offset of the sub-time slot, and obtain the guard interval time t of the head of the i-th sub-time slot in the k-th sub-frame. Res1 (k, i) and the guard interval time t at the end of the i-th sub-time slot in the k-th sub-frame Res2 (k, i);

[0073] In this embodiment, t Res1 The calculation formula for (k, i) is:

[0074]

[0075] Among them, T p1 is the maximum frequency error of the crystal oscillator used by the child node, T p2 The maximum frequency error of the crystal oscillator used for the root node;

[0076] t Res2 The calculation formula for (k, i) is:

[0077]

[0078] Step 2-3: After the processing of step 2-1 and the compensation of step 2-2, the duration T of the i-th sub-time slot with the guard interval time in the k-th sub-frame is obtained. SlotRes (k, i);

[0079] T SlotRes (k, i) = T slot (k,i)+t Res1 (k,i)+t Res2 (k, i);

[0080] According to the above T Slot (k, i), t Res1 (k, i) and tRes2 The calculation formula of (k, i) is:

[0081]

[0082] The duration of all sub-time slots with guard intervals in the k-th subframe is summed to obtain the duration of the k-th subframe T(k); the calculation formula of T(k) is:

[0083]

[0084] Step 2-4: Find the maximum value k when the kth subframe duration T(k) is less than or equal to the preset period T of the child node sending data to the root node. max , and according to k max Get the maximum number of subframes M in the current long frame;

[0085] The calculation formula of M is:

[0086]

[0087] in, is the floor rounding symbol;

[0088] Step 2-5, set a guard interval time for the synchronization frame header and tail in the current long frame respectively to compensate for the clock drift generated by the synchronization frame in the current long frame and the M subframes in the previous long frame, and obtain the guard interval time t′ set in the synchronization frame header in the current long frame respectively. Res1 and the protection interval time t′ set at the end of the synchronization frame in the current long frame Res2 ;

[0089]

[0090]

[0091] Step 3: All sub-nodes of the TDMA wireless sensor network and the root node use the respective durations processed and compensated in step 2 to send and receive data frames;

[0092] The specific process of data frame transmission between the child node and the root node is as follows:

[0093] Step 3-1: Based on the time when the root node starts sending synchronization frames, all child nodes are set to start sending synchronization frames t′ in advance before the root node starts sending synchronization frames. Res1 Enter the receiving state, and when the root node sends a synchronization frame, all child nodes also synchronize and continue t sync After that, all child nodes are delayed by t′ Res2 Then close the receiving state, put all child nodes into a dormant state, and go to step 3-2;

[0094] Step 3-2: Start entering the ith sub-time slot in the kth sub-frame, the root node is always in the receiving state, and the sub-node corresponding to the ith sub-time slot in the kth sub-frame is kept in the dormant state for a period of time t Res1 (k, i) and then enter the sending state, and stay in the sending state of the child node for T Slot (k, i) and then enter the dormant state. Wait for the dormant state of the child node to last for t Res2 (k, i), then enter the next sub-time slot and go to step 3-3; the initial values ​​of k and i are 1, where t Res1 (1, 1) = 0;

[0095] Step 3-3, determine whether i is n, if yes, proceed to step 3-4; if no, add 1 to the value of i and update the value of i, use the end time of the previous sub-time slot as the start time of the next sub-time slot, and proceed to step 3-2;

[0096] Step 3-4, determine whether k is M. If so, complete the data transmission of a long frame and proceed to step 3-1 to enter the data transmission of the next long frame; if not, the current subframe ends, and the value of k is updated by adding 1, and then proceed to step 3-2.

[0097] In order to illustrate the role of the synchronization mechanism in the present invention, this embodiment mainly describes the following parameters:

[0098] 1. Data frame communication duration

[0099] The data frame communication duration is the basis for studying the allocation of time slots. During the communication process, sending a data frame starts from the application layer, passes through the MAC layer to the physical layer, and finally sends it out through the antenna; conversely, the receiving node receives it through the antenna and passes the data to the MAC layer until the application layer. When the sender executes the command to send a data frame, it needs to trigger the RF transmitter first, and there is a certain delay in the physical layer startup; similarly, there is also a delay in the receiver triggering the reception.

[0100] When the sender is sending data, the receiver is also receiving data, so there is an overlap in the time between data sending and receiving. Figure 3 shown. Figure 3 Medium PreTx is the preprocessing time before sending the data frame, t PreRx is the preprocessing time before receiving the data frame, t txDelay The physical layer sends the trigger duration, t rxDelay is the physical layer receiving trigger duration, t tx is the duration of data transmission, t rx is the duration of receiving data transmission, t PostTxis the processing time after the data frame is sent, t PostRx It is the processing time after receiving the data frame.

[0101] The process of a node sending a data frame includes data frame pre-sending preprocessing, physical layer sending trigger, sending data transmission, and data frame sending post-processing, while the process of a receiving node receiving a data frame includes data frame receiving pre-processing, physical layer receiving trigger, receiving data transmission, and data frame receiving post-processing. The receiving node completes the pre-receiving preprocessing before the data frame arrives, and triggers the start of physical layer reception when the data frame preamble is received. Since the propagation speed of electromagnetic waves in the air is close to the speed of light, the delay caused by air propagation is negligible relative to the distance of tens or hundreds of meters between nodes, so it can be considered that the end time of sending data transmission and receiving data transmission is the same. After that, the sending node performs post-sending processing to end the sending process, and the receiving node must also unseal the data frame after receiving it and store the valid data in the specified memory. Under normal circumstances, the post-receiving processing time of the data frame is t PostRx Greater than the processing time t after the data frame is sent PostTx Therefore, the shortest time required to complete the sending and receiving of a data frame is t PreTx +t txDelay +t tx +t PostRx .

[0102] 1.1. The pre-processing time t before sending the above data frame PreTx The calculation method is:

[0103] When a node sends data, the data will go from the application layer, through the MAC layer to the physical layer. When the data packet is ready to be processed from the application layer, a timestamp is added. When the data packet is transmitted from the application layer to the MAC layer, another timestamp is added. By subtracting these two timestamps, the pre-sending pre-processing time t can be obtained. PreTx .

[0104] 1.2. The above data frame receiving and processing time t PostRx The calculation method is:

[0105] The calculation of the pre-processing time before sending is similar to the calculation of the post-processing time of the data frame received. PostRx It can also be calculated by subtracting timestamps. When the data is received, a timestamp is added, and when the post-receiving processing is completed, another timestamp is added. Subtracting the two timestamps can obtain the post-receiving processing time t of the data frame. PostRx .

[0106] 1.3. The calculation method of the above physical layer sending trigger duration is:

[0107] After receiving the transmit and receive command, the RF transceiver needs a certain delay time to enter the formal transmit and receive state. Unlike the above time measurement method, the trigger time cannot be calculated by timestamping. In this embodiment, a fixed transmit and receive delay deviation measurement method is proposed, that is, by transmitting and receiving data at a fixed delay time, detecting the time deviation of the RF signal to estimate the trigger delay time.

[0108] Set the child node to send a message every z milliseconds, measure the electrical signal of the amplifier peripheral port with an oscilloscope, and record the adjacent interval time. Ideally, the interval time is z milliseconds, but due to the transmitter trigger delay, the recorded interval value that is more than z is the physical layer send trigger time t txDelay Similarly, the physical layer receiving trigger duration t can be obtained rxDelay .

[0109] 2. Time slot analysis

[0110] After clock synchronization is completed, each subnode needs to be assigned its corresponding time slot. Each subnode is bound to a corresponding sub-time slot. The subnodes transmit data in their assigned time slots and sleep in other time slots. After receiving the synchronization frame, the subnodes perform data transmission regularly at a fixed interval. The interval is the subframe duration, which is also the subnode transmission period, denoted as T.

[0111] Remember T p1 , T p2 are the maximum frequency errors of the crystal oscillators used by the child node and the root node, respectively. When sending and receiving data frames after a period of time (denoted as t) after the reference time, the influence of drift must be considered. That is, in order to ensure that the receiving end can receive correctly, the receiving node must advance t (T p1 +T p2 ) start, delay (t+t s )(T p1 +T p2 ) closes the receiving end, that is, the receiving end is in the time period [tt(T p1 +T p2 ), t+(t+t s )(T p1 +T p2 )] in the receiving state to ensure that the data frame is correctly received. s The duration of sending data frame.

[0112] Therefore, in order to ensure that each sub-node will not cause data collision with adjacent nodes due to clock drift, a protection interval is set at the head and tail of the sub-time slot, that is, redundant time is used to compensate for the possible drift of the sub-time slot. Figure 4As shown. In addition to compensating for the drift caused by the previous slot in the subframe, each subslot also needs to compensate for the drift caused by the duration of all previous subframes. For example, in the second subframe, subslot 3 needs to compensate for the drift caused by its own duration, as well as the drift caused by subslots 1 and 2, and also needs to compensate for the drift caused by the duration of the first subframe.

[0113] According to the above discussion, the duration of each sub-time slot is determined by the trigger duration t sent by the child node. txDelay 、Data air transmission time t tx , the root node receives and processes t PostRx and the sub-time slot guard interval. Therefore, according to Formula 2, Formula 3 and Formula 4, Formula 5 can be obtained, where the compensation time of the sub-time slot in the above Formula 5 and Formula 6 is not compensated again, because the value of the compensation time is very small compared with the other time values ​​in the formula and can be ignored;

[0114] 3. Low power clock synchronization analysis

[0115] 3.1. Maximum number of subframes

[0116] The root node uses the clock synchronization mechanism to periodically send synchronization frames to all child nodes to keep the clocks of all child nodes synchronized with the root node. If you want to determine the synchronization period, you must know the number of subframes in a long frame. In order to ensure that the root node can accurately receive the information sent by all child nodes, all subslots must be allocated within a subframe duration, that is, the sum of the duration of the subslots in the kth frame cannot be greater than T, so:

[0117]

[0118] After sorting, we can get:

[0119]

[0120] Therefore, k has a maximum value, denoted as M, namely:

[0121]

[0122] That is to say, in order to reduce the number of times the subnode receives synchronization frames and minimize the power consumption of the subnode, when T and n are known, the more times the subnode continuously sends data in a loop, the better, that is, the larger the M value, the better. At this time, compared with the traditional method of synchronizing each subframe, from the perspective of receiving synchronization frames, the energy required is only 1 / M of the original, that is, (M-1) / M energy is saved;

[0123] 3.2 Synchronous frame period

[0124] After the number of subframes M in a long frame is determined, the period of the root node sending the synchronization frame can be calculated, that is, the long frame duration consists of 1 synchronization frame duration and M subframe durations, such as Figure 5 shown.

[0125] The root node will have clock drift after a long frame time. Similar to the sub-time slot processing method, the protection interval time t′ is used in this embodiment. Res1 and t′ Res2 To compensate for the clock drift generated by the synchronization frame and the M subframes in the previous long frame, we get the above formulas 7 and 8, and add formulas 7 and 8 to formula 1 to get T sync =t sync +t′ Res1 +t′ Res2 , t sync , t′ Res1 and t′ Res2 After substituting the calculation formula into , we get:

[0126]

[0127] It is worth noting that the compensation time of the synchronization frame in Formula 7 and Formula 8 is not compensated again. This is because the value of the compensation time compensated again is very small compared to other time values ​​in the formula and can be ignored.

[0128] From formula 7 and formula 8, we can know that before the root node starts sending synchronization frames, the child node must enter the receiving state first to ensure that the synchronization frame can be correctly received. The advance amount is t′ Res1 Similarly, in order to ensure that the child node can completely receive the synchronization frame and does not conflict with the first sub-time slot, the child node is delayed by t′ after the root node completes the transmission. Res2 Turn off receiving.

[0129] 4. Further analysis

[0130] According to Formula 5 and Formula 6, in the same long frame, the duration of each sub-time slot with the same number is not equal, and the duration of each sub-frame is also not equal, which leads to unequal periods for each sub-node to upload data. However, in actual applications, the design goal generally requires that the period for each sub-node to upload data is equal, that is, the sub-node sending period T. The last sub-frame in the long frame (sub-frame number is M) has the longest duration, which is less than or equal to T, while the durations of other sub-frames are all less than T.

[0131] From formula 5, we can see that the duration of sub-time slots with the same number increases with the increase of sub-frame number, so we must add the idle duration to all sub-time slots with guard intervals in the k-th sub-frame in step 2-3 to obtain the duration T of the i-th sub-time slot in the k-th sub-frame containing the idle duration. slotResIdle (k, i);

[0132] The specific process of adding idle time is as follows:

[0133] Taking the Mth subframe of each long frame as a reference, add idle time to each subslot of the 1st subframe, the 2nd subframe, ... the (M-1)th subframe of the current long frame, so that each subslot of the same subframe has the same length;

[0134] The idle time length T added to the i-th sub-time slot in the k-th sub-frame idle (k, i) is:

[0135] T idle (k, i) = T SlotRes (M, i)-T SlotRes (k, i) (Formula 10)

[0136] Substituting formula 5 into formula 10, we get:

[0137] T idle (k, i) = 2(Mk)(T p1 +T p2 )T (Formula 11)

[0138] Where 1≤i≤n, 1≤k<M. From formula 11, it can be seen that the idle time added to different sub-time slots in the same subframe is equal. Adding formula 5 and formula 11, the time length of sub-time slot i in the kth subframe containing idle time can be obtained as:

[0139]

[0140] From formula 12, we know that the sub-time slots with the same number in different sub-frames are equal, so the duration of each sub-frame is also equal, which is T(M). It should be noted here that the idle time added to the sub-time slot is no longer compensated, because the idle time is the difference of the compensation time, and the difference of the compensation time is compensated again, which can be ignored compared with other time values ​​in the formula.

[0141] In addition, since the duration of subframe M in a long frame is less than or equal to T, in order to ensure that the duration of each subframe is T, an appropriate idle time must be added after each subframe, namely TT(M). After the idle time is added to the subslot (except the Mth subframe) and the subframe, a long frame diagram is as follows: Figure 6 As shown. It is worth noting that in a long frame, the period of each sub-node uploading data is T, but due to the existence of synchronization frames, this period will increase slightly when crossing frames. In addition, although the sub-frame adds an idle time, since the sub-frame time compensation in Formula 3 and Formula 4 already defaults to T, there is no need to compensate for the sub-frame idle time.

[0142] By adding the above idle time, a long frame has the following characteristics:

[0143] (1) The duration of any long frame is equal and equal to the synchronous frame transmission period;

[0144] (2) In the same long frame, the duration of the subframes is equal, which is equal to the sub-node transmission period T;

[0145] (3) In the same subframe, the subslot lengths are not equal and increase with the subslot number; however, in different subframes, the subslot lengths with the same number are equal, so that the period for each subnode to upload data is equal and equal to T.

[0146] Since the crystal oscillator frequency of the node will drift, the traditional TDMA requires the root node to send a synchronization frame at a fixed time interval, and the child node needs to enter the receiving state in advance to receive in order to synchronize the clock, but frequent synchronization operations will significantly increase the energy consumption of the child node. If the child node is battery-powered, it will affect the life cycle of the child node. Therefore, the low-energy clock synchronization mechanism proposed in this embodiment maximizes the interval at which the node needs to be synchronized and reduces the frequency of child node wake-up. This method is particularly suitable for situations where the child node must be battery-powered, such as battery-powered active electronic tags in inventory management.

[0147] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A low energy consumption synchronization mechanism method applied to a TDMA wireless sensor network, wherein the TDMA wireless sensor network includes a root node and n child nodes, where n is a positive integer; characterized in that The steps include: Step 1: Divide the time axis of the TDMA wireless sensor network into multiple long frames, where each long frame is the same, each long frame includes one synchronization frame and multiple subframes, each subframe is divided into n sub-time slots, each subnode is correspondingly allocated and bound to a sub-time slot, and each subnode transmits data frames to the root node in the corresponding sub-time slot in turn; Step 2: Perform the same processing and compensation on each long frame to obtain the synchronization frame duration t in the long frame. sync , the guard interval time set at the head and tail of the sub-time slot in each sub-frame, the maximum number of sub-frames in a long frame, and the guard interval time set at the head and tail of the synchronization frame in a long frame; The specific steps for processing and compensating any long frame are: Step 2-1: After all sub-nodes in the long frame have received the synchronization frame, each sub-time slot of all sub-frames is advanced to the previous sub-time slot to start sending data, that is, the pre-sending processing time of the next sub-time slot of all sub-frames is allocated to the previous sub-time slot, so that the timing of the next sub-time slot overlaps with the transmission of the previous sub-time slot, and the pre-sending processing time of the data frame corresponding to the first sub-time slot of the first sub-frame in the long frame is allocated to the synchronization frame, and the synchronization frame time t of the long frame is obtained. sync and the length of the i-th non-redundant time subslot of the k-th subframe in the long frame T Slot (k,i); Step 2-2: Set a guard interval time at the head and tail of each sub-time slot of all sub-frames in the long frame to compensate for the offset of the sub-time slot, and obtain the guard interval time t of the head of the i-th sub-time slot in the k-th sub-frame. Res1 (k,u) and the guard interval time t at the end of the ith subslot in the kth subframe Res2 (k,i); Step 2-3: After the processing of step 2-1 and the compensation of step 2-2, the duration T of the i-th sub-time slot with the guard interval time in the k-th sub-frame is obtained. SlotRes (k,i); T SlotRes (k,i)=T Slot (k,i)+t Res1 (k,i)+t Res2 (k,i); The duration of all sub-time slots with guard intervals in the k-th subframe is summed to obtain the duration of the k-th subframe T(k); Step 2-4: Find the maximum value k when the kth subframe duration T(k) is less than or equal to the preset period T of the child node sending data to the root node. max , and according to k max Get the maximum number of subframes M in the long frame; The calculation formula of M is: in, is the floor rounding symbol; Step 2-5, set a guard interval time for the synchronization frame header and tail in the current long frame respectively to compensate for the clock drift generated by the synchronization frame in the current long frame and the M subframes in the previous long frame, and obtain the guard interval time t′ set in the synchronization frame header in the current long frame respectively. Res1 and the protection interval time t′ set at the end of the synchronization frame in the current long frame Res2 ; Step 3: All sub-nodes of the TDMA wireless sensor network and the root node use the respective durations processed and compensated in step 2 to send and receive data frames; The specific process of data frame transmission between the child node and the root node is as follows: Step 3-1: Based on the time when the root node starts sending synchronization frames, all child nodes are set to start sending synchronization frames t′ in advance before the root node starts sending synchronization frames. Res1 Enter the receiving state, and when the root node sends a synchronization frame, all child nodes also synchronize and continue t sync After that, all child nodes delay ′ Res2 Then close the receiving state, put all child nodes into a dormant state, and go to step 3-2; Step 3-2: Start entering the ith sub-time slot in the kth sub-frame, the root node is always in the receiving state, and the sub-node corresponding to the ith sub-time slot in the kth sub-frame is kept in the dormant state for a period of time t Res1 (k,i) and enters the sending state, and stays in the sending state of this child node for T Slot (k,i) and then enter the dormant state, and wait for the dormant state of the child node to last for t Res2 (k,i), then enter the next sub-time slot and go to step 3-3; the initial values ​​of k and i are 1, where t Res1 (1,1)=0; Step 3-3, determine whether i is n, if yes, proceed to step 3-4; if no, add 1 to the value of i and update the value of i, use the end time of the previous sub-time slot as the start time of the next sub-time slot, and proceed to step 3-2; Step 3-4, determine whether k is M. If so, complete the data transmission of a long frame and proceed to step 3-1 to enter the data transmission of the next long frame; if not, the current subframe ends, and the value of k is updated by adding 1, and then proceed to step 3-2.

2. The low energy consumption synchronization mechanism method according to claim 1, characterized in that: In step 2-1, sync The calculation formula is: Among them, t PreTx is the preprocessing time before sending the data frame, t txDelay is the physical layer sending trigger duration, m is the number of bytes of transmitted data, v is the transmission rate of the transmitted data in the air, t PostRx It is the processing time after receiving the data frame.

3. The low energy consumption synchronization mechanism method according to claim 2, characterized in that: In step 2-1, T Slot The calculation formula for (k,i) is:

4. The low energy consumption synchronization mechanism method according to claim 3, characterized in that: In step 2-2, Res1 The calculation formula for (k,i) is: Among them, T p1 is the maximum frequency error of the crystal oscillator used by the child node, T p2 The maximum frequency error of the crystal oscillator used for the root node.

5. The low energy consumption synchronization mechanism method according to claim 4, characterized in that: In step 2-2, Res2 The calculation formula for (k,i) is:

6. The low energy consumption synchronization mechanism method according to claim 5, characterized in that: In the steps 2-5, t′ Res1 The calculation formula is:

7. The low energy consumption synchronization mechanism method according to claim 6, characterized in that: In the steps 2-5, t′ Res2 The calculation formula is:

8. The low energy consumption synchronization mechanism method according to any one of claims 1 to 7, characterized in that: Add the idle time to all sub-time slots with guard interval time in the k-th sub-frame in step 2-3, and obtain the time T of the i-th sub-time slot containing idle time in the k-th sub-frame. SlotResIdle (k,i); The specific process of adding the idle duration of the sub-time slot is as follows: Taking the Mth subframe of each long frame as a reference, add idle time to each subslot of the 1st subframe, the 2nd subframe, ... the (M-1)th subframe of the current long frame, so that each subslot of the same subframe has the same length; The idle time length T added to the i-th sub-time slot in the k-th sub-frame idle (k,i) is: T idle (k,i)=T SlotRes (M,i)-T SlotRes (k,i) Therefore, T SlotResIdle (k, i) = T SlotRes (k, i) + T idle (k, i).

9. The low energy consumption synchronization mechanism method according to claim 8, characterized in that: An idle time duration is added to the end of the nth sub-time slot of each sub-frame, and the added idle time duration is: TT(M), so that the duration of each sub-frame is T.

Citation Information

Patent Citations

  • Frequency hopping networking realization method based on TDMA (Time Division Multiple Access) technology

    CN108809356A

  • Low earth orbit satellite data frame synchronization method and device

    CN115001616A