Design of an IoT-Based Fuzzy Approximation Prediction Model for Early Fire Detection to Aid Public Safety and Control in the Local Urban Markets

Fire monitoring in local urban markets within East Africa (EA) has been seriously neglected for a long time. This has culminated in a severe destruction of life and property worth millions. These rampant fires are attributed to electrical short circuits, fuel spillages, etc. Previous research proposes single smoke detectors. However, they are prone to false alarm rates and are inefficient. Also, satellite systems are expensive for developing countries. This paper presents a fuzzy model for early fire detection and control as symmetry’s core contribution to fuzzy systems design and application in computer and engineering sciences. We utilize a fuzzy logic technique to simulate the performance of the model using MATLAB, using six parameters: temperature, humidity, flame, CO, CO2 and O2 vis-à-vis the Estimated Fire Intensity Prediction (EFIP). Results show that, using fuzzy logic, a significant improvement in fire detection is observed with an overall accuracy rate of 95.83%. The paper further proposes an IoT-based fuzzy prediction model for early fire detection with a goal of minimizing extensive damage and promote intermediate fire suppression and control through true fire incidences. This solution provides for future public safety monitoring, and control of fire-related situations among the market community. Hence, fire safety monitoring is significant in providing future fire safety planning, control and management by putting in place appropriate fire safety laws, policies, bills and related fire safety practices or guidelines to be applied in public buildings, market centers and other public places.


Introduction
With the recent development and advancement in Internet of Things (IoT) technology, it is estimated that, by the year 2020, approximately 50 billion devices shall be connected to the internet [1,2]. Therefore, the development of IoT-based platforms shall subsequently provide the fire area with an opportunity to develop low-cost, effective and reliable solutions to combat the recurrent fire-related situations in the local urban markets within the East Africa (EA) region before severe disastrous consequences emerge. EA's regional urban markets have suffered severe fire outbreaks within the last 10 years. The major cause of these fire outbreaks is mainly attributed to electrical short circuits, fuel spillage, carelessly neglected charcoal stoves and suspected arson, among others [3][4][5]. Urban markets, however, lack a comprehensive contingency plan to manage, contain and safeguard against any fire-related phenomena despite previous encounters. This has resulted in a severe destruction of both human life and property Embedded computing and micro-electromechanical (MEMs) systems through environmental science shall provide information through sensors to enhance the existing fire monitoring and detection applications by gathering sensed data, process and transmit it for purposes of modeling and analysis for appropriate decision making [6]. Tremendous research efforts in fire detection have been made. For instance, Sowah at el. in [7], proposed a fuzzy-based multisensor fire detection system and a web-based notification platform. The authors used both the fuzzy and trained convolutional neural networks (CNN) for early fire detection as a deep learning technique with the ability to perform feature extraction and classification. The CNN method enables a broader coverage area of interest. Results show that using the CNN method significantly improves fire detection and alerting response, with an accuracy rate of 94%.
Güllüce at el.in [8], propose a smart fire detection system using infrared technology and mathematical modeling algorithms. The authors use geolocation and behavior to estimate the spatial resolution by superimposing the detection areas with infrared detectors. Meanwhile, the mathematical models position the spatial resolution detectors in estimating the coordinates of the forest fires using the libraries of Google Maps APIs in the cloud. The fire geolocation and behavior are simulated using software called Fire Analyst. Experimental results show that monitoring fires with fire analyst using multispectral infrared technology outperformed the other fire monitoring systems. The method provides a shortened fire detection time frame with an observed high spatial resolution of up to 4.5 m and geolocation of approximately 3599.56 m 2 . Previous researchers proposed the use of conventional fire control alert systems like smoke detectors. However, these alert systems are highly susceptible to false alarms with limited protection depending on the type of fire [7,9]. Davis, Hislop at el. in [10,11] propose the use of satellite systems. However, these are quite expensive to acquire and maintain for developing countries. Therefore, this research approach seeks to propose a fuzzy-based approximation prediction model for early fire outbreak detection in order to safeguard the market community from severe destruction of property.
The novel idea is to apply fuzzy logic in early fire detection to significantly improve the accuracy to 95.83% consisting of true positives. This shall enhance control, by way of minimizing extensive damage and safeguard the public against potentially prevailing harmful fires. Fuzzy logic control technique is aimed at providing an accurate real time decision making through early warning signals Embedded computing and micro-electromechanical (MEMs) systems through environmental science shall provide information through sensors to enhance the existing fire monitoring and detection applications by gathering sensed data, process and transmit it for purposes of modeling and analysis for appropriate decision making [6]. Tremendous research efforts in fire detection have been made. For instance, Sowah at el. in [7], proposed a fuzzy-based multisensor fire detection system and a web-based notification platform. The authors used both the fuzzy and trained convolutional neural networks (CNN) for early fire detection as a deep learning technique with the ability to perform feature extraction and classification. The CNN method enables a broader coverage area of interest. Results show that using the CNN method significantly improves fire detection and alerting response, with an accuracy rate of 94%.
Güllüce at el.in [8], propose a smart fire detection system using infrared technology and mathematical modeling algorithms. The authors use geolocation and behavior to estimate the spatial resolution by superimposing the detection areas with infrared detectors. Meanwhile, the mathematical models position the spatial resolution detectors in estimating the coordinates of the forest fires using the libraries of Google Maps APIs in the cloud. The fire geolocation and behavior are simulated using software called Fire Analyst. Experimental results show that monitoring fires with fire analyst using multispectral infrared technology outperformed the other fire monitoring systems. The method provides a shortened fire detection time frame with an observed high spatial resolution of up to 4.5 m and geolocation of approximately 3599.56 m 2 . Previous researchers proposed the use of conventional fire control alert systems like smoke detectors. However, these alert systems are highly susceptible to false alarms with limited protection depending on the type of fire [7,9]. Davis, Hislop at el. in [10,11] propose the use of satellite systems. However, these are quite expensive to acquire and maintain for developing countries. Therefore, this research approach seeks to propose a fuzzy-based approximation prediction model for early fire outbreak detection in order to safeguard the market community from severe destruction of property.
The novel idea is to apply fuzzy logic in early fire detection to significantly improve the accuracy to 95.83% consisting of true positives. This shall enhance control, by way of minimizing extensive damage and safeguard the public against potentially prevailing harmful fires. Fuzzy logic control technique is aimed at providing an accurate real time decision making through early warning signals Symmetry 2020, 12, 1391 3 of 29 for possible public safety control, suppression and immediate evacuation. Hence, there is a need to design low-cost, effective, fuzzy-based fire prediction models using the IoT platform to improve existing firefighting techniques with a major goal of minimizing damage and false alarm rates.
Therefore, in order to ensure appropriate event reporting responses of the related fire calamities, there is need to develop effective fire detection systems to ensure a prompt responses, proper management and containment of the ever-recurring fire calamities in local urban markets [12]. Thus, the proposed fuzzy model plays a significant contribution to symmetry's area of computing and engineering science.
The rest of the paper is structured as follows: Section 2, related works; in Section 3, problem description and modeling; in Section 4, simulation experiment setup; Section 5, results and discussion, where obtained results are comprehensively discussed; and, in Section 6, conclusion and future works.

Related Works
The state-of-the-art research findings illustrate several related works done in the area pertaining fire monitoring and detection using the fuzzy logic-based technique. For instance, researchers in [13] proposed GIS-based forest-fire risk mapping in the forested areas of Iran prone to high risk fire occurrences by combining two techniques, namely analytical network processing (ANP) and fuzzy logic, to generate a fire risk map. The occurrence of a forest fire is determined using an ANP ranking procedure yielding a criteria weight, while the fuzzy logic assesses the weight of subcriteria. Then the GIS-based aggregation module function is applied to generate an appropriate fire risk map. Results indicate that a high-risk accuracy of 81.9% is obtained using the proposed fuzzy ANP model. B. Sarwar at el in [14] proposed an IoT-based intelligent warning application using the adaptive neural fuzzy inference systems (ANFIS) to compute the true likelihood of a fire presence and then generate a fire alert. The novel idea was to use an ANFIS technique in the identification of a true presence of a fire incident by considering the following parameters: the change rate of smoke, the change rate of temperature and humidity. Sensors collect vital data from the sensor nodes and the fuzzy logic technique converts the raw data into linguistic variables trained by the ANFIS to get the probability of a fire occurrence. The proposed experiment shows satisfactory output results. In addition, in [15], Sarwar et al. proposed the design and application of an intelligent fire monitoring and warning system (FMWS) using fuzzy logic to predict a fire outbreak. The system sends out alert messages using the Global System for Mobile Communication (GSM) technology. The authors considered three key performance parameters, i.e., smoke, flame and temperature. However, only three parameters are not sufficient for effective fire detection as this may result in false alarms and further is not IoT-related. The designed FMWS was simulated using MATLAB version 7.1 and results show that the system was successful.
T. Listyorini at el. in [16], proposed an IoT-enabled fire detection tool based on the concept of fuzzy logic in the peatland area of Riau, Indonesia. The proposed prototype detects the presence of fire hotspots and analyzes fire intensity using one parameter, temperature, and any noticeable change of abnormal increase in temperature triggers an early fire warning which then sends a notification message to the supervisors for immediate action. However, only one parameter cannot be sufficient for a true identification of a fire presence. M. Samadi at el. in [17] proposed a knowledge-based system called a fire suffocation and burn (FSB) system, which employs a fuzzy decision making, multi criteria decision making (MCDM) and an RGB model. The system is able to predict the presence of a fire occurrence, suffocation and burn probabilities based on the sensed data from different clusters of the network. Sensed data from smoke, temperature and light sensors is ultimately processed in order to determine an appropriate decision of the prevailing environmental condition. Simulation results show that the proposed system surpasses the threshold methods in terms of energy efficiency, network time and financial losses. The system can be used in various areas such as buildings or forests etc. In [18], H. Kaur at el. proposed a three-tier architecture for early detecting and mitigation of wild forest fires. The architecture consists of i) a data perception layer, responsible for collecting forest fire phenomena, environmental conditions and location related data. The aggregated data is then forwarded to the ii) fog computing (FC) layer, responsible for real time analysis and processing of data collected by the IoT sensors to determine a predict an early forest fire outbreak. iii) The event classification component is responsible for classification of an event into wild fire oriented datasets to be detected, i.e., fire detected event or a no fire event, using a k-means clustering and adaptive neuro fuzzy inference system (ANFIS) for computing the fire vulnerability analysis.
Upon detection, an early warning signal is sent to the fire department for immediate suppression and control of the wild fires. Experimental results show that, using k-means clustering outperforms other clustering techniques by 93.41% with a lower classification detection time of wild forest fires, hence mitigating their adverse effects. Researchers in [19] proposed a fire detection and control system using fuzzy logic technique with feedback over an Arduino micro controller system. The automated system consists of flame, temperature, smoke sensors and a re-engineered mobile carbon dioxide air conditioning unit was tested on a medium physical car. Results show, that automobile fire detection system is devoid of false alarms and able to detect and suppress fire within 20 s.
Hislop et al. in [11] demonstrated the use of a satellite data driven approach to monitor and report fire incidences across boreal-forest-covered areas. Researchers used MODIS and Landsat data to explore trends in fire disturbances across the boreal forest cover. Research showed that between 2001 and 2018, 9% of the forest was burned as detected by the MODIS satellites. The Google Land Earth Engine was used to sample thousands of Landsat images to further observe trends and patterns in fire severity and forest recovery. Results indicated that satellite data together with cloud computing can be used to harness the survey baselines to reveal trends and patterns so as to improve forest fire monitoring and reporting at both national and global scale.
L. Salhi et al. in [20] proposed a gas and fire detection system in a smart home using a machine learning technique. The authors applied the following environmental parameters in the experiment: temperature, humidity, smoke, CO, CO 2 , LPG and flame. The suggested method employs data mining to detect an abnormal change in pattern of the considered above parameters and then sends a warning signal to the relevant person. Results show that the proposed solution improved the accuracy of the model with reduced false positives Nevertheless, the proposed solution is not IoT-related. T. Sahithi at el. in [21], designed a fire rescue system using IoT to safeguard against fire-related accidents in the lonely houses. When a fire incident is detected by the sensors, immediately data is sent to the pic18 microcontroller board and intimation is sent to the nearest fire or police station using an android application. However, the proposed system doesn't use a fuzzy logic approach and a risk of false alarms is possible. Roberto at el. in [22], proposed a software agent that monitors the status of fire extinguishers by collecting their history and environmental factors and sends a notification if any parameters (temperature or humidity) are not within a defined range. Results show that the smart fire prototype is accurate in computing the pressure changes of a specific data acquisition system (DAS). Jun Hong at el. in [23] proposes a new fire detection system with a multifunctional AI framework and data transfer minimization for the safety of smart cities using machine learning and fuzzy algorithms for making appropriate decisions. The developed system achieved an accuracy rate of 95%.

Problem Definition
Fire outbreaks in local urban markets located within the East Africa (EA) region have raised serious concern due to their extensive damage to property and human life. The primary causes of these fire occurrences arise mainly from electrical short circuits, neglected charcoal stoves and fuel spillage, as detailed in the police annual reports [3,5]. These markets, however, act as a source of income to the small-scale vendor community. Hence, there is lack of comprehensive fire control safety systems and policies in place to protect these markets against the rampant harmful fires despite previous encounters. These markets still rely on the traditional methods of human patrol mechanisms for fire detection, rendering them obsolete and inefficient for proper and accurate fire detection. The single smoke detectors proposed by S. Chen and et al. in [9] are highly susceptible to false alarm rates and inefficient. Furthermore, satellite-based systems [11] are quite expensive for developing countries to acquire and maintain.
Therefore, this research study seeks to propose an IoT-based fuzzy approximation prediction model for early fire detection in order to provide public safety against recurrent fire threats, minimize extensive damage and instigate appropriate risk mitigation measures through emergency control measures by alerting authorities in time for quick evacuation and as well as establishing immediate fire suppression mechanisms. This approach, utilizes the fuzzy logic-based technique for determining true fire incidences [24]. Hence, the fuzzy logic method consisting of a set of evaluation inference rules and its natural linguistic terms to apply approximate reasoning in order to determine the true accuracy rate of fire, as in Zadeh ( ) (1975 [25,26].

Materials and Methods
In this paper, we applied a simulated approach using a fuzzy-logic-based technique embedded within the MATLAB simulation environment. The MATLAB Fuzzy Logic toolbox was then used to simulate the proposed model with more accuracy, scalability and flexibility. We then modeled and observed the performance dynamic behavior of the proposed fuzzy prediction model using a set of six input parameters, namely, rate of change of temperature (∆T), rate of change of humidity (∆H), flame presence, rate of change of carbon dioxide levels (∆CO 2 ), rate of change of carbon monoxide levels (∆CO) and rate of change of oxygen levels (∆O 2 ). We considered the estimated fire intensity prediction (EFIP) as the output parameter to determine the percentage probability likelihood of a fire occurrence. In order to process the fuzzy logic model, we utilized a rule-based Mamdani's fuzzy inference system (FIS) and then applied defuzzification processes.

Fuzzy Logic
Fuzzy logic is defined by multivalued artificial intelligence or soft computing technique that is based on the principle of the degrees of truth that range between 0 and 1 both inclusive. Also, a fuzzy set can be referred to as an initial set that defines the uncertain crisp value[x] and a corresponding membership value[µ] in the range of [0,1]. Hence, fuzzy models are based on fuzzy inference rules in order to model and evaluate nonlinear systems with complex and dynamic engineering problems [27]. This research approach employs fuzzy approximation modeling technique in order to determine or estimate the fire intensity decision status from a set of fuzzy input within a given domain range [28].
Fuzzy logic was originally proposed by Dr. Loft Zadeh of the University of California in the 1960s. The technique has been widely used in solving real life complex soft computing problems. Fuzzy optimization theory is based on the principle of fuzzy sets that has significantly developed into fuzzy approximation reasoning. Hence, this sets precedence as one of the theoretical foundations of fuzzy approximation theory [29]. Soft computing is a branch of computational intelligence where fuzzy logic, genetic algorithms, probability theory and neural networks are collaboratively used to mimic human reasoning for appropriate decision making [30]. Therefore, fuzzy logic is beneficial in designing nonlinear complex control solutions with multiple parameters because: • It models uncertainty of linear and nonlinear systems of arbitrary complexity to solve real-world complex dynamic computational problems; • It covers a range of operating conditions, and is readily customizable in natural language processing terms; • It exhibits the ability to handle dynamic complex problems with imprecise and incomplete datasets; • It exhibits a great sense of flexibility and simplicity in modeling real life complex problems.
Therefore, the research study seeks to utilize the concept of fuzzy logic technique to assist in an early detection of fire-related hazards with a view of minimizing possible errors by sending an alarm notification message comprised of true positives during an event detection [15,21]. Fuzzy approximation utilizes the IF . . . THEN implication reference rules with appropriate linguistic description rules. For instance, IF (the "antecedent" or "premises" is satisfied) THEN (the "consequent" is inferred) as cited in Liu et al. [29]. Hence, the designed concrete set of rules can be inferred with respect to the FIS knowledge base to generate a generic fuzzy based algorithm. Then, the resultant control model represents the logic function of the fuzzy approximation algorithm aiding early fire detection and safety control for the local urban market community.
The proposed prediction model is based on fuzzy approximation reasoning to estimate the Fire Intensity (FI) as a percentage of a given fire event status. Simulations were carried out in the MATLAB 2018 an environment, specifically using the Fuzzy Toolbox to design the fuzzy logic controller. Simulations were carried out to understand the dynamic performance behavioral nature of the proposed fuzzy control model. The process of design of the fuzzy approximation model is clearly discussed in the next section of this paper.

Fuzzy Approximation Control Model
In the design of a fuzzy based approximation control model, we employ the following principle stages, namely, model fuzzification, model fuzzy rules, model inference engine, and model defuzzification and evaluation.

The Fuzzy Control Model
The fuzzy control model is designed to approximate the fire intensity and subsequently determine the appropriate fire probability by making an informed decision about a fire occurrence based on a set of predefined parameters: smoke intensity, gases, flame, temperature and humidity. Hence, the fuzzy logic system is therefore built based on following principle steps as detailed in the Figure 2, below: Symmetry 2020, 12, x FOR PEER REVIEW 6 of 29 Therefore, the research study seeks to utilize the concept of fuzzy logic technique to assist in an early detection of fire-related hazards with a view of minimizing possible errors by sending an alarm notification message comprised of true positives during an event detection [15,21]. Fuzzy approximation utilizes the IF…THEN implication reference rules with appropriate linguistic description rules. For instance, IF (the "antecedent" or "premises" is satisfied) THEN (the "consequent" is inferred) as cited in Liu et al. [29]. Hence, the designed concrete set of rules can be inferred with respect to the FIS knowledge base to generate a generic fuzzy based algorithm. Then, the resultant control model represents the logic function of the fuzzy approximation algorithm aiding early fire detection and safety control for the local urban market community.
The proposed prediction model is based on fuzzy approximation reasoning to estimate the Fire Intensity (FI) as a percentage of a given fire event status. Simulations were carried out in the MATLAB 2018 an environment, specifically using the Fuzzy Toolbox to design the fuzzy logic controller. Simulations were carried out to understand the dynamic performance behavioral nature of the proposed fuzzy control model. The process of design of the fuzzy approximation model is clearly discussed in the next section of this paper.

Fuzzy Approximation Control Model
In the design of a fuzzy based approximation control model, we employ the following principle stages, namely, model fuzzification, model fuzzy rules, model inference engine, and model defuzzification and evaluation.

The Fuzzy Control Model
The fuzzy control model is designed to approximate the fire intensity and subsequently determine the appropriate fire probability by making an informed decision about a fire occurrence based on a set of predefined parameters: smoke intensity, gases, flame, temperature and humidity. Hence, the fuzzy logic system is therefore built based on following principle steps as detailed in the Figure 2, below:

Model Fuzzification Values
In the design of the fuzzy control model for early fire detection, we defined six multisensory input crisp parameters and their corresponding fuzzy membership values, namely, i) the rate of change in temperature (ΔT) = {very low, low, medium, high, very high}; ii) the rate of change in humidity (ΔH) = dry, optimal, moist}; iii) the rate of change of smoke intensity or carbon monoxide (ΔCO) = {low, medium, high}; iv) the rate of change of carbon dioxide (ΔCO2) = {low, medium, high}; v) the rate of change of oxygen (ΔO2) = {low, medium, high}; vi) the flame presence = {false, true}.

Model Fuzzification Values
In the design of the fuzzy control model for early fire detection, we defined six multisensory input crisp parameters and their corresponding fuzzy membership values, namely, (i) the rate of change in temperature (∆T) = {very low, low, medium, high, very high}; (ii) the rate of change in humidity (∆H) = dry, optimal, moist}; (iii) the rate of change of smoke intensity Symmetry 2020, 12, 1391 7 of 29 or carbon monoxide (∆CO) = {low, medium, high}; (iv) the rate of change of carbon dioxide (∆CO 2 ) = {low, medium, high}; (v) the rate of change of oxygen (∆O 2 ) = {low, medium, high}; (vi) the flame presence = {false, true}. This study, considers a membership value for flame presence equivalent to "true". This is so because, we tend to minimize the potential likelihood of false alarm rate that may be generated. Note that in the proposed experiment, three types of combustion gases are considered for efficient fire detection, namely, carbon dioxide (CO 2 ), carbon monoxide (CO) and oxygen (O 2 ). Mainly because, most burning materials contains carbon materials as one of the primary elements. The carbon element combines with the atmospheric oxygen to support extensive fire combustion. This gives rise to carbon monoxide (CO) and carbon dioxide (CO 2 ). Thus, a continued fire combustion leads to a drop in O 2 levels. This subsequently results to a drop in the Fire Intensity for a particular burning flame.
The fire intensity (FI) is realized as the output function. Hence, the estimated fire intensity prediction (EFIP) as the fuzzy output is defined by the following membership values: {very low, low, moderate, high, very high}.

Used Membership Functions
The membership function (MF) is referred to as a curve defined within the MATLAB environment and is used to map the input space to the membership value to the output function.
In this research approach, we mainly apply three types of Mamdani membership functions in the design of the proposed fuzzy based approximation model.
These include the triangular MF or (trimf), the Gaussian MF or (gauss) and, the trapezoidal (trapmf) MF. The applied MF in the model design are extensively discussed in [26,27].

Fuzzy Associative Memory (FAM) Method
Fuzzy associative memory (FAM) is a content addressable memory in which the recall occurs correctly if the input data falls within a specified window consisting of the upper and lower bound limit of a given fuzzy domain. Also, FAMs are associative transformations that map input fuzzy values to corresponding output fuzzy sets in order to generate an appropriate FAM matrix tool consisting of a set of evaluation inference rules. The FAM method helps achieve storing and completing the recall realized by the fuzzy logic associative memory pattern [31]. This research approach, utilizes a combination of both the square and cube FAM methods to generate the required inference rules as detailed in Tables 1  and 2. The FAM method is widely accepted in modeling and optimization of fuzzy control systems. This improves the performance of the captured contents and their associations efficiently [32][33][34]. A total of forty-two inference rules, i.e., were generated for the fuzzy based model. Hence, the fuzzy evaluation inference rules as detailed in Tables 1 and 2, for the fuzzy model shall subsequently aid in early fire detection for urban markets with a major purpose of public safety and control.

Fuzzy Inference Evaluation Rules for the Control Experiment Design
In Table 1, of the research experiment, we simulate and model the initial environmental changes in the surrounding environment effect when a fire outbreak occurs. The following shall be realized i.e., the rate of change in temperature (∆T) and the rate of change in humidity (∆H) and the flame presence = {True} is considered constant for all evaluation inference rules. The expected fuzzy output is called the estimated fire intensity prediction (EFIP), determined as a percentage (%) of the relationship between temperature and humidity variation. The fire intensity is the rate of energy released by the fire or the energy released per unit area of actively burning fire (KW/m 2 ) [35,36].
In Table 2, we simulate and model the dynamic behavior of byproducts of the gases dissipated during a fire outbreak and clearly understand their effect on the surrounding environmental. The input parameters to be considered include; the of the rate of change in smoke intensity or carbon monoxide (∆CO), rate of change of carbon dioxide (∆CO 2 ) and rate of oxygen (∆O 2 ) that is depleted in the surrounding atmosphere due to the oxidation with the carbon burning elements. All the gases dissipated are measured in standard units of parts per million per volume (ppmv). Gas combustion: the high temperature exothermic redox chemical reaction between fuel (reactant) and an oxidant (usually oxygen) that produces oxidized gaseous products in a mixture termed as smoke [37,38]. Note that, combustion doesn't always result in a fire, but when it does, the flame is the characteristic indicator of the reaction.

Model Fuzzy Inference System
The fuzzy inference system (FIS) is the key unit in the fuzzy logic system, having decision making as the primary goal. It comprises of the IF . . . THEN rules along with specified connectors i.e., "OR" and "AND". Mathematically, the AND, OR operators are defined using the equations represented by Equations (1) and (2) respectively; (1) where µA; denotes the membership function in Class A, µB; the membership function in Class B.
In this paper, we utilized the "AND" logic operator in order to determine the minimum probability of a fire outbreak occurrence [39]. There are two types of FIS, namely, the Mamdani type and the TSK (Takagi, Sugeno, Tangi). In the Mamdani FIS, the resulting consequent memberships are quite fuzzy in nature. It is widely accepted because it provides reasonably good results with simple structure. The TSK FIS is not fuzzy (either linear or constant), the consequent membership function has many parameters per rule translating into more degrees of freedom. This provides more flexibility in design of membership functions although it lacks interpretability compared to the Mamdani FIS [40,41]. So, in the design of the proposed fuzzy prediction model, the FIS module shall be applied in determining the appropriate decision making of a prevailing fire status. Using the Mamdani method, we were able to generated corresponding linguistic fuzzy control rules as applied to the proposed model.
From Equations (4) and (5), we compute the strength of the fuzzy evaluation inference rule by joining the fuzzified inputs of say, temperature, humidity, smoke and gas. Using the clipping method, the membership functions then evaluates the weighted strength of the rule. Hence, the outcome represents the fuzzy distribution rule in the application domain [42,43]. The Mamdani's Max-Min fuzzy inference system (FIS) engine is utilized in evaluating the output of the proposed model, because of its ability to provide accurate and precise approximation results as 6mentioned in [26,44,45]. Therefore, the Mamdani FIS method, utilizes the rule sets defined in Tables 1 and 2, as input membership values with a corresponding weigh factor to determine the approximate fuzzy output.

Model Defuzzification and Evaluation
Defuzzification is the inverse transformation process that maps the fuzzy outputs from the fuzzy domain back into the crisp output domain [46]. In this approach, we utilize the centroid defuzzification technique or the center of gravity (CoG). The center of gravity is a widely accepted technique because the output defuzzification values tend to move smoothly in the fuzzy region, giving a more accurate and precise representation of the fuzzy set region of any shape. Mathematically, the CoG is fundamentally defined as follows; Crisp Output : This evaluates to a single crisp value µ A (υ), and υ is the center of the membership function.

Architectural Design of Fire Detection Model
The Figure 3, shows a typical block diagram of a fuzzy based architectural model with its corresponding interacted components. The sensor components include DHT22 for recording the temperature and humidity changes, UR/IR which detects the presence of flame, and MQ5 which detects the presence of a gas. They are used to detect the surrounding environmental changes due to a fire outbreak.  The experimental collected data is further transmitted and stored in the Cloud API. The stored data can then be segmented into appropriate fuzzy membership values as illustrated in the Figure 3, above. Using appropriate fuzzy-based detection algorithms, the stored data is acted upon and analyzed to determine an output by making an informed decision of the prevailing fire status, i.e., as a percentage of the estimated fire intensity prediction (EFIP). The fuzzy algorithm may be implemented using the Arduino integrated development platform (IDE). The Arduino IDE is an open-source cross-platform application for hardware and software solutions in embedded computing systems code modules [47]. In order to simulate the model, we utilize MATLAB version 2018 a, in the simulation and modeling of the dynamic behavior of the proposed fuzzy based approximation model. MATLAB is a high-performance language tool for modeling technical computing solutions with an integrated environment to support computational, visualization and programming in a user-friendly manner. Using the MATLAB Fuzzy Logic toolbox, the proposed fuzzy control model behavioral dynamics are then designed, simulated, modeled and analyzed, with different performance parameters as discussed herein.

Simulation Input and Output Fuzzy Parameters Considered
In the Tables 3 and 4, we show the various simulation input/output parameters considered in our simulation experiment, together with their corresponding fuzzy domain ranges defined in a MATLAB Fuzzy Logic toolbox environment. The experimental collected data is further transmitted and stored in the Cloud API. The stored data can then be segmented into appropriate fuzzy membership values as illustrated in the Figure 3, above. Using appropriate fuzzy-based detection algorithms, the stored data is acted upon and analyzed to determine an output by making an informed decision of the prevailing fire status, i.e., as a percentage of the estimated fire intensity prediction (EFIP). The fuzzy algorithm may be implemented using the Arduino integrated development platform (IDE). The Arduino IDE is an open-source cross-platform application for hardware and software solutions in embedded computing systems code modules [47]. In order to simulate the model, we utilize MATLAB version 2018 a, in the simulation and modeling of the dynamic behavior of the proposed fuzzy based approximation model. MATLAB is a high-performance language tool for modeling technical computing solutions with an integrated environment to support computational, visualization and programming in a user-friendly manner. Using the MATLAB Fuzzy Logic toolbox, the proposed fuzzy control model behavioral dynamics are then designed, simulated, modeled and analyzed, with different performance parameters as discussed herein.

Simulation Input and Output Fuzzy Parameters Considered
In the Tables 3 and 4, we show the various simulation input/output parameters considered in our simulation experiment, together with their corresponding fuzzy domain ranges defined in a MATLAB Fuzzy Logic toolbox environment.

The Fuzzy Control System (FCS) Design
In this section, we illustrate the design of the fuzzy-based fire detection model designed using the fuzzy toolbox and the Mamdani FIS, integrated within MATLAB environment, as observed in Figures 4 and 5. Figure 4 represents the initial environment changes in temperature and humidity due to a fire flame vis-à-vis the estimated fire intensity prediction (EFIP), whereas Figure 5 represents the various gases involved during combustion and their effect of the EFIP observed.   High.

The Fuzzy Control System (FCS) Design
In this section, we illustrate the design of the fuzzy-based fire detection model designed using the fuzzy toolbox and the Mamdani FIS, integrated within MATLAB environment, as observed in Figures 4 and 5. Figure 4 represents the initial environment changes in temperature and humidity due to a fire flame vis-à-vis the estimated fire intensity prediction (EFIP), whereas Figure 5 represents the various gases involved during combustion and their effect of the EFIP observed.

Input/Output Fuzzy Membership Functions Designs
With reference to the Figure 6a-e, we illustrate the sample input/output designs for the proposed fuzzy inference systems (FIS) variables and their corresponding membership function plots. For instance, Figure 6a or Figure 6e illustrates the FIS input variables for carbon monoxide (CO), {low, medium, high}, and humidity, {dry, optimal, moist}, as their respective membership function plots. Likewise, the estimated fire intensity prediction (EFIP) is an FIS output variable that is represented by: {very low, low, moderate, high, very high}.

Input/Output Fuzzy Membership Functions Designs
With reference to the Figure 6a-e, we illustrate the sample input/output designs for the proposed fuzzy inference systems (FIS) variables and their corresponding membership function plots. For instance, Figure 6a or Figure 6e illustrates the FIS input variables for carbon monoxide (CO), {low, medium, high}, and humidity, {dry, optimal, moist}, as their respective membership function plots. Likewise, the estimated fire intensity prediction (EFIP) is an FIS output variable that is represented by: {very low, low, moderate, high, very high}.

Input/Output Fuzzy Membership Functions Designs
With reference to the Figure 6a-e, we illustrate the sample input/output designs for the proposed fuzzy inference systems (FIS) variables and their corresponding membership function plots. For instance, Figure 6a or Figure 6e illustrates the FIS input variables for carbon monoxide (CO), {low, medium, high}, and humidity, {dry, optimal, moist}, as their respective membership function plots. Likewise, the estimated fire intensity prediction (EFIP) is an FIS output variable that is represented by: {very low, low, moderate, high, very high}.

MATLAB Evaluation Rules Editor Proposed Fuzzy Based Model
In this section, we show the proposed fuzzy inference rules, as detailed in Figure 7a,b, that were used in the output evaluation of the proposed fuzzy approximation model. In order to design the inference rules, we applied the "AND "connector. The "AND" connection is significant in determining the minimum probability of the estimated fire intensity prediction (EFIP) status, given a set of fuzzy input parameters discussed above.
In this research approach, we assumed that all the fuzzy inference rules considered in the model evaluation have an equal weighted priority function (W = I). This implies that the proposed evaluation rules are having equal priority during model evaluation. It is also important to note that we considered the flame presence to be "true" for all evaluation rules. The significant of this is to minimize the potential possibility of false alarm rate.

MATLAB Evaluation Rules Editor Proposed Fuzzy Based Model
In this section, we show the proposed fuzzy inference rules, as detailed in Figure 7a,b, that were used in the output evaluation of the proposed fuzzy approximation model. In order to design the inference rules, we applied the "AND "connector. The "AND" connection is significant in determining the minimum probability of the estimated fire intensity prediction (EFIP) status, given a set of fuzzy input parameters discussed above.

MATLAB Evaluation Rules Viewer
In Figure 8a, we illustrate the rule view evaluation insights of the resultant effect on the EFIP due to gas combustion and then temperature and humidity. For instance, for Figure 8a, we demonstrate a resultant fire gas combustion and then its corresponding effect on the fire intensity, i.e., if CO = 57.7 ppmv, CO2 = 69.8 ppmv, O2 = 62.1 ppmv, flame presence = 0.5, then estimated fire intensity prediction (EFIP) = 60.9% for the above conditions. Likewise, in Figure 8b, we show that the resultant rule viewer for a given experimentation yielded the following results: temperature = 70.6 °C, humidity = 26.6%, flame = 0.5 vs EFIP = 67.5%, as below: In this research approach, we assumed that all the fuzzy inference rules considered in the model evaluation have an equal weighted priority function (W = I). This implies that the proposed evaluation rules are having equal priority during model evaluation. It is also important to note that we considered the flame presence to be "true" for all evaluation rules. The significant of this is to minimize the potential possibility of false alarm rate.

MATLAB Evaluation Rules Viewer
In Figure 8a, we illustrate the rule view evaluation insights of the resultant effect on the EFIP due to gas combustion and then temperature and humidity. For instance, for Figure 8a, we demonstrate a resultant fire gas combustion and then its corresponding effect on the fire intensity, i.e., if CO = 57.7 ppmv, CO 2 = 69.8 ppmv, O 2 = 62.1 ppmv, flame presence = 0.5, then estimated fire intensity prediction (EFIP) = 60.9% for the above conditions. Likewise, in Figure 8b, we show that the resultant rule viewer for a given experimentation yielded the following results: temperature = 70.6 • C, humidity = 26.6%, flame = 0.5 vs EFIP = 67.5%, as below:

Proposed IoT-based Fuzzy Approximation Prediction Model
The proposed IoT fuzzy-based approximation prediction model consists of five major components, namely, i) fuzzy input values, ii) fuzzy inference engine (FIS), iii) fuzzy output values, iv) decision evaluation criteria and v) safety operations analyzer.

i) Fuzzy Input Values:
This component comprises crisp input parameters. It consists of sensors that take the different data

Proposed IoT-Based Fuzzy Approximation Prediction Model
The proposed IoT fuzzy-based approximation prediction model consists of five major components, namely, (i) fuzzy input values, (ii) fuzzy inference engine (FIS), (iii) fuzzy output values, (iv) decision evaluation criteria and (v) safety operations analyzer.
(i) Fuzzy Input Values: This component comprises crisp input parameters. It consists of sensors that take the different data readings. Each crisp input parameter is then represented in several fuzzy input parameters as shown in the diagram in Figure 9. Environmental sensor readings (data) are taken from the sensors, namely, rate of change in temperature (∆T) = {very low, low, medium, high, very high}, humidity (∆H) = {dry, optimal, moist}, carbon monoxide (∆CO) ={low, medium, high}, carbon dioxide (∆CO 2 ) = {low, medium, high}, oxygen (∆O 2 ) = {low, medium, high} and flame presence = {false, true}. The data readings from the different sensors are fuzzified into the different input fuzzy values as defined in Figure 9.

iii) The Fuzzy Output Values:
The fuzzy output value criteria denote the implication of the proposed fuzzy model design. Through the message queue telemetry transport (MQTT) protocol, data is sent to the cloud application programming interface (API) environment. The sensor data are then acted upon by an intelligent fuzzy based algorithm to obtain an output referred to as the estimated fire intensity prediction (EFIP). EFIP represents the probability of a fire occurrence determined by the input fuzzy parameters shown in Figure 9, above. Consequently, an appropriate decision is made and evaluated against the fire status.

iv) The Decision Evaluation Criteria:
The fire intensity (EFIP) then determines the appropriate decision-making based on the percentage (%) of fire status using predefined classification criterion ranges, namely, very low (VL): [0-20], low (L): , moderate (M): , high (H): [60-80], and very high (VH):[80-100]. The proposed fuzzy based algorithm shall be able to act on the data stored in a cloud API such as Thingspeak or Firebase to make an appropriate decision based on the laid-out criteria defined in the model above.

v) Safety and Operations Analyzer:
This component of the model is activated in case of any predetermined early warning detected a signal shall be initiated or a message sent to the authorities for an appropriate and immediate action. The safety and operation analyzer is therefore, responsible for signaling an alarm, initiating a water sprinkler, or sending a warning message for possible evacuation of persons. Figure 9. Proposed IoT-based fuzzy approximation prediction model. Figure 9. Proposed IoT-based fuzzy approximation prediction model.

(ii) The Fuzzy Inference Engine (FIS):
After the process of fuzzification. The fuzzy values are processed with the help of a micro controller unit (MCU). This component consists of a rules inference engine. That comprises all inference evaluation rules to be applied to the proposed fuzzy based model. The database engine acts as a fuzzy associative matrix (FAM) store for all inference rules to be utilized by the proposed model thereby forming a knowledge base. Using the "AND" operator and the IF . . . THEN structure, we then define the minimum probability of a fire outbreak using the defined fuzzy domain. The weighted function (W = 1), means all evaluation inference rules are equal and therefore, have equal priority in the evaluation of the fuzzy inference system. (

iii) The Fuzzy Output Values:
The fuzzy output value criteria denote the implication of the proposed fuzzy model design. Through the message queue telemetry transport (MQTT) protocol, data is sent to the cloud application programming interface (API) environment. The sensor data are then acted upon by an intelligent fuzzy based algorithm to obtain an output referred to as the estimated fire intensity prediction (EFIP). EFIP represents the probability of a fire occurrence determined by the input fuzzy parameters shown in Figure 9, above. Consequently, an appropriate decision is made and evaluated against the fire status.
(iv) The Decision Evaluation Criteria: The fire intensity (EFIP) then determines the appropriate decision-making based on the percentage (%) of fire status using predefined classification criterion ranges, namely, very low (VL): [0-20], low (L): , moderate (M): , high (H): [60-80], and very high (VH):[80-100]. The proposed fuzzy based algorithm shall be able to act on the data stored in a cloud API such as Thingspeak or Firebase to make an appropriate decision based on the laid-out criteria defined in the model above. (

v) Safety and Operations Analyzer:
This component of the model is activated in case of any predetermined early warning detected a signal shall be initiated or a message sent to the authorities for an appropriate and immediate action. The safety and operation analyzer is therefore, responsible for signaling an alarm, initiating a water sprinkler, or sending a warning message for possible evacuation of persons.

Results and Discussions
After successful simulation and modeling of the proposed fuzzy control approximation model, the following insights of results were obtained as discussed herein. Results graphically the comparative performance due to a fire outbreak on the surrounding environmental conditions vis-à-vis the estimated fire intensity prediction (EFIP) in order to obtain an informed decision of a prevailing fire status.

Initial Environmental Parameters, i.e., Temperature, Humidity and Flame vs EFIP
In Figure 10a-e, we show the performance comparison due to a fire outbreak as per the proposed environmental parameters, namely, rate of change of temperature and rate of change of humidity vis-à-vis the output parameter, estimated fire intensity prediction (EFIP). The EFIP is determined as a percentage probability of true fire incidences with respect to the input variables. Figure 10b,d represent a 2D view of Figure 10a. We observe that, during the initial stages of a fire outbreak, there are lower temperatures experienced amidst high humidity conditions, translating into lower fire intensity (EFIP). Then, the temperatures significantly increase with increased EFIP. We also observe that lower temperatures are due to a high moisture content contained in the atmosphere; this subsequently translates into a lower fire intensity or (EFIP). Furthermore, we noted that a steady increase in temperature decreases the humidity conditions till the dryness conditions. This significantly lowers the estimated fire intensity prediction (EFIP), as illustrated in the Figure 10d

Gas Combustion i.e., CO, CO2, O2 and Flame Vs EFIP
In the Figure 10a-f below, we discuss several comparative insights due to gas combustion, i.e., ΔCO, ΔCO2 and ΔO2, in relationship with fire intensity (EFIP) due to a fire outbreak. Several scenarios are considered for the model, the performance behavior of the gases dissipated in the proposed fuzzy control system; results are discussed herein.
In the Figure 11a, we observe an initially lower gas concentration levels for CO and CO2, which further rises with subsequent increase in the fire intensity (EFIP). In the Figure 11b, at CO2 = 17 ppmv, EFIP = 50%, we observe a gradual increase in CO2 levels due to increased fire intensity (EFIP), until 75%, when the fire intensity then becomes constant till when CO2 = 67 ppmv. However, beyond 67 ppmv, we suddenly observe a drop in the fire intensity (EFIP) noticed due to decreased levels of O2 necessary for supporting fire combustion. Hence, this subsequently translates into a decrease in the fire intensity (EFIP).
In Figure 11c, we observe that an increase in smoke intensity or carbon monoxide (CO) dissipated lowers the volume of O2 levels in the surrounding and hence, subsequent increases in fire intensity or (EFIP). In the Figure 11f, we observe that an increased consumption of O2, lowers the fire intensity, meaning that more O2 is being consumed. This initially increases the fire intensity. However, O2 levels gradually reduce with time. This eventually translates into lower fire intensity (EFIP).
In addition, note that, as more O2 levels are reduced by the burning flame, this subsequently increases the level of CO2 dissipated into the atmosphere. Hence, there is a drop in the fire intensity (EFIP) because CO2 does not support the combustion as noted in Figure 11b. Also, decreased levels of oxygen translate into an increased support for fire combustion. This further leads to a high dissipation of both carbon dioxide (CO2) or CO hence, higher fire intensity prediction (EFIP) is realized, as observed in the Figure 11a. Note that, in the Figure 11e, we observe that increased flame intensity subsequently increases the fire intensity as more O2 is consumed by the burning flame. Also, in the Figure 11f, we observe that, at lower levels of oxygen (O2), there is significantly higher EFIP and vice versa: higher O2 concentrations yield lower EFIP, as per the designed rule based fuzzy model. In Figure 10c, we observe that a lower risk level is experienced in the "blue" region. Thus, when the temperatures increase the risk factors are migrated to the moderate level and subsequently to high risk level ("yellow" region), as per the Figure 10c. We also note that the averagely low temperatures that are experienced with an increase in moisture content during a fire outbreak subsequently lower the probability of the fire intensity and vice versa. In Figure 10b, it is noted that, during the initial stages of a fire outbreak event, for, say, EFIP < 20% and temperature = 20 • C, a high moisture content is experienced and this lowers EFIP because high humidity conditions are still experienced at that point. However, when the temperatures significantly rise beyond 20 • C, we observe an increase in the EFIP, which further increases with a rise in temperature as per Figure 10b. Overall, it is observed that, high temperatures translate into significantly lower humidity and, therefore, lead to an increased fire intensity (EFIP). Lower temperatures, on the other hand, result in a high humidity, hence decreasing the fire intensity (EFIP), as per the rules.
In Figure 10b, at EFIP = 88%, and Temperature = 72 • C, we observe that the EFIP remains constant (in steady state) with an increased temperature change for a given period of time due to oxygen being depleted. It should be noted that the effect of increased temperatures translates into lower dry humidity conditions for a given environmental setting. From Figure 10d above, we observe that a lower humidity condition experienced due to high temperatures ultimately translates into high fire intensity (EFIP). However, beyond the value of humidity of approx. 68%, we realize a gradual decrease in the fire intensity. This is because, increased humidity conditions within the atmosphere subsequently lowers the temperatures and then fire intensity (EFIP), hence affecting the fire status. In Figure 10e, it is noted that lower temperature conditions significantly translate into lower flame and subsequently yielding a lower fire intensity. Likewise, higher temperatures may significantly result into higher fire intensity (EFIP), as observed in the Figure 10e.

Gas Combustion i.e., CO, CO 2 , O 2 and Flame vs EFIP
In the Figure 10a-e below, we discuss several comparative insights due to gas combustion, i.e., ∆CO, ∆CO 2 and ∆O 2 , in relationship with fire intensity (EFIP) due to a fire outbreak. Several scenarios are considered for the model, the performance behavior of the gases dissipated in the proposed fuzzy control system; results are discussed herein.
In the Figure 11a, we observe an initially lower gas concentration levels for CO and CO 2 , which further rises with subsequent increase in the fire intensity (EFIP). In the Figure 11b, at CO 2 = 17 ppmv, EFIP = 50%, we observe a gradual increase in CO 2 levels due to increased fire intensity (EFIP), until 75%, when the fire intensity then becomes constant till when CO 2 = 67 ppmv. However, beyond 67 ppmv, we suddenly observe a drop in the fire intensity (EFIP) noticed due to

Simulation Experiment Data Results
In Table 5, we study and observe the performance comparison of rate of change of temperature (ΔT) and the rate of change of humidity (ΔH) vis-à-vis the estimated fire intensity prediction (EFIP) for 12 experimental evaluation rule values. Figure 12 illustrates a resultant graphical illustration of the data output generated from Table 5 above. It is observed that, at lower temperatures, there exists high humidity conditions, which subsequently translate into lower estimated fire intensity prediction (EFIP), as noted by the dotted line in the Figure 12. However, an increase in temperature conditions tends to significantly lower the humidity conditions towards dryness.  In Figure 11c, we observe that an increase in smoke intensity or carbon monoxide (CO) dissipated lowers the volume of O 2 levels in the surrounding and hence, subsequent increases in fire intensity or (EFIP). In the Figure 11f, we observe that an increased consumption of O 2, lowers the fire intensity, meaning that more O 2 is being consumed. This initially increases the fire intensity. However, O 2 levels gradually reduce with time. This eventually translates into lower fire intensity (EFIP).
In addition, note that, as more O 2 levels are reduced by the burning flame, this subsequently increases the level of CO 2 dissipated into the atmosphere. Hence, there is a drop in the fire intensity (EFIP) because CO 2 does not support the combustion as noted in Figure 11b. Also, decreased levels of oxygen translate into an increased support for fire combustion. This further leads to a high dissipation of both carbon dioxide (CO 2 ) or CO hence, higher fire intensity prediction (EFIP) is realized, as observed in the Figure 11a. Note that, in the Figure 11e, we observe that increased flame intensity subsequently increases the fire intensity as more O 2 is consumed by the burning flame. Also, in the Figure 11f, we observe that, at lower levels of oxygen (O 2 ), there is significantly higher EFIP and vice versa: higher O 2 concentrations yield lower EFIP, as per the designed rule based fuzzy model.

Simulation Experiment Data Results
In Table 5, we study and observe the performance comparison of rate of change of temperature (∆T) and the rate of change of humidity (∆H) vis-à-vis the estimated fire intensity prediction (EFIP) for 12 experimental evaluation rule values. Figure 12 illustrates a resultant graphical illustration of the data output generated from Table 5 above. It is observed that, at lower temperatures, there exists high humidity conditions, which subsequently translate into lower estimated fire intensity prediction (EFIP), as noted by the dotted line in the Figure 12. However, an increase in temperature conditions tends to significantly lower the humidity conditions towards dryness.  In addition, excessively high temperatures tend to vaporize the humidity conditions, and this subsequently increases the fire intensity (EFIP). This phenomenon can be observed at sampled points 11-12, of the graphical illustration in Figure 12. Therefore, the latter figure suitably illustrates the EFIP from very low at point 1, to very high EFIP when temperatures are very high, and the humidity conditions decreases to dryness, as observed at point 12. Moderate EFIP is observed at sample points 6-7, where the temperatures and humidity conditions are approximately in equilibrium with the prevailing conditions.
In the Table 6, we study and observe the performance comparison of the gases dissipated i.e., rate of change of carbon monoxide (CO), rate of change of carbon dioxide (CO2), due to a fire outbreak combustion in support of the rate of change in oxygen (ΔO2) levels. In Figure 13, it is observed that lower levels of CO2 or CO concentration in the atmosphere translates into lower estimated fire intensity prediction (EFIP). Lower levels of CO2 in the atmosphere also significantly translates into lower temperatures or high humidity conditions experienced during a fire outbreak. However, at sample data point 2-5, we observe that there is a relative increase in both CO2 and CO concentration levels due to increased temperatures. This significantly translated into higher EFIP expected, coupled with a lower humidity condition.  In addition, excessively high temperatures tend to vaporize the humidity conditions, and this subsequently increases the fire intensity (EFIP). This phenomenon can be observed at sampled points 11-12, of the graphical illustration in Figure 12. Therefore, the latter figure suitably illustrates the EFIP from very low at point 1, to very high EFIP when temperatures are very high, and the humidity conditions decreases to dryness, as observed at point 12. Moderate EFIP is observed at sample points 6-7, where the temperatures and humidity conditions are approximately in equilibrium with the prevailing conditions.
In the Table 6, we study and observe the performance comparison of the gases dissipated i.e., rate of change of carbon monoxide (CO), rate of change of carbon dioxide (CO 2 ), due to a fire outbreak combustion in support of the rate of change in oxygen (∆O 2 ) levels. In Figure 13, it is observed that lower levels of CO 2 or CO concentration in the atmosphere translates into lower estimated fire intensity prediction (EFIP). Lower levels of CO 2 in the atmosphere also significantly translates into lower temperatures or high humidity conditions experienced during a fire outbreak. However, at sample data point 2-5, we observe that there is a relative increase in both CO 2 and CO concentration levels due to increased temperatures. This significantly translated into higher EFIP expected, coupled with a lower humidity condition.  At sample data point 7 in the dataset, we observe a sudden drop in CO2, CO levels. This is due to reduced relative temperature and high humidity conditions. Hence, this ultimately translates into a decrease in the fire intensity or (EFIP). Also, at point 8, we observe an increase in the levels of CO2 resulting into a drop in O2 levels and a higher fire intensity of approx. EFIP = 87 ppmv. It should be noted that increased levels of CO and CO2 significantly reduce the O2 levels, which are used in supporting fire combustion. At point 11, we observe a lower EFIP = 22%, higher O2 = 87 ppmv and subsequently lower CO and CO2 concentrations. This is because of high humidity translates into lower temperature therefore affection the fire intensity or EFIP.

Gas Combustion Efficiency (GCE)
This is defined as the measure of how effectively the heat content generated of the burning fuel is transferred into usable heat as a result of gas combustion [35]. Note that temperature, oxygen and carbon dioxide are the primary indicators of combustion efficiency. For all presence of flame = {true} inputs to the fuzzy model and combustion of gases dissipated in the atmosphere are measured in parts per million per volume (ppmv). Hence, the gas combustion efficiency (GCE) is defined by the formula: where GCE represents the gas combustion efficiency of the burning fire flame with respect to ΔCO2, ΔCO and O2. From the data experimental results in Table 6, we can determine the GCE of the gases dissipated as per the simulated case study. Using the formula, defined in Equation (7), the rate of change of the gases dissipated to the atmosphere i.e., ΔCO, ΔCO2, the GCE can be computed.
From extracted data we observe that, the summation of ΔCO, ΔCO2 can be determined: Ʃ(ΔCO) = 494.4 ppmv, Ʃ(ΔCO2) = 474.6 ppmv. From the dataset in Table 6, the resultant GCE can be At sample data point 7 in the dataset, we observe a sudden drop in CO 2 , CO levels. This is due to reduced relative temperature and high humidity conditions. Hence, this ultimately translates into a decrease in the fire intensity or (EFIP). Also, at point 8, we observe an increase in the levels of CO 2 resulting into a drop in O 2 levels and a higher fire intensity of approx. EFIP = 87 ppmv. It should be noted that increased levels of CO and CO 2 significantly reduce the O 2 levels, which are used in supporting fire combustion. At point 11, we observe a lower EFIP = 22%, higher O 2 = 87 ppmv and subsequently lower CO and CO 2 concentrations. This is because of high humidity translates into lower temperature therefore affection the fire intensity or EFIP.

Gas Combustion Efficiency (GCE)
This is defined as the measure of how effectively the heat content generated of the burning fuel is transferred into usable heat as a result of gas combustion [35]. Note that temperature, oxygen and carbon dioxide are the primary indicators of combustion efficiency. For all presence of flame = {true} inputs to the fuzzy model and combustion of gases dissipated in the atmosphere are measured in parts per million per volume (ppmv). Hence, the gas combustion efficiency (GCE) is defined by the formula: where GCE represents the gas combustion efficiency of the burning fire flame with respect to ∆CO 2 , ∆CO and O 2 .
From the data experimental results in Table 6, we can determine the GCE of the gases dissipated as per the simulated case study. Using the formula, defined in Equation (4), the rate of change of the gases dissipated to the atmosphere i.e., ∆CO, ∆CO 2, the GCE can be computed.
From extracted data we observe that, the summation of ∆CO, ∆CO 2 can be determined: Σ(∆CO) = 494.4 ppmv, Σ(∆CO 2 ) = 474.6 ppmv. From the dataset in Table 6, the resultant GCE can be approximately computed from the Equation (4).
The gas combustion efficiency (GCE) = 474.6 494.7+474.6 × 100% = 48.96%, Hence, the efficiency of the gases dissipated into the atmosphere due to the burning fuel is equivalent to 49%. Meaning that, approximately~50% of the gases, i.e., CO, CO 2, are dissipated into the atmosphere through the carbon element burning in the fuel. With reference to the simulation data in Table 6, we observe that an increase or decrease in the amount of gas dissipated has a subsequent increase or decrease on the fire intensity. This translates into an increased efficiency of the burning fuel. This can also be clearly indicated by the dotted line curve in the graph of Figure 12, representing the estimated fire intensity prediction (EFIP).

Model Performance Evaluation
In this paper, we evaluate the performance of the model and subsequently determine the percentage accuracy, using accuracy rate as one of the standard evaluation parameters. The model is evaluated using the two-factor decision authentication, to determine the test and the actual model, then a percentage accuracy is determined depending on the inference rules, as shown in Tables 7 and 8 as detailed below.  For instance, in Table 7, Experiment 1, we observe that the rate of temperature (∆T) is 9.0 • C, rate of change in humidity (∆H) is 17.5%, and the estimated fire intensity prediction (EFIP) is 17.6%, which is L and the actual case is VL, which means an accuracy rate of 50% achieved. In Expt. 2, ∆T is 15.1 • C, ∆H is 27.3% and the EFIP is 18.3%, meaning there is 18.3% probability of a fire occurrence.
The test case is L and, actual case is VL, gives an accuracy rate of 50%. In Expt. 3, we show that ∆T is 38.0 • C, ∆H is 58.4% and the EFIP is 43.6%. Hence, 43.6% there is a probability of a fire occurrence. The test case is M and the actual case is M giving an accuracy rate of 100%. From Experiment 4-12, we observed that the accuracy rate is 100%, meaning the tested model is working according to the defined fuzzy inference rules. Then, the above method is subsequently applied to the second experiment shown in the Table 8. Then, the overall accuracy rate of the proposed model can be calculated below as: In Equation (5), we compute the accuracy rate of the proposed model, where µ(ai) represents the accuracy percentage of each experiment and, n the total number of simulated experiments. According to the experiments, we achieved an average overall accuracy rate of 95.83%. Hence, using the fuzzy logic approach significantly improves fire detection with an overall accuracy of 95.83%.
The original novelty of the research works demonstrates that using Mamdani's FIS method exhibits a significant improvement in terms of rate accuracy for the proposed fuzzy control model. This subsequently translates into an effective design for early fire detection and safety control for the local urban markets. In this research approach, we achieved an average overall accuracy rate of 95.83%, as compared to the performance of previous related works as illustrated in Table 9 of [7,13,18]. Hence, the proposed solution can effectively detect early fires, making it advantageous to single smoke sensor based systems. This solution is cheaper and more affordable to the developing countries compared to the satellite-based systems and a likely substitute for human patrol mechanisms that are being used today in detecting fires in the local urban markets of East Africa (EA). In the above experiment, we realize that application of a multisensory based fire detection system solutions, significantly improves performance and subsequently minimizes the rate of false alarms induced. Hence, the application of fuzzy logic method successfully improved the overall accuracy rate to 95.83%, using the defined inference rules.

Conclusion and Future Works
In this paper, we present an IoT-based fuzzy approximation prediction model using the Mamdani inference system to aid effective fire safety management and control for vendor community in the local urban markets. The major significance of the model is aimed at an early detection by minimizing extensive damage, through notifying responsible authorities for quick action and allow for safe evacuation of occupants. Previous research works propose different methods of detecting fire incidences. In this paper, we employ a multisensory fuzzy logic application to achieve accurate results and minimize false alarm rates. In this approach, six input parameters are applied to the model, namely, rate of temperature (∆T), humidity (∆H), carbon dioxide (∆CO 2 ), carbon monoxide (∆CO), oxygen (∆O 2 ) and flame presence, under different operating conditions vis-à-vis the estimated fire intensity prediction (EFIP). The system shall alert responsible authorities if an abnormal environmental situation is detected. The EFIP represents the percentage probability of true fire incidences realized and then an appropriate action is instigated, such as sending alert message, or initiating water sprinklers to suppress the fire immediately.
Simulation experiments were performed using the MATLAB Fuzzy Logic toolbox. Results obtained achieved an overall average accuracy rate of 95.83%, as discussed above. In future works, we intend to develop an intelligent fuzzy-based fire detection algorithm using the proposed design model.