The steady-state model consists of three main stages, which are the µG, the MBFSM algorithm, and the voltage control algorithm, as shown in
Figure 3a. The µG has a radial topology, which is one of the most used in distribution systems, and this is composed of a voltage source,
VG, that represents the utility grid and a set of elements connected through the line impedances (
ZL1,
ZL2, …,
ZLn). The voltages of the µG are numbered sequentially, starting from the closest one to
VG until reaching the last node (
Vs1,
Vs2, …,
Vsn). The physical location of an element is given by the subscript number of the node to which it is connected. These two actions allow for the homogenizing of the information and for the identifying of the elements that compound the µG. The µG contains critical loads (
Z1,
Z2, …,
Zn) and non-critical loads (
ZNC1,
ZNC2, …,
ZNCn). The critical loads are shunt connected with the SLs, and non-critical loads are series connected with the ESs. The DG is represented employing a set of current sources (
IREN1,
IREN2, …,
IRENn), where the subscript
REN means renewable energies. The ESs are modeled as a controlled voltage sources (
VES1,
VES2, …,
VESn) which modify their voltages based on their control variables (
m1,
m2, …,
mn).
3.1. Steady-State ES Mathematical Model
The dotted rectangle in
Figure 4 contains the elements and variables involved in the derivation of the ES mathematical model. This part corresponds to a general section of the circuit shown in
Figure 3a. There are three nodes involved in obtaining the model, which are indicated by different subscripts (
i,
j, and
k). The subscript
j represents the physical location of the ES, while
i and
k are used to indicate the neighboring nodes. The current contributions of all the elements connected to the PCC,
, are considered. It can be seen that the components connected to
are those that are usually included in the steady-state models, e.g., the critical loads
Zj and the SL. To increase the robustness of the model, the injection of active power into the PCC,
, and the effect of external disturbances associated with voltage variations,
, and current fluctuations
are included.
in the model involves the voltage variations attributed to
or the power variations at nodes that precede the location of the ES, and the impact on its operation.
corresponds to the current demanded by either the loads or other elements connected in the µG. On the other hand, when
is included, the effect of power variations on the rest of the network and the impact that they have on the operation of the ES are also included in the model.
A steady-state analysis is performed on the elements found within the dotted rectangle in
Figure 4 to obtain the ESs mathematical model. By applying Kirchhoff’s Voltage Law (KVL) between
and
, the following equation is obtained.
where
is the current that flows through the distribution line impedance,
ZLj. Applying a Kirchhoff’s Current Law (KLC) at the node
, the following expression is obtained,
where
,
, …, and
correspond to the currents in the critical load, non-critical load, the current delivered by the RESs, and the current demanded by other elements of the µG. The current
is expressed in terms of the voltage
and the impedance
Zj as follows:
By substituting Equations (9) and (10) in Equation (8), it is obtained that:
Expressing the active power delivered for the renewable energy source,
PRENj, in terms of
and
in polar form, it results that:
where
θsj is the phase angle of
and
is the conjugated of the current
.
From Equation (12),
can be represented in terms of the phasor
as given in Equation (13)
Equations (14) and (15) give the
and
phasors represented in polar form, respectively.
where
θjk is the phase angle of the current
.
Defining
α = θsj −
θjk, then
can be expressed in terms of
as shown in Equation (16)
Substituting Equations (13) and (16) in Equation (11), it results:
Now, defining
as follows:
equations can be expressed in a compact form by:
Additionally, by applying a KVL in the
node, the equation associated with the SL is given by:
Unlike other works, the proposed model and the calculation of geometric relationships among the electrical variables of the ES consider the load contributions in the PCC and the current contributions associated with external disturbances, as was shown in the approach to derive Equations (19) and (20). This model, unlike the one reported in [
23], is not obtained from an equivalent circuit of the electrical network, which increases its robustness. The geometric relationships of the model described in Equations (19) and (20) are illustrated in
Figure 5a,b. The phasors represent the Equation (19) in black color. This equation considers the voltage drop in
ZLj produced by the current
. This voltage drop is divided into two components related to the resistance,
RLj, and reactance,
XLj of
ZLj. The other term involves
, whose magnitude and phase are influenced by different parameters, as shown in Equation (18).
On the other hand, Equation (20) is represented for the blue color phasors in
Figure 5a,b. One term represents the voltage drop across the non-critical load
, having two components associated with the resistance,
RNCj, and reactance,
XNCj of
ZNCj, and the other term is linked with the ES operation mode. In inductive operation mode
is lagging
by 90
o degrees, as shown in
Figure 5a. In capacitive operation mode,
it is leading
by 90
o, as shown in
Figure 5b. The geometric relationships involve four angles. The angle
is measured from
to
, and the angle
is associated with the power factor of
ZLj. The angle
is measured from
to
, and finally,
is the angle between
and
.
When performing the analysis of the geometric relationships of the phasor diagrams in
Figure 5,b, the mathematical model described by the next Equations (21)–(29) is obtained. This model differs from that reported in [
23] in the calculation of
VG1 and
, while the rest of the geometric relationships remain unchanged. This fact is closely linked with the procedure to derive Equations (13) and (16), which allowed finding a connection between
and
. As a result, a model like the one expressed in Equations (19) and (20) is obtained.
It can be seen in Equations (21) and (22) that the magnitude of
VG1 and
depend on the impedances connected to the PCC (
ZLj and
Zj), the active power,
PRENj, the magnitude of the current
Ijk, the magnitude of the voltage on the PCC,
Vsj, and the angle α. Variations of any of these parameters will influence the calculation of their geometric relationships. Therefore, the modeling and implementation of the µG in simulation is not a trivial task. However, the BFSM provides an advantage in the implementation of the ES mathematical model. As previously mentioned, this solution technique starts at the node farthest from the µG and, employing the backward propagation, the voltages and currents are calculated until reaching the power supply. This advantage provided by BFSM allows the ES model to be implemented in any µG location without the need for additional restrictions. For instance, to calculate the geometric relationships of an ES connected to the PCC at node
Vsj, the BFSM provides the values of
and
. The rest of the terms are parameters and operating conditions of the PCC, which are known.
The angle
depends on the power factor of
ZLj as follows:
The ES operating conditions are defined by the parameter
mj, and this parameter takes values in the range of [−1, 1] and determines the magnitude of
Vsi and the angle
θ according to the following relationships.
The parameters
a and
b are used to simplify Equations (24) and (25). They are given by:
The magnitude of the ES voltage is calculated by Equation (28). If the non-critical load has a unity power factor, the second term of the equation is omitted. If it has a lagging power factor, the sign is negative, and if it is leading, the sign is positive.
The angle
is calculated by Equation (29)
It can be seen in
Figure 5a,b that the geometric relationships take as reference the phasor
. The reference was established to simplify the calculation of geometric relationships. However, it is necessary to calculate the exact value of the phase angle for the ES voltage,
θESj. This value is obtained by the Equation (30) and is calculated from
θSj. The value of
θSj is provided by the MBFSM in the backward propagation process. If the angle
θ takes a positive value, the ES operates in inductive mode; while for a negative value, the operating mode is capacitive.
In the same way, the phase angle for the voltage
Vsi,
θsi is calculated taking as reference
θSj in the next equation.
Finally, to calculate the current and continue with the backward propagation process, Equation (9) is used. The geometric relationships described in Equations (21)–(31), along with the MBFSM solution technique, allow analyzing the joint operation of RES and ESs distributed in the µG. MBFSM is an iterative process that calculates the steady-state solution of the µG until it converges or reaches a maximum number of iterations. The following subsection describes in detail the implementation of the solution algorithm and the proposed modification to the traditional BFSM.
3.2. Modified Backward–Forward Sweep Method
The BFSM has been extensively used for the steady-state solution of radial electric networks due to its accuracy and fast convergence. There are three variants in the method that depends directly on the type of electrical quantities used: (a) the current summation method, (b) the power summation method, and (c) the admittance summation method [
32]. The BFSM procedure is depicted in
Figure 6a. It starts with a flat solution in which the voltage at all nodes takes the same value. The backward sweep begins at the farthest node of the radial grid and moves toward the source node computing the currents or power flow in each branch. The forward sweep computes the voltage drop in the electrical grid from the currents or power flows calculated in the backward sweep. The nodal voltages are updated from the voltage source to the last node of the electric grid. During the forward sweep process, the currents or powers calculated in the backward sweep remains constant. The values calculated in the forward sweep correspond to the new voltage values used in the backward sweep for the next iteration. The convergence is reached when the mismatch voltage is less than the specified tolerance.
In this work, it is proposed to modify the traditional BFSM algorithm eliminating the forward propagation process. In general, two factors benefit the proposal and make its implementation viable. The first one is that in the backward propagation, the algorithm simultaneously calculates the currents and voltages at each node. The second one is associated with the proposed ES model, which was designed to operate in conjunction with the solution method. As was seen in the previous section, the model calculates the magnitudes and phase angles at both the PCC and the node that precedes it from the ES operating condition defined by the parameter mj. Therefore, it is possible to simultaneously calculate the currents and voltages at the nodes where the ESs are physically located, avoiding the need to implement the forward propagation step.
Figure 6b shows the flowchart for the MBFSM algorithm proposed in this work. This algorithm computes the solution for the proposed model (see
Figure 3a). The algorithm begins with the reading of the parameters (lines, load, and ESs) that conform to a µG. Then, the active power delivered by the current sources (
PREN1,
PREN2, …,
PRENx) and the operation conditions of the ESs (
m1,
m2, …,
my) are established. It is worth noting that different subscripts are used in order to generate a complete scenario; for instance, the subscripts
x and
y are used to indicate that the number of ESs and RES located in the µG may be different and not necessarily be equal to the number of nodes in the µG established by the subscript
n. The initial condition of the farthest voltage in the µG is assigned,
Vsn. It can be seen from the flowchart in
Figure 6b that forward propagation is omitted because, in the backward propagation, the currents and node voltages are simultaneously calculated until reaching the power supply,
VG. If a node, where an ES is located, is reached during the backward propagation process, the model presented in Equations (21)–(31) is employed to calculate the geometric relationships of the electrical quantities in the PCC. As the voltage
VG calculated in the backward propagation may not correspond to the real voltage of the power supply,
VGn, the output error,
ErrSal, is calculated as the absolute value of the difference between
VG and
VGn. If
ErrSal is less than a tolerance,
tol, the algorithm stops. The value assigned to
tol directly impacts the accuracy of the solution and execution time. The tuning of this parameter must be carefully done as it depends on the dimensions of the µG and the number of ESs and RESs. In this work, a value of
tol = 1 × 10
−12 was used, which was determined through an exhaustive experimentation. If the condition is not met, a new value of
Vsn is calculated for the next iteration. The new value of
Vsn is calculated by dividing the current value by an adjustment gain,
K. The gain
K is calculated by the ratio of the absolute value of
VG and
VGn. The process is repeated until the maximum number of iterations,
Niter, is reached, or the algorithm converges.
The MBFSM accurately provides the steady-state solution of the µG. This solution is calculated from the operating conditions of the ESs and the active power injected by each of the RES; therefore, it is possible to study the impact that DG has on µG. Another area of opportunity for the proposal is provided by the ability to establish the operating conditions of the ESs. These features allow analyzing the individual or joint operation of the ESs and developing global control schemes that face the challenges of modern electric power networks. In this sense, the following subsection explains in detail the voltage control scheme proposed in this work, which is in charge of regulating the operating conditions of multiple ESs distributed in the µG.
3.3. Voltage Control Algorithm Applied to Multiple ESs
Figure 7 depicts the flowchart for the voltage control algorithm of a group of ESs distributed in the electric grid. This algorithm controls the interaction of all the elements in
Figure 3a. The algorithm starts by initializing the operation conditions of all the ESs (
m1,
m2, …,
my) and their respective reference voltage (
Vs_ref1,
Vs_ref2,…,
Vs_refy). The magnitude of the active powers supplied for the current sources are established, which are kept constant until the algorithm converges (
PREN1,
PREN2, …,
PRENx). The algorithm computes the steady-state solution of the µG in each iteration using the MBFSM. Only the voltages of the nodes where the ESs are located are extracted from the steady-state solution (
Vs1,
Vs2, …,
Vsy).
The root mean square error, Err, is calculated from the Vsβ and Vs_refβ, where β =1,2, …, y. If Err is less than the tolerance, tolc, or the voltage magnitude of all ESs reaches its maximum value, Vmax, then the algorithm stops. Vmax is directly related to the magnitude of the voltage source on the DC bus. In one case of the two previous conditions is not fulfilled, it is necessary to modify the operating conditions of each one of the ESs. The following procedure applies to each situation individually. The ESs that reached their Vmax are identified, and their mβ are not modified in this iteration. For the ESs that did not reach Vmax, the sign is obtained from the subtraction (Vsβ − Vs_refβ). If the sign is positive, it means that the voltage Vsβ is higher than Vs_refβ; therefore, it is necessary to consume a higher amount of reactive power to decrease the voltage at node Vsβ, which is achieved by increasing mβ, having as a limit a maximum value of 1. Otherwise, mβ must be reduced to a minimum value of −1. This action is associated with an increment in the reactive power injected by the ES. The process is repeated until the solution converges or the maximum number of iterations has been reached.
Once the µG voltage control and the solution algorithms have been implemented, it is necessary to validate the ES model under different operating conditions. In the next section, the obtained results for the proposal are presented.