# Fuzzy Based Prediction Model for Air Quality Monitoring for Kampala City in East Africa
## 4 Discussion  
_Performance Evaluation of the Designed KAQI Prediction Model_  
After simulating and modeling the proposed model successfully, an evaluation performance is carried out by a comparative analysis of prediction, using the conventional method and the fuzzy logic based method.  
To carry out the comparative analysis, first, the Air Quality Index is calculated based on the linear interpolation formula below.  
\[\text{lp}=\frac{\textit{Ihigh}-\textit{ILow}}{\textit{BPHigh}-\textit{BPlow} }(Cp-\textit{BPlow})+\textit{ILow} \tag{2}\]  
where,  
\(\text{Ip}\) = the index for pollutant \(p\)  
\(Cp\) = is the monitored concentration of pollutant \(p\)  
_BPHigh_ = the breakpoint that is greater than or equal to \(Cp\)  
_BPLow_ = the breakpoint that is less than or equal to \(Cp\)  
Figure 10: Surface view of the KAQI in Fuzzy Inference System.  
_IHigh_ = the AQI value corresponding to _BPHigh_  
_ILow_ = the AQI value corresponding to _BPLow_  
The linear interpolation method is used for determining the short and long term air quality indices, and it is used to estimate and predict unknown values for any geographic point data, such as rainfall, noise pollution and air pollutant concentrations [30].  
In this study, air pollutant values for NO\({}_{2}\), SO\({}_{2}\) and PM\({}_{2.5}\) are picked randomly from the data, which are collected from an open source and later used to test and evaluate the model. For instance, if the value of NO\({}_{2}\) is 290 ppb, SO\({}_{2}\) is 350 ppb and PM\({}_{2.5}\) is 300 \(\mu\)g/m\({}^{3}\), then, using the linear interpolation method to calculate the KAQI, each pollutant is calculated and the highest individual pollutant index out of them all represents the KAQI as shown in the calculation below.  
Index for pollutant NO\({}_{2}\) = (300 - 201/360 - 101) \(\times\) (290 - 101) + 201  
= (99/259)\(\times\)189 + 201  
= 273  
Index for pollutant SO\({}_{2}\) = (500 - 301/604 - 305) \(\times\) (350 - 305) + 301  
= (199/299) \(\times\) 45 + 301  
= 331  
Index for pollutant PM\({}_{2.5}\) = (300 - 201/500.4 - 250.5)\(\times\)(300 - 250.5) + 201  
= (99/249.9) \(\times\) 49.5 + 201  
= 220.6  
Therefore, KAQI becomes 331, whereas when the same data are fed into the Fuzzy Inference System, the model produces the result of 361.  
Table 5 shows some of the observations that are made to compare the logic and linear interpolation method performance corresponding to SO\({}_{2}\), NO\({}_{2}\) and PM\({}_{2.5}\) concentrations. It is observed that fuzzy gives assifactory results and this makes it a great approach to significantly estimate the KAQI.  
When a graph is plotted for further comparative analysis between fuzzy logic and linear interpolation approaches to determine the KAQI, a strong correlation is observed between both methods as shown in Figure 11.  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**No. of Observations** & **NO\({}_{2.5}\) (ppb)** & **SO\({}_{2.4}\) (ppb)** & **PM\({}_{2.5}\) (\(\mu\)g/m\({}^{3}\))** & **KAQI Using Fuzzy Logic** & **KAQI Using Linear Interpolation Method** \\ \hline
1 & 30 & 50 & 20.9 & 27 & 18 \\
2 & 40 & 185 & 150 & 250 & 200 \\
3 & 100 & 150 & 30.6 & 80 & 134 \\
4 & 290 & 350 & 345 & 361 & 331 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparative Analysis of KAQI determined by fuzzy logic and linear interpolation methods corresponding to SO\({}_{2}\), NO\({}_{2}\) and PM\({}_{2.5}\) concentrations.