# Energy-Feedback Load Simulation Algorithm Based on Fuzzy Control
## 3 Load Simulation PI Parameter Setting  
When the energy-feedback DC electronic load works in the normal load simulation mode, the main control DSP replaces the current operating parameters such as input current, input voltage, and other load modes and parameters that need to be simulated into Equation (1) to calculate the reference value \(I_{\text{IN\_Ref}}\) of the energy-feedback DC electronic load input current. Then, the main control DSP chip runs the software algorithm to switch to the input current PI control, and the boost drive duty cycle is obtained, and thus the input current of the load analog circuit can track its reference value \(I_{\text{IN\_Ref}}\). The block diagram of the load analog control algorithm based on the input current tracking is shown in Figure 2.  
This paper studies the energy-feedback DC electronic load with the boost inductance of \(L=1.048\) mH and the boost output capacitance of \(C=2240\)\(\mu\)F. When it works at an input voltage of 200 V and an input current of 15 A, the equivalent output resistance is \(R=53.3\)\(\Omega\), and the duty cycle is \(D=0.5\). To simplify the analysis, input voltage and output capacitance voltage are assumed to be constant, and Equation (11) can be obtained by substituting boost circuit operation parameters into Equation (10). \[G_{i,d}=\frac{47.79s+800}{1.24\times 10^{-4}s^{2}+1.042\times 10^{-3}s+13.3} \tag{11}\]  
We use Matlab software to draw the transfer function Bode diagram without serial PI correction, as shown in Figure 3. Without PI correction in series, the crossing frequency and phase margin of the system are equal, and thus the system is stable. In order to make the system have a faster and more stable dynamic response performance and reduce the static error of the system, the PI control link in the series of the system is corrected [18; 19]. The open-loop transfer function of the system after the PI control link in series is  
\[G(s)=G_{i,d}G_{\text{PI}}=\frac{47.79s+800}{1.24\times 10^{-4}s^{2}+1.042\times 1 0^{-3}s+13.3}\bigg{(}K_{\text{P}}+\frac{K_{\text{I}}}{s}\bigg{)} \tag{12}\]  
After correcting for the PI regulator in series, the system's open-loop transfer function Bode diagram should pass through at a much lower frequency than the boost's switch frequency. After PI correction, the system should have a higher low-frequency gain, and the slope across the 0 dB line should be \(-20\) dB/dec. Phase margin is another important index to measure the stability of the system. With the increase in the phase margin, the system becomes more stable, but the response speed of the system becomes slower. According to theoretical experience, the phase margin should be greater than \(45^{\circ}\), and the optimal phase margin is about \(60^{\circ}\)[20]. Figure 2: Block diagram of load simulation algorithm based on input current tracking. PI controller parameter setting is based on the phase margin PI parameter setting method [21]. The expected crossing frequency \(f_{\rm C}\) of the system is 2 kHz, with 1/10 of the boost switch frequency, and the selected phase margin is 65\({}^{\circ}\). According to Equations (4)-(13), the amplitude frequency characteristic and phase frequency characteristic of the system after series PI correction are as follows:  
\[A(\omega)=\frac{K_{\rm I}a_{0}}{b_{0}}\cdot\frac{1}{\sqrt{\left(1-\frac{ \omega^{2}}{\omega_{\rm n}^{2}}\right)^{2}+\frac{4\omega_{\rm n}^{2}}{\omega_ {\rm n}^{2}}}}\cdot\frac{1}{\omega}\sqrt{\left(a\omega\right)^{2}+1}\cdot\sqrt {\left(T_{\rm I}\omega\right)^{2}+1} \tag{13}\]  
\[\varphi(\omega)=-\left(\pi-\arctan\frac{\frac{2\zeta}{\omega_{\rm n}}\omega}{ \frac{\omega^{2}}{\omega_{\rm n}^{2}}-1}\right)-\arctan(a\omega)+\left(- \frac{\pi}{2}+\arctan T_{\rm I}\omega\right) \tag{14}\]  
where \(T_{\rm I}=K_{\rm P}/K_{\rm I}\), \(a=\frac{47.79}{800}\), \(a_{0}=800\), \(\frac{1}{\omega_{\rm n}^{2}}=\frac{1.24\times 10^{-4}}{13.3}\), \(\frac{2\zeta}{\omega_{\rm n}}=\frac{1.042\times 10^{-4}}{13.3}\).