title: Integrated Planning of a Solar/Storage Collective
authors: Jesus E. Contreras-Ocaña Arshpreet Singh Yvon Bésanger Frédéric Wurtz
text: 
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	Integrated Planning of a Solar/Storage Collective
  		This work was funded by the Make Our Planet Great Again Program of the French Government and the interdisciplinary Eco-SESA Program of the Univ. Grenoble Alpes.
  	
      Jesus E. Contreras-Ocaña, Arshpreet Singh, Yvon Bésanger, Frédéric Wurtz
      Received ; Accepted
  ======================================================================================================================================================================================================================
  
  
  		French regulation allows consumers in low-voltage networks to form collectives to produce, share, and consume local energy under the collective self-consumption framework. A natural consequence of collectively-owned generation projects is the need to allocate production among consumers. In long-term plans, production allocation determines each of the consumers' benefits of joining the collective. In the short-term, energy should be dynamically allocated to reflect operation. This paper presents a framework that integrates long and short-term planning of a collective that shares a solar plus energy storage system.  In the long-term planning stage, we maximize the collective's welfare and equitably allocate expected energy to each consumer. For operation, we propose a model predictive control algorithm that minimizes short-term costs and allocates energy to each consumer on a 30-minute basis (as required by French regulation). We adjust the energy allotment ex-post operation to reflect the materialization of uncertainty. We present a case study where we showcase the framework for a 15 consumer collective.      
  	
  	
  	
  	
  	
  	
  	
  	
  		Planning, control, energy community, techno-economic modeling. 
  	
  	
  	
  	
  	
  	
  
  § NOMENCLATURE
  
  	
  
   §.§ Indices and sets
  
  	[xxxx]
  		
    i Index of consumers
  		
    ℬ Set of feasible ES charge/discharge actions
  		
    ℰ Set of feasible annual energy allocation per consumer
  		
    ω Index of uncertainty scenarios
  		
    Ω Set of uncertainty scenarios
  	
  	
  	
  
   §.§ Variables and parameters
  
  	[xxxx]
  		
    A Number of years in planning horizon
  		
    B_net Expected net benefit (EUR)
  		
    c/d ES Charged/discharged per time period (kWh)
  		
    C_i Consumer i's cost (EUR)[l, g, and C (without subscripts) represent aggregate load, local  generation, and cost, respectively. ]
  		
    C_grid Grid connection cost (EUR)
  		
    C^es_inv ES inverter cost (EUR)
  		
    C^pv_inv PV inverter cost (EUR)
  		
    CapEx Capital expenditures (EUR)
  		
    e Energy allocation per consumer (kWh) [See Section <ref> for the meaning of each of the superscripts and accents of e. ]
  		
    E^es_cap Energy storage capacity (kWh)
  		
    G Key of repartition matrix (kWh)
  		
    g_i Local generation assigned to consumer i (kWh)
  		
    g^g Energy bought from the grid per time period (kWh)
  		
    g^pv PV generation per time period (kWh)
  		
    g^s Surplus energy sold to the grid per time period (kWh)
  		
    L Consumer load per time period matrix (kWh)
  		
    l_i Load of consumer i (kWh)
  		
    m Expected mismatch between planned and delivered energy (kWh)
  		
    N Number of consumers
  		
    OpEx Operational expenditures (EUR)
  		
    obj^*_LT Objective of the long-term planning problem (EUR)
  		
    p Price of local PV+S energy (EUR/kWh)
  		
    P^es_cap Energy storage power capacity (kW)
  		
    P^es_inv Energy storage inverter capacity (kW)
  		
    P^pv_cap PV installed capacity (kW)
  		
    P^pv_inv PV inverter capacity (kW)
  		
    r Discount rate
  		
    S Subsidies (EUR)
  		
    T Number of time periods for simulation in a year[The subscripts c and p denote control and prediction horizon, respectively.] 
  		
    α Vector of per-unit PV production
  		
    β^es/β^pv Per-unit cost of ES/PV capacity (EUR/kWh)/(EUR/kW)
  		
    β^es  u ES utilization cost coefficient (EUR/kWh)
  		
    β^mnt Yearly PV maintenance cost per unit of intalled capacity (EUR/kW)
  		
    Δ Length of time period (hours)
  		
    ϵ̂ Deviation between actual and expected PV+S generation in the control horizon (kWh) 
  		
    γ Share of the net benefit kept by investor 
  		
    κ Energy-to-power ratio of the energy storage system
  		
    λ Price of energy sold to the grid (EUR/kWh)
  		
    Π Investor's profit (EUR)
  		
    τ Grid export tax (EUR/kWh)
  		
    θ Weight of energy mismatch (EUR/kWh)
  	
  	
  	
  	
  	
  
  § INTRODUCTION
  
  	
  	As part of an almost universal embrace of renewable energies by people and governments around the globe, many jurisdictions today recognize and encourage the self-consumption of local renewable energy generation. For example, the European Commission put out a set of best practices for self-consumption regulation <cit.> and several European countries including Germany, France, Spain, and Switzerland have in place laws and frameworks related to self-consumption <cit.>.
  	
  	In France, the practice of self-consumption (autoconsommation) was recognized by the energy code in 2017 <cit.>. The code defines the rate of self-consumption as the share of the local production at each instant[In practice and as dictated by France's Energy Regulatory Commission, the rate of self-consumption is calculated every 30 minutes <cit.>.] that is consumed locally.  Additionally, the code lays out a framework for collective self-consumption. In the collective variant, a group of geographically proximal consumers connected to the low-voltage grid can share locally produced energy <cit.>. In the French case, collectives organize around a legal entity (personne morale) who is in charge of communicating the repartition of energy among consumers on a 30-minute basis. 
  	
  	From the consumer's point of view, we identify two major advantages of collective over individual self-consumption. First, it facilitates investment by increasing the viability of larger systems and enable economies of scale <cit.>, opens up otherwise unavailable physical resources (e.g., better-located rooftops), and allows for the participation of institutional investors that can provide attractive financing and absorb risk <cit.>. The second advantage is that by sharing energy, collectives can reach higher rates of self-consumption than equivalent individual projects. This is especially true if the loads are heterogeneous. Thus, if the electricity tariff structure rewards self-consumption, collectives reap higher benefits.        
  	
  	However, organizing a collective also represents challenges. For one, the interconnection process and operation one large system be complicated <cit.>. Or, if one aggregates several smaller systems, then the challenge becomes one of coordination and control. In any case, coordination among consumers and the grid represents a challenge <cit.>. Beyond technical challenges, several studies identify the difficulty of reaching an acceptable deal to all parties - investor and consumers - as significant challenges <cit.>.  In particular, Goedkoop and Devine-Wright in <cit.> stress the need for mechanisms that create trust among the participants and lead to stable collective arrangements.  
  	
  	
  
   §.§ Summary and contribution of this work
  
  	
  	
  	In this paper, we present a cooperative planning framework that integrates long-term planning and short-term operation of an energy collective of consumers sharing a photovoltaic plus storage (PV+S) system and an investor that provides capital. By “cooperative”, we mean a planning framework that puts the welfare of the collective ahead of individuals. We designed the framework with cooperation rather than competition as a guiding principle because we agree with Goedkoop and Devine-Wright: an overly-competitive environment may lead to tense relations, lack of trust, and ultimately jeopardize the financial stability of the collective <cit.>. 
  	
  	Furthermore, we adopt simplicity[Developing a technical and quantitative meaning of “simple” is not trivial and outside the scope of our work. In our work, mechanism 1 is simpler than mechanism 2 if we believe that it is easier to explain in layman's terms and its input-output relationship is easier to understand.] as a guiding design principle for the mechanisms that frame the relationship between participants. As outlined in <cit.> simple procedures are important if we want to encourage healthy energy collectives. Concretely, our framework is designed with transparent and simple-to-understand prices and operational rules.    
  	
  	In our framework, the long-term plan answers two important questions: what PV+S system size is optimal? and what benefits can consumers and the investor expect from joining the collective? The answer to the first question is important because we want to use resources as efficiently as possible. Knowing how much each consumer can expect to save and how much the investor can expect to earn is important because it allows them to decide whether or not to join the collective. 
  	
  	The main determinant of the investor's profit is the price p at which PV+S energy is sold to consumers. For the investor, p should be high enough to recover its capital and operating costs (CapEx and OpEx). However, for the consumers to benefit from joining the collective, p should be (roughly speaking) lower than grid prices. In this work, we present a method to determine the range of values that p can take such that all participants benefit. The existence of such a range is necessary for the collective to be financial sustainable, i.e., a collective in which all participants benefit financially.
  	
  	
  	
  	
  	Part of the long-term plan is to calculate the repartition of local energy production. French regulation requires the legal entity to produce a “key of repartition” to determine the share of local production received by each consumer on a 30 minutes basis. Thus, we propose a method to determine a key of repartition that equitably allocates energy among consumers throughout a year. This key determines the expected amount of PV+S energy that each consumer can expect to receive in a year. The expected energy allotment for each consumer and the price p are the two ingredients needed for each consumer to estimate the benefits of joining the collective. The yellow section of Fig. <ref> illustrates the long-term planning portion of our framework.
  	
  	The two main goals of the real-time operation portion of our framework are to efficiently operate the PV+S system and fulfill the energy expectations of each customer. Real-time operation is composed of a control stage (the middle blue section in Fig. <ref>) and a settlement stage (the green section of Fig. <ref>). In the control stage, we propose a model predictive control (MPC)- based algorithm to minimize operating costs and determine a key of repartition that tracks the expected energy allotment from the long-term plan. In the settlement stage, we propose an optimization-based method to adjust the key of repartition from the control strategy such that it complies with the actual operation (which differs from the control strategy due to materialization of uncertainty) of the PV+S system. 
  	
  	We would like to emphasize that energy allocation is done for financial and billing purposes. That is, for each consumer, the algorithm decides how much of their energy consumption should be paid to the grid and how much to the local PV+S. We do not control the actual power flows as these are determined by Kirchhoff's Laws.
  	
  	We would like to emphasize that while this work was inspired by the French collective self-consumption case, the proposed framework is generic and widely applicable. Within European regulation, the proposed framework could be used under the definitions for “Renewable Energy Communities” from <cit.> and “Citizen Energy Communities” from <cit.>. To this day, Portugal, Spain, Wallonia (Belgium), and Greece have adopted regulations on energy communities and the rest of the European Member States should follow within the next few years. Beyond European regulation, our framework could be used for the planning and operation of a generic microgrid with community or investor-owned assets.  
  	
  	Finally, we provide a case study of a PV+S energy collective in the South of France. In it, we showcase each of the elements of the proposed integrated planning framework using realistic data.
  	
  	To recapitulate the contributions of this work, we restate them as follows. 
  	
  		
    * A cooperative planning framework that integrates long-term planning and short-term operation of an energy collective.
  		
    * A long-term plan determines that determines the optimal PV+S system and the conditions for the financial sustainability of the collective.
  		
    * A method to equitably allocate yearly local PV+S energy to the consumers. 
  		
    * An MPC-based algorithm to minimize operating costs and determine the key of repartition that tracks the expected energy allotment of the long-term plan.
  		
    * A method to adjust the key of repartition ex-post operation to reflect the realization of uncertainties and operation of the system.
  		
    * A case study of our framework for a 15 consumer energy collective.
  	
  	
  	
  	
  	
  	
  
   §.§ Literature review
  
  	
  	Energy communities are not an entirely new concept (long-existing cooperatives in the U.S. and microgrids are related concepts) but following the unveiling of the Clean Energy Package for All Europeans set of legislation, have gained renewed interest <cit.>. In <cit.>, Moret and Pinson introduce the concept of an “Energy Collective" composed of prosumers that interact with each other and with the grid through a third party. Their work introduces a structure similar to the one presented in this paper and analyses the operation and fairness of the collective. However, it does not explicitly deal with the problem of energy repartition by community-owned assets and ignores the problem of long-term planning. The work in <cit.> presents a review of several business models under which a collective can be organized. Some of those business models could in principle be applied within our framework (e.g., customer and mixed ownership, energy service company).  
  	
  	One of the central issues introduced by the collective self-consumption framework is the problem of local energy allocation among consumers. Market-based mechanisms are some of the most common ways of allocating shared resources, e.g., the works in <cit.> for the case of microgrids. Alternative non-market methods of resource allocation also exist. For example, in <cit.>, Erinski and Schülke propose a method to fairly allocate energy from a central wind or solar generator. In <cit.>, the authors propose an energy credit-based system to share solar energy surplus within a community. The authors of <cit.> and <cit.> present cooperative game-theoretic analyses of energy collectives. In <cit.>, the authors present a nucleolus-based solution that leads to a stable and fair payoff distribution
  	scheme for all players. Abada et al.'s work in <cit.> touches on many of the questions that we deal with in this paper, e.g., optimal investment and financial stability of an energy collective. While <cit.> presents a deeper and more theoretical analysis of the question of financial stability, they ignore some of the elements of our work such as the energy storage (ES) system, the key of repartition, real-time operation, and ex-post operation settlements.  
  	
  	
  	PV+S system sizing is a key topic of this paper and also a heavily studied subject. Works such as as <cit.> focus on the techno-economics of sizing while works such as as <cit.> direct their focus to more technical aspects. In <cit.>, Khare and Ragnekar develop a methodology that minimizes the annual cost of a PV system. The work in <cit.> goes a step further and considers a PV+S system. The authors of <cit.> present a sizing problem of distributed energy resources that incorporates the value of delaying capacity expansion. The work in <cit.> presents a planning problem of an isolated microgrid. The algorithm in <cit.> is especially interesting because it exploits the complementary of solar energy and biogas to reduce the need for ES. The authors of <cit.> propose a sizing method for solar, wind, and battery microgrids that considers reliability metrics, the specific characteristics of wind and solar production, among others. The work in <cit.> proposes a microgrid sizing algorithm that, in addition to wind, solar, and batteries, also considers dispatchable diesel generation. Similar to this work, <cit.> and <cit.>, embed the short-term operation of the system in their sizing problems.  However, the question of how to allocate local production is outside the scope of all the aforementioned works.
  	
  	
  	
  
   §.§ Organization of the rest of the paper
  
  	
  	Section <ref> describes the consumer, investor, and legal entity models. Section <ref> presents the PV+S system sizing problem and Section <ref> presents the problem of benefit allocation. Section <ref> presents the system operation algorithms (control and ex-post operation settlement). Section <ref> presents a case study of a PV+S collective in the south of France and Section <ref> concludes this paper and provides suggestions for future work. 
  	
  	
  
  § PARTICIPANTS IN THE COLLECTIVE
  
  	
  	
  
   §.§ Consumers
  
  	
  	We model consumers as inflexible loads partially fulfilled by local energy and partially by grid energy. Let l_i be a vector ∈ℝ_+^T that represents energy consumption of consumer i during T periods of length Δ. Let g_i be a vector ∈ℝ_+^T that represents energy from the PV+S system assigned to i during each period. Then, i's costs are
  	
      C_i( l_i - g_i) + p·  1^⊺ g_i.
  
  	where the first term is grid costs and the second local energy costs. The linear function C_i maps i's energy deficit, l_i - g_i, to grid-related cost which includes energy, fees, and taxes. The price of local energy is represented by p.   
  	
  	We express the total cost, C, of N consumers as a function of the aggregate consumption and generation, l - g = ∑_i=1^N l_i - g_i:
  	
      C( l - g) +  p · 1^⊺ g =  ∑_i=1^N {C_i( l_i - g_i) +  p· 1^⊺ g_i }.
  
  	
  	
  
   §.§ Investor
  
  	
  	The investor provides capital for the PV+S system, funds maintenance, operational expenses, taxes, and absorbs the bulk of the risk[The main sources of risk are solar generation uncertainty, future prices, and regulatory uncertainty. Consumers are also exposed to risk since solar supply is uncertain.]. In return, the investor profits by selling PV+S to the consumers. 
  	
  	We define the present value of the investor's profit as 
  	We define the present value of the investor's profit as 
  	
      Π = ∑_a=1^A p · 1^⊺ g + λ^⊺ g^s  + S /(1+r)^a_revenues - CapEx - ∑_a=1^A OpEx/(1+r)^a_costs.
  
  	The investor's revenue stream is composed of three elements: sales to the consumers, p·  1^⊺ g, energy sales to the grid[Energy sales to the grid can be limited by technical or regulatory limits.] at a price λ, λ^⊺ g^s, and yearly subsidies, S. To calculate the present value of the total revenue, we add the discounted revenue stream over the planning horizon {1,2,,A}. Here, r is the discount rate and relates future cash flows to present value <cit.>.   
  	
  	The investor's costs are composed of CapEx and OpEx. The former are incurred before and during system installation and include hardware, equipment, installation, and grid connection costs. The latter include system utilization costs and taxes and, similar to the revenue stream, we add the discounted OpEx stream to calculate the present value of the OpEx. 
  	
  	
  
   §.§ Legal entity
  
  	
  	
  	The third participant is a neutral legal entity who is in charge of operating the PV+S system, allotting local energy to consumers, billing, and representing the collective. It behaves neutrally and is guided by contracts and algorithms. Concretely, the legal entity determines and implements the PV+S system real-time operation strategy, calculates the ex-post operation settlements, bills, and communicates with the grid.
  	
  	
  	The EU Directive 2019/944 on common rules for the internal market for electricity and the EU Directive 2018/2001 on the promotion of the use of energy from renewable sources define “Citizen Energy Communities” and  “Renewable Energy Communities” as legal entities (e.g., civil associations, cooperatives, corporations, etc.). For example, France's legislation calls for self-consumption activities to be organized within a personne morale (i.e., a legal entity or legal person) <cit.>.  In Greece, natural persons and small and medium enterprises are allowed to create for-profit or non-for-profit cooperatives to legally house an energy community <cit.>. These are just a few examples of legislation that mandates collectives to operate within a legal entity. However, in our work, we adopt a wider definition that may include, for example, aggregators or contracts between individuals. Despite its name, more than a legalistic definition, the key is that the legal entity undertakes the responsibilities listed in the previous paragraph. 
  	
  	
  	
  	
  
  § LONG-TERM PLANNING (SIZING PROBLEM)
  
  	
  	
  	In this work, we take a cooperative approach to long-term planning. That is, we look for a Pareto-optimal PV+S system that maximizes the total welfare of the investor and the consumers, i.e., the investor's profit minus the consumers' costs. 
  	
  	We formulate the sizing problem as a two-stage stochastic mixed-integer linear program (MILP) whose main source of uncertainty is solar irradiation. Solar irradiation uncertainty is modeled using scenarios of per-unit of installed PV capacity PV generation. Each scenario is a possible  PV generation profile and is represented by a T-long time series of numbers between 0 (e.g., at night) and 1 (i.e., generating at capacity).  
  	
  	The first stage (here-and-now) variables, i.e., decisions taken before the uncertainty materializes, are sizing-related decisions such as the capacities of the PV and ES systems. On the other hand, the second stage (wait-and-see) variables are decisions that can be modified later when refined forecasts are available. Specifically, second stage variables are operation-level decisions such as ES operation and PV production.   
  	
  	
  
   §.§ Objective
  
  	
  	We cast the problem as a maximization problem whose objective, 
  	
      obj^*_LT= max{[Π_ω]  - ∑_a=1^A [ C( l - g_ω) +p ·1^⊺ g_ω] /(1+r)^a},
  
  	is to maximize the expected welfare of the investor and the consumers. In this work, the subscript ω denotes scenarios of solar generation and the function  calculates the expected value of its argument. It is trivial to show that the term p· 1^⊺ g_ω cancels out in (<ref>) which renders the objective as linear.
  	
  	Our long-term plan simulates an entire year (rather than typical days as it is often the case in planning formulations). Since the OpEx (contained in Π_ω) and grid costs depend on the short-term (e.g., hourly) operation of the PV+S system, we co-optimize investment and operation decisions. Including operation-scale decisions and scenarios of uncertainty makes the resulting MILP relatively large. Thus, to ease the computational burden in our case study, we model one typical year and assume that the rest of the planning horizon is comparable. The rest of this section describes the sizing and operational constraints of the problem. 
  	
  	
  
   §.§ Sizing constraints
  
  	
  	The sizing-related constraints of the PV system are
  	
  		
      (P^pv_inv, C^pv_inv) ∈{ (a_1^pv , b_1^pv ),(a_2^pv , b_2^pv ) }
          P^pv_cap≤ P^pv_inv.
  
  	
  	Eq. (<ref>) states that one must choose a PV inverter with maximum power P^pv_inv and cost C^pv_inv among a discrete set of inverters with characteristics (a_j^pv , b_j^pv) where a_j^pv is the maximum power of inverter j and b_j^pv is its cost. Eq. (<ref>) limits PV capacity to the inverter's maximum power. We implement Eq. (<ref>) in an MILP setting using discrete variables and linear constrains.
  	
  	The constraints of ES sizing decisions are
  	
  		
      (P^es_inv, C^es_inv) ∈{ (a_1^es , b_1^es ),(a_2^es , b_2^es ) }
          P^es_cap≤ P^es_inv
          E^es_cap = κ· P^es_cap.
  
  	
  	Similar to the PV case, Eq. (<ref>) defines the capacities and costs of the possible ES system inverters and Eq. (<ref>) limits the ES maximum charge/discharge rate to the inverter capacity. Eq. (<ref>) relates the ES system energy capacity to its maximum power via a fixed energy-to-power ratio, κ. 
  	
  	
  
   §.§ Short-term operation constraints 
  
  	
  	Let the vector g^pv_ω∈ℝ_+^T denote solar production in uncertainty scenario ω during each period. For each scenario, g^pv_ω is the product of installed PV capacity, the length of each period Δ, and a parameter α_ω∈ℝ_+^T that is related to solar irradiation:
  	
      g^pv_ω =Δ·α_ω· P^pv_cap ∀ ω∈Ω.
  
  	Here, Ω is the set of solar generation scenarios. Each of the elements of α_ω takes values in [0,1]. When an element of α_ω is 0, there is no solar production and when it is 1, the PV system produces at full capacity. 
  	
  	The ES system has two main operational variables, energy discharged and energy charged at each time period, denoted by d_ω∈ℝ_+^T and by c_ω∈ℝ_+^T, respectively. In our work, we consider charge, discharge, and state-of-charge limits and charge and discharge efficiency. For the sake of brevity, we omit the details of the widely-used ES model (e.g., as in <cit.>) and compactly denote these constrains as
  	
      (d_ω, c_ω) ∈ℬ(P^es_cap,E^es_cap)  ∀ ω∈Ω
  
  	where ℬ(P^es_cap,E^es_cap) is the feasible charge and discharge space as a function of the battery size. 
  	
  	
  	
  	We define imports from the grid, g^g_ω∈ℝ_+^T, and surplus of the collective, g^s_ω∈ℝ_+^T as follows
  	
  		
      g^g_ω =  [l_ω  + c_ω -g^pv_ω  - d_ω ]^+  ∀ ω∈Ω
          g^s_ω =  [g^pv_ω  + d_ω - c_ω  -l_ω]^+  ∀ ω∈Ω.
   
  	 
  	We define imports from the grid as the difference of consumption (the sum of load and battery charge, l_ω + c_ω) and production (the sum of PV generation and battery discharge, g^pv_ω  + d_ω) when this amount is positive. The operator [  ]^+ is an element-wise function that gives the positive component of its argument. Similarly, Eq. (<ref>) defines surplus as the difference between production and consumption when this number is positive. 
  	
  	Another relevant quantity is PV+S generation assigned to the consumers, g_ω, during each period and scenario:
  	
      g_ω = l -  g^g_ω ∀ ω∈Ω.
  
  	Note that this quantity is not necessarily the PV+S production since a portion of it may be directed to the grid as surplus. 
  	
  	
  	
  
   §.§ CapEx and OpEx
  
  	
  	We define the investor's CapEx as
  	
      CapEx =  C^pv_inv + C^es_inv + β^pv· P^pv_cap + β^es· P^es_cap + C_grid
  
  	where C^pv_inv, C^es_inv, P^pv_cap, and P^es_cap are introduced in Section <ref>. The per-unit costs of PV and ES capacity are β^pv and β^es, respectively. C_grid denotes a fixed grid connection cost. 
  	
  	We state the investor's OpEx as  
  	
      OpEx_ω=  β^es  u· (c_ω+d_ω)+ β^mnt· P^pv_cap  + τ^⊺ g^s_ω ∀ ω∈Ω
  
  	where the first term represents the ES utilization (i.e., degradation or ageing) cost as a function of charge and discharge; the second term represents the maintenance costs of the PV system; and the third term represents taxes for grid exports. The symbols β^es  u and β^mnt in Eq. (<ref>) are the ES utilization coefficients (e.g., as in <cit.>) and yearly maintenance cost per unit of installed PV, respectively.  The vector τ∈ℝ^T denotes taxes paid by the investor for exporting g^s_ω to the grid. 
  	
  	
  	
  
  § BENEFIT ALLOCATION
  
  	
  	
  	The solution to the sizing problem is a Pareto-optimal PV+S system but does not tell us what the expected profit of the investor is nor what the expected savings of the consumers are. The reason is that the cost of PV+S energy for the consumer is part of the investor's revenue and cancels out in the objective.  Nevertheless, the solution to the sizing problem is important as it represents the maximum welfare PV+S system.
  	
  	From the sizing problem's solution, we define the net benefit, the quantity to be shared among the investor and consumers, as follows.
  	
  	
  		The expected net benefit, B_net, is the difference between the present value of the consumers' electricity cost without PV+S, C(l), and the objective of the sizing problem from Eq. (<ref>), obj_LT^*. 
  		
      B_net = C(l) - obj_LT^*
  
  	 
  	
  	By definition, the expected net benefit is non-negative. This follows from the fact that not installing a PV+S system is a feasible solution (and therefore C(l) ≥ -obj_LT^*). We can then say that any PV+S system will deliver positive expected benefits. The positivity of the expected net benefits is an important fact since it is a necessary condition for financial stability.
  	
  	The mechanisms whereby the net benefit is shared is the price of local energy p and the amount of energy allocated to each consumer. A higher price p translates to higher investor profit and lower savings for the consumers. Assuming that p is lower than the average grid price, a consumer's savings are proportional to the amount of energy assigned to him/her.
  	
  	
  
   §.§ The price of local energy
  
  	
  	Let Π(p) denote expected investor profit as a function of the price p.  The relation 
  	
      γ·B_net = Π(p)
  
  	describes the share γ of the net benefit kept by the investor as profit.  
  	
  	While it is relatively straight forward to calculate B_net and Π(p) (by solving the sizing problem), calculating γ or p is not easy: there is no “optimal” point along the investor-consumer Pareto frontier. Therefore, there is no optimal p nor a natural γ. 
  	
  	A possible scenario is that the investor and consumers arrive at a price through negotiation. Naturally, the negotiation does not happen inside a vacuum: it takes place in a particular economic, regulatory, technological, and cultural environment which makes the outcome hard to characterize for a general case. However, one can identify general dynamics. For example, we can argue that an abundance of capital diminishes the negotiating power of the investor. Conversely, access to effective PV production models by the consumer could allow them to better estimate project costs and benefits and claim a larger stake. While a deep study of the issue of benefit allocation is outside of this work, seminal work on bargaining, or negotiation, theory can be found in <cit.> and an application to power systems in <cit.>.
  	
  	A basic characteristic of γ is that it should normally be in [0,1]. An investor is unlikely to accept a negative profit, i.e., γ<0. Conversely, any γ>1 means that the consumers pay more than they would otherwise pay to the grid. In theory, γ∉ [0,1] is possible if other (perhaps non-monetary) benefits are omitted from the sizing problem. For example, consumers could accept paying higher-than-grid prices for local and green energy. Conversely, an investor could accept losses if the project provides non-accounted benefits (e.g., a positive public image).
  	
  	
  	
  	
  	
  
   §.§ Energy allocation and key of repartition
  
  	
  	While p determines the benefit allocation between investor and consumers as a whole, the PV+S energy allocated to each consumer determines the benefit split among the consumers themselves.  
  	
  	We allocate PV+S energy on three occasions throughout our framework. The first is on the planning stage before constituting the collective. There, we estimate the amount of local energy that each consumer can expect throughout the life of the project. With the estimate on hand, consumers can evaluate whether to enter the collective or not. We also allocate energy among consumers in the control and settlement stages. We detail these last two occasions in Section <ref>.
  	
  	What is important for consumers from a financial point of view is monthly or yearly energy allocation. However, under the French collective self-consumption framework, local energy production must be allocated among consumers in 30-minute intervals via a key of repartition.
  	
  	
  	In our work, a key of repartition has two fundamental characteristics. For every time interval: 
  	
  		
    * If there is an energy deficit (i.e., aggregate load > PV+S production), all of the production must be assigned to the consumers and if there is a surplus, the aggregate load must be met by PV+S energy.
  		
    * The energy assigned to a consumer must be less than its load.
  	    
  	Let the matrix G = [g_1, g_2,, g_N ]∈ℝ^T× N_+ denote a key of repartition[Recall that g_i was introduced in Eq. (<ref>) and is a vector energy directed to consumer i during each time interval.]. The (t,i)th element of G represents the amount of energy that consumer i receives during time interval t.  
  	
  	We formalize the two conditions above by defining the set
  	
      𝒢( g,L) = { G | G1 = min( g,L1 ),   0 ≤ G ≤ L },
   where g∈ℝ^T_+ was introduced in Eq. (<ref>) and is the total local energy assigned to consumers in each period. The matrix L∈ℝ^T× N_+ is constructed by L=[l_1, l_2,  , l_N]. Similar to G, the (t,i)th element of L is the load of consumer i during interval t. The term G1  and L1 are T-long vectors composed of the sum of the columns of G and L, respectively. The constraint[The operator min(·, ·) is a element-wise function that takes the smallest number of each corresponding elements of the arguments. ] G1 = min( g,L1 ) states Condition 1. The constraint 0≤ G ≤ L states Condition 2.
  	
  	
  		For any g ∈ R_+^T and L ∈ R_+^T × N there is always a feasible key of repartition G ∈ R_+^T × N. We analyze two cases: time periods with surplus PV generation (g>L1 and thus L1=min(g,L1)) and time periods with deficit PV generation (g≤ L1 which implies g=min(g,L1)). For the first, the key of reparation G=L satisfies both constraints of Eq. (<ref>): G1=L1=min(g,L1) and 0≤ G=L ≤ G. For the second case, let g=a · L1 where 0≤ a < 1. Then, we can build the key of repartition G=a· L which satisfies both constraints of Eq. (<ref>): G=a· L=g=min(g,L1) and 0≤ G=a· L ≤ L. Since there are feasible keys of repartition for this two cases, we conclude that there is always a feasible key of repartition. 
  	
  	
  	For non-trivial cases, infinitely many keys of repartition satisfy 𝒢. In our work, we evaluate the set of keys on a basis of equity and select the best. That is, we select the key from 𝒢 that allocates yearly energy as equally as possible.
  	
  	
  	Let the symbol e ∈ℝ_+^N 
  	
      e =  G^⊺ 1
  
  	denote yearly energy allocated to each consumer. The ith element of e is the energy allocated to consumer i. Since equity in yearly allocation is our goal, the best key is one that assigns the same amount to each consumer, i.e., an e whose elements have a zero variance.
  	
  	However, since the key is restricted by 𝒢, it may not be possible to achieve a zero variance. Also, recall that g is uncertain. Thus, we formulate a linearly-constrained quadratic optimization problem whose objective is to minimize the expected variance of e.
  	
  	Let Var(e_ω) denote the variance of the annual energy allotted to each consumer in scenario ω. Based on work by Singh in <cit.> and Abada et al. in <cit.>, we find the key that minimizes the expected variance of energy allocation by solving the convex[Let μ_e denote the mean value of the elements of e and Var(e) =  1/N e^⊺ e - μ_e^2 their variance. Since Var(e) is a quadratic function and ℰ is defined by linear constraints, Problem (<ref>) is convex.] optimization problem
  	
      min_e_ω∈ℰ(g_ω, L_ω) ∀ω∈Ω[Var(e_ω)].
  
  	Here, L_ω = [l_1,ω, ,l_N,ω ]^⊺ and ℰ(g_ω, L_ω) = {e | e=G^⊺ 1 ,  G ∈𝒢(g_ω,L_ω) }.  The set ℰ(g_ω, L_ω) constraints the annual energy allocation in each scenario, e_ω, to be delivered by a feasible key of repartition. 
  	
  	The solution of Problem (<ref>), e_ω^*, serves to estimate the yearly amount of PV+S energy each consumer can expect during the life-time of the project: e = [e_ω^*]. It also serves as a liaison between long-term planning stage and system operation: it is the reference value of how to allocate energy among consumers during operation.
  	
  	
  	
  
  § SYSTEM OPERATION
  
  	
  	
  	
  	The operation of the PV+S system has two objectives: to determine the control strategy and to formulate the actual key of repartition. Whereas the key from Problem (<ref>) serves to estimate energy allocation, the actual key reflects system operation and the materialization of uncertainty. 
  	
  	We divide system operation into the control stage and the settlement stages. We formulate the control strategy on a rolling horizon fashion via an MPC algorithm. The goals of the control strategy are two-fold: to minimize the short-term costs of the collective and to formulate a key that tracks e. In the settlement stage, we reconcile the MPC key with actual system operation and materialization of uncertainty by formulating yet another key, this time the definitive one. We formulate the definitive key via an optimization program that minimizes the mismatch between e and the sum of energy served and expected energy. 
  	
  	
  	
  
   §.§ Control
  
  	
  	Our MPC algorithm starts by determining a control strategy for a prediction horizon (e.g., one or two days) by solving an optimization problem. Then, we implement the strategy during a shorter control horizon (e.g., 30 minutes) and collect system operation data. Finally, we update predictions and the optimization problem and repeat the process.
  	
  	
  	The core of MPC is the control problem solved at each iteration. It is very similar in structure to the sizing problem but differs in three main ways. First, while the sizing problem has a years-long horizon, the control problem's horizon is in the order of hours or days. Second, the control problem does not make sizing decisions since the PV+S system is already in place. Finally, the control problem has aims to track the allocation of energy e.  
  	
  	
  	
  	
  	As illustrated in Fig. <ref>, let [t_0,t_0+T_c] and [t_0,t_0+T_p] denote the prediction and control horizons, respectively.  We model decisions in the control horizon as first stage variables and identify them with a hat. Decisions in the rest of the prediction horizon, i.e., in [t_0+T_c,t_0+T_p], are second stage variables and are identified by a tilde. For example, PV production during the control horizon, [t_0,t_0+T_c] is denoted by ĝ^pv∈ℝ_+^T_p and during [t_0+T_c,t_0+T_p] as  g̃_ω^pv∈ℝ_+^T_p. We represent uncertainty in the control horizon with a central forecast and via scenarios in the rest of the prediction horizon. 
  	
  	We write the control problem as 
  	
  		
      min   [ C([   l̂; l̃_ω ] -[    ĝ; g̃_ω ]) +OpEx_ω-[   λ̂; λ̃_ω ]^⊺[     ĝ^s; g̃^s _ω ]] +θ·m_2^2  
      s.t.    Eqs. (<ref>), (<ref>), (<ref>), (<ref>), (<ref>), (<ref>)
         ê + ẽ_ω∈ℰ([    ĝ; g̃_ω ], [   L̂; L̃_ω ])   ∀ ω∈Ω
         m = [e^past+ ê+ ẽ_ω +  e^future - e].
   
  	
  	The objective has two components. The first is the operation costs during the control horizon (denoted by symbols with a hat) and during the rest of the prediction horizon (denoted by symbols with a tilde). OpEx_ω denotes PV+S OpEx during the entire prediction horizon. The second is a term proportional to the ℓ^2 norm of the expected mismatch, m, between e from long-term planning and actual PV+S energy delivered to consumers. The mismatch is weighted by a parameter θ∈ℝ_+ that has units of EUR/kWh^2. The paragraph that follow describes m in greater detail.  
  	
  	The solution space is subject to operation constraints, energy flow definitions, and OpEx definition defined by Eqs. (<ref>)-(<ref>). Constraints (<ref>) constraints energy allocated during the prediction horizon to be in ℰ. Finally, Eq. (<ref>) defines the expected mismatch as the difference between the promised energy to consumers e and
  	
  		
    * e^past, the energy allocated to each consumer prior to t_0;
  		
    * ê, allocated energy during the control horizon;
  		
    * ẽ_ω, allocated energy during [t_0 + T_c, t_0+T_p];
  		
    * e^future_ω, the expected[In our work, this expectation is obtained from G^*_ω from Problem (<ref>)] energy for each consumer after T_p.
  	
  	
  	
  	
  
   §.§ Settlement
  
  	
  	
  	Uncertainty during the control horizon is relatively small since we solve the control problem shortly before t_0 when good predictions are available. Nevertheless, uncertain parameters are still present and materialize sometime before the end of the control horizon. Thus, we formulate an ex-post operation settlement problem to reconcile the key of repartition from the control strategy and actual operation of the PV+S system. 
  	
  	Let ĝ^* denote energy to be assigned to consumers by Problem (<ref>) and ϵ̂ denote the deviation between actual and expected generation. Then, the energy assigned to consumers is [ĝ^* + ϵ̂]^+. We take the positive part of ĝ^* + ϵ̂ because no “negative" energy can be assigned to consumers. Negative elements of ĝ^* + ϵ̂ is energy bought from the grid.   
  	
  	We formulate the settlement problem as
  	
      min_ê∈ℰ ([ĝ^* + ϵ̂]^+, L̂)[e^past+ ê + ẽ_ω +  e^future - e ]_2^2.
  
  	Similar to the control problem, its objective is to minimize the ℓ^2 norm of expected mismatch between promised energy to consumers, e, and the energy assigned to each one of them during the four divisions of time illustrated in Fig. <ref>. In this case, ê is the only optimization variable and that the objective is to allocate [ĝ^* + ϵ̂]^+.
  	
  	
  
  § CASE STUDY
  
  	
  	
  
   §.§ Background and data
  
  	
  	
  
  	
  	We demonstrate our proposed framework with a case study of a collective of 15 residential consumers sharing a PV+S system. We use 10 scenarios of solar irradiation for the south of France from <cit.>. Data for two sample days (one winter one summer) is shown in Fig. <ref>. French electric system fees and taxes (TURPE) are  from <cit.> and energy prices from Électrcité de France's (EDF) Tarif Bleu[The tarif bleu includes the taxes and fees so we isolate the energy price by subtracting them.]. We use load data of residences in San Diego, California from <cit.>.
  	
  	
  	We consider solar PV and lithium-ion ES investments and analyze two cases: a baseline case and a pessimistic case. In the former, we consider low per-kW of PV prices[We use an exchange rate of $1=1.11 EUR.]  (1.1 EUR/W for systems under 100 kW and 0.95 EUR/W for PV systems over 100 kW <cit.>) and a price of 0.06 EUR/kWh for surplus sold energy to the grid <cit.>. In the later, we assume high per-kW PV prices (1.68 EUR/W for systems  <100 KW and 1.58 EUR/W for PV systems ≥100 kW <cit.>) and no compensation for grid injections. 
  	
  	We consider 4 available inverters with capacities of 50, 99, 157, and 249 kW and costs of 72 EUR/kW <cit.>. We assume a per-kWh cost of ES of 158EUR <cit.> and a round-trip efficiency of 90%. We consider PV subsidies of 100 EUR/kW for systems under 100 kW <cit.>. The planning horizon is 20 years and is divided into 1-hour periods in the sizing problem and into 30-minute periods in the control problem. We assume a discount rate of 3%.
  	
  	We ran the simulations on a Windows 10 laptop computer running on an Intel© Core™ i5-8250U CPU @1.60GHz 1.80GHz with 8GB of RAM. The models are coded in Julia and the optimization problems solved using Gurobi 8.0.1.  
  	
  	
  	
  
   §.§ Sizing
  
  	In both the baseline and pessimistic cases, the sizing problem contains 526,152 variables (10 of which are binary) and 701,337 constraints. The binary variables describe discrete choices (e.g., inverter) and non-convexities[The PV cost and subsidy functions are non-convex.]. Despite its size and non-convexities, the problem is relatively easy to solve: the baseline case solves in approximately 2 minutes and the pessimistic in 12 minutes. 
  	
  	
  	
  
  	Fig. <ref> shows the expected consumer monthly cost (in present value) as function of PV capacity. In the baseline case, the optimal PV capacity is 249 kW and the optimal ES capacity is 150 kWh. In this case, we expect the PV+S system to lower costs from 116 EUR/consumer/month to 77 EUR/consumer/month. This represents net benefits of 142 thousand EUR during the lifetime of the project. The pessimistic case (50kW PV/127 kWh ES), on the other hand, represents lifetime net benefits of 32 thousand EUR. Table <ref> breaks down costs and benefits for both cases. Hereafter we analyze the pessimistic case. 
  	
  	
  	
  
   §.§ Benefit allocation
  
  	
  	
  
  
  
  	
  	As discussed in Section <ref>, the price of PV+S energy p is the main mechanism used to allocate benefits between the investor and the consumers. As shown in Table <ref>, the “break-even” price for the investor is 0.10 EUR/kWh in the baseline case and 0.05 EUR/kWh in the optimistic case. On the other hand, the price at which consumers can expect to pay the same whether or not they join the collective is 0.13 EUR/kWh for both cases. Thus, any price between the investor break-even and the consumer break-even prices allocates positive benefits to both the investor and the consumers (i.e., a win-win situation). We call this price range the win-win price range. 
  	
  	Note that while the consumer break-even price is the same in both cases, for the investor it is higher in the baseline case. The reason the consumers' break-even price is constants is that their grid costs (the alternative to energy from the PV+S system) are the same in both cases. For the investor, however, the higher CapEx and OpEx in the baseline case (see Table <ref>) increase the break-even price. In general, higher capital and operational costs lower the expected net benefit and shrink the win-win price range. On the other hand, more favorable conditions for PV+S investment (e.g., higher grid prices, lower CapEx and OpEx) expand the win-win price range. 
  	
  	While predicting p is outside the scope of this work, identifying the win-win price range is important because it defines the financially sustainable range of p. Hereafter we analyze the pessimistic case where benefits are allocated equally among the investor and consumers, i.e., p=0.115. 
  	
  	
  	
  	
  	Each consumer's savings is a function of the amount of PV+S energy each receives at a price p. As discussed in Section <ref>, infinitely many energy allocations are possible but we use Problem (<ref>) to find a key of repartition (i.e., the PV+S supply allotment to each consumer on a 30-minute basis) that allocates energy equitably. The red bars in Fig. <ref>(a) show the annual PV+S supply assigned to each consumer by the solution of Problem (<ref>).
  	
  	
  	
  	
  	Even though the objective of Problem (<ref>) is to equally distribute PV+S supply, one can notice that the supply distribution is not quite equal. The reason is that the restrictions imposed by the set 𝒢, which defines a key of repartition, prevents the allotment from being perfectly equitable. For example, a load that systematically “under-consumes” during high PV production hours tends to “miss out” on the opportunity to receive PV+S energy. In fact, by examining the blue and red bars of <ref>(a) one can see that the expected PV+S supply is closely linked to the annual load. Furthermore, as shown by Fig. <ref> most of the variance in annual PV+S supply can be explained by the consumer's annual load (with an R-squared = 0.97). What this means is that, as shown in Fig. <ref>(b) cost reductions in terms of percentage are relatively uniform among consumers and most consumers can expect a 3 to 5% cost reduction by joining the collective. 
  	
  	
  	
  
   §.§ Operation and settlement
  
  	
  
  
  	
  	The objective of the operation phase is to find the control strategy that minimizes short-term costs and mismatch between promised energy (the red bars of Fig. <ref>(a)) and actual delivered energy to each consumer.
  	
  	Fig. <ref> shows the consumer mismatch in terms of percentage energy promised as a function of time for three different algorithms. Plot (a) shows results using the proposed MPC and settlement algorithm, plot (b) shows results using the proposed MPC algorithm and a myopic (short-sighted) settlement algorithm, and plot (c) shows results using a rule-based control algorithm similar to the one in <cit.> and the myopic settlement algorithm. The myopic settlement allocates energy to the consumers as fairly as possible but does not take into consideration past nor expected future allocations. Under the rule-based control, the ES system operates under the following regime: when there is a PV energy surplus, it charges as much as possible (while observing power and energy limits) and when there is a PV energy deficit the ES discharges as much as possible, also while observing limits. Note that the most important flaw of the rule-based algorithm is that it does not seek to minimize costs as it fails to account for retail energy prices. 
  	
  	
  	Fig. <ref>(a) shows that the end-of-year mismatch for each consumer with our proposed MPC and settlement algorithms is between +3% and +11%.  In absolute terms, all consumers finish the year with a surplus of 276 ±2 kWh (just over 2% of total load). As shown in Fig. <ref>, under the proposed method every consumer receives at least as much energy as promised.  Note that the main reason all consumers were allocated more energy than promised during the benefit allocation phase, is that PV production during the simulated year was 6% higher than the expected. As shown in Figs. <ref>(b) and <ref>(c), the alternatives deliver a less equitable energy distribution. In the MPC + myopic settlement case, the energy mismatch per consumer ranges from -4% to +12% (the cumulative deficit in this case is 0.42 MWh as shown in Fig. <ref>). In the rule-based control + myopic settlement case, the mismatches range from -15% to +20% (the cumulative deficit in this case is 1.2 MWh as shown in Fig. <ref>). Under the alternatives to our proposed algorithm, some consumers receive less energy than promised (despite having a better-than-average year in terms of PV generation) while others receive over 20% more than promised. 
  	
  	The two optimization problems used in this stage are the control problem from the MPC algorithm and the ex-post operation settlement problem. Both are solved at each iteration of MPC. Both problems are convex and easy to solve with commercial solvers. In our case, the computational effort needed to solve these problems is minimal: the control problem solves on an average of ≈0.006 seconds, and the settlement problem in ≈0.005. 
  	
  	
  	
  	
  	
  
  
  	
  	Naturally, the energy allocation mismatch is a function of PV generation. As shown in Fig. <ref>, our algorithm over-delivers PV+S in the simulated year mostly due to a 6% better-than-average year in terms of PV generation. Fig. <ref> shows the relationship between PV capacity factor (i.e., average generation over installed capacity) and end-of-year mismatch for each consumer for five simulated years. As expected, the allocation surplus (i.e., positive mismatch) tends to increase with capacity factor (i.e., more PV generation). Note that by linear interpolation, at expected capacity factor (denoted by the dashed line in Fig. <ref>) the expected mismatch is close to zero. 
  	
  	
  	
  	Fig. <ref> illustrates the allocation of energy in the collective for one sample day. Each of the colored areas under the load represents the energy allocated to a consumer on a 30-minute basis, i.e., the key of repartition. The orange area over the load represents the surplus energy sold by the investor to the grid. Since we present results for the pessimistic case, the surplus goes uncompensated. 
  	
  	
  	
  
  § CONCLUSIONS AND FUTURE WORK
  
  	
  	In this paper, we present a framework that integrates long-term planning and operation of a collective that shares a photovoltaic plus storage (PV+S) system. In our framework, the collective is constituted by an investor who provides capital for the PV+S system and a set of consumers who buy PV+S energy at an agreed price from the investor and complement their consumption from the grid. While the presented framework is fairly generic, we focus on the collective self-consumption scheme laid out by French regulation.  
  	
  	In the long-term planning stage, we first size the PV+S system by solving a mixed-integer linear program whose objective is to maximize the long-term (e.g., 20 years) welfare of all participants of the collective (i.e., the investor and the consumers) and then allocate the expected benefits among the participants. For the benefit allocation stage, we first find the set of PV+S energy prices that would lead to a financially stable collective, i.e., the set of prices that are high enough for the investor to profit but low enough to be attractive for the consumers. Finally, we allocate PV+S among the consumers based on the principle of equity. We accomplish this, by solving an optimization problem whose objective is to allocate PV+S energy evenly among consumers.  
  	
  	The long-term planning and the operation stages are coupled by the sizing decisions, as usual, but also by the expected PV+S energy allotment to each consumer. Thus, the objective of the operation is both to minimize system operation and to minimize the mismatch between the expected and actual PV+S allotment. The operation stage is divided into two steps. First, we determine the operation strategy on a rolling horizon via a model-predictive control algorithm. Then, after the strategy is implemented and the uncertainty materializes, we adjust the energy repartition to reflect the actual operation of the system.
  	
  	We demonstrate our framework with a case study of a potential 15 consumer collective in the south of France. We examine two cases: a baseline case that features PV investment costs on the low-end and reasonable prices for surplus sales to the grid and a pessimistic case that features high-end PV investment costs and no remuneration for injections to the grid. We show that in both cases, installing PV+S is Pareto-optimal. Then we show the range of PV+S prices that fosters financially sustainable (prices between 0.10 and 0.13EUR/kWh in the pessimistic case). Then, we show that, even in the pessimistic case and when the investor extracts half of the benefits, the consumer can still expect to save about 3 to 5%. Naturally, the savings would be higher with more favorable consumer conditions (e.g., lower PV installation costs or higher share of benefits assigned to consumers). Finally, our proposed control and settlement algorithms outperform two alternatives in terms of the end-of-year mismatch between energy promised and energy delivered.  
  	
  	Future work can take diverse directions. For example, we did not consider consumers equipped with demand response (DR). It would be interesting to investigate the effects of DR in different indices such as system cost and rate of self-consumption and problems such as DR control and compensation. Furthermore, our model mainly deals with the energy management problem. One could enhance the model by including the local distribution grid and considering other voltage stability or power quality problems. 
  	
  	
  	IEEEtran
  	
  	
  	
  	
  	