CHAPTER-9 DEVELOPMENT OF MODEL USING ANFIS 9.1 Introduction The acronym ANFIS derives its name from adaptive neuro-fuzzy inference system. It is an adaptive network, a network of nodes and directional links. Associated with the network is a learning rule - for example back propagation algorithm. It s called adaptive because some, or all, of the nodes have parameters which affect the output of the node. These networks are learning a relationship between inputs and outputs. This adjustment allows the fuzzy systems to learn from the data they are modeling.the performance of this method is like both ANN and FL (fuzzy-logic). In both ANN and FL (fuzzylogic) case, the input passes through the input layer (by input membership function) and the output could be seen in output layer (by output membership functions). In this type of advanced fuzzy logic, neural network uses a learning algorithm the parameters are changed until they reach the optimal solution. Actually, in this type the FL tries (by using the neural network advantages) to adjust its parameters. As we know, the difference between real and network output in ANN is one of the common method to evaluate its performance. Therefore, ANFIS uses either backpropagation or a combination of least squares estimation and back propagation for membership function parameter estimation (Jang, J.S.R., C.T. Sun, [62]). A fuzzy inference system consist of three components 114
Rules. The if-then rules have to be determined somehow. This is usually done by knowledge acquisition from an expert. It is a time consuming process that is fraught with problems. Membership functions. A fuzzy set is fully determined by its membership function. This has to be determined. If it s Gaussian then what are the parameters? The reasoning mechanism to carry out inference procedure on the rules and given fact 9.2 Development of ANFIS Models An ANFIS-GUI is created to help user to use artificial intelligence (AI) such as ANFIS (Adaptive Network-based Fuzzy Inference System) to predict output. ANFIS can predict data using Sugeno FIS (Fuzzy Inference System) to relate membership and tune it using either back propagation or hybrid method. In the present research work Five input corresponding parameters namely; voltage, current, welding speed, wire feed rate, nozzle to plate distance with their respective three responses; penetration, reinforcement height and weld width were used for the ANFIS training. ANFIS architecture utilizes sugeno- type fuzzy- inference systems and generalized bell-shaped built-in membership function to emulate a given training data set. It employs 92 numbers of nodes, 192 linear parameters,30 nonlinear parameters, total numbers of parameters is 222,training data pairs are 23,checking data pairs are 9 and 32 fizzy rules to predict weld bead geometry. ANFIS modeling process starts by data set input-output data pairs) and dividing it into training, checking and validating data sets. The modelling details together with generating output capabilities of the developed GUI is detailed in next subtopics, namely; Over-fitting detection 115
and optimization, Surface Model, Membership Functions, Rule Viewer and finally the Model Prediction. 9.3 How to Start ANFIS Start MATLAB For non-gui ANFIS, just type ANFIS on the command line of MATLAB. For ANFIS Editor GUI, just type anfisedit on the command line of MATLAB and follow the steps given below 9.3.1 GUI Screenshot i. Load or save a fuzzy Sugeno system, or open a new Sugeno system. ii. Undo. iii. Open or edit a FIS with any of the other GUIs. iv. Plot region. v. Status of the number of inputs, outputs, input membership functions, and output membership functions. vi. After you generate or load a FIS, this button allows you to open a graphical representation of its input/output structure. vii. Test data against the FIS model. The plot appears in the plot region. viii. Train FIS after setting optimization method, error tolerance, and number of epochs. This generates error plots in the plot region. ix. Load FIS or generate FIS from loaded data using your chosen number of MFs and rules or fuzzy. 116
x. Clear Data unloads the data set selected under Type: and clears the plot region. xi. Load training, testing, or checking data from disk or workspace, or load demo data. Data appears in the plot region. xii. Testing data appears on the plot in green as..; Training data appears on the plot in blue as o o; Checking data appears on the plot in blue as ++; FIS output appears on the plot in purple as ** 9.3.2 From GUI (Graphical User Interface) Load data (training, testing, and checking) by selecting appropriate radio buttons in the Load data portion of the GUI and then clicking Load Data. The loaded data is plotted on the plot region. Generate an initial FIS model or load an initial FIS model using the options in the Generate FIS portion of the GUI. View the FIS model structure once an initial FIS has been generated or Loaded by clicking the Structure button. Choose the FIS model parameter optimization method: back propagation or a mixture of back propagation and least squares (hybrid method Choose the number of training epochs and the training error tolerance. Train the FIS model by clicking the Train now button. This training adjusts the membership function parameters and plots the training (and/or checking data) error plot(s) in the plot region. View the FIS model output versus the training, checking, or testing data output by clicking the Test Now button. 117
9.3.3 Checking and training To start training in ANFIS Editor GUI First, you need to have a training data set that contains desired input/output data pairs of the target system to be modelled. Sometimes you also want to have the optional testing data set that can check the generalization capability of the resulting fuzzy inference system, and/or a checking data set that helps with model overfitting during the training. Overfitting is accounted for by testing the FIS trained on the training data against the checking data, and choosing the membership function parameters to be those associated with the minimum checking error if these errors indicate model over fitting. You will have to examine your training error plots fairly closely in order to determine this. Usually these training and checking data sets are collected based on observations of the target system and are then stored in separate files (see Apendix-2). Weld. No V volt Table9.1 the observed values of the responses. I Amp F mm/mi n S mm/mi n C mm Penetration (P) Mm Bead height (H) mm 1 29 400 1600 360 30 2.80 3.26 13.48 2 29 400 1600 600 25 3.16 1.58 14.12 3 29 400 1600 360 30 2.70 3.16 13.68 4 29 400 1600 600 25 3.06 1.48 14.32 5 29 400 3400 360 25 5.11 3.88 15.09 6 29 400 3400 600 30 2.80 3.27 11.09 7 29 400 3400 360 25 5.01 3.78 15.29 8 29 400 3400 600 30 2.70 3.17 11.29 9 29 550 1600 360 25 4.69 3.93 16.49 10 29 550 1600 600 30 4.52 5.43 10.41 11 29 550 1600 360 25 4.59 3.83 16.69 12 29 550 1600 600 30 4.42 5.33 10.61 13 29 550 3400 360 30 4.62 7.45 14.95 Bead width (W)mm 118
14 29 550 3400 600 25 4.61 3.48 13.20 15 29 550 3400 360 30 4.52 7.35 15.15 16 29 550 3400 600 30 4.52 5.43 10.41 17 35 400 1600 360 25 5.50 2.05 17.62 18 35 400 1600 600 30 3.66 3.05 12.32 19 35 400 1600 360 25 5.50 2.05 17.62 20 35 400 1600 600 30 3.56 2.95 12.52 21 35 400 3400 360 30 5.51 3.19 19.81 22 35 400 3400 600 25 5.40 1.95 15.42 23 35 400 3400 360 30 5.41 3.09 20.01 24 35 400 3400 600 25 5.50 2.05 15.22 25 35 550 1600 360 30 8.22 4.64 19.37 26 35 550 1600 600 25 7.49 2.64 16.75 27 35 550 1600 360 30 8.12 4.54 19.57 28 35 550 1600 600 25 7.39 2.54 16.95 29 35 550 3400 360 25 11.48 4.13 23.51 30 35 550 3400 600 30 8.22 4.64 16.97 31 35 550 3400 360 25 11.58 4.23 23.31 32 35 550 3400 600 30 8.12 4.54 17.17 Table 9.2 The observed error by ANFIS modeling. S.NO ERROR PENETRATION ERROR HEIGHT ERRO WIDTH 1 4.16E-07 2.75E-07 1.59E-06 2 1.13E-06 1.36E-06 5.79E-06 3 1.20E-06 5.52E-07 5.62E-06 4 3.27E-07 3.12E-07 1.22E-06 5 5.09E-07 3.91E-07 1.53E-06 6 1.63E-07 1.77E-07 6.76E-07 7 1.66E-07 9.71E-08 6.23E-07 8 2.40E-07 2.90E-07 1.04E-06 9 1.93E-06 1.61E-06 6.93E-06 10 3.00E-07 3.32E-07 1.04E-06 11 3.03E-07 2.60E-07 1.02E-06 12 1.69E-06 2.05E-06 3.89E-06 13 1.91E-07 1.76E-07 6.43E-07 14 4.55E-07 7.62E-07 1.50E-06 15 4.47E-07 3.26E-07 1.29E-06 16 4.20E-07 5.04E-07 8.94E-07 17 2.42E-06 8.70E-07 7.72E-06 18 3.22E-07 2.15E-07 1.18E-06 19 3.25E-07 1.61E-07 1.14E-06 20 1.44E-06 1.21E-06 4.94E-06 21 2.34E-07 1.01E-07 7.39E-07 22 5.69E-07 3.18E-07 2.09E-06 23 5.52E-07 1.89E-07 1.55E-06 24 1.60E-07 1.14E-07 5.49E-07 119
25 2.55E-07 1.43E-07 8.51E-07 26 3.27E-08 2.71E-08 1.10E-07 27 3.29E-08 2.25E-08 1.07E-07 28 1.83E-07 1.88E-07 5.12E-07 29 2.33E-08 1.47E-08 7.57E-08 30 5.96E-08 6.15E-08 2.08E-07 31 5.83E-08 2.94E-08 1.64E-07 32 3.34E-08 3.47E-08 8.08E-08 Fig.9.1 variations in ANFIS responses vs. errors Observations recorded in Table 9.2 and plotted in Fig.9.1, show the variations in the responses viz. penetration, reinforcement height and weld width in terms of error. 9.4 Over all comparisons of different models Table 9.3 Over all error of different modeling S.NO PENETRATION REINFORCE HEIGHT WELD WIDTH MRA ANN ANFIS MRA ANN ANFIS MRA ANN ANFIS 1 1.06 0.139396 4.16E-07 1.316 0.103309 2.75E-07 0.572-0.20991 1.59E-06 2 1.571 0.050606 1.13E-06 2.759 0.055888 1.36E-06 0.547-0.16901 5.79E-06 3 1.06 0.039396 1.20E-06 1.316 0.003309 5.52E-07 0.572-0.00991 5.62E-06 4 1.571-0.04939 3.27E-07 2.759-0.04411 3.12E-07 0.547 0.030986 1.22E-06 120
5-0.964 0.110003 5.09E-07-1.106 0.03477 3.91E-07-0.512-0.09421 1.53E-06 6-1.031-0.09336 1.63E-07-1.331 0.012624 1.77E-07-0.701 0.001539 6.76E-07 7-0.964 0.010003 1.66E-07-1.106-0.06523 9.71E-08-0.512 0.105793 6.23E-07 8-1.031-0.19336 2.40E-07-1.331-0.08738 2.90E-07-0.701 0.201539 1.04E-06 9-0.625 0.14759 1.93E-06-1.091 0.033544 1.61E-06-0.469-0.10693 6.93E-06 10-1.078-0.01898 3.00E-07-0.793-0.03141 3.32E-07-0.747 0.016658 1.04E-06 11-0.625 0.04759 3.03E-07-1.091-0.06646 2.60E-07-0.469 0.093065 1.02E-06 12-1.078-0.11898 1.69E-06-0.793-0.13141 2.05E-06-0.747 0.216658 3.89E-06 13 1.054 0.082191 1.91E-07 0.576 0.061998 1.76E-07 0.52-0.04125 6.43E-07 14 0.61 0.015405 4.55E-07 1.248-0.01149 7.62E-07 0.598-0.0007 1.50E-06 15 1.054-0.01781 4.47E-07 0.576-0.038 3.26E-07 0.52 0.158754 1.29E-06 16 0.684-0.07268 4.20E-07 0.756 0.004111 5.04E-07 0.72-0.05467 8.94E-07 17 0.521 0.043566 2.42E-06 2.102-0.02196 8.70E-07 0.443 0.126012 7.72E-06 18 1.356 0.032283 3.22E-07 1.41 0.046547 2.15E-07 0.626-0.17078 1.18E-06 19 0.521 0.043566 3.25E-07 2.102-0.02196 1.61E-07 0.443 0.126012 1.14E-06 20 1.356-0.06772 1.44E-06 1.41-0.05345 1.21E-06 0.626 0.029218 4.94E-06 21-0.895 0.060112 2.34E-07-1.348 0.049541 1.01E-07-0.39-0.15218 7.39E-07 22-0.533-0.05703 5.69E-07-2.108 0.020258 3.18E-07-0.507-0.01676 2.09E-06 23-0.895-0.03989 5.52E-07-1.348-0.05046 1.89E-07-0.39 0.04782 1.55E-06 24-0.533 0.042971 1.60E-07-2.108 0.120258 1.14E-07-0.507-0.21676 5.49E-07 25-0.355 0.102746 2.55E-07-0.923 0.065292 1.43E-07-0.399-0.1935 8.51E-07 26-0.657 0.08681 3.27E-08-1.63 0.091575 2.71E-08-0.461-0.2195 1.10E-07 27-0.355 0.002746 3.29E-08-0.923-0.03471 2.25E-08-0.399 0.006498 1.07E-07 28-0.657-0.01319 1.83E-07-1.63-0.00843 1.88E-07-0.461-0.0195 5.12E-07 29 0.424-0.0213 2.33E-08 1.011-0.05606 1.47E-08 0.332 0.175574 7.57E-08 30 0.351-0.00465 5.96E-08 0.932 0.005618 6.15E-08 0.458-0.01382 2.08E-07 31 0.424 0.078702 5.83E-08 1.011 0.04394 2.94E-08 0.332-0.02443 1.64E-07 32 0.351-0.10465 3.34E-08 0.932-0.09438 3.47E-08 0.458 0.186183 8.08E-08 Penetration Fig.9.2 comparisons of the errors obtained using the three models MRA, ANN and ANFIS for penetration Reinforcement Height 121
Fig.9.3 comparisons of the errors obtained using the three models MRA, ANN and ANFIS for reinforcement height. Weld Width Fig.9.4 comparisons of the errors obtained using the three models MRA, ANN and ANFIS for weld width 122
9.5 Results Observations recorded in Table 9.3 and the graph plotted in Fig.9.2, Fig.9.3, Fig.9.4 show the comparisons of the errors obtained using the three models MRA, ANN and ANFIS for penetration, reinforcement height and weld width. Results show that ANFIS model developed estimates for the weld bead geometry (penetration, reinforcement height, weld width) give minimum error compare to the ANN and MRA models. The prediction accuracy is better in ANFIS model as compare to ANN and MRA models. 123