Shetty 2019
Shetty 2019
Contents
1. Introduction 188
1.1 Objectives of the project 189
2. Literature survey 190
3. Design 197
3.1 Graphical user interface 201
4. Implementation and results 201
4.1 Module description 203
4.2 Actual data vs predicted data 203
4.3 Explanation of algorithm 205
5. Conclusion 211
References 216
Further reading 216
About the authors 217
Abstract
Problem with the automobile engines continues to increase in a very large scale. Every
vehicle has its own emission but problem arises when the emission occurs beyond stan-
dard values. Even though lot of changes has been made in the consumption of fuel,
increasing urbanization and industrialization contribute for the poor air quality. With
the technical advancements in machine learning, it’s been possible to build predictive
models for monitoring and controlling pollution based on the real-time data. With this,
we are using IoT techniques for monitoring the emission rates of vehicles. A predictive
model is built on the real-time data available, predicting the values of carbon monoxide.
Sensors are embedded in the vehicles to measure the pollutants levels. By using the
monitoring techniques, vehicle details such as location, owner is notified with the cur-
rent situation of pollution in his location and his vehicle emission rate contributing to
environment. Machine learning model is used for the prediction of pollution level in the
vehicle location based on the previous data and the current data obtained by the sen-
sors. Here the pollutants level can be controlled using smart emission surveillance
system. The system shoots beyond threshold value taken from the Bharat Stage emis-
sion standards then automatically a notification will be sent to the vehicle owner. The
emitted level will be monitored and the fuel supply to the engine will be cut off using
solenoid valve at the same time.
1. Introduction
Air pollution is one of the gravest problems faced by the environment
especially by densely populated countries like India. The rapid growth of
population has led to an increased usage of vehicles. These vehicles use fuels
which undergoes incomplete combustion to emit toxins. The principal
emissions from motor vehicles contains harmful gases which contributes
to greenhouse effect.
Automotive emissions include CO2, carbon monoxide (CO), hydrocar-
bons (HC), nitrogen oxides. The magnitude of each of these emissions relies
on the mixture of vehicle/fuel, weather conditions, and driving patterns.
Under emission standards, the emission limits for a specific car differ
depending on the vehicle’s weight, its type of gas, and whether it is a pas-
senger or a vehicle carrier. Diesel cars have a greater nitrogen oxide emission
limit, while petrol cars have a greater carbon monoxide emission limit.
The main idea is to measure the emission levels from the motor vehicles
and control the pollution. Sensors are used to detect the gases released from
the exhaust. The levels of the different gases are measured and compared
with the standard values. If the amount of pollutants is higher than the
threshold level then the LED is turned on automatically, which is controlled
by Arduino and vehicle owner will be sent a notification. The fuel supply is
stopped using fuel injector making the vehicle immobile.
The purpose of this work is to build a robust system that can keep check
on the amount of pollutants released by the vehicles into the atmosphere.
Sudden environmental changes in pollution is one of the major contribu-
tion to environmental pollution. Increased number and usage of vehicles
has reduced the quality of air and its surroundings and has even led to
catastrophic problems in human beings.
Hence, a technical solution needs to be developed to reduce air pollution
from automobiles.
Problems include:
• How to find out the amount of pollutants released by vehicle?
• How to reduce the emission of toxic gases from vehicles?
Air pollution control model using machine learning 189
threshold value, the fuel supply is cut off using the solenoid valve preventing
the vehicle from being used until it’s given for service. The current scope of
the project is that we can retrieve a better processed data from sensors and
send the processed data to server for maintenance by refactoring the code.
Hardware compaction is the major current scope of the project. The other
possible scope of the project is real-time data analysis which leads to better
efficiency. An Android application for the routing of vehicles through less
polluted areas is also one of the scopes.
2. Literature survey
India is the world’s second-largest country in terms of population.
Transportation sector is a key component in its rapidly growing economy.
This project aims at preventing and predicting the air pollution produced by
automobiles using Arduino board, three gas sensors, namely, MQ-2, MQ-7
and MQ-135, GSM module and solenoid valve. It is mainly an IoT based
project. The sensors sense the gaseous levels of emissions released from the
exhaust of the vehicle. Based on the threshold value, the respective led glows
for each sensor depending on the quantity of toxic gases which it can sense.
An alert message is sent to the owner warning him that his vehicle has
exceeded the safe emission standards of BS IV. We propose this system as
this idea is analyzed and conceptualized by referring a few IEEE papers
and by applying our own ideas on prevention of air pollution and controlling
it. This system has a major feature which aids in curbing the air pollution to a
huge extent. The system cuts/chokes down the fuel supply from the fuel
injector using the solenoid valve when the emission rate is higher than
the given threshold value. IoT is an emerging field and its technology assists
in automating almost everything. Hence, we use the benefits of this field in
controlling a major problem faced by the environment that is air pollution.
This system has a great possibility of bringing a revolutionary change in the
concept of prevention and control measures for air pollution.
M.U. Ghewari et al. [1] discusses about how to monitor air pollution on
roads and track vehicles which cause pollution over a specified limit. The
great amount of particulate and toxic gases is produced due to increase in
industrialization and urbanization. There is poor control on emissions and
little use of catalytic converters. The serious problem that has been around
for a very long time is increase in usage of automobiles. Internet of things
(IoT) [2] is being used to address this problem. Here, combination of elec-
trochemical toxic gas sensors, wireless sensor networks and radio frequency
Air pollution control model using machine learning 191
identification (RFID) [3] tagging system are used to monitor car pollution
records anytime and anywhere. Few locations to be monitored with usually
high volume of traffic are identified. The RFID readers are being placed
on the either side of a road for each location with a fixed distance between
them. A passive RFID tag is equipped in each vehicle passing through road.
Sensor nodes, composed of gas sensors, are placed on the roadside. The sensor
nodes are identified and are addressed by unique IP address [4]. These sensors
gather data continuously and sent to the server wirelessly. Whenever the
sensors sense sudden rise in pollution, search is initiated for corresponding
RFID tags, i.e., vehicles which are causing pollution are identified using
the tag attached on them. These RFID readers detects a car passing by it.
The RFID readers identify specific tag number and transmit the same via
the GPRS [5] the server. This system also generates an alert when the pollu-
tion level increases. Then, the appropriate actions are taken by the authorities
accordingly. The authorities monitor and analyze all the gathered data. The
proposed framework is as shown below (Fig. 1).
A graph for pollutant data for various vehicles is shown below. Once the
level of the pollution exceeds permissible level, motorists may be advised to
avoid that particular area. It may be done using the same Internet of things.
It may enable to reduce the pollution level over a certain span of time.
This framework may be integrated as an enabling tool to design intelligent
transportation system for smart city [6] (Fig. 2).
Alert
INTERNET Analyze Data
Wireless
Router
Server
RFID Tag
Database
Administrator
440
Sensed Raw Data
420
400
380
360
340
1 2 3 4 5
Car ID (RFID Tag)
Fig. 2 Pollution level monitoring.
B. Hunshal et al. [7] discuss the various sensing criteria, test processes,
environmental parameters and microsystem-based realization needs. Gas
sensors have become an essential element of internal combustion engine
control systems to provide data for air-to-fuel (A/F) feedback control to
improve car efficiency and fuel economy as well as lower emission con-
centrations. Increasingly strict restrictions on evaporative emissions and
on-board diagnostic requirements [8] (OBD), including catalyst monitor-
ing, require monitoring of exhaust gas constituents [i.e., carbon monoxide
(CO), hydrocarbons (HCs), and nitrogen oxides (NOx)]. MOTOR cars
have two primary emission kinds: (1) tailpipe exhaust and (2) fuel system evap-
orative emissions. The only exhaust gas sensor that is currently used on cars is
the oxygen sensor that has been used widely in cars for over 15 years. The
primary function of this sensor is for feedback control of the air-to-fuel ratio
[9] (A/F) to maintain the gasoline/air mixture close to stoichiometry in order
to minimize emissions. The tailpipe emissions are present only when the
vehicle is operated (as opposed to the evaporative emissions) and the unde-
sirable emissions can be divided into four main categories: (1) well over a
hundred different species of HCs (including oxygenated “HC,” such as
aldehydes and ketones); (2) carbon monoxide (CO); (3) oxides of nitrogen
(NO); (4) particulates (mainly from diesel engines).
For low tailpipe emissions, the precision of the air-to-fuel feedback con-
trol system (under static and dynamic driving circumstances) is of paramount
significance as the catalyst’s effectiveness is significantly peaked as a function
of A/F. One idea [10] is to add an extra feedback loop to the air-to-fuel
Air pollution control model using machine learning 193
control system to further optimize the A/F for lowest emissions. This can be
achieved by measuring behind the catalytic converter HCs (and/or CO)
and NO. To obtain the smallest possible emissions, the air-to-fuel feed-
back scheme would then minimize the (normalized) difference between
the two sensor signals. This works because the level of combustible gas
concentrations substantially increases under fuel “rich” conditions, while
substantially increased levels of NO indicate fuel “lean” conditions. By con-
stantly measuring the exhaust gas concentrations as well as other readily
available engine operating parameters, such as temperature, speed and load,
and mass air flow, an actual mass of emissions can be obtained [11]. This
information could be used to monitor the tailpipe emissions of the entire
combustion system.
S.P. Bangal et al. [12] use a vehicle identification and detection strategy
based on unintended electromagnetic emissions. When operating, cars with
inner combustion motors radiate the vehicle’s distinctive electromagnetic
emissions. Emissions rely on electronics, harness cables, type of body, and
many other characteristics. Since each vehicle’s emissions are unique, they
can be used for purpose of identification. This article explores a procedure
based on their RF emissions to detect and identify cars. Measured emission
information collected parameters such as the average magnitude or normal
magnitude deviation within a frequency band. These parameters have been
used as inputs to an artificial neural network [13] (ANN) trained to define
the car producing the emissions. The approach was tested with emissions
from a Toyota Tundra, a GM Cadillac, a Ford Windstar, and ambient noise
captured. When using emissions capturing an ignition spark event, the ANN
was able to classify the source of signals with 99% accuracy. Using neural
networks, identification was allowed. In order to highlight distinctions
between cars and ambient noise, several parameters were obtained from
the measured emission spectrograms. The most significant parameters were
the standard deviation and amount of pulses in a frequency band. A 99.3%
identification rate could be accomplished using these two parameters
alone when a spark event was captured. When a spark event was not cap-
tured, however, the neural network was unable to successfully identify
the responsible vehicle. It is possible that detection of vehicles without
using the ignition pulse [14] could be accomplished if “noise-free” mea-
surements of the vehicle were available to better train the network and
to help form more useful parameters that characterize the vehicles in this
case. S. Smurtie et al. [15] presents a car emission surveillance scheme based
on IoT. Due to cars, the primary source of atmospheric taint occurs.
194 Chetan Shetty et al.
Detector
Predefined values
sensor Transducer
(standard values from
survey and government)
ADC
Fuel Injector
Microcontroller
GPS
controller, the fuel injector stops the fuel supply to the engine after a par-
ticular period of time. The overall block diagram of the proposed system is
given in Fig. 3.
L. Myllyvirta and S. Dahiya [2], National Air Quality Index (NAQI),
state that air pollution has become a major problem and a big threat to
the public health and hazardous to the environment. It has been stated that
more than 3 million deaths has been recorded over the year 2012 by World
Health Organization (WHO) and more than 6 lakhs of deaths in India
among them by estimated by global burden of diseases (GBD). After all this,
NAQI was introduced in India. NAQI measures the pollution level in
different areas and informs us about it. It generated its own data by using
IoT techniques. Realizing the need and importance of public health,
Central Pollution Control Board has started NAQI which plays major role
in creating awareness in people (Fig. 4).
NAQI concludes that however there is lot amount of data available for
16 cities all over India and more than 50 cities are suffering by air pollution
because of industrial clustering effecting more than a million people and
hence major steps has to be taken to prevent pollution (Fig. 5).
Dr. S. Guttikunda [5] explains about the outdoor air pollution spreading
very fast across many cities in both developing and developed countries. In
both type of countries, cities only differ in the air quality index values and obvi-
ously AQI is high in developing countries because of large urban industries.
196 Chetan Shetty et al.
Fig. 5 Different pollutants contribution to bad air quality in different cities by NAQI.
S. Kumar and D. Katoria [3] explain about the air pollution and its con-
trol measures, author defines air pollution as presence of any foreign material
in the air in excess quantity. Pollution has become a global challenge
effecting human health and environment and causing serious threats for
social well-being. Government and industries has to follow some strict
measures toward pollution control. Author says complains that fuel combus-
tion is the most important phenomena causing air pollution. So the author
suggests how to control the exhausts of the fuel combustion, mainly CO and
particulate matter (Fig. 6).
The author concludes that there are numerous ways of controlling air
pollution and using different fuels in automobiles is one type. Author also
represented various technologies embedded in industries like filtration of
flue gases before they are released to atmosphere using filter bags and
scrubbers.
3. Design
Architectural design is the process of defining a collection of hardware
and software components and their interfaces to establish the framework for
the development of a system. It defines the structure, behavior, and more
views of a system (Fig. 7).
The proposed system is lightweight and compact on automobiles. This
surely helps in reduction of harmful gaseous levels from vehicles. It provides
a guarantee that it would be a very big change in the prevention and control
measures for air pollution. The sensors and the other components used in
building this system cost very less and hence the system is cost effective.
TXD RXD
GND GND
Sensors RXD TXD
Connect RX,TX to
CO TTL RX,TX
HC
CO2
12V 2Amp
DC Adapter Arduino and GSM 12V 2Amp
DC Adapter
Vehicle Input
Input
Solenoid
Text LEDs
Message
Fig. 7 Architectural design.
Air pollution control model using machine learning 199
Apart from being cost effective, this system is high in performance as it uses
low power consumption sensors and also for the fact that these sensors are
highly precise in detection. If the value sensed by the sensors are higher than
the threshold value, the fuel supply is instantly cut off preventing the vehicle
to be mobile. A system architecture or systems architecture is the conceptual
model that defines the structure, behavior, and more views of a system. An
architecture description is a formal description and representation of a sys-
tem, organized in a way that supports reasoning about the structures and
behaviors of the system.
System architecture can comprise system components, the externally vis-
ible properties of those components, the relationships (e.g., the behavior)
between them. It can provide a plan from which products can be procured,
and systems developed, that will work together to implement the overall sys-
tem. There are two different models in this project. The modules are as
follows:
Module 1
Sensors are used to detect the pollutants released by the vehicle (Fig. 8).
We use three different types of sensors, namely, MQ7, MQ2, MQ135 to
collect different types of emissions. MQ7 is highly sensitive to carbon
monoxide. MQ2 is suitable for detecting gas leaks. MQ135 can be used
to detect NH3, NOx, alcohol, benzene, smoke, CO2, etc. The value col-
lected by each sensor is gathered at the Arduino board. Arduino has been
programmed in such a way that it collects data from different sensors and
compares it with standard values. There are six LED’s used to depict the
GAS SENSOR
ALERT
GSM MESSAGE
CO SENSOR ARDUINO
H2 SENSOR
LED
current status of different pollutants from which three of them are red
and are green. If the values received by the sensors are greater than
the standard values the LED lights go red. If the values are with in stan-
dard values then the LED lights remain green. If the pollutant values
remain to be greater than their standard value, Arduino passes the data
onto the GSM module. GSM module is responsible for sending alert
messages in order to notify the user.
The figure above depicts the architecture model of the hardware. The
sensors are connected to the Arduino board. Arduino board constantly
receives values from the sensors. All the LED lights are connected to the
Arduino board through a circuit. The GSM module and Arduino board
are connected via an interface. A mobile sim card is placed inside GSM
module. The sim card is used to send different alert messages to the
owner of the vehicles.
Model 2
The values gathered at the Arduino board are stored in a dataset. This helps
us keep track of the changes happening in the air at different points of time.
Once there are enough values present in the dataset, the data gathered can
be used to create a model that can make analysis and predictions (Fig. 9).
The figure above represents a model designed using machine learning
algorithms. The dataset consists of real-time data which has been col-
lected from different sensors. The dataset acts as an input to our model.
Dataset
Real Time data from
pollutants in Air
CO NO2 H2S PH
emission level saying that if issue not resolved immediately the vehicle will
be stopped in 10 min. Even after this, if his vehicle is still emitting extra emis-
sions then his fuel supply is blocked by the use of solenoid valve.
Row Actual_CO
82000 0.063786
82002 0.059671
82003 0.05144
82004 0.063786
82006 0.065844
82011 0.053498
82013 0.053498
82015 0.032922
82018 0.076132
82027 0.061728
82030 0.142546
82033 0.066042
82037 0.057613
82038 0.037037
82040 0.088477
82042 0.069959
82046 0.084362
82047 0.082305
82048 0.022634
82049 0.069959
82050 0.059671
82051 0.053498
82052 0.059671
82054 0.059671
82058 0.039095
82060 0.059671
82062 0.041152
82063 0.057613
82075 0.061728
Fig. 11 Sample of actual CO emission.
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
sX
T
t¼1 t
ðyb yt Þ2
RMSD ¼
n
where
RMED ¼ Root mean squared error
^y ¼ Predicted value
y ¼ Actual value
n ¼ no. of samples
T ¼ tuple
RMSD ¼ 0.06188289
Air pollution control model using machine learning 205
Row Predicted_CO
82000 0.058448
82002 0.050152
82003 0.058404
82004 0.061571
82006 0.066013
82011 0.070858
82013 0.063261
82015 0.058845
82018 0.066795
82027 0.068744
82030 0.082279
82033 0.082279
82037 0.070897
82038 0.068074
82040 0.081954
82042 0.062502
82046 0.071635
82047 0.056945
82048 0.060428
82049 0.05592
82050 0.057738
82051 0.072202
82052 0.062976
82054 0.05526
82058 0.056665
82060 0.057874
82062 0.043161
82063 0.064508
82075 0.064079
Fig. 12 Sample of predicted CO emission.
Threshold_for_MQ2 = 400;
Threshold_for_MQ7 = 300;
Threshold_for_MQ135(in ppm) = 500;
Set Solenoid Pin to High;
Print values_read_by_MQ2, values_read_by_MQ7, values_read_by_MQ135
counter=0;
If (HC > Threshold_for_MQ2) {
Red_LED_for_MQ2 set to High;
Green_LED_for_MQ2 set to Low;
counter=counter+1;
}
If (CO > Threshold_for_MQ7) {
Red_LED_for_MQ7 set to High;
Green_LED_for_MQ7 set to Low;
counter=counter+1;
}
If (CO2 > Threshold_for_MQ135) {
Red_LED_for_MQ135 set to High;
Green_LED_for_MQ135 set to Low;
counter=counter+1;
}
else {
Red_LED_for_MQ2 set to Low;
Green_LED_for_MQ2 set to High;
Red_LED_for_MQ7 set to Low;
Green_LED_for_MQ7 set to High;
Red_LED_for_MQ135 set to Low;
Green_LED_for_MQ135 set to High;
}
If(counter>=3) {
SendMessage();
wait(10 minutes);
Set Solenoid Pin to Low;
}
}
One graph shows average values of the particular pollutant in all s stations,
and all such graphs are combined (Fig. 13).
This graph shows the overall average values of the pollutants in every
station all over Bangalore (Fig. 14).
Fig. 13 Average values of pollutants in each station.
208 Chetan Shetty et al.
WS
WD
SR
SO2
RH
PM2.5
Ozone
NOx
Mean value range
NO2
NO
Stations
120 120
CO
40 80
40
80
Pollutants
The above graph depicts the error rate generated for individual trees in a
random forest. As the number of trees increase we can see reduction in the
error rates (Fig. 22).
This diagram depicts the prediction error realized during the testing pro-
cess after tuning the parameters of random forest algorithm (Figs. 23–25).
5. Conclusion
Over the last few decades there has been an increase in the rate of pol-
lution, leading to several environmental issues. There will be an enormous
population that does not take the pollution from their cars seriously, which
has already caused several environmental issues like depletion of the ozone
layer and so on. So, this scheme is going to be very useful to curb this issue.
Smart emission surveillance system’s primary goal is to create it more inno-
vative, user friendly, time saving and also more effective than the current
system. Using smart systems not only takes a step forward in environmental
quality, it also enables car owners save a lot of unnecessary problems
212 Chetan Shetty et al.
3000
2500 Random Forest
Error
2000
1500
300
OOBError
200
100
0
3 6 9
mtry
Fig. 25 OOB error rate.
216 Chetan Shetty et al.
References
[1] Ghewari MU, Mahamuni T, Kadam P, Pawar A: Vehicular pollution monitoring using
IoT, Int Res J Eng Technol 05(02).
[2] Myllyvirta L, Dahiya S: A Status Assessment of National Air Quality Index (NAQI) and
Pollution Level Assessment for Indian Cities, 2015: 2015, Greenpeace India greenpeace.
org/india. https://www.greenpeace.org/india/Global/india/2015/docs/India-NAQI-
PRESS.pdf.
[3] Kumar S, Katoria D: Air pollution and its control measures, Int J Environ Eng Manag
4(5):445–450, 2013. https://pdfs.semanticscholar.org/ed3f/1297ea9b3576c592587a6
960ce198daa9d0a.pdf.
[4] Rose Sweetlin T, Priyadharshini D, Preethi S, Sulaiman S: Control of vehicle pollution
through Internet of things (IOT), Int J Adv Res Ideas Innov Technol 3(2) Available online
at, www.ijariit.com.
[5] Guttikunda S: Air Quality Index (AQI): Methodology & Applications for Public
Awareness in Cities, 2010: http://www.urbanemissions.info/wp-content/uploads/
docs/SIM-34-2010.pdf.
[6] Kspcb: http://kspcb.kar.nic.in/.
[7] Hunshal B, Patil D, Surannavar K, Tatwanagi MB, Nadaf SP: Vehicular pollution mon-
itoring system and detection of vehicles causing global warming, Int J Eng Sci Comput
7(6):12611, 2017.
[8] https://en.wikipedia.org/wiki/Arduino.
[9] https://en.wikipedia.org/wiki/PyCharm.
[10] Lolge SN, Wagh SB: A review on vehicular pollution monitoring using IoT, Int J Electr
Electron Eng 9(01):745, 2017.
[11] Usha S, Naziya Sultana A, Priyanka M, Sumathi: Vehicular pollution monitoring using
IoT. In National Conference on Frontiers in Communication and Signal Processing Systems
(NCFCSPS ’17), vol. 6, 2017, An ISO 3297: 2007 Certified Organization. Special
Issue 3.
[12] Bangal SP, Gite Pravin E, Ambhure Shankar G, Gaikwad Vaibhav M: IoT based vehicle
emissions monitoring and inspection system, Int J Innov Res Electr Electron Instrum Control
Eng 5(4):410, 2017, ISO 3297:2007 Certified.
[13] https://en.wikipedia.org/wiki/GSM.
[14] https://www.sparkfun.com/products/9403.
[15] Smruthie S, Suganya G, Gowri S, Sivaneshkumar A: Vehicular pollution monitoring
using IoT, Int J Digit Commun Netw 2: 2014.
[16] Sarella G, Khambete AK: AMbient air quality analysis using air quality index—a case
study of Vapi, Int J Innov Res Sci Technol 1(10):21319, 2015.
Further reading
[17] http://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ2/.
[18] https://www.olimex.com/Products/Components/Sensors/SNS-MQ135/resources/
SNS-MQ135.pdf.
[19] https://www.rhydolabz.com/sensors-gas-sensors-c-137_140/air-quality-sensor-mq135-
p-1115.html.
[20] http://events.awma.org/files_original/ControlDevicesFactSheet07.pdf.
Air pollution control model using machine learning 217