In the Name of God. Lecture 17: ANFIS Adaptive Network-Based Fuzzy Inference System

Similar documents
MODELING FOR RESIDUAL STRESS, SURFACE ROUGHNESS AND TOOL WEAR USING AN ADAPTIVE NEURO FUZZY INFERENCE SYSTEM

ANFIS: ADAPTIVE-NETWORK-BASED FUZZY INFERENCE SYSTEMS (J.S.R. Jang 1993,1995) bell x; a, b, c = 1 a

European Journal of Science and Engineering Vol. 1, Issue 1, 2013 ADAPTIVE NEURO-FUZZY INFERENCE SYSTEM IDENTIFICATION OF AN INDUCTION MOTOR

Fuzzy Expert Systems Lecture 8 (Fuzzy Systems)

A New Fuzzy Neural System with Applications

NEW HYBRID LEARNING ALGORITHMS IN ADAPTIVE NEURO FUZZY INFERENCE SYSTEMS FOR CONTRACTION SCOUR MODELING

Neuro-fuzzy systems 1

RULE BASED SIGNATURE VERIFICATION AND FORGERY DETECTION

CHAPTER 3 FUZZY RULE BASED MODEL FOR FAULT DIAGNOSIS

CHAPTER 3 ADAPTIVE NEURO-FUZZY INFERENCE SYSTEM

Deciphering Data Fusion Rule by using Adaptive Neuro-Fuzzy Inference System

Chapter 4 Fuzzy Logic

FUZZY INFERENCE SYSTEMS

Fuzzy Rules & Fuzzy Reasoning

Analysis of Control of Inverted Pendulum using Adaptive Neuro Fuzzy system

Age Prediction and Performance Comparison by Adaptive Network based Fuzzy Inference System using Subtractive Clustering

On the use of Fuzzy Logic Controllers to Comply with Virtualized Application Demands in the Cloud

A New Class of ANFIS based Channel Equalizers for Mobile Communication Systems

[Time : 3 Hours] [Max. Marks : 100] SECTION-I. What are their effects? [8]

Introduction 3 Fuzzy Inference. Aleksandar Rakić Contents

CT79 SOFT COMPUTING ALCCS-FEB 2014

OPTIMIZATION. Optimization. Derivative-based optimization. Derivative-free optimization. Steepest descent (gradient) methods Newton s method

Intelligent Control. 4^ Springer. A Hybrid Approach Based on Fuzzy Logic, Neural Networks and Genetic Algorithms. Nazmul Siddique.

Final Exam. Controller, F. Expert Sys.., Solving F. Ineq.} {Hopefield, SVM, Comptetive Learning,

Transactions on Information and Communications Technologies vol 16, 1996 WIT Press, ISSN

Unit V. Neural Fuzzy System

Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference Case study Summary

Adaptive Neuro-Fuzzy Model with Fuzzy Clustering for Nonlinear Prediction and Control

Research Article Prediction of Surface Roughness in End Milling Process Using Intelligent Systems: A Comparative Study

FUZZY LOGIC TECHNIQUES. on random processes. In such situations, fuzzy logic exhibits immense potential for

Fuzzy if-then rules fuzzy database modeling

Adaptive Neuro Fuzzy Inference System (ANFIS) For Fault Classification in the Transmission Lines

Predicting Porosity through Fuzzy Logic from Well Log Data

The analysis of inverted pendulum control and its other applications

Chapter 2: FUZZY SETS

Mechanics ISSN Transport issue 1, 2008 Communications article 0214

CHAPTER 4 FREQUENCY STABILIZATION USING FUZZY LOGIC CONTROLLER

Fuzzy Systems (1/2) Francesco Masulli

* The terms used for grading are: - bad - good

ADAPTIVE NEURO FUZZY INFERENCE SYSTEM FOR HIGHWAY ACCIDENTS ANALYSIS

Neural Networks Lesson 9 - Fuzzy Logic

Fuzzy Reasoning. Linguistic Variables

Lecture notes. Com Page 1

Aircraft Landing Control Using Fuzzy Logic and Neural Networks

Chapter 7 Fuzzy Logic Controller

Defect Depth Estimation Using Neuro-Fuzzy System in TNDE by Akbar Darabi and Xavier Maldague

FUZZY INFERENCE. Siti Zaiton Mohd Hashim, PhD

Fuzzy rule-based decision making model for classification of aquaculture farms

Input Selection for ANFIS Learning. Jyh-Shing Roger Jang

CHAPTER 5 FUZZY LOGIC CONTROL

ANFIS : Adap tive-ne twork-based Fuzzy Inference System

Fuzzy Logic Controller

Why Fuzzy Fuzzy Logic and Sets Fuzzy Reasoning. DKS - Module 7. Why fuzzy thinking?

Fuzzy Mod. Department of Electrical Engineering and Computer Science University of California, Berkeley, CA Generalized Neural Networks

ANFIS: Adaptive Neuro-Fuzzy Inference System- A Survey

CHAPTER 4 FUZZY LOGIC, K-MEANS, FUZZY C-MEANS AND BAYESIAN METHODS

Fuzzy Networks for Complex Systems. Alexander Gegov University of Portsmouth, UK

Hybrid Neuro-fuzzy Model

CHAPTER 3 FUZZY INFERENCE SYSTEM

Fuzzy Segmentation. Chapter Introduction. 4.2 Unsupervised Clustering.

This leads to our algorithm which is outlined in Section III, along with a tabular summary of it's performance on several benchmarks. The last section

Chapter 7: Competitive learning, clustering, and self-organizing maps

Takagi-Sugeno Fuzzy System Accuracy Improvement with A Two Stage Tuning

fuzzylite a fuzzy logic control library in C++

742 IEEE TRANSACTIONS ON FUZZY SYSTEMS, VOL. 13, NO. 6, DECEMBER Dong Zhang, Luo-Feng Deng, Kai-Yuan Cai, and Albert So

ARTIFICIAL INTELLIGENCE. Uncertainty: fuzzy systems

CHAPTER Introduction I

Self-Learning Fuzzy Controllers Based on Temporal Back Propagation

Locally Weighted Learning for Control. Alexander Skoglund Machine Learning Course AASS, June 2005

Neuro-Fuzzy Inverse Forward Models

Fuzzy If-Then Rules. Fuzzy If-Then Rules. Adnan Yazıcı

Figure 2-1: Membership Functions for the Set of All Numbers (N = Negative, P = Positive, L = Large, M = Medium, S = Small)

Neural Networks. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani

A Neuro-Fuzzy Classifier for Intrusion Detection Systems

ESSENTIALLY, system modeling is the task of building

^ Springer. Computational Intelligence. A Methodological Introduction. Rudolf Kruse Christian Borgelt. Matthias Steinbrecher Pascal Held

Designed By: Milad Niaz Azari

ANALYSIS AND REASONING OF DATA IN THE DATABASE USING FUZZY SYSTEM MODELLING

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Using a fuzzy inference system for the map overlay problem

SEMI-ACTIVE CONTROL OF BUILDING STRUCTURES USING A NEURO-FUZZY CONTROLLER WITH ACCELERATION FEEDBACK

Extracting Interpretable Fuzzy Rules from RBF Networks

Bathymetry estimation from multi-spectral satellite images using a neuro-fuzzy technique

Methods for Intelligent Systems

Edge Detection (with a sidelight introduction to linear, associative operators). Images

Support Vector Machines

Machine Learning & Statistical Models

ANFIS based HVDC control and fault identification of HVDC converter

Fault Detection and Classification in Transmission Lines Using ANFIS

A Neuro-Fuzzy Application to Power System

A Framework of Adaptive T-S type Rough-Fuzzy Inference Systems (ARFIS)

MARS: Still an Alien Planet in Soft Computing?

Improving interpretability in approximative fuzzy models via multi-objective evolutionary algorithms.

Package anfis. February 19, 2015

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge)

REGRESSION ANALYSIS : LINEAR BY MAUAJAMA FIRDAUS & TULIKA SAHA

3 Nonlinear Regression

ANFIS: Adaptive-Network-Based Fuzzy Inference System

COSC 6397 Big Data Analytics. Fuzzy Clustering. Some slides based on a lecture by Prof. Shishir Shah. Edgar Gabriel Spring 2015.

Self-Optimisation of a Fuzzy Controller with B-Spline Models. Jianwei Zhang and Khac Van Le. Faculty of Technology, University of Bielefeld,

Transcription:

In the Name of God Lecture 17: ANFIS Adaptive Network-Based Fuzzy Inference System

Outline ANFIS Architecture Hybrid Learning Algorithm Learning Methods that Cross-Fertilize ANFIS and RBFN ANFIS as a universal approximator

What is ANFIS? There is a class of adaptive networks that are functionally equivalent to fuzzy inference systems. The architecture of these networks is referred to as ANFIS, which h stands for adaptive networkbased fuzzy inference system or semantically equivalently, adaptive neuro-fuzzy inference system.

ANFIS Architecture Assume that the fuzzy inference system under consideration has two inputs x and y and one output z. For a first-order Sugeno fuzzy model with two ifthen rules:

Sugeno model and its corresponding equivalent ANFIS architecture a) A two-input first-order Sugeno fuzzy model with two rules b) Equivalent ANFIS architecture

Sugeno ANFIS, Layer 1 Every node i in this layer is an adaptive node with a node function: In other words, O 1,i is the membership grade of a fuzzy set A i (or B i ).

Sugeno ANFIS, Layer 1 Here the membership function can be any appropriate parameterized membership function, such as the generalized bell function: where {a i, b i, c i } is the parameter set. Parameters in this layer are referred to as premise parameters.

Sugeno ANFIS, Layer 2 Every node in this layer is a fixed node labeled П, whose output is the product of all the incoming signals: Each node s output represents the firing strength of a rule. Any other T-norm operators that perform fuzzy AND (e.g. min) can be used as the node function in this layer.

Sugeno ANFIS, Layer 3 Every node in this layer is a fixed node labeled N. The i-th node calculates the ratio of the i-th rule's firing strength to the sum of all rules' firing strengths: For convenience, outputs of this layer are called normalized firing strengths.

Sugeno ANFIS, Layer 4 Every node i in this layer is an adaptive node with a node function where w i is a normalized firing strength from layer 3 and {p i, q i, r i } is the parameter set of this node. Parameters in this layer are referred to as consequent parameters.

Sugeno ANFIS, Layer 5 The single node in this layer is a fixed node labeled, which computes the overall output as the summation of all incoming signals:

Structure of Sugeno ANFIS Note that the structure of this adaptive network p is not unique. For example, we can perform the weight normalization at the last layer.

Extension from Sugeno ANFIS to Tsukamoto ANFIS The output of each rule (f i ) is induced jointly by a consequent membership function and a firing strength. a) A two-input Tsukamoto fuzzy model with two rules b) Equivalent ANFIS architecture

ANFIS Architecture: two-input Sugeno with nine rules

ANFIS for Mamdani FIS For the Mamdani fuzzy inference system with max-min composition, a corresponding ANFIS can be constructed if discrete approximations are used to replace the integrals in the centroid defuzzification scheme. The resulting ANFIS is much more complicated than either Sugeno ANFIS or Tsukamoto ANFIS.

Hybrid Learning Algorithm When the values of the premise parameters are fixed, the overall output can be expressed as a linear combination of the consequent parameters. In Symbols, the output f can be written as which is linear in the consequent parameters p 1, q 1, r 1, p 2, q 2, and r 2.

Hybrid Learning Algorithm Goal: Calculating premise parameters and consequent parameters of ANFIS. Hybrid learning algorithm consist of two passes: Forward Pass Backward Pass Forward Pass: Node outputs go forward until layer 4 and the consequent parameters are identified by the leastsquares method (linear learning! how?). Backward Pass: The error signals propagate backward and the premise parameters are updated by gradient descent.

Hybrid Learning Algorithm Forward pass Backward pass Premise parameters Fixed Gradients descent Consequent Parameters Least-squares estimator Fixed Signals Node output Error signals

Learning Methods that Cross- Fertilize ANFIS and RBFN Under certain minor conditions, an RBFN (radial basis function network) is functionally equivalent to a FIS. There are a variety of adaptive learning mechanisms that t can be used for both adaptive FIS and RBFN.

Hybrid Learning Algorithm for ANFIS and RBFN An adaptive FIS usually consists of two distinct modifiable parts: The antecedent part The consequent part These two parts can be adapted by different optimization methods, such as hybrid learning procedure combining GD (gradient descent) and LSE (least-squaressquares estimator). These learning schemes are equally applicable to RBFNs.

Learning Algorithms for RBFN Conversely, the analysis and learning algorithms for RBFNs are also applicable to adaptive FIS. A typical scheme is to fix the receptive field (radial basis) functions first and then adjust the weights of the output t layer. There are several schemes proposed to determine the center positions (μ i ) of the receptive field functions: Based on standard deviations of training data (Lowe) By means of vector quantization or clustering techniques (Moody and Darken) Then, the width parameters σ i are determined by taking the average distance to the first several nearest neighbors of u i 's.

Learning Algorithms for RBFN Once these nonlinear parameters (u i and σ i ) are fixed and the receptive fields are frozen, the linear parameters (i.e., the weights of the output layer) can be updated by either the leastsquares method or the gradient method. Other RBFN analyses, such as generalization properties, are all applicable to adaptive FIS.

ANFIS as a Universal Approximator When the number of rules is not restricted, a zero-order Sugeno model has unlimited approximation power for matching any nonlinear function arbitrarily well on a compact set. This fact is intuitively reasonable. However, to give a mathematical ti proof, we need to apply the Stone-Weierstrass theorem (see the book for detailed analysis!).

Example Rule 1: IF x is small (A1) AND y is small (B1) THEN f1=small Rule 2: IF x is large (A2) AND y is large (B2) THEN f2=large A1: A2: A 1 1 x 1 2 ( x) B1: 1 2 B 1( y) f 1 0.1x 0.1y 0. 2 1 1 2 1 y 2 B2: 1 1 B 2( y) A 2 ( x ) 2 2 9 14 1 x 1 y f 2 10x 10y 10 2 2 Given the trained fuzzy system above and input values of x=3 and y=4, find output of the Sugeno fuzzy system

Example THEN f1=0.1x+0.1y+0.1 f2=10x+10y+10 x y

Example THEN 0.5 0.5 f1=0.1x+0.1y+0.1 f2=10x+10y+10 0.1 0.039 x=3 y=4

Example x=3 A1 0.5 0.25 0.25 W 1 = 0.25+0.0039 x=3 A2 N W 1 =0.985 y=4 B1 0.5 0.1 B2 y=4 0.039 0.0039 N 0.0039 W 2 = 0.25+0.0039 W 2 =0.01540154

Example N W 1 =0.985 w 1 f 1 =(0.985)x(0.1x3+0.1x4+0.1)=0.788 N W 2 =0.0154 w 2 f 2 =(0.0154)x(10x3+10x4+10)=1.232

0.7877 Example 0.7877+1.232 = 2.0197 O = 2.0197 1.232

What if T-norm is taken at layer 2 to perform AND operation x=3 x=3 A1 A2 0.5 min 0.5 N 0.5 W 1 = 0.5+0.039 W 1 =0.9276 0.5 0039 0.039 y=4 B1 0.1 W 2 = 0.039 min N 0. 5+0.039 y=4 B2 0.039 W 2 =0.0724 LAYER 1 LAYER 2 LAYER 3

What if T-norm is taken at layer 2 to perform AND operation N W 1 =0.9276 w 1 f 1 =(0.9276)x(0.1x3+0.1x4+0.1)=0.7421 N W 2 =0.0724 w 2 f 2 =(0.0724)x(10x3+10x4+10)=5.7920 LAYER 3 LAYER 4

What if T-norm is taken at layer 2 to perform AND operation 0.7421 0.7421+5.7920 = 6.5341 O = 6.5341 5.7920 LAYER 4 LAYER 5

Gradient Descent learning for ANFIS F w f i i i i w i i w f i i i=1,2,3, R # of rules F is the calculated/estimated output value (by ANFIS) Error = e = (d F) 2 d = Actual/Real Output e ( x, y,...) e an ( 1) an ( ) aa η:learning rate Gradient of ANFIS s output: Making ANFIS s output (O) closer to actual output (AO) This can be done by updating values of the parameters (e.g., a, c, ) over n (iteration/step)

Practical considerations In a conventional FIS, the number of rules is determined by an expert familiar with the target In ANFIS, it is chosen empirically By plotting the data sets and examining them visually (for less than three inputs) Or by trail and error The initial values of premise parameters are set in such a way that the centers of MFs are equally spaced along the range of each input variable

Practical considerations These MFs satisfy the condition of ε- completeness with ε = 0.5 Given a value x of one of the inputs, we can always find a linguistic label A that μ A ε This helps the smoothness ε-completeness can also be maintained during the optimization process

Extensions of ANFIS The MFs can be of any yparameterized forms introduced previously Any T-norm operator can be replaced the algebraic product A learning rule can decide the best T-norm operations should be used The rules can be realized using OR operators instead of AND

More on ANFIS ε-completeness p ensures that for any given value of an input variable, there is at least a MF with a grade greater or equal to ε This guarantees that the whole input space is covered properly if ε is greater than zero ε-completeness l t can be maintained i by the constrained gradient descent

More on ANFIS Moderate fuzzyness: within most regions of the input space, there should be a dominant fuzzy if-then rule with a firing strength close to unity that accounts for the final output This preserve MFs from too much overlap and make the rule set more informative This eliminate the cases where one MFs goes under the other one

More on ANFIS A simple way is to use a modified error measure where E is the original squared error, β is a weighting constant, and is the normalized firing i strength The second term is indeed Shannon s information entropy This error measure is not based on data fitting alone, and trained ANFIS has better generalizability

More on ANFIS The easy way of maintaining reasonably shaped y y g y p MFs is to parameterize the MF correctly

Example ANFIS is used to model a two-dimensional sinc equation defined by z sin c( x, y) sin( x)sin( y) xy x and y are in the range [-10,10] Number of membership functions for each input: 4 Number of rules: 16

Example x y Initial membership functions Final (trained) membership functions after 100 epochs

Example

Function approximation using ANFIS In this example, an ANFIS is used to follow a trajectory of the non-linear function defined by the equation y cos(2 x ) First, we choose an appropriate architecture for the ANFIS. An ANFIS must have two inputs x 1 and x 2 and one output y. Thus, in our example, the ANFIS is defined by four rules, and has the structure shown below. e x 2 1

An ANFIS model with four rules Layer 1 Layer 2 Layer 3 Layer 4 Layer 5 x 1 x 2 A 1 1 N1 1 x 1 A 2 2 B 1 3 N 2 2 N 3 3 y x 2 B 2 4 N 4 4

Function approximation using ANFIS The ANFIS training data includes 101 training samples. They are represented by a 101 3 matrix [x 1 x 2 y d ], where x 1 and x 2 are input vectors, and y d is a desired output vector. The first input vector, x 1, starts at 0, increments by 0.1 and ends at 10. The second input vector, x 2, is created by taking sin from each element of vector x 1, with elements of the desired output vector, y d, determined by the function equation.

Learning in an ANFIS with two MFs assigned to each input (1 epoch) y 2 Training Data ANFIS Output 1 0-1 -2-3 1 0.5 0-0.5 x 2-1 0 2 x 1 4 6 8 10

Learning in an ANFIS with two MFs assigned to each input (100 epochs) y 2 Training Data ANFIS Output 1 0-1 -2-3 1 0.5 0 x 2-0.5-1 0 2 x 1 4 6 8 10

So,... We can achieve some improvement, but much better results are obtained when we assign three membership functions to each input variable. In this case, the ANFIS model will have nine rules, as shown in figure below.

An ANFIS model with nine rules A 1 1 N 1 x 1 x 2 1 x 1 A 2 2 3 N 2 N 3 2 3 A 3 4 5 N 4 4 N 5 5 y B 1 6 N6 6 x 2 B 2 7 8 N 7 N 8 7 8 B 3 9 N 9 9

Learning in an ANFIS with three MFs assigned to each input (1 epoch) y 2 Training Data ANFIS Output 1 0-1 -2-3 1 0.5 0-0.5 x 2-1 0 2 x 1 4 6 8 10

Learning in an ANFIS with two MFs assigned to each input (100 epochs) y 2 Training Data ANF IS Output 1 0-1 -2-3 1 0.5 0 x 2-0.5-1 0 2 x 1 4 6 8 10

Initial and final membership functions of the ANFIS 1 08 0.8 0.6 0.4 0.2 1 08 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 x1 0-1 -0.8-0.6-0.4-0.2 0 0.2 0.4 0.6 0.8 1 x2 (a) Initial membership functions. 1 0.8 0.6 0.4 0.2 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 x1 0-1 -0.8-0.6-0.4-0.2 0 0.2 0.4 0.6 0.8 1 (b) Membership functions after 100 epochs of training. x2

Key Features of Different Modeling Tools Technique Model free Can resist outliers Explains output Suits small data sets Can be adjusted for new data Reasoning process is visible Suits complex models Include known facts Least squares regression Neural networks Fuzzy Systems ANFIS Yes No Partially An outlying observation, or outlier, is one that appears to deviate markedly from other members of the sample in which it occurs. Adapted from Gray and MacDonell, 1997

Reading J-S R Jang and C-T Sun, Neuro-Fuzzy and Soft Computing, Prentice Hall, 1997 (Chapter 12).