*3.3. The Load Flow Problem*

The basic tool for electrical system analysis is the load flow, which was used to determine the performance of the system. The load flow involves finding the node voltages, line currents, and system losses that are necessary for optimizing network planning, the process of which involves repeating the load flow for multiple iterations. In the application of optimization, the efficiency of the load flow technique was considered.

The classification and comparison of load flow techniques were addressed by [30]. The popular backward-forward sweep (BFS) approach was used to determine the performance indices in the proposed study [31].

A distribution line illustrated in Figure 2 shows the effective active power *Pi* and reactive power *Qi* flowing in branch *j* through line resistance *rj* and reactance *xj* from node *i* to node *i* + 1.

**Figure 2.** Series impedance line and bus model.

The active and reactive powers can be calculated by Equations (15) and (16):

$$P\_i = P\_{T, i+1} + r\_j \frac{(P\_{T, i+1}^2 + Q\_{T, i+1}^2)}{V\_{i+1}^2} \tag{15}$$

$$Q\_i = Q\_{T,i+1} + x\_j \frac{(P\_{T,i+1}^2 + Q\_{T,i+1}^2)}{V\_{i+1}^2} \tag{16}$$

where *PT,i*<sup>+</sup><sup>1</sup> and *QT,i*<sup>+</sup><sup>1</sup> are the total active and reactive power at node *i* + 1, as formulated in Equations (17) and (18) without including both the EVCS and PV.

$$P\_{T,i+1} = P\_{i+1} + P\_{i+1}^L \tag{17}$$

$$Q\_{T,i+1} = Q\_{i+1} + Q\_{i+1}^L \tag{18}$$

Considering both EVCS and PV implementation in the system, the total power equations are modified into Equations (19) and (20).

$$P\_{T,i+1} = P\_{i+1} + P\_{i+1}^L + P\_{i+1}^{\text{EVCS}} - P\_{i+1}^{\text{PV}} \tag{19}$$

$$Q\_{T,i+1} = Q\_{i+1} + Q\_{i+1}^L \pm Q\_{i+1}^{\text{EVCS}} \pm Q\_{i+1}^{\text{PV}} \tag{20}$$

The magnitudes and phase angles of the voltages at each bus are calculated using Equations (21) and (22).

$$V\_{i+1} = \sqrt{\left[V\_i^2 - 2\left(P\_i r\_j + Q\_i x\_j\right) + \left(r\_j^2 + x\_j^2\right)\frac{P\_i^2 + Q\_i^2}{V\_i^2}\right]}\tag{21}$$

$$\delta\_{i+1} = \delta\_i - \tan^{-1}\left(\frac{Q\_i r\_j - P\_i \mathbf{x}\_j}{V\_i^2 - \left(P\_i r\_j + Q\_i \mathbf{x}\_j\right)}\right) \tag{22}$$

The total load *Si* on the main bus *i* is calculated using the bus voltage *Vi* and the outgoing feeder currents *Ii* by:

> *Si*=*ViI* ∗ *<sup>j</sup>* (23)
