You are currently viewing a new version of our website. To view the old version click .
Electronics
  • Article
  • Open Access

25 November 2025

NCS-BWO Algorithm for Permanent Magnet Synchronous Motor Parameter Identification

,
and
1
School of Electrical Engineering, Dalian Jiaotong University, Dalian 116028, China
2
School of Transportation Engineering, Dalian Jiaotong University, Dalian 116028, China
*
Author to whom correspondence should be addressed.

Abstract

To address the problems of low identification accuracy, poor global search capability, and susceptibility to local optima in permanent magnet synchronous motor (PMSM) parameter identification, this paper proposes a hybrid niching clonal selection black widow optimization (NCS-BWO) algorithm. This algorithm combines the exploitation capability of black widow optimization (BWO) with the exploration capability of the clonal selection algorithm (CSA). First, a niching strategy called nearest-better clustering (NBC) is used to generate sub-populations, incorporating a cluster size optimization mechanism to ensure a balanced population distribution. Subsequently, adaptive Gaussian mutation and elite differential evolution (DE) mutation operators are introduced during the CSA hypermutation stage. Finally, the high-quality population resulting from the niching clonal selection algorithm (NCSA) serves as the initial population for the BWO. The effectiveness of the NCS-BWO algorithm was validated using six benchmark test functions, and its performance was compared with that of six other algorithms. Furthermore, a full-rank discrete model of the PMSM was established, and the NCS-BWO algorithm was applied for parameter identification. Both the simulation and experimental results demonstrate that the proposed NCS-BWO algorithm achieves superior accuracy in PMSM parameter identification.

1. Introduction

Permanent magnet synchronous motors (PMSMs) offer numerous advantages, including simple structure, excellent controllability, and high power density. They have garnered widespread attention and have been extensively applied in major industrial sectors [,]. However, PMSM parameters are susceptible to environmental effects. For instance, temperature variations can cause changes in the stator resistance and flux linkage, and magnetic saturation may cause changes in the stator inductance, leading to degraded performance in PMSM drive systems [,]. Therefore, obtaining precise motor parameters and mathematical models is crucial for improving the control performance of PMSMs [,,].
PMSM parameter identification can be categorized as offline or online. Offline identification methods primarily encompass experimental measurements and finite element analysis, which are widely applied in controller and motor designs. Reference [] employed a sinusoidal current control strategy with harmonic voltage injection to reduce unnecessary harmonic losses. It identified magnetic flux by detecting the back electromotive force, achieving good identification accuracy but identifying fewer parameters. Reference [] proposed an offline parameter self-learning method with error-estimation compensation, which utilized a finite element approach to design the PMSM parameter identification system. While this method enables motor parameter acquisition, it presents challenges due to the complexity of data collection. Offline parameter identification fails to reflect parameter variations during actual motor operation, and is unsuitable for applications that require continuous operation. Online identification methods, by acquiring real-time motor operating data and combining estimation algorithms, enable accurate, real-time parameter estimation and enhance system control performance with strong real-time capability and adaptability [].
Online PMSM parameter identification methods include recursive least squares (RLS) [], extended Kalman filter (EKF) [], model reference adaptive system (MRAS) [,], and intelligent algorithms []. Reference [] combined RLS with current derivative methods to overcome the rank deficiency issue, thereby enabling the identification of all PMSM electrical parameters under steady-state conditions. Reference [] proposed a filtering algorithm with a dynamic forgetting factor; however, it could only identify the stator resistance and inductance. The EKF was employed for parameter estimation in [,,], its design complexity and high sensitivity to noise often result in low identification accuracy. References [,] utilized MRAS for parameter identification, but the adaptive design is intricate. Traditional online identification methods face challenges in terms of convergence speed, robustness, or implementation complexity.
In recent years, metaheuristic algorithms have achieved remarkable efficacy in PMSM parameter identification, owing to their computational simplicity, strong optimization capabilities, and straightforward principles. Reference [] proposed an enhanced raccoon optimization algorithm (EROA) that improved the resistance identification accuracy but exhibited low accuracy in stator inductance and magnetic flux identification. Reference [] proposed an improved fuzzy particle swarm optimization (PSO) algorithm. While retaining the single-population PSO framework, this approach still struggles to maintain stable subpopulations and simultaneously locate multiple extreme points. Reference [] introduced a chaotic inertial weight decay strategy into the particle swarm optimization algorithm, improving the identification accuracy and speed, but increasing the algorithmic complexity.
To further enhance algorithmic performance, the hybrid intelligent optimization algorithm has gradually emerged as a research hotspot. By integrating different optimization strategies, these algorithms effectively balance exploration and exploitation capabilities, demonstrating significant advantages in solving complex problems. For instance, the hybrid fireworks grey wolf optimizer (FWGWO) algorithm proposed in [] combined the exploitation capability of the grey wolf optimizer (GWO) with the exploration capability of the fireworks algorithm (FWA) through an adaptive balance coefficient, showing excellent performance in benchmark function tests, though its applicability in real-world dynamic environments requires further validation. Reference [] integrated the invasive weed optimization (IWO) algorithm with cuckoo search (CS), which significantly improved performance, but the resulting algorithm’s parameter sensitivity remains to be optimized. Reference [] integrated the global exploration ability of the artificial bee colony (ABC) algorithm with the local exploitation ability of the genetic algorithm (GA), and its performance is superior to other hybrid algorithms. However, this hybrid approach relies heavily on empirical parameter tuning, and its scalability for multi-objective optimization problems needs further exploration. While these studies have achieved progress in their respective fields, they commonly face challenges such as weak adaptability to dynamic environments and complex parameter tuning.
Peña-Delgado et al. proposed the black widow optimization (BWO) algorithm in 2020, which was inspired by the unique mating behavior of black widow spiders []. This algorithm primarily simulates the distinctive reproductive behavior of the spider, featuring a simple structure and rapid optimization speed [,,]. It can achieve satisfactory results under conditions of low population size and few iterations. However, the BWO algorithm exhibits a weak global search capability, making it prone to becoming trapped in local optima. The clonal selection algorithm (CSA) is a branch of immune algorithms. Owing to its strong search capabilities, CSA has been widely applied in numerous fields [,]. However, the CSA suffers from insufficient local search ability and slow convergence speed.
To address these limitations, this paper proposes a niching clonal selection black widow optimization (NCS-BWO) algorithm. First, a niching method called nearest-better clustering (NBC) is employed to divide the initial population into several clusters, and a cluster size optimization mechanism is incorporated to ensure an even distribution. Each cluster evolves independently using the CSA. Subsequently, during the hypermutation phase of CSA, an adaptive Gaussian mutation operator and an elite differential evolution (DE) mutation operator are introduced to enhance the exploratory performance. Finally, the results of niching clonal selection algorithm (NCSA) are used as the initial population of BWO, thereby allowing the BWO algorithm to start from an initial population that is closer to the optimal one than the randomly generated initial population. By integrating NCSA and BWO, the NCS-BWO achieves a proper balance between exploration and exploitation. Furthermore, the simulation model and experimental platform for PMSM based on vector control were established. Both simulation and experimental results verify the superiority of the proposed NCS-BWO algorithm in PMSM parameter identification.

2. PMSM Mathematical Model

The PMSM is a complex nonlinear system characterized by strong coupling and multiple variables. To facilitate analysis, PMSM modeling typically ignores disturbances such as core eddy currents, magnetic saturation effects, harmonics, and hysteresis losses. In the dq-axis rotating coordinate system, the voltage equations for the PMSM can be expressed as follows:
u d = R s i d + L d d i d d t ω e L q i q u q = R s i q + L q d i q d t + ω e L d i d + ω e ψ f ,
where id and iq are the dq-axis currents, ud and uq represent the dq-axis voltages, ωe represents the electrical angular velocity, Rs denotes the stator resistance, Ld represents the d-axis inductance, Lq represents the q-axis inductance, and ψf denotes the permanent magnet flux linkage.
When the PMSM operates stably at a constant speed under vector control, the influences of id and iq are negligible, which is approximated as
d i d d t = 0 d i q d t = 0
.
Equation (1) can be simplified as
u d = R s i d ω e L q i q u q = R s i q + ω e L d i d + ω e ψ f .
To facilitate parameter estimation, Equation (3) needs to be discretized as follows:
u d ( k ) = ω e ( k ) L q i q ( k ) u q ( k ) = R s i q ( k ) + ω e ( k ) ψ f ,
where ud(k) and uq(k) denote the data collected at time step k.
This study primarily investigates parameter identification for surface-mounted PMSMs, assuming equal dq-axis inductances, that is, Ld = Lq = Ls. To identify motor parameters, an identification model must be constructed. The parameters that require simultaneous identification of the PMSM are Rs, Ls, and ψf. However, the rank of (4) is two, it is not possible to directly obtain the values for all parameters simultaneously. To address this problem, when the PMSM operates under steady-state conditions, a negative d-axis current for flux-weakening is injected, in addition to the conventional id = 0 vector control strategy, thereby achieving a full-rank mode []. The timing diagram of the d-axis current injection and data acquisition is shown in Figure 1, both Data1 and Data2 contain complete sampling data of id = 0 and id = −2.
Figure 1. Data acquisition sequence diagram.
The same amount of data is collected under id = 0 and id = −2, and the fourth-order identification model is obtained as follows:
u d 0 ( k ) = L ^ s ω e 0 ( k ) i q 0 ( k ) u q 0 ( k ) = R ^ s i q 0 ( k ) + ψ ^ f ω e 0 ( k ) u d 1 ( k ) = R ^ s i d 1 ( k ) L ^ s ω e 1 ( k ) i q 1 ( k ) u q 1 ( k ) = R ^ s i q 1 ( k ) + L ^ s ω e 1 ( k ) i d 1 ( k ) + ψ ^ f ω e 1 ( k ) ,
Where u d 0 ( k ) and u q 0 ( k ) denote the data collected at time step k under the control strategy id = 0. u d 1 ( k ) and u q 1 ( k ) represent data collected at time step k under control strategy id = −2. R ^ s , L ^ s , and ψ ^ f are the parameter identification results of the algorithm.

3. Algorithm Improvement

3.1. BWO Algorithm

The black widow optimization (BWO) algorithm simulates the linear and spiral movements of black widow spiders within their webs. The position update formula for the black widow spider is
X i ( t + 1 ) = X b e s t m X r 1 ( t ) ,                         rand ( ) 0 . 3   X b e s t cos ( 2 π β ) X i ( t ) ,     otherwise ,
where t denotes the current iteration count, Xi (t + 1) and Xi (t) represent the positions of the i-th individual before and after its update, respectively. Xbest denotes the current optimal individual position, Xr1 is the position of the randomly selected r1-th individual, with ir1. m is a random float in [0.4, 0.9], and β is a random float in [−1, 1].
Sex pheromones are crucial in the mating behavior of black widow spiders. The hunger level of female spiders can be reflected through sex pheromone secretion, with well-nourished females producing more sex pheromones and male spiders being attracted to females with higher pheromone secretion. The sex pheromone rate value is defined as follows:
p h e r o m o n e ( i ) = f i t n e s s max f i t n e s s ( i ) f i t n e s s max f i t n e s s min ,
where fitness(i) denotes the fitness value of the i-th black widow spider, fitnessmax and fitnessmin represent the maximum and minimum fitness values, respectively.
Females with low pheromone levels are considered hungry and cannibalistic. As a result, they are excluded from the mating process and replaced by other individuals in the population. For spiders with pheromone rates of less than or equal to 0.3, the position update formula is as follows:
X i ( t ) = X b e s t + 1 2 X r 2 ( t ) ( 1 ) ρ X r 3 ( t ) ,
where Xi(t) represents the position of the female spider with the low pheromone value to be updated, r2 and r3 correspond to random integers selected between 1 and the maximum population value., with r2r3. Xr2 and Xr3 denote the r2-th and r3-th individuals selected from the population, respectively, and ρ is a randomly generated binary number, ρ ∈ {0, 1}.

3.2. NCS-BWO Algorithm Design

The classic BWO exhibits weak global search capabilities and a tendency to converge to suboptimal solutions, thus failing to meet the high-precision requirement for PMSM parameter identification. To address this, this study proposes a hybrid NCS-BWO algorithm to improve its global search ability and escape local optima.

3.2.1. NCSA

The clonal selection algorithm (CSA) originates from clonal selection theory in biological immune systems. The underlying theory posits that when an antigen invades, B cells in the immune system recognize it and undergo cloning and mutation. Similarly to other immune algorithms, CSA first randomly generates a population of antibodies, each corresponding to a candidate solution. The antibodies are then matched to the antigen. Based on the degree of matching, antibodies with strong adaptability are selected for replication and mutation to generate mature antibodies. After re-evaluation and selection, the next-generation population is obtained.
The classic CSA exhibits population homogeneity after iterations, leading to insufficient diversity when transitioning to the global search phase of the BWO. Therefore, this study integrates a niching strategy called nearest-better clustering (NBC) with CSA to form a niching clonal selection algorithm (NCSA). The niching method typically divides the entire population into several subpopulations, either explicitly or implicitly. Ideally, each subpopulation tracks an optimal solution until it converges. Compared with other niching methods, NBC offers significant advantages: it is adaptable to different problems and requires setting only one parameter. An excessive number of parameters complicates the algorithm and makes it difficult to handle []. The NBC strategy performs adaptive partitioning based on individual fitness and distance, dividing the population into multiple clusters to enhance the diversity during optimization. The specific steps are as follows:
Step 1: The population is partitioned into multiple clusters, with the best individual within each cluster designated as the seed, denoted as Xseed.
Step 2: Calculate the Euclidean distance between pairs of individuals.
Step 3: Excluding the best individual, the nearest-better neighbor Xnear,i of each individual Xi is identified based on the Euclidean distance and an edge to be created between them.
Step 4: Delete edges exceeding the threshold length. The threshold is expressed as follows:
φ = λ × l m e a n ,
where φ is the threshold, λ is a control parameter and lmean is the average distance of all edges. Each connected component corresponds to a cluster.

3.2.2. Cluster Size Optimization Mechanism

This study incorporates a cluster size optimization mechanism into the NBC strategy, which regulates the number of antibodies within each cluster. An excessively large cluster not only diminishes the number of individuals in other clusters, but also increases the computational overhead, thereby degrading algorithmic performance. Therefore, to achieve a balanced antibody distribution across clusters, a cluster-size optimization mechanism is employed. The cluster size is controlled by the parameter nmax, and the disadvantageous individual removal operator dmin is employed. The specific procedure is as follows:
Step 1: The number of antibodies in each cluster is calculated. If the number exceeds nmax, the top nmax individuals are retained and the number of removed individuals is recorded.
Step 2: If the total number of antibodies removed in Step1 is less than dmin, then the worst antibody from each cluster is iteratively removed until the total number of removals reaches dmin.
Step 3: Replace all antibodies removed in Step 1 and Step2 with newly generated random antibodies.

3.2.3. Adaptive Gaussian Mutation and Elite DE Mutation Strategy

In this study, an adaptive Gaussian mutation operator and an elite DE mutation operator are introduced into the hypermutation phase of CSA. The variable step size of the Gaussian mutation is correlated with the maximum distance of each cluster to enhance its adaptability across different clusters. Meanwhile, an elite DE mutation operator, which mimics the DE mutation mechanism, is introduced to enhance the convergence capability of the clusters.
The Gaussian mutation modifies the original position using a random number following a normal distribution with the mean μ and the variance σ. The probability density function of the Gaussian distribution is
f ( x ) = 1 2 π σ exp x μ 2 2 σ 2 .
This study employs the standard Gaussian probability density function, where μ and σ are set to 0 and 1, respectively. Gaussian mutation is used to update the individuals within the cluster.
S i j = X i j + α G a u s s i a n ( 0 , 1 ) ,
where Xij and Sij denote the positions of the i-th individuals in the j-th dimension before and after Gaussian mutation, respectively. α represents the step size factor, and Gaussian(0,1) is a random variable that follows a Gaussian distribution. This study combines the weight coefficient α with the coverage distance of the cluster, where the coverage distance is the maximum distance between antibodies within a cluster. During the initial clustering phases, the substantial coverage distance results in a large α value, inducing strong perturbations and facilitating significant antibody displacements for extensive global exploration. As the iterations proceed, the cluster radius decreases, leading to a reduction in α and finer movements conducive to localized refinement. The coefficient α is defined as follows:
α = 1 2 × c r D ,
where cr is the coverage distance of cluster c, and D is the dimension of the fitness function.
To guide the antibodies toward the optimal individual and ensure robust optimization capability, an elite DE mutation operator is employed.
S i j = X i j + 0.5 × ( X s e e d , j X i j ) ,
where Xseed,j denotes the position of the optimal individual in the j-th dimension of each cluster.
The position of the seed antibody remains unaltered throughout the hypermutation process. The clones of the remaining antibodies undergo adaptive Gaussian or elite DE mutations, with each mutation type applied with an equal probability of 50%. Finally, each antibody in the population is compared with its corresponding mutated clone and the superior antibody is selected for the next generation.
X i ( t + 1 ) = S i b e s t ( t )   ,   f ( S i b e s t ( t ) ) > f ( X i ( t ) ) X i ( t )           , otherwise ,
where S i b e s t denotes the optimal mutated clone of the i-th antibody.

3.3. Sensitivity Analysis of Algorithm Parameters

According to reference [], the value of the control parameter λ significantly influences the performance of the algorithm. An increase in λ leads to a reduction in the number of clusters, whereas decreasing its value results in a greater number of clusters. As indicated in references [,], the parameter nmax serves to restrict the number of antibodies within each cluster. An excessive number of antibodies in a cluster not only fails to significantly improve solution quality but also degrades algorithmic performance. In this study, a parameter sensitivity analysis was conducted using the penalized function. Each parameter was run 20 times under different value conditions, and the average value was taken as the result. Table 1 summarizes the relationship between the parameter settings and the corresponding fitness values. The expression of the penalized function is as follows:
f ( x ) = 0 . 1 { sin 2 ( 3 π x 1 ) + i = 1 n ( x i 1 ) 2 [ 1 + sin 2 ( 3 π x i + 1 ) ] + ( x n 1 ) 2 [ 1 + sin 2 ( 2 π x n ) ] }   + i = 1 n u ( x i , 5 , 100 , 4 ) , x i 5 , 5
u ( x i , a , k , m ) = k ( x i a ) m             ,     x i > a , 0                                           ,   a < x i < a , k ( x i a ) m     ,   x i < a .
Table 1. Relationship between the fitness function and λ, nmax.
Table 1 shows that λ and nmax have the minimum fitness function when they are 2 and 10.

3.4. Algorithm Performance Evaluation

To facilitate the reproduction of the proposed NCS-BWO algorithm, the key parameters used in this study are summarized in Table 2. These parameter values were determined through the sensitivity analysis and were used in all subsequent benchmark tests and PMSM identification experiments.
Table 2. Key parameters of the NCS-BWO algorithm.
To validate the superiority of the proposed NCS-BWO algorithm, a comprehensive performance evaluation was performed, comparing its optimization performance with eight other algorithms, including NCSA, BWO, CSA, genetic algorithm (GA), particle swarm optimization (PSO), whale optimization algorithm (WOA), greylag goose optimization (GGO), and black-winged kite algorithm (BKA) using six benchmark test functions from the CEC2005 benchmark set. The specific details of these functions are listed in Table 3, which includes two unimodal functions (F1 and F2), two multimodal functions (F3 and F4), and two fixed-dimensional multimodal functions (F5 and F6). The constant values required for the computation of F6 are provided in Table 4.
Table 3. Benchmark function.
Table 4. Constant values for benchmark function F6.
Table 5 presents the results of the nine algorithms on six benchmark functions, with each algorithm independently executed 20 times, and the mean and standard deviation values serving as the evaluation criterion. Table 5 indicates that the NCS-BWO demonstrates the best optimization performance across all test functions. In the F1 and F2 benchmark tests, NCS-BWO achieves the smallest optimization values. Although NCSA ranks second, it still outperforms the other algorithms. For multimodal function F3, all algorithms except GA and PSO converge near the optimal. In the fixed-dimensional multimodal function F6, NCS-BWO achieves superior optimization results compared with the other six algorithms. At the end of Table 5, two relatively advanced algorithms, GGO and BKA, are presented. Under the same conditions, the solution ability of NCS-BWO is superior to these two advanced algorithms, indicating that the algorithm proposed in this paper effectively improves the performance of the original algorithm.
Table 5. Optimization results of various algorithms based on six test functions.
The convergence curves of the nine algorithms are plotted in Figure 2 to observe their convergence speeds. It can be intuitively observed from Figure 2 that the NCS-BWO algorithm demonstrates a fast convergence rate and strong optimization capability, which is evident across all test functions. As shown in Figure 2a,b, corresponding to F1 and F2, both PSO and GA exhibit relatively poor optimization performance, whereas the other algorithms show better overall performance, with NCS-BWO achieving the highest convergence accuracy. For the benchmark function tests F3, F4, and F5, shown in Figure 2c–e, most algorithms converge near the optimal value, but NCS-BWO converges the fastest. Regarding the benchmark function test F6, as depicted in Figure 2f, BWO tends to become trapped in local optima, whereas NCS-BWO and NCSA converge near the optimal value, with NCS-BWO achieving the fastest convergence speed. As shown above, NCS-BWO effectively enhances global search capabilities through the NCSA. It also leverages the rapid optimization capabilities of BWO to achieve fast convergence and high accuracy. The NCS-BWO algorithm demonstrates significant advantages in terms of global search accuracy, convergence speed, and stability, validating its effectiveness and superiority in complex optimization problems.
Figure 2. Convergence curves of the nine algorithms on six benchmark test functions: (a) F1; (b) F2; (c) F3; (d) F4; (e) F5; (f) F6.

4. PMSM Parameter Identification Design Based on NCS-BWO

4.1. Principles of PMSM Parameter Identification

The multi-parameter identification problem for the PMSM can be transformed into a system optimization problem. The procedure essentially involves comparing the identification model with the actual system to compute fitness values. The NCS-BWO algorithm is then employed to iteratively refine the parameters by screening these fitness values until a minimum is achieved. Finally, output the required recognition parameter values. Parameter identification actually involves constructing an appropriate fitness function, enabling the algorithm to obtain optimal motor parameters in the vector control system. Figure 3 illustrates the principle of PMSM parameter identification.
Figure 3. Schematic of PMSM parameter identification.
The fitness function in Figure 3 is defined as follows:
F ( R ^ s , L ^ s , ψ ^ f ) = λ 1 ( u d 0 ( k ) u ^ d 0 ( k ) ) 2   + λ 2 ( u q 0 ( k ) u ^ q 0 ( k ) ) 2   + λ 3 ( u d 1 ( k ) u ^ d 1 ( k ) ) 2   + λ 4 ( u q 1 ( k ) u ^ q 1 ( k ) ) 2 ,
where λ1, λ2, λ3, and λ4 denote the weighting factors of the fitness function. When the fitness values are equal, the weight distribution influences identification accuracy. u d 0 and u q 0 are the motor dq-axis voltage measurement values under the control of id = 0. u ^ d 0 and u ^ q 0 are the corresponding estimated values obtained from the collected data through the algorithm under the control of id = 0. u d 1 and u q 1 are the measured values of the motor dq-axis voltage when id = −2. u ^ d 1 and u ^ q 1 are the corresponding estimated values obtained from the collected data through the algorithm when id = −2. { R ^ s , L ^ s , ψ ^ f } is the parameter identification results of the algorithm.

4.2. Steps for PMSM Parameter Identification Using NCS-BWO

Step 1: Collect motor data under modes id = 0 and id = −2, including the dq-axis current, voltage, and electrical angular velocity.
Step 2: The algorithm iteration times and population size are set, and the initial population is randomly generated.
Step 3: The fitness of each antibody within the population is calculated using (17).
Step 4: The NBC strategy is employed to partition the population into multiple clusters.
Step 5: Apply the cluster size optimization mechanism to each cluster.
Step 6: Clone antibodies within each cluster.
Step 7: The positions of the seeds in the antibodies remains unchanged. The clones of the remaining antibodies undergo a Gaussian mutation using (11) or a DE mutation using (13). The mutation probabilities for both types are equal.
Step 8: Compare each antibody in the current population with its corresponding mutated clones using (14), selecting the better one to form the next-generation population.
Step 9: Set BWO’s initial population to the set of best solutions accumulated by NCSA, and the current optimal individual is recorded.
Step 10: Update all black widow spiders in the current population using (6).
Step 11: Perform sex pheromone analysis on all individuals using (7). Update individuals with sex pheromone values less than or equal to 0.3 using (8).
Step 12: The fitness values of all the individuals are calculated for the updated population. Evaluate each individual’s fitness value, and compare the fitness of the current optimal individual with the historical best fitness. If the current individual’s fitness exceeds the historical best, it is updated as the new optimal value and this optimal individual is saved; otherwise, it retains the original historical best value.
Step 13: Check whether the current iteration count is less than the set maximum iteration count. If the maximum iteration count is reached, output the historical optimal value and the optimal individual; otherwise, proceed to Step 10 and repeat the above process.
Figure 4 shows the flowchart of the NCS-BWO algorithm for PMSM parameter identification.
Figure 4. Flowchart of PMSM parameter identification based on NCS-BWO algorithm.

5. Simulation and Experimental Analysis

5.1. Simulation Analysis

A simulation model of the PMSM vector control system was established using Matlab/Simulink to validate the performance advantages of the NCS-BWO algorithm for PMSM parameter identification, as shown in Figure 5. The simulation configuration is for the motor to operate at the rated speed and rated torque. A search space spanning from 0 to 2 was defined for the identification of stator resistance, flux linkage, and stator inductance to evaluate the algorithm’s optimization performance. Relevant motor parameters are listed in Table 6.
Figure 5. Vector control system block diagram.
Table 6. PMSM parameters.
The simulation duration was set to 0.4 s. Table 7 summarizes the parameter configurations for the nine algorithms under comparison. Specifically, λ represents the threshold control parameter, nmax denotes the maximum number of antibodies within a single cluster, dmin is the individual removal operator, nc refers to the number of clones, pop indicates the population size, N1 is the number of iterations of NCSA, N2 is the number of iterations of the BWO algorithm. N is the total number of iterations. Pm and Pc correspond to the mutation rate and crossover rate, W represents the inertia weight, C1 and C2 denote the individual and social learning factors, respectively, and b defines the spiral coefficient.
Table 7. Parameter settings for the nine algorithms.
To validate the effectiveness of the NCS-BWO algorithm, a comparative study was conducted by applying the NCSA, BWO, CSA, PSO, GA, WOA, GGO, and BKA algorithms to PMSM parameter identification simulations. Each algorithm was independently executed 20 times to ensure statistical reliability, with the average of the outcomes adopted as the final result. A summary of the identification results and their corresponding errors is provided in Table 8, where F represents the average fitness convergence value, with lower values denoting greater accuracy in the identified parameters. The parameter identification and the fitness function curves are presented in Figure 6.
Table 8. Comparison of simulation results for seven parameters of identification algorithms.
Figure 6. Parameter identification curves of PMSM using nine algorithms in the simulation environment: (a) fitness function; (b) stator resistance; (c) stator inductance; (d) flux linkage.
According to the data in Table 8, it can be observed that NCS-BWO achieves the highest identification accuracy, with all parameter identification errors below 0.1%. The NCS-BWO exhibits the lowest average fitness value among the nine algorithms, confirming its superior performance in PMSM parameter identification. At the end of Table 8, two advanced algorithms, GGO and BKA, are introduced to compare their performance with that of NCS-BWO. Under the same conditions, the performance of NCS-BWO is superior to these two advanced algorithms, indicating that the algorithm proposed in this paper significantly improves the performance of the original algorithm.
Owing to the high degree of nonlinearity in the mathematical model of the PMSM, the designed fitness function exhibits multiple extrema points. This leads to significant fluctuations or poor convergence in the parameter identification results, posing a substantial challenge to the search capability and convergence of the algorithm. Figure 6 demonstrates that NCS-BWO, NCSA, BWO, CSA, WOA, GGO, and BKA exhibit superior optimization capabilities, whereas GA and PSO yield unsatisfactory stator resistance identification results that fail to satisfy the requirements. Although NCS-BWO and BWO exhibit similar convergence speeds, BWO is more prone to local optima. Despite achieving an accuracy comparable to that of NCS-BWO, NCSA exhibits a slower convergence. NCS-BWO employs a niching clonal selection strategy to enhance the global search capability while inheriting BWO’s rapid convergence property, enabling swift and smooth convergence toward real values.

5.2. Experimental Analysis

To further validate the PMSM parameter identification effectiveness of the NCS-BWO algorithm in practice, an experimental hardware platform for the motor drive control system was constructed, as shown in Figure 7. This device consists of two identical PMSMs of model 42JSF630AS-1000, driven by BOOSTXL-DRV8305 inverter modules. Among the two PMSMs, one functions as the controlled object, while the other applies the load torque. The control algorithm was developed in MATLAB/Simulink(R2023a), converted into C code, and subsequently downloaded to the TMS320F28379D digital signal processor on the control board using Code Composer Studio (v12.0.0), where PWM switching is implemented at 10 kHz. An incremental encoder with 2500 PPR is used for rotor position sensing. Through digital 4X decoding, the final feedback resolution is enhanced to 10,000 CPR for precise position and speed estimation. The motor parameters are as follows: stator resistance Rs = 0.89 Ω, stator inductance Ls = 0.62 mH, number of pole pairs np = 4, flux linkage ψf = 0.0164 Wb, viscous damping coefficient Bm = 3.5 × 10−4 N·m·s/rad, and rotor inertia Jm = 2.8 × 10−6 kg·m2.
Figure 7. Experiment platform.
Experimental procedure: After the motor reached steady-state operation, a weak d-axis negative d-axis current was injected. Motor data, including the voltage, current, and electrical angular velocity, were then sampled. Data were acquired via sensors, underwent coordinate transformation through the DSP controller, and were transmitted to the host computer via the CAN bus to perform parameter identification of the motor system. Figure 8 depicts the parameter identification and fitness function curves, and Table 9 summarizes the identification results and errors.
Figure 8. Parameter identification curves of PMSM using the nine algorithms in the physical motor environment: (a) fitness function; (b) stator resistance; (c) stator inductance; (d) flux linkage.
Table 9. Comparison of experimental results for seven parameters of identification algorithms.
Figure 8a shows the average fitness convergence curves for the nine identification algorithms: NCS-BWO, NCSA, BWO, CSA, GA, PSO, WOA, GGO, and BKA. The performance of these algorithms can be evaluated by observing their convergence speed and accuracy after stabilization. As shown in Figure 8a, the NCS-BWO algorithm demonstrates superior convergence accuracy by arriving at the minimal fitness value. Although the BWO algorithm exhibits the fastest convergence rate, it produces relatively large errors after iteration completion. The slow convergence rate of NCS-BWO during the initial iteration phase is designed to prevent becoming stuck in local optima. NCSA achieves convergence accuracy comparable to that of NCS-BWO after iteration completion; however, NCS-BWO demonstrates faster convergence speed and greater stability.
Owing to external environmental interference and limitations in sensor accuracy, the motor parameter identification results exhibited larger errors compared to the simulation outcomes. Figure 8b–d present the identification curves for stator resistance, stator inductance, and magnetic flux, respectively. The PSO and GA demonstrate large and fluctuating errors in parameter identification, indicating a poor performance. Although the WOA produces smaller errors, it suffers from poor stability. Despite the CSA and BWO show better stability, their errors still fall short of those of NCSA and NCS-BWO. Both the NCSA and NCS-BWO achieve identification errors below 1.7%. The NCSA converge slowly and exhibits significant fluctuations during the identification of the stator resistance parameter. As advanced algorithms, GGO and BKA outperform conventional algorithms in terms of convergence speed and accuracy, yet their overall performance still falls short of NCS-BWO. The NCS-BWO algorithm exhibits minimal fluctuations, converges rapidly, and produces identification values closest to the true values, validating its capability to find optimal solutions.
The parameter identification results and errors are presented in Table 9. As indicated by the average fitness values and error values in Table 9, the NCS-BWO algorithm attains superior identification accuracy, with respective errors of 0.89%, 1.08%, and 0.16%. The proposed hybrid NCS-BWO algorithm combines the advantages of NCSA and BWO, demonstrating strong exploration and exploitation capabilities. It outperforms the other eight algorithms in terms of computational capability, meeting the requirements for high performance and high precision in control systems.

5.3. Analysis of Computational Efficiency

In the above experiments, each algorithm was run 20 times, and the average execution time of the nine algorithms was calculated. To compare the computational workload of the nine algorithms, this study considered factors such as the number of algorithm iterations, and population size. Under the condition of keeping these factors consistent, the computational workload of the algorithm can be reflected by the execution time. This is illustrated in Table 10.
Table 10. Comparison of the execution time of the nine algorithms.
We compared the running time of nine algorithms with 200 iterations and a population size of 100. Table 10 shows that the running time of the NCS-BWO and BWO algorithms is significantly less than that of the other seven algorithms. The NCSA has the longest running time because the NBC strategy requires calculating the distance between each individual and its adjacent individuals, which greatly increases the computational load. The NCS-BWO only requires several iterations of NCSA and the obtained high-quality population is used as the initial population of the BWO. This hybrid algorithm maintains rapidity, as shown in Table 10, even though it increases the computational complexity of the algorithm.

6. Conclusions

This study proposes a hybrid NCS-BWO algorithm for PMSM parameter identification. The hybrid algorithm first employs NCSA to enhance global search capability, utilizing a nearest-better clustering strategy to partition the population and incorporating adaptive Gaussian and elite DE mutations to enrich population diversity. The NCSA outcomes are then used as the initial population of BWO, and leverage the rapid convergence of BWO to refine the solution accuracy. The simulations and experiments demonstrate that the NCS-BWO algorithm can identify the stator resistance, stator inductance, and flux linkage of the PMSM. Comparisons with the parameter identification results of NCSA, BWO, CSA, and other algorithms demonstrate that the NCS-BWO algorithm offers advantages such as high accuracy and a fast convergence speed. The identification errors for stator resistance, inductance, and flux linkage are 0.89%, 1.06%, and 0.16%, respectively.
In summary, this paper holds significant importance in PMSM state detection, fault diagnosis, robust control, and other applications. The inherent adaptability of intelligent algorithms has broadened the applicability of parameter identification techniques. Future research will be dedicated to enhancing the practicality and generalizability of the proposed approach. This will involve streamlining the mathematical models, optimizing algorithmic efficiency, and pursuing applications in various contexts.

Author Contributions

Conceptualization, Y.W. and C.L.; methodology, Y.W.; software, Y.W.; validation, Y.W., C.L. and Z.F.; formal analysis, Y.W.; investigation, C.L.; resources, C.L.; data curation, Z.F.; writing—original draft preparation, Y.W.; writing—review and editing, C.L.; visualization, C.L.; funding acquisition, C.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the transportation department of Liaoning Province (No. 202526), and the Fundamental Research Funds for the Provincial Universities of Liaoning (LJ212410150047, LJ212410150037).

Data Availability Statement

Data are contained with the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PMSMPermanent magnet synchronous motor
NCSANiching clonal selection algorithm
BWOBlack widow optimization
DEElite differential evolution
NBCNearest-better clustering
RLSRecursive least squares
EKFExtended Kalman filter
MRASModel reference adaptive system
PSOParticle swarm optimization
EROAEnhanced raccoon optimization algorithm
FWGWOHybrid fireworks grey wolf optimizer
GWOGrey wolf optimizer
FWAFireworks algorithm
IWOInvasive weed optimization
CSCuckoo search
ABCArtificial bee colony
GAGenetic algorithm
CSAClonal selection algorithm
GGOGreylag goose optimization
WOAWhale optimization algorithm
BKABlack-winged kite algorithm

References

  1. Ke, D.; Wang, F.; Yu, X.; Davari, S.; Kennel, R. Predictive Error Model-Based Enhanced Observer for PMSM Deadbeat Control Systems. IEEE Trans. Ind. Electron. 2024, 71, 2242–2252. [Google Scholar] [CrossRef]
  2. Yu, Y.; Huang, X.; Li, Z.; Wu, M.; Shi, T.; Cao, Y.; Yang, G. Full Parameter Estimation for Permanent Magnet Synchronous Motors. IEEE Trans. Ind. Electron. 2022, 69, 4376–4386. [Google Scholar] [CrossRef]
  3. D’Agostino, F.; Grillo, S.; Infantino, R.; Pons, E. High-Voltage Shore Connection Systems: Grounding Resistance Selection and Short-Circuit Currents Evaluation. IEEE Trans. Transp. Electrif. 2022, 8, 2608–2617. [Google Scholar] [CrossRef]
  4. Wang, Z.; Chai, J.; Xiang, X.; Sun, X.; Lu, H. A Novel Online Parameter Identification Algorithm Designed for Deadbeat Current Control of the Permanent-Magnet Synchronous Motor. IEEE Trans. Ind. Appl. 2022, 58, 2029–2041. [Google Scholar] [CrossRef]
  5. Li, H.; Jian, X. Parameter Identification of Permanent Magnet Synchronous Motor Based on CGCRAO Algorithm. IEEE Access 2023, 11, 124319–124330. [Google Scholar] [CrossRef]
  6. Zhu, Z.; Liang, D.; Liu, K. Online Parameter Estimation for Permanent Magnet Synchronous Machines: An Overview. IEEE Access 2021, 9, 59059–59084. [Google Scholar] [CrossRef]
  7. Ahn, H.; Park, H.; Kim, C.; Lee, H. A Review of State-of-the-art Techniques for PMSM Parameter Identification. J. Electr. Eng. Technol. 2020, 15, 1177–1187. [Google Scholar] [CrossRef]
  8. Kim, H.; Han, Y.; Lee, K.; Bhattacharya, S. A Sinusoidal Current Control Strategy Based on Harmonic Voltage Injection for Harmonic Loss Reduction of PMSMs With Non-Sinusoidal Back-EMF. IEEE Trans. Ind. Appl. 2020, 56, 7032–7043. [Google Scholar] [CrossRef]
  9. Ertan, H.B.; Sahin, I. Inductance Measurement Methods for Surface-Mount Permanent Magnet Machines. IEEE Trans. Instrum. Meas. 2022, 72, 1–16. [Google Scholar] [CrossRef]
  10. Zhang, Q.; Fan, Y. The Online Parameter Identification Method of Permanent Magnet Synchronous Machine under Low-Speed Region Considering the Inverter Nonlinearity. Energies 2022, 15, 4314. [Google Scholar] [CrossRef]
  11. Yu, H.; Wang, J.; Xin, Z. Model Predictive Control for PMSM Based on Discrete Space Vector Modulation with RLS Parameter Identification. Energies 2022, 15, 4041. [Google Scholar] [CrossRef]
  12. Sel, A.; Sel, B.; Coskun, U.; Kasnakoglu, C. Comparative Study of an EKF-Based Parameter Estimation and a Nonlinear Optimization-Based Estimation on PMSM System Identification. Energies 2021, 14, 6108. [Google Scholar] [CrossRef]
  13. Wang, L.; Zhang, S.; Zhang, C.; Zhou, Y. An Improved Deadbeat Predictive Current Control Based on Parameter Identification for PMSM. IEEE Trans. Transp. Electrif. 2024, 10, 2740–2753. [Google Scholar] [CrossRef]
  14. Qi, X.; Sheng, C.; Guo, Y.; Su, T.; Wang, H. Parameter Identification of a Permanent Magnet Synchronous Motor Based on the Model Reference Adaptive System with Improved Active Disturbance Rejection Control Adaptive Law. Appl. Sci. 2023, 13, 12076. [Google Scholar] [CrossRef]
  15. Rajwar, K.; Deep, K.; Das, S. An exhaustive review of the metaheuristic algorithms for search and optimization: Taxonomy, applications, and open challenges. Artif. Intell. Rev. 2023, 56, 13187–13257. [Google Scholar] [CrossRef] [PubMed]
  16. Yu, Y.; Huang, X.; Li, Z. Overall Electrical Parameters Identification for IPMSMs Using Current Derivative to Avoid Rank Deficiency. IEEE Trans. Ind. Electron. 2023, 70, 7515–7520. [Google Scholar] [CrossRef]
  17. Yuan, T.; Chang, J.; Zhang, Y. Parameter Identification of Permanent Magnet Synchronous Motor with Dynamic Forgetting Factor Based on H∞ Filtering Algorithm. Actuators 2023, 12, 453. [Google Scholar] [CrossRef]
  18. Zhou, Y.; Zhang, S.; Zhang, C.; Li, X.; Li, X.; Yuan, X. Current Prediction Error Based Parameter Identification Method for SPMSM With Deadbeat Predictive Current Control. IEEE Trans. Energy Convers. 2021, 36, 1700–1710. [Google Scholar] [CrossRef]
  19. Li, X.; Zhang, S.; Cui, X.; Wang, Y.; Zhang, C.; Li, Z.; Zhou, Y. Novel Deadbeat Predictive Current Control for PMSM With Parameter Updating Scheme. IEEE J. Emerg. Sel. Top. Power Electron. 2022, 10, 2065–2074. [Google Scholar] [CrossRef]
  20. Abdelrahem, M.; Hackl, C.; Kennel, R. Robust Predictive Control Scheme for Permanent-Magnet Synchronous Generators Based Modern Wind Turbines. Electronics 2021, 10, 1596. [Google Scholar] [CrossRef]
  21. Loría, A.; Panteley, E.; Maghenem, M. Strict Lyapunov Functions or Model Reference Adaptive Control: Application to Lagrangian Systems. IEEE Trans. Autom. Control 2019, 64, 3040–3045. [Google Scholar] [CrossRef]
  22. Chen, K.; Xiao, L.; Zhang, B.; Yang, M.; Yang, X.; Guo, X. Decoupling Algorithm for Online Identification of Inductance in Permanent Magnet Synchronous Motors Based on Virtual Axis Injection Method and Sensorless Control. Energies 2024, 17, 6308. [Google Scholar] [CrossRef]
  23. Hu, Z.; Zhan, J.; Li, Z.; Hou, X.; Fu, Z.; Yang, X. Enhanced Raccoon Optimization Algorithm for PMSM Electrical Parameter Identification. Energies 2025, 18, 869. [Google Scholar] [CrossRef]
  24. Zhou, S.; Wang, D.; Li, Y. Parameter identification of permanent magnet synchronous motor based on modified-fuzzy particle swarm optimization. Energy Rep. 2023, 9, 873–879. [Google Scholar] [CrossRef]
  25. Regulski, P.; Vilchis-Rodriguez, D.; Djurovic, S.; Terzija, V. Estimation of Composite Load Model Parameters Using an Improved Particle Swarm Optimization Method. IEEE Trans. Power Deliv. 2015, 30, 553–560. [Google Scholar] [CrossRef]
  26. Yue, Z.; Zhang, S.; Xiao, W. A Novel Hybrid Algorithm Based on Grey Wolf Optimizer and Fireworks Algorithm. Sensors 2020, 20, 2147. [Google Scholar] [CrossRef]
  27. Trivedi, M.; Shrivastava, R.K. Reservoir operation management using a new hybrid algorithm of Invasive Weed Optimization and Cuckoo Search Algorithm. AQUA-Water Infrastruct. Ecosyst. Soc. 2023, 72, 1607–1628. [Google Scholar] [CrossRef]
  28. Roeva, O.; Zoteva, D.; Lyubenova, V. Escherichia coli Cultivation Process Modelling Using ABC-GA Hybrid Algorithm. Processes 2021, 9, 1418. [Google Scholar] [CrossRef]
  29. Peña-Delgado, A.; Peraza-Vázquez, H.; Almazán-Covarrubias, J.; Cruz, N.; García-Vite, P.; Morales-Cepeda, A.; Ramirez-Arredondo, J. A Novel Bio-Inspired Algorithm Applied to Selective Harmonic Elimination in a Three-Phase Eleven-Level Inverter. Math. Probl. Eng. 2020, 2020, 10. [Google Scholar] [CrossRef]
  30. Wan, C.; He, B.; Fan, Y.; Tan, W.; Qin, T.; Yang, J. Improved Black Widow Spider Optimization Algorithm Integrating Multiple Strategies. Entropy 2022, 24, 1640. [Google Scholar] [CrossRef]
  31. Wei, P.; Hu, C.; Hu, J.; Li, Z.; Qin, W.; Gan, J.; Chen, T.; Shu, H.; Shang, M. A Novel Black Widow Optimization Algorithm Based on Lagrange Interpolation Operator for ResNet18. Biomimetics 2025, 10, 361. [Google Scholar] [CrossRef] [PubMed]
  32. Xu, D.; Yin, J. An Improved Black Widow Optimization Algorithm for Engineering Constrained Optimization Problems. IEEE Access 2023, 11, 32476–32495. [Google Scholar] [CrossRef]
  33. Wang, Y.; Luo, D.; Yao, J. Multitasking Feature Selection Using a Clonal Selection Algorithm for High-Dimensional Microarray Data. Electronics 2024, 13, 4612. [Google Scholar] [CrossRef]
  34. Wang, Y.; Liu, D.; Wu, Y.; Xue, H.; Mi, Y. Locating and sizing of charging station based on neighborhood mutation immune clonal selection algorithm. Electr. Power Syst. Res. 2023, 215, 8. [Google Scholar] [CrossRef]
  35. Zhang, Y.; Zhou, M.; Zhang, C.; Shen, A.; Bing, L. Identification of PMSM Parameters with Time-Error Compensated Based on Contractile Factor Antipredator PSO. IEEE Trans. Transp. Electrif. 2024, 10, 4006–4017. [Google Scholar] [CrossRef]
  36. Nguyen, D. Adapting the population size in CMA-ES using nearest-better clustering method for multimodal optimization. Appl. Soft. Comput. 2024, 167, 25. [Google Scholar] [CrossRef]
  37. Preuss, M. Niching the CMA-ES via nearest-better clustering. In Proceedings of the 2010 Annual Conference Companion on Genetic and Evolutionary Computation, Portland, OR, USA, 7–11 July 2010. [Google Scholar]
  38. Parrott, D.; Li, X. Locating and tracking multiple dynamic optima by a particle swarm model using speciation. IEEE Trans. Evol. Comput. 2006, 10, 440–458. [Google Scholar] [CrossRef]
  39. Zhu, T.; Luo, W.; Yue, L. Combining multipopulation evolutionary algorithms with memory for dynamic optimization problems. In Proceedings of the 2014 IEEE Congress on Evolutionary Computation (CEC), Beijing, China, 6–11 July 2014. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.