0% found this document useful (0 votes)
22 views19 pages

Matrix Bode BLDC Motor Control Machines Digital Fuzzy Control

Brushless direct current motor (BLDCM) has been successfully applied to electric vehicles1,2, aerospace3,4, pho- tovoltaic water pumps5, and other industrial and agricultural fields due to its advantages such as good speed regulation performance, high power density, high reliability, and easy control6. Given the broad application of BLDCM, the research on its control problem is of great importance. In the face of the progress and development of science and technology, people’s demand f

Uploaded by

Peter Müller
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)
22 views19 pages

Matrix Bode BLDC Motor Control Machines Digital Fuzzy Control

Brushless direct current motor (BLDCM) has been successfully applied to electric vehicles1,2, aerospace3,4, pho- tovoltaic water pumps5, and other industrial and agricultural fields due to its advantages such as good speed regulation performance, high power density, high reliability, and easy control6. Given the broad application of BLDCM, the research on its control problem is of great importance. In the face of the progress and development of science and technology, people’s demand f

Uploaded by

Peter Müller
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
You are on page 1/ 19

www.nature.

com/scientificreports

OPEN A novel PID controller for BLDCM


speed control using dual fuzzy logic
systems with HSA optimization
1,2
Tingting Wang  , Hongzhi Wang1,2, Chuhang Wang3* & Huangshui Hu2

In order to enhance the speed control performance of the brushless DC motor (BLDCM), a novel
proportion integration differentiation (PID) is proposed in this paper by using dual fuzzy logic systems
(FLSs) with harmony search algorithm (HSA) optimization, which is called DFPID-HSA. Firstly, the
FLS1 in DFPID-HSA locks the three coefficients of the PID controller in an extensive range on the basis
of the system error and error change rate. Then, the FLS2 is optimized by HSA (HSA-F2) to obtain the
precise correction of the three coefficients. To get the optimal global harmony better, the improved
dynamic adjustment mode is used for the pitch adjustment rate (PAR) and distance bandwidth (BW)
in HSA, and the triple selection method is adopted in the composition harmony section to realize the
global search. Finally, DFPID-HSA provides the optimal supply control signal to BLDCM so that it can
control the speed effectively. Moreover, the stability of the system is analyzed by the pole, Lyapunov,
and Nyquist determination methods. And the sensitivity analysis of DFPID-HSA is carried out under
the condition of different motor’s mechanical parameters to check its robustness. In addition, the
superiority of DFPID-HSA is verified by MATLAB simulation and experiment platform.

Brushless direct current motor (BLDCM) has been successfully applied to electric ­vehicles1,2, ­aerospace3,4, pho-
tovoltaic water p ­ umps5, and other industrial and agricultural fields due to its advantages such as good speed
regulation performance, high power density, high reliability, and easy c­ ontrol6. Given the broad application of
BLDCM, the research on its control problem is of great importance. In the face of the progress and development
of science and technology, people’s demand for motor control problems also increases day by day. For decades,
experts and scholars have proposed various intelligent control strategies to obtain better control performance
of ­motors7.
For BLDCM control systems, PID is one of the most classic control strategies. Generally, P (proportional),
I (integral), and D (differential) can be make up many forms. For example, PI, PD, PID have been successfully
implemented in the BLDCM’s speed c­ ontrol8,9. Although the traditional PID structure can be easily implemented
in the control system of the motor, its drawbacks, such as non-deterministic parameters and nonlinear problems,
lead to the system being unable to achieve the optimal control effect. Therefore, many intelligent algorithms
optimized PID controllers are put forward. Gobinath and Mu et al.10,11 adopt neural networks to optimize PID
form controllers. Although the control performance is improved, the neural network training process is online
or offline, with high computational complexity and slow response speed. Dat and Xie et al.12,13 use particle swarm
optimization algorithm to optimize PID structure controllers, and the control performance is improved to a
large extent. Still, it is difficult for the particle swarm algorithm to find the optimal solution through particle or
individual iteration. D ­ emirtas14 proposed the genetic algorithm to optimize the PI controller’s gains, but its initial
population is challenging to determine. However, fuzzy logic control does not require a precise system model,
and only calculations ground on expert knowledge bases. Therefore, optimization methods ground on fuzzy
logic control has better control effects than other algorithms in most c­ ases15,16. For example, He et al.17 proposed
a new fuzzy self-tuning PID optimal controller based on the analysis of the basic working principle of brushless
dc motor. The controller output switches power MOSFET devices by changing the duty ratio of PWM control
signal to realizes the speed control of brushless DC motor. Yin et al.18 designed a fuzzy parameter adaptive PI
control algorithm based on the speed loop of brushless DC motor, which has good control effect and robustness
and can ensure the stable operation of the system under under variable speed conditions.

1
College of Mechatronic Engineering, Changchun University of Technology, Changchun  130012, China. 2College
of Computer Science and Engineering, Changchun University of Technology, Changchun 130012, China. 3College
of Computer Science and Technology, Changchun Normal University, Changchun  130032, China. *email:
[email protected]

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 1

Vol.:(0123456789)
www.nature.com/scientificreports/

The superiority of the fuzzy logic control optimization algorithm is obvious, yet its shortcomings are also
inevitable. The definition of its knowledge rule base is not scientific, so its adjustment of PID parameters still
needs to be optimized. I­ n19, an ANFIS controller with fuzzy PID online supervision is adopted to realize speed
control of BLDCM, which has good performance under various driving conditions. However, it still fluctuates
slightly in the steady-state. Premkumar and Valdez et al.9,20 proposed using bat algorithm, particle swarm, and
other group optimization algorithms to adjust the fuzzy PID controller adaptively. ­In21, the adaptive fuzzy neural
network control algorithm is adopted to realize the speed tracking of the BLDCM drive system. Rubaai et al.22
adopted the genetic algorithm to optimize the scale factor of the output variable of the fuzzy PID controller. ­In23,
a speed control method of BLDCM based on the genetic algorithm optimizing fuzzy PID membership function
and rule base is proposed. All the above algorithms have better control effects than the traditional fuzzy PID
control method, and they also have the limitations of the algorithm mentioned in the previous section. Harmony
search algorithm (HSA) is a newly published heuristic global search algorithm, which has been successfully
implemented in many combinatorial optimization solution ­problems24,25, such as solving continuous optimiza-
tion ­problems26, solving unconstrained p­ roblems27, and also in field of m
­ otor28,29. It is shown that the harmony
search algorithm has better performance than the genetic algorithm, simulated annealing algorithm, and tabu
search algorithm, etc. ­In30, an optimization method combining harmony search algorithm with fuzzy logic is
successfully proposed, and the superiority of the process is verified.
Based on the descriptions of the above algorithm mentioned, this paper proposes a novel PID controller
using dual FLSs with HSA optimization called DFPID-HSA to enhance the various speed control performance
of BLDCM. The major contributions of this paper are as follows.

(1) DFPID-HSA adopts dual FLSs, in which the FLS1 locks the three coefficients of the PID controller in an
extensive range on the basis of the system error and the error change rate. Then, the FLS2 is optimized by
HSA (HSA-F2) to obtain the precise correction of the three coefficients.
(2) To better obtain the optimal global harmony, the PAR and BW of HSA adopt the improved dynamic
adjustment mode. In the composition harmony section, the triple selection method is used to achieve the
optimal global search. Finally, DFPID-HSA provides the optimal control signal to BLDCM to realize the
speed control of BLDCM.
(3) The stability of the proposed controller is analyzed by the pole determination method, the Lyapunov
determination method, and the Nyquist determination method. Then the system has been demonstrated
to be closed-loop stable.
(4) The performance indicators about steady-state, transient, and integral of DFPID-HSA are compared with
the deep perceptron neural network optimized fuzzy PID controller(DPNN-FuzzyPID)10, the fuzzy logic
PID controller optimized by genetic algorithm (GA-PID-FLC)23, the fuzzy logic PID controller based on
particle swarm optimization (PSO-FuzzyPID)31, PID controller with fuzzy logic regulation (FuzzyPID)15,
and conventional PID controller (PID) by Matlab. The superiority of DFPID-HSA in BLDCM speed con-
trol is verified. And the sensitivity analyses of DFPID-HSA are carried out under mechanical parameters
variations of the motor to check its robustness.
(5) The BLDCM drive system experimental platform is built. Under three experimental conditions, it is verified
that DFPID-HSA still maintains its superiority and can achieve excellent control of the BLDCM, which
proves the feasibility of the algorithm.

Other organizational structures for this article are as follows: the second section presents the establishment of
the BLDCM mathematical model. The third section describes the principle of the proposed DFPID-HSA algo-
rithm. In the fourth section, the simulation model of the BLDCM control system is built, and the performance
comparison test of the presented algorithm is implemented. In the fifth section, the experimental platform of
the BLDCM control system is built to verify the feasibility of the presented algorithm. The sixth section sum-
marizes the article.

Mathematical mode of BLDCM


The three-phase star-connected BLDCM can be converted to the circuit diagram shown in Fig. 1. The mathemati-
cal model of an ideal motor requires the assumption that the motor body satisfies the following ­conditions32:
(1) ignore the saturation of the motor iron core, (2) ignore the eddy current and hysteresis losses in the motor;
(3) the current in the motor is the three-phase symmetric sinusoidal current; and (4) the effects of temperature,
frequency variation, and winding damping on resistance are not considered. The three-phase winding voltage
equation may be expressed as:
dix
ux = Rix + (L − M) + ex (1)
dt
where, ux , ix , ex (x = u, v, w) and R denotes the phase voltage, phase current, back electromotive force, and phase
impedance of the stator windings, respectively; L and M represent the self-inductance and pairwise mutual
inductance of the three-phase windings, respectively.
The electromagnetic torque generated by the stator winding is
Te = (eu iu + ev iv + ew iw )/ωm (2)
where, ωm and Te represent the mechanical angular speed and electromagnetic torque of the BLDCM, respectively.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 2

Vol:.(1234567890)
www.nature.com/scientificreports/

L-M
R iu
uu
eu

L-M ev ew
R iv
uv

iw L-M
uw R

Figure 1.  Equivalent circuit of BLDCM.

Inverter model Electrical system Tm(s) Mechanical system


r(s) Proposed Kw 1 - 1 y(s)
+_
Controller
+_ Kemf +
u(s) Tws+1 us(s) R(Ts+1) Js+B
es(s)
Kemf

Figure 2.  Block diagram of the speed control system for BLDCM.

Parameters Value Units


Stator phase resistance R 2.875 Ω
Stator phase inductance L 0.0085 H
Flux linkage established by magnets λ 0.175 V-s
Voltage constant 0.1466 V/(r/min)
Torque constant 1.4 N (m/A)
Moment of inertia J 0.0008 (kg ­m2)
Friction factor B 0.001 N (m s/rad)
Pole pairs P 4 –
Inverter gain Kw 500 –
Inverter time constant Tw 5 × ­10−6 s

Table 1.  Basic parameters of BLDCM.

The equation of motion of the BLDCM is as follows:


dωm
Te = Tm + B + Jωm (3)
dt
where, Tm , B and J represent load torque, damping coefficient, and moment of inertia, respectively. Hence, the
characteristic equation of BLDCM can be expressed a­ s10,33:

di(t)
 us (t) = Ri(t) + L
 + es (t)
dt




 es (t) = Kemf ωm (t)

(4)

 Te (t) = Kemf i(t)


 Te (t) = J dωm (t) + Bωm (t) + Tm



dt
where, Kemf is the back electromotive force constant. Figure 2 is the block diagram of the speed control system
for BLDCM. The proposed controller mainly realizes tracking control for the speed of the BLDCM. Table 1 gives
the basic parameters of BLDCM and inverter. From the characteristic equation of the BLDCM given in Eq. (4),
the transfer function model of the BLDCM is deducted as,

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 3

Vol.:(0123456789)
www.nature.com/scientificreports/

HSA based fuzzy


gain adjuster (FLS2)

kp' ki' kd'

Defuzzification
KP1 Input

PID controller
Fuzzification
Inference Output
Reference ec u(t)
input r
+_
d/dt
e
mechanism KI1
KD1
 BLDCM
y

Rule-base
(FLS1)

Figure 3.  The architecture of the BLDCM control system.

y(s) Kemf
us (s)
= 2
R(Ts + 1)(Js + B) + Kemf (5)

The transfer function model of the PWM inverter is given as,


u(s) Kw
= (6)
us (s) Tw s + 1

Proposed DFPID‑HSA controller


Aiming at the speed control problem for BLDCM, this paper proposes an HSA optimized dual fuzzy logic
systems-based PID controller called DFPID-HSA. The specific control system construction is given in Fig. 2.
Firstly, the FLS1 in DFPID-HSA locks the proportional coefficient KP1, integral coefficient KI1, and differential
coefficient KD1 of PID controller in a wide range on the basis of the system error e and error change rate ec. Then,
the accurate correction value kp’/ki’/kd’ of KP1/KI1/KD1 is obtained by HSA optimized FLS2. In order to get the
optimal global harmony better, the PAR and BW in HSA adopt the improved dynamic adjustment mode, and
the triple selection method is adopted in the composition harmony section to realize the optimal global search.
Finally, DFPID-HSA provides the optimal control signal u(t) to BLDCM torealize the speed control.
According to the structure in Fig. 3, it is known that e = y − r  , ec = de dt  , and the control signal u(t) can
be given as

u(t) = KP e + KI edt + KD de dt (7)


where, KP, KI, and KD in A are determined by the output parameters KP1/KI1/KD1 of FLS1 in DFPID-HSA, and
the output parameters kp’/ki’/kd’ of HSA Optimized FLS2.

 KP = KP1 + kp′

KI = KI1 + ki′ (8)

KD = KD1 + kd ′

Fuzzy logic system.  The fundamental structure of the fuzzy logic system is given in the dashed box in
Fig. 2, and it mainly consists of the below four ­parts34:

• Fuzzification
  The role of fuzzification is to transform the precise input quantity into fuzzification quantity. The input
contains external reference input, system output or state, etc.
• Knowledge bases
  The knowledge bases include the knowledge in the specific application field and the required control
objectives. It mainly consists of two parts: databases and fuzzy control rule bases.
• Fuzzy Inference engine
  The fuzzy inference engine is the kernel of FLS, which has the inference capacity of simulating humans
ground on fuzzy concepts. The inference process is ground on the implication relationship and inference
rules in fuzzy logic.
• Clarification
  The role of clarification is to convert the fuzzy quantity (control quantity) got by fuzzy inference engine
into the precise quantity of practical application control.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 4

Vol:.(1234567890)
www.nature.com/scientificreports/

NB NM NS ZO PS PM PB VS MS S M B MB VB
1 1

Degree of membership
Degree of membership
0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
-3 -2 -1 0 1 2 3 0 10 20 30 40 50 60
e/ec Kp1/Ki1/Kd1
(a) (b)

Figure 4.  Membership function of FLS1: (a) input variables (b) output variables.

NB NM NS ZO PS PM PB VS MS S M B MB VB
1 1

Degree of membership
Degree of membership

0.8 0.8

0.6 0.6

0.4 0.4

0.2
0.2
0
0
0 1 2 3 4 5 6
-1 -0.5 0 0.5 1 kp'/ki'/kd'
e/ec
(a) (b)

Figure 5.  Membership function of FLS2: (a) input variables (b) output variables.

In DFPID-HSA, both FLS1 and FLS2 adopt dual-input dual-output Mamdani controllers. The fuzzification
process of FLS1 and FLS2 is mainly to convert the actual values of the system speed error e and error change rate
ec into the corresponding fuzzy values according to the fuzzy domains and membership functions. The fuzzy
domain of input and output variables in FLS1 is: e, ec = [−3, 3] , KP1 , KI1 , KD1 = [0, 60] ; the fuzzy domain of
input and output variables in FLS2 is: e, ec = [−1, 1] , kp′ , ki′ , kd ′ = [0, 6] . The fuzzy language set of FLS1 and FLS2
input variables is {NB, NM, NS, ZO, PS, PM, PB} = {“negative big”, “negative middle”, “negative small”, “zero”,
“positive small”, “positive middle”, “positive big”}; The fuzzy language set of FLS1 and FLS2 output variables is
{VS, MS, S, M, B, MB, VB} = {“very small”, “medium small”, “small”, “medium”, “big”, “medium big”, “very big”}35.
The membership functions of input and output variables of FLS1 and FLS2 are shown in Figs. 4 and 5, respec-
tively. In this paper, the membership functions mainly choose isosceles triangle type and Gaussian function
type. The isosceles triangle has the advantages of being convenient for representation, simple for calculation,
and fast for the response. The edge values of the fuzzy sets mainly adopt the Gaussian function, which makes its
value smoother and more adaptive. The fuzzy rules of different output variables of FLS1 and FLS2 are shown in
Table 2. The establishment of fuzzy rules refers to the experience of experts and is modified through multiple
­simulations36. Specific fuzzy rules can be written in the following form:
If e = ef and ec = ecf  , then KP1 = KP1f and KI1 = KI1f and KD1 = KD1f ;
If e = ef and ec = ecf  , then Kp′ 1 = Kp′ f and Ki′ 1 = Ki′ f and Kd ′ 1 = Kd ′ f ;
(i = 1, 2, 49; each variable representing 49 rules);
where, ef  , ecf  , KP1f  , KI1f  , KD1f  , Kp′ f  , Ki′ f  , Kd ′ f represent the fuzzy language sets of e , ec , KP1 , KI1 , KD1 , Kp′ ,
Ki′ , Kd ′.
Taking KP1 as an example, the membership degree of the first fuzzy rule of KP1 is
µKP11 = µNB (e) ∗ µNB (ec) (9)
where, " ∗ " means to take the smaller, i.e.
µKP11 = min{µNB (e), µNB (ec)} (10)
By analogy, the membership degrees of all fuzzy rules corresponding to KP1 under different e and ec can be
obtained. According to the membership degree of each fuzzy rule, the fuzzy value of KP1 can be obtained by
Clarificating with the center of gravity method
49
f =1 µKP1f (KP1 )KP1f
KP1 = 49 (11)
f =1 µKP1f (KP1 )

where, KP1f is a real value on the domain KP1 = [0, 60] , µKP1f Is the membership degree of corresponding fuzzy
rules. Similarly, the fuzzy output value of KI1 , KD1 , Kp′ , Ki′ , Kd ′ in each sampling period can be obtained.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 5

Vol.:(0123456789)
www.nature.com/scientificreports/

e
ec NB NM NS ZO PS PM PB
Fuzzy rules for KD1/kp’
NB VB VB MB MB B B M
NM VB VB MB B B M S
NS MB MB MB B M S S
ZO MB MB B M S MS MS
PS B B M S S MS MS
PM B M S S MS MS VS
PB M M MS MS MS VS VS
Fuzzy rules for KI1/ki’
NB VS VS MS MS S S M
NM VS VS MS S S M S
NS VS MS MS S M B B
ZO MS MS S M B MB B
PS MS S M B B MB MB
PM M M B B MB MB VB
PB M M B MB MB VB VB
Fuzzy rules for KD1/kd’
NB B S MB VS VS MS B
NM B S VS MS MS S M
NS M S MS MS S S M
ZO M S S S S S M
PS M M M M M M M
PM MB S B B B B VB
PB VB MB MB MB B B VB

Table 2.  Fuzzy rules for different output variables of FLS1 / FLS2.

Harmony search algorithm.  Harmony Search Algorithm (HSA) is a heuristic algorithm put forward by
Geem et al.37, with strong global convergence. HSA is a simulation of the process by which musicians iteratively
adjust the tones of various musical instruments to achieve the most beautiful harmony ­finally38,39. The evolution
speed of HSA is faster than that of intelligent algorithms such as the genetic algorithm and has fewer mathemati-
cal requirements. HSA mainly consists of five ­steps40,41 which are as follows:

1. Define problem and parameter values

(1) This paper belongs to the problem of minimization, that is:


min f (X), X = {x1 , x2 , · · · , xn } ∈ Rn (12)
where, xi ∈ Xi, i = 1, 2, …, n, xi ∈ [Xi min, Xi max]
(2) Determine parameter values.

• Harmony memory size (HMS): Size of the harmonic population.


• Harmony memory considering rate (HMCR): Probability of taking a harmony voice from the existing
population.
• Pitch adjusting rate (PAR): Probability of adjusting the harmony voice.
• Bandwidth (BW): Amplitude of pitch adjusting.
• Times of creation (Tmax): Times of adjustment (iteration).

  Obviously, a set of suitable parameters can enhance the algorithm’s ability to search for the global optimal
or close to the optimal region and has a high convergence speed. Where the parameter BW is the distance
bandwidth of continuous design variables. An enormous BW value is conducive to search the algorithm in
an extensive range, and a small BW value is suitable for adjusting the optimal solution. To better obtain the
objective optimization results, the BW value in this paper decreases dynamically with the increase of itera-
tion times. The improved dynamic adjustment method is as follows:
t
BW = BW0 × e− /T max (13)

where, BW0 is the initial coefficient of pitch adjusting bandwidth, and t is the current times of iteration.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 6

Vol:.(1234567890)
www.nature.com/scientificreports/

  PAR is the adjustment rate of the pitch. An enormous PAR value is conducive to transmitting the infor-
mation of ­xi to the next generation, which enhances the local development capabilities of the algorithm
near ­xi. In contrast, a small PAR value capacitates the new harmony vector to expand the search range and
increase the multiplicity of the harmony memory by disturbing the values of the corresponding dimensions
in the harmony memory. As the times of iteration increase, it is closer to obtaining better harmony, so the
probability of adjusting harmony should also be reduced. In this paper, an improved dynamic adjustment is
adopted for PAR, as follows:

PAR = PAR0 × 1 − t T max (14)


  

where, PAR0 and t stand for the initial coefficient of pitch adjusting rate and the current times of iteration,
respectively.
2. Initialization of harmony memory
  HMS harmonies X 1 , X 2 , · · · , X HMS are randomly created from the solution space of X and put into the
harmony memory. The matrix form of the harmony memory is:
 1 
X
 2 
X 
HM =  ··· 
 (15)
 
X HMS
  HM adopts external random values to prevent falling into local optimization or local convergence, as in
Eq. (16)
xi = xi min + (xi max − xi min ) × r0 (16)
where, r0 is a random number between [0, 1].
3. Generate a new harmony
  Generate a random number r1 between [0, 1], compare with HMCR,
 If r1 < HMCR, take a random harmony variable from the harmony memory,
  Otherwise, a random harmonic variable is created from the solution space;
  A harmony variable is got from the above. If the harmony variable is got from the harmony memory, it is
necessary to adjust it to generate a random number r2 between [0, 1].
 If r2 < PAR, adjust the resulting harmony variable on the basis of BW and get a new harmony variable,
  Otherwise, to avoid that the performance of the randomly generated harmony in the solution space is
worse than that of the best harmony xibest in HM, xibest is used to replace the randomly generated harmony.
  Finally, we get a new harmony xinew:
xiold ± BW × r3 , r1 < HMCR ∪ r2 < PAR

xinew = xibest , r1 < HMCR ∪ r2 ≥ PAR (17)
xi min + (xi max − xi min ) × r0 , r1 ≥ HMCR
where, r0 , r1 , r2 and r3 are random numbers between [0, 1].
4. Update harmony memory
 Evaluate Xnew , i.e. f (Xnew) . If it is better than the one with the worst function value in HM, i.e.
f (Xnew) < f (Xworst) , then Xnew will replace Xworst  ; Otherwise, no modification is made.
5. Determine the stop condition
  Repeat steps (3) and (4) until the times of creation (iteration) reach Tmax.
  In this paper, HSA is used to optimize FLS2 to obtain the accurate correction value kp’/ki’/kd’ of FLS1
parameters. Since the BLDCM speed control system belongs to the problem of minimizing the error e, the
cost function is defined as the Integral absolute error (IAE).
 t
IAE = |e(t)|dt (18)
0

  The constraints of optimization variables are as follows:



 0 ≤ kp ′ ≤ 6

0 ≤ ki ′ ≤ 6 (19)

0 ≤ kd ′ ≤ 6

  Then, the harmony memory is


kp1′ ki1′ kd1 ′
 
 k2′ ki2′ kd2 ′ 
HM =  p
 ··· ···
 (20)
··· 
kpHMS
′ kiHMS
′ kiHMS
′′

  The flow chart of the HSA-F2 algorithm is shown in Fig. 6, and the specific steps are shown in Table 3.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 7

Vol.:(0123456789)
www.nature.com/scientificreports/

Begin

Parameter
initialization

Generate initial solution


in feasible region

PAR=PAR0*(1-t/Tmax)
BW=BW0*exp(-t/Tmax)

Generate rand(0,1) random number r 1

Y N
r1<HMCR
Generate rand(0,1)
random number r 2

Y N
r2<PAR

Generate variables in
Randomly select variables Best variable in
solution space t=t+1
from the harmony memory solution space
xinew=ximin+
xinew=xiold+BW*rand(0,1) xinew=xibest
(ximax-ximin)*rand(0,1)

Generate new harmony xinew

N Whether xinew is better than


the worst solution xiworst in HM?

Y
Update HM
xiworst=xinew

N
Whether to reach the maximum
times of iteration Tmax?

End and output the results

Figure 6.  The flow chart of HSA-F2.

Stability analysis
This section analyzes the stability of the closed-loop system of the speed control for BLDCM based on the novel
PID controller using dual fuzzy logic systems with HSA optimization. The pole determination method, Lyapunov
determination method, and Nyquist determination method are used to verify the stability of the system. To test
the stability, the transfer function of the closed-loop system needs to be used. Adopting bilinear transformation,
the closed-loop transfer function of the optimized DFPID-HSA controlled BLDCM  is provided in Eq. (21), where
the transfer function of the proposed controller can be equivalent to GC (s) = KP s + KI + KD s2 s according

to Eqs. (7) and (8), and the load torque of the motor is taken to be zero.
y(s) 5.864s2 + 5255.61s + 397.286
= (21)
r(s) 2.3 × 10 s + 4.6 × 10−4 s3 + 5.867s2 + 5255.635s + 397.286
−9 4

Pole determination method.  According to the analysis of the unit step response of the higher-order
system, it is the dynamic component that affects the change of system output with time. Whether the dynamic
component attenuates only depends on the sign of the closed-loop pole of the system. A necessary and sufficient
condition for system stability: all poles of the closed-loop system are negative real numbers or conjugate complex
numbers with negative real parts. In other words, all closed-loop nodes must distribute on the left half of the
imaginary axis of the S-plane34. Figure 7 lays out the pole-zero plot of the speed control system for the BLDCM
based on DFPID-HSA. It is observed from the pole-zero plot that all the poles are on the left half of the S-plane,
thus indicating that the system is stable.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 8

Vol:.(1234567890)
www.nature.com/scientificreports/

Table 3.  Specific steps of HSA-F2 algorithm.

On the basis of the Matlab command, the zero points (z), pole points (p) and gain (k) of the system are:
z = [ −896.1744 −0.0756 ]
p = [ −1.8638 × 105 −0.1256 × 105 −0.0097 × 105 −0.0000 ] (22)
9
k = [2.5496 × 10 ]

Lyapunov determination method.  Lyapunov is a Russian mathematician who derived the famous sta-
bility criteria for linear and nonlinear systems. Lyapunov theorem points out that if there is a unique P = P T > 0
satisfying Eq. (23) for any Q = QT > 0 , then that system is asymptotically ­stable42.

AT P + PA = −Q, Q = QT , Q = I(Identity matrix) (23)


where, Q stands for a any positive definite matrix.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 9

Vol.:(0123456789)
www.nature.com/scientificreports/

Pole-zero plot
1

0.8

0.6

Imaginary Axis (seconds-1)


0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
-2 -1.5 -1 -0.5 0 0.5 1
5
Real Axis (seconds-1) x 10

Figure 7.  Pole-zero plot of the speed control system for the BLDCM based on DFPID-HSA.

To solve the discrete-time Lyapunov equation, the state-space model matrix of the system is required. Accord-
ing to Eq. (21), use the tf2ss() function to obtain the state-space model matrix A, B, C, D of the speed control
system for BLDCM based on DFPID-HSA,
−0.0000 −0.0026 × 1012 −2.2851 × 1012 −0.1727 × 1012
 
 0.0000 0 0 0
A=

0 0.0000 0 0 
0 0 0.0000 0
� �T (24)
B= 1 0 0 0
C = 0 0.0025 × 1012 2.2850 × 1012 0.1727 × 1012
� �

D = [0]
Utilize Eq. (23) to obtain the P matrix and its eigenvalues λ, and determine whether P is positive definite
according to λ.
5.1698 × 109
 
 2.3395 × 1012 
=  8.8436 × 1010 
 (25)
3.8910 × 107

Both λ are positive, which proves that P is positive definite, and Lyapunov criterion confirms that the speed
control system of BLDCM based on DFPID-HSA is asymptotically stable.

Nyquist determination method.  Suppose the open-loop transfer function of the system be GC (s)G(s) . If
the system is open-loop stable, the necessary and sufficient condition for the stability of the closed-loop system is
that when ω by 0 → ∞ , the open-loop Nyquist curve GC (jω)G(jω) of the system does not enclose point −1, j0  ,
 
then the closed-loop system is stable. Otherwise, it is ­unstable34.
The Nyquist diagram of the speed control system for BLDCM based on DFPID-HSA is obtained according
to the nyquist() function in Matlab, see Fig. 8. It can be seen from the diagram that the system does not contain
(−1, j0) point. Therefore, this paper proposes that the DFPID-HSA-based BLDCM speed control system is
closed-loop stable.

Simulation analysis
In order to verify the superiority of DFPID-HSA in BLDCM speed control, its performances are compared and
analyzed with DPNN-FuzzyPID, GA-PID-FLC, PSO-FuzzyPID, FuzzyPID, and PID by MATLAB. The selection
of relevant parameters in the comparison algorithms referred to the original literature, followed the selection
rules of relevant data, and made reasonable adjustments in the test to ensure the fairness of comparison. The
comparison performance indicators mainly include steady-state performance indicators: error (r/min, %), tran-
sient performance indicators: delay time, adjustment time, maximum overshoot/undershoot, oscillation, etc.43,
integral performance indicators: Integral absolute error (IAE) criterion, Integral square error (ISE) criterion,
Integrated time absolute error (ITAE) criterion, Integral time square error (ITSE) c­ riterion44,45.
The initialization of DFPID-HSA parameters is shown in Table 426, the selection of relevant parameters
mainly refers to the experience of experts, and is modified and determined through many simulations. The
convergence diagram of DFPID-HSA obtained by running the system based on the corresponding parameters
is shown in Fig. 9. It can be seen that the optimal cost of DFPID-HSA is obtained when the iteration reaches 55

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 10

Vol:.(1234567890)
www.nature.com/scientificreports/

Nyquist Diagram
0.8

0.6

0.4

Imaginary Axis
0.2

-0.2

-0.4

-0.6

-0.8
-1.5 -1 -0.5 0 0.5 1 1.5
Real Axis

Figure 8.  Nyquist diagram of the speed control system for the BLDCM based on DFPID-HSA.

Elements Value
Search parameter number 3
HMS 200
HMCR 0.98
PAR0 0.9
BW0 0.01
Tmax 80

Table 4.  Initialization parameters of DFPID-HAS.

14
DFPID-HSA

12

10
Best Cost

2
0 10 20 30 40 50 60 70 80
Iteration

Figure 9.  Solution convergence for DFPID-HAS.

Algorithms/parameters KP KI KD
PID 16.6 0.013 0.1 × ­10–5
FuzzyPID 25.1 3.00 0.10
PSO-FuzzyPID 29.4 2.92 0.09
GA-PID-FLC 34.5 3.01 0.10
DPNN-FuzzyPID 40.2 3.21 0.09
DFPID-HSA 71.7 5.42 0.08

Table 5.  The final optimized parameters of KP/KI/KD. 

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 11

Vol.:(0123456789)
www.nature.com/scientificreports/

Algorithms/performance indicators IAE ISE ITAE ITSE


PID 18.38 2.3327 × ­104 0.132 92.52
FuzzyPID 9.84 0.7962 × ­104 0.242 17.73
PSO-FuzzyPID 8.17 0.6285 × ­104 0.200 12.07
GA-PID-FLC 7.06 0.5357 × ­104 0.174 8.91
DPNN-FuzzyPID 6.02 0.4493 × ­104 0.192 6.39
DFPID-HSA 2.52 0.1740 × ­104 0.084 1.02

Table 6.  Observed performance indices for error. IAE = ∫ |e(t)| dt, ISE = ∫ ­e2(t) dt, ITAE = ∫t |e(t)| dt, ITSE = ∫
­te2(t) dt.

4
IAE ×10 ISE
20 2.5

16 2

12 1.5

8 1

4 0.5

0 0
1 2 3 4 5 6 1 2 3 4 5 6
1--PID; 2--FuzzyPID; 3--PSO-FuzzyPID; 1--PID; 2--FuzzyPID; 3--PSO-FuzzyPID;
4--GA-PID-FLC; 5--DPNN-FuzzyPID; 6--DFPID-HSA 4--GA-PID-FLC; 5--DPNN-FuzzyPID; 6--DFPID-HSA

(a) (b)

ITAE ITSE
0.25 100

0.2 80

0.15 60

0.1 40

0.05 20

0 0
1 2 3 4 5 6 1 2 3 4 5 6
1--PID; 2--FuzzyPID; 3--PSO-FuzzyPID; 1--PID; 2--FuzzyPID; 3--PSO-FuzzyPID;
4--GA-PID-FLC; 5--DPNN-FuzzyPID; 6--DFPID-HSA 4--GA-PID-FLC; 5--DPNN-FuzzyPID; 6--DFPID-HSA

(c) (d)

Figure 10.  Error signal performance indicator analyses: (a) IAE (b) ISE (c) ITAE (d) ITSE.

times. The final optimized parameters Kp/Ki/Kd of the four comparison algorithms are shown in Table 5. The
integral performance indicators of the four algorithms are shown in Table 6, and the error signal performance
indicator analyses are shown in Fig. 10. From the comparison of the error signal performance indicators, it can
be seen that DFPID-HSA is the best.
Considering that uncertainties such as load changes and speed changes are prone to occur in the operation
of the BLDCM system, the performance comparison and analysis of the four algorithms are carried out under
the following three working conditions.

No‑load condition.  Under the no-load condition, the target speed of BLDCM is given to be 2000 r/min.
The control system is operated according to different algorithms and obtain the comparison of speed response
curves, as shown in Fig. 11. As can be seen from Fig. 11 that all the five algorithms can make the system reach the
ideal speed, among which PID has an evident overshoot phenomenon. In contrast, FuzzyPID, PSO-FuzzyPID,
GA-PID-FLC, DPNN-FuzzyPID, and DFPID-HSA have no evident overshoot phenomenon. The maximum
overshoot MP% and oscillation times N of the five algorithms meet the engineering requirements (Mp% ≤ 50%,
n ≤ 1.5). Still, DFPID-HSA has the shortest delay time and settling time, and the smallest steady-state error,

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 12

Vol:.(1234567890)
www.nature.com/scientificreports/

2500

2000

1500 2100 2010

2000

Speed(r/min)
2000
1000 1900
Reference
1800
1990 PID
1700
500 FuzzyPID
1600 1980
0.1 0.105 0.11 0.115 0.12
PSO-FuzzyPID
0 0.02 0.04 0.06
GA-PID-FLC
0
DPNN-FuzzyPID
DFPID-HSA
-500
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
Time(s)

Figure 11.  The comparison of speed response under the no-load condition.

Transient performance indicators Steady-state performance indicators


Maximum overshoot Steady-state error (r/
Controllers (Mp%) Delay time (s) × ­10−3 Settling time (s) min) Steady-state error (%)
PID 1.08 12.10 0.085 9.90 0.495
FuzzyPID – 2.65 0.043 10.64 0.532
PSO-FuzzyPID – 2.22 0.039 9.16 0.458
GA-PID-FLC – 1.83 0.030 7.94 0.397
DPNN-FuzzyPID – 1.60 0.027 6.88 0.344
DFPID-HSA – 0.60 0.015 4.10 0.205

Table 7.  The comparison of performance indicators under the no-load condition. Mp% = [Speed


(max) − Speed (∞)]/Speed (∞) × 100%.

2500

2000

1500 2040

2020
Speed(r/min)

1000 2000
Reference
1980
PID
500 1960 FuzzyPID
1940 PSO-FuzzyPID
0.1 0.12 0.14 GA-PID-FLC
0
DPNN-FuzzyPID
DFPID-HSA
-500
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
Time(s)

Figure 12.  The comparison of speed response under the fixed load condition.

which shows that the control performance of DFPID-HSA is better. See Table 7 for the comparison of specific
performance indicators.

With‑load condition. 

(1) Fixed load


  The system target speed of 2000 r/min is given as above, and a 3Nm load interference is applied to the
system at 0.1 s. The comparisons of speed response and performance indicators are obtained in the oper-
ating system, as shown in Fig. 12 and Table 8, respectively. It can be seen from Fig. 12 and Table 8, when

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 13

Vol.:(0123456789)
www.nature.com/scientificreports/

Transient performance indicators Steady-state performance indicators


Maximum undershoot
Controllers (− Mp%) × ­10−5 Peak time (s) Settling time (s) Steady-state error (r/min) Steady-state error (%)
PID 2342.13 0.108 0.060 9.5 0.475
FuzzyPID 7.54 0.121 0.020 11.6 0.580
PSO-FuzzyPID 12.31 0.116 0.017 9.9 0.495
GA-PID-FLC 9.04 0.116 0.010 8.6 0.430
DPNN-FuzzyPID 9.19 0.115 0.009 7.5 0.375
DFPID-HSA 6.77 0.100 0.001 4.5 0.225

Table 8.  The comparison of performance indicators under the fixed load condition.

2500

2000

2020
1500

2000
Speed(r/min)

1000
Reference
1980
PID
500 FuzzyPID
1960
0.11 0.115 0.12 PSO-FuzzyPID
GA-PID-FLC
0
DPNN-FuzzyPID
DFPID-HSA
-500
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
Time(s)

Figure 13.  The comparison of speed response under the variable load condition.

Transient performance indicators Steady-state performance indicators


Maximum overshoot Steady-state error (r/
Controllers (Mp%) Delay time (s) × ­10–3 Settling time (s) min) Steady-state error (%)
PID 0.95 7.20 0.085 21.0 1.050
FuzzyPID – 2.65 0.050 11.6 0.580
PSO-FuzzyPID – 2.37 0.046 10.2 0.510
GA-PID-FLC – 1.83 0.040 8.6 0.430
DPNN-FuzzyPID – 1.52 0.030 7.6 0.380
DFPID-HSA – 0.60 0.015 4.3 0.215

Table 9.  The comparison of performance indicators under the variable load condition.

the load is added to the system, the undershoot of PID is the most obvious, and the volatility of FuzzyPID,
PSO-FuzzyPID, GA-PID-FLC, DPNN-FuzzyPID, and DFPID-HSA is weak. Among them, the shortest
Settling time of DFPID-HSA is about 0.001 s, and the smallest steady-state error is 4.5 r/min. It can be seen
that DFPID-HSA is obviously better than other algorithms in terms of anti-interference ability.
(2) Variable load
  Next, there is a continuous sinusoidal signal load disturbance applied to the system, which is defined as
Tm = 20 sin t, 0 ≤ t ≤ 0.2s . The comparison of the speed response and performance indexes under the
operating system is shown in Fig. 13 and Table 9. From Fig. 13 and Table 9, it can be seen that the oscilla-
tion of PID is most obvious when the system is accompanied by sinusoidal signal load and causes severe
steady-state errors. The fluctuation of FuzzyPID, PSO-FuzzyPID, GA-PID-FLC, and DPNN-FuzzyPID is
weaker. Among them, DFPID-HSA has no obvious fluctuation phenomenon and still maintains the shortest
settling time and the smallest steady-state error. It can be seen that DFPID-HSA has good robustness and
anti-interference performance.

Speed changes condition.  Speed changes condition is a common situation in the operation of BLDCM,
so it is essential to verify the control performance of DFPID-HSA under this working condition. First, the ini-
tial target speed of the BLDCM system is given at 2000 r/min in the no-load state, and the speed is increased

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 14

Vol:.(1234567890)
www.nature.com/scientificreports/

3000

2500

2000

Speed(r/min)
1500
2500 Reference
2500

2400
2400 PID
1000 2300
2300 FuzzyPID
2200
2200 PSO-FuzzyPID
2100
2100 GA-PID-FLC
500
2000
2000 DPNN-FuzzyPID
0.1 0.12 0.14 0.2 0.22 0.24 DFPID-HSA
0
0 0.05 0.1 0.15 0.2 0.25 0.3
Time(s)

Figure 14.  The comparison of speed response under the speed changes condition.

Transient performance indicators Steady-state performance indicators


Maximum overshoot/
Controllers (speed up/speed down) undershoot (Mp%) × ­10–2 Delay time (s) × ­10–3 Settling time (s) Steady-state error (r/min) Steady-state error (%)
PID 1.38/− 1.47 9.0/9.2 0.080/0.080 9.80/10.00 0.392/0.500
FuzzyPID –/– 3.0/2.7 0.035/0.035 13.20/10.35 0.528/0.518
PSO-FuzzyPID –/– 2.5/2.4 0.030/0.030 11.41/9.02 0.456/0.451
GA-PID-FLC –/– 2.1/2.3 0.025/0.026 9.86/7.78 0.394/0.389
DPNN-FuzzyPID –/– 1.8/1.9 0.020/0.022 8.59/6.78 0.344/0.339
DFPID-HSA –/– 1.2/1.5 0.015/0.017 5.67/4.16 0.227/0.208

Table 10.  The comparison of performance indicators under the speed changes condition.

to 2500 r/min at 0.1 s, and then reduced to 2000 r/min again at 0.2 s. The corresponding comparison of speed
response is shown in Fig. 14, and the comparison data of performance indicators are given in Table 10. It can
be seen from Fig. 14 and Table 10, PID is still accompanied by an overshoot/undershoot phenomenon. Fuzz-
yPID, PSO-FuzzyPID, GA-PID-FLC, DPNN-FuzzyPID, and DFPID-HSA have relatively good performance,
but DFPID-HSA is optimal for the delay, settling, and steady-state error. Therefore, this proves the superiority
of DFPID-HSA once again.

Mechanical parameters variation conditions.  In view of the optimization control problem of DFPID-
HSA in this paper, it is essential to analyze the sensitivity of mechanical parameters variations of the BLDCM
system. Here, the resistance, inductance, flux linkage, and inertia of the BLDCM system are adjusted for the cor-
responding increases or decreases, and the corresponding curves under the conditions of the relevant mechani-
cal parameters variations are given in Fig. 15. As can be seen from the figures, even if the relevant mechanical
parameters increase or decrease in amplitude, DFPID-HSA can still achieve speed tracking well, without over-
shoot/undershoot and oscillation. It only changes in the delay time and stability time, but this does not affect the
final stability of the system. Hence, it can be certified that DFPID-HSA has excellent robustness.

Experimental analysis
To further verify the feasibility of DFPID-HSA, the experimental platform for the BLDCM control system is set
up, as shown in Fig. 16. The BLDCM used in the testing platform is 80BL110S50-445TKA, and its driver adopts
the IR2235 driver chip of the International Rectification Company. IR2235 is a high-voltage, high-speed MOS-
FET and IGBT drive circuit, with its current amplification and protection functions while suppressing noise at
the output. In the experiment, an incremental encoder E6C2- CWZ5B with a resolution of 600 is used for speed
detection. The control board model is DE2-115, and the FPGA chip model is EP4CE115F29C7. The oscilloscope
is MDO4000C of TEKTRONIX Company. In the experiment, this paper uses the logical resources of FPGA to
build a NIOS II soft-core processor, and the DFPID-HSA is programmed in the constructed NIOS II soft-core
by C language to realize real-time control.
Corresponding to the working conditions in the previous section, the algorithm is tested experimentally,
and the experimental results are shown in Fig. 17. In the experiment, the target speed is still set at 2000 r/
min, and the experiment time was mapped to 10 times. The external resistance is increased at 1 s to achieve
a sudden load change, and the sudden change in speed is achieved at 1 s/2 s. The relevant parameters of each
algorithm are appropriately scaled, and the optimization objective constraints in DFPI-HSA are adjusted to:
KP1 , KI1 , KD1 = [0, 100] , kp′ , ki′ , kd ′ = [0, 30] . As can be seen from Fig. 17, the five algorithms can well realize

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 15

Vol.:(0123456789)
www.nature.com/scientificreports/

2000 2000

1600 2000 1600 2000

1600 1600

Speed(r/min)
1200

Speed(r/min)
1200
1200 1200

800 800
0 0.01
800 800
0 0.01

Resistance = 2.8750 Inductance = 6.0e-3


400 400
Resistance = 4.3125 Inductance = 8.5e-3
Resistance = 5.7500 Inductance = 10.0e-3
0 0
0 0.01 0.02 0.03 0.04 0.05 0 0.01 0.02 0.03 0.04 0.05
Time(s) Time(s)

(a) (b)

2000 2000

1600 2000
1600 2000

1600 1600
Speed(r/min)

1200

Speed(r/min)
1200
1200
1200

800 800
0 0.01 0 0.01
800 800

Flux linkage=0.150 Inertia = 0.8e-3


400 400
Flux linkage=0.175 Inertia = 1.0e-3
Flux linkage=0.200 Inertia = 1.2e-3
0 0
0 0.01 0.02 0.03 0.04 0.05 0 0.01 0.02 0.03 0.04 0.05
Time(s) Time(s)

(c) (d)

Figure 15.  The comparison of speed response under the mechanical parameters variation conditions: (a)
Resistance (b) Inductance (c) Flux linkage (d) Inertia.

Figure 16.  The experimental platform of the BLDCM control system.

speed tracking under no-load, fixed load, variable load, or speed changes conditions. However, compared with
the simulation test, the algorithms in the experiment all have fluctuations phenomenon. It can be seen from
(a) in Fig. 17 and Table 11, the overshoot phenomenon of PID is still apparent, and its fluctuation frequency is
fast. The ranges of FuzzyPID, PSO-FuzzyPID, GA-PID-FLC, and DPNN-FuzzyPID are more significant, but the
frequency of the fluctuations is slower. Compared with the above four algorithms, DFPI-HSA has the weakest
fluctuation phenomenon, showing its good robustness. In the cases of the fixed load, variable load, and speed
changes, the control effect of DFPID-HSA is relatively best. Overall, in the experiment, DFPID-HSA still main-
tains its superiority and can realize the excellent control of BLDCM.

Conclusion
In this paper, a novel PID controller using the dual fuzzy logic system with HSA optimization called DFPID-HSA
is presented to enhance the speed control performance of BLDCM. The stability of the proposed controller is
analyzed by the pole determination method, the Lyapunov determination method, and the Nyquist determination
method. Then the system has been demonstrated to be closed-loop stable. To test and verify the superiority of
DFPID-HSA, its performance is analyzed and compared with DPNN-FuzzyPID, GA-PID-FLC, PSO-FuzzyPID,
FuzzyPID, and PID under the conditions of no-load, fixed load, variable load, and speed changes. The results

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 16

Vol:.(1234567890)
www.nature.com/scientificreports/

2500 2500

2000 2000

2200 2050

1500 1500

Speed(r/min)
Speed(r/min)
2100
2000

2000 PID PID


1000 1000
FuzzyPID 1950 FuzzyPID
1900
PSO-FuzzyPID PSO-FuzzyPID
GA-PID-FLC 500 1900
GA-PID-FLC
500 1800
1 1.2 1.4 1
DPNN-FuzzyPID DPNN-FuzzyPID
DFPID-HSA DFPID-HSA
0 0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time(s) Time(s)

(a) (b)

2500 3000

2000 2500

2000
2200
1500
Speed(r/min)

Speed(r/min)
2100
1500 2600

2000 PID PID


1000 2400
1900
FuzzyPID FuzzyPID
1000
PSO-FuzzyPID 2200 PSO-FuzzyPID
1800

500 GA-PID-FLC GA-PID-FLC


1 1.2 DPNN-FuzzyPID 500 2000
DPNN-FuzzyPID
DFPID-HSA 1 1.1 1.2 1.3 DFPID-HSA
0 0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 0.3 0.6 0.9 1.2 1.5 1.8 2.1 2.4 2.7 3
Time(s) Time(s)

(c) (d)

Figure 17.  Experimental test results of DFPID-HSA: (a) No-load (b) Fixed Load (c) variable load (d) Speed
changes.

Controllers/
performance Oscillation range under Undershoot under Oscillation range under Settling time under
indicators no load (r/min) fixed load (− r/min) variable load (r/min) speed changes (s)
PID
Value [1957.93, 2031.74] 90.04 [1930.95, 2046.15] 0.65
Percentage 3.69% 4.50% 5.76% 65%
FuzzyPID
Value [1949.95, 2025.35] 15.43 [1922.57, 2020.00] 0.30
Percentage 3.77% 0.77% 4.87% 30%
PSO-FuzzyPID
Value [1952.59, 2032.41] 30.68 [1932.77, 2032.05] 0.28
Percentage 3.99% 1.53% 4.96% 28%
GA-PID-FLC
Value [1956.17, 2029.20] 20.86 [1939.37, 2030.31] 0.25
Percentage 3.65% 1.04% 4.55% 25%
DPNN-FuzzyPID
Value [1969.79, 2016.94] 24.14 [1954.35, 2019.70] 0.20
Percentage 2.36% 1.21% 3.27% 20%
DFPID-HSA
Value [1986.79, 2005.78] 8.06 [1982.92, 2009.18] 0.16
Percentage 0.95% 0.40% 1.31% 16%

Table 11.  The comparison of performance indicators under different conditions.

show that DFPID-HSA is superior to other algorithms in the field of steady-state performance indicators, tran-
sient performance indicators, and integral performance indicators. In addition, the sensitivity analysis of DFPID-
HSA is performed to evaluate its robustness under the condition of variable mechanical parameters. Finally, an
experimental platform for the BLDCM drive system is built to further demonstrate the superiority and feasibility
of DFPI-HSA in practical applications.

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 17

Vol.:(0123456789)
www.nature.com/scientificreports/

Data availability
Data analysis in the current study is available from the corresponding author on reasonable request.

Received: 4 January 2022; Accepted: 24 June 2022

References
1. Cabuk, A. S. Simulation of the effect of segmented axial direction magnets on the efficiency of in-wheel permanent magnet brush-
less DC motors used in light electric vehicles based on finite element method. Electr. Eng. 103(6), 3111–3117. https://​doi.​org/​10.​
1007/​s00202-​021-​01301-w (2021).
2. Godfrey, A. J. & Sankaranarayanan, V. A new electric braking system with energy regeneration for a BLDC motor driven electric
vehicle. Eng. Sci. Technol. 21(4), 704–713. https://​doi.​org/​10.​1016/j.​jestch.​2018.​05.​003 (2018).
3. Carev, V., Rohá, J., Ipo, M. & Schmirler, M. A multilayer brushless DC motor for heavy lift drones. Energies 14(9), 2504. https://​
doi.​org/​10.​3390/​en140​92504 (2021).
4. Feng, J., Liu, K. & Wang, Q. Scheme based on buck-converter with three-phase H-bridge combinations for high-speed BLDC
motors in aerospace applications. IET Electr. Power App. 12(3), 405–414. https://​doi.​org/​10.​1049/​iet-​epa.​2017.​0615 (2017).
5. Sen, A. & Singh, B. Peak current detection starting based position sensorless control of BLDC motor drive for PV array fed irriga-
tion pump. IEEE T. Ind. Appl. 57(3), 2569–2577. https://​doi.​org/​10.​1109/​TIA.​2021.​30668​31 (2021).
6. SangWook, L. & Soo-Whang, B. A study on the improvement of the cam phase control performance of an electric continuous
variable valve timing system using a cycloid reducer and BLDC motor. Microsyst. Technol. 26(1), 59–70. https://​doi.​org/​10.​1007/​
s00542-​019-​04411-5 (2020).
7. Guerra, R. H. et al. Digital twin-based optimization for ultraprecision motion systems with backlash and friction. IEEE Access.
7(2019), 93462–93472. https://​doi.​org/​10.​1109/​ACCESS.​2019.​29281​41 (2019).
8. Elkholy, M. M. & El-Hay, E. A. Efficient dynamic performance of brushless DC motor using soft computing approaches. Neural
Comput. Appl. 32(2), 1–14. https://​doi.​org/​10.​1007/​s00521-​019-​04090-3 (2020).
9. Premkumar, K. & Manikandan, B. V. Bat algorithm optimized fuzzy PD based speed controller for brushless direct current motor.
Eng. Sci. Technol. 19(2), 818–840. https://​doi.​org/​10.​1016/j.​jestch.​2015.​11.​004 (2016).
10. Gobinath, S. & Madheswaran, M. Deep perceptron neural network with fuzzy PID controller for speed control and stability analysis
of BLDC motor. Soft Comput. 24(13), 10161–10180. https://​doi.​org/​10.​1007/​s00500-​019-​04532-z (2020).
11. Mu, S., Shibata, S., Yamamoto, T., Nakashima, S., Tanaka, K. Speed control of ultrasonic motor using a variable gain type PID
control based on neural networks. in The 7th International Conference on Intelligent Systems and Image Processing 2019, 2019(1),
103–108 (2019). https://​doi.​org/​10.​12792/​icisi​p2019.​020
12. Dat, N. T., Cao, V. K. & Anh, H. Optimal FOC-PID parameters of BLDC motor system control using parallel PM-PSO optimiza-
tion technique. Int. J. Comput. Int. Syst. 14(1), 1142–1154. https://​doi.​org/​10.​2991/​ijcis.d.​210319.​001 (2021).
13. Xie, W., Wang, J. S. & Wang, H. B. PI controller of speed regulation of brushless DC motor based on particle swarm optimization
algorithm with improved inertia weights. Math. Probl. Eng. 2019(2671792), 1–12. https://​doi.​org/​10.​1155/​2019/​26717​92 (2019).
14. Demirtas, M. Off-line tuning of a PI speed controller for a permanent magnet brushless DC motor using DSP. Energ. Convers.
Manage 52(1), 264–273. https://​doi.​org/​10.​1016/j.​encon​man.​2010.​06.​067 (2011).
15. Haber, R. E., Alique, J. R., Alique, A., Hernández, J. & Uribe-Etxebarria, R. Embedded fuzzy-control system for machining pro-
cesses: Results of a case study. Comput. Ind. 50(3), 353–366. https://​doi.​org/​10.​1016/​S0166-​3615(03)​00022-8 (2003).
16. Ramı́rez, M., Haber, R., Peña, V. & Rodrı́guez, I. Fuzzy control of a multiple hearth furnace. Comput. Ind. 54(1), 105–113. https://​
doi.​org/​10.​1016/j.​compi​nd.​2003.​05.​001 (2004).
17. He, M., Zhang, T., Huang, J. & Luo, C. Speed control study of brushless DC motor based on fuzzy optimization PID. IOP Conf.
Series Mater. Sci. Eng. 768(4), 042013. https://​doi.​org/​10.​1088/​1757-​899X/​768/4/​042013 (2020).
18. Yin, H., Yi, W., Wang, K., Guan, J. & Wu, J. Research on brushless DC motor control system based on fuzzy parameter adaptive
PI algorithm. AIP Adv. 10(10), 105208. https://​doi.​org/​10.​1063/5.​00250​00 (2020).
19. Premkumar, K. & Manikandan, B. V. Fuzzy PID supervised online ANFIS based speed controller for brushless dc motor. Neuro-
computing 157(2015), 76–90. https://​doi.​org/​10.​1016/j.​neucom.​2015.​01.​032 (2015).
20. Valdez, F., Melin, P. & Castillo, O. A survey on nature-inspired optimization algorithms with fuzzy logic for dynamic parameter
adaptation. Expert Syst. Appl. 41(14), 6459–6466. https://​doi.​org/​10.​1016/j.​eswa.​2014.​04.​015 (2014).
21. Rubaai, A. & Young, P. Hardware/software implementation of fuzzy-neural-network self-learning control methods for brushless
DC motor drives. IEEE T. Ind. Appl. 52(1), 414–424. https://​doi.​org/​10.​1109/​TIA.​2015.​24681​91 (2016).
22. Rubaai, A., Castro-Sitiriche, M. J., Ofoli, A. R.: DSP-Based Laboratory Implementation of Hybrid Fuzzy-PID Controller Using
Genetic Optimization for High-Performance Motor Drives. in Industry Applications Conference, 2007. 42nd IAS Annual Meeting.
Conference Record of the 2007 IEEE, IEEE, 44 (6), 1977–1986 (2008). https://​doi.​org/​10.​1109/​TIA.​2008.​20063​47
23. Hu, H., Wang, T., Zhao, S. & Wang, C. Speed control of brushless direct current motor using a genetic algorithm-optimized fuzzy
proportional integral differential controller. Adv. Mech. Eng. 11(11), 168781401989019. https://d ​ oi.o
​ rg/1​ 0.1​ 177/1​ 68781​ 40198​ 90199
(2019).
24. Li, H. C., Zhou, K. Q., Mo, L. P., Zain, A. M. & Qin, F. Weighted fuzzy production rule extraction using modified harmony search
algorithm and BP neural network framework. IEEE Access 8(2020), 186620–186637. https://​doi.​org/​10.​1109/​ACCESS.​2020.​30299​
66 (2020).
25. Fu, L., Zhu, H., Zhang, C., Ouyang, H. & Li, S. Hybrid harmony search differential evolution algorithm. IEEE Access 9(2021),
21532–21555. https://​doi.​org/​10.​1109/​ACCESS.​2021.​30555​30 (2021).
26. Pan, Q. K., Suganthan, P. N., Tasgetiren, M. F. & Liang, J. J. A self-adaptive global best harmony search algorithm for continuous
optimization problems. Appl. Math. Comput. 216(3), 830–848. https://​doi.​org/​10.​1016/j.​amc.​2010.​01.​088 (2010).
27. Zou, D., Gao, L., Wu, J. & Li, S. Novel global harmony search algorithm for unconstrained problems. Neurocomputing 73(16–18),
3308–3318. https://​doi.​org/​10.​1016/j.​neucom.​2010.​07.​010 (2010).
28. Rahideh, A., Korakianitis, T. Brushless DC motor design using harmony search optimization. in 2011 2nd International Conference
on Control, Instrumentation and Automation (ICCIA), 2011, 44–50 (2011). https://​doi.​org/​10.​1109/​ICCIA​utom.​2011.​63566​28
29. Goel, N., Chacko, S. & Patel, R. N. PI controller tuning based on stochastic optimization technique for performance enhancement
of DTC induction motor drives. J. Inst. Eng. (India) Series B. 101(6), 1–8. https://​doi.​org/​10.​1007/​s40031-​020-​00496-z (2020).
30. Valdez, F., Castillo, O. & Peraza, C. Fuzzy logic in dynamic parameter adaptation of harmony search optimization for benchmark
functions and fuzzy controllers. Int. J. Fuzzy Syst. 22(4), 1–14. https://​doi.​org/​10.​1007/​s40815-​020-​00860-7 (2020).
31. Precup, R. E. & David, R. C. Nature-inspired optimization algorithms for fuzzy controlled servo systems. Butterworth-Heinemann
Elsevier Oxford UK Chapter 2, 55–22. https://​doi.​org/​10.​1016/​C2018-0-​00098-5 (2019).
32. Vanchinathan, K. & Selvaganesan, N. Adaptive fractional order pid controller tuning for brushless dc motor using artificial bee
colony algorithm. Results Control Optim. 4(2021), 100032. https://​doi.​org/​10.​1016/j.​rico.​2021.​100032 (2021).
33. Bavafa-Toosi, Y. Stability analysis—ScienceDirect. Introduction Linear Control Syst. 2019, 201–256. https://​doi.​org/​10.​1016/​B978-
0-​12-​812748-​3.​00003-3 (2019).

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 18

Vol:.(1234567890)
www.nature.com/scientificreports/

34. Xie, D., Zhu, J. Q. & Wang, F. Fuzzy PID control to feed servo system of CNC machine tool—ScienceDirect. Procedia Eng. 29(1),
2853–2858. https://​doi.​org/​10.​1016/j.​proeng.​2012.​01.​403 (2012).
35. Hazari, M. R. et al. Fuzzy logic based virtual inertia control of DFIG based wind generator for stability improvement of hybrid
power system. IEEJ Trans. Power Energy 138(8), 733–744. https://​doi.​org/​10.​1541/​ieejp​es.​138.​733 (2018).
36. Mirzaeinejad, H., Mirzaei, M. & Kazemi, R. Enhancement of vehicle braking performance on split-roads using optimal integrated
control of steering and braking systems. P. I. Mech. Eng. K.-J. Mul. 230(4), 401–415. https://​doi.​org/​10.​1177/​14644​19315​617332
(2016).
37. Zong, W. G., Kim, J. H. & Loganathan, G. V. A new heuristic optimization algorithm: Harmony search. SIMULATION 76(2),
60–68. https://​doi.​org/​10.​1177/​00375​49701​07600​201 (2001).
38. Zhao, F. Q., Liu, Y., Zhang, C. & Wang, J. B. A self-adaptive harmony PSO search algorithm and its performance analysis. Expert
Syst. Appl. 42(21), 7436–7455. https://​doi.​org/​10.​1016/j.​eswa.​2015.​05.​035 (2015).
39. Yan, H. C., Hong, W. C., Shen, W. & Ning, N. H. Electric load forecasting based on a least squares support vector machine with
fuzzy time series and global harmony search algorithm. Energies 9(2), 70. https://​doi.​org/​10.​3390/​en902​0070 (2016).
40. Chang, M. S. & Ku, T. C. A slicing tree representation and QCP-model-based heuristic algorithm for the unequal-area block facility
layout problem. Math. Probl. Eng. 2013(853586), 1–19. https://​doi.​org/​10.​1155/​2013/​853586 (2013).
41. Cheng, M. Y., Prayogo, D., Wu, Y. W. & Lukito, M. M. A Hybrid Harmony Search algorithm for discrete sizing optimization of
truss structure. Automat. Constr. 69(2016), 21–33. https://​doi.​org/​10.​1016/j.​autcon.​2016.​05.​023 (2016).
42. Premkumar, K. & Manikandan, B. V. Stability and performance analysis of ANFIS tuned PID based speed controller for brushless
DC motor. Curr. Signal Transduct. Ther. 13(1), 19–30. https://​doi.​org/​10.​2174/​15743​62413​66618​02261​05809 (2018).
43. Dutta, P. & Nayak, S. K. Grey wolf optimizer based PID controller for speed control of BLDC motor. J. Electr. Eng. Technol. 16(2),
955–961. https://​doi.​org/​10.​1007/​s42835-​021-​00660-5 (2021).
44. Khubalkar, S. W., Junghare, A. S., Aware, M. V., Chopade, A. S. & Da, S. S. Demonstrative fractional order—PID controller based
DC motor drive on digital platform. ISA T 82(SI), 79–93. https://​doi.​org/​10.​1016/j.​isatra.​2017.​08.​019 (2017).
45. Alkrwy, A., Hussein, A. A., Atyia, T. H. & Khamees, M. Adaptive tuning of PID controller using crow search algorithm for DC
motor. IOP Conf. Series Mater. Sci. Eng. 1076(1), 012001. https://​doi.​org/​10.​1088/​1757-​899X/​1076/1/​012001 (2021).

Author contributions
T.W.: conceptualization, methodology, writing- original draf preparation, validation. H.W.: funding acquisition,
review and editing. C.W.: project administration. H.H.: formal analysis, resources, supervision, writing—review
and editing.

Funding
This work supported by the Science and Technology Development Project of Jilin Province [Grant numbers
20200201009JC, 20210201051GX and 20210203161SF], and the Education Department Project of Jilin Province
[Grant number JJKH20220686KJ].

Competing interests 
The authors declare no competing interests.

Additional information
Correspondence and requests for materials should be addressed to C.W.
Reprints and permissions information is available at www.nature.com/reprints.
Publisher’s note  Springer Nature remains neutral with regard to jurisdictional claims in published maps and
institutional affiliations.
Open Access  This article is licensed under a Creative Commons Attribution 4.0 International
License, which permits use, sharing, adaptation, distribution and reproduction in any medium or
format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the
Creative Commons licence, and indicate if changes were made. The images or other third party material in this
article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the
material. If material is not included in the article’s Creative Commons licence and your intended use is not
permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from
the copyright holder. To view a copy of this licence, visit http://​creat​iveco​mmons.​org/​licen​ses/​by/4.​0/.

© The Author(s) 2022

Scientific Reports | (2022) 12:11316 | https://doi.org/10.1038/s41598-022-15487-x 19

Vol.:(0123456789)

You might also like