In this paper, the fuzzy control algorithm is used to detect fire in the residential area which is placed where it is needed and used to detect any abnormal behavior. Whenever any abnormal behavior is detected, FMWS are used to set an alarm and other control mechanisms. Rule-based fuzzy logic is implemented in this approach on data that is collected from different sensors. In FMWS, MATLAB Fuzzy Logic Toolbox is used for simulation work with more accuracy, flexibility, and scalability with other systems. To process the Fuzzy Logic in this research Fuzzy Rule, Fuzzy Inference System, and Defuzzification process are involved.
2.2. Architecture of the Proposed Fuzzy Logic System
The general architecture of a proposed FLS is shown in
Figure 1. In a broader sense, the fuzzy logic refers to a fuzzy set [
25]. Typically, a fuzzy set
S is a pair (
U,
m) where universe of discourse
U is a set and characterized by a membership function where
mS takes the value in the interval [0, 1], i.e.,
mS:U → [0, 1]. Whereas, the Universe of Discourse and the membership function plays a vital role in this approach. The fuzzy set can be represented as a set of ordered pairs of elements
e and its degree of membership function, as described in [
19] and the same is shown in Equation (1):
The probability that
e belongs to
S is the membership function
mS(
e). Here, three parameters (three fuzzy subset of S (A, B, and C)) are used in the proposed approach. In Equations (2) and (3), the m
A(x) is the degree of membership of x in A, mB (x), the degree of membership function of x in B and m
C(x) is the degree of membership of x in C. Here, a variable A represents
temperature, variable B represents
time and Variable C represents
humidity. Considering this, the fuzzy union set and fuzzy intersection set are defined as:
The Equations (2) and (3) are implemented in this approach to compute rules strength. In Equation (2), the union of three fuzzy subsets is computed by using fuzzy operator “or” by combining the fuzzified inputs using fuzzy combination. Similarly, in Equation (3), to compute the intersection of three subsets, the fuzzy “and” operator is used by clipping the output membership function at the rule strength. According to the proposed work, Equation (3) is implemented with three inputs because in this approach, we need to obtain rule strength by combining the fuzzified inputs, and it clips the output membership function at the rule strength. Typically, a fuzzy set describes the values of linguistic variables as quantitatively and qualitatively. A membership functions defines that each point is mapped to a membership value between 0 and 1 in the defined Universe of Discourse. In the proposed FMWS, the fuzzy rules are implemented using if-then rules, which are used to express a piece of knowledge. The fuzzy rules are most widely and commonly used for interpretation also used in this approach, like
For the collection of fuzzy rules,
The proposed fuzzy logic expert system in this paper consists of the four basic components: fuzzification, inference, knowledge base, rules, and defuzzification. Every component is involved in the decision making process by the proposed FMWS.
Fuzzy logic system with its components is shown in
Figure 1 and working of the proposed fuzzy logic system is described in Algorithm 1 that is based on [
26]. This algorithm implements the fuzzy logic system in the proposed Fire Management and Warning System (FMWS).
Algorithm 1 Proposed Algorithm for proposed Fuzzy Logic System |
1. Define: Linguistic variables and terms (initialization) 2. Construct: Membership Functions (initialization) 3. Construct: Rule base (initialization) 4. Construct: Crisp input data to fuzzy values using Membership Function (fuzzification) 5. Evaluate: Rules in the rule base (inference) 6. Combine: Results of each rule (inference) 7. Convert: Output data to non-fuzzy values (defuzzification) |
According to the Algorithm 1, a set of input data was collected from sensors and using data variables, fuzzy linguistic terms, and membership function set is converted to a fuzzy set and this process is called as fuzzification. Afterwards, using a set of rules an inference is made. In the last, step which is called as defuzzifictaion, fuzzy output is mapped to an output using the membership functions. The description of each components of the proposed fuzzy logic systems is given below:
2.2.1. Used Fuzzification Method
The fuzzification is the first phase in the proposed fuzzy logic based FMWS. In this fuzzification process, the crisp values are converted into fuzzy set using a set of membership functions that are described in next section. Each membership function represents quality of the sensor variables being fuzzified, e.g., the membership function of a variable “Change rate of Temperature” and “Change rate of Humidity” are valued as “Low”, “Mid”, and “High”, whereas the membership function of variable “Time” is “short” and “long”, The fuzzified set can be described, as shown in Equation (4):
In this relation, the fuzzy set K(xi) is called as kernel of fuzzification. To implement this method, µi constant and xi is being transformed to a fuzzy set K(xi). In the proposed work, the Equation (4) is used in the process of fuzzification where the universe of discourse and the membership functions are implemented.
2.2.2. Used Membership Function
In the proposed fuzzy logic based FMWS, a membership function is defined as µ
A:X [0, 1] for a fuzzy set A and X is a universe of discourse, and each element of X is mapped to a degree of membership function between 0 to 1. In the proposed approach, a fuzzy set can be represented graphically using a membership function. The
x-axis represents universe of discourse and
y-axis represents the degree of membership function from 0 to 1. In the proposed approach, the triangular membership function is used, and the details of the triangular membership function. The reason of using the triangular membership function in the proposed approach is that it is simple to implement in MATLAB and it provides accurate results. It is available with the function name “trimf” in MATLAB. The triangular membership function [
19] can be defined by a lower limit a, an upper limit b and a value mean m, where a < m < b, as shown in
Figure 2 and Equation (5).
There are three parameters in
x-axis (a, m, b), as shown in
Figure 2 that represents lower boundary, peak, and upper boundary of a membership function,
y-axis represents the degree of membership function. Alternative expression for the preceding equation can be written using min and max operations, as shown in Equation (6):
The Equation (6) shows that there are three parameters (a, b, c) with (a < b < c) that determines
x coordinates of the three corners of the underlying triangular membership function. The Equations (5) and (6) are used to make membership functions for all four variables (three inputs and one output) of the used fuzzy logic system. The membership function is designed in this approach using above equations for each input linguistic variables, which are “change rate of temperature”, “change rate of humidity”, “time” and output linguistic variable “fire-chances”. The used membership functions are defined in MATLAB Fuzzy Logic toolbox, as explained in
Section 3.
2.2.3. Used Fuzzy Inference System
In the architecture of the proposed FMWS, a fuzzy inference system is used that is based on a set of if-then rules, a set of membership functions and fuzzy logic operators, such as “and”, “or”. In the proposed approach, the fuzzy inference is mapped from an input to an output using fuzzy logic. The fuzzy inference has three types, such as Mamdani fuzzy inference system, Sugeno fuzzy inference system, and Tsukamoto fuzzy inference system. In the proposed approach, Mamdani and Sugeno fuzzy inference system [
27] is used that was originally introduced by WeEbrahim Mamdani in 1975. The used Mamdani fuzzy inference system is implemented in the following six steps:
Fuzzification of input using membership function
According to fuzzy set theory the fuzzified inputs are combines
Built fuzzy rules
Finding outcomes of the rules by combining rule strength and output membership function
Get an output distribution by combining the outcomes
Defuzzification of the output membership function
In
Figure 3, a detailed process of Mamdani FIS [
28] using three inputs and two rules is illustrated and defined in Equations (7) and (8), where the input x
1, y
1, and z
1 is fuzzy, not crisp. The three inputs are fuzzified by applying intersection on crisp input value with the input membership function. For combining, the three fuzzified inputs to obtain rule strength by using operator “and”. The used Mamdani inference system uses a membership function for each rule and then according to the condition of the rule reaches to a conclusion.
2.2.4. Used Defuzzification Method
This is a last step in the implementation of FMWS whereas the output is evaluated from a rule set that is written in the form of if-then statements and is saved in a knowledge base of the system. Here, a scalar value of fuzzy system is fuzzified, rules are applied, and each rule generates a fuzzy output and converts it to a scalar quantity. The two typically used defuzzification methods are the Centroid Defuzzification method and Weighted Average Defuzzification method
This step is done by MATLAB fuzzy logic tool box and centroid method is implemented in this research and its details are described below:
Centroid Defuzzification Method: In this approach centroid defuzzification method is used because it gives an accurate result which is originally developed by Sugeno in 1985. This technique is expressed mathematically in Equation (9) as
where x* is the defuzzified output, µ
i(x) aggregated membership function, and
x is the output variable in Equation (9). It is defined graphically in
Figure 4 where
x-axis represents the output variable x,
y-axis represents µ
i(x) aggregated membership function and x* is the defuzzified output. The shape of output is obtained by applying fuzzy operator “and” by clipping the output membership function according to the rule strength.