Rotor position angle control of permanent magnet synchronous motor based on sliding mode extended state observer

ABSTRACT To achieve fast, accurate control of the position angle of the rotor of permanent magnet synchronous motor (PMSM), traditional auto disturbance rejection control often has many adjustable parameters and complex tuning problems. Sliding mode control technology is introduced into the extended state observer (ESO) part of the auto disturbance rejection controller, and a new sliding mode approach law is designed based on several typical sliding mode approaches, which simplifies parameter tuning while retaining the original anti-interference performance of auto disturbance. In addition, the nonlinear state error feedback control law in active disturbance rejection control is enhanced to improve the component order PID control law, which can improve the response speed and robustness of the system, and prove the stability of the controller. Finally, the simulation of the PMSM rotor position control system based on the sliding mode ESO is carried out, and the results verify the validity of the method.


Introduction
Permanent magnet synchronous motor (PMSM) is widely used in modern AC servo system because of its high accuracy, strong coupling, simple construction, and other performance advantages, especially in the areas of robot control, aerospace, new energy automobiles, unmanned driving technology, numerical control machine (see Li et al., 2020;Zhou et al., 2019) and other motor performance and control accuracy requirements. Therefore, studying the control method of PMSM is very important to achieve fast response, low overshoot, good tracking performance, and strong anti-jamming performance.
With the development of non-linear control strategies, many advanced control technologies have achieved mature development. Traditional PID control has the advantages of simple algorithm, high reliability, and easy implementation. PMSM mostly uses traditional PID control algorithm, which can meet the required control performance in a certain range. However, PMSM is a multivariable, non-linear, and strongly coupled time-varying system. The performance of traditional PID control is easily affected, which results in the poor performance of the system and makes meeting the precise control requirements difficult. To enhance the control performance of CONTACT Bingyou Liu lby009@mail.ustc.edu.cn PMSM, experts and scholars in related fields have studied how to design a variety of modern control methods into the system control, including adaptive control, robust control, predictive control, fuzzy control, intelligent control, composite control, and auto disturbance rejection control. An adaptive control strategy based on disturbance observer is proposed (see Yan et al., 2018 andHe et al., 2020). The adaptive controller compensates for norm-bounded disturbances, which effectively improves the anti-jamming ability and robustness of the system at the expense of the response speed of the system. a robust auto disturbance rejection controller is presented (see Islam et al., 2019 andChen et al., 2018), which allows performance to be maintained with large parameter changes but may affect the stability of the controller's closed-loop. For discrete practical linear systems with unobservable state, uncertain external disturbance, and limited state and input, a new model predictive control method is presented (see Wang et al., 2020), which uses a higherorder observer to observe the internal and external disturbances of the system, thereby reducing the observation error of the system, a PMSM drive system based on fuzzy controller is presented (see Liu et al., 2017;Mani et al., 2018 andWang et al., 2020) The adaptive control law of parameter uncertainty and external interference in error state space is deduced. Although the anti-jamming capability of the system is improved, the parameter tuning is more complex because of the cumbersome parameters. Active disturbance rejection control (ADRC) was proposed by Professor Han Jingqing of the Chinese Academy of Sciences. It does not depend on the exact model of the controlled object and has strong anti-jamming performance. Therefore, it has received wide attention in the field of engineering control (see Li et al., 2016;Liu et al., 2022;Wang et al., 2021;Wang et al., 2021;Qiu & Liu, 2019). However, some limitations are observed in meeting good control performance. Gao et al. (2022) use linear ADRC in the study of PMSM speed control system. Compared with non-linear ADRC, it can simplify parameter tuning to a certain extent, but the response speed of the system is substantially lower than that of nonlinear ADRC. Lu et al. (2013) present an ADRC strategy without parameter tuning for parameter tuning. Tuning the parameters of the auto disturbance rejection controller in the speed control is not necessary, but it sacrifices the robustness of the system, so it cannot meet some devices with high control accuracy requirements.
To solve the problem that the parameters of the ADRC are difficult to tune, Ma et al. (2021) present a multiobjective optimization function and combine the particle swarm optimization algorithm to tune the parameters of the first-order ADRC, which improves the efficiency and rationality of the parameter design of the ADRC. In view of the large number of parameters to be tuned for the ADRC, interactions among the parameters may exist, and the adjustment of parameters by using the empirical method is difficult. In addition, the existing intelligent optimization algorithm is complex to program. Zhang and Zheng (2018) discretizes the design of second-order ADRC and combines the parameter tuning of the ADRC with the genetic algorithm to establish the objective function of optimal design by weighting and form. However, because the selection of the objective function needs to consider control accuracy, overshoot, response speed, and saturation, selecting the optimal objective function and improving the existing optimization algorithm are difficult. Therefore, the problem of parameter tuning in ADRC has been a concern of many researchers. Sliding mode control has the characteristics of fast response, high steady-state accuracy, and smooth torque. It also can suppress the disturbance changes caused by load and parameters, and flexibly design the parameters of sliding mode according to the requirements of control performance. Sliding mode variable structure control is widely used in non-linear control and different motor control systems because of its strong adaptability to changes in system parameters, immunity to internal and external parameter perturbations, and robustness. Kong and Liu (2014) apply linear sliding mode control to the control of PMSM. It has simple structure, fast response, and good control performance. Guo (2021) presents a new adaptive sliding mode control problem and studies the convergence of the method. The simulation results show that good control results can be obtained under different load disturbances and parameter changes. To solve the problem of convergence speed and system chattering in the track tracking of a sliding mode control manipulator, an improved sliding mode approach law is designed (see Zhao et al., 2022), which can effectively control the chattering of the system while increasing convergence speed, and improve the overall dynamic performance of the manipulator control system.
In this paper, the traditional control method is difficult to meet the requirements of permanent magnet synchronous motor rotor position angle in control accuracy, response speed and robustness. A permanent magnet synchronous motor sm-adrc control strategy is proposed, which combines sliding mode control technology with active disturbance rejection control technology, and a sliding mode extended state observer (SM-ESO) is designed to solve the complex problem of parameter tuning existing in the traditional active disturbance rejection controller, while achieving good observation performance and tracking performance. The stability theory is used to prove the stability of the system. Then, according to several traditional sliding mode reaching laws, a new double power combination function reaching law is designed. The new function reaching law has the properties of fast speed and small steady-state error. Finally, the nonlinear state error feedback control law in ADRC is partially improved into Fractional Order PID control law, which not only accelerates the response speed of the system, but also simplifies the parameter tuning and enhances the robustness of the system. The simulation results show that this method has good control performance.

Model of rotor position angle for PMSM
In order to obtain the mathematical model of PMSM in two-phase coordinate system and facilitate system modelling and simulation, the original assumptions are reduced to the following two assumptions under the condition that the control performance of permanent magnet synchronous motor is not affected: (1) it is assumed that the permanent magnet has no damping effect and the space magnetic field is normally distributed; (2) Ignoring eddy current and hysteresis loss; In the later research work, this assumption will also be taken as a key issue to continue in-depth research and discussion. Based on the above assumptions, the mathematical model of the voltage equation of the PMSM control system in the d-q coordinate system is where i d and i q are the components of the stator current on the d axis and the q axis, respectively; u d and u q are the components of the stator voltage on the d axis and the q axis, respectively; L d and L q are the components of the stator inductance on the d axis and the q axis, respectively; R is the resistance value of the motor stator winding; ω r is the rotor angle frequency; ψ f is the magnitude of the magnetic chain of the permanent magnet.
The electromagnetic torque equation and the mecha nical motion equation of PMSM in the d-q coordinate system are expressed as follows: where J is the moment of inertia of the rotor, p n is the motor pole logarithm, T e is the electromagnetic torque, T L is the load torque, B is the damping factor, and ω is the mechanical angular velocity ( Figure 1). To achieve the high-performance control of the servo system, a vector control method of PMSM with i d = 0 is adopted in practice. This control method can control the AC permanent magnet servo motor as a DC permanent magnet motor in a sense. According to Equations (1)-(3), the second-order dynamic equation of the position ring of the PMSM is expressed as follows: where b = 1.5p n ψ f /J is a disturbance composed of unknown friction and electromagnetic load moments.

Mathematical model of traditional ADRC
In view of the inherent shortcomings of PID, researcher Han Jingqing proposed that ADRC technology can be improved from four aspects: using the extended state observer to estimate the internal and external disturbances of the system, tracking the differentiator to achieve the acquisition of differential signals, arranging the transition process to reduce the system overshoot caused by a given mutation, and using the nonlinear state error feedback control law to improve the control effect. PID control technology uses the idea of deviation elimination, while ADRC uses the extended state observer to estimate the total disturbance of the system. The disturbance can be eliminated before it affects the final output of the system through real-time compensation, so it can significantly improve the control accuracy and anti-interference performance of the system. Traditional ADRC is a nonlinear robust control that does not depend on the specific system model. It is mainly composed of three parts: tracking differentiator (TD), extended state observer (ESO), and nonlinear state error feedback control law (NLSEF). The algorithm of the tracking differentiator is expressed as follows: where v is the input signal of the system, v 1 is the tracking signal of v, v 2 is the differential signal of the tracking signal, and h 0 is the discrete integral step. The algorithm for the fastest control synthesis function fhan (v 1 -v, v 2 , r 0 , h 0 ) of discrete systems is expressed as follows: where h 0 is the filter factor, and r 0 is the velocity factor, h determines the tracking accuracy. The larger the value is, the better the tracking accuracy, but too large a value may cause phase lag, r determines how fast a trace will be. The larger the value is, the faster the trace will be, but too large a value may cause overshoots and noise in the system. Therefore, the principle of tuning is to select as small as possible while guaranteeing good system performance.
The selected parameters are shown in Table 1, where the value of r 0 is 100 and the value of h 0 is 0.02.
(2) ESO The third-order linear ESO designed with a secondorder position loop as the control object is as follows: where is the observation error, θ for system output, z 1 is the rotor position angle, θ tracking signal of, z 2 is the rotor position angle, θdifferential signal, z 3 is the total disturbance observed by the system. β 01 , β 02 , β 03 is the gain of the ESO, α 1 , α 2 is a non-linear factor. It is a filter factor with a general value of 0.01, b is the estimate of the compensation factor, u 0 is the output of the controller i q .

Nonlinear state error feedback control law
Based on tracking the transition arranged by the differentiator, the error signal that produces the transition can be tracked. Using this error signal e 1 and error differential signal e 2 , the input u 0 of the controller is obtained by a nonlinear combination, and the output u of the system is obtained by disturbance compensation. The algorithm for the nonlinear state error feedback control law is as follows: where e 1 is the error signal, e 2 is the error differential signal, respectively. β 1 , β 2 is the gain factor, u 0 is the input of the controller, b 0 is the compensation factor, and u is the output of the system.

Design of sliding mode active disturbance rejection controller
Traditional auto disturbance rejection control technology is a non-linear robust control method that does not depend on the exact mathematical model. It has good anti-interference and stability, but it also has some limitations in achieving good control performance ESO, as the core disturbance estimation compensation unit of ADRC, has seven parameters to be adjusted, which makes tuning the actual parameters of ADRC difficult. Therefore, the parameter tuning problem of ADRC needs to be simplified. The design of ADRC PMSM control system is optimized by using appropriate advanced control strategies to simplify the adjustable parameters of the system. To reduce the adjustable parameters and improve the response speed of the system, sliding mode control is introduced into the ESO mechanism of antidisturbance control, which simplifies parameter tuning and improves the control performance of the system while retaining the original anti-interference performance of the anti-disturbance control.

Design of SM-ESO
(1) According to the second-order dynamic equation of the position loop of the PMSM, the combination (2), (3), and (4) shows that the servo system has difficulty achieving accurate control due to the existence of internal and external disturbances of the system. Therefore, based on the principle of the ESO, the total perturbation of the system is expanded into a new state variable, which defines the extended state variable Combining the algorithm of ESO and sliding mode control theory in auto disturbance rejection, Equation (7) is rewritten as follows: The appropriate function g(e) is selected instead of the non-linear function, and the total disturbance of the motor system is estimated. The total disturbance f of the motor is also a bounded function because the disturbance size of the motor system is limited. The error equation of the observer is as follows: The combined (12) pair (13) is derived as follows: = e 3 − k 1 g(e) (14) Designing a sliding surface function, the stability of the sliding mode depends on the selection of the switch function s(x). The sliding mode switching function is designed as follows: where x i = x (i−1) (i = 1, 2 . . . n) is the state variable of the system and its derivatives of all orders, and the appropriate sliding surface parameters are selected.

Designing a new sliding mode approach law
Combining the fast power and double power approximation laws, a new double-power combination function approximation law is presented. The new function approximation law has fast convergence and small steady-state error, and can solve the dithering problem in sliding mode control. The new function approach law is designed as follows: Comprehensive Equations (14) and (19) are available: Similarly,

Proof of stability
First, the non-linear ADRC system is converted to Lurie form. Then, the n-order non-linear controlled object with single input and single output is considered and written as a state space as follows: x n (t) = a n x 1 (t) + a n−1 x 2 (t) + . . . + a 1 x n + bu The following linear control laws are used: where e is the error traced by the system, and g(e) is the optimal control function. Supposing X = x 1 , x 2 , · · · , x n T , Z = z 1 , z 2 , · · · , z n T , Equation (26) can be substituted into Equation (25): (27):

Then, Equation (26) is substituted into Equation
Then, according to Equations (28) and (29), the following can be obtained: where σ = e, c 1 = [ −1, 0, ··· 0 ] T , c 2 = [ 1, 0, ··· 0 ] , c 1 , c 2 ∈ R n Y = A 11 X + A 11 A 12 Z + A 13 k n+1 u . Supposing a n = 0, that is, A 11 is reversible, the following can be obtained: Equation (31) is further converted to the general form of the Lurie system as follows: Now the system shown in Equation (29) is converted to the Lurie system shown in Equation (32), and then the stability of the Lurie system is analyzed.
Lemma 4.1: Assuming that system A is a Hurwitz matrix, then the sufficient conditions for the origin of the Lurie system to be globally uniformly asymptotically stable are as follows: If ϕ(t, u) ∈ F[α, β], 0 < α < β, with the new loop transformation, the transfer function of the new linear dynamic system with the forward channel can be obtained as follows: The new nonlinear function of the feedback channel is as follows:φ Theorem 4.1: For the Lurie system shown in Equation (32), that System A has m eigenvalues of positive real parts and P eigenvalues at the origin, and all other eigenvalues have negative real parts are assumed, ϕ(σ ) ∈ F[0, β − α], 0 < α < β. A sufficient condition for the global uniform asymptotic stability of the system (32) at the origin is as follows: (1) The Nyquist curve ofG(jω) does not pass through the −1/α + jo point and revolves around the point m times counterclockwise. At this time, when ω changes from negative infinity of 0 to positive infinity, the Nyquist curve ofG(jω) needs to rotate pπ/2 radians clockwise around the origin. Substituting Equation (34) into Equation (2) of Theorem 3.1, the following can be obtained: Supposing G(jω) = q + jo, according to Equation (36): Given that the denominator in the above formula is not 0, the numerator is greater than 0, that is, (1 + αq)(1 + βq) + αβo 2 > 0.
The above formula shows the following: The distance from the point on the Nyquist curve of G(jω) to the centre of the disc is greater than the radius of the disc, indicating that the Nyquist curve of G(jω) does not enter the disc. The system is asymptotically stable.

Design of fractional-order PID control law
Traditional PID realizes the principle of using error to eliminate error, so it has some defects. Fractional Order PID control is formed by combining fractional order theory with conventional integer order PID control. Due to the introduction of fractional order calculus order, the adjustable range of parameters is more flexible than that of traditional PID controller. In this paper, the nonlinear state error feedback control law in ADRC is replaced by Fractional Order PID to realize the weighted combination of control law and reduce adjustable parameters. The Fractional Order PID controller extends the order of the traditional PID controller to the fractional field, increases the integral order and differential order, improves the flexibility of the design controller, and improves the dynamic response characteristics of the system, which is superior to the traditional PID controller (Figure 2). The structure diagram of fractional-order PID feedback control law is as follows: The fractional-order PID feedback control law is designed as follows: e(t) = r(t)-z1(t) (39)where r(t) is the tracking signal of the input signal, and z 1 (t) is the output tracking signal of the SM-ESO. The output expression of fractional-order PID controller is as follows: where µ is the integral order, λ is the derivative order, and 0 < λ, µ < 1. Compared with the traditional integer order PID controller, the introduction of fractional calculus order makes the parameter adjustable range of the controller more flexible, which makes it possible for the system to obtain better control performance. The sequence of the controller is that the proportion, integration and differentiation of the three links are carried out at the same time. The role of fractional PID in this paper plays an optimal combination of nonlinear errors, and how to achieve the optimal combination is by adjusting the coefficients of proportion, integration and differentiation, as well as the coefficients of integration factor and differentiation factor.
The output of the controller is as follows: where z 3 /b 0 is the compensation for the total disturbance of rotor position angle of PMSM.

Simulation results and analysis
The feasibility of the improved sliding mode ADRC algorithm is verified by MATLAB/Simulink simulation. The simulation results are compared with PID control and nonlinear ADRC. (The current loop of PMSM adopts PI control, and the parameters are the same to ensure the rapidity of the current inner loop.) The parameters of PMSM are shown in Table 2. The simulation of the tracking differentiator is shown in the figure below. Figure 3(a) and (b) are the input of given step signal and sinusoidal signal respectively. According to the simulation results, the function of the tracking differentiator is an over arrangement process. After the input signal is given, the tracking signal and differential signal of the given signal can be obtained (Table  3). According to Figure 4, Z1 is the tracking signal observed by the observer, Z2 is the derivative of the tracking signal, and Z3 is the total disturbance of the observed system. When the tracking signal Z1 observed by the system is closer to the given signal, the observation effect of the observer is very good. The observation effect of the sliding mode extended observer is good, the tracking effect can be realized accurately, and the system can recover to a stable state in a fast time.
According to the simulation results, when the step signal or sinusoidal signal of the system is given, the ADRC effect combined with sliding mode control technology is faster than the traditional ADRC response speed, and the recovery time of the system is also faster. From the position angle output response curve obtained from the given sinusoidal signal input in Figure 5, it can be seen that the traditional ADRC may have the problem of phase advance, and the sliding mode ADRC can overcome this problem. Due to the contradiction between overshoot and rapidity of PID, there is overshoot in the system if the fast response performance is to be achieved ( Figure 6). According to the simulation results in the figure below, it can be seen that the PID control mode has obvious overshoot, and it takes a certain time for the system to recover to the stable operation state, and the control performance of sm-adrc is more stable.
In order to solve the common problems of timevarying parameters and random noise in the motor system, this paper adds sudden load disturbance, and the simulation results are shown in Figure 7. Given an input signal of the system, when the system reaches the stable operation state two seconds later, a step signal disturbance of the same size is suddenly added. At this time, according to the simulation results, it can be seen that among the three control modes, the sliding mode ADRC has the strongest anti-interference ability and can recover to the stable operation state in the fastest time. Compared with ADRC and traditional PID control methods, the effectiveness of this control method can be highlighted.

Conclusion
Based on the vector control of permanent magnet synchronous motor, aiming at the problems of many adjustable parameters and complex tuning of ADRC, the structure of ADRC is improved by using sliding mode control method. The sliding mode control method is introduced into the structure of ADRC, which simplifies the parameter tuning while retaining the original antiinterference performance of ADRC; The sliding mode extended state observer is designed and the stability theory is used to prove the stability of the system. The simulation experiments show that the sliding mode extended state observer has good observation performance and tracking performance, which can solve the cumbersome problem of parameter tuning in the traditional ADRC, and achieve good observation and tracking effect at the same time; At the same time, a new approach law of double power combination function is proposed by synthesizing the fast power approach law and double power approach law. The new function approach law has the properties of fast convergence speed and small steady-state error; A Fractional Order PID controller is designed. Compared with the nonlinear state error feedback control law in ADRC, the response speed of the system is accelerated and the robustness of the system is enhanced. The simulation results also verify that the method has good control performance.