## 2 Mathematical Formulations
### Formulation for the Iterative-Based Load-Flow Solution  
Although DG offers a range of positive effects such as lowering operating costs, improving the general network system and reducing expenses for further expansion, if analyses for optimal sizing and location are not carried out, instability in the voltage network may occur. The problem of optimizing DG location and sizing in a distribution network does not really exist in practice since most DGs are not owned by utilities and are mostly stand-alone systems. Traditionally, different meta-heuristic methods, which are basically iterative in nature, have been deployed in locating the optimal sites and sizes of the DG required for improving the integrity of a system. The most commonly used meta-heuristic method is particle swarm optimization (PSO) due to the various advantages it offers [7; 10; 11; 12; 13]. In applying the particle swarm optimization (PSO) algorithm, the voltage criterion in finding the optimal placement is given as  
\[V_{c}\ =\ \frac{(V_{i}\ -V_{min})\times(V_{max}-V_{i}\ )}{(V_{min}-V_{min}) \times(V_{max}-V_{nm})} \tag{10}\]  
where \(V_{nm}\) is the nominal voltage, \(V_{max}\) represents the maximum voltage and \(V_{min}\) is the minimum voltage. Also, \(V_{i}\) represents the bus voltage. The instability of the voltage is capable of causing blackouts. So, the voltage criterion can be further defined using the voltage index:  
\[V_{ind}=\frac{1}{N}\sum_{i=1}^{N}V_{c} \tag{11}\]  
The reactance-to-resistance ratio (\(X/R\)) for the transmission network is larger than the (X/R) ratio for the distribution system due to the longer distance and inductance of the transmission line; therefore, the values of resistance in the distribution networks are high. Factoring in distance, a two-bus distribution system model showing the sending end voltage and receiving end voltage can be used with resistance to show how voltage drop influences variations in voltage profiles. As voltage regulation is the measure of change in the voltage magnitude between the sending and receiving end of the component, this obtained measurement will vary with the interconnection of DG. So, the sending end voltage can be written as  
\[\hat{V_{S}}=\hat{V_{R}}+\hat{I}(R+jX) \tag{12}\]  
\[P+jQ=\hat{V_{S}}\hat{I^{*}} \tag{13}\]  
\[\hat{I}\ =\frac{P-jQ}{V_{S}} \tag{14}\]  
Substituting (14) into (12), the sending end voltage becomes  
\[\hat{V_{S}}=\hat{V_{R}}+\frac{P+jQ}{V_{S}}(R+jX) \tag{15}\]  
\[\hat{V_{S}}=\hat{V_{R}}+\frac{RP+XQ}{\hat{V_{S}}}+j\frac{XP+RQ}{\hat{V_{S}}} \tag{16}\]Hence, (15) can be used to express the voltage drop, which is the change between \(V_{S}\) and \(V_{R}\). Then, the voltage drop is expressed as  
\[\Delta\hat{V}=\hat{V_{S}}-\hat{V_{R}}=\frac{RP+XQ}{\hat{V_{S}}}+j\frac{XP+RQ}{ \hat{V_{S}}} \tag{17}\]  
since the angle existing between the sending end voltage and receiving end voltage is quite small, say zero. Then,  
\[\hat{V_{S}}=|V_{S}|=V_{S} \tag{18}\]  
Therefore, the voltage drop is  
\[\Delta V\ \approx\frac{RP+XQ}{V_{S}} \tag{19}\]  
from which  
\[V_{ind}=\frac{1}{N}\sum_{i=1}^{N}V_{c} \tag{11}\]0  
Alternatively,  
\[V_{ind}=\frac{1}{N}\sum_{i=1}^{N}V_{c} \tag{11}\]1  
where \(V_{d}\) represents the voltage drop, \(I\) represents the current, \(L\) is the length and \(V_{c}\) represents the voltage drop per ampere-meter length of the circuit. Backward/Forward Sweep Load-Flow Analysis  
Traditional algorithms like Newton-Raphson or Gauss-Seidel can be used to find analytical solutions for transmission systems. Among the two, the Newton-Raphson method is characterized by good quadratic convergence and is independent of system size. High accuracy is obtained nearly always in two to three iterations. But, when dealing with radial networks, the Newton-Raphson method becomes inefficient due to a high R/X ratio, with radial network data producing sparse matrices, which tends to elongate the process [38]. So, with this, the backward/forward sweep method has more advantages and is better for use in radial networks.