A kind of based on transmission energy efficiency source encoding methods high in the wireless sensor network of OOK modulation
Technical field
The present invention relates to the energy-conservation source coding method in a kind of radio communication, the method is applicable to the wireless sensor network adopting OOK modulation.
Technical background
Wireless sensor network has prospect widely in fields such as environmental monitoring, health care, industrial automation, military investigations.Because the sensor node in sensor network is normally powered by battery, its energy is very limited, and therefore how reducing the energy ezpenditure of node, extending the life span of network is one of key issue required study.
The energy ezpenditure of sensor node occurs in the links such as data acquisition, data processing, data transmission, data receiver.Wherein, data send the significant proportion that the energy consumed can account for total power consumption.Such as, send the energy that energy and process thousands of computationses that a bit consumes consume roughly the same.Therefore, how reducing the energy that transmission information consumes is the major issue highly continuing to further investigate.
In order to the energy consumed when saving transmission information, OOK modulation is adopted to be a kind of applicable candidate modulation scheme.OOK modulation system only sends voltage signal when sending " 1 " bit, and antenna of keeping quite when sending " 0 " bit does not send any voltage signal.Therefore, the communication mode adopting OOK modulation system only can when sending " 1 " bit consumed energy, reach energy-conservation object.
For the radio communication adopting OOK modulation system, we can by adopting source coding technique, the bit string of m bit long is mapped to the long code word of n-bit to reduce the occurrence number of " 1 " bit, thus further reduces transmission energy consumption, wherein n>m.So far, more existing literature research design source coding method reduces the occurrence number of " 1 " bit.Such as ME coding method is (see " Energy Efficient Source Coding and Modulation forWireless Applications ", publish in IEEE WCNC, 2003), MEC coding method is (see " Minimum Energy Coding for Wireless NanoSensor Networks ", publish in IEEE INFOCOM, 2012) etc.But these source encoding methods are all the prefix codes that code length is fixed in design, although this fixed code long codes decreases the occurrence number of " 1 " bit, but ratio and the code check of the front message length of coding and the rear code word size of coding are on the low side, thus cause efficiency of transmission on the low side.Design and develop variable length code and the different coding method of code word size, not only effectively can reduce the occurrence number of " 1 " bit but also high code check can be reached.
Summary of the invention
In order to the deficiency that the fixed code long codes overcoming existing wireless sensor network causes code check on the low side, the present invention proposes a kind of based on the change code length coding method in the radio communication of OOK modulation, the method is ensureing that obtaining code under code check and efficiency of transmission are not less than the prerequisite of the given threshold value of institute is heavily the codeword set that " 1 " number of bits is lower, thus the energy ezpenditure of reduction node.Therefore this technology can be applied in the wireless sensor network using OOK modulation, and then greatly extend the energy extremely limited communication node time-to-live.
The present invention in order to solve the problems of the technologies described above the technical scheme provided is:
A kind of based on transmission energy efficiency source encoding methods high in the wireless sensor network of OOK modulation, utilize avriable length codes set choosing method to construct and reach predetermined code check and the codeword set with very low code word average weight, and utilize the encoding and decoding method based on code table inquiry to carry out Code And Decode, wherein, described avriable length codes set choosing method comprises the following steps:
(1.1) for length be the bit string encoded question of m bit, constructing a degree of depth is the full binary tree of m, and the left branch of its each node is designated as 0, and right branch is designated as 1; Binary tree represents a code word from root node to the path sequence of each leaf node, to make this coding have prefix;
(1.2) to each node n
i, calculate its weight tolerance w
iwith number of plies tolerance L
i, wherein weight tolerance w
ifor from root node to node n
ipath sequence in 1 number, and the number of plies tolerance L
ifor from root node to node n
ithe length of path sequence, calculate the summation L of all leaf node numbers of plies tolerance
t.
(1.3) cutting and extended operation carried out repeatedly to the leaf node in binary tree and upgrade L
t, until L
ttill reaching critical value;
The described encoding and decoding method based on code table inquiry comprises the following steps:
(2.1) code table structure: be first by 2
mindividual different m bit long bit string and selected 2
mindividual code word carries out one_to_one corresponding, is stored as a code table;
(2.2) code table stores: be kept at by code table in sending node and receiving node;
(2.3) coding-decoding operation: sending node is searched by code table and finds out code word corresponding to bit string, receiving node is searched by code table and finds out bit string corresponding to code word.
Further, in step (1.1), the value of parameter m depends on the memory size of sensor node, and the code table size that the value of m obtains is less than the memory size possessed in node.
Further, the weight of leaf node measures the energy that the transmission that can reflect its corresponding code word will consume in described step (1.2), and the number of plies of leaf node measures the time that the transmission that can reflect its corresponding code word will consume.
Further again, in described step (1.3), described cutting and extended operation comprise following content of operation:
(1.3.1) the candidate collection N of the leaf node treating cutting is determined
d: first initialization N
d=φ, then in all leaf nodes with the identical number of plies, selects the leaf node with maximum weight and joins N
din;
(1.3.2) determine the candidate collection Ne of leaf node to be expanded: first initialization Ne=φ, then in all leaf nodes with the identical number of plies, select the leaf node with minimum weight and join in Ne;
(1.3.3) to every a pair leaf node (n
i, n
j), wherein n
i∈ N
dand n
j∈ Ne, calculates its revenue measure value G
i,jif the right revenue measure value of all above leaf nodes is all zero, then end operation; Otherwise, pick out have maximum return tolerance leaf node to (n
i, n
j), there is if multipair identical maximum return metric, then select arbitrarily wherein a pair, if then calculate the number of plies summation of leaf node of carrying out cutting and expansion and will cause according to following formula:
If L '
t>m2
m/ R
ththen terminate algorithm;
(1.3.4) leaf node n is cropped
iif, n
ithe brotgher of node then crop together without child node.Then by leaf node n
jexpand two new cotyledon child node n
kand n
l.Calculate weight tolerance and the number of plies tolerance of these two new leaf nodes respectively.The summation L of the number of plies of all leaf nodes after binary tree is upgraded
tbe updated to L
t=L '
t.
Revenue measure value G in described step (1.3.3)
i,jcomputing formula be:
Technical characterstic of the present invention and effect:
1) the present invention utilizes the leaf node of binary tree to represent code word, and the code word gone out designed by making has prefix, and namely any one code word is not the prefix of other code word, is just provided with unique decodability yet.
2) cutting of the leaf node of binary tree and expansion is utilized constantly to reduce code word average weight, simultaneously easily to the control of code check.
3) length of code word that finally obtains of the present invention is different, has been issued to lower average code weight, thus greatly reduces transmission energy consumption in the prerequisite meeting code check and be not less than threshold value.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the node sent-received message of wireless sensor network, and (a) is sending node, and (b) is receiving node.
Fig. 2 is the schematic diagram of initialized full binary tree and initialized codeword set.
Embodiment
Below in conjunction with accompanying drawing, the present invention will be further described.
See figures.1.and.2, a kind of based on transmission energy efficiency source encoding methods high in the wireless sensor network of OOK modulation, utilize " avriable length codes set choosing method " to construct and reach predetermined code check and there is the codeword set that very harmonic(-)mean code is heavy, and utilize " the encoding and decoding method based on code table inquiry " to carry out Code And Decode, wherein, described " avriable length codes set choosing method " comprises the following steps:
(1.1) for length be the bit string encoded question of m bit, constructing a degree of depth is the full binary tree of m, and the left branch of its each node is designated as 0, and right branch is designated as 1.Binary tree represents a code word from root node to the path sequence of each leaf node.
(1.2) to each node n
i, calculate its weight tolerance w
iwith number of plies tolerance L
i, wherein weight tolerance w
ifor from root node to node n
ipath sequence in 1 number, and the number of plies tolerance L
ifor from root node to node n
ithe length of path sequence.Calculate the summation L of all leaf node numbers of plies tolerance
t.
(1.3) repeatedly following cutting and extended operation are carried out to the leaf node in binary tree, until L
ttill reaching critical value.
(1.3.1) the candidate collection N of the leaf node treating cutting is determined
d: first initialization N
d=φ, then in all leaf nodes with the identical number of plies, selects the leaf node with maximum weight and joins N
din.Determine the candidate collection Ne of leaf node to be expanded: first initialization Ne=φ, then in all leaf nodes with the identical number of plies, select the leaf node with minimum weight and join in Ne.
(1.3.2) to every a pair leaf node (n
i, n
j), wherein n
i∈ N
dand n
j∈ Ne, according to calculating its revenue measure value G with minor function
i,j,
If the right revenue measure value of all above leaf nodes is all zero, then terminate algorithm; Otherwise, pick out have maximum return tolerance leaf node to (n
i, n
j), there is if multipair identical maximum return metric, then select arbitrarily wherein a pair, if then calculate the number of plies summation of leaf node of carrying out cutting and expansion and will cause according to following formula:
If L '
t>m2
m/ R
ththen terminate algorithm.
(1.3.3) leaf node n is cropped
iif, n
ithe brotgher of node then crop together without child node.Then by leaf node n
jexpand two new cotyledon child node n
kand n
l.Calculate weight tolerance and the number of plies tolerance of these two new leaf nodes respectively.The summation L of the number of plies of all leaf nodes after binary tree is upgraded
tbe updated to L
t=L '
t.
(1.3.4) operation of above (1.3.1)-(1.3.4) is repeated, until algorithm terminates.
In addition, utilization recited above " the encoding and decoding method based on code table inquiry " is carried out Code And Decode and is comprised the following steps:
(2.1), code table structure: be first by 2
mindividual different m bit long bit string and selected 2
mindividual code word carries out one_to_one corresponding, is stored as a code table;
(2.2), code table stores: be kept at by code table in sending node and receiving node;
(2.3), coding-decoding operation: transmitting terminal is searched by code table and finds out code word corresponding to bit string to be sent, and receiving terminal searches the bit string corresponding to code word found out and receive by code table.
We illustrate specific embodiment of the invention scheme for any two adjacent nodes in wireless sensor network, and one of them node is sending node, and another node is receiving node, as shown in Figure 1.
First, utilizing above-mentioned coding method, by repeatedly carrying out cutting and extended operation to the leaf node of the initial full binary tree shown in Fig. 2, constructing 2
mindividual Length discrepancy code word, and by they and 2
mthe individual long bit string one_to_one corresponding for m bit is also stored as a code table.Wherein, the value of parameter m depends on the memory size of sensor node, and internal memory is larger, and the m maximum occurrences allowed is also larger.This code table is stored in each sensor node.
When sending node will send signal-crosstalk ratio spy stream, have in information bit to be sent all, continuous m the bit arrived a earliest i.e. bit string is taken out, then in the code table stored, finds out code word corresponding to this bit string.By this code word by sending after the modulation of OOK modulation system.Wherein, " 1 " bit modulation becomes a specific voltage sign, such as a pulse, and " 0 " bit does not then send any voltage sign.
When receiving node receives information, demodulation is carried out by the voltage signal received by antenna, for each code word in the bit stream after demodulation, then by finding out bit string corresponding to this code word in the code table stored, and then give other sub-protocols this bit string and do subsequent treatment.