Digital Signal Processing Lab: week 4

7 downloads 1674 Views 71KB Size Report
Figure 1: ANFIS editor. From this GUI you can. ▫ Load data (training, testing, and checking) by selecting appropriate radio button. Loaded data is plotted on the ...
Computational Intelligence COM907M1 Laboratory Session: week 9 Adaptive Neuro-Fuzzy Systems The modelling approach used by Adaptive Neuro-Fuzzy Inference System (ANFIS) is similar to many system identification techniques and can be broken down into following steps: ƒ ƒ

Parameterised model structure (relating to input MFs, rules and output MFs) Collection of a set of I/O data

In some cases, data is collected using noisy measurements, and the training data cannot be representative of all the features of the data that will be presented to the model. This is where model validation and testing come into play. The whole model building process is divided into 3 steps: ƒ ƒ ƒ

Model building Model validation Model testing

To perform the above tasks, the whole data set is divided into 3 sets of data ƒ ƒ ƒ

Training data Testing data Checking data

Model validation is the process by which the input vectors from Testing I/O data set are presented to the trained FIS model to see how well the FIS model predicts the corresponding data set output values. ANFIS Editor To get started with ANFIS editor GUI, type >>anfisedit The following GUI will appear on screen, Figure 1

http://www.infm.ulst.ac.uk/~siddique

Figure 1: ANFIS editor. From this GUI you can ƒ ƒ ƒ ƒ ƒ ƒ ƒ

Load data (training, testing, and checking) by selecting appropriate radio button. Loaded data is plotted on the plot region Generate an initial FIS model or load an initial FIS model using the options in Generate FIS portion of the GUI View the FIS model structure once an initial FIS has been generated or loaded by selecting the structure button Choose model parameter optimisation method: backpropagation or hybrid (mixture of backpropagation and least squares) Choose the number of training epochs and training error tolerance Train the FIS model by selecting Train Now button View FIS model output versus the training, checking, or testing output by selecting the Test Now button.

FIS structure generation Structure generation can be done in two ways: ƒ ƒ

initialising the FIS parameters to your own preference using FIS editor, which can be loaded from workspace or disk and using ANFIS editor.

To initialise FIS using ANFIS do the following 1. Choose Grid partition. There ate two partition methods, grid partition and subtractive clustering. 2. Click on Generate FIS button. This brings up a menu from where you can choose number of MFs and types for input and output.

http://www.infm.ulst.ac.uk/~siddique

Figure 2: Structure generation Training ANFIS Two anfis parameter optimisation method options available for FIS training are: hybrid and backpropagation. To start training: 1. Select optimisation method say hybrid 2. Set number of training epochs, say 100 3. Select Train NOw The following should appear on the screen

Figure 3: ANFIS Training.

Testing ANFIS

To test your FIS against the checking data, click on Checking data in the Test FIS portion of the GUI, and click on Test Now. When you test the checking data against the FIS it looks like

http://www.infm.ulst.ac.uk/~siddique

Figure 4: ANFIS Checking.

Viewing FIS structure After you generate the FIS or loaded your FIS from FIS Editor, you can view the model by clicking on the structure button in the middle of the right-hand side of the GUI. A new GUI appears as follows

Figure 5: ANFIS model structure.

Exercise 1: A re-vibration systems is described by the following equation y= 0.5*x2 *sin(x). Generate 2000 data point for the system. Develop an ANFIS system as described above. Test the ANFIS system with a new set of data and show the performance of the system.

http://www.infm.ulst.ac.uk/~siddique