# Optimal Harmonic Mitigation in Distribution Systems with Inverter Based Distributed Generation
## 3 Optimization Algorithm and Electric Scheme Representation
### Electric Scheme and Single Tuned Filter Representation  
Considering a simple radial distribution system consists of six buses and has two nonlinear loads in buses 3 and 5 as shown in Figure 1. The nonlinear loads inject harmonic currents into the system. For each harmonic order, backward/forward load flow calculation is done with the same sequence of fundamental load flow, with considering the Substation voltage to be zero, all loads are considered to be constant impedance load, its impedance is calculated at the specified harmonic frequency. The imaginary part of the line section impedances between buses will be multiplied with the harmonic order, and every nonlinear load is represented by a constant impedance load in parallel with a current source. This current source injects current equals to the load current at normal frequency multiplied with harmonic ratio of this harmonic order as shown in Figure 2. Where \(r\) and \(x\) are the resistance and reactance of the line, \(r_{L}\) and \(x_{L}\) are the resistance and reactance of the loads, VS is the source voltage.  
Figure 1: Simple radial distribution system under a specified harmonic frequency.  
Figure 2: Filter representation as a constant impedance load in the system.  
The resonance that may occur after installing the filter may represent a problem while doing harmonic load flow due to the very low impedance (short circuit) of the filter-branch, especially at the tuned harmonic order. If the filter impedance is high, the filter will be modelled as a constant impedance load as shown in Figure 2. While, if the filter is in resonance case, it will be modelled as a constant current source with negative polarity (absorb constant current) as shown in Figure 3. The value of this current is calculated from the Thevenin equivalent circuit shown in Figure 4 as follow:  
\[i_{filter}=\frac{v_{th}}{z_{th}} \tag{15}\]  
where \(v_{th}\) is Thevenin voltage and \(Z_{th}\) is Thevenin equivalent impedance. The Thevenin equivalent phase impedance will be the sum of the phase impedance of each device between the system voltage source node and the point of the short circuit [34].  
The pass_band practical criteria presented in [16] is applied in determining if the filter in resonance mode or high impedance not. This pass_band practical criterion studied the effect of the single tuned filter parameters such as filter size (\(Q_{C}\)), quality factor (\(Q_{f}\)), and tuned frequency (\(t_{f}\)) on the filter performance. The analysis showed that the \(Q_{f}\) has a less significant effect than the \(Q_{C}\) and \(t_{f}\) on the impedance-frequency characteristics curve. Increasing \(t_{f}\) or \(Q_{C}\) makes the curve be flatter as shown in Figure 5. So the pass_band is defined as the band which contains the frequencies at which the filter impedance is very low compared with the system minimum impedance load \"if the filter impedance is lower than \(1/10\) of the system minimum impedance load\" [16]. This declares the concept shown in Figure 5 that the filter passband increases with increasing the filter capacitive reactive power and increasing the order of tuned frequency. For example, the 7 th order harmonic filter has more flatten impedance characteristics curve rather than that of the 5 th order filter, as shown in Figure 5a.  
Figure 4: Thevenin equivalent circuit of the system at resonance conditions.  
Figure 3: Filter representation as a constant current source in the system.