Research on Permanent Magnet Synchronous Motor Drive System of Electric Vehicle Based on Fuzzy Control

The performance of permanent magnet synchronous motor is an important indicator to measure the performance of motor. Since the conventional PID control is only applicable to the linear control system, the conventional PID control cannot satisfy the control performance requirements for a nonlinear control system such as a permanent magnet synchronous motor or a time-varying system. Fuzzy control does not depend on the precise mathematical model of the controlled object, and it has strong robustness and anti-interference ability to the changes of the controlled object parameters. In this paper, the traditional PID control and fuzzy control are combined, and the PID parameters are adjusted online by the fuzzy controller, so that the permanent magnet synchronous motor speed regulation system has good dynamic and static characteristics. In this paper, MATLAB is used to model and simulate the permanent magnet synchronous motor vector control system based on fuzzy control. The results show that the fuzzy controller has excellent performance in suppressing the overshoot and anti-disturbance.


Introduction
The excellent performance of the motor speed control system directly affects the overall performance of the electric vehicle. Due to its high power density and efficiency, permanent magnet synchronous motors have been widely used in many electric vehicles worldwide. However, for a controlled object with a strong nonlinearity such as a permanent magnet synchronous motor, the conventional PID control effect is not good [1][2][3][4][5][6][7][8] . In today's increasingly complex control objects, intelligent control has received extensive attention to further improve the speed, stability and robustness of the motor speed control system [9][10][11][12] . The main advantage of the fuzzy controller is that it does not depend on the precise mathematical model of the controlled object. Based on the vector control of the permanent magnet synchronous motor, the traditional PID control and fuzzy control are organically combined to make the speed control system has the characteristics of the nonlinear control of the fuzzy control, as well as the accuracy of the traditional PID control. Fuzzy PID control system has a strong adaptability for the start-up acceleration, variable-speed operation and parameter changes of the electric vehicle during complex road conditions.

Vector Control of Permanent Magnet Synchronous Motor id=0
The mathematical model of the PMSM in the d-q axis rotation coordinate system is shown in Figure 1.
Stator flux linkage equation: Electromagnetic torque equation: Mechanical equation of motion: Under the vector control strategy with id=0, the steady-state voltage equation of the permanent magnet synchronous motor is: In the vector space, the magnetic field of the permanent magnet and the magnetomotive force of the stator are mutually orthogonal, and the cross-axis current component that generates the torque and the current component that generates the magnetic flux do not affect each other, so the decoupling of torque and flux can be realized. The torque equation is: The structural block diagram of the permanent magnet synchronous motor vector control system is shown in Figure 2.

Fuzzy control system
Fuzzy control is an intelligent control method based on fuzzy set theory, fuzzy language and fuzzy logic. It is the application of fuzzy mathematics in control systems. Fuzzy control is a method of controlling the controlled object with human knowledge and experience, and the fuzzy controller is its core. The fuzzy controller of this system adopts the compound structure of two-dimensional fuzzy controller, which combines fuzzy control with PID control. The speed loop of the system adopts the fuzzy self-tuning PID parameter control mode, and the current loop adopts the hysteresis current control mode.
The structure of the fuzzy controller is shown in figure 3. The input variables E and EC are fuzzy linguistic variables of the rotational speed deviation e and the rotational speed deviation change rate ec, respectively.
Mamdani's method is usually adopted in practice to achieve the standardized design of the fuzzy controller. The variation range of the motor speed deviation value e and the speed deviation change rate ec is set as a continuous variation of [-n, n](n<7), which is discretized to form a discrete set table containing several integer elements..

Fuzzification of input quantity
The speed control range of the vector control system is (0,1500r/min), then the speed deviation e: (-1500, 1500), the deviation change rate ec: (-3000, 3000). Assuming that the range of variation of the original analog quantity is [a, b], e and ec can be set to the fuzzy domain E=(-3, 3) by the Eq. (10). The fuzzy domain is divided into seven fuzzy sets, and the corresponding linguistic variables are: NB (negative big), NM (negative middle), NS (negative small), ZO (zero), PS (positive small), PM (positive middle), and PB (positive big).  Table 1, the fuzzy rule table of Ki is shown in Table 2, and the fuzzy rule table of Kd is  shown in Table 3.

Defuzzification
The weighted average method can be used to obtain the results of the proportional coefficient Kp, the integral coefficient Ki and the differential coefficient Kd. The general calculation formula is shown in Eq. (13).

Anti-integral saturation PI control
The central idea of anti-integration saturation is to impose a given maximum and minimum values on the value of the control quantity after the control quantity enters the saturation zone, and the execution of the integral term is no longer continued. The controller used in this system uses an anti-integration saturation algorithm, as shown in Eq. (14).
In the formula (14), ( ) u k i is the output of the integral term, and ( ) e k is the deviation.

Simulation results and analysis
The motor parameters are shown in Table 4. The simulation model of PMSM vector control system based on id=0 is shown in Figure 4. The simulation model of PMSM vector control system based on fuzzy control uses the improved fuzzy PID controller designed in this paper to replace the traditional PID speed loop. 4N*m to 6N*m at time t = 1 second. The speed, current and torque waveforms of the conventional PID-controlled permanent magnet synchronous motor speed control system are shown in Figure 5. The speed, current and torque waveforms of the fuzzy PID controlled permanent magnet synchronous motor speed control system are shown in Figure 6.  Figure 6. Speed, current and torque waveforms of fuzzy PID control The speed regulation system of permanent magnet synchronous motor controlled by traditional PID can reach the given speed of 1200r/min in about 1 second, the maximum deviation of the speed is 65 revolutions, and the overregulation is 5%. However, in the fuzzy control system, the motor speed rapidly reaches the given speed within about 0.45 seconds, and there is no overshoot in the speed. When the load is added from 4N*m to 6N*m in time t=1 second, it can be seen from the waveform amplification diagram of speed drop in Figure 5 Figure 5(e) is the waveform amplification diagram of torque from 4N*m to 6N*m, and the rising time is 0.3 seconds. It can be seen from the waveform magnification of the speed drop in Figure  6(d) that the motor speed drop in the fuzzy control system only has 5 revolutions, and can be restored to the stable state within 0.05 seconds. Figure 6(e) is the waveform magnification of the torque from 4N*m to 6N*m, and it can be seen that the rise time is about 0.01 seconds.

Conclusion
In the vector control system of permanent magnet synchronous motor based on id=0, the speed loop adopts fuzzy PID control. Compared with the traditional PID control, the fuzzy PID control has the advantages of smooth start, small overshoot and short adjustment time. The motor speed fluctuation is small at load. Because fuzzy control has certain steady-state error, only fuzzy control can not achieve the ideal control effect. Fuzzy PID control is mainly reflected in the dynamic and static characteristics and robustness of the control system, and the combination of fuzzy control and traditional PID control is effectively combined can significantly improve the speed performance of the system. Therefore, applying fuzzy control to complex controlled objects has good application value.