Air Quality Report - SW
Air Quality Report - SW
Air Quality Report - SW
Nowadays air pollution has turned out to be one of the significant issues because of increment in the
quantity of vehicles and during the time spent industrialization and urbanization. This expansion in the
level of contamination brings about destructive consequences for prosperity. This project explains the
depiction and execution of an Air Pollution detection system. The innovation grasped here, is a hands-on
execution of the idea of Internet of Things. This detailed work is an exploration of the possibilities of
consumption of this innovation, in this world, where natural well-being is turning into a genuine risk.
The work is actualized utilizing microcontroller board of Arduino. In this project I am going to make an
IoT based Air Pollution Detection Monitoring System in which I will monitor the Air Quality over a web
server using ESP8266 Wi-Fi device and will a trigger alarm when the air quality goes down a certain
level means when there is amount of harmful gases is present in the air like CO2. It will show the air
quality in PPM (Parts Per Million) as like “Fresh Air”, “Poor Air”, “Danger Air” on LCD and webpage
so that I can monitor it very easily.
As the world’s population is becoming increasingly urban, the cities are under pressure to remain
livable. In recent years, the air quality of the cities has become one of the major cause of concern
around the world. Thus, it is necessary to constantly monitor the air quality index of a city to make it
smart and livable. In this paper, we propose and develop an IoT based Air Quality Monitoring System
for Smart Cities. The real-time data of the air quality is accessed through the smart devices and
analyzed to measure the impact on city dwellers. The smart devices are capable of measuring the
Temperature, Humidity, Carbon Monoxide, LPG, Smoke and other hazardous particulate matters like
PM2.5 and PM10 levels in the atmosphere. The gathered data is accessible globally through an Android
Application.
i
TABLE OF CONTENTS
Abstract I
Declaration II
Acknowledgement III
Table of Contents IV
CHAPTER NO. CHAPTER NAME PAGE NO.
Chapter 1 INTRODUCTION
1.1 Basic Topics of the project 1
1.2 Problem Definition 2
1.3 Scope of the Project 4
1.4 Motivation 5
1.5 Objective 6
1.6 Organization of the Report 6
Chapter 2 LITERATURE SURVEY
2.1 Introduction 7
2.2 Related Work 7
Chapter 3 SYSTEMREQUIREMENT SPECIFICATION
3.1 Introduction 13
3.2 Functional requirements 13
3.3 Non Functional requirements 14
3.4 Hardware requirements 15
3.5 Software requirements 15
3.6 Preliminary Investigation 16
3.7 System Environment 16
Chapter 4 SYSTEM ANALYSIS
APPENDIX B REFERENCES 23
ii
CHAPTER 1
INTRODUCTION
1.1 INTODUCTION
Air Pollutants:
An air pollutant is a material in the air that can have adverse effects on humans
and the ecosystem. The substance can be solid particles, liquid droplets, or gases. A
pollutant can be of natural origin or man-made. Pollutants are classified as primary
or secondary.Primary pollutants are usually produced by processes such as ash from
a volcanic eruption.Other examples include carbon monoxide gas from motor vehicle
exhausts or Sulphur dioxide released from the factories. Secondary pollutants are not
emitted directly. Rather, they form in the air when primary pollutants react or interact.
Ground level ozone is a prominent example of secondary pollutants. Some pollutants
may be both primary and secondary: they are both emitted directly and formed from
other primary pollutants
1
Air Quality Monitoring and Prediction using Machine Learning Introduction
PM 2.5 & PM 10
Carbon dioxide (CO2) – Because of its role as a greenhouse gas it has been described as
"the leading pollutant" and "the worst climate pollution". Carbon dioxide is a natural
component of the atmosphere, essential for plant life and given off by the human respiratory
system. This question of terminology has practical effects, for example as determining
whether the U.S. Clean Air Act is deemed to regulate CO2 emissions. CO2 currently forms
about 410 parts per million (ppm) of earth's atmosphere, compared to about 280 ppm in pre-
industrial times, and billions of metric tons of CO2 are emitted annually by burning of fossil
fuels. CO2 increase in earth's atmosphere has been accelerating.
Sulfur oxides (SOx) – particularly Sulphur dioxide, a chemical compound with the formula
SO2. SO2 is produced by volcanoes and in various industrial processes. Coal and petroleum
often contain Sulphur compounds, and their combustion generates Sulphur dioxide. Further
oxidation of SO2, usually in the presence of a catalyst such as NO2, forms H2SO4, and thus
acid rain. This is one of the causes for concern over the environmental impact of the use of
these fuels as power sources.
Nitrogen oxides (NOx) – Nitrogen oxides, particularly nitrogen dioxide, are expelled from
high temperature combustion, and are also produced during thunderstorms by electric
Air Quality Monitoring and Prediction using Machine Learning Introduction
discharge. They can be seen as a brown haze dome above or a plume downwind of cities.
Nitrogen dioxide is a chemical compound with the formula NO2. It is one of several nitrogen
oxides. One of the most prominent air pollutants, this reddish-brown toxic gas has a
characteristic sharp, biting odor.
Volatile organic compounds (VOC) – VOCs are a well-known outdoor air pollutant. They
are categorized as either methane (CH4) or non-methane (NMVOCs). Methane is an
extremely efficient greenhouse gas which contributes to enhanced global warming. Other
hydrocarbon.
VOCs are also significant greenhouse gases because of their role in creating ozone and
prolonging the life of methane in the atmosphere. This effect varies depending on local air
quality. The aromatic NMVOCs benzene, toluene and xylene are suspected carcinogens and
may lead to leukemia with prolonged exposure. 1,3-butadiene is another dangerous
compound often associated with industrial use.
1.3 Motivation
Air pollution is one of the greatest threats we are facing today. It is rapidly increasing
due to various human activities, and the occurrence of particulates, chemicals, or biological
resources into the environment that cause unexpected, humans' death, or disease, damage
source of revenue, or spoil the natural environment. The direct impact of air pollution
problems on human health resulted in an increased public awareness of the air quality in
developing and developed countries. The commonly occurring pollutants include carbon
monoxide (CO2), Respirable Suspended Particulate Matter (RSPM), Sulphur dioxide (SO2),
Nitrogen dioxide (NO2), Ozone etc.
The increase in the concentration of pollutants in the air will be life-threatening and will
cause several diseases. So, it is necessary to monitor and forecast the criteria pollutants in the
air. The prediction of air pollutants can be made through models. In most of the air quality
predictions, Gaussian dispersion models are used. These dispersion models have some
physical basis. So, information about the source of pollutants and other parameters are not
known to us. Statistical models can be used to overcome these difficulties. They are capable
of forecasting the concentration of pollutants in air. The AQI is defined as an index or rating
scale for reporting the daily combined effect of ambient air pollutants recorded in the
monitoring sites.
1.4 OBJECTIVES
The proposed system entitled "Air Quality Index Prediction and Classification" aimed
to predict AQI of future month-wise and classify them in different categories.
To design a system which will help common people as well as those in the
meteorological department to detect and predict pollution levels .
The proposed system entitled "Air Quality Index Prediction and Classification" aimed
to predict AQI of future month-wise and classify them in different categories.
To design a system which will help common people as well as those in the
meteorological department to detect and predict pollution levels and take the
necessary action following that. Also, this will help the public set up a data source for
small localities which are usually left out in comparison to the large cities.
Air Quality Monitoring and Prediction using Machine Learning Introduction
LITERATURE SURVEY
By studying literature, it seems that several classification methods have been
developed for “AI Based image classification Techniques”. Literature survey is the most
important step in software development process. Before developing the tool it is necessary to
determine the time factor, economy and company strength. Once these things are satisfied,
then next step is to determine which operating system and language can be used for
developing the tool. Once the programmer start building the tool the programmers need lot
of external support. This support can be obtained from senior programmers, from book or
from websites.
AUTHORS: - Mushtak Sayyed, Adesh Salunkhe, Akshay Sarode and Swaraj Desai
Due to large scale industrialization and advances in technology there has been increased
pressure on mother nature. This includes air pollution that is somewhat like a bad omen for
humanity. There have been a lot of steps taken to reduce pollution but it has been of no avail.
To provide a solution to this ongoing crisis, there needs to be some kind of air pollution level
prediction technique that can be utilized.
AUTHORS:- Venkat Rao Pasupuleti; Uhasri; Pavan Kalyan; Srikanth; Hari Kiran Reddy
The air quality monitoring system measures various air pollutants in various locations to
maintain good air quality. It is the burning issue in the present scenario. Air is contaminated
by the arrival of dangerous gases into the climate from the industries, vehicular emissions,
etc.. Nowadays, air pollution has reached critical levels and the air pollution level in many
major cities has crossed the air quality index value as set by the government. It has a major
impact on the health of the human. With the advancement in technology of machine
learning, it is now possible to predict the pollutants based on the past data.
7
[3] PREDICTION OF AIR QUALITY INDEX BY
EXTERNAL LEARNING
Machines (ELM) algorithm. For this purpose, six parameters have been selected which can
affect the AQI. These are temperature, humidity, pressure, wind speed, PM10 and SO2
respectively. First of all, “Forecast Sheet” application that presented in the Excel environment
and the correlation analysis were used to determine the relationship status between these six
parameters and AQI.
Air pollution and its prevention are constant scientific challenges during last decades. However,
they still remain huge global problems. Affecting human’s respiratory and cardiovascular system,
they are cause or increased mortality and increased risk for diseases for the population. Many
efforts from both local and state government are done in order to understand and predict air
quality index aiming improved public health.
AUTHORS: - Shreyas Simu; Varsha Turkar; Rohit Martires; Vranda Asolkar; Swizel Monteiro
Industrial pollution is one of the most serious problems faced today. Long-term exposure to air
pollution causes severe health issues including respiratory and lung disorders. Presently laws
regarding industrial pollution monitoring and control are not stringent enough. The working
dataset includes parameters of air in terms of ambient air as well as of the stack emission. On
this data, various Machine Learning (ML) algorithms were applied for prediction of emission
rate, and comparative analysis is done.
[7] Air Quality Prediction and Monitoring using Machine Learning Algorithm
basedIoT sensor- A researcher's perspective
MachineLearningAUTHORS: - Rishanti,
Murugan,
Naveen Palanichamy
Air pollution in smart cities in the world has been drastically increasing lately and the
increase inthe concentration of particulate matter (PM 2.5) in the air is a threat for
thecountry and citizens as it can out-turn unbearable consequences such as
cardiovasculardisease and worsen asthma. PM 2.5 is a deadly air pollutant that is a
mixture of solid and liquid coarse particles and has a diameter of 2.5 micrometres. In
Malaysia, traffic congestion has been the main contributor to developing air pollution in
TimeAirQuality Monitoring
AUTHORS: - Varsha Hable-Khandekar; Pravin Srinath
Air Pollution has become major, serious problem worldwide. Because of its close relation to
human health, it has gained a lot of attention of many researchers. People are becoming cautious
about better ways of monitoring air quality information and has become important toprotect human
health from serious health problems caused by air pollution. Many researchers areworking on real-
time air quality monitoring and forecasting for getting accurate results.
3.2 FUNCTIONALREQUIREMENTS
A function of software system is defined in functional requirement and the behavior of the
system is evaluated when presented with specific inputs or conditions which may include
calculations, data manipulation and processing and other specific functionality. The functional
requirements of the project are one of the most important aspects in terms of entire mechanism
of modules.
11
Air Quality Monitoring and Prediction using Machine Learning System Requirements
The structure must be reliable and strong in giving the functionalities. The
movements must be made unmistakable by the structure when a customer has revealed a
couple of enhancements. The progressions made by the Programmer must be Project
pioneer and in addition the Test designer.
Maintainability
The system watching and upkeep should be fundamental and focus in its approach.
There should not be an excess of occupations running on diverse machines such that it
gets hard to screen whether the employments are running without lapses.
Performance
The framework will be utilized by numerous representatives all the while. Since the
system will be encouraged on a single web server with a lone database server outside of
anyone's ability to see, execution transforms into a significant concern. The structure
should not capitulate when various customers would use everything the while. It should
allow brisk accessibility to each and every piece of its customers. For instance, if two
test specialists are all the while attempting to report the vicinity of a bug, then there
ought not to be any irregularity at the same time.
Portability
Flexibility
3.4 HARDWAREREQUIREMENTS
Arduino uno
Gas sensors
Wifi module
Power supply
Lcd display
Modules
Data cleaning / modeling
Modules Description:
Data Integration
Data Transformation
Data Reduction
Air Quality Monitoring and Prediction using Machine Learning System Requirements
The interpolation, prediction, and feature analysis of fine-gained air quality are three
important topics in the area of urban air computing. The solutions to these topics can provide
extremely useful information to support air pollution control, and consequently generate great
societal and technical impacts. Most of the existing work solves the three problems separately
by different models.
APPLICATIONS
It is used to measure of how air pollution affects one's health within a short time period
Come to know about the pollution at hospitals and publics places to avoid the
breathability
Air quality prediction is mainly used for asthma patients to be precautioned.
AQI prediction will overcome by planting trees and controlling human if it is unhealthy
Roadside pollution Monitoring.
Industrial perimeter Monitoring.
Site selection for reference monitoring stations.
Indoor Air Quality Monitoring.
To make this data available to the common man.
20
CHAPTER 5
METHODOLOGY and IMPLEMENTATION
Block diagram
Internet of Things (IoT) mainly deals with connecting smart devices to internet by joining
the advantage of OSI layered Architecture. In the context of this work we propose a cluster
of Air Quality Monitoring Gas Sensor MQ135, MQ2, MQ4, MQ7 motes, which are used to
measure the concentration of Air pollutants in the air. The Gas Sensors MQ135 is interface
with a tiny entrenched platform equipped with other. We have mainly used the Arduino
UNO which is an open source development boards with ESP8266-12E chips. M MQ135,
MQ2, MQ4, MQ7 Q135 Gas Sensors is used to collect gas concentration measurements.
This sensor data would be captured and sent to the Arduino UNO for IoT (Internet of
Things) based data acquirement.
The sensor data will be updated to cloud using a iot module ESP8266. The cloud using in
our project is thingspeak, the thingspeak reads the data from the ESP8266 and visualize the
sensor data. The machine learning module gets the data from the thingspeak and analyize
the result using machine learning algorithms. Predict the air quality based on the obtained
result.
21
Components description
Arduino Uno:
Arduino specification:
Microcontroller ATmega328P
22
OperatingVoltage 5v
Input voltage 7-12v
Input voltage limit 6-20v
Digital I/O Pins 6
Analogue input Pins 6
DC current perI/O pins 20 mA
DC current for 3.3v Pin 50 mA
Flash Memory Of which o.5KB is used
SRAM 2 KB
EEPROM 1KB
Clock Speed 16MHz
Length 68.6mm
Width 53.4nm
Weight 25g
Gas sensor
Features
23
Type of gas sensor
MQ2- this sensor is used for gas leakage detection
MQ4- this sensor is used for metal oxide detection
MQ7- this sensor is used for CO gas detection
M135- this sensor is used for wide range of gasses. It is a air quality sensor
LCD DISPLAY
The pin configuration of LCD 16 X 2 is discussed below so that LCD 16×2 connection can be done easily
with external devices.
24
16X2 LCD Pin Diagram
Working Principle
The basic working principle of LCD is passing the light from layer to layer through modules. These
modules will vibrate & line up their position on 90 o that permits the polarized sheet to allow the light to
pass through it.
NodeMCU
26
The NodeMCU (Node MicroController Unit) is an open-source software and hardware development
environment built around an inexpensive System-on-a-Chip (SoC) called the ESP8266. The ESP8266,
designed and manufactured by Espressif Systems, contains the crucial elements of a computer: CPU, RAM,
networking (WiFi), and even a modern operating system and SDK. That makes it an excellent choice for
Internet of Things (IoT) projects of all kinds.
However, as a chip, the ESP8266 is also hard to access and use. You must solder wires, with the
appropriate analog voltage, to its pins for the simplest tasks such as powering it on or sending a keystroke
to the “computer” on the chip. You also have to program it in low-level machine instructions that can be
interpreted by the chip hardware. This level of integration is not a problem using the ESP8266 as an
embedded controller chip in mass-produced electronics. It is a huge burden for hobbyists, hackers, or
students who want to experiment with it in their own IoT projects.
But, what about Arduino? The Arduino project created an open-source hardware design and software SDK
for their versatile IoT controller. Similar to NodeMCU, the Arduino hardware is a microcontroller board
with a USB connector, LED lights, and standard data pins. It also defines standard interfaces to interact
with sensors or other boards. But unlike NodeMCU, the Arduino board can have different types of CPU
chips (typically an ARM or Intel x86 chip) with memory chips, and a variety of programming
environments. There is an Arduino reference design for the ESP8266 chip as well. However, the flexibility
of Arduino also means significant variations across different vendors. For example, most Arduino boards
do not have WiFi capabilities, and some even have a serial data port instead of a USB port.
NodeMCU Specifications
27
The NodeMCU is available in various package styles. Common to all the designs is the base ESP8266 core.
Designs based on the architecture have maintained the standard 30-pin layout. Some designs use the more
common narrow (0.9″) footprint, while others use a wide (1.1″) footprint – an important consideration to be
aware of.
The most common models of the NodeMCU are the Amica (based on the standard narrow pin-spacing) and
the LoLin which has the wider pin spacing and larger board. The open-source design of the base ESP8266
enables the market to design new variants of the NodeMCU continually.
Amica NodeMCU measures 49mm x 26mm with a standard pin space of 0.1″ between pins and 0.9″
between rows.
The Amica NodeMCU is approximately 25% smaller in size than a closely compatible LoLin style
NodeMCU
28
Official Amica NodeMCU
on Carrier Board
Amico NodeMCU mounted to a 102mm x 51mm carrier board with dual DB-09 male/female connectors
Lolin
NodeMCU
LoLin style NodeMCU measures 58mm x 32mm with a pin spacing of 0.1″ between pins and 1.1″ between
rows
NodeMCU Technical Specifications
NodeMCU Pinout and Functions Explained
29
I2C Pins are used to connect I2C sensors and peripherals. Both I2C Master and I2C Slave are
supported. I2C interface functionality can be realized programmatically, and the clock frequency is
100 kHz at a maximum. It should be noted that I2C clock frequency should be higher than the
slowest clock frequency of the slave device.
30
GPIO Pins NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such as I2C,
I2S, UART, PWM, IR Remote Control, LED Light and Button programmatically. Each digital
enabled GPIO can be configured to internal pull-up or pull-down, or set to high impedance. When
configured as an input, it can also be set to edge-trigger or level-trigger to generate CPU interrupts.
ADC Channel The NodeMCU is embedded with a 10-bit precision SAR ADC. The two functions
can be implemented using ADC. Testing power supply voltage of VDD3P3 pin and testing input
voltage of TOUT pin. However, they cannot be implemented at the same time.
UART Pins NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which provide
asynchronous communication (RS232 and RS485), and can communicate at up to 4.5 Mbps.
UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for communication. However, UART1
(TXD1 pin) features only data transmit signal so, it is usually used for printing log.
SPI Pins NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave and master modes. These
SPIs also support the following general-purpose SPI features:
4 timing modes of the SPI format transfer
Up to 80 MHz and the divided clocks of 80 MHz
Up to 64-Byte FIFO
PWM Pins The board has 4 channels of Pulse Width Modulation (PWM). The PWM output can be
implemented programmatically and used for driving digital motors and LEDs. PWM frequency
range is adjustable from 1000 μs to 10000 μs (100 Hz and 1 kHz).
Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip Enable pin (EN),
Reset pin (RST) and WAKE pin.
EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the chip works
at minimum power.
RST: RST pin is used to reset the ESP8266 chip.
31
WAKE: Wake pin is used to wake the chip from deep-sleep.
Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip Enable pin
(EN), Reset pin (RST) and WAKE pin.
EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the chip works
at minimum power.
RST: RST pin is used to reset the ESP8266 chip.
WAKE: Wake pin is used to wake the chip from deep-sleep.
AURDINO SUITE
INTRODUCTION TO THE ARDUINO IDE
It is a single-board microcontroller solution for many DIY projects; a look into the
Integrated Development Environment (IDE) that is used to program the Aurdino is given below.
The installer is downloaded, IDE installation is done. Arduino IDE is an open source software that
is mainly used for writing and compiling the code into the Arduino Module. It is an official Arduino
software, code compilation is made easy enough that even a common person with no prior technical
knowledge can make use of the software. IDE allows program writing, code verification, compiling,
and uploading to the Arduino development board. Intended for artists, designers, hobbyists, or
anyone interested in creating interactive objects or environments.
The Arduino IDE is incredibly minimalistic, yet it provides a near-complete environment for
most Arduino-based projects. The middle section of the Arduino IDE comprises of a simple text
editor, where the program code is inputted. The bottom section of the IDE is dedicated to an output
window that is used to see the status of the compilation, i.e., how much memory been used, any
errors found in the program, and various other useful messages.
Projects made using the Arduino are called sketches, and such sketches are usually written
in a cut-down version of C++ (a number of C++ features are not included). Programming a
microcontroller is different from programming a computer, there are a number of device-specific
libraries (e.g., changing pin modes, output data on pins, reading analog values, and timers). The
Arduino is programmed in C++. It uses unique libraries for the device.
While more advanced projects take advantage of the built-in tools in the IDE, most projects rely on
the six buttons found below the menu bar.
1. The check mark is used to verify the code. To be used once the code has been written.
2. The arrow uploads the code to the Arduino to run.
3. The dotted paper creates a new file.
32
4. The upward arrow is used to open an existing Arduino project.
5. The downward arrow is used to save the current file.
6. The right corner button is a serial monitor, which transmits data from the Arduino to the PC for
debugging purposes.
33
KEY FEATURES OF PYTHON
• Python language is more expressive means it is more understandable and readable.
• Python downloads with a large library that one can use so we don’t have to write our own code for every
single thing.
• There are libraries for regular expressions, documentation-generation, unit-testing, web browsers,
threading, databases, email, image manipulation, and lot of other functionality.
• Python is a dynamically-typed language means that the type for a value is decided at runtime, not in
advance.
• Hence, there is no need to specify the type of data while declaring it. Since, it is an interpreted language
the interpreter executes the code or statements line by line at a time.
PYTHON GUI
Python provides Graphical User Interface which exhibits one or more windows consisting of
controls known as components which facilitates user to accomplish interactive task. User need not want to
create script or write commands in command prompt. Instead user must be aware of how the programs are
performs to accomplish tasks. It includes Radio buttons, Toolbars, Sliders, Axes etc. Tools also help users
to read and write data and communicate with other GUI’s. Data are displayed in forms of tables or plots in
GUI.
34
JUPITER NOTEBOOK
• The notebook web application: An interactive web application for writing and running code
interactively and authoring notebook documents.
• Kernels: Separate processes started by the notebook web application that runs users’ code in a given
language and returns output back to the notebook web application. The kernel also handles things like
computations for interactive widgets, tab completion and introspection.
• Notebook documents: Self-contained documents that contain a representation of all content visible
in the notebook web application, including inputs and outputs of the computations, narrative text, equations,
images, and rich media representations of objects. Each notebook document has its own kernel.
Notebook web application
The notebook web application enables users to:
• Edit code in the browser, with automatic syntax highlighting, indentation, and tab
completion/introspection.
• Run code from the browser, with the results of computations attached to the code which generated
them.
• See the results of computations with rich media representations, such as HTML, LaTeX, PNG,
SVG, PDF, etc.
• Create and use interactive JavaScript widgets, which bind interactive user interface controls and
visualizations to reactive kernel side computations.
35
• Author narrative text using the Markdown markup language.
• Include mathematical equations using LaTeX syntax in Markdown, which are rendered in-browser
by MathJax.
Kernels
Through Jupyter’s kernel and messaging architecture, the Notebook allows code to be run in a range of
different programming languages. For each notebook document that a user opens, the web application starts
a kernel that runs the code for that notebook. Each kernel is capable of
Python(https://github.com/ipython/ipython
• Julia (https://github.com/JuliaLang/IJulia.jl)
• R (https://github.com/IRkernel/IRkernel)
• Ruby (https://github.com/minrk/iruby)
• Haskell (https://github.com/gibiansky/IHaskell)
• Scala (https://github.com/Bridgewater/scala-notebook)
• node.js (https://gist.github.com/Carreau/4279371)
• Go (https://github.com/takluyver/igo)
The default kernel runs Python code. The notebook provides a simple way for users to pick which of these
kernels is used for a given notebook.
Each of these kernels communicate with the notebook web application and web browser using a JSON over
ZeroMQ/WebSockets message protocol that is described here. Most users don’t need to know about these
details, but it helps to understand that “kernels run code.”
Notebook documents
Notebook documents contain the inputs and outputs of an interactive session as well as narrative text
that accompanies the code but is not meant for execution. Rich output generated by running code,
including HTML, images, video, and plots, is embeddeed in the notebook, which makes it a complete and
self-contained record of a computation
When you run the notebook web application on your computer, notebook documents are just files on your
local filesystem with a ``.ipynb`` extension. This allows you to use familiar workflows for organizing your
notebooks into folders and sharing them with others.
Notebooks consist of a linear sequence of cells. There are three basic cell types:
• Code cells: Input and output of live code that is run in the kernel
36
MACHINE LEARNING MODULE
LINEAR REGRESSION
Linear Regression is used to predict the real values using continuous variables. It is used in many areas
such as Economics, Finance, Biology, etc.
• Linear Relationship: The relationship between independent and dependent variables should be linear.
Using the scattered graph, the linearity is tested.
• Little or No Multi Co-linearity between the dependent variable and independent variable.
• Little or No Auto-Correlation: Auto co-relation is the replica of delay of its function. In linear
regression, it is assumed that there is no autocorrelation.
• Dependent Residual errors: It occurs when there is too much dependency among the independent
variables.
37
The equation of the line is given by Yp = Xi(a + b), Where Yp is predicted variable, Xi is independent
variable, a is slope and b is the intercept. The error E is,
which is the square of the difference between actual output to the predicted output, where AP is actual
output and PO is predicted output. The Fig shows the flow chart of LR used in calculating AQI.
CONCLUSION
In this project IoT based on measurement and display of Air Quality Index (AQI), Humidity and
Temperature of the atmosphere have been performed. From the information obtained from the
project, it is possible to calculate Air Quality in PPM. The disadvantage of the MQ135, MQ2, MQ4,
MQ7 sensor is that specifically it can’t tell the Carbon Monoxide or Carbon Dioxide level in the
atmosphere, but the advantage of MQ135, MQ2, MQ4, MQ7 is that it is able to detect smoke, CO,
CO2, NH4, etc harmful gases. After performing several experiments, it can be easily concluded that
the setup is able to measure the air quality in ppm, the temperature in Celsius and humidity in
percentage with considerable accuracy. The results obtained from the experiments are verified
through Google data. Moreover, the led indicators help us to detect the air quality level around the
setup. However, the project experiences a drawback that is it cannot measure the ppm values of the
pollutant components separately. This could have been improved by adding gas sensors for different
pollutants. But eventually, it would increase the cost of the setup and not be a necessary provision to
monitor the air quality. Since it’s an IOT-based project, it will require a stable internet connection
for uploading the data to the ThinkSpeak cloud. Therefore, it is possible to conclude that the
designed prototype can be utilized for air quality, humidity and temperature of the surrounding
atmosphere successfully.
FUTURE SCOPE
The future scope is that device which we are having can be done in a compact way by reducing the
size of the device for further implementation or the modifications which can be is that detecting the
vehicles amount of pollution which can be determined. In future the range can be made increased
38
according to the bandwidth for the high range frequencies. Further research can be made by making
the people in the right direction for their welfare. Therefore, there is another beneficiary by using
this device in an app so the all can be used in an GSM mobile phones for their daily updates by
increasing their range
BIBILOGRAPHY
[1] Air Pollution Prediction Using ML
AUTHORS: - Mushtak Sayyed, Adesh Salunkhe, Akshay Sarode and Swaraj Desai
[7] Air Quality Prediction and Monitoring using Machine Learning Algorithm based
IoT sensor- A researcher's perspective
AUTHORS: - G. Kalaivani; P. Mayilvahanan
[9] Machine Learning Techniques for Air Quality Forecasting and Study on Real-Time Air
39
Quality Monitoring
AUTHORS: - Varsha Hable-Khandekar; Pravin Srinath
40
APPENDIX A
ACRONYMS
Acronyms are the words which are formed from the first letters of other words, and
which are pronounced as words. The abbreviations used in our project report is as follows:
41
APPENDIX B
REFERENCES
42