Abstract
These days electrical grid makes use of information and communication technology. Information technology is primarily used for providing intelligence in the electrical grid. Solution presented in this article is a step further in this direction. All the prosumers have photovoltaic cells and energy storage batteries. The cyberphysical energy infrastructure solves many contentious issues of traditional electrical grid. This research article addresses the issues related to energy sharing among prosumers of a microgrid. The issues are namely, (i) intermittent nature of renewable energy resources, (ii) energy loss due to physical central storage, and (iii) charging/discharging scheme of the central storage in the presence of realtime pricing. The concept of central physical energy storage system is inefficient. Therefore, it is necessary to have an efficient energy sharing mechanism to reduce energy penetration to the grid and reduce energy loss. This paper proposes a cyberphysical energy sharing structure which introduces the idea of virtual shared distributed energy storage analogous to the virtual shared memory in distributed computing systems. This concept, named as softmicrogrid, considerably reduces the subsequent charging/discharging hurdles and energy loss of microgrid. This concept is supplemented with an algorithm for charging the virtual shared distributed energy storage.
Introduction
There is a global interest to reduce the production of greenhouse gases. A major part of greenhouse gas productions is due to energy generation from fossil fuels. Renewable energy resources are seen to be an alternative to fossil fuels. The solar energy is one of the dominant renewable energy resources. The photovoltaic cells are used for generating electrical energy from solar light. These photovoltaic cells are installed by consumers at their home. The installation of the photovoltaic cells at the home makes that home a energy producer. So, with the energy production capability a consumer household becomes a prosumer (i.e., consumer as well as producer). Information and Communication Technology (ICT) and advanced power electronics have led the realization of smart grid. A microgrid (a small sized smart grid that can work in isolation or as a subpart of a large grid) consists of distributed energy resources (like solar photovoltaic cell, small wind turbine, batteries), advanced power electronics devices (like DC/DC converter, DC/AC converter, AC/DC converter), smart meters, microcontrollers, smart electrical appliances, and communication technology enablers (protocols, devices). All these constituent members of microgrid play important role in energy sharing. This article addresses the energy sharing issues among the users of a microgrid.
The electrical grid works on the principle of the balance of supply and demand of the electrical energy. When the supply and demand are not equal, it affects the voltage and frequency, which can cause the power outage, malfunction, and damage of the electrical equipment.
The variability of the renewable energy resources into the grid may cause a sharp increase or drop in the power supply. The storage is required to handle the said gap, instantaneously. The major portion of stored energy (approximately 95%) [1] is in the form of pumped hydro storage. This kind of storage is good to inject a surge of power into the grid to balance the peak electricity demand. But, for the momentary fluctuations, the smart grid requires energy storage having a fast response time. The battery energy storage system for the smart grid is more suited. Battery energy storage can store the surge of energy from the renewable energy resources. It also can inject energy into the grid in the case of a spike in demand. The battery storage system is suitable for the instant smoothing of the fluctuations [1]. The utility of the battery energy storage system has been studied [2, 3] in terms of the saving of energy from distributed energy generation. The study [2] listed out the benefits of the battery storage system, such as the decoupling of the time of generation and consumption of the electric energy (e.g., timeshifting and peak shaving), integration of renewable energy generation, telecommunications backup power, voltage control, grid fluctuation suppression, and distribution stabilization.
As it has been discussed that the battery storage system plays several roles in the smart grid. This work focuses on the battery storage system management for the endusers using the concept of virtual energy storage. The concept of virtual energy storage [4, 5], analogous to the sharing computing resources in a virtualized fashion, is the virtualization of the central physical battery storage. The meaning of the virtualization of the central physical battery storage is the logical separation of the storage capacity into many virtual storage capacities. These virtual storage capacities are allocated to endusers. Each enduser feels that he/she has his/her own battery. The research work in this article proposes a new idea, which virtualizes the physically distant (distributed battery energy storage) rather than central physical battery storage. The proposed idea is analogous to distributed shared memory in the distributed computing system, which provides virtual address space for all the shared nodes [6]. The contributions of this research work are as follows:
(i) The novel idea of the virtual shared distributed energy storage for cyberphysical energy sharing. To the best of our knowledge, this research work is the first of its kind, which virtualizes the physically distant battery energy storage. We have named this concept as ‘Softmicrogrid’.
(ii) An algorithm is proposed to store energy from the electrical grid based on the dayahead realtime pricing. This energy is stored on the basis of the predicted energy generation, energy consumption, and time.
Related Work
This work is pertaining to the microgrid. Energy trading among prosumers is a hot topic. Energy sharing at the prosumers levels (where the number of prosumers is large and the amount of energy exchange is very small) is discussed in this research. Energy sharing among multiple prosumers in a microgrid is studied in [8, 9] using auction bidding among the sellers; and is studied in [10,11,12] using auction bidding among the sellers and buyers. The auction bidding method is not good for the domestic prosumers because it is a very cumbersome process. Prosumers are not going to bid, decide the prices, and change their energy usage pattern every hour. For the small quantity of energy sharing among the prosumers, the strategies are studied in [13,14,15,16,17,18,19]. The approaches for the sharing of energy are compared in Table 1. The “ ” indicates that the corresponding attribute is present. The “ ” indicates that corresponding attribute is not present. The “ ” indicate the solution strategy can work with/without the corresponding attribute. The schemes in the first three rows have the issues of frequent energy injection to the grid and economical inefficiency. These two problems are addressed in the scheme provided in the fourth row using physical central storage and internal pricing mechanism using Stackelberg game. The scheme given in fifth and sixth rows also proposed solution based on penalty mechanism and internal price codecided by the prosumers. Seventh row proposed a scheme based on energy generation and consumption information of prosumers. But the concept of physical central battery storage has another problem of efficiency and thereby energy loss when it is charging and discharging to store surplus energy and fulfill excess demand of the prosumers. This research proposes a novel approach of sharing energy among the prosumers based on software program to solve the above issues. This research article removes physical central storage and use the concept of virtual shared distributed energy storage which gives the impression of a central storage but in reality the storages are physically distributed.
The work in [5] and [7] deserve a detailed explanation and comparison of the concepts because the proposed idea is closely related. We have considered four bases, namely, (i) concept, (ii) computation requirement, (iii) cost of investment for the battery energy storage, and (iv) benefit, on which the work is compared.
On the Basis of Concept
In the work of [5], it is virtualizing the central physical energy storage into multiple small virtual storages. In the work of [7], it is also virtualizing the central physical energy storage into multiple small virtual storages. It virtualizes the storage services into finegrained resources, namely, (i) charging power (kW), (ii) discharging power (kW), (iii) capacity (kWh), and (iv) energy (kWh). In the proposed work, we are virtualizing the physical battery energy storages which are physically distant i.e., distributed or located at different locations, into one large virtual storage which is managed centrally. The basic difference from the work in [5] and [7] is that the one central physical storage is divided into multiple small virtual storages while, in the proposed work, the multiple physically distributed storages are virtualized into one large virtual storage.
On the Basis of Computation Requirements
The work, in [5], is formulated as a twostage problem. In stage 1, it determines the price of the virtual storage. In stage 2, for the given unit price of the virtual storage, each enduser decides the optimal capacity to purchase. This problem is solved through backward induction. Firstly, stage 2 is solved to get the endusers optimal solution under a fixed price. Secondly, stage 1 is solved by incorporating the endusers decision into stage 1. The stage 1 problem is formulated as a linear programming problem. The stage 2 problem is formulated as a quadratic programming problem.
The work, in [7], is formulated as the NPhard problem using auction strategy. A fully polynomialtime approximation scheme is developed to decide the pricing of the auction. This formulation is also similar to work in [5] in terms of computation. The energy storage operator acts as auctioneer. The endusers bids for the storage resource. The endusers bid the price, keeping in mind that they have to optimize their utility. So, endusers do computation like the work in [5], and after that, send the bid to the energy storage operator, i.e., auctioneer. The auctioneer does computation and decides the price. The work in [7] also proposes a distributed algorithm to solve the price. It offloads the computation to the endusers through the communication network. Offloading the computations to the endusers requires advanced software functionality. Therefore, by distributing the computation, it reduces the centralized computation requirement, but on the other hand, it increases the overhead on the endusers. So, the overall computation requirement is similar to the work in [5].
In the proposed work, the Stackelberg game is used for pricing, and it is similar to the twostage problem. The endusers first decide their requirement on the basis of their utility maximization under the given price. After this, energy sharing computer program computes the price using the data provided by the endusers. So, the proposed strategy also requires similar computation as the work in [5].
On the Basis of the Cost of Investment for Battery Energy Storage
The cost for battery storage in the work [5] and [7] would be the same because both are the centralized management. In the proposed work, it seems there would be more costly, but it would be similar to the centralized management because all the physically distributed batteries are managed centrally. The cost would be more only, as given in the [5], if the batteries are installed in a distributed manner and are managed by the enduser itself.
On the Basis of Benefit
The work in [5] gets the benefit of the central management, e.g., the complementarity of the different endusers charge and discharge requirement. The work in [7] also gets the same benefit as in the work [5]. The proposed work gets the benefits of both, first, the central management, e.g., the complementarity of different endusers’ charge and discharge, and second, distributed energy storages, e.g., reduces distribution energy loss.
Softmicrogrid: CyberPhysical Energy Sharing Program
A prosumer has an energy generation unit (e.g., photovoltaic cells), an energy storage, and a smart meter. It is assumed that the energy infrastructure has the capability of communication (advanced metering infrastructure). The idea is to construct a Virtual Shared Distributed Energy Storage (VSDES) which is constituted from the energy storage of the spread out prosumers across the microgrid. VSDES acts as a public central energy storage. There is not any physical central energy storage in the cyberphysical energy sharing structure. Figure 1a illustrates a scenario of cyberphysical energy sharing structure. Energy Sharing Program (ESP) constructs the VSDES and takes care of the internal pricing and the charging/discharging activity of the VSDES. ESP broadcasts the internal prices to the prosumers and sends control signal for charging and discharging to the prosumers. It is assumed that every prosumer is the member of VSDES. The partial capacity of the battery is taken from the prosumers to constitute the VSDES. The battery of a home is logically divided in two parts (i) prosumer’s portion (named private portion), and (ii) VSDES’s portion (named public portion). As shown in the Fig. 1a, the VSDES is constituted by the public portion of storage of prosumers p_{1}, p_{2}, p_{3}, and p_{4}. What are the benefits of VSDES compared to a central physical energy storage? To understand the benefits, let us take a scenario as in the Fig. 1b.
Suppose homes p_{2}, p_{4}, and p_{7} require i_{2}, i_{4}, and i_{7} current for time t. These electric current are fulfilled by the physical central battery as shown in Fig. 1b. The resistance of the wire segments are shown in Fig. 1b. The segment AB has R_{1} resistance, segment BC has R_{2} resistance, segment BD has R_{3} resistance, etc. Here, the segment AB and BC are equal; R_{1} and R_{2} are also equal. According to Joule’s equation, electrical heating energy loss would be
Suppose, instead of the physical central energy storage, a virtual central energy storage which is constituted by the concept of the virtual shared distributed energy storage is used. For example, public portion of battery of prosumer p_{1}, public portion of battery of prosumer p_{3}, and public portion of battery of prosumer p_{5} constitute a VSDES. Electric current requirements of the homes p_{2}, p_{4}, and p_{7} are fulfilled by the VSDES (i.e., p_{1} provides i_{2}, p_{3} provides i_{4}, and p_{5} provides i_{7}). Then the electrical heating energy loss would be
If we compare H_{1} and H2, H_{1} is greater than H2. It shows that reduction in loss of energy by VSDES. This illustration uses simple distribution topology to show the advantage of reduction in loss of energy by VSDES. In reality, the energy distribution topology can be very complex but VSDES will provide its benefit of reduction of loss of energy. Assume that i_{2} = 5 amp, i_{4} = 10 amp, i_{7} = 12 amp, R_{1} = 10 ohm, R_{2} = 10 ohm, R_{3} = 6 ohm, R_{4} = 8 ohm, R_{5} = 7 ohm, R_{6} = 12 ohm, R_{7} = 5 ohm, R_{8} = 9 ohm, R_{9} = 11 ohm, and t = 1 hour (i.e., 3600 seconds). Value of H_{1} and H_{2} would be 35438400 Joule and 15105600 Joule.
We can observe that the difference between H_{1} and H_{2} is 20332800 Joule. ((H_{1} − H_{2}) × 100)/H_{1} = 57.375 i.e., H_{1} is 57.375% more than H_{2}. It shows that VSDES has a huge impact on reduction in loss of energy. The technical loss of the energy is due to the resistance in the wire, the magnetization of energy, iron and copper loss in equipments. There is also energy loss in charging and discharging of the battery, i.e., electrical to chemical energy conversion loss and chemical to electrical energy conversion loss. Here, in the example, we are not considering all other losses except only the resistive loss is considered to understand the concept. Along with this, other benefits of VSDES are as follows: (i) suppose a prosumer wants to sell energy which is stored in his/her private battery portion (prosumer’s battery is logically divided into two parts one for prosumer (i.e., private) and another for VSDES (i.e., public)) and public battery portion of VSDES is empty or have space to store energy then prosumer sells energy without any loss (i.e., zero loss), here only the logical transfer of energy rather than physical transfer, (ii) the maximum charging/discharging rate bottleneck of a central physical storage is also addressed. We illustrate it with an example. Suppose there is a central physical storage which has 3kW charging and discharging rate. VSDES is made of six prosumer’s storage which has 2kW charging and discharging rate. So, VSDES maximum charging and discharging rate would be 12kW. In this way, VSDES helps to reduce the charging/discharging rate bottleneck of the central physical storage.
As shown in Fig. 1a, energy sharing program (i.e., a computer program) which manages the energy sharing, has three components, as depicted in Fig. 2. The prosumers’ location and identity component contains the information about the physical location and identity of the prosumer. The dayahead VSDES charging and discharging component implements the VSDES concept and implements the charging and discharging mechanism. The internal dayahead realtime pricing component implements the mechanism for calculating the internal dayahead realtime price using grid dayahead realtime price. The concepts to implement energy sharing program is discussed in detail throughout in this article. The implementation of these concepts is hosted at github.com. One can access the implementation at GitHub Repository (https://github.com/BrijendraMNNIT/EnhancedFNCSApplicationPatch).
CyberPhysical Energy Sharing System Model
To implement VSDES, ESP has arrays to contain the information of public portion of battery storage of each prosumer, available amount of energy of public portion of battery storage of each prosumer, and physical location of each prosumer. ESP sends control signals to the VSDES batteries for charging and discharging. ESP updates the the available amount of energy of public portion of each battery by their usage time and charging and discharging rate. Another way is also to update this information if the battery sends its charging and discharging energy amount to the ESP. A day is divided into 24 slots of one hour each. \({\lambda _{s}^{h}}\) is the price in time slot h at which a prosumer can sell energy to the ESP (i.e., ESP buys energy from the prosumer at \({\lambda _{s}^{h}}\) price in time slot h), \({\lambda _{b}^{h}}\) is the price in time slot h at which prosumer can buy energy from the ESP (i.e., ESP sells energy to the prosumers at \({\lambda _{b}^{h}}\) price in time slot h), \(\lambda _{gs}^{h}\) is the price in time slot h at which ESP sells energy to the electrical grid (i.e., electrical grid buys energy at the price \(\lambda _{gs}^{h}\) in time slot h), and \(\lambda _{gb}^{h}\) is the price in time slot h at which ESP buys energy from the electrical grid (i.e., electrical grid sells energy to ESP at the price \(\lambda _{gb}^{h}\) in time slot h). λ_{min} is the minimum price at which ESP can sell energy to the grid or prosumer in a day. λ_{max} is maximum price at which ESP bought energy to save in the VSDES. λ_{min} is the minimum of \(\lambda _{gs}^{h}\) in a day (i.e., minimum of \(\{\lambda _{gs}^{1}, ..., \lambda _{gs}^{h}, ..., \lambda _{gs}^{24}\}\)). λ_{max} is the maximum of \(\lambda _{gb}^{h}\) in a day. One important constraint which should be satisfied in every time slot is given in Eq. 6. This equation says that internal prices should be within the electrical grid prices.
Utility Model of a Prosumer
Let P be a set of N prosumers i.e., P = {p_{1},...,p_{i},...,p_{N}}. p_{i} denotes a unique identity of the i^{th} prosumer. Every prosumer p_{i} has its physical location (lx_{i},ly_{i}). Each prosumer p_{i} generates energy \(E_{p_{i}}^{h}\) and consumes \(x_{p_{i}}^{h}\) in time slot h. Private portion of the battery of a prosumer is assumed a variable load/energy source of the prosumer and its load/supply is included in \(x_{p_{i}}^{h}\) and \(E_{p_{i}}^{h}\). The utility model of a prosumer is given as
where b is battery life loss cost, \(c_{p_{i}}^{h}\) is the amount of energy exchange in time slot h from the private portion of the battery. \(k_{p_{i}}^{h}ln(1+x_{p_{i}}^{h})\) is the utility achieved by consuming \(x_{p_{i}}^{h}\) amount of energy and \(k_{p_{i}}^{h}\) is a preference parameter [16, 17, 19]. The natural logarithm function has been used for modeling utility of a power consumer [20]. For given internal prices \({\lambda _{s}^{h}}\) and \({\lambda _{b}^{h}}\), the Eq. 7 is a concave function with some constraints, explained in Appendix.
Utility Model of ESP
All the prosumers are divided in two groups, (i) buyer and (ii) seller. Assume that PB be the set of buyer prosumers and PS be the set of seller prosumers. Therefore, P = PB ∪ PS. Let \({E_{b}^{h}}= {\sum }_{p_{i} \in PS} (E_{p_{i}}^{h}  x_{p_{i}}^{h})\) if \(E_{p_{i}}^{h}  x_{p_{i}}^{h} > 0\) and \({E_{s}^{h}}= {\sum }_{p_{i} \in PB} (x_{p_{i}}^{h}  E_{p_{i}}^{h})\) if \(E_{p_{i}}^{h}  x_{p_{i}}^{h} \leq 0\)
where \(d_{pp}^{h}\) is physical movement of energy in the VSDES from prosumers, \(d_{pl}^{h}\) is logical movement of energy from prosumers to VSDES, (\(d_{pp}^{h} + d_{pl}^{h} \)) is the amount of energy which is stored in the VSDES by the ESP, and d^{h} is energy supplied by the VSDES to the prosumers in the h^{th} time slot. Suppose a prosumer is selling its energy to the ESP, which is stored in the private portion of his/her battery. If the ESP stores that energy into the public portion of the same physical battery of the prosumer, this means that there is not any physical movement of the energy from one place to another place; we have named it as the logical movement of energy. If the ESP stores that energy into some other prosumers’ battery public portion, it means the energy has to flow from one place to another place; we named it as the physical movement of energy. ESP is a nonphysical entity. That means, there is no third identity between electrical grid and prosumers who makes profit. So, the profit by sharing energy is distributed among the prosumers.
Charging/Discharging of Virtual Shared Distributed Energy Storage and Internal Pricing
This section explains charging and discharging policy for VSDES and mechanism to decide internal pricing (i.e., \({\lambda _{s}^{h}}\), \({\lambda _{b}^{h}}\)).
Dayahead Charging Schedule of VSDES to Store Energy from the Electrical Grid
In the dayahead charging schedule algorithm, we are only finding out the time slots and amount of energy which is going to be stored in the VSDES. Here, we assume that there is enough storage capacity is available, and there is not any bottleneck of the charging and discharging rate.
If the energy produced by all the prosumers is not sufficient, then the VSDES stores energy from electrical grid when the price is low based on the expected generation and consumption information of the prosumers. An assumption is that the electricity grid announces dayahead realtime pricing for buying and selling energy by ESP from the electrical grid (i.e., \(\lambda _{gb}^{h}\) and \(\lambda _{gs}^{h}\)). Every prosumer sends dayahead expected energy generation and consumption to the ESP. Therefore, ESP has information about approximate power generation and consumption of each time slot. Let energy production in each time slot is < ee_{1},...,ee_{h},...,ee_{24} > by all the prosumers and required energy is < er_{1},...,er_{h},...,er_{24} > by all the prosumers. ee_{h} is the energy generation by all the prosumers in h^{th} time slot. er_{h} is the energy consumption by all the prosumers in h^{th} time slot. It is the dayahead predicted values by all the prosumers. The prediction will have some error (i.e., either some more energy or less energy). If the error has the mean μ and variance σ^{2} then the total error by prosumers is normally distributed (Gaussian distribution) with mean Nμ and variance Nσ^{2} (by Central Limit Theorem). So, the energy production would be < ee_{1} + X_{1},...,ee_{h} + X_{h},...,ee_{24} + X_{24} >, where X_{h} is a random variable which is normally distributed with mean Nμ_{1} and variance \(N{\sigma _{1}^{2}}\). Similarly, energy consumption would be < er_{1} + Y_{1},...,er_{h} + Y_{h},...,er_{24} + Y_{24} >, where Y_{h} is a random variable which is normally distributed with mean Nμ_{2} and variance \(N{\sigma _{2}^{2}}\). Cumulative energy production and cumulative energy requirement are < ee_{1} + X_{1},ee_{1} + ee_{2} + X_{1} + X_{2},...,ee_{1} + ... + ee_{24} + X_{1} + ... + X_{24} > and < er_{1} + Y_{1},er_{1} + er_{2} + Y_{1} + Y_{2},...,er_{1} + ... + er_{24} + Y_{1} + ... + Y_{24} >. Let the cumulative energy production and requirement are denoted as < EE_{1},EE_{2},...,EE_{24} > and < ER_{1},ER_{2},...,ER_{24} >, respectively. Algorithm 1 gives the dayahead charging schedule for the VSDES. The ESP stores energy in the VSDES using this schedule from the electrical grid. Algorithm 1 gives the tuple < (bc_{0},cs_{0}),(bc_{1},cs_{1}),...,(bc_{23},cs_{23}) >. bc_{i} contains the amount of energy which would be purchased from grid and cs_{i} is the corresponding time slot in which energy is purchased. Sort this tuple according to charging slot (cs). So, this tuple will give the charging slot (which has the lowest price) and amount of energy which needs to be stored in the VSDES. The idea of dayahead charging schedule of VSDES is based on the known information of generation and consumption in each time slot. If we know how much energy is going to be a shortage in which slot, we can charge the VSDES with that amount of energy with the lowest price available before that slot. While in [16], the charging schedule is based on two threshold values regardless of the generation or consumption information.
VSDES Charging and Discharging Mechanism for Surplus Energy Generated/Demanded by Prosumers
If the total produced energy by all the prosumers is greater than the total consumption by all the prosumers at any instant of time then that surplus energy will be stored in the VSDES or to be sold to the electrical grid directly. Here, ESP sells energy to the grid only when VSDES is full (to reduce the penetration to the electrical grid). Every prosumer p_{i} has a coordinate (lx_{i},ly_{i}). By this coordinate, ESP knows the location of every prosumer. Suppose, if prosumer p_{i} has surplus energy (i.e., \(E_{p_{i}}^{h} > x_{p_{i}}^{h}\)) then it will sell energy to the ESP. ESP will store this energy in the VSDES if \({E_{b}^{h}} > {E_{s}^{h}}\). The question is that which public storage in VSDES would be chosen to store energy. To select the public storage, the idea is based on the distance between the energy supplier prosumer and the public storage prosumer. To find out the distances, ESP has an N × N distance matrix.
where d_{ij} is the distance between the prosumer p_{i} and p_{j}. The value d_{ij} = 0, if i = j. Distance between the prosumer p_{i} and p_{j} is calculated by \(d_{ij} = \sqrt {(ly_{j}  ly_{i})^{2} + (lx_{j}  lx_{i})^{2}}\). If prosumer p_{i} wants to sell energy to the ESP, then ESP stores this energy in the public storage at the prosumer p_{j} which is nearest to the prosumer p_{i}. If the battery (i.e., the public storage) at the nearest prosumer is full, then ESP assigns next nearest prosumer. Similarly, if prosumer p_{i} needs some energy and if it is fulfilled by VSDES then the ESP chooses the nearest p_{j} to supply energy.
One can think that charging VSDES from electrical grid causes more energy loss than central physical storage due to more travel distance of the electric current. In the case of the VSDES, energy loss is high during charging than the central physical storage but discharging loss is low due to consumption units are nearby to the VSDES. In the case of central physical storage, charging loss is less but discharging loss is high. Here, we consider that in both cases (central physical storage and VSDES), loss of the energy is the same in respect of energy from the electrical grid. VSDES provides benefits of energy loss reduction for the case of charging/discharging from/to the prosumer’s local energy supply and consumption.
Internal Pricing Based on Stackelberg Game
ESP decides the prices \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\). The prosumers decide their consumption based on the \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\). The ESP and prosumers rationally maximize their utility profit. ESP works as a leader while prosumers work as followers. So deciding the internal price is a single leader and multiple followers game. ESP gets the advantage of being a leader. ESP knows the utility function of the prosumers; therefore, ESP can find out what would be the energy consumption by prosumers on a particular price. Using this information, ESP decides internal prices such that ESP maximizes its utility profit. For a given price \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\), it is a simple game among N prosumers in which each prosumer will maximize his/her utility profit. Formally, this game can be written in the strategic form as follows
where

1.
P is the set of prosumers who act as the follower and ESP acts as the leader

2.
\(\mathbf {X_{p_{i}}^{h}}\) is the set of strategies for prosumer p_{i}, i.e., the energy consumption in time slot h by prosumer p_{i} (i.e., \( x_{p_{i}}^{h} \in \mathbf {X_{p_{i}}^{h}}\))

3.
\(\mathbf {U_{p_{i}}^{h}}\) is utility function of prosumer p_{i} (given in Eq. 7) by which prosumer calculates its utility profit on the consumption of energy \( x_{p_{i}}^{h}\)

4.
\(U_{ESP}^{h}\) is the utility function (given in Eq. 8) of the ESP by which ESP calculates its profit

5.
\(\boldsymbol {{{\Lambda }_{b}^{h}}}\) and \(\boldsymbol {{{\Lambda }_{s}^{h}}}\) are strategies set of the ESP which always hold (6).
Solution for game G is the Stackelberg equilibrium. A set of strategies \((\mathbf {X^{h*}},\lambda _{b}^{h*}, \lambda _{s}^{h*})\) constitutes an Stackelberg equilibrium if and only if
where \( \mathbf {X^{h*}} = [x_{p_{1}}^{h*}, x_{p_{2}}^{h*}, ..., x_{p_{N}}^{h*}]\) and \( \mathbf {X_{p_{i}}^{h*}} = [x_{p_{1}}^{h*}, ...,\\ x_{p_{i1}}^{h*},x_{p_{i+1}}^{h*}, ... ,x_{p_{N}}^{h*}] \). At the Stackelberg Equilibrium (SE), prosumer or ESP can not make higher benefits by choosing other strategies. The existence of a unique Stackelberg equilibrium for the proposed model is discussed in Appendix.
How to find the Stackelberg equilibrium for the proposed utility model of prosumers and the ESP. The internal price \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\) can be solved in centralized manner having objective to maximize the benefit of ESP. To find the SE, the following steps are performed [17] as follows.

1.
Each prosumer sends its energy generation information \(E_{p_{i}}^{h}\) and \(k_{p_{i}}^{h}\). \(k_{p_{i}}^{h}\) is calculated by using the electrical grid prices \(\lambda _{gs}^{h}\) and \(\lambda _{gb}^{h}\) as reference price.

2.
ESP calculates \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\) using Eqs. 8 and 6.

3.
ESP broadcasts the \({\lambda _{b}^{h}}\) and \({\lambda _{s}^{h}}\) to all the prosumers.

4.
Above three steps are repeated for each time slot.
Case Study
For the simulation, we used the GridLABD (power distribution system simulator), ns3 (network simulator), and FNCS (Framework for Network CoSimulation). We have taken six houses. Photovoltaic cells are used at every house as an energy generator. The VSDES is constituted using battery public portion of the houses. The solar panel size, VSDES size, and schedule skew of each house are given in Table 2.
Schedule skew is the variation of time when each house uses their appliances. Maximum discharging rate and maximum charging rate are 3kW. Charge lockout time and discharge lockout time are one second. Inverter efficiency is 0.95. Each house consists of HVAC (Heating, Ventilation, and Air Conditioning) system, water heater, light, cloth washer, refrigerator, dryer, freezer, range, and microwave. Each house also has 10kWh battery storage. HVAC system and water heater are controlled by the passive controller which work on the basis of internal realtime price. The data for the devices are taken from [21]. Water heater tank volume size is 50 gallons. We have also taken a three phase load 10 kVA, 50 kVA, and 49 kVA in phase A, B, and C, respectively. The different types of loads, are water heater, HVAC (Heating, Ventilation, and Air Conditioning), lights, clothes washer, refrigerator, dryer, freezer, cooking range, and microwave. Figure 3 shows the topology of the simulation setup. The load profile and PV generation profile is as given in the Figs. 4 and 5. In the simulator to implement VSDES, we use two separate batteries at each house (for example, at the house 4, there is a battery of capacity 20 kWh which is part of the VSDES and there is another battery of capacity 10 kWh which is the part of the prosumer portion). A softwaredefined battery [22] is implemented in which the charging and discharging operations are controlled by software. In ns3, all the houses are connected through the Ethernet network. The data rate of the channel is 100Mbps and delay is 6560 nanoseconds. There are two nodes n0 and n1 which are connected through the point to point network. Node n0 is corresponding to the subauction object in the GridLABD simulator. The node n1 implements the proposed softwareassisted mechanism as an application program which determines the dayahead charging schedule for the VSDES and determines internal realtime price. This application program sends control signals to the VSDES batteries for charging and discharging. It sends internal realtime price to the subauction object (which acts as a market for the prosumers) of GridLABD. VSDES charging and discharging for the surplus generation and excess demand by prosumers are implemented in the application program at the node n1 with some assumptions for the simulation purpose. These assumptions are (i) for the surplus energy generated by a prosumer, the nearest public storage is sufficient to accommodate all those energies (i.e., there is no need of next nearest VSDES battery), (ii) for the excess demand of energy by a prosumer, only the nearest VSDES public storage is considered to provide those energies, if the VSDES public storage is not sufficient, then the energy is taken from the grid rather than the next nearest VSDES public storage. For this case study, each \(k_{p_{i}}^{h}\) [16] is generated as a uniform random variable between range [90,150]. The dayahead grid realtime price (\(\lambda _{gb}^{h}\)) is taken from New York Independent System Operator (NYISO) for Central New York for date 21 February 2019 to 28 February 2019. And the \(\lambda _{gs}^{h}\) is 50 percent less than the \(\lambda _{gb}^{h}\) [18]. For the case study, six solar panels of size (i) 567.04, (ii) 850.56, (iii) 708.80, (iv) 1134.08, (v) 283.52, and (iv) 425.28 square feet have been considered. The inverter efficiency 0.95 is considered. The inverter is of type fourquadrant and the maximum charging and discharging rate is 3 kW. The charge lockout and discharge lockout time of the battery storage is taken 1 second. The battery efficiency 0.81 is taken. The battery is the Lithiumion battery. The home floor area is 2100 square feet, the cooling system type is electric, the number of doors is 2, indoor air temperature is 71.9 Fahrenheit, HVAC power factor is 0.97, water heater tank volume is 50 gallons, and lights, clothes washer, refrigerator, dryer, freezer, range, and microwave are ZIP (Impedance (Z), Current (I), and Power (P)) load. The load profiles and PV power generation of each prosumer is shown in Figs. 4 and 5. The adjacent prosumers storage capacity are as follows (i) prosumer 1, 2, 3, 4, 5 and 6 the adjacent storage capacity are (10, 10, 20, 15, 5), (10, 20, 15, 5, 10), (20, 15, 5, 10, 10), (15, 5, 10, 10, 10), (5, 10, 10, 10, 20), and (10, 10, 10, 20, 15) in kWh, respectively [21].
The system losses are energy loss due to resistance in the wire, the magnetization of energy, iron loss, copper loss, loss in power electronic device (inverter), electrical to chemical energy conversion loss, and chemical to electrical energy conversion loss in the battery. In the simulation study, inverter efficiency has been taken 0.95, and round trip efficiency of the battery has been taken 0.81. From the Fig. 6, we can see that the distributed mechanism is better than the central storage mechanism; it is compared for the total energy of each day for seven days in the simulation study. A comparison has been done to observe the effects of the distributed batteries management and the central battery management. The total energy consumption of each day is compared for seven days in the simulation study. The Fig. 6 shows that the distributed batteries management system can perform better. The grid trading power and load profile of all the prosumer are depicted in the Fig. 7.
The ns3 implements the application programs corresponding to each house. The GridLABD implements the electrical grid topology. FNCS cooperates for cosimulation of ns3 and GridLABD. The internal price of day 4 is depicted in Fig. 8a. It shows that the price for hours 7 to 8, 8 to 9, 16 to 17, and 17 to 18 are less than the grid selling price which benefit the prosumers in terms of the electricity bill. The dayahead charging schedule of VSDES of the day 4 is depicted in Fig. 8b. It shows that the 1^{st} time slot, 4^{th} time slot, and the 7^{th} time slot for charging VSDES with the respective amount of energy. The other simulation days results are depicted in Figs. 9 and 10 and summarized in Table 3.
Analysis of Results
In [16], two thresholds based charging and discharging of central physical battery storage is discussed. In the two thresholds based scheme, two price levels (such as, \(p_{gb}^{min}\) and \(p_{gb}^{max}\)) are decided by the controller. The controller charges the central battery storage if the grid realtime price is less than \(p_{gb}^{min}\) and discharging central battery storage if the grid realtime price is greater than \(p_{gb}^{max}\). In the proposed approach, the charging of VSDES is based on the hourly information of energy generation and the energy consumption of the prosumers. The benefit of the proposed scheme is that it only purchases the required amount of energy from the grid while the two thresholds based scheme does not care about the energy requirement but only care about the price. In [19], the charging schedule scheme utilizes the information of prosumers’ energy generation, consumption, and realtime price of the grid. They discussed the scheme based on the minimization of an objective function which is based on two price weight coefficients (i) ratio of current realtime price of that slot and maximum selling price of the day and (ii) ratio of minimum buying price of the day and current realtime price of that slot for each time slot. In the proposed approach, we consider the current time slot energy difference and all the preceding time slots to find the lowest price. The basis is to calculate how much energy is going to be a shortage in which time slot as explained in the Algorithm 1. So, before that time slot, we charge VSDES with that amount of energy with the lowest price available till that slot. Figure 11a depicts the comparison of the cost between the proposed dayahead charging schedule, threshold based dayahead charging schedule, and pricebased coefficient scheme. We can clearly observe that there is a huge difference in cost. In Figs. 9e and 10e, we can see that in the 1^{st} time slot the price is very low that is intentionally modified from the NYISO price to test the effectiveness of the proposed charging algorithm. In Fig. 11a, we can observe that at the 6^{th} day cost is very low that means the proposed algorithm is highly sensitive to the price (while the scheme proposed in [19] is not) and provides economic benefits to the prosumers. The charging threshold is taken as (maximum grid selling price of the day  minimum grid selling price of the day)×0.25 + minimum grid selling price of the day [16] i.e., one fourth of the range of minimum to maximum price. Figure 11b shows that threshold based scheme stores huge unnecessary energy from the grid which is not required.
The virtual shared distributed energy storage depends on the photovoltaic (PV) power generation. In the dayahead charging scheme of the VSDES, we have used the predicted power generation of the PV cells of the prosumers. If the PV power generation varies from the predicted value, then the dayahead charging schedule will not get the benefit of low pricing electricity slots from the realtime pricing scheme. In the situation when the power is not enough collectively by both the PV power and stored power in the VSDES, the power is directly taken from the grid on a realtime price basis, and it would be costly for the prosumers.
The costbenefit analysis of the central battery storage system and the distributed batteries storage system answers the following three cases: (i) central battery storage management, (ii) distributed battery storage, installed at each prosumer’s site and managed by the individual prosumer itself, and (iii) distributed battery storage, installed at the prosumer site but managed centrally.
The investment cost for the case (ii) would be greater [5] than the investment cost for the case (i). The central battery storage investment cost is lesser than when each prosumer invests individually because, if each prosumer manages its battery resource, he/she does not know the information of generation and demand for all the prosumer collectively, and battery resources are underutilized. So, it is better to own central storage by a third party than the owning battery storage by each prosumer. In the case (iii), we are utilizing the benefit of central battery management that is knowing information about the storage requirement of each prosumer and takes the benefits of complementarity of the different prosumers’ charge and discharge requirements through the software. In the case (iii), the cost would be similar to the central battery management even though the batteries are physically distributed because these are managed centrally using the ICT.
Conclusion
This research work discussed energy management using battery storage. The battery energy storage is suitable for balancing the variability of the renewable energy resources. The battery energy storage has a fast response time to handle the momentary fluctuations. This fast response time makes it suitable for the smart grid. The key contributions of this research work are (i) a cyberphysical energy sharing structure introducing a novel idea of the virtual shared distributed energy storage; this idea utilizes the wellknown fact that energy resources nearby the consumption unit reduces the energy loss; in the VSDES, the storages are physically distant and placed at the prosumers’ house and managed centrally through software, (ii) a dayahead charging scheduling algorithm; this proposed algorithm utilizes the predicted generation, consumption, and the consumption time of the energy to take advantage of the realtime pricing information of the grid. This work showed that the proposed strategy performs better than the thresholdbased strategy and the price weight coefficient based strategy.
References
 1.
The Smart Grid. https://energystorageforum.com/energystoragetechnologies/smartgridenergystoragesystemshttps://energystorageforum.com/energystoragetechnologies/smartgridenergystoragesystems. Last Accessed 18 October 2020
 2.
Luo X, Wang J, Dooner M, Clarke J (2015) Overview of current development in electrical energy storage technologies and the application potential in power system operation. Appl Energy 137:511–536
 3.
Singh BP, Gore MM (2017) Green energy generation from moving vehicles. Int J Eng Sci Technol (IJEST) 9(09S):137– 144
 4.
Zhao D, Wang H, Huang J, Lin X (2017) Pricingbased energy storage sharing and virtual capacity allocation. In: 2017 IEEE international conference on communications (ICC), Paris. https://doi.org/10.1109/ICC.2017.7997120, pp 1–6
 5.
Zhao D, Wang H, Huang J, Lin X (2020) Virtual energy storage sharing and capacity allocation. In: IEEE transactions on smart grid. 10.1109/TSG.2019.2932057, vol 11, pp 1112–1123
 6.
Kshemkalyani AD, Singhal M (2010) Distributed computing: principles, algorithms, and systems. Cambridge University Press
 7.
Zhong W, Xie K, Liu Y, Yang C , Xie S (2020) Multiresource allocation of shared energy storage: a distributed combinatorial auction approach. In: IEEE transactions on smart grid. https://doi.org/10.1109/TSG.2020.2986468, vol 11, pp 4105–4115
 8.
Cintuglu MH, Martin H, Mohammed OA (2015) Realtime implementation of multiagentbased game theory reverse auction model for microgrid market operation. IEEE Transactions on Smart Grid 6:1064–1072
 9.
Shamsi P, Xie H, Longe A, Joo J (2016) Economic dispatch for an agentbased community microgrid. IEEE Transactions on Smart Grid 7:2317–2324
 10.
Dimeas AL, Hatziargyriou ND (2005) Operation of a multiagent system for microgrid control. IEEE Transactions on Power Systems 20:1447–1455
 11.
Li J, Liu Y, Wu L (2018) Optimal operation for communitybased multiparty microgrid in gridconnected and islanded modes. IEEE Transactions on Smart Grid 9:756–765
 12.
Eddy Foo YS, Gooi HB, Chen SX (2015) Multiagent system for distributed management of microgrids. IEEE Transactions on Power Systems 30:24–34
 13.
Tazoe T, Matsumoto J, Ishi D, Okamoto S, Yamanaka N (2012) Novel scheduling method to reduce energy cost by cooperative control of smart houses. In: IEEE international conference on power system technology (POWERCON), pp 1–6
 14.
Zhu T, Huang Z, Sharma A, Su J, Irwin D, Mishra A, Menasche D, Shenoy P (2013) Sharing renewable energy in smart microgrids. In: ACM/IEEE international conference on cyberphysical systems (ICCPS), pp 219–228
 15.
Luo Y, Itaya S, Nakamura S, Davis P (2014) Autonomous cooperative energy trading between prosumers for microgrid systems. In: 39th annual IEEE conference on local computer networks workshops, pp 693–696
 16.
Tushar W, Chai B, Yuen C, Smith DB, Wood KL, Yang Z, Poor HV (2015) Threeparty energy management with distributed energy resources in smart grid. IEEE Trans Ind Electron 62:2487–2498
 17.
Liu N, Yu X, Wang C, Wang J (2017) Energy sharing management for microgrids with PV prosumers: a stackelberg game approach. IEEE Transactions on Industrial Informatics 13:1088– 1098
 18.
Liu N, Yu X, Wang C, Li C, Ma L, Lei J (2017) Energysharing model with pricebased demand response for microgrids of peertopeer prosumers. IEEE Transactions on Power Systems 32:3569–3583
 19.
Liu N, Cheng M, Yu X, Zhong J, Lei J (2018) Energysharing provider for PV prosumer clusters: a hybrid approach using stochastic programming and stackelberg game. IEEE Trans Ind Electron 65:6740–6750
 20.
Maharjan S, Zhu Q, Zhang Y, Gjessing S, Basar T (2013) Dependable demand response management in the smart grid: a stackelberg game approach. IEEE Transactions on Smart Grid 4:120–132
 21.
Daily J, Fisher A (2019) FNCStutorial, GridLABD, and ns3. https://github.com/FNCS/FNCSTutorial/tree/master/demogldns3https://github.com/FNCS/FNCSTutorial/tree/master/demogldns3. 2020, Last Accessed 29 Dec. 2020
 22.
Badam A, Chandra R, Dutra J, Ferrese A, Hodges S, Hu P, Meinershagen J, Moscibroda T, Priyantha B, Skiani E (2016) Softwaredefined batteries. Commun ACM 59:111–119
Author information
Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Appendix
Continuing with the discussion in the Section “Utility Model of a Prosumer” and “Internal Pricing Based on Stackelberg Game”, this section elucidates the concavity of the utility function and proof of the uniqueness of Stackelberg Equilibrium for the proposed model.
The utility function of a prosumer is given in Eq. 7. We check the continuity of the function given in the Eq. 7 when \(E_{p_{i}}^{h}=x_{p_{i}}^{h}\)
In Eq. 12, we can see that the values are equal, hence it is a continuous function. If we take \(c_{p_{i}}^{h}\) is a constant within some range (i.e., \(c_{p_{i}}^{h} \pm \delta \)) then this function would be a concave function and the utility extremum value can be easily find out by the \(\frac {\partial U_{p_{i}}^{h}}{\partial x_{p_{i}}^{h}} = 0\). And \(x_{p_{i}}^{h}\) uniquely exist as given by
We can see that, \(x_{p_{i}}^{h}\) is inversely proportional to the \({\lambda _{s}^{h}}\) price and \({\lambda _{b}^{h}}\) price. \(k_{p_{i}}^{h}\) is preference parameter of the prosumer, for the large value of \(k_{p_{i}}^{h}\) means that the prosumer wants to consume more energy. \(k_{p_{i}}^{h}\) is assumed to be a constant for the given time slot h. We can find out \(x_{p_{i}}^{h}\) using Eq. 13 for given \({\lambda _{s}^{h}}\) and \({\lambda _{b}^{h}}\).
We put the value of \(x_{p_{i}}^{h}\) into the utility function of the ESP given in Eq. 8.
if \({E_{b}^{h}} > {E_{s}^{h}}\) then,
if \({E_{b}^{h}} + d^{h} < {E_{s}^{h}}\) then,
Here, \({\lambda _{s}^{h}}\) and \({\lambda _{b}^{h}}\) are unknown variable. For the simplicity, we consider d^{h} is a constant within some range (i.e., d^{h} ± δ). Then, for the case \({E_{b}^{h}} > {E_{s}^{h}}\), Hessian matrix is
Here the value of the determinant of the matrix is greater than 0 and the value of \(\frac {\partial ^{2}U_{ESP}^{h}}{\partial ({\lambda _{b}^{h}})^{2}} < 0 \) and the value of \(\frac {\partial ^{2}U_{ESP}^{h}}{\partial ({\lambda _{s}^{h}})^{2}} < 0 \) that means \(U_{ESP}^{h}\) is a strictly concave function.
Similarly, for the case \({E_{b}^{h}} + d^{h} < {E_{s}^{h}}\), Hessian matrix is
Here again, the value of the determinant of the matrix is greater than 0 and the value of \(\frac {\partial ^{2}U_{ESP}^{h}}{\partial ({\lambda _{b}^{h}})^{2}} < 0 \) and the value of \(\frac {\partial ^{2}U_{ESP}^{h}}{\partial ({\lambda _{s}^{h}})^{2}} < 0 \) that means \(U_{ESP}^{h}\) is a strictly concave function for this case also. So, the optimal price \({\lambda _{s}^{h}}\) and \({\lambda _{b}^{h}}\) exist uniquely for both cases.
Rights and permissions
About this article
Cite this article
Singh, B.P., Gore, M.M. Softmicrogrid: a Software Assisted Microgrid for Optimal Prosumer Satisfaction. Technol Econ Smart Grids Sustain Energy 6, 4 (2021). https://doi.org/10.1007/s4086602000099z
Received:
Accepted:
Published:
Keywords
 Cyberphysical systems
 Energy sharing management
 Softwaredefined controls
 Virtual shared distributed energy storage
 Smart grid