## 6 Simulation Results and Discussion  
Figure 23 shows the complete schematic diagram of the CCM-PFC converter with the proposed digital control technique, which was simulated in PSIM software (Powersim, Rockville, MD, USA). The EMI filter was designed based on the design report of the 2.5 kW PFC analog converter from Infineon [29]. The digital control circuit of the PFC converter was implemented using DSP TMS320 F28335 with the DSP speed set to 150 MHz and the switching frequency of the pulse width modulation (PWM) generator to 100 kHz. In all sceneries of the current loop control, the voltage loop control was implemented using the PI controller. At the rated input of (220 Vrms, 60 Hz) and full load condition of P\({}_{\rm o}\) = 2500 W and Vbus = 400 V, Figure 24 shows the waveform of the inductor current (I\({}_{\rm Lb}\)) with the reference current (Iref) for the PI current controller. We observed distortion at the inductor current around the zero-crossing point due to the slow dynamic response of the PI controller and the failing of the inductor current (I\({}_{\rm Lb}\)) to track the reference current (I\({}_{\rm ref}\)). Figure 21: Block diagram of the designed isolated AC voltage sensor (V.S 1). Figure 22: Isolated AC voltage sensor voltage curves with input voltage of 220 Vrms. The distortion of the inductor current (I\({}_{\text{Lb}}\)) at the zero-crossing point caused current distortion in the supply current (I\({}_{\text{supply}}\)), as shown in Figure 25, from which we can observe the zero-crossing distortion (ZCD) period was about 1.45 ms at the supply current. The ZCD produced the sinusoidal shape of the supply current; the current waveforms were unable to follow the sinusoidal waveform of the supply voltage (V\({}_{\text{supply}}\)), as shown in the supply voltage-current waveforms in Figure 26.  
Figure 27 depicts the frequency spectrum of the supply current. The fundamental current at 60 Hz was about 16.58 A, and the odd harmonics (3, 5, 7,... ) were the dominant harmonics present in the supply current frequency spectrum. The third harmonic component was about 1.81 A, the fifth harmonic was about 0.95 A, and the seventh harmonic was about 0.47 A. The THD in the supply current was 19.49% under the full load condition. Figure 24: Waveforms of the inductor and reference currents with the PI current controller. Figure 25: Waveforms of the inductor and supply currents with the PI current controller. At the rated input of (220 V\({}_{\text{rms}}\), 60 Hz) and full load condition of P\({}_{\text{o}}\) = 2500 W and V\({}_{\text{bus}}\) = 400 V, the IP digital controller was applied in the inner current-control loop to remove the distortion around the zero-crossing point. Figure 28 shows the waveform of the inductor current (I\({}_{\text{LB}}\)) with the reference current (I\({}_{\text{red}}\)) for the IP current controller. The inductor current (I\({}_{\text{LB}}\)) was successfully able to track the reference current (I\({}_{\text{ref}}\)) and the ZCD significantly decreased. Figure 29 shows the waveforms of the inductor and supply currents with the proposed IP current controller, from which we observed that the ZCD period decreased from 1.45 ms with the PI controller to about 0.17 ms using the proposed IP controller in the inner current-control loop of the PFC boost converter. Figure 28: Waveforms of the inductor and reference currents with the proposed IP current controller. Figure 27: Frequency spectrum of the supply current at full load with the PI current controller. Figure 29: Waveforms of the inductor and supply currents with the proposed IP current controller. Figure 30 shows the input supply voltage and current waveforms under the full load condition and using the proposed IP current controller. The reduction of the ZCD period made the current waveform approximately sinusoidal in shape and the voltage waveform was successfully followed. Figure 31 depicts the frequency spectrum of the supply current using the proposed IP current controller in the inner current-control loop.