**B. APF-Application Case**

In this case, the constructed inverter was experimentally used for APF application. That is, the control scheme was able to work as an APF only. The parameters used for the experiment can be seen in Table 3. In addition, the harmonic current term in Equation (2) was be included so as to be compensated by the MLI. The resulting PWM pulses were then sent to the IGBTs via the DS1202 board. The constructed MLI was controlled to only compensate the harmonic contents of the load currents, while the grid supplied the three-phase positive-sequence currents of the nonlinear load.

The values of the nonlinear load parameters were *RL*<sup>1</sup> = *RL*<sup>2</sup> = 48 Ω, and *XL*<sup>1</sup> = *XL*<sup>2</sup> = 154 mH. To allow the grid to feed power to the nonlinear load, the duty cycle of the DC-DC converter was kept constant at 0.3 (no MPPT is used). The DC-link controllers were successful in maintaining the DC-link voltages at reference levels, as seen in Figure 23. These voltages were measured via analog-to-digital converters by using voltage sensors and plotted in the control desk of the MicroLabBox.

**Figure 23.** The experimental DC-link voltages.

On the other hand, Figure 24 shows the experimental load currents measured by using Hall-effect current sensors. As seen in Figure 24, the load currents are not sine waves since they are highly distorted due to the nonlinear loads. As explained in the control scheme, the harmonic currents of the load were extracted from the load current so as to be compensated by the inverter. The experimental extracted harmonic load currents (the experimental currents of APF) are shown in Figure 25.

**Figure 24.** The experimental nonlinear load currents.

**Figure 25.** The experimental APF currents.

These harmonic currents were then used as a reference for the inverter currents so that the inverter compensated only these load current harmonics, and the grid supplied the nonharmonic currents. The experimental three-phase grid currents are shown in Figure 26.

**Figure 26.** The experimental three-phase grid currents.

The line currents and the grid voltages were out of phase, as revealed in Figure 27, so that the power factor was kept unified. The out-of-phase grid currents were due to the current sensors measuring the current from the grid to the load. On the other hand, the THD of the line currents was 4.8%, which had acceptable harmonic content of less than 5%, as defined by the IEEE-519 standard. The harmonic spectrum of the grid current, *ia*, is shown in Figure 28.

**Figure 27.** The experimental grid current and grid voltage.

**Figure 28.** Harmonic spectrum of the grid current *ia*.
