anfis

5
 242  CHAPTER 7 . FUZZY- NEURAL AND NEURAL-FUZ ZY CONTROL 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 patienc e. The point is this: The universal approximation prope rt y of ANFIS, as a ma the ma tic al the or em, is the theoretical guideline for using ANFIS. Example 7.5  In this example, we use ANFIS to approximate a function that we know (but pre ten d not to kno w). W e take for our “unknown” function, si n 10) si n 10". The surface determined by this function looks like this: 0 0.2 0.4 0.6 0.8 1 x 0 0.2 0.4 0.6 0.8 1 y -1 -0.5 0 0.5 1 z Plot of  sin 10) sin 10" The training data was obtained from this function by evaluating 100 random pairs  ()2 ")  with  )2 "  '  [02 1], creating a text  Þle,  sinxsiny.dat, with three columns of numbers.  Open  Matlab, and at the prompt, enter  anfisedit This bri ngs up the fo llowing dialog. (The training data box will be emp t y at this point.)

Upload: gaby-zuniga

Post on 08-Oct-2015

12 views

Category:

Documents


0 download

DESCRIPTION

Tutorial para aprender a utilizar ANFIS la herramienta de control neurodifuso que podremos encontrar en MATLAB

TRANSCRIPT

  • 242 CHAPTER 7. FUZZY-NEURAL AND NEURAL-FUZZY CONTROL

    capability of ANFIS. However, in real-world applications where the control lawis unknown, these choices belong to engineering skill. Because the intendedcontrolled system can be tested, a good approximation can be obtained withtime and patience. The point is this: The universal approximation propertyof ANFIS, as a mathematical theorem, is the theoretical guideline for usingANFIS.

    Example 7.5 In this example, we use ANFIS to approximate a function thatwe 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:

    00.2

    0.40.6

    0.81

    x

    00.2

    0.40.6

    0.81

    y

    -1

    -0.5

    0

    0.5

    1

    z

    Plot of sin 10x sin 10y

    The training data was obtained from this function by evaluating 100 randompairs (x, y) with x, y [0, 1], creating a text le, sinxsiny.dat, with threecolumns of numbers.

    Open Matlab, and at the prompt, enter anfiseditThis brings up the following dialog. (The training data box will be empty

    at this point.)

    2003 by Chapman & Hall/CRC

  • 7.3. BASIC PRINCIPLES OF NEURAL-FUZZY SYSTEMS 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 chooseTrain Now.

    In the ANFIS Editor, under View, choose View surface to bring up theSurface Viewer with a plot.

    2003 by Chapman & Hall/CRC

  • 244 CHAPTER 7. FUZZY-NEURAL AND NEURAL-FUZZY CONTROL

    This is not a very good approximation to our function. We can test theeect 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 muchbetter approximation to the function.

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

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

    2003 by Chapman & Hall/CRC

  • 7.4. GENERATING FUZZY RULES 245

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

    From the View menu, you can choose Edit FIS properties, Edit membershipfunctions, Edit rules, or Edit ans. These dialogs provide a number of optionsfor making changes.

    7.4 Generating fuzzy rules

    Linguistic labels in our natural language convey useful information in humancontrol strategies as well as in other cognitive decision processes. The fuzzyset theory approach to modeling this type of information is based on the thesisthat each linguistic label can be represented as a fuzzy subset of an appropriateset U , expressing the semantics of the label. While this seems quite reasonablefrom a modeling point of view, the concern in applications is determining themembership function of a label. This is related to the more general and moredicult 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 usingsome statistical sampling methods. When experts are not available, but instead,numerical experimental data are at hand, it is possible to use neural networksas 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 func-tions are learned from the data. However, rules and membership functions canalso be determined by using methods that do not presuppose a rule structure.Both the extraction of rules and the determination of membership functions can

    2003 by Chapman & Hall/CRC