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 [
1,
2]. 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 [
3,
4]. Therefore, obtaining precise motor parameters and mathematical models is crucial for improving the control performance of PMSMs [
5,
6,
7].
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 [
8] 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 [
9] 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 [
10].
Online PMSM parameter identification methods include recursive least squares (RLS) [
11], extended Kalman filter (EKF) [
12], model reference adaptive system (MRAS) [
13,
14], and intelligent algorithms [
15]. Reference [
16] 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 [
17] 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 [
18,
19,
20], its design complexity and high sensitivity to noise often result in low identification accuracy. References [
21,
22] 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 [
23] 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 [
24] 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 [
25] 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 [
26] 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 [
27] 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 [
28] 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 [
29]. This algorithm primarily simulates the distinctive reproductive behavior of the spider, featuring a simple structure and rapid optimization speed [
30,
31,
32]. 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 [
33,
34]. 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:
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
.
Equation (1) can be simplified as
To facilitate parameter estimation, Equation (3) needs to be discretized as follows:
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 [
35]. 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.
The same amount of data is collected under
id = 0 and
id = −2, and the fourth-order identification model is obtained as follows:
Where
and
denote the data collected at time step k under the control strategy
id = 0.
and
represent data collected at time step k under control strategy
id = −2.
,
, and
are the parameter identification results of the algorithm.
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.
The fitness function in
Figure 3 is defined as follows:
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.
and
are the motor dq-axis voltage measurement values under the control of
id = 0.
and
are the corresponding estimated values obtained from the collected data through the algorithm under the control of
id = 0.
and
are the measured values of the motor dq-axis voltage when
id = −2.
and
are the corresponding estimated values obtained from the collected data through the algorithm when
id = −2.
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.
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.