Optimizing Sensorless Control in PMSM Based on the SOGIFO-X Flux Observer Algorithm

In the realm of sensorless control for a permanent magnet synchronous motor (PMSM), the flux observer algorithm is widely recognized. However, the estimation accuracy of rotor position is adversely impacted by the interference from DC bias and high-order harmonics. To address these issues, an advanced flux observation method, second-order generalized integrator flux observer extend (SOGIFO-X), is introduced in this paper. The study begins with a theoretical analysis to establish the relationship between flux observation error and rotor position error. The SOGIFO-X method, developed in this study, is compared with traditional methods such as the Low Pass Filter (LPF) and second-order generalized integrator flux observer (SOGIFO), employing mathematical rigor and Bode plot analysis. The emphasis is on the methodology and the general performance improvements SOGIFO-X offers over conventional methods. Simulations and experiments were conducted to assess the impact of SOGIFO-X on the steady-state and dynamic performances of sensorless control. Findings indicate that SOGIFO-X demonstrates significant enhancements in terms of reducing the reduced flux observation error, contributing to the advancement of position estimation accuracy and sensorless motor control technology.


Introduction
Permanent magnet synchronous motors (PMSM) are noted for their robust starting torque, long lifespan, wide speed regulation, and high power factor [1,2].Widely used across various sectors, they power everything from home appliances to medical devices, transport systems, and industrial machines.Field-oriented control, also known as vector control, is the dominant method for PMSM [3].This method crucially depends on real-time data regarding the motor's position and velocity.However, the traditional position sensor has disadvantages of limited use environment and high cost.Addressing the limitations of sensor-reliant systems, the field of sensorless control technology has gained prominence as a vital research area in recent years [4][5][6].
Currently, sensorless control in motors predominantly falls into two categories.The first is the high-frequency injection method [7], which leverages the motor's saliency effect and is typically applied in low-speed scenarios.The second category is the back EMF method, which includes various control techniques like sliding mode observers [8], Luenberger observers [9], and extended Kalman filters [10], mainly effective in medium-to high-speed ranges.However, at lower speeds, these methods can be negatively impacted by noise and non-linear factors, adversely affecting motor performance.
Position observers based on rotor flux have also been investigated.In sensorless PMSM control, rotor flux observation is key for estimating rotor position and speed, and is especially effective at medium to high speeds [11,12].Lee et al. [13] innovated a flux observer Sensors 2024, 24, 817 2 of 21 that precisely gauges rotor position by meticulously analyzing rotor flux.This observer integrates the stator's electromotive force using a pure integrator, facilitating accurate stator flux computation.It further accounts for voltage drops across both cross-and direct-axis synchronous inductances, ensuring precise rotor flux determination.Chen et al. [14] highlighted that the integral component of flux observers is prone to amplifying sampling errors and DC bias, leading to significant inaccuracies in rotor flux position estimation.Therefore, enhancing flux estimation accuracy is critical for the broader applicability and effectiveness of flux observers in sensorless control.
Building on this understanding, several researchers have proposed innovative solutions to overcome the limitations of traditional flux observers.Holtz et al. [15] developed a method averaging flux amplitude peaks and troughs within a sinusoidal cycle, effectively nullifying the DC bias in flux.Andreescu et al. [16] and Yu et al. [17] introduced a closed-loop phase-locked loop flux observer to address the flux chain error derived from flux estimation and integration, thereby mitigating the errors induced by integral zero drift.However, this method shows limited efficacy in suppressing higher-order harmonic disturbances.Jianhua et al. [18] developed an online flux amplitude correction based on flux chain discrepancies, enabling real-time adjustments to the permanent magnet flux, thus refining its amplitude accuracy.However, this technique is predominantly applied in motor model parameterization.Hinkkanen et al. [19] employed parameter identification for rotor flux observation, which is not amendable to offline corrections.Feng et al. [20] and Zhiqin et al. [21] proposed using a low pass filter (LPF) as a substitute for the integral component in traditional flux linkage systems.This approach effectively reduces DC bias and harmonic distortions, though it requires additional adjustments in amplitude and phase.Xu et al. [22] utilized an SABPF to eradicate both the DC element and highfrequency harmonics in the estimated equivalent rotor flux.Liu et al. [23] developed a flux observer using a hybrid voltage-current model, integrating a LPF with a HPF.However, this approach requires additional phase compensation to function effectively.
Known for its excellent filtering, orthogonal signal generation, and phase extraction capabilities, the Second-Order Generalized Integrator (SOGI) is highly effective in achieving a 90 • phase shift in grid voltage signals.Additionally, it efficiently filters higher-order harmonics, making it invaluable for grid applications [24][25][26].Zhaoping et al. [27] utilized a SOGI within a sliding mode observer to filter back electromotive force, aiming to minimize the high-frequency oscillations in sliding mode.This integration notably improved the system's dynamic performance and steady-state accuracy.Zhao et al. [28] and Wang et al. [29] developed a multi-SOGI-FLL flux estimator for induction motors, adept at estimating rotor flux while efficiently reducing both DC and higher-order components, albeit with some limitations in DC bias elimination.Xu et al. [30] introduced a fourth-order generalized integrative flux observer, excelling in removing DC bias and harmonics but at the cost of increased computational demands.Jiang et al. [31] introduced a sophisticated thirdorder generalized integral flux observer (TOGIFO), markedly improving rotor estimation accuracy.However, this method necessitates extensive parameter tuning.
Despite these advances, many challenges remain in the field of flux estimation.Most of the existing methods cannot completely eliminate DC offset, the filtering effect of highorder harmonics is limited or the amount of calculation is large, and the practicability is relatively weak.In order to solve this problem, based on the existing research, an advanced second-order generalized integrator flux observer named Extend (SOGIFO-X) is developed, which focuses on eliminating the DC bias in the estimated flux and weakening higher-order harmonics.Theoretical analyses affirm the effectiveness of SOGIFO-X in minimizing DC bias and harmonics, thereby substantially improving flux estimation accuracy and the determination of rotor position and speed, while maintaining robust dynamic performance.The SOGIFO-X algorithm's performance underwent rigorous validation via extensive numerical simulations and empirical testing.
The structure of this paper is organized as follows: Section 2 explores the conventional sensorless PMSM control algorithm using rotor flux observation, offering a concise analysis Sensors 2024, 24, 817 3 of 21 of how flux estimation accuracy affects rotor position.Section 3 evaluates the steadystate efficacy of rotor flux observers employing first-order integrator, LPF, and Second-Order Generalized Integrator Flux Observer (SOGIFO) by using comprehensive theoretical analysis, and introduces the enhanced SOGIFO-X.Section 4 details findings from extensive numerical simulations and empirical experiments.Finally, Section 5 summarizes the key conclusions of this paper.

Traditional PMSM Flux Observe
Vector control technology is extensively employed in the control of PMSM due to its effective torque control.Figure 1 provides a detailed schematic of vector control, with a special emphasis on the flux observer depicted in the figure's dashed area.This observer, crucial for sensorless control, is primarily tasked with estimating the rotor's position.
Sensors 2024, 24, x FOR PEER REVIEW 3 of 21 concise analysis of how flux estimation accuracy affects rotor position.Section 3 evaluates the steady-state efficacy of rotor flux observers employing first-order integrator, LPF, and Second-Order Generalized Integrator Flux Observer (SOGIFO) by using comprehensive theoretical analysis, and introduces the enhanced SOGIFO-X.Section 4 details findings from extensive numerical simulations and empirical experiments.Finally, Section 5 summarizes the key conclusions of this paper.

Traditional PMSM Flux Observe
Vector control technology is extensively employed in the control of PMSM due to its effective torque control.Figure 1 provides a detailed schematic of vector control, with a special emphasis on the flux observer depicted in the figure's dashed area.This observer, crucial for sensorless control, is primarily tasked with estimating the rotor's position.
Conventional rotor flux observers in PMSM primarily analyze the interactions among stator current, voltage, and rotor flux to infer the rotor's position and speed.This method involves two critical steps: estimating the flux and calculating the position-speed parameters.To simplify the derivation, this analysis excludes core saturation, eddy currents, and hysteresis losses.Additionally, it assumes no damping effects in either the rotor or the permanent magnet, considering the back electromotive force to be sinusoidal.As a result, within a stationary reference frame, the equations for voltage and flux in the PMSM are structured in the following manner: where  =   is the stator voltage vector,  is the stator resistance,  =   is the stator current,  symbolizes the derivative (time derivative),  = Ψ Ψ is the stator flux vector,  is the inductance matrix,  is the permanent magnet flux, and  is the actual position of the rotor.
Differentiating the flux yields the back electromotive force, from which the state variables  and  are constructed.Here,  =   is the stator flux  ,  −  is the  Conventional rotor flux observers in PMSM primarily analyze the interactions among stator current, voltage, and rotor flux to infer the rotor's position and speed.This method involves two critical steps: estimating the flux and calculating the position-speed parameters.
To simplify the derivation, this analysis excludes core saturation, eddy currents, and hysteresis losses.Additionally, it assumes no damping effects in either the rotor or the permanent magnet, considering the back electromotive force to be sinusoidal.As a result, within a stationary reference frame, the equations for voltage and flux in the PMSM are structured in the following manner: where u s = u α u β T is the stator voltage vector, R s is the stator resistance, i s = i α i β T is the stator current, p symbolizes the derivative (time derivative), Ψ s = Ψ α Ψ β T is the stator flux vector, L is the inductance matrix, ψ f is the permanent magnet flux, and θ e is the actual position of the rotor.Differentiating the flux yields the back electromotive force, from which the state variables x and y are constructed.Here, x = x α x β T is the stator flux Ψ s , x − Li s is Sensors 2024, 24, 817 4 of 21 the rotor flux vector Ψ r = Ψ rα Ψ rβ T , and y = y α y β T is the back electromotive force vector.
To develop a nonlinear observer, a vector function η is defined.
The final nonlinear flux observer is represented as follows: .
where x is the observer's state variable, and γ is the observer's gain coefficient.Equation (3) reveals that the rotor flux vector holds essential positional information about the rotor, facilitating the computation of the rotor's electrical angle, detailed as follows: Equation (8) demonstrates that errors in the estimation of the rotor flux vector significantly affect the accuracy of calculating the rotor's electrical angle.
In order to visualize the flux observation algorithm, Figure 2 depicts the voltage equation (Equation (1)) and flux equation (Equation ( 2)) of the mathematical model of the permanent magnet synchronous motor in a vector way.The rotor flux circle Ψ r represented by the dotted line in the figure can be calculated through the mathematical model, and its vector direction, which is the rotor angle of the motor, can then be obtained.It can be seen that accurately estimating the flux information is the core of the flux observation algorithm, and will also directly affect the accurate output of the observer.Hence, it is crucial to develop an algorithm that accurately estimates the rotor flux, closely linked to the rotor's position, to ensure stable and effective motor control.1) and ( 2), a state-space equation can be constructed:

𝑥 = 𝑦
To develop a nonlinear observer, a vector function  is defined.

𝜂 𝑥 = 𝑥 − 𝐿 ⋅ 𝑖 𝑖
The final nonlinear flux observer is represented as follows: where  is the observer's state variable, and  is the observer's gain coefficient.Equation (3) reveals that the rotor flux vector holds essential positional information a the rotor, facilitating the computation of the rotor's electrical angle, detailed as follows: 8) demonstrates that errors in the estimation of the rotor flux ve significantly affect the accuracy of calculating the rotor's electrical angle.
In order to visualize the flux observation algorithm, Figure 2 depicts the vol equation (Equation (1)) and flux equation (Equation ( 2)) of the mathematical model o permanent magnet synchronous motor in a vector way.The rotor flux circl represented by the dotted line in the figure can be calculated through the mathema model, and its vector direction, which is the rotor angle of the motor, can then be obtai It can be seen that accurately estimating the flux information is the core of the observation algorithm, and will also directly affect the accurate output of the obse Hence, it is crucial to develop an algorithm that accurately estimates the rotor flux, clo linked to the rotor's position, to ensure stable and effective motor control.

Flux Observer Based on SOGIFO-X 3.1. Error Analysis
Influenced by external environmental factors, the rotor flux vector incorporates a variety of disturbance signals, mainly composed of DC components and higher-order harmonics.
Based on Equations ( 1) and ( 2), the rotor flux can be expressed as the integral of the back electromotive force (EMF), leading to the following derivation: where e r is the back EMF vector, with e r = e rα e rβ T .The initial value for the integration of the estimated rotor flux vector is defined as Ψ r (0) = Ψ s (0) − Li s (0).
Changes in temperature and current can affect stator inductance and resistance, impacting the estimation of flux magnitude.Additionally, the drive system is prone to various disturbances, such as parameter mismatches, uncertain initial integration values, measurement errors, and converter non-linearities.This necessitates an adjustment to Equation (9), which is elaborated below: where R s0 is the initial value of stator resistance, ∆R s is the change in stator resistance, L 0 is the initial inductance value, ∆L indicates the change in inductance, e r0 is the initial electromotive force, and χ is a compensation factor.Equation ( 9) represents a stable value, known as the fundamental component, and contrasts with disturbances composed of DC and harmonic elements.Consequently, Equation ( 10) is revised to the following form: e r = A 0 + A 1 sin(ω 1 t + φ 1 ) + ∑ A h sin(ω h t + φ h ) (11) where A 0 , A 1 , and A h are the amplitude coefficients of the DC component, fundamental component, and harmonic components, respectively.ω 1 and ω h are the angular frequencies of the fundamental and harmonic components, while φ 1 and φ h are their respective phase angles.The summation symbol ∑ is the cumulative addition of all harmonic components.
Upon applying the Laplace transform, the equation becomes: where E r (s) is the Laplace transform of E r , and s is the Laplace operator.

Traditional Algorithm Analysis
The performance of the algorithm introduced in this paper is evaluated by comparing it with established methods like the pure integrator, LPF, and SOGIFO.

Integrator
Traditional flux observers utilize a first-order integrator, represented by 1/s in the flux estimation process.Considering the aforementioned nonlinear disturbances, the observed rotor flux E r (s)•1/s, after undergoing inverse Laplace transformation, is expressed as: Sensors 2024, 24, 817 6 of 21

This expression comprises a DC bias component
sin(ω 1 t + φ 1 − 0.5πt), and higher-order harmonic components The term A 0 t suggests a linear increase in DC bias over time, resulting in a substantial offset in the integrator's output, even with minimal DC components.This can greatly affect the integration outcomes, possibly causing considerable distortion from magnetic flux saturation.Such discrepancies can lead to errors in estimating rotor position, potentially compromising the feasibility of sensorless control in extreme cases.Additionally, the presence of harmonic elements in the rotor flux chain estimation may adversely affect the accuracy of position measurement.

LPF
Digital low pass filters are frequently used to reduce magnetic saturation, DC bias, and higher-order harmonic interference.This method eliminates the DC drift component by subtracting it from the flux chain or applying a high-pass filter after integration.This process removes the DC component from the fundamental flux chain, akin to a low-pass filter's effect.Choosing an appropriate cutoff frequency effectively minimizes DC bias and higher-order harmonics in the flux chain integration process.However, this method may result in some amplitude reduction and phase lag, necessitating the implementation of compensatory strategies.
Consider E r (s)•1/(s + ω c ), and after applying the inverse Laplace transform: where is the DC bias component, is the higher-order harmonic component.The DC component gradually decreases exponentially over time.Although it cannot be completely eliminated, this method effectively addresses magnetic saturation issues.Additionally, it significantly reduces the amplitude of higher-order harmonics.However, using a LPF also results in a reduction of the fundamental wave's amplitude and introduces a phase delay.Compared to the integrator, the attenuation of the fundamental wave amplitude is , with a phase delay . Therefore, compensation for amplitude and phase is required.

SOGIFO
SOGI can generate two mutually orthogonal signals, and its structure is illustrated in Figure 3. v is the input signal.The outputs, v ′ and qv ′ , are two orthogonal signals, with v ′ leading qv ′ by a phase of 90 • .The transfer function of SOGI is given by: where v is the input sinusoidal voltage signal, and k is the damping coefficient.
Sensors 2024, 24, 817 7 of 21 where  is the input sinusoidal voltage signal, and  is the damping coefficient.When the filter's center frequency  matches the input voltage signal's frequency , the output signals  and  become sinusoidal waves with equal amplitude and a 90° phase difference. shares the same phase and amplitude as .D(s) is commonly used for filtering, and Q(s) serves the purpose of integration.
Applying the SOGI in flux observers involves using the back EMF vector as the input to SOGI.The structure of the Second-Order Generalized Integrative Flux Observer (SOGIFO) is shown in Figure 3.
Equation (17) demonstrates that using SOGIFO can achieve the same effect as the integrator component in traditional flux observers.

Consider 𝐸 𝑠 •
, and after applying the inverse Laplace transform: where is the DC bias component, sin   +  − 0.5 is the fundamental component, and ∑ ⋅ / ⋅ sin   +  − 0.5 +  is the higher-order harmonic component.It is observed that, compared to a pure integrator, the fundamental component does not exhibit any change in amplitude and phase, and the higher-order harmonic components are significantly reduced.The DC bias component is attenuated, addressing the issue of magnetic saturation, but it is not completely eliminated.

SOGIFO-X
An enhanced SOGIFO-X technique has been introduced, designed to surmount the challenges in DC bias elimination inherent in traditional SOGIFO.This approach focuses on refined flux filtering and integration for improved performance.Illustrated in Figure 4, this sophisticated method incorporates a low-pass filter into the SOGIFO framework, efficiently minimizing higher-order harmonic interference and substantially reducing  When the filter's center frequency ω ′ matches the input voltage signal's frequency ω, the output signals v ′ and qv ′ become sinusoidal waves with equal amplitude and a 90 • phase difference.v ′ shares the same phase and amplitude as v. D(s) is commonly used for filtering, and Q(s) serves the purpose of integration.
Applying the SOGI in flux observers involves using the back EMF vector as the input to SOGI.The structure of the Second-Order Generalized Integrative Flux Observer (SOGIFO) is shown in Figure 3.
Equation (17) demonstrates that using SOGIFO can achieve the same effect as the integrator component in traditional flux observers.
Consider E r (s)• kω ′ s 2 +kω ′ s+ω ′2 , and after applying the inverse Laplace transform: where • sin(ω h t + φ h − 0.5πt + γ h1 ) is the higher-order har- monic component.It is observed that, compared to a pure integrator, the fundamental component does not exhibit any change in amplitude and phase, and the higher-order harmonic components are significantly reduced.The DC bias component is attenuated, addressing the issue of magnetic saturation, but it is not completely eliminated.

SOGIFO-X
An enhanced SOGIFO-X technique has been introduced, designed to surmount the challenges in DC bias elimination inherent in traditional SOGIFO.This approach focuses on refined flux filtering and integration for improved performance.Illustrated in Figure 4, this sophisticated method incorporates a low-pass filter into the SOGIFO framework, efficiently minimizing higher-order harmonic interference and substantially reducing qv ′ in the highfrequency range.Consequently, SOGIFO-X excels in simultaneously mitigating both the DC component and higher-order harmonics within the input signal.The transfer function for SOGIFO-X is delineated below: where k is the damping coefficient, and τ is the time constant of the low pass filter.
Sensors 2024, 24, x FOR PEER REVIEW 8 of 21 in the high-frequency range.Consequently, SOGIFO-X excels in simultaneously mitigating both the DC component and higher-order harmonics within the input signal.
The transfer function for SOGIFO-X is delineated below: where  is the damping coefficient, and  is the time constant of the low pass filter.Similar to SOGI,   is typically used for filtering, and   serves the role of integration. can be considered the integrated flux of the input back EMF, defined at steady state as  = .The calculation formula is: Equation (21) demonstrates that the improved SOGIFO-X can be used to estimate the motor rotor flux vector information.

Consider 𝐸 𝑠 •
, and after applying the inverse Laplace transform: Based on the final value theorem of Laplace transform, we obtain: • Fundamental Component Substituting  =  into Equation ( 21), we obtain: • Higher-Order Harmonics Similar to SOGI, D(s) is typically used for filtering, and Q(s) serves the role of integration.qv ′ can be considered the integrated flux of the input back EMF, defined at steady state as s = jω.The calculation formula is: Equation (21) demonstrates that the improved SOGIFO-X can be used to estimate the motor rotor flux vector information.
Consider E r (s) , and after applying the inverse Laplace transform: Based on the final value theorem of Laplace transform, we obtain: Substituting s = jω into Equation ( 21), we obtain: •

Higher-Order Harmonics
Sensors 2024, 24, 817 9 of 21 With τ as the time constant of the LPF, taking τ = 2π ω , and substituting s = jω h = jhω into Equation ( 21), we obtain: where: By incorporating the harmonic components into Equation ( 21), the higher-order harmonics of the flux can be represented as: where: In summary, the flux chain after filtering integration by using the SOGIFO-X is as follows: The Is derived from the specified equation demonstrate that SOGIFO-X adeptly eliminates the DC component within the input signal and effectively attenuates high-frequency elements.Additionally, at the fundamental frequency, the integration of the LPF does not incur any delay, thereby enabling the precise filtering of interference signals amidst flux chain integration.
Fluctuations in the control system's quality factor, triggered by varying input signal frequencies, significantly influence its dynamic behavior.To address this, incorporating the phase angle ω 0 into SOGIFO-X endows the flux observer with enhanced frequency responsiveness.This integration guarantees precise synchronization of SOGIFO-X with the input signal's frequency, even amid variations in the rotor position signal's frequency.The execution of this frequency adaptation is efficiently actualized using a PLL, as illustrated in Figure 5.
into Equation (21), we obtain: By incorporating the harmonic components into Equation ( 21), the higher-o harmonics of the flux can be represented as: where: In summary, the flux chain after filtering integration by using the SOGIFO-X follows: The Is derived from the specified equation demonstrate that SOGIFO-X ade eliminates the DC component within the input signal and effectively attenuates h frequency elements.Additionally, at the fundamental frequency, the integration o LPF does not incur any delay, thereby enabling the precise filtering of interference sig amidst flux chain integration.
Fluctuations in the control system's quality factor, triggered by varying input s frequencies, significantly influence its dynamic behavior.To address this, incorpora the phase angle  into SOGIFO-X endows the flux observer with enhanced frequ responsiveness.This integration guarantees precise synchronization of SOGIFO-X the input signal's frequency, even amid variations in the rotor position signal's freque The execution of this frequency adaptation is efficiently actualized using a PLL illustrated in Figure 5. Sensors 2024, 24, 817 10 of 21

Bode Diagram Analysis
The effectiveness of the SOGIFO-X method has been substantiated through rigorous mathematical analysis.Figure 6 shows the comparative Bode plot analysis of different algorithms.
Sensors 2024, 24, x FOR PEER REVIEW

Bode Diagram Analysis
The effectiveness of the SOGIFO-X method has been substantiated throug mathematical analysis.Figure 6 shows the comparative Bode plot analysis o algorithms.The magnitude response of the first-order integrator shows a 20 dB/decad at lower frequencies.This indicates an amplified DC bias in flux deviation, w lead to magnetic flux saturation.
Conversely, a LPF effectively diminishes the DC component, exhibit dB/decade reduction in high frequencies, similar to the attenuation of a integrator in this range.However, the LPF's performance at the center freque notable amplitude reduction and phase delay, suggesting the need for further SOGIFO's low-frequency response parallels that of the LPF, implying a but not complete removal, of DC bias.Its high-frequency response, decreas dB/decade, indicates a superior capacity to filter higher-order harmonics comp LPF.At the center frequency, SOGIFO maintains consistency with a first-order preserving the integrity of the fundamental wave.
SOGIFO-X excels in minimizing both DC components and harmonics, wi frequency response reducing at −20 dB/decade, signifying complete DC bias r high frequencies, its −40 dB/decade reduction mirrors SOGIFO's high-order filtering capability, while keeping the fundamental wave unaffected.
In summary, SOGIFO-X demonstrates superior filtering effectiveness, as on in Table 1.The magnitude response of the first-order integrator shows a 20 dB/decade increase at lower frequencies.This indicates an amplified DC bias in flux deviation, which could lead to magnetic flux saturation.
Conversely, a LPF effectively diminishes the DC component, exhibiting a −20 dB/decade reduction in high frequencies, similar to the attenuation of a first-order integrator in this range.However, the LPF's performance at the center frequency shows notable amplitude reduction and phase delay, suggesting the need for further tuning.
SOGIFO's low-frequency response parallels that of the LPF, implying a reduction, but not complete removal, of DC bias.Its high-frequency response, decreasing at −40 dB/decade, indicates a superior capacity to filter higher-order harmonics compared to the LPF.At the center frequency, SOGIFO maintains consistency with a first-order integrator, preserving the integrity of the fundamental wave.
SOGIFO-X excels in minimizing both DC components and harmonics, with its lowfrequency response reducing at −20 dB/decade, signifying complete DC bias removal.At high frequencies, its −40 dB/decade reduction mirrors SOGIFO's high-order harmonic filtering capability, while keeping the fundamental wave unaffected.
In summary, SOGIFO-X demonstrates superior filtering effectiveness, as elaborated on in Table 1.

Simulation Analysis
A control system for a PMSM was constructed and tested using Simulink, serving to confirm the efficacy of the control approach suggested in this study.The performance of flux observers based on pure integrators, LPF, SOGIFO, and SOGIFO-X is analyzed and compared.
The parameters of the selected PMSM are as outlined in Table 2.The four algorithms were tested in the same operating conditions to compare their flux estimation accuracy.This comparison highlighted each algorithm's ability to reduce DC bias and high-order harmonics.Furthermore, by analyzing the differences between the estimated and actual rotor positions, the effectiveness of the rotor position state observer in each algorithm was assessed.This approach ensures a fair and comprehensive evaluation of the algorithms' performance in practical settings.
Figure 7 presents a comparative analysis of the estimated α and β axis flux versus the ideal flux in a PMSM, employing various flux observers at a constant no-load speed of 1200 rpm.The ideal flux is represented as a black circle in this figure.The deviation of the actual flux center from the coordinate origin is indicative of the DC bias filtering effect, while the thickness of the solid line represents the effectiveness in filtering higher harmonics.By analyzing both aspects, namely DC bias and high-order harmonic filtering, the flux estimation capabilities of each algorithm can be comprehensively compared.The flux estimation by using the pure integrator exhibits a marked deviation from the ideal, indicating a significant DC bias effect.This variation highlights the limitations of the pure integrator in mitigating DC bias and high-frequency disturbances in flux estimation.Conversely, the flux circle estimated by using the compensated LPF shows less deviation, but still struggles with high-frequency disturbance filtration.SOGIFO demonstrates enhanced filtering of high frequencies, yet exhibits some offset.In stark contrast, SOGIFO-X successfully eliminates this offset, showcasing its exceptional accuracy in tracking the ideal flux.Figure 8 illustrates the α-axis flux estimation errors of four algorithms compared the ideal flux.The deviation in flux along the X-axis is indicative of a DC offset err Furthermore, the waveform's sinuosity is a representation of the presence of high harmonics.Table 3 shows the data analysis of the corresponding four algorithms.T mean error (ME) comparison reveals a markedly lower error for the SOGIFO-X algorith compared to its three counterparts.In contrast to the consistently positive errors seen other algorithms, SOGIFO-X's errors fluctuate around zero, with a median close to ze suggesting an effective elimination of DC bias.Additionally, the root mean square err (RMSE) for SOGIFO-X is substantially smoother than the others, indicating a mo uniform error variation.Moreover, SOGIFO-X and SOGIFO exhibit significantly reduc high-frequency disturbances in their error patterns, underscoring their enhanc effectiveness in filtering higher-order harmonics.Figure 8 illustrates the α-axis flux estimation errors of four algorithms compared to the ideal flux.The deviation in flux along the X-axis is indicative of a DC offset error.Furthermore, the waveform's sinuosity is a representation of the presence of higher harmonics.Table 3 shows the data analysis of the corresponding four algorithms.The mean error (ME) comparison reveals a markedly lower error for the SOGIFO-X algorithm compared to its three counterparts.In contrast to the consistently positive errors seen in other algorithms, SOGIFO-X's errors fluctuate around zero, with a median close to zero, suggesting an effective elimination of DC bias.Additionally, the root mean square error (RMSE) for SOGIFO-X is substantially smoother than the others, indicating a more uniform error variation.Moreover, SOGIFO-X and SOGIFO exhibit significantly reduced high-frequency disturbances in their error patterns, underscoring their enhanced effectiveness in filtering higher-order harmonics.
Figure 9 showcases the waveforms of rotor angle estimations amid DC bias and highorder harmonic interferences, analyzed using flux observers with four different algorithms.Table 4 shows the corresponding data analysis of the algorithm.The waveform analysis reveals that the rotor position error, as estimated using SOGIFO-X, is notably smaller compared to the other three algorithms.The standard deviation associated with SOGIFO-X is notably lower compared to the other three algorithms, indicating a more consistent and smoother estimated angle error.This underscores a substantial enhancement in rotor angle estimation accuracy achieved by using the algorithm introduced in this study, critically contributing to the motor's stable operation.Figure 9 showcases the waveforms of rotor angle estimations amid DC bias and highorder harmonic interferences, analyzed using flux observers with four different algorithms.Table 4 shows the corresponding data analysis of the algorithm.The waveform analysis reveals that the rotor position error, as estimated using SOGIFO-X, is notably smaller compared to the other three algorithms.The standard deviation associated with SOGIFO-X is notably lower compared to the other three algorithms, indicating a more consistent and smoother estimated angle error.This underscores a substantial enhancement in rotor angle estimation accuracy achieved by using the algorithm introduced in this study, critically contributing to the motor's stable operation.The flux observer's ability to accurately determine rotor position is heavily reliant on the precision of flux estimation.At low speeds, factors like signal-to-noise ratio and dead zones, which introduce nonlinearity, can diminish the accuracy of flux estimation.This reduction in accuracy, in turn, leads to increased errors in rotor position determination, highlighting the challenge of maintaining precise control in these conditions.The accuracy of rotor position calculation by using the flux observer relies heavily on the flux estimation, which tends to be less accurate at lower speeds, leading to increased errors in rotor position determination under these conditions.To ensure a stable startup in lowspeed scenarios, motors often employ I/F control mode.This involves setting an appropriate current-to-frequency ratio, allowing the motor to operate with open-loop speed control and closed-loop current control.In this setup, rotor position information is manually inputted, facilitating smoother and more reliable motor initiation at lower speeds.In the experimental framework, the system initially operates under Inverter Feed (I/F) mode for speeds up to 600 rpm, then gradually shifts to using the flux observer.The flux observer's ability to accurately determine rotor position is heavily reliant on the precision of flux estimation.At low speeds, factors like signal-to-noise ratio and dead zones, which introduce nonlinearity, can diminish the accuracy of flux estimation.This reduction in accuracy, in turn, leads to increased errors in rotor position determination, highlighting the challenge of maintaining precise control in these conditions.The accuracy of rotor position calculation by using the flux observer relies heavily on the flux estimation, which tends to be less accurate at lower speeds, leading to increased errors in rotor position determination under these conditions.To ensure a stable startup in low-speed scenarios, motors often employ I/F control mode.This involves setting an appropriate current-to-frequency ratio, allowing the motor to operate with open-loop speed control and closed-loop current control.In this setup, rotor position information is manually inputted, facilitating smoother and more reliable motor initiation at lower speeds.In the experimental framework, the system initially operates under Inverter Feed (I/F) mode for speeds up to 600 rpm, then gradually shifts to using the flux observer.Figure 10 shows a side-by-side comparison of rotor speeds as estimated by using the SOGIFO-X flux observer and the actual speeds.Remarkably, following the switch to the flux observer at 3.5 s, the estimated rotor speeds align closely with the actual speeds.The analysis indicates that the SOGIFO-X-based flux observer demonstrates high accuracy in estimating motor speed, particularly in the mid-and high-speed ranges.
Sensors 2024, 24, x FOR PEER REVIEW 15 of 21 Figure 10 shows a side-by-side comparison of rotor speeds as estimated by using the SOGIFO-X flux observer and the actual speeds.Remarkably, following the switch to the flux observer at 3.5 s, the estimated rotor speeds align closely with the actual speeds.The analysis indicates that the SOGIFO-X-based flux observer demonstrates high accuracy in estimating motor speed, particularly in the mid-and high-speed ranges.

Dynamic Performance of the Algorithm
The effectiveness of the proposed method was further substantiated by assessing the motor's dynamic response to speed and torque variations using the SOGIFO-X-based flux observer.Figure 11 shows the motor's performance when subjected to a 0.05 Nm load at 7.5 s, exhibiting response curves for speed, rotor error, electromagnetic torque, and phase current upon this sudden load change.Figure 12 illustrates the motor's response to a rapid shift in reference speed: initially decreasing from 1200 rpm to 800 rpm at the 6-s mark, followed by a return to 1200 rpm after 8 s.It can be seen that in the case of disturbance, the individual waveforms quickly return to the stable state.In tandem, the estimated speed closely matches the actual speed, confirming SOGIFO-X's precision in rotor position estimation.The rapid stabilization of phase current in response to load changes further attests to the algorithm's dynamic adaptability.

Dynamic Performance of the Algorithm
The effectiveness of the proposed method was further substantiated by assessing the motor's dynamic response to speed and torque variations using the SOGIFO-X-based flux observer.Figure 11 shows the motor's performance when subjected to a 0.05 Nm load at 7.5 s, exhibiting response curves for speed, rotor error, electromagnetic torque, and phase current upon this sudden load change.Figure 12 illustrates the motor's response to a rapid shift in reference speed: initially decreasing from 1200 rpm to 800 rpm at the 6-s mark, followed by a return to 1200 rpm after 8 s.It can be seen that in the case of disturbance, the individual waveforms quickly return to the stable state.In tandem, the estimated speed closely matches the actual speed, confirming SOGIFO-X's precision in rotor position estimation.The rapid stabilization of phase current in response to load changes further attests to the algorithm's dynamic adaptability.
Sensors 2024, 24, x FOR PEER REVIEW 15 of 21 Figure 10 shows a side-by-side comparison of rotor speeds as estimated by using the SOGIFO-X flux observer and the actual speeds.Remarkably, following the switch to the flux observer at 3.5 s, the estimated rotor speeds align closely with the actual speeds.The analysis indicates that the SOGIFO-X-based flux observer demonstrates high accuracy in estimating motor speed, particularly in the mid-and high-speed ranges.

Dynamic Performance of the Algorithm
The effectiveness of the proposed method was further substantiated by assessing the motor's dynamic response to speed and torque variations using the SOGIFO-X-based flux observer.Figure 11 shows the motor's performance when subjected to a 0.05 Nm load at 7.5 s, exhibiting response curves for speed, rotor error, electromagnetic torque, and phase current upon this sudden load change.Figure 12 illustrates the motor's response to a rapid shift in reference speed: initially decreasing from 1200 rpm to 800 rpm at the 6-s mark, followed by a return to 1200 rpm after 8 s.It can be seen that in the case of disturbance, the individual waveforms quickly return to the stable state.In tandem, the estimated speed closely matches the actual speed, confirming SOGIFO-X's precision in rotor position estimation.The rapid stabilization of phase current in response to load changes further attests to the algorithm's dynamic adaptability.Table 5 conducts a comprehensive analysis of the dynamic response within the scenarios depicted in Figures 11 and 12, assessing multiple parameters, including overshoot, settling time, peak time, and rise time, with the motor's speed response serving as the focal point.The empirical data indicates that-when confronted with abrupt changes in reference speed and load-the system is capable of swiftly reverting to a stable state.This evidences the system's commendable dynamic capabilities.Table 5 conducts a comprehensive analysis of the dynamic response within the scenarios depicted in Figures 11 and 12, assessing multiple parameters, including overshoot, settling time, peak time, and rise time, with the motor's speed response serving as the focal point.The empirical data indicates that-when confronted with abrupt changes in reference speed and load-the system is capable of swiftly reverting to a stable state.This evidences the system's commendable dynamic capabilities.Table 5 conducts a comprehensive analysis of the dynamic response within the scenarios depicted in Figures 11 and 12, assessing multiple parameters, including overshoot, settling time, peak time, and rise time, with the motor's speed response serving as the focal point.The empirical data indicates that-when confronted with abrupt changes in reference speed and load-the system is capable of swiftly reverting to a stable state.This evidences the system's commendable dynamic capabilities.

Analysis of Experiment
In addition to simulations, practical tests of the SOGIFO-X were conducted on a dedicated PMSM testing platform, as illustrated in Figure 13.The tests utilized an STM32G4 board configured with a sampling frequency of 10 kHz for both FOC and sensorless algorithms.Initially, the motor accelerates to 600 rpm using I/F control in the zero-low speed range.To ensure a smooth start, the I/F mode employs a steady frequency increase for the position information.Once the motor achieves stable operation at medium and high speeds, it transitions to a flux observer mode for speed closed-loop control.In this phase, the rotor position information is entirely provided by the flux observer, facilitating seamless motor control across different speed ranges.Waveform data, recorded via an oscilloscope and serial port, reflected the motor's operational parameters, which were consistent with those in the simulations.

Analysis of Experiment
In addition to simulations, practical tests of the SOGIFO-X were conducted on a dedicated PMSM testing platform, as illustrated in Figure 13.The tests utilized an STM32G4 board configured with a sampling frequency of 10 kHz for both FOC and sensorless algorithms.Initially, the motor accelerates to 600 rpm using I/F control in the zero-low speed range.To ensure a smooth start, the I/F mode employs a steady frequency increase for the position information.Once the motor achieves stable operation at medium and high speeds, it transitions to a flux observer mode for speed closed-loop control.In this phase, the rotor position information is entirely provided by the flux observer, facilitating seamless motor control across different speed ranges.Waveform data, recorded via an oscilloscope and serial port, reflected the motor's operational parameters, which were consistent with those in the simulations.Figure 14 illustrates the motor's estimated flux chain waveform at a steady speed of 1200 rpm, contrasting it with the ideal waveform, represented in black.The implementation of the advanced SOGIFO-X algorithm significantly refines the accuracy of flux chain estimation, harmonizing the experimental findings with simulation data.Figure 15 depicts the motor's current and positional changes during the speed transition from 300 to 1200 rpm, showing the motor's rapid return to stability post disturbances.Figure 16 shows the dynamic response of the motor under a 0.03 Nm load disturbance for 1 s, and the results show that the motor can quickly return to the stable state.The experiments demonstrate that the system aligns with the simulations, exhibiting robust dynamic performance.
The experimental findings confirm that the method markedly diminishes positional estimation error fluctuations, yields enhanced rotor position accuracy, and upholds robust dynamic performance.Figure 14 illustrates the motor's estimated flux chain waveform at a steady speed of 1200 rpm, contrasting it with the ideal waveform, represented in black.The implementation of the advanced SOGIFO-X algorithm significantly refines the accuracy of flux chain estimation, harmonizing the experimental findings with simulation data.Figure 15 depicts the motor's current and positional changes during the speed transition from 300 to 1200 rpm, showing the motor's rapid return to stability post disturbances.Figure shows the dynamic response of the motor under a 0.03 Nm load disturbance for 1 s, and the results show that the motor can quickly return to the stable state.The experiments demonstrate that the system aligns with the simulations, exhibiting robust dynamic performance.
The experimental findings confirm that the method markedly diminishes positional estimation error fluctuations, yields enhanced rotor position accuracy, and upholds robust dynamic performance.

Analysis of Experiment
In addition to simulations, practical tests of the SOGIFO-X were conducted on a dedicated PMSM testing platform, as illustrated in Figure 13.The tests utilized an STM32G4 board configured with a sampling frequency of 10 kHz for both FOC and sensorless algorithms.Initially, the motor accelerates to 600 rpm using I/F control in the zero-low speed range.To ensure a smooth start, the I/F mode employs a steady frequency increase for the position information.Once the motor achieves stable operation at medium and high speeds, it transitions to a flux observer mode for speed closed-loop control.In this phase, the rotor position information is entirely provided by the flux observer, facilitating seamless motor control across different speed ranges.Waveform data, recorded via an oscilloscope and serial port, reflected the motor's operational parameters, which were consistent with those in the simulations.Figure 14 illustrates the motor's estimated flux chain waveform at a steady speed of 1200 rpm, contrasting it with the ideal waveform, represented in black.The implementation of the advanced SOGIFO-X algorithm significantly refines the accuracy of flux chain estimation, harmonizing the experimental findings with simulation data.Figure 15 depicts the motor's current and positional changes during the speed transition from 300 to 1200 rpm, showing the motor's rapid return to stability post disturbances.Figure 16 shows the dynamic response of the motor under a 0.03 Nm load disturbance for 1 s, and the results show that the motor can quickly return to the stable state.The experiments demonstrate that the system aligns with the simulations, exhibiting robust dynamic performance.
The experimental findings confirm that the method markedly diminishes positional estimation error fluctuations, yields enhanced rotor position accuracy, and upholds robust dynamic performance.

Conclusions
The SOGIFO-X flux observer is presented as an innovative approach, designed to overcome the limitations of traditional flux observers in the sensorless control of PMSM.The proposed algorithm significantly reduces the high-order harmonics without changing the fundamental wave amplitude and phase, and completely eliminates the DC bias problem prevalent in the existing methods.Rigorous mathematical validation and Bode plot analysis, coupled with simulation and experimental verifications, confirm SOGIFO-X's enhanced accuracy in flux linkage estimation.This leads to more precise rotor position determination and improved PMSM operational efficiency.Furthermore, SOGIFO-X demonstrates a robust dynamic response, broadening its practical application range.However, as its optimal performance is primarily observed in high-speed scenarios, future research should aim to adapt this algorithm for effective use in low-speed conditions.

Figure 1 .
Figure 1.Closed-loop vector control block diagram.* represents the reference value.

Figure 1 .
Figure 1.Closed-loop vector control block diagram.* represents the reference value.

Figure 2 .
Figure 2. Vector diagram of rotor flux observation algorithm.

Figure 2 .
Figure 2. Vector diagram of rotor flux observation algorithm.

Figure 3 .
Figure 3. Block diagram of flux observer based on SOGIFO.

Figure 3 .
Figure 3. Block diagram of flux observer based on SOGIFO.

Figure 4 .
Figure 4. Block diagram of flux observer based on SOGIFO-X.

Figure 4 .
Figure 4. Block diagram of flux observer based on SOGIFO-X.

Figure 6 .
Figure 6.Bode diagrams of first-order integrator, LPF, SOGIFO, and SOGIFO-X.The bl black, and purple lines represent the Bode plots of the first-order integral, LPF, SOGIFO SOGIFO-X, respectively.

Figure 7 .
Figure 7. Rotor flux vector at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-X.The black line represents the ideal magnetic flux circle of the rotor.The blue, red, green, and purple lines respectively represent the estimated rotor magnetic flux circles of Integral, LPF, SOGIFO, a SOGIFO-X.

Figure 7 .
Figure 7. Rotor flux vector at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-X.The black line represents the ideal magnetic flux circle of the rotor.The blue, red, green, and purple lines respectively represent the estimated rotor magnetic flux circles of Integral, LPF, SOGIFO, and SOGIFO-X.

Figure 8 .
Figure 8. Flux vector estimation of α-axis rotor at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-X.(e) Comparison of flux errors of four algorithms.The black line represents the ideal observed error of the rotor flux.The blue, red, green, and purple lines represent the observed errors of the Integral, LPF, SOGIFO and SOGIFO-X respectively for the rotor flux.

Figure 8 .
Figure 8. Flux vector estimation of α-axis rotor at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-X.(e) Comparison of flux errors of four algorithms.The black line represents the ideal observed error of the rotor flux.The blue, red, green, and purple lines represent the observed errors of the Integral, LPF, SOGIFO and SOGIFO-X respectively for the rotor flux.

Figure 9 .
Figure 9. Rotor position estimation at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-X.(e) Comparison of rotor position errors of four algorithms.The black line represents the ideal observed error of the rotor position.The blue, red, green, and purple lines represent the observed errors of the Integral, LPF, SOGIFO and SOGIFO-X respectively for the rotor position.

Figure 9 .
Figure 9. Rotor position estimation at 1200 rpm.(a) Integrator.(b) LPF.(c) SOGIFO.(d) SOGIFO-(e) Comparison of rotor position errors of four algorithms.The black line represents the ideal observed error of the rotor position.The blue, red, green, and purple lines represent the observed errors of the Integral, LPF, SOGIFO and SOGIFO-X respectively for the rotor position.

Figure 10 .
Figure 10.Velocity estimation in the full speed domain based on SOGIFO-X.

Figure 10 .
Figure 10.Velocity estimation in the full speed domain based on SOGIFO-X.

Figure 10 .
Figure 10.Velocity estimation in the full speed domain based on SOGIFO-X.

Figure 11 .Figure 12 .
Figure 11.Dynamic response of the motor under 0.05 Nm torque perturbation applied at 7.5 s.(a) Speed response.(b) Rotor position estimation error.(c) Electromagnetic torque response.(d) D-axis and Q-axis current response.The green line represents the D-axis current and the purple line represents the Q-axis current in subfigure (d).

Figure 11 .Figure 11 .Figure 12 .
Figure 11.Dynamic response of the motor under 0.05 Nm torque perturbation applied at 7.5 s.(a) Speed response.(b) Rotor position estimation error.(c) Electromagnetic torque response.(d) Daxis and Q-axis current response.The green line represents the D-axis current and the purple line represents the Q-axis current in subfigure (d).

Figure 12 .
Figure 12.The reference speed changes from 1200 rpm to 800 rpm at 6 s and returns to 1200 rpm at 8 s.Simulation of motor dynamic response under this speed change.(a) Speed response.(b) Rotor position estimation error.(c) D-axis and Q-axis current response.The green line represents the D-axis current and the purple line represents the Q-axis current in (c).

Figure 15 .Figure 16 .
Figure 15.The reference speed changes from 1200 rpm to 300 rpm at 1 s, and returns to 1200 rpm at 2 s.Experiment of motor dynamic response under this speed variation.(a) Speed response.(b) Rotor position estimation.(c) Phase A current response.

Table 1 .
Comparison of flux observer algorithms.

Table 1 .
Comparison of flux observer algorithms.

Table 3 .
Error analysis of α-axis rotor flux vector at 1200 rpm.

Table 4 .
Error analysis of rotor position at 1200 rpm.

Table 3 .
Error analysis of α-axis rotor flux vector at 1200 rpm.

Table 4 .
Error analysis of rotor position at 1200 rpm.

Table 5 .
Analysis of velocity response under different disturbances.

Table 5 .
Analysis of velocity response under different disturbances.

Table 5 .
Analysis of velocity response under different disturbances.