A Novel Three-Phase Harmonic Power Flow Algorithm for Unbalanced Radial Distribution Networks with the Presence of D-STATCOM Devices

: Due to the rapid advancement in power electronic devices in recent years, there is a fast growth of non-linear loads in distribution networks (DNs). These non-linear loads can cause harmonic pollution in the networks. The harmonic pollution is low, and the resonance problem is absent in distribution static synchronous compensators (D-STATCOM), which is the not case in traditional compensating devices such as capacitors. The power quality issue can be enhanced in DNs with the interfacing of D-STATCOM devices. A novel three-phase harmonic power ﬂow algorithm (HPFA) for unbalanced radial distribution networks (URDN) with the existence of linear and nonlinear loads and the integration of a D-STATCOM device is presented in this paper. The bus number matrix (BNM) and branch number matrix (BRNM) are developed in this paper by exploiting the radial topology in DNs. These matrices make the development of HPFA simple. Without D-STATCOM integration, the accuracy of the fundamental power ﬂow solution and harmonic power ﬂow solution are tested on IEEE − 13 bus URDN, and the results are found to be precise with the existing work. Test studies are conducted on the IEEE − 13 bus and the IEEE − 34 bus URDN with interfacing DSTATCOM devices, and the results show that the fundamental r.m.s voltage proﬁle is improved and the fundamental harmonic power loss and total harmonic distortion (THD) are reduced. basic concepts of circuit theory, and they can be easily understood. In this paper, the linear loads are modeled as a series combination of resistance and reactance, and non-linear loads are modeled as constant current sources with its magnitude and angle obtained from the current spectra. The harmonic current injections from the D-STATCOM are assumed as zero. The proposed FPFA and HPFA are tested on the IEEE − 13 bus URDN, and the results are found to be accurate with the literature. The test studies are carried on the IEEE − 13 bus and IEEE − 34 bus URDN, and the results of the case studies show thatthere is an improvement in the fundamental voltage proﬁle, a reduction in the fundamental and harmonic power loss, and a reduction in THD% with the integration of D-STATCOM devices.


Introduction
In terms of harmonics, the loads are classified into two types, linear loads and nonlinear loads. A linear load [1] is one which, when supplied by an AC source at fundamental frequency, can produce only fundamental AC currents. Non-linear loads, however, generate harmonic currents. The use of non-linear loads can inject harmonic currents into URDN. These harmonic injections can cause overheating of the equipment, insulation stress on winding in electric machines, added power loss in the equipment, and interference with the communication. Therefore, HPFAs are essential for finding the harmonic distortion level on URDN. In [2], based on current injection, graph theory, and the sparse matrix technique, a three-phase HPFA is proposed. The authors of [3] utilized the decoupled harmonic power flow (DHPF) algorithm to present the results of harmonic power flow calculations. In [4,5], a forward/backward-based HPFA for DN is proposed that considered the special topology of radial distribution networks (RDN). The authors of [6] developed an iterative time-dependent, computer-aided HPFA by combining the time-dependent cross-coupled harmonic model. To obtain this model, large data are received from the practical DNs. Tracing THD in secondary RDN with photovoltaic uncertainties by multiphase HPFA is discussed in [7]. The authors of [8] propose a new combined analytical technique (CAT) for HPFA in the presence of correlated input uncertainties from photovoltaic (PV) systems in RDN. In [9], static capacitors are allocated in shunt along RDN using a Cuckoo search optimization method. For allocating and sizing of capacitors optimally, a flower pollination algorithm is proposed in [10].In [11,12], a novel three-phase power flow algorithm for URDN with multiple integrations of distributed generations (DGs) and a D-STATCOM device is presented. In [13], an electrical energy management in unbalanced distribution networks using virtual power plant concept is presented. In [14], an efficient multi-objective optimization approach based on the supervised big bang-big crunch method for the optimal planning of a dispatchable distributed generator is presented. This approach aims to enhance the system performance indices by the optimal sizing and placement of distributed generators connected to balanced/unbalanced distribution networks. The optimal planning of distributed generators in unbalanced distribution networks using a modified firefly method is presented in [15].
The authors of [16] examine the utilization of D-STATCOM without a capacitor to compensate for power quality in DNs. The optimal D-STATCOM allocation in DNs is discussed in [17,18]. In [19], an optimal algorithm to control a three-phase D-STATCOM is proposed. This algorithm can give harmonic compensation as well as reactive power compensation in linear and non-linear loads, which are connected in three-phase. In [20], for minimizing the total real power loss in DNs with the interfacing of DGs, plug-inhybrid electric vehicles (PHEVs), and D-STATCOM, a genetic algorithm is proposed. A control technique is developed in [21] for D-STATCOM for extracting the fundamental weight components from non-sinusoidal load currents to produce grid reference currents. For harmonics elimination, the injection of reactive power and balancing of load, this D-STATCOM is developed. The D-STATCOM's performance is examined in different working modes. The combination of two problems such as the reconfiguration and interfacing of D-STATCOM can be solved by using the grey wolf optimization (GWO) method proposed in [22].
The proposed power flow algorithm (PFA) can give both fundamental and harmonic solutions. The solution of the fundamental power flow algorithm (FPFA) discussed in this paper is used in modelling the linear and non-linear loads for HPFA. The BNM and BRNM developed in this paper make the implementation of the PFA simple. The bus numbers and branch numbers of newly created sections of RDN are stored in BNM and BRNM, respectively. This paper is arranged in the following order. The network components' modelling is addressed in Section 2. The algorithm to develop BNM and BRNM is discussed in Section 3. In Section 4, the three-phase HPFA with the integration of the D-STATCOM device is discussed. Section 5 presents the test studies and discussions on the IEEE−13 bus and IEEE−34 bus URDN. Section 6 discusses the concluding remarks.

Network Components and Their Modeling
The URDN includes the main components such as lines, three-phase transformers, three-phase capacitor banks, and loads. These components are briefly modeled in this section.

Overhead or Underground Distribution Lines
With the Carson's equations presented in [23], the primitive impedance matrices for three-phase overhead and underground lines can be formed. For a grounded neural system, these matrices are reduced to phase impedance matrices of 3 × 3 size using Kron reduction. Figure 1 shows the three-phase distribution line model, and its shunt admittance is neglected due to its small effect. The phase impedance matrix for the line section 'jk' is given in Equation (1). From Figure 1, the relationship between the phase voltage matrices of bus-j and bus-k is given in Equation (2): The reactance of line is regarded as proportionate to the harmonic order for HPFA. For h-order harmonic frequency, the self-impedance of phase 'a' is given in Equation (3),

Loads
The phase current matrix and line current matrix serving the different types of threephase loads are outlined in Table 1. Detailed discussion on Table 1 is provided in [23].

Linear Loads
These loads produce only fundamental sinusoidal response upon supplied by sinusoidal source. The liner loads can be modelled in several ways [1]. Each model will show a different impact on harmonic analysis. The impedance modelling of these loads is taken as series combination of R and X.

Non-Linear Loads
With the harmonic spectrum of non-linear loads and their load current obtained from the fundamental power flow, these loads are modelled as constant current sources [24]. The magnitude of the current source is obtained with Equation (4), and its phase angle is obtained with Equation (5): The phase angle of the current source is obtained as: where: θ 1 : Phase angle of the rated current at fundamental frequency; θ h_spectrum : Phase angle of the harmonic source current spectrum.

Wye Connection Delta Connection
Phase voltage matrix and specified load matrix at bus.

Distributed Loads
Create a duplicate node at a distance of one-fourth the length from the sending end and connect a two-third of lode. At the receiving end one-third of load is connected.

Capacitor Banks
Modelling of the capacitor banks is presented in Table 2.
For HPFA, the capacitive susceptance (B) is to be multiplied with 'h' for 'h' order frequency.

Tree-Phase Transformer
The fundamental voltage and current relationships between the primary and secondary sides for different transformer connections are presented in [25]. The modelling of the three-phase transformers for HPFA is given in [24,26].

D-STATCOM
The D-STATCOM is commonly regarded as a shunt compensator which supplies reactive power in PFAs. The voltage magnitude at the D-STATCOM bus can be controlled by adjusting the reactive power injection of D-STATCOM.
The interface of the D-STATCOM at i th bus shown in Figure 2a, and its traditional modelling for PFAs is shown in Figure 2b. The specified reactive power of the load is combined with the reactive power output of D-STATCOM, so that reactive power varies as magnitude of V i varies. This is absolutely a PV bus modelling with the real power output of the D-STATCOM set to zero [27,28]. The hypothesis in this model is that losses in the D-STATCOM and its connection are ignored. The D-STATCOMs have low harmonic content, so the harmonic current injected by the D-STATCOM is considered as zero for HPFA.

Algorithm for Developing BNM and BRNM
The performance of the HPFA of URDN is enhanced by the systematic numbering of buses and branches. From [29], the numbering scheme to buses and branches is taken. The following steps are to be followed to write a Software Code in order to split the URDN into different sections, as shown in Figure 3.

3.
Increase the BN (i.e., BN = 2), and read the RE of BN, i.e., 3. Then, as in step 1, check for the appearance of 3 in SE row. The bus 3 appears two times. That means that, from the bus 3, two branches are leaving. Then, fill these RE 3 and BN 2 into the same variables as the first row and present the column elements. Name this row elements as section-I. Now increase the row number by one and set the column number to one.

4.
Similarly, increase the BN, and read the RE of BN. Then, check for the appearance of this RE in the SE row. If it appears one time, then fill these RE and BN values as the present row and present column elements of the variables BNM and BRNM. Then increase the column number by one and repeat step 4. If it does not appears or appears more than one time in the SE row, then fill the corresponding RE and BN values as present row and present column elements. Then identify this row as a section. Then increase the row number by one and set the column number to one and repeat the step 4.
The above steps are repeated until the BN value reaches the last branch number. At the end, the BNM and BRNM are obtained as follows:

Three-Phase HPFA with Non-Linear Loads and D-STATCOM Devices
For modeling the linear and non-linear loads for HPFA, the fundamental power flow solution is required. Hence, the algorithm consists of two parts. PartA illustrates the iterative procedure for FPFA with the D-STATCOM device and PartB illustrates the iterative procedure for HPFA with linear loads, non-linear loads, and D-STATCOM devices.
After developing the BNM and BRNM for the URDN, the iterative procedure is explained with the following steps.

1.
The voltages at all busses are assigned as substation bus voltage.
Find the line current matrix serving the load at all buses.

3.
Start with collecting line current matrix at bus−23 (the tail bus in section-VII in BNM), and thereby find the line current matrix for branch−22 (the tail branch in section-VII in BRNM). Then, continue to the bus−22 and branch−21 to find the line current matrix at the bus and line current matrix in branch, respectively. From Figure 4, the following equations are obtained by applying the KCL at every bus: Now go to section-VI and repeat procedure as in step 5 to find the line current matrix at the head bus and line current matrix for head branch. Similarly, proceed up to section-I and find the line current matrix up to bus−1 and line current matrix up to branch−1.

5.
Now start with head bus in section-I and continue to the tail bus in section-I by finding the phase voltage matrix at all buses with Equation (2). Then, go to the next section and repeat the same procedure. 6.
Steps 4 to 6 are to be repeated until the convergence criterion as given in Equation (14) is satisfied: where 'r' is the iteration number. 7.
D-STATCOM location is selected and model as PV bus for the outside γ th iteration. 8.
The mismatches in voltages at D-STATCOM buses are obtained with Equation (13): where [∆V] γ is the mismatch matrix for the voltage and its size is 3 · n × 1, and 'n' is the total number of PV buses. 9.
If the Equation (16) is not satisfied, then the incremental current injection matrix at D-STATCOM bus is calculated with Equation (17) to maintain the specified voltages: where [Z PV ] is the sensitivity matrix for the PV bus with its size 3 · n × 3 · n. The formation of this matrix is presented in [30]. 10. The incremental reactive current injection matrix at D-STATCOM bus is obtained with Equation (18): 11. In Figure 5, by applying the KCL at bus-j, the line current matrix in branch-ij is obtained as:  (20): The reactive power generation matrix needed at D-STATCOM bus-j is obtained with Equation (21): 12. If the D-STATCOM device is able to generate limited reactive power, then find the total reactive power generation of D-STATCOM device with Equation (22). The total reactive power generation of D-STATCOM is now compared with the maximum and minimum limits of reactive power generation of D-STATCOM device limits. Equation (22) is calculated as follows: If Q j,min ≤ (Q D ) γ j ≤ Q j,max Then set complex power generation is as in Equation (21)  where [P D,abc ] j is the specified real power generation matrix of the D-STATCOM device and its value is set to zero. 14. The line current matrix injected by the D-STATCOM is obtained with the complex power generation matrix obtained in Equation (23) and bus voltage matrix as: 15. Using the current injection matrix at the D-STATCOM buses, repeat from step 7 by setting γ = γ+1.
18. With the converged bus voltages and specified load, the impedances of the linear loads are calculated for the harmonic order-h of interest. 19. Find the harmonic current injection matrix for the non-linear loads for the selected h-order harmonic of interest. The harmonic current injection matrix of D-STATCOM is taken as zero. 20. The harmonic voltage at the substation bus is taken as zero since the supply voltage is assumed to bea pure sinusoidal voltage waveform. 21. The harmonic voltages at all other buses for the first iteration are assumed to be zeros as that of the substation bus: 22. Find the net harmonic current matrix at all the buses with the harmonic current matrix drawn by the linear loads and the harmonic current injection matrix of non-linear loads and the D-STATCOM device. The current matrix drawn by the linear loads at all the buses is zero for the first iteration as the harmonic voltage at all the buses is zero for the first iteration. This is illustrated with the sample section as shown in Figure 6. The net harmonic current matrix at bus-j is given by Equation (27), and the harmonic current matrix in branch-ij is given by Equation (28): [ID abc ] h j : Harmonic current injection matrix by D-STATCOM device at bus-j for harmonic order-h.
Likewise, the harmonic currents in all branches are to be obtained by moving up to the substation as explained in step 3 to step 4 in PartA for FPFA. (29) as explained in step 5 in PartA:

Then, start finding the harmonic voltages at all buses downstream from the substation bus with Equation
24. Repeat the steps 22 to 23 until the magnitude mismatch of harmonic voltages of h-order at all the busses is within the tolerance limit. 25. Find the harmonic power loss in all branches using Equation (30). Then find the total harmonic power loss in the network for the selected harmonic order-h using Equation (31):  (32) 28. The total r.m.s voltage at bus-i, say, phase 'a', is calculated as: 29. The total harmonic distortion at every bus is calculated using Equation (34):

Fundamental Power Flow Solution for Accuracy Test
The proposed three-phase FPFA is examined on IEEE−13 bus unbalanced test feeder without interfacing of D-STATCOM device. Figure 7 shows the IEEE−13 bus feeder and its data is collected from [31]. 5000 kVA and 4.16 kV are the chosen base values for this network. The FPFA is taken 5 iterations for its convergence with tolerance for convergence is 10 −4 . The comparison of obtained power flow solution with IEEE solution and errors in voltage magnitudes and phase angles at every bus are presented in Table 4. Table 5 presents the comparison of obtained power loss with the IEEE losses. Insignificant values of maximum errors of 0.0005 p.u and 0.010 o for voltage magnitudes and phase angles are observed in Table 6. So that, in terms of accuracy the test results are consistent with IEEE results.

Fundamental and Harmonic Power Flow Solutions without D-STATCOM
The regulator between buses 650 and 632 is removed and the capacitor banks at bus 675 and 611 are removed from the network. The data for the harmonic load composition and current spectra of harmonic loads aretaken from [32]. The convergence tolerance is taken as 10 −4 . Table 6 presents the harmonic power losses and total power loss of the network including fundamental and harmonic loss. The harmonic voltage solutions for the selected range of harmonics of order 3, 5, 7, 9, 11, 13, and 15 are presented in Table 7. Table 8 presents the fundamental r.m.s profile, the total harmonic voltage profile, and the THD %. It is observed from Table 8 that the maximum THD % on the network is 5.2263 at bus−611 for c-phase, and in [2], it was reported that the maximum THD % at bus−611 is 5.23. Therefore, the results of the proposed HPFA are almost matches the literature in terms of accuracy. To see the impact of the D-STATCOM on the fundamental r.m.s voltage profile, the total r.m.s voltage profile, the fundamental and harmonic power loss, and the THD %, the results of this case study are taken as benchmarks.

IEEE−13 Bus URDN with D-STATCOM
In this case, a three-phase D-STATCOM is integrated at bus 680. The D-STATCOM is modelled as a PV model with its real power generation set to zero and the lower limit and upper limit for the three-phase reactive power generation are 100 kVAR and 1000 kVAR, respectively. The phase voltages specified at this bus are 1 p.u. Table 8 presents the harmonic power loss and total power loss (including fundamental and harmonic power loss). In comparison with Table 6, it is observed that the integration of the D-STATCOM into the network reduces both the fundamental and harmonic power losses, thereby the total power loss in the network is also reduced. Table 9 presents the fundamental r.m.s voltage profile, the total r.m.s voltage profile, and the THD %.In comparison with Table 7, it is observed that there is an improvement in fundamental r.m.s voltage profile. The minimum fundamental r.m.s voltage in the network without D-STATCOM is 0.8651 p.uat bus−611 for c-phase, whereas its value is 0.8763 p.u at bus−611 for c-phase with integration of D-STATCOM. The maximum THD % in the network is reduced from 5.2263 to 5.1133 with integration of D-STATCOM. Figure 8 shows the comparison of THD % with and without integration of D-STATCOM. Figure 9 presents the comparison of fundamental r.m.s voltages on the network for the two case studies.

IEEE−34 Bus URDN
The date for the IEEE−34 bus URDN is taken from [31]. The base values selected for the system are 2500 kVA and 24.9 kV. The load composition at spot loads for harmonic analysis is presented in Table 10. The data for the current spectra of harmonic loads aretaken from [32]. The convergence tolerance for both fundamental and harmonic power flows is 10 −4 . The case studies on the network are presented in Table 11. The rating and location of the D-STATCOM device for Case2 is presented in Table 11. Table 12 presents the fundamental r.m.s voltage profile, the total r.m.s voltage profile, and the THD % for Case1. The test results of Case1 are used as a benchmark to see the fundamental and harmonic impacts of D-STATCOM on the network. The summary of results for the case studies is presented in Table 13. In Case2, which has integrations of two D-STATCOM devices, the maximum THD% is observed to be 5.2567 which is less than in Case 1. The number of phases effected with a THD% more than fiveis reduced from fourto twofrom Case 1 to Case 2. From Case 1 to Case 2, it is found that the minimum fundamental voltage on the network is improved from 0.7641 p.u to 0.8137 p.u at bus 890 for the a-phase.The fundamental power loss and the total power loss including harmonic loss of the network reduced in Case 2 in comparison with Case 1. Figure 10 shows the comparison of THD % with and without the integration of the D-STATCOM. Figure 11 shows the comparison of the fundamental r.m.s voltages on the network for the two case studies.  Load composition of spot loads as in Table 9 Case 2 (With D-STATCOM)

•
Three-phase D-STATCOM placed at bus 890 is modeled as PV bus with P = 0 and three-phase reactive power limits: 100 ≤ Q ≤ 500 kVAR. • Three-phase D-STATCOM placed at bus 650 is modeled as PV bus with P = 0 and three-phase reactive power limits: 100 ≤ Q ≤ 500 kVAR.

Conclusions
This paper proposes new three-phase PFAs for URDN with the presence of linear and non-linear loads and D-STATCOM devices. These PFAs can give both fundamental and harmonic power flow solutions with/without the presence of D-STATCOM devices. The developed BNM and BRNM make both the FPFA and HPFA simple. These matrices are developed by exploiting the radial topology in distribution networks. This method uses the basic concepts of circuit theory, and they can be easily understood. In this paper, the linear loads are modeled as a series combination of resistance and reactance, and non-linear loads are modeled as constant current sources with its magnitude and angle obtained from the current spectra. The harmonic current injections from the D-STATCOM are assumed as zero. The proposed FPFA and HPFA are tested on the IEEE−13 bus URDN, and the results are found to be accurate with the literature. The test studies are carried on the IEEE−13 bus and IEEE−34 bus URDN, and the results of the case studies show thatthere is an improvement in the fundamental voltage profile, a reduction in the fundamental and harmonic power loss, and a reduction in THD% with the integration of D-STATCOM devices.