The cognizable global clock synchronous method of wireless sensor network and in multihop network
Application
Technical field
The present invention relates to the Clock Synchronization Technology field of wireless sensor network, particularly a kind of wireless sensor network
Cognizable global clock synchronous method and the application in multihop network, are data fusion, positioning, the work of wireless sensor network
Make premise and the basis of periodic scheduling and Topology Management.
Background technology
Wireless sensor network (WSNs, Wireless Sensor Networks) is by substantial amounts of static or mobile biography
The wireless network that sensor is constituted in the way of self-organizing and multi-hop, sensor node is collaboratively perceived, gathered, handling and transmission network
Network covering is perceived the information of object in geographic area, and finally these information is sent to the owner of network.Due to its expansion
The function that regulation and control are monitored to remote object is opened up, wireless sensor network technology has great development potentiality.
Each sensor node in WSNs contains internal clocking, but is due to various external factor, such as temperature, when
Clock crystal oscillator is frequently subjected to influence and occur clock drift, in order to solve the step-out phenomenon of local clock, it is necessary to enter row clock synchronous
Operation.Algorithm more ripe now has:Network time synchronization agreement (NTP, Network Time Protocol), with reference to broadcast
Synchronized algorithm (RBS, Reference Broadcast Synchronization), the time synchronization protocol of sensor network
(TPSN, Timing-sync Protocol for Sensor Networks), Flooding Time-Synchronization agreement (FTSP,
Flooding Time Synchronization Protocol), diffusion time synchronous protocol (TDP, Time-diffusion
Synchronization Protocol) etc..These algorithms are in terms of the energy consumption efficiency of system, synchronous accuracy and reliability
Have much room for improvement.
The content of the invention
For because of the local clock of each node in the wireless sensor network caused by the factors such as Crystal Oscillator Errors, running environment
Inconsistent situation, the purpose of the present invention is to propose to a kind of cognizable global clock synchronous method of wireless sensor network and
Application in multihop network, the present invention is based on cognizable global clock synchronous protocol (CGCSP, Cognitive Global
Clock Synchronization Protocol in WSNs), by choosing host node and expecting the mechanism of host node, make net
To complete clock with host node synchronous for all nodes in network, and adds in synchronizing process cognizable transformation mechanism, it is ensured that lead
In the event of failure, wireless sensor network remains to continue to run with node, and causes clock synchronization operation has high-precision, low
Energy consumption and high reliability.
To reach above-mentioned purpose, design of the invention is as follows:
Operation is synchronized to sensor node using cognizable global clock synchronous protocol.Choose energy in a network first
Highest sensor node is measured as host node, secondary high node is as host node is expected, host node is with it is expected that host node passes through
Transmitter-receiver (S-R) model is synchronized, and it is expected that host node passes through recipient-recipient (R-R) with other child nodes again
Model is synchronized, and completes the global clock simultaneously operating of network.Synchronizing process adds cognizable transformation mechanism:Host node
When energy is less than host node is expected, worked on by expectation host node instead of it, it is ensured that the reliability of network, it is ensured that host node exists
Under failure conditions, wireless sensor network remains to continue to run with.
According to above-mentioned design, the present invention is adopted the following technical scheme that:
A kind of cognizable global clock synchronous method of wireless sensor network, is comprised the following steps that:
Step 1:Wireless sensor node is subjected to descending arrangement by ranked object of energy initial value, primary power value is chosen
Highest node is main node M, and the high node of primary power value time is expectation host node N;
Step 2:Host node M is in TMNodes broadcast synchronization information of the moment into broadcasting area, expects host node N in TNWhen
Receive the broadcast message quarter, other child node C are in TCMoment also have received the broadcast message for carrying out autonomous node M, and each node prepares
Start global synchronization;
Step 3:It is expected that host node N is carried out first synchronous between host node M:Expect host node N in T1Moment is to master
Node M sends synchronization request, and host node M is in T2Moment is received after the synchronization request, in T3Moment to expect host node N feeding back ACKs
Signal, wherein including host node M T2And T3Information;Expect host node N in T4Moment receives the ack signal, comes from while calculating
Oneself clock skew offset (N, M) between host node M simultaneously updates its local clock;
Step 4:It is expected that host node N shares offset (N, M) and T to other node CNValue, node C compares oneself and received
T at the time of broadcastCWith the T sharedNAnd offset (N, M), and calculate oneself clock skew offset (C, M) and
Offset (C, N) is to update its local clock;
Step 5:Information transmission, sends the node of information by estimation institute consumed energy, and update the energy of oneself each time
Value;
Step 6:Each node sends packet after clock synchronization is completed to host node M, including node ID, more
Nodal clock initial value after new and the nodal clock energy value after synchronization;Host node M will be built simultaneously according to these packets
Update the sensor node information table for whole network;
Step 7:Host node M is received in network after the clock information of all nodes, and whether host node M judges self-energy
Less than node N energy:If so, then switched major node M and expecting host node N role, choose and expect host node N as next
The host node M of individual synchronizing cycle, and original host node M is then as the expectation host node N of next cycle, and judge the new phase
Whether be in network energy value secondary high node, other nodes are otherwise chosen again for new expectation host node if hoping host node N;
Step 8:So far a synchronizing cycle is completed, to enter next synchronizing cycle, is then started the cycle over from step 2.
Application of the cognizable global clock synchronous method of a kind of wireless sensor network in multihop network, in multihop network
In network, the realization of the cognizable global clock synchronous method of wireless sensor network needs to add in the middle of in each broadcast area
The selection of node;In first broadcast area, method realizes that step is performed according to above-mentioned step;And in second broadcast
Need first to choose node farthest apart from host node in first broadcast area in region, when method is realized as intermediate node,
And the expectation host node in second broadcast area is regarded as, second service area is then performed since above-mentioned step 4
Clock in domain is synchronous;By that analogy, in the 3rd broadcast area, choose first in second broadcast area apart from middle node
The farthest node of point completes synchronous as new intermediate node according to above-mentioned step.
Compared with prior art, the beneficial effects of the invention are as follows:
The advantage and disadvantage of comprehensive sender-recipient (S-R) model and recipient-recipient (R-R) model, propose CGCSP
Algorithm completes global clock simultaneously operating to wireless sensor network, wireless sensor network is reached global synchronization so that when
Clock simultaneously operating high accuracy, low energy consumption and has higher reliability.This method is applicable in multihop network.
Brief description of the drawings
Fig. 1 is the cognizable global clock synchronous method flow chart of wireless sensor network.
Fig. 2 is main node M and expects the synchronous mode between host node N.
Fig. 3 is the synchronous mode between expectation host node N and other child nodes C.
Fig. 4 is CGCSP Clock Synchronization Procedures.
Embodiment
Embodiment party's example to the present invention elaborates below in conjunction with the accompanying drawings.
As shown in figure 1, the Clock Synchronization Procedure of the cognizable global clock synchronous method of wireless sensor network can divide
For two Main Stages:First stage is host node M and expects the synchronization between host node N;Second stage is to expect host node N
Synchronization between other child node C.
In the first stage, clock synchronously uses transmitter-receiver (S-R) pattern, similar to TPSN schemes, such as Fig. 2 institutes
Show.Wherein, T1Represent when host node M broadcast messages are to expectation host node N, host node M local zone time.T2Represent when expectation
Host node N from host node M receive message when, expect host node N local zone time.T3Represent to work as and expect host node N to main section
When point M sends ACK message, host node N local zone time is expected.T4Represent when host node M receives what is sent by expectation host node N
Host node M local zone time during ACK message.In the first stage, when synchronously starting, all sections of the host node M into broadcasting area
Point broadcast synchronization commencing signal, expects that host node N receives the message, and by the message exchange with host node M, calculating is come from
Oneself clock skew between host node, and give other nodes by this Information Sharing.Expect between host node N and host node M when
Clock skew offset (N, M) is calculated by following formula:
It is expected that host node N updates its local clock clock as the following formulaNValue:
clockN=clockN-offset(N,M) (2)
In second stage, it is expected that host node N is synchronous with other node C's, then using recipient-recipient (R-R) model,
Similar to RBS schemes, as shown in Figure 3.In this stage, when host node M all nodes broadcast synchronization message into network, section
Point C also have received the broadcast message.By comparing with it is expected that host node N is shared with the clock bias information of oneself, node C is pressed
The clock skew with host node M is calculated according to following formula, and updates its local clock, is reached synchronous with host node M:
Offset (C, M)=offset (C, N)+offset (N, M) (3)
Offset (C, N)=TC-TN (4)
Wherein, TCRepresent local clock when node C receives host node M broadcast message, TNRepresent to expect host node N
Receive local clock during host node M broadcast message.
The merging above-mentioned two stage, the CGCSP Clock Synchronization Procedures just integrated, as shown in Figure 4.
In view of the energy expenditure in CGCSP Clock Synchronization Procedures, the synchronization message exchanged between node is more, is spent
Lock in time is longer, and the energy of sensor node consumption is bigger, and the synchronous efficiency of clock is lower.Generally, following formula can
Power consumption for representing free space radio electric signal transmission:
Wherein, ptRepresent transmit power, prReceiving power is represented, d refers to the distance between transmitting terminal and receiving terminal, and c represents road
Footpath loss factor.Due to factors such as diffracted signal decay, reflection and the scatterings of wall, wireless signal is larger by environmental disturbances, road
Footpath loss is generally larger.Therefore, for wireless sensor network WSNs, the energy consumption of its clock synchronization algorithm can also be according to
The energy consumption of message exchange is estimated roughly in synchronizing process.According to minimum transfer energy consumption in typical plane Topology Control Algorithm
Model, the energy consumption of wireless sensor node mainly with message byte and path-dependent, this agreement estimated with following formula
Each wireless sensor node sends the energy consumption of a synchronization message:
Et=2Eelec·k+Eamp·k·dc (6)
Wherein, EtRepresent that node sends the energy consumption of message, k is message word length, EelecRepresent Node electronics equipment energy consumption, Eamp
The transmitter amplifier energy consumption of node is represented, d refers to the distance between sending node and receiving node.C is path loss coefficient, one
As take between 2~5, in a practical situation, path loss typically takes 2, and 4 are taken during in outdoor environment.
To sum up, a kind of cognizable global clock synchronous method of wireless sensor network, is comprised the following steps that:
Step 1:Wireless sensor node is subjected to descending arrangement by ranked object of energy initial value, primary power value is chosen
Highest node is main node M, and the high node of primary power value time is expectation host node N;
Step 2:Host node M is in TMNodes broadcast synchronization information of the moment into broadcasting area, expects host node N in TNWhen
Receive the broadcast message quarter, other child node C are in TCMoment also have received the broadcast message for carrying out autonomous node M, and each node prepares
Start global synchronization;
Step 3:It is expected that host node N is carried out first synchronous between host node M:Expect host node N in T1Moment is to master
Node M sends synchronization request, and host node M is in T2Moment is received after the synchronization request, in T3Moment to expect host node N feeding back ACKs
Signal, wherein including host node M T2And T3Information;Expect host node N in T4Moment receives the ack signal, while passing through formula
(1) calculate oneself clock skew offset (N, M) between host node M with (2) and update its local clock;
Step 4:It is expected that host node N shares offset (N, M) and T to other node CNValue, node C compares oneself and received
T at the time of broadcastCWith the T sharedNAnd offset (N, M), and the clock skew of oneself is calculated by formula (3) and (4)
Offset (C, M) and offset (C, N) is to update its local clock;
Step 5:Information transmission each time, institute's consumed energy will be estimated according to formula (6) by sending the node of information, and update from
Oneself energy value;
Step 6:Each node sends packet after clock synchronization is completed to host node M, including node ID, more
Nodal clock initial value after new and the nodal clock energy value after synchronization;Host node M will be built simultaneously according to these packets
Update the sensor node information table for whole network;
Step 7:Host node M is received in network after the clock information of all nodes, and whether host node M judges self-energy
Less than node N energy:If so, then switched major node M and expecting host node N role, choose and expect host node N as next
The host node M of individual synchronizing cycle, and original host node M is then as the expectation host node N of next cycle, and judge the new phase
Whether be in network energy value secondary high node, other nodes are otherwise chosen again for new expectation host node if hoping host node N;
Step 8:So far a synchronizing cycle is completed, to enter next synchronizing cycle, is then started the cycle over from step 2.
Application of the cognizable global clock synchronous method of a kind of wireless sensor network in multihop network, in multihop network
In network, the realization of the cognizable global clock synchronous method of wireless sensor network needs to add in the middle of in each broadcast area
The selection of node;In first broadcast area, method realizes that step is performed according to above-mentioned step;And in second broadcast
Need first to choose node farthest apart from host node in first broadcast area in region, when method is realized as intermediate node,
And the expectation host node in second broadcast area is regarded as, second service area is then performed since above-mentioned step 4
Clock in domain is synchronous;By that analogy, in the 3rd broadcast area, choose first in second broadcast area apart from middle node
The farthest node of point completes synchronous as new intermediate node according to above-mentioned step.