A Composite Variable Structure PI Controller for Sensorless Speed Control Systems of IPMSM

: In the speed control system of an Interior Permanent Magnet Synchronous Motor (IPMSM) without a speed sensor, PI controllers using only a ﬁxed set of parameters cannot achieve accurate tracking of the estimated speed in a wide speed domain and also suffer from step response overshoot. This paper proposes a Compound Variable Structure PI (CVSPI) controller to improve the system control performance. It can choose whether to include an integral term according to the size of the system deviation to speed up the response. It also introduces a Model Reference Adaptive System (MRAS) speed observer in the controller to estimate the speed and adaptively adjust the size of the anti-integration saturation gain to improve the dynamic response following performance and immunity of the system. A feed-forward link is added for a given input differential to achieve an accurate answer to time-varying inputs. As the linear compensation matrix of the conventional MRAS is a unit matrix, the speed can only be accurately observed in a speciﬁc speed range. In this paper, a new linear compensation matrix is designed, and a new speed adaptive law is derived, allowing the improved MRAS to measure speed over a wide range accurately. Simulation results validate the excellent control performance of the CVSPI and the accuracy of the enhanced MRAS over a wide speed range.


Introduction
Interior Permanent Magnet Synchronous Motor (IPMSM) is widely used in industrial speed control systems for its high power/weight ratio, high torque/inertia ratio, high efficiency, and certain robustness [1][2][3]. Although a range of superior and complicated control techniques such as non-linear PI control [4], adaptive control, and sliding mode variable shape control has been utilized in the velocity loop [5], these non-linear control techniques have issues such as hard parameter adjustment or jitter. They need to be further improved [6]. Therefore, the dominant control method in industrial applications is still traditional PI control [7][8][9]. The conventional PI control is designed based on linear system theory [10], and a fixed set of PI parameters will cause a contradiction between the system's steady-state performance and dynamic performance [11], making it difficult to take into account the steady-state performance and dynamic performance of the system at the same time [12]. Due to the physical constraints of the motor and inverter, limits must be placed on the system control inputs to protect the system [13]. When the controller output is limited by saturation due to an increase in the accumulation of the integral term (as can happen when there is a step response or sudden changes in load), a phenomenon known as Windup occurs [14][15][16]. This leads to a decline in the performance of the closed-loop system (e.g., a larger overshoot, a longer regulation time, and even the system losing stability). Therefore, the traditional PI controller can no longer meet the requirements of industrial automation for time-varying speed tracking and robustness in real time [17]. At the same time, the actual speed feedback in a closed loop system is mainly obtained indirectly by differentiating the mechanical angle of the rotor detected by the position sensor [18]. The installation of position sensors increases the motor's size and cost, increases the rotor's inertia [19,20], is prone to failure in complex environments, affects the dynamic and static performance of the system, and reduces the system's robustness [21]. Therefore, the use of position sensors needs to be abandoned, and a speed sensor-less control strategy adopted to enhance the closed-loop system's performance and the speed feedback's accuracy [22].
In [23], a variable gain PI controller is proposed to automatically select the optimum gain for a given rate of change and thus achieve good speed tracking performance. However, as the gain of the PI controller changes in real time, it is impossible to avoid the fluctuation of the system speed for a given speed change. To improve the system's performance against external load disturbances, [24] uses a non-linear disturbance observer to estimate the load torque and then adaptively adjust the fractional order PI parameters. Although this method is effective, the design process requires consideration of many nonideal factors, and the algorithm is complex and not very practical. After analyzing the link between PI controller parameters and zero poles of the system, [25] proposes a PI controller parameter modification approach based on the pole arrangement that effectively dampens mechanical vibration when operating with flexible loads. However, the PI parameter tuning in this method only addresses the mechanical vibration problem of the system, and the tracking performance of the continuously changing input of the system has not been considered. The authors of [26] introduce an active disturbance rejection controller (ADRC) for speed regulation to compensate for disturbances inside and outside the IPMSM. Still, the parameter tuning of the ADRC is too tricky, and the tracking performance for different states of speed given is not universal. In [27], a fast super-distortion algorithm is proposed for the poor robustness of PI controllers in speed control systems and the problem of excessive jitter arrays in traditional sliding mode control, which has better immunity but lags in the tracking of time-varying signals [26,28].
This work offers a Compound Variable Structure PI (CVSPI) controller and an upgraded Model Reference Adaptive System (MRAS) speed to increase the control accuracy of the IPMSM speed sensorless speed control system in a wide range of speeds domain. The CVSPI can adjust the inclusion of the integration term according to the magnitude of the speed error to accelerate the start-up speed. Using the concept of inverse calculation compensation, the estimated rate is input into the anti-integration saturation gain in order to reduce step response exceedance. Additionally, the performance of the tacho loop tracking response is improved by the inclusion of a specified input differential feed-forward connection, which allows for a more precise reaction to input signals that change over time.
To address the limitation of the stator current-based MRAS to provide reliable estimates of speed only at moderate and high frequencies, a linear compensation matrix incorporating inductive characteristics substitutes for the unit matrix. This paper is organized as follows. Section 2 presents the design of the CVSPI and analyses its advantages and performance. Section 3 demonstrates that the linear compensation matrix with inductive parameters satisfies the conditions for Popov super stability and derives a new speed adaptive law. Section 4 carries out simulation experiments and analyses to validate the proposed method. Finally, Section 5 concludes the paper.

Design of the Composite Variable Structure PI
The two main anti-windup control methods are limit-stop integration and backcalculation. The former starts with the nature of the Windup phenomenon in the integration term and chooses to use the integrator action depending on whether the controller output is limited. When the controller is saturated, the integrator action is canceled, and the controller is equivalent to a P control. In contrast, when the controller output is in the linear region, the integrator action is added to obtain excellent steady-state control performance. However, the generality is poor, and the parameters selected are fixed and challenging to transpose. The latter method reduces the input to the integrator by feeding back the difference between the input and output quantities of the saturated non-linear link to the information of the integrator, thus suppressing the Windup phenomenon. This method has a linear structure, is easy to design, and is a commonly used Anti-Windup control method in engineering today. However, its transient control performance is heavily dependent on the feedback gain rather than the parameters of the PI controller. There is hysteresis, making it difficult to achieve the performance targets of a wide range of motor speed control systems in practice.
To improve the control performance of the speed control system, this paper integrates the advantages of the limit stop integral method and the back-calculation method and proposes the CVSPI controller shown in Figure 1. The proportion of the integration coefficient to the regulation time in CVSPI can be automatically adjusted depending on the magnitude of the speed deviation. When there is a large speed deviation (i.e., beginning with the motor's maximum acceleration), only the proportional term is used to enter the saturation state; and the integral term is allowed to be added to eliminate the residual difference when the speed error is small (which can be adjusted according to the actual situation). This allows the controller to desaturate early, reducing the overshoot of the response speed, reducing the regulation time, and improving the dynamic response and immunity of the system. The CVSPI enhances the system's dynamic performance based on a simple structure, ensures the control accuracy of the system, enhances the tracking response performance, immunity, and stability of the tacho loop system, and reduces the static and dynamic errors of the system. To address the problem of low accuracy compensation by the integral term alone, CVSPI treats the compensation of the proportional and integral terms separately, significantly reducing the mutual influence of the proportional and integral terms on saturation. This allows the proportional term to be used to its full potential while also enabling Windup suppression, with few changes to the control structure, making it easy to apply. It is possible to achieve a faster and overshoot-free given time while reducing the impact of the Windup phenomenon on system performance. The integration state can be expressed as follows: . q = e(t) − K s (u pout − u sout ), where K s is the anti-saturation gain.
According to the above equation, selecting the anti-saturation gain is one of the keys to improving system performance. In previous designs, the anti-saturation gain was determined whether the controller output was saturated or not. This method can improve the dynamic system performance at step response, but a fixed anti-saturation gain cannot better suppress the integral saturation at different given speeds. To obtain the output current out of the saturation state quickly while still being able to respond promptly to changes in the given speed and adapt to different given rates, it is necessary to combine the operating characteristics of the IPMSM in other states using the inverse calculation idea and introducing the estimated rate of MRAS to automatically adjust the anti-saturation gain. Because of this, the anti-saturation gain is built as Equation (1), and its value is set by the motor's specified speed range. Therefore, the block diagram of the CVSPI controller structure with the addition of variable saturation gain is shown in Figure 2.
(1) Figure 2. Block diagram of the CVSPI controller architecture based on variable saturation gain.

CVSPI Controller Design Based on State Equations
The expression for the electromagnetic torque of the IPMSM in the dq rotating coordinate system is: L d and L q represent the stator inductance components in the d − q reference frame. p n is the Pole-pairs number.
The IPMSM mechanical equation of motion is: where T e and T L are the motor output electromagnetic torque and load torque, respectively; Ω is the rotor mechanical angular speed; J is the rotational inertia; B a is the viscous friction factor.
In order to facilitate the analysis of the equation of state for the mechanical angular velocity of the IPMSM, this paper uses vector control with i d = 0. This is then obtained from Equation (2): Substituting Equation (4) into Equation (3) gives the equation of state for the mechanical angular velocity: where the state factor a s = B a /J; the control gain b s = K t /J; i q * is the given value of the cross-axis current; the total disturbance torque T d = K t i q * − i q + T L , consisting of the disturbance torque due to the current tracking error and the load torque; K t is the electromagnetic torque factor, K t = 1.5p n ψ f ; the disturbance term d s (t) = −T d /J.
Defining the mechanical angular velocity tracking error e s = Ω * − Ω, Ω * is the given signal for the mechanical angular velocity of the rotor, the equation of state for the angular velocity tracking error can be obtained as: Commonly load disturbances cannot be measured, so a linear proportional feedback control law is required, i.e.,: . e s = −k p e s .
Combining Equations (6) and (7) gives the given signal for the output torque current as: By introducing an integral term to counteract the effect of the disturbance term d(t) on the system, the given signal for the output torque current of the speed loop under the PI controller is obtained as: where k p is the scale factor of the controller, and k i is the integration factor of the controller. Therefore, this paper adds an input derivative feed-forward link and a control gain link for a given signal to the CVSPI controller described above. The addition of the input derivative feed-forward and control gain links allows the estimated speed to respond accurately to a continuously varying given signal. A block diagram of the final CVSPI controller proposed in this paper is shown in Figure 3. When error > ζnre f , whereω is the estimated speed,ω = 30 πΩ ; n re f is the given speed; error = n re f −ω.
where i qsat is the maximum output of the controller after limiting.
When error ≤ ζnre f , Figure 4 shows a comparison of the CVSPI controller outputs for each link when the motor is running at the rated speed with a load of 12 N·m. The mechanical inertia deviation is large at the start, i.e., error > ζnre f . At this point, the integral link does not work and relies on the proportional link to quickly reduce the speed error. At this point, u n is maximum and u s is the maximum torque current i qsat . This allows the motor to be started up at maximum acceleration. At the same time, the presence of the feedback compensation term ensures that the estimated speed approaches the given speed quickly and without overshooting. At 0.056 s, the estimated speed reaches 97% of the given speed, at which point error ≤ ζnre f , the integration link k i comes into play and is used to eliminate the steadystate error between the estimated speed and the given speed. Since the error is still present, u s remains at the maximum torque current i qsat . At the same time, the antiintegration saturation module performs feedback compensation to suppress system overshoot and oscillation.

Performance Analysis of Variable Structure Composite Speed Controllers
At 0.057 s, the estimated speed reaches 99% of the given speed. At this point, u s is at the desaturation threshold; the feedback compensation term u out is 0. Over the course of 0.057 s~0.062 s, the CVSPI controller changes to a PI controller until the estimated speed reaches the given speed. After the given speed is reached, the system operates stably and accurately with a separate integration link.
The above analysis shows that the CVSPI controller has a different control structure for different error intervals. When the system has a large error, the integral term of the controller does not work, and the output of the controller is clamped at the limiting value to speed up the response. When the error is small, the integral term acts to reduce the steady-state error. At the same time, the anti-saturation gain acts to enable the system to reach a given speed quickly and without overshooting. As the anti-integration saturation gain takes into account the variation in the estimated speed, the CVSPI can be used to achieve accurate, overshoot-free control of the motor in all speed ranges using only a fixed set of parameters. Additionally, the inclusion of an input derivative feed-forward link and a proportional gain link in the CVSPI allows accurate control of the estimated and actual speed even when the given signal is time-varying (e.g., sinusoidal).

Improved MRAS Speed Observer
From the mathematical model of the rotating coordinate system of the built-in permanent magnet synchronous motor: A reference model from the above equation gives: where u d and u q are the stator voltages in the d − q reference frame; i d and i q are the stator currents in the d − q reference frame; R s is the stator resistance; ω r is the rotor electrical pulsation; L d and L q represent the stator inductance components in the d − q reference frame; ψ f is the magnetic flux. From the Equation (14), it can be deduced that: (15), it follows that: In replacing the Equation (16), the speed and current in the equation are replaced by the estimated values to obtain the adjustable model: (17), it follows that: Defining the error vector: Subtracting the reference model from the adjustable model gives: From the Equation (20), it follows that: where The Equation (21) describes a standard non-linear time-varying feedback closed-loop system, applicable to Popov's superstability theory. It consists of a linear constant forward path and a time-varying feedback path. This is seen in Figure 5. To study the stability of the system shown in Figure 5, assume that r(t) = 0, then we have u(t) = −w(t), then the forward pathway can be described as [27]: The feedback path is: where x(t) is the state variable; u(t) and y(t) are the input and output variables respectively; A is the system matrix; B is the input matrix; C is the output matrix; D is the direct transfer matrix. The forward path selects the matrix C to ensure the system's stability. According to Popov's theorem, the system matrix is given by Equations (22) and (23). The sufficient conditions for a system to be asymptotically super-stable are [28]: 1.
The transfer function matrix G(s) of the forward path is strictly orthogonal, i.e.,: 2.
The inputs y(t) and outputs w(t) of the feedback path satisfy Popov's inequality: Consequently, the error system derived from the Equation (21) can be represented as an equation of state using the Equation (22): According to the Equation (26), a block diagram of the structure of the error system in Figure 6 is obtained. The solid line is a linear time-invariant (LTI) system. Since the relationship between the output quantity y and the feedback quantity W is uncertain, a non-linear time-varying feedback system (LTV) is used here to represent their relationship.
For the system shown above to be asymptotically stable, it is necessary to satisfy both Equations (24) and (25). For a conventional MRAS, the linear compensation matrix C is set to the unit matrix E. The adaptive law must be redesigned to achieve better speed discrimination over a broad domain.

Selection of the Linear Compensator Matrix C
The sufficient and necessary conditions for the transfer function matrix G(s) shown in the Equation (24) to be a strictly positive real matrix are that there are symmetric positive definite matrices P, Q and real number matrices K, L, and positive actual number λ, which satisfy: The Equation (21) shows that the B matrix is equal to the unit array, and the D matrix is similar to the zero matrices. Consequently, the Equation (27) can be reduced to: Therefore, G(s) is strictly positive if a reasonable positive definite compensation matrix C is chosen, so that P and Q are positive definite matrices.
Prove the positivity of Q using the trace and determinant of the matrix. The following equation needs to be satisfied: I assume that the new matrix C is: The Equation (29) can be reduced to: Clearly, tr(Q) is greater than zero and det(Q) is greater than zero. So Q is an integer matrix. Therefore, take: (33) This guarantees the strict validity of G(s).

Design of the Adaptive Law
Substituting y = Ce and W = (ω r − ω r )Jî * into MRAS parameters are estimated using a proportional integral form, denotedω r as: whereω r (0) is the initial value. Substitute Equation (36) into Equation (35) to obtain: To satisfy η(0, t 1 ) = , it is possible to make respectively: For the inequality (37), construct a function f (t) satisfying: where k > 0. Substituting Equation (40) into Equation (38) gives: The derivative of the Equation (40) is: Substitute Equation (39) into Equation (41) yields: For the Equation (38), the inequality must hold if the product function is positive, so take: (46) Therefore, the new speed adaptive law is derived as follows: In summary, the structure of the IPMSM speed control-free speed regulation system is shown in Figure 7.

Simulation Results and Analysis
The estimated speed of the MRAS observer proposed in the text is introduced into the system feedback, and an IPMSM simulation platform is built to verify the speed loop control strategy proposed in this paper, demonstrating the high performance of the velocityfree variable frequency speed control system under CVSPI controller (nref is the given speed, nr is the estimated MRAS speed, and nw is the response speed). The parameters of the IPMSM used in the simulation are shown in Table 1.

Test of System Dynamic Followership
CVSPI control is compared with the conventional PI controller, anti-windup PI (AWPI) controller proposed in the literature [27], active disturbance rejection controller (ADRC) proposed in the literature [20], and Super-twisting algorithm (STA) proposed in the literature [25] to verify the advantages of the system speed tracking response performance under CVSPI control. nw under five-speed controllers given by sinusoidal speed is shown in Figure 8a,c, and the error of nr vs. nw is shown in Figure 8b,d, where the given sine speed is divided into two cases: (i) the peak is 300 r/min, the trough is 200 r/min, and the frequency is 5 Hz; (ii) the peak is 580 r/min, the trough is 520 r/min, and the frequency is 15 Hz. When the given sine speed is the first scenario, as shown in Figure 8a,b, the performance comparison is shown in Table 2.  Similarly, when the given sine speed is the second case, as shown in Figure 8c,d, the performance comparison is shown in Table 3. Table 3. Performance comparison with a peak of 580 r/min and a trough of 520 r/min at 15 hz. As can be seen from Figure 8a,d and Tables 2 and 3, the CVSPI has no overshoot, has the shortest regulation time and the smallest steady-state error for a given sinusoidal signal, and also minimizes the error between estimated and actual speed compared to the PI, AWPI, ADRC, and STA. the PI has a large overshoot. At larger bandwidths, ADRC and STA have larger steady-state errors.

Control
The CVSPI controller can be proven to respond faster and more accurately to a given system signal, effectively increasing the response bandwidth of the system's speed loop while also providing better dynamic characteristics.

Evaluation of System Immunity
By adding and withdrawing loads suddenly at rated speed, we compared the nw of the CVSPI controller to that of the PI controller, AWPI, ADRC, and STA, validating the advantages of the CVSPI controller in terms of resistance to external load disturbance performance. Figure 9a shows the error of nref versus nr for the five-speed controllers at 0.2 s with a sudden 15 N·m load. The performance comparison is shown in Table 4.   Figure 9b shows the error of nref versus nr for operation with a load of 15 N·m at rated speed for five-speed controllers, with sudden unloading of the load to 5 N·m at 0.2 s. The performance comparison is shown in Table 5.
As can be seen from Figure 9a,b and Table 5, the amount of fluctuation in speed response under CVSPI control is about 60% lower than conventional PI control, about 50% lower than AWPI control, about 48% lower than ADRC control and about 70% lower than STA control at the instant of sudden load addition and removal, and the steady-state recovery time is also shorter than that of conventional PI, AWPI, ADRC, and STA control. The steady-state recovery time is also shorter than conventional PI, AWPI, ADRC, and STA control. Although the system takes slightly longer to reach rated speed under CVSPI control than under ADRC and STA at start-up with load, CVSPI control is considerably more resilient to load disturbances than the other controls.

Evaluation of Systemwide Speed Domain Performance
Under no-load conditions, the high, medium, and low-speed response waveforms and speed estimate waveforms under CVSPI control were compared with the traditional PI, AWPI, ADRC, and STA controller to validate the performance of the CVSPI controller with wide speed domain speed tracking response. The performance of nw and nr for the five-speed controllers at 5 r/min, 15 r/min, 250 r/min, and 750 r/min is shown in Figure 10a-e. The performance comparison is shown in Table 6. From Figure 10a-e and Table 6, it can be seen that the conventional PI will show large fluctuations in the speed response at low speed and obvious overshoot at medium and high speed; AWPI can suppress overshoot at high and medium speed better but will show overshoot at low speed; ADRC can respond better to different speed situations at high and low speed but has poor static stability at very low speed (e.g., 5 r/min). STA can achieve accurate speed following at different speeds. The CVSPI control can be proven to be superior to the other four controls in achieving high performance and high accuracy control of the IPMSM and a wide speed range with no static stability and fast performance. Figure 11 shows the estimated speed waveforms of the system under CVSPI, PI, AWPI, ADRC, and STA control during sudden speed changes. The motor starts at no load and starts at a given speed of 300 r/min, steps to rated speed at 0.2 s, becomes a ramp signal at 0.3 s, drops to 500 r/min, and steps down to 400 r/min at 0.5 s. The performance comparison is shown in Table 7.  Figure 11 shows the estimated speed waveforms of the system under CVSPI, PI AWPI, ADRC, and STA control during sudden speed changes. The motor starts at no load and starts at a given speed of 300 r/min, steps to rated speed at 0.2 s, becomes a ramp signal at 0.3 s, drops to 500 r/min, and steps down to 400 r/min at 0.5 s. The performance comparison is shown in Table 7. Table 7. Comparison of step and ramp signal performance.   Figure 11. Comparison of the given speed with the actual speed.

Analyzing the Effects of a Sudden Change in Speed While Maintaining a Consistent Torque Load
As can be seen from Figure 11 and Table 7, under CVSPI control, the estimated speed always follows the given speed strictly. The ADRC and STA controls, on the other hand, have a large static error under ramp signals; the PI control has a significant overshoot under step signals, with a speed response overshoot of 19.8%; and the AWPI has a large overshoot under step-down signals. Figure 12 shows a comparison of the torque under the different control methods. It is clear that the torque under STA control has a chattering phenomenon. The torque under PI and AWPI control has different degrees of overshoot. The torque response under ADRC control is slower. The torque under CVSPI control is smoother and more stable, and the torque response is faster. In summary, the CVSPI controller given in this paper has better dynamic characteristics.

Conclusions
(1) To minimize or do away with speed overshoot and speed-free control system regulation time, this paper builds on the foundation of the conventional AWPI by integrating the benefits of the encounter limit stop integral method and the inverse calculation method to design a CVSPI controller for use in IPMSM speed-free control systems. (2) Using the inverse calculation idea to introduce the MRAS estimated speed into the anti-saturation gain to accurately compensate for the system state, enabling the system to quickly exit the integral saturation zone, suppressing the integral saturation phenomenon, and improving the immunity of the system. (3) Adding a feed-forward link for a given input differential to accurately respond to time-varying inputs and enhance the speed loop tracking response performance.
(4) CVSPI can achieve relatively good dynamic following performance using only one set of traditional PI controller parameters. The parameters are relatively easy to adjust. (5) To enable MRAS to operate efficiently over a wide speed range, a new linear compensator was designed, and a new speed adaptive law was derived.
Simulation results verify that CVSPI can achieve high performance, high accuracy control, and wide speed domain static differential-free speed regulation in an IPMSM speed-free control system and solve the overshoot of the step response. The estimated speed under different input signals is closer to the actual motor speed and has better static and dynamic performance. A new approach is provided for the study of high-performance permanent magnet synchronous motor speed control systems without speed sensors.