Permanent magnet synchronous motor has the characteristics of small size, lightweight, high power factor and high efficiency, and is widely used in the field of robots and electric vehicles  . Direct torque control of permanent magnet synchronous motor is widely used in high performance servo applications due to its high working efficiency, small parameter dependence on the motor, strong robustness, good dynamic performance and simple structure control  . In the traditional direct torque control, the hysteresis controller is used to control the torque and flux linkage. The torque and flux linkage are large, the switching frequency is unstable, and the PI control is mainly used in the speed control. When the system has speed changes and load disturbances, it is impossible to achieve fast and no overshoot tracking target speed.
A lot of research has been conducted by domestic and foreign scholars on the problems existing in traditional direct torque control. Literature  introduces zero voltage vector and vector subdivision to improve the voltage vector switch table, which reduces the flux linkage and torque ripple to a certain extent. The literature  uses space vector pulse width modulation technologies to reduce the inverter. On the basis of switching frequency, many scholars combine intelligent control with traditional direct torque control. The literature  utilizes fuzzy control to optimize the selection of voltage space vector, but the fuzzy rules are complex and rely on experience, sliding mode variable structure. Control is applicable to the direct torque control of permanent magnet synchronous motor due to its robustness, rapid response, and insensitivity to external disturbances  .
In this paper, the super-spiral sliding mode variable structure control is used to design the flux linkage and torque controller. The velocity controller is designed by using the sliding film control method based on the approach law. The system designed in this paper is compared with the traditional direct torque control system. It shows that the method adopted in this paper can effectively reduce the ripple of flux linkage and torque, and accelerate the speed response and anti-disturbance capability.
2. Mathematical Model of PMSM
In order to simplify the analysis, the following assumptions are often made in the mathematical modeling of permanent magnet synchronous motors:
1) Ignore the saturation of the iron core inside the motor;
2) Excluding the eddy current and hysteresis loss when the motor is running;
3) The stator winding current is a three-phase sinusoidal current, and the induced electromotive force of the stator armature winding is also a sine wave  .
2.1. Mathematical Model of Two-Phase Stationary Coordinate System αβ
The stator voltage equation is:
where: are components of the stator voltage vector and the current vector on the α and β axes;
are stator resistance and stator inductance;
is the motor angular velocity;
is a permanent magnet flux linkage;
is the rotor position angle.
The stator flux linkage equation is  :
The electromagnetic torque equation is:
The motor motion equation is:
where: p is the pole number of the motor;
J is the moment of inertia;
TL is the load torque.
2.2. Mathematical Model under Rotating Coordinate System dq
The stator voltage equation is:
The stator flux linkage equation is:
The electromagnetic torque equation is  :
where: are the components of the stator voltage on the dq axis;
are the components of the stator current on the dq axis;
are the components of the stator flux linkage on the dq axis;
are the inductances on the dq axis;
is the stator flux linkage.
3. PMSM Direct Torque Control Based on Sliding Mode Control
3.1. Super-Slip Sliding Mode Variable Structure Control Strategy
Sliding mode variable structure control has discontinuity, the system structure follows the switching characteristics of the time change, the system parameters are independent of the outside world, the response speed is fast, and it has good robustness. The super-spiral algorithm-based synovial controller can effectively eliminate the pulsation. The formula of the super-helical control algorithm is as follows:
and are gains.
The sufficient conditions for the stability of the control system are:
Among them: , .
And A, B meets:
Sliding mode variable structure control has discontinuity, the system structure follows the switching characteristics of the time change, the system parameters are independent of the outside world, the response speed is fast, and it has good robustness. The super-spiral algorithm-based synovial controller can effectively eliminate the pulsation. The formula of the super-helical control algorithm is as follows  :
Magnetic chain controller:
where: is the difference between a given flux linkage and the actual flux linkage;
is the difference between the given torque and the actual torque;
3.2. Synovial Accessibility and Stability Analysis
According to the stator flux vector reference system, , the stator flux linkage is derived  :
Secondary derivation of the flux linkage:
In the above formula, are bounded values, and therefore the formula (14) satisfies the stable condition of the formula (9).
For the hidden pole permanent magnet synchronous motor, assuming that the stator flux linkage amplitude is constant, the torque is also derived:
Continue to guide the torque:
It can be seen that the parameters of the second derivative of the torque are bounded values, and the analysis method is the same as the stator flux linkage, which also satisfies the stable condition of Equation (9).
3.3. Synovial Speed Controller Design
The motor motion equation is:
The design switching function is:
where: is the given speed of the motor;
is the actual speed of the motor.
According to the concept of the approach law of Gao Weibing  , the design approach law is:
Among them: .
Available from Equation (18):
Further, the slip film controller output expression is:
3.4. Synovial Accessibility and Stability Analysis
Select the Lyapunov function as:
Derivation of Equation (22) yields:
This formula satisfies the stability conditions of Lyapulov, which proves the stability and accessibility of the system.
4. Simulation Analysis
In this paper, the simulation model is built by matlab/simulink. The system includes multiple subsystem modules such as flux linkage and torque estimation module, coordinate transformation module and speed adjustment module. The improved system model is shown in Figure 1.
The parameters of permanent magnet synchronous motor are set as follows: the stator winding resistance is , stator inductance , rotor flux linkage , moment of inertia , pole logarithm p = 4, the system friction coefficient B = 0. The system simulation parameters are: given speed is , given flux linkage is , load torque is applied in 0.2 seconds. Simulation time is 0.4 s. The simulation results are shown in Figures 2-7.
Figure 1. Improved DTC simulation model for permanent magnet synchronous motor.
Figure 2. Traditional DTC motor speed curve.
Figure 3. Improve DTC motor speed curve.
Figure 4. Electromagnetic torque curve of traditional DTC motor.
Figure 5. Improve the electromagnetic torque curve of DTC motor.
Figure 6. Traditional DTC motor electromagnetic torque curve.
Figure 7. Traditional DTC motor electromagnetic torque curve.
It can be seen from Figures 2-7 that when the motor speed increases from 0 to 600 r/min, compared with Figure 2 and Figure 3, the conventional direct torque control has a large overshoot and the adjustment time is long, when it is within 0.2 s. When the load is applied, the rotational speed drops significantly and the steady-state performance is poor. In the improved direct torque control, the rotational speed has a small overshoot and the dynamic response is fast, and the rotational speed is substantially unchanged when the load is suddenly applied. Comparing Figures 4-7, in the traditional direct torque control, the torque and flux linkage are large, and in the direct torque control using the sliding mode variable structure control, the torque and flux pulsation are significantly reduced, so it can be seen The method adopted in this paper is effective, can improve the system speed regulation performance, reduce the ripple of the flux linkage and torque, and make the system have good dynamic response and anti-interference.
In this paper, based on the sliding mode theory, the flux linkage and torque controller and the sliding mode variable speed controller are designed. Compared with traditional direct torque control simulation, the method used in this paper can effectively reduce the flux linkage and torque ripple. The system has strong anti-interference and robustness.
 Luo, Z.W., Gu, A.Z. and Hong J.J. (2017) Research on Servo System of Permanent Magnet Synchronous Motor Based on Improved Sliding Mode Variable Structure Control. Machine Tool & Hydraulics, 19, 25-29.
 Swierczynski, D. and Kazmierkowski, M.P. (2002) Direct Torque Control of Permanent Magnet Synchronous Motor (PMSM) Using Space Vector Modulation (DTC-SVM)-Simulation and Experimental Results. IEEE 2002 28th Annual Conference of the Industrial Electronics Society, Sevilla, Spain, 5-8 November 2002, 751-755. https://doi.org/10.1109/IECON.2002.1187601
 Feng, Y., Yu, X. and Han, F. (2013) High-Order Terminal Sliding-Mode Observer for Parameter Estimation of a Perma-nent-Magnet Synchronous Motor. IEEE Transactions on Industrial Electronics, 60, 4272-4280.
 Lai, Y.S., Wang, W.K. and Chen, Y.C. (2004) Novel Switching Techniques for Reducing the Speed Ripple of AC Drives with Direct Torque Control. IEEE Transactions on Industrial Electronics, 51, 768-775.