sharing solar pv and energy storage in apartment buildings: … · we introduced two type of...

11
1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEE Transactions on Smart Grid IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 1 Sharing solar PV and energy storage in apartment buildings: resource allocation and pricing Andreas Fleischhacker, Student Member, IEEE, Hans Auer, Georg Lettner and Audun Botterud, Member, IEEE Abstract—While solar PV generation is well-established on single-family houses, there is still a lack of installations on apartment buildings. To understand the effect of sharing dis- tributed generation, we developed two energy sharing models, a welfare optimization, and a game theoretical (bi-level) model. We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the consumers. Furthermore, we included consumer preferences by multiple objectives such as emissions reduction and distributed generation in additions to cost in the model. We applied both models to a numerical example using data from the electricity market in Texas. The results showed that welfare is maximized in both models, but shared differently between the owner of the generation and the consumers. One exception is the bi-level model with uniform price auctions, which results in a reduction in system welfare to maximize owner revenues. Index Terms—energy sharing, distributed energy resources, solar PV, battery, bi-level optimization, game-theory, Stackelberg game. NOMENCLATURE Sets t ∈T = {1,...,T } Time periods e.g. hours i ∈I = {1,...,N } Consumer Decision variables p O t,i Price for solar PV and battery procurement ap- plied to consumer i p U t Uniform price for solar PV and battery applied to all consumers q Bin t,i Power flow into the battery q PV grid t Power feed (of solar PV generation) into the grid q B grid t Power feed (of the battery) into the grid q PV curtail t Power curtailment (of solar PV generation) q G t,i Power flow from grid to consumer i q PV t,i Power flow from solar PV plant to consumer i q Bout t,i Power flow from battery to consumer i λ L t,i PV t,i Dual variables of supply = demand and limited solar PV generation constraint μ Gmin t,i PVmin t,i Bmin t,i Dual variables of the inequality constraints SOC t Battery state of charge u C i Utility of consumer i costs i Electricity costs of consumer i A. Fleischhacker, H. Auer and G. Lettner are with the Energy Economics Group, TU Wien, Vienna, Austria. A. Botterud is with Laboratory for Information and Decision Systems, Massachusetts Institute of Technology, Cambridge, MA, USA and Energy Systems Division, Argonne National Laboratory, Argonne IL, USA. emissions i Emissions caused by the electricity consump- tion of consumer i der i Electricity generated by distributed energy re- sources (DER) consumed by consumer i rev O Revenues of DER owner Parameters e G t Marginal grid emissions p G t,i Price of electricity from the grid p MCP t Wholesale market clearing price wtp t,i Willingness-to-pay q L t,i Load of consumer i ¯ q B Maximum charging and discharging battery power ¯ q PV t Electricity generation of PV plant w E i Individual weight for emissions of consumer i in $/kg CO2 w DER i Individual weight for DER of consumer i in $/kWh DER ¯ SOC Maximum state of charge SOC ¯ Minimum state of charge SOC init Initial and end state of charge for period T η B Efficiency factor of the battery Welfare measures CS Consumer surplus OS DER owner surplus US Utility company surplus Loss Loss of economic efficiency BW Building welfare TW Total welfare I. I NTRODUCTION S OLAR generation is one of the key technologies in de- carbonizing and decentralizing the energy system. While solar PV on single-family houses is a well-established and integrated solution, there have been relatively few such in- stallations on multi-unit apartment buildings so far. Cities, most of them with a high share of apartment buildings, are becoming the largest energy consumers globally due to the rapid urbanization. Hence, to address the energy-climate challenge innovative solutions are needed to make better use of distributed energy resources (DERs) in urban areas [1]. Although solar PV generation in an urban environment and apartment buildings, in particular, are widely addressed in liter- ature, e.g. in [2], locally generated electricity is often allocated evenly among all consumers in the apartment building. From

Upload: others

Post on 11-Oct-2020

2 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 1

Sharing solar PV and energy storage in apartmentbuildings: resource allocation and pricing

Andreas Fleischhacker, Student Member, IEEE, Hans Auer, Georg Lettner and Audun Botterud, Member, IEEE

Abstract—While solar PV generation is well-established onsingle-family houses, there is still a lack of installations onapartment buildings. To understand the effect of sharing dis-tributed generation, we developed two energy sharing models,a welfare optimization, and a game theoretical (bi-level) model.We introduced two type of players, the owner of distributedgeneration (e.g. solar PV and energy storage) and the consumers.Furthermore, we included consumer preferences by multipleobjectives such as emissions reduction and distributed generationin additions to cost in the model. We applied both models toa numerical example using data from the electricity marketin Texas. The results showed that welfare is maximized inboth models, but shared differently between the owner of thegeneration and the consumers. One exception is the bi-level modelwith uniform price auctions, which results in a reduction insystem welfare to maximize owner revenues.

Index Terms—energy sharing, distributed energy resources,solar PV, battery, bi-level optimization, game-theory, Stackelberggame.

NOMENCLATURE

Sets

t ∈ T = {1, . . . , T} Time periods e.g. hoursi ∈ I = {1, . . . , N} Consumer

Decision variables

pOt,i Price for solar PV and battery procurement ap-plied to consumer i

pUt Uniform price for solar PV and battery appliedto all consumers

qBint,i Power flow into the batteryqPVgrid

t Power feed (of solar PV generation) into the gridqBgrid

t Power feed (of the battery) into the gridqPVcurtailt Power curtailment (of solar PV generation)qGt,i Power flow from grid to consumer iqPVt,i Power flow from solar PV plant to consumer iqBoutt,i Power flow from battery to consumer iλLt,i, λ

PVt,i Dual variables of supply = demand and limited

solar PV generation constraintµGmint,i , µPVmin

t,i , µBmint,i Dual variables of the inequality

constraintsSOCt Battery state of chargeuCi Utility of consumer icostsi Electricity costs of consumer i

A. Fleischhacker, H. Auer and G. Lettner are with the Energy EconomicsGroup, TU Wien, Vienna, Austria.

A. Botterud is with Laboratory for Information and Decision Systems,Massachusetts Institute of Technology, Cambridge, MA, USA and EnergySystems Division, Argonne National Laboratory, Argonne IL, USA.

emissionsi Emissions caused by the electricity consump-tion of consumer i

deri Electricity generated by distributed energy re-sources (DER) consumed by consumer i

revO Revenues of DER owner

Parameters

eGt Marginal grid emissionspGt,i Price of electricity from the gridpMCPt Wholesale market clearing pricewtpt,i Willingness-to-payqLt,i Load of consumer iqB Maximum charging and discharging battery powerqPVt Electricity generation of PV plantwEi Individual weight for emissions of consumer i in

$/kgCO2

wDERi Individual weight for DER of consumer i in$/kWhDER

¯SOC Maximum state of chargeSOC

¯Minimum state of charge

SOCinit Initial and end state of charge for period TηB Efficiency factor of the battery

Welfare measures

CS Consumer surplusOS DER owner surplusUS Utility company surplusLoss Loss of economic efficiencyBW Building welfareTW Total welfare

I. INTRODUCTION

SOLAR generation is one of the key technologies in de-carbonizing and decentralizing the energy system. While

solar PV on single-family houses is a well-established andintegrated solution, there have been relatively few such in-stallations on multi-unit apartment buildings so far. Cities,most of them with a high share of apartment buildings,are becoming the largest energy consumers globally due tothe rapid urbanization. Hence, to address the energy-climatechallenge innovative solutions are needed to make better useof distributed energy resources (DERs) in urban areas [1].

Although solar PV generation in an urban environment andapartment buildings, in particular, are widely addressed in liter-ature, e.g. in [2], locally generated electricity is often allocatedevenly among all consumers in the apartment building. From

Page 2: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 2

a power system planner’s perspective, a feasible solution thatis easy to implement, but from the consumers perspective,better energy sharing concepts could lead to improved energyresource allocation.

By comparing apartment buildings with single-familyhouses, we identify many differences: Firstly, multiple con-sumers (owners/tenants) live in the building; secondly, theconsumers have to agree on an energy allocation method, toshare the common energy resource (e.g., solar PV, possiblycombined with battery storage). Finally, we have to takeindividual objectives and consumer behavior into accountwith the possibility of conflicting objectives between differentparties. In the following, we will briefly capture the statusquo of the literature with respect to (i) energy sharing andpricing concepts for local electricity markets, (ii) frameworksfor the interaction among local market participants, (iii) utilityof electricity consumer, and (iv) auction designs for localelectricity markets, e.g. microgrids (MG).

Many studies in literature [2]–[8] concluded that MG andlocal energy markets are one of the most preferred ways tofacilitate the integration of DERs and solar PV generation inparticular. As shown in a comprehensive literature review in[7] local energy markets, where participants rather trade en-ergy amongst themselves, than interacting exclusively with thegrid, have the potential to reduce cost and increase renewablepenetration rates.

In this paper, we focus on sharing of DERs for a singleapartment building. Many approaches aim at matching scat-tered generation and consumption distributed among multipleparties (such as consumers and prosumers). E.g., [9] uses anagent-based approach to model an energy exchange and showsthat agents (acting on behalf of households) can coordinate andregulate the exchange of energy between homes which leads toreductions in the overall battery usage and lower energy losses.[5] introduced a system model of energy sharing managementwithin a microgrid, which considers the profit of the microgridDER operator and the utility of prosumers. Within the frame-work of a Stackelberg game, the operator maximizes revenueswhile the prosumers maximize their individual utilities. As[5] focused on one pricing model only, we will have a lookat different pricing and energy allocation algorithms.

Furthermore, we will describe the impact on all involvedparticipants: the owner and consumer of DER as well asthe utility company. Therefore, we will introduce welfareparameters in accordance with the literature (e.g., [10]) toexplain the effects on the participants.

Interactions and energy exchanges are often modeled ascontrolled [7] or autonomous operations [11]. As suggestedin [5], an entity like an operator is needed to allocate andprice local generation. To understand the interactions betweenmultiple participants in local energy markets, cooperative andnon-cooperative game theory are regularly used [6], [12], [13].

As discussed above, many studies [14]–[17] are usinggames (e.g., Stackelberg games) to model the interactionsbetween consumers, prosumers and utility companies. Com-pared to the existing literature, we are going to developand discuss different setups of the model, such as differenttypes of ownership. Additionally, we will include solutions

for practically implementing the game theoretical models.As shown in [18] and the non-cooperative and game theo-

retical decision making problem of each player is formulatedas a bi-level optimization problem. Herby, the upper levelrepresents the profit maximization of the player, and thelower level the energy market clearing. Bi-level models andcomplementarity theory techniques are well-established frame-works to tackle electricity market problems [19], [20]. Bi-level optimization problems are a special kind of optimizationproblems which require every feasible upper-level solution tosatisfy the optimality conditions of a lower-level optimizationproblem [21].

As many consumers are not only motivated by financialobjectives, a consumers utility function is often described bynonlinear and multiple objectives [5], [22]. According to [22],the consumers willingness to pay (WTP) considers comfortbenefits and cost-savings as well as the potential valuationof environmental benefits. In this paper, we will composethe consumer utility function by three objectives: cost andemission reduction and degree of DER generation.

Appropriate auction systems are highly relevant to ensureefficient electricity markets and the existence of an economicequilibrium, not only for wholesale but also for local energymarkets. The choice between uniform and pay-as-bid pricingfor microgrid electricity auctions has been an important issuein electricity markets [23]. We consider two auction systemsin our paper: discriminatory and uniform auctions. As statedin [23] we expect different Nash equilibria for both auctionsystems.

In this article, we propose a framework for sharing DERswithin an apartment building. The analysis of different modelsand cases will help us to identify the best setup for real-life implementation: E.g., if energy communities conduct theinvestment in DER the requirements may be different than anexternal investor who seeks for profit maximization. The maincontributions of this paper are:

• We will propose a new algorithm for allocation andpricing of DERs in apartment houses. The algorithm mayalso be implemented for other community shared solarPV and battery projects.

• By solving the resulting games analytically, we will de-rive solutions for executing the proposed game-theoreticalsetup practically.

• We will introduce multiple consumer objectives (in addi-tion to monetary motives). By including them in a con-sumer utility function, we are able to represent differentconsumer preferences in the model.

• Finally, we will compare multiple pricing mechanismsto illustrate the welfare effects for the DER owner, theconsumers and the utility company.

We organize the paper as follows. In Section II, we intro-duce two possible frameworks for sharing DERs, i.e. solar PVand energy storage, in an apartment house. Section III presentsthe assumptions and parameterization of a numerical example,while we show comprehensive results in Section IV. SectionV discusses and concludes the paper.

Page 3: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 3

Battery

PV Plant

Consumer 1

Utility function 𝑢1𝐶

Load 𝑞𝑡,1𝐿

𝑝𝑡𝐺

Consumer 𝑁

Utility function 𝑢𝑁𝐶

Load 𝑞𝑡,𝑁𝐿

𝑞𝑡,1𝑃𝑉 + 𝑞𝑡,1

𝐵𝑜𝑢𝑡

Utility

Retailer

Distribution

System

Operator

Exogenious inputs

Wholesale

Market

𝑝𝑡𝑀𝐶𝑃

𝑞𝑡,1𝐺

𝑞𝑡,𝑁𝐺

𝑞𝑡𝐵𝑖𝑛

Electricity grid

𝑞𝑡,𝑁𝑃𝑉 + 𝑞𝑡,𝑁

𝐵𝑜𝑢𝑡

𝑞𝑡

𝑃𝑉𝐼𝑛𝑓𝑒𝑒𝑑 + 𝑞𝑡

𝐵𝐼𝑛𝑓𝑒𝑒𝑑

𝑞𝑡,𝑖𝐵𝑜𝑢𝑡 U

pp

er l

evel

PV

pla

nt

and

bat

tery

ow

ner

Low

er l

evel

Con

sum

ers/

ten

ants

𝑞𝑡𝑃𝑉

𝑝𝑡,𝑖𝑂

Bu

ildin

g w

elf

are

max

imiz

ati

on

mod

el

Bi-level model

DER owner

Fig. 1. Graphical representation of building and interaction with util-ity/wholesale market. The left bracket shows the local welfare optimizationmodel, while the right bracket shows the bi-level model.

II. METHODOLOGY

We assume the case of one apartment house. Multipleconsumers live in the apartment building, while the ownerowns and operates the DER, consisting of solar PV and energystorage1. Fig. 1 shows the setup of this case study. The follow-ing section describes an optimization framework for sharingthe generation of the DER among multiple consumers. Themethodology bases on both, optimization and game theoreticalmodels.

Firstly, we introduce a centralized welfare maximizationframework for the whole building, which considers conflictingconsumer objectives such as costs and emissions reductionsas well as the revenues from DERs. Secondly, we formulate aMathematical Program with Equilibrium Constraints (MPEC)for DER pricing and resource allocation, where we assumethat the owner of the DERs is the leader and the consumersthe followers in a Stackelberg game. For clarification, the mainassumptions of the proposed models are as follows:• The model addresses optimal allocation and pricing of

generation by DER. As this is a question of short-term(operational) dispatch rather than long-term planning,investment decisions and corresponding costs are not partof the modeling framework.

• We assume that the owner of the DERs is fully informedabout the consumers preferences, i.e. consumers do notact strategically to influence the pricing and allocation ofDERs

A. Consumer utility function

This work takes into account the consumers individualobjectives considering multiple criteria. It is challenging forconsumers to compare electricity purchases across differencemetrics [25]. Therefore, we introduce weight factors wEi and

1The DER owner could be all or a sub-set of the consumers or it couldbe a third party. Both approaches may be implemented practically, e.g., inAustria since the government recently adopted new legislation (see ElWOG2017 [24]).

wDERi allowing consumers to express their preferences asa monetary value2. Hence, we define consumer is utilityfunction, uCi , as the sum of three different objectives3

uCi (q, p) = −costsi(q, p)−wEi emissionsi(q)+wDERi deri(q)(1)

The weighting factors do not only help us to address multipleobjectives, but also allow us to study individual consumerpreferences. Firstly, consumers are interested in reducing theirenergy bill. Secondly, they are interested in reducing emissionsand thirdly increasing the share of generation by DER may bea consumer objective, too. The signs for costs and emissionsare both negative because most consumers are interested inreducing those terms, while some consumers may also find anincrease in generation by DER desirable [30], [31].

Electricity costs for consumer i depend on the costs for gridand distributed consumption, and are formulated as

costsi(q, p) =∑t∈T

(pGt,iq

Gt,i + pOt,i

(qPVt,i + qBout

t,i

)). (2)

The first term is the cost of electricity purchased from thelocal utility (with price pGt,i) and the second term the cost ofgeneration by DER (with price pOt,i). The second objective of(1) concerns emissions reduction, where we define emissionsas

emissionsi(q) =∑t∈T

eGt qGt,i (3)

where eGt describes the grids (or power markets) marginalemissions. Marginal emissions are defined as the emissionsof the price-setting power plant. We use marginal emissionsinstead of average emissions, because any additional con-sumption results in an increase of marginal emissions. For anapplied example see section III. The third term in the objectivefunction (1) defines the consumers consumption of DER as

deri(q) =∑t∈T

(qPVt,i + qBout

t,i

). (4)

In order to properly keep track of DER generation, it is essen-tial that the battery is charged by locally generated electricity(i.e. PV generation), only. Otherwise, it would be possible thatthe electricity generation from the battery could originate fromthe grid. Consequentially, we defined the consumers WTP inTheorem 1.

Theorem 1 (Consumer willigness-to-pay): The willingness-to-pay (WTP) for DER of consumer i, characterized by theutility function (1) is given as

wtpt,i = pGt,i + wEi eGt + wDERi (5)

2The problem of multiple objectives is well studied in literature [3], [26],where one solution is to use the weighted sum method, as explained in[27]. According to the authors, for a priori articulation of preferences, thevalue of weight must be significant relative to other weights and relativeto its corresponding objective function. All three objectives in our modelhave different units, e.g. [costsi] = $, [emissionsi] = kgCO2 and[deri] = kWh. As stated in [28] and [29] multiple objectives or utilitiesmay be summed in the single-dimensional case (e.g. USD). Therefore, weintroduce monetary weight factors mapping kgCO2 and kWh to USD

3Considering additional objectives, e.g. as illustrated in [25] (other indica-tors may be energy saving or security-of-supply), may be the subject of futureinvestigations.

Page 4: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 4

The WTP may also be interpreted as the marginal consumerutility. The proof is given in Appendix A.

B. Revenues for DER owner

In practice, potential owners of the DER include the build-ing owner, an external company, or a group of residents. In ourproposed model, the owner is defined by a financial objectivefunction only, i.e. to maximize the operating revenues from theDER. Note that investment and operational costs are omitted.The owners revenues are therefore defined as

revO(q, p) =∑t∈T

∑i∈N

pOt,i(qPVt,i + qBout

t,i ) (6)

+∑t∈T

pMCPt (q

PVgrid

t + qBgrid

t )

and consist of revenues from selling energy to the consumerswithin the building or on the wholesale electricity market.

C. Welfare measures

To quantify the economic effects of local generation andenergy sharing within the building, we introduce welfareparameters in accordance with [32]. We define consumersurplus (CS), DER owner surplus (OS), and utility companysurplus (US)4 as:

CS(q, p) =∑t∈T

∑i∈N

((wtpt,i − pOt,i

) (qPVt,i + qBout

t,i

)), (7)

OS(q, p) = revO(q, p) = (6) and (8)

US(q, p) =∑t∈T

∑i∈N

((pGt,i − pMCP

t

)qGt,i). (9)

Note, that consumers do have a utility by grid consumption(see (1)). The above-defined surplus address changes resultingfrom DER generation compared to exclusively grid consump-tion. We also define loss of economic efficiency in the case ofscarcity [32] as

Loss(q, p) =∑t∈T

∑i∈N

((wtpt,i − pOt,i

)qGt,i). (10)

Following this terminology, we assume that building welfare(BW) that accrues to the building (i.e. consumers and DERowner) due to DER is BW = CS +OS. Finally, in order tomeasure the total welfare impacts, we also consider the impactto the utility company as TW = CS +OS + US.

D. Building welfare maximisation model

The first model maximizes the value of local generationusing a local welfare optimization model as shown Fig. 1(left). N consumers are described by their utility function uiand the load qLt,i. The DER owner is assumed to operate ina way to maximize the consumers aggregated utility. Possible

4As we do not have any detailed information about the utility company’scost function, we assume costs are equal to the energy purchases from thewholesale market. Costs related to investment and operation of the network arenot considered (which is equivalent to assume that they are constant regardlessof the level of DER generation on the building).

revenues from selling electricity to the grid are also included.Excess energy is sold at wholesale market price, pMCP

t , i.e.potential subsidy schemes, e.g., feed-in tariffs or tax creditsare neglected in this work. The objective function is buildingwelfare and includes both the consumers utility and the ownersrevenues. The full model is described in (1a)-(1j):

max{qGt,i,qPV

t,i ,qBoutt,i ,

qBint ,q

Boutt,i ,SOCt

}BW (q, p) = CS(q, p) +OS(q, p) (11a)

subject to qGt,i + qPVt,i + qBoutt,i = qLt,i (λLt,i) (11b)∑

t∈NqPVt,i + q

PVgrid

t + qBint + qPVcurtail

t

= qPVt (λPVt ) (11c)

SOCt = SOCt−1 + qBint ηB (11d)

−∑i∈N

qBoutt,i /ηB − qBgrid

t ∀t ∈ T \{0, T}

SOCt = SOCinit ∀t ∈ {0, T} (11e)

0 ≤∑i∈N

qBoutt,i + q

Bgrid

t ≤ qB (11f)∑i∈N

qBoutt,i + q

Bgrid

t ≤ SOCt (11g)

0 ≤ qBint,i ≤ q

B (11h)

SOC¯≤ SOCt ≤ ¯SOC (11i)

qGt,i, qPVt,i , q

Boutt,i , qBin

t , qBoutt,i , SOCt ∈ R+ (11j)

where constraint (11b) ensures that generation and consump-tion are equal for all periods. PV generation is limited by itsmaximum hourly availability qPVt and can be either deliveredto consumer i (qPVt,i ), fed into the grid (qPVgrid

t ) or battery(qBint ) or curtailed (qPVcurtail

t ), as dictated by (11c). Notethat curtailment may be the optimal choice in periods whereall (participating) consumers are entirely supplied with solargenerated electricity, the battery is fully charged, and marketprices are negative. Equations (11d)-(11i) describe the batterysintegration into the framework, i.e. makes sure that the batterystays within its state of charge and power limits. Finally, alldecision variables are limited to positive values (11j), only.

The BW model (11) dispatches DER in a way to maximizethe local welfare, considering the surpluses of both consumersand the DER owner. The model finds the optimal allocationof DERs among the consumers. In reality, appropriate pricesignals are also necessary for the financial settlement betweenconsumers and DER owner, and also to stimulate DER invest-ments. The choice of pricing scheme determines the allocationof BW among consumers and the DER owner. To some extent,the allowable pricing schemes depend on the tariff schemesfor electricity delivery. We consider the following four pricingschemes for this model:

• pOt,i = 0: As the operating costs of solar and batterygeneration are mainly given by investment costs (IC), onecould also set the short-term DER price to zero. In thiscase, to ensure economic viability of DERs, consumers

Page 5: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 5

would need to pay the IC up front or through annualpayments based.

• pOt,i = pGt,i: From the consumers point of view, theopportunity cost is given by the full retail rate for gridconsumption. Settling DERs at this price level could beinterpreted as net-metering.

• pOt,i = λPVt : As the dual variable of the solar PV balance,λPVt represents the marginal value of PV generationto the local system, and this could also be used as aprice signal. Dual variables are widely used in electricitymarket models to calculate prices [19].

E. Bi-level model

In the second model, we consider the situation where theDER owner takes advantage of the consumers interest in DERsto increase its own profit. In this case, the question of optimalpricing from the DER owners perspective leads to a non-cooperative game-theoretical model formulation. Towards thisend, we introduce a Mathematical Program with EquilibriumConstraints (MPEC) to calculate optimal pricing and energyflows of DERs. Fig. 1 (right bracket) shows the models setup.

A MPEC is an optimization model, whose constraintsinclude other interrelated optimization or complementarityproblems [33]. The MPEC in this paper comprises two typesof players:• The DER owner who runs the operation of the PV and

battery. The DER owner determines the prices for locallygenerated electricity, pOt,i, to the building consumers andsells to the grid with the objective to maximize (6).

• The consumers decide if they buy electricity from theDER owner for a given price, or consume electricity fromthe grid to maximize their individual utility (1).

The electric utility company and the wholesale electricitymarket are exogenous entities in this framework. For thesake of simplicity, the utility rate for grid consumption pGtis assumed to be equal for all consumers in the building.

In the literature, the general setup for this model is knownas a Stackelberg game [34]. The leader (i.e. the DER owner)anticipates the reactions of the followers (i.e. the consumers inthe building) to the leaders decisions. The leader has a strategicadvantage since it is assumed to know the consumers demandcurves. Therefore, model (11) may be reformulated as bi-levelmodel:

max{pOt,i,pUt,i}

{qGt,i,qPVt,i ,q

Boutt,i }

revO(q, p) (12a)

subject to (11c)− (11i)

pOt,i = pUt (12b)

pOt,i, pUt,i, q

Bint , qBout

t,i , SOCt ∈ R+ (12c)

max{qGt,i,qPV

t,i ,qBoutt,i }

uCi (q, p) (12d)

s. t. (11b) (12e)

qGt,i, qPVt,i , q

Boutt,i ∈ R+ (12f)

(µGmint,i , µPVmin

t,i , µBmint,i ).

The main difference to the BW model is the independentmaximization of OS and CS in the upper and lower levelproblems, and the introduction of new decision variables forprices, pOt,i and pUt . The upper-level problem maximizes theDER owners revenue and includes the same constraints as inthe BW model on solar PV generation and energy storageoperation, i.e. constraints (11c)-(11i). We consider the caseswhere the owner sells energy at different prices (discriminatoryprice auction) or the same price (uniform price auction). Themodeling framework is able to capture both auction systems,by activating or deactivating condition (12b).

Each consumer seeks to maximize his utility ui fromconsuming electricity, under the restriction of satisfying hisdemand (11b). The corresponding lower-level problem (12d)-(12f) is linear and continuous. Thus, it can be replaced byits KKT conditions, as shown in [33] and in Appendix B. Asthe 12 is nonlinear, because of the complementary conditionsand a nonlinear objective function, linearization, as describedin [20], [33] and Appendix C, is necessary. The linearizedproblem5 is

max{pOt,i,p

Ut,i,q

Bint ,q

Boutt,i ,

SOCt,qGt,i,q

PVt,i ,q

Boutt,i ,

µGmint,i ,µ

PVmint,i ,µ

Bmint,i ,λL

t,i

}

∑t∈T λ

Lt,iq

Lt,i

−∑t∈T p

Gt,iq

Gt,i

+wDERi

∑t∈T

(qPVt,i + qBout

t,i

)+∑t∈T p

MCPt (q

PVgrid

t + qBgrid

t )

(13a)subject to (11b)− (11i), (12b)− (12f)

pGt,i + wEi eGt − λLt,i − µ

Gmint,i = 0 (13b)

pOt,i + wDER − λLt,i − µPVmint,i = 0 (13c)

pOt,i + wDER − λLt,i − µBmint,i = 0 (13d)

qGt,i + wEi eGt ≥ 0 ⊥ µGmin

t,i ≥ 0 (13e)

qPVt,i ≥ 0 ⊥ µPVmint,i ≥ 0 (13f)

qBoutt,i ≥ 0 ⊥ µBmin

t,i ≥ 0 (13g)

λLt,i ∈ R (13h)

As stated in [35] an auction is efficient if, in equilibrium,the winner is the consumer with the highest CS, i.e., ifconsumer i wins. The DER owner is aware of the consumersCS, since wEi and wDERi are known. Therefore, the DERowner is able to calculate the consumers WTP (5) and cancharge them accordingly. Theorem 2 states the pricing schemethat maximizes the profit of the DER owner. In the case ofa discriminatory auction system, this means that the priceapplied to consumer i is equal the corresponding wtpt,i.Therefore, the consumer with the highest wtpt,i pays the mostfor DER, followed by the consumer with the second highestvaluation, etc. In return, energy will be dispatched accordingto this order as well.

Theorem 2 (Equilibrium of problem (12) under the assump-tion of a discriminatory based auction system): i.e., the DERprofit-maximizing solution of pOt,i applied to consumer i at

5For the sake of simplicity, complementary conditions are still written intheir nonlinear form.

Page 6: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 6

04.10.2017 2

-40

-20

0

20

40

60

80

100

1 3 5 7 9 11131517192123

Day-Ahead Energy Prices

in $/MWh

Low High

0

200

400

600

800

1000

1 3 5 7 9 11131517192123

Marginal emissions in

kg/MWh

Low High

0

200

400

600

800

1000

0 20 40 60 80 100

Day-Ahead price in $/MWh

Marginal emissions in

kgCO2/MWh

RES and Nuclear

NG CC

Coal

NG Other

Fig. 2. Relationship between Day-Ahead prices pMt CP (left) and marginalemissions eGt (right) as the result of a merit order relationship (middle).

time t is given by the consumers wtpt,i. The proof is givenin Appendix D.The solution of model (12) for uniform auctions is morecomplex, e.g., see [35], [36]. We developed Algorithm 1 tocalculate uniform prices pUt that maximizes OS. The idea ofthis algorithm is to start with all locally generated energy fedinto the grid. Iteratively, we update the owner revenues fromselling to the building consumers, whereby the consumers areranked in descending order by their WTP. In the end, the pricelevel that gives the highest revenues to the DER owner willbe returned and settled in (12b). Note that algorithm 1 findsthe optimal uniform price without the need of solving model(12).

Algorithm 1 Calculation of optimal pricing and revenues foruniform pricing (without battery).1: procedure UNIFORMPRICING

2: j ← 0 . No consumer is supplied with PV energy.3: N′ ← {0}4: pOt,0 ← ∞ . Default pricing value for feed-in, only.

5: revOt,0 ← pMCP

t qPVt . Valorization on wholesale markets, only.

6: for all j ∈ N do . Sorted descending by pOt,i .

7: N′ ← N′ ∪ {j} . Update set8: pOt,j ← wtpt,j

9: qPVgridt,j

← qPVt −

∑k∈{1,...,j} qLt,k

10: . Becomes negative if no surplus energy.

11: if qPVgridt,j

> 0 then . Feed-in

12: revOt,j ←

∑k∈N′ p

Ot,jq

Lt,k + pMCP

t qPVgridt,j

13: else . No feed-in

14: revOt,j ←

∑k∈N′\{j} pOt,jq

Lt,k + pOt,j(qLt,j + q

PVgridt,j

)

15: . In the case of∑

k∈N′ qLt,k ≥ qPV

t consumer won’t be fully supplied.

16: break17: end if18: end for19: i ← argmax

(revO

t,j

). Overwrite with optimal results.

20: pUt ← pOt,i

21: revOt ← revO

t,i

22: qPVgridt = max(q

PVgridt,i

, 0) . Only positive values

23: return pUt , revOt , q

PVgridt

24: end procedure

III. NUMERICAL EXAMPLE

To illustrate a potential application of the proposed models,we apply the framework to a numerical example for twoillustrative days. We use data from the ERCOT electricitymarket in Texas. Day-Ahead prices6 are included as vectorpMCPt for two illustrative days from July 2016:• Low price: July 18th 2016, low (even negative) prices.

6We used data labelled as ”HB SOUTH”, representing the hub in the southload zone.

• High price: July 10th 2016, high prices at noon andafternoon.

Marginal emissions, included by the vector eEt . Since marginalemissions are not published by ERCOT we assumed a relation-ship between Day-Ahead prices and marginal emissions. Thisapproach assumes a static merit order dispatch of the ERCOTmarket, under the assumption of a gas price of 3 $/Mbtu from2016 [37]. Fig. 2 shows Day-Ahead prices and correspondingmarginal emissions for both days7.

We characterize consumers by their hourly demand vectorqLt,i and their individual weights for emissions reductions, wEi ,and distributed generation, wDERi . We use published demanddata from NREL [38] of four Texan consumers, located in SanAntonio and Corpus Christi for one selected day, i.e. July 1st2016. The consumers electric load includes electricity demand,heating (space heating and hot water), cooling (HVAC andfans), as well as interior and exterior lights and equipment.We assume the following weight factors to illustrate dif-ferent consumer preferences: wEi = [0, 7.5, 0, 10] ct/kgCO2

and wDERi = [0, 0, 5, 10] ct/kWh. The first consumer isinterested in cost reduction, only. Consumer 2 and 3 are alsointerested in emission reduction or increased generation byDER, respectively. Finally, consumer 4 may be labeled as apremium consumer, which is willing to pay for both emissionsreduction and DER generation.

We use two different scenarios for the utility rate, pGt,i, paidby consumers for grid electricity8:

• Flat tariff: The generation charge is 0.059 $/kWh,while the delivery charge is 0.036 $/kWh. In total,pGt,i = 0.095 $/kWh. (Source: Southwestern ElectricPower Company)

• Real-time pricing (RTP): The generation charge consistsof the Day-Ahead wholesale market price plus a gen-eration markup of 0.013 $/kWh (Source: Power SmartPricing). The delivery charge is 0.036 $/kWh[34]. Intotal, pGt,i = pMCP

t + 0.049 $/kWh.

DER consists of a PV plant and battery system. We assumethat the apartment building has a 100 m2 roof area. The PVsystems installed capacity is 16.6 kWp. We used ERCOThourly solar generation data, as standardized value for the PVgeneration, thus qPVt = ηPVt ∗ 16.6 kWp. Storage capabilitiesare included by two Tesla Powerwalls with a nominal capacityof SOC = 28 kWh, charging and discharging power of 14 kWand two-way efficiency of ηB = 95 % (Source: Tesla).

We implemented both models ((11) and (12)) in the Pythonmodeling framework Pyomo [39] and solved it with the solverGurobi version 7.0.2 [40].

7Hereby, nuclear and renewable generation are the marginal generationresources and set the price up to 10 $/MWh, natural gas (NG) combined-cycle (CC) up to 23 $/MWh, coal power plants up to 38 $/MWh and NGother beyond 38 $/MWh. We assume that nuclear and renewable generationdoes not cause any emissions, while gas CC, coal and peak power plantsresult in emissions of 440, 880 and 640 kg/MWh, respectively.

8Note that we include volumetric tariff components exclusively withoutfixed charges, as fixed components are usually small and based on a monthlyor annual assessment. Also, electricity rates in Texas are low compared tomost other U.S. states.

Page 7: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 7

0 20Time in h

0

2

4

6

8

kWh

Consumer 1

qLi qBin qPV

i qGi qBout

i SOC

0 20Time in h

Consumer 2

0 20Time in h

Consumer 3

0 20Time in h

Consumer 4

0 20Time in h

Battery

0

5

10

15

20

25

Fig. 3. Allocation of DER (left) and battery SOC as well as charging power(right) for the low price scenario. The battery’s discharging power is shownin the left picture in purple (Flat tariff)

PV generation

Energy sold to the grid

Energy into the battery

1 2 3 4

Energy (PV+battery) sold to the consumers

0

25

50

75

100

125

Ener

gy

Bi-level model: discriminatory auction

Low (Flat)Low (RTP)High (Flat)High (RTP)

PV generation

Energy sold to the grid

Energy into the battery

1 2 3 4

Energy (PV+battery) sold to the consumers

0

25

50

75

100

125

Ener

gy

Bi-level model: uniform auction

Fig. 4. PV generation sold to the grid, charged to the battery, and sold toconsumers.

5 10 15 20Time

0.05

0.10

0.15

0.20

0.25

0.30

$/kW

h

Sc = Low (Flat)

5 10 15 20Time

Sc = Low (RTP)

5 10 15 20Time

Sc = High (Flat)

5 10 15 20Time

Sc = High (RTP)

wtpt, 1 wtpt, 2 wtpt, 3 wtpt, 4 pUt

PVt

Fig. 5. wtpt,i (bi-level model, discriminatory price auctions), pUt (bi-levelmodel, uniform price auctions) and λPV

t (BW max. model, dual variable) forall scenario combinations.

IV. RESULTS

In this section, we first show how the two models allocateand price energy among the consumers. Secondly, we comparethe impacts on social welfare. Finally, we conduct a sensitivityanalysis regarding the size of the PV plant.

A. Resource allocation and pricing

The BW maximization model (11) and the bi-level model(12) with discriminatory prices give the same allocation ofDERs, as shown in Fig. 3 (left). As consumer 4 always hasthe highest WTP for DER at any time, the model allocatesenergy mainly to consumer 4. As consumer 2 and 3 dohave different objectives, the energy allocation depends onthe systems marginal emissions. As wtpt,i is a function ofeGt , the consumers WTP changes over time. Hence, consumerpreferences concerning emissions are time-dependent, whilepreferences for DER remain constant. Fig. 3 shows thatconsumer 2 does not consume much DER. This is becausethe grid supply also has zero emissions during most of thehours (Fig. 2), making consumer 2 indifferent between gridand local generation.

The algorithm dispatches the battery to maximize BW,resulting in the battery schedule shown in Fig. 3 (right). Asmentioned above, most of the electricity is sold to consumer4, which has the highest WTP during the day.

Fig. 4 shows a comparison of the two different auctionsystems. Note that the dispatch of solar PV and the batteryof the BW maximization model is equal to the bi-level modelwith discriminatory auctions. Under the bi-level model, PVgeneration and energy sold to consumer 4 are the same forboth auction systems and all scenarios. The owner dispatchesthe solar PV and the battery in a way to maximize its revenues.Fig. 4 also shows the difference between Flat and RTPpricing. For instance, the DER owner sells energy differentlyto consumer 2 and 3 depending on the pricing scheme. It is aresult of a changed WTP. As stated in Theorem 1, the price ofelectricity consumption pGt,i is an input of wtpt,i. By addinga real-time based tariff instead of a flat rate, the volatilityof wtpt,i increases as well and results in a change in theallocation of energy.

Fig. 4 also shows that the DER owner sells more energyto the grid and less energy to consumers 2 and 3 under theuniform auction scheme. The reason is that in this case theowner prefers to sell to the grid rather than reducing the price(and its revenues) for all consumers. The allocation of welfarefor both models and auction systems are discussed in moredetail in the next section.

Although the DER allocation is the same with model (11)and (12) with discriminatory price models, there are stilldifferences in resulting prices. Fig. 5 shows the resulting pricesof both models for fixed and RTP tariff schemes. For the BWmax. model, three of the proposed pricing schemes are basedon external assumptions. The third pricing scheme followsfrom the dual variable λPVt of the building PV balance, resultsin a price that is lower than the prices from the bi-level model.

Here, we focus on the prices that follow from the the bi-level model, which finds optimal pricing from the ownersperspective. We find that the consumers are ”captives” of theowners pricing scheme. As shown in Fig. 5, the prices of thediscriminatory auctions are given by wtpt,i, in accordance withTheorem 1. The uniform price under the bi-level model, pUt ,on the other hand, varies between the different discriminatoryprice levels in order to maximize the owners revenues takinginto account that the prices of all consumers have to be thesame. Fig. 5 illustrates why uniform price auctions are lessprofitable for the DER owner, since the prices are partly belowthe consumers willingness to pay in this case. Therefore, theuniform auction results in a changed dispatch, as shown inFig. 4

B. Welfare allocationThe allocation of DER and pricing outcomes influence so-

cial welfare outcomes and the distribution of surplus betweenconsumers and the DER owner. Table I shows the value ofconsumer electricity costs, emissions and welfare measuresdefined in section II-C for the two allocation models underboth price scenarios, low and high.

The BW maximizes the total welfare of the building, but thewelfare distribution depends on the pricing scheme. Naturally,

Page 8: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 8

TABLE ISUMMARY OF WELFARE RESULTS IN THE ”HIGH PRICE” (FLAT TARIFF)

SCENARIO. RELATIVE CHANGES TO ”NO DER” ARE BELOW THEABSOLUTE VALUES.

No DERBW maximization (11) Bi-level model (12)0 pGt,i λPV

t wtpt,i pUt

Total costs 44.9 32.8 44.9 52.7 63.4 61.1in USD -27.0% 0.0% 17.3% 41.1% 36.0%

Total emissions 320.9 220.9 220.9 220.9 221.6 232.5in kgCO2 -31.2% -31.2% -31.2% -31.0% -27.5%

Total DER gen. 0.0 127.5 127.5 127.5 127.5 118.4in kWh - - - - -

OS in USD 0.0 0.0 12.1 19.9 30.6 28.1CS in USD 0.0 30.6 18.4 10.7 0.0 1.6US in USD 36.8 26.7 26.7 26.7 26.7 27.4

TW in USD36.8 57.2 57.2 57.2 57.2 57.1

55.8% 55.8% 55.8% 55.8% 55.4%

Loss in USD33.8 15.3 15.3 15.3 15.3 16.0

-54.6% -54.6% -54.6% -54.6% -52.7%

using the pricing scheme pOt,i = 0 allocates all the BW fromDER entirely to the consumers. In contrast, if pOt,i is set equalto pGt,i or λPVt the welfare is shared among the consumers andthe DER owner, with the latter earning a higher surplus underthe latter scheme, as summarized in Table I.

The bi-level model, in contrast, aims at maximizing theowners revenues or OS. We observe that under the discrimi-natory pricing, the DER owner fully exploits the consumersWTP for higher costs by setting prices accordingly, as theconsumers are ”captives” of the owner. Hence, all the surplusfrom DER goes to the DER owner, whereas the consumerutility, as the sum of costs, emissions, and DER, does notchange compared to the case without DER (CS = 0).

Not surprisingly, Table I shows that the CS is marginallyhigher under uniform price auctions, while the owners rev-enues are higher for discriminatory price auctions. As a resultof uniform price auctions, total welfare losses increases by1.9 % (high price scenario) compared to all the other caseswith DER. As discussed previously, the welfare losses are theresult of artificial scarcity (by selling to the market rather thanto consumers), as the owner is willing to accept inefficiencyin energy allocation in order to maximize it’s revenues.

C. Sensitivity analysis regarding the solar power capacity

So far, the analysis has considered a fixed size of thePV/battery system. Results from Fig. 6 shows the resultsof a sensitivity analysis regarding the PV plant size. Theimplemented pricing mechanism determines how BW is sharedbetween consumers and the DER owner. The saturation effectin Fig. 6 occurs when there is a distinct switch from supplyingDER to consumers to selling to the wholesale market. Aninteresting observation is that under the λPVt pricing schemefor the BW model, the DER owner benefits the most up toan installed capacity of about 30kWp, but there is a distinctswitch towards a higher CS after exceeding the threshold. Theexplanation is that the dual variable λPVt , which represents themarginal value of solar generation, is set by the consumersWTP or the wholesale market. By increasing the PV plantsize, this value is mostly defined by the market price pMCP

t .

0 20 40 60PV size in kWp

0

20

40

60

USD

CS

Max BW (pOt, i = 0)

Max BW (pOt, i = pG

t )

Max BW (pOt, i = PV

t )

Bi-level (discriminatory)Bi-level (uniform)

0 20 40 60PV size in kWp

OS

Fig. 6. Sensitivity analysis regarding the maximum PV plant size The verticalline shows the plant size of the previous investigation (16.6 kWp).

In contrast, the pOt,i = pGt pricing scheme results in increaseCS and OS as a function of the solar PV size, although thegrowth rate is lower when PV capacity exceeds 30kW.

V. CONCLUSIONS

To address the question of energy allocation and pricingof DER in an apartment building, we developed two dif-ferent models, where consumer preferences are characterizedby multiple objectives such as emissions reduction and on-site-generation in additions to cost. While the first modelmaximizes the total local welfare of the building, the secondmodel assumes that the DER owner acts strategically in a gametheoretical (bi-level) model to increase its revenue. Both mod-els (11) and (12) are efficient in the sense that the consumersthat place the highest value on DERs are served first, followedby the consumer with the second highest valuation, etc.

The results showed that the optimization of building wel-fare allocates energy identically to the bi-level model witha discriminatory price auction. The introduction of pricesdetermine how the building welfare from DERs is sharedbetween the consumers and the DER owner. As this paperpresented multiple pricing schemes, the situation, in reality,may depend on the affiliation between owner and consumers(e.g., ownership models). For practical implementation, bothmodels are suitable: The BW maximization makes intuitivesense for a community shared battery and solar project,where owners may also be consumers. In contrast, an externalinvestor is interested in maximizing the investment’s rate-of-return, making the bi-level model a more attractive option.If the bi-level model reveals the consumers’ true preferencesand WTP, the results show that the economics of DER aswell as the owner’s surplus may be increased. In turn, thisimproves the economics of DER and may stimulate additionalinvestments in DERs.

As we used solar PV as a representative technology forrenewable DER and the battery as one for storage tech-nologies, our proposed model may also be applied to othercommunity energy systems. We see multiple directions forfuture research, including the consideration of investmentdecisions, also factoring in the effects of uncertainty (e.g. interms of future demand for DERs). Furthermore, an importantmodel extension is to include strategic behavior of individualconsumers with the goal of lowering the DER price and hidetheir WTP.

Page 9: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 9

APPENDIX APROOF OF THE CONSUMER WILLINGNESS-TO-PAY

The utility function of the consumers ui is concave withrespect to consumption q. For any price pOt,i set by theowner, each consumer i will choose the consumption of localgeneration qOt,i = qPVt,i + qBout

t,i and grid qGt,i that maximizeshis utility (1). For price pOt,i set by the owner, each consumerhas an unique energy consumption to satisfy his demand qLt,i,whereas qGt,i = qLt,i − qOt,i. By substituting qGt,i in (1) andderiving, ui to qOt,i we can define the consumers WTP forlocally generated electricity stated in (5). �

APPENDIX BREFORMULATION BY KKT CONDITIONS

As described in [33] any MPEC can be formulated as amathematical optimization problem constrained by anotherone as:

min{x}{y,λ,µ}

f(x, y, λ, µ) (14a)

s.t h(x, y, λ, µ) = 0 (14b)g(x, y, λ, µ) ≤ 0 (14c)

min{y,λ,µ}

fL(x, y) (14d)

s.t. hL(x, y) = 0 (λ) (14e)

gL(x, y) ≤ 0 (µ) (14f)

We solve the MPEC exposed in this paper by reformulatingthe upper-level problem as an equivalent optimization problem.Therefore, the KKT optimality conditions of the lower-levelproblem will be implemented in the first level, as follows:

min{x}{y,λ,µ}

f(x, y, λ, µ) (15a)

s.t h(x, y, λ, µ) = 0 (15b)g(x, y, λ, µ) ≤ 0 (15c)

∇yfL(x, y) + λ∇yhL(x, y) + µ∇ygL(x, y) = 0(15d)

hL(x, y) = 0 (15e)

gL(x, y) ≤ 0 ⊥ µ ≥ 0 (15f)

By introducing the Lagrangian as

L(qGt,i, q

PVt,i , q

Boutt,i , λLt,i, µ

Gmint,i , µPVmin

t,i , µBmint,i

)(16a)

= −∑t∈T

pGt,iqGt,i −

∑t∈T

pOt,i(qPVt,i + qBout

t,i ) (16b)

− λLt,i(qGt,i + qPVt,i + qBout

t,i − qLt,i)

(16c)

− µGmint,i qGt,i − µ

PVmint,i − µBmin

t,i (16d)

the lower levels optimization problem could be rewritten byits KKT conditions in the form

∂L/∂qGt,i = pGt,i − λLt,i − µGmint,i = 0 (17a)

∂L/∂qt,i = pOt,i − λLt,i − µPVmint,i = 0 (17b)

∂L/∂qBoutt,i = pOt,i − λLt,i − µ

Bmint,i = 0 (17c)

∂L/∂λLt,i = qGt,i + qPVt,i + qBoutt,i − qLt,i = 0 (17d)

qGt,i ≥ 0 ⊥ µGmint,i ≥ 0 (17e)

qPVt,i ≥ 0 ⊥ µPVmint,i ≥ 0 (17f)

qBoutt,i ≥ 0 ⊥ µBmin

t,i ≥ 0 (17g)

APPENDIX CLINEARIZATION

The MPEC model (2) includes the following nonlinearities:• the complementarity conditions and• the term pOt,i(q

PVt,i + qBout

t,i ) (prices times quantity, bothare decision variables) in the objective function.

Complementarity conditions can be linearized using the well-known linear expressions proposed in [20]. In this work,we used SOS1 constraints to formulate the complementaryconditions [39]. The strong duality condition and some of theKKT conditions allows us to re-formulate the lower levelsobjective (similar to the problem formulated in [20]). It saysthat if a problem is convex, the objective functions of theprimal and dual problems have the same value at the optimum.Thus the lower levels primal objective (12d) equal to it’s dualobjective. fL,Duali = −

∑t∈T λ

Lt,iq

Lt,i Substituting those two

equations allows us to calculate the nonlinearity of the upperlevel as a linear expression (13a).

APPENDIX DPROOF OF SOLUTION FOR PRICE DISCRIMINATION

The owner (leader in the Stackelberg game) maximizesrevenues by selling electricity to consumers and the gridand sets the price for local generation pOt,i. As stated in [5](Definition 1), model (12) reaches the Stackelberg Equilib-rium, if all players obtain the optimal solutions, includingall consumers and the owner. Thereby, it is evident thatthe proposed framework reaches an Equilibrium as soon asthe owner is able to find optimized pOt,i and the consumerschoose their consumption. As the owner is able to identify allconsumers demand curve, he is able to exercise market power.Therefore, optimal pricing, from the owners perspective underthe assumption of a discrimination auction, is equal to theconsumers WTP (5). Indicating the fact, that the market pricepMCPt is lower than the utility rate pGt,i, it is favorable to sell

electricity firstly to consumers, secondly stored in the batteryand thirdly sell it to the grid. �

ACKNOWLEDGMENT

This project has received funding from the European UnionsHorizon 2020 research and innovation programme under grantagreement N691689 (Best practices and implementation of in-novative business models for Renewable Energy aggregatorS,BestRES).

REFERENCES

[1] IEA, “Energy Technology Perspectives 2016: Towards Sustainable Ur-ban Energy Systems,” 75739 Paris Cedex 15, France.

Page 10: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 10

[2] G. Comodi, A. Giantomassi, M. Severini, S. Squartini,F. Ferracuti, A. Fonti, D. Nardi Cesarini, M. Morodo,and F. Polonara, “Multi-apartment residential microgrid withelectrical and thermal storage devices: Experimental analysisand simulation of energy management strategies,” AppliedEnergy, vol. 137, pp. 854–866, 2015. [Online]. Available:http://www.sciencedirect.com/science/article/pii/S030626191400751X

[3] K. Dehghanpour and H. Nehrir, “Real-Time Multiobjective MicrogridPower Management Using Distributed Optimization in an Agent-BasedBargaining Framework,” IEEE Transactions on Smart Grid, p. 1, 2017.

[4] N. Li, L. Chen, and M. A. Dahleh, “Demand Response Using LinearSupply Function Bidding,” IEEE Transactions on Smart Grid, vol. 6,no. 4, pp. 1827–1838, 2015.

[5] N. Liu, X. Yu, C. Wang, and J. Wang, “Energy Sharing Managementfor Microgrids With PV Prosumers: A Stackelberg Game Approach,”IEEE Trans. Ind. Inf., vol. 13, no. 3, pp. 1088–1098, 2017.

[6] W. Saad, Z. Han, H. Poor, and T. Basar, “Game-Theoretic Methodsfor the Smart Grid: An Overview of Microgrid Systems, Demand-Side Management, and Smart Grid Communications,” IEEE SignalProcessing Magazine, vol. 29, no. 5, pp. 86–105, 2012.

[7] M. Stadler, G. Cardoso, S. Mashayekh, T. Forget, N. DeForest, A. Agar-wal, and A. Schonbein, “Value streams in microgrids: A literaturereview,” Applied Energy, vol. 162, pp. 980–989, 2016.

[8] Y. Xu, W. Zhang, G. Hug, S. Kar, and Z. Li, “Cooperative Control ofDistributed Energy Storage Systems in a Microgrid,” IEEE Transactionson Smart Grid, vol. 6, no. 1, pp. 238–248, 2015.

[9] M. Alam, S. D. Ramchurn, and A. Rogers, Eds., Cooperative energyexchange for the efficient use of energy and resources in remotecommunities. International Foundation for Autonomous Agents andMultiagent Systems, 2013.

[10] B.-A. Moshe, “Transportation Systems Analysis: De-mand and Economics,” Fall 2008. [Online]. Avail-able: https://ocw.mit.edu/courses/civil-and-environmental-engineering/1-201j-transportation-systems-analysis-demand-and-economics-fall-2008/

[11] G. Wang, Q. Zhang, H. Li, B. C. McLellan, S. Chen, Y. Li, and Y. Tian,“Study on the promotion impact of demand response on distributed PVpenetration by using non-cooperative game theoretical analysis,” AppliedEnergy, vol. 185, pp. 1869–1878, 2017.

[12] C. O. Adika and L. Wang, “Non-Cooperative Decentralized Chargingof Homogeneous Households’ Batteries in a Smart Grid,” IEEE Trans-actions on Smart Grid, vol. 5, no. 4, pp. 1855–1863, 2014.

[13] A. H. Mohsenian-Rad, Wong, V. W. S., J. Jatskevich, R. Schober, andA. Leon-Garcia, “Autonomous Demand-Side Management Based onGame-Theoretic Energy Consumption Scheduling for the Future SmartGrid,” IEEE Transactions on Smart Grid, vol. 1, no. 3, pp. 320–331,2010.

[14] C. P. Mediwaththe, E. R. Stephens, D. B. Smith, and A. Mahanti, “ADynamic Game for Electricity Load Management in Neighborhood AreaNetworks,” IEEE Transactions on Smart Grid, vol. 7, no. 3, pp. 1329–1336, 2016.

[15] O. Kilkki, A. Alahaivala, and I. Seilonen, “Optimized Control of Price-Based Demand Response With Electric Storage Space Heating,” IEEETransactions on Industrial Informatics, vol. 11, no. 1, pp. 281–288,2015.

[16] A. Mondal, S. Misra, and M. S. Obaidat, “Distributed Home EnergyManagement System With Storage in Smart Grid Using Game Theory,”IEEE Systems Journal, vol. 11, no. 3, pp. 1857–1866, 2017.

[17] X. Wu, X. Hu, X. Yin, and S. Moura, “Stochastic Optimal Energy Man-agement of Smart Home with PEV Energy Storage,” IEEE Transactionson Smart Grid, p. 1, 2016.

[18] Y. Fan, D. Papadaskalopoulos, and G. Strbac, “A game theoreticmodeling framework for decentralized transmission planning,” in 2016Power Systems Computation Conference (PSCC). IEEE, 2016, pp. 1–7.

[19] A. Ortner, C. Graf, and D. Huppmann, “Modeling competitive equi-librium prices for energy and balancing capacity in electricity marketsinvolving non-convexities,” Working paper, 2017.

[20] C. Ruiz and A. J. Conejo, “Pool Strategy of a Producer With EndogenousFormation of Locational Marginal Prices,” IEEE Transactions on PowerSystems, vol. 24, no. 4, pp. 1855–1866, 2009.

[21] A. Sinha and K. Deb, “Bilevel Multi-Objective Optimization and Deci-sion Making,” in Metaheuristics for Bi-level Optimization, ser. Studiesin Computational Intelligence, E.-G. Talbi, Ed. Berlin, Heidelberg:Springer Berlin Heidelberg, 2013, vol. 482, pp. 247–284.

[22] S. Banfi, M. Farsi, M. Filippini, and M. Jakob, “Willingness to payfor energy-saving measures in residential buildings,” Energy Economics,vol. 30, no. 2, pp. 503–516, 2008.

[23] G. Federico and D. Rahman, “Bidding in an electricity pay-as-bidauction,” Submitted to the Blue Ribbon Panel of the California PowerExchange, 2000.

[24] Austrian Federal Chancellery, “Federal Act Providing New Rules forthe Organisation of the Electricity Sector: ElWOG 2010.”

[25] S. Karjalainen, “Consumer preferences for feedback on householdelectricity consumption,” Energy and Buildings, vol. 43, no. 2-3, pp.458–467, 2011.

[26] N. I. Nwulu and X. Xia, “Multi-objective dynamic economic emissiondispatch of electric power generation integrated with game theory baseddemand response programs,” Energy Conversion and Management,vol. 89, pp. 963–974, 2015.

[27] R. T. Marler and J. S. Arora, “The weighted sum method for multi-objective optimization: new insights,” Structural and MultidisciplinaryOptimization, vol. 41, no. 6, pp. 853–862, 2010.

[28] P. C. Fishburn, “Additive utilities with finite sets: Applications in themanagement sciences,” Naval Research Logistics Quarterly, vol. 14,no. 1, pp. 1–13, 1967.

[29] E. Triantaphyllou and P. M. Parlos, Multi-criteria decision makingmethods: A comparative study, ser. Applied optimization. Dordrecht:Kluwer Academic Publishers, 2010, vol. v. 44.

[30] J. Peck, “Econ 501.02 - Intermediate Microeconomic Theory: Prefer-ences and Utility Functions.” [Online]. Available: http://www.econ.ohio-state.edu/jpeck/Econ501aL3.pdf

[31] A. Wolitzky, “14.121 Microeconomic Theory I: Lecture 8: ExpectedUtility Theory.”

[32] S. Callan and J. Thomas, Environmental Economics and Management:Theory, Policy and Applications. Cengage Learning, 2006. [Online].Available: https://books.google.at/books?id=ANWPlfqX0yQC

[33] S. A. Gabriel, A. Conejo, D. Fuller, Hobbs B., and Ruiz C., Comple-mentarity modeling in energy markets. New York, NY: Springer NewYork and Imprint: Springer, 2013.

[34] H. von Stackelberg, Market Structure and Equilibrium. Berlin, Heidel-berg: Springer Berlin Heidelberg, 2011.

[35] E. S. Maskin, “Auctions, development, and privatization: Efficient auc-tions with liquidity-constrained buyers,” European Economic Review,vol. 44, no. 4-6, pp. 667–681, 2000.

[36] C. Borgs, J. Chayes, N. Immorlica, M. Mahdian, and A. Saberi, Eds.,Multi-unit Auctions with Budget-constrained Bidders, 2005. [Online].Available: https://www.microsoft.com/en-us/research/publication/multi-unit-auctions-budget-constrained-bidders/

[37] J. D. Rhodes, M. E. Webber, T. Deetjen, and T. Davidson, “Aresolar and wind really killing coal, nuclear and grid reliability?” May12, 2017. [Online]. Available: https://theconversation.com/are-solar-and-wind-really-killing-coal-nuclear-and-grid-reliability-76741

[38] N. Blair, A. Dobos, J. Freeman, T. Neises, M. Wagner, T. Ferguson,P. Gilman, and S. Janzou, “System Advisor Model, SAM 2014.1.14:General Description: NREL/TP-6A20-61019.” [Online]. Available:http://www.nrel.gov/docs/fy14osti/61019.pdf

[39] W. E. Hart, C. D. Laird, J.-P. Watson, D. L. Woodruff, G. A. Hackebeil,B. L. Nicholson, and J. D. Siirola, Pyomo – Optimization Modeling inPython, 2nd ed., ser. SpringerLink : Bucher. Cham: Springer, 2017.

[40] Gurobi Optimization Inc., “Gurobi Optimizer Reference Manual,” 2016.[Online]. Available: http://www.gurobi.com

Andreas Fleischhacker Andreas Fleischhacker is aresearch associate and Ph.D. candidate at the EnergyEconomics Group at the Technical University ofVienna. He received a B.Sc. degree in ElectricalEngineering and an M.Sc. degree in AutomationEngineering from Technical University of Vienna.He joined the Energy Economics Group in October2013 as a project assistant where he participates ininternational and national research projects. In 2017he visited MIT/LIDS for joint research. His researchinterests in Energy Economics include modeling and

optimization of sustainable energy systems under consideration of hybrid gridstructures as well as energy sharing concepts for distributed generation.

Page 11: Sharing solar PV and energy storage in apartment buildings: … · We introduced two type of players, the owner of distributed generation (e.g. solar PV and energy storage) and the

1949-3053 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. Seehttp://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TSG.2018.2844877, IEEETransactions on Smart Grid

IEEE TRANSACTIONS ON SMART GRID, VOL. -, NO. -, JUNE 2018 11

Hans Auer Hans Auer is an Associate Professorin Energy Economics at Technical University ofVienna, Austria. He received a M.Sc. in ElectricalEngineering (1996), a Ph.D (2000) and Venia Do-cendi (2012) in Energy Economics from TechnicalUniversity of Vienna. Since the beginning of hisacademic career he has been focusing in researchand teaching on various aspects of electricity marketmodeling and design, notably in the context of gridand market integration of renewable energy andstorage technologies.

Georg Lettner Georg Lettner Georg Lettner joinedthe Energy Economics Group at the Technical Uni-versity of Vienna in 2009. Georg is Group Leader forBusiness Development in Smart Grids, Smart Citiesand E-Mobility. He is a key Senior Expert in gridand market integration of distributed generation andrenewable generation technologies and Smart-Gridsconcepts. Georg’s research interests are focused ontailor-made simulation software development in thiscontext, with special consideration of the economicinteractions between the different stakeholders (busi-

ness models). In recent years Georg contributed to many research andconsulting projects for the energy industry.

Audun Botterud Dr. Audun Botterud is a PrincipalResearch Scientist in Laboratory for Information andDecision Systems (LIDS) at Massachusetts Instituteof Technology (MIT) (since 2016) and a PrincipalEnergy Systems Engineer in the Center for Energy,Environmental, and Economic Systems Analysis atArgonne National Laboratory (since 2005). He re-ceived a M.Sc. in Industrial Engineering (1997) anda Ph.D. in Electrical Power Engineering (2004),both from the Norwegian University of Scienceand Technology. He was previously with SINTEF

Energy Research in Trondheim, Norway. His research interests include powersystem planning and operation, electricity markets, energy economics, gridintegration of renewable energy, energy storage, and stochastic optimization.He is the co-chair of the IEEE Task Force on Bulk Power System Operationswith Variable Generation.