Sunteți pe pagina 1din 8

Faculty of Science and Engineering Electrical Engineering Department

MASTER OF ENGINEERING STUDIES INTELLIGENT SYSTEMS LAB ASSIGNMENT-5 (FUZZY SYSTEMS)

By : JIBIN GEORGE

Student ID No.

1133869

I the undersigned declare that I am the author of this work, and that any content from other sources has been acknowledged and fully cited. Signed: Assessor: Time spent on assignment: hours

Assessor comments:

Date of assessment:

Mark awarded:

Introduction
Adaptive Neuro fuzzy inference system (ANFIS) is a combination of both neural networks and fuzzy systems.It uses ahybrid learning algorithm which was developed by J.S Roger Jang in 1992.It is based on a hybrid learning algorithm that combines the least-squares estimator and the gradient descent method. It creates a fuzzy decision tree to classify the data into one of 2n(or pn) linear regression models to minimize the sum of squared errors (SSE). 2 SSE = j ej where: ej is the error between the desired and the actual output p is the number of fuzzy partitions of each variable n is the number of input variables It uses a sugeno type fuzzy system. In its training algorithm each epoch is composed from a forward pass and a backward pass. In the forward pass, a training set of input patterns (an input vector) is presented to the ANFIS, neuron outputs are calculated on the layer-by-layer basis, and rule consequent parameters are identified by the SSE. There are different tools for modelling the ANFIS such as C/C++, or a neuro-fuzzy development tool. ANFIS function in MATLAB Fuzzy Logic Toolbox can also be used for modelling ANFIS. It provides a systematic framework for building neurofuzzy inference systems and defines rules automatically based on the number of membership functions assigned to each input variable. Fire Weather Index Model Fire danger rating was developed by scientist named A.G Mc Arthur to measure the degree of danger of fire in Australian forests[11].FDI is depending on. It is determined from four variables Drought factor, Temperature, Humidity & Wind speed. The equation is shown below FFDI = 1.275 D 0.987 exp{[T / 29.5858] - [H / 28.9855] + [V / 42.735]} where D = Drought factor [0 - 10] T = Temperature [0 50o C] H = Humidity [0 - 100%] V = Wind velocity [0 150 km/h] D = 0.191[I + 104][N + 1]1.5 / {3.52 [N + 1]1.5 + R - 1} where N = Number of days since last rain I = amount of rain need to restore soil moisture to 200mm R = Total rain in the most recent 24 hours. 1.Set of data for the Fire weather index model which defines the I/O relation with in the predefined operational space .This should have a good coverage through reasonable intervals. For this we need to construct a matlab code with the FWI equation with giving inputs in a random manner. Matlab code D=randi([0 10],[100,1]); axis([0 100 0 150]) T=randi([0 50],[100,1]); title('Output') H=randi([0 100],[100,1]); subplot(5,1,2) V=randi([0 150],[100,1]); plot(x',D) m=(T/29.5858)title('Drought factor') (H/28.9855)+(V/42.735); subplot(5,1,3) k=(D.^0.987); plot(x',T) n = 1.275*k; title('Temperature') j=exp(m); subplot(5,1,4) o=n.*j; plot(x',H) x=[1:1:100]; title('Humidity') s=[D T H V o] subplot(5,1,5) subplot(5,1,1) plot(x',V) plot(x',o) title('wind speed') Here we have constructed a program for generating 100 samples for outputs for inputs .From here we need to filter out sufficient samples for the ANFIS learning. Fig6 -Fuzzy rules

Output

For better estimation of the system we need to know about the characteristics of each inputs with ouput,For that we need to plot the graph against the desired input and output keeping the other inputs constant.

Fig 1 : Characteristics of D,T,H and V on FWI.

Fig 1 : Characteristics of I ,N,R on Drought factor. Fig6 -Fuzzy rules

2.Extract set of suitable data for ANFIS training. For better results we should extract the data for training which must show all the non linearity of the system.If more number of data samples and more epochs are used the results will be accurate but because of more number of data sets ,more time will consume and the resulting fuzzy system should have more number of member ship functions .and that system will consume more memory. For training the data set should be such that it should reflects all relations in less number of samples. So we should remove the repeated samples ,samples which giving the output which is not in the limit, include maximum and minimum points.the graph which is showing our random samples and selected samples are shown below.

We should give this data for training to the ANFIS editor which is shown in fig 1.First we should load the data from the work space as training data .Next step is to generate FIS (Fuzzy inference system) ,for that three options are there ,we can make our own initial fuzzy system having membership functions and rules ,the anfis editor can also estimate the initial fuzzy system according to the number of inputs and outputs. There are two modes of generating FIS structure they are grid partitioning and subtractive clustering. The training data is shown in fig 1.

Fig 1 : Training data 3.Testing data for testing the estimated system We trained the system with the training data we have selected .We have trained the system for 500 epochs and the error value settled to 0.002 .The graph is shown in fig 2 .For fast results we need to change the desired error value to a different value other than zero.

Fig6 -Fuzzy rules

Fig 2 : Training error graph We have selected 100 samples for testing the system and it is given to the anfis editor and it is shown below in fig 3.From the graph it is understood that the system is almost correct and the output is almost correct except the outputs which is outside the limit which we avoided for training the system.

Fig 3 : Testing data As part of estimating the fuzzy system the anfis itself edited the membership functions for the better results and the updated member ship functions are shown below.

Fig6 -Fuzzy rules

Here we got five membership functions of each input and 30 rules. 4.Changing the architecture by altering the number and type of sets. Now we are going to change the number of membership functions .Let us try increasing the number of membership functions .Try predicting the FIS automatically by the ANFIs editor itself using sub clustering method. The member ship functions we have increased to 18 for each inputs and the plots are shown below

Fig6 -Fuzzy rules

5.Performance of the fuzzy system estimated through the ANFIS. Here we have estimated the fuzzy systems by manually selecting the primary fuzzy system and automatically selecting the fuzzy system by grid partitioning and sub clustering method.

Fig7-Characteristics of variables for the fuzzy system developed by ANFIS manually selecting the fuzzy initial parameters From the figure 7 ,it is understood that all the input characteristics except the drought factor is correct ,here our estimated drought factor is not correct ,So we must train the system again giving all the points from drought factor input and tweak the system for getting the correct output. Here we have selected triangular member ship function for the drought factor ,let us check using the Gaussian function.

Fig8-Characteristic of drought factor after changing the drought factor membership function to Gaussian and training. The graph in fig 8 shows the characteristics of drought factor after changing the membership function to Gaussian and training again .Now we got the almost same characteristics. If we increase the membership functions and rules we will get the accurate approximation. But it requires more memory and more time for execution and training .So we should try to approximate a model with less membership function and rules ,It is possible to more number of training correct selection of membership function and its parameters. Conclusion Here we have designed a fuzzy system for modelling fire weather index through ANFIS using different methods and we found the difference in the output by tweaking the membership functions and the rules .There are lot of adaptive control systems are there .But this ANFIS is a promising adaptive control technology differ from the others as due to the uncertainty things and the fuzziness .

Reference 1.Soft computing and intelligent system design - FAKHREDDINE O. KARRAY AND CLARENCE DE SILVA 2.Artificial intelligence Michael Negnivitsky

Fig6 -Fuzzy rules

S-ar putea să vă placă și