Analyze Fuzzy System Using Fuzzy Logic Designer
Once you define your membership functions and your rule base, you can analyze your design using the following documents.
Control Surface — Plot the output values for all combinations of two input variables.
Rule Inference — Specify input values and view the inference diagram and resulting output value.
To open either document, on the Design tab, select the corresponding icon in the Simulation gallery.
You can export your analysis results to the MATLAB® workspace for further analysis. For more information, see Export FIS and Simulation Data from Fuzzy Logic Designer.
When analyzing your fuzzy system, you can configure the resolution of the output variable universe of discourse for both rule-inference and control-surface analysis. To do so, set the Number of Samples parameter. This parameter is not supported for Sugeno systems.
The Control Surface document shows the FIS output value for all possible combinations of two input variables.
In the Axes section, select the input and output variables using the corresponding drop-down menus.
In the Mesh Points section, you can specify the plot resolution along the X and Y axes. For a smoother plot, specify larger resolution values.
If your system has more than two inputs, you must specify a reference value for each input variable not shown in the plot. To do so, specify the Reference Inputs parameter. For example, the following figure shows a reference input for a three-input system for which the first and second variables are used in the control surface plot.
For each variable that is used in the control surface plot, specify a reference value of
You can also view a control surface for a single input variable. In this case, in the
Axes section, in the X drop-down list, select
the input variable and, in the Y drop-down list,
none. Then, specify the reference values for all unused
input variables using the Reference Inputs parameter.
For example, the following figure shows a control surface for a two-input system where the output is plotted against the first input variable.
In the Rule Inference document, you specify values for your input variables, inspect the inference process, and view the resulting output value.
For more information on the fuzzy inference process for different FIS types, see:
To select input values, in the Rule Inference document, you can specify the Input values parameter. Alternatively, you can drag the input bars
The preceding figure shows the Rule Inference document for a type-1 Mamdani system.
The fuzzified inputs activate the second and third rules. The firing strengths of these rules are applied to the output variable. When the resulting output membership functions are aggregated and defuzzified, the final output value is 21.7.
The following figure shows the same inference process for a type-2 Mamdani system. In this case, the fuzzified inputs generate firing strengths for both the upper and lower membership functions.