Summary of the invention
The objective of the invention is: overcome the deficiencies in the prior art, a kind of low-power dissipation media access control method of node dynamic state resting is provided, need energy consumption so that reduce signal post when high-quality is finished data communication, it is strong to have adaptivity simultaneously, the characteristics of favorable expandability.
For finishing purpose of the present invention, the technical scheme that the present invention takes is: the low-power dissipation media access control method of node dynamic state resting, and step is as follows:
At first network topology structure is organized as the sub-clustering topology, and give all nodes given according to the order of sequence positive integer numbering, then carry out each bunch interior nodes and the internodal coarseness clock synchronization of each bunch head, finish posterior nodal point in clock synchronization and number the offset direction of selecting execution sub-period in work period next time according to self, node carries out work in one-period then, and work comprises process of transmitting and receiving course:
Wherein the source node cycling flow process of process of transmitting is as follows:
(1) if the data sampling rate of source node changes, then adjusts the work buty cycle of node, then execution in step (3);
(2) if the data sampling rate of source node does not change, then direct execution in step (3);
(3) the execution sub-period with source node is offset a time window W;
(4) judge whether source node has data to send, and carries out step (5) if free of data will send,, then carry out step (6) if there are data to send;
(5) execution and the dormancy that allows source node be scheduled in remaining time this week enters next cycling after finishing;
(6) source node calculating self and the common execution sub-period of destination node in this cycle;
(7) the common execution sub-period in this cycle arrives when source node and destination node, source node elder generation's random wait a period of time, judges then whether channel is idle;
(8) if channel idle, source node switches to sending mode (this moment, destination node can correspondingly switch to receiving mode), source node sends grouping to destination node, finish that source node and destination node all switch to the periodic duty pattern and finish clock synchronization after the data communication, then turn to step (5);
(9) if channel busy, source node and destination node just receive the grouping that third party's node sends, and grouping calculates remaining idle time of channel section in this cycle in view of the above, all enter resting state then reducing unnecessary channel-monitoring, and turn to step (6).
The node cycling flow process of receiving course is as follows:
(10) if the data sampling rate of node changes, then adjust the buty cycle of node work after, execution in step (12);
(11) if the data sampling rate of node does not change, then direct execution in step (12);
(12) node is carried out time window W of sub-period skew;
(13) arrive when carrying out sub-period, judge whether channel is busy, if channel busy, then node turns to step (15) after receiving a grouping, otherwise turns to step (14);
(14) execution and the dormancy that allows node be scheduled in remaining time this week enters next cycling after finishing;
(15) judge according to receiving block data whether oneself is the destination node of transmit leg, if then continue receiving block data until finishing data communication, switches to the periodic duty pattern then, finishes clock synchronization, then turns to step (14); If not then turning to step (16);
(16) node calculates according to grouped data and estimates remaining execution sub-period in this cycle, turns to step (13) then.
The present invention's beneficial effect compared with prior art is:
(1) described by claim 1 is the sub-clustering topology with network organization in the netinit process, comparing existing S-MAC and D-MAC etc. carries out whole network and carries out clock synchronization, the present invention only need carry out the clock synchronization of bunch head and bunch interior nodes respectively, improved clock synchronization accuracy, reduced of the transmission of clock synchronization frame, reduced required time, control frame expense and the energy consumption of clock synchronization effectively at whole network.
(2) by step (3), (6) ~ (9) in the node periodic duty in the claim 1, (12) and (16) allow node dynamically dormancy and work, common execution sub-period between the neighbors is staggered mutually, the execution period between the interior neighbors of each cycle of S-MAC and T-MAC of comparing is all identical, the present invention has reduced the number of times of keeping out of the way of channel contention conflict and channel-monitoring effectively, has reduced energy consumption and data transmission delay simultaneously.In addition, the precision clock of comparing time-multiplexed MAC agreement needs is synchronous, and the present invention only needs the coarseness clock synchronization can make the common execution sub-period distribution between the neighbors different, has the good fault-tolerance of clocking error.
(3) by the step 1) and 10 in the node periodic duty in the claim 1), the present invention can adjust the dormancy time of node adaptively according to the volume of transmitted data of practical application scene in the fixing work period, compare the cycle dynamics adjustment of S-MAC fixed sleep time and T-MAC, the present invention has guaranteed network throughput and time delay not influencing under the clock synchronization prerequisite, reduce the clock synchronization expense, improved energy consumption efficiency effectively.
Embodiment
The low-power dissipation media access control method of node dynamic state resting of the present invention comprises following concrete steps:
(1) network topology is organized into the sub-clustering topology, for each node sequence in the network is distributed unique positive integer numbering;
(2) set each required property value of node periodic duty;
(3) finish clock synchronization between each bunch bunch interior nodes and each bunch bunch first node;
(4) node periodic duty comprises following steps:
4.1) if the data sampling rate of node changes, then adjust the buty cycle of node work;
4.2) the work sub-period of node is offset a time window;
4.3) have data to send as source node, then it calculated self and destination node and hold sub-period jointly in this cycle, and turned to 4.4) send, otherwise turn to 4.6) receive;
4.4) the common execution sub-period of source node and destination node arrives, and source node elder generation's random wait a period of time, judges then whether channel idle;
4.4.1) if channel idle, then source node switches to sending mode (destination node correspondingly switches to receiving mode); Source node sends grouping to destination node then, all switches to the periodic duty pattern after finishing data communication, and finishes clock synchronization, and turn to 4.5);
4.4.2) if channel busy, the execution channel contention is kept out of the way, and turns to 4.3);
4.5) node execution and the dormancy in rest period, be scheduled to;
4.6) carry out the sub-period arrival, node enters accepting state, judges that whether channel is busy, if busy, then receive a grouped data and then turns to 4.7), otherwise turn to 4.5);
4.7) judge according to grouped data whether the destination node of transmit leg is oneself, if, then receive the packets remaining data, all switch to the periodic duty pattern after finishing data communication, and turn to step 4.5 after finishing clock synchronization); If not, then turn to 4.8);
4.8) node calculates in this cycle according to grouped data and estimate remaining execution sub-period, turns to step 4.6 then).
Wherein the sub-clustering network topology in the step 1) can adopt following steps to realize:
1.1) the link channel information exchange stage.Each node carries out the packet loss statistics to receiving packet, thereby has obtained the estimation to the channel quality of its up channel.Exchange estimated result then between adjacent node again, obtain objective evaluation each bar link channel quality according to certain assessment algorithm.
1.2) the node cluster stage.Dump energy and channel quality with node are choice criteria, are combined into cluster between one group of neighbor node, from bunch in select a bunch of first node, the communication between bunch intermediate node must be undertaken by bunch head.
1.3) topological establishment stage.Set up topology by the inundation mode between bunch head.Form mechanism by this topology and can form a hierarchy type structure.In addition, because bunch first dead or owing to bunch first elect a unreasonable communication disruption that causes, can adapt to the variation of network topology structure for adapting to by re-electing bunch head.
Sub-clustering network topology that forms after step 1) is finished and node serial number example are as shown in Figure 2.4 sub-clustering topologys are wherein arranged, node 4,7,8,10 is respectively each sub-clustering bunch head.The data of bunch interior nodes all are forwarded to the Sink node by a bunch head.Each bunch bunch head is organized as layer-stepping, is in the 1st layer as among Fig. 2 bunch of first node 4,7,8, can be directly and the Sink node communication.Bunch first node 10 is in the 2nd layer, and its data must be transmitted just by a bunch first node 7 can deliver to the Sink node.
Step 2) attribute definition as shown in Figure 3, wherein related definition is shown in 3a the node cycle, specifically describes as follows:
Time window: the least unit of express time segment length among the present invention is designated as W.
The node work period: by the fixed sleep period, the virtual work period is formed, and is designated as T
i(n), wherein i represents i node, and n represents n the cycle (i, n are the positive integer since 1), and the work period size of all nodes is identical.
The fixed sleep period: at T
iThe time period of interior fixed-site, node at this moment between the section in dormancy, be designated as T
Is(n).
The virtual work period: at T
i(n) time period of interior fixed-site, form by carrying out sub-period and paulospore period, be designated as T
Iv(n).
Carry out sub-period: at T
Iv(n) time period of interior position changeable, for node at this moment between the section in work, be designated as T
Ive(n).
The paulospore period: at T
Iv(n) time period of interior position changeable, node at this moment between the section in dormancy, be designated as T
Ive(n).
Regular as follows according to attribute definition: T
i(n)=T
Is(n)+T
Iv(n), T
Iv(n)=T
Ive(n)+T
Ivs(n), T wherein
i(n), T
Is(n), T
Iv(n), T
Ive(n), T
Ivs(n) all be defined as the multiple of time window W.
The present invention's regulation: T
Iv(n)+2*W<2*T
Ive(n), to guarantee that two adjacent nodes can both have an opportunity to communicate by letter in each cycle.
Shown in Fig. 3 b, packet configuration is: by synchronization character, and block length, the spare word joint number that node sends, data are carried in grouping and CRC check result seven parts constitute.This seven part is used symbol SYNC_WORD respectively, DEST_ID, and SRC_ID, PKT_LEN, DATA_TO_SEND, DATA, CRC represents.Tuple P (SYNC_WORD, DEST_ID, SRC_ID, PKT_LEN, DATA_TO_SEND, DATA, CRC) expression are then adopted in grouping.The maximum length that data DATA is carried in each grouping is a DATA_MAX_LEN byte.
In this example, suppose that time window length is 1ms, the node work period is 16ms, and the fixed sleep period is 8ms, and virtual work period 8ms wherein carries out sub-period 5ms, paulospore period 3ms, as shown in Figure 4.
Step 3) is subdivided into following steps, as shown in Figure 5:
3.1) each bunch bunch first node finishes the process of clock synchronization shown in Fig. 5 a, specific as follows: as (to be the Sink node at first by aggregation node, the connected node of wireless sensor network and external network, be equivalent to gateway) clock synchronization of going on the air frame, each bunch be first then to be monitored a period of time and waits for whether receiving the clock synchronization frame.As receive, then select the clock-time scheduling of this clock synchronization frame as oneself.As do not receive, then begin periodic scheduling voluntarily, and the clock synchronization frame is broadcasted away.In addition, the clock synchronization between bunch head also can realize by added high-power radio clock synchronization frame by aggregation node.
3.2) each bunch bunch interior nodes finish clock synchronization process shown in Fig. 5 b, specific as follows: at first by bunch first opening beginning radio clock synchronization frame, bunch interior nodes receives the clock synchronization frame from bunch first node, finishes the clock synchronization scheduling with bunch head.
After finishing topology constructing and clock synchronization, each node begins periodic duty.Concrete node sends and receives flow process as shown in Figure 1.Node periodic duty step is as follows:
Step 4.1) process of adjustment node buty cycle is as follows:
It is as follows at first to provide definition and mark:
Buty cycle: node is carried out sub-period and the ratio of node work period, is designated as T
Ive(n)/T
i(n).The buty cycle of all nodes is identical.According to each time period regulation of front, can calculate buty cycle is 31.25% in this example.
The sampling number of sample rate: sampling type i in each time window W is designated as R
iThe byte number of each sampled data of sampling type i is designated as D
i
Then the sampled data total bytes of all k kind sampling types in time window W is designated as:
2) when the sample rate of sampling type i from R
iAdjust R '
i, each sampled data byte number is from D
iBe adjusted into D '
iThe time, T then
Iv(n+1), T
Ive(n+1) adjustment is as follows:
Adjust T
Iv(n+1), T
Ive(n+1) the also corresponding thereupon change of the buty cycle of posterior nodal point.
The hypothesis sampling type is a kind in this example, and sample rate was 10 times before sampling was adjusted, and is 2 bytes behind each sample quantization; Adjusting the post-sampling rate is 12 times, is 3 bytes behind each sample quantization.Virtual work period and execution sub-period thereof are respectively 8* (12*3)/(10*2)=15ms and 5* (12*3)/(10*2)=9ms so.
Step 4.3) source node and destination node are in the common execution sub-period calculation procedure following (suppose that source node is numbered i, destination node is numbered j) in this cycle in:
4.3.1) as the current time channel idle, then turn to 4.3.2), if channel busy, source node and destination node just receive the grouping that third party's node sends, calculate remaining idle time of channel section in this cycle in view of the above, all enter resting state then reducing unnecessary channel-monitoring, and turn to 4.3.3).
4.3.2) the common execution sub-period of destination node and source node is: T
Ive(n) ∩ T
Jve(n).
4.3.3) the common execution sub-period of destination node and source node is: destination node is carried out sub-period T
Ive(n), source node is carried out sub-period T
Jve(n) and estimate threes' such as remaining channel idle period intersection in this cycle.
Step 4.3.3 wherein) estimates in this cycle that remaining channel idle period computational methods are as follows: grouped data total amount of byte to be sent (is contained the interior sync byte of grouping, CRC check and block length) can draw third party's node busy channel with the duration divided by message transmission rate, use symbol T
BusyExpression estimates in this cycle that the remaining channel idle period is
, so step 3.3) in the common execution sub-period of source node and destination node can be expressed as:
For step 4.3) case description as follows:
According to network topology shown in Figure 2, suppose that certain work period interior nodes 11 day part distributes shown in Fig. 6 a, then carry out the skew rule and the odd even symmetry principle of sub-period according to node, node 12 day parts distribute shown in Fig. 6 b.Existing node 11 will give 12 to send data, the 4th, 5 time window when node 11 at first calculates their common execution sub-period and is at this moment.When the 3rd time window arrives the zero hour, 11 first random wait a period of times of node, intercept channel then, if channel idle, then node 11 switches to sending mode, the data communication of beginning and node 12.If channel busy, then node 11 and 12 receives the grouping that the third party sends (suppose it is node 13, its destination node is not a node 11 and 12 simultaneously), and judging node 13 according to this packet node 11 also will busy channel 1ms, i.e. T
Busy Be 1ms.Node 11 and 12 will enter sleep state this moment, and the interior common execution sub-period of this cycle that can calculate them simultaneously is the 5th time window, and promptly in the zero hour of the 5th time window, the two will attempt to carry out again data communication.
Step 4.7) judge that according to receiving block data whether the transmit leg destination node is that self case description is as follows in: suppose that the DEST_ID that node 12 receives in the grouping is 12, then the destination node of transmit leg is self, otherwise is not self.
Step 4.8) estimate that the case description of remaining execution sub-period is as follows in node rises this week in: node 12 day parts distribute shown in Fig. 6 b, suppose that node 12 receives the grouping that node 13 sends, and judge node 13 according to this grouping also will busy channel 1ms, i.e. T
Busy Be 1ms.Node 12 will enter sleep state this moment, and can calculate interior remaining execution sub-period of this cycle simultaneously is the 5th, 6,7,8 time windows, and promptly in the zero hour of the 5th time window, node will reenter accepting state.
The above only is an acquiescence execution mode of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.