Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 11, No. 1, 2024 1 Direct Torque Control Based on Fuzzy PID Control Zesheng Li1, Lin Li1, * 1Department of Electronic Engineering, Xi'an Shiyou University, Xi’an, China * Corresponding author: Lin Li (Email: 21212030368@stumail.xsyu.edu.cn) Abstract: To improve the operation efficiency and performance of single motor, the direct torque control based on space vector modulation introduces fuzzy PID speed link, optimizes the dynamic response and following ability of AC frequency conversion speed regulation, and has good dynamic performance while overcoming uncertainty and strong anti-interference ability, enhancing the robustness of the system. Keywords: Ac variable frequency speed regulating, direct torque control, Fuzzy PID control. 1. Introduction The traditional DTC motor speed control technology mainly uses 8-bit basic space voltage vector selection table and hysteresis comparator to generate approximately circular stator flux vector locus as shown in the figure 1. DTC technology based on hysteresis control and 8-bit basic voltage vector selection in one sampling period is difficult to produce a fixed inverter switching frequency, especially at low speed. In order to improve the performance of the motor, some scholars start from the modulation technology, control method and refined space voltage vector. SVPWM-DTC is a direct torque technology based on space vector modulation, which synchronously regenerates the space voltage vector through the on-state of each half bridge of the three-phase inverter. This technology can control the amplitude and Angle of the voltage vector, so that the torque ripple is effectively suppressed and the current waveform and stator flux trajectory are improved. Secondly, PI control regulator is added to improve the defects of excessive and unfixed frequency of hysteresis control switch. DTe 1 0 -1 -|ΔTe| +|ΔTe| |Te*|-|Te| -|ΔΨ| +|ΔΨ| 0 1 DΨs |Ψs*|-|Ψs| 1 23 4 5 6 ASR Clark switch Clark switchK/P torque model Stator flux model Switc hing volta ge selec tion table M rectifier inverter ~3Φ UA,UB,UC IA,IB,IC Uα, Uβ Iα, Iβ ω ω * ΨS* ΨS Te* Te Figure 1. Direct torque control 2. Mathematical Model of Asynchronous Motor The mathematical model of asynchronous motor is composed of voltage equation, flux equation, torque equation and motion equation. 2.1. Voltage equation In the formula, 𝑅 and 𝑅 respectively represent stator resistance and rotor electron, unit Ω; 𝑈 ,𝑈 ,𝑈 are the stator voltage, the unit is V; 𝑈 , 𝑈 , 𝑈 are rotor voltage, unit V; 𝑖 ,𝑖 , 𝑖 are stator currents, unit A; 𝑖 ,𝑖 , 𝑖 are rotor current, unit A;𝛹 ,𝛹 ,𝛹 are the stator flux, the unit is Wb;𝛹 ,𝛹 ,𝛹 are rotor flux, unit Wb; p is the differential operator of the flux linkage. 2.2. Flux linkage equation In the formula, 𝛹 ,𝛹 ,𝛹 are the stator flux, and the unit is Wb;𝛹 ,𝛹 ,𝛹 are rotor flux chains; 𝑖 , 𝑖 , 𝑖 are stator currents, unit A; 𝑖 ,𝑖 , 𝑖 are rotor current, unit A; 𝐿 and 𝐿 indicate inductance self-inductance, unit H; 𝐿 and 𝐿 and for inductance mutual inductance. 2.3. Torque equation The torque equation describes that when the magnetic field in the motor rotates, the electromagnetic torque is controlled by the stator and rotor currents flowing out of the rotating magnetic field and the rotation Angle. Where a, b and c are rotor current, unit 𝑖 ,𝑖 , 𝑖 are stator currents, unit A; 𝜃 Angle of the stator relative to the rotor; 𝐿 is the relative Angle of the stator rotor; n is the number of stator winding turns of squirrel cage asynchronous motor; 𝑛 is the pole number of asynchronous motor; 𝑇 is electromagnetic torque, unit KNM. 2 2.4. Equation of motion The motion equation describes the change rate of motor speed and the change of relative torque, which is not only the essence of motor speed regulation but also the expression of external characteristics of asynchronous motor. In the formula, 𝑛 is the pole number of asynchronous motor; 𝑇 is the load torque unit KNm; 𝜃 rotor Angle, unit rad; 𝜔 is the load angular velocity, rad/s; J moment of inertia, kg·m^2. 2.5. The asynchronous motor model after Clark transformation Where 𝑅 and 𝑅 represent stator resistance and rotor electron respectively, unit Ω; 𝑢 , 𝑢 , 𝑢 , 𝑢 are the stator voltage and rotor voltage on the α and β axes in two- dimensional plane. The unit is V; 𝑖 , 𝑖 , 𝑖 , 𝑖 are the stator current and rotor current on the α and β axes in A two- dimensional plane, unit A;𝐿 and 𝐿 are self-inductance and mutual inductance of stator and rotor, unit Wb; ω is the unit of synchronous speed Wb of rotating magnetic field; p is the differential operator of the flux linkage. The flux linkage equation is obtained by Clark transformation. The torque equation is obtained by Clark transformation. The motion equation is obtained by Clark transformation. 3. Space Voltage Vector Pulse Width Modulation Technique The modulation process of SVPWM is mainly composed of four parts, as shown in Figure 2,SVPWM pulse width modulation, including sector judgment, time storage, seven- segment allocation algorithm and PWM driver signal. The 𝑈 synthesized by three voltages is transformed to α and β axis by clark, and the 𝑢 and 𝑢 are obtained. Uα、β Sector judgment time register Seven-segment time allocation PWM drive signal T1 T2 T0 0 7 0 6 pwm Figure 2 SVPWM SVPWM (Space vector pulse width modulation) is to control the magnetic field vector through the voltage vector, adjust the voltage vector through the pulse width, and control the rotation of the magnetic field vector. In order to reduce the electromagnetic torque ripple, SVPWM focuses on modulating the three sine fundamental waves to control the rotating magnetic field towards the circle. 3.1. Eight inverter switching states Two-level inverter switch off gate off, U m is the power supply voltage. According to the above formula, different breaking combinations are obtained as shown in 3.2. Time register Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Im Re V2 V1 V3 V4 V5 V6 V0 V7 V* T1/Ts Figure 3. Spatial voltage time sampling synthesis The essence of time calculation is to control the switching on and off time of the inverter within the sampling period𝑇 . As long as the sampling period 𝑇 is small enough, the stator voltage vector U s will be more and more close to the given stator voltage vector𝑈 . As shown in Figure 3, 𝑇 and 𝑇 are obtained by using the sine theorem. 3.3. Seven segment algorithm The switching signal is obtained from 𝑇 and 𝑇 according to the comparison between the modulated signal and the carrier, because the faster the switching frequency, the more the switching loss, so the switching principle is only changed once each time. Figure 4-16 shows the voltage synthesis in the first sector. In the first sector, for example, when the given voltage vector V^* falls in the first sector, the torque Angle 0 𝜃 𝜋 3⁄ ,the required 𝑉 and 𝑉 and the corresponding switching state duration 𝑇 and 𝑇 can be calculated according to the vector synthesis. Im Re(T1/2TS)V2 (T2/TS)V2 (T1/2TS) V2 V1(100) V2(110) V* Figure 4. First sector voltage synthesis In order to obtain the switching pulse signal, it is necessary to compare the modulated signal with the triangular wave signal, as shown in Figure 4. 3 Vtc Vtc Vtc V0 TO/4 V1 T1/2 V2 T2/2 V7 TO/2 V2 T2/2 V1 T1/2 V0 TO/4 1 Sa Sb Sc Figure 4. Carrier signal of SVPWM As can be seen from Figure 4, in a sampling period 𝑇 , the non-zero vectors (𝑉 ) →(𝑉 )→and the zero vectors (𝑉 ) and (𝑉 ) are respectively switched on or off only once according to the principle of one-time bridge arm breaking under the premise that the switching frequency is the same as the sampling frequency. The beginning and end of the switch are the same switching state, so as to ensure that the switch of the sector is not affected by additional switching actions, and to meet the use of the inverter with a small switching frequency, that is, when the vector is switched to each other, one inverter bridge arm is switched on and the other is disconnected; The minimum switching device acts when one sector is rotated to another. Therefore, the switching sequence of the first sector can be seen from the modulated signal action time𝑉 , 𝑉 and𝑉 according to the triangle similarity principle. Table 3. Seven-segment algorithm table Ⅰ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 Ⅱ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 Ⅱ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 Ⅱ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 Ⅱ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 Ⅱ V0 V1 V2 V7 V2 V1 V0 Vt*Ts Sa 0 1 1 1 1 1 0 T0/2 Sb 0 0 1 1 1 0 0 T1+t0/2 Sc 0 0 0 1 0 0 0 T1+T2+T0/2 T0/4 T1/2 T2/2 T0/2 T2/2 T1/2 T0/4 The order of voltage vectors in different sectors is different, so the switching time of different sectors needs to be rearranged. In the sampling period Ts, according to the switching time Vt*Ts of each bridge arm in each sector, the height is 1 and the isosceles triangle is truncated at Ts/2, so that the gate signal of the switching device of each bridge arm is the drive off signal. PI controller proportional link and integral link respectively, speed up the system adjustment speed and eliminate static error. 4. PI Rotary Speed Controller The PI control strategy of SVPWM direct torque control is shown in Figure 5. For electromagnetic torque ring and stator magnetic link ring respectively, the reference voltage of d axis and q axis on park is obtained by using the tracking error of torque ∆ in the torque ring and PI algorithm. Similarly, the tracking error e 𝛹∆ of the stator magnetic link ring is obtained by PI algorithm, and the reference voltage of the d axis and the q axis on the park is obtained. 4 Figure 5. PI Speed controller 5. Speed Controller Based on Fuzzy PID The difference between SVM-DTC and the new FLC SVM-DTC is that the PI comparison link of the speed regulator replacing SVM is PID control based on fuzzy control. FLC-PID uses fuzzy control to solve the problem of fixed gain limitation due to PID control. The new controller uses the fuzzy algorithm to realize the gain self-tuning, improve the observation accuracy, broaden the range of effective view adjustment, effectively improve the control signal smoother and improve the system robustness, improve the system chattering, make the system respond quickly and improve the dynamic performance of the system. According to the functional requirements of the described FLC-SVM controller, the structure of the designed FLC-PID synchronous controller is as follows fuzzy reasoning K1、K2、K3 pid-controller Detection feedback pK iK dK t d d eK ecK + - SVM-DTC n *n Figure 1. FLC-PID As shown in Figure 4-28, FLC-PID consists of fuzzy rule inference mechanism and PID regulation control. FLC is responsible for generating fuzzy inference for ∆𝐾 , ∆𝐾 and∆𝐾 . In the FLC part, the tracking error e and the change rate de/dt of the tracking error generated during synchronous operation of the dual motors are taken as inputs, and are deduced by fuzzy inference, proportional adjustment and quantitative distribution. The output result is ∆𝐾 , ∆𝐾 and∆𝐾 , where K e and K ec are the quantized factors of the change rate de/dt of the tracking error e and tracking error respectively, and K 1, K 2 and K 3 are the scale factors of ∆𝐾 , ∆𝐾 and ∆𝐾 . Through FLC, the generated ∆𝐾 , ∆𝐾 and∆𝐾 are input into the PID controller, and finally the PID controller parameter tuning result is applied to the control object. The fuzzy reasoning process needs to multiply the basic domain of the tracking error e and the rate of change de/dt by the quantization factors 𝐾 and 𝐾 to transform them into the domain of the corresponding fuzzy set theory. Therefore, the quantization factors 𝐾 and 𝐾 of different proportions directly affect the scaling degree of tracking error e and the change rate de/dt of tracking error, and affect the scope of fuzzy domain. The sizes of 𝐾 , 𝐾 , and 𝐾 affect the selection of∆𝐾 , ∆𝐾 and∆𝐾 , so a suitable scale factor can reduce the system error. First, fuzzy processing and membership function selection. The input value e and the change rate de/dt of the tracking error and the output value ∆𝐾 , ∆𝐾 and∆𝐾 are fuzzy processed and the fuzzy subsets of seven dimensions {NB, NM, NS, ZO, PS, PM, PB} are set to divide the values. Mamdani fuzzy reasoning method is used to deduce 49 if- else fuzzy rules. The rules are shown in Figure 4, 5, 6: 𝐾 𝑒 NB NM NS ZO PS PM PB 𝑒 NB PB PB PM PM PS ZO ZO NM PB PB PM PS PS ZO NS NS PM PM PM PS ZO PS PS ZO PM PM PS ZO NS NM NM PS PS PS ZO NS NS NM NM PM PS ZO NS NM NM NM NB PB ZO ZO PS PM PM PB PB Figure 2. Kp fuzzy rule design table 5 𝐾 𝑒 NB NM NS ZO PS PM PB 𝑒 NB NB NB NM NM NS ZO ZO NM NB NB NM NS NS ZO ZO NS NB NM NS NS ZO PS PS ZO NM NM NS ZO PS PM PM PS NM NS ZO PS PS PM PB PM ZO ZO PS PS PS PB PB PB ZO ZO PS PM PM PB PB Figure 3. Ki fuzzy rule design table 𝐾 𝑒 NB NM NS ZO PS PM PB 𝑒 NB PS NS NB NB NB NM PS NM PS NS NB NM NM NS ZO NS ZO NS NM NM NS NS ZO ZO ZO NS NS NS NS NS ZO PS ZO ZO ZO ZO ZO ZO ZO PM PB NS PS PS PS PS PB PB PB PB PM PM PS PS PB Figure 4. Kd fuzzy rule design table Finally, the parameters of the fuzzy solution, ∆𝐾 , ∆𝐾 and∆𝐾 , are adjusted in the PID controller according to the following formula. () In the formula, the initial PID parameters are𝐾 , 𝐾 , 𝐾 ; ∆𝐾 , ∆𝐾 and∆𝐾 . 6. Analysis of Simulation Result simulink simulation software was used to build a single motor simulation with two strategies of direct torque control, and the stator flux is given a constant amplitude Ψs ^*=1Wb, the current hysteresis control tolerance is set as ΔΨ s=0.05Wb, ΔTe =0.547N·m, and the sampling frequency of the two systems is fφ =50KHz. Set the initial load torque T (t=0)=0N·m, and the sudden load torque after 1s is 400N·m; Initial speed n (t=0)=400rad/min. (a)FLC-DTC Three-phase stator current (b)SVM-DTC Three-phase stator current Figure 5. Three-phase stator current (a)FLC-DTC Speed tracking (b)SVM-DTC Speed tracking Figure 6. Speed tracking (a)FLC-DTC Torque tracking (b)SVM-DTC Torque tracking Figure 7. Torque tracking (a)FLC-DTC Stator magnetic link track (b)SVM-DTC Stator magnetic link track Figure 8. Stator magnetic link track 6 (a) FLC-DTC Actual output electromagnetic torque (b)SVM-DTC Actual output electromagnetic torque (a)FLC-DTC observation of electromagnetic torque (b)FLC-DTC observation of electromagnetic torque Figure 9. Observe electromagnetic torque waveform Through simulation comparison of SVM-DTC and FLC- DTC, the torque fluctuation in speed response tracking is shown in Figure 6. The initial motor output torque is 1000N·m, the output torque of FLC-DTC follows quickly, and the torque ripple under the control of SVM-DTC fluctuates at 0.221N·m. The torque ripple of the motor under the control of SVM-DTC fluctuates at 0.68N·m, and the torque ripple of FLC-DTC is smaller than that under the control of SVM-DTC at the same sampling frequency. The speed waveform is shown in Figure 7. The target speed is set at 400rad/min. In terms of speed following response, FLC- DTC follows from the initial speed of 0rad/min to 400rad/min at 0.14s, and SVM-DTC controls the speed to reach the target speed at 0.25s. FLC-DTC is superior to SVM-DTC control in control system response. When the system is stable, the steady-state error of FLC-DTC is smaller than that of direct torque control. Therefore, FLC-DTC has better speed and stability than SVM-DTC control in speed following. The stator flux trajectory is shown in Figure 8. The stator flux controlled by SVM-DTC is not as smooth and lagging as FLC-DTC. To observe electromagnetic torque fluctuation, Fuzzy-PID based direct torque control has a good effect on electromagnetic torque observation, especially after the torque drops, the observed torque fluctuation decreases obviously. 7. Conclusion Therefore, compared with SVM-DTC control, the asynchronous motor controlled by FLC-DTC strategy has faster torque and speed response and better transient performance. The stator flux observation is smooth, and the stator current shows less harmonic component when the load torque changes. In summary, after the introduction of space vector modulation technology in direct torque control, the system has been improved in both static stability and dynamic fast performance. References [1] Oualid Aissa, Abderrahim Reffas, Abdelbasset Krama, Rabah Benkercha, Hicham Talhaoui, Haitham Abu-Rub,Advanced direct torque control based on neural tree controllers for induction motor drives,ISA Transactions,2024. [2] Lisheng Jin, Heping Zhou, Xianyi Xie, Baicang Guo, Xiangsheng Ma,A direct yaw moment control frame through model predictive control considering vehicle trajectory tracking performance and handling stability for autonomous driving,Control Engineering Practice,Volume 148,2024. [3] Harshita Tiwari, Arnab Ghosh, Chiranjit Sain, Furkan Ahmad, Luluwah Al-Fagih,Modified direct torque control algorithm for regeneration capability of IM driven electric vehicle by using hybrid energy storage system, Renewable Energy Focus, Volume 48,2024. [4] Allafi IM, Foster SN. Analysis of Direct Torque Control Response to Stator and Rotor Faults in Permanent Magnet Synchronous Machines. Energies. 2023. [5] Anjan Kumar Sahoo, Ranjan Kumar Jena,Loss model based controller of fuzzy DTC driven induction motor for electric vehicles using optimal stator flux,e-Prime -Advances in Electrical Engineering, Electronics and Energy,Volume 6, 2023. [6] Li J, Ma C, Jiang Y. Fuzzy Neural Network PID-Based Constant Deceleration Control for Automated Mine Electric Vehicles Using EMB System. Sensors. 2024. [7] Xing Yang, Defa Wu, Chenglong Wang, Chuanqi Gao, Heng Gao, Yinshui Liu,Adaptive fuzzy PID control of high-speed on-off valve for position control system used in water hydraulic manipulators,Fusion Engineering and Design,Volume 203, 2024. [8] Xin Jin, Jing Liu, Zhuo Chen, Mengnan liu, Mingyong li, Zhenghua Xu, Jiangtao Ji,Precision control system of rice potting and transplanting machine based on GA-Fuzzy PID controller,Computers and Electronics in Agriculture,Volume 220,2024.