11-04-2012, 09:49 AM
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization.pdf (Size: 306.18 KB / Downloads: 82)
Abstract
This paper presents an application of Adaptive Neuro-Fuzzy Inference System
(ANFIS) control for DC motor speed optimized with swarm collective
intelligence. First, the controller is designed according to Fuzzy rules such
that the systems are fundamentally robust. Secondly, an adaptive Neuro-Fuzzy
controller of the DC motor speed is then designed and simulated; the ANFIS
has the advantage of expert knowledge of the Fuzzy inference system and the
learning capability of neural networks. Finally, the ANFIS is optimized by
Swarm Intelligence. Digital simulation results demonstrate that the deigned
ANFIS-Swarm speed controller realize a good dynamic behavior of the DC
motor, a perfect speed tracking with no overshoot, give better performance
and high robustness than those obtained by the ANFIS alone.
Keywords
DC Motor speed control; Neuro-Fuzzy controller; Swarm collective
intelligence; ANFIS controller using PSO.
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization
Boumediene ALLAOUA, Abdellah LAOUFI, Brahim GASBAOUI and Abdessalam ABDERRAHMANI
2
Introduction
In spite of the development of power electronics resources, the direct current machine
became more and more useful. Nowadays their uses isn’t limited in the car applications
(electrics vehicle), in applications of weak power using battery system (motor of toy) or for
the electric traction in the multi-machine systems too.
The speed of DC motor can be adjusted to a great extent as to provide controllability
easy and high performance [1, 2]. The controllers of the speed that are conceived for goal to
control the speed of DC motor to execute one variety of tasks, is of several conventional and
numeric controller types, the controllers can be: PID Controller, Fuzzy Logic Controller; or
the combination between them: Fuzzy-Neural Networks, Fuzzy-Genetic Algorithm, Fuzzy-
Ants Colony, Fuzzy-Swarm.
The Adaptive Neuro-Fuzzy Inference System (ANFIS), developed in the early 90s by
Jang [3], combines the concepts of fuzzy logic and neural networks to form a hybrid
intelligent system that enhances the ability to automatically learn and adapt. Hybrid systems
have been used by researchers for modeling and predictions in various engineering systems.
The basic idea behind these neuro-adaptive learning techniques is to provide a method for the
fuzzy modeling procedure to learn information about a data set, in order to automatically
compute the membership function parameters that best allow the associated FIS to track the
given input/output data. The membership function parameters are tuned using a combination
of least squares estimation and back-propagation algorithm for membership function
parameter estimation. These parameters associated with the membership functions will
change through the learning process similar to that of a neural network. Their adjustment is
facilitated by a gradient vector, which provides a measure of how well the FIS is modeling the
input/output data for a given set of parameters. Once the gradient vector is obtained, any of
several optimization routines could be applied in order to adjust the parameters so as to
reduce error between the actual and desired outputs. This allows the fuzzy system to learn
from the data it is modeling. The approach has the advantage over the pure fuzzy paradigm
that the need for the human operator to tune the system by adjusting the bounds of the
membership functions is removed.
The PSO (particle swarm optimization) algorithm used to get the optimal values and
parameters of our ANFIS is based on a metaphor of social interaction. It searches a space by
Leonardo Electronic Journal of Practices and Technologies
ISSN 1583-1078
Issue 15, July-December 2009
p. 1-18
3
adjusting the trajectories of individual vectors, called ‘particles’, as they are conceptualized as
moving as points in multidimensional space. The individual particles are drawn stochastically
towards the positions of their own previous best performances and the best previous
performance of their neighbors. Since its inception, two notable improvements have been
introduced on the initial PSO which attempt to strike a balance between two conditions. The
first one introduced by Shi and Eberhart [4] uses an extra ‘inertia weight’ term which is used
to scale down the velocity of each particle and this term is typically decreased linearly
throughout a run. The second version introduced by Clerc and Kennedy [5] involves a
‘constriction factor’ in which the entire right side of the formula is weighted by a coefficient.
Their generalized particle swarm model allows an infinite number of ways in which the
balance between exploration and convergence can be controlled. The simplest of these is
called PSO.
This proposes an application of ANFIS-Swarm. PSO algorithms are applied to search
the globally optimal parameters of ANFIS controller. The best range and shapes of member
ships functions obtained with ANFIS are adjusted again using PSO. Simulation results are
given to show the effectiveness of ANFIS-Swarm controller.
Model of DC motor
DC machines are characterized by their versatility. By means of various combinations
of shunt-, series-, and separately-excited field windings they can be designed to display a
wide variety of volt-ampere or speed-torque characteristics for both dynamic and steady-state
operation. Because of the ease with which they can be controlled systems of DC machines
have been frequently used in many applications requiring a wide range of motor speeds and a
precise output motor control [6, 7].
In this paper, the separated excitation DC motor model is chosen according to his
good electrical and mechanical performances more than other DC motor models. The DC
motor is driven by applied voltage. Figure 1 show the equivalent circuit of DC motor with
separate excitation.
The characteristic equations of the DC motor are represented as:
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization
Boumediene ALLAOUA, Abdellah LAOUFI, Brahim GASBAOUI and Abdessalam ABDERRAHMANI
4
ex
ex
ex
ex
ex
ex V .
L
.i 1
L
i R
dt
d
⎟ ⎟⎠
⎞
⎜ ⎜⎝
⎛
+ ⎟
⎟⎠
⎞
⎜ ⎜⎝
⎛
= − (1)
ind
ind
r ex
ind
index
ind
ind
ind
ind V .
L
.w .i 1
L
.i L
L
i R
dt
d
⎟ ⎟⎠
⎞
⎜ ⎜⎝
⎛
+ ⎟
⎟⎠
⎞
⎜ ⎜⎝
⎛ −
+ ⎟
⎟⎠
⎞
⎜ ⎜⎝
⎛
= − (2)
ex ind r
index
r w .
J
fc
J
.i .i Cr
J
w L
dt
d
⎟⎠
⎞
⎜⎝
⎛ −
+ ⎟⎠
⎞
⎜⎝
⎛ −
+ ⎟⎠
⎞
⎜⎝
= ⎛ (3)
Symbols, Designations and Units:
Symbols Designations Units
iexandiend Excitation current and Induced current. [A]
wr Rotational speed of the DC Motor. [Rad/Sec]
VexandVind Excitation voltage and Induced voltage [Volt]
RexandRind Excitation Resistance and Induced Resistance. [Ω]
Lex,Lindand
Lindex
Excitation Inductance Induced Inductance and Mutual
Inductance. [mH]
J Moment of Inertia. [Kg.m2]
Cr Couple resisting. [N.m]
fc Coefficient of Friction. [N.m.Sec/Rad]
From the state equations (1), (2), (3) previous, can construct the model with the
environment MATLAB 7.4 (R2007a) in Simulink version 6.6. The model of the DC motor in
Simulink is shown in Figure 1. The various parameters of the DC motor are shown in Table 1.
Wr
1
Vex
240
1
s
1
s
1
s
1/Lex
Lindex
Rind
Lindex
1/Lex Rex
1/Lind
1/J
1/Lind
fc
Cr
Vind
1
Figure 1. Model of the DC Motor in Simulink
Leonardo Electronic Journal of Practices and Technologies
ISSN 1583-1078
Issue 15, July-December 2009
p. 1-18
5
Table 1. Parameters of the DC Motor
Vex=240[V] Lind=0.012[mH]
Vind=240[V] Lindex=1.8[mH]
Rex=240[Ω] J =1[Kg.m2]
Rind=0.6[Ω] Cr =29.2[N.m]
Adaptive Neuro-Fuzzy MODE Speed Controller
Adaptive Neuro-Fuzzy principle
A typical architecture of an ANFIS is shown in Figure 2, in which a circle indicates a
fixed node, whereas a square indicates an adaptive node. For simplicity, we consider two
inputs x, y and one output z. Among many FIS models, the Sugeno fuzzy model is the most
widely applied one for its high interpretability and computational efficiency, and built-in
optimal and adaptive techniques. For a first order Sugeno fuzzy model, a common rule set
with two fuzzy if–then rules can be expressed as:
Rule 1: if x is A1 and y is B1 , then 1 1 1 1 z = p x + q y + r
Rule 2: if x is A2 and y is B2 , then 2 2 2 2 z = p x + q y + r (4)
where Ai and Bi are the fuzzy sets in the antecedent, and pi, qi and ri are the design parameters
that are determined during the training process. As in Figure 2, the ANFIS consists of five
layers [8]:
Figure 2. Corresponding ANFIS Architecture
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization
Boumediene ALLAOUA, Abdellah LAOUFI, Brahim GASBAOUI and Abdessalam ABDERRAHMANI
6
Layer 1: Every node i in the first layer employ a node function given by:
Oi
1 = μAi(x), i = 1, 2
Oi
1 = μBi=2(y), i = 3, 4
(5)
where μAi and μBi can adopt any fuzzy membership function (MF).
Layer 2: Every node in this layer calculates the firing strength of a rule via multiplication:
O w (x ). ( y), i 1,2 i A i Bi
2
i = = μ μ = (6)
Layer 3: The i-th node in this layer calculates the ratio of the i-th rule’s firing strength to the
sum of ail rules firing strengths:
, i 1, 2
w w
O w w
1 2
i
i
__
3i
=
+
= = (7)
where w i
__ is referred to as the normalized firing strengths.
Layer 4: In this layer, every node i has the following function:
O w z w (p x q y r ) i i i i
__
i i
__
4
i = = + + i = 1, 2 (8)
where w i
__ is the output of layer 3, and { pi, qi, ri} is the parameter set. The parameters in this
layer are referred to as the consequent parameters.
Layer 5: The single node in this layer computes the overall output as the summation of all
incoming signals, which is expressed as:
1 2
1 1 2 2
2
i 1
i i
__
5i
w w
O w z w z w z
+
+
= =Σ=
(9)
The output z in Fig. 3 can be rewritten as [9, 10]:
2
__
2 2
__
2 2
__
1 2
__
1 1
__
1 1
__
1 z = (w x )p + (w y)q + (w )r + (w x )p + (w y)q + (w )r (10)
Adaptive Neuro-Fuzzy controller
The ANFIS controller generates change in the reference voltage Vref, based on speed
error e and derivate in the speed error de defined as:
e = ωref - ω (11)
de = [d(ωref - ω)]/dt (12)
where ωref and ω are the reference and the actual speeds, respectively.
Leonardo Electronic Journal of Practices and Technologies
ISSN 1583-1078
Issue 15, July-December 2009
p. 1-18
7
In this study first order Sugeno type fuzzy inference was used for ANFIS and the
typical fuzzy rule is:
if e is Ai and de is Bi then z = f(e, de) (13)
where Ai and Bi are fuzzy sets in the antecedent and z = f(e, de) is a crisp function in the
consequent.
The significances of ANFIS structure are:
Layer 1: Each adaptive node in this layer generates the membership grades for the input
vectors Ai, i =1,…, 5. In this paper, the node function is a triangular membership function:
⎪ ⎪ ⎪
⎩
⎪ ⎪ ⎪
⎨
⎧
≤
≤ ≤
−
−
≤ ≤
−
−
≤
= μ =
0 , c e
, b e c
c b
c e
, a e b
b a
e a
0, e a
O (e )
i
i i
i i
i
i i
i i
i
i
A
1i
i (14)
Layer 2: The total number of rule is 25 in this layer. Each node output represents the
activation level of a rule:
O w min( (e), (e)) 1 Ai Bi
1i
= = μ μ ,i =1, …, 5 (15)
Layer 3: Fixed node i in this layer calculate the ratio of the i-th rule's activation level to the
total of all activation level:
Σ=
= = n
j 1
j
i
__
3i
w
O w w
(16)
Layer 4: Adaptive node i in this layer calculate the contribution of i-th rule towards the
overall output, with the following node function:
O w z w (p e q de r ) i i i i
__
i i
__
4
i = = + + (17)
Layer 5: The single fixed node in this layer computes the overall output as the summation of
contribution from each rule:
1 2
1 1 2 2
2
i 1
i i
__
5i
w w
O w z w z w z
+
+
= =Σ=
(18)
The parameters to be trained are ai, bi and ci of the premise parameters and pi, qi, and ri
of the consequent parameters. Training algorithm requires a training set defined between
Neuro-Fuzzy DC Motor Speed Control Using Particle Swarm Optimization
Boumediene ALLAOUA, Abdellah LAOUFI, Brahim GASBAOUI and Abdessalam ABDERRAHMANI
8
inputs and output [3]. Although, the input and output pattern set have 150 rows. Figure 3.a
shows optimized membership function for e and de after trained. Figure 3.b shows Surface
plot showing relationship between input and output parameters after trained. Figure 3.c shows
The ANFIS model structure.
Figure 3.a. Membership functions for e and de after trained
0.01
0.02
0.03
0.04
0.05
0.06
0
0.02
0.04
0.06
0.08
0
1000
2000
3000
4000
input2(de) input1(e)
output(u)
Figure 3.b. Surface plot showing relationship between input and output parameters
Leonardo Electronic Journal of Practices and Technologies
ISSN 1583-1078
Issue 15, July-December 2009
p. 1-18
9
Figure 3.c. The ANFIS model structure
The number of epochs was 100 for training. The number of MFs for the input
variables e and de is 5 and 5, respectively. The number of rules is then 25 (5×5 = 25). The
triangular MF is used for two input variables. It is clear from (14) that the triangular MF is
specified by two parameters.
Therefore, the ANFIS used here contains a total of 95 fitting parameters, of which 20
(5×2 + 5×2 = 20) are the premise parameters and 75 (3×25 = 75) are the consequent
parameters.
The training and testing root mean square (RMS) errors obtained from the ANFIS are
4.7×10-6 and 5.3×10-6 respectively.