*2.2. Switching Harmonics*

Switching harmonics is one other cause of current harmonics in BESS/PVDG inverter output. It occurs due to a mismatch in thee generation of switching pulses. The switching harmonics in PWM inverters always double their switching frequency [40,41]. Switching harmonics are very difficult to control and require an appropriate control strategy and optimized BESS/PVDG units; otherwise, system instabilities, harmonic generation and power losses ensue [32,42,43]. Various researchers have presented different methods to control or eliminate the switching harmonics of BESS/PVDG inverters [40,44,45].

Other research works maintained that the effects of quantization and resolution on control systems' measuring instruments are another potent source of harmonics in BESS/PVDG systems [44,46]. Also listed are the inadequacies of the current controllers of inverters in reducing harmonic contents and the positioning of sensors and locations of BESS and PVDG units in the distribution networks [47–49]. The outer voltage control loop of a twoseries control algorithm and the PLL system could be another cause of reference current harmonics. In addition, output current harmonics could emerge from the dead time for switching pulse of the BESS/PVDG inverters [32,43].

#### *2.3. Grid Voltage Harmonics*

The BESS/PVDG inverter output current is produced due to the variation between the inverter's AC output voltage and the distribution network voltage. The output current harmonics are generated from the grid voltage when the grid voltage waveform includes harmonic components. The field measurements and research literature revealed that the grid voltages consistently have harmonics in varying degrees at different locations of the network [7,31,42,43]. For example, Figure 2a,b show the measured individual voltage harmonics up to the 31st order for one PVDG inverter at phase B of the grid and the combination of one PVDG and one BESS inverter for harmonics up to order 25 at phase B [31]. Grid voltage harmonics are usually low orders and are very difficult to annihilate by the filters. Numerous methods have been presented to control current harmonics generated from the grid voltage harmonics [50–53]. Du et al. [43] stated that the current harmonics sourced from grid background voltage do not depend on the magnitude of inverter output power. The grid voltage harmonics only reflect the magnitude of output current harmonics [43].
