**A. Grid-Connected PV Application Case**

The system parameters used for simulation are shown in Table 1, while Table 2 shows the PV module parameters. The nonlinear load is disconnected from Figure 1. Therefore, no harmonic current term is applied in Equation (2). The reference reactive current of the inverter was set to zero to guarantee unity power factor. The proposed topology was used only to connect the PV modules to the grid. The perturb and observe (P & O) algorithm was used to extract the maximum power from the PV modules. The closed-loop control scheme shown in Figures 3 and 4 was used for grid-connection purposes.

**Table 1.** System parameter for simulation and experiment.


**Table 2.** The PV module parameters.


The generated three-phase voltages were measured across the primary windings of the transformers *T*1, *T*2, and *T*3. The number of voltage steps produced from the proposed MLI was 22, as shown in Figure 7. The three-phase currents injected into the grid can be seen in Figure 8. In addition, the harmonic spectrum of the line current, *ia*, is displayed in Figure 9. The total harmonic distortion (THD) of the grid current, *ia*, was 2.22%, which was less than the IEEE-519 standard limit of 5%.

**Figure 7.** The simulated three-phase generating voltage.

**Figure 8.** The simulated three-phase grid currents.

**Figure 9.** Harmonic spectrum of the phase a grid current.

The THD can be calculated according to the following equation:

$$THD = \frac{\sqrt{\sum\_{h=2}^{\infty} (I\_h)^2}}{I\_1} \tag{14}$$

where *h* is the harmonic order, *Ih* is the RMS value of the current at h order, and *I*<sup>1</sup> is the RMS value of the fundamental current.

As seen in Figure 9, the first harmonic bands appear with an amplitude of 0.2% at two times the fundamental frequency. Then the third, fifth, and seventh harmonic orders appear with amplitudes of 0.3%, 1.6%, and 1.5%, respectively.

#### **B. Active-Power-Filter Application Case**

The closed-loop control scheme shown in Figure 5 is used for APF applications. In this case, the harmonic current term in Equation (2) will be included to be compensated by the proposed MLI. The PV module parameters are shown in Table 2, while the system parameters are seen in Table 3. As discussed in the previous section, the proposed control scheme can be used for APFs only or it is able to work as an APF and integrate the PVs into the grid at the same time. These two scenarios are investigated.

**Table 3.** System parameter for simulation and experiment (APF application).


**Scenario 1: The control scheme is able to work as an APF only:**

In this scenario, the grid is responsible for supplying the balanced three-phase currents to the nonlinear load, and the proposed MLI is controlled to only compensate for the harmonic currents of the load. The values of the nonlinear load parameters were (*RL*<sup>1</sup> = *RL*<sup>2</sup> = 48 Ω, *XL*<sup>1</sup> = *XL*<sup>2</sup> = 154 mH). To allow the grid to supply the active power to the load, the duty cycle of the DC–DC converter was kept constant at 0.3 (no MPPT was used). The DC-link voltages were regulated to 40 V. Table 3 presents the system parameters that were considered during the simulation. The nonlinear load currents can be seen in Figure 10a, while the three-phase low harmonized grid currents can be seen in Figure 10b. It should be noted that the grid current flowed from the grid to the nonlinear load. As revealed in Figure 10b, the grid currents were balanced, and the nonlinear load did not affect the grid currents. On the other hand, the harmonic currents extracted from the nonlinear load currents can be seen in Figure 11a. These currents were the reference currents of the proposed MLI. As revealed in Figure 11b, the MLI currents followed the extracted harmonic currents of the nonlinear load. Figure 12 shows that the control scheme was successful in maintaining the power-factor unity. The grid currents are shown out of phase with the grid voltages because the grid current direction was from the grid to the load.

**Scenario 2: The control scheme is able to work as an APF and integrate the PVs into the grid at the same time.**

In this scenario, 24 PV modules were used to guarantee that the inverter supplies the nonlinear load currents and at the same time inject currents into the grid. Twelve PV modules were connected to the upper part of the proposed MLI such that two parallel PV modules were connected to each H-bridge cell. On the other hand, the other 12 PV modules were connected to the lower part of the MLI such that four parallel PV modules were connected to each VSI unit. The proposed control scheme will generate the reference inverter currents that equal the grid current and the nonlinear load currents. The MLI will supply the distorted nonlinear load currents and at the same time will inject currents into the grid with low distortion.

**Figure 10.** The simulated grid currents and the load currents.

**Figure 11.** The simulated harmonic load currents and the active power filter currents.

**Figure 12.** The simulated grid currents with the grid voltages.

Figure 13a shows the extracted harmonic currents of the nonlinear load. In addition, the actual MLI currents are seen in Figure 13b. As can be seen, the inverter currents were not a mirror to the load harmonic load current. The inverter currents contained the nonlinear load currents and the injected currents to the grid. Moreover, Figure 14a shows the nonlinear load currents while Figure 14b shows the grid currents.

**Figure 13.** (**a**) The extracted harmonic currents of the nonlinear load and (**b**) the MLI currents.

**Figure 14.** (**a**) The nonlinear load currents and (**b**) the grid currents.

As can be seen, the proposed control scheme succeeded in keeping the grid current in phase with the grid voltage, so that the power factor was kept unity, as seen in Figure 15.

**Figure 15.** The grid current and the grid voltage.
