## 3 Control Loop
Therefore, this study replaced the PI control in the error amplifier of the charger's current control loop with a P-PI control approach, and integrated the fuzzy logic control with the multiplexer technology to effectively mitigate the current overshoot caused by step increases during the charger's start-up phase. The control system block diagram is illustrated in Figure 6. The control system was composed of an error calculation unit (ECU), fuzzy logic unit, P control unit, PI control unit, and multiplexer (MUX). Moreover, the analog voltage signal \(V_{i_{o},sen}\) was converted into a digital value by an analog-to-digital converter (ADC), and the digital output of the multiplexer was subsequently converted back into an analog voltage signal \(V_{eac}\) through a digital-to-analog converter (DAC), which was then used to control the PSFB controller. Among them, the expression for the computation performed by the error calculation unit is given by  
\[\left\{ \begin{aligned} & e(t)=V_{ref,i_{o}}-V_{i_{o},sen}\\ &\Delta e(t)=e_{n}(t)-e_{n-1}(t)\end{aligned} \right. \tag{8}\]  
where \(e(t)\) represented the instantaneous error, and \(\Delta e(t)\) denoted the error differential value. \(e(t)\) and \(\Delta e(t)\) served as the input variables for the fuzzy logic system. Based on the predefined rule table and fuzzy sets, the fuzzy logic performed inference on \(e(t)\) and \(\Delta e(t)\) to generate a selection signal that controlled the multiplexer, which determined whether the output from the P control or PI control was used. The selected output was then passed through a digital-to-analog converter to produce an analog voltage \(V_{eac}\), which is used to control the PSFB controller. Figure 6: The proposed current loop controller in this study. As shown in Figure 6, the operating flowchart of the proposed current loop controller is presented in Figure 7 and is detailed as follows:  
* Current acquisition and conversion: The output current \(I_{o}\) was detected by a current shunt, producing an analog signal \(V_{in\_sen}\) which was then converted into a digital current value via an analog-to-digital converter. * ECU: The controller established the desired reference current \(V_{ref\_ion}\), compared it with the actual output current \(I_{o}\), and calculated the error \(e(t)=V_{ref\_ion}-V_{in\_sen}\). It then determines the rate of change of the error as \(\Delta e(t)=\)\(e_{n}(t)\ -e_{n-1}(t)\). * Fuzzy logic unit: Taking \(e(t)\) and \(\Delta e(t)\) as input, the fuzzy controller inferred which controller should be selected for the current state: (1) If \(e(t)\) and \(\Delta e(t)\) were large and changed rapidly, a P control was selected. (2) If \(e(t)\) and \(\Delta e(t)\) were small and relatively stable, a PI control was adopted. * MUX: Based on the control signal \(S\) determined by the fuzzy logic unit, the output control action was selected from either the P or PI control accordingly. * Digital-to-analog converter: The digital P or PI control signal output from the multiplexer was converted into an analog voltage \(V_{\alpha c}\) through a digital-to-analog converter and then fed into the PSFB controller. * Closed-loop control: The system continuously and dynamically adjusted its output based on this mechanism to regulate charging current, particularly to promptly suppress overshoot induced by the step rising during startup phase.