Presentation is loading. Please wait.

Presentation is loading. Please wait.

NUMERICAL EXAMPLE APPENDIX A in “A neuro-fuzzy modeling tool to estimate fluvial nutrient loads in watersheds under time-varying human impact” Rafael Marcé.

Similar presentations


Presentation on theme: "NUMERICAL EXAMPLE APPENDIX A in “A neuro-fuzzy modeling tool to estimate fluvial nutrient loads in watersheds under time-varying human impact” Rafael Marcé."— Presentation transcript:

1 NUMERICAL EXAMPLE APPENDIX A in “A neuro-fuzzy modeling tool to estimate fluvial nutrient loads in watersheds under time-varying human impact” Rafael Marcé 1*, Marta Comerma 1, Juan Carlos García 2, and Joan Armengol 1 1 Department of Ecology, University of Barcelona, Diagonal 645, 08028 Barcelona, Spain 2 Aigües Ter Llobregat, Sant Martí de l'Erm 30, 08970 Sant Joan Despí, Spain *E-mail: rafamarce@ub.edurafamarce@ub.edu April 2004

2 What is fuzzy logic? 0 1 Binary logic SPRING SUMMERWINTERFALL Time (day of the year) SPRING SUMMERWINTERFALL In binary logic the function that relates the value of a variable with the probability of a judged statement are a ‘rectangular’ one. Taking the seasons as an example... Probability 0 1 Fuzzy logic Time (day of the year) SPRING SUMMERWINTERFALL In fuzzy logic the function can take any shape. The gaussian curve is a common choice... Probability March 7 th Winter = 1 The result will always be ‘one’ for a season and ‘zero’ for the rest March 7 th Winter = 0.8 Spring = 0.2 In fuzzy logic, the truth of any statement becomes a matter of degree.

3 Fuzzy reasoning with ANFIS Given an available field database, we define an input-output problem. In this case, the nutrient concentration in a river (output) predicted from daily flow and time (inputs). The first step is to solve the structure identification. We apply the trial-and-error procedure explained in the text with different number of MFs in each input. Suppose that the results were as follows: MFs in input FLOW MFs in input TIME Residual Mean Square Error 11 7.52 12 5.36 21 5.21 22 2.95 32 2.05 23 2.35 33 2.04 44 2.01 55 1.99 This option is considered the optimum trade-off between number of MFs and fit.

4 Fuzzy reasoning with ANFIS Then, the structure identification is automatically solved generating a set of 6 if-and-then rules, i.e. a rule for each possible combination of input MFs. For each rule, an output MF (in this case a constant, because we work with zero-order Sugeno-type FIS) is also generated. Rule 1 If FLOW is LOW and TIME is EARLY ON then CONCENTRATION is C 1 Rule 2 If FLOW is LOW and TIME is LATER ON then CONCENTRATION is C 2 Rule 3 If FLOW is MODERATE and TIME is EARLY ON then CONCENTRATION is C 3 Rule 4 If FLOW is MODERATE and TIME is LATER ON then CONCENTRATION is C 4 Rule 5 If FLOW is HIGH and TIME is EARLY ON then CONCENTRATION is C 5 Rule 6 If FLOW is HIGH and TIME is LATER ON then CONCENTRATION is C 6 The next step is to draw the MFs in each input space, an also to assign a value for each output constant. This is the parameter estimation step, which is solved by the Hybrid Learning Algorithm using the available database. Suppose that the algorithm gives the following results: Just for convenience, we rename the different input MFs with intuitive linguistic labels, such High or Early on. HIGH 0 1 Flow MODERATELOW 010 Probability 0 1 Time EARLY ONLATER ON 010 Probability C 1 = 16.23 C 2 = 18.56 C 3 = 10.58 C 4 = 16.13 C 5 = 6.59 C 6 = 10.60 Remember that a gaussian curve can be defined with two parameters. We give a graphical representation for clarity.

5 Now the Fuzzy Inference System is finished. The following slide is a numerical example showing how an output is calculated from an input.

6 Rule 1 If FLOW is LOW and TIME is EARLY ON then CONCENTRATION is C 1 Rule 2 If FLOW is LOW and TIME is LATER ON then CONCENTRATION is C 2 Rule 3 If FLOW is MODERATE and TIME is EARLY ON then CONCENTRATION is C 3 Rule 4 If FLOW is MODERATE and TIME is LATER ON then CONCENTRATION is C 4 Rule 5 If FLOW is HIGH and TIME is EARLY ON then CONCENTRATION is C 5 0 1 Probability 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 0 Rule 6 If FLOW is HIGH and TIME is LATER ON then CONCENTRATION is C 6 0 1 0 1 0 1 0 1 0 1 0 1 16.23 18.56 10.58 16.13 6.59 10.60 Logical operations p = 0 p= 0.1 p = 0 p= 0.4 p = 0 1.058 + 2.636 0.1 + 0.4 7.388 OUTPUT CONCENTRATION VALUE 82.5 INPUT VALUE for FLOW p = 0 p = 0.4 p = 0.1 p = 0.4 p = 0.75 p = 0.4 INPUT VALUE for TIME X = 0 0 1.058 0 2.636 0 Given an input, the first step to solve the FIS is the fuzzyfication of inputs, i.e. to obtain the probability of each linguistic value in each rule. The six rules governing the Fuzzy Inference System are represented with a graphical representation of the MFs that apply in each rule. The last step is the defuzzyfication procedure, when the consequents are aggregated (weighted mean) to obtain a crisp output The third step is to calculate the consequent of each rule depending on their weight (or probability) MIN = AND The second step is to combine the probabilities on the premise part to get the weight (or probability) of each rule. It is demonstrable that applying the and logical operator is equivalent to solve for the minimum value of the intersection of the MFs


Download ppt "NUMERICAL EXAMPLE APPENDIX A in “A neuro-fuzzy modeling tool to estimate fluvial nutrient loads in watersheds under time-varying human impact” Rafael Marcé."

Similar presentations


Ads by Google