**Application of Fuzzy Inference System in the Prediction of Air Quality Index**

\*\*Double blind review, please do not include authors information in this version \*\*

Received Date: \*date

Accepted Date: \*date

Published Date: \*date

**HIGHLIGHTS (Arial, 11)**

  - Authors should supply between 3-5 highlights on major research findings and should use Times New Roman 10 typeface.

  - Highlights should be brief with no more than 80 characters for each point and should not include citations.

  - Example highlights: <https://www.sciencedirect.com/science/article/pii/S1535610817302970>

  - Another example: <https://www.sciencedirect.com/science/article/pii/S0957417420304851>

ABSTRACT (Arial,11)

*Air pollution is the presence of substances in the atmosphere that are harmful to the health of humans and other living beings. It is caused by solid and liquid particles and certain gases that are suspended in the air. The air pollution index (API) or also known as air quality index (AQI) is an indicator for the air quality status at any area. It is commonly used to report the level of severity of air pollution to public and to identify the poor air quality zone. The AQI value is calculated based on average concentration of air pollutants such as Particulate Matter 10 (PM10), Ozone (O3), Carbon Dioxide (CO2), Sulfur Dioxide (SO2) and Nitrogen Dioxide (NO2)**. Predicting the value of AQI accurately is crucial to* *minimize the impact of air pollution on environment and human health. The work presented here proposes a model to predict the AQI value using fuzzy inference system (FIS). FIS is the most well-known application of fuzzy logic and has been successfully applied in many fields. This method is proposed as the perfect technique for dealing with environmental well known and tackling the choice made below uncertainty. There are five levels or indicators of AQI, namely good, moderate, unhealthy, very unhealthy, and hazardous. This measurement is based on classification made from the Department of Environment (DOE) under the Ministry of Science, Technology, and Innovation (MOSTI). The results obtained from the actual data are compared with the results from the proposed model. With the accuracy rate of 93%, it shows that the proposed model is meeting the highest standard of accuracy in forecasting the AQI value.*

*Keywords: Air pollution, Air Quality Index, Fuzzy Inference System, Accuracy*

# INTRODUCTION 

# In the era of globalization and the age of industrialization 4.0, environmental pollution is often one of the topics discussed in the media. Most countries in the world, including Malaysia, have the same problem. Many regions in Malaysia are facing extreme air quality issues. In Malaysia, state, local and federal associations are involved in identifying where air pollution occurs, causes of air pollution, and how to control air pollution. Air pollution is caused by many reasons such as vehicle exhaust fumes, fossil fuel-based power plants, exhaust from industrial factories and plants, agricultural and construction activities etc. It may cause diseases, allergies and even death to humans. It may also cause harm to other living organisms such as animals and food crops and may damage the natural environment. Observing AQI accurately is essential to detect pollution peaks and make early preventive measures that can minimize the impact of air pollution on environment and human health. 

Previous studies have used various approaches to predict the air quality index (AQI). In this study, we focus on fuzzy inference system (FIS) to predict the AQI value. According to Chaudhari and Patil (2014), FIS approach has an expressive output strength without difficulty to understand the results and manipulate the goal. FIS can capture converting environment as a professional information and without problems. The very first application of this technique was to control a steam engine and the result obtained was as good as when controlled by experienced human operators. According to Sowlat et al. (2011) FIS has been effectively used in many fields including programmed control, data arrangement, decision analysis, skillful systems, and computer vision. For this reason, fuzzy inference systems are referred to by various names, such as fuzzy expert systems, fuzzy rule-based systems, fuzzy skilled systems, fuzzy modeling, fuzzy associative memory, fuzzy logic controllers and ambiguously fuzzy systems etc. FIS are broadly applicable in finance, scientific, economic, and engineering etc. due to the intuitive nature of the system and its ability to investigate decisions of a human. Samira and Ahmad (2016) found that FIS is the most well-known application of fuzzy logic where membership functions should be generally adjusted manually through trial and error. According to Cavallaro (2015), fuzzy logic reasoning consists of two kinds of information. The first concerns with the labels and membership functions allocated to the input and output variables. The correct desire of those symbolizes is one of the greatest serious degrees inside the design model. Another kind of information is associated with rule base which is a technique of converting the fuzzy values of the inputs to fuzzy values of the outputs. Kumaravel (2012) concluded that the important elements in FIS are fuzzification, fuzzy decision, fuzzy rule-based and defuzzification.

# According to Tiwari (2015) FIS has assumed that each rule is activated at each cycle and contributes collectively to the solution. It is a parallel single inference. However, the inference process can be preserved as the new inferred results that can be fed once more as inputs. Methods based on the fuzzy set theory must be carried out within the context of environmental numbers. The limits among the right and an unacceptable concentration is not to be considered as sharp, but as fuzzy, with implications for subsequent movement plans. There the usage of fuzzy numbers is proposed as the perfect technique for dealing with environmental well known and tackling the choice made below uncertainty.

# METHODOLOGY 

**Method of Data Collection**

The hourly data of AQI used in this study are secondary data obtained from Department of Environment under the Ministry of Science, Technology, and Innovation (MOSTI) for Kelantan state. The are 122 data sets collected from 1<sup>st</sup> June to 31<sup>st</sup> July 2016. It was recorded from Continuous Air Quality Monitoring Stations (CAQM) located in both industrial and urban areas in Kelantan.

**Rating scales for Air Quality Index (AQI)**

*The rating scale of the AQI status indicator consists of Good, Moderate, Unhealthy, Very Unhealthy, and Hazardous as shown in Table 1. This measurement is based on classification made from the Department of Environment (DOE) under the Ministry of Science, Technology, and Innovation (MOSTI).*

**Table 1:** Indicators for output, AQI

| **API**      | **Indicator**  | **Explanation**                                                                                                                       |
| ------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| 3 - 5.75     | Good           | Low pollution without any bad effect on health                                                                                        |
| 5.76 - 8.5   | Moderate       | Moderate pollution that does not pose any bad effect on health                                                                        |
| 8.51 - 11.25 | Unhealthy      | Worsen the health condition and low tolerance of physical exercises to people with heart and lung complications                       |
| 11.25-14.0   | Very Unhealthy | Worsen the health condition and low tolerance of physical exercises to people with heart and lung complications. Affect public health |
| \>14.0       | Hazardous      | Hazardous to high-risk people and public health                                                                                       |

*There are five major pollutants that contribute to air pollution, namely Sulfur Dioxide (SO<sub>2</sub>), Nitrogen Dioxide (NO<sub>2</sub>), Carbon Dioxide (CO), Ozone (O<sub>3</sub>) and Particulate Matter (PM10). The most significant input variables used in this study are PM10, CO and NO<sub>2</sub>.*

**Data Analysis**

Data analysis is done by using MATLAB. It is a completely effective software that has numerous built-in tools for solving problems and for graphical illustrations. The method of data analysis used to predict the AQI using FIS consists of four steps; 1) Fuzzification of input and output variables 2) Fuzzy decision (selection of membership functions for input and output variables), 3) Fuzzy rule-based (determination of rule base application) and 4) Defuzzification. The structure of a fuzzy system is shown in Figure 1.

![Diagram Description automatically generated](611eeae8755da_media/media/image1.png)

**Figure 1:** The process of Fuzzy Inference System

I) <span class="underline">Fuzzification of Input and Output Variables</span>

Fuzzification is a process of transforming or changing the real crisp value into the fuzzy value. The operation interprets real crisp input or else measured values into linguistic ideas using ~~the use of~~ appropriate membership functions. Fuzzy logic implements human experiences and preferences via membership functions and fuzzy rules. In fuzzy logic, each linguistic variable is associated with confidence values such that each term has its own confidence value. Appropriate fuzzy linguistic values are allocated for each fuzzy variable. The input and output are converted in the form of linguistic layout. As a result, the input value is used to generate output in the rule viewer as given in Equation (1).

![](611eeae8755da_media/media/image2.png) (1)

Figure 2 shows the fuzzy inference system that consists of three inputs (PM10, CO and NO2) and one output which is air quality index (AQI). By using FIS editor and membership function editor from MATLAB software all the membership functions are developed.

![Diagram Description automatically generated](611eeae8755da_media/media/image3.png)

**Figure 2:** FIS Editor

II) <span class="underline">Fuzzy Decision - Selection of Membership Functions for Input and Output Variables</span>

Linguistic values are expressed inside the method of fuzzy sets. A fuzzy set is defined by its membership functions. Generally, triangular and trapezoidal membership functions are utilized to standardize the crisp for its simplicity and computational performance. It is defined mathematically in the following equations;

**Triangular function** in Equation 2 is defined by a lower limit a, an upper limit b, and a value m, where a \< m \< b. The Triangular membership function is used to transform the linguistic values into a range of 0 - 1.

<table>
<tbody>
<tr class="odd">
<td><img src="611eeae8755da_media/media/image4.png" style="width:1.74659in;height:1.40278in" alt="Shape Description automatically generated with medium confidence" /> (2)</td>
<td><p><img src="611eeae8755da_media/media/image5.png" style="width:2.44032in;height:1.24306in" alt="Chart, line chart Description automatically generated" /></p>
<p><strong>Figure 3:</strong> Triangular membership function</p></td>
</tr>
</tbody>
</table>

> *    *

**Trapezoidal function** in Equation 3 is defined by a lower limit a, an upper limit d, a lower support limit b, and an upper support limit c, where a \< b \< c \< d.

<table>
<tbody>
<tr class="odd">
<td><img src="611eeae8755da_media/media/image6.png" style="width:1.70139in;height:0.97222in" alt="Shape Description automatically generated with medium confidence" /> (3)</td>
<td><p><img src="611eeae8755da_media/media/image7.png" style="width:2.91225in;height:1.25694in" alt="Chart, line chart Description automatically generated" /></p>
<p><strong>Figure 4</strong>: Trapezoidal membership function</p></td>
</tr>
</tbody>
</table>

         

Table 2 below shows the fuzzy set input indicators and the fuzzy set of output indicators. Table 3 shows the range of each input and Table 4 shows the parameters used in the membership function editor for each input.

<table>
<tbody>
<tr class="odd">
<td><p><strong>Table 2:</strong> Indicators for output and input</p>
<table>
<thead>
<tr class="header">
<th><strong>Inputs (Fuzzy Variables)</strong></th>
<th><strong>Output</strong></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>PM10</strong></td>
<td><strong>CO</strong></td>
<td><strong>NO2</strong></td>
<td><strong>AQI</strong></td>
</tr>
<tr class="even">
<td>Excellent</td>
<td>Excellent</td>
<td>Excellent</td>
<td>Good</td>
</tr>
<tr class="odd">
<td>Good</td>
<td>Good</td>
<td>Good</td>
<td>Moderate</td>
</tr>
<tr class="even">
<td>Moderate</td>
<td>Moderate</td>
<td>Moderate</td>
<td>Unhealthy</td>
</tr>
<tr class="odd">
<td>Poor</td>
<td>Poor</td>
<td>Poor</td>
<td>Very Unhealthy</td>
</tr>
<tr class="even">
<td>Very Poor</td>
<td></td>
<td></td>
<td>Hazardous</td>
</tr>
<tr class="odd">
<td>Severe</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table></td>
<td><p><strong>Table 3:</strong> Range for each input</p>
<table>
<thead>
<tr class="header">
<th><strong>Inputs</strong></th>
<th><strong>Indicators</strong></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>PM10</strong></td>
<td><strong>CO</strong></td>
<td><strong>NO2</strong></td>
<td></td>
</tr>
<tr class="even">
<td>&lt; 35</td>
<td>&lt; 10</td>
<td>&lt; 25</td>
<td>Excellent</td>
</tr>
<tr class="odd">
<td>35 - 52.5</td>
<td>10 - 15</td>
<td>25 - 37.5</td>
<td>Good</td>
</tr>
<tr class="even">
<td>52.5 -70</td>
<td>15 - 20</td>
<td>37.5 - 50</td>
<td>Moderate</td>
</tr>
<tr class="odd">
<td>70 - 87.5</td>
<td>&gt; 20</td>
<td>&gt; 50</td>
<td>Poor</td>
</tr>
<tr class="even">
<td>87.5 - 105</td>
<td></td>
<td></td>
<td>Very Poor</td>
</tr>
<tr class="odd">
<td>&gt; 105</td>
<td></td>
<td></td>
<td>Severe</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>

> **Table 4:** Parameters for membership function of the inputs

| **Parameters**           | **Indicators**  |                       |           |
| ------------------------ | --------------- | --------------------- | --------- |
| **PM10**                 | **CO**          | **NO2**               |           |
| \[-17.5 0 17.5 35\]      | \[-5 0 5 10\]   | \[-12.5 0 12.5 25\]   | Excellent |
| \[17.5 35 52.5\]         | \[5 10 15\]     | \[12.5 25 37.5\]      | Good      |
| \[35 52.5 70\]           | \[10 15 20\]    | \[25 37.5 50\]        | Moderate  |
| \[52.5 70 87.5\]         | \[15 20 25 25\] | \[37.5 50 62.5 62.5\] | Poor      |
| \[70 87.5 105\]          |                 |                       | Very Poor |
| \[87.5 105 122.5 122.5\] |                 |                       | Severe    |

Figures 5, 6 and 7 show the membership function editor for three inputs PM10, NO2, CO and Figure 8 shows the membership function editor for output AQI. The membership function input category was obtained by setting up the range of each input variable as shown in Table 4. This is then, followed by setting up the parameter for each input as shown in Table 5

<table>
<thead>
<tr class="header">
<th><p><img src="611eeae8755da_media/media/image8.png" style="width:2.46432in;height:1.36111in" alt="Graphical user interface, application Description automatically generated" /></p>
<p><strong>Figure 5:</strong> Membership function editor of PM10 (input 1)</p></th>
<th><p><img src="611eeae8755da_media/media/image9.png" style="width:2.45833in;height:1.34619in" alt="Graphical user interface Description automatically generated" /></p>
<p><strong>Figure 6:</strong> Membership function editor of CO (input 2)</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><img src="611eeae8755da_media/media/image10.png" style="width:2.38889in;height:1.29132in" alt="Graphical user interface Description automatically generated" /></p>
<p><strong>Figure 7:</strong> Membership function editor of NO2 (input 3)</p></td>
<td><p><img src="611eeae8755da_media/media/image11.png" style="width:2.54167in;height:1.29097in" alt="Graphical user interface Description automatically generated" /></p>
<p><strong>Figure 8:</strong> Membership function editor of AQI (output)</p></td>
</tr>
</tbody>
</table>

The membership functions of input 1, 2 and 3 and also output are shown in details in Table 5. The functions are formulated based on equation (2) and (3).

> **Table 5:** Membership function of input 1, 2, 3 and output

<table>
<thead>
<tr class="header">
<th>Input 1: PM10</th>
<th>Input 2: CO</th>
<th>Input 3: NO2</th>
<th>Output: AQI</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><img src="611eeae8755da_media/media/image12.png" style="width:1.53194in;height:0.63642in" alt="Shape Description automatically generated with medium confidence" /> </p>
<p><img src="611eeae8755da_media/media/image13.png" style="width:1.48378in;height:0.85417in" alt="Shape Description automatically generated with medium confidence" /> </p>
<p><img src="611eeae8755da_media/media/image14.png" style="width:1.53204in;height:0.88194in" alt="Shape Description automatically generated with medium confidence" /> </p>
<p><img src="611eeae8755da_media/media/image15.png" style="width:1.25458in;height:0.72222in" alt="Shape Description automatically generated with medium confidence" /> </p>
<p><img src="611eeae8755da_media/media/image16.png" style="width:1.64583in;height:0.89437in" alt="Shape Description automatically generated with medium confidence" /> </p>
<p><img src="611eeae8755da_media/media/image17.png" style="width:1.54583in;height:0.61308in" alt="Shape Description automatically generated with medium confidence" /></p></td>
<td><p><img src="611eeae8755da_media/media/image18.png" style="width:1.18113in;height:0.78472in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image19.png" style="width:1.39902in;height:0.84028in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image20.png" style="width:1.31806in;height:0.63194in" alt="Shape Description automatically generated with medium confidence" /></p></td>
<td><p>  <img src="611eeae8755da_media/media/image21.png" style="width:1.34028in;height:0.77155in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image22.png" style="width:1.40278in;height:0.81279in" alt="Shape Description automatically generated with medium confidence" /><br />
<img src="611eeae8755da_media/media/image23.png" style="width:1.47222in;height:0.78695in" alt="Shape Description automatically generated with medium confidence" /></p>
<p> </p></td>
<td><p><img src="611eeae8755da_media/media/image24.png" style="width:1.57639in;height:0.86634in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image25.png" style="width:1.40278in;height:0.7087in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image26.png" style="width:1.54167in;height:0.77083in" alt="Shape Description automatically generated with medium confidence" /></p>
<p><img src="611eeae8755da_media/media/image27.png" style="width:1.57762in;height:0.45139in" alt="Shape Description automatically generated with medium confidence" /> </p></td>
</tr>
</tbody>
</table>

The range of output is between 3 to 14. Table 6 shows the range of output and Table 7 shows the parameters that are used in the membership function editor for output data.

<table>
<tbody>
<tr class="odd">
<td><p><strong>Table 6</strong>: Parameters for membership function of output</p>
<table>
<thead>
<tr class="header">
<th><strong>Parameters</strong></th>
<th><strong>Indicators</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>[3 3 5.75]</td>
<td>Good</td>
</tr>
<tr class="even">
<td>[3 5.75 8.5]</td>
<td>Moderate</td>
</tr>
<tr class="odd">
<td>[5.75 8.5 11.25]</td>
<td>Unhealthy</td>
</tr>
<tr class="even">
<td>[8.5 11.25 14]</td>
<td>Very Unhealthy</td>
</tr>
<tr class="odd">
<td>[11.25 14 14]</td>
<td>Hazardous</td>
</tr>
</tbody>
</table></td>
<td><p><strong>Table 7</strong>: Range of output</p>
<table>
<thead>
<tr class="header">
<th><strong>Indicators of output (AQI)</strong></th>
<th><strong>Range</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Good</td>
<td>3 – 5.75</td>
</tr>
<tr class="even">
<td>Moderate</td>
<td>5.76 – 8.5</td>
</tr>
<tr class="odd">
<td>Unhealthy</td>
<td>8.51 – 11.25</td>
</tr>
<tr class="even">
<td>Very Unhealthy</td>
<td>11.26 - 14</td>
</tr>
<tr class="odd">
<td>Hazardous</td>
<td>&gt;14</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>

III) <span class="underline">Determination of Rule Base Application</span>

The rules decided the membership functions of input and output are utilized in fuzzy inference process. The first rules are linguistic and also known as “IF- THEN” regulations. The suggested fuzzy model is based on the Mamdani fuzzy model structure as given Equation 4.

R<sub>i</sub>: IF X₁ is L₁^X₂ is L₂^X<sub>3,</sub> …is L<sub>M-1</sub>^Xᴍ is Lͥᴍ THEN μ<sub>ʀͥ</sub> → Y (4)

Where *i*: 1,…*n*

Lͥ €{L<sub>j, k</sub>} *j*: 1,…, *m*; *k*: 1,...,*n*; *n*: the number of linguistic labels defined for the *j* input variables

Table 8 shows the arrangement of fuzzy number for each input variable. It is used to produce IF-THEN rules. The calculation below shows the steps of how to find the minimum and maximum value for the input variables that are going to be used to find the arrangement of fuzzy number for output variables.

<table>
<tbody>
<tr class="odd">
<td><p>Minimum:</p>
<p>1 + 1 + 1 = 3</p></td>
<td><p>Maximum:</p>
<p>6 + 4 + 4 = 14</p></td>
<td><p>Difference of value:</p>
<p>14 – 3 = 11</p>
<p>11 / 5 = 2.2</p></td>
<td><p>Example of calculation:</p>
<p>Good (3-5.2)</p>
<p>3 + 2.2 = 5.2</p></td>
</tr>
</tbody>
</table>

**Table 8:** Arrangement for three input variables and output variables

| **Input Variables** | **Fuzzy Number** | **Output variable** | **Range of Fuzzy Number**  |
| ------------------- | ---------------- | ------------------- | -------------------------- |
| PM10                | Severe (1)       | AQI                 |                            |
|                     | Very Poor (2)    |                     |                            |
|                     | Poor (3)         |                     | Good (3-5.2)               |
|                     | Moderate (4)     |                     | Moderate (5.21-7.4)        |
|                     | Good (5)         |                     | Unhealthy (7.41-9.6)       |
|                     | Excellent (6)    |                     | Very Unhealthy (9.61-11.8) |
| CO & NO2            | Poor (1)         |                     | Good (11.81-14)            |
|                     | Moderate (2)     |                     |                            |
|                     | Good (3)         |                     |                            |
|                     | Excellent (4)    |                     |                            |

Based on these arrangements, 96 best rules are generated. The rules below show an example of If-Then rules of AQI generated from this process.

IF (PM10 is severe) and (CO is poor) and (NO2 is poor) THEN (AQI is hazardous)

IF (PM10 is severe) and (CO is poor) and (NO2 is moderate) THEN (AQI is hazardous)

IF (PM10 is severe) and (CO is poor) and (NO2 is excellent) THEN (AQI is very unhealthy)

Figure 9 shows the rule editor that is set up in the MATLAB software. There are 96 rules used to evaluate the AQI by using Mamdani IF-THEN rules to determine whether it is good, moderate, unhealthy, very unhealthy, and hazardous.

![Graphical user interface Description automatically generated](611eeae8755da_media/media/image28.png)

**Figure 9**: Rule editor

IV) <span class="underline">Defuzzification Process</span>

The defuzzification transforms the fuzzy value into a crisp value. In this study, a centroid method is applied, which is one of the greatest not unusual methods for defuzzification process. Fuzzy number is geometrically determined by using this approach.

After the rules are set, the data has been inserted in the rule viewer and the result is generated as shown in the right-end column of Figure 10.

![A picture containing text, indoor, screenshot Description automatically generated](611eeae8755da_media/media/image29.png)

**Figure 10: Rule Viewer (Rules 1- 96)**

**FINDINGS AND DISCUSSIONS**

The results of AQI by using Mamdani Fuzzy Inference System are shown in Table 9. The values in Table 9 are part of 122 outputs in overall. The status in the linguistic value is all “Good”.

**Table 9:** Result output of AQI from MATLAB (Mamdani status)

| **LOCATION** | **INPUTS** | **MATLAB (Mamdani Status)** |                      |         |      |
| ------------ | ---------- | --------------------------- | -------------------- | ------- | ---- |
|              |            | **OUTPUT **                 | **LINGUISTIC VALUE** |         |      |
|              | **PM10**   | **CO**                      | **NO2**              | **AQI** |      |
| Kota Bharu   | 26.404     | 0.4325                      | 0.008                | 4.04    | Good |
|              | 37.94      | 0.625                       | 0.01                 | 3.91    | Good |
|              | 35.612     | 0.45                        | 0.009                | 3.88    | Good |
|              | 40.104     | 0.4875                      | 0.015                | 3.95    | Good |
|              | 49.595     | 0.6325                      | 0.01                 | 3.91    | Good |
|              | 48.009     | 0.6512                      | 0.01                 | 3.93    | Good |

The results of actual data output are shown in Table 10. The value is obtained based on the 96 If-Then rules that are mentioned in the early subtopic of data analysis. For example, IF (PM10 is Excellent) and (CO is Excellent) and (NO2 is Excellent) THEN (AQI is Good) with the input value PM10 is 26.404, CO is 0.4325 and NO2 is 0.008.

**Table 10:** The result of actual data output for AQI

| **LOCATION** | **INPUTS** | **ACTUAL DATA**      |        |                      |         |                      |                      |
| ------------ | ---------- | -------------------- | ------ | -------------------- | ------- | -------------------- | -------------------- |
|              | **PM10**   | **LINGUISTIC VALUE** | **CO** | **LINGUISTIC VALUE** | **NO2** | **LINGUISTIC VALUE** | **LINGUISTIC VALUE** |
| Kota Bharu   | 26.404     | Excellent            | 0.4325 | Excellent            | 0.008   | Excellent            | Good                 |
|              | 37.94      | Good                 | 0.625  | Excellent            | 0.01    | Excellent            | Good                 |
|              | 35.612     | Good                 | 0.45   | Excellent            | 0.009   | Excellent            | Good                 |
|              | 40.104     | Good                 | 0.4875 | Excellent            | 0.015   | Excellent            | Good                 |
|              | 49.595     | Good                 | 0.6325 | Excellent            | 0.01    | Excellent            | Good                 |
|              | 48.009     | Good                 | 0.6512 | Excellent            | 0.01    | Excellent            | Good                 |

Table 11 shows the comparison statements of the result from actual data output and Mamdani fuzzy inference status for AQI reading. The statement is “TRUE” when the linguistic value for actual data is “Good” and Mamdani status from MATLAB is also “Good”.This means that when linguistic value for actual data and Mamdani status are same, the statement is TRUE. However, if they both are with different linguistic value then the statement is “FALSE”. The comparison statements in Table 11 are part of 122 statements in overall.

**Table 11**: The result of comparison statements between the actual data output and

Mamdani status

| **DATE** | **LINGUISTIC VALUES** | **STATEMENTS**     |             |       |
| -------- | --------------------- | ------------------ | ----------- | ----- |
|          | **ACTUAL DATA**       | **Mamdani Status** |             |       |
|          |                       | **AQI**            | **MATLAB ** |       |
| 20160601 | Good                  | 4.04               | Good        | TRUE  |
| 20160602 | Good                  | 3.91               | Good        | TRUE  |
| 20160603 | Good                  | 3.88               | Good        | TRUE  |
| 20160704 | Moderate              | 5.75               | Good        | FALSE |
| 20160705 | Moderate              | 5.75               | Good        | FALSE |
| 20160706 | Moderate              | 5.75               | Good        | FALSE |
| 20160707 | Good                  | 3.93               | Good        | TRUE  |
| 20160708 | Good                  | 3.91               | Good        | TRUE  |

The results of comparison statements in overall are represented in Figure 11. From the total data collected within 122 days, there are 113 TRUE statements and 9 FALSE statements. That means there are 113 correct responses out of 122 data.

![Chart, waterfall chart Description automatically generated](611eeae8755da_media/media/image30.png)

**Figure 11:** Number of TRUE and FALSE statements

The level of accuracy rate is calculated as follows.

Accuracy Rate = \(\frac{113}{122} \times 100\)

\= 0.9262 @ 93%

**CONCLUSION AND RECOMMENDATIONS**

The main objective of this study is to predict the value AQI accurately using a proposed model of Fuzzy Inference System. A model of fuzzy inference system (FIS) is developed to evaluate the air quality index (AQI) towards air pollution by considering the value of three major inputs, namely PM10, CO and NO2. The evaluation system is based on Mamdani fuzzy inference system through four major steps: Fuzzification process, Fuzzy decision, Fuzzy rule-based and Defuzzification. The higher value of accuracy rate (93%) has shown that the proposed model of fuzzy inference system using Mamdani approach works relatively well and efficient in predicting the Air Quality Index (AQI). Thus, the model used is perfect and ideal to access the air quality index (AQI) accurately.

This study has applied Mamdani Rule-Based system to analyse AQI data. In future it might be possible to analyze the data by using other fuzzy inference system approaches, such as Sugeno Fuzzy Inference System.

**REFERENCES**

Chaudhari, S. R., & Patil, M. E. (2014). Comparative Analysis of Fuzzy Inference Systems for Air Conditioner. International Journal of Advanced Computer Research, 4(4), 922–927.

Sowlat, M.H., Gharibi, H., Yunesian, M., Mahmoudi, T. M., & Lotfi, S. (2011). A novel, fuzzy-based air quality index (FAQI) for air quality assessment. Atmos Environ, 45, 2050– 2059.

Samira, K., & Ahmad, J. (2016). A New Artificial Intelligence Method for Prediction of Diabetes Type2. Bulletin de La Société Royale Des Sciences de Liège, 85, 376–391.

Cavallaro, F. (2015). A Takagi-Sugeno fuzzy inference system for developing a sustainability index of biomass. Sustainability (Switzerland), 7(9), 12359–12371.

Kumaravel, R., Vallinayagam, V., Kumaravel, R., & Vallinayagam, V. (2012). a Fuzzy Inference System for Air Quality in Using Matlab, Chennai, India. J. Environ. Res. Develop. Journal of Environmental Research and Development, 7(1), 484–495.

Department of Environment Malaysia (DOE). A guide to air pollutant index (API) in Malaysia. Department of Environment: Kuala Lumpur, Malaysia, 1, 2000.

Rani, N. L. A., Azid, A., Khalit, S. I., Juahir, H., & Samsudin, M. S. (2018). Air pollution index trend analysis in Malaysia, 2010-15. Polish Journal of Environmental Studies, 27(2), 801–808.

Tiwari, P. (2015). Computational Methods of Air Quality Indices: A Literature Review. Journal of Environmental Science, Toxicology and Food Technology. 1(5), 46-49.
