[ieee 2011 international conference on computer networks and information technology (iccnit) -...

4
CoXoH: Low Cost Energy Efficient Data Compression for Wireless Sensor Nodes using Data Encoding Syed Ishtiaq Russian, Ruma Javed, Weed Rehman and F N Khalil Department of Computer ience, University ofPeshaw, Pakistan. {ishtiaquop,humajaved15,falaknazkhalil}®yahoo.com, wahrean®Upesh.edu.pk Aa - The limited resources of Wireless Sensor Networks such as battery power, storage and processing power needs to be utilid very efficiently to prolong network life. WSN operates on battery power which cannot be replaced easily. Since data transmission consumes most amount of ener, therefore data needs to be compressed before transmission. Data compssion wiD reduce the si of data to be processed and transmitted for saving mote's limited resources. This paper proposes a new low cost, lossless, energy efficient algorithm caBed CoXoH (Combined XOR and Human) using number encoding for data compression which guarantees the compression of at-least 50%. However the simulation results show that up-to 98% compression can also be achieved which almost double the battery life. CoXoH is the combination of two operations XOR and Human Algorithm. XOR operation wiD reduce the data to 50% foBed by Huffman compression which wiD further compress the data. The average compression ratio is from 70% to 90%. Kor- CoXoH (Combined XOR and Human), wireless sensor network, data compression. I. INTRODUCTION Wireless Ssor Network (WSN) has gained siifict importce d has become one of the most reseched eas in recent yes. Ssor nodes are usually small, inexpensive devices having limited communic@ion, computation d energy resources [1]. Sensor nodes work in a distributed way d collabor@e together to perform autom@ed tasks requiring sensing capabilities. Since ssor nodes have very limited resources, it needs to be utilized efficiently to prolong the network life. Vious efforts e made to conserve energy like the use of 802.15.4 [2] instead of Bluetooth as a communic@ion technology. is observed th@ communic@ion of d@a between nodes or sinks consumes most ount of energy[3, 4]. us special ce should be ten during d@a trsmission d d@a should only be sent when required. will save not only the b@tery power but also efficiently utilizes the bdwidth d reduces the processing overhead @ each node. According to some studies 80% of energy in WSN is consumed in d@a trsmission [5]. Different solutions e proposed in the liter@ure for energy conserv@ion such as d@a ageg@ion, packet merging, ageion sion d d@a compression. D@a eg@ion d acquisition techniques like TinyDB [6] d TAG [7] process the d@a d forwd a small subset of the total d@a Few techniques fus on sending d@a only when required, which comes the genesis of query based techniques [8]. In such techniques such as directed disi, the focus is on tailoring down the d@a according to plic@ion requirements. Energy conserv@ion is a hot ea of resech d work has been done since long, for example, energy efficient MAC protocol [9], clustering [10], localiz@ion [11], routing [12], d@a mement [13] d plic@ion [14]. D@a compression is also effort to save node's resources. Different techniques e available for d@a compression in the liter@ure [15] but they cnot be directly applicable to WSN due to its limited resources. WSN each node also processes d@a d then it trsmits this d@a to the ne node. Less d@a would mes less processing d less trsmission. Overall less d@a will flow in the n?work saving not only the b@tery power due to trsmission but also processing d storage. is paper oposes a new algorithm for WSN, CoXoH for d@a compression which combines XOR d Hu algorithm. CoXoH is cable of comessing the d@a by @ least 50% in all cases however up-to 98% has so be observed. The algorithm uses XOR oper@ion betwe two halves of the trsmitted d@a, reducing the size by 50%. The compressed d@a is then passed throu Hu compression algorithm which her reduces the total size. is observed th@ average compression of CoXoH is om 70% to 90%. In this pap, a compression technique is proposed to siifictly reduce the d@a d hence improve network life. Rest of the paper is orgized as following; section II d III discusses the rel@ed work d proposed algorithm. In section IV, the proposed algorithm is alysed d comped followed by section V which concludes the per. II. ATED WORK In this secti a brief overview is provided about history of compression techniques available in liter@ure. Petrovic.et.ai [16] iroduced a compression method called coding by ordering. The main focus is on d@a eg@ion. During ageg@ion some of the d@a is dropped but this lost d@a c be פrsevered by dering of the d@a ames. A mapping table is used for assiing inters values to the node's p@te. The main 149

Upload: falak-naz

Post on 09-Apr-2017

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: [IEEE 2011 International Conference on Computer Networks and Information Technology (ICCNIT) - Abbottabad, Pakistan (2011.07.11-2011.07.13)] International Conference on Computer Networks

CoXoH: Low Cost Energy Efficient Data Compression for Wireless Sensor Nodes using

Data Encoding

Syed Ishtiaq Russian, Ruma Javed, Waheed ur Rehman and Falak Naz Khalil

Department of Computer Science, University of Peshawar, Pakistan.

{ishtiaquop,humajaved15,falaknazkhalil}®yahoo.com, wahrehman®Upesh.edu.pk

Abstract - The limited resources of Wireless Sensor

Networks such as battery power, storage and processing power needs to be utilized very efficiently to prolong network life. WSN operates on battery power which cannot be replaced easily. Since data transmission consumes most amount of energy, therefore data needs to be compressed before transmission. Data compression wiD reduce the size of data to be processed and transmitted for saving mote's limited resources. This paper proposes a new low cost, lossless, energy efficient algorithm caBed CoXoH (Combined XOR and HutTman) using number encoding for data compression which guarantees the compression of at-least 50%. However the simulation results show that up-to 98% compression can also be achieved which almost double the battery life. CoXoH is the combination of two operations XOR and HutTman Algorithm. XOR operation wiD reduce the data to 50% foBowed by Huffman compression which wiD further compress the data. The average compression ratio is from 70% to 90%.

Keywords- CoXoH (Combined XOR and HutTman), wireless sensor network, data compression.

I. INTRODUCTION

Wireless Sensor Network (WSN) has gained significant importance and has become one of the most researched areas in recent years. Sensor nodes are usually small, inexpensive devices having limited communication, computation and energy resources [1]. Sensor nodes work in a distributed way and collaborate together to perform automated tasks requiring sensing capabilities. Since sensor nodes have very limited resources, it needs to be utilized efficiently to prolong the network life. Various efforts are made to conserve energy like the use of 802.15.4 [2] instead of Bluetooth as a communication technology. It is observed that communication of data between nodes or sinks consumes most amount of energy[3 , 4]. Thus special care should be taken during data transmission and data should only be sent when required. It will save not only the battery power but also efficiently utilizes the bandwidth and reduces the processing overhead at each node.

According to some studies 80% of energy in WSN is consumed in data transmission [5]. Different solutions are proposed in the literature for energy conservation such as data aggregation, packet merging, aggregation fusion and data compression. Data aggregation and acquisition techniques like TinyDB [6] and TAG [7] process the data

and forward a small subset of the total data Few techniques focus on sending data only when required, which becomes the genesis of query based techniques [8]. In such techniques such as directed diffusion, the focus is on tailoring down the data according to application requirements. Energy conservation is a hot area of research and work has been done since long, for example, energy efficient MAC protocol [9], clustering [10], localization [11], routing [12], data management [13] and an application [14].

Data compression is also an effort to save node's resources. Different techniques are available for data compression in the literature [15] but they cannot be directly applicable to WSN due to its limited resources. In WSN each node also processes data and then it transmits this data to the next node. Less data would means less processing and less transmission. Overall less data will flow in the network saving not only the battery power due to transmission but also processing and storage. This paper proposes a new algorithm for WSN, CoXoH for data compression which combines XOR and Huffman algorithm. CoXoH is capable of compressing the data by at least 50% in all cases however up-to 98% has also been observed. The algorithm uses XOR operation between two halves of the transmitted data, reducing the size by 50%. The compressed data is then passed through Huffman compression algorithm which further reduces the total size. It is observed that average compression of CoXoH is from 70% to 90%.

In this paper, a compression technique is proposed to significantly reduce the data and hence improve network life. Rest of the paper is organized as following; section II and III discusses the related work and proposed algorithm. In section IV, the proposed algorithm is analysed and compared followed by section V which concludes the paper.

II. RELATED WORK

In this section a brief overview is provided about history of compression techniques available in literature. Petrovic.et.ai in [16] introduced a compression method called coding by ordering. The main focus is on data aggregation. During aggregation some of the data is dropped but this lost data can be persevered by ordering of the data frames. A mapping table is used for assigning integers values to the node's pattern. The main

149

Page 2: [IEEE 2011 International Conference on Computer Networks and Information Technology (ICCNIT) - Abbottabad, Pakistan (2011.07.11-2011.07.13)] International Conference on Computer Networks

disadvantage is that, with increased number of nodes, size of the table increases exponentially and hence cannot be accommodated in a limited memory of a sensor node.

In [17], Aric. et. al introduces a pi pelined in-network compression scheme. The idea is to temporarily store data received from multiple sensors. All the data is packed into single frame in such a way that similar prefixes are added only once. In this way data received from multiple sensors have common prefixes and can be combined together to achieve data compression. The degree of compression depends upon the order of similarities. This technique suffers from memory problems because in order to store data temporarily large buffer size is required.

Compression using hashes can be applied to wireless sensor nodes to compress data before transmission [18]. Dorward.et.al in [19] uses a per-packet hash tables to compress network packets. [3] Use Huffinan based algorithm which has been found to compress data up-to 67% on experimental data The compression technique takes advantage of the correlation that exists between consecutive samples taken by the sensor nodes.

Andrew.et.al in [20] evaluates different compression techniques for WSN. The evaluation is based on both lossy and lossless techniques. A hybrid technique is also evolved in the study which provides a fixed compression ratio of 6:5:1 regardless of the signal properties. The paper also concludes that lossless compression technique is best for data sets having significant correlation while lossy compression is better for the data that fluctuate rapidly.

A comprehensive survey is done in [21]. Tossaporn.et.al has considered many practical data compression algorithms and analysed them. It is concluded that there is no data compression techniques that is suitable for all WSNs. Secondly, not all techniques are practically implementable in the real world WSNs. Third, a little work is done on compression techniques that are suitable for all data types. The performance of such techniques is not good enough.

Zhou.et.al in [2 2] proposes two improved lossless LZW compression algorithms based on dictionary lookup. It is shown that these algorithms provide 30% to 50% more compression than LZW. In addition, the dictionary size and energy consumption is also reduced significantly.

All the existing techniques in general presented the best possible techniques to reduce the data set. Some of them suffer from memory constraints of the sensor nodes and some techniques do not provide good compression ratio. The compression algorithm, CoXoH, proposed in this paper tries to addresses these stated problems by limiting the size of the mapping table used along with significant improved compression ratio.

III. CoXoH ALGORITHM

The proposed algorithm CoXoH considers the following scenario;

- A special type of table is considered called lookup table.

- The size of lookup table is 56bits. - The transmitted data only consist of temperature,

humidity and pressure readings. - Data will be compressed on the nodes and

decompressed on the sink or base station. - The primary focus of algorithm is compression and

decompression is left as a future work.

Left hal.f=code [input [ill In left variable the coded value will be inserted according to the input. Right half=code [input [i+I]] In Right halfvariable the coded value of the next input value is stored. Shift left half by 4 bits to the left. Give left shift to the left hal/variable by 4 bits. Right half= left half Bitwise OR right half. Now apply bitwise OR operation to left halfand right halfvariable and store the result again in right half.

Fig. 1 Pseudocode of XOR

The pseudocode of CoXoH is shown in Fig-I. The pseudocode gives an overview of the different operations involved in CoXoH. The algorithm is mainly divided into two portions.

The first portion involves XOR operation which results in reducing the size of input string to half. The second portion passes compressed data to Huffman algorithm which further reduces the size. The complete algorithm is shown in Fig 2. The input string to be compressed is a string representation of numerical quantity. Each digit/symbol in string is coded using 8-bits ASCII code.

The CoXoH algorithm uses two parallel arrays. First array contains the 8bit ASCII codes of character used for representing numeric quantities along with separator symbol, decimal fraction, positive and negative signs. The second array contains the binary equivalent codes of the ASCII characters contained in the first array. There is one-to-one correspondence between these two arrays.

In step I of the CoXoH compression algorithm shown in Fig-2 computes length of input text string followed by computing the length of output string. It is done by dividing the length of input string by 2 in step O. Therefore length of output string is always half of the input string.

The algorithm then iterates over each alphabet in the input string. In step 5 and 6 the algorithm reads two consecutive characters from input string using index variable i.

The First character is stored in variable left-half and the second is stored in right-half variables. The algorithm then shifts the 8-bit value stored in left-half variable by 4 bits to left. In step 8, the algorithm sets right-half variable to the value obtained by bitwise OR of left-half and right­half values.

150

Page 3: [IEEE 2011 International Conference on Computer Networks and Information Technology (ICCNIT) - Abbottabad, Pakistan (2011.07.11-2011.07.13)] International Conference on Computer Networks

BEGIN

O. SET halflength = input. Length/2 1. CREATE output of size halflength

2. SET i= 0, j=O

3. WHILE i <= input.length() 4. BEGIN

5. SET lefthalf = code[input[i]]

6. SET righthalf= code [input [i+1]]

7. SHIFT lefthalf by 4 bits to the left

8. SET righthalf =

lefthalf BitwiseOR righthalf 9. SET i = i + 2

10. SET ouput[j] = righthalf 11 . SET j = j + 1

10. END

11. output=HuffComp (output, halflength, hcodes)

12. output += hcodes; END.

Fig. 2 CoXoH algorithm

The ORed result is stored in the output string location indexed by variable j, and output string index j is advanced by 1. In step 9 the input index wriable i is advanced by 2 so that the next 2 adjacent character would be processed in next iteration of the while loop. After loop termination, the algorithm produces output that is always half the length of input string length. This achieves a fixed 50% compression of the input string in all cases. In step 11, the numerically encoded and compressed string is passed to Huffinan algorithm which compresses the data by building prefix tree and then encodes data using prefix codes. The compression ratio of Huffman generated encoding wries from 0% to 100% and is based on the type and redundant contents in data The average compression achieved from the proposed algorithm CoXoH is from 70% and 90%.

IV. PERFORMANCE EVALUATION

In this section the proposed compression algorithm CoXoH is analysed and various result are calculated on the basis of sample data The formula used to evaluate the compression ratio is;

Ratio = 100 x (1 - compressed-size 1 initial-size)

When the sample values are passed through the proposed algorithm CoXoH in different volumes, it is compressed according to different compression ratio. The difference in ratio is mainly because of the redundancy pattern in samples. The probability of readings taken consecutively has greater chances of redundancy.

In order to evaluate the behaviour of CoXoH algorithm, data sets with different patterns of variation are considered. Some of the values are considered from [23] which give a compression ratio of 860/0. When the algorithm is provided with all distinct values, considering the worst case scenario, compression ratio achieved is 890/0. The best case is also considered in which similar set of data is provided, resulting in a compression ratio of 980/0.

Table 1 shows the compression ratio in different cases based on multiple samples having different redundancy patterns. In serial number 4 of Table 1, sample data is taken from [23] while serial 5 and 6 are the best case and

151

worst case scenarios, respectively. In best case all the data provided is same while in worst case, the data have no redundant patterns. It is important to note that the term similar or distinct sample data is used to identify values in decimal form and not in binary. It is possible that distinct data in decimal form may have redundant pattern when converted into binary form. That is why the worst case scenario also achieve compression ratio of 89%.

S.No.

1

2

3

4

5

6

TABLE I SIMULATION RESULTS

Uncompressed Compressed rbits) !bits)

560 126

832 190

2024 474

892 84

1816 39

152 17

Compression %

78%

77%

76%

91%

98%

89"10

Compressed data needs to be translated in terms of power savings. Table 1 shows a significant compression ratio resulting in reduced size. However to show the amount of battery conservation [18] is considered to answer this question. The energy consumed in transmitting lKB of data at a distance of 100 meters is approximately 3 joules. Therefore, per bit cost of transmission equal to:

ESBT = 3/1024 = 0.0029296875

ESBT = Energy on Single Byte Transmission

Uncompressed (bits)

560 832 2024

TABLE II ENERGY CONSUMPTION

Compressed Compress% Un-(bits) compressed

Energy 126 78% 1.641 190 77% 2.438 474 76% 5.93

Compressed Ener&Y

0.369 0.557 1.389

The table above shows a major power saving. It is worth mentioning that power saving is not the only benefit of data compression. Efficient bandwidth utilization and reduced processing are also the advantages of compressed data Table 2 shows that the proposed algorithm can save almost 100% power and processing time.

V. CONCLUSION

Wireless sensor nodes have very limited resources. To efficiently utilize these resources, data volumes should be reduced. The most important resource of a sensor node is battery power which is usually irreplaceable. This paper proposes a new low cost, energy efficient data compression algorithm called CoXoH which combines XOR and Huffman algorithm. It will have 50% compression in all cases due to the XOR operation. The data is then further compressed using Huffman compression technique. Though compression ratio is not fixed and is mainly dependent upon the similarity

Page 4: [IEEE 2011 International Conference on Computer Networks and Information Technology (ICCNIT) - Abbottabad, Pakistan (2011.07.11-2011.07.13)] International Conference on Computer Networks

patterns. However it is observed that compression up-to 98% is also achieved which will almost double the network life. It is concluded that data compression will not only save battery power but also reduces delays in data transmission and utilize the bandwidth efficiently.

In future CoXoH algorithm will be extended to real time multimedia sensor networks. Further work is also needed for decryption algorithm on sink or base station.

[1]

[2]

[3]

[4]

[5]

[6)

[7]

[8)

[9]

[10)

REFERENCES

X Wang, et al., "An Energy-Efficiency Multicast Routing Algoritlun in Wireless Sensor Networks " Proc. Computing, Communication, Control, and Management, 2008. CCCM '08. ISECS International Colloquium on 2008, pp. 572-576. Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rilte Wireless Personal Area Networks (LR-WPANs), L s.! L Technology. F.V. Marcelloni, M.;, "A Simple Algoritlun for Data Compression in Wireless Sensor Networks," Communications Letters, IEEE, vol. 12, no. 6, 2008, pp. 411-413; DOl 10.1109ILCOMM.2008.080300 N.K.a.S. Latifi, "A survey algorithm for data compression in wireless sensor networks," Proc. International Conference on Information Technology:Coding and Computing (ITCC 2005), 2005, pp. 8-13. G.H-C. Le and N. Zerhouni, "A new contention access method for collision avoidance in wireless sensor networks," Book A new contention access method for collision avoidance in wireless sensor networks, Series A new contention access method for collision avoidance in wireless sensor networks, ed., Editor ed. "eds., 2007, pp. M.j.F. Samuel RMadden, Joseph M.Hellerstein and Wei Hong., ""Tinydb:An Acquistitional query processing system for sensor networks" "ACM trans. database syst" vol. 30,2005. M.j.F. S�uel RMadden, Joseph M.Hellerstein and Wei Hong., "TAG: A Tiny Aggregation Service for Adhoc Sensor network," ACM SIGOPS Operating Systems Review - OSDI '02: Proceedings of the 5th symposium on Operating systems design and implementation, vol. 36, 2002, pp. 131-146; DOl 10.1145/844128.844142 J.-Z. Sun, "Qos A ware Query Processing Algoritlun for wireless Networks," Journal of computers, vol. 3, no. 11,2008, pp. 32-41. Miller, "A MAC Protocol to Reduce Sensor Network Energy Consumption Using a Wakeup Radio," IEEE Transactions on Mobile Computing, vol. 4, no. 3,2005, pp. 228-242. Y.H Fukushima, H; Arakawa, S.; Murata, M.;, "Distributed clustering method for large-scaled wavelength routed networks," Book Distributed clustering method for large-scaled wavelength routed networks, Series Distributed clustering method for large­scaled wavelength routed networks, ed., Editor ed.l\eds., 2005, pp. 414-420.

152

[11]

[12)

[13)

[14)

[15]

[16)

[17]

[18] [19)

[20)

[21)

[22)

[23)

L.HaD. Evans, "Localization for Mobile Sensor Networks," Book Localization for Mobile Sensor Networks, Series Localization for Mobile Sensor Networks, ed., Editor ed.l\eds., 2004, pp. J.N.K. AI-Karaki, A.E.;, "Routing techniques in wireless sensor networks: a survey," Wireless Communications, IEEE, vol. 11, no. 6, 2004, pp. 6 - 28 DOl 10. 1109/MWC.2004. 1368893. RR Alan Demers johannes Gehrke, Niki Trigoni and Y ong Yao, "Energy-efficient Data Management for Sensor Networks," Proc. 2nd IEEE Upstate New York Workshop on Sensor Networks, 2003. Y.C. Zon, K.;, "Energy-Aware target localization in Wireless Sensor Network," Book Energy-Aware target localization in Wireless Sensor Network, Series Energy-Aware target localization in Wireless Sensor Network, ed., Editor ed.l\eds., 2003, pp. 60-67. N.A. Touba, "Survey of Test Vector Compression Techniques," IEEE Design and Test of Computers, vol. 23, no. 4, 2006, pp. 294-303. D.S. Petrovic, RC.; Ramchandran, K.; Rabaey, J.;, "Data funneling: routing with aggregation and compression for wireless sensor networks," Book Datafonneling: routing with aggregation and compression for wireless sensor networks, Series Data funneling: routing with aggregation and compression for wireless sensor networks, ed., Editor ed.l\eds., 2003, pp. 156-162. T.G. Arici, B.; Altunbask, Y.; Lin, L.;, "PINCO: A pipelined in network compression scheme for data collection in wireless sensor network," Book PINCO: A pipelined in network compression scheme for data collection in wireless sew:or network, Series PINCO: A pipe lined in network compressIOn scheme for data collection in wireless sensor network, ed., Editor ed."eds., 2003, pp. D. William K .Hollis, W A, Compression Using Hashes, 2009. Dorward et. at., Method and appratus for data compression of network packets employing per-packet hash tables, 2001. RN. Andrew Van Der Byl, Richardt H Wilkinson, "An Evaluation of Compression Techniques for Wireless Sensor Networks " Book An Evaluation of Compression Techniques for Wireless Sensor Networks, Series An Evaluation of Compression Techniques for Wireless Sensor Networks, ed., Editor ed."eds., 2009, pp. K.K. Tossaporn Srisooksai, Poonlap Larnsrichan, Kiyomichi Araki, "Practical Data Compression in Wireless Sensor Networks: A Survey," Journal of Networks and Computer Applications, 2011. FX-p. Zhou Yan-Li, Liu Shao-qiang, Xiong Zhe-yuan, "Improved LZW Algorithm of Lossless Data Compression for WSN," Book Improved LZW Algorithm of Lossles� Data Compression for WSN, Series Improved LZW Algontlun of Lossless Data Compression for WSN, ed., Editor ed."eds., 2010, pp. 523-527. http://www.wunderground.comlcgi­binifindweather/hdfForecast?query=pesbawar