SN DataCompression

download SN DataCompression

of 32

Transcript of SN DataCompression

  • 7/31/2019 SN DataCompression

    1/32

    Data Compression in

    Sensor Networks

    - Hina Shah

  • 7/31/2019 SN DataCompression

    2/32

    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 executesome 100-1000 instructions, depending on thetype of transmission media.

    Hence, the power consumed by compressing a

    bits data string into b bits data string, wherea>b has to be smaller than the powerconsumed by transmitting a-b bit of data string.

  • 7/31/2019 SN DataCompression

    3/32

    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.

  • 7/31/2019 SN DataCompression

    4/32

    Coding by Ordering[1]

    Idea here is to code the data of somepackets according to the ordering of otherpackets.

    It is assumed that in a network there areSink nodes and there are certain datanodes.

    This scheme is a part of Data FunnelingRouting algorithm, which is an algorithmfor data aggregation.

  • 7/31/2019 SN DataCompression

    5/32

    Coding by Ordering (Contd..)

  • 7/31/2019 SN DataCompression

    6/32

    Coding by Ordering (Contd)

    The interest packets are sent toward the regionusing 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 fieldwithin the interest packet, and sends it on towardthe specified region.

    This is the directional flooding phase

  • 7/31/2019 SN DataCompression

    7/32

    Coding by Ordering (Contd)

    When a node that is in the target region receives theinterest packet from a neighbor node that lies outside thetarget 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 Figure1. Each border node computes its cost for communicatingwith the controller in the same manner as was done bythe nodes outside the region during the directionalflooding phase.

    It then floods the entire region with a modified version ofthe interest packet. The .cost to reach the controller fieldis reset to zero and becomes the .cost to reach the bordernode field..

  • 7/31/2019 SN DataCompression

    8/32

    Coding by Ordering (Contd)

    Within the region, each node only keeps track of its cost forcommunicating with the border node, not its cost forcommunicating with the controller. Intuitively, it is as if the bordernode 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 bordernode. It then floods the region with this modified packet.

    A schedule of border nodes where data is to be aggregated iscomputed.

    When a sensor has a data sample it needs to send back to thecontroller, it uses the schedule to figure out the border node touse in the current round of reporting.

    It then waits for a time inversely proportional to the number ofhops from the border node before sending out the packet.

  • 7/31/2019 SN DataCompression

    9/32

    Coding by Ordering (Contd)

    Along the way to the border node, the data packets are joinedtogether until they reach the border node.

    The border node collects all the packets and then sends onepacket 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, theborder nodes take turns acting as the cluster-head spreadingout the responsibility and the load (i.e. energy consumption)among them.

    Also, the controller can redefine the regions into which its areaof interest is divided thereby forcing the nodes to dividethemselves into new clusters and elect new sets of bordernodes.

    The controller can redefine the regions based on the data itreceives from the nodes and/or the energy remaining in thenodes so as to ensure that nodes that have the greatest energy

    reserves act as border nodes.

  • 7/31/2019 SN DataCompression

    10/32

    Coding by Ordering (Contd)

    The main idea behind Coding by Ordering is that whentransmitting many unique pieces of data, and the order inwhich 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 inwhich those pieces of data are sent can be used toconvey additional information to the receiver.

    In fact it is possible to avoid explicitly transmitting some ofthose pieces of data, and use the ordering of the other

    information to convey the information contained in thepieces of data that were not sent

  • 7/31/2019 SN DataCompression

    11/32

    Coding by Ordering (Contd)

    For example, consider the case when there are fournodes with ID.s 1,2,3, and 4 in the region. Each of the foursensors generates an independent reading, which is avalue from the set {0,...,5}. The border node can chooseto suppress the packet from node 4 and, instead, choose

    the appropriate ordering among the 3!= 6 possibleorderings of the packets from nodes 1, 2, and 3 to indicatethe value generated by node 4.

    TABLE I shows a possible mapping from the permutationsof three objects to the integers in the range {0,...,5}. Note

    that in this case the border node need not encode the IDof the suppressed node because that information can bederived from the fact that there are only four nodes andthe packets of three of them were explicitly given in thesuper-packet.

  • 7/31/2019 SN DataCompression

    12/32

    Coding by Ordering (Contd)

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

  • 7/31/2019 SN DataCompression

    13/32

    Coding by Ordering (Contd)

    One strategy is to have the encoder (located at the bordernode) throw away any lpackets and appropriately orderthe remaining n lpackets to indicate what values werecontained in the suppressed packets.

    A total of (n l)! Values can be indexed by ordering n ldistinct objects. Each of the

    suppressed packets contains a payload that can take onany of the kpossible values and an ID, which can be anyvalue from the set ofdvalid ID.s except for the ones thatbelong to the packets included in the super packet.

    The values contained within the suppressed packets canbe regarded as symbols from a (d n + l)xk-ary alphabet,giving (d n + l)lx kl possible values for the suppressedpackets. In order for it to be possible to suppress lout ofnpackets in this manner, the following relationship must be

    satisfied:

  • 7/31/2019 SN DataCompression

    14/32

    Coding by Ordering (Contd)

    The compression rates of the two achievable schemes as

    well the upper bound forn 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%.

  • 7/31/2019 SN DataCompression

    15/32

    Pipe-lined In Network

    Compression[2]

    In many applications such as habitat monitoring, full datacollection is desirable in order to perform off-line mining ofthe collected data or to support complex queries on it.

    An example is of mining the time evolving temperaturemaps for moving patterns of an object.

    In case there exists a catalog describing positions of eachsensor node, retrieving full data from the network includingthe node identifiers and timestamps, will enable us toperform such operations. However, using plain datacollection 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 whilereducing the energy consumption.

  • 7/31/2019 SN DataCompression

    16/32

    Pipe-lined In Network Compression

    A data item produced is a tuple of three values; an n-bit sensormeasurement, a node identifier, and a timestamp. It is denoted by atuple shown as .

    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. Theshared prefix length (spl) is a system parameter that specifies howmuch commonality in the sensor measurements is required whenforming a group.

    The secondattribute is a list of suffixes where each suffix is a dataitems nspl least significant bits.

    The third and fourth attributes are lists of node identifiers andtimestamps respectively.

  • 7/31/2019 SN DataCompression

    17/32

    Pipe-lined In Network Compression

    The order of the node identifiers and timestampsmatch with the order of the sensormeasurements.

    A GD is denoted by a tuple shown as

    Any data item produced is converted to a GD by

    itself before being buffered. During a GDslifetime in a nodes buffer, it is merged with

    newly produced GDs by the node itself orrecently received GDs from the child nodes, ifpossible. Two GDs can be merged only if theyhave the same shared prefix values.

  • 7/31/2019 SN DataCompression

    18/32

    Pipe-lined In Network Compression

    The merge operation is done in astraightforward manner preserving theorder in the four attributes of the

    groups.

    A similar compression scheme canalso be implemented on the timestamp

    and possibly Node IDs list furtherincreasing the energy savings.

  • 7/31/2019 SN DataCompression

    19/32

    Pipe-lined In Network Compression

  • 7/31/2019 SN DataCompression

    20/32

    Pipe-lined In Network Compression

    Some Issues:

    Prefix length

    Buffer size: If we are combining a largeamount of data packets, then a large databuffer is required to temporarily store thosepackets. Since sensor node has only a limited

    size of memory space, enough buffer size willnot be available.

  • 7/31/2019 SN DataCompression

    21/32

    Low-Complexity Video

    Compression[3]

    Sensor nodes are not equipped with highcomputation power for estimation ofmotion among the frames of the video for

    standard compression techniques. This method is based on block changing

    detection algorithm and JPEG datacompression.

    This algorithm is specifically designed forthe wireless video surveillance system.

  • 7/31/2019 SN DataCompression

    22/32

    Low-Complexity Video

    Compression

    Here, each an attempt has been made to remove the correlation of the videosequence collected by each sensor in the most effective and cheapest waypossible. It is based on a block scheme.

    The Previous frame is stored In a buffer. Scene motion is not estimated herebetween the stored and the current frame. However a change detection isemployed, which builds a a map of active blocks within one frame and onlythese blocks are encoded and sent.

  • 7/31/2019 SN DataCompression

    23/32

    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 theboundary points are given the highest

    importance, since this is where the

    macroscopic movement can be detected.

  • 7/31/2019 SN DataCompression

    24/32

    Low-Complexity Video

    Compression The algorithm scans the pixels in the block

    computing the difference between each pixeland the one in the same position in the referenceframe.

    Then it attempts to classify the difference asnoise, shadow or illumination changes, or objectmotion.

    Accordingly two thresholds are defined as N and

    M and used. Also a sensitivity parameter S is defined as themaximum allowed number of active pixels inan inactive block.

  • 7/31/2019 SN DataCompression

    25/32

    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, isincremented by one

    The maximum difference between two pixels is stored as U

    Then, if P becomes greater than a sensitivity parameter (S), theblock is marked as an active block, and the scanning proceduremoves to a next block.

    Once all pixels in a block are scanned, compute the average Aof all non zero differences.

    If A

  • 7/31/2019 SN DataCompression

    26/32

    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 thresholdvalue (M), a counter (P), which is set to zero initially, isincremented by one

    The maximum difference between two pixels is stored as U

    Then, if P becomes greater than a sensitivity parameter (S), theblock is marked as an active block, and the scanning proceduremoves to a next block.

    Once all pixels in a block are scanned, compute the average A

    of all non zero differences. If AM, thenclassify the block as motion, mark it, stop and proceed with nextblock. Else proceed with Third pixel set.

  • 7/31/2019 SN DataCompression

    27/32

    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 thresholdvalue (M), a counter (P), which is set to zero initially, isincremented by one

    The maximum difference between two pixels is stored as U

    Then, if P becomes greater than a sensitivity parameter (S), theblock is marked as an active block, and the scanning proceduremoves to a next block.

    Once all pixels in a block are scanned, compute the average A

    of all non zero differences. If AM, thenclassify the block as motion, mark it, stop and proceed with nextblock. If AM and P>S mark the block and stop. If A>N

    and U

  • 7/31/2019 SN DataCompression

    28/32

    Low-Complexity Video

    Compression After checking a set of white blocks in one frame,

    non-scanned blocks are checked. If a non-scannedblock is adjacent to at least two active blocks, thenon-scanned block is marked as active.

    Finally, all marked blocks are encoded by JPEG andtransmitted in wireless sensor network. Also, theactive blocks are fed to the Reference Frame Bufferto up-data the reference frame.

    The experimental results indicate that the quality ofimage processed by this algorithm is quite similar tothe image processed by MPEG-2 while the proposedalgorithm achieves the certain amount of energysaving.

  • 7/31/2019 SN DataCompression

    29/32

    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 FirstPixel 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 apparentto be classified as motion.

    Computation of the parameter is based on coarse estimate ofimage histogram in the even indexed frames.

  • 7/31/2019 SN DataCompression

    30/32

    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 Dexceeds the threshold M, by using a low valueof 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

  • 7/31/2019 SN DataCompression

    31/32

    References

    [1].D. Petrovic, R.C. Shahm K. Ramchandranand J. Rabaey, Data Funneling: Routing with

    Aggregation and Compression for WirelessSensor Networks, In Proceedings of First IEEE

    International Workshop on Sensor NetworkProtocols and Applications, May 2003 [2]. T. Arici, B Gedik, Y. Altunbasak and L.Liu,

    PINCO: A Pipelined In-Network CompressionScheme for Data Collection in Wireless SensorNetworks, In Proceedings of 12th InternationalConference on Computer Communications andNetworks, October 2003

  • 7/31/2019 SN DataCompression

    32/32

    References

    [3]. E. Magli, M. Mancin, and L. Merello, Low-Complexity Video Compression for WirelessSensor Networks, In Proceedings of 2003,

    International Conference on Multimedia andExpo, July 2003

    [4]. Naoto Kimura and Shahram Latifi, A Surveyon Data Compression in Wireless Sensor

    Networks, In Proceedings of the InternationalConference on Information Technology: Codingand Computing, March 2005