1 Introduction

In recent times, direct current (DC) grids have aroused particular interest due to their advantages over alternating current (AC) networks in terms of efficiency and controllability, as a DC grid allows eliminating frequency and reactive power issues, thus reducing the complexity of the system [1]. Furthermore, most renewable energy elements and battery systems operate directly in DC, considerably reducing the presence of power electronics in the grid [2].

DC grids can be designed with a monopolar structure that consists of two wires (positive and neutral pole) [3], or with a bipolar structure that consists of three wires (positive, negative, and neutral). The latter is an evolution of the former that can handle transfers involving twice the power but requires higher investments when compared to monopolar configurations [4].

The control of monopolar DC grids has been discussed in the specialized literature both from a dynamic perspective and upon the basis of steady-state analysis [5]. Studies on bipolar low-voltage DC grids (LVDC) have been mainly discussed from a dynamic perspective. For example, the authors of [6, 7] analyzed these systems’ behavior while seeking to control voltage imbalances, and the work by [8] analyzed bipolar LVDCs by breaking down the asymmetrical behavior into a positive and negative sequence. However, from a steady-state perspective, this subject has been poorly developed. In order to analyze the steady state, it is essential to develop an optimization model which aims to operate the grid in the best way possible according to an economic or technical objective. This optimization model is called the optimal power flow (OPF) [9].

The mathematical model for the OPF needs to be simple, reproducible, and fast enough to be implemented in real-life situations [10]. However, the OPF corresponds to a set of algebraic equations that are nonlinear and non-convex. The primary source of non-convexity in the OPF is a set of constraints related to the power balance, i.e., power flow equations or power balance equations. Therefore, several methods for solving the power flow in monopolar DC grids have been proposed in the literature [11], whereas few models for bipolar grids have been developed. For example, the authors [12] proposed a successive approximations approach, which is nonlinear and non-convex. The work by [13] extended the triangular method discussed for monopolar DC grids. Unfortunately, this method only applies to radial grids. The authors of [14] proposed a power flow considering current limits in the converters, and the study by [15] proposed a current injection technique based on the Newton–Raphson method, with significant issues regarding the calculation of the Jacobian matrix and its inverse in each iteration.

The OPF problem corresponds to a nonlinear optimization model whose solution is very complex. Moreover, it is executed in the order of minutes, requiring properties related to convex optimization (a global optimum, the uniqueness of the solution, and a fast convergence). In this vein, the work by [16] developed a convex model based on the current injection mode for the OPF in bipolar grids while employing a recursive quadratic programming model. The authors of [17] deduced a linearization of the power flow model based on the current injection formulation, stating that the OPF was formulated in terms of current and voltage instead of the classical power injection in order to model the grid with precision. In [18], a methodology based on the power flow was proposed to reduce voltage imbalances by redistributing the load along the distribution network for extra-low voltage DCLED lighting systems in high-rise buildings.

The referenced literature generally deals with OPF analysis based on current injection formulations. It can be deduced that there is a gap regarding optimization models for the OPF, as only a few are proposed for steady-state analysis. Therefore, this article presents an exact OPF formulation that contrasts with the current injection proposals mentioned above. This method is based on the classical power injection modeling of the grid, demonstrating that such formulation could properly handle bipolar LVDC grid modeling. The proposed model transforms the nonlinear programming OPF into a quadratic optimization model by linearizing the power flow equation obtained via the power injection mode.

The rest of this paper is organized as follows: Sect. 2 presents the formulation of the OPF in bipolar DC grids; Sect. 3 presents the test feeders to be used; Sect. 4 presents the computational validation of the proposed methodology; and Sect. 5 presents the conclusions and future work.

2 Formulation of the OPF problem

This section presents the nonlinear formulation of the OPF for bipolar DC grids, as well as a convex quadratic approximation via Taylor’s expansion. First, the modeling of the grid elements is presented, with the aim to formulate the generic PF problem. Later, the ZIP model of the loads is discussed, and the convex approximation based on Taylor’s expansion is presented in order to formulate the OPF.

2.1 Power flow model

A generic representation of a bipolar DC grid is presented in Fig. 1. It consists of a positive pole p, a negative pole n, and a neutral pole o. The neutral pole might be solidly grounded; in that case, the grid imbalance is noticeably reduced, and the corresponding studies are simple. However, this assumption may hardly be made in real-life situations. At a given node k, a bipolar DC grid could contain monopolar loads or generators (po or no) and bipolar loads (pn). Naturally, this system would be unbalanced due to the distribution and capacity of the loads.

Fig. 1
figure 1

Schematic representation of a bipolar DC network

A bipolar DC grid is represented via an oriented graph \({\mathcal {F}}=\{{\mathcal {L}},{\mathcal {E}}\}\), where \({\mathcal {L}}=\{1,2,\ldots ,l\}\) is the set of nodes and \({\mathcal {E}} \subseteq \mathcal {L} \times \mathcal {L}\) is the set of branches. Each node and branch have three components represented by the set \({\mathcal {B}}=\{p,o,n\}\) that contains the positive, neutral, and negative poles. The subscripts k and m are entries of \({\mathcal {L}}\), and the electrical connections are represented by the nodal conductance matrix \({\textbf{G}}_\text {bus}\in {\mathbb {R}}^{n\times n}\). Capital letters represent vectors, variables, or constants, capital bold letters represent matrix variables or constants, and their entries are lowercase letters. \(\mathbf {G_{\text {bus}}}\) is calculated as follows:

$$\begin{aligned} \textbf{G}_{\text {bus}}=(\textbf{I}_\textbf{3}\otimes \textbf{A})\textbf{G}_{\text {prim}}(\textbf{I}_\textbf{3}\otimes \textbf{A}^\top ), \end{aligned}$$
(1)

where \(\mathbf {I_3}\) represents the identity matrix with size \(3\times 3\), and \({\textbf{A}}\) is the node-to-branch incidence matrix. The symbol \(\otimes\) is the Kronecker product. The power flow equations define equality constraints and determine the state variables (such as voltages and power generation). From the current balance at a given node k, is it possible to obtain the expression described in (2).

$$\begin{aligned} i_{gkE}^{h} - i_{dkE}^{h} - i_{dkC}^{h} = \sum _{b\in {\mathcal {B}}} \sum _{j\in {\mathcal {L}}}{g_{kj}^{hb}v_{k}^b},\; \left\{ \forall k\in {\mathcal {L}},\;\forall h\in {\mathcal {B}}\right\} \end{aligned}$$
(2)

Furthermore, the current depends on the voltage difference between the poles associated with E-type and C-type loads, as given in (3)–(5).

$$\begin{aligned} i_{dk}^{p}= & {} \frac{p_{dk}^{p}}{v_{k}^p - v_{k}^o} + \frac{p_{dk}^{p-n}}{v_{k}^p - v_{k}^n}, \end{aligned}$$
(3)
$$\begin{aligned} i_{dk}^{o}= & {} \frac{p_{dk}^{p}}{v_{k}^o - v_{k}^p} + \frac{p_{dk}^{n}}{v_{k}^o - v_{k}^n}, \end{aligned}$$
(4)
$$\begin{aligned} i_{dk}^{n}= & {} \frac{p_{dk}^{n}}{v_{k}^n - v_{k}^o} + \frac{p_{dk}^{n-p}}{v_{k}^n - v_{k}^p}. \end{aligned}$$
(5)

These equations are nonlinear due to the hyperbolic relation between voltages and currents. The relations presented in (2)–(5) for a generic node k are represented in matrix form, as given in (6).

$$\begin{aligned} \textbf{Z}_\textbf{p}{\text {diag}}^{-1}({\textbf{M}_\textbf{p}}V_k)P_k=(\textbf{G}_{\text {bus}}V)_k, \end{aligned}$$
(6)

where \({\text {diag}}(x)\) is an operator that creates the diagonal matrix of the vector x, \(\mathbf {M_p}\) and \(\mathbf {Z_p}\) are primitive matrices that simplify relations between the voltage differences and loads in each node, and \(V_k=[v_k^p,v_k^o,v_k^n]\) and \(P_k=[p_k^p,p_k^{pn},p_k^n]\). These matrices have the structure described below:

$$\begin{aligned}{} \mathbf {M_p}=\begin{pmatrix} 1 &{} -1 &{} 0 \\ 0 &{} -1 &{} 1 \\ 1 &{} 0 &{} -1 \end{pmatrix}\end{aligned}$$
(7)
$$\begin{aligned}\mathbf {Z_p}=\begin{pmatrix} 1 &{} 0 &{} 1 \\ -1 &{} -1 &{} 0 \\ 0 &{} 1 &{} -1 \end{pmatrix}. \end{aligned}$$
(8)

In order to obtain a generic representation of the power flow in all the nodes, the matrices \({\textbf{M}}\) and \({\textbf{Z}}\) are defined as follows:

$$\begin{aligned} \textbf{M}=(\textbf{I}_\textbf{n}\otimes \textbf{M}_\textbf{p})\end{aligned}$$
(9)
$$\begin{aligned} \textbf{Z}=(\textbf{I}_\textbf{n} \otimes \textbf{Z}_\textbf{p}) \end{aligned}$$
(10)

These matrices have the following structure:

$$\begin{aligned} {\textbf{M}} = \begin{bmatrix} M_{p_{3\times 3}}&{} \cdots &{} 0_{3\times 3} &{}\cdots &{} 0_{3\times 3}\\ \vdots &{}{\ddots} &{} \vdots &{}{\ddots} &{} \vdots \\ 0_{3\times 3} &{} \cdots &{} M_{p_{3\times 3}} &{}\cdots &{} 0_{3\times 3}\\ \vdots &{}{\ddots} &{} \vdots &{}{\ddots} &{} \vdots \\ 0_{3\times 3} &{}\cdots &{} 0_{3\times 3} &{}\cdots &{} M_{p_{3\times 3}}\\ \end{bmatrix},\end{aligned}$$
(11)
$$\begin{aligned} {\textbf{Z}} = \begin{bmatrix} Z_{p_{3\times 3}}&{} \cdots &{} 0_{3\times 3} &{}\cdots &{} 0_{3\times 3}\\ \vdots &{}{\ddots} &{} \vdots &{}{\ddots} &{} \vdots \\ 0_{3\times 3} &{} \cdots &{} Z_{p_{3\times 3}} &{}\cdots &{} 0_{3\times 3}\\ \vdots &{}{\ddots} &{} \vdots &{}{\ddots} &{} \vdots \\ 0_{3\times 3} &{}\cdots &{} 0_{3\times 3} &{}\cdots &{} Z_{p_{3\times 3}}\\ \end{bmatrix} \end{aligned}$$
(12)

which finally leads to a generalization of the power flow problem stated below.

$$\begin{aligned} \textbf{Z}{\text {diag}}^{-1}(\textbf{M}V)P=\textbf{G}_{\text {bus}}V \end{aligned}$$
(13)

Equation (13) constitutes an easy way to approximate the power flow. The main issue is that \({\textbf{Z}}\) is singular, so a linear approximation of the left-hand side of the expression is the easiest way to obtain an equivalent affine expression.

2.2 Load modeling

The model adopted to describe the loads is the ZIP model, which considers constant impedance (Z), current (I), and power loads (P). It is often called the polynomial model of the loads, and it is written as given in (14).

$$\begin{aligned} P_d={\text {diag}}(P_o) (A_o+{\text {diag}}({\textbf{M}}V) A_1+ {\text {diag}}({\textbf{M}}V)^2 A_2), \end{aligned}$$
(14)

where \(P_o\) is a vector with the nominal values of the loads and \(A_i\) is the vector of constants associated with the corresponding constant models. Note that, in Eq. (14), the nominal value of the voltage was assumed to be 1 (per unit). Thus, Eq. (13) could be rewritten as

$$\begin{aligned} \textbf{Z}{\text {diag}}^{-1}(\textbf{M}V)(P_g-P_d)=\mathbf {G_{\text {bus}}}V. \end{aligned}$$
(15)

Now, by replacing the ZIP load model into (15), it is possible to obtain (16), as presented below.

$$\begin{aligned} \begin{aligned} \textbf{Z}{\text {diag}}^{-1}(\textbf{M}V)(P_g-{\text {diag}}(P_o) (A_o+{\text {diag}}(MV) A_1) \\ - \textbf{Z}{\text {diag}}^{-1}(\textbf{M}V){\text {diag}}(P_o)({\text {diag}}(MV)^2 A_2) =\textbf{G}_{\text {bus}}V, \end{aligned} \end{aligned}$$
(16)

which finally leads to the generic representation of the power flow with ZIP loads in the power injection formulation.

$$\begin{aligned} \begin{aligned}&- {\textbf{Z}}{\text {diag}}(P_o) ({\text {diag}}^{-1}(\textbf{M}V)A_o + A_1 + {\text {diag}}({\textbf{M}}V)A_2 )\\&\quad +\mathbf {Z{\text {diag}}^{-1}(M}V)P_g- \mathbf {G_{\text {bus}}}V =0 \end{aligned} \end{aligned}$$
(17)

2.3 Approximation for the power flow equations

The major source of conflict in the power flow equation presented in (17) is the following nonlinearity:

$$\begin{aligned} F(V)= \mathbf {Z{\text {diag}}^{-1}(M}V)P_g-{\textbf{Z}} \mathbf {{\text {diag}}^{-1}(M}V){\textbf{D}}(P_o)A_o, \end{aligned}$$
(18)

which could be approximated to an affine equation via Taylor’s expansion:

$$\begin{aligned} \begin{aligned} F(V)&\approx \mathbf {Z{\text {diag}}^{-1}(M}V_o)P_g- 2{\textbf{Z}}\mathbf {{\text {diag}}^{-1}(M}V_o){\text {diag}}(P_o)A_o\\&\quad -{\textbf{Z}}\mathbf {{\text {diag}}^{-2}(M}V){\text {diag}}(P_o){\text {diag}}(A_o){\textbf{M}}V \end{aligned} \end{aligned}$$
(19)

Hence, (17) may be rewritten linearly as given below:

$$\begin{aligned} \begin{aligned}&\mathbf {Z{\text {diag}}^{-1}(M}V_o)P_g- 2{\textbf{Z}}\mathbf {{\text {diag}}^{-1}(M}V_o){\text {diag}}(P_o)A_o\\&\quad + {\textbf{Z}}\mathbf {{\text {diag}}^{-2}(M}V_o){\text {diag}}(P_o){\text {diag}}(A_o){\textbf{M}}V\\&\quad -{\textbf{Z}}{\text {diag}}(P_o) (A_1 + {\text {diag}}\mathbf {(M}V)A_2 )=\mathbf {G_{\text {bus}}}V \end{aligned} \end{aligned}$$
(20)

Note that this final representation corresponds to an affine equation, which is convex. In order to eliminate the error introduced by this linear approximation, a sequential optimization approach is proposed [19, 20].

2.4 OPF formulation

The proposed model aims to reduce power losses and voltage imbalances [16]. Weighting factors \(\alpha _1,\alpha _2\) are introduced to assign more importance to a specific objective. The optimization model is described below.

Objective function:

$$\begin{aligned} \min \; \alpha _1 \mathbf {V^T G_{\text {bus}} V} + \alpha _2\mathbf {(V_p -V_n)^T(V_p-V_n)} \end{aligned}$$

Subject to:

$$\begin{aligned}{} & {} -p^\text {max} \le p^\text {slack} \le p^\text {max},\nonumber \\{} & {} 0 \le p_k^\text {DGs} \le p_k^\text {max},\nonumber \\{} & {} V^\text {min} \le V \le V^\text {max},\nonumber \\{} & {} \begin{bmatrix} \mathbf {Z{\text {diag}}^{-1}(M}V_o)P_g- 2{\textbf{Z}}\mathbf {{\text {diag}}^{-1}(M}V_o){\text {diag}}(P_o)A_o\\ +{\textbf{Z}}\mathbf {{\text {diag}}^{-2}(M}V_o){\text {diag}}(P_o){\text {diag}}(A_o){\textbf{M}}V \\ -{\textbf{Z}}{\text {diag}}(P_o) (A_1 + {\text {diag}}\mathbf {(M}V)A_2 )=\mathbf {G_{\text {bus}}}V\end{bmatrix} \end{aligned}$$
(21)

Algorithm 1 shows the basic steps to solve the problem, where \(\epsilon\) is the error between iterations, tol is the tolerance adopted for solving the sequential problem (in this case \(1\times 10^{-5}\)), and \(t_\text {max}\) represents the maximum number of iterations. Naturally, (21) is solved via the interior-point method. The main idea of the Algorithm 1 is to approximate the solution iteratively until it converges with a given tolerance.

Algorithm 1
figure a

Sequential convex optimization for the OPF

It is worth mentioning that the convergence of the proposed sequential quadratic programming (SQP) approach is tested with the error of the voltage profile between two consecutive iterations, as the SQP approach is a Taylor-based approximation where the linearizing point is updated at each iteration (this linearizing point corresponds to the \(V_o\) voltages), which implies that, as with power flow algorithms, the solution to the OPF problem is reached when the linearizing point reaches the solution of the power flow constraints with a negligible mismatch [21]. However, a possible convergence criterion can be implemented using the expected power losses during two consecutive iterations, which is typically done for optimal power flow problems with iterative algorithms [22].

3 Test feeders

This section describes the main characteristics of the test feeders employed, which are composed of 21 and 33 nodes.

3.1 Bipolar DC 21-bus grid

The system employed for validating the OPF presented herein is the 21-bus grid, which is an adaptation of the monopolar DC network reported in [23]. The electrical configuration of the 21-bus grid is depicted in Fig. 2, and all the electrical parameters of this test feeder are reported in Table 1.

Fig. 2
figure 2

Schematic representation using a single-line diagram for the 21-bus grid

Table 1 Branch and load parameters regarding the 21-bus grid

Additionally, the ZIP model described in Sect. 2.2 was employed for several loads, as described in Table 2. The rest of the loads are assumed to be constant power loads (CPLs). Furthermore, some dispersed generators (DGs) were located in the grid (note that these DGs are unbalanced in nature, in order to demonstrate the generality of our proposed OPF formulation), as could also be observed in Table 2.

Table 2 Load description according to the ZIP model and the DG location and capacity

3.2 Bipolar DC 33-bus grid

The bipolar DC version of the IEEE 33-bus grid was initially proposed by the authors of [24] to analyze the OPF problem in DC networks with asymmetric loading. The single-line diagram of the bipolar DC 33-bus system is depicted in Fig. 3.

Fig. 3
figure 3

Adaptation of the IEEE 33-bus grid for DC bipolar applications

For the bipolar DC version of the 33-bus grid, the following operating characteristics are considered. (i) The slack source (i.e., the substation node) is located at node 1, and it is set with the nominal operative voltage of \(\pm 12{,}660\,\)V for the positive and negative poles. In addition, the neutral wire at the substation bus is assumed to be solidly grounded. (ii) The positive pole has an equivalent power consumption of about \(2615\,\)kW, the negative pole absorbs 2185 kW, and the total bipolar power consumption is about 2350 kW.

The data regarding branches (resistive effect and nodal connections) and loads (constant power consumptions) are listed in Table 3.

Table 3 Data for the bipolar DC 33-bus grid (all powers in kW)

As recommended by [24], this system includes six dispersed generation sources with the information listed in Table 4.

Table 4 Capacity and location of the dispersed generation sources for the bipolar DC 33-bus grid

4 Computational validation and results

The OPF was evaluated in a computer with an AMD Ryzen 7 processor and 8 GB RAM. The optimization model was programmed in Python with the CvxPy library [25] and the ECOS solver [26].

Note that, in order to validate the effectiveness and robustness of the proposed SQP model to deal with the OPF problem in bipolar DC networks with multiple CPLs, the following simulations, scenarios, and validations were proposed:

\(\checkmark\):

The implementation of the SQP model in the 21-bus grid while considering the peak load scenario in the presence of DGs. In this simulation scenario, comparative analyses with combinatorial optimizers are made. In addition, the positive effects of efficiently dispatching DGs are evaluated with regard to power losses and voltage deviations when compared to the benchmark case.

\(\checkmark\):

The evaluation of the daily operation scenario in the 33-bus grid, considering that the DGs are associated with renewable energy resources based on photovoltaic systems. A multiperiod power flow analysis considering four simulation cases is tested in this case. These simulations include the benchmark case, the connection of the DGs to only one of the poles, and the optimal operation with the DGs in both poles simultaneously.

It is worth mentioning that the simulations described above were planned to validate the numerical performance of the proposed SQP under different possible operating conditions, which includes the peak load case (the worst case regarding power losses and voltage profile deviations), and the daily operation scenario with variable demand curves, thus allowing to identify the potential effect of using renewables on the grid’s behavior.

4.1 Numerical results for the 21-bus system in the peak load condition

To demonstrate the effectiveness of the proposed OPF approach based on convex optimization, this work presents a comparative analysis carried out with three methods (only considering CPLs): the black hole optimizer (BHO), the sine–cosine algorithm (SCA), and the vortex search algorithm (VSA). Note that the selection of each of these combinatorial optimizers is based on the fact that each of them has been proposed in the current literature for solving OPF problems in electrical networks [27].

  1. i.

    The authors of [28] proposed the BHO approach to solve the OPF in large-scale power systems with multiple thermal generation plants and highly meshed transmission networks, as is the case of the IEEE 30-bus grid and a real Algerian system composed of 59 nodes. In [29], the BHO was proposed to minimize the total generation costs, voltage deviations, and energy losses in transmission networks by solving the OPF problem in two IEEE test feeders composed of 30 and 57 buses. In the case of DC networks, the work by [30] presented the application of the BHO method to solve the OPF problem in monopolar DC networks, aiming to minimize the total grid power losses with different levels of distributed generation penetration.

  2. ii.

    The authors of [31] proposed the SCA to deal with the OPF problem in transmission networks while considering technical and economic objective functions. The IEEE 30- and IEEE 118-bus grids were used as test feeders, with excellent numerical results when compared to classical algorithms, as is the case of the particle swarm optimizer and the gravitational search algorithm. In the case of medium-voltage AC distribution networks, the study by [32] demonstrated the effectiveness of the SCA in dealing with the efficient sizing of dispersed generators by solving the OPF problem in the IEEE 33-and 69-bus grids. For multi-terminal high-voltage DC networks, the effectiveness of the SCA was proposed by the authors of [33], where the minimization of the energy generation costs and the total CO\(_2\) emissions were analyzed using a master–slave optimization approach based on the SCA and a specialized power flow method for DC grids.

  3. iii.

    The VSA was implemented in [34] to solve the OPF problem in monopolar DC networks. The main characteristic of this algorithm is its efficiency when compared to exact power flow formulations based on convex optimization. In addition, the study by [35] presented the application of the VSA approach to deal with the OPF problem in transmission networks, with the aim to minimize the total grid generation costs. The IEEE 30-bus grid was used as a test feeder, with excellent numerical results when compared to the artificial bee colony and the gravitational search algorithms.

Considering their broad application in dealing with the OPF problem in electrical networks, the BHO, SCA, and VSA approaches were selected for the sake of comparison. Here, it was assumed that \(\alpha _1 = 1\) and \(\alpha _2 = 0\). That is to say that the goal was to minimize the total grid power losses. All the methods used 1000 iterations with 10 individuals and 100 repetitions in order to determine their average statistical behavior. Table 5 presents the comparative results between the proposed convex model (named SQP) and the selected combinatorial optimizers.

Table 5 Comparative analysis between the proposed SQP and the selected heuristics (all values in pu)

The results in Table 5 show that the proposed SQP found a possible global optimal solution, with the main advantage that no statistical studies were needed due to the convexity of the solution space. In addition, the BHO and the SCA got stuck in local optima, with the main issue that the mean values were not near the minimum value. This implies a minimal possibility of finding a high-quality solution in each run. However, it is worth mentioning that the VSA approach exhibits a good behavior, as it reaches the exact solution, like the proposed SQP, with the best standard deviation when compared to the SCA and the BHO. Notwithstanding, it is impossible to ensure a 100% effectiveness in each run (see the maximum value) and a low convergence time, given the random nature of combinatorial methods, which is not the case of the proposed convex approximation.

For the base case (without DGs), the power losses were 0.94144 pu, and the total imbalances of the grid were 0.276162 pu.

Naturally, there is a high voltage deviation in the base case. Since the proper voltage operation for this test system is around 5% of its nominal value, a set of DGs was included in the model. Figure 1 shows the results corresponding to the voltage profiles before and after adding the DGs.

Fig. 4
figure 4

Behavior of the voltages at the positive (a), neutral (b), and negative poles (c) without DG (base case ), with DG and power losses minimization (), and with DG and imbalances minimization (). The x-axis represents the nodes (color figure online)

The inclusion of DGs in bipolar grids reduces not only the power losses, but also the voltage imbalances. This can be noted if only one of the objective function components is taken into account (see parameters \(\alpha _1\) and \(\alpha _2\) in model (21)). For example, if only the power losses are considered in the objective function, it takes a value of 0.229207 (note that the power losses are very different from the comparison case, as only CPLs were considered in it), and the total imbalances in the network are 0.12428, whereas the time of convergence is 0.1234 s and the total iterations are 3. However, if only the voltage imbalances are considered in the objective function, the power losses are 0.26415, and the total imbalances in the network are 0.021366, whereas the computation time is 0.324 s and the number of iterations 4. Naturally, this allows concluding that there is a close relationship between reducing the total imbalances of the grid and reducing the power losses, even though they do not lead to the same optimal value.

In order to decrease the voltage imbalance (as observed in Fig. 4), it is necessary to properly distribute the load and optimally locate, size, and select DGs in the grid. However, this is outside the scope of this article, and further research on the planning of bipolar grids is required.

On the other hand, in order to demonstrate the applicability of the proposed OPF approach for meshed grids, two lines were added between nodes 7–19 and 11–16, with resistances of 0.082 \({\Omega }\) and 0.037 \({\Omega }\), respectively. For this case, the total number of iterations was 3, and the power losses and the total imbalances were 0.20715 and 0.02858, respectively, with a computation time of 0.1028 s while considering \(\alpha _1=\alpha _2=1\). This simulation demonstrates that, for a bipolar meshed grid, few iterations are required in order to obtain the OPF solution, which is expected due to the better voltage profiles along the grid. Finally, it is important to note that, despite the fact that most recent works involving bipolar LVDC steady-state analysis are purely theoretical (including this one), the authors of [18] presented a practical application for an extra-low voltage DC LED lighting system in high-rise buildings, where they employed empirical data measurements of the DC LED lighting load in order to analyze the grid and improve the voltage profiles while reducing the losses. This is one possible application of the OPF for the steady-state analysis of bipolar systems, and, naturally, further research on its applications (and experimental validations) is required.

4.2 Numerical results for the 33-bus system in a daily operation scenario

To demonstrate the effectiveness of the SQP approach to solve the OPF problem while considering a day-ahead operation scenario, the minimization of the expected daily energy losses was considered as the objective function, i.e.,

$$\begin{aligned} \min \; E_{\text {loss}} = \sum _{h\in {\mathcal {H}}}{\textbf{V}_\textbf{h}^\textbf{T} {\textbf{G}_{\text {bus}}} \textbf{V}_\textbf{h}{\varDelta }_h}, \end{aligned}$$
(22)

where \({\mathcal {H}}\) is the set that contains all the periods associated with demand and generation variations (typically 24 h for daily operation analysis), and \({\varDelta }_h\) represents a constant parameter associated with the faction of time where the generation and demand data are assumed to be constant (i.e., \({\varDelta }_h = 1\,\)h). Note that, in order to evaluate the daily operating performance of the dispersed generation sources in the bipolar DC 33-bus grid, the expected generation curve is assumed to be associated with photovoltaic generators. The expected power generation in these sources and the average demand behavior are depicted in Fig. 5.

Fig. 5
figure 5

Expected power generation in photovoltaic sources and demand performance for Medellín, Colombia [36]

Four different simulation scenarios were considered:

  1. i.

    The benchmark case without renewable generation penetration, i.e., all the DGs in Table 4 were assumed to be disconnected.

  2. ii.

    Only the photovoltaic generators connected to the negative pole were dispatched.

  3. iii.

    Only the photovoltaic generators connected to the positive pole were dispatched.

  4. iv.

    All the available DGs were optimally dispatched.

Table 6 shows the behavior of the energy losses and the expected reductions for each simulation scenario with respect to the benchmark case.

Table 6 Daily energy losses behavior for each simulation case in the bipolar DC 33-bus grid

The numerical results in Table 6 show that:

  1. i.

    The benchmark case has a daily power losses behavior of about 4343.4625 kWh/day, which can be reduced by 5.3771–51.7228% depending on the operation scenario assigned for the photovoltaic (PV) generation units.

  2. ii.

    The operation of PV generation units only in the positive pole reduces the power losses by about \(22.6271\%\). However, when the PV generation is only dispatched in the negative pole, the reduction is small, with a value of \(5.3771\%\). The wide difference between both scenarios is due to the fact that the most loaded pole in this network is the positive one (2615 kW) when compared to the negative one (2185 kW), which implies that the greater losses are caused by the current flowing through the positive pole. This clearly shows that, for reducing the total grid power losses, the inclusion of renewable generation in this pole has a significant effect on the objective function value.

  3. iii.

    Combining the optimal dispatch of the PV generators in both poles allowed for a reduction of about 51.7228%m in the power losses value when compared to the benchmark case. However, it is not the linear combination of the individual solutions reported separately for the positive and negative poles, which is an expected result because energy losses minimization in a multi-pole distribution network is a coupled optimization problem that cannot be solved by applying the superposition theorem, given the nonlinearities associated with the multiple nonlinear loads (constant power loads) in these networks.

In order to graphically illustrate each one of the simulation cases implemented for the bipolar DC version of the IEEE 33-bus grid, Fig. 6 depicts the daily behavior of the power losses for each simulation case. It is observed that, during periods 1 to 7 and from 19 to 24 h, the energy losses are the same for all the operating scenarios, which is an expected result since, during that time, the energy availability in the PV plants is zero, which implies that only the slack bus is supporting all the energy demand, including the grid power losses.

Fig. 6
figure 6

Behavior of the power losses in the 33-bus grid with different operation scenarios for the PV generation units

Note that the behavior of the energy losses (the area under the curve) in Fig. 6 confirms that, depending on the simulation case (see Table 6), the effect of the PV plants on the energy losses reduction is highly dependent on the connection (positive and negative poles) as well as on the operating conditions. In this sense, more research regarding the nodal location and sizing of PV plants in bipolar DC networks is required, including different objective functions such as energy purchasing and maintenance costs or CO\(_2\) emissions minimization, among others.

Finally, Fig. 7 presents the practical use of renewable energy in each simulation scenario.

Fig. 7
figure 7

Effective use of renewable generation availability as a function of the operation scenario

The behavior of the energy use from PV generation units in Fig. 7 confirmed that the level of generation dispatched is dependent on the operation scenario. However, the most important result is that the accumulated power generation did not follow the behavior of the maximum energy available, i.e., the energy generation behavior at each scenario suggests that the best way of operating PV plants is not employing maximum power point tracking and dispatching them hourly as a function of the grid requirements. In addition, note that no scenario extracts 100% of the power available in the PV plants, which implies that additional devices such as battery energy storage systems can be employed to maximize the use of renewable energy.

5 Conclusions

A sequential quadratic optimization model was developed to solve the optimal power flow for bipolar DC grids. In comparison with the successive approximations method, the proposed model, which is based on power injection, demonstrated precision, accuracy, and efficiency. The model can be employed for meshed and radial grids, as it is based on Taylor’s expansion of the power flow constraints in order to obtain an affine expression. Considering that the optimization model is convex, the uniqueness of the solution, the global optimum, and a fast convergence are ensured (at least in the approximated model). Numerical results in the 21-bus grid demonstrated that minimizing the imbalances is closely related to minimizing the grid losses, as both reached a similar solution. Furthermore, including distributed generation ensured voltage minimization in the neutral pole and better regulation in the positive and negative poles. A comparative analysis with the BHO, the SCA, and the VSA allowed deducing that the proposed SQP found the optimal global solution to the OPF problem, with the main advantage that no statistical evaluations were needed, unlike the case of combinatorial methods. Due to their random nature, these methods cannot find the optimal global solution in each execution.

A complementary analysis in the bipolar DC version of the IEEE 33-bus grid demonstrated that the proposed sequential quadratic programming model could deal with the multi-period OPF problem in bipolar asymmetric DC networks with renewable generation sources (i.e., photovoltaic plants), with the aim to minimize the expected daily energy losses under different operating conditions. Numerical results demonstrated that, with respect to the benchmark case, the daily energy losses were reduced by between 5.3771% and 51.7228%. In addition, the nonlinear structure of the power flow problem confirmed that the separate dispatch of the PV plants per pole did not correspond to the optimal solution found when all the PV plants were simultaneously dispatched, which is due to the nonlinearities introduced by the constant power terminals, which make it impossible to apply the superposition principle.

The renewable energy behavior showed that, when the objective function is to minimize the total grid power losses, the total power injection in the PV plants is inversely proportional to the energy losses throughout a day of operation. This is an expected behavior, given that, when more PV plants are connected to bipolar DC networks, the energy distribution improves, implying that the level of energy losses is reduced.

For future works, the following studies can be conducted:

  1. i.

    The simultaneous operation of different renewable energy technologies (wind, photovoltaic, and tidal power, among others) with energy storage systems for minimizing economic, environmental, and technical objective functions.

  2. ii.

    The development of a mixed-integer convex approximation to locate and size distributed energy resources in bipolar DC networks, including thermal bounds in the distribution lines (i.e., maximum current transference capabilities).