Adaptive Neuro Fuzzy
Inference System (ANFIS) Majority of research papers dealing with WCP forecasting use ANNs, while the use of Adaptive Neuro Fuzzy Inference System (ANFIS) to treat such problems is relatively new. In this part of the thesis, ANFIS is adopted to build general rules on water consumption behavior and patterns in a simplified manner. Following from that, the obtained results helped to build a forecasting model.
Input selection and models construction
For modeling with ANFIS, input combination of 8 scenarios are selected to cover all possible combinations. The reason behind this selection is the limitation of the model (number of inputs). S1, S2, S3 and S4 were conducted in order to evaluate the effect of socio-economic parameters on WCP. On the other hand, the selection of S5 aims to determine the effect of physical characteristics of building units on WCP. As it can be inferred S6, S7 and S8 are the input combination that mixed socio-economic parameters with physical characteristics of building units in order to assess the effect of them on WCP. The selected models and their inputs are represented in table 5.26.
Training, Testing and Checking of ANFIS models
The input data of ANFIS were divided into three sections : training, testing and checking sections in the same manner similar to ANNs (for training data size: 50%, 60%, 70% and 80%, for testing data size: 10%, 15%, 20% and 25%, and for validating data size 10%, 15%, 20% and 25%). The selected sections are shown in table 5.27. ANFIS of MATLAB Fuzzy Logic is not designed to create models in an automated way; rather the trial-and-error approach was used to find the best model. In each time the ANFIS parameters were changed manually, besides the choice of ANFIS structure type, membership function types, training algorithm alternatives of ANFIS were limited compared to ANNs.The model can be described as follows: Layer 1 (input layer): No computation is considered in this layer. Each node, which corresponds to one input variable, only transmits input values to the next layer directly. For example, there are 3 input variables in scenario 4 that are household size (HOUS), university level of residents (UNIV) and car numbers (CARN). Layer 2 (fuzzification layer): each node in this layer corresponds one linguistic label to one of the input variables in layer 2. In other words, the output link represents the membership value that specifies the degree to which an input value belongs to a fuzzy set. In the subtractive grid category, a bell-shaped Gaussian function is used for the membership function in the following for (Jang, 1993): j ij i j j ij X c X j 2 , 2 exp 1,2 2 (5.6) Where, μi,j is the membership function or the degree of the membership of variable j in the i-th fuzzy implication rule; μ i,j (Xj) indicates membership degree of the i-th input variable (Xj); cij and σij represent the center and the half width of the membership function for the j-th variable and the i-th fuzzy implication rule, respectively. Layer 3 (rule antecedent): a node represents the antecedent part of a rule. Normally a T-norm operator is used in this node. Output of the layer 3 represents the firing strength of the corresponding fuzzy rule. Layer 4 (combination and defuzzification layer): the single node computes the overall output as a summation of all the incoming signals. The output of N fuzzy implication rules is obtained as follows for grid partition and subtractive clustering: 𝑆 = ∑ ∑ ௌೕௐೕ ೕసభ సభ ∑ ∑ ௐೕ ೕసభ సభ (5.7) In which wi is the firing strength of the i-th fuzzy implication rule, n is the number of the clusters, Si is the daily water demand estimation value from the i-th fuzzy implication rule and S is the estimated daily water demand (Jang, 1993). Train and validation data are used for constructing neuro fuzzy models, while checking data controls the training error.
Fuzzy Rule based and Membership functions
The dataset is applied on the Fuzzy logic for the classification purpose. Figures 5.74 shows the modelling of Fuzzy Logic which helps in the classification of the WCP classes. Fig 5.74 Fuzzy rule-based models The Sugeno model is used in the system. The Sugeno model is computationally efficient, and works well with optimization and adaptive techniques, so it is popular for water problems. Chapter 05: Results and discussion Part II 155 Figures 5.75-5.82 depicted the membership functions for the inputs and the output. Gaussian functions are used for the inputs because of its smoothness. Fig 5.75 Membership functions for inputs and output, scenario 1 Fig 5.76 Membership functions for inputs and output, scenario 2 Chapter 05: Results and discussion Part II 156 Fig 5.77 Membership functions for inputs and output, scenario 3 Fig 5.78 Membership functions for inputs and output, scenario 4 Chapter 05: Results and discussion Part II 157 Fig 5.79 Membership functions for inputs and output, scenario 5 Fig 5.80 Membership functions for inputs and output, scenario 6 Chapter 05: Results and discussion Part II 158 Fig 5.81 Membership functions for inputs and output, scenario 7 Fig 5.82 Membership functions for inputs and output, scenario 8.