Impacts of Energy Flexibility in Transactive Energy Systems with Large Scale Renewable Generation

Modern day energy systems are evolving to be complex, interconnected and transactive systems, without clear demarcation between energy “producers” and “consumers”. This is aided by large-scale proliferation of renewables (both at a centralized scale as well as in more distributed settings such as rooftop solar) and the growing potential for demand-side flexibility. In this paper, we propose a mathematical framework which considers the interaction of energy flexibility and renewable generation in a transactive power system, where a grid operator can secure both generation and flexibility (storage) from centralized and/or distributed assets. Our results, derived under network-abstracted settings, mathematically relate the system operating cost to the available flexibility capacity. In addition, our proposed framework also characterizes the inflection point beyond which further addition of flexibility capacity do not affect cost of system operation. Furthermore, the relationship between the price spread in the grid, i.e., difference between maximum and minimum prices over the time horizon under consideration, and the available flexibility, is also commented upon. Finally, we demonstrate our findings on a modified IEEE 30 bus test network.


I. INTRODUCTION
M Odern day energy systems are evolving to be complex interconnected systems, without clear demarcation between energy "producers" and "consumers". This is aided by large-scale proliferation of renewable and distributed energy resources [1], a growing potential for energy flexibility [2], as well as the growing popularity of storage at different hierarchical levels of grid operation [3]. Furthermore, market operations are also moving away from unilateral and centralized decision making towards more distributed and transactive paradigms, whereby actors at different levels of grid hierarchy (ranging from individual energy prosumers to utility companies and system operators) are actively involved in energy transactions through intra-actor value exchanges [4]. The combined effects of these aforementioned factors necessitate detailed studies that characterize the effects of these factors on power system parameters such as system value, operational costs and resultant energy prices [5].
Recent literature has alluded to such problems, albeit from different perspectives. In [6], through data-driven experiments on Danish and German electricity market data, authors specifically identify how the volatility in power system prices varies as a function of several factors, including: the level of renewable penetration, grid characteristics and locational specificity. Similar observations are made by authors from a Spanish energy market perspective in [7], whereby the impacts of increasing variable renewable energy (VRE) on the volatility of energy prices is discussed in detail. In [8], authors examine how increasing the amount of wind generation in the Australian power system leads to a reduction in overall wholesale electricity prices. Again, in [9], authors study the problem of optimal placement of distributed wind generators within a power system, along with their eventual impacts on active (and reactive) power within the network and consequently, on electricity prices. A similar problem, but in the focused context of distribution networks, was studied in [10]. In [11], authors state that the impact of distributed energy resources (DERs) may also result into more spatially resolved nodal prices within the power network, thereby necessitating the rethink of traditional grid operation protocols. For a more in-depth review of the role of distributed generation on electricity prices, the reader is directed to [12]. From the demand-side perspective, the inherent flexibility in demand-side resources has a major role to play in electricity markets of the future [13], [14], [15], [16], [17]. In [18], authors propose an optimization-based architecture to unify centralized market clearing with decentralized responses of flexible demand to dynamic pricing. Subsequently, case studies demonstrating the effectiveness of the proposed algorithms in [18] were shown in [19], using electric vehicles and heat pump systems as representative flexible loads. The importance of value quantification of the inherent demand flexibility for renewable-dominant future power systems, especially in context of spot markets and ancillary markets, was identified and studied in context of the future German power system in [20]. A comprehensive study of the impacts of integrating demand-side flexibility into forward and reserve markets was also performed in [21], whereby it was noted how the energy recovery of flexible devices needed to be considered along with their impacts in reducing balancing needs from the reserve markets, for a more holistic value characterization. Moreover, the question of proper incentive design and energy trading constructs for optimal participation of flexibility in transactive power system operations is also of considerable importance [22]. The role of dedicated energy storage devices, in addition to more passive flexibility options (such as using building thermal mass and other deferrable loads), has also been proven to be crucial for power system operation, value characterization, [23], and consequently, on energy price formation [24], [25].
Throughout the aforementioned literature, we observe that even though certain specific aspects pertaining to renewable (and distributed) generation and power system flexibility have been analyzed in appreciable detail, these analyses are often done in disconnected silos. There remains the need for a generic unifying construct which assumes both renewable generation and power system flexibility, under the transactive energy exchange paradigm, and provides theoretical understanding of how system value (and hence derivative quantities like energy prices) change with respect to the level of renewables and/or flexibility embedded into system operation. In this work, we focus on addressing this issue. Note that by flexibility, we encapsulate any asset whose power consumption can be modulated as per requirement (within a bounded sense) and hence, can be generically represented as a virtual battery [26]. Examples of flexibility may entail dedicated storage devices such as batteries, or even passive storage through modulation of building thermal mass and other deferrable loads. Also in this work, we assume a transactive energy system, with finite distributed renewable generation and flexibility which can be utilized by the grid operator to facilitate optimal load-generation balancing. These exchanges of flexibility are usually guided by rational consumer preferences, which are modeled as "elasticity costs", especially when the flexibility is from passive sources such as building thermal mass. Under such settings, we provide a suite of theoretical results which provide insight into how overall system costs, and hence, electricity prices, vary as functions of the amount of flexibility embedded in the system. Furthermore, we theoretically characterize the limiting conditions of operation, beyond which a further increase in the total amount of flexibility do not affect resultant operating costs any longer. We also provide a result which relates the temporal price spread, i.e., the difference between maximum and minimum prices over the time horizon under consideration, with the available flexibility.
Our work can be contrasted with a recent work in [27]. Specifically, authors in [27] show (through a net load duration curve approach) how generation units are able to recover their costs and maximize profits under markets jointly operating on marginal pricing and scarcity pricing. However, unlike in [27], we focus on the extent to which flexibility capacity impact system operation costs, and by extension, energy prices. The rest of the paper is organized as follows. In Section II, we provide details of the system model, along with the problem statement. In Section III, we provide the main theoretical results of our analysis. We demonstrate our theoretical findings with a numerical study, conducted on a modified IEEE 30 bus network in Section IV. Finally, we provided concluding remarks and future directions in Section V.  Power System Model: Consider a time horizon [0, K], which is discretized into time-intervals of equal length ∆k. Let k denote any arbitrary time slot, such that k ∈ {0, 1, 2, . . . , K − 1}. We assume that the centralized power system operator has purview of both conventional and renewable generation resources. Let P G C ,k and P G R ,k be the total conventional and renewable generation respectively, at time k. Denote the limits of conventional generation as [0,P G C ] and renewable generation as [0,P G R ,k ]. Notice that the upper bound of renewable generation is time-varying, thus capturing its inherent intermittence.

II. SYSTEM MODEL
On the demand side, assume that there is an inflexible demand d k , associated with the power system. The notion of flexibility is explained as follows. The flexible power consumption/generation at time k is denoted as d f lex k . We model the dynamics of the available flexibility as a discrete first order dynamical equation, where x k is the instantaneous State of Charge (SoC). Mathematically, we have, where ∆k is the length of time slot between times k + 1 and k. The above representation of aggregated flexibility is similar to the virtual battery models employed in other works such as [28], [29], and [26]. Due to engineering constraints, the flexible power consumption/generation is bounded within where d andd are the lower and upper bounds of d f lex k . In some cases, especially when the available flexibility is not centrally owned by the grid operator and is being offered from passive sources such as building thermal mass, there can be a certain degree of elasticity cost to be incurred by the grid operator for using the flexibility. For example, in case the flexibility is being offered by modulating the usage of HVAC devices, the elasticity costs are directly indicative of the violation of building occupants' comfort bounds. We model such elasticity costs as follows. Assume that there is a preferred set-point, denoted as x des . The elasticity cost is now modeled as C e x des −x k 2 , where C e is the elasticity cost constant. Also note that, similar to [30], we assume a system with adequate transmission capacity (i.e., line capacities are sufficiently high) to ensure there is no congestion. This allows us to abstract the line flow limits from the modeling and focus the subsequent analysis on the interaction between renewable generation and available flexibility. Transaction Structure, System Value and Operating Cost: In the power system considered, the grid operator has the option of securing generation from multiple centralized/distributed sources. The cost of conventional generation is assumed to be quadratic, where ψ is the associated cost coefficient. The cost of importing power from the external grid is given as λ ext,k . Also, that the marginal cost of renewable generation is assumed to be zero (0) at all times. On the demand side, the cost of using flexibility is quadratic in x k (specifically C e (x des − x k ) 2 is the instantaneous cost) as described earlier in the section. From the grid operator's perspective, the notion of system value/utility is inversely related to its operating cost, henceforth denoted as J . These include the cost of procuring energy, above and beyond the zero marginal cost renewables, to meet the demand, and the cost of violating elasticity constraints associated with the flexible demand. Mathematically,

A. ECONOMIC GENERATION SCHEDULING
Given the definitions earlier in this section, we now define the grid operator's economically optimal scheduling problem as below.
In the above problem, the decision vector u is defined as (4) represents the loadgeneration balance, while equations (5) and (6) denote the generation limits. For renewable generation, the bounds can be treated as available forecasts, at the start of the decision horizon. Equation (7) denotes the bounds on the flexible resources, while equations (8) and (9) capture the temporal dynamics of the flexible resources. We assume that the depth of the available flexibility (i.e. x cap ) is directly proportional to the installed capacity of renewable generation. This assumption is consistent with literature, whereby it is observed that higher storage needs are often necessitated by a higher fraction of renewable energy in the generation portfolio [31]. The parameter α, is henceforth used to relate the available depth of flexibility to the maximum amount of renewables available in the system, i.e., x cap = α Also, as noted earlier, we omit network level flow limits from this optimization formulation in order to arrive at important network-abstracted theoretical insights (similar to [30]), subsequently presented in Section III. Additionally, we assume that the renewable generation and the inflexible demand is well forecasted throughout the analysis.

III. THEORETICAL RESULTS
The first result relates the optimal operation cost, as a function of the parameter α (which is reflective of the available storage/flexibility capacity in the system). For a given α ∈ Ξ, the associated optimal cost is given as: For α 1 and α 2 (such that α 1 ∈ Ξ, and Proof. The proof follows directly from the application of the envelope theorem (please see [32] for more details on the envelope theorem), which, when applied to P1, yields: where L is the Lagrangian of the problem given by (2)-(9), evaluated at optimality (u = u ). Then, we have, where µ storage is the optimal Lagrange multipler associated with the storage bound constraint (8). By Karush-Kuhn-Tucker conditions, we know that, µ * storage ≥ 0 and x cap ≥ 0, which implies that ∂L ∂α ≤ 0. As such, the optimal cost J * (α) is a monotonically non-increasing function of the factor α, thus proving that The proof relies on the fact that the optimal solution for a comparatively lesser flexibility availability (i.e., smaller value of α) is also a feasible solution for a case with a higher availability of flexibility. In the next result, we characterize the relationship between the optimizer, as well as the objective function value at optimality (for P1) and α.
Theorem 2. Let Ξ := [0,ᾱ] be the set which captures all feasible α (ᾱ being the maximum possible value of α). Then, the optimizer u : Ξ → R n , is a piecewise, affine function of α. Also, the optimal cost, i.e., J : Ξ → R is also continuous, convex, and piecewise quadratic in α.
Proof. The problem (2)-(9) is a parametric optimization problem with quadratic objective and linear constraints that exhibit linear dependency on the parameter α. Noting that Ξ is convex, the proof follows directly from [33] (Chapter 1, Theorem 2).
From Theorem 2, we can also claim that the resultant optimal energy prices, which are the the Lagrange multipliers associated with constraint (4) in P1, are also piecewise affine in α. We formally state this result as follows: Corollary 1. Suppose λ k (α) denote the Lagrange multipliers corresponding to constraint (4). Then, λ k (α), ∀k, are piecewise affine in α.
Proof. At optimality, Since, P G C ,k ⊆ u is a piecewise, affine function of α (as u (α) is an affine function of α as shown in Theorem 2), therefore it follows that λ k (α) is also piecewise affine in α. This completes the proof.
Since the optimal cost J is always non-negative (i.e., J ≥ 0), Theorem 2, along with Theorem 1, imply that there exists an inflection pointα such that, for any α ≥α, the optimal cost and hence the optimal dispatch variables are invariant. The following theorem provides upper bound on such an inflection point.
Proof. Let α be chosen such that .
Since equation (4) holds true ∀k, and x 0 = 0, we have, This implies that the optimal Lagrange multiplier µ storage (α) = 0 as the storage upper bound constraint is non-binding. Then, for all α such that x cap (α) > This implies that the optimal cost (and hence the optimal solution u ) remains unchanged if x cap (α) exceeds the net demand K−1 k=0 |(d k − P G R ,k )|∆k, which was the claim in this theorem.
Theorem 3 shows that there exists an inflection point beyond which adding more depth of flexibility does not improve the operating cost of the system. This result also proves the fact that the optimal depth of flexibility required in a system to optimize operation cost is related to the aggregated net demand experienced by the system.
In the next set of results, we consider a special case, where C e = 0 and 0 ≤ d k −P G R ,k ≤P G C i.e., there is no elasticity costs associated with using the available flexibility and the net demand is positive. In other words, this case corresponds to the case where the available flexibility is a dedicated storage unit (such as grid-scale batteries), owned centrally by the grid operator. Under such settings, we show how the difference between the maximum and minimum energy prices (i.e., the price spread) is monotonically decreasing.
Then, the optimal charging/discharging profile d f lex, k for the problem P1 satisfies: Proof. We begin by observing that We prove the theorem via contradiction and begin by assuming that Consider the following trajectory for the state of chargex k and charging/discharging profiled f lex k : which guarantees thatd f lex k is a feasible solution to P1 and the corresponding generation profile is given byP Note that the inequality is strict asx 0 = x 0 = 0 and x K < x K (by assumption), there must exist at least one time Lemma 1 shows that if the net demand is always positive and there are no elasticity costs, the terminal state of charge of storage will be equal to zero as the cost of having a nonzero terminal state of charge will lead to sub-optimality. The following theorem utilizes Lemma 1 to show that the price spread monotonically decreases as the amount of flexibility (storage capacity) in the system increases.
In order to show that the difference λ max (α) − λ min (α) monotonically decreases, we decompose the net demand Then, the optimal generation P G C = [P G C ,1 ; P G C ,2 ; . . . ; P G C ,K ] can be expressed as: It is easy to verify that the vectord is orthogonal tod σ + d f lex, as = 0 by Lemma 1 and d σ is orthogonal tod by construction. Then the squared norm P G C 2 = d 2 + d σ + d f lex, 2 due to orthogonality. Since d 2 is a constant, it can be dropped out of the objective and we can express the optimal objective as follows: The optimization problem P1 can then be reinterpreted as minimizing the overall deviation d σ from the average demandd. As such, the resulting demand profile d n (α) = d + d σ + d f lex, (α) is as close to the average demand as allowed by the constraints i.e., d n,max (α) − d n,min (α) is as small as possible (where d n,min (α) = min k d n,k (α) and d n,max (α) = max k d n,k (α)). Furthermore, if α 2 ≥ α 1 , then d n,max (α 1 ) − d n,min (α 1 ) ≥ d n,max (α 2 ) − d n,min (α 2 ) as it is clearly evident that relaxing the storage constraints (i.e., VOLUME 4, 2016 increasing storage capacity) would further help in flattening the overall demand. Since λ k (α) is an increasing function of the net demand d n,k (α) (from Corollary 1), we can conclude that λ max (α 1 ) − λ min (α 1 ) ≥ λ max (α 2 ) − λ min (α 2 ) when α 2 ≥ α 1 .
Qualitatively, Theorem 4 shows that as the amount of flexibility (storage capacity) in the system increases, the arbitrage opportunities (characterized by the difference between the maximum and minimum price) reduces monotonically. It can also be commented that the difference λ max − λ min will be non-zero if there is not sufficient flexibility in the system to flatten the demand profile.

IV. NUMERICAL STUDY
In this section, we demonstrate the theoretical results derived in Section III on a modified IEEE 30-bus test network. We assume two representative 24-hour scenarios: (a) Scenario 1, where the source of renewable generation available is wind, and (b) Scenario 2, where the source of renewable generation is solar. We use representative demand data, as adapted from [34], and use solar and wind generation profiles in Oregon, USA for demonstration purposes. In Scenario 1, note that the total available wind generation exceeds the demand during hours 06:00 to 14:00 (a period characterized by strong wind resource), following which the wind resource drastically drops to less than 25 MW for the remainder of the day. In Scenario 2, the total available solar generation is assumed to exceed demand between peak daytime hours (09:00 to 16:00). Unless otherwise specified, we consider the case where C e = 0 (synonymous with storage being centrally owned by the grid operator). Also, due to the aforementioned assumption, we refer to storage and flexibility interchangeably in this section, unless specified otherwise. FIGURE 2: Total demand and total renewable generation profiles selected in the numerical study. Scenarios 1 and 2 correspond to renewable resources being wind-and solarbased, respectively.
In the first suite of results, we discuss how the storage SoC and corresponding energy prices, vary over the studied 24 hours of the day. From Figure 3 (Scenario 1), we can observe that as the available storage capacity increases (reflected by an increasing value of α), the storage is utilized to absorb the excess wind generation, between hours 05:00 and 15:00, following which it is discharged to cater to the demand, when renewable resources are scarce. The degree of storage utilization also increases with increasing values of α, which is in turn, reflective of available storage capacity. Beyond α = 0.4, the additional capacity of storage added is observed to remain unused, thereby suggesting that the inflection point, as characterized by Theorem 3, lies between 0.4 and 0.5. In Figure 4, we also show the corresponding energy prices over the 24-hour horizon of the study, for Scenario 1. When there is no available flexibility (storage), the prices are observed to be high between hours 15:00 to 23:00 (reaching a peak in hour 21:00). This is driven by the scarce renewable resource available during this time, along with concurrently high demand. As available storage capacity increases, we observe that prices decrease, and beyond α = 0.4, the prices reach zero for all time slots. This shows that beyond the inflection point, which lies between 0.4 and 0.5, there is enough storage capability to absorb the excess wind generation during its high availability, to be subsequently utilized for catering to demand in a later part of the day. In this case, no generation from conventional generators are required to service the demand, thereby reaffirming the observation that prices are zero at all times. We also show the charging/discharging patterns of the energy storage in Figure 4, from where it can be confirmed that the storage is charged using excess available renewable generation and discharged to cater to demand whenever there is deficit of renewable generation.
In Figure 5, we plot the prices in a given time slot, as a function of α for Scenario 1. We report this for two different hours -i.e., hour 15:00 and 21:00. In both these cases, we can clearly see how prices vary as a continuous, piecewise affine function of α (as proved in Corollary 1). Note that in the hours demonstrated, the prices are also observed to be monotonically decreasing although this may not always hold theoretically. In Figure 6, we show the variation of λ max − λ min , i.e., the price spread, over the 24-hour horizon under study, as a function of α for Scenario 1. We can observe that the price spread is monotonically decreasing with respect to α, and beyond a certain value, becomes constant, thus supporting the statement of Theorem 4. Similar results for Scenario 2, i.e., when the renewable resource is solar-based (in contrast to wind-based, as assumed  Our next suite of experiments focus on highlighting the impact of the parameter C e on the usage patterns of the flexibility and the resultant formation of prices (i.e., λ k ). Realistically, this can correspond to a case where the embedded flexibility is not centrally owned by the grid operator as mentioned before in Section II. In this case, it can be assumed without loss of generality that there is a preferred setpoint of operation (we assume x des = 0.5 in our studies). The centralized grid operator is assumed to be able to utilize the flexibility, subject to a penalty cost, which is captured as : Variation of the price in selected hours, with respect to varying levels of α, for Scenario 2 (solar-based RE).
where C e > 0 is the elasticity cost, as explained in Section II. This setting also highlights the transactive nature of the value exchange on the demandside, whereby the centralized grid operator is leveraging the functionality/value of a decentralized demand-side resource (in this case the embedded demand-side flexibility), in lieu of a service cost (modeled here as elasticity costs). We explore a setting where the renewable resource considered is solar (Scenario 2), with α held constant at 0.2. From Figure 11a, it is clear that as C e increases, the optimization solution changes. Since we assume the desired state of charge to be 0.5, as the elasticity cost increases, the optimal solution tries to maintain the desired state of charge (i.e., least penalty) for as much time as possible. This has a bearing on the way the flexibility can be utilized within the dispatch problem. Therefore, this also affects formation of prices, as shown in Figure 11b. When the cost of elasticity is sufficiently high (as shown for the case where log C e = 5), the increased priority towards maintaining x des = 0.5 subdues the amount of flexibility that can be used towards catering to the demand as part of the dispatch solution, and hence, increased support from external import is needed (as compared to cases where log C e < 5), which drives up the prices in the evening hours (16:00 to 23:00).

V. CONCLUSIONS AND FUTURE WORK
In this paper, we studied the interaction of flexibility and renewable generation within a transactive power system, with respect to dispatch solutions and resultant price formation. Through theoretical analysis considering a networkabstracted grid dispatch model, we were able to show how cost of operation monotonically decreases with increased availability of flexibility. We also showed how price formation is dependent on the total capacity of flexibility available, and how the price spread (i.e., difference between maximum and minimum prices) monotonically decreases, with increasing availability of flexibility. Our analysis considers a transactive energy exchange model where generation is available from multiple sources (at a premium) for the grid operator -this includes both external (import) as well as internal (dispatchable as well as renewable) resources. We also considered a cost of utilizing the flexibility embedded in the power system, especially when such resources are extracted by centrally modulating passive resources (such as building thermal mass). Furthermore, in a simulation environment, we also demonstrated how different costs of using the available flexibility can impact the dispatch solution, and hence, price formation in the power system under consideration. Our results can (a) Storage State of Charge (SoC) fraction, over 24 hours, for different values of Ce (α is assumed to be 0.2 for all cases). Also, RE resource is considered to be solar-based.
(b) Prices over 24 hours, for different values of Ce (α is assumed to be 0.2 for all cases). Also, RE resource is considered to be solar. be beneficial for understanding the first order interactions of grid scale flexibility resources and renewable generation within a transactive (as opposed to a vertically integrated) grid structure with high fractions of renewable generation in the generation mix. Such studies can serve as the cornerstone for more detailed analyses, which are necessary to answer questions related to topics including (but not limtied to) optimal flexibility/storage sizing, their placement (in case the flexibility asset is centrally owned by grid operator), optimized market structures to incentivize maximal participation from decentraliezd DERs to offer flexibility, within the realm of transactive energy design.
Although our system models inherently consider a flexibility model which is generic, we do not categorically analyze different types of flexibility technologies, ranging from those which offer medium/longer term grid services and applications (such as energy arbitrage), to those which have high charging/discharging potential but limited capacity and are hence, ideal for fast-responsive grid services (such as regulation). The case studies considered in this paper implicitly consider cases where medium/longer term storage capacity (centrally owned by grid operator) is considered. Considering other types of storage technologies (such as fast-responsive flywheels etc.) and investigating the consequent ramifications on market formations (at possibly different temporal scales) are interesting research questions, and will be considered as part of future work. Also, we consider a network-abstracted structure with adequate transmission capacity which enables theoretical understanding of the interaction between renewable generation availability and flexibility, but does not consider locational impacts. The flow constraints, when added, are slated to impact the solutions in non-trivial ways and therefore merit investigation, and as such, will be considered as part of our future work.