Improvement of Rainfall Prediction Model by Using Fuzzy Logic ()

Md. Anisur Rahman^{}

Department of Mathematics, Islamic University, Kushtia, Bangladesh.

**DOI: **10.4236/ajcc.2020.94024
PDF HTML XML
544
Downloads
2,665
Views
Citations

Department of Mathematics, Islamic University, Kushtia, Bangladesh.

This paper presents the improvement of the fuzzy inference model for predicting rainfall. Fuzzy rule based system is used in this study to predict rainfall. Fuzzy inference is the actual procedure of mapping with a given set of input and output through a set of fuzzy systems. Two operations were performed on the fuzzy logic model; the fuzzification operation and defuzzification operation. This study is obtaining two input variables and one output variable. The input variables are temperature and wind speed at a particular time and output variable is the amount of predictable rainfall. Temperature, wind speed and rainfall have to construct eight equations for different categories and which are shows the diagram of the graph. Fuzzy levels and membership functions obtained after minimum composition of inference part of the fuzzifications done for temperature and wind speed are considered as they represent the environmental condition enhance a rainfall occurrence which is effect on agricultural production.

Share and Cite:

Rahman, M. (2020) Improvement of Rainfall Prediction Model by Using Fuzzy Logic. *American Journal of Climate Change*, **9**, 391-399. doi: 10.4236/ajcc.2020.94024.

1. Introduction

Weather forecasting is one of the most important and demanding operational responsibilities carried out by meteorological services worldwide. It is a complicated procedure that includes numerous specialized technological fields. The task is complicated in the field of meteorology because all decisions are made within a visage of uncertainty associated with weather systems (Hasan et al., 2008 ). Amongst all weather happenings, rainfall plays the most imperative role in human life. Human civilization to a great extent depends upon its frequency and amount to various scales (Agboola et al., 2013) . Rainfall is a stochastic process, whose upcoming event depends on some precursors from other parameters such as the sea surface temperature for monthly to seasonal time scales, the surface pressure for weekly to daily time scale and other atmospheric parameters for daily to hourly time scale. The latter atmospheric parameters could be temperature, relative humidity and wind speed. Variability of weather and climatic factors, especially those atmospheric parameters will be the major force for daily precipitation event. If variability pattern could be recognized and used for future trajectory, daily rainfall prediction is very much feasible (Edvin and Yudha, 2008) . Nasher (2013) described that Rainfall and temperature are important climatic inputs in the context of climate variability. Due to a rapid climatic oscillation, more work is now being done on climate indices like rainfall, temperature and so on.

Planning has been identified as a roadmap to success as failing to plan implies planning for failure. Information about future happenings is instrumental to efficient and effective planning. Effect of natural disaster such as flooding, drought etc. can only be prevented with effective planning. Forecast of the future happenings is crucial in this regard (Jimoh et al., 2013) . Long-term rainfall prediction is very important to countries thriving on agro-based economy. In their quest for new ways of predicting important meteorological factors, researchers have devised and developed techniques such as intelligent methods, which are viable and flexible means independent of system dynamic models. Rainfall is one of the meteorological processes that meteorologist seeks to predict more accurately. Though various kinds of models like statistical model have been used for years in the prediction of rainfall, the models have many drawbacks (Cirstea et al., 2002) . The drawback of statistical modeling is dependence, in most cases, upon several tacit assumptions regarding the system (Kevin and Stephen, 1998) . With the rapid evolving technologies in the field of meteorology, it is desirable to merge the experience of many forecasters with algorithms that may aid in difficult forecasting situations (Jim, 2005) . Cognitive computing has been an emergent set of problem solving algorithm that attempts to imitate natural problem solving techniques (Jang et al., 1997) . One of such is fuzzy logic. Fuzzy logic is a simple yet powerful problem solving technique with extensive capabilities. Christian et al. (2013) showed that how accurate the culturally built indigenous climate knowledge of extreme climatic events is, and how amenable it is to fuzzy logic. The fuzzy logic nature of indigenous climatic knowledge appears in the clear association of drought or heavy rainfall events, as perceived by farmers, with corresponding extreme rainfall values, contrasting with a fuzzy picture in the intermediate climatic situations. Fuzzy set theory is a tool for modeling the kind of uncertainty associated with vagueness, impression and/or with a lack of information regarding particular element of the problem in hand (Ross, 1997) . Agboola et al. (2013) to developed fuzzy logic model is made up of two functional components; the knowledge base and the fuzzy reasoning or decision making unit. Two operations were performed on the fuzzy logic model; the fuzzification operation and defuzzification operation. The model that predicted outputs was compared with the actual rainfall data. Fuzzy logic based rainfall prediction method by using the Mamdani fuzzy inference system may be successively used for different environmental problem estimation to mitigate unexpected meteorological problems (Hasan and Rahman, 2019) . In predicting weather conditions, factors in the antecedent and consequent parts that exhibit vagueness and ambiguity are being treated with logic and valid algorithms (Hasan et al., 1995) . Use of fuzzy set theory has been proved by scientists to be applicable with uncertain, vague and qualitative expressions of the system. The intent of fuzzy set theory was to alleviate problems associated with traditional binary logic, where statements are exclusively true or false (Cirstea et al., 2002) . Fuzzy logic allows something to be partially true and partially false hence taking care of neglected quantities in binary logic (Jimoh et al., 2013) . Hence the study is based on the application of fuzzy logic in one of the meteorological process, which is rainfall in order to get more accurate predictions in the region. Therefore, the aim of this study is to develop a fuzified model for rainfall forecast and explores the use of fuzzy logic in rainfall forecast.

2. Methodology

Fuzzy sets are the collection of objects with the same properties, and in crisp sets the objects either belong to the set or do not. In practice, the characteristic value for an object belonging to the considered set is coded as 1 and if it is outside the set then the coding is 0. In crisp sets, there is no ambiguity or vagueness about each object belongs to the considered set. Otherwise, in daily life humans are always confronted with objects that may be similar to one other with quite different properties. So uncertainty always arises concerning the assessment of membership values 0 or 1. Logically, of course, some of the similar objects may partially belong to the same set, therefore, an ambiguity emerges in the decision of belonging or not. In order to alleviate such situations (Zadeh, 1965) generalized the crisp set membership degree as having any value continuously between 0 and 1. Fuzzy sets are a generalization of conventional set theory. The basic idea of fuzzy sets is easy to grasp. An object with membership function 1 belongs to the set with no doubt and those with 0 membership functions again absolutely do not belong to the set, but objects with intermediate membership functions partially belong to the same set. The greater the membership function, the more the object belongs to the set (Hasan and Zenkai, 1999) . Fuzzy set theory has also been examined in hydrological modeling such as rainfall forecasting, inflow prediction and reservoir operation. Several reservoir operation techniques based on fuzzy systems and fuzzy control systems for reservoir operations can be found in the literature along with the use of Genetic Algorithms. These models include fuzzy optimization techniques, fuzzy rule based systems and hybrid fuzzy systems. In these models, fuzzy rules were created using expert knowledge or observed data. Apparently, neural networks and fuzzy models are suitable alternatives for modeling nonlinear and non-stationery problems in water resources engineering compared to conventional modeling approaches especially in situations where the problem has ambiguity in definition itself such as predicted of rainfall and droughts.

2.1. Fuzzy Set

Let X be a universal set. Then A is called a (fuzzy) subset of X if A is a set of ordered pairs.

$A=\left\{\left(x,{\mu}_{A}\left(x\right)\right):x\in X,{\mu}_{A}\left(x\right)\in \left[0,1\right]\right\}$

where
${\mu}_{A}$ is the membership function of A and
${\mu}_{A}\left(x\right)$ is the grade of the membership of *x* in A. The linguistic expression for the variables and their membership functions are evaluated from the following triangular membership functions and it is defined by a lower limit a, an upper limit b and a value m, where
$a\le m\le b$ . The value of the membership function
$\mu \left(x\right)$ , ranges from 0 to 1, with 0 denoting no membership, 1 for full membership and values in between has partial membership as shown in Figure 1.

2.2. Fuzzy Systems

Fuzzy inference is the actual procedure of mapping with a given set of input and output through a set of fuzzy systems. This study is obtaining two input variables and one output variable. The input variables are temperature and wind speed at a particular time and output variable is the amount of predictable rainfall. Temperature and wind speed are selected because which is the main factors of the influence the occurrence of rainfall. The input variables values are grouped into five using the linguistic variable terms which are present in Table 1.

Figure 1. Basic graph of fuzzy membership function.

Table 1. Group of the linguistic variable terms.

For a particular input variable, the variable will either belong to one of these or at most two of them with a membership value. All the membership values for a particular input variable, to develop the equations that are the map an input value to its corresponding membership value.

3. Temperature Equations

The equations below construct the membership values of different ranges for any temperature value. It is following that in the diagram of the graph shown below and eight lines in the graph therefore formulate eight equations to implement the graph. This study has to use the ranges of temperature from 5˚C to 45˚C and develop eight equations for these ranges. The linguistic variables (very low, low, normal, high and very high) might have the same temperature range but they will surely have different equations. Eight equations implement the graph and which is follow that in the diagram of the graph shown in Figure 2, where *T* denotes Temperature and *m* denotes membership value respectively.

Very Low: Member $\left({m}_{1}\right)=-0.1T+1.5$ , $5\u02da\text{C}\le T\le 15\u02da\text{C}$ .

Low: Member $\left({m}_{2}\right)=0.1T-0.5$ , $5\u02da\text{C}\le T\le 15\u02da\text{C}$ .

Low: Member $\left({m}_{1}\right)=-0.1T+2.5$ , $15\u02da\text{C}\le T\le 25\u02da\text{C}$ .

Normal: Member $\left({m}_{2}\right)=0.1T-1.5$ , $15\u02da\text{C}\le T\le 25\u02da\text{C}$ .

Normal: Member $\left({m}_{1}\right)=-0.1T+3.5$ , $25\u02da\text{C}\le T\le 35\u02da\text{C}$ .

High: Member $\left({m}_{2}\right)=0.1T-2.5$ , $25\u02da\text{C}\le T\le 35\u02da\text{C}$ .

High: Member $\left({m}_{1}\right)=-0.1T+4.5$ , $35\u02da\text{C}\le T\le 45\u02da\text{C}$ .

Very High: Member $\left({m}_{2}\right)=0.1T-3.5$ , $35\u02da\text{C}\le T\le 45\u02da\text{C}$ .

4. Wind Speed Equations

The equations below produce the membership values of various ranges for any temperature value. It shows that the diagram of the graph is given below and has eight lines in the graph, so make eight equations to implement the graph. The equations below construct the values of membership for any wind speed value. To use the ranges of wind speed from 1 to 9 km/hr and build up eight equations for these ranges. The linguistic variables (very low, low, normal, high and very high) might have the same wind speed range but they will surely have different equations. Eight equations implement the graph and which is follow that in the diagram of the graph shown in Figure 3, where *Ws* denotes wind speed and *m* denotes membership value respectively.

Figure 2. Graph of membership function of temperature and corresponding fuzzy levels.

Figure 3. Graph of Membership function of wind speed and corresponding fuzzy levels.

Very Low: Member $\left({m}_{1}\right)=-0.5Ws+1.5$ , $1\le Ws\le 3$ .

Low: Member $\left({m}_{2}\right)=0.5Ws-0.5$ , $1\le Ws\le 3$ .

Low: Member $\left({m}_{1}\right)=-0.5Ws+2.5$ , $3\le Ws\le 5$ .

Normal: Member $\left({m}_{2}\right)=0.5Ws-1.5$ , $3\le Ws\le 5$ .

Normal: Member $\left({m}_{1}\right)=-0.5Ws+3.5$ , $5\le Ws\le 7$ .

High: Member $\left({m}_{2}\right)=0.5Ws-2.5$ , $5\le Ws\le 7$ .

High: Member $\left({m}_{1}\right)=-0.5Ws+4.5$ , $7\le Ws\le 9$ .

Very High: Member $\left({m}_{2}\right)=0.5Ws-3.5$ , $7\le Ws\le 9$ .

5. Rainfall Equations

The output variable rainfall is depends on the category of the temperature and wind speed. It can be either of negative large (NL), negative small (NS), zero (ZE), positive small (PS) and positive large (PL). This study has to construct eight equations for these categories. The following eight equations are can get out the amount of rainfall (RF) at different category and which is follow that in the diagram of the graph shown in Figure 4.

Negative Large (NL): $RF=\frac{M-1.5}{-0.05}$ .

Negative Small (NS): $RF=\frac{M+0.5}{0.05}$ and $RF=\frac{M-2.5}{-0.05}$ .

Zero (ZE): $RF=\frac{M+1.5}{0.05}$ and $RF=\frac{M-3.5}{-0.05}$ .

Positive Small (PS): $RF=\frac{M+2.5}{0.05}$ and $RF=\frac{M-4.5}{-0.05}$ .

Positive Large (PL): $RF=\frac{M+3.5}{0.05}$ .

6. Application

Determine the amount of rainfall in a day, temperature and wind speed are measure of this day. Suppose in a day temperature 20˚C and wind speed 3 km/hr then the amount of rainfall determines the group that each input falls in and their membership value for that group. For temperature 20˚C assume two of the equations the group that it falls in and the membership value for that group. By using the temperature graph, the membership value of temperature is 0.5 deduce members low and normal. Putting the value of temperature in both equations

Figure 4. Graph of the amount rainfall for different categories.

are get the membership value 0.5 for both. Similarly for wind speed 3 km/hr assume two of the equations the group that it falls in and the membership value for that group. By using the wind speed graph, the membership value of wind speed is 1 deduce member low. Putting the value of wind speed in both equations is to get the membership value 1 for both. The amount of rainfall will be expected the particular values temperature and wind speed. Table 2 below shows how the two input variables and output value are related. The table was constructed using a data derive which reveals that the predictable amount of rainfall for a particular year and the values of the temperature and wind speed.

In this study, consider the value of temperature shows the categorize of temperature to be low and normal and the value of wind speed is categorized as normal only.

If temperature is normal and wind speed is normal then rainfall is normal.

If temperature is low and wind speed is normal then rainfall is low.

If then knowledge based stated above is result from the table. There are two values of rainfall (low and normal) but there fuzzy value (membership value) is taken from the minimum membership value between their temperature and wind speed. In study for normal rainfall, the membership value is 0.5 and the membership value for low rainfall too is 0.5. Therefore the minimum membership value is the predicted rainfall.

7. Conclusion

This paper presents two input variables are temperature and wind speed at a particular time and output variable is the amount of predictable rainfall. Temperature and wind speed are selected because which is the main factors of the influence the occurrence of rainfall. Temperature and wind speed are constructed eight equations which belong to the membership values and implements the diagram of the graph. Similarly rainfall also constructs eight equations for different categories. These eight equations are getting out the amount of rainfall and which is show the diagram of the graph. Table 2 shows the two input variables and output value are related. The table reveals that the predictable amount of rainfall for a particular year and the values of the temperature and wind speed. Fuzzy levels and membership functions obtained after minimum composition of inference part of the fuzzifications done for temperature and

Table 2. Relations among temperature, wind speed and amount of rainfall.

wind speed were considered as they represent the environmental condition enhance a rainfall occurrence. Product of temperature and wind speed appeared to be an appropriate attempt for the model to match the actual rainfall occurrences which are a need for agricultural production. Finally, the present study is attempted to the prediction of the rainfall based on temperature, wind speed by using fuzzy logic.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

[1] |
Agboola, A. H., Gabriel, A. J., Aliyu, E. O., & Alese, B. K. (2013). Development of a Fuzzy Logic Based Rainfall Prediction Model. International Journal of Engineering and Technology, 3, 427-435. https://doi.org/10.5751/ES-05896-180422 |

[2] | Christian, L., Mwongera, C., Camberlin, P., & Micheau, J. B. (2013). Indigenous Past Climate Knowledge as Cultural Built-In Object and Its Accuracy. Ecology and Society, 18, 22-45. |

[3] | Cirstea, M. N., Dinu, A., Khor, J. G., & McCormink, M. (2002). Neural and Fuzzy Logic Control of Daves and Power. Oxford: Linacre House. |

[4] | Edvin and Yudha (2008). Application of Multivariate ANFIS for Daily Rainfall Prediction: Influences of Training Data Size. Makara, Sains, 12, 7-14. |

[5] | Hasan, A., & Rahman, M. A. (2019). A Study on Rainfall Calibration and Estimation at the Northern Part of Bangladesh by Using Mamdani Fuzzy Inference System. Journal of Environment Protection and Sustainable Development, 5, 58-69. |

[6] | Hasan, M., Mizutani, M., Goto, A., & Matsui, H. (1995). A Model for Determination of Intake Flow Size Development of Optimum Operational Method for Irrigation Using Fuzzy Set Theory (1). System Nogaku: Journal of the Japanese Agricultural System Society, 11, 1-13. |

[7] |
Hasan, M., Tsegaye, T., Shi, X., Schaefer G., & Taylor, G. (2008). Model for Predicting Rainfall by Fuzzy Set Theory Using USDA Scan Data. Agricultural Water Management, 95, 1350-1360. https://doi.org/10.1016/j.agwat.2008.07.015 |

[8] | Hasan, T., & Zenkai, S. (1999). A New Modeling Approach for Predicting the Maximum Daily Temperature from a Time Series. Turkish Journal of Engineering and Environmental Science, 23, 173-180. |

[9] |
Jang, J. S. R., Sun, C. T., & Mizutani, E. (1997). Neuro-Fuzzy and Soft Computing (A Computational Approach to Learning and Machine Intelligence). IEEE Transactions on Automatic Control, 42, 1482-1484.
https://doi.org/10.1109/TAC.1997.633847 |

[10] | Jim, M. (2005). Application of Fuzzy Logic in Operational Meteorology. Berkeley, CA: Addison Wesley, Longman Inc. |

[11] | Jimoh, R. G., Olagunju, M., Folorunso, I. O., & Asiribo, M. A. (2013). Modeling Rainfall Prediction Using Fuzzy Logic. International Journal of Innovative Research in Computer and Communication Engineering, 1, 929-936. |

[12] | Kevin, M. P., & Stephen, Y. (1998). Fuzzy Control. Berkeley, CA: Addison Wesley Longman Inc. |

[13] | Nasher, N. M. R. (2013). Impact of Climate Variability on Temperature and Rainfall Trend in Bangladesh: A Case of Two Cities. European Journal of Climate Change, 11, 5-10. |

[14] | Ross, T. J. (1997). Fuzzy Logic with Engineering Applications (p. 33). New York: McGraw-Hill International Editions. |

[15] |
Zadeh, L. A. (1965). Fuzzy Sets. Information and Control, 8, 338-353.
https://doi.org/10.1016/S0019-9958(65)90241-X |

Journals Menu

Contact us

customer@scirp.org | |

+86 18163351462(WhatsApp) | |

1655362766 | |

Paper Publishing WeChat |

Copyright © 2022 by authors and Scientific Research Publishing Inc.

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.