Making green power purchase agreements more predictable and reliable for companies

of production uncertainty to REPs, increasing the chance that REPs adopt batteries. We further study how having batteries for REPs affects their own revenue as well as the reliability of their energy predictions for buyers. We use analytical and simulation approaches to propose a decision tree for a win-win PPA structure, which improves reliability for buyers while maintaining profitability for REPs.


Introduction
Companies with large energy consumption are under pressure to reduce their carbon footprints. More than half of Fortune 500 companies have committed a fraction of their energy demand to be served by renewable energy sources [1]. Most companies cannot (or prefer not to) install sufficiently large renewable energy generators (e.g., solar panels and wind turbines) themselves, due to land restrictions and other complexities. Instead, they commonly engage in bilateral contracts, called power purchase agreements (PPA), with renewable energy producers (REP) to buy their energy production. PPAs are becoming increasingly popular among companies. The total energy contracted through PPAs increased by 40% in 2019, accounting for more than 10% of the overall annual new renewable energy capacity [2].
PPAs are used for various types of bilateral energy trading, depending on the types of sellers and buyers [3]. In particular, a renewable-based corporate PPA is a bilateral contract between an energyconsuming company, who commits to buy future energy generation of a REP for predetermined agreed-upon prices [4]. 1 Such a contract is financially attractive to REPs (as sellers), particularly to finance their generation facilities. This is because a PPA brings price certainty for the future uncertain energy generation of REPs (unlike facing uncertain electricity market prices). Buyers (Companies) are primarily attracted to PPAs to meet sustainability targets. However, the production uncertainty of REPs in PPAs can bring financial and technical challenges for buyers [5]. Indeed, as companies continue to increase their sustainability targets, production uncertainty in PPAs becomes more detrimental, and this has discouraged many companies from participating in PPAs [1]. The energy uncertainty that buyers are facing in PPAs endangers their sustainability targets over the long term and complicates serving their energy demand in the short term. Buyers in PPAs need estimates of future energy availability from REPs to plan for the most reliable and economical backup procurement, such as trading in day-ahead electricity markets. Typically, sellers in PPAs must provide estimates of their expected available generation, perhaps by hiring forecasting consultants [6]. It has been observed that even in the simplest form of production uncertainty (On/Off), sellers might misreport their energy availability to buyers as a risk-sharing and revenue-maximizing strategy [7]. Thus, one can expect that misreporting might also exist for renewable-based corporate PPA with much larger consequences for buyers. To prevent this, buyers in PPAs are typically given the right to audit sellers at any time. This right of auditing acts as a lever to prevent the costly misreporting behavior of REPs and to encourage more accurate prediction reports [6,8]. However, this might not be sufficient, especially because auditing is costly for buyers and it cannot happen frequently enough to prevent rapid and costly mismatches. Thus, it is essential to find other incentives for REPs to provide their best estimates of future production. Pricing and structural mechanisms in PPA contracts can encourage REPs to provide more reliable predictions. Indeed, there are many design options in PPAs that, if chosen properly, can attract potential sellers and buyers [6, 8,9]. As PPA structures incorporate stricter mechanisms against inaccurate predictions, REPs may find storage to be an attractive investment decision to improve their revenue [10]. For buyers, storage is expected to help REPs provide more reliable predictions. These two objectives are not necessarily aligned. Thus, in the presence of storage, it is important to find win-win contractual solutions that simultaneously benefit buyers by improving energy prediction reliability, and REPs by improving revenue. Despite the fact that contractual solutions can improve energy predictions in PPAs, little is known about how they should be chosen, especially in the presence of storage. Indeed, according to PWC [5], the lack of knowledge on how to strategically set up a PPA is the main barrier that prevents companies from engaging in them. In a CDP questionnaire [1], 44% of companies express that they struggle with translating their targets into PPA terms.
Inspired by this research gap, we outline a win-win contractual solution for a PPA that improves prediction reliability for the buyer while maintaining financial attractiveness for the REP. Our contractual solution entails recommendations for PPA pricing mechanisms and structural choices. We provide a decision tree that recommends how to structure a PPA in a win-win fashion. In particular, in the case the REP owns storage, the proposed decision tree determines PPA pricing mechanisms and structures that encourage storage to be used in a way to benefit both the REP (by improving revenue) and the buyer (by receiving more reliable predictions). We show how other PPA pricing and structure choices can encourage REPs to systematically over/underreport their future production.
Our work falls into the category of model-driven decision support systems, which are based on quantitative mathematical modelling accompanied by limited data/information from the system to recommend the best decisions [11,12]. We study the problem using both simulation and formal analysis, benefiting from the strengths of each approach. Our work contributes to the state of the art in multiple dimensions. First, we focus on an under-studied feature in the PPA literature and provide a promising solution for it. To be more precise, this is the first study to focus on the problem of energy reliability in PPAs for buyers, formulating win-win contractual solutions. Second, we advance the literature on renewable-based PPAs by analyzing the impact of storage on REP behavior and how it is affected by PPA structure and pricing. Third, we use and extend the theory of 'stochastic network calculus' (SNC) to understand the impact of storage sizes on PPAs. Under some simplifying assumptions, our formal analysis shows that increasing storage size can improve the buyer's utility from the PPA at a faster rate than it improves the seller's utility. This implies that REPs might have incentives to expand their battery sizes to the extent that it is profitable for themselves, but possibly deteriorates value for buyers. This suggests that PPAs should entail limitations on storage sizes used by REPs to help storage be used in a win-win fashion. We also formulate such storage sizes under simplifying assumptions. Fourth, combining our simulation and analytical findings, we develop a decision tree for the pricing and structure of a win-win PPA structure.
The remainder of the paper is organized as follows. In the next section, we review the related literature. In Section 3, we discuss the PPA model. We formulate how PPA pricing and mechanisms affect the reported predictions and revenue of REPs without storage in Section 4 and with storage in Section 5. Under some simplifying assumptions, in Section 6, we analytically study the asymptotic impact of storage sizes on the energy reliability for buyers and profitability for REPs. We complement these findings by being more extensive and more accurate through simulation and numerical examples in Section 7. We provide a summary of implications and present our proposed decision tree for a win-win PPA structure in Section 8. Finally, we conclude the paper in Section 9.

Related literature
PPAs are among the important features of electricity markets. They are used for many different purposes, such as economic development, reducing prices, managing uncertainties in delivery, and/or prices [3]. Among all types of PPAs, renewable-based PPAs are increasingly drawing attention [6,8]. In a renewable-based PPA, the seller is a REP, but different entities can act as the buyer. Some studies consider a profitseeking energy trader as the buyer, which buys energy from a REP with fixed prices and trades it in the electricity market with uncertain prices [13,14]. Other studies consider a corporate PPA, in which the buyer is a company, seeking to use green energy to serve its energy demand [15]. The objectives and settings of these two types of buyers (trader versus company) differ substantially. In this work, we focus on renewablebased corporate-PPAs.
The literature on PPAs can be categorized by perspective. Most studies focus on the seller's perspective (e.g., [13]) and fewer on the buyer's perspective (e.g., [7,15]). In this work, we combine the buyer's perspective (in terms of energy reliability) and the seller's perspective (in terms of financial attractiveness) to propose a win-win PPA structure. Existing literature also considers a variety of decision variables. Some studies assume the PPA structure is given and operating/investment strategies are decision variables. For example, for a given PPA, Lei and Sandborn [13] obtain the most profitable schedules for wind turbine predictive maintenance operations from the seller's standpoint. Other research focuses on designing features of PPAs to align with the seller's or the buyer's targets. For example, Tranberg et al. [14] provide a scoredriven model to improve predictions of Value-At-Risk of a PPA for the buyer through pricing mechanisms. Our work falls in this category. Finally, the literature can also be classified in terms of single/multi-PPA scenarios. We envisage a scenario in which a company participates in one PPA with a REP to serve part of its energy demand. While most literature focuses on single PPA scenarios (e.g., [7,13]), there are also scenarios in which both companies and REPs engage in multiple PPAs, simultaneously (e.g., [16]).
Our work is the first attempt to use the flexibility of the PPA structures to address the problem of prediction reliability of PPAs for buyers in a win-win fashion. To the best of our knowledge, it is also the first attempt to investigate how REP storage investment can affect the prediction reliability for buyers, and how PPA structure can be used to create win-win solutions. Perhaps the closest research to our work in terms of setting and objectives is by Wu and Babich [7], which considers the unit-contingent PPA approach. They envisage an energy trading company as the buyer and a (non-renewable) power plant with two states of availability (On/Off) as the seller. Assuming asymmetric supply availability information, they show that the seller has an incentive to misreport its supply availability. While this work conceptually resembles ours, there are major differences. First, only the seller knows the realized energy generation. The buyer can pay to audit the seller to check for possible misreporting. However, in our application, the actual predicted value is not visible to the buyer, but the realized deliverable value is. Second, we use PPA pricing mechanisms as the solution, while they use auditing as the solution. Third, accounting for a REP (as the seller) with storage is an important and relevant new element in our work.
Our work also relates to the literature addressing the challenges of selling intermittent supply in forward markets, where mismatches with realized values are adjusted in real-time markets. This problem exists in general commodity markets [17] as well as gas [18] and electricity markets [19]. The challenge of integrating REPs with uncertain production into existing electricity markets has drawn significant attention in the research community (e.g., [20][21][22][23][24]). Some studies consider coupling renewables with natural gas power producers [25,26] or demand response [27] to hedge against their uncertainty. Our work also relates to studies focused on using energy storage to hedge against the uncertainty of renewables. Energy storage can be used for multiple applications and purposes. For example, storage can be used independently for price arbitrage (e.g., [28][29][30]). In addition to arbitrage, when storage is coupled with REPs who participate in electricity markets, it can also be used for hedging against production uncertainty [31]. The optimal bidding strategy and charging schedule of storage to maximize profit in such cases can be addressed with dynamic programming (e.g., [21,32]). Even though there are some similarities between the REP trading in a PPA and in electricity markets, there are major differences between the two. For example, in a PPA, prices in the agreement are predetermined, while in electricity markets there is price uncertainty and the possibility of price arbitrage. Moreover, the buyer in a PPA is known and unchanged throughout the entire PPA term, but this is not the case in an electricity market. These, among other fundamental differences in the problem setting, make it infeasible to apply the literature on one case to the other.

Power purchase agreement (PPA) model
We envisage a renewable-based corporate-PPA in which a company commits to buying future energy generation of a REP. We adopt a classical renewable-based PPA structure [6,13]: the REP provides a prediction of future energy deliveries (aka forward commitment) to the buyer. For each unit of forward commitment, the buyer pays the REP a fixed "unit forward" price c d (see Appendix B for notation). Once the actual available energy is realized, financial adjustments will be applied. The REP will pay a penalty price of c s (typically larger than c d ) per unit of energy shortage and will receive (from the buyer) a rebate of c e (typically smaller than c d ) per unit of excess energy.
Buyers need to receive these predictions at both long-term and shortterm intervals, respectively, to ensure that they satisfy their long-term carbon emission reduction targets and to plan for the simplest and most economical set up to serve their short-term energy demand mismatches. By the definition of the World Business Council for Sustainable Development (WBCSD) [10], deviation from short-term estimates of energy generation is called "shape risk", and deviation from the overall generation at the end of PPA is called "volume risk". Since energy procurement is more costly and complicated on short notice, renewablebased PPAs are adopting more short-term strategies to urge REPs to provide short-term predictions and in good faith [6]. Indeed, short-term deviation (shape risk) becomes more important as companies adopt more ambitious sustainability targets, covering a larger share of their demand through PPAs. For this reason, we focus on short-term deviation and energy reliability consequences for companies. However, our analysis and results can be extended to long-term deviations as well. Moreover, a recent study suggests that the contract length of PPAs might decrease (to make it more reliable for buyers) [15], in which case the difference between the shape risks and volume risks will be diminished.
Without loss of generality, we study one billing period that starts at time 0 and is valid till time T. At the beginning of this billing period, the REP is required to provide estimates of future energy generation at each upcoming time interval τ in the billing period. In a typical PPA, the REP is required to provide hourly predictions (τ = 1h) [6] since most buyers use the day-ahead electricity market as their energy back up to complete their energy demand procurement. This means that the buyer in a PPA needs to predict and to plan for hourly energy demand based on predictions received from the REP. We use a discrete-time model, where t is the time index and t = 0, 1, …, ⌈T/τ⌉.
We denote W t and W t as the actual available and the predicted values of the REP energy delivery at time t. The predicted value has a relative estimation error of ε. This is expressed as where ε ≥ − 1 to ensure W t ≥ 0. We further assume that W t is an unbiased estimate, E(ε) = 0. Given W t , the REP reports (as the forward commitment to the buyer) its future energy delivery at time t to be w t . The REP might over/under-report its future energy delivery if it is profitable to do so. This can be expressed as where δ t ≥ − 1 (to ensure w t ≥ 0) is called the quantity adjustment and represents the margin by which the REP adjusts its forward commitment with respect to its (private) predicted value to increase profit. PPAs should entail an upper bound δ t max on the over-commitments of REPs δ t ≤ δ t max . We refer to the optimal choice of δ t that the profit-maximizing REP chooses as its forward behavior. The upper bound typically reflects the rated capacity of the renewable energy facility. We also define the following special case of forward behavior:

Definition 1. True Estimated Commitment (TEC):
In a PPA, we say that the REP provides the True Estimated Commitment (TEC) as its forward commitment for a future delivery time t if it matches the unbiased predicted energy availability for that time (i.e., w t =W t = E[W t ] and δ t = 0). Using the definitions and notation above, the total expected revenue of the REP for the delivery at time t, accounting for the forward commitment and deviations after realization, is where [x] + = max (0, x) for any x. 2 The first term in Eq. (3) corresponds to the forward commitment. The second and third terms, respectively, represent the penalty of the energy shortage and rebate of the energy surplus of the realized energy with respect to the forward commitment.
Depending on the type of PPA (e.g., synthetic or physical [15]), the type and availability of backup energy supplies, and the ratio of the total demand to be served with the green energy through a certain PPA, companies have different tolerances to absorb the surplus energy beyond forward commitments. For example, if the company has the flexibility to take surplus energy on short notice, it might be willing to do so by paying small rebates (c e > 0). In contrast, if the company serves a large share of its demand through a PPA, there will not be much space to absorb the surplus unplanned energy. In this case, the company might choose to either reject the surplus energy entirely or take it for free. In both cases, there is no rebate (c e = 0). We call PPAs with no rebate and with a rebate, respectively, as with curtailed revenue (w-c) and without curtailed revenue (wo-c) agreements:

Definition 2. With/Without curtailed revenue (w-c)/(wo-c) agreements:
In a wo-c agreement, the buyer accepts and pays a rebate 2 The buyer pays the entire bill ∑ t=1 ⌈T/τ⌉ Π t , all at once, at the end of the billing period.
(c e > 0) for the overproduction of the REP beyond its forward commitments. In a w-c agreement, the buyer chooses to either reject the surplus energy entirely or take it for free (c e = 0).
For the sake of simplicity of notation, we define the energy shortage price ratio r s and the excess energy price ratio r e , respectively, as According to Definition 2, we have r e > 0 and r e = 0, respectively, in a wo-c agreement and a w-c agreement. No-payment for overproduction, implemented in w-c agreements, encourages the REP to be more greedy in its forward commitments. Because, if the REP under-commits, there will be no rebate after realization. Combining these definitions with Eq.
(3), yields: where r e = 0 and r e > 0, respectively, in a w-c and a wo-c agreement. To simplify notation and without loss of generality, we normalize Π t with respect to the average revenue of the REP in a hypothetical pay-as-yougo scenario (c dWt ). We define the relative expected revenue R t to be Note that R t = 0 occurs when the REP has the same revenue as in a pay-as-you-go scenario with the same c d . Thus, the value of R t for a given c d implies how much and in what direction the production uncertainty risk is affecting the REP profit. In our PPA setting, the REP is the one who should be responsible for production uncertainty, which translates into revenue loss for the REP compared to the pay-as-you-go scenario (i.e., R t ≤ 0). The case where R t > 0 infers that the financial consequences of production uncertainty are shifted more to the buyer, which is considered to be a win-lose scenario in our setting.
We assume that the REP is risk-neutral and thus, sets the quantity adjustment δ t in a way to maximize R t . Depending on the estimation error and PPA prices, the REP might sometimes over/under-commit, if it helps improve R t . Thus, three cases can happen, each of which might be a favorable choice for the buyer, depending on the underlying conditions: • δ t < 0 (under-commitment): In this case, the forward commitment is below the predicted value. This, on average, leaves extra energy to be taken by the buyer after realization. If the buyer contracts only for a fraction of its total energy demand (and not all of it) in the PPA and leaves some margins to take extra energy in real-time at lower prices, δ t < 0 could be a favorable REP behavior from the buyer's point of view. • δ t > 0 (over-commitment): In this case, the forward commitment exceeds the predicted value. Thus, on average, the buyer needs to provide additional supplies to serve this unexpected energy shortage. If the cost of energy procurement from external suppliers is less than the penalty prices received from the REP for energy shortage, this case could be a favorable case for the buyer. • δ t = 0 (TEC): In this case, the forward commitment is equal to the predicted available energy (Definition 1). This case, on average, has the least amount of energy adjustment after realization. This is a favorable case when the buyer prefers to have the minimum energy adjustments in real-time and plans most of its energy procurement ahead of time.
In the next section, we formulate REP revenue and forward behavior as a function of PPA pricing and structure.

Formulating REP forward behavior
The optimal forward (energy) commitment for a risk-neutral REP is the one that maximizes the (relative) revenue R t . It is clear from Eq. (5) that the optimal forward commitment for a REP without energy storage is ephemeral, meaning that the optimal energy commitment at time t only depends on the events at that particular time and not earlier or later time instants. Thus, we safely drop the time index t during a single billing period. Combining Eqs. (5)-(6), with some manipulations, we can express the relative expected revenue of a REP without storage as below (Proof in Appendix A.1): Lemma 1. The relative expected revenue of a REP with quantity adjustment δ is given by in a wo-c agreement. In a w-c agreement, the last term in Eq. (7) is omitted (r e = 0). The optimal quantity adjustment δ* of the REP, with which R in Lemma 1 is maximized (called forward behavior), is expressed in the following theorem (Proof in Appendix A.2): The forward behavior of a risk-neutral REP without storage, in terms of the optimal quantity adjustment, is given by where F ε is the cumulative distribution function of ε and we assume r e ≤ r s . Theorem 1 infers that increasing r s , in general, encourages the REP to be more conservative in its forward commitments as stated in the following corollary.

Corollary 1.
The optimal quantity adjustment of the REP is monotonically non-increasing in r s .
Inserting the optimal quantity adjustment from Theorem 1 in Lemma 1, the optimal R can be obtained accordingly. We also consider the theoretical special case of a perfectly predictable REP for which ε = 0.
Note that this is not a practical case (as REP generation always has uncertainty), but is used as a benchmark to study the impact of uncertainty. This is characterized as follows: The forward behavior (optimal quantity adjustment) of a perfectly predictable REP in either a wo-c or a w-c agreement is δ * = δ max I(r s < 1), which leads to Proof. The proof is immediate by setting ε = 0 in Eq. (5) and maximizing for δ, when δ ≤ δ max . Comparing Theorem 1 with Corollary 2 shows that the forward behavior of the REP is not affected by production uncertainty, if r s < 1. However, this is no loner the case, when r s ≥ 1. If r s ≥ 1, for a perfectly predictable REP, we will have δ* = R* = 0. Thus, in this case, the values of δ* and R* for a REP with uncertainty reflect the impact of production uncertainty on each of them.

Visualizing and understanding PPA price zones
In this section, we visualize the results of Lemma 1, Theorem 1, and Corollary 2 to get more insights on how PPA structure and pricing impact the revenue and forward behavior of REPs. To make the visualizations more tractable in this section, we assume that f ε is symmetric over ε = 0 (hence, − 1 ≤ ε ≤ 1). We show later, in the numerical examples, that removing this simplifying symmetric assumption does not change the results noticeably for reasonable estimation errors. We further set δ max = 1 in this section, for the sake of simplicity of visualizations.
Given that f ε is symmetric and according to Eq. (8), TEC (i.e., δ* = 0) occurs when r s = 2 and r s = 2 − r e , respectively, for a w-c and a wo-c agreement. Moreover, given that both ε and δ are limited to the range of [− 1, 1], the optimal quantity adjustment when r s → ∞ converges to − 1 for both PPA structures (w-c and wo-c). These observations are illustrated in Fig. 1b. In this graph, we indicate the pattern of a predictable REP with a solid 'line' and that of a REP with uncertainty with a dotted line. Solid 'points' indicate distribution-independent values.
We can also study the pattern of the optimal R as a function of r s . From Lemma 1, we know that R is monotonically non-increasing in r s ; and so is R*. For any r s < 1 due to the symmetric property of f ε and the fact that δ, ε ∈ [− 1, 1], the optimal R for both market structures reduces to 1 − r s . Combining all of the above observations, we can illustrate R* versus r s as in Fig. 1a. As shown in Fig. 1, comparing a perfectly predictable REP with a REP with uncertainty, we can identify three price zones, based on r s and r e : • Zone 1: (r s ≤ 1): In this zone, production uncertainty does not affect the forward behavior. The REP with or without uncertainty overcommits to the maximum possible value δ max (here, δ max = 1). Its relative revenue is positive (R* > 0) and linearly decreasing in r s . • Zone 2: (wo-c: 1 ≤ r s ≤ 2 − r e , w-c: 1 ≤ r s ≤ 2): In this zone, production uncertainty leads to over-commitment (δ* > 0 vs. δ* = 0) and revenue loss (R* ≤ 0 vs. R* = 0). • Zone 3: (wo-c: r s ≥ 2 − r e , w-c: r s ≥ 2): In this zone, production uncertainty leads to under-commitment (δ* < 0 vs. δ* = 0) and revenue loss (R* ≤ 0 vs. R* = 0).
In summary, Zone 1 is a win-lose PPA pricing zone in which the REP is the winner. In Zone-1 the REP gains more revenue than in a pay-asyou-go scenario (R* > 0), which means the uncertainty risk is shifted to the buyer. Moreover, the reported prediction by the REP (δ* = 1) is entirely unreliable/unrealistic for the buyer. A win-win PPA structure can happen in either Zone 2 or Zone 3, depending on the preferences of the buyer in terms of the target value of δ*. In particular, if the buyer favors TEC (δ* = 0), the PPA price ratio should be at the border between Zone 2 and Zone 3 (i.e., wo-c: r s = 2 − r e , w-c: r s = 2)) for a win-win PPA structure. This can be generalized to include other target values of δ*: In the absence of storage, the PPA can be set up in a way that the REP is incentivized to behave in favor of the buyer. In this paper, such a price ratio is referred to as the optimal PPA price ratio in a storage-less scenario, denoted by p* and defined below: Definition 3. Optimal price ratio in a storage-less scenario (p*): In a PPA, suppose that the buyer desires that the REP quantity adjustment to be δ*. Then, the corresponding PPA price setting p* is any pair (r s , r e ) that incentivizes the REP to optimally choose the desired quantity adjustment δ*. For example, in the case that TEC (i.e., δ* = 0) is favorable to the buyer, the optimal price setting p* is any pair (r s , r e ) that satisfies r s + r e = 2 and r s = 2, respectively, in a wo-c and a w-c agreement.
We observe that REP forward behavior (δ*) and relative revenue (R*) do not depend on the absolute values of prices such as c d , c s , and c e , but rather on their ratios r s and r e . However, REP absolute revenue (Π) linearly scales with the absolute value of fixed price c d . Thus, if the REP does not find the revenue R* corresponding to a p* value sufficiently attractive, c d can be used as an extra lever to keep both the REP and the buyer happy, accounting for all energy reliability and profitability concerns.
In this section, we assumed that the REP does not own storage. However, storage can be used to increase predictability and could thereby diminish REP over/under-commitment. In the next section, we explore the circumstances in which adding a battery to the REP encourages its forward commitments to be closer to TEC. Additionally, we investigate how PPA pricing and structure should be set up in a win-win manner if the REP owns battery storage.

REPs with battery storage
Suppose that the REP in a PPA owns a battery and uses it to improve its profit. The optimal operating strategy of the storage is static and is as illustrated in Fig. 2a and elaborated below. The available realized energy W t is primarily used to account for the forward energy commitment w t . Denote E d, t the part of realized energy, which is used to serve the forward commitment, i.e., E d, t = min (w t , W t ). The leftover available energy is E i, t = [W t − w t ] + , which is primarily stored in the battery. However, the battery might not have enough space to store E i, t or part of it. Denote b t and B, respectively, the energy content (at time t) and the total battery capacity. Thus, the energy to be stored in the battery at time t, denoted by E c, t , is.
where E ch is the maximum charging rate of the battery within one time unit, D is the depth of discharge which is the fraction of the battery that is recommended (by the manufacturer) to be used to enhance its lifetime, and η ch ≤ 1 is the charging efficiency. The rest of the surplus energy that cannot be taken by the battery, denoted by E e, t , given by is taken by the buyer with paying c e per unit of energy in a wo-c agreement and with no extra payment in a w-c agreement. To serve the forward commitment, the primary source is the available energy E d, t . If not sufficient, the second priority is using the energy stored in the battery. Thus, the energy to be withdrawn from the battery is where E dc is the maximum energy that can be discharged in one time unit and η dc ≤ 1 is the discharging efficiency. If there is not enough energy in the battery, the rest of the energy mismatch E s, t , given by is the energy shortage that the REP needs to pay for (c s per unit) as a penalty. We can also express b t in terms of w t , W t , and b t− 1 by the following recursive equation (see Fig. 2a): The cost of using batteries for REPs is modeled as the levelized cost of storage (LCOS) c b , defined as the cost of withdrawing one unit of energy from the battery. 3 Similarly, we define the battery LCOS price ratio as Thus, the expected revenue of the REP with a battery in a wo-c agreement is given by 3 Batteries live for a certain number of full charging-discharging cycles.
Denote N the cycle life of a battery of size B and depth-of-discharge D. This means that a battery of size B (Wh) can have a total energy flux of NBD throughout its lifetime. Therefore, if the total cost (including investment and operation) of the battery in its lifetime is $K per energy capacity unit (Wh), the levelized cost per unit of stored energy (Wh) is, For a w-c agreement, c e = 0, which means that the last term in Eq. (15) must be dropped.
The second term in Eq. (15) is creating a time correlation and memory. To be more precise, the battery energy content b t is recursively dependent on b t− 1 . Thus, revenue maximization is no longer ephemeral in the presence of a battery. As a result, analytically computing the optimal forward commitments in the case that the REP owns a battery is much more challenging.

Analyzing the impact of storage sizes
In this section, we provide some analytical insights on how storage sizing can impact REP forward behavior and revenue. We use the theory of 'stochastic network calculus' (SNC), which is shown to be a great stochastic modelling approach for energy applications (compared to other most common stochastic modelings in this context), being robust to uncertainties [33].
In this section (only), for the sake of tractability of derivations, we make some simplifying assumptions (as described below). Note that the target of this section is only to provide some general (albeit concrete) understanding of the impact of storage sizes on PPAs. Accounting for all details makes the derivations non-tractable, and it is not expected to dramatically change the conclusions on the asymptotic derivations in this section (as also observed by accurate numerical examples in the next section). Providing more comprehensive analysis and considering all cases are deferred to Section 7, where we use simulation to account for all these additional complexities.
• The simplified setting for the analytical approach: In this section, we assume the more likely favorable scenario for companies in PPAs: The REP is incentivized to under-commit in a w-c agreement, in which the buyer agrees to either reject the surplus unreported energy in real-time or take it for free. In this scenario, the buyer favors the pricing strategies to be in Zone 3. We assume that the REP owns an ideal storage (or equivalently, a battery with no imperfection), meaning that D = 1, E ch = E dc = ∞ and η ch = η dc = 1. We make a simplifying assumption that the estimated renewable energy at any time t is time-independent during the billing period (i.e., W t =W).
Furthermore, the estimation errors ε t for any time t are iid random variables with double exponential distribution (Eq. (21)), where, The iid assumption of the errors infers that renewable energy is assumed to be approximated by a stationary process for the time horizon under study. We disregard truncating the distribution on the boundaries. 4 To formulate R, we map the problem of the energy content of an ideal storage device to the problem of buffer content in data networks. This mapping, illustrated in Fig. 2b, has been recently used in other energy applications to formulate other energy metrics ( [34,35]). In this analogy, an ideal storage device of size B to store energy is mapped to a data buffer of size K to store data. The input data traffic to this buffer at any time t is A t and a total amount of S t data units from the buffer can be processed (served) at time t. The data that cannot be served at the time of arrival must be stored in the buffer to be served later. The buffer content denoted by q t at time t can be expressed by This can be mapped to the storage deficit state of charge b t d , which is the unused capacity of the storage at any time t. Under the setting of this section, we have b t d = B − b t or more precisely, Comparing the energy deficit formulation in Eq. (17) with buffer content formulation in Eq. (16), we can map the storage size B to the buffer size K, the energy deficit b d to the buffer content q, the forward commitment w to the input traffic A, and the available energy W to the service rate S. Using this mapping, for large battery sizes, R is formulated below (proof in Appendix A.3): Theorem 2. Under the settings described in Section 6, the asymptotic value of R (when B is large) for a REP with quantity adjustment δ < 0 is approximately 5 : where B = B W is the battery size in terms of the number of time units the battery can store the available energy and θ = − 2λ 2 δ 2+λ 2 δ 2 . Note, however, that LCOS should satisfy the following general necessary condition of storage profitability to be used by the REP (proof in Appendix A.4):

Lemma 2.
A necessary condition for storage to be profitable for the REP in w-c and wo-c agreements are, respectively, r b ≤ r s and r b ≤ r s − r e .
Optimizing the closed-form formulation of R from Theorem 2 over δ, Theorem 3 formulates the forward behavior of a REP with an ideal storage system (proof in Appendix A.5).

Theorem 3. Under the settings described in Section 6, the asymptotic optimal quantity adjustment of a REP with an ideal storage system of size B, when B is large is approximately
where W is the Lambert W function.
To effectively design a PPA, in which the REP owns storage, we should know how increasing the storage size affects the REP revenue and forward behavior. These are needed to, respectively, project the REP incentives on investing in storage and to know how the storage size transforms REP forward behavior. This is presented below (proof in Appendix A.6). Based on Corollary 3, R max is the best that can be achieved by adding storage. Corollary 3 also shows that adding storage to REPs in Zone 3, incites them to behave arbitrarily close to TEC. According to Corollary 3, the rate of convergence of the forward behavior to TEC (Θ ) as the storage size increases. The faster rate of improvement in δ* than in R* is also observed in Section 7. We examine the accuracy of R in Theorem 2, δ* in Theorem 3, and validity of Corollary 3, by a comparison with simulation results. Denote δ min and δ T3 , respectively, the optimal δ in a storage-less scenario (from Corollary 3) and the optimal asymptotic δ when B is large (from Theorem 3). With this notation and the fact that δ* is monotonically nondecreasing in B, for any B we have δ* ≥ max (δ min , δ T3 ), where the inequality turns to equality for B = 0 and B→∞. Similarly, we have R* ≥ max (R min , R T2 ), where R min is the optimal R when B = 0 (formulated in Corollary 3) and R T2 is the optimal R when B→∞, obtained by replacing δ T3 in Theorem 2. Moreover, the inequality (R* ≥ max (R min , R T2 )) turns to equality for B = 0 and B→∞.
We compare these theoretical results with simulation in Fig. 3 for λ = 5, r s = 3, and r b = 0.5. The curves denoted by 'Analysis' in Fig. 3a and Fig. 3b are, respectively, max(R min , R T2 ) for R* and max(δ min , δ T4 ) for δ*. Fig. 3 shows that the theoretical results for B = 0 and B→∞ (and even for medium values of B) for both R* and δ* are highly accurate. Please note that the values of δ* and R* from Theorem 3 and Theorem 2 are asymptotic results, supposed to be accurate when B is large and yet we observe high accuracy with medium values of B in Fig. 3.
According to Section 3, a buyer that has some margins to take surplus unplanned renewable energy with zero or little rebates prefers that the REP under-commits with some target value of δ < 0. 6 To align the REP forward behavior accordingly, when the REP uses storage, the results of this section suggest that the storage size must be restricted. This is because the REP revenue improvement (as storage size increases) grows at a slower rate than changing its forward behavior (see Corollary 3). Thus, there is a point after which increasing storage size still helps improve REP revenue, but δ exceeds and diverges from the buyer's target δ. In such scenarios, PPA should entail limitations on the maximum allowable storage size that the REP can use, to align the REP forward behavior with the buyer's target δ.
Given a target forward behavior δ < 0, the maximum storage size allowed for the REP should be a function of PPA prices. Below, we formulate such a storage size as a by-product of Theorem 3 (proof in Appendix A.7).

Corollary 4.
Under the settings described in Section 6, the optimal storage size for the REP to choose a certain (a small) δ < 0 is where W − 1 is the negative branch of the Lambert W function. Corollary 4 suggests that there should be some additional terms in PPAs on storage sizes when REPs use storage. For example, Eq. (20) can be served as the maximum allowable storage size to keep the REP forward behavior below a target value δ.

Numerical examples
We assume that an energy-consuming company engages in a PPA with a REP who owns a solar PV farm with a capacity of 5 MW. According to the PPA, the REP should provide hourly predictions for future delivery time and applies financial adjustments (as discussed in Section 3) after realization. We use one year (2018) of the solar power production data set from a field in the United States with hourly resolution and we linearly scale that data set, resembling a solar PV farm with a capacity of 5 MW. We assume that the REP has an estimation of the available energy at a future time slot with an exponential tail-bound estimation error with parameter λ. To be more precise, the relative estimation error ε in Eq. (1) has the following distribution (21) which is truncated to be always x ≥ − 1, ensuring that actual available energy is non-negative. 7 The REP might also own a Li-ion battery storage. The battery size, denoted by B, is represented in terms of the number of hours the battery can store the long-term average energy generation of the REP (i.e., For the special case of a storage-less scenario (B = 0), Fig. 4 verifies the theoretical results on the general trends of R* ad δ* in Section 4, which are illustrated in Fig. 1. Note, however, that in this simulation, we have a non-symmetric estimation error, whereas a symmetric one was assumed in the theoretical results in Section 4. This shows that without the symmetric assumption, the results in Section 4 do not change dramatically. In particular, corroborating the theoretical results in Section 4, in a storage-less scenario, TEC (δ* = 0) is happening at the border of Zone 2 and Zone 3, which is r s = 1.2 and r s = 2, respectively, for a wo-c and a w-c agreement.
Comparing the storage-less scenario in a w-c agreement with that in a wo-c agreement ('B = 0,w − c' and 'B = 0,wo − c') in Fig. 4, shows that not paying for surplus energy, as in a w-c agreement, leads to a substantial revenue loss for the REP and encourages it to be more greedy in its forward commitments in both Zones 2 and 3. Though, it has no noticeable impact on either profitability or forward behavior in Zone 1.
The impact of no-payment for surplus energy on both revenue and forward behavior becomes more pronounced as r s increases. Fig. 4a shows that adding a battery can compensate (to a good extent) the REP revenue loss due to uncertainty in both wo-c and w-c agreements, with a much more pronounced impact in a w-c agreement. In terms of REP forward behavior, from Fig. 4b, we observe that adding a battery has different effects in a w-c agreement, depending on the PPA price zone. In Zone 2, adding a battery encourages the REP to be less greedy in its forward commitments. 8 This means that with no payment for surplus energy, adding a battery to the REP always encourages REP forward behavior to be closer to TEC. Comparing the REP revenue and bidding strategies in a w-c with and without storage in Zone 3, reveals that adding storage encourages the REP forward behavior to move towards TEC at a faster rate than its impact on the REP revenue gain (compare Fig. 4a and b). This corroborates the analytical results in Section 6 and Corollary 3.

The impact of the battery size
In Fig. 5, we examine the impact of battery sizes on the REP behavior and revenue. We set r s = 1.1 and r s = 3, representing operating points in Zone 2 and Zone 3, respectively. We exclude the less interesting case of Zone 1 in this example, because this zone leads to a win-lose PPA structure (as shown in Section 4.2). We vary the battery size B to observe its impact on R and δ and discuss some of those observations below.
In Zone 2 (here, r s = 1.1) adding a battery has a different impact on quantity adjustments in a w-c agreement compared to a wo-c agreement (according to Fig. 5b): Adding a battery to the REP in Zone 2 in a w-c agreement, encourages the REP to be less greedy on its forward commitments (closer to TEC). In contrast, adding a battery to the REP in Zone 2 in a wo-c agreement encourages it to be more greedy (deviating from TEC). Please note that as the battery size increases, the optimal quantity adjustment increases in a wo-c agreement and decreases in a wc agreement; for large enough battery sizes they converge to each other. Fig. 5a shows that the impact of adding batteries on improving REP revenue is not significant in Zone 2.
In Zone 3 (here, r s = 3) and in the absence of batteries (B = 0), the wc structure helps prevent under-commitment and encourages the forward behavior to be closer to TEC, but leads to a substantial revenue loss Fig. 3. Comparing analytical results with simulation (λ = 5, r s = 3, r b = 0.5). As expected, the 'Analysis' is accurate when B = 0 and B→∞. For moderate B, still high accuracy is observed. 7 With this assumption, we will not have a symmetric distribution. However, the results of this section still accurately resemble the general behavior sketched in Section 4.2 8 REP forward behavior in Zone 2 is much more visible in Section 7.2.
if the REP does not have a battery. Fig. 5a shows that adding a battery extremely helps improve the REP revenue in a w-c agreement. Batteries also improve the revenue of the REP in a wo-c agreement in Zone 3, but the additional revenue is not as considerable as in a w-c agreement. Fig. 5b shows that the impact of the battery on improving the REP forward behavior (from the buyer's point of view) in Zone 3 is even larger than its impact on REP revenue improvement (compare it with Fig. 5a). As the battery size increases, the additional improvement in terms of quantity adjustment converges faster to its saturated value than the improvement in revenue. Thus, the REP might have an incentive to invest in larger batteries to gain in revenue, but this does not help the buyer.

Summary of implications
The buyer in a PPA might prefer that the REP under-commits, overcommits, or chooses TEC, depending on the cost and complexities of handling surplus or shortage. PPA prices and structure, if chosen properly, can incentivize the REP to behave according to the buyer's preferences. Designing such a win-win PPA structure should also account for the existence and size of the REP battery and its impact on the buyer and the REP. Accordingly and based on our earlier findings, we summarize the impact of batteries on REP revenue and behavior in Table 1. In Zone 1, batteries do not have a noticeable impact on either the REP revenue or the REP behavior. In Zone 2, adding batteries slightly improves the revenue of the REP in both w-c and wo-c agreements. The impact of batteries on quantity adjustments of the REP is stronger and in opposite directions for a w-c and a wo-c agreement. In a w-c agreement, batteries help steer the REP forward behavior towards TEC. In contrast,

Table 1
Effects of adding batteries on (1) the REP (seller) revenue and (2) the company (buyer) quantity adjustment. in a wo-c agreement, batteries encourage the REP to become more greedy and deviate farther from TEC. Finally, Zone 3 is the only zone in which batteries significantly improve the REP revenue as well as the quantity adjustment for both w-c and wo-c agreements. From both analysis and simulation results, we learn that the rate of improvement is slower in revenue gain than in quantity adjustments. Thus, battery sizes must be kept limited in a win-win PPA. Beyond a certain threshold, investing in larger battery sizes increases the revenue of the REP, but might not help improve the quantity adjustments (to benefit the buyer) any further. These observations lead to guidelines for structuring a win-win PPA (see Fig. 6). The design of such a PPA is highly dependent on whether the REP owns storage. If the REP does not own storage, then the price ratios used in the PPA can be fine-tuned to incentivize the REP to report forward commitments according to the buyer's preference for under/over commitment. This means that r s and r e can be set according to p* (see Definition 3). Finally, the forward unit price c d (See Section 4.1) can be adjusted to make the PPA financially attractive for the REP.
If the REP owns storage, a PPA should limit the size of storage to maintain financial attractiveness for the buyer. In a win-win scenario, storage is used to simultaneously improve the REP revenue and to align the REP behavior with the buyer's preferences. If the buyer favors that the REP under-commits (δ ≤ 0), then a win-win PPA structure is to set the PPA price ratios in Zone 3 and to enforce a maximum limit on the battery size. Corollary 4 sheds light on what the shape and functionalities of such maximum allowable battery sizes are. If the buyer prefers that the REP over-commits (δ ≥ 0), a win-win PPA structure is to set the PPA price ratios in Zone 2. In this case, under a w-c agreement, there should be a limit on the minimum battery size, while under a wo-c agreement, there should be a limit on the maximum battery size.

Conclusions
Companies are actively seeking ways to reduce their carbon footprints. Corporate Power Purchase Agreements (PPA), bilateral contracts between renewable energy producers (REP) and companies, are among the most convenient and popular solutions. While REPs benefit from the price certainty of PPAs, these contracts might bring energy production uncertainty to the companies. In this work, we investigated how to use the design flexibility of PPAs to set up a win-win strategy for buyers and sellers.
We found that the parameters of a PPA can be chosen to reduce supply uncertainty risks to satisfy the buyer, while maintaining financial attractiveness to the REP. To be more precise, we first showed how PPA pricing and structure can affect the behavior of a profit-maximizing REP with and without battery storage. Then, we developed a decision tree that shows how to select pricing and storage limitations that will incentivize the REP to behave in a way that is desirable to the buyer, yet profitable for themselves.
We used both simulation and analytical approaches to reach our conclusions. We provided a closed-form solution for a general scenario when the REP does not own battery storage, and under some simplifying assumptions when the REP owns battery storage. For the latter case, we apply the theory of stochastic network calculus (SNC) to model the behavior and the revenue of the REPs in a PPA. Our derivations showed that, depending on the buyer's preferences, increasing the battery size can have a stronger impact on improving REP behavior to the advantage of the buyer than on REP profitability, with respective rates of Θ(log − 1 (B)) and Θ(B − 1 log (B)), where B is the battery size. This suggests that in the presence of storage, some limitations on storage size should be considered in a win-win PPA structure. Our simulation studies confirmed this theoretical observation and further gave a more holistic view of the impact of different PPA pricing and structures on the revenue and behavior of REPs.
This work can be extended by considering other relevant practical scenarios. For example, here we assumed that the REP is risk-neutral, only the REP owns storage, the buyer is a company (and not an energy trader), and there is one PPA. Modifying any of these assumptions will represent a different and perhaps another practical application and can be a possibility for future work. The battery size should be larger than a certain value, to be smaller than a certain value, and to be zero.

A.1. Proof of Lemma 1
We first introduce and prove the following lemma: Lemma A.1.1 If X is a non-negative real valued random variable, for any q > 0, we have Proof of Lemma A.1.1. We prove the first equality (Eq. (22)). The proof of the second equality is similar and omitted due to the space limit. Let f X be the distribution function of X. Then, where we use a change of variable x = q − s in the last line. Combining Eq. (3) and Lemma A.1.1, yields Changing variable x with (1 +y)W and replacing W and w from Eqs. (1-2), yields Inserting this into the definition of R in Eq. (6) completes the proof.

A.2. Proof of Theorem 1
In a w-c agreement, the last term in Eq. (7) is removed and hence, Thus, the optimal quantity adjustment for the REP (δ*) is the solution to the following ∂R ∂δ which is equal to Eq. (8), accounting also for the boundary conditions − 1 ≤ δ ≤ δ max and ε ≥ − 1. In a wo-c agreement, R is given by the complete form of Eq. (7). The optimal quantity adjustment, is obtained by setting the first derivative of R (with respect to δ) to zero. This is ∂R ∂δ which leads to Eq. (8) considering the boundary conditions − 1 ≤ δ ≤ δ max and ε ≥ − 1 and assuming r e ≤ r s .

A.3. Proof of Theorem 2
We use the buffer-battery analogy, illustrated in Fig. 2b. For a buffer with size K, the queue length q t at any time t, is given by Eq. (16), where A t and S t , are respectively, the input traffic and service rate at time t. When buffer size K is large, the buffer overflow, the amount of input traffic that must be dropped because the buffer is full (i.e., [A t − S t + q t− 1 − K] + ), can be approximated by [35]: where (s, t) represents the cumulative values in [s + 1, t]; e.g., A(s, t) = ∑ τ=s+1 t A τ . Comparing the energy deficit formulation in Eq. (17) with buffer content formulation in Eq. (16), we can map the energy storage size B to the buffer size K, the energy deficit b d to the buffer content q, the forward commitment w to the input traffic A, and the available energy W to the service rate S. In this mapping, the energy shortage (i.e., E s, t = [w t − W t + b t− 1 d − B] + ) is mapped to the buffer overflow, formulated in Eq. (29) (see Fig. 2a). Applying this mapping to Eq. (29), yields Accordingly, to make our derivation more tractable, we rewrite Eq. (47) as where ε τ is assumed to be an iid random variable at any time τ with double exponential distribution as presented in Eq. (21). Moreover, B = B W and y = ỹ W . For a fixed θ > 0 and any 0 ≤ n ≤ t, define X n to be Combining Eq. (35) and Eq. (36), we have For any δ < 0, the following shows that X n is a super-martingale where in the second line, we used the fact that δ < 0 and ε τ− n− 1 is a symmetric random variable over 0 and hence, E [ e θ(δ− ετ− n− 1 ) ] ≤ 1. Using Doob's inequality in a similar way as used by [36] and exploiting the fact that X n is a supermartingale, we compute a tight upper bound on Eq. (35): From Eq. (36), we know that E[X 0 ] = 1. The upper bound in Eq. (40) can be tightened by optimizing over θ, which is a free parameter. It has been shown by [36] that if θ is the solution to: Replacing this in Eq. (41) and replacing e θδ by the first three terms of its Taylor's series, yields Thus,

A.4. Proof of Lemma 2
Under the assumption of ideal storage, and some manipulations, Eq. (15) will be reduced to Inserting these revenue formulations in Eq. (6), we get the corresponding R values. In a w-c agreement, storing and restoring one unit of energy costs c b , but saves c s compared to the case where there is no storage. Thus, the necessary condition for the profitability of the storage in w-c agreements is c s > c b or equivalently r b < r s . In a wo-c agreement, each unit of energy in storage has been added to storage at a time when there was energy surplus beyond forward commitments of the REP. At that time, without storage, this unit of energy would have received c e according to the PPA. Storing this unit of energy in the storage costs c b . At a later time when withdrawn from storage to compensate for an energy shortage occasion, this unit of energy saves c s of the penalty with respect to a storage-less scenario. Accounting for all costs and revenue, the necessary condition of storage profitability in wo-c agreements is c b < c s − c e or, r b < r s − r e .

A.5. Proof of Theorem 3
From θ formulation in Theorem 2, for small values of δ < 0, we can approximate θ by lim δ→0 − θ = − δλ 2 . Inserting this in Theorem 2, yields Taking the first derivative of R with respect to δ, we have ∂R ∂δ Given that δ → 0 − , the last term in Eq. (49) can be approximated by − r b 2λ . Moreover, assuming that B is large enough, we can ignore the third term in Eq. (49) compared to the second term. Incorporating all of these approximation, Eq. (49) can be approximated by ∂R ∂δ Hence, the optimal δ can be obtained by setting the leftover of Eq. (50) to zero, which is Solving Eq. (51) for δ*, gives us Eq. (19), and this completes the proof.

A.6. Proof of Corollary 3
We first prove that R* and δ* are monotonically non-decreasing in B and then prove the boundary conditions: • Proving that R* and δ* are monotonically non-decreasing in B: Please first note that B and B only differ by a positive scalar; hence, a monotonic behavior with respect to B implies the same with respect to B. In a w-c agreement, b t is the only parameter that varies by B in Eq. (47) and is monotonically non-decreasing in B. Thus, the REP expected revenue from Eq. (47) (and so is R) is non-decreasing in B since c s > c b . Since R is monotonically non-decreasing in B, so is R*, which is the maximum value of R for a fixed B.
To prove the non-decreasing trend of δ* as B increases, we use contradiction. Consider two storage sizes B 1 and B 2 where, B 2 > B 1 . Suppose that δ 1 * and δ 2 * are, respectively, the optimum quantity adjustment under B 1 and B 2 . Also w 1 * and w 2 * are, respectively, the corresponding energy commitments to δ 1 * and δ 2 * and define Δ = w 1 * − w 2 *. By the contradiction assumption, δ 2 * < δ 1 * (i.e., Δ > 0). The expected revenue of REP with B = B 2 is larger in δ 2 * than in δ 1 *, which means that the different of expected revenue between w = w 2 * and w = w 1 * must be positive for some a 1 and a 2 , where 0 < a 2 < a 1 ≤ 1 from Eq. (47). From Eq. (52), the difference between the expected revenues with w = w 2 * and w = w 1 *, when B = B 1 is for some a 3 , where 0 < a 2 < a 3 < a 1 ≤ 1 from Eq. (47). This means that with the original storage size B 1 , R is larger at δ 2 * than at δ 1 * and this contradicts the assumption and proves the claim.
• Proving the boundary conditions: •B = 0: In a storage-less scenario, where B = 0, the relative expected revenue of the REP in a w-c agreement can be obtained from Eq. (8) with f ε (x) = λ 2 e − λ|x| (which is the assumption on f ε in this section) is given by Replacing this optimal commitment in Lemma 1 in a w-c agreement, we have •B→∞: When B is large, we have Denote δ and δ*, respectively, the target and the optimal quantity adjustments. Thus, we must have δ* ≥ δ. The optimal quantity adjustment of a REP with storage from Eq. (19). If 1 λ log ( 2 rs ) > δ, then according to Corollary 3, δ* ≥ δ for any value of B and hence, the minimum storage needed is B = 0. Otherwise, the right-hand-side of Eq. (19) must be equal to the target quantity adjustment δ to find the minimum required storage size. This means that we should equate the right-hand-side of Eq. (19) to δ and solve it for B, which is where W − 1 is the negative branch of the Lambert W function and this completes the proof.
Appendix B. Part of realized energy used to account for the forward commitment at time t (Wh) E e, t Excess energy beyond forward commitments to be taken by the buyer at time t (Wh) E s, t Energy shortage below forward commitments observed by the buyer at time t (Wh) E c, t (E b, t ) Energy to be charged (discharged) to (from) the battery at time t (Wh) f ε (F ε ) Probability distribution function (cumulative distribution function) of ε

PPA
Power purchase agreement REP Renewable energy producer w-c (wo-c) PPA with-(without-)curtailing payment for surplus energy TEC True estimate commitment LCOS Levelized cost of storage