Robust Placement and Control of Phase-Shifting Transformers Considering Redispatch Measures

: Flexible AC transmission systems (FACTSs) can maximize capacity utilization under time-varying grid usage patterns by actively controlling the power ﬂow of the transmission lines, e.g., with phase-shifting transformers (PST). In this paper, we propose an algorithm to determine the minimum number of PSTs and their location such that the grid can operate robustly for any realization of the (active) power set points from a known, continuous uncertainty set. As we show in our experiments, only considering a few extreme grid scenarios cannot provide this guarantee. The proposed algorithm considers the trade-offs between PST placement and operational decisions, such as PST control and redispatch. By minimizing the worst-case redispatch cost, it yields two afﬁne linear control policies for these as a byproduct. Power ﬂow is modeled as a constrained linear system, and the control design and actuator minimization tasks are formulated as a mixed-integer linear program (MILP). We also design a greedy algorithm, whose optimal value differs less than 20% from the MILP solution while being one to two orders of magnitude faster to compute. The proposed algorithm is evaluated for a small demonstrative 3-bus example and the IEEE 39 bus test system.


Introduction
Variable renewable energies from wind and sun are important to reduce the global carbon footprint of energy systems. At the same time, their variability creates novel challenges for both the design and the operation of transmission grids. Especially when large renewables capacities are localized in few regions with good natural resources, their power generation may lead to line overloads in the grid. Redispatch is a common measure to counteract these congestions, but it may be expensive. Grid capacity extensions are a last resort but typically require a long time to implement and are subject to societal resistances. Thus, utilizing active power flow control technologies in the grid is an attractive and often cost-effective option for grid operators. Flexible alternating current transmission systems (FACTSs) utilize power electronics to enhance the grid's controllability [1]. Examples include static var compensators (SVC), thyristor-controlled series capacitors (TCSCs), and thyristor-controlled phase-shifting transformers (PST), which are part of various grid development plans, e.g., in Germany (www.netzentwicklungsplan.de (accessed on 2 February 2023)).
An important question that naturally arises is where to place such FACTS devices in the power grid and how to control them. Maximizing the loadability of the system for one demand scenario considering various FACTS devices can be solved by genetic algorithms [2] or by the alternating direction method of multiplier (ADMM) [3]. Mixed integer linear programming (MILP) can be used for PST [4] or SVC [5] placement in the same one-scenario setting. Several scenarios are considered in approaches based on two-stage stochastic programming [6][7][8], which allows to account for the expected scenariodependent generation costs as well. All of these approaches do not guarantee system feasibility or the (re-)dispatch costs for situations outside the (typically few) considered scenarios. In our experimental section, we show that relying only on extreme generation situations may be misleading about the grid's feasibility for intermediate in-feeds.
In this paper, we propose an algorithm to find the minimal number and location of PSTs that can guarantee system feasibility and limit redispatch costs for all scenarios in a continuous uncertainty set. Considered uncertainty factors are renewable, and load fluctuations as well as the corresponding dispatch decisions are determined by markets or load-frequency control, see Figure 1. During PST placement, we take into account the grid operators' situation-dependent control options, such as specifying PST settings and redispatch orders to the attached power plants. Our algorithm thus produces, as a byproduct of the PST placement task, control policies to dynamically determine the PST settings and the redispatch orders. These policies are assumed to be affine linear in the uncertain factors in our work. They are chosen optimally in the sense that they minimize the worst-case redispatch cost in this class of controls. Since we consider the often strongly non-linear dispatch decisions by markets and frequency control as part of the uncertainty set, the linearity assumption for small to medium-sized redispatch corrections is plausible. In our proposed method, we model the power flow in the grid as a set of linear equations, similar to the approach used in [9,10]. However, we employ a robust optimization framework instead of relying on chance constraints to model the uncertainty in power injections. Doing so allows us to write the continuous part of the placement and control problem as a linear program, which is easier to solve than the second-order cone programs derived from chance-constrained optimization problems. The authors of [11] also use a robust optimization approach in the context of reserve scheduling in power systems with highly uncertain power injections. In our work, we extend this approach by also considering the optimal location of PSTs. The resulting robust optimization problem can be solved with MILP. It is worth noting that fuzzy logic represents a widely used alternative to handle uncertainty in power systems [12][13][14]. However, fuzzy methods may encounter scalability issues when dealing with the large-scale problems often encountered in power systems. Consequently, heuristics may be necessary to reduce solving times [15].

Redispatch
The uncertainty set considered in the robust optimization should be large enough to cover at least a selection of plausible scenarios and all mixtures of these. At the same time, the uncertainty set should not be too large in order to avoid excessive conservatism of the solution. We use principal component analysis (PCA) [16] based on a set of given scenarios to define the uncertainty set as a rotated hyperrectangle as in [17]. While the solution might be conservative, it is guaranteed to yield feasible system states for this continuous set.
Due to the computational expense of exact methods to determine the optimal placement of FACTS, various studies have suggested heuristics as a solution to this problem [18][19][20]. In this study, we also propose a greedy algorithm that yields near-optimal solutions while being much faster to solve than the MILP. It iteratively checks for improvement in the objective function when adding a PST to a transmission line in a hill-climbing fashion. In each iteration, the algorithm solves the linear programming relaxation of the proposed MILP and projects the fractional solution onto the feasible set of the original problem. While the maximum number of iterations grows linearly with the number of transmission lines in the grid, a parametrized stopping condition can drastically reduce the algorithm's search space. We demonstrate that for a realistically sized transmission grid, the greedy algorithm is more than 40 times faster to compute than the MILP and finds a solution with an objective value that is 17% greater. Despite a relatively big optimality gap for a planning problem, the solution of the greedy algorithm is still useful, e.g., in preliminary grid analyses.
Two examples are evaluated numerically. The first example with three buses stylizes a typical grid situation in Germany, where centralized wind power leads to loop flows through neighboring countries. The computed affine linear policies are compared against optimizing the redispatch separately for each scenario. We can show that considering only extreme scenarios with no or maximal wind generation are not sufficient to guarantee grid feasibility in all situations. The second example uses the IEEE 39 bus test case and real-world time series.
The remainder of the paper is structured as follows. In Section 2, we define the linear power flow model employed throughout this work. We give a formal problem definition in Section 3. Section 4 presents our proposed MILP formulation assuming that the uncertainty set is a (convex) polytope. In Section 5, we show how to construct the polytopic uncertainty set given a collection of renewable and load scenarios and their corresponding dispatch results. The numeric evaluation is described in Section 7. Conclusions are drawn in Section 8.

Power Flow Model
We use the common DC approximation [21] to linearly model the power flow in a transmission grid with N buses and L lines. Power line flows are denoted as p F ∈ R L , voltage phase angles as θ ∈ R N , and the phase shifts potentially added by the PSTs as φ ∈ R L . We then have where A ∈ R L×N is the grid's incidence matrix and B ∈ R L×L is a diagonal matrix with the line susceptances. Let x ∈ X ⊂ R P be the uncertain vector of power set points of the P generators/loads of the grid, where X is the corresponding uncertainty set. Moreover, let y ∈ R P denote the vector of power adjustments caused by redispatch actions. The power injections at the buses of the grid p I (x, y) ∈ R N are then given by where C ∈ R N×P is the matrix that maps generators/loads to the buses, at which they are connected to the grid. According to Kirchhoff's first law, the nodal power injections match the sum of the power flows on the connected lines, i.e., p I (θ, φ) = A T p F (θ, φ). By substituting (1) into the previous relationship and equalizing it with (2), it is possible to express the voltage phase angles of the buses θ as Since a constant shift of the phase angles does not change the physical situation, A T BA is not invertible, and we use the pseudo-inverse to obtain a minimum norm solution.
Substituting (3) into (1), the power line flows p F can be written as a linear function of the power set points x, the redispatch y and the phase shifts added by the PSTs φ as with E = BA A T BA + . Throughout this paper, I denotes the identity matrix with appropriate dimensions. This model allows us to express line capacity constraints as a linear function of the modeled uncertainties and the control decisions.

Formal Problem Statement
The optimization of the number and placement of PSTs needs to consider the control actions to be performed with them as well as the effect of redispatch measures that are important additional operational measures available to the grid operators. In this paper, we assume that the control policies for setting the phase shifts φ and the power adjustments y are affine linear functions of the system state, i.e., they depend linearly on the uncertain power set points x. We, thus, can write the policies as where φ(x) is parametrized by S ∈ R L×P and w ∈ R L , and y(x) by T ∈ R P×P and q ∈ R P . We now can formally define the optimization task we aim to solve in this work. We aim at determining the minimal set of PSTs and their location along with the control policies (5) and (6) such that the total worst-case redispatch costs and the PST installations costs are minimized while ensuring that the grid operates within its feasible region for any realization of the uncertain elements x. With u ∈ {0, 1} L indicating the placement of a PST at a transmission line and γ ∈ R being the worst-case redispatch cost, the optimization problem can then be written as min u,γ,S,w,T,q , (5), (6).
Here, 1 is a vector of ones with appropriate dimensions, and µ ∈ R ≥0 is a weighting factor between the cost for placing the PSTs in the grid and the worst-case redispatch cost. It should be chosen depending on the assumed probability of the worst-case redispatch situation. Vector c ∈ R L ≥0 denotes the maximum transport capacity of the lines, and φ ∈ R ≥0 is the PST technical constraint on the maximum allowed phase shift. Redispatch power adjustments y sum to zero and should not violate the situation-dependent physical limitations h(x), h(x) of generation or consumption for each element of x. An example of such bounds is h(x) = −x and h(x) = 0 for wind and solar power plants. We generally assume a linear relation, i.e., h(x) = h + Hx and h(x) = h + Hx, where H and H are diagonal matrices. Moreover, κ ∈ R P ≥0 represents the cost of increasing the power output of a generator/load by one unit.

Robust Optimization with Polytopic Uncertainty
In this section, we formulate a MILP model to solve the optimization task defined in the last section. By assuming a polytopic uncertainty set X , we are able to express the infinite number of robustness constraints as a finite set of linear constraints using duality properties.
To this end, we first use expression (4) and the parametrizations (5) and (6) to rewrite the constraints of (7) in compact matricial form, i.e., withÃ(S, T) andc(u, w, q, γ) being defined in (9) and (10), respectively, where · represents zero entries:Ã Next, we assume that the uncertainty set X of the power set points x is a polytope defined as the intersection of M halfspaces. That is, given the exterior representation of X with D ∈ R M×P and b ∈ R M , we assume that ∃υ ∈ R >0 such that ||x|| ≤ υ, ∀x ∈ X . In our experiments, the uncertainty set is guaranteed to be a polytope by construction as shown in Section 5.
Using (8) and (11), our optimization task is equivalent to the following min-max optimization problem: where K is the number of rows ofÃ j (S, T), [K] is the set {1, . . . , K},Ã j (S, T) is the j-th row ofÃ(S, T), andc j (u, w, q, γ) is the j-th element ofc(u, w, q, γ). We transform the min-max problem (12) into a single-stage linear program using duality theory. As X is nonempty and bounded, the inner optimization problem is always feasible, and hence its primal and dual problems have the same objective value by strong duality. We can thus rewrite (12) as η = min u,γ,S,w,T,q where λ j ∈ R M are the dual variables of the j-th inner problem. Optimization problem (13) can then be formulated as a single-level minimization problem: The equivalence between (13) and (14) can be verified by noticing that an optimal solution for (14) is also a feasible solution for (13) and that both objective functions have the same value. On the other hand, an optimal solution for the outer problem of (13) implies that there exists a λ that satisfies the constraints of the inner problem, and, thus, the solution would also be feasible in (14), and both objective functions would have the same value.

Robust Uncertainty Set
The optimization formulated above enables us to solve the robust PST placement problem as a MILP model given a polytopic uncertainty set X . As sketched in Figure 1, the influencing factors to be described via the uncertainty set are not only the renewable and load uncertainties but also the market and frequency control measures. These potentially large effects are determined via complex mechanisms, often showing highly non-linear behavior with respec to the loads and renewables. For example, the classic merit-order algorithm uses one power plant after the other in full, but it does not proportionally scale production levels. By including these factors in the uncertainty set, the linearity assumption for the remaining minor deviations from redispatch and active flow control can be justified.
To create realistic uncertainty sets, we propose to generate samples by creating a set of plausible renewable generation and load scenarios either from measurements or probabilistic models. For each scenario a market model, e.g., a simple merit-order dispatch, is used to compute the dispatch decisions. The full information is then used to generate a continuous uncertainty set X that covers the modeled scenarios but also the space in between, i.e., all (convex) combinations of them.
Given S scenarios of the uncertain vector of power set points x (k) , k = {1, . . . , S}, a first set enclosing all these points can be defined as However, as shown in Figure 2, this axis-aligned hyperrectangle can be large and lead to overly conservative solutions in case the components of x are highly correlated, which is usually the case in power systems (consider, for instance, that the wind or photovoltaic production in close by locations will typically be similar). To leverage these correlations between the different dimensions of the scenarios, we use PCA to compute a tighter, rotated uncertainty set as in [17].
T ∈ R S×P be the data matrix. We first center the data by subtracting them by their empirical meanẑ j = 1 S ∑ S i=1 X ij to obtain the matrix Z = X −ẑ1 T . Next, we calculate the empirical covariance matrix Σ ∈ R P×P as Σ = 1 S−1 Z T Z. Symmetric matrix Σ can be diagonalized, i.e., Σ = QΛQ −1 , where Q ∈ R P×P has the eigenvectors of Σ in its columns and Λ ∈ R P×P is a diagonal matrix with the corresponding eigenvalues on its diagonal. This allows us to construct a rotated, data-aligned hyperrectangleX aŝ where being the j-th elements of the row vectorsx andx containing the maximum and minimum values among the S scenarios in the direction of the principal components, respectively. With this approach, we are able to fit a possibly much tighter set to the scenarios by defining the uncertainty set X as the intersection betweenX andX , i.e., which is shown in Figure 2.

Greedy Algorithm for Solving Robust MILP
As the size of the grid increases, the runtime for solving (14) to optimality becomes too long as shown in our experiments (see Section 7). We, thus, propose a hill-climbing-like heuristic that iteratively checks whether adding a PST to a line decreases the value of the objective function. Each iteration relies on solving the linear programming relaxation of (14) and projecting the fractional solution onto the feasibility set of the original MILP. The algorithm performs, at most, L iterations, thus yielding polynomial time complexity. However, the solution of the proposed method is only guaranteed to be a local minimum on the solution space of the original MILP by nature of the hill-climbing procedure.
The algorithm first determines a lower bound for the objective function of (14) by solving its linear programming relaxation, as any solution of the (mixed-)integer program is a feasible solution of its linear relaxation. If the optimal solution of the relaxed problem has all values of u as 0 or 1, it will also be the optimal solution to the MILP. To obtain an upper bound, we can solve (14) with u fixed to the value of the solution to the relaxed problem rounded to the closest integer.
The algorithm proceeds in a hill-climbing fashion to improve the integer solution. With u * being the value of u from the solution to the relaxed problem, the algorithm places a PST into the line corresponding to the largest element of u * , i.e., it fixes element j = arg max i u * i of u to 1. If the line already has a PST, the algorithm adds a PST to the line corresponding to the next largest element of u * . With one of the elements of u fixed, the algorithm solves the relaxed problem and uses the rounded solution to update the upper bound of the objective function. The algorithm continues adding PSTs to the grid until the value of the objective function stops decreasing between iterations, or if the largest element of u * is smaller than some parameter ∈ [0, 1].
The pseudocode for the proposed greedy algorithm is presented in Algorithm 1, where ∅ is the empty set, L is the set of lines with PST, · is the round operator, and | · | represents the cardinality of a set. While the MAIN procedure implements the hill-climbing algorithm, the SOLVE procedure solves the linear relaxation of the original MILP (14) with the variables corresponding to the lines that are already equipped with PST being fixed to one. η * ←η * , u * ←û *

19:
return value of η, value of u 20: end procedure

Experiments
We demonstrate our proposed approach for two examples, a small 3-bus test grid and the IEEE 39 bus system. Our implementation uses the modeling language JuMP [22] and Gurobi [23] to solve the MILP model (14).

3-Bus Test Grid
We first apply the proposed algorithm to the grid in Figure 3. The figure also contains the values of the loads, generator limits and unit costs, as well as line capacities and susceptances. The unit cost of wind production has a negative value, mirroring precedence for renewable power generation over conventional one, as well as standard subsidy policies.  Power is represented in the per unit system (p.u.) for some base power value and costs in a generic currency ¤. The example is a stylized sketch of the situation in Germany, with much wind and lignite generation in the East and the load center and many gas power plants in the Southwest [24]. Bus 3 would then represent neighboring countries.
In Figure 4, we examine the operation patterns of the test grid when varying the available wind power from zero to its maximum capacity. Both wind sites are scaled proportionally. For each wind in-feed, we determine the cost optimal dispatch using the merit order algorithm. Demands that cannot be covered from wind alone are supplied by the lignite power plant first and then by the gas power plant. For each scenario, we then obtain a cost-optimal redispatch by solving (7).
As can be seen in Figure 4, no redispatch is needed when the wind is minimal or maximal: the merit-order dispatch is directly feasible. With no wind, the generation pattern is 2 p.u. at bus 1 and 2 p.u. at bus 2. With maximum wind, the generation is 3 p.u. at bus 2 and 1 p.u. at bus 3. A grid analysis based only on these two scenarios could conclude that the grid can be feasibly operated for all possible wind outputs without additional measures, such as PST placement or redispatch. However, this would be the wrong conclusion, since for 2 p.u. of wind, the generation pattern is 3.5 p.u. at bus 2 and 0.5 p.u. at bus 3, which leads to a capacity violation on line (2,3). This example thus proves that relying on few scenarios, as is often done for two-stage stochastic programming approaches due to computational limitations, is not enough to ensure universal grid feasibility. In contrast, our robust approach considers a continuous uncertainty with all (convex) scenario mixtures included. While for this low-dimensional example, one can obviously include average scenarios into a scenario-based analysis, this would be much more difficult in more complex, high-dimensional setups, where the number of required scenarios could be huge. Note that our approach scales only in the dimension of the uncertainties but not in the number of scenarios, which can grow exponentially with the number of uncertainty dimensions if an even cover of the scenario space is desired.
In Figure 4a,b, we also show the redispatch policies computed by solving (14). For Figure 4a, we choose µ such that no PST is installed, but higher redispatch costs are preferable, whereas in Figure 4b, the parameter µ is chosen to be small enough such that one PST on line (1,3) is optimal. Note that the derived values of the computed redispatch policy are not linear in the wind power production. However, they are affine linear in the dispatch, including the non-linear merit order results. Even for this low-dimensional example, the redispatch policies qualitatively resemble the optimal redispatch values computed for each scenario individually. For higher-dimensional examples, the linearity condition might even be less restrictive. For both cases, with and without PST, the implied worst-case cost by the computed affine linear policy matches the worst-case cost of the scenario-wise optimized redispatch schedule as shown in Figure 4c.  The example also shows that the redispatch cost can be reduced by increasing the controllability of the power flow in the grid with the addition of a PST. Figure 4d shows the angle shift added by the PST following the affine control policy as well as the amount of power flow redirected from branch (2,3) to (2,1). These settings ensure a feasible grid power flow in all situations. It is worth noting that in the "no wind" situation, the PST also redirects energy from line (2,3) to line (1,2), which helps increase the distance to the feasibility border since without PST interaction the line (2,3) would be fully loaded.

IEEE 39 Bus Test Case
We now examine a larger example, namely the IEEE 39 test case, which contains 39 buses, 46 transmission lines, 10 generators, and 21 loads as shown in Figure 5. The properties of the transmission lines, generators, and loads are based on the MATPOWER test cases [25]. To generate diverse usage scenarios, we proceed as follows. We start with an hourly load profile curve aggregated for a single country. Here, we use the Danish load from 28 September 2020 and 27 September 2021 to generate 8735 scenarios [26]. To obtain nodal load time series that are both realistically correlated but are also partly independent of each other, we normalize the given load curve by its maximum value to yield (t), t = {1, . . . , 8735}, and add randomness as follows: where d N i is the nominal value given in the IEEE test case for load i, and u i (t) is a sample of the uniform distribution U i (−0.2, 0.2). Merit order is used for the dispatch of the generators where the dispatch cost of a generator is taken proportional to the inverse of its maximum active power output. In Figure 6a, we show the dispatch of the generators for the first 200 consecutive time steps. The system without redispatch or PSTs is infeasible for the generated scenarios in the sense that the power flow over some transmission lines is larger than their capacity. We show in Figure 5 the transmission lines with the largest violations in red.
In Figure 6b, we show the power output of the generators when following the computed redispatch policy without any PST. This is achieved for very high PST installation costs in the MILP (14) problem. The optimal redispatch policy makes the power flow feasible for all scenarios, and the worst-case redispatch cost is 3.30 ¤. The cheap generator G1 produces less power than is economically optimal without considering grid constraints.  For Figure 6c, we solve the MILP (14), now lowering the PST installation costs significantly. With these settings, the algorithm proposes to install 1 PST between buses 1 and 39 as shown in Figure 5. Given this decision, it is possible to reduce the worst-case redispatch cost to 1.93 ¤ by using more power from the cheaper generator G1.
Optimality versus computation time is examined in Table 1, comparing the MILP and the greedy algorithm proposed in Section 6 for the same setting. The greedy algorithm is run with two different values of . With equal to 0.2, the algorithm does not propose the installation of any PST. If the value of is decreased to 0.06, the algorithm finds a better solution that yields 2.25 ¤ for the worst-case redispatch cost, an increase of 17% compared to the optimal solution of the MILP. In this solution, a PST is installed between buses 2 and 3. Using a local compute node with 22 cores, MILP optimality with a 10% gap was proven after 5 h and 48 min. While acceptable for grid-planning purposes, the computation time is relatively high. In the configuration with equal to 0.2, the computation time of the greedy algorithm is 116 times faster than solving the MILP, and it is 43.5 times faster for equal to 0.06. One could further improve the computational time of both the MILP and the proposed algorithm by, for example, restricting the affine linear maps to depend on principal components of the in-feeds only, thereby reducing the dimensions of S and T. Nevertheless, Table 1 shows that the proposed greedy algorithm outputs near-optimal objective values while being much faster to solve than the original MILP. The results show that the hill-climbing approach could be a valuable tool in preliminary analyses of PST placement, where sub-optimal solutions are acceptable. Then, once the final model is defined, the MILP can be run to find the optimal placement solution.

Conclusions
In this work, we presented an algorithm to find the minimal set of PSTs and the optimal phase shift and redispatch policies that enable the feasible operation of the transmission system for a continuous set of uncertain in-feed scenarios. We demonstrated our algorithm with two examples, proving that only considering a few extreme scenarios may not be sufficient to guarantee feasible grid states under all conditions and that the PST placement can significantly reduce the worst-case redispatch cost. The experiments also show that a proposed greedy algorithm can compute solutions much faster than the MILP, making it suitable for preliminary analyses on large grids. The proposed methodology can be easily extended to solve the optimal placement problem of different FACTS devices as long as a linear relationship model exists between their actuation and the grid power flow.