A Scalable Formulation for Look-ahead Security-Constrained Optimal Power Flow

—We consider the look-ahead security-constrained optimal power ﬂow (LASCOPF) problem under transmission line and generator contingencies. We ﬁrst formulate LASCOPF under the N − 1 contingency criterion ( LASCOPF 1 ) using the DC power ﬂow model. We observe that the number of decision variables in the comprehensive formulation increases quadratically with the number of look-ahead intervals, T , making the problem infeasible to solve for large T . To overcome this, we propose the reduced LASCOPF problem ( LASCOPF-r 1 ) in which the number of decision variables increases only linearly with T . Thereafter, we prove that, barring borderline cases, if LASCOPF 1 is feasible then the optimal solutions of LASCOPF 1 and LASCOPF-r 1 are equivalent. We then extend our results to the N − k contingency criterion ( LASCOPF-ru k ) for any collection of k contingencies, and we prove that the ordering of the contingencies does not affect the optimal solution. We then illustrate LASCOPF 1 on a simple 2-bus 2-generator system. We show the numerical beneﬁts of the proposed LASCOPF-r 1 formulation on the IEEE 118-bus, the IEEE 300-bus and the 2383-bus Polish systems.

ramping limits in one dispatch interval contingency c ∈ C G , respectively 1 N represents the set of natural numbers.T He optimal power flow (OPF) problem aims at mini- mizing generation cost over a single dispatch interval, and has been fundamental to power system operation ever since its inception [1].It has, however, been recognised in recent years that due to increasing amounts of intermittent generation capacity [2] single interval OPF has to be extended to take into account the ramping capability of generators and the dependence between subsequent dispatch intervals [3].
This dependence is accounted for by the Look-ahead OPF (LAOPF) problem [4].LAOPF minimises the total generation cost over multiple consecutive dispatch intervals (called the planning horizon), taking into account generator ramping constraints and demand forecasts, and is particularly useful in case of large anticipated changes in net demand [5].The solution obtained for the next dispatch interval is used for dispatch instructions and locational marginal pricing, while that for subsequent intervals is advisory [6].The algorithm is executed again based on the updated predicted demand after the dispatch interval according to the principle of receding horizon control [7].This look-ahead and receding horizon operation is illustrated in Fig. 1, where for expositional clarity, we consider that all intervals in the planning horizon are of equal duration.Although several LAOPF implementations include unit commitment, our discussion will be limited to dispatch and not commitment.
The importance of the dependence between subsequent dispatch intervals has been confirmed by industry, and Indepen-dent System Operators (ISOs) have recently shown increased interest in LAOPF for real-time operation of power systems with five minute dispatch intervals, often called multi-interval real-time markets.LAOPF is already implemented by the New York ISO (NYISO) [8], the California ISO (CAISO) [9], the Midcontinent ISO (MISO) [10], Ontario's Independent Electricity System Operator (IESO) [11], and the PJM Interconnection [12] while the Electric Reliability Council of Texas (ERCOT) has proposed the approach [13].It is also being considered in Australia [14].Several ISOs also consider flexible ramping products (FRPs) as a proxy to LAOPF [15].FRPs are akin to reserve capacity in that they ensure that there is sufficient ramping capability in the system to manage large deviations in demand between consecutive dispatch intervals.When there is sufficient ramping capability, ISOs can safely implement single interval OPF, which has a computational advantage over LAOPF, but a potentially suboptimal outcome.Besides accounting for the dependence between subsequent dispatch intervals, existing LAOPF implementations at ISOs as well as recent works e.g.[3] consider some form of security constraints as well.
In the literature, security constraints were first considered for single dispatch interval OPF, called security constrained OPF (SCOPF) [16].The SCOPF was initially formulated considering outages in transmission lines [17], but more recent works on SCOPF consider outages in generators or in both [18].The model in [19] considers generation reserves (which allow recovery from generator contingencies), but does not explicitly consider any security constraints.More recently, [3] considered LAOPF with generation reserves, but without explicit treatment of security constraints.
The integration of security constraints into LAOPF results in the Look-ahead security constrained OPF (LASCOPF) problem [20] where the authors considered the DC model under the N − 1 contingency criterion.To overcome the vast computational complexity, they decompose the problem into multiple SCOPF problems where a message passing algorithm is used to model the effect of ramping constraints between consecutive dispatch intervals.Their LASCOPF formulation is also used by a variety of ISOs, i.e., they enforce ramp rate constraints between successive base case dispatches, and enforce transmission contingency constraints on each base case dispatch, but they do not account for outaged equipment in one interval remaining outaged in subsequent intervals.
In this paper, we propose a LASCOPF formulation that models the entire planning horizon in the normal state as well as under generator contingencies.Our model ensures security against contingencies in any interval and accounts for the shutdown of a contingent component for the remainder of the planning horizon.Accordingly, the contributions of the this paper are twofold.First, we propose a formulation for LASCOPF using the DC power flow model considering both transmission line and generator contingencies under the N − 1 contingency criterion, LASCOPF 1 .This formulation suffers from high computational complexity as the number of decision variables is quadratic in the length of the planning horizon.Second, we prove analytically that the number of decision variables in the LASCOPF 1 formulation can be  reduced, leading to LASCOPF-r 1 .This formulation is scalable, with size (number of decision variables) linear in the length of the planning horizon as opposed to quadratic.We then extend our proof to the N − k contingency criterion, leading to the reduced LASCOPF-r k .We present numerical results that demonstrate the reduction in computational complexity in practical applications.Table I provides an overview of the literature on LAOPF, SCOPF and LASCOPF, including our contribution.
The rest of this paper is organised as follows.Section III presents the LASCOPF 1 formulation.Section IV presents the reduced LASCOPF-r 1 formulation and proves its equivalence to LASCOPF 1 .Section V extends the results to the N − k contingency criterion, LASCOPF-ru k .Sections VI and VII provide illustrative examples and numerical results, respectively.Section VIII discusses extensions of the model and numerical techniques that allow faster computation of the proposed formulations, and Section IX concludes the paper.

III. COMPREHENSIVE LASCOPF
We begin with the LASCOPF 1 problem over a planning horizon of length T , under the N − 1 contingency criterion using the DC power flow model.We assume that any transmission line contingency b ∈ C L or any generator contingency c ∈ C G can take place in any interval u, and a contingency is fully specified by the combination of element, c ∈ C G or b ∈ C L , together with the contingency interval, u.The normal state dispatch of generator g in interval t is denoted by p (0) g,t and the post-contingency dispatch under generator contingency c ∈ C G , where the contingency occurred in interval u, is denoted by p (c,u) g,t for t > u.Then, the dispatch is implemented as illustrated in Fig. 2 where it is assumed that interval t = 0 is the interval of execution of the problem, corresponding to the earliest planning horizon in Fig. 1.Given the set of contingencies as input, the LASCOPF subject to: (Normal state constraints:) (Transmission line contingency constraints: (Generator contingency constraints:) Objective function (1a) is the cost of generation in the normal state over T look-ahead intervals, assumed to be convex.Due to the design of the power system the probability that a contingency occurs is very low and is thus hard to estimate.Therefore, it is common practice in the literature to not consider the cost of generation under contingencies [14], [18].For the normal state, the power balance, generation capacity, normal transmission line capacity, and ramping constraints are (1b), (1c), (1d), and (1e), respectively.In (1d), K {0} l would typically be the long term or steady state transmission line capacity.The normal state also preventively satisfies transmission line contingency constraints (1f), i.e., under a transmission line contingency, where it is conservatively assumed that the dispatch remains the same as in the normal state.Accordingly, K {b} l in (1f) is typically the short term or emergency transmission line capacity, where ∀b ∈ C L .The outaged transmission line may then be restored, e.g., by an automated re-closure process, without a deviation from normal dispatch.When a generator contingency takes place, the affected generator typically cannot generate for the remainder of the planning horizon as represented by constraint (1g) which would require a change in the dispatch of the remaining generators to compensate for the generation shortfall.In addition, to compensate for the loss of generation in the system, load shedding may be required as represented by the power balance constraint (1h).Here, the total shed load is typically less than the lost generation Accordingly, for the generator contingency state, generation capacity, and ramping constraints are (1i), and (1j), respectively.For generator contingencies, one typically uses short term transmission line limits allowing us to ignore transmission line constraints.The corrective dispatch instruction is employed in dispatch intervals t > u (see Fig. 2).Therefore, for interval t = u + 1, the ramping constraint between the generator contingency and normal states is given by (1k).
Observe that for T = 1, LASCOPF 1 is equivalent to single interval SCOPF.Since the contingency interval satisfies u ∈ N, u < T = 1, i.e., u ∈ ∅, we cannot consider any corrective generator contingencies.Also, it is useful to note here that our formulation is different from existing formulations of LAOPF, as implemented at certain ISOs [20].Those formulations require security with respect to a particular contingency, but they do not model that for a given contingency scenario the generator is not available for the rest of the planning horizon as we do in (1j), i.e., they only consider t = u + 1 in contingency states.Therefore, they only consider ramping constraints in (1k) and ignore those in (1j).Also, they do not have to consider u explicitly since it is implicitly given by t.Our model enforces (1j), and is thus, a more comprehensive formulation of LASCOPF.
Owing to the dependence of p (c,u) g,t , t > u on the interval u in which the contingency would happen, the number of decision variables and hence constraints is proportional to T (T − 1)/2 as can be estimated from Fig. 2.This O T 2 dependence renders the problem infeasible for large values of T .We present a detailed analysis of the problem complexity in Appendix A.

IV. REDUCED LASCOPF: LASCOPF-r 1
To overcome the O T 2 dependence of LASCOPF 1 , we now propose a reduced formulation called LASCOPF-r 1 (C L , C G ), which differs from LASCOPF 1 only in that the contingency state decision variables p (c) g,t are independent of u.LASCOPF-r 1 is formulated as subject to: (Normal state constraints of the same form as (1b) to (1e):) (5b) to (5e), (Transmission line contingency constraints of the same form as (1f):) (5f) (Generator contingency constraints:) In LASCOPF 1 , the dependence on u arises due to constraints (1j) and (1k), and the value of u determines which constraint would apply to decision variable p (c,u) g,t .In LASCOPF-r 1 , the equivalent constraints are (2j) and (2k), respectively.However, since the decision variable p (c) g,t is independent of u, it has to satisfy (2j) and (2k) simultaneously so that the same contingency dispatch can be used no matter when the contingency happens as illustrated in Fig. 3.
Note that LASCOPF 1 and LASCOPF-r 1 are identical for T = 2 .To see why, observe that the contingency interval u ∈ N, u < T , i.e. u ∈ {1}.Since contingency state decision variables exist only for a single value of u, imposing independence of u in LASCOPF-r 1 results in the same set of decision variables as that of LASCOPF 1 .Thus, it is only for Owing to the independence of p (c) g,t from the interval u in which the contingency would happen, the number of decision variables and constraints in LASCOPF-r 1 is proportional to T , as can be estimated from Fig. 3.We present a detailed analysis of the problem complexity in Appendix A. Intuition says that as a result LASCOPF-r 1 would be more scalable than LASCOPF 1 ; this intuition is confirmed by our numerical results presented in Section VII.Also, due to the independence of the dispatch from u, LASCOPF-r 1 happens to consider the same number of contingency states as existing LAOPF formulations, and hence, it would have the same number of decision variables.The significant difference between these problem formulations is the additional consideration of (2j) in LASCOPF-r 1 .We expect that the addition of this constraint does not increase the computational complexity much while allowing for a more comprehensive consideration of contingencies.
In the event of a generator contingency, barring borderline cases, all generation levels for LASCOPF 1 would at least be equal to the normal state generation levels in the same interval, i.e., p g,t ∀g ∈ G, g = c, even if we account for load shedding.In what follows we show that under these conditions solving LASCOPF-r 1 is equivalent to solving LASCOPF 1 .
such an optimal solution then the optimal objective values of LASCOPF 1 and LASCOPF-r 1 are equal.
Proof: We begin by showing that LASCOPF-r 1 is feasible then LASCOPF 1 is feasible.To do so, observe that for LASCOPF 1 and LASCOPF-r 1 the normal state variables p (0) g,t |g ∈ G, t ∈ N, t ≤ T , and the normal state constraints (1b) to (1e) and (5b) to (5e) respectively are identical.Thus, any p (0) g,t |g ∈ G, t ∈ N, t ≤ T that is feasible for LASCOPF 1 is feasible for LASCOPF-r 1 and vice versa.Also, given any p Next, consider that LASCOPF 1 is feasible and has a solution such that p Under this condition, we prove that LASCOPF-r 1 is feasible.Also, if an optimal solution satisfies this condition then LASCOPF-r 1 has the same optimal objective value as LASCOPF 1 .We begin by observing that the objective (2a) is a function only of the normal state variables p To do so, we will show that given a dispatch interval t = t and a contingency c = c , for all values of the contingency interval u < t, u ∈ N, the feasible regions g∈G Y g be the feasible region defined by (1j) for g,2 if g = c .Similarly, let Z = g∈G Z g be the feasible region defined by (1e) for t = 3, c = c and u = 2 such that Z g = R if g = c and Observe that since the problem is feasible, we have p (c ,1) g,3 g∈G . In the next step, we show for = ∅.To show this, let us first consider (1e) for t = 2, which is satisfied by p (0) g,2 .After rearrangement we get ( Consider now (1k) for t = 2 and u = 1, which is satisfied by After rearrangement we get Since, LASCOPF 1 is assumed to be feasible, we know that p g,1 exists, and we obtain which implies We are now ready to show that there is a dispatch p (c ) g,3 for LASCOPF-r 1 that satisfies constraints (2g) and (1i) to (2k).Observe that constraints (2g) and (2i) are identical to (1g) and (1i) for t = 3 and c = c since the latter are independent of u.Additionally, observe that (2j) is equivalent to (1j) for and that (2k) is equivalent to (1k) for u = 2 since we have chosen equal values for the normal state dispatch in LASCOPF-r 1 and LASCOPF ∀g ∈ G.So far we have shown the proof for t = 2 and t = 3.We can repeat the above analysis for time t = t , t > 3 starting with t = 4 in increasing order.First, note that we can set In what follows we generalise LASCOPF-r 1 to the N − k contingency criterion, i.e., the system should remain secure when up to k contingencies occur in the planning horizon.Accordingly, we include security constraints for r transmission line contingencies, (b 1 , . . ., b r ) and s generator contingencies, (c 1 , . . ., c s ) for all r, s ≥ 0, r + s ≤ k.For notational simplicity, we consider that up to one generator contingency can occur in a single dispatch interval.Since security against transmission line contingencies is preventive, we could have multiple in a single interval.Then, LASCOPF-r k (C L , C G ) can be written as minimise Observe that H {b1,...,br} ln can be calculated as a simple extension of H {b} ln [21] and only depends upon the set of contingencies {b 1 , . . ., b r }, and not the order in which they would take place.Since the security against transmission line contingencies is preventive, the ordering of a transmission line contingency w.r.t. a generator contingency is also insignificant allowing us to completely disregard when they occur.For the generator contingency state (c 1 , . . ., c s ), ramping constraints now have to be with state (c 0 , . . ., c s−1 ) instead of the normal state, where c 0 represents the normal state.This makes the ordering of generator contingencies significant.Observe that for b r ∈ C L , C L will vary with the contingencies {b 1 , . . ., b r−1 } that have already taken place since a contingency can only occur once in a single component and the set of lines that do not partition the system may change.Similarly, for c s ∈ C G , C G will vary with {c 1 , . . ., c s−1 }.The transmission line contingency constraints have to be considered over a combination of r contingencies and the generator contingency constraints over a permutation of s contingencies, for r + s ≤ k.
In what follows, we propose the formulation LASCOPF-ru k , defined as LASCOPF-r k subject to p (c1,...,cs) The additional constraint requires the contingency state solution to be independent of the order in which contingencies take place.Thus, for this formulation it suffices to consider generator contingency constraints to be a combination instead of a permutation of s contingencies.In what follows we show that under certain conditions LASCOPF-r k is equivalent to LASCOPF-ru k .
Theorem 2. If LASCOPF-ru k is feasible then LASCOPF-r k is feasible and if LASCOPF-r k is feasible and has a solution such that either i) p (c1,...,c 1 s ) has such an optimal solution then the optimal objective values of LASCOPF-r k and LASCOPF-ru k are equal.
Proof: We begin by observing that if LASCOPF-ru k is feasible then LASCOPF-r k must be feasible since the former simply has the additional constraint (7).Next, consider that LASCOPF-r k is feasible and has a solution such that either (i) or (ii) satisfies (6g) to (6k).Under this condition, we will prove that LASCOPF-ru k is feasible and that if an optimal solution satisfies this condition then LASCOPF-ru k has the same optimal objective value.To do so, first observe that the objective (6a) is a function only of the normal state variables p (0) Let us now consider s = 2 contingencies, dispatch interval ∈ X g , and p (c 2 ,c 1 ) Here, X = g∈G X g .Also, let Y = g∈G Y g be the feasible region defined by (6k) for t = 3, if g / ∈ {c 1 , c 2 }.Similarly, let Z = g∈G Z g be the feasible region defined by (6k) for .
In the next step, we show for g / = ∅.To show this, let us first consider (6k) for t = 2 and c 1 = c 1 which is satisfied by p (c 1 ) g,2 .After rearrangement we get Consider now (6k) for t = 2 and c 1 = c 2 , which is satisfied by p (c 2 ) g,2 .After rearrangement we get Since, LASCOPF 1 is assumed to be feasible, we know that p (0) g,1 exists, and we obtain Next, observe that p (c 2 ,c 1 )
This implies for the lower boundaries of ∈ X ∩ Z, which also satisfies (6h), implies for the upper boundaries of .
Therefore, there must exist p {c 1 ,c 2 } g,3 g∈G ∈ X ∩ Y ∩ Z satisfying (6h).Consequently, (7) is feasible.So far we have shown the proof for t = 2, and t = 3.We can repeat the above analysis for time t = t , t > 3 starting with t = 4 in increasing order.First, note that we can set . Then, observe that for t = t (6j) is identical for the pair c 1 = c 1 and c 2 = c 2 , and the pair c 1 = c 2 and c 2 = c 1 .We can show this ∀c 1 , c 2 ∈ C G .Then, we can add one contingency at a time and repeat the above analysis, considering one pair of contingencies at a time, to set p (c1,...,cs) g,t = p {c1,...,c2} g,t ∀c 1 , . . ., c s ∈ C G , ∀g ∈ G, ∀t ∈ N 0 , s < t ≤ T , which proves that feasibility of LASCOPF-r k implies feasibility of LASCOPF-ru k .Conversely, if LASCOPF-ru k is feasible, LASCOPF-r k is also feasible since the latter does not contain constraint (7).This concludes the proof.

VI. ILLUSTRATIVE EXAMPLE
In what follows, we illustrate LASCOPF on the 2-bus 2generator system shown in Fig. 4 with parameters shown in the following table.g C g,t (x) {0} n,t ∀c ∈ C G .First, we consider LAOPF (formally equivalent to LASCOPF 1 (∅, ∅), i.e., with empty contingency sets) for this system with a planning horizon of T = 5 to serve as a benchmark against which to compare LASCOPF.Observe that C 1,t (p) < C 2,t (p) ∀t ∈ {1, . . ., 5}, the total demand is less than P 1 in all intervals, and the difference in demand between successive intervals is within the ramping limits of generator In addition, generator 2 has no minimum generation limit, P 2 = 0, and the transmission line capacity constraints are not violated, ∀l ∈ {1, 2}, t ∈ {1, . . ., 5}.Therefore, generator 1 can serve all the demand as follows.
As can be seen, LAOPF favours a dispatch where the cheapest generator generates all the demand since the demand is less than its maximum generation limits.
In what follows, we consider LASCOPF under generator contingencies C G = {1, 2} and no transmission line contingencies C L = ∅ (i.e., LASCOPF 1 (∅, {1, 2})) in order to demonstrate the effect of generator contingencies on the normal state.First, we consider a planning horizon of T = 4. Since generator 1 is cheaper, it should generate as much as possible, but the solution has to satisfy the security constraints, i.e, if generator 1 had a contingency in interval u, generator 2 would have to satisfy all demand in interval u + 1.Thus, due to the ramping limit of generator 2, it always has to generate enough to ensure D Consequently, the solution is as follows.
Observe that at t = 4 there are no security constraints, allowing generator 1 to serve all demand.To summarise, the security constraints in LASCOPF 1 (∅, {1, 2}) ensure that the more expensive generator 2 maintains a minimum generation in order for it to be able to ramp up to serve all the demand in case there was a contingency in the cheaper generator 1.This results in an increased generation cost in the normal state as compared to LAOPF, which is to be expected since the normal state faces more constraints.
In what follows, we consider LASCOPF 1 (∅, {1, 2}) under a planning horizon of T = 5 to demonstrate how security constraints may render the problem infeasible.Observe that there is no feasible dispatch p 2,4 ≤ R 2 .Under a contingency in either generator 1 or 2 the other generator will be unable to ramp up to meet all the demand.Thus, LASCOPF 1 (∅, {1, 2}) for T = 5 would be infeasible.
Finally, let us also consider transmission line contingencies C L = {1, 2} in order to demonstrate their effect, i.e., LASCOPF 1 ({1, 2}, {1, 2}) for a planning horizon of T = 4. Observe that transmission line contingencies, being preventive, would even apply to t = 4, unlike generator contingencies.This allows us to isolate their effect from that of generator contingencies on the normal state dispatch in interval t = 4.The security constraints require the normal state dispatch to satisfy transmission line capacity constraints if line 1 has a contingency.In this case, [21].Therefore, the dispatch has to ensure that p   As can be seen, LASCOPF 1 ({1, 2}, {1, 2}) has the same dispatch as LASCOPF 1 (∅, {1, 2}) up to t = 3.In t = 4, transmission line security constraints ensure that if either one of the transmission lines fails, the remaining transmission line can continue to supply power to bus 2 within its limits.Accordingly, the generation by the cheaper generator 1 should be less than the minimum of the two transmission line capacities.This increases the generation by the expensive generator 2, increasing costs.In Appendix II, the effect of security constraints on larger systems.

VII. NUMERICAL RESULTS
First, we demonstrate for our proposed LASCOPF-r 1 the scalability for large T and its computational advantage over the LASCOPF 1 formulation for the IEEE 118-bus and the IEEE 300-bus systems [22].For both systems, we consider the data as provided with the following modifications.We consider demand and C L = L.As an illustration, for the IEEE 118-bus system the difference in problem size between LASCOPF 1 (G, L ) and LASCOPF-r 1 (G, L ) when T = 26 is as follows.Fig. 5 shows the computational time of the formulations as a function of the planning horizon, T using Gurobi Optimizer Version 8.1.Observe that the comprehensive formulation is infeasible to compute for large values of T in all cases and in general for the IEEE 118-bus system when transmission line constraints in [23] are included.These results show the clear advantage of the proposed reduced formulation, as it reduces the computational time by two orders of magnitude.Also, observe that including transmission line constraints in the problem significantly increases the computational time.This establishes the efficiency of the proposed LASCOPF-r 1 for larger planning horizons.Second, we consider the 2383-bus Polish power system [22] to illustrate scalability to large systems, and the computational advantage of LASCOPF-r 1 over LASCOPF 1 and of LASCOPF-ru 2 over LASCOPF 2 .We consider the data as provided with demand D g,0 = p original g , ramping limits −R g = R g = 0.25 P g − P g , C G = {1, 2}, and C L = ∅.As an illustration, for the Polish system the difference in problem size between LASCOPF 1 ({1, 2}, ∅) and LASCOPF-r 1 ({1, 2}, ∅) for T = 10 is as follows.Fig. 6 shows the computational time of the formulations as a function of the planning horizon, T using MATPOWER [22] version 6.0 2 .The results show that for LASCOPF-r 1 ({1, 2}, ∅) the computational time increases linearly in T , as opposed to the quadratic trend for LASCOPF 1 ({1, 2}, ∅).Thus, LASCOPF-r 1 ({1, 2}, ∅) is computationally more efficient, with an increasing advantage as the length of the planning horizon increases.Similarly, for T > 2 the computational times of both LASCOPF-r 2 ({1, 2}, ∅) and LASCOPF-ru 2 ({1, 2}, ∅) follow a linear trend.For T = 2 all formulations have the same computational times, in accor-dance with our discussions in Sections IV and V.For T > 2 LASCOPF-ru 2 ({1, 2}, ∅) is computationally more efficient than LASCOPF-r 2 ({1, 2}, ∅), which confirms the efficiency of the proposed formulations for larger systems.

A. Use of Benders Decomposition to Obtain Solutions
In what follows, we discuss how Benders decomposition [24] may be used to allow us to compute LASCOPF 1 and LASCOPF-r 1 faster.Observe that LASCOPF 1 has a block structure where normal state decision variables can be grouped as p (0) g,t |g ∈ G ∀t ∈ N, t < N , i.e., into T blocks of size |G| with constraints (1b) to (1d) and (1f).Similarly, contingency state decision variables can be grouped as p 2 blocks of size |G| with constraints (1g) to (1i).Each such group is depicted as a circle in Fig. 2. Furthermore, the objective function is decomposable into functions over individual normal state blocks.Then, it is only the ramping constraints (1e), (1j) and (1k) that couple blocks to one another as represented by arrows in Fig. 2. Taking advantage of this block structure, nested Benders decomposition can be used to compute the problem more efficiently.To see how to do so, consider interval t < T .We can consider the normal state block p (0) g,t |g ∈ G defined by t = t to be a master problem with the subproblems being • the normal state block p |g ∈ G defined by contingency c , contingency interval u < t and t = t can be considered to be a master problem with the subproblem being the contingency state block p Similarly, we can observe a block structure in LASCOPF-r 1 .However, here we will define 1 block p consisting of the normal state and contingency states for all contingencies c.Each such block corresponds to all the circles for a given interval t in Fig. 3.The circles have to be grouped into blocks because a single contingency state decision variable is constrained by both ramping constraints (2j) and (2k) as represented by arrows in Fig. 3.Then, given interval t < T the block defined by t = t can be defined as the master problem with the subproblem being the block defined by t = t + 1.If this is done ∀t ∈ N, t < T , we obtain a nested master-subproblem structure and can use nested Benders decomposition for solving it.

B. Contingency filtering
In what follows, we discuss how contingency filtering [25] can be applied to the presented LASCOPF formulations under both the N − 1 and N − k criteria.Observe that the set of transmission line contingencies C L could be any subset of the generators L. Similarly, the set of generator contingencies C G could be any subset of the generators G.This allows us to apply contingency filtering and consider a restricted set of only those contingencies C L ⊂ L and C G ⊂ G that are expected to be binding in any realisation of LASCOPF.
Contingency filtering may be taken a step forward by eliminating not only entire contingencies from the formulation but also individual contingency constraints that are not expected to be binding even if some other constraints deriving from the same contingency are retained [17].E.g., given contingency c , (1i) may be eliminated but (1g) may be retained.
Note that, no matter the extent to which we perform contingency filtering, LASCOPF-r 1 will always maintain an advantage over LASCOPF 1 , and LASCOPF-ru k over LASCOPF-r k .This is because we would identify the same set of entire contingencies or corresponding sets of individual constraints to be eliminated from the reduced formulations as we do for the comprehensive formulations.Therefore, the number of decision variables and hence also the overall number of constraints will remain lower in the reduced formulations.

C. Partitioning following transmission line contingencies
In what follows we will show that our results extend to transmission line contingencies that partition the system.Consider that the system is partitioned into a set N = {N 1 , . . ., N N } of N islands, where N i is the set of buses in island i.Each island must satisfy the power balance constraint n∈Ni g∈G where superscripts may be added to p g,t and D n,t to distinguish the normal and particular contingency states.Therefore, transmission line contingencies that partition the system must be treated as corrective contingencies similar to generator contingencies since following a contingency power balance must be recovered in the resulting islands.Accordingly, in order to account for system partitioning, we may simply consider C G ⊆ G ∪ L\L .Furthermore, in LASCOPF 1 , LASCOPF-r 1 and LASCOPF-r k we may replace the power balance constraints (1h), (2h) and (6h) with (11).Observe that constraints representing generator shutdown (1g), (2g) and (6g) only apply to generator contingencies.
Under the N − 1 contingency criterion, due to partitioning, the assumption that p (c,u) g,t ≥ p (0) g,t ∀g ∈ G would not hold since a transmission line contingency would create imbalances of opposite directions in the two islands formed.However, it is reasonable to assume that in each island N i either all contingency generation levels are not less than the normal generation levels, i.e., p (c,u) g,t ≥ p (0) g,t ∀g ∈ G, g = c, n∈Ni A ng = 1 or are not greater than those, i.e., p Accordingly, to show that LASCOPF-r 1 is equivalent to solving LASCOPF 1 , Theorem 1 can be modified as follows.
Theorem 3. If LASCOPF-r 1 is feasible then LASCOPF 1 is feasible, and if LASCOPF 1 is feasible and has a solution such that either i) p LASCOPF 1 has such an optimal solution then the optimal objective values of LASCOPF 1 and LASCOPF-r 1 are equal.
The proof is similar to that of Theorem 1.We note that transmission networks have sufficient redundancy by design so that partitioning would typically result from multiple contingencies.

D. Contingency Reserve Limits
In what follows we show how to derive contingency reserve limits [19] from LASCOPF 1 .Since LASCOPF 1 explicitly considers every generator contingency, the contingency reserve limits are implicit in (1i).This eliminates the need for the surrogate constraint, where S g,t and S g,t represent the lower and upper contingency reserve limits respectively.Instead, we can obtain the parameters S g,t (and similarly S g,t ) from our formulation as S g,t = min 0, p (c,u)

IX. CONCLUSION AND FUTURE WORK
We considered LASCOPF under the N − 1 contingency criterion over transmission line and generator contingencies.We showed that the O T 2 decision variables in the comprehensive LASCOPF 1 formulation can be reduced to O(T ) decision variables leading to the new LASCOPF-r 1 formulation, with significantly lower computational cost.We generalised the formulation to the N −k contingency criterion, LASCOPF-ru k for which we showed that the order in which the contingencies occur can be ignored.Our evaluation of the proposed problem formulations on three IEEE benchmark systems shows that our results are an important step towards computationally efficient solutions to the LASCOPF problem.
An interesting extension of our work would be to provide analytical or numerical methods to handle the large number of variables in LASCOPF-ru k .In particular, it is useful to employ decomposition techniques such as Benders decomposition, investigate their complexities and compare their efficiency for our reduced formulations.In addition, the theory developed in this paper using the DC power flow model has a straightforward extension to the non-linear AC power flow model.One could use existing numerical techniques to handle the non-convexity of ACOPF [18] and implement our reduced formulations in the ACOPF context.
In addition, one may extend the formulations to include costs under contingencies and reserve costs.Observe that Theorems 1 and 2 do not hold if the objective is a function of the contingency state generation levels since LASCOPF-r 1 and LASCOPF-ru k effectively impose constraints on contingency state generation levels as compared to LASCOPF 1 and LASCOPF-r k , respectively and thereby potentially increasing the optimal objective value.Accordingly, one may investigate the differences in operational costs (including costs under contingencies and reserve costs) between LASCOPF 1 and LASCOPF-r 1 , and between LASCOPF-r k and LASCOPF-ru k .Based on this, for a given system one may weigh the expected operational cost against the computational efficiency for individual systems.

APPENDIX I PROBLEM COMPLEXITY A. Comprehensive Formulation: LASCOPF 1
To analyse the complexity of LASCOPF 1 , we now consider the number of decision variables and constraints.For the normal state, we require |G| × T decision variables, one for each generator, for each interval.Then, (1b) represents T equality constraints, one for each dispatch interval.2 inequality constraints, two for each generator contingency, for each remaining generator (i.e., |G|−1), for each contingency interval, for each remaining interval.To summarise, the LASCOPF 1 problem requires 2 inequality constraints.Observe that the number of variables and the number of constraints increase quadratically in T which renders the problem formulation computationally infeasible for large T .

B. Reduced Formulation: LASCOPF-r 1
Contrary to LASCOPF 1 , the proposed LASCOPF-r 1 formulation has decision variables for generator contingenciesthat Relative generation cost with and without security constraints as a function of relative ramping limit for the IEEE 14-bus system.Generation cost is relative to the corresponding minimum cost in LAOPF and ramping limit is relative to generation range.
are independent of u.Therefore, we only require one variable for each generator contingency, for each generator, for each dispatch interval in which a contingency could be realised, In Table II we survey some state-of-the-art algorithms to solve linear and quadratic programming problems.Common to all the algorithms is that complexity is increasing in both number of decision variables m and the number of bits needed to model the problem L. Since LASCOPF-r 1 has both m and L following O (T ) as opposed to LASCOPF 1 which follows O T 2 , it is expected to be more computationally tractable, as we have demonstrated in Section VII.

APPENDIX II ILLUSTRATION OF LASCOPF ON LARGER SYSTEMS
In this appendix we compare the proposed LASCOPF 1 (L, G) formulations to LAOPF (mathematically equivalent to LASCOPF 1 (∅, ∅)) for common benchmark systems: the IEEE 14-bus, the IEEE 118-bus, and the IEEE 300-bus systems in [30].Fig. 7 shows the normalised total cost and the cost in a single interval as a function of the ramping limit for the IEEE 14-bus system obtained using LAOPF and LASCOPF 1 for 0 ≤ −R g = R g ≤ P g −P g .We use T = 26 dispatch intervals,  , C G = G, C L = L.In addition to the total cost we show the cost in interval 2, which has the highest difference in cost between LAOPF and LASCOPF 1 for −R g = R g = 0.498, the point at which LASCOPF 1 becomes feasible.Observe that the increase in cost is less than 0.1% indicating a low cost of security.For LAOPF the curves of the total cost and cost in interval 2 intersect indicating that for lower values of R g , there are other intervals that have a larger relative cost.Also, since the curves for LAOPF and LASCOPF 1 meet, it indicates that transmission line security constraints are not binding for high ramping limits.Fig. 8 shows, for the IEEE 14-bus system, the dispatch in every interval for LAOPF and LASCOPF 1 when −R g = R g = 0.498.Observe that the dispatches in intervals 1 to 10 are different in both cases, as the expensive generators have a higher generation in LASCOPF 1 .Comparing intervals 1 and 13, we can observe that the dispatch for the same demand is different for LASCOPF 1 .This is because, at interval 13, the demand is decreasing and following a contingency, the cheapest generator can alter generation within ramping constraints.Nonetheless, the dispatch is identical for LAOPF since the increase at interval 1 equals the decrease at interval 13 and −R g = R g .This is also confirmed from Fig. 7 where the flat curve indicates that ramping constraints are not binding.Interval 2 has the highest difference in cost due to a combination of high absolute demand and rate of increase in demand.
Fig. 9 compares costs of LAOPF and LASCOPF 1 for the IEEE 118-bus with transmission line constraints as in [23], and the IEEE 300-bus systems.We used the same method as for the IEEE 14-bus system.For the IEEE 118-bus system transmission line constraints are binding only when their limits are decreased to about 1% of their value reported in [23].Also, the relative cost for LAOPF for a single interval does not decrease monotonically with the relative ramping limits.This happens because LAOPF minimises the total cost and not the cost in a single interval, underlining the importance of the look-ahead framework.For the IEEE 300-bus system, interval 6 has the highest difference in cost since the total demand is a large fraction of the total generation making ramping constraints in interval 6, which has a large demand, most binding.

Fig. 1 .
Fig. 1.Illustration of LAOPF computed over a planning horizon of four intervals, executed in every dispatch interval.The solution for the next dispatch interval is implemented (dark), the rest is advisory (shaded).H {0} ln , H {b} ln power transfer distribution factor of line l for injection at bus n for the normal state, and under contingency b ∈ C L , respectively Decision variables p (0) g,t , p (c,u) g,t generator dispatch in the normal state, and under contingency c ∈ C G , respectively II.INTRODUCTION

Fig. 2 .
Fig. 2. Illustration of change from the normal state to the contingency state when contingency c ∈ C G is observed in interval u ∈ N, u < T for LASCOPF 1 .

Fig. 3 .
Fig. 3. Illustration of change from the normal state to the contingency state when contingency c ∈ C G is observed in interval u ∈ N, u < T for LASCOPF-r 1 .

1 .is feasible for dispatch interval t = 2
each other.Therefore, LASCOPF-r 1 can use a single decision variable p (c ) g,t g∈G to represent the generation levels ∀u ∈ N, u < t .First, consider dispatch interval t = 2, and a contingency c = c .Let p (c ,1) g,2 g∈G be a feasible set of dispatch during interval t = 2 for contingency c occurring during interval u = Consider now the corresponding LASCOPF-r 1 formulation, and contingency c = c , since constraints (1g) to (1i) and (1k) for u = 1, and constraints (2g) to (2i) and (2k) for c = c define identical feasible regions for t = 2. Let us now consider dispatch interval t = 3 and contingency c = c , and let p (c dispatch for LASCOPF 1 for the contingency occurring during interval u = 1 and u = 2, respectively.Let X be the feasible region defined by (1g) and (1i) for t = 3 and c = c .Since constraints (1g) and (1i) are independent of u, the variables p (c ,1) g,3 ∈ X g , and p (c ,2) g,3

and let p (c 1 ,c 2 )for contingencies c 1 = c 1 and c 2 = 1 ,c 2 )
c 2 , and p (c 2 ,c 1 ) g,3 g∈G for contingencies c 1 = c 2 and c 2 = c 1 be feasible sets of dispatch for LASCOPF-r k .Without loss of generality, let us consider that p (c 1 ) g,2 ≤ p (c 2 ) g,2 ∀g ∈ G. Let X be the feasible region defined by (6g) and (6i) for t = 2, c 1 = c 1 , and c 2 = c 2 .Since constraints (6g) and (6i) are independent of the ordering of contingencies, the variables p (c

Fig. 5 .
Fig. 5. Computational time of the comprehensive and reduced formulations for the IEEE 118-bus system and the IEEE 300-bus system.

Fig. 8 .
Fig.8.Generator dispatch with (left bar) and without (right bar) security constraints for the IEEE 14-bus system over a planning horizon.

Fig. 9 .
Fig.9.Relative generation cost with and without security constraints as a function of relative ramping limit for the IEEE 118-bus (left) and IEEE 300bus (right) systems.Generation cost is relative to the corresponding minimum cost in LAOPF and ramping limit is relative to generation range.
∈ X ∩ Z, which also satisfies (1h), implies for the upper boundaries of X g ∩ Z g ∀g ∈ G that g∈G,g =c min P g , R g + p n∈N D {c} n,3 .Therefore, there must exist p (c ) r k and LASCOPF-ru k only differ in the contingency state, it is sufficient to show that p , . . ., c s ∈ C G , ∀t ∈ N 0 , s < t ≤ T .First, let us consider a feasible instance of LASCOPF-r k .It is trivial to see that if s = 1, then p

TABLE II COMPLEXITY
OF LP AND QP ALGORITHMS LP : Linear programming, QP : Quadratic programming m : number of decision variables, L : bits needed for model