Terminal Sliding Mode Control of PMSM Based on Extended State Observer

In order to weaken the chattering of the sliding mode control and improve the convergence speed of the approaching motion phase and the sliding mode motion phase.Introducing the inverse tangent function of the absolute value of the state variable and the hyperbolic sine function of the switching function to design a new reaching law,combined with non-singular fast terminal sliding mode to design control law.In order to reduce the effects of viscosity coefficient and load torque disturbance,and improve the robustness of the permanent magnet synchronous motor control system.Observing the disturbance with a second-order extended state observer,the observations are introduced into the sliding mode speed controller for feedforward compensation.The nonlinear function adopts hyperbolic sine function to avoid the observer parameter being too large.The simulation result shows that second-order extended state observer is ability to quickly and accurately track disturbances.Compared to PI control,sliding mode control with feedforward compensation, no overshoot, faster response and stronger robustness.


Introduction
The permanent magnet synchronous motor has been widely used due to its small size, high efficiency and high reliability. Many applications have put forward higher and higher requirements for its control performance [1].The PI control algorithm is simple and easy to implement, but it is easy to be affected by system parameter changes and external disturbances, which will reduce the reliability and dynamic and static performance of the system [2].Permanent magnet synchronous motor is a nonlinear system with multiple variables and strong coupling [3], Therefore, the PI control cannot meet high performance control requirements.
In order to solve the shortage of the PI control, improve the control performance of permanent magnet synchronous motor,the researchers have proposed fuzzy control, predictive control, neural network control, and sliding mode control [4][5][6][7].The sliding mode control is widely used because of its simple structure, fast response, strong robustness to the variation of system parameters and external disturbances.But there is an inherent chattering problem,sliding mode control based on the reaching law is an important method to reduce chattering.
The reaching law determines the movement mode of the approach movement stage.However, the linear sliding surface makes the deviation between the system state and the given trajectory asymptotically converge exponentially. The system state is approaching a given trajectory and cannot 2 reach a given trajectory. There is still chattering in the sliding mode motion stage.The terminal sliding mode (TSM) control introduces nonlinear terms in the design of the sliding surface, so that the tracking error on the sliding surface can converge to zero in a finite time [8].But when the system state is close to zero, the control amount may tend to infinity, singular phenomenon occurs, and it is not necessarily optimal in convergence time [9][10].
The viscosity and load torque of the motor as a disturbance are needed to be observed.The extended state observer has good tracking and compensation performance for a certain range of uncertainty, which making the extended state observer widely used in motor control [11].It expands uncertainties such as unknown states and external disturbances into a new state without knowing any prior knowledge of uncertainties, the system can be fully estimated by using input and output information only.
This paper designs a new reaching law, which accelerates the speed of the state approaching the sliding surface and reduces the speed at which the state reaches the sliding surface.Replaceing the sign function with a hyperbolic tangent function further weakens the chatter.The sliding mode control law is designed by combining the nonsingular fast terminal sliding mode with the new reaching law.While avoiding singularity and weakening chattering, the convergence time of approaching motion and sliding mode motion should be reduced.Constructing a second-order extended-state observer with a hyperbolic sinusoidal function observes the disturbance, and does not require nonlinear function coefficients to be too large. The observations are introduced into the sliding mode controller for feedforward compensation, which improves the robustness of the system.

Mathmatical Model of Permanent Magnet Synchronous Motor
Assuming that the PMSM magnetic circuit is not saturated, ignoring the hysteresis loss and eddy current loss, the mathematical model of the surface-mount permanent magnet synchronous motor in the In the formula,

Design of PMSM Disturbance Observer Based on Nonlinear Extended State Observer
The extended state observer (ESO) is a core part of the technology of auto-disturbance rejection control, and is essentially a state observer.According to the actual output signal ) (t y and the control 3 input ) (t u of the controlled object, the extended state observer estimates the state variable of the object and the sum of disturbance acting on the controlled object in real time, and the Sum of disturbance is an extended state variable.The nonlinear and uncertainty system can be linearized and deterministic by using the extended state observer.In recent years, ESO has been widely used [13].

General Form of Nonlinear Extended State Observer
Assume that the second-order system is (2) In the formula, is an expansion state variable;and x y The following state observer can be constructed by the system (3).
Proper adjustment of parameters, Usually 2 a is one order of magnitude larger than 1 a , 3 a is one order of magnitude larger than 2 a . The nonlinear extended state observer (4) can accurately estimate all states of the system (3), which is

Design of an Extended state Observer Based on Hyperbolic Sine Function
In a general form of nonlinear observer, selecting the appropriate parameters allows the observer to accurately track the state of the system.But there will be relatively large parameters, too large parameters will reduce the dynamic performance of ESO [14].In addition,From the perspective of observation effect,When there is output measurement noise in the system, the smaller the slope of the nonlinear function in the   e segment, the better [15].The hyperbolic sine function has a small The extended state observer based on the hyperbolic sine function is verified by the second-order system shown in [13].The second-order system model is equation (7). (6) to construct a third-order extended state observer.The results are shown in the figure.    x . Figure 6. Observation error of system state 3 x .
As can be seen from the figure, the three states of the extended state observer can accurately track the state of the second order system (7) in a very short time.Even the unknown square wave disturbance,the observed values have errors in the minimum time at the discontinuity point of the square wave.In addition to this, the observed waveforms coincide with the disturbance waveforms.The parameters of the extended state observer constructed with the hyperbolic sine function are much smaller than other nonlinear functions, which guarantees the dynamic performance of the observer.

Design of Disturbance Observer for PMSM
The correlation term of the viscous coefficient of the permanent magnet synchronous motor and the load torque are regarded as the uncertainties of the system, it is the sum disturbance of the system, denoted by R .The structure diagram of the permanent magnet synchronous motor disturbance observer is shown in figure 7. The observer state 2 z is the estimated value of system disturbance R shown in equation (10).
Using this extended state observer it is possible to achieve

Design of Sliding Mode Speed Controller with Disturbance Compensation
The extended state observer shown in equation (11)

Design of New Reaching Law
The conventional reaching law is difficult to precisely control the time approaching the sliding mode surface and the speed approaching the sliding mode surface.It cannot solve the contradiction between the approach time of the sliding surface and the buffeting [16].Designing a new approach law for this.
The new reaching law introduces the inverse tangent function of the absolute value of the system state variable and the hyperbolic sine function of the switching function.When the state of the system is far from the sliding surface, the value of ) sinh( s  is large, and the speed of the state approaching 7 the sliding surface is also large.As the system state gradually approaches the sliding surface, the value of a gradually decreases to zero.Regardless of how far the system state is from the origin, 1 arctan x  can ensure that the system state reaches the sliding surface at a small speed.Avoid excessive speed and increase buffeting, and there will be no situation where the speed is zero and the sliding surface cannot be reached.Replace the symbol function with a hyperbolic tangent function to further weakening the buffeting. According to the sliding mode reachable condition, the formula (13) can be obtained.
It is easy to prove 0  s s , indicating that the approaching law satisfies the condition of reaching the sliding surface.

Design of Non-singular Fast Terminal Sliding Mode Controller
Using the speed tracking error of PMSM as the state variable of the system.
In order to achieve the fast convergence of system state in finite time, non-singular fast terminal sliding surface is adopted [17].
In the formula: When the system enters the sliding mode, there is s  Does not contain a state in which the index is negative, avoiding singularities.And the literature [17] has proved that the system can converge to zero in a finite time in any non-zero initial state.
From the new reaching law of equation (12), the non-singular fast terminal sliding surface of equation (16), combined with (15), there is (18).
Where 2 z is the observed value of extended state observer for system disturbance.

Simulation Verification
In order to verify the feasibility of the new approach law and the accuracy of the disturbance observer, the simulation was performed in Simulink. Table 1 shows the parameters of PMSM.  Figure 9 shows the structure diagram of PMSM terminal sliding mode control system based on extended state observer.   figure 15, and the electromagnetic torque controlled by sliding mode is shown in figure 16 and 17. Figure 16 does not introduce disturbance compensation, and figure 17 introduces disturbance compensation.  As can be seen from figure 11,figure 12, figure13 and figure 14.At start-up,the motor speed controlled by PI reaches the set value at 0.05s, and there is overshoot.The speed and three-phase current require 0.07s to gradually stabilize.The sliding mode control with disturbance feedforward compensation reached the set value at 0.03s, and also tended to be stable ,the response is faster, and there is no overshoot.When the load changes, the speed of the sliding mode control and the current recovery time are less than the PI control, and the robustness is stronger.   Figure 15-17 show the electromagnetic torque response of the motor.Sliding mode control has a shorter adjustment time, is faster and more stable, and has better smoothness.After the introduction of the disturbance feedforward compensation, the instantaneous pulsation of the electromagnetic torque is eliminated, and the immunity of the control system is stronger.

Conclusion
This paper designs a new reaching law that solves the contradiction between convergence time and buffeting.The design of the speed controller is completed by combining the non-singular fast terminal sliding surface, which accelerates the convergence speed of the system.The hyperbolic sine function is used to construct the extended state observer to observe the disturbance. The observation value is introduced into the sliding mode controller for feedforward compensation, which improves the robustness of the system.The simulation proves the observer's fast and accurate tracking ability for disturbance and the superior performance of the system in adjusting the time, pulsation suppression and anti-interference.