2. Mathematical Formulation
In this mathematical formulation, two objective functions are employed which aim for reducing the energy losses and CO
2 emissions in GCNs. Furthermore, this section describes all of the constraints related to the technical limitations of the devices that make up the grid, as well as the operation limits associated with voltage profiles and line currents.
The first objective function used in this paper corresponds to the reduction of the energy losses related to energy transport in the GCN, which is presented in Equation (
1). Here,
and
represent the periods of time contained in the horizon under study and the total of nodes that make up the GCN, respectively. Furthermore,
and
are the magnitude and angle of the admittance of the line that interconnects nodes
i and
j, respectively.
and
are the voltage profile magnitudes of buses
i and
j, while
and
are their angles, respectively. Finally,
is associated with the duration of each period of time (1 h for this work).
As it could be appreciated in Equation (
1), this mathematical formulation does not implicitly include the variables associated with the power supplied by the BS. However, the effect of the location and operation of these devices is considered in the nodal voltage profiles included in the equation.
Equation (
2) describes the mathematical formulation proposed to represent the second objective function, i.e., the reduction of
emissions generated by the power supplied by the conventional and distributed generators located in the grid. In this equation,
and
are the binary variables, which take a value of 1 if a conventional or distributed generator is located at bus
i, respectively; otherwise, they take a value of 0.
and
are the power supplied by the conventional and distributed generators at bus
i in the hour
h.
and
are the emissions factors for the two generation technologies considered in this work.
is a variable that represents the behavior of the distributed generator installed at bus
i in the hour
h. This factor is in p.u. and changes every hour as a function of the technology used and the potential of the renewable energy in the region where the DG is located. In this objective function, the variables associated with the problem of integrating BS in the GCN are implicit.
The BS optimal integration problem is composed of multiple technical and operating constraints, which apply for all buses in the GCN and the period considered in the time horizon analyzed.
The first constraint is associated with the the active power balance in the electrical network. In this equation,
is a binary variable that takes the value of 1 or 0 if a battery is located or not at bus
i, respectively, while
is the active power supplied or demanded by the BS located at bus
i in the hour
h.
Equation (
4) ensures the reactive power balance in the grid. In this equation,
and
are, respectively, the reactive power generated and demanded by the conventional generators and loads located at bus
i in the hour
h. By analyzing this equation, it can be noted that this work does not consider the injection of reactive power by the distributed generator and batteries located in the GCN.
The maximum (
) and minimum (
) power to be supplied by the conventional generator located at bus
i are modeled in Equation (
5).
The reactive power limits associated with the conventional generators are presented in (
6), where
and
denote the minimum and maximum reactive power to be supplied by these generators, respectively.
Equation (
7) represents the power limits of the distributed generator located at bus
i in the hour
h. In this equation,
and
denote the minimum and maximum power, respectively, which are a function of the technology and renewable potential in the region where the generator is located.
The power in the batteries of the electrical system is controlled by Equation (
8). The maximum charge and discharge powers are limited by
and
. To calculate these values, Equation (
9) and (
10) are used, where
is the nominal power capacity of the BS located at bus
i, while
and
are the charge and discharge times, respectively, required by the battery type, which is related to the BS technology.
Equation (
11) allows calculating the state of charge at the hour
h of the battery located at bus
i (
). This equation requires the state of charge of the previous hour (
), the charging coefficient of the battery located at bus
i (
), the power supplied or stored by the same battery at the hour
h (
), and its time of charge or discharge, (
). To calculate
, Equation (
12) is calculated, which is expressed in terms of the previously described parameters. On the other hand, Equations (
13) and (
14) define the initial (
) and final (
) state of charge of the battery located at bus
i.
Finally, with the aim to integrate the operating constraints of the electrical distribution system, the mathematical formulation includes Equations (
15) and (
16), which ensure that the voltage profiles and the current that flows through the lines are within the technical limits set by the electrical operator and the manufacturer. In these equations,
and
correspond to the minimum and maximum nodal voltage at bus
i, respectively, while
and
are the current flowing through the line that interconnects nodes
i and
j, respectively, whose maximum level is set during the design of the electrical network.
4. Test Scenarios and Considerations
Figure 4 presents the electrical diagram of the GCN used in this work.
Table 1 describes the electrical parameters of the test system regarding line and power demand capacity. This table presents, from left to right, the line number
l, the sending bus
i, the receiving bus
j, the resistance and reactance of the line that interconnects buses
i and
j, the active and nominal power demanded at bus
j, and the maximum current allowed by each line considered. Furthermore, for the voltage profile limits, this paper follows the Colombian electrical regulations for electrical distribution networks, which stipulates a bus voltage variation of +/− 10% of the main generator’s nominal voltage [
36]. In this particular case, the nominal and base voltage is 12.66 kV, with a base power of 100 kW.
In this figure, it can be noted that this work proposes a modified version of the 33-bus test system, which is highly used in the literature to validate planing and operation strategies in electrical distribution networks [
37,
38,
39]. The test scenario employed considers the power energy solar production, power demand, and CO
2 emissions from conventional generators (electrical grid) of the city of Medellín (Colombia), as well as PV-DGs and three different kinds of lithium-ion batteries (types A, B, and C), with different power capacities and charge and discharge times [
27]. Lithium-ion batteries are a type of rechargeable battery which uses the reversible reduction of lithium ions to store energy. They are highly used in the literature because they have a higher energy density, a higher efficiency, and a longer useful life. Traditional lead acid batteries allow 1500 life-cycles, while lithium battery technology offers a duration of up to 2500 [
40].
In the test system used, the PV-DGs were located at buses 13, 25, and 36, with nominal power capacities of 1.125, 1.320, and 0.999 MW, respectively [
29]. The behavior of the solar energy production and power demand of Medellín was taken from [
23]. In the particular case of PV generation, the temperature and solar radiation data reported by NASA [
41] were used, as well as technical data on the polycrystalline PV panels, in order obtain a curve that represents the average behavior of the solar production in an average operation day (see
Figure 5a). Furthermore, this study obtained a power demand curve that represents the average behavior of the users in Medellín by using power demand data reported by the local operator, Empresas Públicas de Medellín, [
42] (see
Figure 5b). All of the data used to elaborate these curves correspond to 2019. This year was selected with the aim to eliminate the effect of the COVID-19 pandemic on power consumption.
This work considered three kinds of lithium-ion batteries, denoted with types A, B, and C.
Table 2 describes the technical parameters of the BS employed. It presents, from left to right, the type of BSS, the nominal capacity in kWh, and the charge and discharge time in hours. With these values and the equations presented in
Section 2 of this manuscript, it is possible to obtain all parameters for the operation of the batteries [
18]. As the maximum and minimum SOC for these batteries, the following limits were set for the lithium-ion batteries [
17]: 0.1 (10%) and 0.9 (90%), respectively. Finally, to obtain the best performance out of the BS, an initial and final state of charge of 0.5 (50%) was used, following the suggestions made in [
31].
Finally, in order to calculate the CO
2 emissions associated with the generators located in the grid, this work considered 0.1644 kg of CO
2 per kWh as the emissions factor for the conventional generators, as well as a value of 0 kg of CO
2 per kWh for the PV-DGs, as this kind of generator does not emit greenhouse gases or release carbon-based pollutants when producing energy [
43]. The authors of this paper acknowledge the environmental impact of constructing PV modules, just as well as the fact that this technology does not affect environmental conditions when used for generating energy.
5. Simulation Results
This section presents the simulation results obtained after evaluating the master–slave methodologies proposed for solving the problem regarding the optimal integration of BS in GCNs with the aim to reduce energy losses and CO2 emissions. All simulations were carried out in the Matlab 2023 software, on a Dell Workstation with an Intel(R) Xeon(R) E5-1660 v3 3.0 GHz processor, 16 GB DDR4 RAM, and a 480 GB 2.5″ solid state hard drive, with 8 workers running on Windows 11 Pro. All simulations were executed 1000 times in order to evaluate performance in terms of the average solution and processing times, as well as regarding the standard deviation.
Table 3 presents the minimum solutions (i.e., the highest reduction in the objective function) and the average reductions achieved by the three different master–slave methodologies, as well as the standard deviation and the average processing times.
To analyze the impact of the master–slave strategies on the GNC, the energy losses and CO
2 emissions were analyzed without considering the BS installed in the grid. Thus, the base scenario involved variable power demand and the PV distributed generators operating in maximum power point tracking (MPPT) mode (
Figure 5). This scenario obtained values of 2484.5746 kWh for energy losses and 9887.4082 kg of CO
2 (9.88 Ton) for the CO
2 emissions.
Figure 6a compares these values against those of the PMC, PDGA, and PDCSA. This figure presents the minimum and average reductions obtained by the solution methodologies for both objective functions with regard to the base case. Note that all solution methods reduce the objective functions. In the particular case of
Eloss, a minimum reduction of 130.0287 kWh was obtained, while the average reduction was 117.5107 kWh (5.2334% and 4.72961%, respectively). These reductions are significant for the GCN; in order to highlight their importance, note that they imply a reduction of 42.8914 MWh for a year of operation.
The obtained emissions reductions are presented in
Figure 6a. In the particular case of the minimum emissions, the master–slave strategies obtained an average a value of 22.6818 kg of CO
2. The average reduction in this environmental index (after 100 executions) was 20.2162 kg of CO
2. With respect to the base case, these values correspond to reductions of 0.2294% and 0.2044%, respectively. As in the case of the
, considering a year of operation, the optimization methods would achieve a total reduction of 7.37 Ton of CO
2 on average, thus demonstrating the environmental importance and effectiveness of the integration, selection, and smart operation of BS in GCNs.
Finally,
Figure 6b presents the standard deviation and the processing times required by the solution methodologies. In terms of the former, average values of 0.3220% and 0.0112% were obtained for
and
, respectively. These values demonstrate the repeatability of the methodologies under study. In terms of the processing times, average times of 6792.9204 (
) and 7440.969347 s (
) were obtained. These processing times are short given the complexity of the problem and its large solution space, and these values show the importance of the matrix hourly power flow used for calculating the objective functions and constraints in all evaluated scenarios.
Figure 6 highlights, in blue and red, the methods with the best and worst performance, respectively. By analyzing this figure, it is possible to appreciate that, in all indicators, the PMC achieved the best results, which makes it the best solution method among those analyzed in this study.
Figure 7 illustrates the improvements obtained by the PMC when compared to the other solution methods.
Figure 7a presents the reductions obtained by the PMC with regard to the minimum objective function values, i.e., 5.8054% and 5.8977% when compared to the other solution methodologies. Furthermore, the PMC achieved reductions of 6.8467% and 3.4328% in the average
and
, respectively. By analyzing the standard deviation, it is possible to calculate average reductions of 36.8430% and 21.2350% in
and
. Finally, the PMC is the fastest solution method, as its processing times for calculating the
and
were reduced by 99.3982% and 99.4618%, respectively, thus demonstrating the superiority of the PMC with respect to the PDGA and the PDCSA.
Finally, with the purpose of demonstrating that the PMC satisfies all technical and operating limits set for the GCN located in Medellín,
Figure 8,
Figure 9 and
Figure 10 are presented. It is important to highlight that all master–slave strategies in this paper satisfy the technical and operating constraints associated with a GCN in an environment of DERs. However, this article only describes and analyzes the technical and operating behavior of the PMC, as explaining the performance of the other methods would require a lot of unnecessary information. Furthermore, in future works, comparisons should only be made with the most efficient method, which is the PMC.
Figure 8 describes the dynamics of the state of charge of the three BS integrated into the GCN, considering an average day of power demand and PV generation in Medellín. It is important to highlight that, following the suggestions made in [
31] for obtaining the best performance of the batteries, all BS start and finish with 0.5 (50%) of the SOC.
Figure 8a illustrates that, for
, BS were installed at buses 12, 13, and 29 (types B, A, and C, respectively). Note that the behavior of the power supplied is similar for all three batteries, with low dynamics in the first hours, complete charging before hour 17—when the power demand of the system increases—and maximum demand on hour 20. The battery installed at bus 12 supplies energy until it achieves the final state of charge (50%), the battery at bus 13 achieves the final SOC on hour 24, and the one at bus 29 supplies energy until hour 23, starting its charging process until the last hour of the horizon, when it achieves the final SOC. Note that, according to this figure, all BS satisfy their maximum and minimum SOC of lithium-ion batteries: 0.1 (10%) and 0.9 (90%), respectively.
The operation of the BS regarding the reduction of CO
2 emissions is illustrated in
Figure 8b. In this case, the BS were located at buses 25, 30, and 10 (all of them type A). The batteries follow the same dynamics: they start at 50% SOC, discharging all batteries until hour 9. They start the charging process from this hour until hour 16, and they discharge until hour 24, achieving the final SOC (50%). The batteries satisfy the state-of-charge limits at all times.
Finally,
Figure 9 and
Figure 10 present the line currents and voltage profiles for the different operation hours. By analyzing the current limits, it is possible to note that the maximum line current limits are satisfied at all times. In the same way, all voltage profiles are within the voltage limits set for the GCN (+/− 10% of the nominal voltage: 1 p.u.).
The above demonstrates that the solution obtained by the PMC with regard to the objective functions satisfies all operating and technical constraints of the mathematical model for the problem studied herein.
6. Conclusions and Future Work
This work formulated the problem regarding the optimal integration and operation of BS in GCN in order to reduce energy losses and CO2 emissions. As solution methods, three different master–slave methodologies were proposed. In the master stage, the PMC, PDGA, and PDCSA were employed for selecting and locating three different BS types in a GCN. Furthermore, the slave stage used PSO for the operation of the batteries, as well as a matrix hourly power flow to calculate the objective functions and evaluate the technical and operating constraints involved in the mathematical formulation. Finally, with the aim to identify the solution methodology with the best performance, each algorithm was executed 1000 times, analyzing the best and average solutions, the standard deviation, and the processing times. The 33-bus test system was used for validation, which was adapted to represent the power demand and PV power generation of the city of Medellín (Colombia). This city constitutes an excellent test scenario, given its high energy losses and CO2 emissions levels, as well as its excellent conditions for PV generation (this kind of renewable energy is widely used in the city). In this paper, the PV-DGs were considered to operate in maximum power point tracking mode, with the aim to make the best out of this resource.
All methods achieved excellent results in terms of solution quality and processing times. The master–slave strategies obtained average reductions of 4.72% and 0.20% regarding energy losses and CO2 emissions for an average operation day, respectively. These reductions are equivalent to 42.89 MWh and 7.37 Ton of CO2 in a year of operation. These values are significant for the operation of grid-connected electrical distribution systems, as they imply commercial and environmental benefits. In addition, the proposed solution methodologies reported a low standard deviation, with average values of 0.3220% and 0.01124% for energy losses and CO2 emissions, respectively. Moreover, in a problem as demanding as the integration of BS in GCN, the implementation of a matrix hourly power flow based on successive approximations allowed reducing the processing times by about 68%, with values of 6792.92 and 7440.969347 s regarding energy losses and CO2 emissions. With this information, it can be concluded that these strategies allow solving the problem regarding the selection, location, and operation of multiple BS in a GCN in about 2 h, which allows electrical operators to evaluate multiple generation and demand scenarios, as well as different electrical systems, in reduced times, which is very important for public bidding processes.
The above demonstrates that all master–slave strategies are suitable for solving the problem under study. However, the PMC was the best solution methodology in terms of solution quality, repeatability, and processing time, for which it obtained average reductions of 5.13%, 29.03%, and 99.42%, respectively.
The main limitation associated with the proposed methodology corresponds to the implementation of single-objective optimization algorithms, which is why a multi-objective analysis is not possible. However, the proposed methodologies obtained the best results regarding the reduction of energy losses and CO2 emissions.
Future work could consider the implementation of new optimization methods that allow improving the results reported in this paper. Furthermore, it is possible to include variations in the power supplied by the PV generators, with the aim to achieve the best solution quality. This, while allowing for the relocation of PV generators in the GCN. In addition, other kinds of distributed energy resources could be included, such as capacitors and reactive static compensators, among others, with the aim to increase the reductions in energy losses and CO2 emissions. Finally, the mathematical formulation could include economical indicators with regard to the cost of the BS, by using multi-objective functions that consider the improvement of technical, economical, and environmental indicators.