Content uploaded by Athira Gopinath
Author content
All content in this area was uploaded by Athira Gopinath on Jun 12, 2020
Content may be subject to copyright.
Comparison of Lossless Data Compression
Techniques in Low-Cost Low-Power (LCLP) IoT
Systems
Aravind Hanumanthaiah, Athira Gopinath,Chandni Arun, Balaji Hariharan,Ravisankar Murugan
Amrita Center for Wireless Networks & Applications (AmritaWNA)
Amrita School of Engineering,Amritapuri, Amrita Vishwa Vidyapeetham,India
aravindh@am.amrita.edu,athirag@am.amrita.edu,Chandniarun@am.amrita.edu,balajih@am.amrita.edu,ravisankar@am.amrita.edu
Abstract—With the recent advances and proliferation of the
Internet of Things (IoT) devices, there is a huge demand
placed on its infrastructure requirements. The amount of data
generated by these small low-cost, low-power (LCLP) IoT de-
vices is phenomenal and at the same time due to the devices
being low-powered, they cannot be used to perform complex
computations and other algorithm implementations. There are
also limitations in communication data rates at different stages
in a Wireless Sensor Network (WSN), which mainly uses wireless
technologies such as Bluetooth, Zigbee, LoRa, etc to achieve
low power communication. These technologies come with limited
bandwidth and are not very reliable at high data rates. Hence the
challenge of handling high amounts of data with low bandwidth
communication technologies is one of the main hurdles inefficient
LCLP IoT system deployments. To address this problem, we
propose a combination of data compression techniques, which
will result in reduced data size, without compromising affecting
the quality of the data. This paper describes the implementation
of a combination of Delta and RLE compression techniques on
specific sensor data, particularly those used in our deployment
of the World’s First Wireless Sensor Network-based System for
Early warning and Monitoring of Rainfall induced Landslides in
Southern India. The test results show a good compression ratio
of 52.67% for 12bit ADC, without compromising on the quality
of the data. This has been implemented on a Programmable
System-on-a-Chip (PSoC) system and the results presented.
Index Terms—Data compression, Lossless methods, Lossy
methods, Compression ratio, Compression rate, Space Saving,
RLE [Run Length Encoding]
I. INTRODUCTION
The ubiquitous presence of IoT has enabled researchers to
collect data with ease, especially for data mining. Also, in
certain fields, like seismic related research, researchers prefer
to collect more data with a high sampling rate, to detect a
rare event. As a result, there can be a lot of redundant data
that would be transmitted unnecessarily. Each stage in the
embedded systems also has limitations in throughput while
sending and receiving data. As an example, the 3G GPRS
module has a throughput of 384Kbits/s [1].
This challenge is common in real-time video and audio
data streaming [22]. Hence the data transmitted by an LCLP
IoT system must be limited to a value that can be handled by
Fig. 1. Basic Block diagram of Compression and Decompression stage in a
LCLP IoT System
the supported communication technologies. There are several
ways to tackle this challenge. One of them is to send only
the event-based data after the data process. But, before such
implementation, we need to classify the events. Thus, it is
inevitable to send the non-processed data with a high data
rate, before the classification of the events. Fig. 1 showcase
the stages of compression and decompression in Low-cost,
Low-power IoT system. The data compression techniques
are widely used to handle high data transmission. Data
Compression, also known as compaction, is a method that
reduces the amount of data needed to be stored or transmitted
by using the encoding algorithm.
Data compression can be achieved either by lossless or
lossy compression techniques. In the lossless compression
method, the integrity of the data is preserved so that the
simple decoding of the compressed data will give the original
data. Lossless methods are usually used when there is no
compromise in data loss.
In the lossy compression technique, some values of the data
can be lost and a close approximation is provided. For the
seismic related research the accuracy and lossless data is very
important. There are many lossless compression techniques
that give a very good compression ratio like LZ77, but it
requires more compression time. In this paper, we have
described the implementation of RLE [Run Length Encoding]
and Delta lossless compression techniques which need a
smaller compression time for data compression. This means
it is less intensive on computational requirements and is
appropriate for the LCLP IoT devices. The compression time
is directly proportional to the power consumption and it is an
important factor when the system is deployed in the field for
remote monitoring [21]978-1-7281-4177-0 /19/$31.00 © 2019 IEEE
Authorized licensed use limited to: University of Melbourne. Downloaded on May 30,2020 at 10:45:03 UTC from IEEE Xplore. Restrictions apply.
The compression and decompression algorithm is
implemented in PSoC. The 3-axis accelerometer sensor
data is read, compressed and the compression ratio is
calculated for the analysis.
The rest of the paper is organized as follows: Section 2
explains the related works, section 3 elaborates the Methods
and its implementation of lossless compression techniques,
section 4 explains the various measurement parameters,
section 5 gives the analysis and discussion and section 6
conveys the conclusion and future work
II. RELATED WORKS
Prof. Dipti Mathpal et al [2] describe the compression
techniques, types of compression techniques and show a
comparative study on various lossless compression techniques.
Prof. Ruchi Gupta et al [3], have compared lossy and lossless
data compression methodologies for measurement parameters
like compression ratio, compression factor, compression gain,
saving percentage, compression time, etc.
Amandeep Singh et al [4] present a hybrid data compression
technique, which takes lesser compression time than the
existing techniques. A hybrid approach is the combination of
dynamic bit reduction and Huffman coding, which provides
a better compression ratio than the conventional compression
techniques.
Based on the comparison of lossless and lossy data
compression, Rupinder Singh et al [5] proposed a new bit
reduction algorithm to compress the text data by considering
the number theory system and file differential technique. This
reduces the time complexity.
Balasubramanian et al [6] compares different lossless
techniques such as Huffman coding, Arithmetic coding,
Lossless predictive coding, Lossless Jpeg, Run-length coding
on image and concluded that lossless Jpeg is found to be the
best lossless image compression technique with the aid of
better compression ratio and time.
Vijayalakshmi et al [7] portrait the architecture of compression
of the Tamil document. Concerning the compression ratio,
peak signal-noise ratio, the Huffman compression technique
is well suited for image compression rather than other
conventional lossless compression methods [8].
In this paper [9], the pre-processing and delta encoding
algorithm is used to curtail the amount of data to be
transmitted and enhance the performance of the system for
railway transportation applications. Delta encoding and delta
compression techniques used to boost the response size and
response delay for the significant subset of HTTP content
types [10].
V.G.Savani et al [11] describes the implementation of a
data compression algorithm in FPGA using Xilinx Embedded
Development Kit. The paper also stated the major benefits
of this kind of implementation. Which includes the ease of
hardware update and faster compression time.
Yoshifuji et al [12] explains the implementation and the
Fig. 2. Basic block diagram for transmission
performance of the sparse matrix and vector on the PEZY-SC
processor.
From the literature survey, it is found that the delta and RLE
have a relatively simpler algorithm therefore less computation
time and might be suitable for high sampling application.
The advantages of the FPGA in the data compression was
noted, PSoC5LP was chosen as it is based on FPGA and has
built in ARM controller.
III. METHODS AND ITS IMPLEMENTATION
Fig. 2 shows the basic hardware block diagram of the
implementation, with data generation, compression, and trans-
mission at different stages.
The data from the MEMS accelerometer is fed into
the ADC of the PSoC, the data is then compressed using
compression techniques and collected at the serial output.
The received data is then decompressed and compared with
the original data.
A. Accelerometer
The ADXL335 is a MEMS-based accelerometer to measure
the dynamic and static acceleration. Generally, it is used
in applications where the inclination, vibration needs to be
measured. The output signals generated by the accelerometer
is in terms of voltage which is proportional to the acceleration
[13].
B. PSoC
The PSoC [14] is a Programmable System on Chip
by Cypress Semiconductor. It resembles an FPGA and
in addition to that, it has configurable analog and digital
peripheral blocks with a builtin microcontroller on a chip.
This unique feature enables developers to update hardware
design using a programmable feature and prevents the board
redesign. The PSoC5LP has been used in this prototype, it
has a 32 bit ARM CORTEX-M3 with operating frequency up
to 80MHz.The compression algorithm has been implemented
on the PSoC’s microcontroller. The ADC of the PSoC5LP
is programmable and the SAR ADC can be configured to
8, 10 or 12 bits of resolution. Also, the filter design can be
designed using configurable analog or digital blocks for our
future design.
Authorized licensed use limited to: University of Melbourne. Downloaded on May 30,2020 at 10:45:03 UTC from IEEE Xplore. Restrictions apply.
C. Delta Encoding
Delta encoding is a lossless compression technique ,it needs
relatively a fewer compression time because of its simple
approach. As shown in the Fig.3 flowchart, the differences
between all the consecutive samples in a data set is calculated.
The original sample in the data set is replaced with its
difference with the next sample.
In the resultant delta compressed data set, the first sample
will be the first sample of the original data set. The rest of the
samples are the difference of the consecutive samples.
The Delta Encoding is performed on 8bit,10bit and 12bit
ADC data. A good compression was noticed in the TABLE
1 [15].
D. Run-Length Encoding
Run-length encoding also lossless compression technique,
it requires a small compression time because of its simple
computation. And it works best on the data set that has
recurrence value [16].
As shown in the Fig.3 flowchart, the consecutive occurrence
of a sample are replaced with its count of occurrence and
a copy of the sample itself. This method gives a very good
compression ratio as the duplicated samples are not included
in the compressed file.
E. Delta and Run-Length Encoding
Delta compression works best when there is a small or con-
stant variation between adjacent samples [15]. This technique
increases the probability of occurrence of the recurrence data
in the compressed file.
And as explained earlier the RLE works best on recurrence
sample. Thus the combination of these two compression
techniques will give a better compression ratio.
The combination of Delta and RLE compression techniques
are implemented and a better compression parameters are
noticed in the TABLE1
IV. MEASUREMENT PARAMETERS
A. Compression Ratio
The Compression ratio represents the relative decrease in
the size of the data by a given compression algorithm. A
Compression ratio of any compression algorithm is obtained
by taking the ratio of compressed file size to the original file
size. Let ‘CR’ be the compression ratio. According to [17],
the compression ratio can be calculated by,
Compression Ratio =C ompressed F ile S ize
Orig inal F ile S ize (1)
Fig. 3. Flowchart of Delta and Run-length Compression
B. Compression Factor
A Compression Factor is determined as the ratio of original
file size by compressed file size. The Compression factor is
the inverse of the Compression Ratio and is denoted as CF in
the paper.
Compr ession F actor =O riginal F ile Siz e
Compr essed F ile S ize (2)
C. Space Saving
Space saving determines the curtailment in size with respect
to the uncompressed size and it can be calculated using the
following equation. Let ‘SS’ be the Space saving
Space S aving = 1 −
Compr essed F ile S ize
Orig inal F ile S ize (3)
Authorized licensed use limited to: University of Melbourne. Downloaded on May 30,2020 at 10:45:03 UTC from IEEE Xplore. Restrictions apply.
TABLE I
COMPARATIVE ANA LYSI S OF DELTA AN D A CO MBI NATIO N OF DE LTA AND
RUN -LE NG TH ENCODING COMPRESSION TECHNIQUES FOR DIFFERENT
ADC RESOLUTION
*8 Bit ADC 10 Bit ADC 12 Bit ADC
Original
Data (Bytes) 1110 1214 1515
Delta Encoding
Compressed
Data (Bytes) 691 738 860
CF 1.606 1.644 1.856
SS(%) 37.5 32.1 46.1
CR(%) 62.25 60.79 53.86
Delta and Run-Length Encoding
Compressed
Data (Bytes) 529 697 798
CF 2.098 1.741 1.898
SS(%) 52.35 42.59 47.33
CR(%) 47.65 57.41 52.67
V. ANALYSIS AND DISCUSSIONS
The above Table I shows the test results for the implemented
Delta compression and the combination of Delta and RLE
compression techniques.Both the compression techniques are
tested for different ADC resolution (8 bits, 10 bits, and 12
bits).
The MEMS accelerometer sensor [18] generates the data
proportional to the mechanical vibration, shocks along the
3 axis (x, y, and z). The test was performed by placing the
sensor on a vibration platform and the generated data from
the sensors are read from the ADC of the PSoC. The output
data size of the ADC was denoted as the original data. In
the Table I the 8 Bit ADC has the smallest and the 12 Bit
ADC has the highest original data size. This is because the
higher resolutions uses more binary digits to represent the
same data.
The Original data was compressed using Delta Encoding
compression technique. Based on the compressed file and
original file size, the compression factor[CF],compression
ratio[CR] and space saving[SS] are calculated. The Table
I shows the calculated parameters for the compression for
different ADC resolution.
This procedure is repeated for the combination of Delta
and Run length encoding compression techniques , which
gives a better compression parameters as shown in the TableI.
For the Delta encoding, the best compression ratio of
53.86% was obtained for the 12 bit ADC. But, there was not
much improvement when the combination of Delta and RLE
was implemented , as CR decreased to only 52.67%. This
is because the Delta encoding did not create a significant
change in the number of recurring data.
On the other hand for an 8 bit ADC, the Delta encoding
compressed the data with the CR of 62.25% , it also increased
the number of recurring data significantly. So, the combination
of Delta and RLE improved the CR to 47.65%.
These compression techniques takes relatively lesser
computation cycle , as they have simpler approach and is
implemented in PSoC rather than an FPGA. Which makes
the system a Low-Cost and Low Power system
VI. CONCLUSION
The proposed work delivers a Low-Cost Low Power (LCLP)
IoT system with compression techniques. The lightweight
compression technique which takes less compression time is
implemented in the PSoC. This enables data streaming at a
higher data rate within its bandwidth. The test results prove
that the combination of Delta and RLE technique has a better
compression ratio than just Delta compression technique. In
the future work, digital blocks of PSoC will be used to design
anti aliasing filters. Wireless communication module will be
integrated to make the module an IoT device
ACKNOWLEDGEMENT
We express our deep gratitude to our Chancellor and world-
renowned humanitarian leader Sri. Dr. Mata Amritanandamayi
Devi (Amma) for her inspiration and support towards working
on interdisciplinary research that has direct societal benefit.
REFERENCES
[1] Anwar, Toni, and Lim Wern Li. ”Performance Analysis of 3G Com-
munication Network.” Journal of ICT Research and Applications 2.2
(2008): 130-157.
[2] Prof. Dipti Mathpal and Prof. Mittal Darji, “ A Research Paper on
Lossless Data CompressionTechniques” IJIRST –International Journal
for Innovative Research in Science & Technology— Volume 4 — Issue
1 — June 2017.
[3] Gupta, Ruchi, Mukesh Kumar, and Rohit Bathla. ”Data Compression-
Lossless and Lossy Techniques.” International Journal of Application or
Innovation in Engineering & Management 5.7 (2016): 120-125.
[4] Sidhu, Amandeep Singh, and Meenakshi Garg. ”Research Paper on Text
Data Compression Algorithm using Hybrid Approach.” International
Journal of Computer Science and Mobile Computing 3.12 (2014): 01-10.
[5] Brar, R. S., and B. Singh. ”A survey on different compression techniques
and bit reduction algorithm for compression of text data.” International
Journal of Advanced Research in Computer Science and Software
Engineering (IJARCSSE) Volume 3 (2013).
[6] AVUDAIAPPAN. T, ILAM PARITHI.T, BALASUBRAMANIAN.R and
SUJATHA.K, “PERFORMANCE ANALYSIS ON LOSSLESS IMAGE
COMPRESSION TECHNIQUES FOR GENERAL IMAGES,” Interna-
tional Journal of Pure and Applied Mathematics,Volume 117 No. 10
2017, 1-5.
[7] B. Vijayalakshmi and N. Sasirekha,“LOSSLESS TEXT COMPRES-
SION FOR UNICODE TAMIL DOCUMENTS”, ICTACT JOURNAL
ON SOFT COMPUTING, JANUARY 2018, VOLUME: 08, ISSUE: 02.
[8] Vikash Kumar, Sanjay Sharma, “Lossless Image Compression through
Huffman Coding Technique and Its Application in Image Processing
using MATLAB,” International Journal of Soft Computing and Engi-
neering (IJSCE) ISSN: 2231-2307, Volume-7 Issue-1, March 2017.
[9] Lin, Yangxin, et al. ”Class-based delta-encoding for high-speed train
data stream.” 2015 IEEE 34th International Performance Computing and
Communications Conference (IPCCC). IEEE, 2015.
[10] Mogul, Jeffrey C., et al., ”Potential benefits of delta encoding and data
compression for HTTP.” ACM SIGCOMM Computer Communication
Review. Vol. 27. No. 4. ACM, 1997.
Authorized licensed use limited to: University of Melbourne. Downloaded on May 30,2020 at 10:45:03 UTC from IEEE Xplore. Restrictions apply.
[11] Savani, V. G., Bhatasana, P. M., & Mecwan, A. I. (2012). Imple-
mentation of Data Compression Algorithms on FPGA using Soft-core
Processor. International Journal of Advancements in Technology, 3(4),
270-276.
[12] Yoshifuji, Naoki, et al., ”Implementation and evaluation of data-
compression algorithms for irregular-grid iterative methods on the
PEZY-SC processor.” Proceedings of the Sixth Workshop on Irregular
Applications: Architectures and Algorithms. IEEE Press, 2016.
[13] Tran, Duc Tan, et al, ”Development of a rainfall-triggered landslide
system using wireless accelerometer network.” International Journal of
Advancements in Computing Technology 7.5 (2015): 14.
[14] Dakave, Mr Chetan C., and M. S. Gaikwad. ”Angular Variation Method-
ology For Landslide Measurement Using Programmable System on
Chip.” (2015).
[15] Klein, Shmuel T., and Dana Shapira. ”Compressed delta encoding for
LZSS encoded files.” In 2007 Data Compression Conference (DCC’07),
pp. 113-122. IEEE, 2007.
[16] Arif, Mohammad, and R. S. Anand. ”Run length encoding for speech
data compression.” 2012 IEEE International Conference on Computa-
tional Intelligence and Computing Research. IEEE, 2012.
[17] https://en.wikipedia.org/wiki/Data compression ratio
[18] Ramesh, Maneesha Vinodini, Divya Pullarkatt, T. H. Geethu, and P.
Venkat Rangan. ”Wireless Sensor Networks for Early Warning of Land-
slides: Experiences from a Decade Long Deployment.” In Workshop on
World Landslide Forum, pp. 41-50. Springer, Cham, 2017.
[19] https://www.cypress.com/file/139501/download
[20] https://www.analog.com/media/en/technical-documentation/data-
sheets/ADXL335.pdf
[21] Murugesh, Remya, Aravind Hanumanthaiah, Ullas Ramanadhan, and
Nirmala Vasudevan. ”Designing a Wireless Solar Power Monitor for
Wireless Sensor Network Applications.” In 2018 IEEE 8th International
Advance Computing Conference (IACC), pp. 79-84. IEEE, 2018.
[22] Krishnapriya, S., Balaji Hariharan, and Sangeeth Kumar. ”Resolution
scaled quality adaptation for ensuring video availability in real-time
systems.” 2012 IEEE 14th International Conference on High Perfor-
mance Computing and Communication & 2012 IEEE 9th International
Conference on Embedded Software and Systems. IEEE, 2012.
Authorized licensed use limited to: University of Melbourne. Downloaded on May 30,2020 at 10:45:03 UTC from IEEE Xplore. Restrictions apply.