0% found this document useful (0 votes)
13 views6 pages

ANFIS Control for Brushless DC Motors

This paper presents the implementation and analysis of an Adaptive Neuro-Fuzzy Inference System (ANFIS) for controlling the speed of Brushless DC motors (BLDC). The study compares the performance of ANFIS with traditional PID controllers, highlighting that ANFIS provides smoother control and better responsiveness without overshooting the setpoint. The results indicate that ANFIS is a more effective solution for speed control in BLDC motors, especially under varying operational conditions.

Uploaded by

Ossama Ammari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

ANFIS Control for Brushless DC Motors

This paper presents the implementation and analysis of an Adaptive Neuro-Fuzzy Inference System (ANFIS) for controlling the speed of Brushless DC motors (BLDC). The study compares the performance of ANFIS with traditional PID controllers, highlighting that ANFIS provides smoother control and better responsiveness without overshooting the setpoint. The results indicate that ANFIS is a more effective solution for speed control in BLDC motors, especially under varying operational conditions.

Uploaded by

Ossama Ammari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Implementaion and analysis of Adaptive Neural

Fuzzy Inference System based Bruchless DC motor


BAZ Rachida EL MAJDOUB Khalid GIRI Fouad AMMARI Ossama
Dept. Electric Engineering Dept. Electric Engineering Normandie University Dept. Electric Engineering
University Hassan II University Hassan II UNICAEN University Hassan II
Faculty of Science and Faculty of Science and 1400 Caen, France Faculty of Science and
Technology Technology [Link]@[Link] Technology
Mohammedia, Morocco Mohammedia, Morocco Mohammedia, Morocco
[Link]@[Link] khalid_majdoub@[Link] tttttttttttttttttttttttttttttttttttttttttttttttt [Link]@[Link]
ttttt
Abstract—This paper aims to model the brushless DC motor quickly to necessary speed changes on speed variations. Motor
(BLDC) and design the adaptive neuro-fuzzy controller (ANFIS) speed control involves setting the speed to the desired value to
to provide speed control of the brushless DC motor (BLDC). complete a defined run. The objective of the motor control is to
The method applied in this work is first to simulate the PID reduce the error between the desired speed and the measured
controller (proportional, integral, and derivative) and then design
speed. To control the motor, several controllers are available,
the neuro-fuzzy adaptive controller using the ANFIS toolkit for
the BLDC motor. According to the simulation carried out on including standard methods such as PID, PI, and soft computing
Matlab/Simulink, the response of the PID-controlled system does methods such as Fuzzy Logic, and ANFIS controllers[3].
not reach the required performance whereas the ANFIS controller It is difficult to achieve the ideal state under actual field
allows for appropriate control parameters and more production conditions due to the inadequate resilience of the
straightforward calculations. Indeed, the PID involves significant PID controller setting. The non-linear nature of the load and the
oscillations and an overshoot of the setpoint. Contrary to the changing specifications of the machine at different speeds can
ANFIS controller, which smoothly follows the setpoint without hamper the performance of the fixed controller, necessitating
overshooting. the use of an adaptive controller [4].
Therefore, the ANFIS-based intelligent controller gives more
ANFIS (Adaptive neural fuzzy inference system) controller is
relevant results than conventional controllers.
Keywords—BLDC motor, PID controller, Fuzzy logic, ANFIS adopted in this paper, it is a trained rule-based system that is
controller. faster responding, more stable, and has a lower steady-state
error. It is possible to achieve greater responsiveness of the
I. INTRODUCTION system than with a fuzzy logic controller [5]. Once the ANFIS
Conventional motors such as brushed DC motors and single- model is trained, it can be used to control the engine in real-
and three-phase induction motors have several drawbacks so time. The ANFIS algorithm can be used to calculate the control
attention is increasingly paid to alternative motors such as the signals that need to be sent to the motor to achieve the desired
brushless DC motor. speed or position.
The BLDC motor is a brushless DC motor, in which the To identify Brushless DC motors, in [6], it has been introduced
permanent magnet provides the necessary air gap flux instead an intelligent agent-based ANFIS controller. It did, however,
of the wire field poles. It is widely used in aerospace, spacecraft show a significant overshoot, undershoot, and steady-state
manufacturing, electric car manufacturing, and robotics. The inaccuracy. An ANFIS-based speed controller was presented in
BLDC synchronous motor usually consists of a permanent [7], however, it had a significant steady-state inaccuracy. A
magnet and a trapezoidal waveform of the counter- fuzzy neural network was created by [8] for a speed controller,
electromotive force. The advantages of this motor are its low however, it struggled with ambiguity. Because of the improved
weight, small volume, high efficiency, low inertia, and high performance of the Brushless DC motor, this study intends to
control accuracy. The majority of automated systems use create better controllers.
BLDC motors because of their fast response and stability. Due This paper is structured as follows. The design of the BLDC
to the absence of brushes, the BLDC motor has higher motor model is presented in the first section. Then, in section
efficiency, lower losses, less sparking, fast response, and no II, the speed controllers for the BLDC motor, namely the PID
noise. These advantages make the BLDC an important and ANFIS controllers, are presented. Section III is devoted to
component in the construction of servo mechanisms used in the simulation results. The conclusion of this study is presented
automation [1]. BLDCs are switched electronically rather than in Section IV.
using brushes for commutation [2].
II. MODELING OF BRUSHLESS DC MOTOR
The main objective of this study is to make the motor’s model
and the controller work reliably and to improve its performance. A. Design of BLDC
This can be achieved by using engineering principles to control BLDC motor used in this study stands for Brushless DC Motor,
the whole process. The BLDC control is developed to react which is a permanent magnet synchronous motor with

979-8-3503-9836-6/23/$31.00 ©2023 IEEE


trapezoidal EMF (electromagnetic field). The position of the , , : the phases back EMF,
rotor is detected by Hall effect sensors, which are used to : The stator resistance,
electronically switch. The three-phase BLDC motor has more : The inductance,
significant performance advantages over traditional motors, : The mutual inductance,
including high efficiency, high torque/speed, torque under jr: Rotor inertia,
mechanical shock, low maintenance requirements, dynamic Kf: Friction constant,
responsiveness, long operational life, high rated speed, no T: Load torque,
sparking, noise sensitivity, and low cost. The motor's number of ꞷ: The rotor speed.
poles is equal to the sum of the magnetic components. A
trapezoidal electromagnetic field is applied to the stator to B. Modeling of Trapezoidal EMF
distribute the phase windings [9]. Fig. 1 represents The Phase-
to-Phase back EMF and fig 2 depicts the equivalent circuit of EMF generation is significantly influenced by the rotor position.
the BLDC motor. The speed of the machine determines the location of the rotor,
which in turn determines how much EMF the machine
BEMFab BEMFbc BEMFca generates.
100

$ (&)
= " #$ (&)( , " = )
101 110

$ (&)
(4)
S

N : the back-EMF constant,

) : the angular velocity of the rotor rotation,


p: the number of pole pairs ,
001

&: the position of the rotor;


010

The trapezoidal waveform of the back-EMF is given by $ (&) ,


110

and the functions are dephased by , $ (&) which is a function


+,
0 60 120 180 240 300 360 b
-
a

(0 < & ≤ )
Fig. 1: Phase to Phase back EMF of BLDC motor.
3 ,
of phase a and may be expressed as follows in one period:
⎧ , 3
R L

⎪ 1 ( <&≤ )
+ ea
, 7,
a -

⎪ 3 3
L

−9 :& + 6 ( < & ≤ )


R

$ (&) =
3 7, <,
b + eb - N

⎨ , 3 3
(5)
⎪−1 ( <&≤ )
L
<, ==,
R
c + ec -

⎪ 3
3 3

⎩ 9,: & − 12 ( 3 < & ≤ 2? )


==,
Fig. 2: Equivalent circuit of BLDC motor.
A three-phase BLDC motor simultaneously generates a three-
The design of the BLDC motor was based on a few assumptions, phase voltage for a power converter of full bridge construction
namely constant inductances, the constant losses are negligible, using six electronic commutators (power transistors) as
and uniform resistances throughout all phases. the losses in presented in fig. 3. The switching pattern is determined by the
power electronic devices are zero, and the magnitudes of the rotor position of the transistors. The decoder block relies on data
three phases' EMFs are identical. from the Hall sensors to provide the sign of the reference current
signal vector for the back EMF. Either the current is switched in
Equation (1) represents the matrix equations for the three-phase the other direction or the controller's switching order is changed
voltages of the BLDC motor [10]. to operate the motor in the reverse direction. Table I lists the
The electromagnetic and mechanical torque equations are decoder order.
illustrated in Equations 2 and 3.

0 0
TABLE I: THE SEQUENCE OF HALL EFFECT AND INVERTER SIGNALS

= 0 0 + +
Electrical PHASE

0 0
(1) Degree
H1 H2 H3 S1 S2 S3 S4 S5 S6
A B C

=
⋅ ⋅ ⋅
0-60 0 1 0 0 + - 0 1 1 0 0 0

= + +
(2) 60-120 0 0 1 - 0 + 0 0 0 1 1 0

!
120-180 0 1 1 - + 0 0 1 0 0 1 0
(3)
180-240 1 0 1 0 - + 1 0 0 1 0 0
Where: 240-300 1 1 0 + 0 - 0 0 1 0 0 1
, , : three-phase voltages, 300-360 1 0 0 + - 0 1 0 0 0 0 1
, , : three-phase currents,
is composed of five interconnected network layers, and includes
four key components: fuzzification, knowledge base, neural
T T2 T3 network, and defuzzification. The fuzzy system in ANFIS has
49 rules and is structured with two inputs (x and y) and one
A
output (z). These inputs are defined as the error input (x) and the
Vcc V1 B
V2 C ratio of error variations (y). The rule base in ANFIS contains
V3
T T5 T6 fuzzy if-then rules of the Takagi and Sugeno type 2, which are
used to make inferences [14].

Fig. 3: Bridge driver circuit


A novel control method that performs convergence and
divergence among numerical units is the artificial neural
III. CONTROLLERS FOR BRUSHLESS DC MOTOR network. Fuzzy and neural network techniques were combined
The control circuit of a BLDC motor is essential to obtain high to create a cutting-edge approach that incorporated the best
performance and better results. Fig. 4 illustrates the control aspects of both approaches and significantly improved nonlinear
diagram of the brushless DC motor. mapping, modeling, learning, and pattern realization [15].

Desired The data was generated and fed into the neuro-fuzzy designer
AC
speed e BLDC during the evaluation of the behavior of the motor. FIS was
Controlle
DC Motor developed using a grid-based partition, and its two inputs are
ERROR and error rate of change. The optimization technique
Measured speed
used to train the FIS data was the hybrid method with zero error
tolerance and epoch 100. In this approach, 131 nodes were used
Fig. 4: Control diagram of the brushless DC motor
to implement the ANFIS, and a total of 49 linear and 28 non-
A. PID controller : linear parameters were used. then, the 49 fuzzy rules were
Proportional, Integral, and Derivative, or PID, refers to the three verified and the input rules were corrected to obtain the best
operations it carries out. A PID controller is a feedback control result. Based on the above factors, The structure of five layers
system that maps the difference between a value that is observed ANFIS is shown in Fig. 5.
and one that is wanted which repensents the error, in order to Layer 4
Input- Layer 1 Layer 2 Layer 3 Layer 5
apply corrective action to the process. the PID controller's Layer
e[
transfer function is showing by the following equation. Fig.5
A1
dipicts the controller’s diagram [11]. To tune the PID controller
\
^^^^_
………

,several methods exist as Robust Auto tune (RAT), Ziegler– W1

\
^^^^_ `V
e
@(A) = B + D + F A
C
Nichols (Z-N) or by trail and error [12]. Ⅱ N
E
(6)
….……..

……….
Aj ………..
Where : ∑
c V `V
a = b\
B1

^\
^^^] `V
Kp :the proportional gain,

[
………

Ki is the integral gain,


\]
^^^
Ⅱ N
Kd is the derivative gain. Wi
e [
UV
Integral I Bj

W
Fig. 6: The structure of five layers ANFIS

Z(W)
Plant
UX
R(S)
Layer 1 : The node function for each adaptive node in this layer,
Proportional P node is provided as follows:
UY W =, = GH ( ) $IJ = 1,2, … (5)

=, = GL ( ) $IJ = 1,2, …
Where H (or L ) is a linguistic label connected to this node, and
Derivative D

Fig. 5: The controller’s diagram


(or ) is the input node . The input variables are typically
B. ANFIS Controller distributed using the Gaussian membership function. Equation
The Adaptive Neuro-Fuzzy Inference System, or ANFIS, is a (6) defines the Gaussian membership function as:
Q(RQ )S
$(M; O, P) = STS
type of artificial intelligence algorithm that combines elements
of neural networks and fuzzy logic. It is primarily used for (6)
prediction and control tasks [13]. The ANFIS control structure
The width and center of the membership function, respectively, membership functions in this layer. Rule layer is the third layer.
are represented by c and σ. In the course of learning, these In this layer, the AND operator connects the input and output.
factors are adjusted. The output membership function layer is known as layer 4. The
distribution of the output in this layer follows a linear function
Layer 2: Each node in this layer is a fixed mode with Π, and its of the inputs. Output layer is referred to as layer 5. This layer
output is the sum of all received signal. As depicted in equation uses the weighted average approach to transform fuzzy input
7, this layer's output node formula is : into crisp value by calculating the weighted average of the layer

= d = GH ( )GL ( ) $IJ = 1,2, …


above it.
+
+, (7) The fundamental fuzzy motor system is constructed using sub-
clusters. Then, a hybrid fuzzy system was trained to identify the
The firing strength of a rule is indicated by each node output. fuzzy system employing a variety of laws, other functions, and
movable parameters. Network offline is trained using the
Layer 3: This layer has just fixed nodes with the label N on each simulation toolbox to train the ANFIS controller.
one. The ith node figures out what the firing strength of the ith
IV. SIMULATION
rule is in relation to the total firing strength of all rules.
According to (8)'s node equation for this layer, The Matlab/Simulink model for the investigated BLDC motor is

c =
illustrated in Fig. 4, Table 2 lists the model's parameters.
=e
fD
-, hS
According to the simulation, we shall assess the examined
∑Dij fD
(8)
controller’s effectiveness.

TABLE II: PARAMETERS OF THE MOTOR AND THE PID CONTROLLER


Layer 4 : Each node in this layer is an adaptive node, and
equation 9 specifies the function : Motor parameters

^^^l $ = e
=e ^^^l (m +n +J)
R Stator resistance 0.2 Ω
k, (9) L Inductance 0.85 mH

Where, e c is a normalized firing strength of layer 3 and (m , n ,


jr Rotor inertia 1kgm2

J i) is the parametrical set of this node. The settings of this layer


p Number of pole pairs 4
PID Parameters
Kp=56.554 Ki=6.983 Kd=0.6229
are called consequential settings. Throughout the learning
process, these settings are adjusted.
The simulation was run in a condition of no load applied to the
Layer 5 : The one node in this layer computes the total output BLDC motor then a load of 5N.m is applied. Fig. 8 and fig. 10
as the sum of all incoming signals. It is a fixed node with the show the variation of the speed motor during the simulation.
label ‘⅀’ In equation (10), it is shown as follows: Fig. 9 and fig. 11 illustrate the back EMF of the BLDC motor
hS
= ∑ p= ^^^
el $ =
oS ∑Dij fD D
in both cases.
7, hS
∑Dij fD
(10) The simulation performed on Matlab/SIMULINK details the
outcomes of a comparison between an ANFIS (Adaptive Neuro-
Fuzzy Inference System) controller and a traditional PID
The implemented ANFIS controller is shown in Fig.7. controller in a particular application.
The settling time for each controller, or the amount of time it
takes for the system to return to a stable condition following a
perturbation, is depicted in Fig.8 and Fig. 9. Compared to the
ANFIS controller, the typical PID controller requires more time
to attain settling time. The ANFIS controller settles in less than
0.01 seconds, compared to the PID controller's settling time of
0.0138 seconds.
Another significant indicator of controller function is the
proportion of overshoot. The ANFIS controller has an overshoot
of less than 2%, but the PID controller has a considerable
overshoot of 44.9%.
Finally, Fig. 9 and Fig. 11 depict the back EMF's (electromotive
force) behavior over time in phase ea. According to the graph,
Fig. 7: The implemented ANFIS controller on Matlab the back EMF first shows only a little variance before becoming
to resemble a trapezoid. This observation might be important for
These five layers make up the structure. The input layer, Layer comprehending how the system being controlled behaves and
1, is where the two inputs, speed error and rate of change of might help the controller perform better.
error, are received. The fuzzy membership function layer is the
second layer. Each input distributed using seven gaussian
2500

2000

1500
Speed(rpm)

1000

500

0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
Fig. 11: Stator back EMF ea with laod of 5Nm
Time(seconds)
Fig. 8: Motor Speed (No load)
Fig.13 shows the variation of the back EMF by increasing
the speed, the back EMF changes its value to 146V due to the
100
rising speed from 1500 rpm to 2000rpm.
Therefore, the overall result show that ANFIS controller is
better than PID.
50
Stator Back EMF(V)

-50

-100
-
-150
-
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Fig. 12: Motor speed (from 1500 to 2000 rpm)
Time(seconds)
Fig. 9: Stator back EMF ea(No load)

Fig. 10: Motor speed with load of 5Nm

Fig. 13: Stator back EMF ea (speed from 1500 rpm to 2000 rpm)
For the second stage of the simulation, the controllers were
tested on the condition of changing the speed from 1500 to 2000 V. CONCLUSION
rpm in 5s. The PID controller has an overshoot of up to 45% In this article, a speed controller was investigated for the
and large oscillations, the speed provided by the ANFIS brushless DC motor by means of PID (Proportional, Integral,
controller has an overshoot of about 1%, and it follows the and derivative) controller and Adaptive fuzzy inference system
desired speed smoothly as it is shown in fig 12. ANFIS. a comparison between the conventional PID controller
and the ANFIS controller was implemented for the BLDC
motor on MATLAB/SIMULINK. The simulation demonstrates Systems, Jeju Island, South Korea: IEEE, août 2009, p. 367‑372. doi:
10.1109/FUZZY.2009.5277194.
that the ANFIS controller is more performant than the PID
[15] I. F. Davoudkhani et M. Akbari, « Adaptive speed control of brushless
without load or with load, in addition to that, the intelligent DC (BLDC) motor based on interval type-2 fuzzy logic », in 2016 24th
controller proves its efficiency in different speed. the main Iranian Conference on Electrical Engineering (ICEE), Shiraz, Iran:
advantages of The ANFIS are its high computing efficiency and IEEE, mai 2016, p. 1119‑1124. doi: 10.1109/IranianCEE.2016.7585689.
compatibility with linear, optimization, and adaptive
approaches. the made controls Utilizing some interface cards
like the dSPACE, data gathering cards, and maybe easy to use
in real-time applications, the technique is not only
straightforward but also robust.
REFERENCES
[1] H. Maghfiroh, M. Ahmad, A. Ramelan, et F. Adriyanto, « Fuzzy-PID in
BLDC Motor Speed Control Using MATLAB/Simulink », Journal of
Robotics and Control, vol. 3, no 1, p. 8‑13, juin 2021, doi:
10.18196/jrc.v3i1.10964.
[2] O. Ammari, K. E. Majdoub, R. Baz, et A. Taouni, « Longitudinal
modelling of Electric Vehicle driven by a BLDC In-Wheel Motor based
on Pacejka tire model », in 2021 International Conference on Electrical,
Communication, and Computer Engineering (ICECCE), Kuala Lumpur,
Malaysia: IEEE, juin 2021, p. 1‑6. doi:
10.1109/ICECCE52056.2021.9514238.
[3] M. Schwenzer, M. Ay, T. Bergs, et D. Abel, « Review on model
predictive control: an engineering perspective », Int J Adv Manuf
Technol, vol. 117, no 5, p. 1327‑1349, nov. 2021, doi: 10.1007/s00170-
021-07682-3.
[4] « Metaheuristic algorithms for PID controller parameters tuning: review,
approaches and open problems | Elsevier Enhanced Reader ». doi:
10.1016/[Link]. 2022.e09399.
[5] M. N. M. Salleh, N. Talpur, et K. Hussain, « Adaptive Neuro-Fuzzy
Inference System: Overview, Strengths, Limitations, and Solutions », in
Data Mining and Big Data, Y. Tan, H. Takagi, et Y. Shi, Éd., in Lecture
Notes in Computer Science, vol. 10387. Cham: Springer International
Publishing, 2017, p. 527‑535. doi: 10.1007/978-3-319-61845-6_52.
[6] M. R. Faieghi et S. M. Azimi, « Design an Optimized PID Controller for
Brushless DC Motor by Using PSO and Based on NARMAX Identified
Model with ANFIS », in 2010 12th International Conference on
Computer Modelling and Simulation, Cambridge, United Kingdom:
IEEE, 2010, p. 16‑21. doi: 10.1109/UKSIM.2010.12.
[7] Varatharaju, « Adaptive Controllers for Permanent Magnet Brushless DC
Motor Drive System using Adaptive-Network-based Fuzzy Interference
System », American Journal of Applied Sciences, vol. 8, no 8, p. 810‑815,
août 2011, doi: 10.3844/ajassp.2011.810.815.
[8] G. Deying et Z. Jinquan, « Speed control of BLDCM based on
compensated fuzzy neural network », in The 26th Chinese Control and
Decision Conference (2014 CCDC), Changsha, China: IEEE, mai 2014,
p. 4541‑4544. doi: 10.1109/CCDC.2014.6852982.
[9] R. Baz, K. E. Majdoub, F. Giri, et A. Taouni, « Self-tuning fuzzy PID
speed controller for quarter electric vehicle driven by In-wheel BLDC
motor and Pacejka’s tire model », IFAC-PapersOnLine, vol. 55, no 12, p.
598‑603, 2022, doi: 10.1016/[Link].2022.07.377.
[10] O. Ammari, E. M. Khalid, et F. Giri, « Modeling and control of a half
electric vehicle including an inverter, an in-wheel BLDC motor and
Pacejka’s tire model », IFAC-PapersOnLine, vol. 55, p. 604‑609, janv.
2022, doi: 10.1016/[Link].2022.07.378.
[11] C. B. Kadu et C. Y. Patil, « Design and Implementation of Stable PID
Controller for Interacting Level Control System », Procedia Computer
Science, vol. 79, p. 737‑746, 2016, doi: 10.1016/[Link].2016.03.097.
[12] F. Salih Mahdi Alkhafaji, W. Zuha Wan Hasan, N. Sulaiman, et M.
Mohd. Isa, « A Novel PID Robotic for Speed Controller Using
Optimization Based Tune Technique », in Computational Optimization
Techniques and Applications, M. Sarfraz et S. Ariffin Abdul Karim, Éd.,
IntechOpen, 2021. doi: 10.5772/intechopen.95892.
[13] M. Mashrei et A. M. Mahdi, « An Adaptive Neuro-Fuzzy Inference
Model to Predict Punching Shear Strength of Flat Concrete Slabs »,
Applied Sciences, vol. 9, p. 809, févr. 2019, doi: 10.3390/app9040809.
[14] W. L. Tung et C. Quek, « A mamdani-takagi-sugeno based linguistic
neural-fuzzy inference system for improved interpretability-accuracy
representation », in 2009 IEEE International Conference on Fuzzy

You might also like