• No se han encontrado resultados

The Membership Function Editor is the tool that lets you display and edit all of the membership functions associated with all of the input and output variables for the entire fuzzy inference system. The Membership Function

Editor shares some features with the FIS Editor, as shown in the next figure.

In fact, all of the five basic GUI tools have similar menu options, status lines, and Help and Close buttons.

:*-0%?&//"-.$%'&5

$"32-@A%&6*-2-@A%"-.%*.2(2-@

"%'0BB#%$#$(*/=

HI"52"41*%J"1*((*H%"5*"=

K12?,%"%3"52"41*%(&%*.2(%2($

/*/4*5$)26%'0-?(2&-$=

L5"6)%.2$61"#$%"11 /*/4*5$)26%'0-?(2&-$

'&5%()*%$*1*?(*.%3"52"41*=

K12?,%"%12-*%(&%?)"-@*%2($%"((5240(*$A

$0?)%"$%-"/*A%(#6*A%"-.%-0/*52?"1%6"5"/*(*5$=

!5"@%()*%?053*%(&%/&3*%2(%&5%(&%?)"-@*%2($%$)"6*=

;)2$%$("(0$%12-*

When you open the Membership Function Editor to work on a fuzzy inference system that does not already exist in the workspace, there are no membership functions associated with the variables that you defined with the FIS Editor.

On the upper-left side of the graph area in the Membership Function Editor is a “Variable Palette” that lets you set the membership functions for a given variable.

To set up the membership functions associated with an input or an output variable for the FIS, select a FIS variable in this region by clicking it.

Next select the Edit pull-down menu, and choose Add MFs .. A new window appears, which allows you to select both the membership function type and the number of membership functions associated with the selected variable.

In the lower-right corner of the window are the controls that let you change the name, type, and parameters (shape), of the membership function, after it is selected.

The membership functions from the current variable are displayed in the main graph. These membership functions can be manipulated in two ways. You

can first use the mouse to select a particular membership function associated with a given variable quality, (such as poor, for the variable, service), and then drag the membership function from side to side. This action affects the mathematical description of the quality associated with that membership function for a given variable. The selected membership function can also be tagged for dilation or contraction by clicking on the small square drag points on the membership function, and then dragging the function with the mouse toward the outside, for dilation, or toward the inside, for contraction. This action changes the parameters associated with that membership function.

Below the Variable Palette is some information about the type and name of the current variable. There is a text field in this region that lets you change the limits of the current variable’s range (universe of discourse) and another that lets you set the limits of the current plot (which has no real effect on the system).

The process of specifying the membership functions for the two input tipping example,tipper, is as follows:

1 Double-click the input variableserviceto open the Membership Function Editor.

2 In the Membership Function Editor, enter[0 10]in the Range and the Display Range fields.

3 Create membership functions for the input variableservice.

a Select Edit > Remove All MFs to remove the default membership functions for the input variableservice.

b Select Edit > Add MFs. to open the Membership Functions dialog box.

c In the Membership Functions dialog box, selectgaussmfas the MF Type.

d Verify that3is selected as the Number of MFs.

e Click OK to add three Gaussian curves to the input variableservice. 4 Rename the membership functions for the input variableservice, and

specify their parameters.

a Click on the curve namedmf1to select it, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, enterpoor.

• In the Params field, enter[1.5 0].

The two inputs of Params represent the standard deviation and center for the Gaussian curve.

Tip To adjust the shape of the membership function, type in the desired parameters or use the mouse, as described previously.

b Click on the curve namedmf2to select it, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, entergood.

• In the Params field, enter[1.5 5].

c Click on the curve namedmf3, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, enterexcellent.

• In the Params field, enter .

The Membership Function Editor window looks similar to the following figure.

5 In the FIS Variables area, click the input variablefoodto select it.

6 Enter[0 10]in the Range and the Display Range fields.

7 Create the membership functions for the input variablefood.

a Select Edit > Remove All MFs to remove the default Membership Functions for the input variablefood.

b Select Edit > Add MFs to open the Membership Functions dialog box.

c In the Membership Functions dialog box, selecttrapmfas the MF Type.

d Select2in the Number of MFs drop-down list.

e Click OK to add two trapezoidal curves to the input variablefood. 8 Rename the membership functions for the input variablefood, and specify

their parameters:

a In the FIS Variables area, click the input variablefoodto select it.

b Click on the curve namedmf1, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, enterrancid.

• In the Params field, enter[0 0 1 3].

c Click on the curve namedmf2to select it, and enterdeliciousin the Name field.

Reset the associated parameters if desired.

9 Click on the output variabletipto select it.

10 Enter[0 30]in the Range and the Display Range fields to cover the output range.

The inputs ranges from 0 to 10, but the output is a tip between 5% and 25%.

11 Rename the default triangular membership functions for the output variabletip, and specify their parameters.

a Click the curve namedmf1to select it, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, entercheap.

• In the Params field, enter[0 5 10].

b Click the curve namedmf2to select it, and specify the following fields in the Current Membership Function (click on MF to select) area:

• In the Name field, enteraverage.

• In the Params field, enter[10 15 20].

c Click the curve namedmf3to select it, and specify the following:

• In the Name field, enter

The Membership Function Editor looks similar to the following figure.

Now that the variables have been named and the membership functions have appropriate shapes and names, you can enter the rules. To call up the Rule Editor, go to the Edit menu and select Rules, or typeruleeditat the command line.