- Open Access
- Total Downloads : 340
- Authors : S. Jancy, Dr. C. Jaya Kumar
- Paper ID : IJERTV3IS090159
- Volume & Issue : Volume 03, Issue 09 (September 2014)
- Published (First Online): 13-09-2014
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Sequential Coded Data Compression Techniques for Wireless Sensor Networks
1 S. Jancy, 2 Dr. C. Jaya Kumar
1 Research Scholar, Department of MCA, Sathyabama University, Chennai, India.
2 Professor, Department of CSE, RMK Engineering College, Chennai, India.
Abstract – Usage of sensors in various fields has seen a dramatic increase in the recent past. However, sensors have limited power and energy. Most number of research works concentrate on techniques to improve power and energy of sensors. This paper proposes techniques to improve the energy of sensors based on compression methods. Compression methods are generally used to save time and space. The proposed process involves comparison of two methods namely RLE and Delta encoding. A simpler method is proposed in this paper to achieve efficient data compression. This method involves assigning a sequential number code to each every input character. When the sequential numerical codes are assigned further compression is achieved by adding the numbers if and when the sequential numeric code is double digits. The added double-digit sequential codes are further added and single digit sequential codes are added separately. Once added the numerical codes are placed on a location table to form the original data sequence. The process of adding the sequential numerical codes continuous until the end data are only single digit numeric codes. The final set of numeric codes assigned with equivalent letters as letters take lesser space when compare to integers. This set of letters is the final compressed data. When the data is decompressed the information on location table is decoded on each and every stage to reconstruct the original data.
1. INTRODUCTION
-
Sensors
Sensors are hardware devices which are used to detect and respond to the input from the physical environment like heat, light, motion, pressure, humidity and various other environment factors. The output is a signal which is converted to a readable form. The output is either displayed on a display placed on the sensor or electronically transferred for further processing or reading.
Sensing
Input Output
Energy Energy
Figure 2. Sensing process
Sensor Category
-
Detectors Sensors.
-
Image Sensors.
-
Speed Sensors.
-
Engine Sensors.
-
Gas sensors.
-
Sensory receptors.
-
-
Compression
Compression is a technique which is generally used to shrink data. Compression process saves execution time and memory space. Data compression is primarily used in communication as is aids devices to store or transmit the same amount of data but in less number of bits. Generally compression techniques can be classified in to two. That is lossy compression and lossless compression. Lossy compression is a techniques which is generally applied for image and video files. Whereas, lossless compression is applied for text files.
Input Data(X)
Compress(Y)
Sending (Z)
Receive (-z)
OutputData(-X)
Decompress(-Y)
Figure 2. Basic Compression process
-
Types of data compression
-
File Compression.
-
Temporal Compression.
-
Disk Compression
-
Huffman Compression.
-
Spatial Compression.
-
Wavelet Compression.
-
Lossy and Lossless compression.
-
Pipeline Data compression algorithm
-
Delta Encoding
-
Run length Encoding.
In this paper I have compare proposed work with RLE (Run length encoding) and DE (Delta Encoding)
-
Run length Encoding
In Run length encoding, the data which is repeated is denoted as a single value and the count along with it. For example the given input data is (X1, X2, X3 Xn). Then the given data is linked to pairs of their total individual symbol and its count. That is ((X1, Cn1)(X2,Cn2)(X3,Cn3),(Xn,Cnn)).
X1—>input symbol.
Cn1—>Total number of frequency of X1. Example:
Original Data 111115555533333399999
Can be encoded as:
(1 , 5) , ( 5 , 5 ) , ( 3 , 6 ) , ( 9 , 5 )
RLE Compression can be used in 1.TIFF file format
2. PDF file format
-
Delta Encoding
Delta encoding is a method of transmitting or storing data. In this method complete files are not stored or transmitted but only the differences between sequential data are processed. This is generally knows as data differencing. A delta can be explained in two ways, direct delta encoding and symmetric data encoding. A symmetric data encoding expressed as, (v1, v2) = (v1 \ v2) U (v2 \ v1)where v1 and v2 represent two successive versions. A directed delta, which is called as change, is a chain of change operations when applied to one version v1 yields another version v2.
Proposed Algorithm
Step 1:
Assign sequence code for each and every alphabet for each and every character
1 |
2 |
3 |
4 |
5 |
6 |
a |
b |
c |
d |
e |
f |
7 |
8 |
9 |
10 |
11 |
12 |
g |
h |
I |
j |
k |
l |
13 |
14 |
15 |
16 |
17 |
18 |
m |
n |
o |
p |
q |
r |
19 |
20 |
21 |
22 |
23 |
24 |
s |
t |
u |
v |
w |
x |
25 |
26 |
||||
y |
z |
Example:
Input Data: Procedure
16 18 15 3 5 4 21 18 5
P r o c e d u r e
Step 2:
Assign separate sequence code for every data. 16 18 15 3 5 4 21 18 5
7 9 6 3 5 4 3 9 5
Step 3:Join the data based on double digit number 16 18 15 3 5 4 21 18 5
7 9 6 3 5 4 3 9 5
22 3 5 4 12 5
Step 4:
Join the data in single digit number 16 18 15 3 5 4 21 18 5
7 9 6 3 5 4 3 9 5
22 3 5 4 12 5
22 13 12 5
Step 5:
Repeat this process until getting single digit number. 16 18 15 3 5 4 21 18 5
7 9 6 3 5 4 3 9 5
22 3 5 4 12 5
22 13 12 5
4 4 3 5
Step 6:
Final result to apply the sequence number. 16 18 15 3 5 4 21 18 5
7 9 6 3 5 4 3 9 5
22 3 5 4 12 5
22 13 12 5
4 4 3 5
d d c e
d c e
Compressed data: dce Original data : Procedure
Average of Compressed data is : 75%
Table 1. To generate LOCATION table
Location |
Double digit |
Single digit |
A[0] p |
Yes |
No |
A[1] r |
Yes |
No |
A[2]o |
Yes |
No |
A[3] c |
No |
Yes |
A[4] e |
No |
Yes |
A[5] d |
No |
Yes |
A[6] u |
es |
No |
A[7] r |
Yes |
No |
A[8] e |
No |
Yes |
Table 2. Location table for step 3
Location |
Double Digit |
Single Digit |
A[0] |
Yes |
No |
A[3] |
No |
Yes |
A[6] |
Yes |
No |
A[8] |
No |
Yes |
Table 3. Location table for step 4
Location |
Double Digit |
Single Digit |
A[0] |
Yes |
No |
A[3] |
Yes |
No |
A[6] |
yes |
No |
A[8] |
No |
Yes |
Location |
Double Digit |
Single Digit |
A[0] |
No |
Yes |
A[3] |
No |
Yes |
A[6] |
No |
Yes |
A[8] |
No |
Yes |
Table 4. Location table for step 5
2. Compression Algorithm for SDC
4. Formula for calculating Compression ratio, Compression Time, Energy Usage, Memory Usage.
Compression ratio:
Compression ratio is defined as the ratio between the uncompressed data and compressed data.
Compression ratio = Uncompressed Size.
Compressed Size
Input:
The String to be compressed.
Output:
The compressed code having two components.
-
Double Digit Code.
-
Single Digit Code.
Begin:
1: Initialization
1:1. Sequence Code
-
Double digit Code
-
Single digit Code
-
While (Code has Double digit) Convert Single digit Then
Evaluate and Merge Single and Double Digit code.
Until
All the code converted as single digit.
-
Assign character code.
-
Character code compressed data
Compression Time:
Compression Time is to defined as the total data size divided by the compression speed.
Compression Time= Data Size
Compression Speed
Energy Usage:
Energy Usage is defined as difference between total energy and processing energy.
Energy Usage = Total Energy Processing Energy.
Memory Usage:
Memory usage is defined as difference between total space and processing space.
Memory Usage = Total space – Processing space
3. Decompression Algorithm for SDC:
Input: Compressed Data Output:
Location Table LT Current tableCT Previous table PT Begin:
If (PT==CT)
Assign: Location CT Compare
First Location AND Second Location
Then
Subtract :Second Location [Index] First Location [Index]
Go to
Previous table and
Search missing Index (Compressed value) Otherwise
Go to next previous table Until
(CT==Location Table)
Table 4. Comparison of RLE, DE and SDC
Parameters |
Run Length Encoding |
Delta Encoding |
SDC |
File Size |
10000 bytes |
10000 bytes |
10000 bytes |
Compressed Size |
5713 bytes |
5100 bytes |
4500 bytes |
Compression Ratio |
Depends on the Data 0.57 or |
0.51 |
0.45 |
Compression Time(ms) |
10 |
12 |
9 |
CONCLUSION
This proposed technique focuses on the method to increase the energy efficiency of sensors using sequential numerical code compression method. Two other techniques namely RLE and Delta Encoding have been discussed. In RLE compression techniques the compression ratio is based on the reoccurrence of data Delta Encoding stores and transmit only the differences between sequential data. It does not transfer complete files. This process is generally known as data differencing. When both these techniques are comparing sequential coded is better than RLE and Delta Encoding.
REFERENCES
-
Ming-Bo Lin, Jang-Feng Lee, and Gene Eu Jan A Lossless Data Compression and Decompression Algorithm and Its Hardware Architecture.IEEE transaction on VLSI system.vol.14, No.9
.Sep.2006.
-
Xiaojiang Chen, Dingyi Fang, Xueqing Huang ,Baoying Liu, Xiaoqiong Gong , Wenbo Wang , Alessio Perrone A Lightweight Data Aggregation Protocol in Wireless Sensor Networks for the Protection of Ancient Sites. Journal of Sensor Technology, 2011.
-
Ranganathan Vidhyapriyan Ponnusamy Vanathi Energy Efficient Data Compression in Wireless Sensor Networks. The International Arab Journal of Information Technology, Vol. 6, No. 3, July 2009.
-
S.R.Kodituwakku,U.S.Amarasinghe Comparison of Lossless Data Compression Algorithms for Text Data, Indian Journal of Computer Science and Engineering. Vol: 1 No: 4416-425.
-
M.VidyaSagar, J.S. Rose Victor Modified Run length Encoding Scheme for High Data Compression Rate. Internal Journal of Advanced Research in Computer Engineering & Technology. ISSN: 2278-1323. Dec: 2013