See discussions, stats, and author profiles for this publication at: [Link]
net/publication/311917783
Training ANFIS Using Genetic Algorithm for Dynamic Systems Identification
Article in International Journal of Intelligent Systems and Applications in Engineering · December 2016
DOI: 10.18201/ijisae.266053
CITATIONS READS
42 1,544
2 authors:
Bulent Haznedar Adem Kalinli
Gaziantep University Middle East Technical University
35 PUBLICATIONS 266 CITATIONS 49 PUBLICATIONS 1,045 CITATIONS
SEE PROFILE SEE PROFILE
All content following this page was uploaded by Bulent Haznedar on 14 March 2017.
The user has requested enhancement of the downloaded file.
International Journal of
Intelligent Systems and
Applications in Engineering Advanced Technology and Science
ISSN:2147-67992147-6799 [Link]/IJISAE Original Research Paper
Training ANFIS Using Genetic Algorithm for Dynamic Systems
Identification
Bulent Haznedar*1, Adem Kalinli2
Accepted 3rd September 2016OI
Abstract: In this study, the premise and consequent parameters of ANFIS are optimized using Genetic Algorithm (GA) based on a
population algorithm. The proposed approach is applied to the nonlinear dynamic system identification problem. The simulation results
of the method are compared with the Backpropagation (BP) algorithm and the results of other methods that are available in the literature.
With this study it was observed that the optimisation of ANFIS parameters using GA is more successful than the other methods.
Keywords: Neuro-Fuzzy, ANFIS, Genetic Algorithm, System Identification.
system and the results are compared with different methods. In
1. Introduction the following section, the basic structure of ANFIS is introduced,
in the third section, information about genetic algorithm is given,
System identification is a model generating process that is in the fourth section, information about the presented approach is
developed to predict the behaviour of a system between its input given and the obtained results are given in the section 5.
and output signals. The approaches based on the fuzzy neural
networks and artificial neural networks are among the methods
2. Adaptive Neuro-Fuzzy Inference System
that are used commonly for the dynamic systems identification.
(ANFIS)
However, due to some of its superior features, studies towards
using ANFIS for the purpose of dynamic system identification, Adaptive Network-based Fuzzy Inference System (ANFIS) is a
have started to increase gradually in the recent years [1-5]. network model which Sugeno-type fuzzy system is combined
with neural learning ability. The main aim of ANFIS is to
Training the ANFIS model is basically the determination process optimize the parameters of the equivalent fuzzy logic system by
of the optimal values for the model’s premise and consequent using input-output data sets via a learning algorithm. Parameter
parameters. Derivative-based algorithms are commonly used for optimization is carried out in such a way that the error value
training of ANFIS. But there is a problem of getting stuck in a between the actual output and the target output to be minimum.
local minimum in derivative-based algorithms. In this context,
various methods have been proposed in recent years in order to ANFIS contains two parameters as antecedent and consequent
train ANFIS parameters. Some of these methods are artificial parameters. Those two parameter types connect the fuzzy rules to
intelligence optimization algorithms and heuristic algorithms each other and training of the model is provided with the
such as Genetic algorithm, PSO and Differential Evolution optimization of these parameters. ANFIS basically consists of
Algorithm that are not derivative-based [6]. five layers. A basic ANFIS structure consisting of two inputs and
one output is given in (Figure.1).
Ghomsheh et al. [3] proposed Particle Swarm Optimization
(PSO) algorithm that is modified for the optimization of ANFIS
parameters. Carrano et al. [7] used GA for the training of ANFIS
in the solution of multi-objective optimization problems. Cus et
al. [8] used Ant Colony Optimization (ACO) algorithm for
training of ANFIS parameters. They tried the performance
analysis of the developed method on the non-linear systems.
In this study, an approach is presented towards the training
ANFIS by using GA based on a population algorithm. The
performance of the presented approach is tested on non-linear Figure 1. A basic structure of ANFIS [9]
_______________________________________________________________________________________________________________________________________________________________
1
Hasan Kalyoncu University, Department of Computer Engineering, A. Layer 1
Gaziantep, Turkey.
2
Erciyes University, Department of Computer Engineering, Kayseri, This layer is named as the fuzzification layer. The signal that is
Turkey.
obtained from each node is transfered to the other layer. In this
* Corresponding Author: Email: [Link]@[Link]
Note: This paper has been presented at the 3 rd International Conference layer, for the outputs of the cells, ( O1i ), Equation (1) and
on Advanced Technology & Sciences (ICAT'16) held in Konya (Turkey), Equation (2) are given [10].
September 01-03, 2016.
This journal is © Advanced Technology & Science 2013 IJISAE, 2016, 4(Special Issue), 44–47 | 44
O1i Ai ( x) i 1,2 (1) an acceptable compliance value or until meeting the criteria such
as pre-determined processing time or generation number. Basic
steps of the Genetic Algorithm are given in (Figure.2).
O1i Bi 2 ( x ) i 3,4 (2)
In here, Ai and B i are any membership functions belong to the 1. Generate random population of n chromosomes
inputs, Ai and B i are membership degrees that are calculated 2. Evaluate the fitness of each chromosome
3. Create a new population by repeating following steps
for this function. For the bell-shaped membership function Ai is
until the new population is complete
calculated with the equation below.
(i) Select two parent chromosomes from a
1 xc 2 population according to their fitness
( )
Ai e 2 a (ii) With a crossover probability cross over the
i 1,2 (3) parents to form new offspring
(iii) With a mutation probability mutate new
In here, a i and c i are sigma and central parameters of the offspring at each locus
membership function respectively. (iv) Place new offspring in the new population
4. Use new generated population for a further run of the
B. Layer 2 algorithm
5. If the end condition is satisfied, stop, and return the best
This layer is named as the rule layer. Each rule’s firing strength is solution in current population
calculated with the membership degrees that are coming from the 6. Go to step 2
previous layer.
O2i wi Ai ( x).Bi ( y ) i 1,2 (4) Figure 2. Main steps of the basic GA algorithm [12]
C. Layer 3 4. Training ANFIS Using GA
In this layer which is named as the normalisation layer, each In this section, GA usage for updating ANFIS parameters is
rule’s normalised firing strength is calculated. explained. ANFIS has two parameter types that have to be
updated. These are premise parameters and consequent
wi parameters. Premise parameters belong to the gauss membership
O3i wi i 1,2 (5)
w1 w2 function that is given as {𝑎𝑖 , 𝑐𝑖 } in Equation (3). The total number
of the premise parameters is equal to the sum of the parameters in
all membership functions. Consequent parameters are the ones
D. Layer 4
that are used in defuzzification layer, shown in Equation (6) as
This layer is the defuzzification layer. Output value for each rule {𝑝𝑖 , 𝑞𝑖 , 𝑟𝑖 }.
is calculated using the value of firing strength from previous
layer. The method that is suggested in this study is applied to the
dynamic system identification problem. For the error value
O4i wi . f i wi .( pi x qi y ri ) i 1,2 (6)
between the output obtained from ANFIS and the output obtained
from non-linear dynamic system to be minimum, ANFIS
E. Layer 5 parameters are optimized with GA. Block diagram showing this
structure is given in (Figure.3). RMSE error function which is
This is the sum layer. ANFIS’s output is obtained by collecting
obtained by using Equation (8), is used for determining the error
the output values belong to the each rule that are obtained in
value of the solution. 𝑦̅𝑖 is used in Equation (8), is showing the
defuzzification layer.
output obtained by ANFIS at the time i and 𝑦𝑖 is showing the
O5i f wi . f i
w .f i i
i 1,2 (7) actual output of the system. N is showing the instance number
w i
used in the application.
[∑𝑁 ̅̅̅)
𝑖=1(𝑦𝑖 −𝑦 𝑖 ]
3. Genetic Algorithm (GA) 𝑅𝑀𝑆𝐸 = √ (8)
𝑁
Genetic Algorithm (GA) which its fundamental principles are set
The selection of the input array which will be used in training is
forth by John Holland in 1970’s, is implemented with success on
important on the success of training. The elements of the input
many problem types [11]. GA is a heuristic algorithm which is
array are usually chosen from sinusoidal and random input values
used for being able to find exact or approximate results in
[13]. In the carried out simulation studies within this study, u(k)
optimization or search problem. This algorithm is developed by
input signal array which has proper distribution, randomly
being inspired from the techniques in the evolutionary biology
generated in the range of [−2,2] is used.
such as inheritance, mutation, selection and crossover. GA can be
implemented quite effortlessly even on the multidimensional
problems with large-size search space and also with too many
number of variables.
GA is a population based optimization algorithm. Equivalent of
the candidate solutions that generate the population is
chromosomes. Due to the various evolution processes, these
chromosomes transform into the solution candidates that
represent better results. This process is maintained until reaching
IJISAE, 2016, 4(Special Issue), 44–47 |
algorithm is found as 0.0032 and 0.0022 respectively. The low
standard deviations show that RMSE values are close to each
other, so it means that the results are reliable. The system that
belongs one of the attempts towards training ANFIS with GA and
the answers of ANFIS model are given in (Figure.4).
Table 1. Comparison of the results
Model Train (𝑹𝑴𝑺𝑬𝑨𝑽𝑮) Test (𝑹𝑴𝑺𝑬𝑨𝑽𝑮)
Elman – BP [15] - 2.6182E-01
Figure 3. Block diagram showed the proposed method
Elman – TS [15] - 1.1990E-01
5. Simulation Results Elman – SA [15] - 2.9430E-02
In this section, Applications have been performed by using non-
Elman – PTS[16] - 2.83189E-02
linear dynamic system for the training ANFIS with GA. In order
to measure the performance of the system 250 input and output ANFIS - BP 7.99112E-03 9.60747E-03
data sets are generated. 200 of these data sets are used for
training, the remaining 50 are used for the test. ANFIS – GA 8.69121E-03 8.32214E-03
For the dynamic system, that is going to be modelled, ANFIS
structure that consists of 3 inputs and 1 output is created
respectively. For each of the input of created ANFIS structure,
gauss membership function with 2 parameters is used. Therefore
there are 2𝑛 rules in the used ANFIS model [14]. In this way,
ANFIS structure consisting 12 premise parameters and 32
consequent parameters with 8 rules is used for the system.
In the study, many attempts have been made in order to decide
upon the various parameter values that are required for GA. As a
consequence of these attempts, population size is chosen as 200,
crossover rate is chosen as 0.8 and mutation rate is chosen as
0.01.
Figure 4. Response of the system (RMSE error= 5.33145E-03)
Besides, the performance of the suggested approach is also
compared with the results taken from the literature, which belong 6. Conclusions
to the Elman feedback artificial neural network that is commonly
used in the identification of the dynamic systems [15,16]. In the It has been seen that the best training and test error values
considered studies, Kalinli has suggested an approach based on obtained are found with the suggested method. Following the
training Elman network by using Tabu Search Algorithm (TS), studies, finding the admissible RMSE error value shows that the
SA algorithm and Parallel Tabu Search Algorithm (PTS) for the training of ANFIS using GA for identification of non-linear
identification of dynamic systems and achieved more successful systems is quite effective. Besides, the results with the low
results than the traditional BP algorithm [15,16]. deviation value has been obtained within the suggested method.
Having low deviation value shows that RMSE error values
Sample non-linear system which is used for simulation belongs to obtained from trainings started with different initial solutions are
a simple pendulum, swinging through small angle that is taken close to each other which means the results are reliable. Also, by
from [15] and defined with Equation (9). The system’s discrete reason of the fact that Genetic algorithm does not have
time definition is as follows: restrictions as the derivative-based algorithms have and it is
easily applicable on the problems, it is assessed that ANFIS
𝑦(𝑘) = 𝐴1 𝑦(𝑘 − 1) + 𝐴2 𝑦(𝑘 − 2) + 𝐴3 𝑦 3 (𝑘 − 2) + model can be used on its applications for different problems.
𝐵1 𝑢(𝑘 − 2) (9)
Where, 𝐴1 = 1.040000, 𝐴2 = −0.824000, Acknowledgements
𝐴3 = 0.130667, 𝐵1 = −0.160000 This work was supported by the Research Fund of Erciyes
University of Turkey, grant number: FDK-2016-6371.
RMSE error values that are obtained following the simulation
studies, and the error values belong to different methods and that
are taken from the literature are given in Table 1. From the results References
that are given on Table 1, it is clearly seen that the performance
[1] D. Karaboga and E. Kaya, “Training ANFIS using artificial
of the approach suggested in this study has quite high success
bee colony algorithm for nonlinear dynamic system
comparing to the other methods. Standard deviation for the
identification,” in: IEEE 22nd Signal Processing and
training and testing processes of the error values that are obtained
Communications Applications Conference (SIU), 2014, pp.
in 15 different attempts towards training ANFIS with genetic
493-496.
IJISAE, 2016, 4(Special Issue), 44–47 This journal is © Advanced Technology & Science 2013
[2] P. Liu, W. Leng and W. Fang, “Training ANFIS model [9] S. Uzundurukan, “Determination and modeling of basic
with an improved quantum-behaved particle swarm parameters that affect the swelling properties of soils,”
optimization algorithm,” Mathematical Prob. in Eng. vol. Ph.D. Thesis, Suleyman Demirel University, Turkey, 2006.
2013, 2013. [10] J.S.R. Jang and C.T. Sun, “Neuro-Fuzzy modeling and
[3] V.S. Ghomsheh, M.A. Shoorehdeli and M. Teshnehlab, control,” The proceedings of the IEEE. vol. 83, no. 3, 378-
“Training ANFIS structure with modified PSO algorithm,” 406, 1995.
In Control and Automation, Med’07. Mediterranean [11] M. Mitchell, “An Introduction to Genetic Algorithms,”
Conference on IEEE, 2007, pp. 1-6. MIT Press, 1998.
[4] M.A. Shoorehdeli, M. Teshnehlab, A.K. Sedigh and M.A. [12] [Link], [Link], P.F.M. Verdonschot, J.-P. Descy and Y.-
Khanesar, “Identification using ANFIS with intelligent S. Park, Modelling Community Structure in Freshwater
hybrid stable learning algorithm approaches and stability Ecosystems. Berlin, Germany: Springer-Verlag, 2005.
analysis of training methods,” Applied Soft Comput. vol. 9, [13] D.E. Rumelhart and J.L. McClelland, “Explorations in the
no. 2, pp. 833–850, 2009. micro-structure of cognition,” parallel distrubuted
[5] M.A. Shoorehdeli, M. Teshnehlab and A.K. Sedigh, processing 1. Cambridge, MA: MIT Press, 1986.
“Training ANFIS as an identifier with intelligent hybrid [14] C.F. Juang, “A TSK-type recurrent fuzzy network for
stable learning algorithm based on particle swarm dynamic systems processing by neural network and genetic
optimization and extended Kalman filter,” Fuzzy Sets and algorithms,” IEEE Transactions on Fuzzy Systems. vol. 10,
Systems. vol. 160, pp. 922–948, 2009. no. 2, pp. 155–170, 2002.
[6] D. Simon, “Training fuzzy systems with the extended [15] A. Kalinli, “Training Elman network using simulated
Kalman Filter,” Fuzzy Sets Syst. vol. 132, pp. 189–199, annealing algorithm,” Journal of the Institute of Science
2002. and Technology of Erciyes University. vol. 19, pp. 28-37,
[7] E.G. Carrano, R.H.C. Takahashi, W.M. Caminhas and 2003.
O.M. Neto, “A genetic algorithm for multiobjective training [16] A. Kalinli and D. Karaboga, “Training recurrent neural
of ANFIS fuzzy networks,” IEEE Congress on networks by using parallel tabu search algorithm based on
Evolutionary Computation, pp. 3259–3265, 2008. crossover operation,” Engineering Applications of Artificial
[8] F. Cus, J. Balic and U. Zuperl, “Hybrid ANFIS-ants system Intell. vol. 17, pp. 529-542, 2004.
based optimisation of turning parameters,” Journal of
Achievements in Materials. vol. 36, no. 1, pp. 79-86, 2009.
IJISAE, 2016, 4(Special Issue), 44–47 |
View publication stats