Drive Control of a Permanent Magnet Synchronous Motor Fed by a Multi-level Inverter for Electric Vehicle Application

This paper presents the drive control of a Permanent Magnet Synchronous Motor (PMSM) fed by a multi-level inverter for electric vehicle application. In particular, the advantage of torque mobilization of the PMSM engine has been selected for the electric drive of electric cars. In addition, to improve the transmission quality of electric vehicles to ensure requirements, the T-type three-level inverter will be proposed in the control structure of electric vehicles. Moreover, the challenge of torque entails determining the appropriate physical qualities. Therefore, the design of an active damping and current controller to provide rapid and precise torque response to the induced torsional moment was also conducted. Finally, the results of Plecs simulations prove the correctness of the theoretical research. The simulation results demonstrate the research theory. Keywords-multilevel inverter; T-type inverter; PMSM; active damping; electric vehicles; FOC


INTRODUCTION
Electric vehicles have been around for a long time, but their use has grown enormously over the last few years. Many electric car applications that solve energy and pollution problems have been developed, put into commercial production, and used in practice [1]. Electric cars have the advantages of electric motors, such as the ability to quickly and accurately generate torque, whereas torque control is also realized [2]. However, electric cars still have limitations such as long charging time, inflexibility, and high cost. Regarding the outstanding advantages of electric cars, in terms of high performance and environmental friendliness, and considering the efforts to find solutions to reduce battery charging time, lead to the complete replacement of cars powered by internal combustion engines by electric vehicles in the future [3].
Scientists have studied technological issues inside electric cars to develop solutions to improve electric vehicles' quality of motion, energy, and performance. According to [4,5] the structure of an electric car normally includes components such as electric motor, controller, inverter, battery, charging port, powertrain, battery, etc. as shown in Figure 1. The structure of a normal electric car.
In the longitudinal traction structure of Figure 1, we consider some problems with improving the transmission quality of electric cars to ensure requirements, so there is a need to pay attention to the following: Firstly, electric motors have outstanding advantages in terms of controllability, allowing the use of advanced control methods to control the motor, thereby improving the kinematics of the car. Therefore, the issue of selecting the engine most suitable for electric car transmission has always been considered by many scientists and automobile companies. Some motors have been used for electric cars, such as DC motors, which have the advantage of being easy to control. The disadvantage of this type of motors is the need for manifolds and brushes. It has a low lifespan, requires regular maintenance, and is unsuitable for hot, humid, and dusty conditions.
As semiconductor valve technology, microprocessors and control techniques develop strongly and DC motors have been gradually replaced by other types of motors [6]. The Brushless DC Motor (BLDC) is a type of permanent magnet synchronous motor with trapezoidal reactance. The BLDC motor has the same mechanical characteristics, power density, high torque capacity, and high efficiency as a DC motor. The main disadvantage of the BLDC motor is the significant torque undulation [7][8][9]. AC motors, such as squirrel-cage rotor (IM) asynchronous motors, have the advantages of low cost, typical use, and ease of manufacture. It is possible to implement advanced vector control algorithms for IM engines with the current technology, meeting the necessary technological requirements. The disadvantage of the IM motor is its low efficiency, especially in light load mode [6]. The PMSM can be considered the most suitable motor for electric vehicle application with a high-efficiency large torque capacity, while it can be controlled with good quality. In particular, the Interior Permanent Magnet Synchronous Motor (IPMSM) has many advantages, suitable for electric cars [10]. The magnetic motor has benefits such as high efficiency, sizeable power-tosize ratio, high power density, long life, small moment of inertia, wide operating speed range, large amount of torque/current, and low noise stability. Therefore, magnetic motors have been promised to be widely used in transmission systems with high-quality speed regulation, such as electric vehicle robots [6,11]. However, the cost is high and control is complicated. Based on the characteristics of electric motors used for electric cars, in this paper we will consider PMSMs.
Secondly, the inverter converts the DC voltage from the battery into the AC voltage to power the motor. The inverter is a virtual device, contributing to the improvement of the transmission quality to ensure the required specifications. Therefore, the choice of the suitable inverter for this drive system is also a problem considered by many scientists [12]. It was found that multi-level inverters have advantages over twolevel inverters [13]. Based on the current scientific research, it has been discovered that in the control structure of traction power transmission systems, 2-level voltage source inverters with power circuits including six semiconductor valves and the SVM Pulse Width Modulation (PWM) technique are often used. However, a multi-level inverter has more advantages than a two-level inverter for reducing THD [14]. Acroding to [15], the 3-phase current has a conventional sinusoidal shape with Total Harmonic Distortion (THD) equal to 7.53%, while the 2level inverters have THD equal to 11.39%. In addition, the multi-level inverter comprises semiconductor valves and a DC voltage source, and the output voltage is in the form of wavelengths [16]. Therefore, the output voltage of a multi-level inverter may be made sinusoidal with low THD by increasing the number of voltage levels. This paper used -a three-level Ttype inverter fed by a PMSM motor in an electric vehicle to improve fast and accurate torque response.
Thirdly, the torque of the motor shaft T m is the control input variable, and the angular velocity ω of the wheel is the control lever output. When the motor speed changes, the anti-slip is controlled by changing the magnitude of the torque T m . On the other hand, the motor shaft end torque is linearly dependent on the current flowing in the motor. Therefore, to adjust the torque T m , we control the starter motor's stator current. The set value of the stator current flowing in the primary engine is the required current proportional to the pedal angle. In addition, due to their structural characteristics, the electric vehicles are prone to small fluctuations during the entry/exit of the accelerator pedal, the resonant frequency of the controller, and during acceleration. This means that the signal to set the motor speed is affected by this oscillation. At the same time, the control object (wheel) does not consider the jerking phenomenon (T s ×K gear = 0), so the difference between the price-setting value and feedback will cause recoil. If not rectified and extinguished, this recoil can cause discomfort to the occupants in the vehicle [17,18].

A. Mathematical Model of the PMSM Synchronous Motor
According to [19], the dq coordinate system to have the system of equations of PMSM motor is : The equation for calculating the torque of the motor is: The torque of the motor consists of two components: the main component f sq i ψ and the reactive component due to the difference sd sq L L − . When building a control system, we need to control the stator current vector is such that the vertical current vector is perpendicular to the polar flux and there is no magnetizing current component, but only a torque generating current component or 0 sd I = . The equation describing the motor torque is:

1) Description of the Gearbox and the Wheel System
The gearbox model shows the angular speed and torque relationships according to the gear ratio 1 gear k p . where m T is motor torque, Wh T the torque acting on the wheel, with , J is the moment of inertia of the motor. The equation of Newton's second law in the rotation of the motor is: The drive wheel model is described by: When the wheel rests on the road surface with force N and is driven by a torque T wh , the vehicle will act on the road surface with a force F, and, respectively, the road surface will act against the vehicle with a force of the same value in the opposite direction as F t . In this case, F t is the frictional force and is the useful force component that causes the vehicle to move at speed V x .
where µ is the grip coefficient.
Description of the gearbox and the wheel system.

2) Equation of Motion of the Vehicle and External Force Components
Applying Newton's second law to the components of the external force acting on the body of the vehicle, we have: Air resistance: In some cases, or in simulations, we can consider wind speed 0 Rolling resistance exists in the case of an underinflated tire: Transmission system, wheels, and the acting forces.

C. Mathematical Model of Electric Vehicle Powertrain
The model can be seen in Figure 5, where T m is the driving part created by the engine and acting on the electric vehicle, J 1 , J 2 are the moments of inertia of the motor and the load, and ߱ , ߱ ௪ are motor speed and load. The response on the engine side represents the mechanical system (axle stiffness, damping) and the body model. Therefore, it is necessary to have a mathematical relationship between these two components in the electric vehicle system. The model of the system when considering shaft stiffness and damping is: The mathematical model of the mechanical transmission system from the engine to the wheel hub is shown in Figure 6. From Figure 6, it is found that: • Combined with the model above, we will observe the vehicle's speed and Ft's traction force.
• This model can be used to design an active damping unit. The parameter of interest is the speed of the motor shaft.

D. Active Damping Controller Design [20]
Changing the torque will have a difference between the motor and load angles, leading to oscillation or jerking due to uncontrollable torsion angles. In addition, a sudden step-change in motor torque leads to inertial instability of the motor. This recoil effect occurs due to the excitation of the natural frequency of the powertrain. This excitation is caused by a sudden change in the amount of torque applied, given by: where K s is the stiffness coefficient of the shaft, J m corresponds to the rotor inertia of the motor, and K Gear to the gear ratio of the gearbox.
A practical solution to reduce powertrain oscillation is to actively control the torque set on the PMSM (reference torque - , which needs to be increased gradually by subtracting an amount of torque T dp (calculated from torsion angle and oscillation speed -active damping controller) With this method, the rotor speed is measured and fed to an external speed control loop.

Motor
Dynamics and the wheel K Noise ref T dp T m ω Fig. 7.
The control structure of the anti-shock controller.
In Figure 7, K is the active damping controller that needs to be designed. Compared with the kinematics of the electric vehicle, the motor can be considered the first-order inertia. Therefore, the parameters included in the active damping unit can be estimated through the abovementioned models. Besides, through the mechanical system, the inertial component is added to the motor shaft to change the natural frequency of vibration and the factors that cause the recoil effect. The structure of the active damping controller is shown in Figure 8. Active damping controller structure.
The inertia of the mechanical system and the electric vehicle is converted to the motor shaft. For the mass of the car acting on the wheel, the vehicle's inertia on the wheel's axis is calculated and then divided by K gear in order to be converted to the engine shaft.
A set signal that is the speed affected by the jerking phenomenon and the control object does not consider the cause of the jerk . 0 s gear T K = . The difference between the set value and the feedback is that the cause of the draw through the controller will calculate the torque causing the pull. Combined with the set torque, it will calculate the correct torque that the motor needs not to jerk. When the difference between the set value and the feedback is zero or T d =0, respectively, there is no longer a component causing the jerking. The inertia component of the motor is minimal compared to the inertia of the whole team, so we consider it total ev J J = .
The closed transfer function is: E. Stator Curent Controller Design [18,21] The design of the torque controller for PMSM motors becomes vital in high-efficiency applications. The design process for synthesizing and implementing current drivers for PMSM motors is the same as for current controllers in asynchronous motor drives. To design a torque controller for a PMSM motor, it is necessary to understand the interaction of the motor, inverter, and current controller. Consider the gain of the inverter as K r , and the time constant of the inverter as T r , half the PWM carrier frequency duration. If the desired performance of the current control loop is the same as that of the system, then we have a first-order hysteresis step: The current loop circuit is: (1 ) sT sT + ≅ then the transfer function of the current loop is given by: where:

III. SVM MODULATION OF THE 3-LEVEL T-TYPE INVERTER
The 3-phase design of a 3-level T-type inverter is shown in Figure 9 [16]. The 3-level T-type inverter works on 2 DC capacitors to divide the input voltage into two components and create a virtual neutral point. Properly adjusting and switching semiconductor valves will give a wire voltage in 5 levels: Thus, the output phase voltage has the form of 3 levels: Fig. 9. Three-phase T-type inverter structure.

A. Pulse Width Modulation SVM
According to [16], PWM SVM is performed according to the following calculation steps:

1) Step 1: Locate the Reference Vector
The number of sectors S (S = I, II, ···, VI) is determined by Table I.

2) Step 2: Determine the Duty Cycle
In this step, the three nearest vectors are determined, based on the three vertices of the modulation triangle, by calculating the duty cycle of the three most similar defined vectors, and by choosing the switching states of the semiconductor valves. With the assumption shown in Figure 10, the sum of the output voltage vector is as follows: The vector is represented by the vectors in (27): ( ) The coefficients m g and m h are determined as:

3) Step 3: Determine the Switching State
If taking coordinates k A = k, the coefficient k must satisfy this condition: M 1 . The coordinates of the state vector in (a, b, c) coordinate system are given by: B. Algorithm to Balance Voltage on Two DC Capacitors using the SVM Modulation DC voltage unbalance will degrade the inverter output voltage harmonic quality and this is not allowable. Therefore, dealing with this problem is necessary for multi-level inverters in general and T-type inverters in particular.
The implementation steps are: • Step 1: Measure the voltages on the capacitor U dc1 , U dc2 .
• Step 2: Compare the voltage on the two capacitors • Step 3: If U dc1 > U dc2 , discharge voltage on capacitor C 1 , and charge capacitor C 2 .
• Step 4: If U dc2 > U dc1 , then discharge the voltage on the capacitor C 2 and at the same time charge the capacitor C 2 .
IV. SIMULATION RESULTS Based on the PMSM motor modeling, load, active damping controller, torque, and voltage SVM pulse modulation for the T-type 3-level inverter are simulated. The Plecs simulation of the structure of drive control of a PMSM motor fed by a threelevel T-type inverter for electric vehicles application shown in Figure 11.

A. Simulation Results of the T-Type Inverter
Based on the above, an electric car control structure powered by a 3-level T-type inverter was built and simulations were conducted with a 3-level T-type inverter and engine parameters. A 3-level T-type inverter was simulated with a resistive load to evaluate the power circuit structure and SVM modulation of the system's 3-level T-type inverter. The results of the 3-phase voltage and stator current response, are shown in Figures 12-14.   Through the simulation results of Figures 12-14, it is found that the output voltage response of the T-type inverter has the form of 3 levels, with amplitude of 350V. Phase voltage response is sinusoidal, and THD harmonic distortion is small (THD is 2.88, 1.52, and 2.16 for phase a, b, and c respectively). The simulation results in Figure15, show that the DC voltage on the two capacitors is not significantly different with the largest difference ∆V cmax = 3V (0.6%), proving that the balancing algorithm works effectively.

B. Simulation Results of the Active Damping Controller
The structure in the Plecs simulation of the active damping controller is shown in Figure 16. To evaluate the effectiveness of the active damping control design for the permanent magnet synchronous motor drive system fed by a 3-level T-type inverter for electric cars, the following simulation scenario was considered: • At time t = 0s, the torque was put equal to 100Nm, after 2s it changed to -100Nm, and at t = 5s to 100Nm.
• Simulation was held in the case with not a shock absorber. The setting torque is in the form of step (step) and the setting torque is in the form of oscillation generated by the recoil controller. Through the simulation results in Figure 17, it was found that with the design of the anti-shock controller, the torque response set value for the transmission system was built in accordance with the physical properties.

C. Simulation Results of the Torque Controller
To evaluate the efficiency of the torque control design for the permanent magnet synchronous motor drive system fed by a 3-level T-type inverter for electric cars, the following simulation scenario was implemented: • Simulation of an electric car powertrain with a physical model using 3-level T-type inverter with an active damping kit. • At time t = 0s, the torque was put equal to 100Nm, after 2s it changed to -100Nm, and at t = 5s to 100Nm.
The stator current response (i sq ), torque, wheel speed, motor, triple voltage, and THD can be seen in  Through the results of Figure 19, it is found that the real stator current response i sq is close to the set value, but there is still over-correction at the time of transition (speed increase and decrease).  The applied torque response has the correct form for the system physics (small oscillations). This proves that the antishock has been promoted. Besides, the torque response has the same form as the current i sq , the real torque closely follows the set torque including the oscillation. However, the torque response still has over-correction at acceleration and deceleration times, 20% torque pulsation exists, as shown in Figure 20. In addition, it can be seen that the motor speed response still has a large adjustment at the transient time and the setting time is not fast. Through the simulation results in Figure 21, it is found that the output voltage response of the T-Type inverter has a 3-level form when the powering PMSM motor drive system used for electric cars has a 3-level form, with a boundary degree 350V. Three-phase voltage response is sinusoidal, and THD is small (3.36, 1.92, and 2.88 for phase a, b, and c respectively).

V. CONCLUSION
In this paper, the SVM spatial voltage vector modulation for a three-level T-type inverter was implemented and simulated, giving 3-phase voltage and stator current response with minor harmonic distortion. In addition, active damping and torque controllers were designed. The active damping controller has been promoted with the same torque response form as the stator current. The actual torque closely follows the set torque, including the oscillation. However, these controllers use a PI controller, so the torque, stator current, and speed responses still suffer from over-throttling, and the timing set is not fast. Therefore, the future research will focus on improving the above responses according to the requirements by using nonlinear control methods and combining state variable observers such as tires and road surfaces.