SPMSM sensorless control of a new non-singular fast terminal sliding mode speed controller

ABSTRACT In the SPMSM no-speed control system, the traditional SMC speed controlling led to a difference in adjustment speed, a large amount of overshoot and obvious chattering. In order to solve this problem, a new non-singular fast Terminal-SMC speed controller is designed and the continuous function υ(s) is used to replace the traditional symbolic function, which effectively improves the observation accuracy, and reduces the system chattering. The Lyapunov function is designed to prove the system’s stability. The simulation results show that the new NSFT-SMC has faster responded speed, stronger system robustness, and less chattering during stable operation. Comparing with traditional SMC speed control and hyperbolic tangent function SMC speed control, it has better control performance.


Introduction
In the high performance SPMSM control system, the rotor speed needs to be accurately measured. The highprecision mechanical sensors were used to install on the rotating shaft in the traditional methods, occupied the space and increased system cost, and the mechanical sensors were easily affected by the environment, reduced the measurement accuracy and system stability.
A series of control algorithms were used to accurately estimate the rotor position and speed of the motor by detecting related electrical signals in sensorless control, eliminating the using of mechanical sensor. Among them, the sliding mode control (SMC) is insensitive to external disturbances and system parameters change under highspeed operation of the motor, and the responded speed is fast. So it becomes the mainstream research method of high-performance PMSM sensorless control (Kalaani et al., 2014;Pan & Gao, 2018).
Used symbolic functions to design SMO, which resulted in the high frequency components in the observed signal, and which produced significant chattering during the actual control process and reduced the system's observation accuracy (Wu & Chen, 2006). In Chang and Peng (2016), the sliding mode surface was designed according to the motor equation in the αβ coordinate system, but it required back-EMF estimation and phase compensation; the saturation function CONTACT Yongjin Yu yaydjto@163.com was used to replace the sign function in the approach law, which caused shock in the system. In Xue and Guo (2017), replaced symbolic function with an inverse curve function, but it needed to choose a value reasonably to effectively suppress chattering and required a lowpass filter, which increased the complexity of the system. In Xiang and Xu (2019), the constant velocity approach law and integral gain were used to enhance the antiinterference ability of the system, but the designed sliding mode surface function convergence speed was slow.
In Wang (2019), a double closed-loop SNTSM controller was designed, in which the AC current loop and the DC current loop were controlled separately. The control effect was good, but the complexity of the system was increased. In Wang and Zhao (2019), a non-singular terminal sliding mode surface was designed to ensure rapid system convergence and observation accuracy based on the motor equation in the α-β coordinate system. However, back-EMF observations of α and β axes were required at the same time, and the system running time was greatly increased. And the sign function was used in the approach law, which resulted in large chattering during motor operation. In Wang and Tsai (2017), the tanh function was used to replace the sign function in the approach law of sliding mode surfaces to weaken the chattering. Although the chattering was reduced, the system responded speed became slower at the same time. In Qin et al. (2011), a new fast terminal reaching law was proposed which reduced the time the system move toward the sliding mode. It not only made the system has fast convergence characteristic, but can overcame the effect of the uncertainty of the system and chattering. In order to minimize the influence of disturbance, the dynamic model of PMLSM was estimated by RBF neural network, and the uncertain upper bound was estimated in real time combined with adaptive control, which weakened the chattering phenomenon and enhanced the robustness of the system. The control effect was better (Zhao & Fu, 2019). In Hou et al. (2019), an extended nonlinear disturbance observer based fuzzy SMC approach was proposed. It made the system has stronger anti-interference ability, can ensure its good performance, and further reduced chattering. But there were many parameters to be adjusted, which increased the amount of calculation and complexity. Regarding the issues in the above literature, the aim of this thesis is to solve above problems and better improve the dynamic performance and measurement accuracy. The new control method is proposed in this thesis. It can further accelerate the system convergence speed, improve the system speed adjustment ability and greatly reduce chattering. In the past related research on motor speed sensorless control, traditional sliding surface was adopted by most people. The control method of nonsingular fast terminal sliding mode control was not considered. The author studied such problems to improve the control effect of the motor speed sensorless control system, speed up the system convergence speed and reduce chattering to a certain extent. And then its adjustment ability and system robustness were improved under the change of system operation status. The main contents and contributions of this article can be summarized from the following aspects. (1) Designing a new non-singular fast Terminal-SMC controller, it has faster convergence speed and better stability. (2) Using the continuous function υ(s) to replace the traditional symbolic function, and designing an integral control law based on the NFSTM surface. (3) Designing the Lyapunov function to prove the stability of the NFSTM system. (4) Constructing the whole PMSM speed sensorless control system model and simulating in the Matlab based on the new NFSTM, and comparing with the traditional sign SMC and tanh SMC to prove the new speed controller has excellent performance.
The rest of the thesis is organized as follows. Section 2 introduces the mathematical model of SPMSM. Section 3 analyses the designing of traditional SMC, and design Lyapunov function to prove the stability of the system. Section 4 illustrates the new NFSTM speed controller in this article and designs the Lyapunov function to prove stability. Section 5 illustrates the simulation results of the proposed method. Finally, a conclusion closes the paper.

Mathematical model of SPMSM
Assuming that SPMSM is an ideal model, ignoring iron core saturation, excluding eddy current and hysteresis loss, on the d-q synchronous rotating coordinate system, the state equation of SPMSM(L d = L q = L s ) is as follows where p is the differential operator, n p is the number of pole pairs, ω m is the mechanical angular velocity, ψ f is the permanent magnet flux linkage, J is the moment of inertia, B is the friction coefficient, T L is the load torque, L s is the stator inductance, i d , i q , u d , u q are the d-q axis current and voltage, respectively. When adopting i d = 0 control strategy for SPMSM vector control, equation (1) can be simplified

Design of traditional SMC sliding mode observer
The system state error variables are defined as follows where ω * m is the given speed of the motor, ω m is the actual speed Bring the ω m component in equation (2) into equation (3) and derivate x 1 , x 2 and to obtain ⎧ ⎪ ⎪ ⎪ ⎨ Simplify further The traditional sliding mode surface function is designed as follows Derivation of equation (6 In order to ensure that the three-phase SPMSM speed sensorless control system has good dynamic performance and stability, the traditional method uses an exponential approach law with a switching function, and the controller is designed as follows Substituting equation (8) into equation (7 Select the Lyapunov function according to Lyapunov's second method (also called direct method) as follows Differentiate V and substitute equation (9) That is, equation (11) satisfies the Lyapunov stability theorem, indicating that the system can achieve stability, so the q-axis reference current as follows

Design of new non-singular fast terminal-SMC
It can be seen from equation (8) that the sign function is used in the approach law of the controller. Due to the discontinuity of the sign function, a high-frequency component is observed in the signal, which will produce significant chatter in the actual control process and reduce the system observation accuracy. So it is necessary to further suppress chattering. The relay function with continuous characteristics or saturation function sat(s) can be used instead, but the use of sat(s) will cause the control time to be prolonged, and may cause an impact on the system, resulting in decreasing of system stability. Therefore, a continuous function υ(s) = s/|s| + ψ is used to replace the switching function sign in the controller In traditional sliding mode control, the selected sliding mode surface is generally linear. The using of linear sliding mode surface enabled the system state gradually converge to the equilibrium point after the system reached the sliding mode. Although the speed of gradual convergence can be adjusted by changing various control parameters, it will never achieve the convergence of the system in a limited time.
In order to improve the problem of poor convergence characteristics and avoid the singularity problem of the traditional terminal sliding surface, a traditional nonsingular terminal sliding mode control (s = x + 1/β ·p/q x ) was proposed (Feng et al., 2002), it retained the characteristics of terminal sliding mode control which can converge in a limited time, while avoiding the singularity problem. But when the system was in sliding mode status and s = 0, · x = −βx q/p , its exponent of the x term is less than 1, that is, in the region far from the equilibrium state, the state derivative is smaller than the linear sliding mode surface under the same parameter, resulting in a slower convergence rate and even lower than the exponential convergence rate. Intuitively, if the highorder exponential term of x is increased, when the system is far from the equilibrium point, the absolute value of the state derivative can be increased, thereby increasing the convergence speed. At the same time, in the traditional fast terminal sliding mode control (s = · x +βx q/p ), when the system is close to the equilibrium state, the convergence speed of the nonlinear sliding mode is slower than that of the linear sliding mode (p = q). Comprehensively considering the traditional non-singular terminal sliding mode control and the traditional fast terminal sliding control, an improved non-singular fast terminal sliding surface is proposed in this paper, which increases the convergence speed of the control system, and further improves the observation accuracy on the basis of ensuring that the system can converge in a finite time without causing singularity problems. This paper proposes an improved non-singular fast terminal sliding surface, two nonlinear functions are introduced in the design of the sliding hyperplane, so that the tracking error on the sliding surface can converge to zero faster. The sliding mode surface is selected as follows: where x is the state error variable, α > 0, β > 0, p, q are positive odd and 1 < p/q < 2, z > p/q. When the system operating state is near the equilibrium state, the high-order exponential term of x 1 (αx z 1 ) can be ignored. At this time, equation (13) becomes the traditional non-singular terminal sliding mode control, which iss = x 1 + 1/βx p/q 2 . It ensuring that the system has a faster convergence speed. When the system operating state is relatively far from the equilibrium state, the high-order exponential term (αx z 1 ) of x 1 in equation (13) plays a leading role, effectively accelerating the convergence speed of the system, and it is faster than the non-singular terminal sliding mode surface.
It can be seen from the above analysis that the new non-singular fast terminal sliding surface designed in this paper is compared with the traditional method, its contribution are (1) It has a faster convergence speed and can overcome the slow convergence speed problem which in traditional methods. (2) Whether the system is running near the equilibrium state or far from the equilibrium state, it can ensure that the system achieves relatively fast convergence. (3) The new non-singular fast terminal sliding mode control has no switching items, which can effectively eliminate system chattering. (4) The exponent of the x 2 term in formula (13) is greater than 1, which avoids the occurrence of negative exponential terms in · s and ensure its non-singular characteristics. (5) The non-singular fast terminal sliding mode control has good robustness to system uncertainty and interference. By selecting an appropriate value of p/q, the system state can reach a sufficiently small neighbourhood of the sliding mode surface and converge to the equilibrium state with following the sliding mode surface.
The system state error are defined as follows: Derivation of equation (13 The traditional symbolic function sign(s) is replaced by continuous function υ(s) = s/|s|+ψ, the controller is as where k, η are constant greater than 0, ψ is a small positive constant, the continuous function υ(s) is shown in Figure 1 Substituting equation (16) into Select the Lyapunov function according to Lyapunov's second method (also called direct method) as follows Substituting equation (17) into equation (19), we get where p, q are an odd number and 1 < p/q < 2, ψ is a small positive constant, J, β, q are positive number, then, ηs 2 /|s| + ψ ≈ |s|, x p/q−1 2 > 0, Equation (20) can be changed as follows Equation (21) satisfies the Lyapunov stability theorem, indicating that the system can converge to a stable state within a finite time. Under the designed control rate, the new non-singular fast Terminal sliding mode surface can converge to 0 within a certain time, so that the speed error can eventually converges to 0, that is, the actual speed of the motor can follow the reference speed, and because of the using of continuous function υ(s) in the approach law, avoids chattering and the convergence speed is faster, the system is more stable.
At the same time, the q-axis reference current can be obtained from equation (16) as follows The integral term in the reference current and the continuous function υ(s) act simultaneously, which supresses the chattering phenomenon well. At the same time, based on the use of non-singular fast Terminal sliding mode surfaces, the system converges faster.
For the mechanical angular velocity term in formula (22): after measuring the three-phase voltage and current, the motor back electromotive force can be obtained according to formula (23) the mechanical angular velocity information also can be obtained according to formula (24) Then inputting the angular velocity signal into the speed controller to realize the speed sensorless control of the motor. When the system does not require high precision, the conversion between extended back-EMF and mechanical angular velocity can satisfy the system's stable control.
Build a non-singular fast Terminal-SMC SPMSM sensorless control system under Matlab/Simulink, as shown in Figure 2.

Simulation and result analysis
In order to analyze the performance of the designed nonsingular fast Terminal sliding mode speed observer, simulation verification is carried out in Matlab, and the SPMSM speed sensorless control system is constructed according to Figure 2, using a control strategy of i d = 0, and compared with the traditional SMC speed controller and hyperbolic tangent function SMC speed controler (2017). Using ode23tb algorithm, the simulation time is 0.4 s, the motor starts at no load, and the load of 10 N·m is suddenly added at 0.15 s, and the load is suddenly reduced to 4 N·m at 0.25 s.
Based on the sliding mode control of the reaching law, the continuous function υ(s) is used to replace the switching function term in the traditional exponential reaching law, thereby reducing the chattering caused by high-frequency switching of the system. The exponential term (−ks) can ensure that the system can approach the sliding mode at a greater speed when s is large. The constant velocity approach term (−ηs/|s|+ψ) can ensure that when s is close to 0, the approach speed is η instead of 0, which can guarantee the system arrived in a limited time.
Note: For the effects of main design parameters selected on the control performances: (1) Selection of η: If η is selected too large, the peak error will increase during the system speed rising stage, and the time required to reach the reference speed will increase. The chattering is obvious during the system operating stable, but when the load disturbance occurs, the time that return to the reference speed will decrease; if η is selected too small, the system overshoot will increase, and the peak error will increase during the system speed rising stage. When the load disturbance occurs, the adjustment time will increase, but the system chattering is very small and basically in a chatter-free state during stable operation, and the accuracy of speed tracking is improved.
(2) Selection of k: If k is selected too small, it will cause the system to fail to reach the preset reference speed during the rising phase of the system speed. At the same time, when the load is disturbed, the speed cannot be well adjusted to restore to a stable state; if k is selected too large, it will causes the system to have poor speed regulation performance under noload conditions, and cannot run to near the reference speed in a short period of time, resulting in large errors.
(3) Selection of α: If α is selected too large, the overshoot will increase when the system speed rises to the reference speed under no-load conditions, but the time to stabilize is relatively reduced. At the same time, when the load is disturbed, a large value α can improve the system speed tracking accuracy and enhance the anti-disturbance ability. if α is selected too small, the time that the system rise to the reference speed under no-load conditions can be greatly reduced, and the system is basically in a state of no overshoot. But at the same time, when the load disturbance occurs in the system, the effect of speed adjustment becomes worse than the larger value of α. The speed cannot be restored well to reference speed and the speed tracking accuracy decreases during stable operation. (4) Selection of β: If β is selected too small, it will cause the system to be unable to achieve accurate speed tracking during the speed increasing phase, stable operation phase and adjustment phase after load disturbance. And the speed error is large, but the system overshoot is relatively reduced and the system chattering is greatly reduced. if β is selected too large, the overshoot will increase during the system speed rising phase, and the peak error is larger, but after the load is disturbed, the actual speed can track the reference speed well and basically no chattering, the speed adjustment time is relatively reduced.  Considering the above requirements comprehensively, and according to relevant literature (Liu & Wang, 2017;Wang, 2019) and parameters setting experience, the values of η, k, α, and β are selected as shown in Table 3. The SPMSM parameters, inverter and SVPWM parameters setting are shown in Tables 1 and 2, respectively. And the simulation results are shown in Figures 3-5 (Table 3).

Speed comparison and analysis
Figure 3(a-d) are the traditional sign function SMC speed control waveform, the tanh function SMC speed control waveform, the sat(s) function SMC speed control waveform and the NSFT-SMC speed control speed waveform designed in this article. It can be seen from the Figure 3(a) that the traditional switching function SMC control system has poor adjustment ability. It took 0.05 s for the system to rise from 0 r/min to 1000 r/min. The peak speed error is large (200 r/min). And when the load is changed suddenly at 0.15 s and 0.25 s, system's overshoots are large. As is shown in Figure 3(b), after adopting the tanh function, the system control effect is improved and the corresponding time is shortened, but there are still problems of low tracking accuracy and poor speed adjustment ability after disturbance. When the sat(s) function is used in approaching law and the system has a sudden load change in 0.15 s and  system to rise from 0 r/min to 1000 r/min is increased (0.06 s), the response time of system is extended.
It can be seen from the Figure 3(d) that when the new non-singular fast terminal is used and the continuous function is used to replace the switching function, the control effect is improved. The time for the speed to rise from 0 r/min to1000 r/min is shorter (0.02 s). At the same time, after the load is disturbed, the adjustment speed is faster and the adjustment effect is better.
As can be seen from the comparison of four figures, after the motor runs, the actual speed can reach the reference speed 1000 r/min in a relatively short time, and it can basically achieve tracking without static errors when the system is running stably. However, in the new nonsingular fast Terminal-SMC speed controller, there is basically no overshoot when the speed rise to a steady state, and the speed error is very small At the same time, when the load changes respectively in 0.15 s and 0.25 s, the speed can be restored to a stable state faster, the speed error is smaller, and the robustness is better.

Electromagnetic torque comparison and analysis
Figure 4(a-d) are the electromagnetic torque waveforms of traditional sign function SMC speed control, tanh function SMC speed control, sat(s) function SMC speed control and the new NSFT-SMC speed control designed in this article, respectively. From the comparison of Figure 4(a,b), compared with the traditional sign function SMC, the SMC which adopted the tanh function has less overshoot. The adjustment time is shorten significantly. But it still has some problem such as the large peak error and chattering in system operation.
After using sat(s) function, the chattering, peak error and overshoot are further reduced from the Figure 4(c), but when the load is suddenly applied at 0.15 s, the electromagnetic torque still has certain fluctuations, and the curve change process is not smooth. But, it can be seen from the Figure 4(d) that when a non-singular fast sliding mode surface is used and the continuous function is used to replace the traditional switching function, the peak error is reduced and the curve is smoother. The system operation is more stable, the chattering is smaller and the adjustment effect is better. It can be seen from the Figure 5(a) that the traditional SMC current waveform takes a relatively long time to reach a stable three-phase sine wave, and the current fluctuated greatly. When the load is changed at 0.15 s and 0.25 s, the three-phase current pulsation is large. At the same time, the adjustment time is longer, and there are still large errors in stable operation. Compared with Figure 5(b), it can be seen that the above problems are improved after using tanh function, but there are still complex problem of large chattering in stable operation.

Three-phase current comparison and analysis
When the sat(s) function is used in approaching law, the chattering is further reduced, and the three-phase current waveform diagram is smoother from Figure 5(c), but after 0.15 s and 0.25 s load disturbance, there is a certain error between the peak value of the three-phase current and the reference value. Figure 5(d) shows that after the new non-singular fast terminal sliding mode surface is used and replace sign function with continuous function, the stator three-phase current presents an excellent sine waveform when the system is running stably. The curve is smoother, that is, the chattering is further reduced during operation, and the system adjustment speed is accelerated. The adjustment ability is further improved.

Conclusion
In this article, based on the traditional SMC speed control the tanh function and sat(s) function SMC speed control, a new type of non-singular fast Terminal-SMC is designed, the Lyapunov stability criterion is used to prove the stability of the designed SMC. Finally, building the new SMC system model and simulating in Matlab based on the given parameters. And comparing with the traditional SMC speed control, the tanh function SMC speed control and the sat(s) function SMC speed control: (1) the SMC speed controller designed in this article, during the motor speed rises phase and the load sudden increases and decreases adjustment phase, the system overshoot is smaller and more robust.
(2) Because of using nonsingular fast Terminal sliding mode control and replacing the symbol function with the continuous function υ(s), the system converges faster and the chattering is smaller after stable operation. Comparing with the traditional SMC speed control method, the proposed scheme has better control performance and better chatter reduction effect.
In future work, we will focus on (1) Comprehensive sliding mode controller with the new sliding mode surface and faster convergence speed; (2) Further reduces the impact of the chattering and enhances the stability and anti-interference ability based on the nonlinear changing of the load. (3) In non-linear system control methods, more consideration can be given to fuzzy control, adaptive neural network and other related control strategies, or integrate the control strategies based on the above methods. At the same time, based on the research of artificial intelligence, the particle swarm optimization, cuckoo Bird algorithm, whale algorithm and other related algorithms can be considered to improve the speed control algorithm of the motor, make its adjustment ability and anti-disturbance ability better. (4) The traditional PI controller has poor dynamic performance and cannot accurately track when the load is disturbed or parameter perturbed. An extended state observer or a nonlinear disturbance observer can be designed to observe the disturbance in real time and feed it back to the previous item for compensation to improve accuracy.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
This work was supported by National Natural Science Foundation of China [grant number 61803233].