Sie sind auf Seite 1von 32

Data Compression in Sensor Networks

- Hina Shah

Why Data Compression in Sensor Networks?


Data Transmission utilizes maximum power (almost 80%) of the sensor node. The power consumed for sending a single bit of data is equivalent to power used to execute some 100-1000 instructions, depending on the type of transmission media. Hence, the power consumed by compressing a bits data string into b bits data string, where a>b has to be smaller than the power consumed by transmitting a-b bit of data string.

It is also crucial to select a data compression scheme which requires less memory access during the execution. All in all, efficient energy consumption for long life of the sensor node is what is aimed for data compression.

Coding by Ordering

[1]

Idea here is to code the data of some packets according to the ordering of other packets. It is assumed that in a network there are Sink nodes and there are certain data nodes. This scheme is a part of Data Funneling Routing algorithm, which is an algorithm for data aggregation.

Coding by Ordering (Contd..)

Coding by Ordering (Contd)


The interest packets are sent toward the region using directional flooding. Each node that receives the interest packet checks if it is in the target region. If it is not, it computes its cost for communicating back to the controller, updates the cost field within the interest packet, and sends it on toward the specified region. This is the directional flooding phase

Coding by Ordering (Contd)


When a node that is in the target region receives the interest packet from a neighbor node that lies outside the target region, the directional flooding phase concludes. The node realizes that it is on the border of the region and designates itself to be a border node as shown in Figure 1. Each border node computes its cost for communicating with the controller in the same manner as was done by the nodes outside the region during the directional flooding phase. It then floods the entire region with a modified version of the interest packet. The .cost to reach the controller field is reset to zero and becomes the .cost to reach the border node field..

Coding by Ordering (Contd)


Within the region, each node only keeps track of its cost for communicating with the border node, not its cost for communicating with the controller. Intuitively, it is as if the border node becomes the controller of the specified region. It is at one of the border nodes that all the readings from within the region will be collated into a single packet. The border node adds two new fields to the packet, the cost for reaching the border node and the number of hops to the border node. It then floods the region with this modified packet. A schedule of border nodes where data is to be aggregated is computed. When a sensor has a data sample it needs to send back to the controller, it uses the schedule to figure out the border node to use in the current round of reporting. It then waits for a time inversely proportional to the number of hops from the border node before sending out the packet.

Coding by Ordering (Contd)


Along the way to the border node, the data packets are joined together until they reach the border node. The border node collects all the packets and then sends one packet with all the data back to the controller There isnt a single cluster-head, whose failure can be devastating to the functionality of the network. Instead, the border nodes take turns acting as the cluster-head spreading out the responsibility and the load (i.e. energy consumption) among them. Also, the controller can redefine the regions into which its area of interest is divided thereby forcing the nodes to divide themselves into new clusters and elect new sets of border nodes. The controller can redefine the regions based on the data it receives from the nodes and/or the energy remaining in the nodes so as to ensure that nodes that have the greatest energy reserves act as border nodes.

Coding by Ordering (Contd)


The main idea behind Coding by Ordering is that when transmitting many unique pieces of data, and the order in which the data is sent is not important to the application (i.e. the transmitter may choose the order in which to send those pieces of data), then the choice of the order in which those pieces of data are sent can be used to convey additional information to the receiver. In fact it is possible to avoid explicitly transmitting some of those pieces of data, and use the ordering of the other information to convey the information contained in the pieces of data that were not sent

Coding by Ordering (Contd)


For example, consider the case when there are four nodes with ID.s 1,2,3, and 4 in the region. Each of the four sensors generates an independent reading, which is a value from the set {0,...,5}. The border node can choose to suppress the packet from node 4 and, instead, choose the appropriate ordering among the 3!= 6 possible orderings of the packets from nodes 1, 2, and 3 to indicate the value generated by node 4. TABLE I shows a possible mapping from the permutations of three objects to the integers in the range {0,...,5}. Note that in this case the border node need not encode the ID of the suppressed node because that information can be derived from the fact that there are only four nodes and the packets of three of them were explicitly given in the super-packet.

Coding by Ordering (Contd)

Let n be the number of packets present at the encoder, k be the range of possible values generated by each sensor (e.g. if each sensor generates a 4-bit value, then k = 24 ), and d be the range of node ID.s of the sensor nodes. Given n , k and d , what is the largest number of packets, l , that can be suppressed?

Coding by Ordering (Contd)


One strategy is to have the encoder (located at the border node) throw away any l packets and appropriately order the remaining n l packets to indicate what values were contained in the suppressed packets. A total of (n l)! Values can be indexed by ordering n l distinct objects. Each of the suppressed packets contains a payload that can take on any of the k possible values and an ID, which can be any value from the set of d valid ID.s except for the ones that belong to the packets included in the super packet. The values contained within the suppressed packets can be regarded as symbols from a (d n + l)xk -ary alphabet, giving (d n + l)l x kl possible values for the suppressed packets. In order for it to be possible to suppress l out of n packets in this manner, the following relationship must be satisfied:

Coding by Ordering (Contd)

The compression rates of the two achievable schemes as well the upper bound for n 100 , when d = 27 and k = 24: When n = 30 , using the low-complexity scheme allows the encoder to suppress l = 6 packets, a 20% savings in energy spent on transmitting sensor data. At n = 30 number of packets that can be suppressed is 10. As n grows, the savings also increase. When n = 100 , the low-complexity scheme provides 32% savings, the higher-complexity scheme guarantees 44% savings, while the bound is 53%.

Pipe-lined In Network Compression[2]


In many applications such as habitat monitoring, full data collection is desirable in order to perform off-line mining of the collected data or to support complex queries on it. An example is of mining the time evolving temperature maps for moving patterns of an object. In case there exists a catalog describing positions of each sensor node, retrieving full data from the network including the node identifiers and timestamps, will enable us to perform such operations. However, using plain data collection will require too much energy consumption, and therefore decrease system lifetime. The approach to this problem here is to perform in-network compression so that full data collection is possible while reducing the energy consumption.

Pipe-lined In Network Compression


A data item produced is a tuple of three values; an n-bit sensor measurement, a node identifier, and a timestamp. It is denoted by a tuple shown as <measurement,nodeid,timestamp>. A compressed group of items is also a tuple but with four attributes: The first attribute is the shared prefix which is the most significant bits that are common to all sensor measurements in that group. The shared prefix length (spl) is a system parameter that specifies how much commonality in the sensor measurements is required when forming a group. The secondattribute is a list of suffixes where each suffix is a data items nspl least significant bits. The third and fourth attributes are lists of node identifiers and timestamps respectively.

Pipe-lined In Network Compression


The order of the node identifiers and timestamps match with the order of the sensor measurements. A GD is denoted by a tuple shown as <shared prefix,suffix list,nodeid list,timestamp list> Any data item produced is converted to a GD by itself before being buffered. During a GDs lifetime in a nodes buffer, it is merged with newly produced GDs by the node itself or recently received GDs from the child nodes, if possible. Two GDs can be merged only if they have the same shared prefix values.

Pipe-lined In Network Compression


The merge operation is done in a straightforward manner preserving the order in the four attributes of the groups. A similar compression scheme can also be implemented on the timestamp and possibly Node IDs list further increasing the energy savings.

Pipe-lined In Network Compression

Pipe-lined In Network Compression


Some Issues:
Prefix length Buffer size: If we are combining a large amount of data packets, then a large data buffer is required to temporarily store those packets. Since sensor node has only a limited size of memory space, enough buffer size will not be available.

Low-Complexity Video Compression[3]


Sensor nodes are not equipped with high computation power for estimation of motion among the frames of the video for standard compression techniques. This method is based on block changing detection algorithm and JPEG data compression. This algorithm is specifically designed for the wireless video surveillance system.

Low-Complexity Video Compression

Here, each an attempt has been made to remove the correlation of the video sequence collected by each sensor in the most effective and cheapest way possible. It is based on a block scheme. The Previous frame is stored In a buffer. Scene motion is not estimated here between the stored and the current frame. However a change detection is employed, which builds a a map of active blocks within one frame and only these blocks are encoded and sent.

Low-Complexity Video Compression


In this method, each video frame is divided into small blocks so that each block contains 8 x 8 (64) pixels. To reduce the computational complexity, only the subset of blocks (all white blocks in this case) in each frame is considered. Furthermore, in each block the subset of pixels (number assigned pixels) is examined their changes The number assigned to pixels indicates importance of pixels (1 = most important and 3 = least important). For example the boundary points are given the highest importance, since this is where the macroscopic movement can be detected.

Low-Complexity Video Compression


The algorithm scans the pixels in the block computing the difference between each pixel and the one in the same position in the reference frame. Then it attempts to classify the difference as noise, shadow or illumination changes, or object motion. Accordingly two thresholds are defined as N and M and used. Also a sensitivity parameter S is defined as the maximum allowed number of active pixels in an inactive block.

Low-Complexity Video Compression


Reset all Counters First Pixel Set (i.e. pixels with marked as 1)
assigned pixels are compared with the referenced frames pixels If the difference of two pixels (Di) is greater than a threshold value (M), a counter (P), which is set to zero initially, is incremented by one The maximum difference between two pixels is stored as U Then, if P becomes greater than a sensitivity parameter (S), the block is marked as an active block, and the scanning procedure moves to a next block. Once all pixels in a block are scanned, compute the average A of all non zero differences. If A<N and U<M then the block is marked as noisy and processing of the next block is done, Else proceed with Second pixel set.

Low-Complexity Video Compression


Second Pixel Set:
assigned pixels are compared with the referenced frames pixels If the difference of two pixels (Di) is greater than a threshold value (M), a counter (P), which is set to zero initially, is incremented by one The maximum difference between two pixels is stored as U Then, if P becomes greater than a sensitivity parameter (S), the block is marked as an active block, and the scanning procedure moves to a next block. Once all pixels in a block are scanned, compute the average A of all non zero differences. If A<N and U<M then the block is marked as noisy and processing of the next block is done. If A>N and U>M, then classify the block as motion, mark it, stop and proceed with next block. Else proceed with Third pixel set.

Low-Complexity Video Compression


Third Pixel Set:
assigned pixels are compared with the referenced frames pixels If the difference of two pixels (Di) is greater than a threshold value (M), a counter (P), which is set to zero initially, is incremented by one The maximum difference between two pixels is stored as U Then, if P becomes greater than a sensitivity parameter (S), the block is marked as an active block, and the scanning procedure moves to a next block. Once all pixels in a block are scanned, compute the average A of all non zero differences. If A<N and U<M then the block is marked as noisy and processing of the next block is done. If A>N and U>M, then classify the block as motion, mark it, stop and proceed with next block. If A<N, U>M and P>S mark the block and stop. If A>N and U<M classify the block content as shadow or illumination.

Low-Complexity Video Compression


After checking a set of white blocks in one frame, non-scanned blocks are checked. If a non-scanned block is adjacent to at least two active blocks, the non-scanned block is marked as active. Finally, all marked blocks are encoded by JPEG and transmitted in wireless sensor network. Also, the active blocks are fed to the Reference Frame Buffer to up-data the reference frame. The experimental results indicate that the quality of image processed by this algorithm is quite similar to the image processed by MPEG-2 while the proposed algorithm achieves the certain amount of energy saving.

Low-Complexity Video Compression


N value is related to the standard deviation of the camera acquisition noise
Assumed to be Gaussian with 0 mean Is taken to be twice as the standard deviation of D values in First Pixel Set which have not been marked Allowed to have a maximum value of 12.

M value takes values from 8 to 16


8 is taken from the fact that human visual system can hardly detect luminance variation less than 8 values. So these values actually give the small variations in luminance. The upper value depicts the luminance difference too apparent to be classified as motion. Computation of the parameter is based on coarse estimate of image histogram in the even indexed frames.

Low-Complexity Video Compression


S takes the value from 1-3.
In case of low background noise, the change detection process can be sped up by relying more on the number P of pixels for which D exceeds the threshold M, by using a low value of S. In particular:
if N is in [0,4] then S=1 If N is in [5,8] then S=2 If N is in [9, 12] then S=3

References
[1].D. Petrovic, R.C. Shahm K. Ramchandran and J. Rabaey, Data Funneling: Routing with Aggregation and Compression for Wireless Sensor Networks, In Proceedings of First IEEE International Workshop on Sensor Network Protocols and Applications, May 2003 [2]. T. Arici, B Gedik, Y. Altunbasak and L.Liu, PINCO: A Pipelined In-Network Compression Scheme for Data Collection in Wireless Sensor Networks, In Proceedings of 12th International Conference on Computer Communications and Networks, October 2003

References
[3]. E. Magli, M. Mancin, and L. Merello, LowComplexity Video Compression for Wireless Sensor Networks, In Proceedings of 2003, International Conference on Multimedia and Expo, July 2003 [4]. Naoto Kimura and Shahram Latifi, A Survey on Data Compression in Wireless Sensor Networks, In Proceedings of the International Conference on Information Technology: Coding and Computing, March 2005

Das könnte Ihnen auch gefallen