Early Forest Fire Detection System using Wireless Sensor Network and Deep Learning

Due to the global warming, which mechanically increases the risk of starting fires. The number of forest fires is increasing and will increase more and more. To better support the fire soldiers on the ground, we present in this work a system for early detection of forest fires. This system is more precise compared to traditional surveillance approaches such as lookout towers and satellite surveillance. The proposed system is based on collecting environmental wireless sensor network data from the forest and predicting the occurrence of a forest fire using artificial intelligence, more particularly Deep Learning (DL) models. The combination of such a system based on the concept of the Internet of Things (IoT) is made up of a Low Power Wide Area Network (LPWAN), fixed or mobile sensors and a good suitable model of deep learning. That several models derived from deep learning were evaluated and compared enabled us to show the feasibility of an autonomous and real-time environmental monitoring platform for dynamic risk factors of forest fires. Keywords—Forest fire detection; wireless sensor network; deep learning; internet of things; low power wide area network


I. INTRODUCTION
Forests are indispensables resources to protect the ecological balance on the earth. A Forest fire cause damages to the ecosystems and causes various diseases for the population. In the recent years the number of forest fires has increased considerably throughout the world. Indeed, the 2019-20 Australian bushfire seasons began with several serious uncontrolled fires in June 2019. As of 14 January 2020, this season fires have burnt an estimated 18.6 million hectares [1]. It is estimated that one billion animals have been killed and some endangered species may be driven to extinction.
In addition, the 2019 Amazon rainforest wildfires season saw a year-to-year surge in fires occurring in the Amazon rainforest and Amazon biome within Brazil, Bolivia, Paraguay, and Peru during that year's Amazonian tropical dry season.
As of August 29, 2019, Institute for Space Research (INPE) reported more than 80,000 fires across all of Brazil, a 77% year-to-year increase for the same tracking period, with more than 40,000 in the Brazil's Legal Amazon which contains 60% of the Amazon.
Similar year-to-year increases in fires were subsequently reported in Bolivia, Paraguay and Peru, with the 2019 fire counts within each nation of over 19,000, 11,000 and 6,700, respectively, as of August 29, 2019. It is estimated that over 906 thousand hectares of forest within the Amazon biome has been lost in fires in 2019.
Considering these examples of damage and for effective management of forest fire, it is necessary to make the: advance warning, prevention and early detection to detect the existence of fire and its location before it spreads to sending notification to the public and concerned authorities, response of mobilization, damage containment and providing medical care as well as relief to damaged citizen.
There have been many innovative techniques proposed in the past to build an accurate fire detection system. The popular forest-fire detection systems based on the satellite imagery monitoring systems like MODIS (Moderate Resolution Imaging Spectroradiometer) used in CANADA [2] and AVHRR (Advanced Very High Resolution Radiometer) used in CHINA [3]. The low resolution of satellites and the long scan period restrict the effectiveness of satellite-based forest fire detection.
The other fire detection system that used camera is proposed in articles [4,5]; it's developing multi sensor wireless network, which uses IP cameras to detect fire. IP cameras need line-of-sight communication with sensors. Moreover, these cameras should be placed at a high altitude to get good view.
The light detection and Ranging (LIDAR) [6] was one of the famous projects developing in Canada to detect fire. It is system which measures the laser light back scattered by smoke particles. The limitation of this system was high false alert rate as result of climatic conditions for example: proximity of fog, clean particles, shadows etc.
Many researchers carried out work on early fire detection using Wireless Sensor Network (WSN). A system for the identification of forest fires has been developed in South Korea [7], the WSN decides the temperature and humidity after the middleware and the web application examines the collected information sent by sensors [8]. Alper Rifat has deployed on the same WSN principle and proposed temperature-based fire detection algorithm [9]. These systems are referenced for the detection just on the two parameters the temperature and the humidity, however there can exist other parameters which can influence like the wind [9]. This fire surveillance systems do not accomplish timely detection due to long period of scan and not realize constant 496 | P a g e www.ijacsa.thesai.org surveillance of the forest area. Considering the mentioned limitations of the existing systems presented, so, the most critical issue in a forest fire detection system is immediate response in order to minimize the damage and casualties. Therefore, is necessary to have a scalable solution that can provide real-time fire detection, detect forest fire in early stage, and reduce false alarms.
The proposed system uses machine learning methods. The functionality of artificial intelligence is widely deployed in all sectors such as agriculture, health and industry. The algorithms of artificial intelligence can detect relations and models that can escape us. So, with using these algorithms, the system can predict fire with high accuracy. This paper present a novel forest fire approach. Firstly, the concept Internet of Things is proposed for the interconnection between the sensors and the different objects. IoT enables monitoring and control of different processes, which optimizes different operations that increase productivity and efficiency. Secondly, we propose models based on Deep Learning to predict triggering and the presence of fire. This paper is organized as follow: Section 2 covers the background and related work. Section 3 provides the architecture of the proposed forest fire detection system. Section 4 presents results and discussion of the proposed system. Finally, Section 5 concludes.

A. Fire Weather Index
To estimate the risk of occurrence of a forest fire, several approaches exist to calculate an index describing a level of risk for a given region or sub-region. This estimate is calculated according to the weather context. But on a finer and local scale, in a massif recognized as vulnerable to fire, vulnerability to fire presents, with some exceptions, a high spatial variability, linked to nature and structure of the stands, to exposure (to wind, sun ), and the soil water reserve capacity. They must also be taken into account in prevention strategies.
The two most used approaches to estimate the risk of fire in a region are the Korean approach [10] and the Canadian approach [11].
Previously, both codes have implemented on the same processor, and we have confirmed that the Canadian approach is more precise, faster and less energy consuming [12]. That's why the Canadian approach is opted in the rest of this work.
The Canadian Method of Forest fire Weather Index (FWI) is made up of six components that take into account the effects of fuel water content and wind on fire behavior.
The diagram below shows the components of the Canadian Forest fire Weather Index Method (Fig. 1). Calculations are based on consecutive daily observations of temperature, relative humidity, wind speed and precipitation in the past 24 hours. The six standard components provide numerical assessments of the relative potential for wildland fire. Table I provides a classification of fire danger as a function of the FWI index based on the data available from [13].  These data must be collected continuously throughout the year, as the degree of dryness of the deep layers is built over long periods. The function of the connected object is to collect data from sensors, to process this data and to communicate it using a connectivity function and to receive instructions for carrying out an action. Generally, these functions of the connected object require a power source, especially when the data is preprocessed directly in the object.
The IoT forest fire system aims to provide 24/7 forest fire monitoring and detection (Fig. 3). It reduces the cost and time of human resources and can save lives and reduce loss of property if a fire is detected at an early stage and immediate action is taken. In order to detect a fire, IoT sensors must be distributed around the forest. The forest area is large; it is far from the coverage of the urban network. It is a challenge for the communication between sensors and receivers to exchange data. LoRa, short for Long-Range, is a wireless communication technology suitable for long-range communication. LoRa is a spread spectrum modulation technique derived from CSS (Chirp Spread Spectrum) technology by Semtech. It is a wireless modulation technology with low power consumption and efficient long range capability. It can reach a range of up to 15 km while consuming very little energy (constant RF output of 100 mW at 3.3 V, based on Semtech SX1276), and it is designed specifically for the M2M and IoT network. LoRa transceivers operate in the 860-1000 MHz range. There is a wide range of commercially available LoRa development kits.
After collecting the data, the gateways push the data to the Internet using the MQTT communication protocol via the cellular network). The data is then stored on the Internet server with ThingsBoard [14], a popular open-source IoT platform, and is displayed in an online dashboard. In addition, gateways issue alarms to users via Telegram instantly if they determine that a fire is happening somewhere.

C. Artificial Intelligence to Deep Learning
Artificial intelligence is the set of theories and techniques used to create machines capable of simulating intelligence. One of the fields of study of artificial intelligence is Machine Learning (ML).
ML is able to reproduce a behavior through algorithms powered by a large amount of data.
As for Deep structured learning, called deep learning, has emerged as a new area of machine learning research. During the past several years, the techniques developed from deep learning research have already been impacting a wide range of information processing work. Deep learning largely covers fields of applications: automatic translation, autonomous vehicles, and medical aid for diagnosis.
The deep neural networks are Multi-Layer Perceptron (MLP) with more than three layers.
Simple Recurrent Neural Network (RNN) is important structure of deep learning, which has made significant breakthroughs especially sequence processing [15]. Gated Recurrent Unit (GRU) and Long Short Term Memory Unit (LSTM) are two other based on RNN model; This two models introduced Memory Unit and additional Gates for solving problems of exploding Gradients and Vanishing Gradients caused by RNN. The success of these models is primarily due to the gating network signals that control how the present input and previous memory are used to update the current activation and produce the current state. These gates have their own sets of weights that are adaptively updated in the learning phase: the training and evaluation process [16].
This part provides a brief overview on recurrent neural networks and its variants, namely the simple RNN, LSTM and GRU.

1) Simple RNN:
A simple RNN unit is a multiplication of the input (x t ) and the previous output (h t-1 ) passed through the activation function.
As shown in Fig. 4 , the hidden state of all RNN units at the th time step is determined by the current input and the previous hidden state ℎ −1 at the ( − 1) th time step.
The RNN model is presented in the form: Where f is a nonlinear activation function, ℎ , ℎℎ and ℎy denote weight matrices from the current input layer to hidden layer, the previous hidden layer to current hidden layer and the current hidden layer to output layer, respectively [17]. The bℎ and by are bias vectors.  2) LSTM: LSTMs are designed to avoid the long-term dependency problem and remembering information for long periods. LSTM is an extension of RNN; it has been proposed to overcome training problems existing in RNN such as exploding and vanishings gradients. As showing in Fig. 5, LSTM Memory block has an input gate, a forget gate and an output gate which regulate the flow of information in and out of the cell [18].
The different equations of the LSTM model are presented and defined in the paper [17]. The main idea of LSTM is that each computational unit is linked not only to a hidden state h but also to a state C of the cell which take the role of memory. The transition from C t-1 t to the new cell state C t is done by transfer with constant gain equal to 1. The cell state can be modified through a gate which authorizes or blocks the update (input gate). Similarly, a gate controls whether the cell status is communicated at the output of the LSTM unit (output gate). LSTM also uses a gate allowing the reset of the cell state (forget gate).
3) GRU: GRU networks have performances comparable to LSTMs. A unit requires fewer parameters to learn than an LSTM unit. GRU RNN model is presented in the Fig. 6.
The reset gate r t and update z t are computed from the two equations as follows: Where x t is the current time step input and h t−1 is the hidden state of the previous time step. W r, ,W z , U r , U z are weight parameters and b r ,b z are biases (Fig. 6).
The GRU-RNN reduce the gating signals to two from the LSTM model. The two gates are called an update gate and a reset gate. GRU's got rid of the cell state and used the hidden state to transfer information and the input and forget gates are merged: update gate. The output gate is replaced by a reset gate. The weights corresponding to these gates are also updated using the back propagation through time.

A. Architecture and Management of Proposed System
There are four main components in the IoT system and these are sensor nodes, gateways, Internet servers and end users (for example, firefighters and the public, etc.). A star network topology is adopted in the connection between the sensor nodes and the gateways. The proposed system adopts the cluster topology and hierarchical routing protocols. The nodes members transmit their data to the cluster head, which will transmit to the base station.
Many sensor nodes are distributed evenly over the forest with distances of 1 kilometer and are connected to gateways to transmit data to Internet servers (Fig. 7). To cover the terrain, a long range LoRa communication signal modulation is adopted for the sensor nodes. It offers a wide range of flexibility for the distribution and deployment of sensor nodes. After collecting the data, the gateways send the data via Internet. The data is then stored on the Internet server, and is displayed in an online dashboard.
Each sensor node measures at a given frequency, the values of temperature (T), relative humidity (RH), atmospheric pressure (P), the amount of carbon monoxide (CO), the amount of carbon dioxide (CO2), the quantity of Particulate Matter (PM), fine particles. The PM2.5 and PM10 fine particle diameters are less than 2.5 and 10 µm, respectively.  The procedure of the proposed fire detection system consists of three steps (Fig. 8): The first step is to determine the FWI from weather data using the weather station located in the forest. The second step is the most important step of the study; it consists of the acquisition of data from each sensor node at a frequency determined according to the danger potential, which is estimated by the calculation of FWI.
The objective of this step is to determine, using the Deep learning algorithm and following the metrics of all the sensor nodes at a given time, whether there is a probability of existence of fires.
If this last function recommends the existence of fire we will trigger the third step which consists in launching an Unmanned Aerial Vehicle (UAV) to measure the values of these sensors in more detail in a mobile way. In addition, the UAV can embark on an infrared camera to have a temperature map. All this information received by the drone will be sent to the control tower to trigger all means of extinguishing the fire if necessary.

B. Sensor Node
Several questions can be asked when deploying a network of sensor nodes; how many nodes of sensors to put in a forest area, the choice of sensors according to their prices and their qualities. Indeed, all these questions are very important to validate the technical and commercial feasibility study. At this stage, we opted for a reliable and low cost solution to then validate the study on a concrete case and in the field.
The sensor node must essentially consist of a microprocessor, sensors, a long-range, low-consumption transmission part and an energy source optimized for a long duration (Fig. 9). For the sensor test phase and learning the computer models for short-term applications, we opted for the Raspberry single board nano-computer solution, a high-performance board that requires enough energy. On the other hand, for the deployment of the sensor node on the network scale, Lora32u4 is used as a low cost board to acquire sensors data and transfer it to the network. The LoRa32u4 card is a lightweight, low-power board, ideal for creating long-range wireless networks, more flexible than Bluetooth LE and does not require high power unlike WiFi and others. It is an ATmega32u4-based card running at 3.3 V and 8 MHz, with an HPD13 LoRa wireless module, using the SX1276 design of the highly integrated RF transceiver chip. This board is equipped with a Li-Po and Liion charging circuit and a standard battery interface, and is compatible with the Arduino development environment.
The choice of sensors for the node is focused on digital components, compact, reliable and inexpensive. To measure temperature, humidity and pressure the BME280 sensor is chosen. For the detection of particles in suspension, the Nova SDS011 sensor using the principle of laser diffusion, allowing to obtain a concentration of particles between 0.3 and 10 μm in air. MH-Z14A-CO2 and ZE07-CO are respectively the two gas sensors used to measure the quantity of dioxide and carbon monoxide in the air (Fig. 10).
The sensor node has a photovoltaic panel to supply the battery in the event of discharge. We have opted for optimal management of electrical energy; we are trying to optimize electrical consumption by implementing a code in C language allowing the lora32u4 board to be put in standby mode between two acquisition operations sends value. This optimization of consumption has allowed us to keep the sensor node autonomous in terms of electrical energy.

C. Servers and Applications
Through this project we are trying to build a software and hardware platform capable of monitoring the state of the forest and signaling the risk and the appearance of a fire in the forest. This intelligent system will be able to observe the external environment through sensors, send metrics to a database, and then process this information through deep learning models to make the right decision.
Currently, there is no global standardization of the software and hardware layers of an IoT platform; therefore, developers find it difficult to define an efficient way to transmit, store, manage and provide data. These difficulties increase when you want to manage the data of several applications and devices in an IoT environment or context. For this reason, an IoT platform could very well be suitable, one that supports efficient and appropriate management of devices, implemented with several technologies, protocols, microcontrollers, sensors, actuators and belonging to different entities. In this way, the use of a tool capable of centralizing the management of IoT environments, projects and software applications and also capable of providing a good variety of visualization widgets is an interesting solution. There are however several options already available on the market, which is ideal for the context of the work. Fig. 11 shows the hardware and IT tools chosen for the platform. The most important of these tools is the open-source ThingsBoard tool developed in Java for the management of connected objects [14]. It allows to store and visualize all the data received but also to interact with the objects and manage alerts.

A. Setup Simulation
To test the deep learning models we need to have a consistent dataset for better accuracy. These data must be taken under several conditions; with or without fire and for and different meteorological conditions.
To power the data set during a fire, we have placed 3 sensor nodes at a distance d from a small fire that we have lit. We made measurements every minute and for different distances (Fig. 12). We carried out this operation several times in several days with or without fire and with different meteorological conditions.

B. Model Supervision
The approach proposed in the document is based on a deep learning model that includes three phases (Fig. 13): • Dataset pre-processing; after recovering the data, their values are normalized to have the best performance.
• Building the model; after the model is fit on a training dataset that are subdivides to the training data and validation data. The parameters of the model are changed in the training process until having better performance.
• Evaluating the model by prediction; after training the model, this model is evaluated with the test dataset by making prediction of new data.  Throughout the process of construction and training model we work with Keras [19] (a Deep Learning library for Theano and TensorFlow) and for generating graphs we use Tensorboard.
Concerning network parameters: the RNN, LSTM and GRU are connected with two hidden layers with 50 neurons and an output layer that makes a single value prediction. For the input and hidden layers, we are using the default activation functions and for the output layer the activation function is 'Sigmoid'. We set a dropout 0.2 to avoid over-fitting [20].The networks are trained for 50 epochs and a batch size of 20. In the three networks, for this classification problem, Adam optimizer is the algorithm used to minimize the loss function. For a binary classification such as this approach, the performances of the proposed models are evaluated with the typical loss function: binary cross-entropy (BCE) given in equation 5: Where N is number of measurements, y i and � are the actual and predict values respectively.

C. Evaluations and Performances of Model
The experiments are performed on datasets that contains 11 attributes: Temperature, Pressure, Humidity, CO, CO2, PM2.5, PM10, wind speed, wind gust speed, solar radiation and FWI. The dataset have around 10000 examples. For all datasets the target attribute predicts the possibility of fire occurrence (0, 1) "1" indicate the occurrence of fire and "0" indicate his absence. Indeed, each entry has a weight on the prediction of the triggering of the fire, this weight is calculated and updated by the algorithm of the model. We can note that among the different parameters of the algorithm in the proposed method, the parameters CO, PM2.5, CO2 and PM10 are respectively in descending order of the parameter which has the most influence. Regarding the proposed models Simple RNN, LSTM and GRU can improve the prediction accuracy and stability greatly and effectively as showing in Fig. 14(a). In result, the data used is divided into two parts. The training datasets with 67% of the observations is used to train the model; the remaining 33% is used to test our model prediction accuracy.
In general, the proposed models can improve the prediction accuracy and stability greatly and effectively.
However, the GRU model generates higher accuracy than the other models during training. GRU also produced significantly smaller loss value compared to the other models as showing in Fig. 14(a). The LSTM model generates less precision than the GRU model but higher compared to the Simple RNN model and it makes longer to train. For training, LSTM ensures less loss compared to Simple RNN as showing in Fig. 14(b). While the Simple RNN model given its simplicity it takes less time to train but it responds to less precision and a relatively more loss than the other models.
We were able to see that the GRU values are also close to the LSTM values with a shorter run time. Indeed, LSTM takes a training time of around 2ms per sample, however GRU puts around 920 us per sample. Simple RNN achieves a training time of around 390 us per sample.
When we evaluated the three models on a number of approximately 2000 test data: the LSTM model gave 4 false predictions, GRU gave only one false prediction and the simple RNN gave 2 false predictions. The GRU model gave 99.89% accuracy and a loss function value of 0.0088, the LSTM model gave an accuracy of 99.82% on the same test data and a loss 502 | P a g e www.ijacsa.thesai.org value of 0.0298. Finally, the Simple RNN model gave an accuracy of 99.77% and a loss of 0.0062.
Despite that, the results are getting closer for most of them the GRU has provided better results, we could see that GRU model is performs in this case of classification problem and the model could be more easily deployed on small devices.

V. CONCLUSION
To limit the damage caused by forest fires and to control the start of fires and its spread, we have presented in this study a method of early detection of forest fires. This method is based on three steps: Estimate the general risk level of the forest, assess and predict in several places the existence or not of fires, and possibly surveyed the place declared to be burning with the help of a UAV.
The originality of this work lies in the use of a wireless sensor network distributed over the entire forest and the deep learning methods to predict in real time a possible start of the fire.
The current system will be implemented on a large scale with multiple sensor nodes to power and augment the data set in order to improve the accuracy and collaboration of data between multiple nodes. The system learning technique can be performed continuously during its operation. We plan in future work to use wind direction sensors to properly estimate and locate the start of the fire.