Estimation of Iron Loss in Permanent Magnet Synchronous Motors Based on Particle Swarm Optimization and a Recurrent Neural Network

: The popularity of permanent magnet synchronous motors (PMSMs) has increased in recent years due to their high efﬁciency, compact size, and low maintenance needs. Calculating iron loss in PMSMs is crucial for designing and optimizing PMSMs to achieve high efﬁciency and a long lifespan, as this can signiﬁcantly affect motor performance. However, multiple factors inﬂuence the accuracy of iron loss calculations in PMSMs, including the intricate magnetic behavior of the motor under different operating conditions, as well as the inﬂuence of the motor’s dynamic behavior during the operation process. This paper proposes a method based on particle swarm optimization (PSO) and a recurrent neural network (RNN) to estimate the iron loss in PMSMs, independent of the empirical iron loss formula. This method establishes an iron loss calculation model considering high-order harmonics, rotating magnetization, and temperature factors. Accounting for the multifactor inﬂuence, the model studies the law of loss change under different magnetic ﬂux densities, frequencies, and temperature conditions. To avoid the deviation problem caused by conventional polynomial ﬁtting, a multilayer RNN and PSO are used to train and optimize the neural network. Iron loss in complex cases beyond the measurement range can be accurately estimated. The proposed method helps achieve a PMSM iron loss calculation model with broad applicability and high accuracy.


Introduction
Accurately calculating iron loss in permanent magnet synchronous motors (PMSMs) is critical.Inaccurate calculations can lead to suboptimal motor designs and operations, resulting in reduced efficiency, increased energy consumption, and higher operating costs.Moreover, they contribute to overheating issues, insulation failure, premature aging, and unexpected failures, compromising motor performance and posing safety risks including potential accidents or damage to equipment and property [1,2].Therefore, the accurate estimation of iron loss in PMSMs is crucial for ensuring optimal motor performance, energy efficiency, reliability, and longevity.It directly impacts the operational efficiency, safety, maintenance costs, and environmental footprint of systems utilizing these motors [3,4].Understanding and minimizing iron losses are key to improving the overall efficiency of PMSMs.Accurate calculation of iron loss informs the design of more efficient PMSMs and related applications including design optimization, performance prediction and improvement, simulation and control strategy, and energy efficiency improvement.
Several existing methods are employed to estimate iron loss in PMSMs.These methods include analytical methods, finite element analysis (FEA), experimental testing, and combined approaches.Traditional analytical methods involve mathematical models and equations based on magnetic theories to estimate iron losses.These methods often rely on empirical formulas and simplified assumptions regarding the motor's magnetic behavior under different operating conditions [5][6][7].FEA is a numerical simulation technique that models the motor's geometry and material properties to simulate magnetic fields and compute iron losses.It provides more detailed and accurate estimations by considering the motor's complex geometry and nonlinear material properties [8][9][10].Direct measurement through experimental tests involves running the motor under controlled conditions while measuring parameters such as temperature rise, electrical parameters, and loss components.However, this method is time consuming, costly and may not cover all operating scenarios [1].
Accurately calculating iron loss is a challenging issue in the industrial application of electrical machines due to the impact of saturation on the magnetic circuit and the dynamic operational modes.The main research focus in terms of PMSMs is developing precise iron loss models.The iron loss for interior PMSMs has been studied using a variety of models.There are a number of models that have been proposed that take into consideration the effect of magnetic properties on temperature, for example, the rotating magnetization model [11].In addition, models that consider the influence on magnetic properties have been proposed, for example, the temperature model [12,13] and the mechanical stress model [14].According to the authors in [15,16], calculations have been provided for iron loss in permanent magnet (PM) motors, considering PWM inverter harmonics as a factor in the calculation.Furthermore, efforts have been made to optimize motor design and control strategies to minimize this loss.Accurate calculation of iron loss in PMSMs refers to the ability to estimate the amount of energy dissipated in the cores due to magnetic hysteresis and eddy currents with a high degree of precision [17,18].
Currently, the accurate calculation of iron loss in PMSMs presents a formidable challenge due to several intricate factors.The complex magnetic characteristics of the iron cores, including magnetic saturation and hysteresis, pose difficulties in modeling these losses accurately.Furthermore, the dynamic behavior of PMSMs, which varies under both steady-state and transient conditions, adds to the complexity.The amount of iron loss is heavily reliant on the characteristics of the core material, including its magnetic permeability and core loss coefficients, which can fluctuate with temperature and manufacturing variations, introducing uncertainty into the calculations.The strong connection between iron loss and motor temperature requires consideration of the thermal distribution within the motor, further complicating the modeling process.Additionally, achieving precise iron loss calculations often requires specific knowledge about the motor's design, core material properties, and manufacturing processes.However, these may not always be readily accessible, especially for custom or proprietary motors.Measuring iron loss directly in PMSMs is challenging due to the small size and intricate geometry of the motors, making experimental techniques demanding in terms of instrumentation and susceptible to measurement errors.The absence of standardized testing procedures, coupled with the constant change in motor behavior during operation, underscores the complexities involved in the accurate assessment of iron loss [19,20].Acquiring knowledge about the correlation between the key factors that influence iron loss, and the actual magnitude of iron loss is a crucial step in accurately calculating iron loss during the creation of high-efficiency motors.These data enable the identification and proposal of targeted loss-reduction techniques.
During PMSM operation, the flux density waveform deviates from a pure sinusoidal shape due to factors such as current harmonics, nonlinear core properties, and spatial harmonics.These deviations can affect motor efficiency, torque stability, and electromagnetic compatibility [21][22][23].This results in more severe distortion in the magnetic density waveform, making it difficult to accurately calculate iron loss using formula-based methods.To address these challenges, motor designers and control engineers employ various strategies, including advanced controls and material selection, to optimize motor performance in real-world scenarios.A time-stepped FEA model of a motor was used to calculate the iron loss from the stator [8,9].The coefficient to calculate iron loss is typically obtained by fitting it to the measured loss at a particular frequency and magnetic flux density [14,24].However, a constant-coefficient model can cause a deviation in the calculation.Therefore, it is essential to investigate an iron loss model with variable coefficients that take into account alterations in the loss coefficient with magnetic flux density and frequency in order to tackle this issue [25,26].
Using an FEA model with time stepping to calculate stator iron losses in motors is a reliable and popular technique that offers a comprehensive understanding of the dynamic electromagnetic behavior within the motor [9,10].This method involves a meticulous process, from the intricate setup of a 3D FEA model, mesh generation, and time-stepping analysis to the calculation of magnetic fields, eddy currents, and hysteresis losses.By integrating these losses over time and optionally considering thermal effects, researchers can gain valuable insights into the motor's iron loss characteristics under varying operating conditions.While this approach is effective and powerful, it demands expertise in FEA software, such as Ansys Electronics Desktop 2023 R1 and Altair Flux 2022.2, high-performance computer hardware requirements, electromagnetics, and a profound understanding of the motor's design and material properties.The accuracy of the results depends on precise modeling and data calibration, which may require validation against experimental measurements.
The two-and three-term variable-coefficient models have been suggested in certain studies for different silicon steel sheets.The loss coefficients in both models are subject to variation due to changes in frequency and magnetic flux density.The use of variablecoefficient models has demonstrated superior accuracy in various scenarios compared to constant-coefficient models.Variable-coefficient models excel at capturing nonuniformity, accommodating dynamic systems, addressing complex geometries, and representing physical processes more realistically.However, their increased complexity and computational demands should be considered alongside the specific needs of the analysis.The choice between constant-and variable-coefficient models should be guided by a deep understanding of the system, available data, and the desired level of precision, as both have valuable roles in scientific and engineering simulations [27][28][29][30][31].Despite the fact that variable-coefficient models express the loss coefficient as a polynomial function of magnetic flux density and frequency, the numerical fitting process can be ill-conditioned, leading to inaccuracies when the ranges of frequency and magnetic flux density are extensive.
As part of the process of resolving the challenges related to the variable-coefficient model, previous studies have shown that when the frequency or magnetic flux density is high, the eddy current loss increases significantly as well [32][33][34].Previous research has proposed adding an additional term to the Bertotti three-term constant-coefficient model, namely the high-order magnetic flux density term, in order to counterbalance this increase in eddy current loss.They have also proposed an iron loss model with an additional term for the eddy current [35,36].According to the existing literature, the impact of local hysteresis loops caused by harmonic magnetic fields on iron loss has been extensively researched.It has been observed that with increases in the frequency and amplitude of the harmonic magnetic field, the influence of local hysteresis loops on iron loss also increases significantly [37,38].Despite the widespread use of empirical formulas for calculating iron loss coefficients using polynomial fitting, accurately accounting for multiple factors such as high-order harmonic magnetic density, frequency, and temperature remains challenging.In particular, the accuracy of the results is significantly affected when the frequency or temperature is high, leading to a significant deviation.
Throughout the years, a variety of models have been employed to calculate the iron loss in PMSMs, including the Steinmetz equation and its improved version, the separation of hysteresis and eddy current loss, mathematical hysteresis models, and the division of the magnetizing process loss [39].The Steinmetz equation is a simple empirical formula that is easy to use and suitable for basic calculations during the initial design stage.However, it has limitations in accurately representing complex magnetic materials and geometries.The Steinmetz model with eddy current loss is an extension of the original Steinmetz equation.This model offers improved accuracy by accounting for both hysteresis and eddy current losses.The Bertotti model is a more advanced mathematical approach that considers hysteresis and eddy currents in greater detail.It provides greater accuracy and is well-suited for a wide range of industrial and scientific applications [5].Ansys Maxwell in Electronics Desktop 2023 R1 is a powerful FEA software designed for electromagnetic field simulations.It offers high fidelity, 3D modeling capabilities, extensive material libraries, and advanced analysis options.It is the tool of choice for professionals and industries where the utmost precision and comprehensive analysis are required [6].Iron loss is typically divided into three distinct categories: hysteresis loss, eddy loss, and excess loss.Advanced iron loss calculations [7] involve fitting a known interpolation function to the measured iron loss data, allowing for the analysis of iron loss at any given flux density and frequency.Table 1 displays the expression and number of parameters of the classic iron loss models.
The Steinmetz equation involves three loss coefficients, k h , n, and m.The Bertotti loss equation, on the other hand, has three loss coefficients, k h , k c , and k e , with α being the coefficient of hysteresis loss.The magnetic field frequency is denoted by f and the magnitude of the flux density is represented by B. To improve the accuracy of the prediction in higher flux density ranges as well as for rotational fields, a model with five parameters was used.This enhanced model includes k 1 and k 2 , which are calculated based on the rotational pattern of magnetic induction.The term multiplied by α 1 represents the hysteretic losses, and the term multiplied by α 5 represents the excess losses, depending on the method used for parameterization.The two intermediate terms signify the eddy current component of the losses.It is evident that the number of parameters in the iron loss calculation formula increases with an increase in the accuracy of the iron loss calculation.
In recent times, neural network algorithms have gained significant prominence in the realm of iron loss estimation and computation.A novel neural network dynamic hysteresis model has been introduced to calculate iron losses effectively within amorphous magnetic cores in high-frequency transformers, even when subjected to non-sinusoidal magnetization conditions [40].There has been some research undertaken to analyze the specific iron losses in cold-rolled, non-oriented electrical steel sheets, using the combination of artificial neural networks (ANNs) and genetic algorithms (GAs), covering a wide range of frequencies and magnetic flux densities [41].In a separate application, an ANN has been employed to gauge the machine parameters essential for achieving optimal efficiency in synchronous reluctance motors.In this comprehensive model, magnetic saturation is considered, cross-coupling effects are considered, and iron losses are also included [42].
In this study, a particle swarm optimization (PSO) recurrent neural network (RNN) method is presented to analyze and estimate the iron loss of PMSM without relying on empirical iron loss formulas.The key contributions of this method can be summarized as follows:

•
The proposed method integrates PSO and RNN to establish a comprehensive iron loss calculation model.This model accounts for high-order harmonics, rotating magnetization, and temperature factors, capturing multifaceted influences on iron loss.

•
By employing multilayer RNN and PSO for training and optimization, the method overcomes issues associated with conventional polynomial fitting, offering improved accuracy in estimating iron loss even in complex scenarios beyond traditional measurement ranges.

•
The developed model offers broad applicability by accurately estimating iron loss in PMSMs under diverse and complex conditions, surpassing the limitations of traditional empirical formulas.
By departing from traditional reliance on empirical iron loss formulas, this research explores the intricate impact of multiple factors on iron loss patterns.Using intelligence optimization algorithms and neural network techniques, an innovative iron loss model based on a PSO-RNN was devised, that is capable of estimating iron loss even in complex scenarios that fall beyond standard measurement ranges.The study showcases the outcomes of iron loss calculations using the PSO-RNN method.It demonstrates the successful development of a highly adaptable and precise PMSM iron loss estimation model, significantly expanding its applicability range.

Frequencies and Temperatures
Silicon steel sheets are commonly employed as the material for the motor core.However, their magnetic properties, loss, and magnetization curves are subject to temperature effects that alter their material characteristics.As a result, these temperature effects can influence the iron loss calculation and cause deviations in the loss estimation of magnetic materials.Figure 1 presents the loss curves of a 35WW360 silicon steel sheet from 20 to 200 • C for frequencies of 50 Hz and 200 Hz [14,[43][44][45].At 50 Hz, the unit mass loss is minimally influenced by temperatures below a magnetic flux density of 1.5T, but is negatively correlated with a temperature above this value.The inflection point occurs at 1.3T, as shown in Figure 1a,b.The trends in the loss curves are the same for both frequencies.Additionally, frequency affects the proportion of loss reduction at different temperatures, with higher frequencies resulting in more significant loss reduction.The maximum ratio of loss reduction is 18.37% at 50 Hz and 20.56% at 200 Hz.This indicates that frequency plays a role in determining how temperature affects the loss per unit mass.
in synchronous reluctance motors.In this comprehensive model, magnetic saturati considered, cross-coupling effects are considered, and iron losses are also included [4 In this study, a particle swarm optimization (PSO) recurrent neural network (R method is presented to analyze and estimate the iron loss of PMSM without relyin empirical iron loss formulas.The key contributions of this method can be summarize follows:

•
The proposed method integrates PSO and RNN to establish a comprehensive loss calculation model.This model accounts for high-order harmonics, rotating m netization, and temperature factors, capturing multifaceted influences on iron lo • By employing multilayer RNN and PSO for training and optimization, the me overcomes issues associated with conventional polynomial fitting, offering impro accuracy in estimating iron loss even in complex scenarios beyond traditional m urement ranges.

•
The developed model offers broad applicability by accurately estimating iron lo PMSMs under diverse and complex conditions, surpassing the limitations of t tional empirical formulas.
By departing from traditional reliance on empirical iron loss formulas, this rese explores the intricate impact of multiple factors on iron loss patterns.Using intellig optimization algorithms and neural network techniques, an innovative iron loss m based on a PSO-RNN was devised, that is capable of estimating iron loss even in com scenarios that fall beyond standard measurement ranges.The study showcases the comes of iron loss calculations using the PSO-RNN method.It demonstrates the suc ful development of a highly adaptable and precise PMSM iron loss estimation model nificantly expanding its applicability range.

Frequencies and Temperatures
Silicon steel sheets are commonly employed as the material for the motor core.H ever, their magnetic properties, loss, and magnetization curves are subject to tempera effects that alter their material characteristics.As a result, these temperature effects influence the iron loss calculation and cause deviations in the loss estimation of mag materials.Figure 1 presents the loss curves of a 35WW360 silicon steel sheet from 2 200 °C for frequencies of 50 Hz and 200 Hz [14,[43][44][45].At 50 Hz, the unit mass lo minimally influenced by temperatures below a magnetic flux density of 1.5T, but is n tively correlated with a temperature above this value.The inflection point occurs at as shown in Figure 1a,b.The trends in the loss curves are the same for both frequen Additionally, frequency affects the proportion of loss reduction at different temperat with higher frequencies resulting in more significant loss reduction.The maximum of loss reduction is 18.37% at 50 Hz and 20.56% at 200 Hz.This indicates that frequ plays a role in determining how temperature affects the loss per unit mass.

Polynomial Fitting Error
The traditional method of calculating iron loss necessitates measuring the loss value of the silicon steel sheet and then adjusting the coefficient of the iron loss calculation equation based on the empirical formula.However, when the motor is running at a high frequency, the coefficient fitting results based on the empirical formula will be significantly inaccurate.This does not meet the requirements of the iron loss calculation for high-speed motors.As Figure 2 shows, the calculated iron loss results and actual measurement results have a considerable discrepancy when the frequency and magnetic flux density increase [14,45].The measurement of the iron loss of the motor can be calculated by:

Polynomial Fitting Error
The traditional method of calculating iron loss necessitates measuring the loss value of the silicon steel sheet and then adjusting the coefficient of the iron loss calculation equation based on the empirical formula.However, when the motor is running at a high frequency, the coefficient fitting results based on the empirical formula will be significantly inaccurate.This does not meet the requirements of the iron loss calculation for high-speed motors.As Figure 2 shows, the calculated iron loss results and actual measurement results have a considerable discrepancy when the frequency and magnetic flux density increase [14,45].The measurement of the iron loss of the motor can be calculated by: There are two factors that can be used to determine the copper loss Pcopper: phase current and winding resistance.According to the method described in [46], the mechanical loss Pmech can be calculated from the output power and the stray loss can be calculated using the assumption stated in [47] that it represents 1% of the output power.
As is shown in Figure 3a, the fitting surface of the multi-frequency iron loss is presented.For each given flux density, as the frequency increases from 50 to 400 Hz, the iron loss generally increases.There is a positive correlation between frequency and iron loss.For each given frequency, as the flux density increases from 0.1 to 1.8, the iron loss generally increases.This also suggests a positive correlation between flux density and iron loss.The nonlinearity between iron loss, frequency, and flux density is evident in Figure 3b.As the frequency and magnetic flux density increase, the fitting relative error also rises, indicating a greater discrepancy between the actual value and the fitted results.There are two factors that can be used to determine the copper loss P copper : phase current and winding resistance.According to the method described in [46], the mechanical loss P mech can be calculated from the output power and the stray loss can be calculated using the assumption stated in [47] that it represents 1% of the output power.
As is shown in Figure 3a, the fitting surface of the multi-frequency iron loss is presented.For each given flux density, as the frequency increases from 50 to 400 Hz, the iron loss generally increases.There is a positive correlation between frequency and iron loss.For each given frequency, as the flux density increases from 0.1 to 1.8, the iron loss generally increases.This also suggests a positive correlation between flux density and iron loss.The nonlinearity between iron loss, frequency, and flux density is evident in Figure 3b.As the frequency and magnetic flux density increase, the fitting relative error also rises, indicating a greater discrepancy between the actual value and the fitted results.
The traditional method of calculating iron loss necessitates measuring the loss value of the silicon steel sheet and then adjusting the coefficient of the iron loss calculation equation based on the empirical formula.However, when the motor is running at a high frequency, the coefficient fitting results based on the empirical formula will be significantly inaccurate.This does not meet the requirements of the iron loss calculation for high-speed motors.As Figure 2 shows, the calculated iron loss results and actual measurement results have a considerable discrepancy when the frequency and magnetic flux density increase [14,45].The measurement of the iron loss of the motor can be calculated by: There are two factors that can be used to determine the copper loss Pcopper: phase current and winding resistance.According to the method described in [46], the mechanical loss Pmech can be calculated from the output power and the stray loss can be calculated using the assumption stated in [47] that it represents 1% of the output power.
As is shown in Figure 3a, the fitting surface of the multi-frequency iron loss is presented.For each given flux density, as the frequency increases from 50 to 400 Hz, the iron loss generally increases.There is a positive correlation between frequency and iron loss.For each given frequency, as the flux density increases from 0.1 to 1.8, the iron loss generally increases.This also suggests a positive correlation between flux density and iron loss.The nonlinearity between iron loss, frequency, and flux density is evident in Figure 3b.As the frequency and magnetic flux density increase, the fitting relative error also rises, indicating a greater discrepancy between the actual value and the fitted results.There is a possibility that the magnetic flux density waveform can be distorted due to the presence of high-order harmonics.Models that take into account the frequency and amplitude of the motor magnetic field, as well as the degree of distortion of the magnetic flux density waveform when calculating iron loss, can provide accurate information about There is a possibility that the magnetic flux density waveform can be distorted due to the presence of high-order harmonics.Models that take into account the frequency and amplitude of the motor magnetic field, as well as the degree of distortion of the magnetic flux density waveform when calculating iron loss, can provide accurate information about the effect of the motor magnetic field frequency and amplitude on iron loss.By adding together the iron losses of the fundamental wave and all harmonic components, it is possible to determine the impact of harmonic flux density on motor iron loss.It is necessary to use radial and tangential magnetic flux density amplitudes instead of the ones in the traditional iron loss model in order to consider the effects of rotating magnetization on the magnetic flux density.It has been shown in Equation ( 2) that the iron loss expression with multifactor calculations includes compensation coefficients that are precise in determining how the frequency of a motor magnetic field, the amplitude of a magnetic flux density waveform distortion rate, and the distortion rate of a magnetic flux density waveform all affect the iron loss of a PMSM.
where k t is the temperature coefficient k h ; k c , and k e represent the compensation coefficients; i is the order of the magnetic flux density harmonic i = 1, 5, 7, 11, 13 is the i-th order frequency; B i is the amplitude of the i-th magnetic flux density harmonic; B ir and B it are the amplitudes of magnetic flux density for the radial and tangential components of the i-th harmonic; and B THD-r and B THD-t are the magnetic flux density waveform distortion rates for the radial and tangential components, respectively.
The multifactor iron loss model in Equation ( 2) is reflected in Figure 4a, which displays the iron loss fitted result.As the frequency and flux density increase, the fit error also rises.Iron loss calculation results based on models depend on the precision of polynomial coefficient fitting and the lack of systematic evaluation criteria for the calculation results.

Iron Loss Estimation Based on the Recurrent Neural Network
To avoid the influence of the fitting coefficient, this study adopted the method based on PSO and an RNN to learn and train the relationship between input loss parameters and output iron loss, and establishes an estimation model of iron loss without relying on the empirical iron loss formula [48].The logical structure of the system is shown in Figure 5, which mainly includes data acquisition, model training, result verification, and prediction.Using the PSO-RNN-based iron loss calculation method, all factors affecting iron loss are taken as input variables of the neural network, and the output result is the final iron loss result.

Iron Loss Estimation Based on the Recurrent Neural Network
To avoid the influence of the fitting coefficient, this study adopted the method based on PSO and an RNN to learn and train the relationship between input loss parameters and output iron loss, and establishes an estimation model of iron loss without relying on the empirical iron loss formula [48].The logical structure of the system is shown in Figure 5, which mainly includes data acquisition, model training, result verification, and prediction.Using the PSO-RNN-based iron loss calculation method, all factors affecting iron loss are taken as input variables of the neural network, and the output result is the final iron loss result.
on PSO and an RNN to learn and train the relationship between input loss parameters and output iron loss, and establishes an estimation model of iron loss without relying on the empirical iron loss formula [48].The logical structure of the system is shown in Figure 5, which mainly includes data acquisition, model training, result verification, and prediction.Using the PSO-RNN-based iron loss calculation method, all factors affecting iron loss are taken as input variables of the neural network, and the output result is the final iron loss result.

Particle Swarm Optimization and the Recurrent Neural Network
In PSO, the behavior of social groups is used as a basis for optimization.Several particles are involved in the algorithm, which is based on the search for the best possible solution in a multidimensional space.Throughout the iterative process, the particles adjust their positions as a result of their own experiences as well as the best solution that has

Particle Swarm Optimization and the Recurrent Neural Network
In PSO, the behavior of social groups is used as a basis for optimization.Several particles are involved in the algorithm, which is based on the search for the best possible solution in a multidimensional space.Throughout the iterative process, the particles adjust their positions as a result of their own experiences as well as the best solution that has been found by the collective swarm as a whole.PSO has been widely used in optimization tasks due to its simplicity and effectiveness in exploring solution spaces.It plays a significant role in finding optimal parameters for a diverse range of optimization problems, including applications in machine learning models and engineering designs.RNNs are a class of neural networks designed to process sequential data by maintaining internal memory or state.This enables them to capture temporal dependencies in data.Unlike traditional feedforward neural networks, RNNs possess loops that allow information to persist, making them suitable for tasks involving time series, natural language processing, and sequential data analysis.
In PSO, the optimal solution is determined by Gbest and Pbest.Gbest is referred to as the global best, while Pbest is the personal best.Every time, particles can be modified to identify the potential solution in terms of position and velocity vectors.Let V i and X i denote the velocity and position of the i-th particle.The velocity and position of each particle is then updated as [49]: The PSO algorithm involves the following steps: at each iteration k, the weight of the inertia ω k is calculated, the velocity of the i th particle V i is determined, acceleration factors C 1 and C 2 are taken into account, uniform random numbers r 1 and r 2 in the range of [0,1] are generated, the best position of the i th particle Pbest k i and the best position of the group Gbest k i are taken until iteration k is identified, the position of the i th particle X k i is determined, the initial and final weights ω max and ω min are established, and the total number of iterations iter max is set.In order to understand how the convergence behavior of PSO can be influenced by the value of acceleration coefficients and inertia weights, the sensitivity of the convergence was studied by the authors in [50].According to the findings of this research, it is possible to select the PSO parameters in a way that will guarantee convergence to an equilibrium state.Clerc and Kennedy [51] proposed various constriction models, and for each one, a specific constriction coefficient can be calculated to ensure convergence, depending on the chosen value of φ.
If the following criteria are met, then it should be possible to demonstrate that the path of a particle in an unconfined simplified PSO system with inertia will converge [51]: and 0 ≤ ω < 1; since φ 1 = c 1 U(0, 1) and φ 2 = c 2 U(0, 1), the acceleration coefficients, c 1 and c 2 serve as upper bound of φ 1 and φ 2 .Equation ( 4) can be rewritten as: Hence, if ω, c 1 , and c 2 are chosen in a way that satisfies the condition in (5), the system is ensured to reach a steady state.Table 2 displays the parameters for the PSO algorithm.Analysis of the PSO algorithm reveals that the PSO algorithm is capable of optimizing the weight of the RNN node.Typically, the connection weights of unoptimized RNNs are randomly set as initial values, which can result in issues such as slow training speed and convergence to local minima.Allocating space for the initial value in the PSO algorithm not only improves the model's training speed, but also significantly lowers the risk of reaching the local optima.
Combining PSO and RNNs presents a robust and efficient approach to elevating RNN training and optimization processes.Leveraging PSO's capabilities, this synergy optimizes various aspects of RNN architectures and parameters, exploring hyperparameter spaces effectively to enhance performance significantly beyond conventional methods.PSO assists in critical areas such as feature selection, weight initialization, and dynamic parameter adjustments, fostering faster convergence, improved generalization, and resilience against local optima during training.Moreover, the collaboration facilitates adaptive network design, refining RNN architectures to suit complex optimization landscapes by determining optimal layers, nodes, and connections.This integrated approach enhances RNN performance in tasks relying on accurate hyperparameters or architectural design.In addition, it accelerates convergence while fortifying models' robustness and adaptability, demonstrating promising potential across diverse applications.The synergy between these methodologies aims to capitalize on the strengths of both techniques:

•
PSO will optimize the RNN architecture, hyperparameters, or training process to enhance the accuracy and efficiency of estimating iron loss.

•
RNNs will serve as the predictive model, leveraging their ability to capture sequential dependencies in data for accurate estimation.
When comparing PSO to the whale algorithm and sparrow search algorithm for recurrent neural network optimization, PSO has certain advantages that might be considered superior in certain contexts, such as convergence speed and global exploration, simplicity and ease of implementation, parameter tuning and flexibility, and exploitation of the global best solution [52][53][54][55].
Figures 6 and 7 show the optimization process of the PSO for RNN parameters and the RNN structure, respectively.The hidden layer in Figure 7 is represented by s, and the input and output layers by x and y, respectively.The weight matrix W is in the middle of the network, U represents the weight matrix between the input and hidden layers, V represents the weight matrix between hidden layers and output layers, and L represents the loss function.The model has the following structure formula: Magnetism 2023, 3, FOR PEER REVIEW 11  Table 3 lists the parameters of an RNN.For the input layer, the flux density, frequency, and temperature are the input variables.For the output layer, the iron loss estimation value is the output.Table 3 lists the parameters of an RNN.For the input layer, the flux density, frequency, and temperature are the input variables.For the output layer, the iron loss estimation value is the output.Table 3 lists the parameters of an RNN.For the input layer, the flux density, frequency, and temperature are the input variables.For the output layer, the iron loss estimation value is the output.

Proposed PMSM Iron Loss Method
The PMSM control system combined with proposed PSO-RNN iron loss method is shown in Figure 8  The split between the training and validation sets is crucial to ensure the model's effectiveness and prevent overfitting.A representative validation dataset ensures that the model's performance is evaluated across diverse scenarios, making the findings and predictions more reliable and applicable to real-world scenarios.

Result Analysis
On the basis of the above analysis, the interior PMSM has been selected in order to verify the proposed method.In Figure 9, a prototype of a PMSM combined with the hardware of the test bench for the experiment of the PMSM is presented.Table 4 contains the main parameters of the PMSM.A comparison of the calculated and measured values of iron loss is shown in Figure 10.According to the results of the study, the PSO-RNN-based calculation method has less error in the high-frequency part of the calculation as compared to the model-based calculation method.Using the training set of the iron loss model The split between the training and validation sets is crucial to ensure the model's effectiveness and prevent overfitting.A representative validation dataset ensures that the model's performance is evaluated across diverse scenarios, making the findings and predictions more reliable and applicable to real-world scenarios.

Result Analysis
On the basis of the above analysis, the interior PMSM has been selected in order to verify the proposed method.In Figure 9, a prototype of a PMSM combined with the hardware of the test bench for the experiment of the PMSM is presented.Table 4 contains the main parameters of the PMSM.A comparison of the calculated and measured values of iron loss is shown in Figure 10.According to the results of the study, the PSO-RNN-based calculation method has less error in the high-frequency part of the calculation as compared to the model-based calculation method.Using the training set of the iron loss model as a representative example, Figure 11 shows the absolute and relative errors of the model.The maximum relative error calculated by the PSO-RNN-based calculation model under different inputs is less than 3%, as demonstrated by the results.

Conclusions
This article presents a combined PSO-RNN approach to estimating the iron loss of a PMSM.The RNN was fed with multiple factors as the input parameters, and PSO was used to optimize the initial weights of the RNN.Based on the results of the proposed PSO-RNN method, it is evident that it can provide accurate estimates of iron loss over a wide range of inputs.As a result of calculating the maximum relative error by comparing the measured results with the estimated results for different inputs, the PSO-RNN model was able to achieve less than a 3% relative error.

Conclusions
This article presents a combined PSO-RNN approach to estimating the iron loss of a PMSM.The RNN was fed with multiple factors as the input parameters, and PSO was used to optimize the initial weights of the RNN.Based on the results of the proposed PSO-RNN method, it is evident that it can provide accurate estimates of iron loss over a wide range of inputs.As a result of calculating the maximum relative error by comparing the measured results with the estimated results for different inputs, the PSO-RNN model was able to achieve less than a 3% relative error.

Discussion
The combination of PSO and RNNs to estimate iron loss in PMSMs offers a promising avenue for enhancement.While the method exhibits strengths in accuracy and efficiency, it faces limitations such as data dependency, model interpretability challenges, and the complexity of parameter tuning.However, by extending this approach through hybrid modeling, feature selection, multi-objective optimization, adaptive strategies, additional data integration, and various other adaptations, the accuracy, efficiency, and applicability of iron loss estimation in diverse motor types can be significantly improved.These advancements hold potential for refining motor designs and fostering energy-efficient systems across industries.

Figure 1 .Figure 1 .
Figure 1.Loss curves of silicon steel sheet with different temperatures at (a) 50 Hz and (b) 200 Figure 1.Loss curves of silicon steel sheet with different temperatures at (a) 50 Hz and (b) 200 Hz.

Figure 3 .
Figure 3. Multi-frequency iron loss fitting results: (a) fitting surface and (b) fitting relative error.

Figure 3 .
Figure 3. Multi-frequency iron loss fitting results: (a) fitting surface and (b) fitting relative error.

Figure 5 .
Figure 5. Logical diagram of the proposed system.

Figure 5 .
Figure 5. Logical diagram of the proposed system.
. Using the PSO-RNN-based iron loss calculation method, all factors affecting iron loss are taken as input variables of the neural network, and the output result is the final iron loss result.The RNN dataset is split into two subsets: training and validation sets.The training set is used to train the PSO-RNN model, where the model learns the patterns and relationships between input factors, magnetic flux densities, frequencies, temperatures, and iron loss.The validation set, on the other hand, is utilized to assess the model's performance and generalizability after training.It helps evaluate how well the model can predict iron losses accurately on unseen data.Magnetism 2023, 3, FOR PEER REVIEW 12 temperatures, and iron loss.The validation set, on the other hand, is utilized to assess the model's performance and generalizability after training.It helps evaluate how well the model can predict iron losses accurately on unseen data.

Figure 8 .
Figure 8. PMSM control system combined with proposed PSO-RNN iron loss method.

Figure 8 .
Figure 8. PMSM control system combined with proposed PSO-RNN iron loss method.

Figure 9 .
Figure 9.The prototype of PMSM and hardware of test bench.

Figure 10 .
Figure 10.Iron loss calculation results of different methods.

Figure 11 .
Figure 11.Absolute and relative errors of training set.

Figure 12
Figure12displays the comparison between the predicted and measured values of the trained neural network model when different inputs are applied.The root mean square error (RMSE) is a metric that is widely used to evaluate the accuracy of predictions or

Figure 9 .
Figure 9.The prototype of PMSM and hardware of test bench.

Figure 9 .
Figure 9.The prototype of PMSM and hardware of test bench.

Figure 10 .
Figure 10.Iron loss calculation results of different methods.Figure 10.Iron loss calculation results of different methods.

Figure 10 .
Figure 10.Iron loss calculation results of different methods.Figure 10.Iron loss calculation results of different methods.

Figure 10 .
Figure 10.Iron loss calculation results of different methods.

Figure 11 .
Figure 11.Absolute and relative errors of training set.

Figure 12
Figure 12 displays the comparison between the predicted and measured values of the trained neural network model when different inputs are applied.The root mean square error (RMSE) is a metric that is widely used to evaluate the accuracy of predictions or

Figure 11 .
Figure 11.Absolute and relative errors of training set.

Figure 12
Figure 12 displays the comparison between the predicted and measured values of the trained neural network model when different inputs are applied.The root mean square error (RMSE) is a metric that is widely used to evaluate the accuracy of predictions or estimates in comparison to the actual values in various fields, such as engineering, machine learning, and statistics.The formula for RMSE is:

Figure 12 .
Figure 12.Comparison between the predicted and the measured values: (a) original RNN and (b) PSO-RNN.

Figure 12 .
Figure 12.Comparison between the predicted and the measured values: (a) original RNN and (b) PSO-RNN.

Table 1 .
Classic iron loss models.

Table 2 .
Parameters of the PSO algorithm.

Table 4 .
Parameters of the PMSM.