"A comparison of convex formulations for the joint planning of microgrids"

Planning of autonomous microgrids differs from traditional distribution planning because of the need to plan investments not only in the network but also in generation capacity. Generation and distribution planning, traditionally performed separately should be done simultaneously in this case to provide a cost-effective planning solution. Joint planning of generation and distribution can be cast as mixed-integer non-linear integer program and is difficult to solve due to the presence of both integer variables and non-linear constraints. In this study, we use the framework of convex programming to tackle the joint planning problem. The study presents four different convex relaxations of this problem, with different levels of accuracy. We compare their results in terms of computation time and solution quality in order to determine the most relevant formulation to use in function of the problem size. Abstract: Planning of autonomous microgrids differs from traditional distribution planning because of the need to plan investments not only in the network but also in generation capacity. Generation and distribution planning, traditionally performed separately should be done simultaneously in this case to provide a cost-effective planning solution. Joint planning of generation and distribution can be cast as mixed-integer non-linear integer program and is difficult to solve due to the presence of both integer variables and non-linear constraints. In this study, we use the framework of convex programming to tackle the joint planning problem. The study presents four different convex relaxations of this problem, with different levels of accuracy. We compare their results in terms of computation time and solution quality in order to determine the most relevant formulation to use in function of the problem size.


Introduction
Autonomous microgrids are an efficient alternative to network expansion when electrifying remote areas. Indeed, classical grid expansion may become prohibitive as the distance between existing assets and the area to electrify is growing. These autonomous systems are operated in standalone, hence they must include local generation means to power them. Sequential planning of distribution and generation may be suboptimal in this case; hence, in this work we consider them simultaneously in a single joint planning problem. The planning problem should provide an investment plan for the considered system over a given time horizon, which can be translated into the three following questions: † Which assets should be placed? † Where to place them? † When to place them?
The objective is to minimise the total cost of the system. There are two main classes of optimisation methods used to tackle this problem: metaheuristics, such as evolutionary algorithms, and mathematical programming. We choose the latter one, that present two advantages. First, if the problem is convex, the solution computed with this approach is provably optimal. Furthermore, if the optimisation is stopped before reaching the optimum, the solver can return a measure of the distance to optimality (the so called 'optimality gap') that enables to solve the optimisation problem to arbitrary precision. Second, unlike metaheuristics, mathematical programming benefits from off-the-shelf solvers that are frequently updated, reflecting the state of the art in this domain. This allows us to focus on the modelling of the problem rather than on the implementation of a computational method.
Joint planning of distribution and generation is a complicated problem, for two main reasons. First, there are many decisions to take: which equipments to place, where and when to place them. Mathematically, those decisions mostly translate into discrete decision variables (i.e. taking their values within a finite set) known to complicate the optimisation problem, because of the combinatorial explosion of the amount of solutions when the problem size grows (the so-called curse of dimensionality). The second reason is that besides those decision variables, a mathematical model must introduce state variables representing physical quantities such as voltages, currents and power flows. These variables and their interactions are governed by the power flow equations that are both non-linear and non-convex, adding another layer of difficulty to the problem. Indeed, the solution of an optimisation problem including those equations as constraints may fall in a local optimum rather than a global optimum.
There is thus a growing interest these last years in convex relaxations of power flow equations to allow the use of convex optimisation tools [1][2][3][4]. However, the more accurate the relaxation, the bigger the computation time and some problems, while being convex, may remain intractable even for small sizes.
Nevertheless, the main outcome of a planning problem is the investment plan in distribution and generation capacity, i.e. decision variables linked to location, size and time of building of the different assets. State variables are only useful to check the feasibility of an investment plan.
The contribution of this paper is to assess the accuracy of different formulations and to check if the coarser relaxations can deliver 'good enough' investments solutions, i.e. close to the ones we get with tighter relaxations, despite the fact that they only roughly represent the problem's physics.

Formulation of the problem
Our goal is to take investment decisions (lines and generators) and operational decisions (production of generators) in order to minimise the total net present value of the system on the planning horizon Y. Investment decisions are taken once a year while operational decisions are taken once an hour. We simulate only two representative days of 24 h per year.

Model input
We consider a set of n nodes representing consumption points to electrify. Data for these nodes includes location (coordinates) and hourly consumption profiles for two typical days of the year. Consumptions are assumed to increase at a uniform rate each year, triggering the need for reinforcements. The available investment options consist of diesel generator sets with a linear operational cost function and overhead cables. We consider a unique size available for the lines and the generators. However, while there may be at most one generator installed at a node i, there may be several lines placed in parallel between nodes i and j which is equivalent to a larger cross-section line.

Convex formulations
We present four different formulations of the joint planning problem, named hereafter mixed integer linear programming (MILP) flow, MILP 1, MILP 2 and mixed integer second order cone (MISOC). MILP 1 is based on the formulation developed by Taylor and Hover [5], which is a lift-and-project linear relaxation of the AC network expansion-planning problem, to which we add two features. First, because there is no existing network in our formulation, everything is built from scratch. Then, we add decision variables about investments in generation. MILP flow and MILP 2 are obtained from MILP 1 by removing and adding constraints, respectively. MISOC is based on the DistFlow formulation for the ACoptimal power flow (OPF) included in [6]. This is an SOC formulation of the OPF, to which we add integer variables linked to investment decisions in lines and generators.
The objective is to minimise the net present value (NPV) of the system, which is the sum of discounted yearly cash flows (CAPital EXpenditure (CAPEX) and OPerational EXpenditure (OPEX)). In these expressions, ω ijy is a binary variable equal to 1 if there is at least one conductor between nodes i and j at year y, g ijy is the number of lines in parallel between nodes i and j at year y, σ iy is a binary variable equal to 1 if there is a generator of fixed size at node i at year y, P Git is the active power produced at node i at period t. The parameters are the following: C cond is the cost of a single conductor ($/km), C pole is the cost of poles ($/km) (a unique pole is required regardless of the number of conductors), D ij is the distance between nodes i and j (km), C Gen is the fixed cost for installing a generator, a and b are the parameters of the generator linear cost function and ra is the discount rate. As we only simulate two days per year, we multiply the fuel costs for these days by 182.5 to represent the yearly operation cost The first linear formulation is the simplest one. It is formulated as a flow problem where we only keep constraints related to connectivity of the network, limits of generators, thermal rating of lines and nodal power balance. There is no equation representing physics of power flows (linking them with voltages), voltages are thus not considered. Equation (2) express the fact that g ijy should not exceed the maximal amount of parallel lines j and that investments are permanent (i.e. cannot be unmade in following years). Equation (3) also states that investments in generation cannot be unmade as σ iy , should be increasing though time. ω ijy is computed by (4). Equation (5) simply expresses the symmetry of the problem regarding lines Equations (6)-(9) force the network to be at least radial (and allow it to be meshed), where n is the number of nodes and f jiy is a fictitious flow only used to ensure connectivity of the network. The idea behind those constraints is to have a fictitious source supplying (n − 1) units at node 1 and fictitious sinks at other nodes that consume 1 unit. As there is only one source, (6)-(9) ensure that there is no island in the network Equation (10) ensures that the power produced at node i is smaller than the generation capacity installed at this node and larger than the technical minimum. Equation (11) represents reactive capabilities of generators, with cos(Φ) being the minimal power factor (reactive or inductive) of generation units s iy P ≤ P Git ≤ s iy P (10) −P Git × tan ( cos −1 ( cos (F)) ≤ Q Git Q Git ≤ P Git × tan ( cos −1 ( cos (F)) Equations (12) and (13) represent the active and reactive nodal power balance, respectively, P Cit and Q Cit representing active and reactive power consumptions at node i at period t while p ijt and q ijt represent active and reactive power flows from i to j at period t Equation (14) is an approximation of the quadratic line thermal rating constraint, with S being the thermal rating of a single line The problem is formulated as follows: MILP flow: min defined as g ijy × v 2 it where v it is the voltage at node i and period t Equation (17) restricts node voltages to lie within lower and upper voltage limits v and v: We thus have the following problem: This linear relaxation cancels losses in the lines and voltage angle variations.

MILP 2:
As MILP 1 is a lossless formulation, we formulate a second model based on it that includes an approximation of the losses to have a more realistic solution. This is done by introducing a term in the objective that penalises the distribution of power over long and resistive sections. This term is proportional to the power in the lines, their length and resistance (hence inversely proportional to the number of parallel lines between a pair of nodes). We define new binary variables loi ijyk to be equal to 1 if there are k parallel lines between i and j and zero otherwise, which is expressed by (18)  The sign of the power flow may be positive or negative depending on its direction ( p ijt > 0 if power goes from i to j). We only need to account for line power in one direction for approximating the losses. We thus introduce μ ijt representing p ijt /g ijy and m + ijt equal to μ ijt when μ ijt > 0 and to zero otherwise, which is expressed by (20) and (21) (where M is a large enough constant, i.e. a big M constraint) The proxy of a line loss is thus The problem is formulated as follows:

MISOC:
Previous linear formulations all implied relaxations or approximations of the true problem. As mentioned in the introduction, we would like to assess their accuracy; we thus need a reference against which we can compare them. However, the true problem is non-linear and non-convex. We thus make a trade-off between accuracy and computational burden by choosing an MISOC formulation as a reference. This relaxation may be exact under certain conditions for radial networks and should have in any case a very good accuracy [5], which has been verified in the present case. It will thus be considered as the 'exact solution' of the problem hereafter.
In this formulation, we use different variables to represent physical quantities: C ijt represents the squared amplitude of line current and v it represents the squared voltage amplitude. Equations (23) and (24) express active and reactive losses and are written such that the only active constraint is the one corresponding to the actual amount of parallel lines between i and j (i.e. to the unique k such that loi ijky = 1), in order to avoid bilinear terms. Parameters r and x are the line resistance and reactance per unit length and M is again a large enough constant. Finally, (25) force active and reactive losses to be positive on every line. While being redundant, these constraints considerably tighten the resulting model Equation (26) expresses the fact that power flowing in a line is the product of node voltage and line current. It is relaxed as an inequality and has the form of a (convex) rotated SOC constraint

Equation (27) expresses voltage drops and is written in a way similar to (23) and (24). Equation (28) puts limits on voltages
Equation (29) is the line thermal rating constraint. It is a SOC constraint Finally, as proposed in [4], we introduce lower and upper bounds on voltage angle differences even if this formulation does not include angles explicitly. As a matter of fact, these constraints significantly tighten the model. For brevity, we only present the general form of these constraints using the set of available variables. The bilinear term g ijy v it can be replaced by an appropriate lift-and-project relaxation and 'big M' constraints similar to (23) and (24). The parameter θ Δ is the maximum angle difference allowed between two nodes

Test case
The approach described in the previous sections is applied to a 20-node case described in [8] on a 5-year planning horizon. Data for lines and loads consumptions for this case can be found in [9]. Hourly consumption patterns are generated using real measurements used in [10]. Two representative days of 24 h are considered for each year. We consider a unique size for generators (2 MW) and up to two lines placed in parallel between two nodes. The different models have been run on a 3.4 GHz Intel Core i7 processor with 8 GB of memory. The models are written in AMPL and solved with CPLEX 12.7 using benders decomposition. Fig. 1 represents the microgrid obtained with the MISOC formulation at the end of the planning horizon.

Results
In Table 1 Table 1 contain the percentage of lines and generators, respectively, that are located accordingly to the MISOC BTN solution. Finally, the last column of Table 1 compares the total generation capacity in the different solutions.
In Table 1, it can be observed that MILP flow, MILP 1 and MILP 2 offer a significant reduction in computation time compared to MISOC BTN while solution costs are very similar (<0.1% difference). Then, the position of the lines (network topology) is the same for all formulations. Finally, while the installed generation capacity is the same for all of them, only MILP 2 succeeds in capturing the same generators location as MISOC BTN. This is due to the inclusion of a penalty for line losses in MILP 2. Indeed, the precise location of a generator is not important if there are no losses while it is not true anymore when these are taken into account.
These results suggest that less accurate formulations perform reasonably well when compared to a more accurate one. However, these results need to be extended to other test cases and to larger sizes of problems.
As a matter of fact, in the test case presented above, there is only one generator size. Furthermore, even though two lines can be placed between each pair of nodes, the optimal network is only composed of branches with a unique line. Ampacity and voltage constraints are thus not binding in this test case.

Conclusion
In this paper, we have presented four different convex formulations of the joint microgrid planning problem. They have a growing degree of accuracy counter-balanced by a growing computation time. We compared the quality of the solutions obtained with less accurate formulations to a more accurate solution. First results show that significant savings in computation time can be achieved with a reasonably small loss of accuracy by using less accurate formulations. However, these results need to be confirmed on other instances of the problem. Future research will focus on confirming these results for a wider range of test cases on one side and including uncertainty related to power injections on the other side, to be able to consider RES for the microgrid-planning problem.

Acknowledgments
The first author was supported by a FRIA grant from the Belgian Fund for Scientific Research -FNRS.