Content uploaded by Shajulin Benedict
Author content
All content in this area was uploaded by Shajulin Benedict on Jul 21, 2021
Content may be subject to copyright.
IoT Blockchain Solution for Air Quality Monitoring
in SmartCities
Abstract—IoT cloud enabled societal applications have dramat-
ically increased in the recent past due to the thrust for innova-
tions, notably through startup initiatives, in various sectors such
as agriculture, healthcare, industry, and so forth. The existing
IoT cloud solutions have led practitioners or researchers to a
haphazard clutter of serious security hazards and performance
inefficiencies. This paper proposes a blockchain enabled IoT
cloud implementation to tackle the existing issues in smart cities.
It particularly highlights the implementation of chaincodes for
air quality monitoring systems in SmartCities; the proposed
architecture named as IoT enabled Blockchain for Air Quality
Monitoring System (IB-AQMS) is illustrated using experiments.
Experimental results were carried out and the findings were
disclosed in the paper.
Index Terms—Blockchains, Cloud Computing, IoT application,
Smart city
I. INTRODUCTION
IoT Cloud based technology [9] [13] is almost prevalent
in most diverse research sectors, including agriculture, health-
care, societal environment, smartcities, smart manufacturing
[14] [18] [22] and so forth. Tens of thousands of researchers
or industrialists, including startups, have invested research
notions to inculcate the newer technologies on the existing
solutions for reaping in profits or societal benefits.
Although several IoT cloud solutions do exist in the market
(including smart cities), they are prone to serious concerns
relating to security and performance inefficiencies. Notably,
IoT enabled air quality measurement systems for smart cities
might pinpoint the industrial emissions to the concerned
governmental agencies such as Europeon Environment Agency
of Europe, Environmental Protection Agency (EPA) of the
USA, or Central Pollution Control Board (CPCB) of India.
The record might be tampered with corrupt policies or the
concerned industrialists. Obviously, there is a dire need of a
tamperless secured record keeping solution for smart city offi-
cials. In fact, blockchain technology [25] has been developed
in the recent past for various applications [11] [16].
This paper proposes an IoT Blockchain enabled Air Quality
Monitoring System (IB-AQMS) for smart cities. The proposed
approach records the air pollution details of industries from a
smart city in the form of untampered blocks. The sensor data
are collected through IoT devices, and they are validated based
on the underlying peers of blockchains. The implementation
was validated at the IoT cloud research laboratory of IIIT
Kottayam. And, the evaluation results were discussed.
The rest of the paper is organized as follows: Section II
presents a wide survey on the topic of IoT blockchains for
smart cities. Section III explains the proposed IoT Blockchain
enabled Air Quality Monitoring System architecture. Sec-
tion IV describes the inner details of transactions and chain-
codes of blockchains. Section V reveals the experimental
results and advantages of blockchain based implementation
for smart cities. And, finally, Section VI presents a few
conclusions.
II. RE LATE D WORK
Smart city research and solutions have improved in the
recent past owing to several innovative solutions or prod-
uct developments. Solutions such as i) providing sufficient
bandwidth via. 5G, ii) intelligent services in various sectors,
including transportation and smart waste management [10],
[15], [5], [2], iii) controlling air/water pollution levels, iv)
notification or alert services, and so forth have evolved in
various dimensions in the recent past.
In addition, city rankings ( [8], [19]) and the other notable
schemes such as Swatchh Bharath of India have promoted city
authorities to adopt effective measures and policies to control
wrong practices; a few indexing schemes do exists for ranking
countries such as Air Quality Indexing [3].
Controlling air quality pollution level is carried out at
outdoor, indoor, or at the industrial sectors. For instance,
Kadri et al [12] proposed a machine-2-machine approach of
monitoring air quality parameters in a distributed fashion.
Also, Yash et al [23] have proposed a cloud assisted air quality
monitoring approach. Siemens has developed a software to
reveal the air quality values of cities [21].
A few researchers have studied the utilization of prediction
approaches to study the variables such as NO2, SO2, RSPM,
or so forth – i.e., authors of [20] have studied the application
of neural network based prediction algorithm for predicting
air quality parameters; Pietro et al [17] have analyzed the
impact of the severity of CO and NO2 along roadsides using
the neural network prediction algorithm; authors of [24] have
explored the effect of utilizing EPLS method for clustering
air quality data. In addition, authors of [7], have created pure
analytical models for analyzing the air quality of a specific
region.
In the previous work [4], a revenue oriented air quality
prediction framework using Random Forest algorithm which
has the capability of notifying control authorities and which
creates revenue to the smartcities using cloud microservices
were designed.
In most of the available mechanisms, there is a possibility
of industrialists or concerned air polluting entities to tamper
the data. This tampering notion could heavily impact the
Fig. 1. Architecture of IB-AQMS
control authorities of smartcities from leveraging strict policies
or protecting the environment. The work, proposed in this
paper, has endeavored to apply blockchain mechanism to
register the measured air quality sensor data from various
air quality measurement sites such that the generated blocks
remain untampered from the defaulters.
III. IB-AQMS FOR SM ART CITIES
Air pollution is considered to be a serious issue, especially
in developing countries. The air pollution leads to an array of
health hazards, including pre-mature deaths, to the residents
of SmartCities. Albeit of a dramatic decrease in the air
pollutant emissions, there still exist issues due to a few wrong
practices heralded by industrialists. This section details on the
IoT Blockchain enabled Air Quality Monitoring System (IB-
AQMS) for smart cities in order to avoid any tempering caused
by malpractitioners at the SmartCity system.
The proposed architecture, IB-AQMS, consists of the fol-
lowing entities:
1) Air quality sensors / Gateway
2) Cloud Nodes
3) Blockchain Nodes
4) User-Interface
The pictorial representation of the architecture is given in
Figure 1.
The functionalities of these entities are listed in the follow-
ing subsections:
A. Air Quality Sensors / Gateway
Sensors are typically battery operated devices which mea-
sure a few measurable properties such as temperature, NO2,
SO2, CO2, dust, and so forth. These sensors are often in-
capable of handling larger requests or executing compute-
intensive tasks. Hence, such devices are connected to an IoT
gateway for performing the underlying tasks of applications.
The important roles of the IoT gateway are listed below:
•to establish connection to the external world via. proxy
servers.
•to aggregate a large volume of sensors belonging to mul-
tiple vendors or multiple protocols such as IEEE802.15.4,
Zigbee-P, RFID, Bluetooth4.0, and so forth.
•to provide unique addresses or geo-spacial addresses
based on the context of applications, and
•to enrich the analytics of the underlying sensor data (if
required) to a minimal level so that all sensor data are
not transferred to the cloud environments.
B. Cloud Nodes
The sensor data, either filtered or the otherwise, reaches
cloud environments. The cloud environments are typically
provisioned by a few public cloud providers such as Amazon
AWS, Google Compute Engine, or IBM Cloud, or by a few
in-house opensource cloud setup based on OpenStack, Open-
Nebula or so forth. These cloud servers are computationally
powerful to handle several functions:
•data analytics – an exploratory analysis of upcoming air
quality sensor data is necessary to characterize the faulty
industries which emit air pollutants to the environment. In
this context, it is possible to adopt several data modeling
or prediction algorithms or machine learning algorithms
using cloud services;
•executing algorithms – launching VM instances from the
cloud templates or starting a new instance of a VM
after contending for resources from cloud providers are
primordial steps to execute algorithms or IoT applica-
tions. The cloud nodes would have to deal with all these
underpinning tasks for executing IoT cloud algorithms,
including blockchain services;
Fig. 2. Blockchain Process Flow of IB-AQMS
•monitoring the events – sometimes, there is a possibility
that the resources are not powered on due to several
reasons – for instance, the accountability of the cloud
user is not validated by the IAM cloud service. In such
cases, the cloud nodes remain unavailable to execute IoT
cloud tasks. Monitoring the performance efficiency of IoT
application, therefore, is carried out at cloud nodes;
•security – additionally, cloud specific security measures
such as cross site scripting, device hacking, VM rootkits,
and so forth are handled at cloud nodes; and so forth.
C. Blockchain Nodes
The blockchain nodes of IB-AQMS are, typically, a few VM
instances or dedicated servers of cloud providers. Blockchain
nodes are connected in a Peer-2-Peer distributed network
fashion such that the nodes belong to various organizations.
Each organization shall include multiple peer nodes where the
copy of blocks are located. Each block contains the hashed
values of the previous blocks and the transaction data along
with the timestamp. The most predominant services that we
have opted in this work are the application of blockchain for
IoT cloud applications.
The pristine roles of these services are detailed in the
following section IV
D. User-Interface
The next entity of IB-AQMS architecture is the User-
Interface. Clients or Users could login to the IB-AQMS system
to check the status of blockchain data. Notably, if the data is
hampered by any defaulters, the whole blockchain ledger fails
in the operations.
IV. BLOCKCHAIN NOD ES – WORKING PRINCIPLE
This section explains how blockchain nodes assist the
process of adding sensor data to the ledger (see Figure 2).
The blockchain nodes of IB-AQMS are categorized as
follows:
1) Actors – these nodes are responsible to initiate the
transaction to the ledger.
2) Endorsing Peers – such nodes that are utilized to
verify the validity of transactions.
3) Orderers – these nodes collect the validated transac-
tions and issue them to the committing peers.
4) Committing Peers – the nodes which register the
transaction as blocks to the chain or ledger (which
remains untampered) are named as Committing
Peers.
All blockchain nodes follow certain rules based on
Chaincodes – also named as smart contract – during
the process of registering transactions to the ledger. The
Chaincodes are the pieces of codes that are required to alter
the state of the ledger. These Chaincodes are executed on
independent nodes to the blockchain nodes.
In IB-AQMS architecture, the blockchain services (see
Figure 2) follow a sequence of procedures in order to register
the block into the ledger. They are listed as follows:
1) Establishing network – at first, all required pre-requisites
are satisfied such as downloading the required software,
packages, and so forth. And, the required authentication
certificates and the genesis block (the first block) of
a blockchain are created based on the specifications
provided at the configuration file.
2) Submitting Sensor Data – the sensors – submit the
sensory data to the blockchain service. The sensory data
follow in a specific structure consisting of i) timestamp,
ii) type of location, iii) SO2, iv) NO2, v) RSPM, vi)
CO, vii) Associated Industry Names, viii) Monitoring
location, ix) Penalty value, and x) Reporting Agency.
These structured sensory data are preferably having the
Fig. 3. Circuit Diagram for sensing Air Quality Parameters such as CO, CO2, and Smoke particles
higher air pollutant emissions from a particular IoT
monitoring site;
3) Validation – upon the receipt of the sensory data,
the Endorsing Peers, which are represented as
Control Agency,Environmentalist, and
Industrialists, look into the validation of data
and the authenticity of the submitting client based on
the chaincodes.
4) Ordering Service – the transaction is passed on to the
ordering service of the Orderer node once the previous
step was completed.
5) Committing Blocks – Accordingly, the Orderer lets the
Committing Peers to register the information or block
into the blockchain by adding the previous hash values.
Although the blocks are maintained by Peers, they are
not let to be tampered by any of the nodes due to the
specialty of the blockchain network.
V. EX PE RI ME NTAL RE SU LTS
This section illustrates the experimental setup, findings of
the experiments, and the corresponding discussions. All exper-
iments were carried out at the IoT Cloud Research Laboratory
of our premise.
A. Experimental Setup
In fact, the real-time air-quality sensor values could be
collected using air quality sensors through the WIFI enabled
ArduinoUNO board. The sketches of ArduinoUNO program-
ming could include a specific URI to upload the real time
value of air quality sensor value to the cloud setup as carried
out in the other works [4].
TABLE I
AIR QUA LIT Y MEASUREMENT VALUE S US ING SE NS ORS
MQ-7 (CO) MQ2 (Smoke) MQ135 (CO2)
379 375 381
388 380 389
393 384 394
395 385 394
394 384 394
393 382 392
388 378 383
380 371 380
377 364 376
373 357 373
370 350 369
365 342 364
360 334 359
355 326 355
The arduino circuit utilized for collecting the air quality val-
ues from sensors such as MQ2, MQ135, MQ7 for measuring
CO, smoke, and CO2 values is given in Figure 3.
As seen in Figure 3, the sensors were connected to the
analog pins of the arduino boards A0, A2, and A5 using
specific pin modes of the board –
pinMode(mq7Dpin,INPUT);
pinMode(smokeA0,INPUT);
pinMode(mq135val,INPUT);
The sensors are powered by the supply units of the board.
The sensor values obtained during the experiments are given
in Table I.
The focus of this work is to reveal the utilization of
blockchain network for AQMS and manifest the possibility
TABLE II
EXP ERI ME NTAL SETTINGS OF IB-AQMS BLOCKCHAIN SERVICES
BlockChain Services of IB-AQMS
Org Blockchain Nodes Service URI Network Volumes
1 Peer 0 http://peer0.iiitkottayam.com:7051 fibchannel peer0.iiitkottayam.com
1 Peer 1 http://peer1.iiitkottayam.com:8051 fibchannel peer1.iiitkottayam.com
2 Peer 0 http://peer0.aic.com:9051 fibchannel peer0.aic.com
2 Peer 1 http://peer1.aic.com:10051 fibchannel peer1.aic.com
O Orderer http://orderer.iiitkottayam.com:7050 fibchannel orderer.iiitkottayam.com
Fig. 4. Execution Time of IB-AQMS Blockchain Processes
of tampering blocks.
In this lieu, the IB-AQMS automatically collected the sever-
ity of air pollutant emissions such as SO2, NO2, RSPM/PM10,
and PM2.5 from various monitoring sites based on the datasets
[1]. IB-AQMS utilized an extended version of docker-based
hyperledger fabric images (version 1.4.1) supported by golang
v.1.11.5 and docker v18.09.6 in order to provide blockchain
services. The name of the nodes utilized in the blockchain
services and the associated peers of IB-AQMS, the entire
organizational settings, are tabulated in Table II.
Peer 0 of each organizations was responsible for endorsing
transactions; and, iiitkottayam.com was utilized as Orderer
throughout the experiments.
B. Execution Time
The processes involved in registering the string of sensor
data, a block representation of blockchain, into the ledger of
IB-AQMS (as discussed in Section III) were instrumented with
specific monitoring hooks in order to study the time spent by
these processes on the organizational nodes. Figure 4 depicts
on the impact of the processes, in terms of the execution time
in milli-seconds, of blockchain services when executed on the
the nodes.
The following points are observed from the Figure 4:
1) The query time, the chain code instantiation time, and
the peer joining to the blockchain time, are compar-
atively very high when compared to the other tasks
such as Chaincode installation, establishing the channel,
generating certificates, and so forth.
2) The pre-requisites are the time required to setup the
blockchain nodes based on the docker images. The time
will be higher if the required images are not available
in the executing nodes.
3) The chaincode instantiation time is higher than the
chaincode installation time owing to waiting for con-
nections from neighboring peer nodes.
VI. CONCLUSION
Air quality monitoring using IoT solutions have been an
interesting topic of research for industrialists, environmental-
ists, and researchers of SmartCities in the recent past. Albeit
of several solutions in the recent past, there have been a very
few solutions that highlighted the security aspects of sensor
data. Notably, air quality monitoring data might be destroyed
or altered by any unethical industrialists when connected with
a few corrupt controlling authorities. This paper proposed IB-
AQMS architecture which combined blockchain technology
to IoT enabled air quality monitoring systems. The approach
was experimented using air quality monitoring sensors and the
available datasets.
REFERENCES
[1] AirQuality dataset, https://data.gov.in/catalog/air-quality-residential-
areas-under-national-ambient-air-quality-monitoring-programme-few
2019.
[2] AlMasri, Eyhab Diabate, Ibrahim Jain, Richa Hoi Lam Lam, Ming
Reddy Nathala, Swetha. (2018). A Serverless IoT Architecture for Smart
Waste Management Systems. 179-180. 10.1109/ICII.2018.00034.
[3] Air Quality Indexing software, https://waqi.info/, 2019.
[4] Benedict S., Revenue oriented air quality prediction microservices for
smart cities, in IEEE 2017 International Conference on Advances in
Computing, Communications and Informatics (ICACCI), Udupi, pp. 1-
6, doi: 10.1109/ICACCI.2017.8125879.
[5] Bharadwaj B, M. Kumudha, Gowri Chandra N and Chaithra G, ”Au-
tomation of Smart waste management using IoT to support Swachh
Bharat Abhiyan - a practical approach,” 2017 2nd International Con-
ference on Computing and Communications Technologies (ICCCT),
Chennai, 2017, pp. 318-320. doi: 10.1109/ICCCT2.2017.7972300
[6] Leo Breiman, Random Forests, in Machine Learning, Vol. 45, No.1, pp.
5-32, 2001.
[7] Cai, C.-J., X. Zhang, K. Wang, Y. Zhang, L.-T. Wang, Q. Zhang, F.-K.
Duan, K.-B. He, and S.-C. Yu, Incorporation of New Particle Formation
and Early Growth treatments into WRF/Chem: Model Improvement,
Evaluation, and Impacts of Anthropogenic Aerosols over East Asia,
Atmospheric Environment, Vol.124, pp.262-284, 2016.
[8] Giffinger R., Fertner C., Kramar H., Kalasek R.,
Pichler-Milanovi N., Meijers E., Smart cities: Ranking
of European medium-sized cities, http://www.smart-
cities.eu/download/smartcitiesfinalreport.pdf , 2007.
[9] Gubbi, J., Buyya, R., Marusic, S., Palaniswami, M. (2013). In-
ternet of Things (IoT): A vision, architectural elements, and future
directions. Future Generation Computer Systems, 29(7), 1645-1660.
doi:10.1016/j.future.2013.01.010.
[10] P. Haribabu, S. R. Kassa, J. Nagaraju, R. Karthik, N. Shirisha
and M. Anila, ”Implementation of an smart waste management
system using IoT,” 2017 International Conference on Intelligent
Sustainable Systems (ICISS), Palladam, 2017, pp. 1155-1156. doi:
10.1109/ISS1.2017.8389367
[11] Hori, M., Ono, S., Miyashita, K., Kobayashi, S., Miyahara, H.,
Kita, T., Yamaji, K. (2018). Learning System based on Decen-
tralized Learning Model using Blockchain and SNS. Proceedings of
the 10th International Conference on Computer Supported Education.
doi:10.5220/0006666901830190.
[12] A. Kadri, E. Yaacoub, M. Mushtaha, and A. Abu-Dayya, Wireless sensor
network for real-time air pollution monitoring, in Proc. of IEEE Int.
Conf. on Commn., Signal Proc. and their Appln, pp. 1 - 5, 2013.
[13] Lake, D., Milito, R., Morrow, M., Vargheese, R. (2014). Internet of
Things: Architectural Framework for eHealth Security. Journal of ICT
Standardization, 1(3), 301-328. doi:10.13052/jicts2245-800x.133.
[14] Lin, Y., Ieromonachou, P., Sun, W. (2016). Smart manufac-
turing and supply chain management. 2016 International Con-
ference on Logistics, Informatics and Service Sciences (LISS).
doi:10.1109/liss.2016.7854383.
[15] Malapur B.S. and V. R. Pattanshetti, ”IoT based waste management:
An application to smart city,” 2017 International Conference on Energy,
Communication, Data Analytics and Soft Computing (ICECDS), Chen-
nai, 2017, pp. 2476-2486. doi: 10.1109/ICECDS.2017.8389897
[16] Isaja, M., Soldatos, J. (2018). Distributed ledger technology for de-
centralization of manufacturing processes. 2018 IEEE Industrial Cyber-
Physical Systems (ICPS). doi:10.1109/icphys.2018.839079.
[17] Pietro Zito, Haibo Chen, and Margaret C. Bell, Predicting Real-Time
Roadside CO and NO2 Concentrations Using Neural Networks, in
IEEE Transactions on Intelligent Transportation Systems, Vol. 9, No.
3, pp.514-522, 2008.
[18] Quiros, G., Cao, D., Canedo, A. (2017). Dispersed automation for
industrial Internet of Things An enabler for advanced manufacturing.
2017 13th IEEE Conference on Automation Science and Engineering
(CASE). doi:10.1109/coase.2017.8256113.
[19] Rolland Busch, The Green City Index, in
www.siemens.com/greencityindex, 2017.
[20] Santosh Kumar Nanda, Debi Prasad Tripathi, S.S. Mahapatra, Ap-
plication of Legendre Neural Network for Air- Quality Prediction,
International Conference on Engineering and Technology, May 2011.
[21] Siemens Air Quality Forecasts, https://www.siemens.com/
innovation/en/home/pictures-of-the-future/ infrastructure-and-
finance/smart-cities-air-pollution-forecasting-models.html, 2017.
[22] Wang, S., Wan, J., Imran, M., Li, D., & Zhang, C. (2016). Cloud-based
smart manufacturing for personalized candy packing application. The
Journal of Supercomputing, 74(9), 4339-4357. doi:10.1007/s11227-016-
1879-4.
[23] Yash Mehta, Manohara Pai M.M., Sanoop Mallissery, Shwetanshu
Singh, Cloud enabled Air Quality Detection, Analysis and Prediction
- A Smart City Application for Smart Health, in Proc. of 3rd MEC
Int.Conf. on Big Data and Smart City, pp. 1-7, 2016.
[24] Yunliang Chena f., Lizhe Wanga, Fangyuan Lia, Bo Dua, Kim-Kwang
Raymond Choob, Houcine Hassand, Wenjian Qine, Air quality data
clustering using EPLS method, Vol. 36, pp. 225232, 2017.
[25] Z. Zheng, S. Xie, H. Dai, X. Chen, H. Wang, An overview of Blockchain
technology: architecture, consensus, and future trends, proceedings of
IEEE 6th International Congress on Big Data, 2017.