Smart Environment Monitoring System using Unmanned Aerial Vehicle in Bangladesh

Greenhouse gases have inﬂuenced in enormous ways to global warming and climate change. The alarming rise of the toxic gases poses a serious threat to the future of mankind. Traditionally wireless sensor based monitoring systems have been used to monitor the concentration of greenhouse gases in the environment. It is not always possible to access the area of interest to deploy the sensor node or even do maintenance in case of failure. Therefore in this paper we proposed and implemented unmanned aerial vehicle (UAV) based greenhouse gases monitoring system which assembles humidity sensor, gas sensors and temperature sensors. The proposed UAV system equipped with sensors collect data from the atmosphere and predicting future humidity, temperature and gasses. In this paper, we collect these data from three di ﬀ erent areas Uttara, Aftabnagar and Mirpur in Bangladesh. Our analysis shows that air quality is better in Aftabnagar, though it is variable depending on the di ﬀ erent time of the day. For automatic collection of environmental sample, our proposed system mainly features high precision of aerial platform.


Introduction
Greenhouse gases are essential for the survival of all living beings on earth.These gases warm the atmosphere of the earth by holding some of the sun's heat energy and steadies the rate at which the Ultra Violate (UV) rays are reflected back into space. This is known as the Greenhouse Effect.Since the time of industry revolution which happened back in between 18th to 19th century, there has been a constant rise of the concentration of greenhouse gases and it caused an increase of the average global temperature around 1 o C in earth atmosphere [1]. With the current climate policies in the play, projected temperature rise will be 3.1 − 3.7 o C by 2100 and can be 4.1 − 4.8 o C if no polices are applied [2]. Besides the rise in average global temperature, the greenhouse effect causes the increase of the sea level by 19 cm from 1901 to 2010 * Corresponding author. Email: s.r.sabuj@ieee.org by melting the sea ice approximately 1.07 × 10 6 km 2 per decade [3]. The primary greenhouse gases in earth atmosphere are Carbon dioxide (CO 2 ), Nitrous oxide, water vapor, Methane and fluorinated gases. According to data published by US environmental protection agency the main proportion of greenhouse gas emission is CO 2 . Compared to all the continents in the world, Asia is highest (53%) in the carbon emission, North America is the in second highest (18%) followed by EU (17%) and rest 3-4% are from Africa and South America [2]. The concentration of the CO 2 is rising gradually since the industry revolution and considered as one of the instrument to aggrevate environmental hazard for living beings on earth [4].
Like many other countries of the world, Bangladesh is also facing this disastrous calamity directly. We all know that Bangladesh is 10 th densely populated country in the world. For keeping up the pace with the modern world the number of mills, factories are increasing rapidly and in an unplanned way. The 1 EAI Endorsed Transactions on Smart Cities Online First

EAI Endorsed Transactions on Smart Cities
Research Article Figure 1. Carbon dioxide equivalent emission from various industries in Bangladesh [6].
increasing number of vehicles such as cars, buses and other diesel engines are contributing to the rise of greenhouse gases which led the country to become 135 st in the list of all livable countries in the world [5]. Figure  1 shows the CO 2 equivalent emission in Bangladesh from various industries.
To control and mitigate the impact of emission of the greenhouse gases, monitoring the environment is an essential activity. There are number of studies conducted to monitor the emission of greenhouse gases in the environment using wireless sensor networks [7] where a sensor node is deployed in an area of interest to collect the data.Later, the data collected by the sensors is sent to a base station where the data can be stored for analysis and processing. However, it is not always possible to access the area of interest to deploy the sensor node or even do maintenance in case of failure. Therefore in this paper we proposed a smart environment monitoring (SmartEM) method by using an unmanned aerial vehicle (UAV) to collect and process the data. UAV-based data acquisition is an effective solution for retrieving sensor data, even from inaccessible locations. A UAV can move over the sensor network and retrieve data from the sensor nodes. This reduces energy consumption and avoids long transmission distances and redundant transmissions. An UAV is built with few sensors -dampness sensor (DHT11), gas sensors (MQ2, MQ7, and MQ135) and temperature sensors (TCH11, TCH22) to gather the information of -temperature, dampness, level of CO 2 , carbon mono-oxide (CO), methane, Nitrous oxide and different gases. Hence, by gathering this information for certain days a mathematical model can be formulated to forecast the condition of the region. Furthermore, by observing the outcome for a zone, some mitigation techniques can be planned such as planting trees, removing the factory or environment friendly manner and so on.
The remainder of this paper is organized as follows. Section 2 provides a brief review of related work. The working principle of the proposed SmartEM method is discussed in Section 3. The architecture of the SmartEM given in Section 4. Section 5 presents the linear regression based forecasting method which is constructed on the data collected by UAV. System implementation is discussed in Section 6. Results are given in Section 7 followed by conclusions in Section 8.

Related Works
In recent years, UAVs have been widely used in aerial photography, agriculture, plant protection, express transportation, disaster relief, wildlife observation, infectious disease monitoring, mapping, news reporting, power inspection, disaster relief, film and television shooting and other fields, and are becoming more and more popular.
In [9], Hybrid control methods for improving crucial areas of UAV is proposed that both physical dynamics of the aircraft and mode switching logic are supervised under low level control. A wireless control system on UAV was presented to test tension, rational speed also the wind field along with the proposal of Wireless Sensor Network (WSN) for monitoring areas in [10]. Spinka et al. developed angular rate stabilization [11], not to mention remotely operated aerial model autopilot was introduced. Witayangkurn et al. introduced an UAV monitoring system for remote areas by combining SOS (Sensor Observation Service) and SSG (Sensor Service Grid) platform as a medium of collecting data from the sensor nodes and received data afterwards [12]. Collecting data and demonstrating them with real time graph from sensor nodes were presented in [13]. Having introduced drone as a monitoring system in [14,15] [17]. Also, the proposed UAV in [18] carries air quality sensors where real time analysis of software provides high resolution microelectronic data, information of location and data stream. In some cases UAV is considered as a relay node to establish the communication between sensor node in remote location and the base station. Hence the integration of UAVs with other system such as WSNs and IoT can be a robust and efficient solution for data collection, control, analysis, and decisions in such specialized applications [19]. A review paper in [20] Figure 2. Block diagram of proposed system model [8].
functional components of the system and collaborative techniques among them. An end-to-end platform based on integrated UAV-WSN-IoT system is presented in [21] for data collection from various sensors, cameras, and drones in agricultural applications. Long Range Wide Area Network (LoRa WAN) with low power wireless data communication was introduced in [22] by using IoT technology to connect with the sensors for getting data. In [23] VHF, LoRa and 4G are chosen for different communication system to monitor natural environment by using drone and IoT combined. However, in the above papers from [10] to [23] it contributed a lot in the segment of UAV based data collection and processing segments by using various methods.
The main contributions of this paper is to predict the future of a particular environment by processing the data that has been collected by the sensors of the UAV. In addition, the sensors that has been installed in the UAV will take the reading of temperature, humidity, air quality, level of CO 2 and CO of a particular region within different time span. By processing these data that has been collected the future air quality can be predicted with a significant percentage of accuracy. This future prediction system could be a big breakthrough in case of environmental study.

SmartEM Method:Working Principle
Unnamed aerial vehicle, more commonly called drone is actually an aircraft consisting of aerial control system, a ground station and communication medium. In order to give a very swift feedback UAV works in some detached segments individually. This is four axis Quad Copter planned fundamentally for gathering information with the assistance of sensors and transfer it to the server. A 3S 8000MAh Lipo battery has been used as the power source which is directly connected to Ardupilot and the 30A Electric stability controller (ESC). This 30A ESC is directly connected to Brushless DC motors (BLDC) which is actually a motor that supplies the power to the propeller. Here Ardupilot behaves like the motherboard, which is connected to all the other components. Like-Gyroscope, Ublox Neo-6M GPS Module, 6 channel transmitter-receiver, 933MHz telemetry.
DJI F450 Quad copter frames are basically 2x6x10 inches in size and weights about 1.02 pounds which gives the UAV better stabilization in the air. This drone is a reckoning of sensors and components so that it can ensure effective data collection, process as well as communication with the ground station. Here Ardupilot Mega 2.6 (APM) is used as it provides multiple way points and an external GPS support. Mission planner (MP) is utilized to work as a graphical interface which is both stable and reliable. Afterwards, all the following parameters of MP have been set like-accelerometer and magnetometers. For both cases, individual calibration is monitored from mission planner platform. 3DR (air and ground) are checked for the communication process. All the motors and servo are matched from four axis diagram in ardupilot platform. Taking the response from the receiver or throttle happen to be the last step before the drone is ready to fly. Figure 12 shows the block diagram of the proposed SmartEm model and discussion on different blocks are as follows: 3 EAI Endorsed Transactions on Smart Cities Online First   4. Telemetry procedure: We have used 933MHz telemetry. It gives us information of the drone such as speed of the drone, altitude, the position of the drone. All these information can be derived via a software named Mission Planner.
5. Stability: In order to get a superior stability and better performance we have also added gyroscope to the drone. Gyroscope helps the drone to be balanced automatically. We have tried to limit our drone within lower weight (1.02 pound) so that it can help to maintain finer balancing in the air.
6. Specifications: In this case, the maximum achievable altitude is 320 to 360 ft. The controlling range of the drone was 1.5 to 2 km. The continuous flight time we got was approximately 1 hour. The speed of this drone was 10km/hour.

Architecture of SmartEM
The SmartEm consists of two parts; one is data collection by using sensors. Another one is the communication part. The data of humidity, temperature and the existing gases of environment have been collected.
Here two different approaches of communication is implemented in our SmartEM, which are server based communication system and radio communication. used NodeMCU since NodeMCU has a built-in Wi-Fi chip for internet connectivity. Before uploading the data to the server, we have used virtual private server which receives data from the NodeMCU. After that, IP address is set and Apache server software starts to operate. To receive the data Node Red is installed where MQTT protocols are followed. We have used mosquitto MQTT broker with username and password based authentication. We introduced the broker in our server and associated the broker to NodeMCU using the server IP. When the connection is set up, we signed in to node red dashboard and made a flow to get data from NodeMCU. While receiving all the data we have split them into different sections and upload them in database.
Radio Communication. For radio communication system, we have used LoRa. By using LoRa module and broadcast transmission method we have transmitted the data via arduino to the drone. Similarly for receiving the data we needed a ground module which is basically LoRa RX. So we have used two LoRa nodes. One was at the drone and another one was at ground station. This module receive data from the LoRa and respond according to the results. We have also built up a user interface with Unity which gets the information from LoRa ground station. The collected information is exhibited using graphical user interface. Moreover, we have separated the log record for each information.
From the log we can easily use the data for the future.

Forecasting Method
A regression model is the measure of average relationship between two or more variables in term of the original units of the data. Again, a linear regression model takes input as a function of two values (one independent and one dependent) and forms a relation between them forming a line. As the independent variable is moving or changing the dependent variable also shifts in its direction. If both of them are are increasing we measure it as a positive relationship. However, in this case the dependent variable is decreasing and its taken as a negative relationship so the linear line has a negative slope.  (1) and (2), and actual value are compared and the error ratio can also be gained. In [24] the following equation for linear regression is provided: where x denotes independent variable, y denotes dependent variable, b 0 stands for y intersect and is the random error. To calculate the slope of simple linear line b 1 the following equation is provided as follow wherex represents the mean of all independent variables andȳ represents the mean of all dependent variables.
In our model we have also focused how sample data can be used for future prediction. For better accuracy of prediction linear regression gets the priority in our case. Linear regression is often used to fit a predictive model to an observed dataset [25]. In future we can use collected data to compare different ML techniques such as multi-regression or even classification. Although mult-regression and non-linear regression can show given output as an over-fit, it is a good practice to compare the models. Algorithms like Trees and Vector machine are suggested for better outcomes in case of classification [26]. In our model, Scikit-learn library uses Gradient descent algorithm for linear regression [27].
To evaluate the efficiency of linear regression model there are some error measurements like Mean Absolute Error, Mean Squared Error (MSE), and Root Mean Squared Error. In our model we took MSE values for evaluation. In most of the cases the outcome ranges from (0.04 -1.12). Scikit-learn metrics takes both test data and predicted data to give the outcome of MSE. As the outcomes are close to zero in most of the cases it is a a clear indication that our regression model is very efficient.

Equipment
Arduino. Arduino nano is used as a microcontrollerbased CPU and it comes in a small size having analog input pins and digital output pins.
NodeMCU. NodeMCU is made applicable to collect data from Arduino which were collected previously from the gas sensors. Besides, the built in Wi-Fi of NodeMCU helped it to connect to other devices within its premises.
LoRa E32-TTL-100. For communication purpose we have used LoRa which stands for long range communication. It generally uses Ultra High Frequency band for its communication having four different modes. Moreover, LoRa is an ultra-low power consumption component and its another reason for us to use it for communication purposes. 5 EAI Endorsed Transactions on Smart Cities Online First DHT11. DHT11 is used as a temperature and humidity sensor. This sensor gives the temperature data from 0 to 50 degree Celsius and only 2 percent error rates for humidity data.
Gas sensors. Various kind of gas sensors are used by us to detect the hazardous gases and the air quality index. We have used MQ-2 gas sensor to detect CO 2 , MQ-7 for detecting CO and MQ-135 gas sensor to find out the air quality index.

Results and Discussion
All the graphical presentations are output of PyCharm Software, where individual data points are imported from excel sheets. As regression model works in two function-one as input and other as output which demonstrates the relationship between independent variable and dependent variable. The graphical presentation provides different location of Dhaka city which are Uttara, Aftabnagar and Mirpur. X direction of each graph indicates the independent variable and Y direction indicates the dependent ones. Green, yellow and red lines represent the prediction lines. As these are function of two variables we can find the improvements from the prediction lines. For instance if x is constant and three values of y are y 1 , y 2 and y 3 , we can find the improvement from the given equation.  In Fig 4, the graph shows the relation between air quality and altitude in meter (m). X axis of the graph indicates altitude and Y axis indicates quality of air. As the value in data of air quality increases it indicates deterioration of air quality. As a matter of fact we  observe a negative slope in all three prediction lines. For example, the values for air quality are 60.34 at Uttara, 59.21 at Aftabnagar, 57.44 at Mirpur when altitude is 30 m, which provides improvements of 1.87% and 4.81%. Moreover, the values for air quality are 55.84 at Uttara, 55.31 at Mirpur, 51.09 at Aftabnagar when altitude is 80 m that provides improvements of 0.009% and 8.51%.
In Fig 5, the graph demonstrates the relation between CO in PPM and altitude. As the values of CO increases the pollution and the effect of global warming is also increasing. Interestingly from the prediction lines we observe a slight change in their characteristics as in Aftabnagar area the line is nearly a constant and parallel with altitude but in Uttara and Mirpur CO increases with height and the line follows nearly a linear direction. It is also mentioned that in all the three places the PPM of CO gas are 3.854 at Aftabnagar, 3.7152 at Mirpur, and 3.6943 at Uttara at 20.877 m for where 6 EAI Endorsed Transactions on Smart Cities Online First    In Fig 7, the graph shows relation between air quality and humidity. As the value in data of air quality increases it indicates deterioration of air quality. Moreover, we can observe a nearly constant line in Aftabnagar area and positive slope lines in Mirpur and Uttara area. Air quality of 56.5185 at Uttara, 55.967 at Mirpur, 55.8204 at Aftabnagar when humidity is 91.9955 were taken and that provides improvements as 0.975% and 1.24%.
In Fig 8, the graph shows relation between CO and humidity. With the help of prediction lines a negative slope is found in Aftabnagar area and positive slope lines in Mirpur and Uttara area. In all these three areas the PPM of CO gas varies. CO of 3.8134 at Aftabnagar, 3.8368 at Uttara and 3.9166 at Mirpur at humidity of 92.008 gives improvement that drops 0.615% and 2.71%. 7 EAI Endorsed Transactions on Smart Cities Online First Figure 11. Temperature vs CO at Uttara, Aftabnagar and Mirpur. In Fig 9, from the graph we can observe relation between CO 2 and humidity. With the help of prediction lines we find out a slight changes of the values such as in Aftabnagar area the line is higher and has a slightly positive slope but in Uttara and Mirpur CO 2 increases with temperature and the line has positive slope as well. In all these three areas the PPM of CO 2 gas is 47.5427 at Uttara, 48.5 at Mirpur, 54.2865 at Aftabnagar and from here we got improvement of 11.930% and 12.4226% at humidity of 91.9952.
In Fig 10, the graph shows the relation between air quality and temperature. As the value in data of air quality increases it indicates deterioration of air quality. As a matter of fact we observe a positive slope in all three prediction lines. For example, the values for air quality are 59.2305 at Uttara, 55.7417 at Aftabnagar, 53.1914 at Mirpur when temperature is 18.028 which provides improvements of 5.89% and 10.195%. Moreover, the values for air quality are 61.964 at Uttara, 57.0067 at Mirpur, 55.7927 at Aftabnagar when altitude is 80 m that provides improvements of 8.001% and 9.9602%.
In Fig 11, the graph shows relation between CO in PPM unit and temperature. As a matter of fact if the value of CO increases it means the air quality is decreasing. With the help of prediction lines it is observed that the prediction line in Aftabnagar area follows a negative slope whereas in Mirpur and Uttara it is a positive slope. Taking  After comparing all the data-sets, it shows that the air quality of Aftabnagar is comparatively better than other two places while Uttara gets the lowest air quality. In this procedure we have performed three different functions which include altitude, temperature and humidity. The analysis includes CO 2 , CO and air quality for the comparison. In Uttara it is observed that the relationship between CO 2 and altitude is linearly decreasing. Also, for the range of 80 to 90 meters we get the best fit. Again, for CO, it increases with height. In this observation we get the best fit in 90 m altitude. For air quality we can observe similar characteristics. When we compare the different functions for humidity a similar curve is observed which linearly deceases. For temperature there are discrete values obtained. In conclusion, it can be added that although there are random values in the graphs but for lower level of air around us pollution is heavy. As we move upward, we observe less pollution. All the random values from the fitted curve observed are nearly identical as a fixed function and also behaves accurately for a fixed range of the parameters.
Figs. 13, 14 and 15 are bar charts of Humidity vs CO in Mirpur, Aftabnagar and Uttara where actual vs predicted data are illustrated based on testing data samples. A regression model needs splitting of train data and test data before prediction. Here, we have used 8 EAI Endorsed Transactions on Smart Cities Online First Smart Environment Monitoring System using Unmanned Aerial Vehicle in Bangladesh

Conclusion
This research is aimed to monitor the quality of air of a particular region at different altitudes using a UAV coupled with collective sensors. Based on the quantitative and qualities analysis of the data derived from diverse test results of the UAV in response to measure the condition of air by several parameters we can conclude that this system is effective to achieve potential remarks in the field of dealing with atmospheric changes. The test results are extracted in personal server through a wireless system. By exerting radio communication, the data were illustrated through regression model via GUI. Our proposed system is to use low-cost components but more constructive than other existing UAV monitoring systems.