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 wireless sensor network.As shown in Figure 1, 2, the method comprises the following steps:
Step S101: in the community of wireless sensor network, comprise host node and a plurality of from node.First, by host node, generate in advance the original frequency hop sequences set C that length is M, wherein the value of M can be set arbitrarily or the maximum available frequency points N of reference
maxobtain.Consider that actual common frequency band width can produce fluctuation, thus the available frequency points N of the maximum in WSN
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 is determined dynamic maximum available frequency points N
max:
Afterwards, by host node in community, place to from the original frequency hop sequences set of node broadcasts C.Host node is according to available frequency points N (N≤N
max), host node identification information ID
1, each is from node identification Information ID
2, ID
3iD
m(be assumed to be m from node, wherein, host node identification information ID
1, and each from node identification Information ID
2, ID
3iD
mthe identification node unique identification of attribute separately), and the node parameter K of described community (K can obtain according to the nodes of community, for example nodes is 100, K can choose and 100 the most close 2 integer 7 power values 128), by following formula 1.2, generate each from the pseudo-random phase value Index of node
Index=(K*ID
main+ ID
from) mod N (1.2),
From above-mentioned each generative process from the pseudo-random phase value Index of node, due to the different ID differences from node, thereby at each node, receive after the frequency hop sequences C of the unified broadcast of host node, specific pseudo-random phase value Index be can obtain, each particularity and uniqueness from node frame-skipping sequence guaranteed.
Above-mentioned available frequency points N and available frequency collection can pass through host node historical record, or the record in wireless sensor network obtains.But the above-mentioned mode of determining available frequency points 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 of dynamically determining available frequency points N and available frequency collection, by host node transceiver, by PLL (phase-locked loop), each frequency in frequency range is carried out to Uniform Scanning, obtain RSSI (the signal strength signal intensity indication that Received Signal Strength Indication receives) and the LQI (indication of link quality indicator link-quality) of each frequency.Above-mentioned, by PLL, each frequency is carried out in Uniform Scanning process, because PLL frequency locking time of the transceiver of dissimilar or producer there are differences, therefore, if the frequency locking time is set as to fixed value, will make scanning result occur difference.For addressing this problem, in the present invention, propose, because frequency locking time of most of transceiver is the value range of 20 μ s~200 μ s.Therefore, in the scanning process of aerial power spectrum of carrying out public frequency range wireless sense network, when the frequency locking time of each frequency is set as 10ms, just can meet the frequency locking time requirement of the PLL of dissimilar transceiver, thereby guarantee that scanning result is not subject to the impact of transceiver type.
After obtaining the RSSI and LQI of each frequency, can, according to the RSSI of each frequency and LQI parameter, comprehensively determine the power of eating dishes without rice or wine (air interface power) of each frequency.From the power of eating dishes without rice or wine of these frequencies, obtain the power distribution of eating dishes without rice or wine of each frequency in frequency range.Each frequency in the power of eating dishes without rice or wine being distributed in frequency range power of eating dishes without rice or wine sorts from small to large according to this.Finally, according to the threshold value of setting, from the power of eating dishes without rice or wine distributes, reject the frequency that power is greater than threshold value, obtained dynamic available frequency collection, and determined available frequency points N by this dynamic available frequency collection.
In above step, definite method of threshold value can adopt the fixing two kinds of methods of determining or dynamically determine, at WSN state, be interfered less in the situation that, can adopt the fixing method of determining threshold value, as: default fixing initial absolute door limit value (such as-60dBm).At WSN state, be interfered more in the situation that, can adopt dynamically definite method, according to the link interference information of feedback, determine whether rejecting certain frequency, 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 Logistic chaos encrypting method, the available frequency points N of above-mentioned generation, pseudo-random phase value Index are encrypted.And this pseudo-random phase value Index, described original frequency hop sequences set C and described available frequency points N are sent to each from node by cipher mode.Thereby the easy intercepting and capturing of host node transmission data have been reduced.
Step S102: each is from node according to random phase value Index (0≤index<M), and sequential loop is extracted available frequency points N number from original frequency hop sequences set C, obtains pre-frequency hop sequences D.Because available frequency points N numerical value is less, therefore, can pass through the compute mode to pre-frequency hop sequences D mould N, make frequency hop sequences meet frequency collection, i.e. D '=DmodN, D ' [i] ∈ [0, N-1].
From above-mentioned steps S101 and step S103, in the present invention, in frequency hop sequences D'Shi community, from node, in this locality, carry out computing generation, the host node in Er Gai community only carries out the transmission of calculating parameter, thereby greatly reduced the operand of host node.Meanwhile, the pseudo-random phase value Index sending at host node produces from node identification according to each, therefore at each from having kept the good distinctiveness of frequency hop sequences between node, make internodal frequency hopping transmission more stable.
Step S103: set up man-to-man order corresponding relation between the available frequency collection obtaining at host node and frequency hop sequences D',, each available frequency that available frequency is concentrated is corresponding one by one in order with each frequency in frequency hopping series D', obtain synchronising frequency hopping sequence A [D ' [i]], i ∈ [0, N-1], between primary node and secondary node, according to described frequency hop sequences D' and above-mentioned one-to-one relationship, thereby realize synchronising frequency hopping sequence and transmit the corresponding of available frequency collection.
It should be noted that, between the transmission node in WSN (host node with from node), can under the synchronous error that allows magnitude, set up and synchronize.In WSN, the magnitude of synchronous error is 100 μ s, thereby in reserved a large amount of protection time slot, 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 unknown problem or the imperfection of design, cause frequency hopping to continue or be interrupted failed 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 not participating in frequency hopping (stablize or disturb hour this frequency also can be set as participating in frequency hopping in network state).When host node is used single RF spot, can meet by taking the frequency hopping communications time of 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 is used 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, 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 N number as frequency hop sequences D from C.
Stp3: by the sample value in D sequence one by one mould N calculate D ', i.e. D '=DmodN, D ' [i] ∈ [0, N-1].
Stp4: the frequency sequence corresponding to frequency hop sequences in cycle is A[D ' [i]], i ∈ [0, N-1].
By above-mentioned steps, Stp1~Stp4 has obtained J
maxthe frequency hop sequences of individual hop period, the 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.
When the random alignment sequence that the length of C is 32, other suppose index=5, N=16, J
max=11 o'clock, simulation analysis result was as shown in Fig. 5~9.
C={32?22?6?3?16?11?30?7?28?17?14?8?5?29?21?25?31?27?26?19?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};
By above simulation result, can be found out, this simple frequency hopping sequence generating method, although the frequency hop sequences generating does not have the absolute characteristic that is uniformly distributed, but there is good ergodic, the characteristic that the large probability that the adjacent frequency sequence number that particularly histogram middle part occurs occurs and small probability interval intersect, is conducive to reduce the adjacent frequency interference of frequency hopping networking on the contrary.
For make above-mentioned in WSN the transfer of data between each transmission node safer, in one embodiment, host node can adopt Logistic chaos encrypting method to be encrypted the available frequency points N of above-mentioned generation, pseudo-random phase value Index as shown in figure 12; That is, in frequency hopping networking, adopt Logistic chaos encrypting method.Chaos encryption is mainly to utilize the sequence being produced by 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 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.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
ncleartext information sequence, { K
nkey information sequence, and by Logistic chaos equation iteration, produced after sequence, carry out gained integer chaos sequence after binary conversion treatment, { C
nit is cipher-text information sequence.
Cryptographic algorithm is designed to: { C
n}={ P
n⊕ { K
n;
Decipherment algorithm is designed to: { P
n}={ C
n⊕ { K
n;
As shown in figure 17, decrypting process is the inverse process of encrypting to encryption principle figure based on Logistic chaotic maps.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 only has minute differences, chaos system in iteration after certain number of times, just can produce distinct chaos sequence.
In order to make the chaos sequence of close initial value more uncorrelated with each other, can be to chaos sequence value after more than 1000 times iteration when carrying out experiment simulation, 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 the frequency hop sequences { X that must use a kind of method that this is consisted of real number
nbe mapped to the pseudo random sequence being formed by integer, serve as encryption key.The method of selecting in this example is, in iteration, gets continuously afterwards 8 one group of sequence after iteration for 1000 times, judges their size, is digitized as 1, otherwise is 0 if be greater than 0.4.
According to a further aspect in the invention, also provide the synchronising frequency hopping system in wireless sensor network, as shown in figure 13.This system comprises: host node processing unit 201, from node processing unit 202 and frequency hopping unit 203.
Host node processing unit 201 can comprise: for the community at wireless sensor network, generating in advance length is the original frequency hop sequences set C of M; According to available frequency points N, host node identification information and each is from each pseudo-random phase value Index from node of node identification Information generation, and adopt Logistic chaos encrypting method to be encrypted the available frequency points N of above-mentioned generation, pseudo-random phase value Index, this pseudo-random phase value Index, described original frequency hop sequences set C and described available frequency points N are sent to each from node;
From node processing unit 202, for each, from node, adopt Logistic chaos decode method to be decrypted the available frequency points N of above-mentioned generation, pseudo-random phase value Index, according to received described pseudo-random phase value Index separately, described original frequency hop sequences set C and described available frequency points N, generate frequency hop sequences D';
Frequency hopping unit 203, between described primary node and secondary node, realizes 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, according to described available frequency collection, obtains available frequency points N.
Pseudo-random phase value Index generation unit 2012, host node is according to available frequency points N, host node identification information ID
main, each is from node identification Information ID
fromand the node parameter K of described community generates each from the pseudo-random phase value Index of node, Index=(K*ID by following formula
main+ ID
from) mod N.
Logistic chaos encryption unit 2013, host node is according to adopting Logistic chaos encrypting method to be encrypted the available frequency points N, the pseudo-random phase value Index that send.
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, and the mode that also can add necessary general hardware platform by software realizes.Understanding based on such, 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, or the network equipment etc.) carry out the method described in 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 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, just to describing, does not represent the quality of embodiment.
Disclosed is above only several specific embodiment of the present invention, and still, the present invention is not limited thereto, and the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.