Embodiment
Below in conjunction with accompanying drawing, the embodiment of the present invention is described.
According to one embodiment of present invention, provide the synchronising frequency hopping method in the wireless sensor network.As shown in Figure 1, 2, the method comprises the following steps:
Step S101: in the residential quarter of wireless sensor network, comprise host node and a plurality of from node.At first, generate in advance by host node the original frequency hop sequences set C that length is M, but the value Set arbitrarily of M or count N with reference to maximum available frequency wherein
maxObtain.Consider that actual common frequency band width can produce fluctuation, thereby the maximum available frequency in WSN is counted N
maxWill produce fluctuation, therefore can be according to the eat dishes without rice or wine bandwidth B of signal bandwidth BW, common frequency band of node, and formula 1.1 determines that dynamic maximum available frequency counts N
max:
Afterwards, by host node in the residential quarter, place to from the original frequency hop sequences set of node broadcasts C.Host node is counted N(N≤N according to available frequency
max), host node identification information ID
1, respectively from the node identification Information ID
2, ID
3ID
m(be assumed to be m from node, wherein, host node identification information ID
1, and respectively from the node identification Information ID
2, ID
3ID
mThe identification node unique identification of attribute separately), and the node parameter K of described residential quarter (K can obtain according to the nodes of residential quarter, for example nodes is 100, K can choose and 100 the most close 2 integer 7 power values 128), generate respectively pseudo-random phase value Index from node by following formula 1.2
Index=(K*ID
Main+ ID
From) mod N (1.2),
From above-mentioned respectively from the generative process of the pseudo-random phase value Index of node as can be known, due to the different ID differences from node, thereby receive the frequency hop sequences C of the unified broadcasting of host node at each node after, specific pseudo-random phase value Index be can obtain, particularity and uniqueness from node frame-skipping sequence guaranteed respectively.
Above-mentioned available frequency counts N and available frequency collection can pass through the host node historical record, or the record in wireless sensor network obtains.But the above-mentioned mode of determining that available frequency is counted N and available frequency collection because the parameter variation of system can be fluctuateed in generation, thereby makes synchronising frequency hopping existence and stability problem.Simultaneously in deterministic process, also can adopt the following method that available frequency is counted N and available frequency collection of dynamically determining, by the host node transceiver by the PLL(phase-locked loop) each frequency in frequency range is carried out Uniform Scanning, obtain the signal strength signal intensity indication that the RSSI(Received Signal Strength Indication of each frequency receives) and LQI (indication of link quality indicator link-quality).By PLL, each frequency is carried out the Uniform Scanning process above-mentioned, because PLL frequency locking time of the transceiver of dissimilar or producer there are differences, therefore, if the frequency locking time is set as fixed value, will make scanning result difference occur.For addressing this problem, propose in the present invention, because frequency locking time of most of transceiver is the value range of 20 μ s~200 μ s.Therefore, in the scanning process of the aerial power spectrum that carries out public frequency range wireless sense network, just can satisfy the frequency locking time requirement of the PLL of dissimilar transceiver when the frequency locking time of each frequency is set as 10ms, thereby guarantees that scanning result is not subject to the impact of transceiver type.
After the RSSI that obtains each frequency and LQI, can according to RSSI and the LQI parameter of each frequency, comprehensively determine the power of eating dishes without rice or wine (air interface power) of each frequency.Obtain the power distribution of eating dishes without rice or wine of each frequency in frequency range from the power of eating dishes without rice or wine of these frequencies.Each frequency in frequency range, the power of eating dishes without rice or wine being distributed power of eating dishes without rice or wine sorts from small to large according to this.At last, according to the threshold value of setting, reject power greater than the frequency of threshold value from the power of eating dishes without rice or wine distributes, obtained dynamic available frequency collection, and determine that by this dynamic available frequency collection available frequency counts N.
In above step, definite method of threshold value can adopt the fixing two kinds of methods of determining or dynamically determine, in the situation that the WSN state is interfered is less, can adopt the fixing method of determining threshold value, as: default fixing initial absolute door limit value (such as-60dBm).In the situation that the WSN state is interfered is more, can adopt the method for dynamically determining, determine whether rejecting certain frequency according to the link interference information of feedback, thereby can make the setting of above-mentioned threshold value more accurate.
In above step, for making host node with more reliable from the transfer of data of node, can make host node adopt the Logistic chaos encrypting method, to the available frequency of above-mentioned generation count N, pseudo-random phase value Index is encrypted.And this pseudo-random phase value Index, described original frequency hop sequences set C and described available frequency are counted N be sent to respectively from node by cipher mode.Thereby the easy intercepting and capturing of host node the transmission of data have been reduced.
Step S102: respectively from node according to random phase value Index(0≤index<M), sequential loop is extracted available frequency and is counted the N number from original frequency hop sequences set C, obtains pre-frequency hop sequences D.To count N numerical value less due to available frequency, therefore, can by the compute mode to pre-frequency hop sequences D mould N, make frequency hop sequences meet the frequency collection, i.e. D '=DmodN, D ' [i] ∈ [0, N-1].
From above-mentioned steps S101 and step S103 as can be known, in the present invention, frequency hop sequences D' carries out computing to produce in this locality from node in the residential quarter, and the host node in this residential quarter only carries out the transmission of calculating parameter, thereby has greatly reduced the operand of host node.Simultaneously, the pseudo-random phase value Index that sends at host node is according to respectively producing from node identification, therefore at each from having kept frequency hop sequences distinctiveness preferably between node, internodal frequency hopping is transmitted more stable.
Step S103: set up man-to-man order corresponding relation between available frequency collection that host node obtains and frequency hop sequences D', namely, make in each available frequency that available frequency concentrates and the serial D' of frequency hopping each frequency corresponding one by one in order, obtain synchronising frequency hopping sequence A [D ' [i]], i ∈ [0, N-1] is between primary node and secondary node, according to described frequency hop sequences D' and above-mentioned one-to-one relationship, thereby realize the synchronising frequency hopping sequence and transmit the corresponding of available frequency collection.
Need to prove, can set up under the synchronous error that allows magnitude between the transmission node in WSN (host node with from node) and synchronize.The magnitude of synchronous error is 100 μ s in WSN, thereby when reserving a large amount of protection time slots, has avoided the waste of time resource.The signal of synchronising frequency hopping pattern as shown in Figure 3.The time-frequency grid that " C dotted line frame " shown in Fig. 3 is corresponding, the left and right sidesing shifting of the time-frequency grid of this C dotted line frame represents synchronous error.
As the further optimization of above step S103, in WSN due to the problem of the unknown or the imperfection of design, cause frequency hopping to continue or be interrupted failed the time, can realize by following proposal the fault-tolerant processing of frequency hopping.
A default communication frequency is set in each host node of WSN.For guaranteeing the reliable of this frequency, this frequency can be set as and not participate in frequency hopping (stablize or disturb also can be set as than hour this frequency in network state and participate in frequency hopping).When host node uses single RF spot, can satisfy by the frequency hopping communications time that takies host node the requirement of above communication frequency, single RF spot host node frequency hopping configuration of band acquiescence frequency is as shown in figure 10.When host node uses plural RF spot, can therefrom select a RF spot resident for a long time, frequency is issued broadcast message by default.For guaranteeing transmission quality, this host node can adopt omnidirectional antenna.Another is used for realizing frequency hopping, and the Double RF frequency host node frequency hopping configuration of band acquiescence frequency as shown in figure 11.
Below with reference to Fig. 4, by the describing mode of Mathematical Modeling, the implementation procedure of above-mentioned steps S101 ~ S103 is described:
Stp1: in each transmission node of WSN, generating in advance length is the original frequency hop sequences set C of M, original frequency hop sequences set C intermediate-frequeney point be pseudo-random phase value Index treat index series, suppose that the available frequency number in this original frequency hop sequences set C is N; In original frequency hop sequences set C generative process, the frequency point scanning parameter is: each frequency residence time T; Maximum hop period is counted J
max
Stp2: according to index(0≤index<M), sequential loop is taken out the N number as frequency hop sequences D from C.
Stp3: with the sample value in the D sequence one by one mould N calculate D ', i.e. D '=D modN, D ' [i] ∈ [0, N-1]
Stp4: the frequency sequence that the frequency hop sequences in cycle is corresponding is A[D ' [i]], i ∈ [0, N-1].
Stp1 ~ Stp4 has obtained J by above-mentioned steps
maxThe frequency hop sequences of individual hop period, whose? duration is: N * T * J
max
As the further optimization of above step Stp4, for strengthening the anti-predictability of frequency hop sequences, also can comprise: Stp5, in this step, definable D ' j=(13D+j) modN, j ∈ [1, J
max-1], J wherein
maxIt is maximum hop period number.
Be 32 random alignment sequence when the length of C, other suppose index=5, N=16, J
max=11 o'clock, the simulation analysis result was as shown in Fig. 5 ~ 9.
C={3222?6?3?16?11?30?7?28?17?14?8?5?29?21?25?31?27?2619?15?1?23?2?4?18?24?13?9?20?10?12};
D={11?30?7?28?17?14?8?5?29?21?25?31?27?26?19?15};
D′={11?14?7?12?1?14?8?5?13?5?9?15?11?10?3?15};
Can be found out by above simulation result, this simple frequency hopping sequence generating method, although the frequency hop sequences that generates does not have absolute even distribution character, but good ergodic is arranged, particularly the large probability that occurs of the adjacent frequency sequence number that occurs of histogram middle part and the small probability interval characteristic of intersecting, be conducive on the contrary reduce the adjacent of frequency hopping networking and frequently disturb.
For make above-mentioned in WSN the transfer of data between each transmission node safer, in one embodiment, as shown in figure 12 host node can adopt the Logistic chaos encrypting method to the available frequency of above-mentioned generation count N, pseudo-random phase value Index is encrypted; That is, adopt the Logistic chaos encrypting method in the frequency hopping networking.Chaos encryption is mainly to utilize the sequence that is produced by the chaos system iteration, as a factor sequence of enciphering transformation.The theoretical foundation of chaos encryption is the self-similarity of chaos, make chaotic key collection that the part chooses on distributional pattern all with global similarity.Chaos occurs in deterministic system, and the period doubling bifurcation of Logistic equation can cause chaos.The Logistic equation is:
X(n+1)=u*X(n)*(1–X(n));
Above-mentioned X (n) span is [0,1], and the span of u is [3.6,4.0].
Chaotic Encryption design: suppose { P
nThe cleartext information sequence, { K
nThe key information sequence, after producing sequence by Logistic chaos equation iteration, carry out gained integer chaos sequence after binary conversion treatment, { C
nIt is the cipher-text information sequence.
Cryptographic algorithm is designed to:
Decipherment algorithm is designed to:
Based on the encryption principle figure of Logistic chaotic maps as shown in figure 17, decrypting process is the inverse process of encrypting.Initial value X
oWith U be the parameter of Logistic equation, be the key parameter K={X of encryption system simultaneously
o, u}.Because the sensitive dependence of chaos system to initial condition, for the initial value that minute differences is only arranged, chaos system in iteration just can produce distinct chaos sequence after certain number of times.
For the chaos sequence that makes close initial value more uncorrelated with each other, when carrying out experiment simulation can to chaos sequence through iteration more than 1000 times after value, fault in enlargement effectively, it is invalid to make the attack of initial condition, make cipher round results better, fail safe is higher.
Because secret value is digital quantity, so must use a kind of method with this frequency hop sequences { X that is consisted of by real number
nBe mapped to the pseudo random sequence that is consisted of by integer, serve as encryption key.The method of selecting in this example is, 8 one group of the sequence after iteration is got iteration 1000 times afterwards continuously judges their size, if be digitized as 1 greater than 0.4, otherwise is 0.
According to a further aspect in the invention, also provide the synchronising frequency hopping system in the wireless sensor network, as shown in figure 13.This system comprises: host node processing unit 201, from the node processing unit 202 and frequency hopping unit 203.
Host node processing unit 201 can comprise: be used in the residential quarter of wireless sensor network, generating in advance length is the original frequency hop sequences set C of M; According to available frequency count N, host node identification information and respectively from the node identification Information generation respectively from the pseudo-random phase value Index of node, and adopt the Logistic chaos encrypting method to the available frequency of above-mentioned generation count N, pseudo-random phase value Index is encrypted, this pseudo-random phase value Index, described original frequency hop sequences set C and described available frequency are counted N are sent to respectively from node;
From the node processing unit 202, be used for respectively from node adopt Logistic chaos decode method to the available frequency of above-mentioned generation count N, pseudo-random phase value Index is decrypted, count N according to received described pseudo-random phase value Index separately, described original frequency hop sequences set C and described available frequency and generate frequency hop sequences D';
Frequency hopping unit 203 is used between described primary node and secondary node, realizes the synchronising frequency hopping transmission according to described frequency hop sequences D' with reference to available frequency collection.
Wherein, described host node processing unit also comprises:
Available frequency collection acquiring unit 2011, host node carries out Power Spectrum Distribution scanning to each frequency in described wireless sensor network, obtains available frequency collection, obtains available frequency according to described available frequency collection and counts N.
Pseudo-random phase value Index generation unit 2012, host node is counted N, host node identification information ID according to available frequency
Main, respectively from the node identification Information ID
FromAnd the node parameter K of described residential quarter by following formula generation respectively from the pseudo-random phase value Index of node, Index=(K*ID
Main+ ID
From) mod N.
Logistic chaos encryption unit 2013, host node according to adopt the Logistic chaos encrypting method to the available frequency that sends count N, pseudo-random phase value Index is encrypted.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
Above disclosed be only several specific embodiment of the present invention, still, the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.