Vous êtes sur la page 1sur 4

# 242

## capability of ANFIS. However, in real-world applications where the control law

is unknown, these choices belong to engineering skill. Because the intended
controlled system can be tested, a good approximation can be obtained with
time and patience. The point is this: The universal approximation property
of ANFIS, as a mathematical theorem, is the theoretical guideline for using
ANFIS.
Example 7.5 In this example, we use ANFIS to approximate a function that
we know (but pretend not to know). We take for our unknown function,
sin 10x sin 10y. The surface determined by this function looks like this:

1
0.5
z0
-0.5
-1
0

0.2

0.4

y
0.6

0.8

0.8

x 0.4
0.6

0.2

## Plot of sin 10x sin 10y

The training data was obtained from this function by evaluating 100 random
pairs (x, y) with x, y [0, 1], creating a text le, sinxsiny.dat, with three
columns of numbers.
Open Matlab, and at the prompt, enter anfisedit
This brings up the following dialog. (The training data box will be empty
at this point.)

243

## Choose Load Data; browse and select sinxsiny.dat.

Choose Generate FIS.
This brings up the fuzzy inference system dialog.

## Under INPUT MF Type, select gbellmf, and set INPUT Number of to 4.

Under OUTPUT MF Type, select linear. Choose OK.
In the Train FIS box, set Error to 0.01 and Epochs to 25, and choose
Train Now.
In the ANFIS Editor, under View, choose View surface to bring up the
Surface Viewer with a plot.

244

## CHAPTER 7. FUZZY-NEURAL AND NEURAL-FUZZY CONTROL

This is not a very good approximation to our function. We can test the
eect of increasing the number of membership functions.
From the ANFIS Editor, choose Generate FIS and set Number of to 6.
The surface will change to something like the following, which is a much
better approximation to the function.

In the ANFIS Editor, under View, choose View rules to open the Rule
Viewer.

The choice of 6 membership functions for each of the two inputs has generated
36 rules.

## 7.4. GENERATING FUZZY RULES

245

In the ANFIS Editor, under ANFIS Info, choose Structure. This shows
the structure of the adaptive network.

From the View menu, you can choose Edit FIS properties, Edit membership
functions, Edit rules, or Edit ans. These dialogs provide a number of options
for making changes.

7.4

## Linguistic labels in our natural language convey useful information in human

control strategies as well as in other cognitive decision processes. The fuzzy
set theory approach to modeling this type of information is based on the thesis
that each linguistic label can be represented as a fuzzy subset of an appropriate
set U , expressing the semantics of the label. While this seems quite reasonable
from a modeling point of view, the concern in applications is determining the
membership function of a label. This is related to the more general and more
dicult problem of determining rules.
There are several approaches to answer this concern. Rules and membership
functions can be given by experts, either in a subjective manner or by using
some statistical sampling methods. When experts are not available, but instead,
numerical experimental data are at hand, it is possible to use neural networks
as a solution to the problem of rule and membership function determination.
With ANFIS, the structure of the rules and the types of the membership
functions are specied in advance, and the parameters of the membership functions are learned from the data. However, rules and membership functions can
also be determined by using methods that do not presuppose a rule structure.
Both the extraction of rules and the determination of membership functions can